I use tineytex package and have no problem knitting a pdf when I click on the knit button in rStudio. However, when I called rmarkdown::render()
with the same .Rmd file as input, only an intermeidate .tex file was generated in the target folder.
Below is my code.
rmarkdown::render(input = "C:/Users/sqhuang/Pdf.Rmd",
output_format = "pdf_document",
output_file = "test.pdf",
output_dir = ot_path)
Below is the error messages that I got.
processing file: Pdf.Rmd
|......... | 14%
ordinary text without R code
|................... | 29%
label: setup (with options)
List of 1
$ echo: logi FALSE
|............................ | 43%
ordinary text without R code
|..................................... | 57%
label: cars
|.............................................. | 71%
ordinary text without R code
|........................................................ | 86%
label: pressure (with options)
List of 1
$ echo: logi FALSE
|.................................................................| 100%
ordinary text without R code
output file: Pdf.knit.md
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS Pdf.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc15f027594a1c.tex --template "C:\PROGRA~1\R\R-36~1.1\library\RMARKD~1\rmd\latex\DEFAUL~3.TEX" --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex) restricted \write18 enabled. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized variable construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-config/web2c/pdftex: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-var/web2c/pdftex: Unrecognized variable construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-home/web2c/pdftex: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-config/web2c: Unrecognized variable construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-var/web2c: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-home/web2c: Unrecognized variable construct `$/'. entering extended mode Error: Failed to compile \endeavor/apps_doc$/Applications/0_Support/GCS/Brett - Other Duties/BAR/Steph/AL/Jul/test_report.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips.
$
. Once I changed the output directory to C drive, both pdf and html versions of the report were rendered. – Stephanie Wong