Scriptora AI Docs
References

Citations & BibTeX

Everything about citing references — from \cite commands and citation styles to managing your .bib files.

Citing a reference

Use \cite{key} where key matches an entry in your .bib file:

Transformer models \cite{vaswani2017attention} have become the dominant architecture.

Multiple citations

Recent work \cite{brown2020gpt3, ouyang2022instructgpt} has shown...

With page numbers

As noted in \cite[p.~42]{knuth1984texbook}...

Inline author names

Some styles support \citet (textual) and \citep (parenthetical) via the natbib package:

\usepackage{natbib}

\citet{vaswani2017attention} introduced the Transformer.   % → Vaswani et al. (2017) introduced...
\citep{vaswani2017attention}                                % → (Vaswani et al., 2017)
\citep[see][Chapter 3]{knuth1984texbook}                    % → (see Knuth, 1984, Chapter 3)

Citation autocomplete

Type \cite{ in the editor and the autocomplete dropdown shows all keys from your .bib files. Use arrow keys to navigate and Tab to accept.

Similarly, \ref{ autocompletes from all \label{} values in your document.

Citation styles

The style is controlled by \bibliographystyle{} or your document class:

StyleOutputCommon use
plainNumbered [1], [2]General purpose
alpha[Van17], [Bro20]Math, some CS venues
unsrtNumbered, order of appearanceShort papers
apalikeAuthor-year: (Vaswani, 2017)Social sciences
IEEEtran[1] IEEE formatIEEE conferences
abbrvnatAuthor-year, abbreviated namesnatbib-based styles

Most conference and journal templates define the style in their .cls file — you typically don't need to set it yourself.

The .bib file

A .bib file is a plain-text database of references. Each entry looks like:

@article{vaswani2017attention,
  title     = {Attention is All You Need},
  author    = {Vaswani, Ashish and Shazeer, Noam and ...},
  journal   = {Advances in Neural Information Processing Systems},
  volume    = {30},
  year      = {2017},
  doi       = {10.48550/arXiv.1706.03762}
}

Entry types

TypeUse
@articleJournal papers
@inproceedingsConference papers
@bookBooks
@miscarXiv preprints, websites, software
@phdthesisPhD dissertations
@techreportTechnical reports

Key naming conventions

The key (e.g., vaswani2017attention) is how you reference the paper with \cite{}. Common conventions:

  • authorYearword — e.g., brown2020gpt3
  • AuthorYear — e.g., Vaswani2017

Keys are case-sensitive.

Adding references

There are four ways to add entries to your .bib file:

  1. Search panel — use the References sidebar to search 6 databases and click + Add to .bib
  2. DOI / arXiv lookup — click the BookPlus icon in the sidebar toolbar, paste a DOI or arXiv ID, and the BibTeX is fetched automatically via CrossRef or arXiv API. The tool auto-detects whether you've entered a DOI, arXiv ID, or paper title.
  3. Copy from the References panel — click the BibTeX button on any search result to copy the formatted entry
  4. Manual — open your .bib file and type the entry directly

Printing the bibliography

Add these two lines before \end{document}:

\bibliography{references}    % name of your .bib file (without .bib)
\bibliographystyle{plain}    % or whatever style your template uses

Troubleshooting

ProblemCauseFix
Citations show as [?]BibTeX needs multiple passesRun a full compile — latexmk handles this automatically
"Citation undefined" warningKey typoCheck that \cite{key} exactly matches a key in your .bib
Duplicate key warningTwo entries share the same keyRename one of the keys
Missing fields errorStyle requires specific fieldsCheck your style's docs (e.g., @article needs journal)
Author names formatted wrongBibTeX expects Last, First formatUse author = {Last, First and Last2, First2}

On this page