public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <bpj-J3H7GcXPSITLoDKTGw+V6w@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: Thu, 15 Jun 2023 16:43:30 +0200	[thread overview]
Message-ID: <CADAJKhA11jF4h=3DrACL534=hKWCbxJao-EC26z4cn_11zPShw@mail.gmail.com> (raw)
In-Reply-To: <ca67b3d3-5d49-4c05-9fdf-a8836d39df33n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2930 bytes --]

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 <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-discuss+unsubscribe-/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/CADAJKhA11jF4h%3D3DrACL534%3DhKWCbxJao-EC26z4cn_11zPShw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4266 bytes --]

  parent reply	other threads:[~2023-06-15 14:43 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 [this message]
     [not found]     ` <CADAJKhA11jF4h=3DrACL534=hKWCbxJao-EC26z4cn_11zPShw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-06-16 14:27       ` Bernardo C. D. A. Vasconcelos

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='CADAJKhA11jF4h=3DrACL534=hKWCbxJao-EC26z4cn_11zPShw@mail.gmail.com' \
    --to=bpj-j3h7gcxpsitlodktgw+v6w@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).