3

This probably isn't how beamer is intended to be used.

However, I would like to create a beamer slide where:

  • there is only a single line in the slide/frame
  • the single line is vertically and horizontally centered
  • the single line has the exact same style as the frame title

    I'm using \usetheme{default} so there's no magic going on. (The frametitle is just some font in a light blue color.)

    What is the dumbest way I can achieve this? (I see that there are "title slides" -- but I want many of them, and I don't want the author part. I see also that I can use \frametitle in a frame ... but it's stuck at the top of the frame.)

    I'm looking for something that's equiv to:

    \newpage
    \vspace*{\fill}
    \hspace*{\fill}...\hspace*{\fill}\vspace*{\fill}
    \newpage
    

but in beamer.

  • How did you fix the code? I could have sworn I put in 4 spaces before each line. – interactive_tikz Jun 3 '13 at 2:11
  • Is the sidebar wrong? Do we need 8 spaces? – interactive_tikz Jun 3 '13 at 2:11
  • 1
    Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. A suggestion: Do us a favour and change your username to something more telling than "user31648". – Przemysław Scherwentke Jun 3 '13 at 2:13
  • @user31648 if the code follows immediately after a list, eight spaces are required. – Gonzalo Medina Jun 3 '13 at 2:16
  • You should all upvote my question so I have enough reputation to accept an answer. :-) – interactive_tikz Jun 3 '13 at 2:30
1

You can use the frametitle font and color; by default the text will be vertically centered, so you only have to add \centering to center the text horizontally:

\documentclass{beamer}

\begin{document}

\begin{frame}
\frametitle{Test frame}
\usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}
\centering
A line of text
\end{frame}

\end{document}

enter image description here

2

I think this is what you want (essentially combining both of Gonzalo's answers together):

\documentclass{beamer}
\usetheme{default}
\setbeamertemplate{frametitle}{}
\newenvironment{myline}
  {\usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}\vfill\centering}
  {\par\vfill}
\begin{document}
\begin{frame}{}
\begin{myline}
This is a single line of text.
\end{myline}
\end{frame}
\end{document}

output of code

  • Yes, this is basically what I ended up hacking together using both posts. Thanks! :-) – interactive_tikz Jun 3 '13 at 3:13

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.