-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of tables, list of equations, list of figures, and list of listings in html, odt, docx... #1965
Comments
I think this would be desirable but without looking at the current implementation I think the work would be quite involved. |
Hi Matt, |
Closing in favour of #813 |
I think this should be left open; it is independent of 813. |
@jgm Well... in my mind 813 has morphed into "Add attributes, auto_identifiers to tables and figures and generate listings of them". But yes, maybe it makes sense to keep it separate. |
TeX-based typesetting engines have a way of generating lists of tables, figures, equations, contents, etc. Typically it's fairly trivial, such as the following ConTeXt example:
The Primarily, this would benefit HTML, which lacks a simple listings mechanism derived from the document structure. |
I would like this enhancement too. For a markdown text conversion to HTML, I think if the markdown does something like this:
Pandoc can key off the text "table-" and "figure-" to differentiate between a figure and a table and auto generate a list of tables or list of figures from a markdown text and using the enclosing text as the caption for that table. For figures, you can use the MD syntax too. For me, I don't need the figures or tables to be numbered. |
I vote for this feature, as well. It would be nice to be able to output lists of tables and figures to html and other formats. |
Related issue for docx: #8245 |
The filter pandoc-crossref does LOT, LOF and list of codeblocks/listings and more for LaTeX and HTML-like formats. For LaTeX it mostly unloads to LaTeX but it provides syntax for captions, labels and crossrefs which Pandoc Markdown (mostly) lacks. List of tables and list of figures should be relatively straightforward to do with a Lua filter for formats where the list need only contain links and not page/chapter numbers or the like since those elements have captions already. It would be relatively straightforward to first walk the document top down and collect the captions, and possibly insert numbering into the caption, then do a second pass looking for divs with appropriate ids like |
Here is a pandoc-crossref related issue: lierdakil/pandoc-crossref#299 regarding docx lot, lof. |
Come to think of it would docx generate those lists automatically if you insert the right snippet of XML somewhere? Maybe that can be done with a template now? |
quarto-dev/quarto-cli#2464 (reply in thread) But @acxz just opened #10029 to add lof and lot to the docx writer, so perhaps no need to make use of the cool new templates for this... |
List of tables, list of equations, list of figures, and list of listings are needed in all writers, not just LaTeX. These are important elements in any technical or scientific paper and report, as important as citations and bibliographies. Could you clarify whether this feature might be implemented in all common formats (.html, .odt, .docx, etc.)? Thanks!
The text was updated successfully, but these errors were encountered: