Here is always some errors in the overleaf, but the line is not the right one. Where is the right line, and what exactly is the problem? I do not get it, since the document compiles the right way.What should I do?

enter image description here

  • 2
    the error is reporting errors detected on line 133 of subfigure.sty Nov 25 at 9:58
  • Where should this be? and why do you know it is 133, I do not find this, and line 133 is emty
    – Janine
    Nov 25 at 9:59
  • you do not need to go to that line. somewhere in code you have not shown you have defined a counter subfigure so the subfigure package breaks as the command is already defined. It happens to detect this in line 133 of its code but that is not very relevant to anyone. Nov 25 at 10:00
  • If you want help with an error message it is always best to provide a small complete test document that generates the error and show the error as tex, copied from the log, not as a screenshot. Nov 25 at 10:02
  • 1
    I added some text to my answer but the screenshot you show, shows you the full path to the file, the error message and the line on the file. That is all the information tex has. It knows at that point that you have an error it can not know where you have previously defined the counter (and nor do we as you have shown no code) Nov 25 at 10:07

The error is reporting errors detected on line 113 of subfigure.sty which is where the package defines its subfigure counter that you have somehow already defined.

The log (and the error summary shown by overleaf) show you the error context

/usr/local/texlive/2020latex/texmf-dist/tex/latex/subfigure/subfigure.sty line 113

! LaTeX Error: Command \c@subfigure already defined.

l.113 \newcounter{subfigure}

But the fix is not at that point: you should fix your document not to define subfigure before loading the subfigure package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.