标题无法在我的R Markdown文件中工作

发布于 2025-01-27 22:13:38 字数 198 浏览 3 评论 0原文

我最近完成了R笔记本,并一旦决定编织Markdown文件就注意到了一些事情。没有一个标题或项目符号可以工作!由于我有Mac,我必须安装Xquartz才能完成编织Markdown文件。这是正常的事情还是我可以解决这个问题?

“在此处输入图像说明”

I recently finished my R notebook, and noticed something once I decided to knit the markdown file. None of the headings or bullet points were working! I had to install XQuartz to finish knitting the markdown file since I have a mac. Is this something that's normal or can I fix this?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清醇 2025-02-03 22:13:38

我还没有看到您的RmarkDown,但我怀疑您需要在每个标题上方添加一条空白。例如,在列表之后(或任何其他结构)之后立即将标题放置有时会导致问题:

1. First item
2. Second item
3. Third item
# First level heading

但是,在每个标题之前添加空白行通常可以解决问题:

1. First item
2. Second item
3. Third item

# First level heading

I haven't seen your rmarkdown, but I suspect that you need to add a blank line above each heading. For example, putting a heading right after a list (or any other structure) sometimes results in problems:

1. First item
2. Second item
3. Third item
# First level heading

However, adding a blank line before each heading usually fixes the problem:

1. First item
2. Second item
3. Third item

# First level heading
子栖 2025-02-03 22:13:38

您的标题不起作用,因为您没有在“#”和下一个角色之间留出空间。

这是行不通的:

##Main Questions

相反,这样做:

## Main Questions

Your headings do not work because you didn't leave a space between "#" and the next character.

This will not work:

##Main Questions

Instead, do this:

## Main Questions
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文