Unable to produce pdf reports from RMarkdown (tinytex) - pdf

Until very recently, I was able to create pdf from Rmd files.
Being in trouble I have followed the advices to update tinytex and update all packages (I used to have Miktex and I changed to tinytex)
Taking this basic example:
---
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
I am getting the following errors:
"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
Apparently, there are no missing packages, so I have no clue about what is happening?
(For info, there are no problems creating a word file or and html file; and the file reports.pdf does not exist yet in the project directory, nor is it opened by another application).
The reports.log gives the following.
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!
The tex file being generated without problems, I used another strategy and decomposed the creation of the pdf into two steps:
xelatex --no-pdf ess.tex
The xdv file was created without any problem.
Then I tried to transformt the file into pdf using
xdvipdfmx -vv ess.xdv
Then appears the issue:
<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.
It seems the pdf file is locked somewhere. However, I haven't asked to preview the pdf file, nor any ess.pdf preexist on the directory !
Add-up
Out of despair, I tried again in a new project directory with a name without space (D:/Ess) instead of a directory with spaces (D:/Mes Donnees/Ess/), and this times it works.
I never encoutered any problem with directory names in earlier versions. Has anything changed in either Rmarkdown or tinytex that creates this new problem?

Yes, there has been changes between Rmarkdown 1.8 and Rmarkdown 1.9.
Rmarkdown 1.8 calls Pandoc to convert Markdown to PDF and in the process has an intermediate step where it temporarily changes the paths of some files, getting rid off the white spaces that caused your problem.
Since Rmarkdown 1.9 there is no Pandoc step. Hence, the intermediate step that temporarily changes the paths is not there anymore and white spaces produce the error.
The root cause of why white spaces cause this error is not really clear, though.
Issue #1285 of Rmarkdown GitHub repo and, in particular, this comment by Yihui are full of details about this and worth reading completely.

I had the same problem and nothing on StackOverflow worked for me.
Problem occurred to be that my Project was suddenly changed to the default project. (Your project should be with a light blue box in the right upper corner of your RStudio screen).
You can recognize this by checking the .log file, which is then complaining about your working directory. So changing your project is a possible answer to this problem as well!

Related

Emoji don't knit to PDF

If I run cat("\U001F615") on the command line in RStudio on my Mac, it shows the emoji. But if I knit it (Rmd) into a pdf, I get this error message:
! Package inputenc Error: Unicode char \u8:😕 not set up for use with
LaTeX.
See the inputenc package documentation for explanation. Type H
for immediate help. ...
l.144 \end{verbatim}
Try running pandoc with --latex-engine=xelatex.
pandoc:
Error producing PDF Error: pandoc document conversion failed with
error 43 Execution halted
But if I do latex_engine: xelatex, I don't get an error message, but the knitted pdf still doesn't show the emoji. Can someone help me in how I can knit to PDF with Emoji displaying?
There is a LaTeX package that adds support for emoji here: https://github.com/alecjacobson/coloremoji.sty
I haven't had any luck installing it though, because it's not on CTAN yet and I'm a LaTeX noob!
Once it's installed, you can add something like this to your YAML header:
---
title: "Title"
author: "Me"
header-includes:
- \usepackage{coloremoji}
output:
pdf_document
---

About an error with the command "gitbook pdf"

I met a problem.
I run the command "gitbook pdf", and it show me this Error:
EbookError: Error during ebook generation: 1% Converting input to HTML...
InputFormatPlugin: HTML Input running
on /tmp/tmp-72206AoHgIzetV6D/SUMMARY.html
Language not specified
Creator not specified
Building file list...
Normalizing filename cases
Rewriting HTML links
34% Running transforms on ebook...
Merging user specified metadata...
Detecting structure...
Detected chapter: Introduction
Detected chapter: CH1
Detected chapter: CH2
Detected chapter: Item 1
Auto generated TOC with 4 entries.
Flattening CSS and remapping font sizes...
Failed to parse CSS selector: u'h|button::-moz-focus-inner'
Failed to parse CSS selector: u'h|input::-moz-focus-inner'
Failed to parse CSS selector: u'h|input[type=search]::-webkit-search-cancel-button'
Failed to parse CSS selector: u'h|input[type=search]::-webkit-search-decoration'
Source base font size is 12.00000pt
Removing fake margins...
Cleaning up manifest...
Trimming unused files from manifest...
Creating PDF Output...
67% Running PDF Output plugin
Traceback (most recent call last):
File "/usr/bin/ebook-convert", line 20, in<br>
sys.exit(main())
File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 359, in main<br>
plumber.run()
File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 1189, in run
self.opts, self.log)
File "/usr/lib/calibre/calibre/ebooks/conversion/plugins/pdf_output.py", line 123, in convert
must_use_qt()
File "/usr/lib/calibre/calibre/gui2/__init__.py", line 1041, in must_use_qt
raise RuntimeError('X server required. If you are running on a'
RuntimeError: X server required. If you are running on a headless machine, use xvfb
what's the error mean?

RMarkdown pdf - Font color

How can I change the font color in RMarkdown pdf output.
I did try doing, Roses are \textcolor{red}{red}, violets are \textcolor{blue}{blue}.
But this only worked for the very first line in the pdf document. Upon using the same subsequently, it outputs this error,
! File ended while scanning use of \#xdblarg.
<inserted text>
\par
<*> /tmp/tex2pdf.18828/input.tex
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on /tmp/tex2pdf.18828/input.log.
pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
Execution halted
Help appreciated!
Thank you

Conversion of Japanese fonts returns an error in pdf2swf

When i am issuing the command
pdf2swf japanese.pdf -o japanese.swf -f -T 9 -t -s storeallcharacters
conversion returns an error:
Error: Unknown font tag 'HGTT_0'
Error: Unknown font tag 'HGTT_1'
Error (27721): No font in show
Error: Unknown font tag 'HGTT_1'
Error (33717): No font in show
Error: Unknown font tag 'F0'
Error (38443): No font in show
Error: Unknown character collection 'Adobe-Japan1'
Error: Couldn't find '90msp-RKSJ-H' CMap file for 'Adobe-Japan1' collection
Error: Unknown CMap '90msp-RKSJ-H' for character collection 'Adobe-Japan1'
Error: Unknown font tag 'F0'
Error (244537): No font in show
I have checked the path file for CMAP in adobe and it shows that I have Adobe-Japan1 CMAP under C:\Program Files\Adobe\Reader 10.0\Resource\CMAP.
Then what I tried so far is to download CMaps for PDF CJK Fonts in here
Download CMAP for Japan
and replaced what is under the path. I am looking everywhere for fonts 'HGTT_0, HGTT_1, F0' in the web but still no luck. I research more of the problem and found out this Japanese Font conversion problem, might have some information I missed? Please help me to understand, why is pdf2swf still report for a notice that It cannot find 'Adobe-Japan1' collection wherein I actually have it?

Conversion of TIFF to PDF with Ghostscript

Could you tell me how can I convert TIFF to PDF with using Ghostscript or Postscript?
I tried to use this command:
gswin32c.exe -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=o.pdf test.tif
But it doesn't work.
It produces an error:
GPL Ghostscript 9.06 (2012-08-08)
Copyright (C) 2012 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in II*
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1169/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Current file position is 4
GPL Ghostscript 9.06: Unrecoverable error, exit code 1
The libtiff software package (available on all major OS platforms) ships with a command line tool called tiff2pdf.
$ tiff2pdf -h
LIBTIFF, Version 4.0.3
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
usage: tiff2pdf [options] input.tiff
options:
-o: output to file name
-j: compress with JPEG
-z: compress with Zip/Deflate
-q: compression quality
-n: no compressed data passthrough
-d: do not compress (decompress)
-i: invert colors
-u: set distance unit, 'i' for inch, 'm' for centimeter
-x: set x resolution default in dots per unit
-y: set y resolution default in dots per unit
-w: width in units
-l: length in units
-r: 'd' for resolution default, 'o' for resolution override
-p: paper size, eg "letter", "legal", "A4"
-F: make the tiff fill the PDF page
-f: set PDF "Fit Window" user preference
-e: date, overrides image or current date/time default, YYYYMMDDHHMMSS
-c: sets document creator, overrides image software default
-a: sets document author, overrides image artist default
-t: sets document title, overrides image document name default
-s: sets document subject, overrides image image description default
-k: sets document keywords
-b: set PDF "Interpolate" user preference
-h: usage
So a simple command to get your PDF would be:
$ tiff2pdf -o output.pdf -p A4 -F test.tif
Ghostscript reads PDF and PostScript as input, it doesn't read image formats, and in particular doesn't read TIFF. However PostScript is a programming language, so it is entirely possible to write a PostScript program to read a TIFF file (the viewgif.ps and viewjpeg.ps program supplied with Ghostscript do this for GIF and JPEG formats)
I do have a program which does this, up to a point, and which has been posted on comp.lang.postscript a few times. Its kind of large to share here (33Kb) but I can email you a copy if you are interested.
Use the gdal_translate utility. It's designed for geospatial raster imagery, but it doesn't care if it's just a regular image.
gdal_translate -of pdf \path\to\someimage.tif test.pdf
Additional info on the geo-pdf driver and it's options:
http://www.gdal.org/frmt_pdf.html
The default compression applied is DEFLATE, which is good because it's lossless, but doesn't produce very small files. Usually using PREDICTOR and TILED options can increase compression (but not always, test with your data).
gdal_translate -of pdf ^
--config COMPRESS=DEFLATE --config PREDICTOR=2 --config TILED=YES ^
in.tif deflate.pdf
For smallest files use JPEG. For combined smallest and least lossy use JPEG2000, but test in client's pdf reader because support is not universal (recent Adobe Reader is fine).
gdal_translate -of pdf -co compress=jpeg -co jpeg_quality=85 ^
inimage.tif outdoc.pdf
gdal_translate -of pdf -co compress=jpeg2000 ...
-co is for brevity, it's interchangeable with --config.
Upper case in first example is convention only, on the command line it doesn't matter.
^ is Windows character to suppress linefeed, omit when all in one line.
Otaining pre-built binaries:
http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries
Figuring out which distribution package to use will be a bit of a pain if you don't know anything about Geographic Information Systems. If all you want is to stuff the program somewhere and run it, grab "compiled binaries in single zip" from GIS Internals, 2015-Jan 32bit stable release here, unpack and start from SDKShell.bat.
The best tool I've used so far has been Irfanview. It allowed us to do a very obscure version of TIFF files, and also let us do mixed TIFF to PDF conversions where some pages where grayscale, some were color, and some were CCITT4 fax encoded.
I created a .NET program that converted millions of documents using Irfanview using this command line:
C:\Program Files (x86)\IrfanView\i_view32.exe TIFFFile.tiff /convert=OutputPDFFile.pdf /silent /cmdexit
The .NET program essentially just passed in the full paths to the TIFF input and PDF output files.
Setup
Download Irfanview 32bit. Not all plugins are available for 64-bit version, so I used 32-bit.
Then download the plugin package for Irfanview and install it.
Then open Irfanview, and you need to define the settings for either the IMPdf Plugin (legacy 32-bit only plugin) or the newer PDF Plugin by going to File>>Batch Conversion/Rename.
The settings in the Batch Conversion/Rename window stay in effect for every subsequent execution of the program as they are stored in the Irfanview INI file.
Click Output Format, then choose PDF.
Then click the OPTIONS button. That will allow you to control parameters on what will happen to the input TIFF file when it is converted to PDF.
Then try irfanview to do it manually for a few TIFF files to ensure the output is desired.
Then you can automate it using a program...
I Convert the Tiff file to Pdf File by use Imagick
code :
$document = new Imagick(test.tiff);
$document->setImageFormat("pdf");
$document->writeImages("test.pdf", true);
I Convert the PDF file to Tiff File by Ghostscript with Java on ubuntu.
snippets code :
String convertCommand = "gs -dNOPAUSE -q -sDEVICE=tiff24nc -sCompression=lzw -dBATCH -sOutputFile=" + outputFile + " " + sourceFile;
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(convertCommand);
pr.waitFor();
If you want compression then simply replace command to,
String convertCommand = "gs -dNOPAUSE -q -sDEVICE=tifflzw -dBATCH -sOutputFile=" + outputFile + " " + sourceFile;
Please install Ghostscript before using it,
1. sudo apt-get install ghostscript libtiff-tools