我有一些使用 includepdf 和 grffile 包的 latex 代码。我使用 grffile 包来允许我引用的 PDF 文件路径中有空格。
该代码可以在我拥有的台式机上运行(即 grffile 包允许 PDF 在文件路径中带有空格),但相同的代码无法在笔记本电脑上运行。
% This allows spaces to be used in file names or paths
\RequirePackage[space]{grffile}
\includepdf[pages=2-, width = \textwidth, keepaspectratio, pagecommand ={\thispagestyle{followingpage}}]{filePath}
问题似乎是笔记本电脑没有正确执行 grffile 包。我不知道如何解决这个问题。
另一条信息是,如果我在笔记本电脑上运行带有引号的文件路径的代码,它就会起作用。
我正在使用 TeXworks 编辑器/RStudio。
这是来自桌面的日志文件,其中输出没有错误: http://www.filedropper.com/xpreport-works
日志文件的前几行:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/W32TeX) (preloaded format=pdflatex 2015.7.24) 1 SEP 2015 11:16
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./XPReport.tex
(./XPReport.tex
LaTeX2e <2015/01/01> patch level 2
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(./XPTemplate.cls
Document Class: XPTemplate
(c:/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/texlive/2015/texmf-dist/tex/latex/base/size12.clo
File: size12.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
)
(c:/texlive/2015/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
然后在第589行:
<use C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf, page 1>
Package pdftex.def Info: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/
sig-on.pdf, page1 used on input line 19.
(pdftex.def) Requested size: 578.16002pt x 578.19661pt.
<C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf, id=11, 614.2
95pt x 614.295pt>
File: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf Graphic
file (type pdf)
<use C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf>
Package pdftex.def Info: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/
sig-on.pdf used on input line 19.
(pdftex.def) Requested size: 462.52977pt x 462.53854pt.
File: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf Graphic
file (type pdf)
<use C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf>
Package pdftex.def Info: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/
sig-on.pdf used on input line 19.
(pdftex.def) Requested size: 462.52977pt x 462.53854pt.
这是来自笔记本电脑的日志文件,其中输出有文件路径错误: http://www.filedropper.com/xpreport-error
日志文件的前几行:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/W32TeX) (preloaded format=pdflatex 2015.8.21) 1 SEP 2015 11:32
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./XPReport.tex
(./XPReport.tex
LaTeX2e <2015/01/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
(./XPTemplate.cls
Document Class: XPTemplate
(c:/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/texlive/2015/texmf-dist/tex/latex/base/size12.clo
File: size12.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
)
(c:/texlive/2015/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
然后在第589行:
<use C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf, page 1>
Package pdftex.def Info: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/
sig-on.pdf, page1 used on input line 19.
(pdftex.def) Requested size: 578.16002pt x 578.19661pt.
LaTeX Warning: File `C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-
on.pdf' not found on input line 19.
<C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf, id=11, 614.2
95pt x 614.295pt>
File: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf Graphic
file (type pdf)
<use C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf>
Package pdftex.def Info: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/
sig-on.pdf used on input line 19.
(pdftex.def) Requested size: 462.52977pt x 462.53854pt.
LaTeX Warning: File `C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-
on.pdf' not found on input line 19.
File: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf Graphic
file (type pdf)
<use C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-on.pdf>
Package pdftex.def Info: C:/Users/blahblah/Box Sync/R/dev/library/Correlation/
sig-on.pdf used on input line 19.
(pdftex.def) Requested size: 462.52977pt x 462.53854pt.
LaTeX Warning: File `C:/Users/blahblah/Box Sync/R/dev/library/Correlation/sig-
on.pdf' not found on input line 19.