public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: custom color for highlight
Date: Tue, 1 Aug 2023 14:45:31 +0200	[thread overview]
Message-ID: <CADAJKhAWyEmosxMExPeAhCSub+UsX2kJ0gWVH0zvY+0jb42ZKw@mail.gmail.com> (raw)
In-Reply-To: <e0ab28c3-471e-4bc7-9957-c5660ea1a20cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

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

  parent reply	other threads:[~2023-08-01 12:45 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 [this message]
     [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

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=CADAJKhAWyEmosxMExPeAhCSub+UsX2kJ0gWVH0zvY+0jb42ZKw@mail.gmail.com \
    --to=melroch-re5jqeeqqe8avxtiumwx3w@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).