Runaway argument error in Latex / Overleaf

Posted on
{ \par <refgrp> \par <bibl id="B1"> <title><p>Robot carers, ethics, a\ETC.
! File ended while scanning use of \BMCxmlcomment.
<inserted text> 
l.562 \bibliography{bmc_article}
                                      % Bibliography file (usually '*.bib' )
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.


The problem was a % in the .bib file. The % sign is used to mark a comment and needs to be escaped or else the rest of the line is interpreted as a comment and thus the } won’t be interpreted and is reported as missing.

    title = {ROS/Tutorials/WritingPublisherSubscriber(python) - ROS Wiki ---},
    howpublished = {\url{}}

Removing or escaping the % (\%) solves the problem. The main issue was that the error points to the wrong reference and so in the end I had to bisect the file, to find the offending entry, as I didn’t know what the problem was.

    title = {Wiki},
    author = {Wise, Melonee},
    journal = {},
    url = {\%28python\%29}

But I write this up here for the next poor soul who has to deal with the problem.

I also like to mention this tool here:

It helped me clean up the latex file and might also help fix errors by removing certain characters, removing duplicates and sorting your .bib file.

Leave a Reply