GeneralWhat is 'gobble'??? Got a strange error :-(

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
goleo
Posts: 4
Joined: Mon Jun 16, 2014 10:56 am

What is 'gobble'??? Got a strange error :-(

Post by goleo »

Dear community members,

I got a latex document from a colleague who left our group. I tried to compile it and retrieved a strange error message:

Code: Select all

<to be read again>
                   \relax
l.60
     )) [36] (./main.ind [37])
! Argument of \@gobble has an extra }.
<inserted text>
                \par
l.93 \end{document}

? Runaway argument?
! Paragraph ended before \@gobble was complete.
<to be read again>
                   \par
l.93 \end{document}
Does anyone know what this kind of error indicates? Line 93 just contains the \end{document}-tag and everything looks nice. But the error keeps popping up.

Recommended reading 2024:

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

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

goleo
Posts: 4
Joined: Mon Jun 16, 2014 10:56 am

What is 'gobble'??? Got a strange error :-(

Post by goleo »

I kept on debugging and I could locate the line that causes this error:

Code: Select all

\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}
However, I do not know what is wrong there. Can anyone help, please?

Best regards!

P.S. The error does not occur if (and only if) I remove the term "[lstlisting]", i.e. writing "\captionsetup{format=...}" instead of "\captionsetup[lstlisting]{format=...". Does anyone know why???

P.P.S: Okay, going from the minimal working example back to the whole project I experienced something strange. It seems that this was not causing my problems. Instead of this, it is the call of \printindex.

Still, I don't understand what is happening there.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

What is 'gobble'??? Got a strange error :-(

Post by cgnieder »

Hi goleo,

Welcome to the LaTeX community! Please provide a Infominimal working example that let's us reproduce the error... otherwise all help will be pure guess-work.

My guesses: you are using both the listings package and the caption package? You are set a caption style specifically for a floating environment lstlisting?

Regards
site moderator & package author
goleo
Posts: 4
Joined: Mon Jun 16, 2014 10:56 am

What is 'gobble'??? Got a strange error :-(

Post by goleo »

Dear cgnieder,


it is a little difficult to provide the source code, because it is distributed over various files. (In addition, when I created the minimal working example it indicated an error that does not appear when I compile the complete code. So it didn't help at first).

Finally, after hours of debugging I COULD FINALLY LOCATE the source of the error. It is these lines in a config/header.tex file:

Code: Select all

\usepackage[]{silence}        % use this to turn off those nasty marginpar warnings
\WarningFilter{latex}{Marginpar on page}
\WarningFilter{latex}{\\headheight is too small }
For whatever reason these lines invoke the error message "Paragraph ended before \@gobble was complete".
goleo
Posts: 4
Joined: Mon Jun 16, 2014 10:56 am

Re: What is 'gobble'??? Got a strange error :-(

Post by goleo »

== SOLVED ==

I now installed the latest version of the 'silence'-package from CTAN and now it works. The latest version of that package in Ubuntu was from 2009 and, as it seems, was buggy. This solved the problem.

P.S. I hate the Ubuntu latex distribution.
Post Reply