在一个编织者生成的PDF中,我希望在同一页上有一个横屏格式显示的图的部分标题。
如果我这么做
---
title: "Untitled"
output: pdf_document
date: '2022-06-21'
header-includes:
- \usepackage{pdflscape}
---
# Section title
\begin{landscape}
```{r pressure, out.extra= 'angle=0', echo = F}
plot(pressure)
\end{landscape}
该图显示在与“章节标题”不同的页面上,因为\开始{landscape}显然开始了一个新页面
但如果我这么做
title: "Untitled"
output: pdf_document
date: '2022-06-21'
header-includes:
- \usepackage{pdflscape}
\begin{landscape}
Section title
plot(pressure)
\end{landscape}
我收到错误消息
! You can't use `macro parameter character #' in vertical mode.
l.74 #
Section title
Error: LaTeX failed to compile sectionTitle.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See sectionTitle.log for more info.
Execution halted
编辑:这种语法,在节标题周围留下空行,不起作用
title: "Untitled"
output: pdf_document
date: '2022-06-21'
header-includes:
- \usepackage{pdflscape}
\begin{landscape}
Section title
plot(pressure)
\end{landscape}
1条答案
按热度按时间zvokhttg1#
只是引用一辉的评论链接到bookdown documentation,以表明它听起来很复杂,但真的很容易!
:::