Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to insert an European directive in the references of my thesis, but I cannot have it showing up in the bibliography: instead, a black entry comes out.

This is the BibTeX entry:

@misc{eu02,
    %author   = "",
    title     = "Directive 2002/91/EC of the European Parliament and of the Council",
    howpublished   = "Official Journal of the European Communities",
    %address  = "",
    year      = "2002",
    month    = "December",
    %note     = "",
}

And this is the output:

enter image description here

I tried also to use the booklet and proceedings styles with the same result.

share|improve this question
    
Which BibTeX style (.bst file) are you using? –  Joseph Wright Jul 6 '12 at 7:31
    
@JosephWright: ieeetr, to have the entries in the right order. But I have the same problem with plain and alpha –  clabacchio Jul 6 '12 at 7:33
5  
You can't use comments inside .bib file entries: if I remove the comment lines from your input, I have no issues at all. You probably get a warning about this in the .blg file. –  Joseph Wright Jul 6 '12 at 7:45
6  
For commenting out fields, the best strategy is to add something to the field name, for instance Xauthor= instead of author=. BibTeX ignores unknown fields. You may want to use organization= in that entry. –  egreg Jul 6 '12 at 7:49
1  
@JosephWright: thanks, it works! I didn't know about comments, and in the wikibook they're used to indicate the optional fields...and I didn't read this: "Be careful if you copy the following templates, the % sign is not valid to comment out lines in bibtex files. If you want to comment out a line, you have to put it outside the entry." –  clabacchio Jul 6 '12 at 7:49

1 Answer 1

up vote 5 down vote accepted

As Joseph pointed out, the error is due to the presence of comments inside the bibliography entry: this is not accepted by BibLaTeX that leaves it empty.

Also the LaTeX Wikibook from which I took the template for the BibTeX entry, states

Be careful if you copy the following templates, the % sign is not valid to comment out lines in bibtex files. If you want to comment out a line, you have to put it outside the entry.

It also gives a warning in the form (not for the same error):

Database file #1: References.bib
You're missing a field name---line 126 of file References.bib
 :     
 :     %month    = "",
(Error may have been on previous line)
I'm skipping whatever remains of this entry

that explains also the missing line in the document.

A solution is to use non standard names (as egreg said) or by modifying the original name: the field will be ignored by BibTeX.

share|improve this answer

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.