nmfs-opensci / quarto_titlepages

A Quarto extension for making title and cover pages for PDF output.
https://nmfs-opensci.github.io/quarto_titlepages/
Creative Commons Zero v1.0 Universal
115 stars 20 forks source link

lua filter to convert colors to html #25

Closed eeholmes closed 1 year ago

eeholmes commented 1 year ago

use all the xcolor names and make a lookup table for the corresponding html codes. Then I can just use

\definecolor{name}{HTML}{...-color}

in tex code

$if(title-color)$\definecolor{title-color}{HTML}{title-color}$endif$

have these for all the possible color calls.

lua filter will have a for loop with all possible color calls. text against a color name and if it is one then replace with html code. if not a color name, print not a known color name. assuming its an html color code.

eeholmes commented 1 year ago

Don't do this. Just define colors in the header as needed.