Thanks for this, Christophe! Interested to try this out!



On Tue, Aug 1, 2023, at 1:55 PM, Christophe Demko wrote:
I have published the pandoc-latex-color filter for this use https://github.com/chdemko/pandoc-latex-color

Le mardi 1 août 2023 à 14:45:44 UTC+2, BPJ a écrit :
Den mån 31 juli 2023 05:02Sylvain Hubert <champ...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
We can highlight text with {.mark}

    pandoc -o main.docx <<<'aaa [bbb]{.mark} ccc'

but it's always in light yellow. Can we customize the color?

If I'm not mdepends on the output format. In HTML-based formats you can use custom CSS to style `mark` elements however you like:

``````css
mark { color: COLOR }
``````

where COLOR is a CSS color code like `#00ff00` or any CSS color name

https://www.w3.org/wiki/CSS/Properties/color/keywords

 In LaTeX since it uses the `\hl` command from the soul package you can use the `\sethlcolor{COLORNAME}` somewhere early, preferably in the preamble, but a raw latex block at the top of the document will probably do.
Since the default latex template loads xcolor with the `dvipsnames`, `svgnames` and `x11names` named color sets COLORNAME can be any color from those sets as shown in section 4 of the xcolor manual

http://mirrors.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf

(I *think* x11names wins where it and svgnames differ, but those differences are fairly minor.)

I'm not sure how to do it in other formats, but those two at least will cover most to-PDF use cases.


--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.


--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d7e5fe3f-fa66-490f-852d-262a91547971n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/4b40af67-3245-4d6f-8997-fa863cf17219%40app.fastmail.com.