Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

FEAT: Support for Individual PDF (requires sphinxcontrib-jupyter=0.5.0) #701

Merged
merged 24 commits into from
Oct 4, 2019

Conversation

mmcky
Copy link
Collaborator

@mmcky mmcky commented Sep 23, 2019

This PR adds support for individual page PDF construction.

@mmcky
Copy link
Collaborator Author

mmcky commented Sep 23, 2019

  • @AakashGfude we need to resolve following issue with compilation. Looks like we need to check index dedent in translate_all
# Docutils version: 0.14 
# Jinja2 version: 2.10.1
# Last messages:
#   writing output... [ 46%] more_julia/data_statistical_packages
#   writing output... [ 48%] more_julia/general_packages
#   writing output... [ 49%] more_julia/generic_programming
#   writing output... [ 50%] more_julia/index
#   writing output... [ 51%] more_julia/need_for_speed
#   writing output... [ 53%] more_julia/optimization_solver_packages
#   writing output... [ 54%] more_julia/testing
#   writing output... [ 55%] more_julia/tools_editors
#   writing output... [ 57%] more_julia/version_control
#   writing output... [ 58%] multi_agent_models/aiyagari
# Loaded extensions:
#   sphinx.ext.mathjax (2.1.2) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/ext/mathja
x.py
#   sphinxcontrib.applehelp (1.0.1) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinxcontri
b/applehelp/__init__.py
#   sphinxcontrib.devhelp (1.0.1) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinxcontrib/
devhelp/__init__.py
#   sphinxcontrib.htmlhelp (1.0.2) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinxcontrib
/htmlhelp/__init__.py
#   sphinxcontrib.serializinghtml (1.1.3) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx
contrib/serializinghtml/__init__.py
#   sphinxcontrib.qthelp (1.0.2) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinxcontrib/q
thelp/__init__.py
#   alabaster (0.7.12) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/alabaster/__init__.py
#   sphinxcontrib.bibtex (unknown version) from /home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphin
xcontrib/bibtex/__init__.py
#   IPython.sphinxext.ipython_console_highlighting (unknown version) from /home/qebuild/anaconda3/envs/latest/lib/pyt
hon3.7/site-packages/IPython/sphinxext/ipython_console_highlighting.py
#   sphinxcontrib.jupyter (19.1.1) from /home/qebuild/repos/sphinxcontrib-jupyter/sphinxcontrib/jupyter/__init__.py
Traceback (most recent call last):
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 284, in build_main
    app.build(args.force_all, filenames)
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 345, in build
    self.builder.build_update()
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 319, in bu
ild_update
    len(to_build))
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 382, in bu
ild
    self.write(docnames, list(updated_docnames), method)
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 562, in wr
ite
    self._write_serial(sorted(docnames))
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 573, in _w
rite_serial
    self.write_doc(docname, doctree)
  File "/home/qebuild/repos/sphinxcontrib-jupyter/sphinxcontrib/jupyter/builders/jupyterpdf.py", line 132, in write_d
oc
    self.writer.write(doctree, destination)
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/docutils/writers/__init__.py", line 80, in wr
ite
    self.translate()
  File "/home/qebuild/repos/sphinxcontrib-jupyter/sphinxcontrib/jupyter/writers/jupyter.py", line 23, in translate
    self.document.walkabout(visitor)
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 174, in walkabout
    if child.walkabout(visitor):
  [Previous line repeated 1 more time]
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 187, in walkabout
    visitor.dispatch_departure(self)
  File "/home/qebuild/anaconda3/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 1895, in dispatch_de
parture
    return method(node)
  File "/home/qebuild/repos/sphinxcontrib-jupyter/sphinxcontrib/jupyter/writers/translate_all.py", line 686, in depar
t_list_item
    list_item_start = self.list_item_starts.pop()
IndexError: pop from empty list

@arnavs
Copy link
Member

arnavs commented Sep 23, 2019

Added @AnjuJoon as a reviewer so she can merge if need be.

@arnavs
Copy link
Member

arnavs commented Sep 30, 2019

I'm seeing errors with FFMPEG that are wrecking execution on nearly every lecture... but we don't see this on the actual site/jupyter. So something to do with PDF and GR? Dunno.

@arnavs
Copy link
Member

arnavs commented Sep 30, 2019

(If this persists after we try it again, we can do what Simon suggests here 10 days ago.)

theme/templates/latex.tpl Outdated Show resolved Hide resolved
@arnavs arnavs self-requested a review October 4, 2019 04:25
@mmcky mmcky added ready Ready to review and removed awaiting-testing labels Oct 4, 2019
Copy link
Member

@arnavs arnavs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mmcky, @AakashGfude, and @AnjuJoon for all your hard work on this feature.

Merging now as Matt has tested it.

@arnavs arnavs merged commit 3b8f871 into master Oct 4, 2019
@arnavs arnavs deleted the making-pdf branch October 4, 2019 23:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready Ready to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants