animation icon indicating copy to clipboard operation
animation copied to clipboard

saveLatex, two paged pdf output

Open ghost opened this issue 8 years ago • 1 comments

Dear Yihui Xie,

I have not found a possibility to save two gif plots in one pdf with 2 pages (plot per page) in the saveLatex function. The only solution I came up with is merging of two resulting pdfs (each comprises one plot). Is it the only way?

Thank you very much indeed.

ghost avatar May 22 '16 15:05 ghost

Hi AleksandrIanevski, You are right, saveLatex() can only generate 1 gif plot in one page. The fastest way to save two gif plots in one pdf with 2 pages is merging the two pdf files (on Windows). On linux, we can put two brownian.motion() gif plots in a tex file and compile it with pdftex.

\documentclass{article}
%use geometry and animate package
\usepackage[papersize={7in,7in},margin=0.3in]{geometry}
\usepackage{animate}

\begin{document}
% figure 1
\begin{figure}
  \begin{center}
    \animategraphics[controls,loop,width=0.95\textwidth]{10}{BM}{0}{9}
  \end{center}
\end{figure}
% figure 2
\begin{figure}
  \begin{center}
    \animategraphics[controls,loop,width=0.95\textwidth]{10}{BM}{0}{9}
  \end{center}
\end{figure}

\end{document}

We need implement another function to support 'one pdf multiple animation'. We will add this feature in the future, as more users request for it.

yulijia avatar May 23 '16 04:05 yulijia