Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the [named] model explicitly in LaTeX commands #5

Open
bpj opened this issue Mar 30, 2021 · 0 comments
Open

Include the [named] model explicitly in LaTeX commands #5

bpj opened this issue Mar 30, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@bpj
Copy link
Owner

bpj commented Mar 30, 2021

The \fcolorbox command of xcolor has a nasty "feature":

If only the first optional argument is given, it specifies the color model for both colors.

which means that the LaTeX markup as currently produced by this filter causes a "missing number" error! The "named" model has to be included explicitly:

% These are equivalent:
\fcolorbox[HTML]{framecolor}{boxcolor}{text}
\fcolorbox[HTML]{framecolor}[HTML]{boxcolor}{text}

% FIXME so this (as currently generated BREAKS:
\fcolorbox[HTML]{FF0000}{yellow}{text}

% and has to be replaced by this, which WORKS
\fcolorbox[HTML]{FF0000}[named]{yellow}{text}

Although this is a bit of overkill I will change the filter to always include [named] before a named color both to keep the filter code simple and to be safe.

@bpj bpj added the bug Something isn't working label Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant