在R markdown pdf文档的右上角插入一个logo [英] Insert a logo in upper right corner of R markdown pdf document

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

问题描述

我正在开始使用 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}
   setlengthheadheight{28pt}
   fancyhead[L]{includegraphics[width=5cm]{GPIM_Logo_300x85.png}}
   fancyfoot[LE,RO]{GPIM}
output: pdf_document
---

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

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