public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "John Gabriele" <jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: custom color for highlight
Date: Thu, 07 Sep 2023 20:48:10 -0400	[thread overview]
Message-ID: <4b40af67-3245-4d6f-8997-fa863cf17219@app.fastmail.com> (raw)
In-Reply-To: <d7e5fe3f-fa66-490f-852d-262a91547971n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- 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 --]

      parent reply	other threads:[~2023-09-08  0:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31  3:01 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b40af67-3245-4d6f-8997-fa863cf17219@app.fastmail.com \
    --to=jgabriele-97jfqw80gc6171pxa8y+qa@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).