From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32217 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: A A Newsgroups: gmane.text.pandoc Subject: Re: Can math elements have attributes Date: Wed, 22 Feb 2023 09:15:37 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f35f6305f54580a2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15140"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDJ77HUDRUCBBNU626PQMGQEYUUKPQI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Feb 22 09:15:54 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f190.google.com ([209.85.219.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pUkI6-0003kF-9d for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 22 Feb 2023 09:15:54 +0100 Original-Received: by mail-yb1-f190.google.com with SMTP id x35-20020a25a026000000b009433a21be0dsf5687135ybh.19 for ; Wed, 22 Feb 2023 00:15:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677053753; cv=pass; d=google.com; s=arc-20160816; b=mi7p1779RosgW9eVrQQYlNTSSu3r4IJTAlHcHk7CbIzKDiF5o+Y4B2Yuhyyt0drdXS Wz7rfd0w2uXZefXNMyyUaOrp7bKyup82IF38DBQ/uWSZD2gZYp4SDLp02Z4eT+6gUkoh C4aD/YfiZtEvJ0/Y3AYrG6BZQQHhDTR7jytX0rS4qZ176Muo2LSMto7y8RGDqW5FK2PC DR3o94ideHsTuE2aWen3vILL9lc4Zmik3+1OlaWoSeM7EwsywdsEjg2n7hG+wR0hHiAP VACqrOAyFv92KNQSBnevPOBPyOr70mek77hWt1MOe0aRVv24CBnZbZT1Gk/eU5/wJSIB S5qg== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=yL0XDUQjL7K7LOV3bc9qfLky35ToF+6JOxoVG3/DanM=; b=VTJfLHJx+mr22d7JkxGAYf/SBEn9/QeJt2NLYEbDoTPoNqcXSUZAvU/XJDM1vb+vJn oWasT1xvlLovhC8M9pstq9E7Ac3qYVSaLILn7/ig2zwGX3OMOWTFE83Rp44lPCjU/zU8 N5kO7QV294Y9iwGgR77RqLLjE3S4Pn9bhkf4/OHwMQsON/Er00YPUTwruYZY2NZQIhbR hNzT/oWYxNXozr9VVNkDDPm5Ui0WpBfKoGNtcbXy70e90cZ7cAzY0rH5KgqZ72ZMzFhP O9CWB4OI+/cpFwO1zeGxKiB+GIRtWLHNcoe1VjhFi+EjsD9Ti2+AJXw8dPW7kPybruJI VKag== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="RkSN/bmQ"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=amine.aboufirass-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=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=yL0XDUQjL7K7LOV3bc9qfLky35ToF+6JOxoVG3/DanM=; b=s3opMmishcwPjBz7R6XhZE0Cw9lCkLoKKNYpoV7xHPmSlfV/g4fo/2eRxh15t1Vdhi him0c1DN6XxKIH2CJ12nEu50NvwInhmS1UAXqXotPbg+r419XOpeHTzgKKy8UFQeyOif q4WIyUrZPKoWEnWMWNRLLdqmQ25jjJfR6ykH3gnzWAfFHrFylssB+98uLi9m08NJHO04 T5vIHu9Cdq8u+AQ7dfhkn24xm4aDXDQ8aHutf1QhSGy+uy0/Ceml7En6xBIzKEi4ZOZw jy/GVFwLNhL7CMXbgo3sUpHajyUpMv+q1RalhhwASWonutxwB4cgzhLElhdMUSun/8yX d89w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=yL0XDUQjL7K7LOV3bc9qfLky35ToF+6JOxoVG3/DanM=; b=kvP+VfC+ZBmXlAMQMWnEpJrgX14B4UbrOJEmzA59Xxs1DjGmsucb+ju6HNxopP4HAS zHLAMNl4ZZClYGSlYcCw52dYP+LKAWD1Q1Rdr0vKU/U5DB+Dr0velexY2YQo88Br116B fMFhTPwQzfsOBSnrdcbhwlxXa0sM6BUTcPEmLYGP9KNG7iL4GZ/L+WqoriL6KKVzMcmD c67m/GLhtH16ExCQDVsyYDKOC1Q8WG8Z/uZSppd6nAcK1ecbVkHsQvEAISDs64yV2M+I apB0RaCjW5xGxfOYkL+MHx42UXH1QFV9G9h7YcOWQm7yau7trBqeDWxqI5i76x8/3jxV 9FwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=yL0XDUQjL7K7LOV3bc9qfLky35ToF+6JOxoVG3/DanM=; b=BPfrizYy0g9jRFJyO2CTcpZsFFWXcwYwJdJmYZtQzYf0yg5aa9Bw5arIB95mopBDWz B+V+UEDWVR6go4SBFNg1F7Qk1Jrs65iOif+qCV0F1UujbMFzpeVT0R0sLn+3fyIYAjZt OG55NdpryoOBrjwVsbzRt+qCDIUWZCRm3fdhi74WHmDoEcmOgawrhdJyFTd7cPVzIqYw 9f81/jqoDrGt6HMj7etHENiQKI7r41gIHw8u1/7MDJheoak6WkQikHkWR61ZY3XFcIb2 7nksDg67sOCr6DJWi/zLdOn5ZQINGb/xAuCgYOUJOicp68 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKVI9cuYxbUj+TnXzfbDMCzrCqHP7q2uTv1dPEjc+LSfjbUxzA4D vne0PIRJJ85pNP6PGR3Q/HM= X-Google-Smtp-Source: AK7set+Vo6MJqx5TOKQjaVAvDsorByJFWLq27mMwAT4dZj9lEKVIa3gLxrF9osNigL1irsVJydCGVQ== X-Received: by 2002:a25:9102:0:b0:997:de96:1aa8 with SMTP id v2-20020a259102000000b00997de961aa8mr1516969ybl.93.1677053753185; Wed, 22 Feb 2023 00:15:53 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:2fcf:0:b0:8dc:e5aa:b62 with SMTP id v198-20020a252fcf000000b008dce5aa0b62ls3467672ybv.5.-pod-prod-gmail; Wed, 22 Feb 2023 00:15:49 -0800 (PST) X-Received: by 2002:a05:6902:4e9:b0:8cd:3b9a:19c1 with SMTP id w9-20020a05690204e900b008cd3b9a19c1mr6713179ybs.47.1677053749514; Wed, 22 Feb 2023 00:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677053749; cv=none; d=google.com; s=arc-20160816; b=iNFo98vnTr5VGpKJWYMa7Z9/g5orfRylDElw4bu2jBSFN+gVzmke5+7oqkY6ETOcdT CmNVBJK07kpqc67bb+pAbH2WCQs8+iX1uzvVtOzDP9CrEO/c7YXB1rxzlSqyL9mOHudV REagpouzoaz/BkVbOMsBdjjEgpGivu/tP9PHKutEJZvCbqKUyuUjaDUTjiaAJ6vfP4h6 F3pQ9OIH3OLtvyRjddIs2XZCe/P2OjBDMST9Nzw0TLhLtvrn9yKm7YjEdi6OWAUvlNHC qLWAkZgVgycfqsn+z9j+1FxyiA0K6j+Mmewj89xIxrwOHv/fgv8Kx7mDhLH0h+ZAqC4F etmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gkXaNiFeh1aEUi11yoT95gvPRBCy1gfk7wkDRO9/KIY=; b=swGTwNqPqUn0fZ3QcN6HccxUzTQf1Gk9OTEjLJusUgAsgCHiDIhWh/BBLj1ZOnjHb6 VTtZ2SPZQGKDvfP6qVTCHU9iHb+jSdLqMRDgnkWW0xr3QNEQcR2kOGNQAtyewY/ZFNa2 WM9kbPAsHyfpKtuUk/GNl0ICfs0ds8A4BxdexCKP/3P64vznf5iccb8slbDJDOizmd8G dvxW8XFEUsAmA1OLYWronjdDyZUsvLhvocmI8hecWsvByYz09i/ES6yCbAgrGYYj5/dz zq+vcUEyA4C37ylN2F0ziAchE76UYotmdbsbhh46N5srn5K96BVlS4rJsM/KUO/aNfvm ZfxQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="RkSN/bmQ"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com. [2607:f8b0:4864:20::432]) by gmr-mx.google.com with ESMTPS id k188-20020a2524c5000000b0090621221d35si599482ybk.2.2023.02.22.00.15.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Feb 2023 00:15:49 -0800 (PST) Received-SPF: pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::432 as permitted sender) client-ip=2607:f8b0:4864:20::432; Original-Received: by mail-pf1-x432.google.com with SMTP id s15so2489740pfg.3 for ; Wed, 22 Feb 2023 00:15:49 -0800 (PST) X-Received: by 2002:a05:6a00:b48:b0:5a8:a9f2:3623 with SMTP id p8-20020a056a000b4800b005a8a9f23623mr1202510pfo.36.1677053748533; Wed, 22 Feb 2023 00:15:48 -0800 (PST) In-Reply-To: X-Original-Sender: amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="RkSN/bmQ"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=amine.aboufirass-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:32217 Archived-At: --000000000000f35f6305f54580a2 Content-Type: text/plain; charset="UTF-8" Anyone? I also opened an issue in Github but no response. On Fri, 17 Feb 2023 at 12:01, A A wrote: > Dear all, > > Having not received a response to my query below, I ran a few of my own > tests to try to understand what is going on. > > It seems that commonmark_x *does* recognize attributes for both inline > and display math. If I have the following in my markdown file: > > $$x = 1+2$${ .cs #math:equation caption=test} > > $x = 1+2${ .cs #math:equation caption=test} > > ~~~{ > .cs > #lst:my-listing > caption=test > } > def f(x): > return x > ~~~ > > And I run pandoc --from commonmark_x --to native test.md I will get the > following: > > [ Para > [ Span > ( "math:equation" , [ "cs" ] , [ ( "caption" , "test" ) ] ) > [ Math DisplayMath "x = 1+2" ] > ] > , Para > [ Span > ( "math:equation" , [ "cs" ] , [ ( "caption" , "test" ) ] ) > [ Math InlineMath "x = 1+2" ] > ] > , CodeBlock > ( "" , [ "{" ] , [] ) > " .cs \n #lst:my-listing \n caption=test\n }\ndef f(x):\n return x" > ] > > Notice that the multiline attributes for the CodeBlock element are not > picked up. If I instead try pandoc --from markdown --to native test.md: > > [ Para > [ Math DisplayMath "x = 1+2" > , Str "{" > , Space > , Str ".cs" > , Space > , Str "#math:equation" > , Space > , Str "caption=test}" > ] > , Para > [ Math InlineMath "x = 1+2" > , Str "{" > , Space > , Str ".cs" > , Space > , Str "#math:equation" > , Space > , Str "caption=test}" > ] > , CodeBlock > ( "lst:my-listing" , [ "cs" ] , [ ( "caption" , "test" ) ] ) > "def f(x):\n return x" > ] > > > The attributes in the CodeBlock element *are* picked up, but the > attributes for display and inline math are not. > > Unfortunately, for my use case I would like to be able to assign multiline > attributes to code block elements *and* assign attributes to display and > inline math elements. > > Is there a way to achieve both in the same markdown file? Thanks for your > consideration. > > Regards, > > Amine > > ---------- Forwarded message --------- > From: A A > Date: Wed, 8 Feb 2023 at 13:52 > Subject: Can math elements have attributes > To: > > > Dear all, > > I am writing my own pandoc to latex converter using panflute and would > like to attach attributes to Math elements. I have tried the following > syntax, but it seems that the attribute is not being picked up by panflute: > > ``` > $$x=y$${ a=b } > ``` > > I did some of my own research to figure out what I was doing wrong. And a > couple of things became apparent: > > - On the one hand, it looks like pandoc might not support this: > - https://github.com/jgm/pandoc/issues/684 > - https://github.com/jgm/pandoc/issues/5286 > - On the other hand, `pandoc-crossref` seems to be able to handle this > syntax: > - https://github.com/lierdakil/pandoc-crossref > - https://lierdakil.github.io/pandoc-crossref/#equation-labels > > Is this currently supported by pandoc? If not then how is > `pandoc-crossref` able to handle it? Thanks for your consideration. > > Regards, > > Amine > > > -- 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/CAMwawgP2XGxyiP9LQvG%3DsdmQs5x%2B_0pOcDd%2BpE-gyyx_5uXUJA%40mail.gmail.com. --000000000000f35f6305f54580a2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Anyone? I also opened an issue in Github but no response.<= /div>
O= n Fri, 17 Feb 2023 at 12:01, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Dear all,

=

Having not received a res= ponse to my query below, I ran a few of my own tests to try to understand w= hat is going on.

It seems that commonmark= _x does recognize attributes for both inline and display ma= th. If I have the following in my markdown file:

=

And I run pandoc --from commonmark_x --= to native test.md I will get the following:

[ P=
ara
    [ Span
        ( "math:equation" , [ "cs" ] , [ ( "captio=
n" , "test" ) ] )
        [ Math DisplayMath "x =3D 1+2" ]
    ]
, Para
    [ Span
        ( "math:equation" , [ "cs" ] , [ ( "captio=
n" , "test" ) ] )
        [ Math InlineMath "x =3D 1+2" ]
    ]
, CodeBlock
    ( "" , [ "{" ] , [] )
    "  .cs \n  #lst:my-listing \n  caption=3Dtest\n  }\ndef f(x):\n   =
 return x"
]

Notice that the m= ultiline attributes for the CodeBlock element are not picked up. If I inste= ad try pandoc --from markdown --to native test.md:=

[ Para
    [ Math DisplayMath "x =3D 1+2"
    , Str "{"
    , Space
    , Str ".cs"
    , Space
    , Str "#math:equation"
    , Space
    , Str "caption=3Dtest}"
    ]
, Para
    [ Math InlineMath "x =3D 1+2"
    , Str "{"
    , Space
    , Str ".cs"
    , Space
    , Str "#math:equation"
    , Space
    , Str "caption=3Dtest}"
    ]
, CodeBlock
    ( "lst:my-listing" , [ "cs" ] , [ ( "caption&q=
uot; , "test" ) ] )
    "def f(x):\n    return x"
]

Unfortunately, for my use case I would li= ke to be able to assign multiline attributes to code block elements and= assign attributes to display and inline math elements.

Is there a way to achieve both in the sam= e markdown file? Thanks for your consideration.

Regards,

Amine


---------- Forwarde= d message ---------
From: A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Dat= e: Wed, 8 Feb 2023 at 13:52
Subject: Can math elements have attributesTo: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


Dear all,

I am writing my own pandoc to latex conver= ter using panflute and would like to attach attributes to Math elements. I = have tried the following syntax, but it seems that the attribute is not bei= ng picked up by panflute:

```
$$x=3Dy$${= a=3Db }
```

I did some of my own resear= ch to figure out what I was doing wrong. And a couple of things became appa= rent:

- On the one hand, it looks like pandoc migh= t not support this:
- On the other hand, `pandoc-crossref` seems to be able to = handle this syntax:

<= /div>
Is this currently supported by pandoc? If not then how is `pandoc= -crossref` able to handle it? Thanks for your consideration.

=
Regards,

Amine


--
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://g= roups.google.com/d/msgid/pandoc-discuss/CAMwawgP2XGxyiP9LQvG%3DsdmQs5x%2B_0= pOcDd%2BpE-gyyx_5uXUJA%40mail.gmail.com.
--000000000000f35f6305f54580a2--