public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Schemata - Can I use the output of tex markup both in PDF and HTML?
@ 2023-06-15 13:47 Bernardo C. D. A. Vasconcelos
       [not found] ` <ca67b3d3-5d49-4c05-9fdf-a8836d39df33n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Bernardo C. D. A. Vasconcelos @ 2023-06-15 13:47 UTC (permalink / raw)
  To: pandoc-discuss


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

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)?

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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Schemata - Can I use the output of tex markup both in PDF and HTML?
       [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>
  0 siblings, 1 reply; 3+ messages in thread
From: BPJ @ 2023-06-15 14:43 UTC (permalink / raw)
  To: pandoc-discuss

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Schemata - Can I use the output of tex markup both in PDF and HTML?
       [not found]     ` <CADAJKhA11jF4h=3DrACL534=hKWCbxJao-EC26z4cn_11zPShw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2023-06-16 14:27       ` Bernardo C. D. A. Vasconcelos
  0 siblings, 0 replies; 3+ messages in thread
From: Bernardo C. D. A. Vasconcelos @ 2023-06-16 14:27 UTC (permalink / raw)
  To: pandoc-discuss


[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-16 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 13:47 Schemata - Can I use the output of tex markup both in PDF and HTML? 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 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).