diff options
| author | Thomas Hodgson <[email protected]> | 2024-10-01 21:26:28 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-01 12:26:28 -0700 |
| commit | f2b1de53973b4633f057d621d2c1a22a00914bda (patch) | |
| tree | 663d5091ce2f84d0c5be9b962a9c892a9cbb260e /data | |
| parent | e583ab79700a299d1057b54899cccd82165a562b (diff) | |
Make --number-sections work with beamer (#10245)
+ Remove section numbering code from common.latex
+ Add section numbering to default.latex
+ Add logic for numbering sections in default.beamer. I moved the template setting
code to where other beamer templates are set. This makes the section-titles and
numbersections variables independent.
This should make --number-sections work with beamer.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/common.latex | 8 | ||||
| -rw-r--r-- | data/templates/default.beamer | 43 | ||||
| -rw-r--r-- | data/templates/default.latex | 8 |
3 files changed, 33 insertions, 26 deletions
diff --git a/data/templates/common.latex b/data/templates/common.latex index d8767d598..39db21249 100644 --- a/data/templates/common.latex +++ b/data/templates/common.latex @@ -227,14 +227,6 @@ $-- \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} $-- -$-- section numbering -$-- -$if(numbersections)$ -\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} -$else$ -\setcounter{secnumdepth}{-\maxdimen} % remove section numbering -$endif$ -$-- $-- subfigure support $-- $if(subfigure)$ diff --git a/data/templates/default.beamer b/data/templates/default.beamer index 5e52fd2f3..a3f667284 100644 --- a/data/templates/default.beamer +++ b/data/templates/default.beamer @@ -34,6 +34,31 @@ $endif$ \setbeamertemplate{caption label separator}{: } \setbeamercolor{caption name}{fg=normal text.fg} \beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ +$-- +$-- section numbering +$-- +$if(numbersections)$ +$else$ +% remove section numbering +\setbeamertemplate{part page}{ + \centering + \begin{beamercolorbox}[sep=16pt,center]{part title} + \usebeamerfont{part title}\insertpart\par + \end{beamercolorbox} +} +\setbeamertemplate{section page}{ + \centering + \begin{beamercolorbox}[sep=12pt,center]{section title} + \usebeamerfont{section title}\insertsection\par + \end{beamercolorbox} +} +\setbeamertemplate{subsection page}{ + \centering + \begin{beamercolorbox}[sep=8pt,center]{subsection title} + \usebeamerfont{subsection title}\insertsubsection\par + \end{beamercolorbox} +} +$endif$ $for(beameroption)$ \setbeameroption{$beameroption$} $endfor$ @@ -60,24 +85,6 @@ $endif$ \widowpenalties 1 10000 \raggedbottom $if(section-titles)$ -\setbeamertemplate{part page}{ - \centering - \begin{beamercolorbox}[sep=16pt,center]{part title} - \usebeamerfont{part title}\insertpart\par - \end{beamercolorbox} -} -\setbeamertemplate{section page}{ - \centering - \begin{beamercolorbox}[sep=12pt,center]{section title} - \usebeamerfont{section title}\insertsection\par - \end{beamercolorbox} -} -\setbeamertemplate{subsection page}{ - \centering - \begin{beamercolorbox}[sep=8pt,center]{subsection title} - \usebeamerfont{subsection title}\insertsubsection\par - \end{beamercolorbox} -} \AtBeginPart{ \frame{\partpage} } diff --git a/data/templates/default.latex b/data/templates/default.latex index 812f120ee..34b93c813 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -18,6 +18,14 @@ $if(geometry)$ \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} $endif$ \usepackage{amsmath,amssymb} +$-- +$-- section numbering +$-- +$if(numbersections)$ +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} +$else$ +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering +$endif$ $fonts.latex()$ $common.latex()$ $for(header-includes)$ |
