Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@comment behavior in BibTeX vs BibLaTeX #11

Open
larsgw opened this issue Nov 17, 2019 · 1 comment
Open

@comment behavior in BibTeX vs BibLaTeX #11

larsgw opened this issue Nov 17, 2019 · 1 comment

Comments

@larsgw
Copy link
Member

larsgw commented Nov 17, 2019

biblatex and natbib treat @comment entries differently. However, neither treat them as I implemented based on a summary I found, namely from @comment to the end of the line (source). biblatex seems to treat it as a regular entry (e.g. expecting opening braces and ignoring everything including other entries until the end brace), while natbib seems to just ignore the @comment text, so if an entry starts with @comment instead of @book it does nothing. However, it does not require @comment to be an entry, as biblatex does. Also, natbib behavior differs from the aforementioned summary in that it still counts entries that start on the same line as @comment, while the summary states "that everything from the @Comment and to the end of line is ignored".

Examples:

@comment {
  @misc{label,
    author = "name",
    title = "displays with natbib, not with biblatex",
    year = 2019
  }
}

@comment{ @misc{label2,
    author = "name",
    title = "displays with natbib, not with biblatex",
    year = 2019
  }
}

@comment @misc{label3,
    author = "name",
    title = "errors (fatally) with biblatex, displays with natbib",
    year = 2019
  }

@comment {} @misc{label4,
    author = "name",
    title = "displays with biblatex, natbib",
    year = 2019
  }
@retorquere
Copy link
Contributor

The biblatex manual makes no mention of @comment at all. It probably just wants balanced braces everywhere

Tame the Beast says

There is a special entry type named@comment. The main use of such an entry type is to comment a large partof the bibliography easily, since anything outside an entry is already a comment, and commenting out one entry may beachieved by just removing its initial@

which I take to mean you can wrap multiple entries in a @comment{....} and have them commented out.

BibTeXing says

For Scribe compatibility, the database files allow an @comment command; it’s not really needed because BibTEX allows in the database files anycomment that’s not within an entry. If you want to comment out an entry, simply remove the ‘@’ character preceding the entry type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants