0

直到最近,我才能够从 Rmd 文件创建 pdf。

遇到麻烦我已按照建议更新 tinytex 并更新所有软件包(我曾经有 Miktex,后来改为 tinytex)

以这个基本示例为例:

    ---
    title: "This is a report"
    output: 
      pdf_document: 
        keep_tex: yes
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
    options(tinytex.verbose = TRUE)
    ```
    
    This is a report

我收到以下错误:

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS reports.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output reports.tex --lua-filter "D:\Mes Donnees\R\win-library\4.0\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "D:\Mes Donnees\R\win-library\4.0\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" 
output file: reports.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log reports.log.
! I can't write on file `reports.pdf'.
(Press Enter to retry, or Control-Z to exit; default file extension is `.pdf')
Please type another file name for output
! Emergency stop.
<to be read again> 
                   \edef 
l.76 \begin{document}

! Emergency stop.
<to be read again> 
                   \edef 
l.76 \begin{document}

Error: LaTeX failed to compile reports.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See reports.log for more info.
Execution halted

显然,没有丢失的包裹,所以我不知道发生了什么?

(对于信息,创建word文件或html文件没有问题;并且文件reports.pdf在项目目录中尚不存在,也没有被其他应用程序打开)。

reports.log 提供以下内容。

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex 2021.3.16)  16 MAR 2021 19:28
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**reports.tex
(./reports.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/article.c
ls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/size10.cl
o
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count179
\c@section=\count180
\c@subsection=\count181
\c@subsubsection=\count182
\c@paragraph=\count183
\c@subparagraph=\count184
\c@figure=\count185
\c@table=\count186
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amssy
mb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfo
nts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks15
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
))
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsmat
h.sty
Package: amsmath 2020/09/23 v2.17i AMS math features
\@mathmargin=\skip49
For additional information on amsmath, use the `?' option.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amstex
t.sty
Package: amstext 2000/06/29 v2.01 AMS text

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen
.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks16
\ex@=\dimen139
))
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy
.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen140
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn
.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count187
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count188
\leftroot@=\count189
LaTeX Info: Redefining \overline on input line 399.
\classnum@=\count190
\DOTSCASE@=\count191
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box47
\strutbox@=\box48
\big@size=\dimen141
LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
\macc@depth=\count192
\c@MaxMatrixCols=\count193
\dotsspace@=\muskip16
\c@parentequation=\count194
\dspbrk@lvl=\count195
\tag@help=\toks17
\row@=\count196
\column@=\count197
\maxfields@=\count198
\andhelp@=\toks18
\eqnshift@=\dimen142
\alignsep@=\dimen143
\tagshift@=\dimen144
\tagwidth@=\dimen145
\totwidth@=\dimen146
\lineht@=\dimen147
\@envbody=\toks19
\multlinegap=\skip50
\multlinetaggap=\skip51
\mathdisplay@stack=\toks20
LaTeX Info: Redefining \[ on input line 2923.
LaTeX Info: Redefining \] on input line 2924.
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifxete
x.sty
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/iftex.
sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
))
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifluat
ex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fontenc.s
ty
Package: fontenc 2020/08/10 v2.0s Standard LaTeX package
LaTeX Font Info:    Trying to load font information for T1+lmr on input line 11
2.
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/lm/t1lmr.fd
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
))
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/inputenc.
sty
Package: inputenc 2020/08/01 v1.3d Input encoding file
\inpenc@prehook=\toks21
\inpenc@posthook=\toks22
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/textcomp.
sty
Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/xcolor/xcolor.
sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/c
olor.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-def/p
dftex.def
File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
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.
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/hyper
ref.sty
Package: hyperref 2021-02-27 v7.00k Hypertext links for LaTeX

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/ltxcmds/ltxc
mds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pdftexcmds/p
dftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/infwarerr/in
fwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/keyva
l.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks23
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/kvsetkeys/kv
setkeys.sty
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/kvdefinekeys
/kvdefinekeys.sty
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pdfescape/pd
fescape.sty
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hycolor/hycolo
r.sty
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/letltxmacro/le
tltxmacro.sty
Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/auxhook/auxhoo
k.sty
Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/kvoptions/kvop
tions.sty
Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)
)
\@linkdim=\dimen148
\Hy@linkcounter=\count199
\Hy@pagecounter=\count266

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/pd1en
c.def
File: pd1enc.def 2021-02-27 v7.00k Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/hyper
ref-langpatches.def
File: hyperref-langpatches.def 2021-02-27 v7.00k Hyperref: patches for babel la
nguages
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/intcalc/intc
alc.sty
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/etexcmds/ete
xcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
)
\Hy@SavedSpaceFactor=\count267

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/puenc
.def
File: puenc.def 2021-02-27 v7.00k Hyperref: PDF Unicode definition (HO)
Now handling font encoding PU ...
... no UTF-8 mapping file for font encoding PU
)
Package hyperref Info: Option `unicode' set `true' on input line 4073.
Package hyperref Info: Hyper figures OFF on input line 4192.
Package hyperref Info: Link nesting OFF on input line 4197.
Package hyperref Info: Hyper index ON on input line 4200.
Package hyperref Info: Plain pages OFF on input line 4207.
Package hyperref Info: Backreferencing OFF on input line 4212.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4445.
\c@Hy@tempcnt=\count268
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip17
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 4804.
\XeTeXLinkMargin=\dimen149

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/bitset/bitse
t.sty
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/bigintcalc/b
igintcalc.sty
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
)
))
\Fld@menulength=\count269
\Field@Width=\dimen150
\Fld@charsize=\dimen151
Package hyperref Info: Hyper figures OFF on input line 6075.
Package hyperref Info: Link nesting OFF on input line 6080.
Package hyperref Info: Hyper index ON on input line 6083.
Package hyperref Info: backreferencing OFF on input line 6090.
Package hyperref Info: Link coloring OFF on input line 6095.
Package hyperref Info: Link coloring with OCG OFF on input line 6100.
Package hyperref Info: PDF/A mode OFF on input line 6105.
LaTeX Info: Redefining \ref on input line 6145.
LaTeX Info: Redefining \pageref on input line 6149.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/atbegshi-
ltx.sty
Package: atbegshi-ltx 2020/08/17 v1.0a Emulation of the original atbegshi packa
ge
with kernel methods
)
\Hy@abspage=\count270
\c@Item=\count271
\c@Hfootnote=\count272
)
Package hyperref Info: Driver (autodetected): hpdftex.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/hpdft
ex.def
File: hpdftex.def 2021-02-27 v7.00k Hyperref driver for pdfTeX

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/atveryend
-ltx.sty
Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atvery packag
e
with kernel methods
)
\Fld@listcount=\count273
\c@bookmark@seq@number=\count274

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/rerunfilecheck
/rerunfilecheck.sty
Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/uniquecounte
r/uniquecounter.sty
Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
86.
)
\Hy@SectionHShift=\skip52
)
Package hyperref Info: Option `breaklinks' set `true' on input line 40.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/geometry/geome
try.sty
Package: geometry 2020/01/02 v5.9 Page Geometry

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifvtex
.sty
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
)
\Gm@cnth=\count275
\Gm@cntv=\count276
\c@Gm@tempcnt=\count277
\Gm@bindingoffset=\dimen152
\Gm@wd@mp=\dimen153
\Gm@odd@mp=\dimen154
\Gm@even@mp=\dimen155
\Gm@layoutwidth=\dimen156
\Gm@layoutheight=\dimen157
\Gm@layouthoffset=\dimen158
\Gm@layoutvoffset=\dimen159
\Gm@dimlist=\toks24
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graph
icx.sty
Package: graphicx 2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR)

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graph
ics.sty
Package: graphics 2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR)

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/trig.
sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/g
raphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 105.
)
\Gin@req@height=\dimen160
\Gin@req@width=\dimen161
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/grffile/grffil
e.sty
Package: grffile 2019/11/11 v2.1 Extended file name support for graphics (legac
y)
Package grffile Info: This package is an empty stub for compatibility on input 
line 40.
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3backend/l3ba
ckend-pdftex.def
File: l3backend-pdftex.def 2021-03-02 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count278
\l__pdf_internal_box=\box49
) (./reports.aux)
\openout1 = `reports.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for PD1/pdf/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.
LaTeX Font Info:    Checking defaults for PU/pdf/m/n on input line 76.
LaTeX Font Info:    ... okay on input line 76.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/epstopdf-pkg/e
pstopdf-base.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/latexconfig/ep
stopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package hyperref Info: Link coloring OFF on input line 76.

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/namer
ef.sty
Package: nameref 2021-04-02 v2.47 Cross-referencing by name of section

(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/refcount/refco
unt.sty
Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO)
)
(c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/gettitlestri
ng/gettitlestring.sty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
)
\c@section@level=\count279
)
LaTeX Info: Redefining \ref on input line 76.
LaTeX Info: Redefining \pageref on input line 76.
LaTeX Info: Redefining \nameref on input line 76.
(./reports.out) (./reports.out)
\@outlinefile=\write3
\openout3 = `reports.out'.

! I can't write on file `reports.pdf'.
(Press Enter to retry, or Control-Z to exit; default file extension is `.pdf')
Please type another file name for output
! Emergency stop.
<to be read again> 
                   \edef 
l.76 \begin{document}
                      
Here is how much of TeX's memory you used:
 9719 strings out of 480970
 141906 string characters out of 5905985
 439920 words of memory out of 5000000
 26819 multiletter control sequences out of 15000+600000
 406420 words of font info for 28 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 71i,1n,74p,241b,270s stack positions out of 5000i,500n,10000p,200000b,80000s

!  ==> Fatal error occurred, no output PDF file produced!

生成的tex文件没有问题,我使用了另一种策略并将pdf的创建分解为两个步骤:

xelatex --no-pdf ess.tex

xdv 文件的创建没有任何问题。然后我尝试使用将文件转换为pdf

xdvipdfmx -vv ess.xdv

然后出现问题:

<FONTMAP:c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex.map><FONTMAP:c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map><FONTMAP:c:/Users/djourdain/AppData/Roaming/TinyTeX/texmf-dist/fonts/map/dvipdfmx/ckx.map>DVI Comment:  XeTeX output 2021.03.17:0716
ess.xdv -> ess.pdf

xdvipdfmx:fatal: Unable to open "ess.pdf".

No output PDF file written.

pdf文件似乎被锁定在某个地方。但是,我没有要求预览 pdf 文件,也没有任何 ess.pdf 预先存在于目录中!

加起来 出于绝望,我在一个没有空格的名称(D:/Ess)而不是一个有空格的目录(D:/Mes Donnees/Ess/)的新项目目录中再次尝试,这次成功了。

在早期版本中,我从未遇到过目录名称的任何问题。Rmarkdown 或 tinytex 中是否有任何变化导致了这个新问题?

4

1 回答 1

1

是的,Rmarkdown 1.8 和 Rmarkdown 1.9 之间发生了变化。

Rmarkdown 1.8 调用 Pandoc 将 Markdown 转换为 PDF,并且在此过程中有一个中间步骤,它临时更改某些文件的路径,消除导致问题的空白。

从 Rmarkdown 1.9 开始,没有 Pandoc 步骤。因此,临时更改路径的中间步骤不再存在,并且空格会产生错误。

但是,空格导致此错误的根本原因还不是很清楚。

Rmarkdown GitHub repo 的第 1285期,尤其是 Yihui 的这篇评论,其中充满了细节,值得一读。

于 2021-03-17T22:29:13.600 回答