Internal link anchor in Rmd pdf is not working for text

Viewed 61

Is there any way for me to add the anchor in text? If I use the heading, it works fine, but when I try to use in text, it doesn't work. You can see right at step 1 Step 1: Somthing is here {#step1}. Any idea?

---
title: "test"
output: pdf_document
header-includes:
- \usepackage{hyperref}
- \hypersetup{colorlinks=true,linkcolor=red,allcolors=blue,citecolor=blue,urlcolor=blue}

---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
## Heading is working {#work}

| This is the internal [heading anchor](#work)
| Step 1: Somthing is here {#step1}
| Step 2: Something is here
|         a) It's from [step 1](#step1)

enter image description here

0 Answers
Related