Featured image of post BibTeX .bib and .bbl

BibTeX .bib and .bbl

What is BibTeX and .bib file?

BibTeX

BibTeX is a tool and file format for managing and formatting bibliographic references, typically used in conjunction with the LaTeX document typesetting system.

.bib file

A .bib file is a plain-text database file where you can store all the bibliographic information for the sources you cite. Its core principle is to separate the content (data) of the bibliographic entries from their display format (style) within the document.

For example, each bibliographic entry contains three parts: '

1
2
3
4
5
6
7
8
@inproceedings{DDPM,
  title={{D}enoising {D}iffusion {P}robabilistic {M}odels},
  author={Ho, Jonathan and Jain, Ajay and Abbeel, Pieter},
  journal={Advances in Neural Information Processing Systems},
  volume={33},
  pages={6840--6851},
  year={2020}
}
  1. Entry Type: Preceded by the @ symbol, indicating the document type, such as @article (journal article), @book (book), @inproceedings (conference paper), etc.
  2. Citation Key: Appears in curly braces immediately after the entry type. This is the unique identifier used when referencing the source in your LaTeX document. Here DDPM is the Citation Key. When you want to cite it in a LaTeX document, simply type \cite{DDPM}.
  3. Fields: Contain specific details about the source, such as author, title, year, publisher, etc. Each field follows the format field_name = {content}, with fields separated by commas.

How to Use .bib Files in LaTeX?

A basic workflow is as follows:

  1. Create your LaTeX main file (e.g., main.tex).
  2. Create your bibliography database file (e.g., references.bib).
  3. In the LaTeX file, specify the reference style (.bst file) using the \bibliographystyle command and designate the .bib file using the \bibliography command. An example of main.tex is as follows,
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
\documentclass{article}

\begin{document}

balabalabalabala

\bibliographystyle{plain} % Specify the style, such as plain, unsrt, alpha, etc.
\bibliography{references} % Specify your .bib file (without the .bib extension)

\end{document}

What is .bbl file?

The .bbl file is the output file generated by BibTeX processing. When you run the bibtex command, it reads your .aux file and .bib files, then generates a formatted bibliography list based on the .bst style file you specified. This formatted list is written into the .bbl file. During the subsequent pdflatex compilation, LaTeX directly inserts the contents from the .bbl file to generate the final bibliography list.

Generating .bbl file from .bib file on Overleaf

Why?

When submitting paper in arXiv, arXiv requires both the .bbl file and .bib file.

Implementation Steps

  1. Construct the transformation LaTeX code as
1
2
3
4
5
6
\documentclass{article}
\begin{document}
	\nocite{*}
	\bibliography{references.bib} % name of .bib file
	\bibliographystyle{IEEEtran} % .bst style
\end{document}
  1. Compile.
  2. Click Logs and output files (between Recompile and Download PDF).
  1. Click Other logs and files at the right bottom corner.
  1. Choose and download output.bbl at the top.
All Rights Reserved
Built with Hugo
Theme Stack designed by Jimmy