includepdf only shows first page, despite having specifed the second page
includepdf
always inserts the first page of the PDF, even if I specify which page I want to insert.
Start with a three-page PDF file, generated by external.tex
:
documentclass[a4paper]{article}
begin{document}
Page 1
newpage
Page 2
newpage
Page 3
end{document}
Then use this code:
documentclass[a4paper]{article}
usepackage[final]{pdfpages}
begin{document}
includepdf[pages={2}]{external.pdf}
end{document}
The resulting document shows “Page 1”, instead of “Page 2”.
I get the same behavior from xelatex
and pdflatex
. I'm using MikTeX, and all of my packages are up to date. EDIT: I have run the update wizard both as a user and as an admin.
This is similar to this question, but that is evidently a separate issue, because the answers there do not work: I am specifying which pages to insert, and all of the filenames are in lowercase.
EDIT: Here is the log file:
This is XeTeX, Version 3.14159265-2.6-0.99999 (MiKTeX 2.9.6600) (preloaded format=xelatex 2018.3.3) 4 MAR 2018 12:13
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 73 language(s) loaded.
("D:Program Files (x86)MiKTeX 2.9texlatexbasearticle.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("D:Program Files (x86)MiKTeX 2.9texlatexbasesize10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
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
)
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagespdfpages.sty"
Package: pdfpages 2017/10/31 v0.5l Insert pages of external PDF documents (AM)
("D:Program Files (x86)MiKTeX 2.9texlatexbaseifthen.sty"
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatextoolscalc.sty"
Package: calc 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
calc@Acount=count87
calc@Bcount=count88
calc@Adimen=dimen103
calc@Bdimen=dimen104
calc@Askip=skip43
calc@Bskip=skip44
LaTeX Info: Redefining setlength on input line 80.
LaTeX Info: Redefining addtolength on input line 81.
calc@Ccount=count89
calc@Cskip=skip45
)
("D:Program Files (x86)MiKTeX 2.9texlatexeso-piceso-pic.sty"
Package: eso-pic 2015/07/21 v2.0g eso-pic (RN)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekatbegshi.sty"
Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekinfwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicskeyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
KV@toks@=toks14
)
("D:Program Files (x86)MiKTeX 2.9texlatexxcolorxcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfgcolor.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-defxetex.def"
File: xetex.def 2016/07/11 v4.10 LaTeX color/graphics driver for XeTeX (L3/RRM/
JK)
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphicx.sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphics.sty"
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicstrig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfggraphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 99.
)
Gin@req@height=dimen105
Gin@req@width=dimen106
)
AM@pagewidth=dimen107
AM@pageheight=dimen108
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagesppxetex.def"
File: ppxetex.def 2017/10/31 v0.5l Pdfpages driver for XeTeX (AM)
)
AM@pagebox=box26
AM@global@opts=toks15
AM@toc@title=toks16
c@AM@survey=count90
AM@templatesizebox=box27
) (test.aux)
openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
AtBeginShipoutBox=box28
("D:Program Files (x86)MiKTeX 2.9texlatexoberdiekpdflscape.sty"
Package: pdflscape 2016/05/14 v0.11 Display of landscape pages in PDF (HO)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicslscape.sty"
Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texgenericifxetexifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
Package pdflscape Info: Auto-detected driver: dvipdfm (xetex) on input line 99.
)
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
[1
]
(test.aux) )
Here is how much of TeX's memory you used:
2095 strings out of 427846
27745 string characters out of 3151564
96275 words of memory out of 3000000
6068 multiletter control sequences out of 15000+200000
3648 words of font info for 15 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
37i,18n,39p,253b,430s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on test.pdf (1 page).
pdfpages
|
show 6 more comments
includepdf
always inserts the first page of the PDF, even if I specify which page I want to insert.
Start with a three-page PDF file, generated by external.tex
:
documentclass[a4paper]{article}
begin{document}
Page 1
newpage
Page 2
newpage
Page 3
end{document}
Then use this code:
documentclass[a4paper]{article}
usepackage[final]{pdfpages}
begin{document}
includepdf[pages={2}]{external.pdf}
end{document}
The resulting document shows “Page 1”, instead of “Page 2”.
I get the same behavior from xelatex
and pdflatex
. I'm using MikTeX, and all of my packages are up to date. EDIT: I have run the update wizard both as a user and as an admin.
This is similar to this question, but that is evidently a separate issue, because the answers there do not work: I am specifying which pages to insert, and all of the filenames are in lowercase.
EDIT: Here is the log file:
This is XeTeX, Version 3.14159265-2.6-0.99999 (MiKTeX 2.9.6600) (preloaded format=xelatex 2018.3.3) 4 MAR 2018 12:13
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 73 language(s) loaded.
("D:Program Files (x86)MiKTeX 2.9texlatexbasearticle.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("D:Program Files (x86)MiKTeX 2.9texlatexbasesize10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
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
)
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagespdfpages.sty"
Package: pdfpages 2017/10/31 v0.5l Insert pages of external PDF documents (AM)
("D:Program Files (x86)MiKTeX 2.9texlatexbaseifthen.sty"
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatextoolscalc.sty"
Package: calc 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
calc@Acount=count87
calc@Bcount=count88
calc@Adimen=dimen103
calc@Bdimen=dimen104
calc@Askip=skip43
calc@Bskip=skip44
LaTeX Info: Redefining setlength on input line 80.
LaTeX Info: Redefining addtolength on input line 81.
calc@Ccount=count89
calc@Cskip=skip45
)
("D:Program Files (x86)MiKTeX 2.9texlatexeso-piceso-pic.sty"
Package: eso-pic 2015/07/21 v2.0g eso-pic (RN)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekatbegshi.sty"
Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekinfwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicskeyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
KV@toks@=toks14
)
("D:Program Files (x86)MiKTeX 2.9texlatexxcolorxcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfgcolor.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-defxetex.def"
File: xetex.def 2016/07/11 v4.10 LaTeX color/graphics driver for XeTeX (L3/RRM/
JK)
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphicx.sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphics.sty"
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicstrig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfggraphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 99.
)
Gin@req@height=dimen105
Gin@req@width=dimen106
)
AM@pagewidth=dimen107
AM@pageheight=dimen108
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagesppxetex.def"
File: ppxetex.def 2017/10/31 v0.5l Pdfpages driver for XeTeX (AM)
)
AM@pagebox=box26
AM@global@opts=toks15
AM@toc@title=toks16
c@AM@survey=count90
AM@templatesizebox=box27
) (test.aux)
openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
AtBeginShipoutBox=box28
("D:Program Files (x86)MiKTeX 2.9texlatexoberdiekpdflscape.sty"
Package: pdflscape 2016/05/14 v0.11 Display of landscape pages in PDF (HO)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicslscape.sty"
Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texgenericifxetexifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
Package pdflscape Info: Auto-detected driver: dvipdfm (xetex) on input line 99.
)
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
[1
]
(test.aux) )
Here is how much of TeX's memory you used:
2095 strings out of 427846
27745 string characters out of 3151564
96275 words of memory out of 3000000
6068 multiletter control sequences out of 15000+200000
3648 words of font info for 15 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
37i,18n,39p,253b,430s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on test.pdf (1 page).
pdfpages
2
Testing your code, I seePage 2
.... are you really sure you are including the correctexternal.pdf
file? Perhaps you changed the working directory and there is anotherexternal.pdf
, from a test etc?
– Christian Hupfer
Mar 3 '18 at 9:19
Yeah, there's only one version of it. I also got the same behavior with two other PDF files (one related to the thing I'm actually trying to do, one totally random).
– adam.baker
Mar 3 '18 at 10:08
Well, I have no clue right now for your issue. What happens if you usepages=-
instead?
– Christian Hupfer
Mar 3 '18 at 11:31
1
Works for me on an updated MikTeX with pdfLaTeX, LuaLaTeX and XeLaTeX. What does the.log
file look like?
– moewe
Mar 3 '18 at 12:46
1
@adam.baker No, it's fine. After all you found the problematic package. I think the files likexetex.def
were only recently moved to a new package (namelygraphics-def
), earlier they were part of another package. This may explain why you didn't get the updates if the MikTeX package manager did not install the new package automatically and did not remove the other files from the old package.
– moewe
Mar 4 '18 at 9:56
|
show 6 more comments
includepdf
always inserts the first page of the PDF, even if I specify which page I want to insert.
Start with a three-page PDF file, generated by external.tex
:
documentclass[a4paper]{article}
begin{document}
Page 1
newpage
Page 2
newpage
Page 3
end{document}
Then use this code:
documentclass[a4paper]{article}
usepackage[final]{pdfpages}
begin{document}
includepdf[pages={2}]{external.pdf}
end{document}
The resulting document shows “Page 1”, instead of “Page 2”.
I get the same behavior from xelatex
and pdflatex
. I'm using MikTeX, and all of my packages are up to date. EDIT: I have run the update wizard both as a user and as an admin.
This is similar to this question, but that is evidently a separate issue, because the answers there do not work: I am specifying which pages to insert, and all of the filenames are in lowercase.
EDIT: Here is the log file:
This is XeTeX, Version 3.14159265-2.6-0.99999 (MiKTeX 2.9.6600) (preloaded format=xelatex 2018.3.3) 4 MAR 2018 12:13
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 73 language(s) loaded.
("D:Program Files (x86)MiKTeX 2.9texlatexbasearticle.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("D:Program Files (x86)MiKTeX 2.9texlatexbasesize10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
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
)
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagespdfpages.sty"
Package: pdfpages 2017/10/31 v0.5l Insert pages of external PDF documents (AM)
("D:Program Files (x86)MiKTeX 2.9texlatexbaseifthen.sty"
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatextoolscalc.sty"
Package: calc 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
calc@Acount=count87
calc@Bcount=count88
calc@Adimen=dimen103
calc@Bdimen=dimen104
calc@Askip=skip43
calc@Bskip=skip44
LaTeX Info: Redefining setlength on input line 80.
LaTeX Info: Redefining addtolength on input line 81.
calc@Ccount=count89
calc@Cskip=skip45
)
("D:Program Files (x86)MiKTeX 2.9texlatexeso-piceso-pic.sty"
Package: eso-pic 2015/07/21 v2.0g eso-pic (RN)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekatbegshi.sty"
Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekinfwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicskeyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
KV@toks@=toks14
)
("D:Program Files (x86)MiKTeX 2.9texlatexxcolorxcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfgcolor.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-defxetex.def"
File: xetex.def 2016/07/11 v4.10 LaTeX color/graphics driver for XeTeX (L3/RRM/
JK)
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphicx.sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphics.sty"
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicstrig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfggraphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 99.
)
Gin@req@height=dimen105
Gin@req@width=dimen106
)
AM@pagewidth=dimen107
AM@pageheight=dimen108
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagesppxetex.def"
File: ppxetex.def 2017/10/31 v0.5l Pdfpages driver for XeTeX (AM)
)
AM@pagebox=box26
AM@global@opts=toks15
AM@toc@title=toks16
c@AM@survey=count90
AM@templatesizebox=box27
) (test.aux)
openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
AtBeginShipoutBox=box28
("D:Program Files (x86)MiKTeX 2.9texlatexoberdiekpdflscape.sty"
Package: pdflscape 2016/05/14 v0.11 Display of landscape pages in PDF (HO)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicslscape.sty"
Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texgenericifxetexifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
Package pdflscape Info: Auto-detected driver: dvipdfm (xetex) on input line 99.
)
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
[1
]
(test.aux) )
Here is how much of TeX's memory you used:
2095 strings out of 427846
27745 string characters out of 3151564
96275 words of memory out of 3000000
6068 multiletter control sequences out of 15000+200000
3648 words of font info for 15 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
37i,18n,39p,253b,430s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on test.pdf (1 page).
pdfpages
includepdf
always inserts the first page of the PDF, even if I specify which page I want to insert.
Start with a three-page PDF file, generated by external.tex
:
documentclass[a4paper]{article}
begin{document}
Page 1
newpage
Page 2
newpage
Page 3
end{document}
Then use this code:
documentclass[a4paper]{article}
usepackage[final]{pdfpages}
begin{document}
includepdf[pages={2}]{external.pdf}
end{document}
The resulting document shows “Page 1”, instead of “Page 2”.
I get the same behavior from xelatex
and pdflatex
. I'm using MikTeX, and all of my packages are up to date. EDIT: I have run the update wizard both as a user and as an admin.
This is similar to this question, but that is evidently a separate issue, because the answers there do not work: I am specifying which pages to insert, and all of the filenames are in lowercase.
EDIT: Here is the log file:
This is XeTeX, Version 3.14159265-2.6-0.99999 (MiKTeX 2.9.6600) (preloaded format=xelatex 2018.3.3) 4 MAR 2018 12:13
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 73 language(s) loaded.
("D:Program Files (x86)MiKTeX 2.9texlatexbasearticle.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("D:Program Files (x86)MiKTeX 2.9texlatexbasesize10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
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
)
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagespdfpages.sty"
Package: pdfpages 2017/10/31 v0.5l Insert pages of external PDF documents (AM)
("D:Program Files (x86)MiKTeX 2.9texlatexbaseifthen.sty"
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatextoolscalc.sty"
Package: calc 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
calc@Acount=count87
calc@Bcount=count88
calc@Adimen=dimen103
calc@Bdimen=dimen104
calc@Askip=skip43
calc@Bskip=skip44
LaTeX Info: Redefining setlength on input line 80.
LaTeX Info: Redefining addtolength on input line 81.
calc@Ccount=count89
calc@Cskip=skip45
)
("D:Program Files (x86)MiKTeX 2.9texlatexeso-piceso-pic.sty"
Package: eso-pic 2015/07/21 v2.0g eso-pic (RN)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekatbegshi.sty"
Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekinfwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
("D:Program Files (x86)MiKTeX 2.9texgenericoberdiekifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicskeyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
KV@toks@=toks14
)
("D:Program Files (x86)MiKTeX 2.9texlatexxcolorxcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfgcolor.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-defxetex.def"
File: xetex.def 2016/07/11 v4.10 LaTeX color/graphics driver for XeTeX (L3/RRM/
JK)
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
))
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphicx.sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicsgraphics.sty"
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicstrig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphics-cfggraphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 99.
)
Gin@req@height=dimen105
Gin@req@width=dimen106
)
AM@pagewidth=dimen107
AM@pageheight=dimen108
("D:Program Files (x86)MiKTeX 2.9texlatexpdfpagesppxetex.def"
File: ppxetex.def 2017/10/31 v0.5l Pdfpages driver for XeTeX (AM)
)
AM@pagebox=box26
AM@global@opts=toks15
AM@toc@title=toks16
c@AM@survey=count90
AM@templatesizebox=box27
) (test.aux)
openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
AtBeginShipoutBox=box28
("D:Program Files (x86)MiKTeX 2.9texlatexoberdiekpdflscape.sty"
Package: pdflscape 2016/05/14 v0.11 Display of landscape pages in PDF (HO)
("D:Program Files (x86)MiKTeX 2.9texlatexgraphicslscape.sty"
Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC)
)
("D:Program Files (x86)MiKTeX 2.9texgenericifxetexifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
Package pdflscape Info: Auto-detected driver: dvipdfm (xetex) on input line 99.
)
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
File: external.pdf Graphic file (type QTm)
<use "external.pdf" >
[1
]
(test.aux) )
Here is how much of TeX's memory you used:
2095 strings out of 427846
27745 string characters out of 3151564
96275 words of memory out of 3000000
6068 multiletter control sequences out of 15000+200000
3648 words of font info for 15 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
37i,18n,39p,253b,430s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on test.pdf (1 page).
pdfpages
pdfpages
edited Mar 4 '18 at 7:44
adam.baker
asked Mar 3 '18 at 9:12
adam.bakeradam.baker
635314
635314
2
Testing your code, I seePage 2
.... are you really sure you are including the correctexternal.pdf
file? Perhaps you changed the working directory and there is anotherexternal.pdf
, from a test etc?
– Christian Hupfer
Mar 3 '18 at 9:19
Yeah, there's only one version of it. I also got the same behavior with two other PDF files (one related to the thing I'm actually trying to do, one totally random).
– adam.baker
Mar 3 '18 at 10:08
Well, I have no clue right now for your issue. What happens if you usepages=-
instead?
– Christian Hupfer
Mar 3 '18 at 11:31
1
Works for me on an updated MikTeX with pdfLaTeX, LuaLaTeX and XeLaTeX. What does the.log
file look like?
– moewe
Mar 3 '18 at 12:46
1
@adam.baker No, it's fine. After all you found the problematic package. I think the files likexetex.def
were only recently moved to a new package (namelygraphics-def
), earlier they were part of another package. This may explain why you didn't get the updates if the MikTeX package manager did not install the new package automatically and did not remove the other files from the old package.
– moewe
Mar 4 '18 at 9:56
|
show 6 more comments
2
Testing your code, I seePage 2
.... are you really sure you are including the correctexternal.pdf
file? Perhaps you changed the working directory and there is anotherexternal.pdf
, from a test etc?
– Christian Hupfer
Mar 3 '18 at 9:19
Yeah, there's only one version of it. I also got the same behavior with two other PDF files (one related to the thing I'm actually trying to do, one totally random).
– adam.baker
Mar 3 '18 at 10:08
Well, I have no clue right now for your issue. What happens if you usepages=-
instead?
– Christian Hupfer
Mar 3 '18 at 11:31
1
Works for me on an updated MikTeX with pdfLaTeX, LuaLaTeX and XeLaTeX. What does the.log
file look like?
– moewe
Mar 3 '18 at 12:46
1
@adam.baker No, it's fine. After all you found the problematic package. I think the files likexetex.def
were only recently moved to a new package (namelygraphics-def
), earlier they were part of another package. This may explain why you didn't get the updates if the MikTeX package manager did not install the new package automatically and did not remove the other files from the old package.
– moewe
Mar 4 '18 at 9:56
2
2
Testing your code, I see
Page 2
.... are you really sure you are including the correct external.pdf
file? Perhaps you changed the working directory and there is another external.pdf
, from a test etc?– Christian Hupfer
Mar 3 '18 at 9:19
Testing your code, I see
Page 2
.... are you really sure you are including the correct external.pdf
file? Perhaps you changed the working directory and there is another external.pdf
, from a test etc?– Christian Hupfer
Mar 3 '18 at 9:19
Yeah, there's only one version of it. I also got the same behavior with two other PDF files (one related to the thing I'm actually trying to do, one totally random).
– adam.baker
Mar 3 '18 at 10:08
Yeah, there's only one version of it. I also got the same behavior with two other PDF files (one related to the thing I'm actually trying to do, one totally random).
– adam.baker
Mar 3 '18 at 10:08
Well, I have no clue right now for your issue. What happens if you use
pages=-
instead?– Christian Hupfer
Mar 3 '18 at 11:31
Well, I have no clue right now for your issue. What happens if you use
pages=-
instead?– Christian Hupfer
Mar 3 '18 at 11:31
1
1
Works for me on an updated MikTeX with pdfLaTeX, LuaLaTeX and XeLaTeX. What does the
.log
file look like?– moewe
Mar 3 '18 at 12:46
Works for me on an updated MikTeX with pdfLaTeX, LuaLaTeX and XeLaTeX. What does the
.log
file look like?– moewe
Mar 3 '18 at 12:46
1
1
@adam.baker No, it's fine. After all you found the problematic package. I think the files like
xetex.def
were only recently moved to a new package (namely graphics-def
), earlier they were part of another package. This may explain why you didn't get the updates if the MikTeX package manager did not install the new package automatically and did not remove the other files from the old package.– moewe
Mar 4 '18 at 9:56
@adam.baker No, it's fine. After all you found the problematic package. I think the files like
xetex.def
were only recently moved to a new package (namely graphics-def
), earlier they were part of another package. This may explain why you didn't get the updates if the MikTeX package manager did not install the new package automatically and did not remove the other files from the old package.– moewe
Mar 4 '18 at 9:56
|
show 6 more comments
1 Answer
1
active
oldest
votes
I was able to solve the problem by installing the graphics-def
package.
Following @moewe's comment, I tried to find out why I had an old version of texlatexgraphics-defxetex.def
. This answer suggested installing graphics-def
.
Presumably this is a dependency that should be made explicit; or perhaps xetex.def
should be updated automatically somehow.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f418212%2fincludepdf-only-shows-first-page-despite-having-specifed-the-second-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was able to solve the problem by installing the graphics-def
package.
Following @moewe's comment, I tried to find out why I had an old version of texlatexgraphics-defxetex.def
. This answer suggested installing graphics-def
.
Presumably this is a dependency that should be made explicit; or perhaps xetex.def
should be updated automatically somehow.
add a comment |
I was able to solve the problem by installing the graphics-def
package.
Following @moewe's comment, I tried to find out why I had an old version of texlatexgraphics-defxetex.def
. This answer suggested installing graphics-def
.
Presumably this is a dependency that should be made explicit; or perhaps xetex.def
should be updated automatically somehow.
add a comment |
I was able to solve the problem by installing the graphics-def
package.
Following @moewe's comment, I tried to find out why I had an old version of texlatexgraphics-defxetex.def
. This answer suggested installing graphics-def
.
Presumably this is a dependency that should be made explicit; or perhaps xetex.def
should be updated automatically somehow.
I was able to solve the problem by installing the graphics-def
package.
Following @moewe's comment, I tried to find out why I had an old version of texlatexgraphics-defxetex.def
. This answer suggested installing graphics-def
.
Presumably this is a dependency that should be made explicit; or perhaps xetex.def
should be updated automatically somehow.
answered Mar 4 '18 at 9:53
adam.bakeradam.baker
635314
635314
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f418212%2fincludepdf-only-shows-first-page-despite-having-specifed-the-second-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Testing your code, I see
Page 2
.... are you really sure you are including the correctexternal.pdf
file? Perhaps you changed the working directory and there is anotherexternal.pdf
, from a test etc?– Christian Hupfer
Mar 3 '18 at 9:19
Yeah, there's only one version of it. I also got the same behavior with two other PDF files (one related to the thing I'm actually trying to do, one totally random).
– adam.baker
Mar 3 '18 at 10:08
Well, I have no clue right now for your issue. What happens if you use
pages=-
instead?– Christian Hupfer
Mar 3 '18 at 11:31
1
Works for me on an updated MikTeX with pdfLaTeX, LuaLaTeX and XeLaTeX. What does the
.log
file look like?– moewe
Mar 3 '18 at 12:46
1
@adam.baker No, it's fine. After all you found the problematic package. I think the files like
xetex.def
were only recently moved to a new package (namelygraphics-def
), earlier they were part of another package. This may explain why you didn't get the updates if the MikTeX package manager did not install the new package automatically and did not remove the other files from the old package.– moewe
Mar 4 '18 at 9:56