在R markdown pdf文件的右上角插入徽标 [英] Insert a logo in upper right corner of R markdown pdf document

查看:90
本文介绍了在R markdown pdf文件的右上角插入徽标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用R markdown,我想创建一个新报告,在每页的右上角都有我们的公司图像logo.png.

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.

是否有一种方法可以在YAML部分进行编码,还是需要在R块部分进行编码?

Is there a way to code this in the YAML section or need this to be done in a R chunk section?

推荐答案

好,我找到了解决方法:

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
---

这篇关于在R markdown pdf文件的右上角插入徽标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆