Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange looking vertical skip in headline of outer scheme miniframes #895

Open
TamotsuTokazu opened this issue Jun 5, 2024 · 2 comments

Comments

@TamotsuTokazu
Copy link

TamotsuTokazu commented Jun 5, 2024

Issue

Consider the following simple test document using theme Dresden, which essentially uses miniframes for outer theme.
When comparing the results compiled using beamer 3.36 vs 3.70, we can visually observe a difference between the headlines of the two versions. Personally speaking, there seems to be too much space for the 3.70, and the 3.36 one looks much better.

3.363.70

Cause

I'm not a professional in TeX, but I tried to investigate the issue myself and the following relevant code snippet:

\defbeamertemplate*{headline}{miniframes theme}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip2pt
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
\usebeamerfont{subsection in head/foot}\usebeamertemplate{subsection in head/foot}
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}

The snippet itself wasn't changed quite much throughout all the versions. However, after some experiments, I believe I'm able to say that it's the difference of \insertnavigation that causes the different appearances. More concretely:

  • In 3.36, the \vskip2pt is directly on top of the text.
  • In 3.70, the \vskip2pt is a \baselineskip above from the baseline of the text.

Cure

I have also tested some possible patches. I'm not completely sure how and why this works, but they look good:

  • If we want to keep the appearance with the 2pt skip above, just replace the \vskip2pt with \vskip-\lineskip:
    \begin{beamercolorbox}{section in head/foot}
        % \vskip2pt              % before
        \vskip-\lineskip         % after
        \insertnavigation{\paperwidth}
        \vskip2pt
    \end{beamercolorbox}
    pt patch
  • However, note that the subsection headline below actually uses slightly different measures (2.5ex above baseline, 1.125ex below), we can also accordingly modify the skip for the section title to match the look:
    \begin{beamercolorbox}{section in head/foot}
        % \vskip2pt              % before
        \vskip2.5ex              % after
        \vskip-\baselineskip     % after
        \insertnavigation{\paperwidth}
        % \vskip2pt              % before
        \vskip1.125ex            % after
    \end{beamercolorbox}
    pt patch

The difference between the two suggested changes is, indeed, really subtle. But since typesetting is an art in the details, we might still need to choose carefully between the two.

Acknowledgement

Thank you for your priceless effort in developing and maintaining this package.

@TamotsuTokazu
Copy link
Author

Friendly reminder for anyone to take a look UwU

@samcarter
Copy link
Collaborator

samcarter commented Jun 18, 2024

@TamotsuTokazu Sorry for the late reply.

If I remember correctly, there was some problem with overlapping elements in a derived theme and the current position of elements was a compromise to minimise problems. I need to find the problematic example again to test your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants