I can't get TeXcount to perform a word count on a LaTeX document that runs a Linux shell command to access a shell variable (i.e. the command involves a "$" dollar symbol).
example.tex
\documentclass[a4paper,11pt]{article}
\begin{document}
The user's home directory is located at:~\input|"echo $HOME"
\end{document}
This sucessfully compiles with pdflatex --shell-escape example.tex
and gives me the location of my home directory. However, running texcount example.tex
fails because "$" is a special character in LaTeX and they usually come in pairs.
If I escape the "$" using a backslash (i.e. \$
) then TeXcount runs fine but the PDF produced by pdflatex now contains the literal string "$HOME" instead of the location of my home directory.
Is there a way to hide the "$" from TeXcount without hiding it from the shell? (Or could this be a bug in TeXcount?)
$
sign causes the immediate problem, the underlying problem is that TeXcount will try to interpret\input
as a file inclusion macro.