LaTeX/Bibliography Management : Différence entre versions
m |
(→Using a specific BiBTeX file to create a bibliography : Import from wikibooks concerning templates) |
||
| Ligne 94 : | Ligne 94 : | ||
| − | === Using a specific | + | === Using a specific BibTeX file to create a bibliography === |
| − | ==== Create a | + | ==== Create a BibTeX file ==== |
| − | You can put all your references into a separate file. Save it in .bib (as "mybiblio.bib" ) in the same folder than your main LaTeX file. | + | You can put all your references into a separate file. Save it in .bib (as "mybiblio.bib" ) in the same folder than your main LaTeX file. A BibTeX file contains references to text of various kinds. In the following example, the description of the <Vikat2007 article starts with the <tt>@article{Vikat2007,</tt> and ends with right bracket. A second article is then described. |
<source lang="latex" enclose="none"> | <source lang="latex" enclose="none"> | ||
| Ligne 123 : | Ligne 123 : | ||
} | } | ||
</source> | </source> | ||
| + | |||
| + | The BibTeX format has evolved since the mid 80's and is currently used by many softwares, databases and servers. In the mid 80's <tt>URL</tt> as well as <tt>doi</tt> did not exist and are now very common; that's the reason for the inclusion in most modern BiBTeX files. But many fields are proprietary fields added by database specific to scientific reviews as well as scientific databases like JStor. The are treated as comments by BibTeX. | ||
| + | |||
| + | You can also add your own field. | ||
| + | |||
| + | It is very rare to enter manually the various fields required to specify an article and you will use a software which will help you fill the mandatory fields (author, title, year) as well as the optional fields. | ||
| + | |||
| + | It can be a software like <tt>jabref</tt> which will be discussed later as well as Web services like <tt>Zotero</tt> or <tt>Mendeley</tt> or <tt>Bibsonomy</tt>. | ||
| + | |||
| + | === Standard templates=== | ||
| + | ;@article : An article from a magazine or a journal. | ||
| + | :*Required fields: author, title, journal, year. | ||
| + | :*Optional fields: volume, number, pages, month, note. | ||
| + | <source lang="bibtex"> | ||
| + | @article{Xarticle, | ||
| + | author = "", | ||
| + | title = "", | ||
| + | journal = "", | ||
| + | %volume = "", | ||
| + | %number = "", | ||
| + | %pages = "", | ||
| + | year = "XXXX", | ||
| + | %month = "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@book : A published book | ||
| + | :*Required fields: author/editor, title, publisher, year. | ||
| + | :*Optional fields: volume/number, series, address, edition, month, note. | ||
| + | <source lang="bibtex"> | ||
| + | @book{Xbook, | ||
| + | author = "", | ||
| + | title = "", | ||
| + | publisher = "", | ||
| + | %volume = "", | ||
| + | %number = "", | ||
| + | %series = "", | ||
| + | %address = "", | ||
| + | %edition = "", | ||
| + | year = "XXXX", | ||
| + | %month = "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@booklet : A bound work without a named publisher or sponsor. | ||
| + | :*Required fields: title. | ||
| + | :*Optional fields: author, howpublished, address, month, year, note. | ||
| + | <source lang="bibtex"> | ||
| + | @booklet{Xbooklet, | ||
| + | %author = "", | ||
| + | title = "", | ||
| + | %howpublished = "", | ||
| + | %address = "", | ||
| + | year = "XXXX", | ||
| + | %month = "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@conference : Equal to inproceedings | ||
| + | :*Required fields: author, title, booktitle, year. | ||
| + | :*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note. | ||
| + | <source lang="bibtex"> | ||
| + | @conference{Xconference, | ||
| + | author = "", | ||
| + | title = "", | ||
| + | booktitle = "", | ||
| + | %editor = "", | ||
| + | %volume = "", | ||
| + | %number = "", | ||
| + | %series = "", | ||
| + | %pages = "", | ||
| + | %address = "", | ||
| + | year = "XXXX", | ||
| + | %month = "", | ||
| + | %publisher= "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@inbook : A section of a book ''without'' its own title. | ||
| + | :*Required fields: author/editor, booktitle, chapter and/or pages, publisher, year. | ||
| + | :*Optional fields: volume/number, series, type, address, edition, month, note. | ||
| + | |||
| + | ;@incollection : A section of a book having its own title. | ||
| + | :*Required fields: author, title, booktitle, publisher, year. | ||
| + | :*Optional fields: editor, volume/number, series, type, chapter, pages, address, edition, month, note. | ||
| + | |||
| + | ;@inproceedings : An article in a conference proceedings. | ||
| + | :*Required fields: author, title, booktitle, year. | ||
| + | :*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note. | ||
| + | |||
| + | ;@manual : Technical manual | ||
| + | :*Required fields: title. | ||
| + | :*Optional fields: author, organization, address, edition, month, year, note. | ||
| + | |||
| + | ;@mastersthesis : Master's thesis | ||
| + | :*Required fields: author, title, school, year. | ||
| + | :*Optional fields: type (eg. "diploma thesis"), address, month, note. | ||
| + | <source lang="bibtex"> | ||
| + | @mastersthesis{Xthesis, | ||
| + | author = "", | ||
| + | title = "", | ||
| + | school = "", | ||
| + | %type = "diploma thesis", | ||
| + | %address = "", | ||
| + | year = "XXXX", | ||
| + | %month = "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@misc : Template useful for other kinds of publication | ||
| + | :*Required fields: none | ||
| + | :*Optional fields: author, title, howpublished, month, year, note. | ||
| + | <source lang="bibtex"> | ||
| + | @misc{Xmisc, | ||
| + | %author = "", | ||
| + | %title = "", | ||
| + | %howpublished = "", | ||
| + | %year = "XXXX", | ||
| + | %month = "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@phdthesis : Ph.D. thesis | ||
| + | :*Required fields: author, title, year, school. | ||
| + | :*Optional fields: address, month, keywords, note. | ||
| + | |||
| + | ;@proceedings : The proceedings of a conference. | ||
| + | :*Required fields: title, year. | ||
| + | :*Optional fields: editor, volume/number, series, address, month, organization, publisher, note. | ||
| + | |||
| + | ;@techreport : Technical report from educational, commercial or standardization institution. | ||
| + | :*Required fields: author, title, institution, year. | ||
| + | :*Optional fields: type, number, address, month, note. | ||
| + | <source lang="bibtex"> | ||
| + | @techreport{Xtreport, | ||
| + | author = "", | ||
| + | title = "", | ||
| + | institution = "", | ||
| + | %type = "", | ||
| + | %number = "", | ||
| + | %address = "", | ||
| + | year = "XXXX", | ||
| + | %month = "", | ||
| + | %note = "", | ||
| + | } | ||
| + | </source> | ||
| + | |||
| + | ;@unpublished : An unpublished article, book, thesis, etc. | ||
| + | :*Required fields: author, title, note. | ||
| + | :*Optional fields: month, year. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
Version du 16 juin 2011 à 21:36
Sommaire
Embedded system
If you are writing only one or two documents and aren't planning on writing more on the same subject for a long time, maybe you don't want to waste time creating a database of references you are never going to use. In this case you should consider using the basic and simple bibliography support that is embedded within LaTeX.
LaTeX provides an environment called thebibliography that you have to use where you want the bibliography; that usually means at the very end of your document, just before the \end{document} command. Here is a practical example:
The \LaTeX system~\cite{lamport94} is set of macros for the \TeX engine.
\begin{thebibliography}{9}
\bibitem{lamport94}
Leslie Lamport,
\emph{\LaTeX: A Document Preparation System}.
Addison Wesley, Massachusetts,
2nd Edition,
1994.
\end{thebibliography}
will be displayed with numbered references:
The LaTeX system [1] is set of macros for the TeX engine.
The \LaTeX system~\cite{lamport94} is a set of macros for the \TeX engine.
\begin{thebibliography}{9}
\bibitem[(Lamport 1994)]{lamport94}
Leslie Lamport,
\emph{\LaTeX: A Document Preparation System}.
Addison Wesley, Massachusetts,
2nd Edition,
1994.
\end{thebibliography}
will be displayed using the optional argument of the bibitem action:
OK, so what is going on here? The first thing to notice is the establishment of the environment. thebibliography is a keyword that LaTeX recognizes as everything between the begin and end tags as being data for the bibliography. The optional argument, which I supplied after the begin statement, is telling LaTeX how wide the item label will be when printed. Note however, that it is not a literal parameter, i.e the number 9 in this case, but a text width. Therefore, I am effectively telling LaTeX that I will only need reference labels of one character in width, which means no more than nine references in total. If you want more than ten, then input a two-digit number, such as '99' which permits fewer than 100 references.
Next is the actual reference entry itself. This is prefixed with the \bibitem{cite_key} command. The cite_key should be a unique identifier for that particular reference, and is often some sort of mnemonic consisting of any sequence of letters, numbers and punctuation symbols (although not a comma). I often use the surname of the first author, followed by the last two digits of the year (hence lamport94). If that author has produced more than one reference for a given year, then I add letters after, 'a', 'b', etc. But, you should do whatever works for you. Everything after the key is the reference itself. You need to type it as you want it to be presented. I have put the different parts of the reference, such as author, title, etc., on different lines for readability. These linebreaks are ignored by LaTeX. I wanted the title to be in italics, so I used the \emph{} command to achieve this.
Citations
To actually cite a given document is very easy. Go to the point where you want the citation to appear, and use the following: \cite{cite_key}, where the cite_key is that of the bibitem you wish to cite. When LaTeX processes the document, the citation will be cross-referenced with the bibitems and replaced with the appropriate number citation. The advantage here, once again, is that LaTeX looks after the numbering for you. If it were totally manual, then adding or removing a reference would be a real chore, as you would have to re-number all the citations by hand.
Instead of WYSIWYG editors, typesetting systems like \TeX{} or \LaTeX{} \cite{lamport94} can be used.
Referring More Specific
Sometimes you want to refer to a certain page, figure or theorem in a text book. For that you can use the arguments to the \cite command:
\cite[p.~215]{citation01}
The argument, "p. 215", will show up inside the same brackets. Note the tilde in [p.~215], which replaces the end-of-sentence spacing with a non-breakable inter-word space. There are two reasons: end-of-sentence spacing is too wide, and "p." should not be separated from the page number.
Multiple Citations
When a sequence of multiple citations are needed, you should use a single \cite{} command. The citations are then separated by commas. Note that you must not use spaces between the citations. Here's an example:
\cite{citation01,citation02,citation03}
The result will then be shown as citations inside the same brackets.
No Cite
If you only want a reference to appear in the bibliography, but not where it is referenced in the main text, then the \nocite{} command can be used, for example:
Lamport showed in 1995 something... \nocite{lamport95}.
A special version of the command, \nocite{*}, includes all entries from the database, whether they are referenced in the document or not.
BiBTeX styles for reviews
Economic reviews
You can access to some bibliographic styles specific to economic reviews at the URL http://www.ctan.org/tex-archive/biblio/bibtex/contrib/economic
The README file should be read first.
For the springer journals, you can access to the Instruction for authors at the following URL: http://www.springer.com/cda/content/document/cda_downloaddocument/LaTeX.zip?SGWID=0-0-45-468198-0
Using a specific BibTeX file to create a bibliography
Create a BibTeX file
You can put all your references into a separate file. Save it in .bib (as "mybiblio.bib" ) in the same folder than your main LaTeX file. A BibTeX file contains references to text of various kinds. In the following example, the description of the <Vikat2007 article starts with the @article{Vikat2007, and ends with right bracket. A second article is then described.
@article{Vikat2007,
Author = {Solaz, A.},
Doi = {10.4054/DemRes.2007.17.14},
Journal = {Demographic Research},
Number = {14},
Pages = {389-440},
Title = {Generation and Gender Survey (GGS): Towards a better understanding of relationships and processes in the life course},
Volume = {17},
Year = {2007},
Bdsk-Url-1 = {http://dx.doi.org/10.4054/DemRes.2007.17.14}}
@article{Régnier-Loilier2006,
author = {Régnier-Loilier, A.},
title= {How often do adult children see their parents?},
year = {2006},
URL = {http://www.ined.fr/fichier/t_publication/1211/publi_pdf2_pop.and.soc.english.427.pdf},
journal = {Population & Societies},
volume = {427},
}
The BibTeX format has evolved since the mid 80's and is currently used by many softwares, databases and servers. In the mid 80's URL as well as doi did not exist and are now very common; that's the reason for the inclusion in most modern BiBTeX files. But many fields are proprietary fields added by database specific to scientific reviews as well as scientific databases like JStor. The are treated as comments by BibTeX.
You can also add your own field.
It is very rare to enter manually the various fields required to specify an article and you will use a software which will help you fill the mandatory fields (author, title, year) as well as the optional fields.
It can be a software like jabref which will be discussed later as well as Web services like Zotero or Mendeley or Bibsonomy.
Standard templates
- @article
- An article from a magazine or a journal.
- Required fields: author, title, journal, year.
- Optional fields: volume, number, pages, month, note.
@article{Xarticle, author = "", title = "", journal = "", %volume = "", %number = "", %pages = "", year = "XXXX", %month = "", %note = "", }
- @book
- A published book
- Required fields: author/editor, title, publisher, year.
- Optional fields: volume/number, series, address, edition, month, note.
@book{Xbook, author = "", title = "", publisher = "", %volume = "", %number = "", %series = "", %address = "", %edition = "", year = "XXXX", %month = "", %note = "", }
- @booklet
- A bound work without a named publisher or sponsor.
- Required fields: title.
- Optional fields: author, howpublished, address, month, year, note.
@booklet{Xbooklet, %author = "", title = "", %howpublished = "", %address = "", year = "XXXX", %month = "", %note = "", }
- @conference
- Equal to inproceedings
- Required fields: author, title, booktitle, year.
- Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.
@conference{Xconference, author = "", title = "", booktitle = "", %editor = "", %volume = "", %number = "", %series = "", %pages = "", %address = "", year = "XXXX", %month = "", %publisher= "", %note = "", }
- @inbook
- A section of a book without its own title.
- Required fields: author/editor, booktitle, chapter and/or pages, publisher, year.
- Optional fields: volume/number, series, type, address, edition, month, note.
- @incollection
- A section of a book having its own title.
- Required fields: author, title, booktitle, publisher, year.
- Optional fields: editor, volume/number, series, type, chapter, pages, address, edition, month, note.
- @inproceedings
- An article in a conference proceedings.
- Required fields: author, title, booktitle, year.
- Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.
- @manual
- Technical manual
- Required fields: title.
- Optional fields: author, organization, address, edition, month, year, note.
- @mastersthesis
- Master's thesis
- Required fields: author, title, school, year.
- Optional fields: type (eg. "diploma thesis"), address, month, note.
@mastersthesis{Xthesis, author = "", title = "", school = "", %type = "diploma thesis", %address = "", year = "XXXX", %month = "", %note = "", }
- @misc
- Template useful for other kinds of publication
- Required fields: none
- Optional fields: author, title, howpublished, month, year, note.
@misc{Xmisc, %author = "", %title = "", %howpublished = "", %year = "XXXX", %month = "", %note = "", }
- @phdthesis
- Ph.D. thesis
- Required fields: author, title, year, school.
- Optional fields: address, month, keywords, note.
- @proceedings
- The proceedings of a conference.
- Required fields: title, year.
- Optional fields: editor, volume/number, series, address, month, organization, publisher, note.
- @techreport
- Technical report from educational, commercial or standardization institution.
- Required fields: author, title, institution, year.
- Optional fields: type, number, address, month, note.
@techreport{Xtreport, author = "", title = "", institution = "", %type = "", %number = "", %address = "", year = "XXXX", %month = "", %note = "", }
- @unpublished
- An unpublished article, book, thesis, etc.
- Required fields: author, title, note.
- Optional fields: month, year.
Insert your BiBTeX file into your main file
You just need to insert into your main LaTeX:
\bibliography{mybiblio}
You can choose a specific style:
\bibliographystyle{econometrica-fr}
\bibliography{mybiblio}