LyXCiting References

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
dolphin1335
Posts: 3
Joined: Mon Aug 01, 2011 5:15 pm

Citing References

Post by dolphin1335 »

Hello guys, I am new to the forum and is probably comparatively new on LyX (and LaTeX).

I was trying hard to type every citation I have and align them in the past until recently I have encountered BibTex. I tried to use it and I find it saves much of the hard work.

Regarding BibTeX in LyX, I have several questions to ask, starting from the least important question to the most important one:
  1. How can I link my .bib database so that each time my LyX opens can find it? I needs to keep clicking into the directory every time I open a new file
  2. I found that the "blanket" symbol () for the citation in text becomes the symbol "|" (at least it looks like it). I wonder what has happened for it.
  3. Recently I am required to cite paper whose authors are of non-English name (comes with alphabets with ascents). I found that BibTeX does not support Unicode so I tried to use other encodings. I used ISO-8859-1 in my .bib database (JabRef I am using) and it works perfectly fine. But when I put in LyX, I cannot find any possible way to make it done. How can I fix it?
P.S.: I understand that BibLaTeX is perhaps more supportive on Unicode encoding (I am referring to say Biber) but I have tried like 3+ hours and keep getting error at compilation. Any resources I can refer to to fix the problem? (I have look up the page of BibLaTeX on the LyX wiki but unfortunately even I follow the step in it I still gets error).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Citing References

Post by kaiserkarl13 »

1. Put your .bib files in a location with your TeX tree. I don't know how to set this up in LyX, but for some TeX distributions the BIBINPUTS environment variable will do the trick (e.g., export BIBINPUTS=".:$HOME/LaTeX/includes:").
2. I don't understand what you mean or what you see here. It could be that you mean the citations are of the form [1] instead of (1); if that's the case, try one of the options to the cite or natbib packages.
3. You should do all of your accent marks using TeX's commands: \"o, \'o, \`o, \=o, \u o, \d o, \v o \b o \t oo, \c o, \~o, \^o, \.o, \oe, \aa, \AA, \ae, \AE, \OE, \o, \i, \j, \l, !', ?', and \L. Here's an example BibTeX entry (remember that BibTeX is allowed to mess with your capitalization for some styles):

Code: Select all

@article{Paer2009,
  author = "L{\"u}scher, Hern{\'a}n",
  title = "{CTEUD} for the Na{\"\i"}ve",
  journal = cteud,
  volume = 1,
  pages = "1--45",
  date = 1348
}
paul
Posts: 49
Joined: Thu Apr 08, 2010 5:56 am

Citing References

Post by paul »

kaiserkarl13 wrote:3. You should do all of your accent marks using TeX's commands
Or use an alternative to bibtex: there's bibtexu which is supposed to know unicode, or cl-bibtex (I've only used the latter)
dolphin1335
Posts: 3
Joined: Mon Aug 01, 2011 5:15 pm

Citing References

Post by dolphin1335 »

kaiserkarl13 wrote: 3. You should do all of your accent marks using TeX's commands: \"o, \'o, \`o, \=o, \u o, \d o, \v o \b o \t oo, \c o, \~o, \^o, \.o, \oe, \aa, \AA, \ae, \AE, \OE, \o, \i, \j, \l, !', ?', and \L. Here's an example BibTeX entry (remember that BibTeX is allowed to mess with your capitalization for some styles):

Code: Select all

@article{Paer2009,
  author = "L{\"u}scher, Hern{\'a}n",
  title = "{CTEUD} for the Na{\"\i"}ve",
  journal = cteud,
  volume = 1,
  pages = "1--45",
  date = 1348
}
Thank you very much for your help. I have tried the code you provide to me and it works perfectly well. One thing I notice is that in your example the normal encoding (MS950) is fine while the one I encounter requires alternative encoding (ISO-8859-1). Maybe I put it here for more detail:

Code: Select all

@ARTICLE{candès2009near,
  author = {Cand{\`e}s, E.J. and Plan, Y.},
  title = {Near-ideal model selection by l1 minimization},
  journal = {The Annals of Statistics},
  year = {2009},
  volume = {37},
  pages = {2145--2177},
  number = {5A},
  owner = {Raymond},
  publisher = {Institute of Mathematical Statistics},
  timestamp = {2011.08.02}
}
Edited: Now I understand what is the major problem. I amended the wordings in the line of "@article{candes2009near" and it works perfectly fine now! The citation still recognizes the ascents correctly in the pdf output. So I guess it is due to the problem that you cannot use those ascents character at the citation call (but it is fine using in the author field or other fields)

Also I am currently using Lyx to change my citation style, where I can change the Citation from "Candes [2009]" to "Candes (2009)"? (yes i mislooked the "[" symbol as "|" symbol. Sorry about that)
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Citing References

Post by kaiserkarl13 »

dolphin1335 wrote:So I guess it is due to the problem that you cannot use those ascents character at the citation call (but it is fine using in the author field or other fields)
You are correct; BibTeX keys must be ASCII or it will get upset. Any character is allowed in the field data, but limiting everything to plain ASCII is the safest and most portable (which is technically what TeX demands as well, hence the \' and other similar commands).
Post Reply