From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25128 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "R. Wils" Newsgroups: gmane.text.pandoc Subject: Re: Colored text in PDF Date: Wed, 6 May 2020 03:24:22 -0700 (PDT) Message-ID: References: <5f7aae6a-8087-439d-874b-dcf547dd10b1@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_996_2136867785.1588760662885" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="3655"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCUYVKWP6AMBBV5AZL2QKGQEVNSVM3Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 06 12:24:26 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f185.google.com ([209.85.167.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jWHE2-0000rH-Ai for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 06 May 2020 12:24:26 +0200 Original-Received: by mail-oi1-f185.google.com with SMTP id h4sf1182851oie.2 for ; Wed, 06 May 2020 03:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=5ut1aG1YW3gR88jkOW8EIpXLTBpW/KS2u9GNV37qGuQ=; b=S4HPU4RIUogRvfEj2Vl+gRI/drtNwi6LaxY2bYQYizrFQp9tA8ICVKFKiM6RATH1xq xPQ7OOQu74utKVZq8GbJhlnZkE/hEa6EiSN3ip9PUAWyy8B1CH7zNdMwcVn4p+Z42PlX n1E77EXK/roUIXYclkSDKht8sN4/+vpKItUGQffj5vV8YvzJFUeiTGjn1q7i0xqHE8yv /6hJqHMR8PXrYVINoT6U9tjwzwI4COewRnORrbLJ1uufxtOBv6WT2WuiWaB5TZaXxof0 u9W/MN8BY4ycV9vYeWMIuNBsnVQB/g0WocsGkXLfAGzw00IQd2orgO0AYKfmzc1HZlHJ jE8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=5ut1aG1YW3gR88jkOW8EIpXLTBpW/KS2u9GNV37qGuQ=; b=G7NeVWJjc+pRng5g/eQQl1SD3EWlwrUCLxsVbG+yWo9ifK1m0IqDlG1Agctoo3t6bd ygBg9UZVWtVK/U+P66ZZ1eyxscGWBgmShcDExMX2rUGn3Ov9sHwKOtzE65h4i2AzIAiD uhobHpiiLl8eQ54471ehZgUWrQj141DB6q5DaTRexqZ9LqZCbF0rifjsck/OzyxBlzYc rxZwZo7H++qvlrrhTE6scSOLEYeWtpPdtKMH/MbltUal6tVLt36F71OdMK0LrZxnTieJ OJpSN1064yY+3WfdGehdC4hD0dZgOlqd/iIk6zE9LniHaQugl30ELZ/AmWlBF00vsgk6 3mxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=5ut1aG1YW3gR88jkOW8EIpXLTBpW/KS2u9GNV37qGuQ=; b=gmn/RadX1BOLGn25W8XOFQ6nNEf1NzAuhJStxwT/FpKPJ66MVM45VRql52jldSy5Rk Z/bN6eLZO79fERiqU0CuE5GsSBgM34lFDyPznIjsdjSTJBxy03QvFCW+ECg+paVaHU0e aAfZABENaelfy/u1US2qxTv7QCJDdtFMbApRUn2M5TKpDjkSCBT1ZEsStToa/w29/hgk 25n4u86CZ1/HW+AhUYqgLXvhEFx/zIgCsmK6DQ0939ZrWvZzpbUN0mIzfY++UnXEz29A 04pcoEt7Y34HmW2yDc4iCM3bxQ/by6RWzybwgmrrBq7PaMwNiR++c3F5kSRe3XquClvd zjhA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AGi0Pub8jKh/G1TX4P218A094+t08+UBAdbssq3cLRcfRrEB+7sl2Oft govzdBkyM0d84Zo2fKIpsPg= X-Google-Smtp-Source: APiQypL05ANbGibidA1RBIM4xzyvVAtx7yhw+AI3QABx2YTUwAS0k4sEcsBVUiobFJKIlIBixO7/TQ== X-Received: by 2002:a9d:2f48:: with SMTP id h66mr5484772otb.252.1588760665331; Wed, 06 May 2020 03:24:25 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:c648:: with SMTP id w69ls397500oif.7.gmail; Wed, 06 May 2020 03:24:23 -0700 (PDT) X-Received: by 2002:a54:4396:: with SMTP id u22mr1019784oiv.154.1588760663329; Wed, 06 May 2020 03:24:23 -0700 (PDT) In-Reply-To: <5f7aae6a-8087-439d-874b-dcf547dd10b1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: raiwil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:25128 Archived-At: ------=_Part_996_2136867785.1588760662885 Content-Type: multipart/alternative; boundary="----=_Part_997_1128085576.1588760662885" ------=_Part_997_1128085576.1588760662885 Content-Type: text/plain; charset="UTF-8" Thanks Albert, Yes it works. function Span(el) if FORMAT == "latex" and el.attributes.color then return { pandoc.RawInline("latex", "\\textcolor{" .. el.attributes.color .. "}"), el } elseif FORMAT == "latex" and el.attributes['text-decoration'] then return { pandoc.RawInline("latex", "\\underline{" .. el.attributes['text-decoration'] .. "}"), el } end end But something is strange: Input: [this is my text]{color=red} [this is my text]{text-decoration=underline} Output: this is my text *underline*this is my text It underlines the word underline! Is my input wrong? On Tuesday, May 5, 2020 at 4:36:51 PM UTC+2, R. Wils wrote: > > Does anyone know how to color text in a PDF > (converting from a pandoc.markdown text file)? > > I tried to use a span and div tag without success. > > (Sorry I'm a new pandoc user) > > -- 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/d3523f75-4ff6-455f-a5f7-d177cf048486%40googlegroups.com. ------=_Part_997_1128085576.1588760662885 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Albert,

Yes it works.=

function Span(el)
=C2=A0 if FORMAT =3D=3D &quo= t;latex" and el.attributes.color then
=C2=A0=C2=A0=C2=A0 return { p= andoc.RawInline("latex", "\\textcolor{" ..
=C2=A0 el= .attributes.color .. "}"), el }
=C2=A0 elseif FORMAT =3D=3D &q= uot;latex" and el.attributes['text-decoration'] then
=C2=A0= =C2=A0=C2=A0 return { pandoc.RawInline("latex", "\\underline= {" ..
=C2=A0 el.attributes['text-decoration'] .. "}&qu= ot;), el }
=C2=A0 end
end

But something= is strange:

Input:

[this= is my text]{color=3Dred}=C2=A0=C2=A0
[this is my text]{text-decoration= =3Dunderline}

Output:
this is my text
underlinethis = is my text

It underlines the word underline!
<= /div>
Is my input wrong?


On Tues= day, May 5, 2020 at 4:36:51 PM UTC+2, R. Wils wrote:
Does anyone know how to color t= ext in a PDF
(converting from a pandoc.markdown text file)?<= /div>

I tried to use a span an= d div tag without success.

(Sorry I'm a new pandoc user)

--
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/d3523f75-4ff6-455f-a5f7-d177cf048486%40googlegroups.co= m.
------=_Part_997_1128085576.1588760662885-- ------=_Part_996_2136867785.1588760662885--