Closed sebpardo closed 2 years ago
You may want to look at https://github.com/lierdakil/pandoc-crossref. I vaguely remember that one should be able to reference tables with this filter.
You could also use raw LaTeX with table captions (https://pandoc.org/MANUAL.html#extension-table_captions)
This is untested:
# Some Heading
There will be table \ref{mylabel}.
Some Paragraph here.
Table: This is the table caption \label{mylabel}
Right Left Center Default
------- ------ ---------- -------
12 12 12 12
123 123 123 123
1 1 1 1
Thank you @Wandmalfarbe. Just tried it and can confirm that using the table_captions
pandoc extension and placing the \label{}
within the caption paragraph does the trick.
The question on how to reference a figure has already been answered here, but the answer doesn't fully apply for tables: https://github.com/Wandmalfarbe/pandoc-latex-template/issues/189
Referencing a table with
\label{}
and\ref{}
doesn't seem as straightforward given there is no obvious table object to label inside of, as is the case for figures. Is there a way to do this?