On 06/30/2011 02:59 PM, Diego Queiroz wrote: > On Thu, Jun 30, 2011 at 2:27 PM, Thomas <thomas.tri...@cantab.net > <mailto:thomas.tri...@cantab.net>> wrote: > > Dear all, > > I am using Lxy 2.0 under Windows and I am using the Firefox Zotero > plug in for my bibliography. > > I have the following problem. > > When trying to format in text citations as "Author (Year)" which I > can choose right clicking the citation in Lyx the PDF (pdflatex) > produces "(author?)" followed by the reference number in brackets. > > Citation style is Natbib and generator is bibtex. > > I tried various approaches suggested online but nothing works. > Unfortunately, I am not even sure which of the many suggestions > apply to my problem (if any). > > Any pointers are much appreciated! > > Thomas > > > Thomas, > > I don't remember exactly why this happens. > The usual reason is that there is some kind of error in the BibTeX file that is preventing a proper read of the file, at which point it defaults to numerical citations, and you get weird errors. A very common reason is that there are improperly encoded characters in the BibTeX file, e.g., Unicode quotes or dashes. I do not myself know why programs that claim to produce BibTeX files do not, by default, produce them in a valid BibTeX encoding, which basically means ASCII. In any event, if you are using Zotero, then you need to tell it to write the BibTeX file as pure ASCII.
Note: This is not a LyX limitation, but a BibTeX one. There are 8-bit BibTeX processors, and you can use something like biber instead, which will handle Unicode. So telling LyX to use one of those instead of bibtex (under Tools>Preferences>Output>LaTeX) is also an option. Richard