I have some programming language code examples in a fancyvrb \Verb!...! expression. This includes the modulus operator which happens to be a percent sign, e.g.
\Verb!(1..100) select: { arg i; i % 7 == 0 }!
This causes two problems. First, TeXShop thinks there is a line comment beginning after the % (just as this stackexchange display gets it wrong). This is a purely aesthetic problem.
But more severely, while the document gets properly set with LaTeX, the texcount and texcountfull programmes jump off the rails, and produce an error which makes the word count stop at that point till the end of the .tex file:
!!! Warning: END group without type while waiting to end tabular. !!!
!!! Warning: END group without type while waiting to end sidewaystable. !!!
(The \Verb appears within a table within a rotate figure).
I guess I must find some workaround by escaping the % characters. But how?
fancyvrbwill not create such warning. So create a complete example which shows your behaviour! And is there any reason why you do not use\verb(lowercase v) – Herbert Jan 10 at 16:51texcountmacro. As I said, the text is set correctly, but the wordcount chokes. I'll try to create a full document to post here. I am using fancyvrb all over, because of easier font customisation, I don't want to switch to\verb. – Emit Taste Jan 10 at 16:53texcountis aware of\Verb; it knows\verbandverbatim. I don't know if one can extend it to treat also\Verb. – egreg Jan 10 at 16:54texcount? A package? – Herbert Jan 10 at 16:54