sh: pdflatex: command not found

I am working on vitae template using the R Markdown, I have been trying to knit the outcome but it keeps giving this error. I have installed and loaded this packages tinytex, vitae before I started and still hasn't changed.
sh: pdflatex: command not found

Error: LaTeX failed to compile Untitled.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See Untitled.log for more info.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
error in running command
Execution halted

Hi, welcome to the forum.

I think you have run into a bit of a naming issue that causes some confusion.
{tinytext} is an R package. TinyText is a lightweight LaTeX installation.

It looks like you will need to install TinyText if you do not have another LaTeX installation.

See TinyTeX

Since you have {tinytext} itstalled it looks like all you need to do is run this command

tinytex::install_tinytex()

The first thing I did was to
install.packages(“tinytex”)

Next step was
tinytex::install_tinytex()

I did this both and I’m still getting the
Error: Latex failed to compile error message

I'm not an expert here particularly as I use Texlive not TinyText but the error message says

Untitled.log 

Can you post it here? It may give us a clue. Come to think of it have you named and saved the .rmd file? I would have thought we should see something like XXX.log.

This means that the TeX Live installation is not found correctly. pdflatex is a command that should be available.

Those steps are ok. Did the second one run without issue ?

Does tinytex::tinytex_root() returns someting ?

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.