Skip to Main Content

Mathematics

Getting Started with LaTeX

Online LaTex with Overleaf

Handy Resources for Two of the Most Commonly Used Styles of LaTeX Citation and Bibliography Management

BibTeX

Natbib

Using Endnote For LaTeX Bibliographies: Getting Started

It's no secret that Endnote is designed to work best with Microsoft Word.  It's also not a secret that Mathematicians typically use LaTeX for formatting documents.

However, Endnote is still a valuable tool for managing a personal library of source documents.  Citation info and electronic copies of papers can be organized in folders and backed up online.  As your library gets larger, you can search for papers and citations by author, journal title, article title, year and more.

And, of course, you can use Endnote to help format your papers' bibliographies.  This guide shows you how!

  • To get started, trek on over to our Endnote Guide and learn how to install the Endnote software on to your personal computer.  
  • If you have any questions about how to do this or would just like to have a Research Librarian orient you to the program and how it can help, you can request a one on one appointment with either Pete Schlax or Chris Schiff.

Manual Bibliography Creation in LaTeX: Overview

Manual bibliography creation for a LaTeX document is a relatively quick way to create a bibliography.  Conceptually, the process is similar to the iterative "cut-and-paste" method used with tools like NoodleBib which allow you to export individual citiations.  In LaTeX, the process involves the following general steps:

  1. Cite each source at the appropriate location(s) within the text body using a unique, short name (or "key" in LaTeX speak) for each reference.
  2. Create a list of references you will cite in your document (i.e. author, title, year, DOI, etc.).
  3. Pair each reference in your list with a key name.
  4. Typeset your document to create a formatted and printable document complete with bibliography.

Manual Bibliography Creation in LaTeX: Nuts and Bolts

Details for manual bibliography creation can be found in pages 177-179 of LaTeX Beginner's Guide (2011)1

The Hardware:

A good way to think about the bibliography creation process is that you are simultaneously working in two different but related environments:

  • the text body where you make your "in-text" citations.

In-text citations are marked using the \cite{KEY} command, where "KEY" would correspond to the unique, short name you've assigned to the reference.

For example, you could define a KEY for LaTeX Beginner's Guide (2011) to be LBG11.

So to cite this book, you would enter "\cite{LBG11}" at the appropriate place in the text body of the LaTeX file.

  • the bibliography environment where your list of complete references (i.e. author, title, year, publisher, DOI, etc) are defined.

The bibliography environment is simply an area of your LaTeX file dedicated to defining all the bibliographic information that goes with each of the KEY citations you make in the text body.

The commands to open and close the bibliography environment are \begin{thebibliography}{widest label} and \end{thebibliography}, respectively.

Note that for "widest label" , you should enter the value of the widest label of your references in your bibliography.  For example, if you have 9 or fewer references, you could enter a single digit.  If you have between 10-99, you should enter a double digit, etc.

Within the bibliography environment (i.e. between the \begin and \end commands) the command to define a citation KEY is \bibitem{KEY}.

Hardware Assembly: Putting it all together

Below is a simple example of a LaTeX file with a manually created bibliography.  The relevant bibliography commands have been highlighted.  To see this file in action, you can copy and paste the text into an empty LaTeX file and name it something like "bibliographytest.tex".

 

\documentclass{article}

\begin{document}

\section*{My Single Title Bibliography}

Details for manual bibliography creation can be found in pages 177-179 of LaTeX Beginner's Guide \cite{LBG11}.

\begin{thebibliography}{9}

\bibitem{LBG11} Kottwitz, Stefan. 2011. \emph{LaTeX beginner's guide: Create high-quality and professional-looking texts, articles, and books for business and science using LaTeX}. Olton, Birmingham: Packt Pub

\end{thebibliography}

\end{document}

 

Typesetting this LaTeX example should produce the following output:


[1] Kottwitz, Stefan. 2011. LaTeX beginner's guide: Create high-quality and professional-looking texts, articles, and books for business and science using LaTeX. Olton, Birmingham: Packt Pub.


Using BibTeX To Create Bibliographies

BibTeX is a helper program that allows you to create, manage and use a single citation database with many LaTeX documents.  This allows you to maintain a single source from which you can use and reuse the citation data you collect. 

BibTex files are saved with the ".bib" extension.

LaTeX Bibliography Creation Using BibTeX: Nuts and Bolts

Details for bibliography creation using BibTeX can be found in pages 179-187 of LaTeX Beginner's Guide (2011)1

The Hardware:

Like manual bibliography creation in LaTeX, a good way to think about using BibTex with LaTeX to create bibliographies for your LaTeX documents is that you are working in two different but related environments.  However, in this case the two environments are located in two different files.

 

  • The BibTeX ".bib" file which contains the bibliographic details for your references.

The BibTeX file is a list of all the fields necessary for creating properly formatted in-text and bibliography citations.

Each item includes a content type (i.e. book, article, etc), the unique item KEY name and all the bibliographic details necessary to create a complete bibliography entry (i.e. Author, title, journal, volume, number, pages, month, year, etc.). 

The format for a BibTeX database entry is:

@entrytype{keyword,

fieldname 1 = {field text 1},

fieldname 2 = {field text 2},

...

fieldname n = {field text n}

}

Where:

entrytype corresponds to the type of work being cited (e.g. book, article, etc.)

keyword corresponds to the short, unique identifier for the citation entry

fieldname 1 ... n = the citation fields (e.g. title, author, journal, volume, etc.)  for a given citation type 

 

For lists of common entry types and their respective fields, see:

 

  • The LaTeX  ".tex" file which contains the elements of the text body including in-text citations.  The .tex file also defines the use of a specific bibliography style and BibTeX library.

In-text citations are indicated using the \cite{KEY} command, where KEY is the short, unique identifier for an individual citation.

BibTeX database .bib file is indicated with the \bibliography{filename} command.
Hardware Assembly: Putting it all together
  • Creating the .bib file

Create the ".bib" file using a  simple text editor.  When saving the file, be sure that the "all file types" option is selected and include the ".bib" file extension as part of the name (e.g. "libguide.bib").  Save the .bib file in the same directory you use for your .tex files.

Here's an example with information for three Bates faculty publications:

@article{PW15,
author = "Goncalves, D. and Wong, P. and Zhao, X.",
title = "Fixed point theory of spherical 3-manifolds",
journal = "Topology and its Applications",
volume = 181,
pages = "134-149",
month = feb,
year = 2015
}

@article{MLG15,
author = "Cottingham, K. L. and Ewing, H. A. and Greer, M. L. and Carey, C. C. and Weathers, K. C.",
title = "Cyanobacteria as biological drivers of lake nitrogen and phosphorus cycling",
journal = "Ecosphere",
volume = 6,
number = 1,
pages = "art1",
month = jan,
year = 2015,
note = "10.1890/ES14-00174.1"
}

@article{NL14,
author = "Lundblad, N. and Ansari, S. and Guo, Y. and Moan, E.",
title = "Observations of λ/4 structure in a low-loss radio-frequency-dressed optical lattice",
journal = "Physical Review A - Atomic, Molecular, and Optical Physics",
volume = 90,
number = 5,
pages = "art1",
month = nov,
year = 2014,
note = "10.1103/PhysRevA.90.053612"
}

 

  • Creating the .tex file

Use PCTeX (or similar software) to create a .tex file containing your document text and citations to sources.

Here's an example saved as libguide.tex that makes use of the libguide.bib file created above:

\documentclass{article}
\begin{document}

\section{Sample Bibliography}

This is an example of a LaTeX document with a short bibliography generated from a call to the libguide.bib BibTeX citation database.  In this example, we refer to papers co-written by several Bates faculty \cite{PW15,MLG15,NL14}.

\bibliographystyle{unsrt}
\bibliography{libguide}
\end{document}

 

  • Typesetting a document containing your text with citations and bibliography
  1. With the .bib file saved in the same directory as your .tex file, use PCTeX to open your .tex file (e.g. libguide.tex).
  2. From the PCTeX drop down menu select ToolsBibliography.
  3. Next, typeset your .tex file.
  4. You will be prompted to typeset your .tex file a second time.  Do this to create your final document (including bibliography).
  5. Using the examples above, your final document should look like this:

[1] Kottwitz, Stefan. 2011. LaTeX beginner's guide: Create high-quality and professional-looking texts, articles, and books for business and science using LaTeX. Olton, Birmingham: Packt Pub

Using BibTeX with EndNote

Manage Citations with EndNote and Export Multiple Citations to a .Bib File

Using the \cite{KEY}, \bibliography{filename.bib} and \bibliographystyle{stylename} commands in a LaTeX .tex document, it's possible to specify in-text citations and create a formatted bibliography from a BibTeX .bib citation database file.  Because you can use the same .bib citation library for many .tex documents, this alleviates the need to repeat citation information entries for each .tex file.

However, hand creating individual entries for a citation list in a .bib library can be a time consuming drag.  Fortunately, we can use a robust citation management program (EndNote) to do most of the heavy lifting.

 

BibTeX .bib file Creation Using Using EndNote X7: Nuts and Bolts

  • Create an intermediate text (i.e. .txt) file:

1.  Open your the EndNote library of interest in EndNote X7 (ENX7).

2.  In the ENX7 main tool bar, if "BibTex Output Style" is not listed in the drop down menu for the active citation output style, choose "Select Another Style".

3.  From the "Choose a Style" dialog box, select the "BibTex Export" style:

4.  Note that the ENX7 preview window displays each citation in the BibTex format.

5.  Select the citations of interest.  If there are many, it is a good idea to create a sub-folder containing the desired citations.

6.  From the ENX7 drop down menu, select File→Export.

7.  In the Export file name dialog box:

  • Provide a file name
  • Save as type .txt
  • Select the BibTex Export style
  • Select the "Export Selected References" box

  • Creating and Editing the .bib file:

1.  After creating the .txt file, rename the file to replace the ".txt" extension with ".bib".

2.  Open the new .bib file with a simple text editor.  You will note:

  • none of the items listed have a "KEY" name.  Because this information is used to indicate in-text citation locations within the .tex document, these KEY names must be added to the new .bib file.
  • many of your exported records will have unwanted extraneous information.  Because each of these fields in the .bib file can wind up in a .tex bibliography, you must delete unwanted fields from each .bib entry.
  • Save the edited .bib file.  You are done!