In addition the reference to the listing is also inconsistent, \ref{lst:label} outputs [lst:label] in HTML.

On Thursday, 22 July 2021 at 16:11:21 UTC-7 Leena Murgai wrote:
Hi there,

I am converting from LaTeX to HTML5 and using pandoc-crossref version 2.14.02 for cross references to figures, tables and now code listings. I managed to get it to work for figures and tables but for listings I'm seeing some unusual behaviour.

Input LaTeX:
```
\begin{lstlisting}[caption={caption_text},
                   label=lst:label]
code
\end{lstlisting}
```

Output HTML5:
```
<div id="lst:label" class="listing">
<p>Listing chap#. lst:label: caption_text </p>
<pre label="lst:label"><code>code</code></pre>
</div>
```

Instead of numbering the listing using (what I understood was the default) arabic, it's numbering the caption with the label ```lst:label```. I tried setting

lstLabel: "arabic" / "roman"
setLabelAttribute: true / false

in the pandoc-crossref.yml. None of these made any difference to any of the cross refs (to figures, tables or listings). Is there perhaps a setting I missed?

Thanks,
Leena


--
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/c1c4c1b1-86cb-4a86-9d23-70dbd975d41dn%40googlegroups.com.