[NTG-context] Word and character count excluding TeX-directives

Dr. Thomas Möbius moebius at medinfo.uni-kiel.de
Tue Jan 16 15:26:22 CET 2018

To meet some formal guidelines, I need to provide a word count of my 
abstract and a character count of the main text, and a character count 
of all the text appearing in figure captions.

Is this possible (maybe using some lua-magic)?

Thank you!

Minimal example:


\title{My title: example of a word and character count}

{\strut\tfx Formal guidelines: word count of abstract: $x$, character
count of main text: $x$, character count of figure captions: $x$.}

This is the abstract. Read this and that.

% start of the main text
Some random text with formulas

y = α + βx + ε, \quad ε \sim N(0,σ^2)

And there are also figures with captions.

     title={Residual plot with time $t$ on the x-axis and
     residuals $e_{jt}$ on the y-axis},

And some more text with $x$ and $y$ and $z$, and \placeformula

\startformula \startalign
\NC a =\NC b \NR
\NC c =\NC d \NR
\stopalign \stopformula

And stop.

More information about the ntg-context mailing list