\begin{article}
LaTeX Citations and Bibliography — latex-citations Skill
Set up BibLaTeX or BibTeX in seconds, generate .bib entries for any source, and get citation commands for APA, IEEE, Chicago, or Vancouver styles.

If you have ever started a LaTeX document, realized halfway through that you need citations, and then spent an hour figuring out whether to use biblatex, natbib, or plain bibtex — you are not alone. The bibliography ecosystem in LaTeX is fragmented by decades of competing packages, journal-specific .bst style files, and a compilation pipeline that requires running up to four commands in the right order. Forget one step and your references show up as [?] or vanish entirely.
The latex-citations skill for Claude Code eliminates that friction. Tell it what citation style your publisher requires, paste in a DOI or title, and it handles the rest — package setup, .bib entries, citation commands, and the correct compilation sequence.
What Is latex-citations?
latex-citations is a Claude Code skill in the FormatEx latex-skills collection. It gives Claude deep, up-to-date context about the LaTeX bibliography toolchain so you can ask natural questions and get production-ready answers instead of generic documentation summaries.
Specifically, the skill covers:
- Setting up BibLaTeX + Biber (the modern default) or BibTeX + natbib (when a journal requires a
.bstfile) - Generating correct
.bibentries for journal articles, books, book chapters, conference papers, theses, and websites - Recommending the right citation style for your discipline
- Explaining every citation command variant and when to use each
- Walking through the exact compilation order for both toolchains
- Enforcing the
~\cite{key}non-breaking space convention automatically
It pairs naturally with the latex-structure skill for overall document setup and the latex-packages skill for managing dependencies.
How to Install
# Inside your project directory
claude mcp add https://github.com/formatex/latex-skillsOnce the skills are loaded, prefix your request with the skill name:
/latex-citations Set up APA-style citations in my thesis using BibLaTeX.That is it. Claude will output the preamble block, create a starter .bib file, and show you the exact commands to compile.
BibLaTeX vs BibTeX — Which to Use?
This is the question that causes most of the confusion. Here is the decision tree:
Use BibLaTeX + Biber if:
- You are writing a thesis, dissertation, or conference paper where you choose the style
- You need author-year (APA-like), numeric (IEEE-like), or Chicago formatting
- You want Unicode support in author names or titles
- You are starting a new document with no existing constraints
Use BibTeX + natbib if:
- Your target journal provides a
.bststyle file (e.g.,elsarticle-harv.bst,IEEEtran.bst) - The submission system explicitly requires
\bibliographystyle{} - You are working with a legacy document that already uses
\bibliography{}
The practical rule: BibLaTeX is the right default for everything you control. BibTeX exists for journal compatibility. The latex-citations skill detects which path you need and sets up the correct one.
For BibLaTeX the minimal preamble looks like this:
\usepackage[backend=biber, style=authoryear, sorting=nyt]{biblatex}
\addbibresource{references.bib}For BibTeX + natbib:
\usepackage{natbib}
% At end of document:
\bibliographystyle{plainnat}
\bibliography{references}A common mistake is forgetting \addbibresource entirely when switching from BibTeX to BibLaTeX — the file loads silently but produces no references. The skill flags this automatically.
.bib Entry Templates
The skill generates complete, validated .bib entries. Here are the three most common types:
Journal article:
@article{knuth1984literate,
author = {Knuth, Donald E.},
title = {Literate Programming},
journal = {The Computer Journal},
year = {1984},
volume = {27},
number = {2},
pages = {97--111},
doi = {10.1093/comjnl/27.2.97},
}Book:
@book{lamport1994latex,
author = {Lamport, Leslie},
title = {\LaTeX: A Document Preparation System},
edition = {2},
publisher = {Addison-Wesley},
address = {Reading, MA},
year = {1994},
isbn = {978-0201529838},
}Website / online source:
@online{formatex2026api,
author = {{FormatEx}},
title = {FormatEx {API} Documentation},
url = {https://formatex.io/docs},
urldate = {2026-06-14},
year = {2026},
}Give the skill a DOI, arXiv ID, or even a plain title and it will generate the entry with correctly escaped special characters, proper name formatting (Last, First), and the right entry type.
Citation Commands
BibLaTeX and natbib share similar semantics but use different command names. The table below covers the commands you will use 95% of the time:
| Command | BibLaTeX | natbib equivalent | Output example |
|---|---|---|---|
| Basic cite | \cite{key} | \cite{key} | (Knuth, 1984) or [1] |
| Parenthetical | \parencite{key} | \citep{key} | (Knuth, 1984) |
| In-text | \textcite{key} | \citet{key} | Knuth (1984) |
| Author only | \citeauthor{key} | \citeauthor{key} | Knuth |
| Year only | \citeyear{key} | \citeyear{key} | 1984 |
| With page | \parencite[p.~45]{key} | \citep[p.~45]{key} | (Knuth, 1984, p. 45) |
| Multiple | \parencite{key1,key2} | \citep{key1,key2} | (Knuth, 1984; Lamport, 1994) |
The skill will tell you which commands are available given your loaded packages and warn you if you use a BibLaTeX command in a natbib document.
Compilation Order
This is where most people lose time. The order matters because BibTeX and Biber are separate programs that read and write auxiliary files that pdflatex or xelatex then picks up.
BibTeX — four-pass sequence:
pdflatex main.tex # Pass 1: generates .aux with \citation entries
bibtex main # Reads .aux, writes .bbl
pdflatex main.tex # Pass 2: reads .bbl, resolves references
pdflatex main.tex # Pass 3: resolves cross-references in TOC/labelsBiber (BibLaTeX backend) — same structure, different tool:
pdflatex main.tex # Pass 1
biber main # Reads .bcf (not .aux), writes .bbl
pdflatex main.tex # Pass 2
pdflatex main.tex # Pass 3latexmk — the automatic solution:
latexmk -pdf main.texlatexmk detects which backend you are using and runs all passes in the correct order automatically. It also skips unnecessary passes when nothing has changed. The skill configures a .latexmkrc file for you if you want the one-command workflow.
FormatEx uses latexmk internally when you compile through the API, which means you get correct bibliography resolution without managing the pass order yourself. See automating academic paper PDFs for a walkthrough of using the FormatEx API to compile full thesis documents with bibliography.
Citation Styles
BibLaTeX ships with four style families that cover the major academic conventions:
authoryear — APA-like
- In-text: (Knuth, 1984)
- Use for: humanities, social sciences, most psychology and education journals
\usepackage[style=authoryear]{biblatex}
numeric — IEEE-like
- In-text: [1] or [1, 2, 5]
- Use for: engineering, computer science, physics, most IEEE and ACM venues
\usepackage[style=numeric, sorting=none]{biblatex}(setsorting=noneto order by citation appearance)
alphabetic — abbreviated author-year
- In-text: [Knu84]
- Use for: mathematics, theoretical computer science
\usepackage[style=alphabetic]{biblatex}
chicago-authordate — Chicago 17th edition
- In-text: (Knuth 1984)
- Use for: history, political science, some law journals
- Requires
biblatex-chicagopackage:\usepackage[style=chicago-authordate]{biblatex}
Tell the skill your discipline or target journal and it will select the right style, set the correct sorting order, and add any required companion packages.
The ~ Before \cite Rule
This is a small detail with a visible impact on output quality. Never write:
As shown by Knuth \cite{knuth1984literate}, ...Always write:
As shown by Knuth~\cite{knuth1984literate}, ...The ~ is a non-breaking space. Without it, LaTeX can break the line between "Knuth" and "[1]" or "(1984)", leaving the citation number orphaned at the start of the next line. In academic publishing this is considered a formatting error.
The same rule applies to \parencite, \textcite, \citep, and \citet. The latex-citations skill enforces this in every snippet it generates and flags violations when it reviews existing code.
Related Skills
The latex-citations skill works best as part of a complete workflow:
- latex-structure — Sets up your document class, preamble, and section hierarchy before you add citations
- latex-packages — Manages package conflicts that can arise when loading
biblatex,hyperref, andclevereftogether - latex-fix — Diagnoses undefined citation warnings, missing
.bblfiles, and backend mismatch errors
Compile Without a Local TeX Installation
Once your .tex and .bib files are ready, you can compile them through the FormatEx API without installing TeX Live locally. The API handles the full latexmk pipeline, returns the compiled PDF, and exposes compilation logs so you can debug bibliography errors without running any tools on your machine.
If you are new to the platform, getting started with FormatEx walks through authentication, uploading multi-file documents, and reading compilation output. For teams building document pipelines, LaTeX for developers covers the full API surface including webhook callbacks and async job polling.
Get Started
Install the latex-skills collection and run your first bibliography setup in under a minute:
claude mcp add https://github.com/formatex/latex-skillsThen in any LaTeX project:
/latex-citations I need IEEE numeric citations for an ACM paper. Generate the preamble and a sample .bib entry for a conference paper.The skill outputs ready-to-paste LaTeX. No documentation hunting, no compilation mystery, no orphaned citation numbers.
\end{article}
\related{posts}




