0

This link describes how to make all capital commands which can handle newlines,
using the \uppercase command.

This link describes how to make all capital commands which can handle curly braces.

How would I perform both?

\documentclass{scrreprt}
\newcommand{\Title}  {Uppercase Instructions}
\newcommand{\Author} {Latex Newb}
\begin{document}
\begin{center}
\MakeUppercase{%
\Title\protect\\
Written By:\protect\\
\Author

\vspace*{\fill}

At:\protect\\
University of Colleges
}
\end{center}
\end{document}

Alright, per H Oberdiek,

\documentclass{scrreprt}
\newcommand{\Title}  {Uppercase Instructions}
\newcommand{\Author} {Latex Newb}
\begin{document}
\begin{center}
\uppercase{%
\MakeUppercase{\Title}\\
Written By:\\
\MakeUppercase{\Author}

\vspace*{\fill}

At:\\
University of Colleges
}
\end{center}
\end{document}

I believe using the \uppercase command throughout
while using the \MakeUppercase command around commands
will help a portion of people looking for added flexibility.

2

I do not know, what you mean with braces. The primitive \uppercase only converts direct tokens and does not expand macros. Thus, the letters in \Title and \Author are hidden. The LaTeX macro \MakeUppercase expands the argument to expose the letters in macros. But here, it breaks on the fragile \\, which needs protection:

\documentclass{scrreprt}
\newcommand{\Title}  {Uppercase Instructions}
\newcommand{\Author} {Latex Newb}
\begin{document}
\begin{center}
\MakeUppercase{%
\Title\protect\\
Written By:\protect\\
\Author}
\end{center}
\end{document}

Result

LaTeX's \MakeUppercase does not work with "long" arguments containing empty lines or \par tokens. Instead of the empty lines \endgraf can be used:

\documentclass{scrreprt}
\newcommand{\Title}  {Uppercase Instructions}
\newcommand{\Author} {Latex Newb}
\begin{document}
\begin{center}
\MakeUppercase{%
\Title\protect\\
Written By:\protect\\
\Author
\endgraf
\vspace*{\fill}
\endgraf
At:\protect\\
University of Colleges}
\end{center}
\end{document}
  • Alright - is it possible to \renewcommand{\\}{\protect\\} within the bounds of the \MakeUppercase group? – kando Jun 24 '17 at 19:35
  • Also, what if I want to use newlines? – kando Jun 24 '17 at 19:37
  • MWE code updated to pursue this question. – kando Jun 24 '17 at 19:40
  • @kando \newline is robust. – Heiko Oberdiek Jun 24 '17 at 19:48
  • @kando Are you sure, you want to have such an ugly title page by converting all to upper case? AFAIK, this kind of emphasis comes from the time of mechanical typewriters with a limited set of font faces (usually just one). Nowadays, there are bold fonts, larger font sizes, ... – Heiko Oberdiek Jun 24 '17 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.