Den tors 15 juni 2023 15:47Bernardo C. D. A. Vasconcelos <bernardovasconcelos-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Hi everyone,

There is a TeX package called 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, 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-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ca67b3d3-5d49-4c05-9fdf-a8836d39df33n%40googlegroups.com.

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhA11jF4h%3D3DrACL534%3DhKWCbxJao-EC26z4cn_11zPShw%40mail.gmail.com.