Hi Kamarul,

in order to use author-year you need to use natbib. If you use bibtex as
your reference processor, all you need to do is to put
"\usepackage{natbib}" in your preamble (Document>>Settings>>Preamble) and
choose Natbib in Document>>Settings>>Bibliography. When you insert your
bibliography file (Insert>>List/TOC>>BibTeX Bibliography), you should
choose "plainnat" as a style. This gives you the basic setting. Many more
things are possible, including changing the style and so on. See the lyx
wiki page on bibliography for a first description of the package  [1].
There is also documentation for natbib in your latex installation (search
for the file natbib.pdf on your computer or type "texdoc natbib" at a
terminal). I enclosed a minimal  example as a working LyX file (with a
minimal bib file).

The above assumes you are using bibtex. If, instead, you are using biblatex
(like me), you should proceed differently. Write again and I'll explain how
(it is very easy).

Also, please write to the whole lyx users list---your chances to get help
will increase substantially

Cheers,

Stefano


[1] http://wiki.lyx.org/BibTeX/Background#natbib


On Thu, Jan 9, 2014 at 12:26 AM, Kamarul Imran <kim4...@gmail.com> wrote:

> Dear Prof Franchi,
>
> I stumbled a post by you on setting the author-year citation in Lyx. I
> have problems in writing the citation using author-year style in Lyx. I
> have tried a few links and the suggested workaround on Lyx website, but
> nothing works.
>
> I guess the problems lie in the 'Document setting' and 'Tools' in Lyx. I
> am using Lyx 2.0.6 on Windows 8. My citation does not show properly and no
> bibliography generated, even though the bib files were correctly
> set/linked.
>
> Would you mind, list the correct (your working) setting in Lyx so that I
> might be able to test it on my laptop.
>
> Thanks very much.
>
> Best wishes,
>
> Kamarul Imran Musa
> Malaysia
>



-- 
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas A&M University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org

Attachment: testing-natbib.lyx
Description: application/lyx

@article{808387,
 author = {John McCarthy},
 title = {History of LISP},
 journal = {SIGPLAN Not.},
 volume = {13},
 number = {8},
 year = {1978},
 issn = {0362-1340},
 pages = {217--223},
 doi = {http://doi.acm.org/10.1145/960118.808387},
 publisher = {ACM Press},
 address = {New York, NY, USA},
 }

Reply via email to