3

I use the jf.bst bibliography style and the jf.sty package. I am trying to solve two issues related to the formatting of bibliographic entries.

1. How to remove the comma after the title field if the title ends with a question mark?

e.g.

It's shown as: Bollen, Nicolas PB, and Robert E Whaley, 2004, Does net buying pressure affect the shape of implied volatility functions?, Journal of Finance 59, 711–753.

I need it to be: Bollen, Nicolas PB, and Robert E Whaley, 2004, Does net buying pressure affect the shape of implied volatility functions? Journal of Finance 59, 711–753.

2. How to remove the space between the journal and the final full stop if the paper is a working paper without publication information.

e.g.

It's shown as: Mellow, Craig, 2018, July 11, China finds a slower, steadier growth path, Barron's .

I need it to be: Mellow, Craig, 2018, July 11, China finds a slower, steadier growth path, Barron's.

  • 2
    Are you able to switch from natbib to biblatex? These issues are very easy to fix in biblatex, but a pain to fix in a bst file. From my quick look, it seems like the Journal of Finance just wants PDFs submitted, not TeX source. And if you're not submitting to any journal, then biblatex can be an option. If so, perhaps this question might be helpful. You'd have to modify jf.sty from using natbib to biblatex though as they are not compatible. – David Purton Aug 30 '18 at 3:18
  • @DavidPurton - What evidence do you have that the OP is using the natbib package? All he/she has indicated is that the jf package is in use. – Mico Aug 30 '18 at 4:45
  • @Iris - Please indicate from where you obtained jf.sty and jf.bst. (They don't seem to be part of the TeXLive distribution.) Various forms of these files are known to exist, and not all are created equally. Separately: Why do you use the @article entry type for a piece that wasn't published in an academic journal? For sure, you should be getting warnings from BibTeX about missing volume and number fields. Depending on the type of the working paper, you should be using entry types such as @techreport, @unpublished, and @misc. – Mico Aug 30 '18 at 4:48
  • @Mico, just a guess. But since JF style is author year, it's likely enough. – David Purton Aug 30 '18 at 5:19
3

natbib solution

Here's a dodgy hack based on this answer. It's easy and will give you the results you need in a hurry. But, a better solution would be to either fix the bst file or move to biblatex (below).

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{bollen+whaley:2004,
  author = {Bollen, Nicolas PB and Whaley, Robert E},
  year = {2004},
  title = {Does Net Buying Pressure Affect the Shape of Implied Volatility Functions?\killpunct},
  journal = {Journal of Finance},
  volume = {59},
  pages = {711-753}
}
@unpublished{mellow:2018,
  author = {Mellow, Craig},
  year = {2018},
  title = {July 11, {China} Finds a Slower, Steadier Growth Path, {Barron's}.\killpunct}
}
\end{filecontents}
\usepackage{natbib}
\newcommand{\killpunct}[1]{}
\begin{document}
\nocite{*}
\bibliographystyle{jf}
\bibliography{\jobname}
\end{document}

enter image description here

biblatex solution

For reference, this should get you started in biblatex. More code, but more flexibility. And doesn't involve abusing fields in bib file.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{bollen+whaley:2004,
  author = {Bollen, Nicolas PB and Whaley, Robert E},
  date = {2004},
  title = {Does Net Buying Pressure Affect the Shape of Implied Volatility Functions?},
  journaltitle = {Journal of Finance},
  volume = {59},
  pages = {711-753}
}
@unpublished{mellow:2018,
  author = {Mellow, Craig},
  date = {2018-07-11},
  title = {{China} Finds a Slower, Steadier Growth Path, {Barron's}}
}
\end{filecontents}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1}
\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}
\DeclareFieldFormat{journaltitlecase}{#1}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{volume}{\mkbibemph{#1}}
\DeclareFieldFormat{pages}{#1}
\renewcommand{\newunitpunct}{\addcomma\space}
\renewbibmacro*{in:}{}
\renewbibmacro*{date+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\newunit
     \printdateextra}}
\newbibmacro*{journal}{%
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}
    and
    test {\iffieldundef{journalsubtitle}}
  }
    {}
    {\printtext[journaltitle]{%
       \printfield[journaltitlecase]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[journaltitlecase]{journalsubtitle}}}}
\DefineBibliographyExtras{english}{%
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#1}
      {}
      {\printfield{#1}%
       \iffieldundef{#2}
         {}
         {\addcomma\space
          \mkbibmonth{\thefield{#2}}%
          \iffieldundef{#3}
            {}
            {\nobreakspace
             \stripzeros{\thefield{#3}}}}}}%
}
\pagestyle{empty}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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