I am preparing some slides for a lab meeting, and I am using mainly beamer/metropolis
.
I need to add a logo at top right corner of the frametitle to fit my lab standards.
So I used the command \addtobeamertemplate{frametitle}
.
But to fit with the corner I have to overfull margins. And since it is on every slide it yields a large number of warnings.
For example, here is a MWE:
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass[aspectratio=169, 10pt]{beamer}
\usetheme{metropolis}
\metroset{numbering=fraction,}
\addtobeamertemplate{frametitle}{}{\vspace*{-1.5em}\hspace*{+0.86\paperwidth}LOGO}
\begin{document}
\begin{frame}
\frametitle{title of an empty frame}
empty.
\end{frame}
\end{document}
which gives me the following warning:
Overfull \hbox (28.00511pt too wide) in paragraph at lines 12--12
I would like to suppress (or resolve) these warning and keeping the warning if I have other overfull occurring.
Of course, a good manner to handle this would be to reduce the hspace
to \hspace*{+0.79\paperwidth}
but the result is too far from what I need to obtained.
So it there a way to remove this warnings only locally (or solve them but I don't think so) ?
Best Answer
As far as I can tell you want to flush right but overlapping a fixed amount (25pt) past the allowed space. Using
\fill
rather than a fixed left margin allows it to easily adapt to different length texts.