From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32836 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bernardo C. D. A. Vasconcelos" Newsgroups: gmane.text.pandoc Subject: Re: Schemata - Can I use the output of tex markup both in PDF and HTML? Date: Fri, 16 Jun 2023 07:27:25 -0700 (PDT) Message-ID: <73f4ddae-a44c-409e-b008-427bf92e071an@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_246_1389866181.1686925645340" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19816"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDUKFWODQ4ARBTXCWGSAMGQEBD2Y46Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jun 16 16:27:30 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 1qAAQD-0004xV-VS for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 16 Jun 2023 16:27:29 +0200 Original-Received: by mail-ot1-f55.google.com with SMTP id 46e09a7af769-6b2c801ac6csf683287a34.1 for ; Fri, 16 Jun 2023 07:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1686925648; x=1689517648; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=rFlYJEMVANamdO+qc5BU1NVen1wsi08HhQLnA96mf3w=; b=F3DQGz5xl0hEAvr/MzxjRq+TAfXVSmnWnnFKXrFYin5hCx14+m6GwFt7/8Y83RmDIH BSyYCXPo8u70QbcsHxOWM/lI9sncGD1PX9+drD3n9a+ogi9uhBUSDuB9AsMW7Cud+Jiy KQ8dxwE6wV51A7/v76H8auov/k4QkXQ9Jm3ZwRxJ9VtihVN0dvQNyb/lxrk1T7uqChn7 pwzhOQsdt0iaLgEB+xEZLVZoOgrN2teEYmd9dOnCiS+8OEZJ3pUebomBoN8BzNIq+Y44 PWkuv+ciQ4CZ/fWU5jdAm204myo9skqKBmdmS8rH7f3/Vau/IWGLGgaZ0tp9vqHqH/vL 6j4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686925648; x=1689517648; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=rFlYJEMVANamdO+qc5BU1NVen1wsi08HhQLnA96mf3w=; b=iCaFCVW9a6O9U8u3Lirr1FFTNzr5fxF42ddK/POaKWyN5Pv1SXabAhhmR8pTLcZC1w D7SC476mTJ/YuQekYVt1eWiWq2GDl0qeo4DYSR3Jumnt7sdqeg62KVH/l1DuwrVSHDIj KG3GGDxwspEockusCP/cmHJiZMjTsgEOoFSNrPYMNGfpK8ijYgKgD0oIpnPoElsy0fSp rd/8qbpAiX/2ovzoQUE/1U1HfiouN0WXw8lAHQDYYP/lRvjf2sYgmpauZMy+BMT7Xwjs 3y8f3jVCqnWrviDHVP6v6T+ZplxPzuE0FIle55l/p++Sv7SmNZnXY7V9EiAglKEZ93PM 9nsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686925648; x=1689517648; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=rFlYJEMVANamdO+qc5BU1NVen1wsi08HhQLnA96mf3w=; b=RmlXsowp9OoaZE2YOqTbWQku9wQFSHiBXaiJvRMRIXzsFNUBnCMD5XJ3YUoNNVxJUl taIADac7zpMw5s7V6xTVjZ30Jo6G8K5Z2AyrhDaSwr9ldzt3XD6x8a6CTcUYV4Hj4zgL b5yOmcE4nNpoXIm60TyQtd9o+m4tqvhMXy0wnXAoHTuT3YZI/YEYVZTRwS4GKKhVylhP dm2YiGggmPxn6rNTtRh+x6BIpitDkpLJADzoAhvtP1hKVqC13aqbwTzSfudyl80mP0fg LloNMBURkFKu1m5Ny6Gd7vnTq2yku1ziLmlKemu6fQh40tMdtS Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDwp5R70r3il7tO5uDIreUmpX7dqanjsw5D+lM11iIq52cQ/o1YM iS71J48rzAjOjxLate7MDto= X-Google-Smtp-Source: ACHHUZ4Sd1eEw+acy2aYadMtxjpbHQTc6OrOcJtO11uTcppgRxOC+opJYw5VzEgskZdeKrx0abs2og== X-Received: by 2002:a05:6870:5495:b0:1a6:6683:8f4c with SMTP id f21-20020a056870549500b001a666838f4cmr2116186oan.39.1686925648660; Fri, 16 Jun 2023 07:27:28 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:e410:b0:177:8f4c:3302 with SMTP id n16-20020a056870e41000b001778f4c3302ls336421oag.1.-pod-prod-06-us; Fri, 16 Jun 2023 07:27:26 -0700 (PDT) X-Received: by 2002:a05:6870:b79c:b0:1a9:ac8c:d7e0 with SMTP id ed28-20020a056870b79c00b001a9ac8cd7e0mr618335oab.6.1686925646113; Fri, 16 Jun 2023 07:27:26 -0700 (PDT) In-Reply-To: X-Original-Sender: bernardovasconcelos-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:32836 Archived-At: ------=_Part_246_1389866181.1686925645340 Content-Type: multipart/alternative; boundary="----=_Part_247_1369963719.1686925645340" ------=_Part_247_1369963719.1686925645340 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the insights, BPJ! I was certain that I had seen or read about= =20 something that had already implemented something like this, but I was=20 probably mistaken. Once the opportunity arises, I will try to implement=20 your suggestion.=20 Thanks, Bernardo On Thursday, June 15, 2023 at 11:43:49=E2=80=AFAM UTC-3 BPJ wrote: > > > Den tors 15 juni 2023 15:47Bernardo C. D. A. Vasconcelos < > bernardov...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: > >> Hi everyone, >> >> There is a TeX package called Schemata t= o=20 >> aid in creating =E2=80=9Ctopical schemata=E2=80=9D, i.e. "outlines that = use braces (or=20 >> facsimiles thereof) to illustrate the breakdown of concepts and categori= es=20 >> in Scholastic thought from late medieval and early modern periods".=20 >> >> I would like to add the markup to create schemata to the markdown files= =20 >> and then have them output the results in HTML and PDF. At first, I thoug= ht=20 >> this would be simpler, thanks to the parse-latex filter=20 >> , but it isn't the case because= =20 >> the package needs to be loaded. Is this currently possible with the alre= ady=20 >> available tools (filters, etc)? >> > > That filter doesn't run latex, only Pandoc's latex reader, and you will i= n=20 > any case need to convert latex PDF output to an image format which can be= =20 > used in HTML documents. > > What you probably could do is to have a filter write the contents of raw= =20 > latex blocks to a file using the standalone class, call latex via one pip= e=20 > and then pdf2svg or ImageMagick through another pipe to obtain an image= =20 > which you can include in HTML.=20 > > Or probably easier: include the LaTeX as code blocks with a class and a= =20 > filename attribute. Then have two filters: one for LaTeX output which=20 > converts the code block to a raw latex block (which is super easy) and=20 > another one for HTML output which writes the text of the code block to a= =20 > LaTeX file .ltx then replaces the code block with an= =20 > image element with .svg as source file. Then after th= e=20 > pandoc run you use a Makefile or a script to run latex on the printed-out= =20 > files and convert the PDF files to SVG/PNG files with the right name. > > > >> Thanks, >> Bernardo >> >> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/ca67b3d3-5d49-4c05-9fdf= -a8836d39df33n%40googlegroups.com=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 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/73f4ddae-a44c-409e-b008-427bf92e071an%40googlegroups.com. ------=_Part_247_1369963719.1686925645340 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the insights, BPJ! I was certain that I had seen or read about s= omething that had already implemented something like this, but I was probab= ly mistaken. Once the opportunity arises, I will try to implement your sugg= estion.=C2=A0

Thanks,
Bernardo

On Thursday, June 15, 2023 at 11:43:49=E2=80=AFAM UT= C-3 BPJ wrote:


Den tors 15 juni 2023 15:47Bernardo C. D. A. Vasconc= elos <bernardov...= @gmail.com> skrev:
Hi every= one,

There is a TeX package called Schemata=C2=A0to aid in creating = =E2=80=9Ctopical schemata=E2=80=9D, i.e. "outlines that use braces (or= facsimiles thereof) to illustrate the breakdown of concepts and categories= in Scholastic thought from late medieval and early modern periods".= =C2=A0

I would like to add the markup to create sc= hemata to the markdown files and then have them output the results in HTML = and PDF. At first, I thought this would be simpler, thanks to the=C2=A0parse-= latex filter, but it isn't the case because the package needs to be= loaded. Is this currently possible with the already available tools (filte= rs, etc)?

<= div dir=3D"auto">
That filter doesn't run latex, only = Pandoc's latex reader, and you will in any case need to convert latex P= DF output to an image format which can be used in HTML documents.

What you probably could do is to = have a filter write the contents of raw latex blocks to a file using the st= andalone class, call latex via one pipe and then pdf2svg or ImageMagick thr= ough another pipe to obtain an image which you can include in HTML.=C2=A0

Or probably easier: inclu= de the LaTeX as code blocks with a class and a filename attribute. Then hav= e two filters: one for LaTeX output which converts the code block to a raw = latex block (which is super easy) and another one for HTML output which wri= tes the text of the code block to a LaTeX file <filename-attribute>.l= tx then replaces the code block with an image element with <filename-att= ribute>.svg as source file. Then after the pandoc run you use a Makefile= or a script to run latex on the printed-out files and convert the PDF file= s to SVG/PNG files with the right name.



Thanks,
Bernardo

--
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 pa= ndoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pando= c-discuss/ca67b3d3-5d49-4c05-9fdf-a8836d39df33n%40googlegroups.com.

--
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://groups.google.com/d= /msgid/pandoc-discuss/73f4ddae-a44c-409e-b008-427bf92e071an%40googlegroups.= com.
------=_Part_247_1369963719.1686925645340-- ------=_Part_246_1389866181.1686925645340--