Getting Started Common Elements Mechanics Technical Texts Special Pages Special Documents Creating Graphics Programming Miscellaneous Help and Recommendations Appendices |
edit this box • edit the TOC |
a.bib
) and another concerning topic B (b.bib
). When writing about topic AB, both of these files can be linked into the document (perhaps in addition to sources ab.bib
specific to topic AB).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:thebibliography
is a keyword that tells LaTeX to recognize everything between the begin and end tags as data for the bibliography. The mandatory argument, which I supplied after the begin statement, is telling LaTeX how wide the item label will be when printed. Note however, that the number itself is not the parameter, but the number of digits is. Therefore, I am effectively telling LaTeX that I will only need reference labels of one character in length, which ultimately means no more than nine references in total. If you want more than nine, then input any two-digit number, such as '56' which allows up to 99 references.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. The textit{}
command formats the title properly in italics.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.cite
command:[p.~215]
, which replaces the end-of-sentence spacing with a non-breakable inter-word space. This non-breakable inter-word space is inserted because the end-of-sentence spacing would be too wide, and 'p.' should not be separated from the page number.The code cite[215]{citation01}
will produce the same result — in this case p.~
in front of the page number will be added automatically; but it will not be added for cite[Cor.~2.5]{citation01}
.cite{}
command. The citations are then separated by commas. Here's an example: Style Name | Author Name Format | Reference Format | Sorting |
---|---|---|---|
plain | Homer Jay Simpson | #ID# | by author |
unsrt | Homer Jay Simpson | #ID# | as referenced |
abbrv | H. J. Simpson | #ID# | by author |
alpha | Homer Jay Simpson | Sim95 | by author |
abstract | Homer Jay Simpson | Simpson-1995a | |
acm | Simpson, H. J. | #ID# | |
authordate1 | Simpson, Homer Jay | Simpson, 1995 | |
apacite | Simpson, H. J. (1995) | Simpson1995 | |
named | Homer Jay Simpson | Simpson 1995 |
nocite{}
command can be used, for example:nocite{*}
, includes all entries from the database, whether they are referenced in the document or not.Citation command | Output |
---|---|
citet{goossens93} citep{goossens93} | Goossens et al. (1993) (Goossens et al., 1993) |
citet*{goossens93} citep*{goossens93} | Goossens, Mittlebach, and Samarin (1993) (Goossens, Mittlebach, and Samarin, 1993) |
citeauthor{goossens93} citeauthor*{goossens93} | Goossens et al. Goossens, Mittlebach, and Samarin |
citeyear{goossens93} citeyearpar{goossens93} | 1993 (1993) |
citealt{goossens93} citealp{goossens93} | Goossens et al. 1993 Goossens et al., 1993 |
citetext{priv. comm.} | (priv. comm.) |
natbib
package. In fact, it can supersede LaTeX's own citation commands, as Natbib allows the user to easily switch between Harvard or numeric.bibliographystyle{plainnat}
. Once done, it is basically a matter of altering the existing cite
commands to display the type of citation you want.Style | Source | Description |
---|---|---|
plainnat | Provided | natbib-compatible version of plain |
abbrvnat | Provided | natbib-compatible version of abbrv |
unsrtnat | Provided | natbib-compatible version of unsrt |
apsrev | REVTeX 4 home page | natbib-compatible style for Physical Review journals |
rmpaps | REVTeX 4 home page | natbib-compatible style for Review of Modern Physics journals |
IEEEtranN | TeX Catalogue entry | natbib-compatible style for IEEE publications |
achemso | TeX Catalogue entry | natbib-compatible style for American Chemical Society journals |
rsc | TeX Catalogue entry | natbib-compatible style for Royal Society of Chemistry journals |
Option | Meaning |
---|---|
round : square : curly : angle | Parentheses () (default), square brackets [], curly braces {} or angle brackets <> |
colon : comma | multiple citations are separated by semi-colons (default) or commas |
authoryear : numbers : super | author year style citations (default), numeric citations or superscripted numeric citations |
sort : sort&compress | multiple citations are sorted into the order in which they appear in the references section or also compressing multiple numeric citations where possible |
longnamesfirst | the first citation of any reference will use the starred variant (full author list), subsequent citations will use the abbreviated et al. style |
sectionbib | for use with the chapterbib package. redefines thebibliography to issue section* instead of chapter* |
nonamebreak | keeps all the authors’ names in a citation on one line to fix some hyperref problems - causes overfull hboxes |
cite
command. You will also notice how Natbib by default will compress references with three or more authors to the more concise 1st surname et al version. By adding an asterisk (*), you can override this default and list all authors associated with that citation. There are some other specialized commands that Natbib supports, listed in the table here. Keep in mind that for instance abbrvnat
does not support citet*
and will automatically choose between all authors and et al.bibpunct
that can be used to override the defaults and change certain settings. For example, I have put the following in the preamble:{,~}
.bibpunct
are also accessible by passing options to the natbib package when it is loaded. These options also allow some other aspect of the bibliography to be controlled, and can be seen in the table (right).cite
command to cite them within the text. In this tutorial, I want to do a little better than this method, as it's not as flexible as it could be. I will concentrate on using BibTeX.@type
. BibTeX knows of practically all types you can think of, common ones are: book, article, and for papers presented at conferences, there is inproceedings. In this example, I have referred to an article within a journal.{
' to signify the beginning of the reference attributes. The first one follows immediately after the brace, which is the citation key, or the BibTeX key. This key must be unique for all entries in your bibliography. It is this identifier that you will use within your document to cross-reference it to this entry. It is up to you as to how you wish to label each reference, but there is a loose standard in which you use the author's surname, followed by the year of publication. This is the scheme that I use in this tutorial.'{o}
, and the quotation mark will close the one opening the field, causing an error in the parsing of the reference. Using usepackage[utf8]{inputenc}
in the preamble to the .tex
source file can get round this, as the accented characters can just be stored in the .bib
file without any need for special markup. This allows a consistent format to be kept throughout the .bib
file, avoiding the need to use braces when there are umlauts to consider. https://heatyellow932.weebly.com/blog/os-x-snow-leopard-iso-torrent.article | book | booklet | inbook | incollection | inproceedings ≈ conference | manual | mastersthesis, phdthesis | misc | proceedings | tech report | unpublished | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
address | o | o | o | o | o | o | o | o | o | |||
annote | ||||||||||||
author | + | * | o | *¹ | + | + | o | + | o | + | + | |
booktitle | + | + | ||||||||||
chapter | *² | o | ||||||||||
crossref | ||||||||||||
edition | o | o | o | o | ||||||||
editor | * | *¹ | o | o | o | |||||||
howpublished | o | o | ||||||||||
institution | + | |||||||||||
journal | + | |||||||||||
key | ||||||||||||
month | o | o | o | o | o | o | o | o | o | o | o | o |
note | o | o | o | o | o | o | o | o | o | o | o | + |
number | o | o | o | o | o | o | o | |||||
organization | o | o | o | |||||||||
pages | o | *² | o | o | ||||||||
publisher | + | + | + | o | o | |||||||
school | + | |||||||||||
series | o | o | o | o | o | |||||||
title | + | + | + | + | + | + | + | + | o | + | + | + |
type | o | o | o | o | ||||||||
volume | o | o | o | o | o | o | ||||||
year | + | + | o | + | + | + | o | + | o | + | + | o |
title = 'The {LaTeX} Companion',
title = '{The LaTeX Companion}',
title = {{The LaTeX Companion}},
end{document}
), you need to place the following commands:bibliography{/some/where/sample}
or bibliography{./sample1}
(if the .bib
file is in the parent directory of the .tex
document that calls it).cite{ref_key}
is the command you need, making sure that the ref_key corresponds exactly to one of the entries in the .bib file. If you wish to cite more than one reference at the same time, do the following: cite{ref_key1, ref_key2, ., ref_keyN}
.latex latex_source_code.tex
bibtex latex_source_code.aux
latex latex_source_code.tex
latex latex_source_code.tex
pdflatex latex_source_code.tex
bibtex latex_source_code.aux
pdflatex latex_source_code.tex
pdflatex latex_source_code.tex
:! pdflatex %
:! bibtex %
I couldn't open file name 'current_file.tex.aux'
:! pdflatex %
:! bibtex %:r
(without file extension, it looks for the AUX file as mentioned above):! pdflatex %
:! pdflatex %
howpublished
field of @misc
or note
field of @techreport
, @article
, @book
:howpublished = 'url{http://www.example.com}'
url
command to ensure proper appearance of URLs.url = 'http://www.example.com'
usepackage{url}
in the first case or usepackage{hyperref}
in the second case.bibliographystyle{style}
command (but don't include the .bst Download download manager for mac. extension!).cite
. It's possible to make uncited entries visible:addcontentsline{toc}{section}{Bibliography}
if you're writing an article)phantomsection
command to enable hyperlinking from the table of contents to bibliography.section
inside of the renewcommand
block:renewcommand*{refname}{vspace*{-1em}}
followed by vspace*{-1em}
to counteract the extra space the blank refname
inserts.bibliography
command, and the book or report class, you will need to redefine bibname
instead of refname
like so.lists of person names
, others are literal lists
. A date
can either be given in parts or full, some keys
are necessary, page references are provided as ranges
and certain special fields contain verbatim
code. There are many kinds of titles
.Base type | Multi-volume | Standalone part thereof | Supplemental material therein |
---|---|---|---|
@book | @mvbook | @inbook , @bookinbook | @suppbook |
@periodical | -- | @article | @suppperiodical |
@collection | @mvcollection | @incollection | @suppcollection |
@reference | @mvreference | @inreference | -- |
@proceedings | @mvproceedings | @inproceedings , @conference | -- |
article | book | mv~ | in~ | ~let | collect. | mv~ | in~ | manual | misc | online | patent | period. | proceed. | mv~ | in~ | report | thesis | unpub. | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
author , authortype | + | + | + | + | ± | – | – | + | ± | ± | ± | + | – | – | – | + | + | + | + |
editor , editortype | ^ | ^ | ^ | ^ | ± | + | + | + | ± | ± | ± | + | + | + | + | ||||
editorX , editorXtype | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | |||||||||||
holder | ^ | ||||||||||||||||||
bookauthor | ^ | ||||||||||||||||||
annotator , commentator | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ||||||||||||
translator , origlanguage | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ||||||||||||
afterword , foreword , introduction | ^ | ^ | ^ | ^ | ^ | ^ | |||||||||||||
title | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + |
titleaddon , subtitle | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ˇ | ^ | ^ | ^ | ^ | ^ | ^ |
maintitle , mainsubtitle , maintitleaddon | ^ | – | ^ | ^ | – | ^ | ^ | – | ^ | ||||||||||
booktitle | + | + | + | ||||||||||||||||
booksubtitle , booktitleaddon | ^ | ^ | ^ | ||||||||||||||||
journalsubtitle | ^ | ||||||||||||||||||
journaltitle | + | ||||||||||||||||||
eventdate , eventtitle , eventtitleaddon , venue | ^ | ^ | ^ | ||||||||||||||||
date , year | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± | ± |
month | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ||||||||
edition | ^ | ^ | ^ | ^ | ^ | ^ | |||||||||||||
issue , issuetitle , issuesubtitle | ^ | ^ | |||||||||||||||||
number | ^ | ^ | ^ | ^ | ^ | ^ | ^ | + | ^ | ^ | ^ | ^ | ^ | ||||||
series | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | |||||||
chapter | ^ | – | ^ | ^ | ^ | – | ^ | ^ | ^ | – | ^ | ^ | ^ | ||||||
part | ^ | – | ^ | ^ | – | ^ | ^ | – | ^ | ||||||||||
volume | ^ | ^ | – | ^ | ^ | – | ^ | ^ | ^ | – | ^ | ||||||||
volumes | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ||||||||||
version | ^ | ^ | ^ | ^ | ^ | ^ | |||||||||||||
doi , eprint , eprintclass , eprinttype | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | |
eid | ^ | ||||||||||||||||||
isbn | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | |||||||
isrn | ^ | ||||||||||||||||||
issn | ^ | ^ | |||||||||||||||||
isan , ismn , iswc | |||||||||||||||||||
url | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | + | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ |
urldate | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ |
location | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | |||
publisher | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | |||||||||
organization | ^ | ^ | ^ | ^ | ^ | ^ | |||||||||||||
institution | + | + | |||||||||||||||||
type | ^ | ^ | ^ | ^ | + | + | |||||||||||||
howpublished | ^ | ^ | ^ | ||||||||||||||||
pages | ^ | ^ | – | ^ | ^ | ^ | – | ^ | ^ | ^ | – | ^ | ^ | ^ | |||||
pagetotal | ^ | ^ | – | ^ | ^ | ^ | – | ^ | ^ | ^ | – | ^ | ^ |
@article
is the same as hypothetic *@inperiodical
and therefore encompasses existing @suppperiodical
@inbook
= @bookinbook
= @suppbook
@collection
= @reference
@mvcollection
= @mvreference
@incollection
= @suppcollection
= @inreference
@online
= @electronic
= @www
@report
= @techreport
@thesis
= @mastersthesis
= @phdthesis
abstract
, annotation
entrysubtype
file
label
library
nameaddon
origdate
, origlocation
, origpublisher
origtitle
, reprinttitle
, indextitle
pagination
, bookpagination
shortauthor
, shorteditor
, shorthand
, shorthandintro
, shortjournal
, shortseries
shorttitle
title
. All entry types also require either date
or year
and they specify which of author
and editor
they expect or whether they can use both. Some field types can optionally be used with any entry type:addendum
, note
language
pubstate
urldate
url
, doi
eprint
, eprintclass
, eprinttype
@artwork
@audio
@image
@movie
@music
@performance
@video
@software
@commentary
@jurisdiction
@legislation
@legal
@letter
@review
@standard
@bibnote
, @set
and @xdata
are special.printbibliography[title={Online resources}, subtype=inet]
phantomsection
before printing each bibliographyheading=subbibliography
with heading=subbibintoc
.multibib
[edit]bibtopic
[edit]Previous: Glossary | Index | Next: More Bibliographies |