提问于:
浏览数:
2871
1 回答
0
`texdoc animate`, sec 6.1 Basic options
> A short note on the ‘tikzpicture’ environment: Unlike ‘pspicture’, the ‘tikzpic-
> ture’ environment is able to determine its size from the graphical objects it encloses.
> However, this may result in differently sized frames of a sequence, depending on the
> size and position of the graphical objects. Thus, in order to ensure that all frames
> of the sequence be displayed at the same scale in the animation widget, a common
> bounding box should be shared by the frames. A bounding box can be provided by
> means of an invisible ‘rectangle’ object:
```tex
\documentclass{article}
\usepackage{graphicx}
\usepackage{animate}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{animateinline}[loop,autopause,begin={
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle (10,10);
},
end={\end{tikzpicture}}]{1}
\newframe
\draw[red] (0,0)--(1,1);
\newframe
\draw[blue] (0,0)--(-1,1);
\end{animateinline}
\end{document}
```
你的回答
请登录后回答
你的回答将会帮助更多人,请务必认真回答问题。