From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33206 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: User story: typst multiline math in pandoc markdown and pandoc AST Date: Thu, 19 Oct 2023 09:11:34 -0700 Message-ID: References: <672a5917-b04d-4eb9-966d-75b54df97837n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) 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="19304"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBOVKYWUQMGQEVKTOHRY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Oct 19 18:11:43 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qtVcc-0004mU-Fn for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 19 Oct 2023 18:11:42 +0200 Original-Received: by mail-ot1-f55.google.com with SMTP id 46e09a7af769-6c4e17f37acsf11629181a34.1 for ; Thu, 19 Oct 2023 09:11:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697731901; cv=pass; d=google.com; s=arc-20160816; b=MjbCsJB5FwniMIZlA/fDBPSPlcAVnG5kj9Bj6MLlJhbkVz1mCDkJjFhMQIMv/U+DNF PcQ71z88BP+wXgPALp/M2HKSbigvPyBy2yCdi6WP8Q+fwoOUfpzv4Owr9kV2gVEeDFoF jfI1jyLtdMVeYvUhWK8zK58Y09RTkdmyHV5q46Ag4/awrJ37PHe/+X9Mjr7feTDx/vhi N+AZoOvaV/AwH114eYlch6+gLvzxWzKc6bdvtYh8r3OtnF3aeB89FSoDxhst1ZOF7yKW 4NWwa5Y6dN0CCPS8iwUcsm320Lx4zn1pE0FwciaUyG5WB+8laXZy+GfCXwGrhTo1WhHc 2myw== 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=xFgXMs/JUqyDvd2o5iFHzdsyNZlpS3lTeXzWGMcjSTk=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=aLJOVF+xdhkIh3rAv+0A2opE0AZYuQDM+avUICUzLD4/AK59gztJ85uLGwp6cpQaBJ FTMjRyRcCzEMUNp40Hg4EHyX66m+Gyo5kLXFvQLoNR5DsM7iK96SqwaB6MNt7VnP/oUq dlQJVTNMoGZOeTmM2kwNbYaWGox6ZBVE/H5f8AKG2fYcw/uw7z2w4gjzaT0brl7tLSr1 impmSzwIL6mmMl+uoQ4e+oSkpmr/iWMS12ztGYSFWMygKkDS1VrFpjqBRPtCIro03Yhw T7LTq8rL/dpo8z/SKlYxFGROC/Yr+ucJzKFz3+P+TqM2Q0iA/Rb+FwfZPvOyxpIxj096 B2CQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dTezcSyR; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 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=20230601; t=1697731901; x=1698336701; darn=m.gmane-mx.org; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=xFgXMs/JUqyDvd2o5iFHzdsyNZlpS3lTeXzWGMcjSTk=; b=bJKAvClCX+YF9f8w2QgjZaHztCxzZXk49DZeUui5EihPTErX6QagLo0Pc/NpVBF37X 6CBAZMOVXe574Txt6aVBKqhEERxYyUkFLV9tp1OxoJkAgRsC1McNWj/JjQ0TpgSlFmr4 LlDRl1qdoXxLiF6TO6SgnfIiiglrhNP4AYNIhQXOKxoyQLa2N9cHmLAAwsnwYDcBzs0M z+RGH0QPcNi7qOwX9m/TNOYKwNwhBWZkWLGWlqLeSkBD25Aa5F/c+NHiv9bK85hKKVsS 8edbFjAEH2WxJrvO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697731901; x=1698336701; darn=m.gmane-mx.org; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=xFgXMs/JUqyDvd2o5iFHzdsyNZlpS3lTeXzWGMcjSTk=; b=c8GNI/fGI0sBvRAwjR29FYPMuTieN34VIiepc+Jm/qs04vVPNgEhIH9bglajqakFFf Pl/hlQ94mIZ+bA8lehJ/NSJC05/n4d1ektlcwFh2rkmNnruaisKfUMnLSuRQqpc+CHj1 2foL9xLTk0o33Em0g2Ns9gtvetDfqi5v4uQENeiyzifRCO2Qb8c3ZrP38hzlSVdKnh5K DUSBuEHWx/mlJlbzTlShUijibdk/6+S5HuiDTr3eGQ0oBxc+IBpSG1vttCF4y8UObF6U kiu2e2IyS9wEHQkiineoOv7me7BXJd X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697731901; x=1698336701; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=xFgXMs/JUqyDvd2o5iFHzdsyNZlpS3lTeXzWGMcjSTk=; b=D8DapxBO9dyI2cAcwdwfopiVUEzo6seucQRPo4r85Q3PjPufhyMfEEygiacSjANa0+ Fonf72KPmXwCKU1JeC/F5DbLquceo9GCoQnPjdzf2Iv0FRqxDnvTjQ2MPsFHh2yoXgqr ObrcjlTjAZkyjrMnSzWs1dl8/00DrBxUVw1kl2bhs82P1Ck2MvSrZn4cmDr0t9rjnIqF DLznfaq2fP/liTFQyO4SmClkP4cZ3cQeO8n0KNIqrBHe2/WK1JVT/e0WQN Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YwhCpu4Z2FoaP722D8y4lBmKzQw7Du2v3LlMoJjZr/JFcSW13sG LpR6l3NpiZ9KJ3xxcls7W4w= X-Google-Smtp-Source: AGHT+IGPdkrmw6UnF7LSJ4JoJuQOU+Ywnq1PNrybmQHSAN7Fq0OKa3UgzraZjDIZZAx+WvuK/FTB+w== X-Received: by 2002:a05:6871:5d4:b0:1e9:f69a:1302 with SMTP id v20-20020a05687105d400b001e9f69a1302mr3289314oan.48.1697731901278; Thu, 19 Oct 2023 09:11:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:f609:b0:1e1:5fe1:87e with SMTP id ek9-20020a056870f60900b001e15fe1087els133580oab.0.-pod-prod-02-us; Thu, 19 Oct 2023 09:11:38 -0700 (PDT) X-Received: by 2002:a05:6358:78d:b0:15a:8dfd:9c68 with SMTP id n13-20020a056358078d00b0015a8dfd9c68mr3065216rwj.27.1697731898037; Thu, 19 Oct 2023 09:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697731897; cv=none; d=google.com; s=arc-20160816; b=VoU+XKX+1tDw8ZQ5WGdMso0ZiBmvhcLggwpn9w/Gbhq+9SeKwCmeSgoupRykSG3a/v xtWiCFcaYfxlaDcXU44yDKt6NsX4b29YR0+ZRtBsQZGoz3IplLtWqC8TCu8va4/mpzFG VZlDcHkEzsfXvCLBmPJZFitTsxVVUMAG/rMcgU/FfM/qXNW8pVWrKXkDHYXQoCVm2qdE M0qpnl0pA18MeMueIXtso2qJV2ezRaMHonozBsECVSRFuPTHWBNgTDzpt4l2/HGhsesx LBPFlXPcbQU2v6u3wbzuXozZNuDnDU/nq/BEOZf+zp99DElSGsoZCv1ktxeJpgTs5oHQ vcvg== 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=N0RzGHjvhk8bSTy8Sptg6k3PjfbOb5upOvFuygz9xhs=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=Dw6b1RubkuD326KQDoLKghcBK99KwW72Mk1pwdEom4HiTtVlwZuE5gHSBYnB7hLOa0 QgKAs74urh+j9bBL7cdVUy3/8KydKorMz73YH6Xh0N4ovmN9cy7yHIgP95eY9Zya84DE 7MOIaWbO9aHVCtxymrWKUudo2+hQxbflQ3Nmw3mNFdlGHe0+G7S+X5q2AXwU+ofiU1XH ZKM8I+2DruAZjCc81Gi7PHQM1dP1vvOBfUVZJCbCY9K3lYv6xkfPmMilOKQbGEOdvwrA QTIp2xS5gvIUgPuzVJ0KAZ2D4o8vIN5NRh6Co/V/EPF/8ATqkvuvZz2cwCXxAGFVp9a3 RyoA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dTezcSyR; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 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-pl1-x632.google.com (mail-pl1-x632.google.com. [2607:f8b0:4864:20::632]) by gmr-mx.google.com with ESMTPS id a20-20020a056a001d1400b006beb9bae6a5si259027pfx.1.2023.10.19.09.11.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 09:11:37 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) client-ip=2607:f8b0:4864:20::632; Original-Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1c9b1e3a809so57548235ad.2 for ; Thu, 19 Oct 2023 09:11:37 -0700 (PDT) X-Received: by 2002:a17:902:9a4b:b0:1bb:f1d9:432e with SMTP id x11-20020a1709029a4b00b001bbf1d9432emr2682202plv.37.1697731897236; Thu, 19 Oct 2023 09:11:37 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:4701:23f0:2c35:ca0a:4c6d:d8a1]) by smtp.gmail.com with ESMTPSA id x3-20020a170902ec8300b001b9be3b94d3sm2116272plg.140.2023.10.19.09.11.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2023 09:11:36 -0700 (PDT) In-Reply-To: <672a5917-b04d-4eb9-966d-75b54df97837n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dTezcSyR; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 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:33206 Archived-At: > Pandoc provides a solution for almost all of these. The only issue is mul= ti-line equations. > A work-around I am aware of is to just use raw latex code like: > ```latex > \begin{align} > 1 + 1 &=3D 2 \label{first_line} \\ > 1 + 2 &=3D 3 \label{second_line} > \end{align} > ``` > which works fine when exporting to both HTML and latex: it is added as is= to the HTML where it is parsed by both mathjax and katex. Note that there's another way to do this that will create a native Math ele= ment in pandoc: $$ \begin{aligned} 1 + 1 &=3D 2 \\ 1 + 2 &=3D 3 \end{aligned} $$ > However, I propose that formatting equations like typst might be a good w= ay to make multiline math native to Pandoc, instead of piggy-backing on raw= latex. >=20 > Multiline equations could be written as in latex, wrapped in `$$ $$`: > ``` > $$ > 1 + 1 &=3D 2 \\ > 1 + 2 &=3D 3=20 > $$ > ``` >=20 > which could be parsed as a new DisplayMathMultiline type in the AST. > (This is a mockup: I really don't understand how the AST is written) > ``` > [ Math DisplayMathMultiline > [ > Math DisplayMathLine ["1+1", "=3D2"] > Math DisplayMathLine ["1+2", "=3D3"] > ] > ] > ``` >=20 > This type can be written to: > - HTML and latex: as an `align` block > - typst: as a multiline math block > - pandoc markdown: as a multiline math block > - other: as multiple successive displayMath blocks >=20 > I do not see how modifying the AST in this way would produce an issue: it= 's an additive feature as far as I can tell. Any change to our algebraic data types is a breaking change that would requ= ire modifications throughout the ecosystem (all writers and readers, filter= s, etc.). That's why we're very conservative about such changes and make t= hem infrequently and only with very strong reasons. I suppose one possibility would be to parse this syntax into \begin{aligned} 1 + 1 &=3D 2 \\ 1 + 2 &=3D 3 \end{aligned} which should work with all the formats you mention... You could even create a filter that does this, without changes to pandoc i= tself. --=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/E89C2FED-79B7-4150-B015-D11C177D3F9B%40gmail.com.