THE OVERLEAF FIELD GUIDE

A first line.
A little more confidence.

A practical Overleaf guide, from a blank project to a finished PDF. Take one small step, try the example, and keep going.

14 practical lessonsCopyable examplesUpdated Nov 27, 2026

Before you begin

You do not need to memorize the commands. Each lesson explains where the code belongs and what to check after compiling. This independent guide is maintained by SecTools.tw and links to Overleaf's official documentation.

OVERLEAF FIELD GUIDE

Your first Overleaf project

Understand source, compilation, and PDF output before adding complexity.

  1. LaTeX is a typesetting system. Overleaf is an online editor and compiler. Reading this guide requires no account; creating a cloud project requires your own Overleaf account.
  2. Create a Blank Project, give it a descriptive name, and open main.tex. The file list, source editor, and PDF preview are separate areas; their positions can vary with the interface and window size.
  3. Replace the file with the minimal example and select Recompile. A title and one sentence in the PDF confirm that the basic workflow works.
  4. Change the title, author, and body a little at a time. Compile after each meaningful edit. Add Chinese support in the next lesson.
first-project.tex
\documentclass{article}
\title{My Research Notebook}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
One question is a good beginning.
\end{document}
Keep in mind

Editing the source does not itself confirm a successful PDF build. Check the compilation result.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Traditional Chinese with XeLaTeX

Set the compiler and fonts for reliable Chinese typesetting.

  1. Open the project settings, locate Compiler, and choose XeLaTeX. fontspec and xeCJK require a compatible engine; changing only the source is insufficient.
  2. This example uses article plus xeCJK and Noto Serif CJK TC. It is a starting point for a report, not an institution-approved thesis format.
  3. Compile and check both Chinese and English text. If the font is missing, check its exact name and the project's TeX Live environment, or upload a font you are licensed to use.
  4. Use renewcommand to localize default headings. The alternative ctexart class provides Chinese localization, but do not combine unrelated template preambles blindly.
chinese.tex
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{xeCJK}
\setCJKmainfont{Noto Serif CJK TC}
\renewcommand{\abstractname}{摘要}
\renewcommand{\contentsname}{目錄}
\begin{document}
\section{研究的起點}
繁體中文與 English 可以放在同一段。
\end{document}
Keep in mind

An engine error points to Compiler settings. Empty glyph boxes usually point to font coverage.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Document structure and special characters

Separate configuration from content and escape reserved characters.

  1. The preamble runs from documentclass to begin{document}. Put packages and page settings there. Place visible content inside the document environment.
  2. A blank source line begins a new paragraph. Avoid using repeated line breaks or spaces to arrange the page; use structural and layout commands.
  3. section, subsection, and subsubsection create headings. tableofcontents generates a contents list. article has no chapter command; report and book do.
  4. Escape reserved characters when they are literal text. Write 95\% and study\_id. For URLs, load hyperref and use its url command.
structure.tex
\section{Introduction}
This is the first paragraph.

This is a new paragraph. Completion: 95\%.
\subsection{Research question}
The variable is named study\_id.
\textbf{Important finding} and \emph{a key term}.
% This comment is not printed.
Keep in mind

Examples without documentclass are fragments to insert into an existing document.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Equations, alignment, and numbering

Move from inline variables to numbered, aligned equations.

  1. Load amsmath in the preamble, plus amssymb if needed. Use inline math for variables in prose rather than putting whole paragraphs into math mode.
  2. Use display math delimiters for unnumbered equations. Use equation with label for a numbered formula and eqref to refer to it later.
  3. Use align for multi-line derivations. The ampersand marks the alignment point and a double backslash starts the next row. align* suppresses numbering.
  4. Use underscore for subscripts and caret for superscripts. Group multi-character indices in braces. frac creates a fraction; text inserts prose inside math.
math.tex
% Preamble: \usepackage{amsmath,amssymb}
The sample mean is \(\bar{x}\).
\begin{equation}
\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i
\label{eq:sample-mean}
\end{equation}
See Equation~\eqref{eq:sample-mean}.
\begin{align}
a &= b+c \\
  &= d+e
\end{align}
Keep in mind

Missing $ inserted often means a subscript or superscript appeared outside math mode.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Figures and floating placement

Give figures captions, labels, and robust references.

  1. Upload an image such as figures/workflow.png and load graphicx. Clear filenames and exact capitalization prevent path errors.
  2. includegraphics inserts the image; the figure environment adds floating placement and a caption. A width relative to linewidth adapts to the current layout.
  3. Place label after caption so the correct figure number is captured. Refer to the image with ref instead of typing its number manually.
  4. The htbp options are placement suggestions, not guarantees. Let the engine arrange floats, then check proximity to the first in-text reference.
figures.tex
% Preamble: \usepackage{graphicx}
% Upload figures/workflow.png before compiling.
\begin{figure}[htbp]
  \centering
  \includegraphics[width=0.8\linewidth]{figures/workflow.png}
  \caption{Research workflow}
  \label{fig:workflow}
\end{figure}
Figure~\ref{fig:workflow} summarizes the workflow.
Keep in mind

Check path and case for missing files. Reduce width if an image exceeds the page.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Publication tables

Use booktabs for clear tables and choose the right layout for long data.

  1. Load booktabs for top, middle, and bottom rules. In tabular, l, c, and r control alignment. Ampersands separate columns; double backslashes end rows.
  2. table is a floating container; tabular is the grid. Add caption and label, placing the caption as required by your venue.
  3. Escape special characters in cell contents. Our table generator converts tab-separated spreadsheet data, but you should still check units and numeric precision.
  4. For wrapped text, consider p columns or tabularx. For multipage tables, consider longtable outside a table float. Avoid shrinking text until it becomes unreadable.
tables.tex
% Preamble: \usepackage{booktabs}
\begin{table}[htbp]
\centering
\caption{Illustrative results}
\label{tab:results}
\begin{tabular}{lrr}
\toprule
Group & N & Mean \\
\midrule
Control & 30 & 4.25 \\
Treatment & 32 & 5.81 \\
\bottomrule
\end{tabular}
\end{table}
Keep in mind

Extra alignment tab often means the number of column separators does not match the declared columns.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Bibliographies with biblatex

Manage citation keys and a reference list from a .bib database.

  1. Create references.bib with an article entry. Each citation key must be unique and exactly match the key in the manuscript. Separate authors with and.
  2. For a new general report, use biblatex with biber, addbibresource in the preamble, parencite or textcite in the body, and printbibliography at the end.
  3. If a journal template already uses natbib and the BibTeX workflow, keep that configuration. Mixing it with biblatex can cause conflicts.
  4. For missing citations, check the key, filename, braces, and commas, then recompile. Entries in the database are not necessarily printed unless cited.
references.tex
% Preamble
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}
% In the document
An example citation \parencite{demo2026}.
\textcite{demo2026} provides an illustrative example.
% Before \end{document}
\printbibliography
Keep in mind

demo2026 in the starter is fictional teaching data. Replace it with verified real sources before submission.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Cross-references, links, and lists

Keep references correct as the document evolves.

  1. Use labels for sections, figures, tables, and equations. Prefix keys with sec:, fig:, tab:, or eq: to make their purpose clear and avoid duplicates.
  2. Put a section label after the heading, and figure or table labels after captions. hyperref makes references and contents entries clickable in the PDF.
  3. Use itemize for bullets and enumerate for numbered lists, with an item command for each entry. Keep nested lists shallow.
  4. Use href for linked display text and url to print an address. The url command handles URL characters more reliably than manual escaping.
cross-references.tex
% Preamble: \usepackage[hidelinks]{hyperref}
\section{Methods}\label{sec:methods}
See Section~\ref{sec:methods}.
\begin{enumerate}
  \item Define the question.
  \item Collect evidence.
  \item Report the limitations.
\end{enumerate}
\href{https://research.sectools.tw}{Research Toolkit}
Keep in mind

References can need another compilation. Persistent question marks suggest missing or mismatched labels.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Organizing a thesis across files

Split a long manuscript into manageable chapter files.

  1. Start with the institution or journal's original template and confirm its version and compiler. Our starter is a general report, not an approved thesis format.
  2. Keep the preamble, chapter order, and bibliography in main.tex. Put chapter text in separate files without repeating documentclass or the document environment.
  3. Use input for simple inclusion. include introduces page breaks and other behavior useful in some chapter-based workflows. Keep figures and references organized.
  4. Check the configured main document. Editing a child file while compiling a different root can make the PDF appear out of sync.
thesis.tex
% Inside main.tex's document environment:
\input{chapters/introduction}
\input{chapters/methods}
\input{chapters/results}
\input{chapters/discussion}
% chapters/introduction.tex starts with:
% \section{Introduction}
% Your introduction text...
Keep in mind

Follow formal formatting rules rather than shrinking type or margins to hit a page count.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Collaboration and backups

Keep collaboration deliberate and preserve recoverable milestones.

  1. Check recipients and access levels before sharing. Do not place restricted research data behind an unnecessarily public link. Review collaborators periodically.
  2. Agree on file ownership and naming conventions for citation keys, figures, and abbreviations before simultaneous editing.
  3. Record why a change was made. History, track changes, and collaboration limits can depend on the account plan; check the current official documentation and your account.
  4. At milestones, download both source ZIP and PDF. Use dated version names and keep a separate backup outside the project.
Keep in mind

This guide does not assume a paid subscription or access to every collaboration feature.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Debugging common errors

Fix the first error before chasing the errors it causes.

  1. Open the compile log and find the first error and its line number. Later errors can be consequences of one missing brace. Fix the earliest cause and compile again.
  2. Undefined control sequence suggests a misspelled command or missing package. Missing $ inserted can indicate a subscript outside math. Runaway argument often points to unmatched braces.
  3. For missing files, check exact paths and case. For undefined citations, check the key and bibliography setup. For fontspec engine errors, select XeLaTeX.
  4. Overfull hbox is often a width warning rather than a fatal error. Inspect long URLs, unbreakable words, tables, and figures instead of hiding the warning.
  5. Comment out recent changes and add them back gradually. Reproduce the problem in a minimal working document before adding more packages.
Keep in mind

Back up before major edits and avoid replacing the entire preamble with an unrelated online snippet.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Exporting and submission checks

A successful compile is the beginning of your final review.

  1. Recompile cleanly and resolve missing references, images, and fatal errors. Download the PDF and read the full file, not just the current preview page.
  2. Check authors, affiliations, abstract, keywords, headings, pagination, captions, units, precision, and bibliography. Ensure each figure and table is discussed in the text.
  3. Check current venue requirements for layout, anonymity, supplementary files, and upload sizes. Submission rules can change.
  4. Archive all source files and the exact submitted PDF. Preserve a dated record so later revisions can be compared against what reviewers received.
Keep in mind

Generated formatting is a starting point; the venue's official requirements remain authoritative.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

A downloadable bilingual report starter

Start with two files: main.tex and references.bib.

  1. Create a blank project and select XeLaTeX. Replace main.tex with this starter.
  2. Create references.bib in the same directory and paste the second example. Its filename must match addbibresource.
  3. Compile and check the title, abstract, contents, equation, table, and bibliography. Both the table values and the demo2026 source are fictional teaching examples.
  4. Replace the sample content and references gradually. If moving to an institutional template, transfer content without overwriting its class or preamble.
main.tex
% Compile with XeLaTeX. Save as main.tex.
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{xeCJK}
\setCJKmainfont{Noto Serif CJK TC}
\usepackage[margin=2.5cm]{geometry}
\usepackage{amsmath,amssymb,graphicx,booktabs}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}
\usepackage[hidelinks]{hyperref}
\renewcommand{\contentsname}{目錄}
\renewcommand{\abstractname}{摘要}
\renewcommand{\figurename}{圖}
\renewcommand{\tablename}{表}
\title{我的第一份研究報告}
\author{研究者姓名}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
這裡依序交代研究背景、問題、方法、結果與意義。
\end{abstract}
\tableofcontents
\newpage
\section{緒論}
寫下你想回答的研究問題。參考文獻示例:\parencite{demo2026}。
\section{研究方法}
交代資料來源、研究對象、程序與分析方法。
\begin{equation}
\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i
\label{eq:mean}
\end{equation}
式~\ref{eq:mean} 定義樣本平均數。
\section{研究結果}
\begin{table}[htbp]
\centering
\begin{tabular}{lrr}
\toprule
組別 & 樣本數 & 平均數 \\
\midrule
對照組 & 30 & 4.25 \\
實驗組 & 32 & 5.81 \\
\bottomrule
\end{tabular}
\caption{示範資料,非真實研究結果}
\label{tab:demo}
\end{table}
\section{討論與結論}
說明主要發現、研究限制與後續方向。
\printbibliography[title={參考文獻}]
\end{document}
references.bib
% Fictional entry for learning only. Replace before submission.
@article{demo2026,
  author = {Chen, Example and Lin, Demo},
  title = {A Fictional Study for Learning LaTeX},
  journal = {Demonstration Journal},
  year = {2026},
  volume = {1},
  pages = {1--10}
}
Keep in mind

This is a general report starter, not an institution- or journal-approved template.

Read the official Overleaf documentation

OVERLEAF FIELD GUIDE

Build a repeatable research workflow

Connect your literature matrix, bibliography, tables, and final PDF.

  1. Capture a paper's question, method, findings, and limitations in the literature matrix. Keep source links and distinguish your interpretation from the authors' claims.
  2. Build .bib entries from verified metadata and keep stable citation keys. Formatting can then change without rewriting citations throughout the manuscript.
  3. Convert spreadsheet data with the LaTeX table generator, then check captions, alignment, units, and precision against your analysis and venue requirements.
  4. Export important data and back up at the end of a session. After a writing milestone, take a quiet break in the café. Use tools to reduce repetition while keeping research judgment with you.
Keep in mind

Research Toolkit processes inputs locally. Content you choose to upload to Overleaf is governed by Overleaf's service and privacy policies.

Read the official Overleaf documentation

A little progress is still progress.

Save your work. Then give your next idea a little room to arrive.

Take a café break