[Tex/LaTex] Remove question mark following period for reference title in PDF, using Vancouver.bst

bibtexpunctuation

I am using LyX with a slightly modified vancouver.bst file. In the PDF output, reference titles that end with a question mark have a period also printed. This occurs only for those references that use the "misc" entry type. For example, one output is:

U. S. Geological Survey. Forecasting California’s Earthquakes—What Can
We Expect in the Next 30 Years?. 2008.

Note the "?." following the title.

The entry for this reference is:

@Misc{USG08,
  Author         = {{U.S. Geological Survey}},
  Title          = {Forecasting {C}alifornia's {E}arthquakes---{W}hat
                   {C}an {W}e {E}xpect in the {N}ext 30 {Y}ears?},
  year           = 2008
}

You can find the modified version of vancouver.bst on PasteBin.

I have read the responses to a similar question "remove comma after title ending with questionmark." But I could not get any of the ideas there to work, or I did not implement them properly. I do not understand bst files very well.

Can anyone offer hacks to the .bst file that would remove the extra periods?

Best Answer

here's a hack that does raise some warnings in bibtex, but appears to produce the desired output.

in this test file, i added a definition for \killpunct, to ignore the next token in the input, which will be the (inserted by bibtex) period.

\documentclass{article}
\newcommand{\killpunct}[1]{}
\begin{document}
This is a citation for \cite{USG08}.

\bibliographystyle{modified_vancouver}
\bibliography{bibpunct}
\end{document}

i made one change to the bib entry -- adding \killpunct after the question mark in the title -- and called the file bibpunct.bib:

@Misc{USG08,
  Author         = {{U.S. Geological Survey}},
  Title          = {Forecasting {C}alifornia's {E}arthquakes---{W}hat
                   {C}an {W}e {E}xpect in the {N}ext 30 {Y}ears?\killpunct},
  year           = 2008
}

note that there are no extra braces around \killpunct.

here is the output:

enter image description here

the bibtex run did raise some warnings:

Warning--empty author and editor in USG08
Warning--missing publisher in USG08

i didn't explore modified_vancouver.bst to see what might be causing this; there's nothing wrong that i can see with the author field in the .bib input. if this were my project, i would look for documentation on the .bst file, or try to ask its author what is expected from a @misc entry.