banner



Is There A Way To Clean Latex Bib Files

LaTeX logo.svg

LaTeX

Getting Started
  1. Introduction
  2. Installation
  3. Installing Extra Packages
  4. Basics
  5. How to become aid

Common Elements

  1. Document Structure
  2. Text Formatting
  3. Paragraph Formatting
  4. Colors
  5. Fonts
  6. List Structures
  7. Special Characters
  8. Internationalization
  9. Rotations
  10. Tables
  11. Championship creation
  12. Page Layout
  13. Customizing Page Headers and Footers‎
  14. Importing Graphics
  15. Floats, Figures and Captions
  16. Footnotes and Margin Notes
  17. Hyperlinks
  18. Labels and Cross-referencing
  19. Initials

Mechanics

  1. Errors and Warnings
  2. Lengths
  3. Counters
  4. Boxes
  5. Rules and Struts

Technical Text

  1. Mathematics
  2. Advanced Mathematics
  3. Theorems
  4. Chemical Graphics
  5. Algorithms
  6. Source Code Listings
  7. Linguistics

Special Pages

  1. Indexing
  2. Glossary
  3. Bibliography Direction
  4. More Bibliographies

Special Documents

  1. Scientific Reports (Available Report, Chief Thesis, Dissertation)
  2. Letters
  3. Presentations
  4. Teacher'southward Corner
  5. Curriculum Vitae

Creating Graphics

  1. Introducing Procedural Graphics
  2. MetaPost
  3. Film
  4. PGF/TikZ
  5. PSTricks
  6. Xy-pic
  7. Creating 3D graphics

Programming

  1. Macros
  2. Plain TeX
  3. Creating Packages
  4. Creating Package Documentation
  5. Themes

Miscellaneous

  1. Modular Documents
  2. Collaborative Writing of LaTeX Documents
  3. Consign To Other Formats

Help and Recommendations

  1. FAQ
  2. Tips and Tricks

Appendices

  1. Authors
  2. Links
  3. Package Reference
  4. Sample LaTeX documents
  5. Alphabetize
  6. Control Glossary

edit this box • edit the TOC

For any academic/research writing, incorporating references into a document is an of import task. Fortunately, LaTeX has a variety of features that make dealing with references much simpler, including built-in support for citing references. Even so, a much more powerful and flexible solution is achieved cheers to an auxiliary tool called BibTeX (which comes bundled equally standard with LaTeX). Recently, BibTeX has been succeeded past BibLaTeX, a tool configurable within LaTeX syntax.

BibTeX provides for the storage of all references in an external, flat-file database. (BibLaTeX uses this same syntax.) This database tin exist referenced in whatever LaTeX document, and citations fabricated to any tape that is contained within the file. This is often more convenient than embedding them at the end of every document written; a centralized bibliography source tin can be linked to every bit many documents as desired (write once, read many!). Of class, bibliographies can exist split over every bit many files as i wishes, so there can be a file containing sources concerning topic A (a.bib) and some other concerning topic B (b.bib). When writing about topic AB, both of these files can be linked into the document (perchance in improver to sources ab.bib specific to topic AB).

Embedded system [edit | edit source]

If yous are writing only i or 2 documents and aren't planning on writing more on the same subject for a long fourth dimension, you might not want to waste fourth dimension creating a database of references you are never going to employ. In this example you should consider using the basic and simple bibliography back up that is embedded inside LaTeX.

LaTeX provides an surround called thebibliography that y'all have to utilize where you want the bibliography; that usually means at the very finish of your document, just earlier the \end{document} command. Here is a applied case:

                        \brainstorm            {thebibliography}{ix}            \bibitem            {lamport94}            Leslie Lamport,            \textit            {            \LaTeX: a document grooming system},   Addison Wesley, Massachusetts,   2nd edition,   1994.            \end            {thebibliography}          

OK, so what is going on hither? The first thing to notice is the establishment of the environment. thebibliography is a keyword that tells LaTeX to recognize everything between the brainstorm and cease tags as information for the bibliography. The mandatory statement, which I supplied later on the brainstorm statement, is telling LaTeX how wide the item characterization volition be when printed. Note notwithstanding, that the number itself is not the parameter, only the number of digits is. Therefore, I am effectively telling LaTeX that I will only need reference labels of one graphic symbol in length, which ultimately ways no more than nine references in total. If y'all want more than 9, then input any two-digit number, such as '56', which allows up to 99 references.

Next is the actual reference entry itself. This is prefixed with the \bibitem{cite_key} command. The cite_key should exist 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 non a comma). I oftentimes use the surname of the first writer, followed by the last two digits of the twelvemonth (hence lamport94). If that writer has produced more one reference for a given twelvemonth, then I add letters after, 'a', 'b', etc. But, you should do whatever works for you. Everything after the fundamental is the reference itself. You demand to blazon it as you lot want it to be presented. I accept put the unlike parts of the reference, such as author, title, etc., on different lines for readability. These linebreaks are ignored past LaTeX. The \textit{} command formats the championship properly in italics.

Citations [edit | edit source]

To actually cite a given certificate is very easy. Go to the indicate where you want the citation to appear, and apply 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 volition be cross-referenced with the bibitems and replaced with the appropriate number commendation. The reward here, once once again, is that LaTeX looks after the numbering for you. If it were totally transmission, then calculation or removing a reference would be a real job, as you would have to re-number all the citations by mitt.

            Instead of WYSIWYG editors, typesetting systems like            \TeX            {}            or            \LaTeX            {}            \cite            {lamport94}            tin can be used.          

Referring more specifically [edit | edit source]

If you want to refer to a sure page, effigy or theorem in a text book, y'all can use the arguments to the \cite control:

                        \cite            [p.~215]            {citation01}          

The argument, "p. 215", will show up inside the aforementioned brackets. Note the tilde in [p.~215], which replaces the cease-of-sentence spacing with a not-breakable inter-word space. This non-breakable inter-word space is inserted because the end-of-sentence spacing would be too broad, and "p." should not be separated from the page number. The code \cite[215]{citation01} will produce the same effect — in this example p.~ in front of the page number will be added automatically; but it will not be added for \cite[Cor.~ii.five]{citation01}.

Multiple citations [edit | edit source]

When a sequence of multiple citations is needed, yous should apply a single \cite{} command. The citations are then separated by commas. Hither's an example:

                        \cite            {citation01,citation02,citation03}          

The outcome will then be shown as citations within the aforementioned brackets, depending on the citation way.

Bibliography styles [edit | edit source]

There are several different ways to format lists of bibliographic references and the citations to them in the text. These are called citation styles, and consist of two parts: the format of the abbreviated citation (i.e. the marker that is inserted into the text to identify the entry in the list of references) and the format of the corresponding entry in the list of references, which includes total bibliographic details.

Abbreviated citations tin exist of two main types: numbered or textual. Numbered citations (likewise known equally the Vancouver referencing arrangement) are numbered consecutively in order of advent in the text, and consist in Standard arabic numerals in parentheses (1), foursquare brackets [ane], superscript 1 , or a combination thereof [ane] . Textual citations (also known equally the Harvard referencing system) utilise the writer surname and (ordinarily) the year as the abbreviated form of the citation, which is usually fully (Smith 2022) or partially enclosed in parenthesis, as in Smith (2012). The latter class allows the citation to exist integrated in the sentence it supports.


Below you lot can meet iii of the styles available with LaTeX:

Here are some more than oft used styles:

Style Name Author Name Format Reference Format Sorting
plain Homer Jay Simpson #ID# by writer
unsrt Homer Jay Simpson #ID# as referenced
abbrv H. J. Simpson #ID# by author
blastoff Homer Jay Simpson Sim95 past 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

Notwithstanding, keep in mind that you will need to apply the natbib package to use most of these.

No cite [edit | edit source]

If yous simply want a reference to appear in the bibliography, but not where information technology is referenced in the principal text, and so the \nocite{} command can be used, for instance:

            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 non.

Natbib [edit | edit source]

Natbib's textual and parenthetical commands
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.)

Using the standard LaTeX bibliography support, you will meet that each reference is numbered and each commendation corresponds to the numbers. The numeric style of citation is quite mutual in scientific writing. In other disciplines, the author-year fashion, e.g., (Roberts, 2003), such as Harvard is preferred. The natbib package is 1 possible fashion to become such an output. In fact, it can replace LaTeX'south own commendation commands, as Natbib allows the user to easily switch between Harvard or numeric.

The first job is to add together the following to your preamble in order to go LaTeX to employ the Natbib bundle:

                        \usepackage            [options]            {natbib}          

An example of useful options is:

                        \usepackage            [square,sort,comma,numbers]            {natbib}          

Also, you demand to change the bibliography style file to be used, so edit the appropriate line at the bottom of the file so that information technology reads: \bibliographystyle{plainnat}. One time washed, it is basically a matter of altering the existing \cite commands to display the blazon of citation you lot want.

Citation styles compatible with Natbib
Style Source Clarification
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 Concrete Review journals
rmpaps REVTeX iv dwelling house folio natbib-compatible manner for Review of Modern Physics journals
IEEEtranN TeX Catalogue entry natbib-compatible manner for IEEE publications
achemso TeX Catalogue entry natbib-uniform style for American Chemical Society journals
rsc TeX Catalogue entry natbib-uniform style for Royal Society of Chemical science journals

Customization [edit | edit source]

Natbib'due south customization options
Option Meaning
round : square : curly : bending Parentheses () (default), square brackets [], curly braces {} or angle brackets <>
colon : comma multiple citations are separated past semi-colons (default) or commas
authoryear : numbers : super author year way citations (default), numeric citations or superscripted numeric citations
sort : sort&compress multiple citations are sorted into the guild in which they appear in the references section or too compressing multiple numeric citations where possible
longnamesfirst the first citation of any reference volition use the starred variant (full writer list), subsequent citations will use the abbreviated et al. way
sectionbib for utilise 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 issues - causes overfull hboxes

The principal commands just add a t for 'textual' or p for 'parenthesized', to the bones \cite control. Yous will besides notice how Natbib by default will compress references with three or more authors to the more concise 1st surname et al version. By calculation an asterisk (*), yous tin override this default and list all authors associated with that citation. There are another specialized commands that Natbib supports, listed in the table hither. Keep in listen that for example abbrvnat does non back up \citet* and volition automatically choose betwixt all authors and et al..

The final area that I wish to cover most Natbib is customizing its citation style. In that location is a command called \bibpunct that can be used to override the defaults and alter certain settings. For case, I accept put the following in the preamble:

                        \bibpunct            {(}{)}{;}{a}{,}{,}          

The command requires half-dozen mandatory parameters.

  1. The symbol for the opening bracket.
  2. The symbol for the endmost bracket.
  3. The symbol that appears between multiple citations.
  4. This argument takes a alphabetic character:
    • n - numerical style.
    • southward - numerical superscript style.
    • any other letter - writer-year mode.
  5. The punctuation to appear between the author and the year (in parenthetical instance merely).
  6. The punctuation used between years, in multiple citations when there is a common author. e.g., (Chomsky 1956, 1957). If you desire an extra space, so you lot need {,~}.

Some of the options controlled past \bibpunct are also accessible by passing options to the natbib package when it is loaded. These options also permit another aspect of the bibliography to exist controlled, and tin be seen in the table (correct).

So equally you tin meet, this package is quite flexible, especially as you tin can hands switch betwixt dissimilar citation styles by changing a single parameter. Do have a look at the Natbib transmission, it'southward a curt document and you can larn fifty-fifty more well-nigh how to employ it.

BibTeX [edit | edit source]

I have previously introduced the idea of embedding references at the end of the document, so using the \cite control to cite them within the text. In this tutorial, I want to practise a fiddling amend than this method, as it's not as flexible as it could be. I will concentrate on using BibTeX.

A BibTeX database is stored every bit a .bib file. It is a manifestly text file, then can be viewed and edited easily. The structure of the file is also quite simple. An example of a BibTeX entry:

                        @article            {            greenwade93            ,            writer            =            "George D. Greenwade"            ,            championship            =            "The {C}omprehensive {T}ex {A}rchive {Northward}etwork ({CTAN})"            ,            twelvemonth            =            "1993"            ,            journal            =            "TUGBoat"            ,            volume            =            "14"            ,            number            =            "3"            ,            pages            =            "342--351"            }          

Each entry begins with the declaration of the reference type, in the form of @type . BibTeX knows of practically all types you tin can think of, mutual ones are: volume, article, and for papers presented at conferences, in that location is inproceedings. In this example, I take referred to an article inside a periodical.

Afterward the type, y'all must have a left curly brace '{' to signify the beginning of the reference attributes. The first one follows immediately afterwards the brace, which is the citation primal, 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 certificate to cantankerous-reference it to this entry. It is up to you equally to how you wish to label each reference, just at that place is a loose standard in which you use the author's surname, followed past the yr of publication. This is the scheme that I use in this tutorial.

Next, it should exist articulate that what follows are the relevant fields and data for that particular reference. The field names on the left are BibTeX keywords. They are followed past an equals sign (=) where the value for that field is then placed. BibTeX expects you to explicitly label the beginning and end of each value. I personally use quotation marks ("), yet, you lot also have the option of using curly braces ('{', '}'). But as y'all will shortly come across, curly braces accept other roles, within attributes, so I adopt not to employ them for this job as they can get more confusing. A notable exception is when you want to use characters with umlauts (ü, ö, etc), since their notation is in the format \"{o}, and the quotation mark will close the i 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, every bit the accented characters tin 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.

Recollect that each attribute must be followed by a comma to delimit one from some other. You do non need to add a comma to the last attribute, since the closing brace will tell BibTeX that in that location are no more attributes for this entry, although you lot won't get an fault if you do.

It tin take a while to learn what the reference types are, and what fields each type has available (and which ones are required or optional, etc). And then, wait at this entry type reference and too this field reference for descriptions of all the fields. It may be worth bookmarking or printing these pages so that they are easily at manus when y'all need them. Much of the information independent therein is repeated in the following tabular array for your convenience.

Standard BibTeX entry and field types
article book booklet inbook incollection inproceedings ≈ briefing transmission mastersthesis, phdthesis misc proceedings tech study 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 +
cardinal
month o o o o o o o o o o o o
annotation 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
schoolhouse +
series o o o o o
championship + + + + + + + + o + + +
blazon o o o o
volume o o o o o o
year + + o + + + o + o + + o

+ Required fields, o Optional fields

[edit | edit source]

BibTeX can be quite clever with names of authors. It tin can take names in forename surname or surname, forename. I personally use the quondam, merely call back that the order you input them (or whatever information within an entry for that matter) is customizable and so yous tin can get BibTeX to manipulate the input and then output information technology however you similar. If y'all apply the forename surname method, then y'all must be careful with a few special names, where at that place are compound surnames, for example "John von Neumann". In this form, BibTeX assumes that the concluding word is the surname, and everything earlier is the forename, plus any middle names. You must therefore manually tell BibTeX to continue the 'von' and 'Neumann' together. This is accomplished easily using curly braces. So the final outcome would be "John {von Neumann}". This is easily avoided with the surname, forename, since you lot accept a comma to separate the surname from the forename.

Secondly, at that place is the issue of how to tell BibTeX when a reference has more than one writer. This is very only done past putting the keyword and in between every author. As we can encounter from another instance:

                        @book            {            goossens93            ,            author            =            "Michel Goossens and Frank Mittelbach and Alexander Samarin"            ,            championship            =            "The LaTeX Companion"            ,            year            =            "1993"            ,            publisher            =            "Addison-Wesley"            ,            address            =            "Reading, Massachusetts"            }          

This book has iii authors, and each is separated every bit described. Of form, when BibTeX processes and outputs this, there will only be an 'and' between the penultimate and last authors, but within the .bib file, it needs the ands and then that information technology can keep track of the individual authors.

Standard templates [edit | edit source]

Standard templates that can exist direct copied and filled in. Optional entries are marked in the core by a ? prefix. Notation that the % sign used in LaTeX for commenting lines does not work in BibTeX and creates invalid field name. In BibTeX, valid simply unknown field names and names outside of an entry are ignored, leading to a popular commenting method. <--Exist careful if you copy the following templates, the % sign is non valid to comment out lines in bibtex files. If yous want to comment out a line, you accept to put it exterior the entry.-->

@commodity
An article from a mag or a journal.
  • Required fields: author, title, journal, year.
  • Optional fields: volume, number, pages, month, notation.
                        @article            {            Xarticle            ,            author            =            ""            ,            title            =            ""            ,            journal            =            ""            ,            ?_volume            =            ""            ,            ?_number            =            ""            ,            ?_pages            =            ""            ,            year            =            "XXXX"            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@book
A published book
  • Required fields: author/editor, championship, publisher, year.
  • Optional fields: volume/number, series, accost, 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            =            ""            ,            championship            =            ""            ,            ?_howpublished            =            ""            ,            ?_address            =            ""            ,            ?_year            =            "XXXX"            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@briefing
Equal to inproceedings
  • Required fields: author, championship, booktitle, year.
  • Optional fields: editor, volume/number, serial, pages, address, calendar month, system, publisher, note.
                        @briefing            {            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, title, chapter and/or pages, publisher, year.
  • Optional fields: volume/number, serial, blazon, address, edition, month, notation.
                        @inbook            {            Xinbook            ,            author            =            ""            ,            editor            =            ""            ,            championship            =            ""            ,            chapter            =            ""            ,            pages            =            ""            ,            publisher            =            ""            ,            ?_volume            =            ""            ,            ?_number            =            ""            ,            ?_series            =            ""            ,            ?_type            =            ""            ,            ?_address            =            ""            ,            ?_edition            =            ""            ,            year            =            ""            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@incollection
A section of a book having its own title.
  • Required fields: writer, title, booktitle, publisher, twelvemonth.
  • Optional fields: editor, volume/number, serial, type, chapter, pages, address, edition, month, notation.
                        @incollection            {            Xincollection            ,            author            =            ""            ,            title            =            ""            ,            booktitle            =            ""            ,            publisher            =            ""            ,            ?_editor            =            ""            ,            ?_volume            =            ""            ,            ?_number            =            ""            ,            ?_series            =            ""            ,            ?_type            =            ""            ,            ?_chapter            =            ""            ,            ?_pages            =            ""            ,            ?_address            =            ""            ,            ?_edition            =            ""            ,            year            =            ""            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@inproceedings
An article in a conference proceedings.
  • Required fields: author, title, booktitle, year.
  • Optional fields: editor, volume/number, series, pages, accost, month, organization, publisher, note.
                        @inproceedings            {            Xinproceedings            ,            author            =            ""            ,            title            =            ""            ,            booktitle            =            ""            ,            ?_editor            =            ""            ,            ?_volume            =            ""            ,            ?_number            =            ""            ,            ?_series            =            ""            ,            ?_pages            =            ""            ,            ?_address            =            ""            ,            ?_organization            =            ""            ,            ?_publisher            =            ""            ,            year            =            ""            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@manual
Technical manual
  • Required fields: title.
  • Optional fields: author, organization, address, edition, month, year, note.
                        @transmission            {            Xmanual            ,            title            =            ""            ,            ?_author            =            ""            ,            ?_organization            =            ""            ,            ?_address            =            ""            ,            ?_edition            =            ""            ,            twelvemonth            =            ""            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@mastersthesis
Primary'south thesis
  • Required fields: author, championship, school, year.
  • Optional fields: type (eg. "diploma thesis"), address, calendar month, note.
                        @mastersthesis            {            Xthesis            ,            author            =            ""            ,            championship            =            ""            ,            school            =            ""            ,            ?_type            =            "diploma thesis"            ,            ?_address            =            ""            ,            twelvemonth            =            "XXXX"            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@misc
Template useful for other kinds of publication
  • Required fields: none
  • Optional fields: author, title, howpublished, calendar month, year, annotation.
                        @misc            {            Xmisc            ,            ?_author            =            ""            ,            ?_title            =            ""            ,            ?_howpublished            =            ""            ,            ?_year            =            "XXXX"            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@phdthesis
Ph.D. thesis
  • Required fields: author, championship, year, school.
  • Optional fields: address, calendar month, keywords, note.
                        @phdthesis            {            Xphdthesis            ,            writer            =            ""            ,            title            =            ""            ,            school            =            ""            ,            ?_address            =            ""            ,            year            =            ""            ,            ?_month            =            ""            ,            ?_keywords            =            ""            ,            ?_note            =            ""            ,            }          
@proceedings
The proceedings of a conference.
  • Required fields: championship, year.
  • Optional fields: editor, book/number, serial, address, month, organization, publisher, notation.
                        @proceedings            {            Xproceedings            ,            championship            =            ""            ,            ?_editor            =            ""            ,            ?_volume            =            ""            ,            ?_number            =            ""            ,            ?_series            =            ""            ,            ?_address            =            ""            ,            ?_organization            =            ""            ,            ?_publisher            =            ""            ,            year            =            ""            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@techreport
Technical report from educational, commercial or standardization establishment.
  • Required fields: author, title, institution, year.
  • Optional fields: blazon, number, accost, calendar month, note.
                        @techreport            {            Xtreport            ,            author            =            ""            ,            championship            =            ""            ,            institution            =            ""            ,            ?_type            =            ""            ,            ?_number            =            ""            ,            ?_address            =            ""            ,            year            =            "XXXX"            ,            ?_month            =            ""            ,            ?_note            =            ""            ,            }          
@unpublished
An unpublished commodity, book, thesis, etc.
  • Required fields: author, championship, note.
  • Optional fields: month, year.
                        @unpublished            {            Xunpublished            ,            author            =            ""            ,            championship            =            ""            ,            ?_year            =            ""            ,            ?_month            =            ""            ,            note            =            ""            ,            }          

Not-standard templates [edit | edit source]

@patent
BibTeX entries tin exist exported from Google Patents.
(run across Cite Patents with Bibtex for an alternative)
@collection
@electronic
@Unpublished
For citing arXiv.org papers in a REVTEX-style commodity
(see REVTEX Author'south guide)

Preserving instance of letters [edit | edit source]

In the event that BibTeX has been fix by the called style not to preserve all capitalization inside titles, issues can occur, especially if you are referring to proper nouns, or acronyms. To tell BibTeX to go on them, utilise the good old curly braces around the letter in question, (or letters, if it's an acronym) and all will be well! It is fifty-fifty possible that lower-example letters may need to be preserved - for case if a chemic formula is used in a style that sets a title in all caps or small caps, or if "pH" is to be used in a style that capitalises all starting time letters.

title = "The {LaTeX} Companion",

However, avert putting the whole championship in curly braces, every bit it will look odd if a different capitalization format is used:

championship = "{The LaTeX Companion}",

For convenience though, many people simply put double curly braces, which may help when writing scientific articles for different magazines, conferences with different BibTex styles that do sometimes go along and sometimes not go along the capital letters:

title = {{The LaTeX Companion}},

As an alternative, try other BibTex styles or modify the existing. The approach of putting only relevant text in curly brackets is the almost feasible if using a template under the command of a publisher, such as for journal submissions. Using curly braces around single messages is also to be avoided if possible, every bit it may mess up the kerning, specially with biblatex,[one] so the first step should generally exist to enclose single words in braces.

A few boosted examples [edit | edit source]

Beneath y'all will notice a few additional examples of bibliography entries. The offset ane covers the case of multiple authors in the Surname, Firstname format, and the 2d one deals with the incollection case.

                        @article            {            AbedonHymanThomas2003            ,            author            =            "Abedon, S. T. and Hyman, P. and Thomas, C."            ,            twelvemonth            =            "2003"            ,            title            =            "Experimental examination of bacteriophage latent-flow evolution as a response to bacterial availability"            ,            journal            =            "Applied and Environmental Microbiology"            ,            volume            =            "69"            ,            pages            =            "7499--7506"            }            @incollection            {            Abedon1994            ,            author            =            "Abedon, S. T."            ,            title            =            "Lysis and the interaction between free phages and infected cells"            ,            pages            =            "397--405"            ,            booktitle            =            "Molecular biology of bacteriophage T4"            ,            editor            =            "Karam, Jim D. Karam and Drake, John W. and Kreuzer, Kenneth N. and Mosig, Gisela                          and Hall, Dwight and Eiserling, Frederick A. and Black, Lindsay W. and Kutter, Elizabeth                          and Carlson, Karin and Miller, Eric S. and Spicer, Eleanor"            ,            publisher            =            "ASM Printing, Washington DC"            ,            year            =            "1994"            }          

If you have to cite a website you tin can apply @misc, for case:

                        @misc            {            website:fermentas-lambda            ,            writer            =            "Fermentas Inc."            ,            title            =            "Phage Lambda: description \& restriction map"            ,            calendar month            =            "November"            ,            year            =            "2008"            ,            url            =            "http://world wide web.fermentas.com/techinfo/nucleicacids/maplambda.htm"            }          

The note field comes in handy if yous need to add unstructured information, for example that the corresponding event of the journal has nevertheless to appear:

                        @commodity            {            blackholes            ,            author            =            "Rabbert Klein"            ,            title            =            "Blackness Holes and Their Relation to Hiding Eggs"            ,            journal            =            "Theoretical Easter Physics"            ,            publisher            =            "Eggs Ltd."            ,            twelvemonth            =            "2010"            ,            note            =            "(to appear)"            }          

Getting current LaTeX document to utilise your .bib file [edit | edit source]

At the end of your LaTeX file (that is, later on the content, but before \end{document}), you lot need to place the following commands:

                        \bibliographystyle            {plain}            \bibliography            {sample1,sample2,...,samplen}            % Annotation the lack of whitespace betwixt the commas and the next bib file.          

Bibliography styles are files recognized by BibTeX that tell it how to format the information stored in the .bib file when candy for output. And then the first control listed higher up is declaring which fashion file to use. The style file in this instance is plain.bst (which comes as standard with BibTeX). You do non need to add the .bst extension when using this control, as it is causeless. Despite its name, the plainly style does a pretty expert job (expect at the output of this tutorial to see what I mean).

The second command is the one that really specifies the .bib file you wish to use. The ones I created for this tutorial were chosen sample1.bib, sample2.bib, . . ., samplen.bib, merely in one case once again, yous don't include the file extension. At the moment, the .bib file is in the same directory equally the LaTeX document also. Notwithstanding, if your .bib file was elsewhere (which makes sense if y'all intend to maintain a centralized database of references for all your research), you lot need to specify the path as well, e.grand \bibliography{/some/where/sample} or \bibliography{../sample1} (if the .bib file is in the parent directory of the .tex document that calls it).

At present that LaTeX and BibTeX know where to look for the appropriate files, actually citing the references is fairly lilliputian. The \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 lot wish to cite more 1 reference at the same fourth dimension, do the post-obit: \cite{ref_key1, ref_key2, ..., ref_keyN}.

Why won't LaTeX generate any output? [edit | edit source]

The addition of BibTeX adds extra complication for the processing of the source to the desired output. This is largely hidden from the user, but because of all the complexity of the referencing of citations from your source LaTeX file to the database entries in another file, you lot actually need multiple passes to accomplish the job. This means yous have to run LaTeX a number of times. Each pass volition perform a item task until it has managed to resolve all the citation references. Here's what yous demand to type (into command line):

  1. latex latex_source_code.tex
  2. bibtex latex_source_code.aux
  3. latex latex_source_code.tex
  4. latex latex_source_code.tex

(Extensions are optional, if you put them annotation that the bibtex control takes the AUX file as input.)

Afterward the first LaTeX run, you will encounter errors such as:

LaTeX Warning: Citation `lamport94' on folio 1 undefined on input line 21. ... LaTeX Warning: There were undefined references.        

The next step is to run bibtex on that same LaTeX source (or more precisely the respective AUX file, nevertheless not on the actual .bib file) to then define all the references inside that document. You lot should see output like the post-obit:

This is BibTeX, Version 0.99c (Web2C seven.3.1) The top-level auxiliary file: latex_source_code.aux The style file: evidently.bst Database file #1: sample.bib        

The third step, which is invoking LaTeX for the 2nd time will see more errors like "LaTeX Alarm: Label(s) may have changed. Rerun to become cross-references correct.". Don't be alarmed, it'south nearly complete. As you can guess, all you accept to do is follow its instructions, and run LaTeX for the third time, and the document will exist output as expected, without further bug.

If you desire a pdf output instead of a dvi output you can use pdflatex instead of latex as follows:

  1. pdflatex latex_source_code.tex
  2. bibtex latex_source_code.aux
  3. pdflatex latex_source_code.tex
  4. pdflatex latex_source_code.tex

(Extensions are optional, if you put them note that the bibtex command takes the AUX file as input.)

Notation that if y'all are editing your source in vim and try to apply command manner and the current file shortcut (%) to process the certificate similar this:

  1. :! pdflatex %
  2. :! bibtex %

You volition get an fault similar to this:

  1. I couldn't open up file name 'current_file.tex.aux'

It appears that the file extension is included by default when the current file command (%) is executed. To process your document from inside vim, yous must explicitly name the file without the file extension for bibtex to work, as is shown below:

  1. :! pdflatex %
  2. :! bibtex %:r (without file extension, it looks for the AUX file every bit mentioned above)
  3. :! pdflatex %
  4. :! pdflatex %

Another option exists if you lot are running Unix/Linux or any other platform where y'all have make. And so yous can but create a Makefile and apply vim'southward make control or use make in vanquish. The Makefile would then look similar this:

latex_source_code.pdf: latex_source_code.tex latex_source_code.bib 	pdflatex latex_source_code.tex 	bibtex latex_source_code.aux 	pdflatex latex_source_code.tex 	pdflatex latex_source_code.tex        

Including URLs in bibliography [edit | edit source]

As you can see, there is no field for URLs. I possibility is to include Internet addresses in howpublished field of @misc or note field of @techreport, @commodity, @volume:

howpublished = "\url{http://world wide web.example.com}"

Note the usage of \url control to ensure proper appearance of URLs.

Another way is to utilise special field url and brand bibliography style recognise it.

url = "http://world wide web.example.com"

You need to utilize \usepackage{url} in the offset case or \usepackage{hyperref} in the 2d instance.

Styles provided past Natbib (run into below) handle this field, other styles can be modified using urlbst program. Modifications of three standard styles (plain, abbrv and blastoff) are provided with urlbst.

If you lot need more assistance well-nigh URLs in bibliography, visit FAQ of Uk List of TeX.

Customizing bibliography advent [edit | edit source]

I of the main advantages of BibTeX, peculiarly for people who write many research papers, is the power to customize your bibliography to suit the requirements of a given publication. You will notice how unlike publications tend to take their own manner of formatting references, to which authors must attach if they want their manuscripts published. In fact, established journals and briefing organizers often will have created their own bibliography mode (.bst file) for those users of BibTeX, to do all the hard work for you lot.

It can achieve this because of the nature of the .bib database, where all the information most your references is stored in a structured format, but zilch about style. This is a common theme in LaTeX in full general, where it tries as much as possible to go on content and presentation divide.

A bibliography way file (.bst) will tell LaTeX how to format each aspect, what guild to put them in, what punctuation to use in betwixt detail attributes etc. Unfortunately, creating such a style by hand is not a little chore. Which is why Makebst (also known as custom-bib) is the tool nosotros demand.

Makebst can be used to automatically generate a .bst file based on your needs. It is very simple, and really asks you a series of questions well-nigh your preferences. Once consummate, it will so output the appropriate style file for you to use.

Information technology should be installed with the LaTeX distribution (otherwise, you tin can download it) and information technology'southward very simple to initiate. At the command line, blazon:

latex makebst        

LaTeX will find the relevant file and the questioning process volition brainstorm. Y'all will have to answer quite a few (although, note that the default answers are pretty sensible), which means it would be impractical to become through an example in this tutorial. However, it is fairly direct-forward. And if y'all require farther guidance, then there is a comprehensive transmission available. I'd recommend experimenting with information technology and seeing what the results are when applied to a LaTeX document.

If you are using a custom built .bst file, it is important that LaTeX tin find it! So, make sure it's in the aforementioned directory as the LaTeX source file, unless you are using 1 of the standard mode files (such as plainly or plainnat, that come bundled with LaTeX - these will be automatically found in the directories that they are installed. Also, brand sure the name of the .bst file you desire to utilize is reflected in the \bibliographystyle{style} control (simply don't include the .bst extension!).

Localizing bibliography appearance [edit | edit source]

When writing documents in languages other than English language, you may notice information technology desirable to arrange the appearance of your bibliography to the certificate language. This concerns words such as editors, and, or in equally well as a proper typographic layout. The babelbib package can be used hither. For case, to layout the bibliography in High german, add together the following to the header:

                        \usepackage            [fixlanguage]            {babelbib}            \selectbiblanguage            {german language}          

Alternatively, y'all can layout each bibliography entry co-ordinate to the language of the cited document:

The linguistic communication of an entry is specified every bit an additional field in the BibTeX entry:

                        @article            {            mueller08            ,            %            ...            language            =            {german            }            }          

For babelbib to take issue, a bibliography style supported by it - i of babplain, babplai3, babalpha, babunsrt, bababbrv, and bababbr3 - must be used:

                        \bibliographystyle            {babplain}            \bibliography            {sample}          

Showing unused items [edit | edit source]

Commonly LaTeX only displays the entries which are referred to with \cite . It'south possible to make uncited entries visible:

                        \nocite            {Name89}            % Show Bibliography entry of Name89            \nocite            {*}            % Bear witness all Bib-entries          

Getting bibliographic data [edit | edit source]

Many online databases provide bibliographic data in BibTeX-Format, making it easy to build your own database. For example, Google Scholar offers the option to render properly formatted output, which can also be turned on in the settings page.

One should be alarm to the fact that bibliographic databases are frequently the production of several generations of automatic processing, and so the resulting BibTex code is prone to a variety of pocket-sized errors, especially in older entries.

Helpful tools [edit | edit source]

See also: w:en:Comparison of reference management software

  • BibDesk BibDesk is a bibliographic reference director for Mac OS X. It features a very usable user interface and provides a number of features like smart folders based on keywords and live tex display.
  • BibSonomy — A complimentary social bookmark and publication management system based on BibTeX.
  • BibTeXSearch BibTeXSearch is a free searchable BibTeX database spanning millions of bookish records.
  • Bibtex Editor - An online BibTeX entry generator and bibliography management organization. Possible to import and export Bibtex files.
  • Bibwiki Bibwiki is a Specialpage for MediaWiki to manage BibTeX bibliographies. Information technology offers a straightforward manner to import and consign bibliographic records.
  • cb2Bib The cb2Bib is a tool for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.
  • Citavi Commercial software (with size-limited free demo version) which even searches libraries for citations and keeps all your knowledge in a database. Consign of the database to all kinds of formats is possible. Works together with MS Discussion and Open Office Author. Moreover plug ins for browsers and Acrobat Reader exist to automatically include references to your project.
  • DokuWiki DokuWiki is a Bibtext plugin that allows for the inclusion of bibtex formatted citations in DokuWiki pages and displays them in APA format. Annotation: This Plugins is vulnerable to an XSS attack -> http://www.dokuwiki.org/plugin:bibtex
  • Ebib — a BibTeX database manager for Emacs, well resolved and never more a few keystrokes away.
  • JabRef is a Java plan (nether the GPL license) which lets you search many bibliographic databases such as Medline, Citeseer, IEEEXplore and arXiv and feed and manage your BibTeX local databases with your selected articles. Based on BiBTeX, JabRef can export in many other output formats such equally html, MS Word or EndNote.
  • KBib Another BibTeX editor for KDE. It has like capabilities, and slightly dissimilar UI. Features include BibTeX reference generation from PDF files, obviously text, DOI, arXiv & PubMed IDs. Web queries to Google Scholar, PubMer, arXiv and a number of other services are too supported.
  • KBibTeX KBibTeX is a BibTeX editor for KDE to edit bibliographies used with LaTeX. Features include comfortable input masks, starting web queries (eastward. thou. Google or PubMed) and exporting to PDF, PostScript, RTF and XML/HTML. Equally KBibTeX is using KDE's KParts technology, KBibTeX can be embedded into Kile or Konqueror.
  • Literatur-Generator is a German language-linguistic communication online tool for creating a bibliography (Bibtex, Endnote, Din 1505, ...).
  • Mendeley Mendeley is price-free academic software for managing PDFs which tin manage a bibliography in Open Office and read BibTeX.
  • Qiqqa Qiqqa is a gratuitous enquiry manager that has born back up for automatically associating BibTeX records with your PDFs and a 'BibTeX Sniffer' for helping y'all semi-automatically find BibTeX records.
  • Referencer Referencer is a Gnome application to organise documents or references, and ultimately generate a BibTeX bibliography file.
  • Synapsen — Hypertextual Card Index / Reference Managing director with special support for BiBTeX / biblatex, written in Java.
  • Zotero Zotero is a free and open reference manager working as a standalone application, capable of importing and exporting bib files. Zotero has browser plugins for Chrome and Firefox.

Summary [edit | edit source]

Although it tin accept a little fourth dimension to become to grips with BibTeX, in the long term, it's an efficient way to handle your references. It's not uncommon to find .bib files on websites that people compile every bit a list of their own publications, or a survey of relevant works within a given topic, etc. Or in those huge, online bibliography databases, you oftentimes detect BibTeX versions of publications, and then it's a quick cut-and-paste into your own .bib file, and and then no more hassle!

Having all your references in 1 place can be a big advantage. And having them in a structured class, that allows customizable output is another 1. There are a variety of free utilities that tin can load your .bib files, and allow you to view them in a more efficient style, as well as sort them and check for errors.

Bibliography in the table of contents [edit | edit source]

If y'all are writing a book or report, y'all'll likely insert your bibliography using something like:

                        \begin            {thebibliography}{99}            \bibitem            {bib:one_book}            some data            \bibitem            {bib:ane_commodity}            other data            \end            {thebibliography}          

Or, if you lot are using BibTeX, your references will be saved in a .bib file, and your TeX document will include the bibliography by these commands:

                        \bibliographystyle            {patently}            \bibliography            {mybibtexfile}          

Both of these examples volition create a chapter-like (or department-like) output showing all your references. But even though the resulting "References" looks like a chapter or section, it volition not exist handled quite the same: it will non appear in the Table of Contents.

Using tocbibind [edit | edit source]

The almost comfy way of adding your bibliography to the table of contents is to utilise the defended packet tocbibind that works with many standard document classes. Simply include this code in the preamble of your document:

                        \usepackage            [nottoc]            {tocbibind}          

This will include the Bibliography in the Tabular array of Contents without numbering. If you desire to have proper numbering, include the following code in the preamble:

                        \usepackage            [nottoc,numbib]            {tocbibind}          

The tocbibind package tin also handle including the Listing of Figures, List of Tables and the Table of Contents itself in the Table of Contents. It has many options for numbering, document structure etc. to fit most any scenario. Meet the tocbibind CTAN folio for detailed documentation.

Other methods [edit | edit source]

As unnumbered item [edit | edit source]

If y'all want your bibliography to exist in the table of contents, only add the following ii lines simply before the thebibliography environs:

                        \clearpage            % or cleardoublepage            \addcontentsline            {toc}{chapter}{Bibliography}          

(OR \addcontentsline {toc}{section}{Bibliography} if you're writing an article)

The outset line merely terminates the current paragraph and page. If you lot are writing a book, use \cleardoublepage to lucifer the style used. The second line will add a line in the Table of Contents (get-go option, toc), it volition exist like the ones created past chapters (2d option, chapter), and the third argument will exist printed on the corresponding line in the Table of Contents; hither Bibliography was chosen because it'southward the same text the thebibliography environs volition automatically write when you lot apply it, merely you are free to write whatever y'all like. If you are using a separate bib file, add together these lines betwixt \bibliographystyle and \bibliography.

If yous employ hyperref parcel, you should also use the \phantomsection command to enable hyperlinking from the tabular array of contents to bibliography.

                        \clearpage            % or cleardoublepage            \phantomsection            \addcontentsline            {toc}{chapter}{Bibliography}          

This play tricks is specially useful when you have to insert the bibliography in the Table of Contents, but information technology tin work for annihilation. When LaTeX finds the lawmaking above, it volition record the info as described and the electric current page number, inserting a new line in the Contents page.

As numbered particular [edit | edit source]

If you lot instead desire bibliography to be numbered section or chapter, you'll likely use this style:

                        \cleardoublepage            % This is needed if the book class is used, to place the anchor in the right page,            % because the bibliography will start on its own folio.            % Use \clearpage instead if the certificate class uses the "oneside" argument            \renewcommand*            {            \refname            }{}            % This will ascertain heading of bibliography to be empty, then you tin can...            \section            {Bibliography}            % ...place a normal section heading before the bibliography entries.            \brainstorm            {thebibliography}{99}            ...            \cease            {thebibliography}          

Another even easier solution is to use \section within of the \renewcommand block:

                        \renewcommand            {            \refname            }{            \department            {Sources}}            % Using "Sources" equally the title of the section            \begin            {thebibliography}{99}            ...            \end            {thebibliography}          

You lot may wish to employ \renewcommand* { \refname }{ \vspace* {-1em}} followed past \vspace* {-1em} to counteract the extra space the bare \refname inserts.

If you are using BibTeX, the \bibliography command, and the book or report class, y'all volition need to redefine \bibname instead of \refname like so.

                        \renewcommand            {            \bibname            }{            \section            {Sources}}            % Redefine bibname            \bibliographystyle            {IEEEtran}            % Set any options you want            \bibliography            {your_bib_file_names}            % Build the bibliography          

biblatex [edit | edit source]

As we said before, biblatex is widely considered the successor of BibTeX. Intended every bit a full replacement for BibTeX, it is more than configurable in its output and provides a multitude of new styles (for output) and fields (for the database) that tin exist used in a document. For now, refer to its comprehensive documentation on CTAN.

Entry and field types in .bib files [edit | edit source]

The following tabular array shows about field types. Some field types are lists, either lists of person names, others are literal lists. A engagement can either be given in parts or total, some keys are necessary, folio references are provided equally ranges and certain special fields incorporate verbatim lawmaking. There are many kinds of titles.

Hierarchic entry types
Base type Multi-volume Standalone part thereof Supplemental material therein
@volume @mvbook @inbook, @bookinbook @suppbook
@journal @article @suppperiodical
@collection @mvcollection @incollection @suppcollection
@reference @mvreference @inreference
@proceedings @mvproceedings @inproceedings, @briefing
Entry types in .bib files known by biblatex and field types supported,
either required +, alternatively required ±, optional ^, not supported (empty) or forbidden ;
some types take been shortened: dot '.' truncates entry and tilde '~' repeats last total entry

commodity

book

mv~

in~

~let

collect.

mv~

in~

transmission

misc

online

patent

menstruation.

proceed.

mv~

in~

study

thesis

unpub.

author, authortype + + + + ± + ± ± ± + + + + +
editor, editortype ^ ^ ^ ^ ± + + + ± ± ± + + + +
editorX , editorXtype ^ ^ ^ ^ ^ ^ ^ ^
holder ^
bookauthor ^
analyst, commentator ^ ^ ^ ^ ^ ^ ^
translator, origlanguage ^ ^ ^ ^ ^ ^ ^
afterword, foreword, introduction ^ ^ ^ ^ ^ ^
title + + + + + + + + + + + + + + + + + + +
titleaddon, subtitle ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ˇ ^ ^ ^ ^ ^ ^
maintitle, mainsubtitle, maintitleaddon ^ ^ ^ ^ ^ ^
booktitle + + +
booksubtitle, booktitleaddon ^ ^ ^
journalsubtitle ^
journaltitle +
eventdate, eventtitle, eventtitleaddon, venue ^ ^ ^
engagement, year ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ±
month ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
edition ^ ^ ^ ^ ^ ^
issue, issuetitle, issuesubtitle ^ ^
number ^ ^ ^ ^ ^ ^ ^ + ^ ^ ^ ^ ^
series ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
affiliate ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
office ^ ^ ^ ^ ^ ^
volume ^ ^ ^ ^ ^ ^ ^ ^
volumes ^ ^ ^ ^ ^ ^ ^ ^ ^
version ^ ^ ^ ^ ^ ^
doi, eprint, eprintclass, eprinttype ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
eid ^
isbn ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
isrn ^
issn ^ ^
isan, ismn, iswc
url ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ + ^ ^ ^ ^ ^ ^ ^ ^
urldate ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
location ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
publisher ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
system ^ ^ ^ ^ ^ ^
institution + +
type ^ ^ ^ ^ + +
howpublished ^ ^ ^
pages ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
pagetotal ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

Some entry types are hard to distinguish and are treated the aforementioned by standard styles:

  • @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
  • @written report = @techreport
  • @thesis = @mastersthesis = @phdthesis

Some field types are defined, but the documentation does not say which entry types they can be used with. This is either because they depend on some other field being set to be useful or they tin always exist used in a user-defined manner, but will never exist used in standard styles:

  • abstruse, annotation
  • entrysubtype
  • file
  • label
  • library
  • nameaddon
  • origdate, origlocation, origpublisher
  • origtitle, reprinttitle, indextitle
  • pagination, bookpagination
  • shortauthor, shorteditor, autograph, shorthandintro, shortjournal, shortseries shorttitle

The merely field that is always mandatory, is title. All entry types also crave either date or year and they specify which of author and editor they expect or whether they can employ both. Some field types tin can optionally exist used with whatsoever entry blazon:

  • addendum, annotation
  • linguistic communication
  • pubstate
  • urldate

All physical (print) entry types share further optional field types:

  • url, doi
  • eprint, eprintclass, eprinttype

Multimedia entry types

  • @artwork
  • @audio
  • @epitome
  • @movie
  • @music
  • @performance
  • @video
  • @software

and legal entry types

  • @commentary
  • @jurisdiction
  • @legislation
  • @legal
  • @letter of the alphabet
  • @review
  • @standard

are defined, but not nevertheless supported (well).

The entry types @bibnote, @fix and @xdata are special.

Printing bibliography [edit | edit source]

Presuming we have defined our references in a file called references.bib, we add together this to biblatex by adding the following to the preamble:

                        \addbibresource            {references.bib}          

Impress the bibiography with this macro (unremarkably at the end of the document body):

Press dissever bibliographies [edit | edit source]

We want to carve up the bibliography into papers, books and others

                        \printbibliography            [title={Book references},type=book]            \printbibliography            [title={Article references},type=article]            \printbibliography            [title={Other references}, nottype=commodity, nottype=volume]          

If the bib entries are located in multiple files we can add together them like this:

                        \addbibresource            {references.bib}            \addbibresource            {other.bib}          

Nosotros tin also filter on other fields, such as entrysubtype. If we define our online resources similar this:

            @misc{some-resource,    ...    entrysubtype =            {inet},            }          

nosotros filter with \printbibliography [championship={Online resources}, subtype=inet]

Example with prefix keys, subheadings and table of contents [edit | edit source]

As the numbering of the bibliographies are independent, it can be useful to also divide the bibliographies using prefixnumbers such as a, b and c. In addition we add a main heading for the bibliographies and add that to the table of contents.

To make Hyperref links betoken to the correct bibliography department, we too add \phantomsection earlier printing each bibliography

                        \printbibheading[ heading=bibintoc,            % bibintoc adds the Bibliography to the table of contents            title={Resource}            % If we want to override the default title "Bibliography"                        ]            \phantomsection            % Requires hyperref parcel            \printbibliography            [title={Printed sources}, heading=subbibliography, prefixnumbers={a}, type=book, blazon=article]            \phantomsection            \printbibliography            [championship={Online resources}, heading=subbibliography, prefixnumbers={c}, subtype=inet]            \phantomsection            \printbibliography            [championship={Other}, heading=subbibliography, prefixnumbers={c}, nottype=article, nottype=book, notsubtype=inet]          

To add each of the bibliographies to the tabular array of contents as sub-sections to the main Bibliography, supercede heading=subbibliography with heading=subbibintoc.

Multiple bibliographies [edit | edit source]

Using multibib [edit | edit source]

This parcel is for multiple Bibliographies for unlike sections in your work. For instance, you lot can generate a bibliography for each chapter. You tin can notice information near the package on CTAN[two]

Using bibtopic [edit | edit source]

The bibtopic-Package[3] is created to differ the citations on more files, so that you can split the bibliography into more parts.

                        \documentclass            [11pt]            {commodity}            \usepackage            {bibtopic}            \brainstorm            {document}            \bibliographystyle            {alpha}            \section            {Testing}            Allow'south cite all the books:            \cite            {ColBenh:93}            and            \cite            {Munt:93}; and an article:            \cite            {RouxSmart:95}.  File books.bib is used for this listing:            \begin            {btSect}{books}            \section            {References from books}            \btPrintCited            \terminate            {btSect}            Hither, the articles.bib is used, and the listing is in plain-format instead of the standard alpha.            \brainstorm            {btSect}[apparently]{manufactures}            \section            {References from manufactures}            \btPrintCited            \section            {Articles not cited}            \btPrintNotCited            \terminate            {btSect}            Just print all entries hither with            \btPrintAll            \brainstorm            {btSect}[plain]{net}            \department            {References from the internet}            \btPrintAll            \stop            {btSect}            \terminate            {document}          

Notes and references [edit | edit source]

  1. The biblatex manual
  2. http://ctan.org/pkg/multibib
  3. http://ctan.org/pkg/bibtopic

This folio uses material from Andy Roberts' Getting to grips with LaTeX with permission from the author.

Source: https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management

Posted by: lapradesoccring.blogspot.com

0 Response to "Is There A Way To Clean Latex Bib Files"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel