feat: support `\thanks` in title page (#45)

This commit is contained in:
Johan Larsson 2025-04-01 16:33:37 +02:00 committed by GitHub
parent be0d8f23c7
commit de3db5e517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 45 additions and 19 deletions

View File

@ -130,6 +130,8 @@
\setbeamercolor{institute}{%
use=normal text, fg=normal text.fg!80!normal text.bg}
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
\setbeamercolor{thanks}{%
use=normal text,fg=normal text.fg!80!normal text.bg}
% \end{macrocode}
%
% The “primary” palette should be used for the most important navigational

View File

@ -164,30 +164,28 @@
% space on the title slide.
% \begin{macrocode}
\setbeamertemplate{title page}{
\begin{minipage}[c][\textheight]{\textwidth}
\null%
\vspace{0pt plus 1.618fil}%
\vfil%
\ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
\ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
\ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
\usebeamertemplate*{title separator}
\expandafter\ifblank\expandafter{\beamer@andstripped}{}{%
\usebeamertemplate*{author}%
}
\ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
\ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
\vspace{0pt plus 1fil}%
\null
\end{minipage}%
\null%
\vspace{0pt plus 1.618fil}%
\vfil%
\ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
\ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
\ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
\usebeamertemplate*{title separator}
\expandafter\ifblank\expandafter{\beamer@andstripped}{}{%
\usebeamertemplate*{author}%
}
\ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
\ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
\vspace{0pt plus 1fil}%
\null
}
% \end{macrocode}
% \end{macro}%
%
% Normal people should use |\maketitle| or |\titlepage| instead of using the
% |title page| beamer template directly. Beamer already defines these macros,
% but we patch them here to make the title page |[plain]| by default, remove
% |\@thanks|, and ensure the title frame number doesn't count.
% but we patch them here to make the title page |[plain]| by default
% and ensure the title frame number doesn't count.
%
% \begin{macro}{\maketitle}
% \begin{macro}{\titlepage}
@ -200,11 +198,20 @@
\ifbeamer@inframe
\titlepage
\else
\begingroup
\renewcommand\footnoterule{}%
\frame[plain,noframenumbering]{\titlepage}
\endgroup
\fi
}
\def\titlepage{%
\usebeamertemplate{title page}
% Apply title-page specific footnote settings
\renewcommand{\@makefntext}[1]{%
{\par\usebeamercolor[fg]{thanks}\usebeamerfont{thanks}$^{\@thefnmark}$##1\medskip}%
}
% Process the title page
\usebeamertemplate{title page}\@thanks
}
% \end{macrocode}
% \end{macro}

View File

@ -2,6 +2,23 @@ This is a generated file for the l3build validation system.
Don't change this file in any respect.
[2
]
LaTeX Font Info: Trying to load font information for OML+lmm on input line ....
LaTeX Font Info: Trying to load font information for OMS+lmsy on input line ....
LaTeX Font Info: Trying to load font information for OMX+lmex on input line ....
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <10.95> on input line ....
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <8> on input line ....
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <6> on input line ....
LaTeX Font Info: Trying to load font information for U+msa on input line ....
LaTeX Font Info: Trying to load font information for U+msb on input line ....
LaTeX Font Info: Font shape `OT1/lmss/m/it' in size <10.95> not available
(Font) Font shape `OT1/lmss/m/sl' tried instead on input line ....
LaTeX Font Info: Font shape `OT1/lmss/m/it' in size <8> not available
(Font) Font shape `OT1/lmss/m/sl' tried instead on input line ....
LaTeX Font Info: Font shape `OT1/lmss/m/it' in size <6> not available
(Font) Font shape `OT1/lmss/m/sl' tried instead on input line ....
[3
]
[4