On 05/30/2023 02:30 PM, H wrote:
On 05/29/2023 12:31 AM, H wrote:
On May 28, 2023 8:50:56 PM EDT, H <agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org> wrote:
On 05/26/2023 03:43 PM, H wrote:
No CSS (I had mentioned that in a previous message), also no modifications to the markdown file so the entire interpretation of layout, adding style information etc. needs to be in my custom PDF writer. This custom writer will - obviously - be specific for this single dedicated use by myself.

Any pointers (links, code fragments to look at etc.) as to how I should traverse the tree to be able to output my custom PDF would be greatly appreciated since this will be my first pandoc writer.

I am making some progress working on my custom writer for my desired html output layout. I am using the 3.0 syntax where the output function looks like

Writer.Pandoc = function(doc)
    return Writer.Blocks(doc.blocks)
end

At the start of my document I also have

Writer = pandoc.scaffolding.Writer

with customization added for inlines and blocks added.

In the Writer.Pandoc function above, is there a way I can see exactly in which order the document is evaluated? I am interested in exploring traverse = 'topdown' vs. traverse = 'typewise' as I think the topdown traversal will be required to add the necessary <div> and </div> in the correct locations to my final document.

Again, please bear in mind that I will do /all/ processing in this my custom lua writer.

Thanks.


Upon further reading, it looks like the traverse directive might only be applicable to filters when the AST is being processed

Is this correct? If so, is there anyway I can view the traversal processing sequence in my filter when I am writing and debugging it?

Hoping someone can shed some light on the 'traverse' directive and how I can debug my filter using different 'traverse' directives.

Thanks.

Upon further experimentation, it looks like outputting to 'native' format, ie the AST tree after running a filter will show me what the modified tree looks like.

It would have been nice to have some version of 'verbose' to apply to a filter to see in which order elements are processed.


--
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/05ba5663-1578-d555-8539-d6a2bdff6743%40meddatainc.com.