Create a LaTeX file in Coauthor, understand the document class, preamble, title block, and sections, and compile it to a PDF for the first time.

Your First LaTeX Document

LaTeX is a markup language: you write plain text with commands such as \section{...}, and a compiler turns it into a typeset PDF. In Coauthor the compiler runs in the cloud, so the whole loop is type, click Compile, read the PDF. This page walks through a minimal document from an empty file to a compiled PDF.

Create the File

  1. In the workspace panel on the left, click Create new folder and give your project a name, for example My Paper. LaTeX projects must live in a folder.
  2. Click Create new document. In the Create New Document dialog choose LaTeX Document as the type and Empty Document, enter a filename such as main.tex, pick your folder, and click Create Document.
  3. Hover over the new file in the folder, click More options, and choose Set as main. A main badge appears next to it. See LaTeX Main Files.

If you would rather start from a working paper, pick From Template instead; see Using Templates.

The Minimal Document

Type or paste this into main.tex:

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}

\title{A Short Study of Something}
\author{Your Name}
\date{\today}

\begin{document}

\maketitle

\begin{abstract}
One paragraph summarizing the work.
\end{abstract}

\section{Introduction}
This is the first paragraph. Blank lines separate paragraphs;
single line breaks do not.

\section{Method}
Text can be \textbf{bold}, \textit{italic}, or \emph{emphasized}.

\end{document}

Tip: in the editor, type \documentclass{ and pick article from the autocomplete popup. On an empty line this inserts a complete skeleton very similar to the one above. See Autocomplete, Snippets, and Find & Replace.

What Each Part Does

PartPurpose
\documentclass[12pt]{article}Chooses the overall layout. article is right for papers; report and book add chapters. Options in [...] set things like font size or two-column layout
Preamble (everything before \begin{document})Loads packages with \usepackage and sets metadata. Nothing here appears in the PDF directly
\title, \author, \dateStore the title block; \maketitle prints it
\begin{document} ... \end{document}The body. Everything you want printed goes here
\section{...}A numbered heading. Numbering, spacing, and fonts are handled for you
%Starts a comment; the rest of the line is ignored by the compiler

Every \begin{x} needs a matching \end{x}. The editor inserts the \end line automatically when you close the brace of a \begin{...}.

Compile

  1. Click Compile in the toolbar (or press Ctrl+S).
  2. Watch the button: Compiling..., then Success!.
  3. The tab switches to the PDF view. Use LaTeX+PDF in the tab bar to see source and PDF side by side.

Auto compile is on by default, so from now on the PDF refreshes a few seconds after each change. See Compiling and PDF Preview.

If the button turns into a red error count, click it to open the Compilation Results panel and jump to the offending line. The most common first-timer mistakes are a missing \end{document}, a stray %-less & or _ in text, and an unmatched {. See Fixing Common LaTeX Errors.

Special Characters

These characters have meaning in LaTeX and must be escaped to print them literally:

CharacterType
%\%
&\&
$\$
#\#
_\_
{ }\{ \}
~\textasciitilde
\\textbackslash

Quotation marks are typed as `` and '' (two backticks, two apostrophes); dashes are -, -- (ranges), and --- (punctuation).

Next Steps

Related articles

LaTeX Main Files
Compiling and PDF Preview
Document Structure: Sections, Chapters, and the Table of Contents
Packages and the Preamble
Creating Documents and Folders

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.

Ready to Write Better Research Papers?

Let Coauthor help you with your next manuscript

7 days free, with €2.50 of AI usage on your own paper