public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "Bernardo C. D. A. Vasconcelos" <bernardovasconcelos-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
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)	[thread overview]
Message-ID: <73f4ddae-a44c-409e-b008-427bf92e071an@googlegroups.com> (raw)
In-Reply-To: <CADAJKhA11jF4h=3DrACL534=hKWCbxJao-EC26z4cn_11zPShw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3331 bytes --]

Thanks for the insights, BPJ! I was certain that I had seen or read about 
something that had already implemented something like this, but I was 
probably mistaken. Once the opportunity arises, I will try to implement 
your suggestion. 

Thanks,
Bernardo


On Thursday, June 15, 2023 at 11:43:49 AM 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 <https://ctan.org/pkg/schemata> to 
>> aid in creating “topical schemata”, 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". 
>>
>> I would like to add the markup to create schemata 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 parse-latex filter 
>> <https://github.com/tarleb/parse-latex>, but it isn't the case because 
>> the package needs to be loaded. Is this currently possible with the already 
>> available tools (filters, etc)?
>>
>
> That filter doesn't run latex, only Pandoc's latex reader, and you will in 
> any case need to convert latex PDF 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 standalone class, call latex via one pipe 
> and then pdf2svg or ImageMagick through another pipe to obtain an image 
> which you can include in HTML. 
>
> Or probably easier: include the LaTeX as code blocks with a class and a 
> filename attribute. Then have 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 writes the text of the code block to a 
> LaTeX file <filename-attribute>.ltx then replaces the code block with an 
> image element with <filename-attribute>.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 files to SVG/PNG files with the right name.
>
>
>
>> Thanks,
>> Bernardo
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/ca67b3d3-5d49-4c05-9fdf-a8836d39df33n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/ca67b3d3-5d49-4c05-9fdf-a8836d39df33n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/73f4ddae-a44c-409e-b008-427bf92e071an%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 5379 bytes --]

      parent reply	other threads:[~2023-06-16 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 13:47 Bernardo C. D. A. Vasconcelos
     [not found] ` <ca67b3d3-5d49-4c05-9fdf-a8836d39df33n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-06-15 14:43   ` BPJ
     [not found]     ` <CADAJKhA11jF4h=3DrACL534=hKWCbxJao-EC26z4cn_11zPShw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-06-16 14:27       ` Bernardo C. D. A. Vasconcelos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73f4ddae-a44c-409e-b008-427bf92e071an@googlegroups.com \
    --to=bernardovasconcelos-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).