I've had a good search around Internet but can't really find anything relevant to what I'm looking for.
In Lyx, when selecting a citation options the style closest to what I need is:
(Author, Date)
As per my universities referencing guidelines, all citations such as this should be:
(Author Date)
omitting the comma.
I am using the authordate1.bst, however I have tried 1 through 4 to see if they made any difference.
I did wonder if any of this code here (from the file named above) is responsible. I toyed around with it but noticed no difference, is it just for the bibliography rather than citations?
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ t "others" =
{ ", {\em et~al.\ }\relax" * }
{ ", \& " * t * } % Butcher, pages
if$ % 186-189.
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {format.authors}
{ author empty$
{ "" }
{ author format.names }
if$
}
Is this citation style even defined by the .bst file, or is it something hard coded into Lyx?
Edit:
Problem solved (thanks @TorbjørnT.)
As said, adding this to the preamble solved the problem, assuming you are using natbib (Bibliography settings > Citation style).
\setcitestyle{aysep={ }}
Best Answer
When using
natbib
with author-year styles the separator between the author and year in citations can be (re)defined by addingto the document preamble. In LyX this is found under Document --> Settings --> LaTeX preamble. The separator can be a normal space, i.e.
\setcitestyle{aysep={ }}
, if you would like a non-breaking space so that no line-break can occur between the author and the year, use~
, i.e.\setcitestyle{aysep={~}}
.