pandoc: Open link in new tab
Asked Answered
D

2

13

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?

Dishearten answered 28/1, 2018 at 13:34 Comment(2)
This is the table describing what is available in various pandoc target outputs : github.com/jgm/pandoc/wiki/… ; you likely need to build a new doc type to handle what you need or just craft anchors the old-fashioned way.Clarino
If you need to do this globally for HTML output, have a look at my answer here: https://mcmap.net/q/53877/-can-i-create-links-with-39-target-quot-_blank-quot-39-in-markdownIrrespective
H
20

Dropping the colon should be enough:

[link](https://example.org){target="_blank"}
Hautrhin answered 28/1, 2018 at 14:58 Comment(0)
G
-3

Removing "underscore" before "blank"

[link](https://example.org){target="blank"}
Gord answered 21/4, 2020 at 3:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.