Skip to content

In HTML mode, \listoffigures and \listoftables do not render properly #229

@bluegate010

Description

@bluegate010

When rendering in HTML, an input file that declares:

    \tableofcontents
    
    \listoffigures
    
    \listoftables
    
    # Heading
    
    ```mermaid {caption="Flowchart" #fig:flowchart}
    graph TD;
        A-->B;
    ```
    
    +-----------+------------+
    | First col | Second col |
    +===========+============+
    | One       | Two        |
    +-----------+------------+
    
    Table: Example table {#tbl:example-table}

with a template that contains:

    <h1>Table of contents</h1>
    <nav class="toc">
    $table-of-contents$
    </nav>
    <article>
    $body$
    </article>

will render as:

    <h1>Table of contents</h1>
    <nav class="toc">
    <ul>
    <li>List of Figures</li>
    <li>List of Tables</li>
    <li><a href="#heading" id="toc-heading">Heading</a></li>
    </ul>
    </nav>
    <article>
    <h1>List of Figures</h1>
    <div class="list list-of-fig">
    1. Flowchart<br />
    
    </div>
    <h1>List of Tables</h1>
    <div class="list list-of-tbl">
    1. Example table<br />
    
    </div>
    <h1 id="heading">Heading</h1>
    ...

The entries in the list of figures and tables are not rendered as links, and the "List of Figures" / "List of Tables" entries in the table of contents are not rendered as links either.

As a temporary workaround, the \listoffigures and \listoftables directives are currently filtered out in build.sh when rendering HTML output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions