Closed will-hart closed 5 years ago
A fix for this in xelatex at least is to write the header code with two additional \ifdef{}{}
commands as follows:
% pandoc-tablenos: environment disables table caption prefixes
\makeatletter
\ifdef{\c@tableno}{}{\newcounter{tableno}}
\ifdef{no-prefix-table-caption}{}{%
\newenvironment{no-prefix-table-caption}{
\let\LT@makecaption=\LT@makenoprefixcaption
\renewcommand\thetable{x.\thetableno}
\renewcommand\theHtable{x.\thetableno}
\stepcounter{tableno}
}{
\let\thetable=\oldthetable
\let\theHtable=\oldtheHtable
\let\LT@makecaption=\LT@oldmakecaption
\addtocounter{table}{-1}
}
}
\makeatother
Unfortunately this only lasts until a rebuild.
Hi, Will. Sorry for the delay.
The mechanism that I have in place to deal with cases like this is to set the xnos-cleveref-fake
meta variable to False
. Use \usepackage{cleveref}
in your LaTeX header instead.
Does this work for you?
Note that I am also considering removing the cleveref fakery from a pandoc-tablenos 2.0 release. In the meantime setting the xnos-cleveref-fake
to False
should continue to work.
I just pushed out a new beta release in the 2.0 branch. The TeX handling has been entirely re-worked.
To install the beta release, run
pip install pandoc-tablenos --upgrade --pre --user
I would be grateful for any feedback that you wish to provide. Please be sure to read about what's new first.
I'm quite confident that this is fixed in the 2.0 branch, as I have been battle-testing it extensively. A release to pypi is coming soon. In the meantime I am going to close this Issue as I am clearing out as many old Issues as I can before the next release. Please re-open it if in fact the Issue remains.
The
pandoc-xnos
,pandoc-tablenos
filters add latex macros to the body of the document, i.e.This means that even with LaTeX packages like
docmute
I can't\input
or\subimport
multiple tex files filtered by these packages into a main document as it results in errors:Is there a way to put this output before
\begin{document}
, so that it can be ignored bydocmute
, or can they be wrapped in a semi-unique text marker so that they can be removed with a filter? For instance something like:🎄