# Beamer Title Inside Node -- Line Break

I am creating my own beamer theme, and the way I have conceived the title page needs the title to be inside a tikzpicture node, in this form:

    \node [anchor=center] (title) at ($(box)+(0,.25)$) {%
\color{white}
{\usebeamerfont{title}\inserttitle}
};


It works perfectly until I need to insert long titles and need to break the lines...

If I do:

\title[academic background \& research experience]
{Academic background \& \\ Research experience}


I get the error:

 ! LaTeX Error: Something's wrong--perhaps a missing \item.


And if I do:

\usepackage{pbox}
{\pbox{20cm}{Academic background \& \\ Research experience}}


I get the warning:

 Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing \pbox '


Does anybody know what is happening here?

EDIT: Please find a MWE below (I have the relevant lines in a .sty file, but adding them inside \mode<presentation>{} works as well)

\documentclass[ignorenonframetext]{beamer}

\mode<presentation> {
\usetheme{Berkeley}
\usecolortheme{albatross}

%PACKAGES, LIBRARIES AND ENVIRONMENTS HERE
\usepackage{tikz}
\usetikzlibrary{calc}

\author{Name Surname}
\date[\today]{\today}

\setbeamertemplate{title page}{

\begin{tikzpicture}[remember picture,overlay, every node/.style={inner sep=0,outer sep=0}]
\node [rectangle, fill=gray, anchor=north east, minimum width=.86\paperwidth, minimum height=3cm] (box) at (current page.north east){};

\node [anchor=center] (title) at ($(box)+(0,.25)$) {%
\color{white}
{\usebeamerfont{title}\inserttitle}
};

\ifx\insertauthor\@empty
\else
\node [anchor=west] (author) at ($(title.south west)-(0,.5)$) {%
\color{white}
{\usebeamerfont{author}\insertauthor}
};
\fi

\ifx\insertdate\@empty
\else
\node [anchor=west] (date) at ($(title.south west)-(-.2,2)$) {%
\color{blue}
{\usebeamerfont{date}\insertdate}
};
\fi
\end{tikzpicture}
}
}

\begin{document}

\begin{frame}[plain]
%\frametitle{SCB Departmental WIP - July 2013}
\titlepage % Print the title page as the first slide
\end{frame}

\end{document}

• Please give us complete, minimal code allowing us to reproduce the problem and showing the relevant settings. Providing just snippets is almost useless. Jul 14 '14 at 14:42
• Edited to add a MWE, sorry I had the relevant lines in an .sty file and didn't know I could include them inside \mode<presentation>{} Jul 14 '14 at 15:07

Simply pass the align=<value> key to the title node and/or use text width=<length>, so line breaks are allowed.

Here's a little example completing your snippets to a complete example:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{calc}

\setbeamertemplate{title page}{%
\begin{tikzpicture}
\node[text width=\textwidth,fill=cyan,minimum height=2cm] at (current page.center) (box) {};
\node[anchor=center,align=center,text width=\linewidth,font=\color{white}\usebeamerfont{title}] (title) at ($(box)+(0,.25)$)
{\inserttitle};
\end{tikzpicture}%
}


Aldo, modifications to the font of the contents of a node are better done using the font` key (as in my example) instead of doing them directly in the node contents (as in your code).