GeneralIncomprehensible error: No counter defined

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Spectrum
Posts: 14
Joined: Thu May 17, 2007 9:08 pm

Incomprehensible error: No counter defined

Post by Spectrum »

Hello.

I was wondering if anyone could help me with this problem. Well, actually, I have hordes of errors in my LaTeX file, so I am trying to narrow them down using \includeonly. But I really don't understand what TeX is doing. I still get tons of errors from the parts of my project that I have deleted, which TeX shouldn't be reading at all.

Here is my main file, Test.tex:

Code: Select all

\documentclass[a4paper,12pt,openany,oneside]{book}
\includeonly{Utilities/UsePackages}
\include{Utilities/UsePackages}
\begin{document}
\include{Utilities/InputFiles}
\end{document}
It includes two files. "Utilities/UsePackages" looks like this:

Code: Select all

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{cuted}
\usepackage{graphicx}
\usepackage{makeidx}
\usepackage{marvosym}
\usepackage{tipa}
\usepackage{verbatim}
%\usepackage{showidx}
\usepackage[pdftex,colorlinks,pdfstartview=FitH]{hyperref}
And "Utilities/InputFiles" is empty:

Code: Select all


When I try to compile Test.tex, I get this:

[PDFLaTeX] Test.tex => Test.pdf (pdflatex)
[PDFLaTeX] finished with exit status 1
./Test.tex:5:No counter 'IC' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Founding of Irokas' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Fall of Nom' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Founding of Nom' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'First Dragons' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Founding of the Vaimon Empire' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Darkfall' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Carz' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Founding of Imetrium' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Fall of Belkade' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Founding of Belkade' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Siege of Fendor' defined. \include{Utilities/InputFiles}
./Test.tex:5:No counter 'Runger war' defined. \include{Utilities/InputFiles}
[PDFLaTeX] 13 errors, 0 warnings, 0 badboxes

All these errors made sense in my original, big project. But now I have deleted everything except the lines I showed above. And still the error messages persist.

Can someone please help me: What is TeX doing? Where do these errors come from?

Thanks in advance.

PS: I am using Kile under Linux.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Spectrum
Posts: 14
Joined: Thu May 17, 2007 9:08 pm

Incomprehensible error: No counter defined

Post by Spectrum »

Solved. :)

I found the solution to my problem at the TeX newsgroup.
FerRock
Posts: 1
Joined: Wed Dec 03, 2008 1:31 am

Incomprehensible error: No counter defined

Post by FerRock »

Deleting aux files did not worked for me. I was using LyX and got a latex error: no counter "maxmatrixcols" defined. Make sure the package that defines the variable it is included. In my case, it was that amsmath package was not included automatically by LyX (as selected in LyX document settings, math options) Why not? I do not know. Anyway, after choosing to use AMS math package (always), no more latex errors were reported.
Post Reply