0

Background inspiration and code:

\documentclass{article}
\usepackage{bashful}
\pagestyle{empty}
\bash
texcount -sum -1 tmp.tex
\END
\begin{document}
%here is a front page and a table of contents
%Counted characters: \bashStdout}
%START CHARACTER COUNTING
This file has \emph{\bashStdout} words.
%END COUNTING CHARACTERS
\end{document}

Problems

  • It shall count the characters and not the words.
  • It shall only count the characters in one specific region -- and only count like a Microsoft Word would do it.
  • It shall print the number above the counted region.
3
  • Have you tried texcount -char -sum -1 tmp.tex?
    – user31729
    Commented Feb 1, 2017 at 12:21
  • @ChristianHupfer thx! But how do count characters in just a specific region? It shall not count the toc or the references, nor the front page, nothing but the very running text (+foodnotes). The fooder / header shall not be counted either. Commented Feb 1, 2017 at 23:55
  • @RalphGottlieb TeXcount will count text, headers, other text (footnotes, captions, ...), etc. separately, and it is possible to set rules for how text in different macros/environments is counted. For a quick test, you can try the web service with Language/word typesset to Letters. Only beware that TeXcount does not count spaces, and by default not punctuation (can be tweaked). Commented Feb 3, 2017 at 0:47

0

You must log in to answer this question.

Browse other questions tagged .