When using the Warsaw theme in Beamer, I keep seeing this annoying white stripe to the left of the frametitle box on each slide:

White line in the Warsaw theme in Beamer

Here is the complete presentation code that results into that problem for me:





    \frametitle{Vertical line to the left of the title}

        \item This slide has a problem



This is not the expected behaviour, is it? How could I repair it?

  • 1
    Can you provide the full code for that slide? Including the preamble, etc. – Alenanno Jan 10 '16 at 13:48
  • @Alenanno I have updated the question with a complete version of the presentation code that results into that problem for me. – Mikhail Dubov Jan 10 '16 at 14:08
  • Thank you. Can you test a different PDF viewer? The line doesn't appear here. – Alenanno Jan 10 '16 at 14:13
  • @Alenanno In Adobe Reader 10, it is quite interesting: the line is there but occasionally disappears when you start playing with the zoom, then appears again... – Mikhail Dubov Jan 10 '16 at 14:24
  • @Alenanno By the way, the line also disappears when I start customizing the template for the frametitle (via \setbeamertemplate{frametitle} ...), but I generally don't want to do that in my presentation because then I lose this nice gradient background. – Mikhail Dubov Jan 10 '16 at 14:25

That part of gradient background is essentially generated by the following code (beamerouterthemeshadow.sty line 23-25)

\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
  color(\paperwidth)=(frametitle right.bg)}

And applied here (line 42-83) (see \pgfuseshading{beamer@frametitleshade}?)

\defbeamertemplate*{frametitle}{shadow theme}
    \advance\beamer@leftmargin by -12bp%
    \advance\beamer@rightmargin by -12bp%
    \advance\beamer@tempdim by \beamer@leftmargin%
    \advance\beamer@tempdim by \beamer@rightmargin%
          \rightskip0.3cm plus1fil\leavevmode
      \advance\beamer@tempdim by 2pt%
        \usebeamercolor{frametitle right}
    \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@topshade}\hskip-\Gm@rmargin}

As you can see, this shading is exactly the same width as the paper. At the same time, it is clipped by a rectangle with the same width. Although it is logically wide enough to cover the white background, this will confuse PDF renderers so much.

So you may both exlarge the shading by

\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
  color(\paperwidth+1pt)=(frametitle right.bg)}

and comment out the line \pgfusepath{clip}. Now the shading exceeds the boundary of PDF and there should be no problem. Even if the problem still exists, I do not think there is anything to do with TeX.

| improve this answer | |
  • Thanks. Basically changing just "color(0pt)" to "color(-1pt)" in line 24 seems to fix the issue. – Mikhail Dubov Jan 11 '16 at 1:44

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.