Mestring av bibliografistiler i LaTeX/Overleaf: En rask guide for BibTeX, natbib og BibLaTeX

Denne siden er for øyeblikket ikke tilgjengelig på norsk, så den presenteres på engelsk. Kunne du tenke deg å støtte oss ved å hjelpe til med å oversette denne siden? Oversett denne siden

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!

Trenger du en enkel løsning for håndtering av dine BibTeX-oppføringer? Utforsk CiteDrive!

  • Nettbasert, moderne referansehåndtering
  • Samarbeid og del med forskerkolleger
  • Integrasjon med Overleaf
  • Omfattende støtte for BibTeX/BibLaTeX
  • Lagre artikler og nettsteder direkte fra nettleseren din
  • Søk etter nye artikler i en database med titalls millioner av referanser
Prøv 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.