1

Following up on Using beamer tools in tikz, without creating slides:

The combination of standalone and beamer via preview option would be great if it did work, but even this simple example (from standalone manual) does produce just a one-page PDF, instead of the two pages I'd expect.

\documentclass[beamer,preview]{standalone}

\begin{document}

\begin{standaloneframe}[] \only<1>{ One } \only<2>{ Two } \end{standaloneframe}

\end{document}

Without preview, it delivers the expected two pages, but non-cropped, of course.

And crop instead of preview results in ! Improper \prevdepth. \newpage ...everypar {}\fi \par \ifdim \prevdepth as reported in other questions.

This would be really nice to get working reliably.

1 Answers1

0

You could use pdfcrop to crop the pages. Either manually run

pdfcrop filename.pdf

after the compilation or trick standalone into running it for you (needs shell-escape enabled):

% !TeX program = txs:///arara
% arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}

\documentclass[beamer,convert={command=\unexpanded{{/usr/local/texlive/2023/bin/universal-darwin/pdfcrop\space \infile}}}]{standalone}

\begin{document}

\begin{standaloneframe}[] \only<1>{ One one } \only<2>{ Two } \end{standaloneframe}

\end{document}

  • Sure. But then, it would crop differently, depending on what is on the slides. The beauty of using animations in beamer would be that the size of the pdf-pages-to-be-included could all stay the same. But probably just not feasible. Thanks! – Holger Karl Jan 18 '24 at 09:54
  • If you want all pages to be the same size, just use something like \geometry{papersize={3cm,3cm}} to make them smaller. – samcarter_is_at_topanswers.xyz Jan 18 '24 at 10:20