Reputation: 103
I can't compile a pdf
using R sweave. I keep getting the following error
Latex error: file 'ae.sty' not found
\documentclass{article}
\begin{document}
\SweaveOpts{concordance=TRUE}
Hello, world.
\end{document}
Why do I keep getting this error? Do I need to install another package with pdf compilation functions?
I'm using windows, and my tex install is the package tinytex
.
Upvotes: 3
Views: 5819
Reputation: 21
You can use the vector to add all the packages that you may need and then use the for loop to install all them from the R terminal.
packs <- c("`setspace.sty'", "`float.sty'", "`amssymb.sty'", "`utf8.sty'", "`fancyhdr.sty'", "`tabularx.sty'", "`hyperref.sty'", "`etoolbox.sty'", "`lmodern.sty")
for (i in 1:length(packs)) {
tinytex::parse_install(text = paste('! LaTeX Error: File', packs[i],'not found.'))
}
Upvotes: -1
Reputation: 71
packs <- c("`ae.sty'","`grfext.sty'")
for (i in 1:length(packs)) {
tinytex::parse_install(text = paste('! LaTeX Error: File', packs[i],'not found.'))
}
Upvotes: 7