【发布时间】:2016-02-28 01:58:06
【问题描述】:
我使用 rmarkdown 来渲染 pdf 文档。现在我想在文本中添加内部链接。
在rmarkdown的帮助页面中,它说内部链接定义为:
See the [Introduction](#introduction).
当我使用例如接下来的代码应该有两个内部链接:link1 和link2。两者都不联系。有什么明显的我做错了吗?非常感谢!
---
title: "Test"
author: "test test"
output:
pdf_document:
latex_engine: xelatex
number_sections: yes
toc: yes
toc_depth: 3
html_document:
css: tables.css
number_sections: yes
theme: cerulean
toc: yes
toc_depth: 3
subtitle: test test test
mainfont: Calibri Light
fontsize: 12pt
header-includes:
- \usepackage[dutch]{babel}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyfoot[LE,RO]{this is a fancy foot}
- \usepackage{dcolumn}
- \usepackage{here}
- \usepackage{longtable}
- \usepackage{caption}
- \captionsetup{skip=2pt,labelsep=space,justification=justified,singlelinecheck=off}
---
# start
```{r results="asis",tidy=FALSE,eval=TRUE,echo=FALSE,message=FALSE, error=FALSE, warning=FALSE, comment = NA}
cat("click here: [link1](#test 1)")
```
click here: [link2](#test 1)
\pagebreak
#test 3
\pagebreak
#test 2
\pagebreak
#test 1
【问题讨论】:
-
对于未来的读者,this thread and answer 特别有用——它展示了如何在 pandoc 中使用显式引用
标签: r pdf-generation r-markdown