如何解决R Markdown-PDF中的参考章节编号
我正在R Studio中使用R Markdown,并且有很多部分。我正尝试使用自定义的章节参考标签来参考章节编号,如此处记录的https://ulyngs.github.io/oxforddown/cites-and-refs.html,但它似乎无法正常工作。
以下是一些示例代码:
Some paragraph text here
## Obtain Projected {#Projections}
Another paragraph with a reference to Section Number \@ref(Projections).
我希望第二段显示为:
“另一段引用了第3.1节。”例如。
我相关的YAML标头是:
header-includes: |
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\def\tightlist{}
\setlength\parindent{24pt}
output: rticles::tf_article
有人知道我如何使它工作吗?
解决方法
发布后不久我就知道了,很抱歉发布我自己的答案。我只需要在我的YAML部分添加bookdown
:
---
header-includes: |
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\def\tightlist{}
\setlength\parindent{24pt}
output:
bookdown::pdf_book:
base_format: rticles::tf_article
---
然后可行:
此处有一些段落文字
## Obtain Projected {#Projections}
Another paragraph with a reference to Section Number \@ref(Projections).
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。