From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30976 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Adding attributes to definition lists using pandoc Date: Fri, 15 Jul 2022 11:28:27 +0200 Message-ID: <447D8C10-40D3-41EF-AEA2-B18727AD269D@gmail.com> References: <6a4255a0-557b-a182-43a8-35facb1e2788@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37780"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBQHGYSLAMGQEDU437EA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jul 15 11:28:36 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f55.google.com ([209.85.221.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oCHch-0009g8-OL for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 15 Jul 2022 11:28:35 +0200 Original-Received: by mail-wr1-f55.google.com with SMTP id t13-20020adfe10d000000b0021bae3def1esf1034830wrz.3 for ; Fri, 15 Jul 2022 02:28:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657877315; cv=pass; d=google.com; s=arc-20160816; b=T52/Bj87rXRYAIP4zXSJbskMuLu3qdWJPe12UkifnhzcXXeM1QV+ywYqtsF1JHwXCE BjKFa+bWKI4r+tjQ/wthQ5ABy9vjmYYqVf8ojGvSsqiF6xq2gCyr2x2s/sVx7uUxIcuQ cX68YYgbBDsCT2g2XoKIQGL4ubsKsU7oN7H1Te5T4j2uKSeQ+OOvSpTJCTb22K6midUS RASm4T5cyWh1PxxRIcAte9zern6Lc0uffWhwrBIgWcjfJ6pQyrgesJ3H9rP9zkMWoPh4 YLAq719D/SJ4oUBjwazCy66GqC2vpzZrhoMVqvvz3OGgqRENY4we9v6cfPuVLAt5sYIN 1nOA== 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:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=ksYCLViv653Yvj6JT+ll+4kl7VVxT2ga9Z8aiwSC0As=; b=I/4DKgU2Ze1HzjoPQRYYOi6LSQ8uexLYwGdfr2Ax0Y6myFsyjVQYjhP6JkoDv4j5aI +5D7s63w2DbZlbutdAwM8oH4gofHpPJu9fEy05pzeLAJdnNjidnFEpywt5+7Aa2Il9Qj Roi3A1TWd5xGVCgl3Pm7RxjLaMbmf2zNjcrUifLV2iZGWSXb7E23K1DiB+xlWkbttM+G F0FiuiwO8xR/V2AuiADkxNrRk/lyvidW4GiWwpR+hPLiTkMG0EIO2zsXODAxUC9WlxHY 1KcGvoQmtwELzymzjI0hDX+dX6otw08BtMXH9Cw4kbJtRedMyyZS3PnKVE7fJqRhpB5a igrw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SqRwOhlw; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:content-transfer-encoding:mime-version:subject:date :references:to:in-reply-to:message-id:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=ksYCLViv653Yvj6JT+ll+4kl7VVxT2ga9Z8aiwSC0As=; b=P2Zy2lbLKFc2D1ut2zQdF85tNOe9JyBQgMZex5y4XhYmhp1y8HZsldk5QjcGJmP5h8 Q8eGsqJOy08KJVLxYr+NN86yoyEgYNrbb3Ka6MyqhX4tlLUR1Aw7aPYFCpHpYo5nCPgN WTPy0R+ucYMxZZ2chS78U1gcCemSUPjd8ChA146H2knhVnFUkcikbSu05k3hCOZoRQ0g ZsQwKa/da8VU3qW5SA66VBqoiSGEywFDgUGIfJRcl+pNAj0BqAT6jklDCV8zky0hTp74 zAWb24Ly6mppn8/ngTH1CvVCfHrDojqhiFB+OcuxrSpLufiSDGffsrIhEPbtzC4JWc2P f9PA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=ksYCLViv653Yvj6JT+ll+4kl7VVxT2ga9Z8aiwSC0As=; b=hYWi8BJ/DucuhHU8xbS8yIAUbkQqswwHCfq4HsfMS1FUTB7nY97tiaxeFttjxlnZvA KEBGX1NaL3K2RRRFguZgLL2i3iooxGxWBB5Xwf0h42nZbJDSV6vzAI7Ee07/1vk/plJN 5fF8qKqTv60HSafd5DWMZZlYKGMRMh9n176iYXgMgM4Qr3GCH1b13z+1tAFHMySc4MU9 r0Rl1lrUmDIcnBIUHE+AnaRgnw8Yya2OVkWgfliRq6bhTI5R1xuIrRTkkQN4lqU33XbJ E9Kj9plv2xqlc0AlvyhYs0HP8NT08KT1+G0LdXK/EvdyBGF/F09M4oqZ8l7OanrWDAoR rSnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:content-transfer-encoding :mime-version:subject:date:references:to:in-reply-to:message-id :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=ksYCLViv653Yvj6JT+ll+4kl7VVxT2ga9Z8aiwSC0As=; b=jZP3fpyrlNbnTigdzp321La9J0y7+Klge85JfZagIU67txGv/HReGvLW397u+GxELp yLu0yYS488m4lkOpTqorqxnOqegcG8xfkJcCIKJHj/j2OzD2Tzd6q7zIh8IfaxqDoR5A w46ERsOj0Zv5y/yNhfg+fsYxbsjXaMZLqa3hH7nNM4RqCFwbaAJ/6vzFuhopmk2Ud9Mr WPs5ckAxf47DisBTYTwTg2PPz3MXczogpynAizbqWQo93bW27xub6McCnCSn8tsaBhx0 7wGOK2rxkMIrPuR+ZbQcElfKntaaAHMhuFUg/IvRPkTMYeKUG1bty+tGdAWcOtH0vWmS Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+PXufRgnQ+9Avg69Dx1kNlB7v8H0mAqdE0DmG45nCi5bX4ORJL B/uVllw3qtroWX8lrUqKMYA= X-Google-Smtp-Source: AGRyM1vHTI98CauBri0/R2hrJmfLGaruRlxV6B2TUnyEEqN1D1bin1O789o9Gx4338rHIqj8FfHJZQ== X-Received: by 2002:a05:600c:284a:b0:3a2:ffb7:b56f with SMTP id r10-20020a05600c284a00b003a2ffb7b56fmr9185519wmb.134.1657877315330; Fri, 15 Jul 2022 02:28:35 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a5d:588d:0:b0:21d:339f:dc1 with SMTP id n13-20020a5d588d000000b0021d339f0dc1ls1583898wrf.0.gmail; Fri, 15 Jul 2022 02:28:31 -0700 (PDT) X-Received: by 2002:a5d:4248:0:b0:21d:7174:705b with SMTP id s8-20020a5d4248000000b0021d7174705bmr12396518wrr.378.1657877311385; Fri, 15 Jul 2022 02:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657877311; cv=none; d=google.com; s=arc-20160816; b=HH/42bwbQX/hQJ6VsNnc+9jOBbDV2IlgTJIuMfzB0bywxGAK8/v1o6UxqJCG4Z3nZd 3cP5u78RvzdF63yCO+5jVK+Obf22Zz8iZbryVvLWk/g7pNMk6Ks+TWK3z+tMzgh7jKCB 6xJ2ezOQD5Zz3h1N1HAK+8Ru0XCRfkPURwjQKXSAr2hOy1HToPzx5GalYkAXf2pTNAQa aXm9dn7vzXHwzNpNupxLhsO7h9eOzxWmd5zzMCWXOfadQwBRVE1SHjxQUkcUkOmt6s6s Rry0CafSLL5zJYfYUmy7BVpOJOzFcL9TCNvUs/SZgc5YLs056ivuM7pj8LhigRf+r6+j ILCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=mGeGrwIDNZIMU57UzBB1CNO5cUkG+/UrhB/hUSKbU9Q=; b=y+hMLYSS3omXICQA/F1AgXuK2VwitBhqa0QqZ9RzlznOj+EJbQv3Zk02wrwxfrENYH 7LIyLpNpBdApJrOWOwa1y+kNFTdxLI4FwuHTXYF9wHgBv+H1LKylO1viSwuhRbF9qiEi M5f2iO02u+vG+Bi0pZBEhRop1/jginEcO41dnM45pXpJEZcthQnca+Bkmimjj9rH9q6O hVTWkQ3CK6JCgEQ80/U4fekcngYoxGxoQGGwbLj9PXvRJLbBvji50dgmtEzrojZK6VfO nN7y2oNG5SC4KPgFx9EkU1CqKSBtnUlLtL6omBS8/8mptqG2lsebkMik+sfPh3FpnLQ3 pSCg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SqRwOhlw; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com. [2a00:1450:4864:20::42a]) by gmr-mx.google.com with ESMTPS id k3-20020a5d5183000000b0021d75c7228dsi109600wrv.7.2022.07.15.02.28.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jul 2022 02:28:31 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) client-ip=2a00:1450:4864:20::42a; Original-Received: by mail-wr1-x42a.google.com with SMTP id z12so5953424wrq.7 for ; Fri, 15 Jul 2022 02:28:31 -0700 (PDT) X-Received: by 2002:a5d:434b:0:b0:21d:6887:7b81 with SMTP id u11-20020a5d434b000000b0021d68877b81mr12015723wrr.658.1657877310649; Fri, 15 Jul 2022 02:28:30 -0700 (PDT) Original-Received: from smtpclient.apple ([2a01:e0a:40e:ff40:31bc:54b2:cb5b:ea79]) by smtp.gmail.com with ESMTPSA id c4-20020a5d4f04000000b0021d864d4461sm3320003wru.83.2022.07.15.02.28.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2022 02:28:29 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SqRwOhlw; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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:30976 Archived-At: Indeed, even with commonmark_x the attributes are not getting picked up on = the definition list. Note: pandoc's AST cannot currently attach attributes directly to a defini= tion list. So generally the commonmark_x reader will create a containing D= iv to which to apply the attributes. You can test that by attaching an att= ribute to a paragraph. For some reason, it isn't working with definition l= ists. This is a bug in https://github.com/jgm/commonmark-hs and should be = reported there. > On Jul 13, 2022, at 5:17 PM, A A wrote: >=20 > Looks like it might be a bug.... anyone else? >=20 > On Wed, 13 Jul 2022 at 17:14, Sukil Etxenike arizaleta wrote: > Hi, >=20 > I've tried it too, and it gives the same results. I don't know why this h= appens. >=20 > Regards, >=20 > Sukil >=20 >=20 >=20 > El 13/07/2022 a las 17:01, A A escribi=C3=B3: >> Dear Sukil, >>=20 >> So I believe only commonmark_x provides the non-default attributes exte= nsion. It=E2=80=99s not included in commonmark, I don=E2=80=99t think. >>=20 >> So I tried with commonmark_x on the following code: >>=20 >> --- >> title: my title >> author: bob marley >> --- >>=20 >> # Header {#identifier .class key=3Dvalue} >>=20 >> Some text >>=20 >> {#special .glossary} >> Term 1 >> : Definition 1 >>=20 >> Term 2 >> : Definition 2 >>=20 >> with the following command: >>=20 >> pandoc -f commonmark_x -t html .\definition-lists.md >>=20 >> But i=E2=80=99m still not getting the attributes added to the
eleme= nt: >>=20 >>

Header

>>

Some text

>>
>>
Term 1
>>
>> Definition 1 >>
>>
Term 2
>>
>> Definition 2 >>
>>
>>=20 >> The other option is to maybe use the fenced_divs extension with regular = markdown, but I=E2=80=99m trying to see if there=E2=80=99s a more generic w= ay. >>=20 >> Regards, >>=20 >> Amine >>=20 >>=20 >> On Wed, 13 Jul 2022 at 16:42, Sukil Etxenike arizaleta wrote: >> Hi, >>=20 >> OK, technically it doesn't say it cannot be done, it only says that this= syntax is only available in headers, divs, spans, links and images. >>=20 >> But wait, checking non-default extensions, if you convert from commonmar= k or commonmark_x you can use this syntax with any element of the AST. Tech= nically it wuld add an enclosing div, too. >>=20 >> This, however, wouldn't let you enable other extensions, check --list-ex= tensions=3Dcommonmark etc. to see if this would suit you. >>=20 >> Hth, >>=20 >> Sukil >>=20 >>=20 >>=20 >> El 13/07/2022 a las 16:32, A A escribi=C3=B3: >>> Hi Sukil, >>>=20 >>> Thanks for your quick response, but where in the manual does it say tha= t this cannot be done? I was under the impression that using the braced syn= tax to add attributes was a sort of universal thing that could be done to a= ny of the elements in the AST? >>>=20 >>> Regards, >>>=20 >>> Amine >>>=20 >>> On Wed, 13 Jul 2022 at 16:29, Sukil Etxenike arizaleta wrote: >>> According to the manual: no, but you can enclose it in a div and give t= hat div the attributes you want. >>>=20 >>> Hth, >>>=20 >>> Sukil >>>=20 >>>=20 >>>=20 >>> El 13/07/2022 a las 16:18, A A escribi=C3=B3: >>>> Dear All, >>>>=20 >>>> I would like to ask whether it is possible to assign attributes, ident= ifiers or key-value pairs to definition lists as follows in pandoc: >>>>=20 >>>> --- >>>> title: my title >>>> author: bob marley >>>> --- >>>>=20 >>>> # Header {#identifier .class key=3Dvalue} >>>>=20 >>>> Some text >>>>=20 >>>> {.glossary} >>>> Term 1 >>>> : Definition 1 >>>>=20 >>>> Term 2 >>>> : Definition 2 >>>>=20 >>>> Compiling the above with pandoc -f markdown -t html .\definition-lists= .md generates the following: >>>>=20 >>>>

Header

>>>>

Some text

>>>>

{.glossary} Term 1 : Definition 1

>>>>
>>>>
Term 2
>>>>
>>>> Definition 2 >>>>
>>>>
>>>>=20 >>>> The attributes on the header are getting picked up by pandoc, but not = on the definition list. What am I doing wrong here? >>>>=20 >>>> Regards, >>>>=20 >>>> Amine >>>>=20 >>>> --=20 >>>> You received this message because you are subscribed to the Google Gro= ups "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/m= sgid/pandoc-discuss/CAMwawgOyf796%3DsXy5Zt%2BT1Z0MZqXyLZS-YJCqRWRCkzyF-Lh_g= %40mail.gmail.com. >>> --=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit https://groups.google.com/d/ms= gid/pandoc-discuss/6a4255a0-557b-a182-43a8-35facb1e2788%40gmail.com. >>> --=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit https://groups.google.com/d/ms= gid/pandoc-discuss/CAMwawgOYU8Z6XZ6uMxZ5t1-47OV7FKR7640O2hSb_VHStu3yAw%40ma= il.gmail.com. >> --=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/b187e3c4-0026-1853-d18f-86cedce39191%40gmail.com. >> --=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/CAMwawgPPQCVG_xQfVoQD7nPqaU8ObZd%2BcM5gcqEXuuy3ouPBFw%40m= ail.gmail.com. >=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/fa49db14-b03b-f29d-32bc-daf4b80d6b39%40gmail.com. >=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/CAMwawgMECRkn7n5G3cj%2Bi%3DimJuUZeciPN82mVQAZZtPc7yJqRA%40= mail.gmail.com. --=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/447D8C10-40D3-41EF-AEA2-B18727AD269D%40gmail.com.