tomduck / pandoc-eqnos

A pandoc filter for numbering equations and equation references.
GNU General Public License v3.0
221 stars 27 forks source link

Counterintuitive behaviour with `pandoc-eqnos` and images with html output #48

Closed kdheepak closed 4 years ago

kdheepak commented 4 years ago

If I have the following markdown file:

![](/images/diagram.png){ .fullwidth }

running pandoc test.md -o test.html gives this:

<p><img src="/images/diagram.png" class="fullwidth" /></p>

however,

running pandoc --filter=pandoc-eqnos test.md -o test.html gives this:

<figure>
<img src="/images/diagram.png" class="fullwidth" alt="" />
</figure>

I think it is counterintuitive that using pandoc-eqnos modifies the output for imgs.

I initially thought this was due to the interaction between pandoc-fignos or pandoc-tablenos, but that does not seem to be the case. I've uninstalled pandoc-fignos and pandoc-tablenos from my machine and I still get the same behavior. I'm also not able to find any code in this repo that would be responsible for this, so I'm not really sure what is going on.

kdheepak commented 4 years ago

After doing a little bit of reading and experimenting, I think this is related to pandoc's implicit figures and not actually an issue with pandoc-eqnos. I'll close this.

tomduck commented 4 years ago

Thanks, @kdheepak.