本页面目前没有中文版本,因此以英文呈现。您愿意通过帮助翻译这个页面来支持我们吗?翻译此页面

在 LaTeX/Overleaf 中精通参考文献样式:BibTeX、natbib 和 BibLaTeX 快速指南

Do you use LaTeX or Overleaf and need help customizing bibliography styles for your documents? Whether in BibTeX, natbib, or BibLaTeX, bibliography style customization can be slightly confusing initially, especially as the style names could be clear guides. We will show you how to change the bibliography style in each system, with the essential styles listed in a table. As there are three options in LaTeX (and therefore in Overleaf), we will go from the classic BibTeX to the versatile natbib to the modern BibLaTeX; you will find here a step-by-step guide to customize your bibliography to your needs. Let’s dive in and uncover the secrets of bibliography styles in LaTeX!

需要一个简单的解决方案来管理您的BibTeX条目吗?探索CiteDrive!

  • 基于Web的现代参考文献管理
  • 与研究同行合作和分享
  • 与Overleaf集成
  • 全面的BibTeX/BibLaTeX支持
  • 直接从您的浏览器保存文章和网站
  • 从包含数千万参考文献的数据库中搜索新文章
尝试CiteDrive

BibTeX:

BibTeX relies on .bst (BibTeX Style) files to format the bibliography style in your .tex documents. To change the style, you need to change the .bst file being used.

Locate or Choose a .bst File: Find an appropriate .bst file that corresponds to the style you desire. Common styles include plain, abbrv, alpha, etc. Alternatively, you can find or create custom .bst files.

Define the .bst File in the LaTeX Document:

% replace "your_style" with the name of your chosen .bst file
\bibliographystyle{your_style}
% replace "your_bib_file" with the name of your .bib file
\bibliography{your_bib_file}

BibTeX style examples

Style NameDescription
plainPlain bibliography style, sorted alphabetically
alphaCitation labels are formed by author and year
abbrvAbbreviated bibliography style
unsrtUnsorted bibliography style
ieeetrIEEE Transactions style
acmAssociation for Computing Machinery style
siamSociety for Industrial and Applied Mathematics style
amsplainAmerican Mathematical Society plain bibliographic style
apalikeAPA-like style
natbibFlexible citation styles with natbib package

Run BibTeX: After making changes to your LaTeX document, run BibTeX to generate the bibliography. The command typically looks like this:

Terminal window
bibtex <your-document>

Compile LaTeX Document: Finally, compile your LaTeX document with LaTeX again (and possibly multiple times to resolve cross-references).

natbib:

natbib is a package for bibliographies that provides additional citation commands and flexibility. To change the bibliography style with natbib:

Choose a Citation Style: natbib provides several citation styles such as plainnat, abbrvnat, etc. You can use BibTeX styles with natbib, but you may find that the following styles offer more functionality.

Style NameDescription
plainnatSimilar to plain, compatible with natbib package
abbrvnatSimilar to abbrv, compatible with natbib package
unsrtnatSimilar to unsrt, compatible with natbib package
apalikeAPA-like style, compatible with natbib package
natureNature-like style, compatible with natbib package
chicagoChicago Manual of Style, compatible with natbib package
plainnatnatA variation of plainnat with more natural names
agsmHarvard AGPS style, compatible with natbib package

Define the bibliography Style in the LaTeX Document: Also, import the natbib package with the desired style:

\usepackage[<options>]{natbib} \bibliographystyle{<style>}

Run BibTeX and Compile: Follow the same steps as with BibTeX.

BibLaTeX:

BibLaTeX is a more modern bibliography system that works with LaTeX. Changing the bibliography style in BibLaTeX is more straightforward.

Choose a BibLaTeX Style: BibLaTeX comes with various built-in styles like numeric, apa, ieee, etc.

Style NameDescription
numericNumeric citation style, often used in natural sciences
authoryearAuthor-year citation style, common in humanities
alphabeticSimilar to authoryear, uses alphabetic labels
authortitleAuthor-title citation style
numeric-compCompact numeric citation style
authoryear-compCompact author-year citation style
apaAPA citation style
chicago-authordateChicago Author-Date citation style
ieeeIEEE citation style
natureNature-like citation style
scienceScience-like citation style

Define the style in the LaTeX document: In the preamble of your LaTeX/Overleaf document, load the BibLaTeX package with the desired bibliographic style:

\usepackage[style=<style>]{biblatex}

Import the .bib.file File:

\addbibresource{<bib-file>.bib}

Run LaTeX, BibLaTeX, and LaTeX Again: After making these changes, compile your document with LaTeX, then run BibLaTeX, and finally compile again with LaTeX to ensure all references and citations are resolved.