Question marks in bibliography entries

From ConTeXt wiki
Revision as of 04:42, 5 February 2012 by Pont (talk | contribs)

Some publications have a title which ends in a question mark (a.k.a. interrogation mark or interrogation point). This becomes a problem when typesetting a bibliography, since a full stop is added after the title, resulting in something like:

Livermore, R., Hillenbrand, C.-D., Meredith, M. and Eagles, G. (2007). Drake Passage and Cenozoic climate: An open and shut case?. Geochemistry, Geophysics, Geosystems, 8(1), Q01005.

Note the ugly ‘?.’ conjunction at the end of the title.

A solution was suggested on the texhax mailing list; at least one of the suggested hacks appears to work with ConTeXt. It requires the modification of the bibliography entries, and the definition of a new command. Below is a working example.

The BibTeX file, test.bib:

@article{art1,
  title = {{Is this a question?\killstop}},
  author = {Author, A.},
  pages = {1--2},
  journal = {Journal of Something},
  volume = {1},
  number = {2},
  year = {2000}
}

The document itself, test.tex:

% bibtex hack starts here
\def\gobblestop#1#2{#1}
\def\killstop{%
  \aftergroup\gobblestop
  }
% bibtex hack stops here

\setupbibtex[database={test},sort=author]
\setuppublications[sorttype=bbl,refcommand=authoryear]
\starttext
\cite[art1]
\placepublications[criterium=text]
\stoptext

Notes:

  • I successfully tested this example with ConTeXt MkIV version 2011.10.01
  • Define the \killstop command before \starttext. The environment file is a good place for it, if you are using one.
  • Note the modifications necessary to the BibTeX entry itself: an extra pair of braces, and insertion of \killstop at the end.
https://www.contextgarden.net/index.php?title=Question_marks_in_bibliography_entries&oldid=13587
www.contextgarden.net
crawl=CC-MAIN-2019-51
18608
application/http; msgtype=response
sha1:EHKXVIUFTWC66KNUQTOMSG4UZIWCLMB3
<urn:uuid:2ab3c7d3-02f0-48f8-8e86-982f0a8a3415>
2019-12-09T14:22:33Z
5.39.185.232
text/html
sha1:RJSS74WAZA7PQD6YG23H4QWPGGOA5PIV
<urn:uuid:86b77e32-916d-49e4-bbaa-1f587e4bbe85>
https://www.contextgarden.net/index.php?title=Question_marks_in_bibliography_entries&oldid=13587
response
<urn:uuid:9ea07526-47fb-452f-ab54-48cb044d1efe>
isPartOf: CC-MAIN-2019-51
publisher: Common Crawl
description: Wide crawl of the web for December 2019
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-73.ec2.internal
software: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/