Here is my MWE. I have left the packages that I use for my dissertation in the pre-amble. I don't know if there might be clashes or whether there might be a specific order in which the packages should be loaded:
Code: Select all
\documentclass[a4paper,12pt]{report}
\usepackage[paper=a4paper,left=30mm,width=150mm,top=25mm,bottom=25mm]{geometry}
\usepackage[cleanlook, english]{isodate} % for formatting the date of \today
\usepackage[round, authoryear]{natbib} % Use the natbib bibliography and citation package
\usepackage{bibtopic}
\usepackage{xcolor} % Driver-independent color extensions for LaTeX and pdfLaTeX.
\usepackage{hyperref} % For creating hyperlinks in the toc and references
\usepackage{verbatim}
\usepackage{listings} % This for inserting code listings
\usepackage{graphicx} % This is used to load images
\usepackage{pdfpages} % for inserting pages from other pdf documents
\usepackage{appendix} % For creating the appendices
\usepackage{makeidx} % For creating the glossary and index
\makeindex
\usepackage[style=altlist,toc]{glossaries}
\newglossaryentry{soc}{name={SOC},description={Service Oriented Computing, also known as SOA or Service Oriented Architecture, focuses on the development and integration of systems to provide business processes. The systems are packaged as interoperable services}}
\newglossaryentry{WWW}{name={WWW}, description={World Wide Web}}
\newglossaryentry{W3C}{name={W3C}, description={World Wide Web Consortium}}
\newglossaryentry{API}{name={API}, description={Application Programmer's Interface}}
\newglossaryentry{UnintendedConsequence}{name={Unintended consequence}, description={an outcome that was not inteneded in a particular situation.}}
\makeglossaries
\lstset{language=Perl}
\lstset{commentstyle=\textit}
\lstset{frame=shadowbox, rulesepcolor=\color{gray}}
\begin{document}
\bibliographystyle{plainnat}
\begin{titlepage}
\centering
\vspace*{11\baselineskip}
\large
\bfseries
AMUSEMENTS IN MATHEMATICS\\
\normalfont
\small
Sub Title\\
\vfill
HENRY ERNEST DUDENEY\\
(student number)\\[2\baselineskip]
\textbf{\today}\\[2\baselineskip]
Word Count: {\color{red}\input{wordcount2.tex}}\\
\end{titlepage}
\begin{lstlisting}[numbers=left]
my $url =
'http://192.168.0.7:8080/POG/getINDI.jsp?zarefno=a1.';
use LWP::Simple;
my $content = get $url;
die "Couldn't get $url" unless defined $content;
print $content;
print "\n";
print "Length " + length($content)
\end{lstlisting}
\end{document}
I downloaded and installed the latest listsings package and listing.sty. The problem still persists. If I take the $ out just before \end{lstlisting} I get warning messages. At this point you can't see the warning messages on screen or in the log file, but they are printed on the title page where the word count (in red) is suppose to go. I'll attached a copy of the produced document to show this.