如何在Markdown中为PDF文档添加图像作为页眉/页脚 [英] How to add an image as a header/footer in Markdown for a PDF document

查看:175
本文介绍了如何在Markdown中为PDF文档添加图像作为页眉/页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将图像作为页眉和页脚(与我的组织的视觉标识保持一致)添加到PDF报告中.我已经在Sweave中做到了,但我也想仅使用Markdown就能做到.我可以使用![footer](H:/R/Footer.pdf)插入图像,但是当我尝试使用墙纸包时(如我在Sweave中所做的那样),出现错误.

I want to add images as headers and footers (in keeping with my organizations visual identity) to PDF reports. I've managed to do it in Sweave but I'd also like to be able to do it using just Markdown. I can insert the image using ![footer](H:/R/Footer.pdf) however when I try to use the wallpaper package (like I do in Sweave) I get an error.

---
title: "2014 Report"
author: "My Name"
date: "Monday, October 06, 2014"
output:
  pdf_document:
    number_sections: yes
    toc: yes
fontsize: 10pt
header-includes:
    - \usepackage{wallpaper}
abstract: This is my abstract
---
\LRCornerWallPaper{0.99}{![footer](H:/R/Footer.pdf)} 

Markdown中是否有办法,还是我需要坚持Sweave?

Is there a way in Markdown, or do I need to stick to Sweave?

推荐答案

在这种情况下,wallpaper包的正确用法很简单

The correct usage of the wallpaper package in this case would be simply

\LRCornerWallPaper{0.99}{path/to/pic}

这篇关于如何在Markdown中为PDF文档添加图像作为页眉/页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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