1

I am trying to set up a repository to collect slides and reuse them, so it seem reasonable to use standalone and its beamer features, however in the following M(n)WE

\documentclass[aspectratio=169, english]{beamer}

\usepackage{standalone}

\begin{filecontents*}{testslide.tex}
    \documentclass[beamer,10pt]{standalone}
    \begin{document}
        \begin{standaloneframe}[label=mylabel]{A Title? Vanishes}
        A text - appears
        \end{standaloneframe}
    \end{document}
\end{filecontents*}

\begin{document}
    \include{testslide.tex}
\end{document}

The standalone file nicely renders into a slide,

Standalone renders fine

while in the main document the slide title (and I assume also options like my label) vanish and just the main text stays.

Main compilation, title missing

Maybe standaloneframe is not meant to represent a full frame but only parts of it? I could not get that from the documentation at https://ctan.uib.no/macros/latex/contrib/standalone/standalone.pdf how to actually have a full frame including the title and the options within standalone then. My goal would be that the MWE really just has a include and includes a full frame with title and its options and such - how can I get that?

(Because Otherwise I would always have to duplicate all [...]{...} parts of a frame in every latex beamer document, that duplication I would like to avoid)

1 Answer 1

3

I think I found the answer, and it is not too complicated.

It seems standaloneframe does not refer ti a single (standalone, not in a set of slides) frame, but to a dummy frame to encapsulate parts that are later within a frame.

To get a full standalone frame the following does actually just work

\documentclass[aspectratio=169, english]{beamer}

\usepackage{standalone}

\begin{filecontents*}{testslide.tex}
    \documentclass[beamer,10pt]{standalone}
    \begin{document}
        \begin{frame}[label=mylabel]{A Title? Does not vanish}
        A text - appears
        \end{frame}
    \end{document}
\end{filecontents*}

\begin{document}
    \include{testslide.tex}
\end{document}

You must log in to answer this question.

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