pandoc-crossref icon indicating copy to clipboard operation
pandoc-crossref copied to clipboard

"List of tables" contents not rendering as links in HTML

Open bluegate010 opened this issue 6 months ago • 2 comments

I'm having trouble rendering the "List of Tables" as having links when converting to HTML. The following minimal repro is running on macOS.

$ sw_vers
ProductName:		macOS
ProductVersion:		15.4.1
BuildVersion:		24E263

$ pandoc --version | head -n 1
pandoc 3.6.4

$ pandoc-crossref --version
pandoc-crossref v0.3.18.2 git commit UNKNOWN (UNKNOWN) built with Pandoc v3.6.4, pandoc-types v1.23.1 and GHC 9.10.1

$ pandoc --metadata=linkReferences --metadata=nameInLink --filter=pandoc-crossref --citeproc --from=markdown --to=html << EOF
\listoftables

+--------+
| Header |
+========+
| Cell   |
+--------+

Table: Example table {#tbl:example-table}
EOF

<h1>List of Tables</h1>
<div class="list list-of-tbl">
1. Example table<br />

</div>
<div id="tbl:example-table">
<table style="width:12%;">
<caption>Table 1: Example table</caption>
<colgroup>
<col style="width: 12%" />
</colgroup>
<thead>
<tr>
<th>Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell</td>
</tr>
</tbody>
</table>
</div>

I would expect that the line 1. Example table<br /> would render as <a href="#tbl:example-table">1. Example table</a><br />

Thanks for any support you can provide.

bluegate010 avatar Apr 29 '25 10:04 bluegate010