LaTeX basics in Typeward
This tutorial takes you from a starter template to an article with sections, math, a figure, a table, and working cross-references, in about 30 minutes. It begins where Your first project ended, and it assumes Typeward is installed and assumes no LaTeX experience. For Typst projects, see Typst projects.
Create the practice project
Section titled “Create the practice project”Everything in this tutorial happens in one project, created from a built-in template.
- Press
Ctrl+N(Cmd+Non macOS) to open the New project dialog. - In the Or start from: strip, select Template.
- In the Pick a template dialog, select Basic article.
- Type a name for the project, then fill in Title and Author.
- Select Create.
The project opens with main.tex active. Press Ctrl+S (Cmd+S on macOS), which runs Save and compile, and the preview pane renders a one-page article. That is the loop for the whole tutorial: edit, press Ctrl+S, read the preview pane.
If instead the compile fails, the engine is the first thing to settle. See Choosing a compile engine.
Find the preamble and the body
Section titled “Find the preamble and the body”main.tex has two parts, and one line divides them:
\documentclass[11pt]{article} % preamble: what kind of document\usepackage{graphicx} % preamble: load capabilities% ...
\begin{document} % body starts\maketitleWelcome to your new article.\end{document} % body endsEverything before \begin{document} is the preamble. It holds the document class, the \usepackage lines, and the \title, \author, and \date declarations that \maketitle turns into the heading block.
Everything between \begin{document} and \end{document} is the body, the only part that produces pages. Text after a percent sign (%) is a comment, which LaTeX never prints.
Add sections and a table of contents
Section titled “Add sections and a table of contents”The template body already contains \section{Introduction} through \section{Discussion}.
- Under the introduction, add
\subsection{Background}. - Press
Ctrl+S. LaTeX numbers the headings for you. - On its own line after
\maketitle, add\tableofcontents. - Press
Ctrl+Sagain. The table of contents lists every heading.
In the sidebar, the Outline section under the tabs mirrors the heading tree, and selecting an entry jumps to it.
LaTeX builds the table of contents from the previous compile’s data, so it can need an extra pass. Typeward’s default build recipe reruns LaTeX automatically until the document settles.
Format text
Section titled “Format text”- Select a word in the source pane, then press
Ctrl+B(Cmd+Bon macOS). The source becomes\textbf{word}. - Select another word, then press
Ctrl+I(Cmd+Ion macOS). Typeward wraps it in\textit{...}.
Both actions also sit in the format toolbar under the file tabs, next to the list, math, figure, and table inserts.
Add lists
Section titled “Add lists”Lists are environments you write yourself. Add both of these to the body:
\begin{itemize} \item A bulleted point \item Another one\end{itemize}
\begin{enumerate} \item Numbered step one \item Step two\end{enumerate}Press Ctrl+S. The preview pane shows one bulleted list and one numbered list.
Write math
Section titled “Write math”Inline math goes between dollar signs ($), as in The area is $A = \pi r^2$.
For displayed, numbered math, use the equation environment. The template preloads amsmath, so the environment needs no extra setup, and the format toolbar’s Equation button inserts an empty one.
\begin{equation} \int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2} \label{eq:gauss}\end{equation}Math-only characters such as the underscore (_) and the caret (^) must stay inside math mode. In plain text they produce the Missing $ inserted error.
Add labels and cross-references
Section titled “Add labels and cross-references”The \label{eq:gauss} line in the preceding equation is an anchor. Refer to it anywhere with Equation~\eqref{eq:gauss}. Sections, figures, and tables use \ref{...} instead, with the \label placed after the \caption or \section it names. The template loads hyperref, so every reference becomes a clickable link in the PDF.
If instead a reference prints as ??, it points at a label that does not exist. Check the spelling, then press Ctrl+S again. Typeward reruns LaTeX here too, the same as for the table of contents.
Add a figure
Section titled “Add a figure”The template preloads graphicx, which provides \includegraphics. To bring an image into the project, right-click the file tree in the Files tab and select Add files here…. The format toolbar’s Figure button inserts the skeleton with empty slots. Filled in, it looks like this:
\begin{figure}[h] \centering \includegraphics[width=0.8\linewidth]{results-plot.png} \caption{Yield against reaction temperature.} \label{fig:results}\end{figure}Add a table
Section titled “Add a table”A table combines a table float with a tabular grid. The column spec lrr means one left-aligned column and two right-aligned ones. An ampersand (&) separates cells, and \\ ends a row.
\begin{table}[ht] \centering \begin{tabular}{lrr} Item & Quantity & Price \\ \hline Apples & 3 & 1.20 \\ Pears & 2 & 0.95 \\ \end{tabular} \caption{A minimal table.} \label{tab:fruit}\end{table}The bracketed placement hint is only a suggestion. [h] asks for here if possible, and [ht] also allows the top of a page. Floats move, and that is expected behavior. A \ref{tab:fruit} reference follows the float wherever it lands.
Load a package
Section titled “Load a package”Anything LaTeX cannot do on its own arrives through a \usepackage line in the preamble. The template already loads amsmath, graphicx, and hyperref.
- In the preamble, add
\usepackage{booktabs}. - In the table, swap
\hlinefor\topruleand\bottomrule. - Press
Ctrl+S. The table rules redraw in the booktabs style.
If instead the compile stops with File 'something.sty' not found, the package is missing from your TeX distribution. See Compiling LaTeX and reading errors for the per-distribution fix.
Break the document and read the error
Section titled “Break the document and read the error”This section breaks the document on purpose, so that the first real error is familiar.
- In
main.tex, change\textbfto\texbf. - Press
Ctrl+S.
The compile fails with Undefined control sequence, and the preview pane keeps showing the last good PDF under a Preview is stale ribbon.
Open the logs panel, which sits in a tab next to the preview pane by default. The Errors tab lists each parsed error as a card, and All logs holds the raw output.
LaTeX errors cascade, so fix the first line starting with an exclamation mark (!) and compile again before working through the rest. Two steps put this project back on a clean compile:
- In
main.tex, change\texbfback to\textbf. - Press
Ctrl+S. The preview pane renders the article again, with no stale ribbon.
Next steps
Section titled “Next steps”- Compiling LaTeX and reading errors: common errors decoded, plus SyncTeX jumping between the source pane and the preview pane.
- How references work: where a
\citekey comes from, and how the entries reach your document. - Visual editing for LaTeX: a word-processor-style view over the same
.texsource. - Overleaf Learn: the fuller treatment of what this tutorial compressed, in the same LaTeX that Typeward compiles.