Deyan Ginev edited subsection_Generating_a_Christmass_Caroll__.tex  almost 9 years ago

Commit id: 9d03c11a911170579246f73c47d78985672f1ccf

deletions | additions      

       

\subsection{Generating a Christmass Caroll}  Source: \url{http://ctan.org/pkg/xii}  In a classic argument about whether a naive approach to counting the words of a {\TeX} manuscript could be successful, David Carlisle provided the following snippet as an example:  \begin{lstlisting}  \let~\catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF  PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP 

doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:  \end{lstlisting}  Clearly, a naive approach may find a handful, if any words, as this TeX program is obfuscated to a degree of infamy. In fact, it is a demonstration that the only correct way of counting words in a {\latex} document is by inspecting the final produced output, be it the PDF or HTML document. Authorea is one of the few tools that correctly approaches word count and can tackle this example correctly, with a click of a button.  Find below the produced carol for your enjoyment:  \hline  \let~\catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF  PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP  A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP