public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* announce: a Lua filter to recursively include other documents from a master document
@ 2023-05-23 15:35 mf
       [not found] ` <4f707c3a-0048-8fbc-a2fe-f33a70204590-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: mf @ 2023-05-23 15:35 UTC (permalink / raw)
  To: pandoc-discuss

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

Hello,

I just published a Lua filter for Pandoc that lets you organize a 
document in multiple files in a tree-like fashion, and assemble them later.

You can find it at https://github.com/massifrg/pandoc-include-doc.

The filter supports the inclusion of sub-documents through Div elements, 
whose contents are replaced by the contents (the blocks) of an external 
file imported through pandoc.read().

Those Div elements have a "include-doc" class and must specify the 
source and the format in the "include-src" and "include-format" attributes.

Sub documents inclusion is recursive and the filter detects possible 
circular references in the inclusions' chains.

You could already assemble a list of input files in Pandoc (i.e. see 
--file-scope in the docs), this filter lets you organize your documents 
in a tree-like structure.


Motivation: I wrote this filter because I'm writing a visual editor for 
pandoc types (= documents coded in the internal Pandoc format) based on 
Tiptap/Prosemirror.

Since the editor is browser-based, the size of the documents it can 
handle is much less than the size of the files converted by Pandoc, so 
it makes sense slicing them into smaller units (i.e. chapter, sections, 
etc.)

MF

-- 
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/4f707c3a-0048-8fbc-a2fe-f33a70204590%40gmail.com.

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

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

* Re: announce: a Lua filter to recursively include other documents from a master document
       [not found] ` <4f707c3a-0048-8fbc-a2fe-f33a70204590-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2023-05-25 15:58   ` mf
  0 siblings, 0 replies; 2+ messages in thread
From: mf @ 2023-05-25 15:58 UTC (permalink / raw)
  To: pandoc-discuss

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

Hello,

I just published a new version, that lets you store also the imported 
documents' metadata in the resulting document.

See 
https://github.com/massifrg/pandoc-include-doc#including-sub-documents-metadata

MF

Il 23/05/23 17:35, mf ha scritto:
>
> Hello,
>
> I just published a Lua filter for Pandoc that lets you organize a 
> document in multiple files in a tree-like fashion, and assemble them 
> later.
>
> You can find it at https://github.com/massifrg/pandoc-include-doc.
>
> The filter supports the inclusion of sub-documents through Div 
> elements, whose contents are replaced by the contents (the blocks) of 
> an external file imported through pandoc.read().
>
> Those Div elements have a "include-doc" class and must specify the 
> source and the format in the "include-src" and "include-format" 
> attributes.
>
> Sub documents inclusion is recursive and the filter detects possible 
> circular references in the inclusions' chains.
>
> You could already assemble a list of input files in Pandoc (i.e. see 
> --file-scope in the docs), this filter lets you organize your 
> documents in a tree-like structure.
>
>
> Motivation: I wrote this filter because I'm writing a visual editor 
> for pandoc types (= documents coded in the internal Pandoc format) 
> based on Tiptap/Prosemirror.
>
> Since the editor is browser-based, the size of the documents it can 
> handle is much less than the size of the files converted by Pandoc, so 
> it makes sense slicing them into smaller units (i.e. chapter, 
> sections, etc.)
>
> MF
>

-- 
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/d8f2592d-9354-3446-5b9f-95116467bca4%40gmail.com.

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

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

end of thread, other threads:[~2023-05-25 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 15:35 announce: a Lua filter to recursively include other documents from a master document mf
     [not found] ` <4f707c3a-0048-8fbc-a2fe-f33a70204590-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-05-25 15:58   ` mf

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