Skip to Main Content
PolyU Library

LaTeX and Overleaf

This guide provides a brief overview on how to use EndNote, JabRef and Overleaf

Why Overleaf

Overleaf is an online LaTeX writing tool that can produce high-quality and professional typesetting.

The benefits of using Overleaf include:

Instant access: no installation, real-time collaborative editing 

Efficient handling complex documents: create mathematical equations and tables etc and easily manage footnotes, citations and references

Streamline publishing workflow: allow to submit manuscript within Overleaf project

Wide range of packages and templates: specifically made for different document types and citation styles 

Getting Started

If you are new to LaTeX/Overleaf, be sure to read these two guides first: How do I use Overleaf? and Learn LaTeX in 30 minutes to familiar yourself with LaTeX using Overleaf.

Before creating a LaTeX document, you will need to register an Overleaf account first using your Google, ORCID or IEEE account.

Then, click New Project , choose Blank Project to create your own LaTeX document or reuse a template.

 

If you want to start from scratch, click Blank Project, then give a Project Name, and Create.

 

A main file with extension .tex will be automatically generated. To rename it, click the pencil icon.

To insert .bib file, you may upload it from your computer or create a new file (with .bib), then copy and paste your references in BibTeX format to the .bib file directly.

Bibliography Styles

There are three bibliography styles in Overleaf: 

  • BibTeX - Ease of Use and Compatibility 
  • Natbib - Author-year and numerical citations, simple documents that require traditional citation styles
  • BibLaTeX - Complex documents, multilingual documents, more customization in citations

Bibliography style determines how reference lists and citations are formatted in a LaTeX document. Most journals use BibTeX and Natbib styles.

Before citing references in LaTeX/Overleaf, you need to export references in BibTeX format and create citation keys. You will use \cite{citationkey} to cite references stored in .bib file. If no \cited{citationkey} is used, no reference list will be shown. If you want to include a bibliography entry that you didn't cite in your document, you may add the \notice{citationkey} for the entry. If you want to include all entries, use \notice{*}

To specify which bibliography style, use \bibliographystyle{stylename}

To specify which BibTeX file to use, use \bibliography{bibfilename}.

Below is an example of bibliography commands (put before \end{document}) used in BibTeX:

In Bibliography part, the default title is "References" for the article document class and "Bibliography" for books and reports. To change "References" to "Bibliography", add \renewcommand\refname{Bibliography} or \renewcommand\bibname{Bibliography}.

Comparison of BibTeX, Natbib and BibLaTeX

Features BibTeX Natbib BibLaTeX
Strengths Ease of use and compatibility  Customization in Author-Year and numerical citations, simple documents required traditional citation styles Complex documents, multilingual documents, more customization in citations
Required Packages Natbib BibLaTeX
In-text citation command \cite{citationkey} \cite{citationkey}; more citation commands available 

\cite{citationkey}

Bibliography styles command   

\bibliographystyle{stylename} (body)

Standard stylenames

\usepackage[  ]{natbib} command for customization in citation (preamble)

\bibliographystyle{stylename} (body)

Standard stylenames

\usepackage[style=stylename]{biblatex} command for customization in citation (preamble)

Standard stylenames

Print bibliography command

\bibliography{bibfilename}

(Do not include .bib) 

\bibliography{bibfilename}

(Do not include .bib)

\addbibresource{.bib} (preamble)

\printbibliography (body)

Examples in  Overleaf Bibliography management: BibTeX example Bibliography Example: The natbib Package Bibliographies with biber and biblatex

APA styles

If you need to cite in APA 7th, you can only use BibLaTeX-based APA style with the following \usepackage command:

  • e.g. \usepackage[backend=biber, style=apa]{biblatex} (placed in preamble)

In APA 7th, an in-text citation has an author's name and year (or equivalent information) appear in parentheses, e.g. (Chan, 2018). In BibLaTeX, parentheses are not automatically generated from \cite{ }command, if you need to include the parentheses, a pair of (  ) can be added around \cite{citationkey} e.g. (\cite{Chan08}). You may use use \parencite{citationkey} to create the in-text citations with parentheses in BibLaTeX.

If you use APA 6th, you can choose between: 

  • BibTeX-based apalike e.g. \bibliographystyle{apalike}
  • Natbib-based apacite e.g. \bibliographystyle{apacite}
  • BibLaTeX-based apa6 e.g. \usepackage[backend=biber, style=apa6]{biblatex}