GeneralError \newcounter{lofdepth} and \newcouter{lotdepth}

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

Error \newcounter{lofdepth} and \newcouter{lotdepth}

Post by chandangiri »

When compiling following errors are giving
l.99 \newcounter{lofdepth}

?


l.112 \newcounter{lotdepth}

?
****************************************
Where is the problem?

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Error \newcounter{lofdepth} and \newcouter{lotdepth}

Post by localghost »

How should anybody know how to deal with this poor information? Especially when you omit the most critical part of the error message.

Code: Select all

! LaTeX Error: Command \c@lofdepth already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.99 \newcounter{lofdepth}
                            
Your command was ignored.
The counters you tried to defined are already reserved for internal use by the compiler. So, just give your counters other names.
chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

Re: Error \newcounter{lofdepth} and \newcouter{lotdepth}

Post by chandangiri »

I haven't deifned any counter for lofdepth or lotdepth. That's why not able to find any error
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Error \newcounter{lofdepth} and \newcouter{lotdepth}

Post by localghost »

In that case providing a minimal working example (MWE) that reproduces the error ist the only way to find its cause.
Somewhere in your code (exactly lines 99 and 112) there must those redefinitions of the affected counters.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: Error \newcounter{lofdepth} and \newcouter{lotdepth}

Post by sommerfee »

Load the tocloft package with the "subfigure" option. See tocloft Package for details.

HTH,
Axel
Post Reply