I am currently writing my thesis in LyX and I have a lot of references to use. Since I have no idea how BibTex works and to save time, I put my references as Index entry. However, this will not be later accepted by the correcting committee as they need reference pages and not indices. I cannot change them one by one manually because I have a looot of references, how can I automatically change them from indices to references.
And how can I make some cross references in the text.
Thank you,
Best Answer
What starts out on the wrong foot, ends on the wrong foot.
Take your time to understand the LaTeX / BibTeX / biblatex & biber options to have references and citations in a proper form.
You not explain if you have complete references inside each
\index{}
(theIdx⬜
in LyX) only the author-year cites, or both,, some like (in the source LaTeX) ...Anyway, you must convert the
\index{whatever}
in a\cite{key}
in the final LaTeX source and put the complete reference somewere. There are only two practical solutions for this with LyX:A) Using only a LyX file ("bread for today and hunger for tomorrow")
At the end of the document, make a bibliography environment (left format menu > select "Bibliography"). This will write:
Then put the cursor at the right of
key-1[]
, press Enter to make as many entries as you want (key-2[]
,key-3[]
, etc.).Copy the first complete reference (from the
Idx⬜
in the example) and paste it afterkey-1[]
. Next, click in this gray box to insert a unique identification key aslamport94
and the label asLamport, 1994
. The result should be alamport94[Lamport, 1994]
box before the reference.Then return to the
Idx⬜
and replace this box in by a citation box Insert > Citation... > Selectlamport94
> Apply. A[lamport94]
grey box should appear in the text. Make a PDF preview to check that this result will be a "[Lamport, 1994]" in the PDF text and and preceding the reference. Then make the same with the remaining references.B) Using Lyx and a .bib file (strongly recommend this)
Copy the citations followed by their reference to an external text file with a blank line between references: To construct a .bib file could be a pain, but with a good text editor powered with macros, or if you are expert with Linux tools as sed, rpl, awk, ..., this could be less painful that do you think.
There are tools as makebib.perl to convert plain text references to BibTeX fomat, but if you do not what the automatic result, the idea is transform the citation as
Leslie Lamport, 1994
in a key aslamport94
and split the reference so that the key and each part of the reference (authors, title, journal...) ends in separate line with a ending comma.Next step is add the BibTeX code that identify the begin-end of each reference and comma separate fields, so that the final result must be some like:
The next step is open this
.bib
file with a good BibTeX editor asJabRef
to check that the format is correct, and make the final changes.Now return to LyX, go to the end of document > Insert > List/TOC ... > BibTeX bibliography > Add... > Browse... > select
yourfile.bib
> Add > OK. This insert theBibTeX Generated Bibliography
box that in LaTeX source will be:Now you are ready to insert citations as above Insert > Citation... > Select
lamport94
> ...The big advantage of this "plan B" is that you can change easily and consistently the
plain
style without editing your references. On the other hand, you can manage/maintain/reuse/update easily huge amounts of references with specialized reference managers as Jabref.