jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.73k stars 565 forks source link

Use of # header level 1 as notebook title ? #1901

Open t-fourcade-isp opened 1 year ago

t-fourcade-isp commented 1 year ago

Hi,

In order to have pdf that have proper title, I currently set it manualy in the notebooks metatada but it is a little bit cumbersome and then the notebook doesn't have a proper name when looking at it in jupyter.

IMO, it would be great if it was possible to use markdown cell # header 1 level as title when exporting notebook into latex/pdf. This way both the pdf and jupyter app would like great.

Does anybody know if there is a simple way to do so?

leodarrigade commented 5 months ago

I agree this would be a useful feature.

There is a pandoc argument --shift-heading-level-by=-1 that would seems to fit exactly that need. See this response on an issue raised on pandoc repo. However, I don't know how to pass this argument to nbconvert.

t-fourcade-isp commented 5 months ago

Thank you for the tip, I will look into it.