From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32191 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: A A Newsgroups: gmane.text.pandoc Subject: Fwd: Can math elements have attributes Date: Fri, 17 Feb 2023 12:01:35 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004986bb05f4e33d95" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24595"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDJ77HUDRUCBBG55XWPQMGQEIUOVBZA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Feb 17 12:01:55 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pf1-f185.google.com ([209.85.210.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSyUz-00069D-6q for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Feb 2023 12:01:53 +0100 Original-Received: by mail-pf1-f185.google.com with SMTP id c8-20020a056a000ac800b005a8de178393sf86186pfl.23 for ; Fri, 17 Feb 2023 03:01:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676631711; cv=pass; d=google.com; s=arc-20160816; b=ukvNuUngUNc8sPgP/EJZlFbShpE78wT5hwwsKAWiAqZTwNb4tv0on8ctpvx5i2qxaZ OtamWmx1Yu6ocyO3BUhjvkzOhe4hMGysrs1I/d2pf+K+319MLvjaiTWBYlgKiv743ZVv nN39/jc4xL4D+x16IzMDa5Il8kl86gV1IRHxw8HpJ1mtQ4ejWD51V/9ZdeFfAuaH9DIx GAB4tUOsD22zFiIyo9gBDulPhvwjEwUqG2r1otwbY0MHQa6l5V5r1RkkIpYbTs/5BYb5 V/ETxbAvI8aFBkxDs7MmeImsNYFzdWduR9paWmBYN57n1u6PrQOYIv+6WGVJVJ36IKeX VOkQ== 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=6l2T2MwdHbYqO8VYVuFp2quu9P8vKHYTCE4poBvtoFs=; b=WDRX1Bfh/yuKjKFqQLfqI+m+dGX+jIDVCGiFkHVZd0qHwh5eqphvsbbrWwTRVp6V+O P/Ay8pi3qvlp4Ggt1AxJX0jn31RpNBmbAHaswaCO/kCXNaH2kOAKLq6vEqDHy4eaGdAQ 7svuBswC9+LCI1VRIE+jv3G4rORHJIB7HDHGzBThW+Pa/ah/ewzpVM2hrqXXw1NkpyKT 9TawG+5nz3BmFr7I/iyDEGzJZzU/0kb4qcpdR1qJA3Eb2ENfAX3HgtP8OZdaYrw2aHdu kQNO2XHYTbHSSSJd0B+rm/btUeJ17VATP36lcH97etiI9KatTBwoWCz1/uQVstDoiGw7 bOdg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="V/prgJ6R"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::534 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=6l2T2MwdHbYqO8VYVuFp2quu9P8vKHYTCE4poBvtoFs=; b=TzZLUFrT/Dm+I16+/EoIFthivEuVGZwmjwII2YiAodo652vtAaz+ofQFrUVS3GKmOB RwXf+bl9hsm5ZKpn4lHcZqXp2lw+V27iZNJnQC9xL/fKuLj5EMQwLKkt1B4v9mZDtufw 8tdOkyf7Dp9qjPI6iZ8aGyd7zv9FgMrGOuIOgWwsrK9oHJ2LGodsfZdD6hD95whR2B6/ YXKd8j16fW/0jZy+goXG1XvH31Ewd90j1LGekXVkm9Z47/+WdaZp5i8oz16lzWCUj2TU H9NcW2SbmiOCEcY3E+ssDD330VT884VMTvreFmDgy7fXJMZ607bc7d063GXqREsq8G9X fqRQ== 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=6l2T2MwdHbYqO8VYVuFp2quu9P8vKHYTCE4poBvtoFs=; b=BibhN2WplPgOxe6jkz3muPNesxOaEJ0O9mp6oK5LS7bnYQcXwADg97DwehtRTS6T6b 21xkmxD70hIW2wq4YElVVnbtsd9b+CAOqMTnXbbpNc+43cUBBciKOLnKmFA2tJJpU12v ufVdHir+lZnz9mMMUkyca0otHYdbCCQN29RbNBTwJfg27MPmV2ZKtx4YdWNyZHhSyWsV FxnGqyw155bVDROaklQAb3E09ooKIU/TF+YOkRAimqtvbZpgYIfkNOVyooH8X2V1Rs8v xfL8Bo5ILm2+or17+yXNm7eP7IggWvYEyAG2NTLD+eJ6l72jLOrat8Ccp6QrtXTZW/v5 7Hfw== 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=6l2T2MwdHbYqO8VYVuFp2quu9P8vKHYTCE4poBvtoFs=; b=suRAIYuq/J2nYnh3MK685Hiq438LP2JyfwtbMGgOqa7wpNQhKtvuWrb3bqbHJ00Zkt Tq0ZtaLFgUdBHCEqpSza+FykVvNG0vdYQCdF6DRh61YJsn+Pzf5Tv7IozuKbr52Eu5Tq lTizj8ekbrVoiSLJvlNvU69iU6QYqvev3hmRqDScVK8qwVoHe13/WYsVu3kohuETGMSN tkBbXTV5xGMDs8FywgU1OVN7zsf/FsIZu66/6l1pRJgLJwbjNeWHtUzsZNO7wTbH5qN4 4rKGoJkfxUDtc4xZbMSYFMXaf/XkgHdPCDaZmVw+lZqgvc Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUBfDLvrx8PtsAkQQaPWz3xncbVrJqAhj45xwx+ZzYAIoPJ1Isq V7MDt1wJGw55Yl7TBQta5UU= X-Google-Smtp-Source: AK7set+SPQZ6C5vcTjvZvGBjyEAyg9bbTRiZAn/NdZc4YImGYefo07TVtioL/ZQz7tHiCquhIc1AtA== X-Received: by 2002:a62:1881:0:b0:590:4a94:4f54 with SMTP id 123-20020a621881000000b005904a944f54mr136761pfy.0.1676631711721; Fri, 17 Feb 2023 03:01:51 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:90b:e82:b0:234:2ef4:2e9 with SMTP id fv2-20020a17090b0e8200b002342ef402e9ls1282240pjb.0.-pod-control-gmail; Fri, 17 Feb 2023 03:01:47 -0800 (PST) X-Received: by 2002:a17:90a:6485:b0:234:8c58:c325 with SMTP id h5-20020a17090a648500b002348c58c325mr6323239pjj.31.1676631707085; Fri, 17 Feb 2023 03:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676631707; cv=none; d=google.com; s=arc-20160816; b=C2c7OXxTauYI/bRamJwmpGpD1p9dIZcgl5dpHwE/6yfbPAspdrOmePul3bCDbxNx+J BQ52j/udaBvvNhI1s46tTwi1ilnLKSXOD5AV9hBLWdq5r+e5CnalH5bisLYUNaasQipu l9vlSlcVHLNb0PomyKMvMHOZXMzSBCgB0LoO3ADo+P4dtI4v3psWFl1E3XtVraVp5aSr eTFSjtmzyJqTrdI+P2ijlvjbN7Y/5L5tYBUHBKRWCYOWpZ3syJ9j82P+MvgGyc/cyn6Z 1+JLu87AGcE0wX3s7n67tdLjafO5JYbFbLAITd8M3XNeVs1ldF6keJKu8piBObPeCiib jshw== 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=8W5U8nCtEarvCi4k3MAMyIDWnHg9nbhtLz4rXFRR8Vs=; b=ffzaVGDYQIVRgaMLTA1oMhAuESsCXHWVU6cWV4b2zGPc833YriqkRsIu3JAalq+Pk4 Gyj68YwjmhYghRLkRYBr4wsgwCY9va/9nlW+idAIrB6iostKAnE+1EEA+ipu9sLVE35m penVsukfD5xIsO2YWTsQVrqKBy++l6aRIqhYEsGqW9KxyjHPjHxM0MQUm7G8VDStjrRx x+WepHK/Kim+stevcG+X11dQGYKQbXoUf4hVhgIrHsL0mKgtYOcGscbJBcEI0aFb0wvJ QbCIrt94W5uvgFAwmeN+DbT7sNiHbrZ9hKIOp8HxEbICL4BtEMst7x2XOzQdheXqBIvR csMw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="V/prgJ6R"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::534 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-pg1-x534.google.com (mail-pg1-x534.google.com. [2607:f8b0:4864:20::534]) by gmr-mx.google.com with ESMTPS id qi10-20020a17090b274a00b002347fe543c0si267490pjb.1.2023.02.17.03.01.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Feb 2023 03:01:47 -0800 (PST) Received-SPF: pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::534 as permitted sender) client-ip=2607:f8b0:4864:20::534; Original-Received: by mail-pg1-x534.google.com with SMTP id l16so468852pgt.5 for ; Fri, 17 Feb 2023 03:01:47 -0800 (PST) X-Received: by 2002:aa7:9e09:0:b0:5a8:d77a:2d66 with SMTP id y9-20020aa79e09000000b005a8d77a2d66mr1600750pfq.0.1676631706534; Fri, 17 Feb 2023 03:01:46 -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="V/prgJ6R"; spf=pass (google.com: domain of amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::534 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:32191 Archived-At: --0000000000004986bb05f4e33d95 Content-Type: text/plain; charset="UTF-8" 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/CAMwawgOzqqyDUYUCdHCh6t5Q0qe%2BBN%3DMGFCKM40gJawvQhHb_Q%40mail.gmail.com. --0000000000004986bb05f4e33d95 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 =3D 1+2$${ .cs #math:equation caption=3Dtest}

$x =3D 1+2${ .cs #math:equation caption=3Dtest}

~~~{
  .cs=20
  #lst:my-listing=20
  caption=3Dtest
  }
def f(x):
    return x
~~~

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

[ Para
    [ 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 multiline attributes for the CodeBl= ock element are not picked up. If I instead try pandoc --f= rom 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"
]
=

<= p style=3D"margin:0px 0px 1.2em!important">The attributes in the CodeBlock = element are picked up, but the attributes for display and inline m= ath are not.

Unfortunately, for my use case = I would like to be able to assign multiline attributes to code block elemen= ts 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 <ami= ne.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 8 Feb 2023 at 13:52Subject: Can math elements have attributes
To: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
=


Dear all,

I am writing my= own pandoc to latex converter using panflute and would like to attach attr= ibutes to Math elements. I have tried the following syntax, but it seems th= at the attribute is not being picked up by panflute:

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

= I did some of my own research to figure out what I was doing wrong. And a c= ouple of things became apparent:

- On the one hand= , it looks like pandoc might not support this:
=C2=A0 =C2=A0 - https:= //github.com/jgm/pandoc/issues/684
- On the other hand, `pandoc-cro= ssref` seems to be able to handle this syntax:
=C2=A0 =C2=A0 - ht= tps://github.com/lierdakil/pandoc-crossref

Is this currently supported by pandoc?= If not then how is `pandoc-crossref` able to handle it? Thanks for your co= nsideration.

Regards,

Ami= ne


--
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://gro= ups.google.com/d/msgid/pandoc-discuss/CAMwawgOzqqyDUYUCdHCh6t5Q0qe%2BBN%3DM= GFCKM40gJawvQhHb_Q%40mail.gmail.com.
--0000000000004986bb05f4e33d95--