
다음 코드가 있습니다.
\documentclass{article}
\usepackage{animate}
\listfiles
\begin{document}
\animategraphics[palindrome,autoplay,width=\textwidth,controls]{5}{Testsaves}{0}{1}
\end{document}
동일한 폴더에 두 개의 이미지(Testsaves0 및 Testsaves1)가 필요합니다. pdflatex로 컴파일하면 모든 것이 작동하고 열 때 Adobe Acrobat에서 애니메이션이 표시됩니다. 버튼도 작동합니다.
LuaLaTeX로 동일한 코드를 컴파일하면 PDF의 첫 번째 이미지만 포함되고 아무 일도 일어나지 않습니다.
로그 파일에서:
pdflatex:
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
)) <./Testsaves0.png> <./Testsaves1.png>
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 6.
LuaLaTeX:
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
))<./Testsaves0.png>
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 6.
시스템은 TeXLive 2014가 완전히 업데이트된 Windows 7 PC입니다. 예전에는 효과가 있었던 것 같은데 100% 확신할 수는 없습니다. animate 패키지를 가장 먼저 백업한 개정판(35387)으로 롤백하려고 시도했지만 아무 것도 변경되지 않았습니다.
파일 목록:
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
animate.sty 2014/12/04 PDF animations from files and inline graphics
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
ifthen.sty 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
ifdraft.sty 2008/08/11 v1.3 Detect class options draft and final (HO)
calc.sty 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
atenddvi.sty 2007/04/17 v1.1 At end DVI hook (HO)
zref-abspage.sty 2012/04/04 v2.24 Module abspage for zref (HO)
zref-base.sty 2012/04/04 v2.24 Module base for zref (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
luatex-loader.sty 2010/03/09 v0.4 Lua module loader (HO)
auxhook.sty 2011/03/04 v1.3 Hooks for auxiliary files (HO)
zref-lastpage.sty 2012/04/04 v2.24 Module lastpage for zref (HO)
atveryend.sty 2011/06/30 v1.8 Hooks at the very end of document (HO)
animfp.sty 2009/07/23 fixed point addition for animate.sty
graphics.sty 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
supp-pdf.mkii
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
***********
답변1
animate는 동일한 파일을 두 번 포함하지 않도록 그래픽의 정체성을 테스트합니다. 이 테스트는 lualatex에 대해 실패합니다. pdftexcmds
of 의 luatex 구현에 \pdf@filemdfivesum
결함이 있는 것 같습니다. lualatex를 사용하면 두 그래픽에 대해 동일한 값을 얻지만 pdflatex로 컴파일하면 다른 값을 얻습니다.
animate에서 파일 이름만 확인하도록 하면 문제를 해결할 수 있습니다. 하지만 Heiko Oberdiek에게 버그 보고서를 보내는 것이 좋습니다.
\documentclass{article}
\usepackage{animate}
\makeatletter\def\@anim@pdfmdfivesum#1{#1}\makeatother
\begin{document}
\makeatletter
\pdf@filemdfivesum{gans1.png}
\pdf@filemdfivesum{gans2.png}
\makeatother
\animategraphics[palindrome,autoplay,width=\textwidth,controls]{5}{gans}{1}{2}
\end{document}
답변2
animate
동일한 파일이 여러 번 포함되는 것을 방지하기 위해 패키지 \pdf@filemdfivesum
에서 사용합니다 . pdftexcmds
삽입할 파일의 MD5 체크섬을 계산합니다.
보고된 오류는 Windows에서만 발생합니다.
그 이유는 Windows가 텍스트 모드와 바이너리 모드로 파일을 여는 것을 구별하기 때문입니다. C는 fopen()
Lua에 매핑되고 io.open()
동일한 인수 목록을 사용합니다. 모든 플랫폼에서 파일을 올바르게 읽을 수 있도록 호출 에 플래그 b
(바이너리 모드)를 추가해야 합니다 .io.open()
이 패치는 문제를 해결합니다:
--- texmf-dist/scripts/oberdiek/pdftexcmds.lua.orig
+++ texmf-dist/scripts/oberdiek/pdftexcmds.lua
@@ -250,7 +250,7 @@
if not offset then
offset = 0
end
- local filehandle = io.open(foundfile, "r")
+ local filehandle = io.open(foundfile, "rb")
if filehandle then
if offset > 0 then
filehandle:seek("set", offset)
@@ -270,7 +270,7 @@
function filemdfivesum(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
- local filehandle = io.open(foundfile, "r")
+ local filehandle = io.open(foundfile, "rb")
if filehandle then
local contents = filehandle:read("*a")
escapehex(md5.sum(contents))