Adding background image to R Markdown (.rmd) file for PDF output?
问题 Is it possible to add a background image to a R Markdown (.rmd) file for PDF output? I have scoured through Pandoc's R Markdown documentation but cannot find any mention of adding a background image. 回答1: From this tex.SE answer: save the following as header.tex (replacing image.jpg by the path to your background image): \usepackage{background} \backgroundsetup{ scale=1, color=black, opacity=0.4, angle=0, pages=all, contents={% \includegraphics[width=\paperwidth,height=\paperheight]{image.jpg