Wandmalfarbe / pandoc-latex-template

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

urlcolor RGB Support #299

Closed aress31 closed 1 year ago

aress31 commented 1 year ago

I do not understand why rgb is not supported for the urlcolor option. Trying to set a custom color using:

urlcolor: "FDBDA4"

But getting error:

Error producing PDF.
! Package xcolor Error: Undefined color `FDBDA4'.

Any help will be welcome!

EDIT: Tried as a workaround to define a custom colour and then set it as follows:


titlepage-text-color: "offWhite"

header-includes:
  - \definecolor{offWhite}{HTML}{EEEEEE}

But still getting an error...

Wandmalfarbe commented 1 year ago

The options linkcolor, filecolor, citecolor and urlcolor and toccolor are passed directly to hyperref, so they need to use color names from the xcolor package, as mentioned in the pandoc manual. Hex color values are not supported at the moment.

The following color sets from xcolor are supported in Eisvogel:

For a full list of all the available colors, please refer to the xcolor documentation at http://mirrors.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf (Section 4, 'Colors by Name').

All additional color related options from the Eisvogel template use hex color values like FDBDA4 because they allow for a more fine-grained control over the color. I also believe that users are more familiar with hex values (from HTML/CSS for example) than the limited list of xcolor names.

I think it is worth it to propose a change in the default template to use hex color values for the default template.