0

I'm creating a beamer presentation with a separate handout using the workflow describe in section 21.2.2 of the beamer user guide. I use tikz for diagrams. Here are the three files:

main.beamer.tex (for the slide presentation):

\documentclass[ignorenonframetext]{beamer}
\input{main.tex}

main.article.tex (for the article):

\documentclass{article}
\usepackage{beamerarticle}
\setjobnamebeamerversion{main.beamer}
\input{main.tex}

main.tex (for common code):

\usepackage{tikz}
\usetikzlibrary{shapes,shapes.multipart}

\begin{document}

\frame
{
  \frametitle{Title of the first slide}
  \centering
  \begin{tikzpicture}[overlay]
    \tikzstyle{every text node part} = [align=center]
    \tikzstyle{obj node} = [ellipse, fill=blue!20]
    \node[obj node] (obja) {Words in a bubble Words in a bubble \\ Words in a bubble};
  \end{tikzpicture}
}
Here is some content that is shown only in the article, not in the beamer slides.
\frame
{
  \frametitle{Title of the second slide}
  \begin{itemize}
    \item Foo
  \end{itemize}
}

\end{document}

The slides are created using

$ xelatex main.beamer.tex

and the article:

$ xelatex main.article.tex

The problem is that I'm getting no space allocated in the article for the picture. There's no vertical space for it, and it is aligned to the extreme left of the page, not within the normal flow of the document, as shown in the image:

No room for picture in article

How can I get vertical space for it, and change the horizontal position within the article, without affecting the beamer slides?

2
  • 3
    Welcome to TeX.SX! At a first glance, the reason is that you define the picture as overlay, which exactly instructs tikz not to allocate any space.
    – gernot
    Feb 7, 2017 at 17:09
  • Brilliant! That fixes it. I wonder why I had overlay in there. I'm learning tikz and copied that from an example. Thank you. Feb 7, 2017 at 17:22

1 Answer 1

3

Omit the option overlay.

Revised main.tex:

\usepackage{tikz}
\usetikzlibrary{shapes,shapes.multipart}
\setbeamertemplate{navigation symbols}{} % never seen anyone using these 
\begin{document}

\begin{frame}{Title of the first slide}
  \centering
  \begin{tikzpicture}%
    [every text node part/.style = {align=center},
     obj node/.style = {ellipse, fill=blue!20}
    ]
    \node[obj node] (obja) {Words in a bubble Words in a bubble \\ Words in a bubble};
  \end{tikzpicture}
\end{frame}

Here is some content that is shown only in the article, not in the
beamer slides.

\begin{frame}{Title of the second slide}
  \begin{itemize}
    \item Foo
  \end{itemize}
\end{frame}

\end{document}

Output of main.beamer.tex:

enter image description here

Output of main.article.tex:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .