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.

2
  • 1
    the standalone class explicitly disables the options preview=false,crop=false,varwidth=false if you use the beamer option. They simply do not work with the complicated beamer frames. Jan 17 at 16:27
  • A pity... but understandable. Thanks! Jan 18 at 9:51

1 Answer 1

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}
2
  • 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! Jan 18 at 9:54
  • If you want all pages to be the same size, just use something like \geometry{papersize={3cm,3cm}} to make them smaller. Jan 18 at 10:20

You must log in to answer this question.

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