tomduck / pandoc-tablenos

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

tablenos throws error with minimal table example #23

Closed ravinagori closed 3 years ago

ravinagori commented 3 years ago

I am trying to make a table with inline referencing using Pandoc Markdown. I am getting the following error even after using your minimal example:

Traceback (most recent call last): File "/home/ravi/.local/bin/pandoc-tablenos", line 8, in sys.exit(main()) File "/home/ravi/.local/lib/python3.6/site-packages/pandoc_tablenos.py", line 659, in main actions, blocks) File "/home/ravi/.local/lib/python3.6/site-packages/pandoc_tablenos.py", line 658, in altered = functools.reduce(lambda x, action: walk(x, action, fmt, meta), File "/home/ravi/.local/lib/python3.6/site-packages/pandocfilters.py", line 111, in walk item['c'] if 'c' in item else None, format, meta) File "/home/ravi/.local/lib/python3.6/site-packages/pandoc_tablenos.py", line 114, in attach_attrs_table assert value[1]['t'] == 'Caption' TypeError: list indices must be integers or slices, not str Error running filter pandoc-tablenos: Filter returned error status 1

I am confused as to why errors are showing up. I installed tablenos with pip

tomduck commented 3 years ago

Thanks for your feedback @ravinagori. I just upgraded the filters to work with the newest pandoc release. Everything should work after you update them. Please re-open this issue if you have any more trouble with it.

Cheers, Tom