Skip to content

Commit

Permalink
fix TOC numbering overlapping issues (#51)
Browse files Browse the repository at this point in the history
* try using toc=flat

* redeclaring the section command different

* try 3em
  • Loading branch information
chrisfenner authored Dec 16, 2023
1 parent 926c3cd commit 0e65188
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ RUN tlmgr update --self && \
unicode-math \
titlesec \
newunicodechar \
tocloft \
tools \
changepage \
draftwatermark
Expand Down
19 changes: 7 additions & 12 deletions template/eisvogel.latex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
%%

%% Enable useful error output.
\errorcontextlines 10000
\errorcontextlines=10000

%%
% This template has been heavily customized for Trusted Computing Group.
Expand Down Expand Up @@ -124,15 +124,6 @@ $endif$

\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}

% Clean up the TOC a bit by ensuring that long section numbers don't overlap.
% https://tex.stackexchange.com/questions/64115/table-of-contents-chapter-number-width
% \usepackage{tocloft}
% \makeatletter
% \renewcommand{\numberline}[1]{
% \@cftbsnum #1\@cftasnum~\@cftasnumb
% }
% \makeatother

% PDF metadata
\hypersetup{
$if(title-meta)$
Expand Down Expand Up @@ -669,29 +660,33 @@ $endif$

\ExplSyntaxOff

% We have a few tweaks to how sections through subparagraphs work.
% Note the use of tocnumwidth to work around issues where the TOC numbering overlaps
% with the name of the section due to the length of the number.
\RedeclareSectionCommand[
runin=false,
afterindent=false,
tocnumwidth=3em,
beforeskip=\baselineskip,
afterskip=0em]{section}
\RedeclareSectionCommand[
runin=false,
afterindent=false,
tocnumwidth=3em,
beforeskip=.75\baselineskip,
afterskip=0em]{subsection}
\RedeclareSectionCommand[
runin=false,
afterindent=false,
tocnumwidth=3em,
beforeskip=.5\baselineskip,
afterskip=0em]{subsubsection}
\RedeclareSectionCommand[
runin=false,
%afterindent=false,
beforeskip=.5\baselineskip,
afterskip=0em]{paragraph}
\RedeclareSectionCommand[
runin=false,
%afterindent=false,
beforeskip=.5\baselineskip,
afterskip=0em]{subparagraph}

Expand Down

0 comments on commit 0e65188

Please sign in to comment.