2

Is it possible to add a triangle indication on each beamer frame?

e.g.

\documentclass[14pt]{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}{title here}
\begin{center}
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-2.5,-2.5) grid (2.5,2.5);
\draw[thick] (0,0) circle (2cm) node {$O$};
\end{tikzpicture}
\end{center}
\end{frame}

\end{document}

The output is below:

enter image description here

I wish to:

  1. add a triangle before "title here" (every frame).
  2. add a line below the title.
2

This is one possible solution -- modify the frametitle template.

Update: The OP prefers to use the underline cross the whole page so this is how, after modify the frametitle template.

\setbeamertemplate{frametitle}
{\vskip4pt
  \leavevmode
%\hbox{%
\begin{beamercolorbox}   [wd=\paperwidth,ht=2ex,dp=1ex]{frametitle}%
\underline{\makebox[\paperwidth][l]{\hspace*{40pt}
\large$\blacktriangleright$ {\insertframetitle}}}
\end{beamercolorbox}
%  }%
}

enter image description here

\setbeamertemplate{frametitle}
{\vskip4pt
  \leavevmode
  %\hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2ex,dp=1ex]{frametitle}%
      \hspace*{40pt}        % change this to suit one's need
      \large$\blacktriangleright$ \underline{\insertframetitle}
    \end{beamercolorbox}
  %}%
}

enter image description here

enter image description here

Code

\documentclass[14pt]{beamer}
\usepackage{tikz}
\setbeamertemplate{frametitle}
{\vskip4pt
  \leavevmode
  \hbox{%
    \begin{beamercolorbox} [wd=\paperwidth,ht=2ex,dp=1ex]{frametitle}%
      \hspace*{40pt}
      \large$\blacktriangleright$ \underline{\insertframetitle}
    \end{beamercolorbox}
  }%
}
\begin{document}

\begin{frame}{title here}
\begin{center}
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-2.5,-2.5) grid (2.5,2.5);
\draw[thick] (0,0) circle (2cm) node {$O$};
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}{2nd title}
\end{frame}

\end{document}
  • Cool, but I prefer to use the underline cross the whole page rather than just underline valid text, is it possible? – Beatlej Aug 25 '14 at 3:18
  • How about replace \underline{\insertframetitle} in the code with \underline{\makebox[0.8\textwidth][l]{\insertframetitle}}, where makebox is used to wrap the \insertframetitle1. – Jesse Aug 25 '14 at 3:41
  • Or this one, across the whole page --\underline{\makebox[\paperwidth][l]{\hspace*{40pt} \large$\blacktriangleright$ {\insertframetitle}}} – Jesse Aug 25 '14 at 3:48

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.