0

I am trying to create fully portable environment = MiKTeX + TeXmaker + R-Portable + RStudioPortable + gnuplot... In TeXmaker I created some User Commands:
[PdfLaTeX+shell]

pdflatex -synctex=1 -shell-escape -enable-write18 -interaction=nonstopmode %.tex

This works with documents containing gnuplot commands. Next objective is to create command for knitr...
[knitr]

Rscript -e "knitr::knit2pdf('%.Rnw')"

When I run it then the following Error will appear:

Process started

processing file: knitr-minimal.Rnw

output file: knitr-minimal.tex

Error in loadNamespace(name) : there is no package called 'tinytex' Calls: <Anonymous> ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted

Process exited with error(s)

So it creates intermediate .tex file, but doesn't create pdf... When I create and run command

Rscript -e "knitr::knit('%.Rnw')"

it produces .tex file without any errors

Process started

processing file: knitr-minimal.Rnw

output file: knitr-minimal.tex

Process exited normally

and than it is sufficient to run Quick Build (or PdfLaTeX) button and pdf is created... Am I doing something wrong with knitr::knit2pdf command, or my whole portable LaTeX environment has some flaw?
p.s.: Package tinytex is not part of MiKTeX distribution...

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
subdivider
  • 1
  • 1
  • 1
  • 3
    Have you tried going into R or the RStudio Console and `install.packages("tinytex")` first? – mysteRious Jun 12 '18 at 16:49
  • Thank You, this was THE problem... I have installed knitr in RStudio but I was not aware of the fact that tinytex belongs to R... – subdivider Jun 12 '18 at 17:36

1 Answers1

2

Install tinytext package using install.packages("tinytex") and try again