How to modify a bibliography style to surround titles in quotes in a bibliography?
Whatever you do, don't modify your .bib
file by adding the quotation marks there. This will cause you no end of trouble in the future. Here are two solutions.
Use makebst
It's possible to the use makebst
program to generate a new .bst
file for yourself. To do this, you can open a command line window and type:
latex makebst
This will walk you through a whole bunch of menus of choices, including the following:
<many choices before>
<<TITLE OF ARTICLE:
(*) Title plain with no special font
(i) Title italic (\em)
(q) Title and punctuation in single quotes (`Title,' ..)
(d) Title and punctuation in double quotes (``Title,'' ..)
(g) Title and punctuation in guillemets (<<Title,>> ..)
(x) Title in single quotes (`Title', ..)
(y) Title in double quotes (``Title'', ..)
(z) Title in guillemets (<<Title>>, ..)
Select:
\ans=d
You have selected: Title and punctuation in double quotes
>>TITLE OF ARTICLE:
<<COLLECTION/PROCEEDINGS TITLES (if quoted title)
(*) Quote collection and proceedings titles too
(x) Collection and proceedings titles not in quotes
Select:
\ans=
You have selected: Quote collection and proceedings titles
<many choices after>
Then you just use this new .bst
file for your thesis. You can put it in the same folder as the main .tex
file of your thesis, or put it in your local texmf
folder (on a TeXLive system is should go in <path-to-local-texmf>/texmf/bib/bst
.
Make a new .bst
file which uses csquotes
for quoting
Instead of doing things this way, if you are comfortable with editing your own copy of plainnat.bst
here's a method which uses the csquotes
package to do the quotation. This handles punctuation correctly and also allows you to easily change from single to double quotes if you need. It does involve some work, though, but probably will take less time than stepping through all the makebst
choices (especially if you don't know what each one is asking.)
First, make a copy of plainnat.bst
in the same folder of your .tex
file and rename it (e.g. plainnat-csquotes.bst
).
Now make the following changes/additions to that file:
First, we add a function format.atitle
similar to the format.btitle
function on line 432 of plainnat.bst
:
FUNCTION {format.atitle}
{ title enquote
}
Next, we add an enquote
function similar to the emphasize
function on line 207 of plainnat.bst
. Note that this uses the \textquote
macro from the csquotes
package, so this .bst
file will require that package to be loaded. We are using the \textquote
macro instead of the more general \enquote
macro so that we can redefine it to place the punctuation correctly according to American standards (punctuation is always inside the quotation mark.)
FUNCTION {enquote}
{ duplicate$ empty$
{pop$ "" }
{"\textquote{" swap$ * "}" * }
if$
}
Finally we need to change any entry type that needs quotation marks around its title to use the format.atitle
function instead of the format.title
function. In my opinion, this should include (for consistency) the article
, incollection
, inproceedings
, techreport
, and unpublished
entry types. If you search through the .bst
file you will find a function for each of them. Here's the article
function as an example: (before the change:)
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
author format.key output
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
eid empty$
{ format.vol.num.pages output }
{ format.vol.num.eid output }
if$
format.date "year" output.check
}
{ format.article.crossref output.nonnull
eid empty$
{ format.pages output }
{ format.eid output }
if$
}
if$
format.issn output
format.doi output
format.url output
new.block
note output
fin.entry
}
We now change the line
format.title "title" output.check
to:
format.atitle "title" output.check
Do this for each of the other entry types listed above.
You now have a csquotes
aware .bst
file. To use it, you simply need to add the following lines to your preamble:
\usepackage{csquotes}
\bibliographystyle{plainnat-csquotes}
To implement correct placement of the punctuation with respect to the quotation mark we need to add the following extra line:
\renewcommand{\mktextquote}[6]{#1#2#4#5#3#6}
This will place the punctuation inside the quotation marks.
Changing the format of book titles too
Your advisor has requested that book titles also use quotation marks. This is a very unorthodox style, and I don't recommend it at all, but if that's what he wants, it's easy enough to do. Simply find the format.btitle
function and change it from:
FUNCTION {format.btitle}
{ title emphasize
}
to
FUNCTION {format.btitle}
{ title enquote
}
It's more straightforward with biblatex.
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,
unpublished,techreport,misc,book]
{title}{\mkbibquote{#1}}
-- for example.
If you were going this route, presumably you would invoke biblatex with options like this, so that you can keep on using your natbib citation commands:
\usepackage[style=apa,
natbib,
backend=biber]{biblatex}
(Note that standard caveats about Using biblatex-apa apply.)
Here's a MWE that introduces another trick to preserve casing. Removing the period delimiter is more complicated and I'm not sure it's really required/desired.
\documentclass{article}
\usepackage[english, american]{babel}
\usepackage{filecontents}
\usepackage[style=apa,
natbib,
backend=biber]{biblatex}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,
unpublished,techreport,misc,book]
{title}{\mkbibquote{#1}}
\DeclareFieldFormat{apacase}{#1}
\DeclareLanguageMapping{american}{american-apa}
\begin{filecontents}{references.bib}
@book{sloterdijk2013change,
title={You Must Change Your Life},
author={Sloterdijk, P.},
publisher={Polity Press},
year={2013}
}
@Article{Hart,
author = {P.E. Hart, N.J. Nilsson, B. Raphael},
title = {Correction to a Formal Basis for the Heuristic Determination of Minimum Cost Paths },
journal = {SIGART Newsletter 37},
year = {1972},
pages = {28-29}
}
\end{filecontents}
\bibliography{references.bib}
\begin{document}
\noindent \cite{Hart}.
\noindent Cf. Sloterdijk \citeyear[(pp. 84--85)]{sloterdijk2013change}.
\printbibliography
\end{document}