M.Q*_*sim 11 latex r pandoc knitr r-markdown
R大师,
我正在努力为Rmarkdown设计一个信头模板,用于大规模的邮件合并项目.
问题是如果标题可以在YAML中定义?代码可能如下所示:
---
output:
pdf_document:
fig_caption: false
logo: logo.png
institute: UNIVERSITY OF CALIFORNIA
name: Prof. Jones
address: Mathematics Search Committee
Department of Mathematics
University of California
Berkeley, California 12345
email: pj@uc.ac
latex_engine: pdflatex
fontfamily: mathpazo
fontsize: 11pt
# spacing: double
endnote: no
---
Run Code Online (Sandbox Code Playgroud)
---
title: "Prof. Jones \nDepartment \nUniversity \nState \nEmail"
output: pdf_document
editor_options:
chunk_output_type: console
header-includes:
- \usepackage{titling}
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \pretitle{\begin{flushright}\LARGE\includegraphics[width=8cm]{logo.jpg}\\[\bigskipamount]}
- \posttitle{\end{flushright}}
---
Run Code Online (Sandbox Code Playgroud)
将您的徽标添加到它所在的位置{logo.jpg},宽度也可能需要更改。
使用双空格并向标题\n添加换行符以创建地址的解决方法。
flushright然后将徽标和标题右对齐。
| 归档时间: |
|
| 查看次数: |
507 次 |
| 最近记录: |