考虑以下代码:
documentclass[11pt]{report}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize
%\usepackage{luatodonotes}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[mark=x] coordinates {
(2,-2)
(3,-3)
(4,-4)
(5,-5)
};
\end{axis}
\end{tikzpicture}
\end{document}
当使用 LuaLaTeX 进行编译时,
lualatex -enable-write18 lualatex-externalize-luatodonotes.tex
一切正常,TikZ 图像已按预期进行外部化。但是,取消注释 luatodonotes 行后,编译会因错误退出,并且不会产生任何结果。
lualatex-externalize-luatodonotes.log 文件结尾为:
Package pgfplots Warning: running in backwards compatibility mode (unsuitable t
ick labels; missing features). Consider writing \pgfplotsset{compat=1.11} into
your preamble.
on input line 8.
\AtBeginShipoutBox=\box259
===== 'mode=convert with system call': Invoking 'lualatex -halt-on-error -inter
action=batchmode -jobname "lualatex-externalize-luatodonotes-figure0" "\def\tik
zexternalrealjob{lualatex-externalize-luatodonotes}\input{lualatex-externalize-
luatodonotes}"' ========
runsystem(lualatex -halt-on-error -interaction=batchmode -jobname "lualatex-ext
ernalize-luatodonotes-figure0" "\def\tikzexternalrealjob{lualatex-externalize-l
uatodonotes}\input{lualatex-externalize-luatodonotes}")...executed.
!LuaTeX error (file lualatex-externalize-luatodonotes-figure0.pdf): xpdf: readi
ng PDF image failed
==> Fatal error occurred, no output PDF file produced!
lualatex-externalize-luatodonotes-figure-0.log 文件结尾为:
\providecommand \oddpage@label [2]{}
{C:/Users/vladimir/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
A tikzpicture has been optimized away. Use '/tikz/external/optimize=false' to d
isable this.
! LuaTeX error ...iKTeX 2.9/tex/lualatex/luatodonotes/luatodonotes.lua:350: bad
argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
...iKTeX 2.9/tex/lualatex/luatodonotes/luatodonotes.lua:350: in function 'clea
rNotes'
<\directlua >:1: in main chunk.
<argument> ...irectlua {luatodonotes.clearNotes()}
\EndCatcodeRegime \AtBegSh...
l.21 \end{document}
Here is how much of LuaTeX's memory you used:
22848 strings out of 495011
100000,794899 words of node,token memory allocated
1681 words of node memory still in use:
nodes
avail lists: 2:20,3:240,4:193,7:2,9:76,10:1
25515 multiletter control sequences out of 65536+200000
28 fonts using 1112699 bytes
63i,11n,76p,820b,1808s stack positions out of 5000i,500n,10000p,200000b,50000s
! ==> Fatal error occurred, no output PDF file produced!
我已在 Windws 7 64 位上尝试使用 MikTeX 和 TexLive 进行此操作,结果相同。
如何解决?我想在我的书中使用 luatodonotes。我还需要使用 LuaLaTeX。