tomduck / pandoc-tablenos

A pandoc filter for numbering tables and table references.
GNU General Public License v3.0
108 stars 8 forks source link

Table numbers not incrementing beyond 2 #1

Closed nealkruis closed 8 years ago

nealkruis commented 8 years ago

pandoc 1.17.02

Markdown input:

A B
- -
0 1

Table: Even simpler. {#tbl:}

A B
- -
0 1

Table: Even simpler. {#tbl:}

A B
- -
0 1

Table: Even simpler. {#tbl:}

A B
- -
0 1

Table: Even simpler. {#tbl:}

HTML output:

Table 1. Even simpler.
A B
0 1

Table 2. Even simpler.
A B
0 1

Table 2. Even simpler.
A B
0 1

Table 2. Even simpler.
A B
0 1
nealkruis commented 8 years ago

This seems to happen only for tables without defined IDs. The first and second instances are incremented correctly, but any consecutive tables without IDs share the same number as the second.

A work around is to add a dummy ID to every other table.

tomduck commented 8 years ago

Thank you both for the feedback. I am getting the same result for id-less tables under html, and am working on a fix.

tomduck commented 8 years ago

I have posted the fixed code to GitHub. Could either of you test it out and let me know if the fix works for you? Thanks in advance.

nealkruis commented 8 years ago

It works for the case I illustrated above!

tomduck commented 8 years ago

Splendid. Thank you both for your feedback. I'm doing some refactoring to support fancy new features. I will push out the changes together when they are ready, and will post a notice here. Stay tuned...

tomduck commented 8 years ago

I just posted a new release to pypi with this fix. Please let me know if you have any trouble with it. Cheers!