Open ghost opened 9 years ago
The writer only sees the Pandoc AST, not the original Markdown source, and so doesn't have access to information about whether the caption was placed before or after the table. So the proposed fix isn't possible (without revision to the structure of the Pandoc AST).
Ok. I didn't realise that the writer had no knowledge of where the caption was in relation to the table. In that case, I stand by my suggested change to the xml inserted, and suggest something like what was done for docx in #1794 to deal with the position of the caption,
I think for someone who can read the haskell this should be pretty easy to change. It goes hand in hand with #2401 but doesn't involve frames, making it simpler overall.
Currently a table caption always output below the table in ODT, regardless of position in markdown, and is output with no label/number using:
I suggest this replacement, to be inserted before or after the table according to the position in the markdown:
This would mean subsequent edits using libreoffice would update the numbering automatically, and makes a list of tables possible.
The
text:ref-name
attribute might not be necessary, as libreoffice seems to put it back in on next save, but as being as the writer needs to count tables anyway I see no reason not to add it.