Is it possible to configure texcount
not to ignore text in optional arguments for certain macros?
Consider the following example:
\documentclass{article}
\begin{document}
\autocite[e.g.][4]{key-1,key-2}
\autocites[e.g.][5]{key-1,key-2}[and][89]{key-3}
\end{document}
This will not compile, of course, but it works as a minimal example for texcount
which does not care whether it compiles or not.
My texcount.cfg
includes the following rules:
%TC:macro \autocite [1]
%TC:macro \autocites [1,1]
Running the minimal document above through texcount
yields output which includes the following:
\documentclass{article} [0]
\begin{document} [0]
\autocite[e.g.][4]{key-1,key-2} [2]
\autocites[e.g.][5]{key-1,key-2}[and][89]{key-3} [5]
\end{document} [5]
Total
Sum count: 5
Words in text: 5
Words in headers: 0
Words outside text (captions, etc.): 0
Number of headers: 0
Number of floats/tables/figures: 0
Number of math inlines: 0
Number of math displayed: 0
Files: 2
For my purposes, this is a significant improvement over the default which would not count my citations at all. Nonetheless, it still underestimates the count. An accurate count would be (approximately) 16 words rather than 5, including 6 in pre- and post-notes:
- the optional arguments are produced as part of the citations and total 6 words
Can I tell texcount
to count the words in the optional arguments?