TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using unsrtnat.bst, but I need entries of type inproceedings to have their title quoted. The title line is:

format.title "title" output.check

I found a 'quote' function in another .bst file

FUNCTION {quote}
{ duplicate$ empty$
    { pop$ "" }
    { "``" swap$ * "''" * }

and changed the line to

format.title quote "title" output.check

and it almost works... it produces:

Author "Title", Conference

but unfortunately it needs to be

Author "Title," Conference

(the comma inside the quotes). Can anyone suggest a way to do this?

share|improve this question

The comma after the title is produced by output.check. So a possibility (untested) would be to change the quote function in

FUNCTION {quoteleft}
{ duplicate$ empty$
    { pop$ "" }
    { "``" swap$ * }

and then

format.title quoteleft "title" output.check 
title $empty
  {"''" write$}
share|improve this answer
Hm, the left quote appears in the correct position, but there is no right quote at all? – David Doria Oct 25 '12 at 19:17
@DavidDoria forgot write$ :-) – Guido Oct 25 '12 at 19:19
Unfortunately, still nothing :( – David Doria Oct 25 '12 at 19:27
The file I am using is here: pastebin.com/Zx04E7Mx (line 921 starts the @inproceedings function) – David Doria Oct 25 '12 at 19:29
On IRC, someone showed me to define: FUNCTION {init.seq} { #0 'seq.num := "\def\swaptwo#1#2{#2#1}" write$ } and then replace { "" swap$ * } in my original 'quote' function with { "" swap$ * "\swaptwo{''}" * } . It seems to do the trick. – David Doria Oct 25 '12 at 20:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.