# How to reformat in-line citations when \nameyeardelim is undefined?

As per the second part of this question, I want to remove the comma from the end of the authors in my in-line citations, e.g., `Doe et al., 2013` -> `Doe et al. 2013`. The solution is to redefine `\nameyeardelim`:

``````\renewcommand*{\nameyeardelim}{\addspace}
``````

However, this causes

``````! LaTeX Error: \nameyeardelim undefined.
``````

I'm using `natbib` with the default options. How can I overcome this error to remove the comma between the last author and year in my in-line citations?

-
You should be able to use `\setcitestyle{aysep={}}`. – Adam Liter Aug 27 '13 at 20:43
Thank you @Adam, that solved it! – drs Aug 27 '13 at 23:01

The `natbib` package provides the `\setcitestyle{}` command. The argument that this command takes is a comma-separated list of keywords. One of these, `aysep`, controls the punctuation between the author and the year. (See p. 12 of the `natbib` documentation for the other keywords.)
So, to solve your problem, use `\setsitestlye{aysep={}}`.