public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* custom color for highlight
@ 2023-07-31  3:01 Sylvain Hubert
       [not found] ` <e0ab28c3-471e-4bc7-9957-c5660ea1a20cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sylvain Hubert @ 2023-07-31  3:01 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]

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?

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 913 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom color for highlight
       [not found] ` <e0ab28c3-471e-4bc7-9957-c5660ea1a20cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-01 12:45   ` BPJ
       [not found]     ` <CADAJKhAWyEmosxMExPeAhCSub+UsX2kJ0gWVH0zvY+0jb42ZKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: BPJ @ 2023-08-01 12:45 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]

Den mån 31 juli 2023 05:02Sylvain Hubert <champignoom-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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAWyEmosxMExPeAhCSub%2BUsX2kJ0gWVH0zvY%2B0jb42ZKw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3908 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom color for highlight
       [not found]     ` <CADAJKhAWyEmosxMExPeAhCSub+UsX2kJ0gWVH0zvY+0jb42ZKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2023-08-01 17:55       ` Christophe Demko
       [not found]         ` <d7e5fe3f-fa66-490f-852d-262a91547971n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Christophe Demko @ 2023-08-01 17:55 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2507 bytes --]

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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.

[-- Attachment #1.2: Type: text/html, Size: 4911 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom color for highlight
       [not found]         ` <d7e5fe3f-fa66-490f-852d-262a91547971n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-09-08  0:48           ` John Gabriele
  0 siblings, 0 replies; 4+ messages in thread
From: John Gabriele @ 2023-09-08  0:48 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 3190 bytes --]

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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com <https://groups.google.com/d/msgid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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 <https://groups.google.com/d/msgid/pandoc-discuss/d7e5fe3f-fa66-490f-852d-262a91547971n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.

[-- Attachment #2: Type: text/html, Size: 5864 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-08  0:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-31  3:01 custom color for highlight Sylvain Hubert
     [not found] ` <e0ab28c3-471e-4bc7-9957-c5660ea1a20cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-01 12:45   ` BPJ
     [not found]     ` <CADAJKhAWyEmosxMExPeAhCSub+UsX2kJ0gWVH0zvY+0jb42ZKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-08-01 17:55       ` Christophe Demko
     [not found]         ` <d7e5fe3f-fa66-490f-852d-262a91547971n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-09-08  0:48           ` John Gabriele

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).