Difference between revisions of "Question marks in bibliography entries"
(Added notes) |
m |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
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: | 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 | + | 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. |
− | 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. | Note the ugly ‘?.’ conjunction at the end of the title. | ||
− | A solution was suggested [http://www.tug.org/pipermail/texhax/2009-November/013714.html on the texhax mailing list]; | + | A solution was suggested [http://www.tug.org/pipermail/texhax/2009-November/013714.html 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: | The BibTeX file, test.bib: | ||
Line 16: | Line 14: | ||
author = {Author, A.}, | author = {Author, A.}, | ||
pages = {1--2}, | pages = {1--2}, | ||
− | journal = { | + | journal = {Journa |
+ | [[Category:Fonts]]l of Something}, | ||
volume = {1}, | volume = {1}, | ||
number = {2}, | number = {2}, | ||
Line 43: | Line 42: | ||
Notes: | Notes: | ||
− | * I successfully tested this example with ConTeXt MkIV version 2011.10.01 | + | * I successfully tested this example with ConTeXt MkIV version 2011.10.01 (and I with MkIV 2019.07.04 beta). |
* Define the \killstop command before \starttext. The environment file is a good place for it, if you are using one. | * 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. | * Note the modifications necessary to the BibTeX entry itself: an extra pair of braces, and insertion of \killstop at the end. | ||
+ | |||
+ | [[Category:Bibliography]] |
Latest revision as of 16:27, 8 June 2020
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 = {Journa [[Category:Fonts]]l 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 (and I with MkIV 2019.07.04 beta).
- 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.