Inconsistent treatment of H1 headers in LaTeX build
See original GitHub issueDescribe the bug
Some H1 headers in .ipynb
Markdown cells are converted to LaTeX \chapter{...}
commands and some are converted to \section{...}
commands. I can’t seem to tell or control why/how this happens.
To Reproduce Steps to reproduce the behavior:
- Choose a jupyter-book project. I’m using this one.
- Ensure that project has many different H1-type headers in it (using Markdown’s
#
in.ipynb
cells), spread over several files. - Run
jupyter-book build . --builder pdflatex
. - View the generated PDF in
./_build/latex/
. (In the above repo, it’s right here). - The first
#
header seems to have become a chapter and all other#
headers have become sections within it.
Expected behavior Each H1 header should be treated equally, each creating its own chapter.
Environment (please complete the following information):
- Python Version 3.7.3
- Output of
jupyter-book --version
Jupyter Book: 0.7.0 # but I've tried with 0.7.2dev0 also and got the same problem
MyST-NB: 0.8.1
Sphinx Book Theme: 0.0.23
MyST-Parser: 0.8.1
Jupyter-Cache: 0.2.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:35 (30 by maintainers)
Top Results From Across the Web
Bibliography header inconsistency with my page style ...
I have tried to change \leftmark with \rightmark as suggested by @daleif . It solved the Bibliography headers, but the other chapters (numbered, ......
Read more >Headers and footers - Overleaf, Online LaTeX Editor
which explores and explains the low-level, mark-based, mechanisms used by TeX engines to create headers and footers—and why the \mark command is needed....
Read more >LaTeX2e unofficial reference manual (January 2022)
The following document class names are built into LaTeX. ... Thus, a command to set page headers is for a package while a...
Read more >Pandoc Markdown - Data Science with R
Turn your analyses into high quality documents, reports, presentations and dashboards with R Markdown. Use a productive notebook interface to weave together ...
Read more >Don't write in LaTeX! It's just for typesetting - Daniel Allington
Technically, LaTeX is built on top of TeX: 'a special-purpose ... was a top level heading ('Heading 1', equivalent to the HTML H1...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is great! Thanks for the persistence at it.
I think you can. This PR is has handled the extension use case as well: https://github.com/executablebooks/jupyterbook-latex/pull/45