
NEW: add `--individualpages` option for pdflatex builder (#944)

This commit adds support to build individual `pdf` files for each source document (.md etc) using the generic sphinx `pdflatex` builder. It can be enabled for `builder=pdflatex` using the `cli` option `--individualpages`, for example: ```bash jb build <project> --builder=pdflatex --individualpages ``` A use case is for lecture sets, where each file is an independent lecture, and also to support downloadable PDFs for websites. Individual `pdf` files can be specified manually in `sphinx` configuration through the [latex_documents](https://www.sphinx-doc.org/en/3.x/usage/configuration.html#confval-latex_documents) tuple configuration. This commmit implements an auto-builder that collects the source files and titles and updates the `latex_documents` tuple when calling `sphinx_build` An example for [myst-nb.example_project](https://github.com/executablebooks/myst-nb.example-project/pull/8/files ) shows how these tuples can be constructed. Co-authored-by:Chris Sewell <chrisj_sewell@hotmail.com>
Showing
- docs/advanced/pdf.md 20 additions, 1 deletiondocs/advanced/pdf.md
- jupyter_book/commands/__init__.py 27 additions, 0 deletionsjupyter_book/commands/__init__.py
- jupyter_book/config.py 8 additions, 5 deletionsjupyter_book/config.py
- jupyter_book/pdf.py 127 additions, 16 deletionsjupyter_book/pdf.py
- jupyter_book/sphinx.py 13 additions, 6 deletionsjupyter_book/sphinx.py
- tests/books/nested-pdflatex/_config.yml 10 additions, 0 deletionstests/books/nested-pdflatex/_config.yml
- tests/books/nested-pdflatex/_toc.yml 5 additions, 0 deletionstests/books/nested-pdflatex/_toc.yml
- tests/books/nested-pdflatex/source/content.md 1 addition, 0 deletionstests/books/nested-pdflatex/source/content.md
- tests/books/nested-pdflatex/source/index.md 1 addition, 0 deletionstests/books/nested-pdflatex/source/index.md
- tests/books/nested-pdflatex/source/sections/section1.md 1 addition, 0 deletionstests/books/nested-pdflatex/source/sections/section1.md
- tests/books/nested-pdflatex/source/sections/section2.md 1 addition, 0 deletionstests/books/nested-pdflatex/source/sections/section2.md
- tests/test_config.py 2 additions, 1 deletiontests/test_config.py
- tests/test_config/test_get_final_config_empty_.yml 1 addition, 0 deletionstests/test_config/test_get_final_config_empty_.yml
- tests/test_config/test_get_final_config_exclude_patterns_.yml 1 addition, 0 deletions...s/test_config/test_get_final_config_exclude_patterns_.yml
- tests/test_config/test_get_final_config_execute_method_.yml 1 addition, 0 deletionstests/test_config/test_get_final_config_execute_method_.yml
- tests/test_config/test_get_final_config_extended_syntax_.yml 1 addition, 0 deletionstests/test_config/test_get_final_config_extended_syntax_.yml
- tests/test_config/test_get_final_config_html_extra_footer_.yml 1 addition, 0 deletions.../test_config/test_get_final_config_html_extra_footer_.yml
- tests/test_config/test_get_final_config_latex_doc_.yml 1 addition, 0 deletionstests/test_config/test_get_final_config_latex_doc_.yml
- tests/test_config/test_get_final_config_launch_buttons_.yml 1 addition, 0 deletionstests/test_config/test_get_final_config_launch_buttons_.yml
- tests/test_config/test_get_final_config_repository_.yml 1 addition, 0 deletionstests/test_config/test_get_final_config_repository_.yml
tests/books/nested-pdflatex/_config.yml
0 → 100644
tests/books/nested-pdflatex/_toc.yml
0 → 100644
tests/books/nested-pdflatex/source/index.md
0 → 100644
Please register or sign in to comment