1

I am making a poster where I edited an existing style

\setbeamertemplate{headline}{  
    \vskip4.5cm
    \hskip14cm
    \mbox{% 
        \begin{minipage}[r][][c]{\dimexpr\textwidth-15cm\relax}
            \begin{flushright}
                \usebeamercolor{title of headline}{\color{fg}{\inserttitle}}
            \end{flushright}
        \end{minipage}%
    }% 
}

Calling the inserttitle it will insert the title which was set in the main text file via the title command. I would like to know how can be created a new commands which behaves the same way as the title.ex \insertuniversityadress.

\title{This is is a title}
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Oct 8 '14 at 19:50
3

You can "clone" the title macro adjusting it for your needs:

\documentclass{beamer}

\makeatletter         
\newcommand{\universityaddress}{\@dblarg\beamer@universityaddress}  %this is where we are cloning the \title macro 
\long\def\beamer@universityaddress[#1]#2{%
  \def\insertuniversityaddress{#2}%
  \def\beamer@shortuniversityaddress{#1}%
  \def\insertshortuniversityaddress{#1}
  }
\makeatother


\title[Title]{this is a title}
\universityaddress[Un. Add.]{This is the university address}
\begin{document}
\section{section 1}
\begin{frame}
  \insertshorttitle

  \inserttitle

  \insertshortuniversityaddress

  \insertuniversityaddress
\end{frame}
\end{document}

enter image description here

It behaves like the title macro (with an optional short version).

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.