I had difficulties commenting out entries in a .bib file (as opposed to adding free-standing comments). Posts to date on this thread did not address this particular problem.
I'm using Overleaf). What I observed:
bibtex looks for entries (@blah) before it checks if the line starts with a % (or so I figured).
- but only that line gets processed; if you commented out the entire entry the rest of it (
title=, etc) is ignored and you end up with errors ('missing field') attributable to @blah
Sheesh.
This doesn't work:
%@article{foo2019,
% ...
% }
This works (replace the @):
%%article{foo2019,
% ...
% }
I poked around in Overleaf and found this explanation (note that mine, above, is a bit different):
% is actually not a comment character in .bib files! So, inserting a %
in .bib files not only fails to comment out the line, it also causes
some BibTEX errors. To get BibTEX to ignore a particular field we just
need to rename the field to something that BibTEX doesn’t recognise.
For example, if you want to keep a date field around but prefer that
it’s ignored (perhaps because you want BibTEX to use the year field
instead) write Tdate = {...} or the more human-readable IGNOREdate =
{...}.
To get BibTEX to ignore an entire entry you can remove the @ before
the entry type. A valid reference entry always starts with a @
followed by the entry type; without the @ character BibTEX skips the
lines until it encounters another @.
bibtex is very focused on @; biber apparently respects %s (but you'd have to use biblatex). See pointers provided by moewe (in the comments) for other discussion.
%, whereas BibTeX does not? – cfr Feb 02 '18 at 23:10%comment syntax or the@COMMENTone? It doesn't say anything for me about the%and I used these things all over the place. – ArTourter May 24 '18 at 19:52@COMMENT{}entry in my bib file and biber (version 2.11, from texlive 2018) didn't complain at all. – ArTourter May 24 '18 at 20:26%and it spews warnings all the time. I know I can ignore them, but it is a pain as they clutter the output. – cfr May 25 '18 at 01:48