Cite sources in LaTeX with a .bib file: BibTeX entries, \cite, \bibliographystyle and \bibliography, natbib's \citep and \citet, a short look at biblatex, and how Coauthor's compile and literature library fit in.
Bibliographies and Citations
LaTeX separates what you cite from how it is formatted. You keep your references in a .bib database, cite them by key in the text, and a bibliography style decides how the reference list looks. Coauthor's compiler runs BibTeX for you as part of every compile, so the whole workflow happens inside the project folder.
Step 1: Create the .bib File
- In your project folder, click Create new document, choose LaTeX Document, and name the file
references.bib. Coauthor opens it in the LaTeX editor. - Add one entry per source:
@article{vaswani2017attention,
author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki},
title = {Attention Is All You Need},
journal = {Advances in Neural Information Processing Systems},
volume = {30},
year = {2017}
}
@inproceedings{he2016resnet,
author = {He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
title = {Deep Residual Learning for Image Recognition},
booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages = {770--778},
year = {2016}
}
@book{goodfellow2016deep,
author = {Goodfellow, Ian and Bengio, Yoshua and Courville, Aaron},
title = {Deep Learning},
publisher = {MIT Press},
year = {2016}
}
The first word after { is the citation key (vaswani2017attention). Keys are case-sensitive and must be unique. Common entry types are @article, @inproceedings, @book, @phdthesis, @techreport, and @misc (for arXiv preprints and websites, with howpublished or url). Separate authors with and; protect capitals in titles with braces: {BERT}.
Most publisher pages and Google Scholar offer a "BibTeX" export you can paste straight in.
Step 2: Cite in the Text and Print the List
% body
Transformers \cite{vaswani2017attention} replaced recurrence with attention,
building on residual connections \cite{he2016resnet,goodfellow2016deep}.
% at the end, before \end{document}
\bibliographystyle{plain}
\bibliography{references} % file name without .bib
Standard styles: plain (numbered, alphabetical), unsrt (numbered, order of citation), alpha (labels such as [Vas17]), abbrv. Venue templates ship their own .bst file and tell you which style to use (for example \bibliographystyle{aaai2027} or \bibliographystyle{ieeenat_fullname}); use that one.
Step 3: Compile
Click Compile. Coauthor's latexmk build detects the \bibliography command, runs BibTeX, and reruns pdfLaTeX until citations and the reference list are resolved, all in one click. Only entries you actually cite are printed; add \nocite{*} to print everything in the file.
If a citation shows as ? or the log says Citation 'foo' undefined, see the troubleshooting table below. BibTeX's own complaints (a malformed entry, a missing field) appear in the Compilation Results panel; open Full Compilation Log or click the pass card to read them. See Compile Errors, Warnings, and Logs.
Author-Year Citations with natbib
Many venues (NeurIPS, ICML, ICLR, AAAI, ACL) use author-year citations via natbib:
\usepackage[round]{natbib} % preamble; some templates load it for you
...
\citet{vaswani2017attention} introduced the Transformer. % Vaswani et al. (2017)
Attention scales well \citep{vaswani2017attention}. % (Vaswani et al., 2017)
\citep[see][p.~4]{he2016resnet} % (see He et al., 2016, p. 4)
\citeauthor{he2016resnet}, \citeyear{he2016resnet}
Use \citet when the authors are the subject of the sentence and \citep when the citation is parenthetical. Pair natbib with a compatible style such as plainnat, abbrvnat, or the venue's .bst. The editor's autocomplete offers \cite, \citep, and \citet.
biblatex in Brief
biblatex with the biber backend is the modern alternative; it is common in theses and humanities work.
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{references.bib} % preamble, with extension
...
\textcite{vaswani2017attention} and \parencite{he2016resnet} ...
\printbibliography % where the list should appear
Coauthor's compile runs latexmk, which calls biber automatically when biblatex asks for it. Do not mix \bibliography (BibTeX) and \printbibliography (biblatex) in one document, and check that your venue accepts biblatex; most conference templates require BibTeX with their .bst.
Using Coauthor's Literature Library
The AI coauthor can search the literature and save papers to your workspace's literature library, where each paper stores its title, authors, year, venue, DOI, and abstract. Open a paper from the workspace panel to read the metadata and use Copy Citation to copy a formatted author-year reference to paste elsewhere. The library does not export .bib entries by itself; the quickest route into your bibliography is to ask the AI in the same thread where it found the papers, for example: "Write BibTeX entries for the three papers you just found into references.bib and cite the ResNet one in the related work section." The AI has the search results in context and can edit both files; review the change in the editor and check the entries against the publisher's record before compiling. See Literature Search and Library.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
[?] in the text, Citation 'x' undefined | Key misspelled, or the entry is not in the file listed in \bibliography | Compare the key in the text with the .bib; keys are case-sensitive |
| No reference list at all | \bibliography missing, or nothing cited | Add \bibliographystyle and \bibliography before \end{document} |
I couldn't open database file references.bib | Wrong file name or the .bib is in another folder | Match the name exactly; keep the .bib in the project folder |
I found no \bibstyle command | \bibliographystyle missing | Add it next to \bibliography |
BibTeX pass red: I was expecting a , | Syntax error in an entry (missing comma or brace) | Open the BibTeX card in the results panel; it names the entry |
| Reference list style looks wrong for the venue | Wrong .bst | Use the style file that ships with the template |
\citep undefined | natbib not loaded | Add \usepackage{natbib} or use the template's citation commands |
Related articles
Prefer to ask?
Inside Coauthor, ask the AI coauthor how any feature works — it answers from these same help articles. For anything else, use the ? button in the top-right corner of the app.