-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF: Enable whole of project book style PDF #299
Conversation
the |
@@ -68,6 +68,11 @@ def __init__(self, builder, document): | |||
# Slideshow option | |||
self.metadata_slide = False #False is the value by default for all the notebooks | |||
self.slide = "slide" #value by default | |||
|
|||
## pdf book options | |||
self.in_index_toc = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's name this self.in_pdf_index
@@ -78,6 +83,13 @@ def visit_document(self, node): | |||
""" | |||
JupyterCodeTranslator.visit_document(self, node) | |||
|
|||
## if the source file parsed is index_toc and target is pdf | |||
if "index_toc" in self.source_file_name and self.jupyter_target_pdf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should replace index_toc
with a variable from conf.py
indicating which document contains the toc
for book style PDF
thanks @AakashGfude the testing is looking good -- I had waited for some changes in the I just need to fix
|
|
||
for path in [self.pdfdir, self.texdir]: | ||
ensuredir(path) | ||
|
||
self.pdf_exporter = PDFExporter() | ||
self.tex_exporter = LatexExporter() | ||
self.index_book = builder.config['jupyter_pdf_book_index'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AakashGfude let's leave this for now - but it is confusing that this configuration has a different name
|
fl_tex = self.texbookdir + "/" + self.index_book + ".tex" | ||
filename = self.index_book | ||
|
||
## checking if an explicit output filename is specified in the config file | ||
if "jupyter_pdf_book_name" in builder.config and builder.config["jupyter_pdf_book_name"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AakashGfude I suspect this needs to check jupyter_pdf_book
as the first condition above will always be met even if it is None
(i.e. as the default value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AakashGfude can you check this condition?
fixes #277 |
the need to update |
This PR enables a whole of project book style PDF