From c27df5c951a8dfd1f4f2afad8c13b60b32b94cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my?= Date: Fri, 12 Feb 2021 09:48:40 -0500 Subject: [PATCH 1/2] A few PDF improvements Ref: #1342 1. Use the `oneside` option of the memoir class, which is better for reading on a screen and anything that isn't a bound book. 2. For now hardcode ToC depth to section. 3. Clear page after the title. --- src/Writers/LaTeXWriter.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Writers/LaTeXWriter.jl b/src/Writers/LaTeXWriter.jl index ed6f3a2b26..03fe3d495e 100644 --- a/src/Writers/LaTeXWriter.jl +++ b/src/Writers/LaTeXWriter.jl @@ -214,11 +214,13 @@ function writeheader(io::IO, doc::Documents.Document) isfile(custom) ? cp(custom, "custom.sty"; force = true) : touch("custom.sty") preamble = """ - \\documentclass{memoir} + \\documentclass[oneside]{memoir} \\usepackage{./documenter} \\usepackage{./custom} + \\settocdepth{section} + \\title{ {\\HUGE $(doc.user.sitename)}\\\\ {\\Large $(get(ENV, "TRAVIS_TAG", ""))} @@ -229,6 +231,7 @@ function writeheader(io::IO, doc::Documents.Document) \\frontmatter \\maketitle + \\clearpage \\tableofcontents \\mainmatter From 7ce10f2b7d69603c5254d81de0810e94a656d259 Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Mon, 15 Feb 2021 11:50:33 +1300 Subject: [PATCH 2/2] Add CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd53eabd6c..b8e64440fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ * ![Enhancement][badge-enhancement] `doctest()` no longer throws an error if cleaning up the temporary directory fails for some reason. ([#1513][github-1513], [#1526][github-1526]) +* ![Enhancement][badge-enhancement] Cosmetic improvements to the PDF output. ([#1342][github-1342], [#1527][github-1527]) + * ![Bugfix][badge-bugfix] Script-type doctests that have an empty output section no longer crash Documenter. ([#1510][github-1510]) * ![Bugfix][badge-bugfix] When checking for authentication keys when deploying, Documenter now more appropriately checks if the environment variables are non-empty, rather than just whether they are defined. ([#1511][github-1511]) @@ -700,6 +702,7 @@ [github-1337]: https://github.com/JuliaDocs/Documenter.jl/issues/1337 [github-1338]: https://github.com/JuliaDocs/Documenter.jl/issues/1338 [github-1339]: https://github.com/JuliaDocs/Documenter.jl/pull/1339 +[github-1342]: https://github.com/JuliaDocs/Documenter.jl/issues/1342 [github-1344]: https://github.com/JuliaDocs/Documenter.jl/issues/1344 [github-1345]: https://github.com/JuliaDocs/Documenter.jl/pull/1345 [github-1349]: https://github.com/JuliaDocs/Documenter.jl/pull/1349 @@ -749,6 +752,7 @@ [github-1519]: https://github.com/JuliaDocs/Documenter.jl/pull/1519 [github-1520]: https://github.com/JuliaDocs/Documenter.jl/pull/1520 [github-1526]: https://github.com/JuliaDocs/Documenter.jl/pull/1526 +[github-1527]: https://github.com/JuliaDocs/Documenter.jl/pull/1527 [julia-38079]: https://github.com/JuliaLang/julia/issues/38079