2

I have made a custom bibliography style with the makebst utility, where i chose numerical in-text citations. The default style is apparently with square brackets around the citation number, but i need parentheses around the number.

My style is not compatible with the natbib package so the "change square to round" solution does not solve the problem.

Here is my custom.bst which i made to suit the needs of the American Journal of Clinical Nutrition.

MWE:

\documentclass[12pt,letterpaper]{article}
\usepackage[margin=2.54cm]{geometry}

\makeatletter
\renewcommand{\@biblabel}[1]{\quad#1.}
\makeatother

  \begin{document}
    I want these square brackets to be parentheses\cite{Turner-McGrievy2015}, like this(1).

    \bibliographystyle{ajcn}
    \bibliography{library}
  \end{document}
7
  • Isn't that a job for natbib? – Johannes_B May 22 '16 at 12:24
  • AFAIK my style is not compatible with the natbib package. – Nowak May 22 '16 at 12:28
  • AFAIK? You tested that, right? I certainly cannot know it. – Johannes_B May 22 '16 at 12:33
  • 1
    Most packages need to be used, often in a special way. Just by loading a package, you cannot get the magic done. You have to tell natbib what you want and you (likely) want \usepackage[round,numbers]{natbib} – Johannes_B May 22 '16 at 12:50
  • 1
    @Mico I know, i tried it out before leaving the comment ;-) – Johannes_B May 22 '16 at 13:56
4

My [makebst-produced bibliography] style is not compatible with the natbib package

You should check the correctness of this claim. The custom-bib package and its makebst utility were written by the person who also authored the natbib citation management package. As such, bespoke bibliography styles created with the makebst should generally be eminently compatible with natbib.

You should load the natbib package with the options round and numbers. Be sure to recompile twice in order to propagate all changes.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{library.bib} % create a dummy entry
@misc{Turner-McGrievy2015, author = "A", title = "B", year = 2015}
\end{filecontents}

\documentclass[12pt,letterpaper]{article}
\usepackage[margin=1in]{geometry}
\usepackage[round,numbers]{natbib}
\bibliographystyle{ajcn}  
\makeatletter
\renewcommand{\@biblabel}[1]{\quad#1.}
\makeatother

\begin{document}
I want the fences around a citation call-out, e.g., 
\cite{Turner-McGrievy2015}, to be like ``(1)''.

\bibliography{library}
\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.