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

How to reduce vertical space between title frame and main text? #17

Closed
gmbrauer opened this issue Jan 19, 2015 · 9 comments
Closed

How to reduce vertical space between title frame and main text? #17

gmbrauer opened this issue Jan 19, 2015 · 9 comments

Comments

@gmbrauer
Copy link

How can I reduce the vertical space between title frame and main text, what could also be called the top margin of the main frame? In mtheme, this seems to be overly large, in particular when the frame is full or almost full, and the bottom margin gets smaller than the top margin. The default beamer theme does not leave that much space at the top.

I know I could insert \vspace*{-10mm} before the main text on every frame, but I'm looking for a general solution.

What I'm looking for is essentially something like the (apparently unimplemented) \setbeamersize{text margin top=10mm}.

MWE (comment out \usetheme{m} to compare with the default beamer theme):

\documentclass{beamer}
\usetheme{m}
\usepackage{lipsum}
\begin{document}
\begin{frame}
\frametitle{A Frame Title}
\lipsum
\end{frame}
\end{document}
@matze
Copy link
Owner

matze commented Jan 19, 2015

The margin is caused by this vspace. I added that in order to center "normal sized" content vertically. I would also like to fix this with Beamer tools but as you noticed it is not possible to change vertical frame margins.

Now, I don't know how to proceed. The margin definitely looks bad but on the other hand overly full slides also don't leave the best impressions.

@gmbrauer
Copy link
Author

Thank you very much, that was helpful. It didn't spot the \vspace{2em} straight away but now I removed it I feel my slides already look much better. If I come across a more general solution I'll let you know. And thanks again for this very nice style.

@jdahm
Copy link
Contributor

jdahm commented Jan 23, 2015

I gave a presentation this week using this theme and I too found the vspace odd looking. LaTeX/Beamer do a nice job of placing content without this. Was there another reason for adding it, other than forcing less content per slide?

@matze
Copy link
Owner

matze commented Jan 23, 2015

I am not forcing less content but centering vertically. For example, if you just set one line of text it looks oddly out of place, maybe also due to the vast amount of available whitespace. If this is a serious problem for most of the users, I might add an option which adds the \vspace on an optional basis.

@matze matze closed this as completed in 810b13b Jan 30, 2015
matze added a commit that referenced this issue Jan 30, 2015
Fix #17 and clean up syntax
@AndySchroder
Copy link

Could you give an example on how to use the optionally added vspace? I don't see it described in the documentation anywhere.

@benjamin-weiss
Copy link
Contributor

As far as I remember the additional space is not there anymore. But you can still increase/decrease the space, if you want:

\documentclass{beamer}
\usetheme{metropolis}
\addtobeamertemplate{frametitle}{}{\vspace{1em}} % increase
\addtobeamertemplate{frametitle}{}{\vspace{-1em}} % decrease
\begin{document}
\begin{frame}[t]{Title}
    Lorem ipsum ...
\end{frame}
\end{document}

@AndySchroder
Copy link

Thanks for the example on how to manually change the spacing.

In the commit referenced above, there is a nooffset option that changes something called voffset that looks like it is a variable of some kind. However, I don't understand enough about what is going on in that code to use the nooffset or choose a user defined voffset.

Were you aware of that code change? If not, can you now understand it enough to provide an example to use that new option? I'm thinking it may be a little cleaner than what you have suggested above.

Thanks.

@benjamin-weiss
Copy link
Contributor

Again: there is no additional space anymore and therefore no theme option to disable it. And I don't think it is necessary to add an option to the theme to change the space.

Be aware that the commit referenced is over a year old. Really a lot has changed over the last year. Just use my example code if you need to reduce the space. It is a clean solution.

@AndySchroder
Copy link

Thanks for the clarification, and apologies for not realizing that the changes in the commit referenced above were overwritten at a later time.

Thanks.

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

5 participants