2
我正在写一些课程材料使用Rmarkdown和tufte包。但是,我希望在文档中的一些R输出的宽度大于讲义的宽度(请参阅下面示例中的lm模型的摘要)。我无法设法使这些R输出占据页面的整个宽度(我想有一些类似于图的fig.fullwidth
块参数)。全R的结果与Rmarkdown/tufte_handout
我知道有一个fullwidth
环境,但具有这样的环境内A R大块它防止pandoc构建PDF由于R中输出(通过指定该块参数comment=NA
卸下这些散列的前前导散列产生一个pdf但R输出的格式会丢失)。
有没有办法让R输出的全宽?
感谢您的帮助。
下面是一个小例子,
---
title: "My minimal example"
link-citations: yes
output:
tufte::tufte_handout:
latex_engine: xelatex
---
```{r setup, include=FALSE}
library(tufte)
# invalidate cache when the tufte version changes
knitr::opts_chunk$set(tidy = FALSE, cache.extra =
packageVersion('tufte'))
options(htmltools.dir.version = FALSE)
```
This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
```{r lm}
model = lm(dist~speed,data=cars)
summary(model)
```
\begin{fullwidth}
This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph. This is a fullwidth. paragraph.
\end{fullwidth}