Luiz Fernando Moratelli Luiz Fernando Moratelli - 10 months ago 62
LaTeX Question

How to get images from the .tex folder (relative path) in Rmarkdown?

I'm trying to get a watermark image like here:

How to add a watermark image on rmarkdown?

I almost did it, but as I wrote on my original question the

image that the
get comes from
C:\Program Files (x86)\MiKTeX 2.9\tex\plain\present

I'm currently using my Latex code from an external file using the follwing at beginning of my .Rmd:

in_header: header.tex

And in
I'm using the following code:

{\transparent{0.3} \includegraphics[width=\paperwidth,height=\paperheight,%

But I just can't get the
from where my
file is (that is the same that my
file is).

How I tell to my
file get this image from the relative path to my

I'm using the
function from
to make the report, follow is a screenshot from the insides of my folder with .Rmd, the .tex file and the error when I try to insert a

rstudio screenshot

Answer Source

I just did it.

The problem were on MiKTeX for Windows.

I just followed the steps on this answer, remembering to assure that the folder is TDS-compliant (with a tex folder in it), and after I just put the image on the tex folder.