I realize this question has been asked a often, but as I do not have admin rights on my PC (i.e. no way to install pearl) and find copy-pasting text to word or elsewhere annoying, I hope I can find help here. Basically, I would like to have the word count next of a given paragraph right next to it, that helps me with the writing.
From the solutions I have found, https://tex.stackexchange.com/a/10034/182896 is the one that seems to work well for paragraphs and does what I need it to do. This is an excerpt of the preamble:
\documentclass{article}
\begingroup
\lccode`\~=`\ %
\lowercase{%
\gdef\assignment{\setcounter{word}{0}%
\catcode`~=\active
\def~{\space\stepcounter{word}}}}%
\endgroup
\newcounter{word}
\def\endassignment{\stepcounter{word}%
\marginpar{\arabic{word} words}}
\usepackage[authordate,backend=biber, hyperref=true]{biblatex-chicago}
It took me ages to figure it out where the problem occured, but if in the main text I do this:
\begin{document}
\begin{assignment}
Some text here~\autocites[see for instance][]{Gallarotti2011}{Lai2013b}{Hayden2012}.\par
\end{assignment}
\end{document}
all is good, but if I do the following:
\begin{document}
\begin{assignment}
Some text here~\autocites[see for instance][]{Gallarotti2011, Hayden2012, Lai2013b}.
\end{assignment}
\end{document}
the document does not compile and instead returns this error:
Missing \endcsname inserted.
<to be read again>
\csname\endcsname
l.22 ...e][]{Gallarotti2011, Hayden2012, Lai2013b}
.
So, I do not understand what is causing the problem here aside from it happens somehow in the curly brackets. Of course I can rewrite my citations, but that would take a lot of time. So maybe someone who can help here?
Thanks!
