Closed Tex-Ahmadi closed 1 year ago
@Tex-Ahmadi Thanks for the report! I found a couple of other templates which are also effected by this problem, I will fix them as well.
@josephwright I went through all the section in toc
templates and identified two more which exhibit this problem. The ball unnumbered
was straightforward to fix, but for the sections numbered
I could use a second pair of eyes.
The original behaviour is
Now I see three possible ways to fix this:
Keep current behaviour.
Make all labels same width. All entries will be aligned nicely, but for large numbers the space will get a bit tight
What do you think?
Tricky: I think with no clear 'good' option we leave as-is.
Tricky: I think with no clear 'good' option we leave as-is.
Ok, that's the easiest solution :)
Thanks for taking a look!
Just parking the code here in case someone will revisit the topic in the future...
Indentation which adapts to the width of the label:
\newlength{\beamer@toclabelwidth}
\defbeamertemplate{section in toc}{sections numbered}{%
\settowidth{\beamer@toclabelwidth}{\inserttocsectionnumber.}%
\addtolength{\beamer@toclabelwidth}{1.5ex}%
\leavevmode
% prevents the period to be printed with the first/last section option
\ifnum\beamer@tempcount>\beamer@toclastsection
\else
\ifnum\beamer@tempcount>0
\leftskip=\beamer@toclabelwidth\hskip-\beamer@toclabelwidth%
\hbox to\beamer@toclabelwidth{\inserttocsectionnumber.\hfil}%
\fi\fi%
\inserttocsection\par%
}
Fixed indentation:
\defbeamertemplate{section in toc}{sections numbered}{%
\leavevmode
% prevents the period to be printed with the first/last section option
\ifnum\beamer@tempcount>\beamer@toclastsection
\else
\ifnum\beamer@tempcount>0
\leftskip=3ex\hskip-3ex%
\hbox to3ex{\inserttocsectionnumber.\hfil}%
\fi\fi%
\inserttocsection\par%
}
test file:
in file beamerbaseauxtemplates.sty , row: 256-264
Solved by replacing in beamerbaseauxtemplates.sty , row: 256-264
Note: replac } in row 263 after of \kern1.25ex } in row 264
Solution output: