0

I am doing citations for my master thesis which I just started writing in LyX. How do I cite my references like this: (author, year)? I have googled for like two hours now and nothing seems to work.

I tried to add \setcitestyle{aysep={<separator>}} in the preamble or round to documentclass and changing bibliography to natbib with option authoryear.

I have also tried adding natbib in the preamble, still no dice.

Any ideas are much appreciated. I am very new to LyX so I might need a little elaboration.

  • Which bibliography style do you employ? Hint: Not all bibliography styles are capable of producing authoryear-style citation call-outs. – Mico Sep 13 '16 at 20:01
  • Currently it is Natlib Author-year, it gives me the following types of citation: Author (Year) – no nein Sep 13 '16 at 20:05
  • Let me be more specific: Do you have a \bibliographystyle instruction somewhere in your document? If so, what's the argument of \bibliographystyle? – Mico Sep 13 '16 at 20:06
  • No, I do not. I have only changed things in the setting GUI menu. – no nein Sep 13 '16 at 20:08
  • If there's no \bibliographystyle instruction, BibTeX won't know how it should format the bibliographic entries... – Mico Sep 13 '16 at 20:11
0

You should

  • use a bibliography style that can generate authoryear-style citation call-outs,

  • load the natbib package with the option authoryear, and

  • use the instruction \citep to generate "parenthetic" citation call-outs, e.g., (Author, Year), and use \citet to generate "textual" citation call-outs, e.g., Author (Year).

Note that some bibliography styles cannot generate authoryear-style citation call-outs. E.g., plain, abbrv and unsrt can generate only numeric-style citation call-outs. (Use plainnat, abbrvnat, and unsrtnat instead...)

  • I am sorry for what is most likely a dumb question, but how would I load the natbib package with that option? I have that on in the settings under Bibliography – no nein Sep 13 '16 at 20:06
  • @nonein - \usepackage[authoryear]{natbib}. – Mico Sep 13 '16 at 20:07
  • Add this under the preamble I assume? – no nein Sep 13 '16 at 20:08
  • @nonein - Indeed, all \usepackage instructions must occur in the preamble. – Mico Sep 13 '16 at 20:09
  • I think I might be in love! It works, I do however have to add \citep in a latex code box. But I suppose that will do! Thank you very much1 – no nein Sep 13 '16 at 20:10
2

Rather than messing around with the preamble, if simple Author-year citations is all you need they can be configured in the document settings.

Lyx settings to enable author-year citations

If you need more customization than that you should probably start looking at biblatex. That however is not straightforwardly integrated into Lyx and if you intend to customize you'll need to know at least some basic (La)Tex.

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.