References

References #

Author: Erhua

Keywords: References

In this section, we discuss references. We use BibTeX for reference handling.

Preparation for the tex main body:

  • In the preamble, use the package \bibliographystyle{reference style}
  • In the main body, use \cite{required reference}
  • Generally, at the end of the document, use the command \bibliography{database name (with the extension .bib) without the extension}
  1. Reference style:

  1. Structure of the bib database (usually generated using the JabRef software)

    We can select articles from Google Scholar, then copy the citation in BibTeX format, and add it to our own database or manually edit it in JabRef.


Note:

bib is a database, and its content does not necessarily equal the content in the LaTeX typeset bibliography list. This means that if there are 10 references in the bib database, it does not necessarily mean that there will be 10 references in the bibliography list in the PDF file typeset by LaTeX. The number and specific references displayed in the bibliography list are specified by the \cite command (and \nocite command) used in the document. If the \cite command is not used to call the reference information, even if the reference information is defined in the bib file, it will not be displayed in the bibliography list. Many people misunderstand this and often ask questions like “Why doesn’t the reference I wrote in the bib file appear in the bibliography?”.


%myarticle.bib
@article{hedrick1992supercritical,
title={Supercritical fluid extraction},
author={Hedrick, Joseph L and Mulcahey, Leah J and Taylor, Larry T},
journal={Mikrochimica Acta},
volume={108},
pages={115--132},
year={1992}}

@article{higham1994bibtex,
  title={BibTEX: A versatile tool for LaTEX users},
  author={Higham, Nicholas J},
  journal={SIAM News},
  volume={27},
  number={1},
  pages={10},
  year={1994}
}
------
%XXX.tex
\documentclass[]{article}
\usepackage{ctex}
\bibliographystyle{unsrt}
\begin{document}
I am a painter, hahaha, I come from a planet of super high cycle fatigue \cite{hedrick1992supercritical,higham1994bibtex}
\bibliography{myarticle}
\end{document}

Further reading:


Summary (excerpt from Mengchen’s blog) #

  • BibTeX is a reference formatting tool that formats the reference information (included in the bib file) into a list that LaTeX can use according to a certain format specified by the bst file.
  • Correct usage of BibTeX to handle references requires compiling the tex file with (Xe/PDF)LaTeX first to generate the aux auxiliary file.
  • BibTeX reads the aux file to determine which references the user needs.
  • Then, based on the content in the aux file, BibTeX finds the correct bst and bib files, and formats the reference information into thebibliography environment in LaTeX, outputting it as the bbl file.
  • In the second (Xe/PDF)LaTeX run, the newly generated bbl file is read, and the aux file is updated.
  • At this point, the reference list will be displayed correctly, but the citation marks in the main text will be displayed as question marks.
  • In the third (Xe/PDF)LaTeX run, the bbl file and the updated aux file are read. At this point, all the references related content will be displayed correctly.

Therefore, to correctly use BibTeX to handle references with LaTeX, it is necessary to compile four times.