This is a classic instance of needing \texorpdfstring
, since the material you put in these metadata fields will also be made into PDF bookmarks, which can't have formatting like color. Here is a fix for you:
\documentclass{beamer}
\usepackage{color}
\definecolor{viv}{RGB}{255,109,254}
\title[]{\Large Credit and Banking in a DSGE Model\\ of the Euro Area}
\author[]{\Large Gerali, Neri, Sessa and Signoretti(2010)\texorpdfstring{\\ \small \vspace{1cm} \color{viv}}{ }My name}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}
(\texorpdfstring
presents two alternatives, the first to be put in the TeX source, the second to be put in the PDF metadata)
In LaTeX the \par
command gets redefined several times during a run over a document. For example, inside a tabular
it does nothing: an input such as
\begin{tabular}{l}
\ttfamily\meaning\par
\end{tabular}
would print
macro:->.
(after the colon the parameter text is shown; after ->
up to the period the replacement text is shown). This way, users aren't bothered with empty lines inside a tabular
.
In a center
, flushleft
or flushright
environment, the definition is more complicated, but eventually the macro \par
will execute {\@@par}
, where \@@par
is defined in the kernel by
\let\@@par\par
at a moment when \par
still has its primitive meaning. In normal situations, \par
will have the primitive meaning and, in general, one should use \par
in macros.
Another example: when a \parbox
or minipage
is started, the \@parboxrestore
command is executed, which also does \let\par\@@par
. Why? Because the \parbox
or minipage
could be in a tabular
or any other place where \par
has been redefined.
The kernel has an interesting set of macros:
\def\@setpar#1{\def\par{#1}\def\@par{#1}}
\def\@par{\let\par\@@par\par}
\def\@restorepar{\def\par{\@par}}
The macro \@setpar
changes the meaning of \par
and \@par
; why making a copy of the new meaning of \par
into \@par
? Because one can always say \@restorepar
which will restore the meaning of \par
as defined with \@setpar
, in cases when it's not certain that \par
has the wanted meaning. The default definition of \@par
is to restore the primitive meaning.
Of course, grouping plays an essential role here. For instance, \par
does nothing in tabular
, but as soon as \end{tabular}
is executed, \par
will get back the meaning it had before \begin{tabular}
. So a restoration with \let\par\@@par
is rarely needed; an exception is \@parboxrestore
, that's intended to bring LaTeX into a fresh state as if a new document should be started (we're in a \parbox
or minipage
and this indeed makes sense).
Your question has probably been prompted by the line
\newenviron{solution}{}{\xappto{\temp@solnlist}{\solutionbody {\@@par}}}
in your code at Problems using listxadd and xappto
Well, this is a place where a plain \par
should be used:
\newenviron{solution}
{}
{\xappto{\temp@solnlist}{\expandonce{\solutionbody}\noexpand\par}}
The \noexpand
is needed because of \xappto
and the fact that we want \par
to be stored, not its expansion at the uncontrolled moment the \xappto
command is performed.
Best Answer
The correct command here is
\color
as\textcolor
is not long. The syntax for your command would then benot that that
\color
and the text it applies to is enclosed in an extra group of braces, so the color does not affect the text following the command.