Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Rmarkdown中的文本块_Html_Css_R_Knitr_R Markdown - Fatal编程技术网

Html Rmarkdown中的文本块

Html Rmarkdown中的文本块,html,css,r,knitr,r-markdown,Html,Css,R,Knitr,R Markdown,我非常喜欢在代码块中使用文本块时的样子。我甚至喜欢包装文本着色的框的边框。我正在努力使用cat('someparation here',comment=NA)或someparation here正确包装文本。我注意到有很多关于\n策略或宽度选项的堆栈溢出问题。我还发现作者不建议使用cat,而是建议使用message或格式化作为块。看 下面是一个无法正确呈现的段落示例。 ```{r comment=NA} cat('Lorem ipsum dolor sit amet, consectetur a

我非常喜欢在代码块中使用文本块时的样子。我甚至喜欢包装文本着色的框的边框。我正在努力使用
cat('someparation here',comment=NA)
someparation here
正确包装文本。我注意到有很多关于
\n
策略或
宽度
选项的堆栈溢出问题。我还发现作者不建议使用
cat
,而是建议使用
message
或格式化作为块。看

下面是一个无法正确呈现的段落示例。

```{r comment=NA}
cat('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.')
```
我知道我要问的可能是
knitr
rmarkdown
不是为之设计的。但是,如果有使用css的实现(我不熟悉),那么应该如何编写这些
style.css

在这个例子中,它是这样的

```{block, type=FOO}
Your long text here
```
您必须包含
style.css

div.FOO {
  font-weight: bold;
  color: red;
}
(我的一点知识告诉我,它不是用来生成我想要的代码块的。)。您应该以某种方式将它们包含在YAML中


我找不到人们用这种方式格式化文本的style.css文件的示例我的问题是如何做到这一点?

听起来与之类似,因此您将使用类而不是类型。此外,您还需要指定类似“这是PDF输出的目标”。@hrbrmstr这不是PDF输出的目标,但非常需要一种同时适用于两者的方法