Folioby Interconnected
Log InSign Up

Folio LaTeX Reference: A Complete Guide to Commands, Environments, and Syntax

A single-page overview of Folio's LaTeX syntax. A quick reference covering text formatting, math, theorem environments, code blocks, diagrams, and cross-references, with support status shown as ✅⚠️❌.

FO
Folio Official
March 3, 2026

1. How to Use This Article

This article provides a single-page overview of Folio's LaTeX syntax. The support status of each command and environment is indicated by the following symbols:

✅
Fully supported — works the same as standard LaTeX
⚠️
Partially supported — with restrictions or custom behavior
❌
Not supported — ignored or unavailable

How to use:

  • Jump to sections from the table of contents to find the commands you need

  • Follow the links at the end of each section for detailed explanations

Remark 1.
This article is linked to the individual articles in the "Folio Basics" series. Use the links at the end of each section to access detailed guides.

2. Document Structure

Command/Feature Status Description
\documentclass ⚠️ Can be written but is ignored
\usepackage ⚠️ Can be written but is ignored
\begin{document} ⚠️ Can be written but is ignored
Preamble ⚠️ \newcommand etc. are processed
\section, \subsection etc. ✅ Six levels of headings
\section* ✅ Unnumbered headings
\tableofcontents ❌ Auto-generated by Folio
\title, \author, \date ❌ Ignored
\maketitle ❌ Ignored

Details → Part 1: Folio LaTeX Basics

3. Text Formatting

Command Status Effect
\textbf{...} ✅ Bold
\textit{...} ✅ Italic
\emph{...} ✅ Emphasis
\underline{...} ✅ Underline
\texttt{...} ✅ Monospace
\textsc{...} ✅ Small Caps
\textrm{...} ✅ Roman
\textsf{...} ✅ Sans-serif
\textsl{...} ✅ Slanted
\verb\...\|| ✅ Inline code
\fbox{...} ✅ Boxed text

Details → Part 1: Folio LaTeX Basics

4. Special Characters

Input Status Output
\%, \$, \&, \#, \_ ✅ Escape characters
\{, \} ✅ Curly braces
\textbackslash ✅ Backslash
--, --- ✅ En/em dashes
~ ✅ Non-breaking space
Accents (\', \", etc.) ✅ Various accent marks

Details → Part 1: Folio LaTeX Basics

5. Math Environments

Environment/Syntax Status Description
$...$ ✅ Inline math
$$...$$ ✅ Display math
equation / equation* ✅ Numbered/unnumbered single equation
align / align* ✅ Aligned equations
gather / gather* ✅ Centered equations
multline / multline* ✅ Multi-line equations
split ✅ Nested alignment
aligned ✅ Inline alignment
cases ✅ Piecewise definitions
matrix, pmatrix, bmatrix, etc. ✅ Matrices
smallmatrix ✅ Inline matrices
array ✅ General arrays
subequations ✅ Equation grouping

All math commands supported by KaTeX are available: Greek letters, operators, relations, big operators, decorations, fractions, roots, delimiter sizing, math fonts (\mathbb, \mathcal, \mathfrak, etc.).

Details → Part 2: Writing Math

6. Theorem Environments

Environment Status Body Style Numbering
theorem ✅ Italic Yes
lemma ✅ Italic Yes
proposition ✅ Italic Yes
corollary ✅ Italic Yes
claim ✅ Italic Yes
fact ✅ Italic Yes
hypothesis ✅ Italic Yes
definition ✅ Roman Yes
example ✅ Roman Yes
remark ✅ Roman Yes
note ✅ Roman Yes
exercise ✅ Roman Yes
problem ✅ Roman Yes
assumption ✅ Roman Yes
observation ✅ Roman Yes
question ✅ Roman Yes
solution ✅ Roman Yes
answer ✅ Roman Yes
proof ✅ Roman No

All environments support the [name] argument and \label. No \newtheorem required.

Details → Part 3: Mastering Theorem Environments

7. Code Blocks

Environment Status Description
lstlisting ✅ Specify language with [language=...]
minted ✅ Specify language with {language}
code ✅ Simple code block
verbatim ✅ Verbatim output (no highlighting)
\verb\...\|| ✅ Inline code

Supported languages: Python, JavaScript, TypeScript, Java, C, C++, Bash, JSON, LaTeX, Markdown, and more.

Details → Part 4: Code Blocks and Algorithms

8. Algorithms

Environment/Command Status Description
algorithm ✅ Container with caption
algorithmic ✅ Pseudocode body
\Function, \EndFunction ✅ Function definition
\If, \ElsIf, \Else, \EndIf ✅ Conditionals
\For, \While, \Repeat ✅ Loops
\State, \Return ✅ Statements / return
\Call ✅ Function calls
\Require, \Ensure ✅ Pre/postconditions
\Comment ✅ Comments

Details → Part 4: Code Blocks and Algorithms

9. Diagrams

Environment Status Description
mermaid ✅ Flowcharts, sequence diagrams, etc.
tikzgraph ✅ Graph theory graph drawing
tikzcd ✅ Commutative diagrams (category theory)
\includegraphics ⚠️ Works if you specify a URL directly
TikZ (other) ❌ Only tikzgraph and tikzcd are supported

Details → Part 5: Diagrams and Tables

10. Tables

Environment Status Description
tabular ✅ Basic tables
tabular*, tabularx ✅ Width-adjusted tables
longtable ✅ Long tables
table ✅ Float (with caption)
figure ✅ Float (with caption)
\caption ✅ Caption
\centering ✅ Center alignment
\hline ✅ Horizontal rule

Details → Part 5: Diagrams and Tables

11. Cross-References and Links

Command Status Description
\label{...} ✅ Define a label
\ref{...} ✅ Reference (number only)
\eqref{...} ✅ Equation reference (with parentheses)
\cref{...} ✅ Smart reference (with name)
\url{...} ✅ Display URL
\href{URL}{text} ✅ Hyperlink with text
\footnote{...} ✅ Footnote (auto-numbered)
\cite{...} ✅ Citation (register references in dashboard)
\citep{...}, \citet{...} ✅ Parenthetical/textual citation

Details → Part 6: Cross-References, Links, and Custom Commands

12. Custom Commands

Register commands in the Settings preamble editor, and they automatically apply to all your articles.

Command Status Description
\newcommand ✅ Macro definition (with arguments)
\renewcommand ✅ Macro redefinition
\DeclareMathOperator ✅ Math operator definition
\def ✅ Simple macro
\newenvironment ✅ Environment definition

Details → Part 6: Cross-References, Links, and Custom Commands

13. Lists

Environment Status Description
itemize ✅ Bullet list
enumerate ✅ Numbered list
description ✅ Description list
Nested lists ✅ Nesting supported

Details → Part 6: Cross-References, Links, and Custom Commands

14. Unsupported Features

The following features are not available or are ignored in Folio:

Feature Status Notes
TikZ (other than tikzgraph, tikzcd) ❌ Use mermaid as alternative
Beamer ❌ —
Font size changes ❌ —
Page layout ❌ Folio's layout is applied
\tableofcontents ❌ Auto-generated by Folio
\title, \author, \date ❌ Ignored

15. Quick-Start Template

Below is a basic template for writing articles on Folio. Since \newcommand and other macro definitions can be registered in the Settings preamble editor and applied to all articles, you can start writing directly from \section:

\section{Introduction}

In this article, we explain...

\section{Definitions and Basic Properties}

\begin{definition}[...]
...
\end{definition}

\begin{theorem}[...]
\label{thm:main}
...
\end{theorem}

\begin{proof}
...
\end{proof}

By Theorem \ref{thm:main}, ...

\section{Examples}

\begin{example}
For $f(x) = x^2$, ...
\end{example}

\begin{mermaid}
graph TD
    A --> B --> C
\end{mermaid}

\section{Conclusion}

...

Use this template as a starting point, adding environments and commands as needed1.


  1. Refer to the individual articles in this series for details on each feature. ↩
LaTeXFolioTutorialReferenceCommands
FO
Folio Official

Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.

1 followers·107 articles
Folio BasicsPart 1 of 8
No previous article
Next
Folio LaTeX Basics — Differences from Standard LaTeX and Getting Started

Share your expertise with the world

Write articles with LaTeX support, build your audience, and earn from your knowledge.

Start Writing — It's Free

More from Folio Official

Folio Official·March 3, 2026

Mastering Theorem Environments — theorem, definition, proof, and Friends

A complete guide to Folio's 18+ built-in theorem environments. Covers theorem, definition, proof, lemma, corollary, example, remark, and more — usage, numbering, named arguments, and italic/roman styles explained.

LaTeXFolioTutorial
1
Folio Official·March 3, 2026

Writing Math — Every Notation Available in KaTeX

A comprehensive guide to Folio's math environments. Covers inline math, equation, align, gather, cases, matrix, and \newcommand — every KaTeX-based math notation explained.

LaTeXFolioTutorial
Folio Official·March 3, 2026

Diagrams and Tables — mermaid, tikzgraph, tikzcd, tabular

A complete guide to diagrams and tables on Folio. Covers mermaid flowcharts and sequence diagrams, tikzgraph for graph drawing, tikzcd for commutative diagrams, tabular for tables, figure/table environments, and includegraphics.

LaTeXFolioTutorial
Folio Official·March 3, 2026

Folio LaTeX Basics — Differences from Standard LaTeX and Getting Started

A LaTeX introduction for writing articles on Folio. Covers the preamble-free system, section structure, text formatting, special character escaping, and a list of unsupported features, focusing on differences from standard LaTeX.

LaTeXFolioTutorial