I am using TeXmaker on windows 7 (if this matters).
I would like to know how to add bibliography (under the title, References) to a letter.
(I created this letter using the default template available.)
I saw in one of the questions here the following snippet, but it fails for me.
% Some Preamble that comes with the default letter Template
\begin{document}
\begin{letter}{--To whom is it written--}
Some Text is here.
\printbibliography
\end{letter}
\end{document}
%Bibfile
@Article{,
author = {•},
title = {•},
journal = {•},
year = {•},
OPTkey = {•},
OPTvolume = {•},
OPTnumber = {•},
OPTpages = {•},
OPTmonth = {•},
OPTnote = {•},
OPTannote = {•}
}
I have two other doubts as well:
-
Is the keyword that I'll use to cite this reference written
- in place of • in
OPTkey={•}
(in which case, I am wondering how is that OPTional?) or - preceding the
,
that is on the first line?
- in place of • in
-
When I press clean, all those OPTional fields for which I have entered some value also disappear. Is this the normal behaviour and in which case, will they show up on my reference?
I'd like thank you for your patience in reading this question and writing up an answer.
(P.S.: I am sorry if I packed in a lot to my question. And, as I'm a newbie here, I welcome any suggestions about the style of the question. )
Best Answer
Here's a step-by-step example of how to create a document with a bibliography using TeXMaker.
Create a bib file
Using the Bibliography menu, enter your bibliography entries. Save these as (Here I've chosen the name
mybibfile.bib
).Here is a sample screen shot:
The first element of any bib file entry is the citekey. This must be unique for each entry in the file. I use keys based on the authors and the year of publication, but this scheme is up to you.
The "optional" fields in the entry are fields that basically won't cause any errors if they are missing. Many of them are required for proper bibliographic referencing, though, for example, the volume and pages are almost always required. You should put as much information as you have in a
.bib
entry.Create a LaTeX document
Next, create a LaTeX document which uses
\cite
commands that refer to the citekeys in your.bib
file.The
letter
document class is not designed to support a bibliography, so I would suggest using thearticle
class instead. Here's a simple example:The code of the document can be found here:
Now you need to run
pdflatex
on this document, thenbibtex
, thenpdflatex
two more times. The final result should be: