Hello,
> in a Markdown > HTML workflow, I am looking for a way to create “index”
> pages for a page set that will contain linked lists of block elements (e.g.
> all headings or figures) in that set.
>
> So I’ll have 1.md, 2.md etc. converted to HTML (1.htm), and I’d like to
> generate e.g. a “h1_index.htm” with links to ID’d H1 headings:
>
> <li>1<ul>
> <li><a href="1.htm#first-heading">First Heading</a></li>
> <li><a href="1.htm#second-heading">Second Heading</a></li>
> </ul></li>
> <li>2<ul>
> <li><a href="2.htm#first-heading">First Heading</a></li>
> <li><a href="2.htm#second-heading">Second Heading</a></li>
> </ul></li>
>
> Same for other block elements such as <figcaption> to generate a linked
> list of illustrations.
>
> Can someone suggest how to approach this using only Pandoc (filters)
> instead of using a separate tool?
I would avoid constraining myself to using only Pandoc for everything.
Even Pandoc uses external software package LaTeX for generating PDFs.
I would create a script (or rather a set of scripts) that processes the
files, extracts heading and figure information and creates input file(s)
for Pandoc with the indices.
You can also use custom Lua writer to produce files with indices.
Another option is creating a filter, but this seems to me like slightly
weird way for doing that.
Write me (or to the list) which solution would you like.
Jiří.
--
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/9ee132fd-6023-0bf6-02f5-5f72e56392fb%40gmail.com.