
standalone
和beamer
via選項的組合preview
如果確實有效,那就太好了,但即使是這個簡單的範例(來自獨立手冊)也只能產生一頁 PDF,而不是我期望的兩頁。
\documentclass[beamer,preview]{standalone}
\begin{document}
\begin{standaloneframe}[]
\only<1>{ One }
\only<2>{ Two }
\end{standaloneframe}
\end{document}
如果沒有預覽,它會提供預期的兩頁,但當然不會被裁剪。
而crop
不是其他問題中報告的preview
結果。! Improper \prevdepth. \newpage ...everypar {}\fi \par \ifdim \prevdepth
這對於可靠地工作來說真是太好了。
答案1
您可以使用pdfcrop
裁剪頁面。要么手動運行
pdfcrop filename.pdf
編譯後或欺騙獨立運行它(需要啟用外殼轉義):
% !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}