-
-
Save jhconning/5afa690e8a844226f5574e93e310303f to your computer and use it in GitHub Desktop.
| 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 |
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.
Thank you so much. Now I have some clarity on what to do, to avoid section numbering during PDF conversion. Thank you once again.
I am totally new to latex or Jupyter notebooks. So, can you please explain to me how to do this in a step-by-step process.
I need your help badly. I didn't understand the documentation on how to do this at all.