From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33094 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "John Gabriele" Newsgroups: gmane.text.pandoc Subject: Re: custom color for highlight Date: Thu, 07 Sep 2023 20:48:10 -0400 Message-ID: <4b40af67-3245-4d6f-8997-fa863cf17219@app.fastmail.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=5cf609ee70fe4f42a6afc8a68cef70af Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39235"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-711-g440737448e-fm-20230828.001-g44073744 To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDAMTAXN2AJRBYW65GTQMGQEY4MEC4Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Sep 08 02:48:42 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f190.google.com ([209.85.208.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qePfs-000A0X-AF for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 08 Sep 2023 02:48:40 +0200 Original-Received: by mail-lj1-f190.google.com with SMTP id 38308e7fff4ca-2bbbaa6001dsf16901181fa.3 for ; Thu, 07 Sep 2023 17:48:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694134119; cv=pass; d=google.com; s=arc-20160816; b=gcgjWqLcVo3R+Ws0UMLola46yJvp4jRfS8engan9Yz5tgxGh8n1RSEG8uFH2AJa4Wb lYX1TWAIKjYREs88W91g0ZRKTOXMSXSj/x61ISmGyHK0QXb8eI1oicZ1bkEQnwxtCM9D KkHl+/jIY2wf7MvdxhTF5MjE1zMR4Rme0q1qfpfh+ISgfEoLaWfKerrbDZPhGtOJjHxd nOzbR5QBs0B+Aj8ndgpSDeSCAcLF2A1QULwUfSAtQJBAYnRVhHoJATr42uRyek/dEjMc jkhrYeBNkjWuYGgb10glu0l+JcwAn750Y6P1XIMdNtZVJNLwUPujGBHt9fgs4HaT4NUF s1vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:subject:to:from:date :references:in-reply-to:message-id:mime-version:user-agent :feedback-id:sender:dkim-signature; bh=NenXTLu8P8nPjLb7ic60UK6Cm1rcszx/Z5LHGNeIu6g=; fh=4cPfTtzleA5nPUC1EQtk197aIUeaT1ew1v/oILbLT2I=; b=LYINB8Qd8uz7S4DgK2ddgHUXTWbIhnUwbqVPLf6Ek8M/N34FytjIpJF8iX/yY0zPoL FQBTC4sVXsRVyWTKRDvoVTUYLwNIfruyV8FT8M3AtsBjtWBptwdUHHBw7xjx0NL7cPGA PZjm37/PJ2hVAxvt2QMSY02lzxKjLAzSv8Hl5j51oiJx/1GWE4G3fFb9bMYDKjI57N2D as6xfIM+N8gXmYARRJQn0Lppy5PDsE2qcbsHvXX9rVqWkSiGr7ofcACIK0ESHlru5t2o w16Y+eGf5zT2Mfx1W/Rswv+crfw575Y2yKZNauMKPuU5cHEpUT8Biu2Q6vDf7CCa/dZD JThA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=T4NSKqG6; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=1Dheow91; spf=pass (google.com: domain of jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.24 as permitted sender) smtp.mailfrom=jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.fm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1694134119; x=1694738919; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:subject:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=NenXTLu8P8nPjLb7ic60UK6Cm1rcszx/Z5LHGNeIu6g=; b=MXwxTZBApKVtwjS9gtQwm+NbAnlnPbE5nYQimqcxpNrEaGhXxOVu/Oca1jRCgh3Ecx jSIch2miON1xk9gw1awy53RLVBDmY0lmJ7KY3jO9wHp8fgQfH8YIrmxBnd8MN4mN4As1 +4sSanNCwWPpt05jkviXvZi4KJWgNCIrr3kp4+uiPEtmxrtG5TU3vcGJUyPxl6q5bWnt rHBNCfSIh9eLgNNyFUvKonKfnbkPJY3Gb7DtIFQrTbd3jbL20SjLJoRN8uJTYEaRQXSj H4Ekv1gOB1qR0QKBFnmiaIXa57Hz5 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694134119; x=1694738919; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:subject:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=NenXTLu8P8nPjLb7ic60UK6Cm1rcszx/Z5LHGNeIu6g=; b=XcnJk1yE5i5kDHIy18bolMHmWunfMlbeXH2ikqEe0LYOH8y3aaLvESSKL3+N1Ek8XB T9uXPlYwY8pCmneNNhabNn5+hntbdPRAXBBGqIDrzNMmy41y0LMMW0gGru0RhU3t0M9i IkJeVr78Ywkw5/R5x9UzmZXmIrAbslOuXkr64tHLmqtcbqhdPVY7MjwdxVRI4+gXAVJY NG1t/gZ9+JWu69gu8G9ZpEbn62pbprUitTWRlF0EkhjlVayOOHJfcw1DbslJR Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0Yz7gEvfzSYVmQJsgwyMyn+O4TYnmaB4OKyBqKWQ56G1cP2TE4B+ 1ovWGnuup827hOAwHkbsB0I= X-Google-Smtp-Source: AGHT+IFJKay5+WuI0uuaBJB/vY3qYC+UZK0ITXd2v8nwJgREtq7jsHvvnkTf0H93LYBOafxEJgTTOA== X-Received: by 2002:a05:6512:3f12:b0:500:ae85:726a with SMTP id y18-20020a0565123f1200b00500ae85726amr760083lfa.50.1694134119172; Thu, 07 Sep 2023 17:48:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aa7:d352:0:b0:525:7601:f44f with SMTP id m18-20020aa7d352000000b005257601f44fls190997edr.0.-pod-prod-03-eu; Thu, 07 Sep 2023 17:48:33 -0700 (PDT) X-Received: by 2002:aa7:d6c8:0:b0:526:9626:e37d with SMTP id x8-20020aa7d6c8000000b005269626e37dmr708055edr.37.1694134113530; Thu, 07 Sep 2023 17:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694134113; cv=none; d=google.com; s=arc-20160816; b=XDkhuGvRN43PYkmRNcIOZWOiRnRPNlb0BnnJFHD2oSvV/j3VashXg+nLdtTQxqxOir qBmblmBMy2s8+YDgVLOopwdEm0s3UVJSNjmowIVKBMkfD2tIlwSqAiS1XpuozkhYbaIm zGQbMWMDCfyaWO7PxiyNjzr98lhf2sclGvxvKf0DIjS9iVgzhrk1EptoZ9RdxD49bNgG AVvs4AiCsNMVgqmAOo6WCPf/Bam0CT3qLslBIkRv5Sk+XonDZ+s/MMAKOUfLmQq3bCau iC3w3aRUjMerbpBvwFD99F85lYoyN9qfp+oeVU5u0WZf5CEU3VecEtOqM8hmsxu9mwN+ o6EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:to:from:date:references:in-reply-to:message-id:mime-version :user-agent:feedback-id:dkim-signature:dkim-signature; bh=Ak7xRv3HLHlNJRAV2ROfMUZXrfXi7cFOkquTMrS6K3U=; fh=4cPfTtzleA5nPUC1EQtk197aIUeaT1ew1v/oILbLT2I=; b=Qjch2irkZO+6TgIvP8N8QcjUZpH95DLEobL9CKtMbrcYkgoDlwK32o3zRYShFWUzf3 3F/3EsXk/xyUB2qf2DOFoZpujD6KKGFZaRXn6ZinMjMm1QPvpUHHwp8dYqO00TDfX6/j yiUuCNT37B9CsfxwqrzZbLpUSceHSyhO4l6r/93NEeSwSAW0ahBZGUO8eNVVwMbF+er3 ZWTBLGE3DRlokxVQxoVasQ10Sr5SBqJ+G7UEqjmv5UmvUPn9vpkQjMoCxtrqWZMVA+ZH lOCWg66OJ/IRaH4K6JdgScx1isgyJzkn5/hYAkzww/a7+VmRGNR1EttVnKnun4RFnjOo mTbg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=T4NSKqG6; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=1Dheow91; spf=pass (google.com: domain of jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.24 as permitted sender) smtp.mailfrom=jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.fm Original-Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com. [64.147.123.24]) by gmr-mx.google.com with ESMTPS id p29-20020a056402501d00b0052c584e82aasi65222eda.1.2023.09.07.17.48.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 17:48:33 -0700 (PDT) Received-SPF: pass (google.com: domain of jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.24 as permitted sender) client-ip=64.147.123.24; Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id C1D8032008C3 for ; Thu, 7 Sep 2023 20:48:31 -0400 (EDT) Original-Received: from imap46 ([10.202.2.96]) by compute1.internal (MEProxy); Thu, 07 Sep 2023 20:48:31 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehiedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgoufhushhpvggtthffohhmrghinhculdegledmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreerjeenucfhrhhomhepfdflohhh nhcuifgrsghrihgvlhgvfdcuoehjghgrsghrihgvlhgvsehfrghsthhmrghilhdrfhhmqe enucggtffrrghtthgvrhhnpeevteffgeeigeelvddvveeiledvhfduteevleevgfethffh fedukeeuleevfefgheenucffohhmrghinhepghhithhhuhgsrdgtohhmpdiffedrohhrgh dptghtrghnrdhorhhgpdhgohhoghhlvgdrtghomhenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehjghgrsghrihgvlhgvsehfrghsthhmrghilh drfhhm X-ME-Proxy: Feedback-ID: ifd0840a3:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0F3DE2A20085; Thu, 7 Sep 2023 20:48:31 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: X-Original-Sender: jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=T4NSKqG6; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=1Dheow91; spf=pass (google.com: domain of jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.24 as permitted sender) smtp.mailfrom=jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.fm Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33094 Archived-At: --5cf609ee70fe4f42a6afc8a68cef70af Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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://githu= b.com/chdemko/pandoc-latex-color >=20 > Le mardi 1 ao=C3=BBt 2023 =C3=A0 14:45:44 UTC+2, BPJ a =C3=A9crit : >> Den m=C3=A5n 31 juli 2023 05:02Sylvain Hubert skrev= : >>> We can highlight text with {.mark} >>>=20 >>> pandoc -o main.docx <<<'aaa [bbb]{.mark} ccc' >>>=20 >>> but it's always in light yellow. Can we customize the color? >>=20 >> 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: >>=20 >> ``````css >> mark { color: COLOR } >> `````` >>=20 >> where COLOR is a CSS color code like `#00ff00` or any CSS color name >>=20 >> https://www.w3.org/wiki/CSS/Properties/color/keywords >>=20 >> In LaTeX since it uses the `\hl` command from the soul package you can = use the `\sethlcolor{COLORNAME}` somewhere early, preferably in the preambl= e, but a raw latex block at the top of the document will probably do. >> Since the default latex template loads xcolor with the `dvipsnames`, `sv= gnames` and `x11names` named color sets COLORNAME can be any color from tho= se sets as shown in section 4 of the xcolor manual >>=20 >> http://mirrors.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf >>=20 >> (I *think* x11names wins where it and svgnames differ, but those differe= nces are fairly minor.) >>=20 >> I'm not sure how to do it in other formats, but those two at least will = cover most to-PDF use cases. >>=20 >>>=20 >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "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/ms= gid/pandoc-discuss/e0ab28c3-471e-4bc7-9957-c5660ea1a20cn%40googlegroups.com= . >=20 >=20 > --=20 > 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/msgi= d/pandoc-discuss/d7e5fe3f-fa66-490f-852d-262a91547971n%40googlegroups.com <= https://groups.google.com/d/msgid/pandoc-discuss/d7e5fe3f-fa66-490f-852d-26= 2a91547971n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter>. --=20 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 e= mail 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. --5cf609ee70fe4f42a6afc8a68cef70af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for this, Christophe! Interested to try this out!
<= div style=3D"font-family:Arial;">


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
<= br>
Le mardi 1 ao=C3=BBt 2023 =C3=A0 14:45:44 UTC+2, BPJ a =C3=A9crit&nbs= p;:
Den m=C3=A5n 31 juli 2023 05:02Sylvain Hubert <champ...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
We can = highlight text with {.mark}

    pand= oc -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:<= br>

``````css
<= div dir=3D"auto">mark { color: COLOR }
``````

where COLOR is a CSS c= olor code like `#00ff00` or any CSS color name
<= br>

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


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

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


--
You recei= ved this message because you are subscribed to the Google Groups "pandoc-di= scuss" group.
To unsubscribe from this group and stop receiv= ing 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 "pan= doc-discuss" group.
To unsubscribe from this group and stop = receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<= /a>.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-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.co= m.
--5cf609ee70fe4f42a6afc8a68cef70af--