12

I am relatively new to the natbib package. I was wondering if there is an option to remove the 'comma' between an author name and year. For example, using the style apalike, I get (Name, year), but I want it to appear as (Name year).

9
  • It would be easy to do with biblatex.
    – Bernard
    Commented Apr 6, 2016 at 17:58
  • Even if I think what you want to achieve is rather easy to achieve (see my suggestion below), I would second @Bernard and recommend checking out biblatex. It is so much more powerful and flexible. And given that you are new to natbib, as you say, I would invest in the switch and start reaping the benefits.
    – Daniel
    Commented Apr 6, 2016 at 20:38
  • 1
    @Bernard -- "It would be easy to do with biblatex" -- Is the instruction \setcitestyle{aysep={}} not easy enough? :-)
    – Mico
    Commented Apr 6, 2016 at 20:52
  • @ Mico: Sure, but I couldn't make such an naswer knowing not natbib. I meant it's easier to customise biblatex than to put hands on a .bst file.
    – Bernard
    Commented Apr 6, 2016 at 20:56
  • @Bernard - The OP did mention the use of the natbib package. The form of the citation call-out -- including the presence or absence of a comma between the author and year labels -- is controlled by natbib, not the bst file.
    – Mico
    Commented Apr 6, 2016 at 20:59

1 Answer 1

17

The natbibpackage provides the command \setcitestyle that allows for some customization. The delimiter between author and year in citations is set using the key-value pair aysep={<char>}.

Here is an almost MWE (fill in your bib file and a prober cite key):

\documentclass[]{article}
   \usepackage{natbib}
   \setcitestyle{aysep={}} 
\begin{document}
   \bibliographystyle{apalike}

   \citep{<some cite key in your bib file>}

   \bibliography{<bib file>}
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .