So I was finally able to create a MWE for this one:
I am creating my own beamer style which has some areas, where all text is supposed to be all caps. Using \MakeUppercase
with the beamer class' macros \insertFOO
is problematic for all FOOs, because of the order in which things are expanded ... so they say.
There are several questions on this topic and the solutions all include constructs of the form
\expandafter\MakeUppercase\expandafter{all caps stuff}
This works a little bit for me.
\expandafter\MakeUppercase\expandafter{\insertdate \inserttitle}
works exactly how I want it, but
\expandafter\MakeUppercase\expandafter{\insertdate \inserttitle \insertauthor}
does not. A fairly minimal non working example is this:
\documentclass{beamer}
\defbeamertemplate*{title page}{myway}[1][]{%
\expandafter\MakeUppercase\expandafter{%the expandafterblock
\insertdate
\inserttitle
\insertauthor
}
}
\title{Some Title}
\author{My Name}
\date{\today}
\begin{document}
\begin{frame}[plain]\titlepage\end{frame}
\end{document}
This code will fail with
\insertauthor ->\def \inst
{\beamer@insttitle }\def \and {\beamer@andtitle }...
It fails because \insertauthor
is inside the expandafterblock
. By removing \insertauthor
or placing it outside the the expandafterblock
, this code will compile.
It would seem \insertauthor
behaves uniquely, compared to other beamer \insert
macros. If I had to guess, I'd pinpoint the problem to the fact, that you can attribute authors to institutions (if present), by prefixing author names with \inst[<number>]
. So the question is:
How can I wrap \insertauthor
on the title page, such that the author's/s' name(s) are capitalized?
P.S.: All questions I was able to find on this problem were about titles only, or not specific to the beamer class. Since beamer's \insertauthor
seems to be a special case, I am fairly certain this is not a duplicate.
Update/Ending
While I haven't been able to actually solve the problem, I found an aceptable way to work around it by replacing the \expandafter\MakeUppercase\expandafter
construct with this:
\fontspec{Our Sans Serif Font}[Letters=UppercaseSmallCaps,Scale=1.1]\scshape
Not ideal, but acceptable. A true solution would follow along Ulrike's advice to create a font which also has/uses capital letters for small letters. While fontspec is quite powerful, it does not enable me to simply make *TeX use the uppercase letters for any input letter. IMO a good solution would teach this trick to fontspec.
frame
). I'd consider a workaround at a lower level.\expandafter
.\MakeUppercase{\insertdate\inserttitle}
works too. But you can't put arbitrary commands in\MakeUppercase
.\insertauthor
contains\def
; it won't work. To capitalized arbitrary input you would need a suitable font. Why don't you use\scshape
in the title?\let\oldauthor\author
and\renewcommand{\author}[1]{\oldauthor{\MakeUppercase{#1}}}
as a work around.\scshape
if all capital letters are made lowercase first. I want to establish LaTeX as allowed tool. I get this only if I strictly adhere to the CI.\insertauthor
it won't work. You will have either to redefine it, or create an "All capital" font, or find some other way to capitalize the names.