includegraphics 页面选项与 lualatex 配合使用不正确

includegraphics 页面选项与 lualatex 配合使用不正确

当使用 pdflatex 编译以下 MWE(您需要一些随机的多页 pdf)时,我得到了预期的结果。当使用 lualatex 编译它时,includegraphics 命令包含 pdf 的第 1 页而不是第 2 页。这是 graphicx V1.1a 中的错误吗?

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[page=2]{SomeMultiPagePDF.pdf}%
\end{document}

lualatex 的日志,包括 \listfiles 的输出

This is LuaTeX, Version 1.0.4 (MiKTeX 2.9.6400)  (format=lualatex 2017.9.26)  5 OCT 2017 22:02
 system commands enabled.
**Testumgebung.tex
(./Testumgebung.tex
LaTeX2e <2017-04-15>
Lua module: luaotfload-main 2017/01/29 2.80001 OpenType layout system.
Lua module: lualibs 2017-02-01 2.5 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2017-02-01 2.5 ConTeXt Lua libraries -- extended co
llection.(using cache: C:/Users/JLo/AppData/Local/MiKTeX/2.9/luatex-cache/generi
c)
luaotfload | conf : Root cache directory is C:/Users/JLo/AppData/Local/MiKTeX/2.
9/luatex-cache/generic/names.
luaotfload | init : Loading fontloader “fontloader-2017-02-11.lua” from kpse
-resolved path “C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luaotfload/fontlo
ader-2017-02-11.lua”.
Lua-only attribute luaotfload@state = 1
Lua-only attribute luaotfload@noligature = 2
Lua-only attribute luaotfload@syllabe = 3
luaotfload | init : Context OpenType loader version “3.027”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 4
luaotfload | conf : Root cache directory is C:/Users/JLo/AppData/Local/MiKTeX/2.
9/luatex-cache/generic/names.
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 2 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 3 in `luaotfload.patch_font
'.
Inserting `luaotfload.rewrite_fontname' at position 4 in `luaotfload.patch_font'
.
luaotfload | main : initialization completed in 0.804 seconds
Babel <3.13> and hyphenation patterns for 1 language(s) loaded.
("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/base/article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/base/size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from C:/Users/JLo/AppData/Local/MiK
TeX/2.9/luatex-cache/generic/names/luaotfload-names.luc(load luc: C:/Users/JLo/A
ppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/otl/lmroman10-regular.luc))
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/graphicx.sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
) ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/graphics.sty"
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/graphics/trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) (C:/Users/JLo/AppData/Roaming/MiKTeX/2.9/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: luatex.def on input line 99.
(C:/Users/JLo/AppData/Roaming/MiKTeX/2.9/tex/lualatex/luatex-def/luatex.def
File: luatex.def 2016/06/17 v0.01e Graphics/Color for luaTeX
("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/infwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
) ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
) (./Testumgebung.aux)
\openout1 = Testumgebung.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 92.
LaTeX Font Info:    ... okay on input line 92.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 92.
LaTeX Font Info:    ... okay on input line 92.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 92.
LaTeX Font Info:    ... okay on input line 92.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 92.
LaTeX Font Info:    ... okay on input line 92.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 92.
LaTeX Font Info:    ... okay on input line 92.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 92.
LaTeX Font Info:    ... okay on input line 92.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 92.
LaTeX Font Info:    ... okay on input line 92.
(C:/Users/JLo/AppData/Roaming/MiKTeX/2.9/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count88
\scratchdimen=\dimen105
\scratchbox=\box26
\nofMPsegments=\count89
\nofMParguments=\count90
\everyMPshowfont=\toks15
\MPscratchCnt=\count91
\MPscratchDim=\dimen106
\MPnumerator=\count92
\makeMPintoPDFobject=\count93
\everyMPtoPDFconversion=\toks16
) ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/oberdiek/epstopdf-base.sty"
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/oberdiek/grfext.sty"
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/kvdefinekeys.sty"
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
)) ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/oberdiek/kvoptions.sty"
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/kvsetkeys.sty"
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/etexcmds.sty"
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ifluatex.sty"
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX detected.
)))) ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/pdftexcmds.sty"
Package: pdftexcmds 2017/03/19 v0.25 Utility functions of pdfTeX for LuaTeX (HO)

("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
\pdftexcmds@toks=\toks17
)
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 43
8.
Package grfext Info: Graphics extension search list:
(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG
,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 456.
)
<SomeMultiPagePDF.pdf, id=1, 614.295pt x 794.97pt>
File: SomeMultiPagePDF.pdf Graphic file (type pdf)
<use SomeMultiPagePDF.pdf>
Package luatex.def Info: SomeMultiPagePDF.pdf used on input line 93.
(luatex.def)             Requested size: 614.29349pt x 794.96806pt.

Overfull \hbox (284.29349pt too wide) in paragraph at lines 93--94
[][] 
 []

[1

{C:/Users/JLo/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Overfull \vbox (244.96806pt too high) has occurred while \output is active []

[2<./SomeMultiPagePDF.pdf>] (./Testumgebung.aux)

 *File List*
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  luatex.def    2016/06/17 v0.01e Graphics/Color for luaTeX
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
pdftexcmds.sty    2017/03/19 v0.25 Utility functions of pdfTeX for LuaTeX (HO)
   ifpdf.sty    2017/03/15 v3.2 Provides the ifpdf switch
SomeMultiPagePDF.pdf    Graphic file (type pdf)
 ***********

)

Here is how much of LuaTeX's memory you used:
 1575 strings out of 494516
 100000,154059 words of node,token memory allocated
 353 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 45 glue_spec, 3 attribute_list
, 1 write nodes
   avail lists: 2:25,3:2,4:1,5:22,6:2,7:13,8:3,9:12
 5596 multiletter control sequences out of 65536+200000
 15 fonts using 510519 bytes
 37i,4n,23p,263b,121s stack positions out of 5000i,500n,10000p,200000b,50000s
<c:/program files (x86)/miktex 2.9/fonts/opentype/public/lm/lmroman10-regular.ot
f>
Output written on Testumgebung.pdf (2 pages, 130086 bytes).

PDF statistics: 63 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 100000000)

答案1

您的用户树中有一个相当旧的 luatex.def (版本 0.01e) ( ..../AppData/Roaming/MiKTeX/2.9/tex/lualatex/luatex-‌​def/luatex.def)。

它隐藏了正确的当前 luatex.def(版本 1.0f),该版本应该位于 tex/latex/graphics-def/luatex.def 中。

尝试使用用户包管理器(可能是包“luatex-def”或类似的包)将其卸载,或者手动删除它。

相关内容