TeXipedia

bibtex

Processes and manages bibliographic references, enabling automatic citation formatting and bibliography generation according to specified citation styles.

Overview

Serves as the standard bibliography management system for LaTeX documents, transforming structured bibliography data into formatted citations and reference lists. The system separates content from presentation, allowing users to maintain a single database of references while outputting them in various styles.

  • Stores bibliographic data in .bib files using a standardized format for books, articles, theses, and other academic works.
  • Supports multiple bibliography styles through .bst files, accommodating different academic disciplines and publisher requirements.
  • Automatically handles citation numbering, sorting, and formatting according to the chosen style.
  • Particularly valuable for academic writing, research papers, and technical documentation where consistent citation management is crucial.
  • Works in conjunction with LaTeX citation packages to provide flexible citation commands and formatting options.

Getting Started

bibtex is a command-line tool for processing bibliography files, not a LaTeX package to be loaded with \usepackage.

To use BibTeX with LaTeX:

  1. Create a bibliography file (e.g., references.bib) with your references
  2. In your LaTeX document, include:
\documentclass{article}
\begin{document}
Cite a reference \cite{key1}.
\bibliographystyle{plain}  % Choose a bibliography style
\bibliography{references}   % references.bib file (without extension)
\end{document}
  1. Compile with:
    • latex document.tex
    • bibtex document
    • latex document.tex
    • latex document.tex

Examples

Creating a simple LaTeX document with BibTeX citations.

\documentclass{article}
\usepackage{natbib}
\bibliographystyle{plain}

\begin{document}

This is a sample document with citations. Einstein's theory of relativity \cite{einstein1905} revolutionized physics. Later, Feynman made significant contributions to quantum mechanics \cite{feynman1985}.

\section{Bibliography}
\bibliography{references}

\end{document}

Using different citation styles with BibTeX and natbib.

\documentclass{article}
\usepackage{natbib}
\bibliographystyle{plainnat}

\begin{document}

\section{Different Citation Styles}

Textual citation: \citet{lamport1994} introduced LaTeX to the world.

Parenthetical citation: The standard model has been extensively tested \citep{weinberg1967}.

Year only: This was first proposed in \citeyear{knuth1984}.

Author only: \citeauthor{knuth1984} developed TeX in the late 1970s.

\bibliography{sample}

\end{document}

Creating and using a custom BibTeX file with a LaTeX document.

\documentclass{article}
\usepackage{natbib}
\bibliographystyle{alpha}

\begin{document}

\section{Introduction}
This document demonstrates how to use BibTeX with a custom bibliography file. We cite a book \cite{knuth1986}, an article \cite{dijkstra1968}, and a conference paper \cite{lamport1994}.

% The content of your references.bib file would look like:
% @book{knuth1986,
%   author = {Knuth, Donald E.},
%   title = {The {\TeX}book},
%   year = {1986},
%   publisher = {Addison-Wesley}
% }
% 
% @article{dijkstra1968,
%   author = {Dijkstra, Edsger W.},
%   title = {Go To Statement Considered Harmful},
%   journal = {Communications of the ACM},
%   volume = {11},
%   number = {3},
%   pages = {147--148},
%   year = {1968}
% }
% 
% @inproceedings{lamport1994,
%   author = {Lamport, Leslie},
%   title = {\LaTeX: A Document Preparation System},
%   booktitle = {Proceedings of the Annual Meeting},
%   year = {1994},
%   organization = {TeX Users Group}
% }

\bibliography{references}

\end{document}