# Conflict between TikZ and university dissertation *.cls file

When compiling a document using my university's dissertation class file and the TikZ package I receive 3 error messages:

1) Missing number, treated as zero [\xdef],

2) Undefined control sequence. [\xdef\pgfmath@rnd@z],

3) LaTeX Error: Missing \begin{document}. [\xdef\pgfmath@rnd@z{\the\c@pgfmath@counta].

\documentclass{USC-Thesis}
\usepackage{tikz}
\begin{document}
Test 1-2-3
\end{document}


Would someone know how I can solve this problem? I know there are a few similar posts out there, but none seems applicable to this case. Many thanks.

The class file can be found here:

https://svn.kwarc.info/repos/arXMLiv/trunk/sty/USC-Thesis.cls

• You should inform the author about the problems, he might push a new version to bring the class file to a recent state. It will serve many students in the future. – Johannes_B Jun 13 '15 at 9:59

Do you have to use this class file? It has really a lot of problems due to its age. The error you get is due to this line of redefinition of \year macro but there are many other problems \def\year#1{\gdef\@year{#1}}.

What I would suggest is that take only the first part of this class file about the page sizes and the fonts but rewrite it with the updated components. You can ask as many questions as you like about the functionality (there are already a lot of questions for this) so you would be done with it.

The rest of the errors can be made go away (but probably screws up other things in the future) is you add or remove the following lines

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%