From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32818 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: H Newsgroups: gmane.text.pandoc Subject: Inserting attributes into elements Date: Wed, 14 Jun 2023 12:23:17 -0400 Message-ID: References: <76a72c07-6699-d243-ae20-64808682ec9e@meddatainc.com> <90C7A30F-C0FA-49D8-B0CD-6521B58113F1@meddatainc.com> <0a6aa41a-fe72-a1e8-2630-ec6070c0bbb3@meddatainc.com> <74253f39-02db-dc2e-2ae1-9d27aaab82ea@meddatainc.com> <61724767-ada0-133f-6751-5884c7460a25@meddatainc.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------4FEC85C50E1B1EC256171549" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26134"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCEIZSNSZ4IRB56SU6SAMGQELS5YGDQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 14 18:23:24 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f57.google.com ([209.85.161.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1q9THI-0006ej-33 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 14 Jun 2023 18:23:24 +0200 Original-Received: by mail-oo1-f57.google.com with SMTP id 006d021491bc7-55afacd3d2dsf725852eaf.0 for ; Wed, 14 Jun 2023 09:23:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686759803; cv=pass; d=google.com; s=arc-20160816; b=0bYhF1YEMDEOtkNHzmlDJS5tA0V0Rl1eBLHBmj73x+beNTmAxCIpI3CcM5fZ45W6Fx hBLFj14p/mnl5acWpAPIP+oNkEm9oJRzdeefIbw3XyLLfTfai9RX4AiSQwMM91dgJ3bl LOtqTnh6fek8BuWy+Sx6SSESVLYjkkKxObdeoGMukoMRM/zmEkjFlejQMa0ifrY/d14j ohjszGV9ZPdhjatHgHHnEI5ztQ6cYwMpXxdH6bw6AbVilOCpGo3RAPC45LxMonfjcrAL Y6BRKTbKAfmtgQfS93paQFrX61A1/UA19bwwcgEItrYKEKrT90Iz66+Z7TUw2i68QtR3 2Ftg== 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:ui-outboundreport :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:subject:from:sender:dkim-signature; bh=bnNz+WbupZyGWkXuzYxaDX5c/mIWQyX9g3OluVHQCc0=; b=bIMHFOVAOgyWyCXT7JH5H0oKf5v+I3STN7hRat4ToeRCR9ene/qmv6g0oAsHg92ATX vA2yc3EAJwYyPJecADY4XtcmxU809Sdbr4G2GCn6qP6PTYEiBqIiuN/s2J/aL7bY/V8R DywmMv629rjyjm51Q6WmXvwgZZRLqjKI3AkeVbNMOKIejtDiQm/tfLnwsGNL500DT2Vy hyeOnLdux34qHSjoCptLSP1sUtztXmoxdDZ3wjEc180mLxT6zy/6XqG3mgZjqNSFpNkN HisjNHtyfHIzaHGoOvpsaQdngBuaMq61t6gDk8JTMgH8yTpx9SMD2CpaseN0RhbwFAGC 9A5A== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) smtp.mailfrom=agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=meddatainc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1686759803; x=1689351803; 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 :ui-outboundreport:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:to:subject:from:sender:from :to:cc:subject:date:message-id:reply-to; bh=bnNz+WbupZyGWkXuzYxaDX5c/mIWQyX9g3OluVHQCc0=; b=cjllpXSFwt/vxtw4jDL6OCGFlOKQu30tXHDtD0Zo4HJlJ4JpDfM/NmugtBxPNafJ5T UNe22SsCIrJLr8sDacySWyHzOCF5aM33DpBD+ztgxL9Zt3Fzu5CAdXurGopSXjookqB2 74sYjdhCU5pgIVfVWOG6bUHXC1WSFlXyMFD1j8QShnB3CQcXszTHlPQ2NRqtnTZSnz76 7DCBLoaPTe5b7C2YVu69KOVDtd0pg3lGi2y6eDTCpUvPGKh8x4kcgOuhx2MqDY6VlYFS /Z7XrJoCHQyxtX1Ff X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686759803; x=1689351803; 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 :ui-outboundreport:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:to:subject:from:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=bnNz+WbupZyGWkXuzYxaDX5c/mIWQyX9g3OluVHQCc0=; b=Yq3z8fM1SkRxQj6JlxLW1lLZFUQBjI2SIKCcGu7z+7/+GK3PWyfB8AV6dCGA/X6HRY +lKTZ8P4m+RKyBY6+VyIwlInph1hOXMWnn7B1p8k9VOvvBkcrKuiqG9Y4SWiH4hgBJK9 tWzjNd6oOUyqK1uaKk3Ta1Em7GsU98CfqdvMjA63X7MH95rpw20bMdQKAdK8z2V0SFP6 1O+h/5peuHbYcjuTzcWK7Tk99w0O Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDy5A+5XgxdarpZPvzJy7C8B9XzjUZ1r91uGZQzt4CCDGyJfyE6i iPR/ZB0f0eoCdLCjT07MDUc= X-Google-Smtp-Source: ACHHUZ5IA/X1wDMi7qk0JzkFqPqF866J06Z+t2SKV1S3z6Uk20Kwzf9RrLJ7ICAacNtIuJi95x3ziA== X-Received: by 2002:a05:6358:6156:b0:12b:e105:ec2f with SMTP id 22-20020a056358615600b0012be105ec2fmr7066460rwt.26.1686759802614; Wed, 14 Jun 2023 09:23:22 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:2d3:0:b0:bd6:b3de:68b5 with SMTP id 202-20020a2502d3000000b00bd6b3de68b5ls2167330ybc.1.-pod-prod-09-us; Wed, 14 Jun 2023 09:23:19 -0700 (PDT) X-Received: by 2002:a0d:db49:0:b0:56d:4edb:39ba with SMTP id d70-20020a0ddb49000000b0056d4edb39bamr2132492ywe.33.1686759799206; Wed, 14 Jun 2023 09:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686759799; cv=none; d=google.com; s=arc-20160816; b=JukyCYWdT4CgVzFNCqOVXmM4QEtTvZCXJqqo7E8knIkedL+OxvJK2/U56S0mwnU/0f 5d9j7O41dycK5cFBYPUkFSoIOWa8EV2yRoCftGMawVVHiIEObZU46owYpdyEgV5T7xEu 5UzUDXr6T6QNfxTtDAxfZUnSKT/x504If6rMViufM7j+16Bnlukjr0YbfX/5XsUdb8p6 MCFOjaPBhtgEsEskZ0VOrPWQOpYjwFf51Z2Cmz8werhXjl2ruNVURnv71EH1AwvcvfKJ ib0NIyHQjKYcD2Fq1kFEv7lRLP5bgF02pIZuJHi8f15362B1zWZrdcXGw4y7/ryJlidy vaZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:to:subject:from; bh=iygnGdvUaw53TPoFBEXxN1eit+KN0oboBkrvxiCeDcA=; b=uRMIUcCj0NFlZzzs2NIZC+xgWp198tXAnayiZvakVLE3+7UGYG+CIeBsqoea5xdWzN 9cAxEaqVsAwYZw2qJEWadm/6028LqUY47yg9vqIY6+F0WXi1U1slGyvjuLVABRI2pflx 6Cpp+kVej6P44ONRhWcIe2sj8kzvKMapQ0WiHoJgXALIaJbG0RZJWNjh5OwecK1Lwjz9 29gTGLRmzo79YeO3EIpd1t7CU6Q8MRB2CpQsXCX3sEKhYqg8UapBLggVq74gM1fmWdCP vLHNxhYEZUoaEXaqt2uVUH0x2E76IHLxrd6mBjdKp15A4XzFNv/aw5hMrCPnMFodlkd0 XpCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) smtp.mailfrom=agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=meddatainc.com Original-Received: from mout.perfora.net (mout.perfora.net. [74.208.4.197]) by gmr-mx.google.com with ESMTPS id bc10-20020a05690c000a00b0056190301fb2si1006765ywb.1.2023.06.14.09.23.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 09:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) client-ip=74.208.4.197; Original-Received: from [192.168.1.17] ([72.94.51.172]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Lm2Pn-1pZrPT1129-00ZdyJ for ; Wed, 14 Jun 2023 18:23:18 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:qchLIGRGXycrPKWbGcSGHE6xmFAtvJb6qNC52bJuhp9eaGP7LHX LC6zr78NPOmIx6Yr6Knojv5vY8p4R+1CaVg2YGZ6VKxv54ogEUU63L+9jAvnuVPXfma1Tox +1mVmQTSWj5tCgSPAVnYDG+J1OuXnnl19dNDmow0guGsItP86zNA4cqhYKnI/3NAoYkTsr1 ZA8nngC7x90HdScE5lWuw== UI-OutboundReport: notjunk:1;M01:P0:yiOrseay2+I=;Umjo1/4anjljRwSH3MN5sV/3DvJ qn3hPLBYzvwnEFzoM8Tkt9sIk7Y92naPgBRae4qxvLDDTH6qGGljuPhf00yZZ0tFm5aVtmFpM fQWY2d4UG8g2Fof0SHOcVwe7+WU2nfKMbyxsLtcw2+DQI9tKsz4XvaEM56RV/VXeI/4uiumhM bJdjsFUepnN2+4cXp1sl4Guo7F6BsQpA1ApAo8wVWl1NtKVLR6fDxyla7t9WGFcza+BI/UXhp gR+e0sUFuCfHy70mAwJtGUM/OaaznE9GZYyLjHIrJrDRLc9POZEgTtPA9MMz+VIFR1wli88qL yyjIjNnadCk6yum+eVPYmKHGl5WtvO3TJss5iVnEd0kPe6IWVdcDb5cCb1Fv1Z6A9knqeAe3A 2+S2tSOrcSMdgBKss807nk67XNE5+A0jL2A3692fuQ3A6ZamnOP+aKxH8ULgOMqDqMIBgydBL RCU9zrBA1LUW7r2MBGBSB1R0ubXxtFxnRljuXJT1Hl5tH110aUu1i8gnn56wRRPRATwNRNmUj BkOGe8LQmTWeOeza9SQRBTcFtSDtMT8B7wM3CPh+t2wRy3yIa/JphK5xo2wCgdnRlnIhvYUJU QutHl4DYMVR9vSMRCFwTgsGAILyZ8+eSt0pThpEiwuR1H6zKxAn62kIg8c6/gfDlNmKbi8l94 k7ZSdNSuRsQA/sVn3EiVzfqnASJ0+tWSThQ8VlLRtA== X-Original-Sender: agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) smtp.mailfrom=agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=meddatainc.com 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:32818 Archived-At: This is a multi-part message in MIME format. --------------4FEC85C50E1B1EC256171549 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 06/14/2023 02:49 AM, Bastien DUMONT wrote: > You can learn which elements have an =E2=80=9Cattributes=E2=80=9D field f= rom the doc: https://pandoc.org/lua-filters.html > > Le Tuesday 13 June 2023 =C3=A0 08:34:05PM, H a =C3=A9crit : >> On 06/13/2023 06:53 PM, H wrote: >>> On 06/13/2023 06:05 PM, H wrote: >>>> On 06/13/2023 05:27 PM, Bastien DUMONT wrote: >>>>> attr.style =3D 'color: #112233;' >>>> Wonderful, many thanks! Btw, I was reading my email in the reverse ord= er or I would have found this before my other post... >>>> >>> How can I similarly add a style to an tag? This = tag is wrapped inside a
tag. >>> >> Besides adding a style to (Image) elements, I also want to add= a style to
(HorizontalRule). It seems that the following does not w= ork: >> >> local style_hr =3D 'border-top-style: solid; border-top-width: thin; bor= der-color: #cc002b;' >> >> if (el.type =3D=3D 'HorizontalRule') then >> =C2=A0 local attr =3D el.attributes >> =C2=A0 attr.style =3D style_hr >> end >> >> The desired output is: >> >>
>> >> Pandoc fails assigning the style, however, adding the code to the html f= ile shows it is valid html code. >> >> Have I missed something or might this be a bug? >> >> --=20 >> You received this message because you are subscribed to the Google Group= s "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit https://groups.google.com/d/msg= id/pandoc-discuss/61724767-ada0-133f-6751-5884c7460a25%40meddatainc.com. Corre,t in that list HorizontalRule does not have an attributes field but o= ught it not to have one? My example above is, after all, valid HTML code. I have for now worked arou= nd it by creating the desired
tag in my code but it would be muc= h more elegant to to be able to add style information to HorizontalRule. --=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/b696e1f5-0648-c8f0-4117-257896e40f8b%40meddatainc.com. --------------4FEC85C50E1B1EC256171549 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On 06/14/2023 02:49 AM, Bastien DUMONT wrote:
You can learn which elements have an =E2=80=9Cattribut=
es=E2=80=9D field from the doc: https://pandoc.org/lua-filters.html

Le Tuesday 13 June 2023 =C3=A0 08:34:05PM, H a =C3=A9crit :
On 06/13/2023 06:53 PM, H wrote:
On 06/13/2023 06:05 PM, H wrote:
On 06/13/2023 05:27 PM, Bastien DUMONT wrote:
attr.style =3D 'color: #112233;'
Wonderful, many thanks! Btw, I was reading my em=
ail in the reverse order or I would have found this before my other post...

How can I similarly add a style to an <image ..=
.> tag? This <image ...> tag is wrapped inside a <figure> ta=
g.

Besides adding a style to <img ...> (Image) el=
ements, I also want to add a style to <hr /> (HorizontalRule). It see=
ms that the following does not work:

local style_hr =3D 'border-top-style: solid; border-top-width: thin; border=
-color: #cc002b;'

if (el.type =3D=3D 'HorizontalRule') then
=C2=A0 local attr =3D el.attributes
=C2=A0 attr.style =3D style_hr
end

The desired output is:

<hr style=3D"border-top-style: solid; border-top-width: thin; border-col=
or: #cc002b;" />

Pandoc fails assigning the style, however, adding the code to the html file=
 shows it is valid html code.

Have I missed something or might this be a bug?

--=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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<=
/a>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pan=
doc-discuss/61724767-ada0-133f-6751-5884c7460a25%40meddatainc.com.

Corre,t in that list HorizontalRule does not have an attributes field but ought it not to have one?

My example above is, after all, valid HTML code. I have for now worked around it by creating the desired <hr ... /> tag in my code but it would be much more elegant to to be able to add style information to HorizontalRule.


--
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/ms= gid/pandoc-discuss/b696e1f5-0648-c8f0-4117-257896e40f8b%40meddatainc.com.
--------------4FEC85C50E1B1EC256171549--