Utopi
a

rmarkdown

Beamer Header

--- title: "$1" subtitle: '$2' author: Gao chenzghi institute: AHAU date: $3 output: beamer_presentation: theme: "AnnArbor" includes: in_header: 1header.tex # keep_tex: yes latex_engine: xelatex colortheme: "dolphin" fonttheme: "structurebold" ---

Latex article

--- title: "How to read the book" author: John Doe date: March 22, 2005 output: pdf_document: toc: true number_sections: true includes: in_header: header.tex # keep_tex: yes latex_engine: xelatex fig_width: 7 fig_height: 6 fig_caption: true highlight: tango # citation_package: biblatex keep_tex: true # template: quarterly-report.tex ---

Header

Just type

rmd

\usepackage{ctex} \usepackage[BoldFont,SlantFont,CJKsetspaces,CJKchecksingle]{xeCJK} \setCJKmainfont[BoldFont=SimSun]{Microsoft YaHei} %我是雅黑控 \setCJKmonofont{SimSun}% 设置缺省中文字体 \parindent 2em %段首缩进

Pic

![图片alt](图片地址 ''图片title'')