I'm trying to hang indent my long frametitles and can't find a solution how to do it. I tried to use
\begin{frame}[fragile]{\hangindent=2cm Long Frametitle}
but that doesn't do anything. Any suggestions?
Thanks!
I'm trying to hang indent my long frametitles and can't find a solution how to do it. I tried to use
\begin{frame}[fragile]{\hangindent=2cm Long Frametitle}
but that doesn't do anything. Any suggestions?
Thanks!
Dirty hack:
\documentclass{beamer}
\makeatletter
\setbeamertemplate{frametitle}{
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\hspace*{0.5cm}
\begin{beamercolorbox}[sep=0.3cm,left,wd=\dimexpr\the\@tempdima-1cm\relax]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fteleft\endcsname\fi%
\strut\hskip-1cm\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
}
\makeatother
\begin{document}
\begin{frame}
\frametitle{Long Frametitle that spans two lines and goes on and on and on and on and on}
\end{frame}
\end{document}
A somewhat less invasive solution:
\documentclass{beamer}
\newsavebox{\bigtitlebox}
\newcommand{\bigtitle}[1]% #1 = multiline frame title
{\bgroup
\hsize=\dimexpr\paperwidth-.666em\relax
\global\setbox\bigtitlebox=\vbox{\usebeamerfont{frametitle}%
\strut#1\strut}%
\egroup
\frametitle{\usebox\bigtitlebox}}
\begin{document}
\begin{frame}
\bigtitle{\hangindent=2cm
Long Frametitle that spans two lines and goes on and on and on and on and on}
%\frametitle{Normal title}
\rule{\textwidth}{\dimexpr\textheight-\ht\bigtitlebox-\dp\bigtitlebox-.666em}
\end{frame}
\end{document}
\documentclass
and ending with\end{document}
. - Does How to indent long frametitle (beamer)? help you? – Bobyandbob Nov 13 '17 at 14:44