- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有没有一种方法可以使用 rmarkdown 创建一个输出,该输出只有两列用于页面的部分?也就是说,我想要一个标题和一些横跨整个页面的文本,但数字仍以列格式保留。考虑下面的示例,其中列设置为 2,但标题保留在那里。
我使用 \twocolumn
解决方案更接近这里,但随后创建了一个新的空白页面。
---
title: "twocol_test"
author: "test"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## This header should stretch across the whole page
Then this text should also not be in a column. But then the figures below should be organized into two columns:
\twocolumn
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
\onecolumn
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
更普遍的问题是如何将 pandoc arg 仅应用于 .Rmd
文件的一部分?
最佳答案
我无法完全弄清楚这一点,但发现了一些对我的目的有用的东西,它涉及将参数传递给跨越两列的标题。不完美,但这会起作用:
---
output:
pdf_document:
pandoc_args: [
"-V", "classoption=twocolumn"
]
params:
test:
value: test
set_title: test_title
---
---
title: `r params$set_title`
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
```{r}
plot(iris$Sepal.Length, iris$Sepal.Width)
```
关于r - 仅将 pandoc_args 应用于 rmarkdown 文档的一部分——例如两列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46227063/
我正在尝试使用此示例将 3 个文件编织在一起:http://rmarkdown.rstudio.com/rmarkdown_websites.html 我的文件都共享同一个目录,该目录已在 RStud
我正在将 Rmarkdown 与 python 一起使用。相当于R python的内联代码? 例如,在 https://rmarkdown.rstudio.com/lesson-4.html我可以 `
我正在用 Rmarkdown 编写一系列相互补充的报告。我想将上一份报告的结果包含在我目前正在处理的报告中。我看到其他问题建议使用 purl 从 Rmarkdown 文档中提取 R 代码然后运行它,所
我想演示如何编写 RMarkdown,其中所说的 RMarkdown 演示嵌入在用于创建类(class) Material 的 RMarkdown 文档中。在这个围栏代码块中,我不希望 knitr 执
我在 Amazon AWS EC-2(Amazon Linux AMI 2015.09.1 (HVM),SSD Volume Type - ami-60b6c60a)上安装了一个 Shiny 的服务器
我刚刚开始使用 rmarkdown、pandoc 和 knitr。我在尝试让 pandoc 获取比 rmarkdown 文档高一级的图像时遇到了很多困难。例如,考虑我们的项目目录是 ~/test,下面
我希望将 Bootstrap 导航栏(如此处所示:https://getbootstrap.com/docs/4.0/components/navbar/)添加到我正在创建的 R Markdown 模
我正在尝试通过 Rmarkdown 并排打印两个表格,输出为 PDF。 我可以很好地打印这些表格,但它们最终靠得很近,我找不到在它们之间创造更多空间的方法。我在其他帖子中找到的解决方案返回奇怪的输出或
我报告了一个问题 https://github.com/rstudio/rmarkdown/issues/967我想知道是否有解决方法(如何使其工作)? 下面的可重现示例(改变 n 和 nGroup
我正在将 Rmarkdown PDF 文档与以下 YAML 设置放在一起: --- output: pdf_document: fig_caption: true fig_crop
我有类似于以下的代码,它是动态生成并存储在变量中的: --- title: "test" author: "me" date: "3 June 2019" output: html_document
我经常编写可供技术人员和高管阅读的 Markdown 文档。 从这个意义上说,我想知道是否可以在 HTML 中创建一个按钮来隐藏或显示最终输出中的代码块? 目前,我正在创建两个单独的文件,我认为这是一
我正在使用 rmarkdown 在 RStudio 中进行投影仪演示。我想在演示文稿的顶部获得幻灯片代码。德累斯顿主题应该支持那些股票 Dresden 那么是否有可能通过使用 rmarkdown 来获
我有一个简单的问题。我如何使用 Rmarkdown/knitr 创建词汇表。我与 RStudio 合作。 我尝试这个但没有成功 \usepackage{glossaries} 在 header.tex
我有R包,它的功能之一-产生报告。在inst/markdown中,我有一个模板rep.rmd。在包函数ProduceReport()中,我有以下代码: render.file <-"rep.Rmd
嗨,我想在我的 Rmarkdown 文件的一侧添加一个页面导航。如果它看起来像侧边栏就好了 on this page . --- title: "My Title" author: "My Name"
当我为学生准备教程时,我需要一种方法来隐藏可折叠面板中的内容,这些面板可以通过单击按钮来显示。我已经使用下面的代码让它工作了。 RMarkdown 文件如下所示: --- title: Collaps
我最近开始使用 r-markdown使用来自 rticles 的便捷模板准备期刊文章.但是,我们最终使用 Word 而不是 LaTex 提交。合作者更喜欢 Word,目前,并非所有期刊都接受 LaTe
我有两个 RMarkdown 文件。 main.Rmd这是渲染的主文件 example.Rmd它包含更长的示例并在其他地方使用(因此它存在于自己的文档中)。 我想包括example.Rmd在 main
在我的 R 文件中,我有: library(rmarkdown) rmarkdown::render("C://Users//me//Desktop//test_param.Rmd",
我是一名优秀的程序员,十分优秀!