LaTeX forum ⇒ GeneralBeamer: Warsaw: My text goes outside the headline

LaTeX specific issues not fitting into one of the other forums of this category.
YuGiOhJCJ
Posts: 4
Joined: Tue Jul 20, 2021 9:21 am

Beamer: Warsaw: My text goes outside the headline

Postby YuGiOhJCJ » Tue Sep 07, 2021 7:18 am

Hello,
With beamer, I am using the Warsaw theme.
I am using texlive 20200327.

Here is my code:
\documentclass[10pt]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{times}

\mode<presentation>{\usetheme{Warsaw}\setbeamercovered{transparent}}

\begin{document}

\section{abdiqua 1}

\subsection{abdiqua 2}
\begin{frame}
	abdiqua 3
\end{frame}

\subsection{abdiqua 4}
\begin{frame}
	abdiqua 5
\end{frame}

\subsection{abdiqua 6}
\begin{frame}
	abdiqua 7
\end{frame}

\subsection{abdiqua 8}
\begin{frame}
	abdiqua 9
\end{frame}

\subsection{abdiqua 10}
\begin{frame}
	abdiqua 11
\end{frame}

\subsection{abdiqua 12}
\begin{frame}
	abdiqua 13
\end{frame}

\end{document}

There is a problem in the output:
Image
As you can see my text goes outside the headline.
Indeed, a part of the "q" letter for "abdiqua 12" is not visible in the headline.
How to fix that please?

An other problem: In the output, I also see some "Overfull \vbox has occurred while \output is active" messages:
$ pdflatex main.tex
[...]
Overfull \vbox (3.16953pt too high) has occurred while \output is active
[1{/usr/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \vbox (3.16953pt too high) has occurred while \output is active
[2]
Overfull \vbox (3.16953pt too high) has occurred while \output is active
[3]
Overfull \vbox (3.16953pt too high) has occurred while \output is active
[4]
Overfull \vbox (3.16953pt too high) has occurred while \output is active
[5]
Overfull \vbox (3.16953pt too high) has occurred while \output is active
[6] (./main.aux) )
(see the transcript file for additional information){/usr/share/texmf-dist/font
s/enc/dvips/base/8r.enc}</usr/share/texmf-dist/fonts/type1/urw/helvetic/uhvr8a.
pfb>
Output written on main.pdf (6 pages, 17099 bytes).
Transcript written on main.log.

How to fix that second problem please?

Thank you.
Best regards.

Remark : crosspost available here: https://tex.stackexchange.com/questions ... e-headline

YuGiOhJCJ
Posts: 4
Joined: Tue Jul 20, 2021 9:21 am

Postby YuGiOhJCJ » Thu Sep 09, 2021 1:37 am

I found a workaround.
Here is how I did.
As I am using the Warsaw theme, I found the corresponding file in the texmf-dist directory:
$ find /usr/share/texmf-dist -name '*Warsaw*'
/usr/share/texmf-dist/tex/latex/beamer/beamerthemeWarsaw.sty

Here is the content of this file:
$ cat /usr/share/texmf-dist/tex/latex/beamer/beamerthemeWarsaw.sty
[...]
\useinnertheme[shadow=true]{rounded}
\useoutertheme{shadow}
\usecolortheme{orchid}
\usecolortheme{whale}
[...]

As it is using the shadow outer theme, I found the corresponding file in the texmf-dist directory:
$ find /usr/share/texmf-dist -name '*outerthemeshadow*'
/usr/share/texmf-dist/tex/latex/beamer/beamerouterthemeshadow.sty

Here is the content of this file:
$ cat /usr/share/texmf-dist/tex/latex/beamer/beamerouterthemeshadow.sty
[...]
\useoutertheme{split}
[...]

As it is using the split outer theme, I found the corresponding file in the texmf-dist directory:
$ find /usr/share/texmf-dist -name '*outerthemesplit*'
/usr/share/texmf-dist/tex/latex/beamer/beamerouterthemesplit.sty
/usr/share/texmf-dist/tex/latex/beamerauxtheme/beamerouterthemesplitwithminiframes.sty

Here is the content of this file:
$ cat /usr/share/texmf-dist/tex/latex/beamer/beamerouterthemesplit.sty
[...]
\defbeamertemplate*{headline}{split theme}
{%
  \leavevmode%
  \@tempdimb=2.4375ex%
  \ifnum\beamer@subsectionmax<\beamer@sectionmax%
    \multiply\@tempdimb by\beamer@sectionmax%
  \else%
    \multiply\@tempdimb by\beamer@subsectionmax%
  \fi%
  \ifdim\@tempdimb>0pt%
    \advance\@tempdimb by 1.825ex%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
  \fi%
}
[...]

So, I fixed this template definition by setting my own:
\documentclass[10pt]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{times}

\mode<presentation>{\usetheme{Warsaw}\setbeamercovered{transparent}}

% fix the height in the headline
% /usr/share/texmf-dist/tex/latex/beamer/beamerouterthemesplit.sty
\makeatletter
\setbeamertemplate{headline}{%
  \leavevmode%
  \@tempdimb=2.4375ex%
  \ifnum\beamer@subsectionmax<\beamer@sectionmax%
    \multiply\@tempdimb by\beamer@sectionmax%
  \else%
    \multiply\@tempdimb by\beamer@subsectionmax%
  \fi%
  \ifdim\@tempdimb>0pt%
    \advance\@tempdimb by 3ex% here is the fix
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
  \fi%
}
\makeatother

\begin{document}

\section{abdiqua 1}

\subsection{abdiqua 2}
\begin{frame}
	abdiqua 3
\end{frame}

\subsection{abdiqua 4}
\begin{frame}
	abdiqua 5
\end{frame}

\subsection{abdiqua 6}
\begin{frame}
	abdiqua 7
\end{frame}

\subsection{abdiqua 8}
\begin{frame}
	abdiqua 9
\end{frame}

\subsection{abdiqua 10}
\begin{frame}
	abdiqua 11
\end{frame}

\subsection{abdiqua 12}
\begin{frame}
	abdiqua 13
\end{frame}

\end{document}

The only difference with the original template is the line 22.
Indeed, I have increased the height.
And here is the output:
Image
So, the first problem is fixed.
Also, in the output, I don't see anymore the "Overfull \vbox has occurred while \output is active" messages.
So, the second problem is fixed too.

However, I am wondering:
1) Is it a bug in the Warsaw theme?
2) Is there a better way to fix that?


Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests