From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31759 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: custom LaTeX writer example Date: Tue, 15 Nov 2022 11:48:02 -0800 Message-ID: <493DA04D-5B8D-4D3A-8A26-35A8A34E64AB@gmail.com> References: <34e5e93b-8832-40d3-8803-8e5a12b5290an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="22597"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBB5OZZ6NQMGQEYVFZW7Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 15 20:48:09 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f187.google.com ([209.85.219.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ov1ui-0005gD-O7 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 15 Nov 2022 20:48:08 +0100 Original-Received: by mail-yb1-f187.google.com with SMTP id c188-20020a25c0c5000000b006d8eba07513sf14257887ybf.17 for ; Tue, 15 Nov 2022 11:48:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668541687; cv=pass; d=google.com; s=arc-20160816; b=eEnZ52OCGEqKFRUTgfEif9rO97EUCobwyuiBm4TQrDzzFixl9klhyv3YmRkd4KRvu5 XoSwv3e7xlUjmlreWXRY1OQjZ6x1TmOXnyGCzD0EaRjUQjmcvlrJ8tIRZuecr6d4XjsN 1+XpLoODocF+ei9mk/cfSRHPl+kuwwGcg2+eQl/ZGEkFTuVk7egCvjj0Mv3Y8882xLBg ZojuhxXZaM7f667dHAe3k0t32q1GC9suRk8sWBnhvNhutlbIaItUQuprpFlB6FAHhW2u Bv5yc+5BGUsq6XiSffdrdHVzPTYF487cMXYscC6IiR8rFsAp8oD6nJ6BoWg/YOQGUq+Q 5XrA== 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=AWTqR8F/l5+2XEfqvs6nfM9Bti5p3YX1IxiF39JtsYg=; b=a2maKDU6ISQkCL4wVfj4OIFfDR7TqcYEGoRyq+SxfgU9HVCk6sQCgy1cbbY7vG2OIp b/H2OltsJ7lVkbFJS7QcG4hARLPnexw75A4eLNL3htMMoeb0cl9+7heSgFB/uciZMtfi l2mQZwGCR5WBLsuviPr+K2LluO2teUZ2o71bIgg3rehzjT8qseapIglB7ryHXqeALhQW fbB/XTibBaauhoAPMdUl9wsaNFyu4ycue6bUyJUzZE64DrwVY2LUO0tk4081DAjMfgZ1 S8NEdAol32FMeRS+Z9e2KEwFUomsOw/UuAvRU3wMRz6WlnjSLCml6sIMBCdTLIbA25sd 17oA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="fyUUE/Aw"; 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=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: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=AWTqR8F/l5+2XEfqvs6nfM9Bti5p3YX1IxiF39JtsYg=; b=eYgiFeR1JbZ6bLbgksFOXqS/m2sWl+zEPOCUf89JeUDOJ4Yi24Dt2CLL5Is20Jzbl7 mBqtAsj0xnzf3QEcVaWCE4/R3n5GDOnuNW50dVjCXiseyGy09IAA7Gcd6GLh7Pfu5Yb5 AWog3HkXY33Knbo6RrG2ojOKxGV2vR9/GXbTrIJl2Fc+dKubP7hdyhyWRq76jFlb8RVx DFF9X6NXQk4LyrntSMd7dU6FSN2990rvMyYa3sCxQD2w7/L3nglasyPe0T5hmkykWBlH FAIGQaWXQ2IGVN01MveXfj7xjtLuXV52xEDKXrukv/69X7y52nvZQuCft2qo+QPlL 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: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=AWTqR8F/l5+2XEfqvs6nfM9Bti5p3YX1IxiF39JtsYg=; b=PnZQ5Hy+W6vS58laW+XV5jhXJqj5zAwZEt58pQAKkiXN3/SBE4IAFtSrd/U0PfCqyr VWdgBHlbXLcYlNLgfj57Hbju9Z83/dwVFcqs/oe0GkpyvY+EDsyuJZVgNRz2WI6oH3tH LOeyX7my4uV91b7pvEv8iIt++6dv89nstNkV+b6equ1M/kpw9FtjX120aoU8m5crxZPx EuxCFR2icPt6oVHXckVjSU3FsxfCudDW/QLOykQxjTQQ81sIE8lXjvfsMPIP8ZdMCCdY 79XRO9efAXVH6KXCNHMnOxDqghI+jSChCFcCprk8tAQdcu584RRsLnNv4tlZ9XMOGrwA / 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=AWTqR8F/l5+2XEfqvs6nfM9Bti5p3YX1IxiF39JtsYg=; b=7eIeZTIBc5UXZkKfrlZlV6+VPyK+VWmBP8xxeKYp9SQLofiSkx0i6Is7UMexBgca+y 0iLPmrWLaygA5yNhenZabpDARI1OhlLBzxUdla1s4+A2Vvo3BvLtLhR859QTLFeuD3Q2 Ms/wQOeH2Z249d+HwgLegwRuI7X/xUEX5LptuHHn5//VmgS60zGx7zQK1zj4OG1zMFLn lbzpGs5zuLo1t26eJgCoGtoyzZVBWVO09pbw01+HGLbqKs+nCip39v5IugwGLLeJQBdv xFwEYdQQDH2n7fBi6Ru4 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkuLShA9gG+c0dE/mldo0WBK99xSWaYvSGPumrAoAI7uwAaBfKV 8Znu6B5C8OQs3zizLk4mWx8= X-Google-Smtp-Source: AA0mqf5EDuRq0Q08/5KR5X5m/4hENRYGN875W3OG0hps2gPBvj619WGeyv2hLyu1YoWvEMNEX4j0pA== X-Received: by 2002:a81:f15:0:b0:368:e6c9:3ab4 with SMTP id 21-20020a810f15000000b00368e6c93ab4mr18663625ywp.397.1668541687727; Tue, 15 Nov 2022 11:48:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:b21c:0:b0:6cb:d428:7c50 with SMTP id i28-20020a25b21c000000b006cbd4287c50ls9415039ybj.4.-pod-prod-gmail; Tue, 15 Nov 2022 11:48:05 -0800 (PST) X-Received: by 2002:a5b:c4c:0:b0:6df:1528:d64c with SMTP id d12-20020a5b0c4c000000b006df1528d64cmr16716909ybr.143.1668541685106; Tue, 15 Nov 2022 11:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668541685; cv=none; d=google.com; s=arc-20160816; b=CFR5GeNpe5GhIPJb/xXU1z3z0MibesKbuSutXrJH6lcTD5FzJAV8BmTpmiQ7wsa+D+ 0EJyt6AG7+tz4ESGTi6yoaiwcGljRRJ53J2oLlyiQcBUi6B+Ca8fEytKYEUtl/V63hLg 4uQjYaaw3Kjg9YCmSg83wljqYJ/VuZxWfJupUJeJIKeCNqVKWCxzkndCma54oM/ySe0N dzq864jg5NThn/KsZA5AepCiJrUMP1HXCzae4DZhMBosf1Z1BYYAde3bIFbGOH2jB33+ c20pKNLyAAUYuNF0Dmp2z7Bo18z8hcwHTN2iC6E5ynfwX4DykZPSLVjpEyeDj6bto21Z PSow== 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=PnoQPB/bRxwkJY4gm5pMiZlIeEO16rzV5UcA1mpjZTg=; b=h0vuUDU/B5A3UKsAI7Qn/YAlreb11bCRJZjbZgNNAhOGQnYjq3YBE8Hi/Y5yVz4kUw 9FLaREVJHH2InbU4TUn3xvKWsPObrKPQ5rL6r2Bhj9569A41y7nrIwympdNBPQQSk4Fx TrNxnW6QUODEAYG3Ypn2zK9r8Zp+sQ3woa5mRbkbyuLdlD+TYkmdPnh30OkVvgCX1n9v F21NeNnCtlD5QQksOWDoI+b61tet4oEq2qyvgGfJVR39PD/e5N5x82KYB0J9CqjGlrNx TrtgOFaLzN5opkJwE6rC5pjWkOSn4bQUfNg0L0bnFYPhPkdHbQAMZ39runCGyDxuAm6y lzzw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="fyUUE/Aw"; 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 d8-20020a25be48000000b006cfe797b938si802523ybm.2.2022.11.15.11.48.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Nov 2022 11:48:05 -0800 (PST) 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 v17so14130652plo.1 for ; Tue, 15 Nov 2022 11:48:05 -0800 (PST) X-Received: by 2002:a17:90b:48c2:b0:213:600:36a1 with SMTP id li2-20020a17090b48c200b00213060036a1mr15308pjb.14.1668541684015; Tue, 15 Nov 2022 11:48:04 -0800 (PST) Original-Received: from smtpclient.apple ([2601:644:400:7c40:bc21:3795:6d7b:5d13]) by smtp.gmail.com with ESMTPSA id o15-20020a170902d4cf00b001754fa42065sm10418583plg.143.2022.11.15.11.48.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Nov 2022 11:48:03 -0800 (PST) In-Reply-To: <34e5e93b-8832-40d3-8803-8e5a12b5290an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) 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="fyUUE/Aw"; 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:31759 Archived-At: I'd recommend using a "new style" writer and just replacing the code that f= ormats tables. https://pandoc.org/custom-writers.html#new-style > On Nov 14, 2022, at 7:30 PM, bapt a wrote: >=20 > Hi, >=20 > I'm hoping to play around with custom writers, to understand a bit better= how to turn pandoc's AST into a specific output format (for example, I'd l= ike to use tabularray syntax for tables in LaTeX, and it seems "cleaner" to= use a writer than to inject raw inline LaTeX via a filter into the AST). T= he html writer example is quite useful, but since I'm aiming for LaTeX outp= ut, it would be helpful to have something a little closer in syntax as a st= arting point. >=20 > I searched a bit and the closest thing I could find was a plain TeX write= r at https://github.com/drehak/pandoc-to-markdown > but this is perhaps not as helpful for learning because most of the magic= seems to be delegated to custom TeX macros. (A good strategy, but I wouldn= 't know (La)TeX well enough to perform some of the more complex processing) >=20 > I wonder if someone here has a minimal (or complete!) example of a custom= Lua writer for LaTeX they could share? >=20 > Many thanks, >=20 > baptiste >=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/34e5e93b-8832-40d3-8803-8e5a12b5290an%40googlegroups.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/493DA04D-5B8D-4D3A-8A26-35A8A34E64AB%40gmail.com.