gpt4 book ai didi

r - 阻止 Rmarkdown 中的列表

转载 作者:行者123 更新时间:2023-12-01 03:16:37 25 4
gpt4 key购买 nike

我在 Rmarkdown 工作并编织到 PDF。我想以 (a) 开始一个段落没有 创建一个列表。添加 \(a)有效,但它突出显示了我的 Rmd 文件文本的其余部分,使其难以阅读。是否有另一种方式表明我不想在 Rmarkdown 中创建列表?

enter image description here

enter image description here

---
title: "Untitled"
output:
pdf_document: default
html_document: default
---

This is the first paragraph.

```{r, include=FALSE}
1+1 # nice highlighting before problem
```

(a) This should be the second paragraph. (b) But it is interpreted as a list.

\(a) This slash works to keep the text as a paragraph, but it highlights all remaining text in my Rmd file, which makes it hard to read. (b) Is there another method to use (a) without creating a list?

Here is a good list, but still wrong color in Rmd:

(a) One
(b) Two

```{r, include=FALSE}
1+1 # bad highlighting after problem
```

最佳答案

尝试将 (a) 放入 <span>喜欢

<span> (a) </span> This should be the second paragraph.

它有点hacky但它​​适用于html和pdf并且它修复了突出显示问题。

关于r - 阻止 Rmarkdown 中的列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48445518/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com