Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.09k stars 958 forks source link

URL colors #186

Open noraj opened 4 years ago

noraj commented 4 years ago

I don't know yet if it's a feature request or a question.

I saw (and tested) that it's already possible to specify a link color by adding urlcolor in the frontmatter. So the template already support it.

There is a default color when nothing is provided.

https://github.com/Wandmalfarbe/pandoc-latex-template/blob/7763e06771c4bacfcd0b041136127f16f826b78e/eisvogel.tex#L249

Else it's possible to specify a dvipsnames color in urlcolor to customize it.

https://github.com/Wandmalfarbe/pandoc-latex-template/blob/7763e06771c4bacfcd0b041136127f16f826b78e/eisvogel.tex#L276-L281

But as you can read on https://github.com/jgm/pandoc/issues/6109, pandoc had an issue for months (maybe years) where svgnames color and x11names color are said supported in theory but are not in reality.

But as you can see here (for dvipsnames & svgnames) or here (for x11names), dvipsnames is very limited where there are a lot more in the two others. But anyway having to rely on the 3 namign convention and remember them is a pain.

But when I saw

https://github.com/Wandmalfarbe/pandoc-latex-template/blob/7763e06771c4bacfcd0b041136127f16f826b78e/eisvogel.tex#L249

I noticed you defined the default color with the CSS color code.

So I was wondering if it was possible to create a wrapper like for title-color, allowing to use CSS color code to define URL colors.

https://github.com/Wandmalfarbe/pandoc-latex-template/blob/7763e06771c4bacfcd0b041136127f16f826b78e/eisvogel.tex#L867-L870

Also I don't know what colorlinks is expecting but I didn't managed to make it work, I have no error but the color I defined is always ignore.