tomduck / pandoc-tablenos

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

Possible to number tables based on first reference (@tbl:id) in text? #9

Closed andreas-paul closed 5 years ago

andreas-paul commented 5 years ago

Hi,

Currently, tablenos is numbering tables based on their order of occurrence in the document, independent of when a table is first referenced in the document. Is there a way to automate the numbering of tables to be independent of the occurrence of the table but make it based on the first reference? I am asking because I have all tables in an extra .md file to be inserted at the end of the final document as it is a requirement of the journal to have all tables at the end. However, sometimes tables change chapter, and keeping track of the order of tables manually is not in the spirit of using pandoc/markdown/latex. :)

Thanks, Cheers

tomduck commented 5 years ago

Hi, Andreas. Sorry for the long wait.

Pandoc-fignos doesn't hard-code numbers for LaTeX/pdf output; labels are used instead. It would seem that the standard method LaTeX uses to number tables is to do so in order of appearance, rather than in order of citation.

To address this problem, we would need to know what LaTeX commands to use. It is surely possible (is there anything LaTeX can't do?), but I have not been able to find said commands.

Cheers, Tom

tomduck commented 5 years ago

This Issue seems to be more of a LaTeX problem than a pandoc-fignos problem. As indicated above, pandoc-fignos doesn't actually set the numbers for LaTeX/pdf output. As such, I am going to close this Issue. Please feel welcome to re-open it if this is still of concern.