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 ✅⚠️❌.
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
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.
- Refer to the individual articles in this series for details on each feature. ↩
Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.