2

I modified the header of the Montpellier theme following the precious suggestions obtained here: Custom outer theme derived from Montpellier

Everything works as requested now, but there are both vertical and horizontal white lines in-between boxes in both header and footer now. MWE:

\documentclass[8pt]{beamer}
\usepackage{tikz}
\title{My title}
\author{My Author}
\institute{My Institute}
\date{April $17^{th}$ 2017}
\usetheme{Montpellier}
\useinnertheme{circles}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols
\definecolor{gold}{RGB}{162,132,72} 
\setbeamercolor{footlinecolor}{fg=white,bg=gold}
\setbeamercolor{footlinecolor1}{fg=gold,bg=white}
\setbeamercolor{footlinecolor2}{fg=gold,bg=black}
\setbeamercolor{footlinecolor3}{fg=white,bg=black}
\setbeamercolor{title in head/foot}{fg=gold,bg=black}
\setbeamercolor{section in head/foot}{fg=white,bg=black}
\setbeamercolor{subsection in head/foot}{fg=white,bg=black}
\setbeamercolor{separation line}{bg=black}

\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{footlinecolor2}%{author in head/foot}%
\usebeamerfont{author in head/foot}My Institution
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{footlinecolor3}%{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshortdate
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,right]{footlinecolor3}%{date in head/foot}%
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother

\addtobeamertemplate{headline}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node at([shift={(4.5,-.5)}]current page.north) {\includegraphics[height=.45\headheight]{example-image}};
\end{tikzpicture}}


\begin{document}

\begin{frame}
 \maketitle
\end{frame}
\section{My Section}
\subsection{My Subsection}
\begin{frame}

my frame

\end{frame}

\end{document}

This is the output I get:

enter image description here

5
  • 1
    I believe this is a viewer issue, what PDF viewer you are using? In Adobe Acrobat, e.g, this is not visible whereas in SumatraPDF it is visible.
    – AboAmmar
    Apr 18, 2017 at 18:28
  • Both Preview and the TeXShop viewer have this issue. I do not currently have any other pdf viewer installed. I will try that though, thanks!
    – ronwelty
    Apr 18, 2017 at 18:35
  • 4
    I'm voting to close this question as off-topic because viewer issue Apr 18, 2017 at 19:06
  • The reader okular does not show the lines. One argument for this issue being viewer-related is that the lines don't get wider when zooming in. If there is a gap in the pdf code, than I'd expect it to get wider.
    – gernot
    Apr 18, 2017 at 19:49
  • I downloaded and installed Acrobat Reader and I can confirm the issue is not present. It would still be very nice to know why it happens and possibly fix it in the TexShop viewer (it bothers me to see them while compiling it.)
    – ronwelty
    Apr 18, 2017 at 20:03

1 Answer 1

1

Short: Don't use Preview and viewers using the same pdf rendering libraries.

Long: The problem is that you have probably smooth text and line art checked in your preview preferences:

enter image description here

Try without, the lines will vanish, but the text will become ugly. So not a good solution.

Workaround: use for example Adobe Reader instead.

1
  • That might be only present in older versions. I am currently running macOS Sierra and the option is not there. imgur.com/D6i7JkH I can certainly use AR for presenting the slides, but it is very annoying that the TeXShop Viewer has the same issue.
    – ronwelty
    Apr 18, 2017 at 19:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.