Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have been using the beamer document class with the theme- cambridgeUS in lyx. The following code is the preamble. Now, I want to insert a hyperlink to a pdf file in all the pages by adding them in the header or the footer. The footer at present has the author, title and page number. How do I add the fourth? Or how can it be done with the header?

%\setbeamertemplate{navigation symbols}{}
\setbeamercolor{title}{bg=red!65!black, fg=white}
%% Macro for inserting Page number in Warsaw theme
%  \oldmacro\hfill%
%  \insertframenumber\,/\,\inserttotalframenumber}

\usepackage{ragged2e}\title{TE TM Hybrid Modes}
\author[Dr. James]{Dr. James}
\institute[IIT Madras]{ \\Department of Electrical Engineering\\Indian Institute of Technology Madras}


\addtobeamertemplate{block begin}{\setlength{\abovedisplayskip}{0pt}}

%  \begin{frame}<beamer>
 %   \frametitle{Layout}
  %  \tableofcontents[currentsection,currentsubsection]
 % \end{frame}

Thank You

share|improve this question

3 Answers 3

up vote 6 down vote accepted

The CambridgeUS theme uses the outer theme infolines. You can download the original file from CTAN and use it as a basis to make your own outer theme with an external link.

In this example the footer contains a fourth field with a link to the beamer user guide:


\setbeamercolor*{author in head/foot}{parent=palette tertiary}
\setbeamercolor*{title in head/foot}{parent=palette secondary}
\setbeamercolor*{date in head/foot}{parent=palette primary}

\setbeamercolor*{section in head/foot}{parent=palette tertiary}
\setbeamercolor*{subsection in head/foot}{parent=palette primary}
% colors for the external link field
\setbeamercolor*{external link}{parent=palette secondary}

\defbeamertemplate*{footline}{withlink theme}
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber 
  % this is a new field with an external link
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,right]{external link}%
    \usebeamerfont{author in head/foot}\href{}{Link to manual}\hspace*{2ex}

\defbeamertemplate*{headline}{withlink theme}
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{section in head/foot}%
    \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{subsection in head/foot}%
    \usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead

\setbeamersize{text margin left=1em,text margin right=1em}


Save this as beamerouterthemewithlink.sty and put it in your project folder or the local tex-mf tree. Then you can use it by adding this line in your tex file:



Similarly, you could also modify the header by adding another beamercolorbox. Just make sure that the total width of all beamercolorboxes is equal to \textwidth.

share|improve this answer
Wonderful!!! Thank you very much!!! – Melvin Paul Aug 14 '12 at 6:30

Here's a solution that adds a link to a web ressource immediatly above the navigation symbols. This is done by modifying the sidebar right template. (Additions to the footer are also possible, but may be more appropriate for additional titling information.)



\setbeamertemplate{sidebar right}
  \llap{\href{}{A link to}\hskip0.2cm}% NEW
  \vskip3pt% NEW
  \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%


\title{TE TM Hybrid Modes}
\author{Dr. James}
\institute[IIT Madras]{Department of Electrical Engineering\\
     Institute of Technology Madras}


enter image description here

share|improve this answer

I am also facing a problem with the beamer class file. I am using the following code:


\title[Many-body Physics with Stationary Light]{\color{red!50!green}{\bf Realization of Strongly Correlated Many-body Physics with Stationary Light}}
\author[Priyam Das]{\bf Priyam Das}
\institute{\color{green!60!blue} Institute of Nuclear Physics,\\ Hacettepe University}





The moment I tried to enter a short institute name through "\institute[short institute]{Detail address}", I get the following error :

! Use of \beamer@institute doesn't match its definition.
\inserttitle ->\color {
                       red!50!green}{\bf Realization of Strongly Correlated ...
l.15 \begin{document}

If I continue by ignoring the error, I get the following: a repetitive title, but the problem with the short institute at the below does not exist.


share|improve this answer
Welcome to TeX.SX! This does not provide an answer to the question. If you have a new question, please ask it by clicking the Ask Question button. You can link back to the original question here if it provides context or motivation for your new question. – Paul Gessler Apr 18 at 15:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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