Insert a logo in upper right corner of R markdown pdf document

后端 未结 5 1477
挽巷
挽巷 2020-12-01 03:21

I am getting started with R markdown and I would like to create a new report having our company image logo.png in the upper right corner of each page.

I

5条回答
  •  北海茫月
    2020-12-01 03:31

    Ok, I have found the solution:

    ---
    title:
    header-includes: 
       \usepackage{graphicx}
       \usepackage{fancyhdr}
       \pagestyle{fancy}
       \setlength\headheight{28pt}
       \fancyhead[L]{\includegraphics[width=5cm]{GPIM_Logo_300x85.png}}
       \fancyfoot[LE,RO]{GPIM}
    output: pdf_document
    ---
    

提交回复
热议问题