What are the pandoc command line options to color and underline hyperlinks in PDF output?

What are the pandoc command line options to color and underline hyperlinks in PDF output?

Basically the title question -- I want the links in my pdf document to be blue and underlined (instead of hidden).

答案1

A half solution, which colors the links is:

pandoc -o output.pdf --variable colorlinks=true input.md

答案2

The full solution involves setting the underline in the markdown file

[[Link text]{.underline}](http://www.google.com)

as per the 8.12.6 in the documentation. Note I had to install ulem.sty from CTAN. The span based approach might work too, didn't test it.

Then include the --variable colorlinks=true in the pandoc command:

pandoc -o output.pdf --variable colorlinks=true input.md

相关内容