13

In creating a Rmd file I included an internal hyperlink:

   [hlink](#id1)  

and then further on an anchor

<a id="id1"></a> . 

When I then use Knit HTML (in RStudio) everything works fine and the internal hyperlink works fine but I also get an unwanted �

<p><a id="id1"></a>�</p>

How can I avoid getting this error?

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
adam.888
  • 7,686
  • 17
  • 70
  • 105
  • Need a reproducible example as I can't reproduce this with RStudio 0.97.99, knitr .7, and markdown 0.5.2. Care to provide your RStudio ver and sessionInfo() output? – Thell Sep 02 '12 at 17:58
  • 1
    Linked to http://stackoverflow.com/questions/2822089/how-to-link-to-part-of-the-same-document-in-markdown and https://support.rstudio.com/hc/communities/public/questions/200842153-Anchor-all-headers-in-Rmd-and-or-automatic-tables-of-content – Etienne Low-Décarie Mar 07 '14 at 16:47

1 Answers1

7

I was just looking for a solution to produce a table of content and came across your question.

The above example works perfectly fine. No unwanted side effects.

My session info: R version 2.15.3 (2013-03-01) knitr_1.1

Just wanted to mention that, incase somebody else comes across this question.

tim
  • 427
  • 1
  • 6
  • 10