I have Ubuntu 16.04 with R3.4 and RStudio Version 1.0.143
knit to html works ok;
but knit to pdf fails:
I installed rmarkdown and tinytex from github as per previous Problem reports on SO and github ( https://github.com/rstudio/rstudio/issues/1878 .
ie
devtools::install_github('yihui/tinytex')
devtools::install_github('rstudio/rmarkdown')
and tried the default file knit to PDF. But these failed: eg: error below is for basic mosaic template;
output file: mosaic_pdf_demo1.knit.md
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS mosaic_pdf_demo1.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output mosaic_pdf_demo1.tex --template /home/hduser/R/x86_64-pc-linux-gnu-library/3.4/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable 'geometry:margin=1in' --variable 'compact-title:yes'
tlmgr search --file --global '/ecrm1000.'
cannot setup TLPDB in /home/hduser/texmf at /usr/bin/tlmgr line 5604.
! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not fou
nd.
relax
l.105 \fontencoding\encodingdefault\selectfont
Error: Failed to compile mosaic_pdf_demo1.tex. See mosaic_pdf_demo1.log for more info.
In addition: Warning messages:
1: running command ''tlmgr' search --file --global '/ecrm1000.'' had status 2
2: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains ecrm1000.
Execution halted
Any comments appreciated
I recommend you to uninstall your existing LaTeX distribution and tinytex::install_tinytex()instead. Enough has been said about why using TinyTeX instead of your system's TeX Live package. Of course, you don't have to install TinyTeX, if you want to go through the pain mentioned on that page.
I uninstalled all the default texlive stuff, purged and cleaned. and it now does produced the PDF's ok, for 3 of the templates I tested. Thanks.
The knit process now downloads and installs several missing LaTeX files; is that expected?
Yes, that is exactly what should happen :)
Most helpful comment
I recommend you to uninstall your existing LaTeX distribution and
tinytex::install_tinytex()instead. Enough has been said about why using TinyTeX instead of your system's TeX Live package. Of course, you don't have to install TinyTeX, if you want to go through the pain mentioned on that page.