我不知道如何使用 r 块在边距中插入图片。这是我在 Rmarkdown 中使用乳胶的文档,在左上边缘插入了公司徽标。
---
documentclass: ctexart
fontsize: 12pt
geometry: a4paper,left=2cm,right=2cm,top=2cm,bottom=3cm
pagesize: a4paper
output:
rticles::ctex:
fig_caption: yes
number_sections: yes
toc: no
mainfont: 更纱黑体 UI SC #LiberationSerif
sansfont: 更纱黑体 UI SC Xlight #LiberationSans
monofont: 等距更纱黑体 SC Light #LiberationMono
header-includes:
- \usepackage{fancyhdr} #load fancyhdr for page header or foot
- \usepackage{booktabs}
# - \usepackage{longtable}
- \usepackage{array}
- \usepackage{multirow}
- \usepackage{wrapfig}
- \usepackage{float}
- \usepackage{colortbl}
- \usepackage{pdflscape}
- \usepackage{tabu}
- \usepackage{threeparttable}
- \usepackage{threeparttablex}
- \usepackage[normalem]{ulem}
- \usepackage{makecell}
- \usepackage{xeCJK}
---
\addtolength{\headheight}{1.5cm}
\pagestyle{fancyplain}
\fancyhead[L]{\includegraphics[height=1.2cm]{cdmlogo.png}} # put the logo at top-left
\fancyhead[C]{打印日期\today}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r include=FALSE, label='oracle.connection'}
library(tidyverse)
library(ROracle)
library(kableExtra)