convert.exe
convert latex_demo.gif -coalesce output-pngs/latex_demo.png
animate
須要注意的是,不是全部的PDF閱讀器都能支持動畫。app
第一步安裝軟件就不演示了,第二步轉換圖片序列,第三步、第四步的示例源碼以下:工具
% !TEX TS-program = xelatex % !TEX encoding = UTF-8 % This is a simple template for a XeLaTeX document using the "article" class, % with the fontspec package to easily select fonts. \documentclass[11pt]{article} % use larger type; default would be 10pt % 開啓下面的設置能夠插入中文 \usepackage{ctex} \usepackage{color} \usepackage{fontspec} % Font selection for XeLaTeX; see fontspec.pdf for documentation \defaultfontfeatures{Mapping=tex-text} % to support TeX conventions like ``---'' \usepackage{xunicode} % Unicode support for LaTeX character names (accents, European chars, etc) \usepackage{xltxtra} % Extra customizations for XeLaTeX %\setmainfont{Charis SIL} % set the main body font (\textrm), assumes Charis SIL is installed %\setsansfont{Deja Vu Sans} %\setmonofont{Deja Vu Mono} % other LaTeX packages..... \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. \geometry{a4paper} % or letterpaper (US) or a5paper or.... %\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent % support the \includegraphics command and options % PDF中插入GIF能夠使用包 animate,前提是必需要先包含宏包 graphicx \usepackage{graphicx} \usepackage{animate} \title{PDF中插入GIF示例} \author{LinTeX9527} \date{\today} %\date{} % Activate to display a given date or no date (if empty), % otherwise the current date is printed \begin{document} \maketitle \begin{center} \animategraphics[autoplay, loop, controls, width=.7\textwidth]{15}{./latex-pngs/latex_demo-}{0}{80} \end{center} \end{document}
歡迎轉載,請註明出處和做者,同時保留聲明。
做者:LinTeX9527
出處:http://www.javashuo.com/article/p-vfkfgolq-gs.html
本博客的文章如無特殊說明,均爲原創,轉載請註明出處。如未經做者贊成必須保留此段聲明,且在文章頁面明顯位置給出原文鏈接,不然保留追究法律責任的權利oop