[Tex/LaTex] How to modify a bibliography style to surround titles in quotes in a bibliography


My advisor wants me to cause all titles for papers, books, and articles in " for my thesis in my bibliography.

I am using natbib and the plainnat bibliography style and am unsure how to do this. I am NOT asking how to do this or displaying a quote in the title, I want to make the title show " around it with capitalization being saved. I could go through and manually modify the .bib file I suppose…

Here is a working example:

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}
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}


    I don't want it to look like this reference \cite{Hart}

    I want it to look like this \cite{Hart2}



Is there a way to easily do this? I can always hack this by doing what I did for the second reference if not.

From reading this documentation nothing stands out to me as doing this?

Best Answer

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 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>>, ..)

  You have selected: Title and punctuation in double quotes


(*) Quote collection and proceedings titles too
(x) Collection and proceedings titles not in quotes 

  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$ * "}" * }

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
  format.title "title" output.check
  crossref missing$
    { journal emphasize "journal" output.check
      eid empty$
        { format.vol.num.pages output }
        { format.vol.num.eid output }
      format.date "year" output.check
    { format.article.crossref output.nonnull
      eid empty$
        { format.pages output }
        { format.eid output }
  format.issn output
  format.doi output
  format.url output
  note output

We now change the line

format.title "title" output.check


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:


To implement correct placement of the punctuation with respect to the quotation mark we need to add the following extra line:


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


FUNCTION {format.btitle}
    { title enquote
Related Question