# beamer - global transition shifts slide content

Using beamer with the mtheme, I want to have a global transition effect (a fast fade) which I set using the following code:

\addtobeamertemplate{background canvas}{\transfade[duration=0.2]}{}


as found on this answer.

However, doing it messes up with my slides settings. It doesn't change every slides, only the \section ones that are slightly shifted to the right, adding a white line on the left, as seen here:

I tried using XeLaTeX and LuaLaTeX, as they are the only compilers I could use for my current font, but they both have the same issue.

It probably comes from the theme, however I have no clue why it would happen or how to fix it.

Edit : MWE

\documentclass{beamer}
\usetheme{m}

\begin{document}
\section{test}
\end{document}


Requires the mtheme to work

• Welcome to TeX.SX! Please help us (and also you) and add a minimal working example (MWE), that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}. – Bobyandbob Jun 15 '17 at 9:30
• I just added the MWE, as you can see it is really just about adding the \transfade. – Varpie Jun 15 '17 at 9:45
• From the link to GitHub that you provide: IMPORTANT NOTICES FOR VERSION 1.0 The package and theme name changed from **m** to **metropolis**! – Dr. Manuel Kuehner Jun 15 '17 at 9:54
• Same happens with default theme and a background color, so it's not a mtheme problem. As Joseph Wright said in cited question, what you want is not possible and the proposed workaround is just a workaround that doesn't work on all situations. – Ignasi Jun 15 '17 at 9:55
• By the way, metropolis theme is already in CTAN: ctan.org/pkg/beamertheme-metropolis – Ignasi Jun 15 '17 at 9:58

The source of the problem is a missing % in the beamer definition of

\newcommand\beamer@dotrans[2][]{%
\def\beamer@transdir{}%
\def\beamer@dur{}%
\setkeys{beamertrans}{#1}%
\edef\beamer@temp{{pdfpagetransition={#2 \beamer@transdir\space\beamer@dur}}}% <- This one is missing
\expandafter\hypersetup\beamer@temp}


(this had been fixed in https://github.com/josephwright/beamer/commit/b7a4383535e9b534c822fdbe039369ce6044724f)

A quick workaround: add your transition at the end of the background canvas template, not at the begin:

\documentclass{beamer}
\usetheme[background=dark]{metropolis}

\begin{document}

\begin{frame}
content...
\end{frame}

\section{test}

\begin{frame}
content...
\end{frame}
\end{document}