[Tex/LaTex] LyX citation styles after insertion

bibliographiescitinglyx

I'm using LyX with the bibliography set to natbib > Author, Year in Document Settings and plainnat in the bibliography settings. So far, so good. This has the desired effect within the bibliography and the citations look good, with one exception – they are not surrounded with brackets, so they appear in the text as just Cited, 2006 rather than (Cited, 2006).

This seems to be because I was using the Default (numerical) setting until now, and changing to natbib has given the 'insert citation' dialogue multiple citation styles. Every one of my 250+ citations has now defaulted to the style without brackets.

So, question:

  • Is it possible to change all citation styles in one go?
  • Is it possible to change the natbib behaviour someway to put the brackets in (like the \bibpunct preamble or something?)

Any help much appreciated! Worst case scenario I'll go back to numerical citations…

Best Answer

Got it - I opened the .lyx file in a text editor (TextMate, but any would do) and did a find and replace to change the citation style of every citation.

  • Find: LatexCommand cite
  • Replace: LatexCommand citep

That extra p makes all of the difference! Probably worth a second find and replace to make sure there are no instances of citepp, and definitely worth doing a backup first.

Related Question