On 23/08/2013 3:08 AM, Wolfgang Engelmann wrote:
Am Thursday, 22. August 2013, 20:46:14 schrieb Csikos Bela:> >So I select under tools>output>latex> Bibliography Processor > bibtex > >(or custom? or bibtex8?) > > It seems you are using an older lyx version. It should work with it, > still I suggest upgrading lyx to version 2.x. ###Thanks for your answer. I am using 2.0.6 May be I should upgrade, but I am always afraid I do something wrong and can't work with it afterward. There is a deadline for a book chapter waiting... > > Set bibliography processor to bibtex. bibtex8 might work as well, I > never tried it. If you select bibtex, make sure those fields in the bib > database file that will be in the output do have only ASCII or latin-1 > encoded characters. Special characters should be replaced by latex > commands (eg. รถ is \"{o} etc.). > > >Since I have over 700 citations, I used Jabref for my bibliography and > >clicked the references via the lyx-export of jabref to the > >corresponding places of my document. If I use \setcitestyle{aysep={}} > >instead of your proposed \setcitestyle{round,aysep={}}, and if I put > >() around the citation, I get what I need. > > Do not add manually '(' and ')' around citations. The opening and > closing braces (rounded, square, or other) are part of the citation. > And it is better to add the citations within lyx. > > I don't know if jabref can handle the two different types of citations: > ' and 'text (Author year) text'. Can it make a > difference? If you insert the citations within lyx you can select which > type you want. If you look at the source you can see that the latex > command for the two types are different, \citet and \citep. > > Also, if you have several citations in a group, lyx can handle it. > Can jabref handle that? ###I do it via lyx (add) > > Unfortunately you have to go through all the citations and adjust them > manually. Or you can work on the .lyx source file directly using a text > editor and replacing all cite* command with citep. (Make a backup > of the original file before editing!) After this open your edited file > in lyx, find the few (I suppose) occasions of 'text Author (year) text' > type citations and adjust them manually. > > The \setcitestyle{round,aysep={}} and \setcitestyle{aysep={}} > commands in the preamble have the same effect, as round is the > default option in case of author-year citation. Removing or adding it > does not make any difference. > > >But what about eg: (Praschak-Rieder and Willeit 2012) and in case > >of three authors and more (Crosthwait et al. 1997)? > > I don't understand what your question is. ### here I meant the 'et al' after more then 2 authors in a (one!) reference: author 1 author 1 and author 2 author 1 et all (3 authors or more) > Unfortunately latex handles citations in goups. One group is all > the citations selected and added at the same time. All these citations > will be between the same pair of parentheses. If you add neighboring > citations separately, they will be within different parentheses pairs. > > The source also shows the difference. For example. > > 3 citations in one group: > > \citep{citation1,citation2,citaton3} > > The output will be: > > (author1 year1, author2 year2, author3 year3) > > However if you add them separately, like this: > > \citep{citation1} \citep{citation2} \cite{citaton3} > > the output will be: > > (author1 year1) (author2 year2) (author3 year3) > > You can adjust the opening and closing braces and the seperators > between authors etc using \setcitestyle. > > Read the natbib manual (available at CTAN) section 2.9 Selecting > citation punctuation. > > >Where in the .lyx file (or elsewhere) would I place the authdate.bst > >file you kindly supplied? > > You can put it anywhere you want, but the best place is the directory > where your .lyx file is. You select the bst file by clicking 'BibTeX > Generated Bibliography' and browse for it. ### I guess there is a 'normal' place? I have it now in .lyx/layouts
The .bst file has to be found by *bibtex*, so .lyx/layouts isn't a particularly good choice (unless you additionally tell bibtex to look there). The document directory, as suggested by Csikos, works just fine.
Cheers, Julien
