From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33208 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: Fri, 20 Oct 2023 10:26:58 -0700 Message-ID: <464EF7B5-5A64-495A-A195-CC62A3D2A637@gmail.com> 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" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25573"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBZ7QZKUQMGQECRKHAFY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Oct 20 19:27:07 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f186.google.com ([209.85.160.186]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qttH8-0006OU-On for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 Oct 2023 19:27:06 +0200 Original-Received: by mail-qt1-f186.google.com with SMTP id d75a77b69052e-41b83b3fd18sf12768881cf.3 for ; Fri, 20 Oct 2023 10:27:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697822825; cv=pass; d=google.com; s=arc-20160816; b=EPiRCyWB8/08JhQAcFkNSqD/38L+Qw+/fTmnJiAqrJ5xl4g9ZlzxM8w8ShyrE60y69 9s7su9+yXrTrEnfHKG9316ZN2BKm8eHpOIV7CYwaUKOsZ1Wv3adqO+dE6CWhnyaZ1nGI o9ygf7z2d3pEPN5yjn3Kl8Rdi6/CHzU1fTBdJXILTRlCZGcj1usoroMRxBgUefbm8MA6 wNCJEdk7vPMQtcf9SC6Tfm5AGwUX+Em36yx+DBjwgK2O6uKtr2A5GFZmTXxvyUS2JVAo jQLX1jki5h5Ph4mWoVsqFEi0nDzgUAUtbAfPTkDhNNrWQvoV1jb7YaP4g0Dqrw36QgdG Qagg== 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:from:sender:dkim-signature :dkim-signature; bh=X9/xZ0icauGAduVV1ZpRG73C7wa8OL3JLwOOvgz15qQ=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=SboSHR0WJSCdnShlza4iixh89Fi5aAJ9L5gWNwbRV4su0igHS+VvsHvqRKzVWKLnkf pgT5ywyx2jTt30tCdRab6ZqyxZ9Eqe0/PHD6gQ63EXMI1XA1ZQLavR/rbyXrQB9ZmcPJ FjFxUEtIl6GYhb1iE9I+N21BjqMC0APdL3Q9dalpuWiHRRPQSl35o87Srhdyf5d1wL4o 8Lx27bFUYtJJQfETn/Yk1j0KxElojuuESHhctFTicUrq6LH7X4HPEitRYy+XEto8aqf6 QF18xuMEbO3BTFvjeXTRfN9aCsfZ/VMg1YmDwYJs0U+AJIPe/cAZbM4gEfeEbIskDdUB aIyQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eXZkskaF; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62b 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=1697822825; x=1698427625; 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:from:sender :from:to:cc:subject:date:message-id:reply-to; bh=X9/xZ0icauGAduVV1ZpRG73C7wa8OL3JLwOOvgz15qQ=; b=gnoDvob6zUClaL6TpxHmp4hvvQTOPXz9qELibXE5inqtdV4y11yLGL9lQVxYY4fVWH g/eX46gjJbVilm+etf9uQIWNoB6gwEbZ9ZchNKEHjRZTRLfodEXvX9A/8sq3ey2izfmD jCajxMFhz3msv8ko1pxG6lbR4PrCtggvDmCdbvv3rM4NlNUT8iBsmEsn6n1ManCphA8R uSJwnTJ/WrvVhASh2RIDpHOwIsjENfbuag6drQw2oy1KAPzurNQfeUSoZvI3XoRJT0Qg vGf8zoCahoMC9wUnGyeHBhni57mMSPXVRB0MzAdfFDdEd73DFXBJ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697822825; x=1698427625; 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:from:from:to:cc :subject:date:message-id:reply-to; bh=X9/xZ0icauGAduVV1ZpRG73C7wa8OL3JLwOOvgz15qQ=; b=H0UsEycAPGslPXu6h2I2BMhxnCvhp60c0/ua05XsU+n+MYmqo7nt8zJPkQyxvehc2k JPrvee8ujwxSnug6uiMtk32sP67ciAYiQa9t+bkoczzxQ+jpdHZ1ZURhzrSinO9s3gyg QK+iDUrglAAhEhGjZRJk8JrIaYQY3AlPkzCY+jUhODEIQP/oTb3uh6vaPjVU+8dtRIcK Cu9+lTNTySTbBL6SThOEcWsCMXvMeQyuNGCRdgTVB9dybkEwMwrSUQ1t2kxUlSKH0XhU S30wVHo+w2ePviqvqmxoNZ5Qt7CBct5Z02QVYmkuw5kxjrQs2lL/wC/9KH4nL1xMOe X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697822825; x=1698427625; 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:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=X9/xZ0icauGAduVV1ZpRG73C7wa8OL3JLwOOvgz15qQ=; b=lLOYpqDIwrE7BQiJlLvAfrgEJ1+hVwwIIzbL37lBIeaftaUXAjEk4m3/ik8jz9HQ+6 DUUcNCHi7+5JEHN82ETfHDTrL9boFe/qBC6xt8SSHeZz5LWSEBNWoW3i4ssmBJh6epuX QzqeCh/L/G8AB3ucmL/VZV+M7NqdBWHATajDrsjjbOWON0ugYSB6/2wB7b2l01lFZ9Xa dP+IzInBCM5lEcFP9EmPfLLgjAABA/ROpEv1m41xcXWP5cdczmEsS83jpTpHf7d3WnMM 6/CSVP Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0Yw8RDyVT7W4i1Gaw0hzIe/baZisqtT4Jtt0bABb9AS1ooD4W5MQ +4NhUKVtjMNtWKph44Z57sk= X-Google-Smtp-Source: AGHT+IEvPlykcwJaQjIeGuaKCaHjLbSce+0pvfsAJTvbGuah6/S3Kr3/aQ6jniaVL2t9xstZAxjHaw== X-Received: by 2002:ac8:5c0b:0:b0:417:b026:793f with SMTP id i11-20020ac85c0b000000b00417b026793fmr3281659qti.29.1697822825710; Fri, 20 Oct 2023 10:27:05 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:622a:4d86:b0:419:693a:afb1 with SMTP id ff6-20020a05622a4d8600b00419693aafb1ls665800qtb.0.-pod-prod-09-us; Fri, 20 Oct 2023 10:27:02 -0700 (PDT) X-Received: by 2002:ac8:5c95:0:b0:418:194a:f9fe with SMTP id r21-20020ac85c95000000b00418194af9femr2693919qta.62.1697822822478; Fri, 20 Oct 2023 10:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697822822; cv=none; d=google.com; s=arc-20160816; b=pTgAuYUtmJwssCPCEszWph6QR3ppyhlDswTTbjpRBsPG29+hXn5fWWCGBSHgRGai2d m/kqFVdZKwb7StVWD3MYvORbew9XGXYkIZox4bDzsB37DTBU8uD2Cx5V/aXNcj/XbLmj d+Uqk2qD1q0xu45nW/sgZrxfphLrSFqtsKTOQpb467mpCjwcSJ0RWK7TUNjDPRWJ7fcx Do1GnZDAhNxp5F/u8eJPCNvKrD8irZFADazz1kihuajPRN6wLtucLSVoveuIU1mNeDtg 4BJAYS2s1IbnHK2Zk15APAkarJT7WDzgqaBU1vJDhRStdxSGGMeJCEYpbzVtVxEsdaeF Gagg== 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=Vuq95LxfRMnxOAPiZW1MI4jidBQfozAr3R/WOdQ+Ef0=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=RBPwSk1kiH5CosG/4FtwRwA3uV1rVV9wDNAHUL2wZXuuQtdCTJYuwsBKmTuSlA5hjb Jy40aLnJlgYn2O/pOjexVyagq5oqWrbYrxgkVCAeyl/G3RAEM1QZ1HlPF3Xca6g7PD1C Fv+J57/o/bMqjVX91fXHhW9H2zlmrYUacaVV/+4X1rgXMYrH8ymqGX4rUdlAQuZP19mn YEz8Xc7MiKJdpwDggiyg8z9feJfA4LWS8pGbEyUBx4eToOzqRa59naW4lSFL5KnXmXwS +F8YN8nSw2b6x/5qvhogzsm+WTeooM2eTGwVhKLH6YGsLfV79oZp/lEPkiOKpLG7OxNj n57A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eXZkskaF; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62b 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-x62b.google.com (mail-pl1-x62b.google.com. [2607:f8b0:4864:20::62b]) by gmr-mx.google.com with ESMTPS id j5-20020ac874c5000000b00417048548c7si180029qtr.2.2023.10.20.10.27.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Oct 2023 10:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62b as permitted sender) client-ip=2607:f8b0:4864:20::62b; Original-Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1c9fa869a63so8195045ad.0 for ; Fri, 20 Oct 2023 10:27:02 -0700 (PDT) X-Received: by 2002:a17:903:18c:b0:1c9:d46e:d523 with SMTP id z12-20020a170903018c00b001c9d46ed523mr3256209plg.7.1697822820845; Fri, 20 Oct 2023 10:27:00 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:4701:23f0:a802:5c4:d368:9766]) by smtp.gmail.com with ESMTPSA id b15-20020a170902650f00b001c6187f2875sm1813788plk.225.2023.10.20.10.26.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2023 10:26:59 -0700 (PDT) In-Reply-To: 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=eXZkskaF; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62b 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:33208 Archived-At: > On Oct 20, 2023, at 12:40 AM, Guillaume Dehaene wrote: > > > Thank you for your insight. > > 1. I'm not 100% satisfied with your solution since it does not work with latex environments which open math-mode (such as a align). These produce errors because of the double-opening of math-mode. It's also pretty cumbersome compared to usual md. > > I see that this is how pandoc parses typst equations (I should have looked!) > [ Math > DisplayMath > "\\begin{aligned}\n1 + 1 & = 2 \\\\\n1 + 1 & = 2\n\\end{aligned}" > ] > > Is that now going to be the accepted format for multiline equations? I'm not sure I understand. This has always been possible in pandoc (and LaTeX); we use it here because it's the way to get equivalent LaTeX math to the typst formula. Side note: in pandoc you can also do $$ \begin{align} x & = 5\\ y &= 3 \end{align} $$ even though this isn't possible in LaTeX. Pandoc will do the right thing the output format. Try it. > 2. I had overlooked the possibility of writing a filter. > The principle of the filter would then be: > > parse DisplayMath > if there are & and/or \\ present, modify the block > depending on writer: > - latex, HTML: transform to align > - everything else: transform to accepted format(??) \begin{aligned} > > Is that correct? If so, I'll start hacking at it in the near future. Yes, something like that.