12

According to this answer, it should be possible to use the following syntax

[link](url){:target="_blank"}

to have links opening in a new tab when using pandoc.

However, it seems this option is not supported as the option is not recognized when converting to html.

I am using rmarkdown which relies on pandoc in the background.

Is it possible to do so using pandoc and if yes, how?

pat-s
  • 5,992
  • 1
  • 32
  • 60
  • This is the table describing what is available in various pandoc target outputs : https://github.com/jgm/pandoc/wiki/Tabular-overview%3A-Pandoc%27s-supported-Markdown-dialects-and-extensions-enabled-by-default ; you likely need to build a new doc type to handle what you need or just craft anchors the old-fashioned way. – hrbrmstr Jan 28 '18 at 14:26
  • If you need to do this globally for HTML output, have a look at my answer here: https://stackoverflow.com/a/71230269/42659 – Thomas Feb 23 '22 at 02:41

2 Answers2

20

Dropping the colon should be enough:

[link](https://example.org){target="_blank"}
tarleb
  • 19,863
  • 4
  • 51
  • 80
-3

Removing "underscore" before "blank"

[link](https://example.org){target="blank"}