RMarkdown 自动锚段 [英] RMarkdown automatic anchor-section

查看:25
本文介绍了RMarkdown 自动锚段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我已经使用 Markdown 一年了,今天突然之间,标题旁边自动添加了一个 a 标签.

Well, I've been working with Markdown for a year and today, suddenly, next to the headings an a tag has been automatically added.

有人会知道为什么会自动生成这些锚点以及我如何删除它们?

Someone would know why these anchors have been generated automatically and how I could remove them?

Pd:一种解决方法是使用 h1、h2 等,但是随着 pdf 输出的索引被消除,因此并不能真正解决问题.

Pd: one way to solve it is with h1,h2, etc., but then with the pdf output the index is eliminated, so it would not really solve the problem.

推荐答案

这是一个新功能 在 rmarkdown 2.5 中.

This is a new feature in rmarkdown 2.5.

您可以在 rmd 文件顶部的 YAML 标头中更改此设置:

You can change this in your YAML header at the top of your rmd file:

  html_document:
    anchor_sections: false

这篇关于RMarkdown 自动锚段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆