Created
September 11, 2017 05:36
-
-
Save jhconning/5afa690e8a844226f5574e93e310303f to your computer and use it in GitHub Desktop.
jupyter to PDF conversion without heading numbering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From: https://stackoverflow.com/questions/20264909/suppress-section-numberings-in-nbconvert-to-latex | |
| create: secnum.tplx | |
| --------------------------------- | |
| ((* extends 'article.tplx' *)) | |
| ((* block commands *)) | |
| \setcounter{secnumdepth}{0} % Turns off numbering for sections | |
| ((( super() ))) | |
| ((* endblock commands *)) | |
| -------------------------- | |
| jupyter nbconvert --to=pdf --template=secnum.tplx file.ipynb |
Thank you so much. Now I have some clarity on what to do, to avoid section numbering during PDF conversion. Thank you once again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're new to jupyter and latex, I would not start here with templates, or latex! What are you trying to do? The only thing the above template is doing is adding the line
\setcounter{secnumdepth}{0}to the beginning of whatever latex file you might care to produce in latex. You could also just paste that in directly to a latex file yourself.You can export jupyter notebooks straight to PDF (from jupyter notebook or from jupyter lab) and bypass complicated latex altoghether. Yes it will have numbered sections. If you really want to get rid of the numbering, you could export from jupyter to markdown without the numbering. THen open the markdown file with any markdown editor, add math or text, and then print the report to PDF. It will look nice and you'll avoid the headaches of learning to use a latex editor.