Perhaps a filter which runs after pandoc-crossrefs and relies on the stuff which pandoc-crossrefs inserts would be reasonably feasible. Unfortunately I can't look into that at the moment but maybe someone else can.

Den tis 8 okt. 2019 02:12Count of San Francisco <countofsanfrancisco-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Hi,

Since MD to HTML and PDF are my main use cases, perhaps, we can concoct
something like for every <a> or <p> with and id attribute that starts
with "figure-caption-" or "table-caption-" be used by pandoc to create
the list of figures or list of tables. The user, if they chose, can
embed an "<a>" or "<p>" tag in their MD.

For PDF, latex really doesn't cut it for me as it doesn't handle CSS
well (or maybe at all) and doesn't handle tables very well when it is
being converted from MD.

This would be a nice improvement for Pandoc.

Thanks!!

On 10/7/19 4:20 PM, John MacFarlane wrote:
> For PDF (via latex) you can set the `lof` and `lot` variables to
> true, e.g. with -Vlot -Vlof on the command line.
>
> You can also use raw tex \listoffigures, \listoftables.
>
> For HTML there isn't a way.  At this point we don't even
> automatically number figures/tables.  It could be achieved
> using a filter but I'm not aware of one that exists now.
> (Looks like pandoc-crossref handles numbering and references,
> but doesn't do a general lof or lot.)
>
>
> Count of San Francisco <countofsanfrancisco-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> How can I generate a table of content for figures (a.k.a images) and a
>> table of content for tables when converting from MD to HTML and PDF? If
>> this is not possible in pandoc, today, can you please make this an
>> enhancement request to Pandoc?
>>
>> --
>> 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@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/55c8e76d-a127-46ec-ac3b-5c24de9fb9ce%40googlegroups.com.

--
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/04b3560c-8ca8-e5a7-9630-e367a4c3c3c6%40gmail.com.

--
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/CADAJKhDJDLQiu3eZLPG46DENe57F9CW%3DFCN%3DzLG7%2BzH_OAAR3w%40mail.gmail.com.