TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the correct way to comment out sections of explanatory text (included for humans to read) in a .bib file? I would like biber/biblatex to simply ignore this text.

When I put in text like

#######################################################################
## PREPRINTS

I get warnings like

WARN - BibTeX subsystem: /tmp/8XsEEmjVOo/bib-latest.bib_14175.utf8, line 7, warning: 139 characters of junk seen at toplevel
share|improve this question
up vote 28 down vote accepted

Anything that is not inside a recognized entry is a comment. So just type along! Any .bib interpreter that complains about it is buggy, as it is not following the rules laid down in btxdoc. However, you can use an entry like @COMMENT, which will hopefully not trigger any complains.

share|improve this answer
    
See addition to question. – Raphael Jan 15 '13 at 20:25

At least with biber, you should be able to use the same commenting method as with LaTeX, that is using % for the commented line.

After a few test comments can be outside entries, within entries (commenting a whole line) or commenting the end of a line.

%%%%%%%%%%%
% PREPRINT
@article{myarticle,
    author = {Onymous, A. N.}, %The author
    % the title of the article
    title = {A Nice title},
}

Should work as expected. However this may not be the case with bibtex.

share|improve this answer
    
Re: "However this may not be the case with bibtex". Indeed, this does not seem to work with bibtex. I have an entry in my .bib file with a line like author = {Onymous, A. N.}, %The author in it. In TeXShop, when I hit the Typeset button with BibTex selected in the drop down next to it, I get a message in the console saying "You're missing a field name" and "I'm skipping whatever remains of this entry". The rest of my entry was indeed ignored and I got an incomplete reference in my .pdf. – Jacob Akkerboom Jan 28 at 11:44
    
@JacobAkkerboom no but the question was about biber/biblatex. I never claimed that this solution would work with bibtex. – ArTourter Jan 28 at 19:29
    
yes, you are right. I felt it was worth investigating, but now that I realise the question is probably about alternatives to bibtex, I realise my comment is probably not so useful. I'm quite a novice at these things, do you think mine is a case of a buggy .bib interpreter, as the other answer suggests? Thanks for your reply. – Jacob Akkerboom Jan 28 at 19:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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