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

Horizontal style – blue bar leaves a small gap #20

Open
sondretg opened this issue Jun 6, 2023 · 5 comments
Open

Horizontal style – blue bar leaves a small gap #20

sondretg opened this issue Jun 6, 2023 · 5 comments

Comments

@sondretg
Copy link

sondretg commented Jun 6, 2023

The lower blue bar in the horizontal style leaves a small gap to the left, see screenshot; I suppose it's meant to cover the whole segment.

Screenshot 2023-06-06 at 09 51 30

@kellertuer
Copy link
Contributor

Yes it is meant to cover the whole width. The problem here is, that this is sometimes hard to track down.
As a first example, my talks do not have that, cf. https://ronnybergmann.net/talks/2022-JuliaCon-Manoptjl-extended.pdf.

Ah but I see mine have that on the right -.-

Usually this happens, when some end of a line is not “escaped” properly, i.e. when you look at the code of the style you have a lot of lines ending in %, since without that, some definitions / text within fields might introduce this.
And yes, I spent quite some time to reduce these from happening, so with them not happening in my talk, it would be great to have a (as small/short as possible) example that reproduces this (on your machine and hopefully also on mine).

Then it might be still a matter of a few hours trying to find the culprit. For both your bug as well as mine.

@sondretg
Copy link
Author

sondretg commented Jun 6, 2023

Hmm, that's curious that you don't have them in your slides. I already have it for the code snippet below where there's no %-s at all.

\documentclass[aspectratio=169]{beamer}

\usetheme[slogan=english,frametotal=true,style=horizontal]{NTNU}

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

minexample.pdf

@kellertuer
Copy link
Contributor

As I said it is probably missing % and most probably somewhere in the style files.

@sondretg
Copy link
Author

sondretg commented Jun 6, 2023

Sorry for not realising you meant the .sty-file which I assumed would be identical for the both of us.

In beamerouterthemeNTNUhorizontal.sty I added % after the first curly brace of the \hbox{} below

\hbox{
	\begin{beamercolorbox}[wd=.666666\paperwidth,ht=\footlineheight,dp=0.4\footlineheight,left]{palette tertiary}%
 			\hspace*{3em}%
            \vspace*{.1\footlineheight}%
            \usebeamercolor[fg]{page number in head/foot}%
    		\usebeamerfont{page number in head/foot}%
			\insertframenumber{}%
			\ifntnu@displayTotalFrameNumber%
				\ /\ \inserttotalframenumber%
			\fi%
		\end{beamercolorbox}\hspace{-1pt}%Hacked up to now
		\begin{beamercolorbox}[wd=.333333\paperwidth,ht=\footlineheight,dp=0.4\footlineheight,right]{palette tertiary}%
            \hfill%
            \vspace*{-.1\footlineheight}
            \includegraphics[height=.8\footlineheight]{ntnu_uten_slagord_neg.png}
 			\hspace*{2em}%
 		\end{beamercolorbox}
 	}%

which led to what you describe, the gap appearing on the right-hand side.

Reducing the length of the \hspace{-1pt}%Hacked up to now reduces the size of the gap on the right, but leads to a gap between the boxes, and removing it completely yields a very thin, but visible, gap between them.
So the issue seems to be to find appropriate sizes for the colorboxes and the negative \hspace to ensure there's no gap between them.

@kellertuer
Copy link
Contributor

Thanks for narrowing that down – as you can also see, the \hspace is already a hack to remove one of the lines, maybe also just -0.1pt is enough?
But yes, in general fixing these by finding the right dimensions would be very welcome (and probably quite some experimenting).

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