我正在尝试获得像这样的水印图像:
我几乎做到了,但是当我在最初的问题上写道时background.png
,\includegraphics
获取来自的图像C:\Program Files (x86)\MiKTeX 2.9\tex\plain\present
我目前正在使用.Rmd开头的以下文件从外部文件使用Latex代码:
output:
pdf_document:
includes:
in_header: header.tex
在header.tex
我使用下面的代码:
\usepackage{eso-pic,graphicx,transparent}
\AddToShipoutPictureFG{
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\centering
{\transparent{0.3} \includegraphics[width=\paperwidth,height=\paperheight,%
keepaspectratio]{background.png}}%
}
}
}
但是我只是无法background.png
从.tex
文件所在的位置获取(与文件所在的位置相同.Rmd
)。
我如何告诉我的.tex
文件从相对路径到我的图像.tex
?
-编辑-我正在使用render
from函数rmarkdown
来生成报告,以下是我的文件夹中带有.Rmd,.tex文件和尝试插入a时出现的错误的屏幕截图test.png
:
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句