diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-09-16 22:05:40 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-09-16 22:05:40 -0300 |
commit | 6ead6169d2461ebfcf948da4af12e015b69350ac (patch) | |
tree | 71c8bdf4591195533b007fef23dbc93bf37bbb86 /structure | |
parent | 58dc341405aa9f0ce68b15ce3ce53927ed1f256e (diff) | |
download | bookup-6ead6169d2461ebfcf948da4af12e015b69350ac.tar.gz bookup-6ead6169d2461ebfcf948da4af12e015b69350ac.tar.bz2 |
Fix: TOC spacing0.2.1
Diffstat (limited to 'structure')
-rw-r--r-- | structure/book/en/00-header.tex | 25 | ||||
-rw-r--r-- | structure/book/pt-br/00-header.tex | 25 |
2 files changed, 50 insertions, 0 deletions
diff --git a/structure/book/en/00-header.tex b/structure/book/en/00-header.tex index ded10bd..64dcca6 100644 --- a/structure/book/en/00-header.tex +++ b/structure/book/en/00-header.tex @@ -42,6 +42,31 @@ % https://tex.stackexchange.com/questions/624033/long-sidenotes-break-marginfix-or-how-to-make-breakable-sidenotes \usepackage{marginfix} +% TOC customization +% The tufte-latex package relies on titletoc for TOC formatting. +% +% But the spacing between the section number and the section name is too small +% if the section name is too big. +% +% Example: "10.10Section name" instead of "10.10 Section name" +% +% Therefore we need to reset \titlecontents for section. +% +% The original code is full of "FIXMEs", so maybe this should be filled +% upstream as a bug, along with a Minimum Working Example (MVE). +% +% See https://ctan.org/pkg/tufte-latex +% https://github.com/Tufte-LaTeX/tufte-latex +% https://ctan.org/pkg/titletoc +% https://github.com/Tufte-LaTeX/tufte-latex/blob/efb8c8e836890bad71fb5834acdd316ebde6db12/tufte-common.def#L1672 +\titlecontents{section}% + [0em] % distance from left margin + {\vspace{0\baselineskip}\begin{fullwidth}\Large\rmfamily\itshape} % above (global formatting of entry) + {\hspace*{2em}\contentslabel{2.5em}} % before w/label (label = ``2.6'') + {\hspace*{2em}} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after + % Workaround to theorems work correctly % Maybe this is not needed anymore % See https://stackoverflow.com/questions/46942352/r-bookdown-document-with-theorem-does-not-render-when-output-file-is-specified diff --git a/structure/book/pt-br/00-header.tex b/structure/book/pt-br/00-header.tex index ded10bd..64dcca6 100644 --- a/structure/book/pt-br/00-header.tex +++ b/structure/book/pt-br/00-header.tex @@ -42,6 +42,31 @@ % https://tex.stackexchange.com/questions/624033/long-sidenotes-break-marginfix-or-how-to-make-breakable-sidenotes \usepackage{marginfix} +% TOC customization +% The tufte-latex package relies on titletoc for TOC formatting. +% +% But the spacing between the section number and the section name is too small +% if the section name is too big. +% +% Example: "10.10Section name" instead of "10.10 Section name" +% +% Therefore we need to reset \titlecontents for section. +% +% The original code is full of "FIXMEs", so maybe this should be filled +% upstream as a bug, along with a Minimum Working Example (MVE). +% +% See https://ctan.org/pkg/tufte-latex +% https://github.com/Tufte-LaTeX/tufte-latex +% https://ctan.org/pkg/titletoc +% https://github.com/Tufte-LaTeX/tufte-latex/blob/efb8c8e836890bad71fb5834acdd316ebde6db12/tufte-common.def#L1672 +\titlecontents{section}% + [0em] % distance from left margin + {\vspace{0\baselineskip}\begin{fullwidth}\Large\rmfamily\itshape} % above (global formatting of entry) + {\hspace*{2em}\contentslabel{2.5em}} % before w/label (label = ``2.6'') + {\hspace*{2em}} % before w/o label + {\rmfamily\upshape\qquad\thecontentspage} % filler + page (leaders and page num) + [\end{fullwidth}] % after + % Workaround to theorems work correctly % Maybe this is not needed anymore % See https://stackoverflow.com/questions/46942352/r-bookdown-document-with-theorem-does-not-render-when-output-file-is-specified |