Is there any way to underline links with pandoc?


I get this

enter image description here

but I prefer __Geogebra__ (__ means underline)

  • 1
    Since pandoc is creating a beamer presentation which uses hyperref, you just need to pass the appropriate setup for hyperref to pandoc. See Underlined links with hyperref possible? for the hyperref solution.
    – Alan Munn
    Jul 13, 2016 at 15:54
  • In my case, beamer don't load hyperref: pandoc -D beamer | grep hyperr gives me: % avoid problems with \sout in headers with hyperref:. But else latex templates gives me \usepackage{hyperref} in the results of grep Jul 14, 2016 at 19:08
  • 1
    beamer loads hyperref itself, so you don't see it in the output of pandoc -D but it's definitely loaded.
    – Alan Munn
    Jul 14, 2016 at 19:13
  • So, where does it load the hyperref package? How can I modify it? Jul 15, 2016 at 11:49
  • Is there a solution for other output documents: like context or html? May 23, 2019 at 16:03

1 Answer 1


The following document, when converted with pandoc generated underlined links in the resultant PDF. However, as noted in the comments to the linked question here Underlined links with hyperref possible? not all viewers can display the underlined links properly. On my machine (a Mac) only Adobe Reader displays the underlining correctly; both Skim and Preview show a box around the link instead of underlining.

Markdown document

    - \hypersetup{colorlinks=false,
              allbordercolors={0 0 0},
              pdfborderstyle={/S/U/W 1}}
  ## A frame title
  * A list
  * A list
  * [A list with a link](http://tex.stackexchange.com)

Output PDF (Acrobat)

Acrobat Reader image of output

  • 1
    I want to include this code in my beamer template which I get from pandoc -D beamer. How can I include in my beamer template if beamer templates does not include usepackage{hyperref}? I want permanent solution Jul 15, 2016 at 11:52
  • Just add them as you would any other LaTeX code to the template. Since beamer loads hyperref your beamer template will "understand" the \hypersetup command as it does in this document.
    – Alan Munn
    Jul 15, 2016 at 12:15
  • I wanted to underline links in a straight Markdown to PDF pandoc conversion, and including this header worked. Jun 29, 2018 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .