Folioby Interconnected
Log InSign Up

Cross-References, Links, and Custom Commands — label, ref, url, newcommand

A complete guide to cross-references and links on Folio. Covers \label/\ref for theorem and equation references, \url/\href for links, \footnote for footnotes, \newcommand for macros, and list environments in detail.

FO
Folio Official
March 3, 2026

1. Labels and Cross-References

Use \label and \ref to reference elements within an article.

1.1. Referencing Theorem Environments

Theorem 1 (Intermediate Value Theorem).
If f is continuous on [a,b] and f(a)<0<f(b), then there exists c∈(a,b) such that f(c)=0.
Corollary 2.
As a direct consequence of Theorem 1, every odd-degree polynomial has at least one real root.
\begin{theorem}[Intermediate Value Theorem]
\label{thm:ivt}
...
\end{theorem}

By Theorem \ref{thm:ivt}...

1.2. Referencing Equations

Label an equation environment and reference it with \eqref:

\begin{equation}
\label{eq:euler}
e^{i\theta} = \cos\theta + i\sin\theta
\end{equation}

Equation \eqref{eq:euler} is known as Euler's formula.

Result:

eiθ=cosθ+isinθ
(1)

Equation (1) is known as Euler's formula. Substituting θ=π yields Euler's identity eiπ+1=0.

1.3. Referencing Figures and Tables

\begin{figure}
\centering
\begin{mermaid}
graph LR
    A["label"] --> B["ref"]
    A --> C["eqref"]
    A --> D["cref"]
\end{mermaid}
\caption{Folio's cross-reference commands}
\label{fig:ref-commands}
\end{figure}

Figure \ref{fig:ref-commands} shows the cross-reference commands.

Result:

graph LR
    A["label"] --> B["ref"]
    A --> C["eqref"]
    A --> D["cref"]
Figure 1: Folio's cross-reference commands

Figure 1 shows the cross-reference commands.

1.4. \cref Command

\cref automatically detects the type of referenced element (theorem, equation, figure, etc.) and prepends the name:

\cref{thm:ivt}    % → "Theorem 1" etc.
\cref{eq:euler}    % → "Equation (1)" etc.

2. Links

2.1. URL Links

\url displays the URL as-is and makes it a hyperlink:

\url{https://interconnectd.app}

Result: https://interconnectd.app

2.2. Text Links

\href customizes the link text:

\href{https://interconnectd.app}{Folio's Website}

Result: Folio's Website

2.3. Inter-Article Links

To link to another Folio article, use the article's URL path:

\href{/articles/articleId}{Article Title}

Note 1.
Paths starting with /articles/ are recognized as internal links and navigate via SPA transitions.

3. Footnotes

Create footnotes with \footnote:

Euler\footnote{Leonhard Euler, 1707--1783} was a Swiss mathematician.

Result: Euler1 was a Swiss mathematician.

Footnotes are automatically numbered and collected at the bottom of the article. Math can be used inside:

The Gaussian integral2 is an important definite integral.

4. Citations

On Folio, register references in the dashboard, and they appear in \cite{} autocomplete across all articles. While BibTeX files are not used, the \cite, \citep, and \citet commands work as expected.

\cite{einstein1905}          % → [1] or (Einstein, 1905) etc.
\citep{knuth1997}            % → Parenthetical citation
\citet{dijkstra1959}         % → Textual citation

Citation style (numeric / author-year / alpha) can be selected in Settings. The reference list is auto-generated at the end of the article.

5. Custom Commands in Detail

On Folio, registering \newcommand and other macro definitions in the Settings preamble editor applies them to all articles automatically. No per-article preamble needed. Of course, commands used only in a specific article can be written directly in that article.

5.1. Basic \newcommand

% No arguments
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}

% One argument
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\norm}[1]{\left\| #1 \right\|}

% Two arguments
\newcommand{\inner}[2]{\left\langle #1, #2 \right\rangle}
\newcommand{\set}[2]{\left\{ #1 \mid #2 \right\}}

After registration, \abs{x} expands to ∣x∣, and \set{x \in \mathbb{R}}{\abs{x} < 1} expands to {x∈R∣∣x∣<1}.

5.2. \DeclareMathOperator

Define standard mathematical function names:

\DeclareMathOperator{\tr}{tr}       % Trace
\DeclareMathOperator{\rank}{rank}   % Rank
\DeclareMathOperator{\Hom}{Hom}     % Homomorphism set
\DeclareMathOperator{\End}{End}     % Endomorphisms
\DeclareMathOperator{\Aut}{Aut}     % Automorphisms
\DeclareMathOperator{\Im}{Im}       % Image
\DeclareMathOperator{\Ker}{Ker}     % Kernel

This gives proper roman font: Hom(G,H) and Aut(G).

5.3. \def Command

For simple macros, \def also works:

\def\eps{\varepsilon}

After registration, \eps expands to ε. Example: For any ε>0...

6. List Environments in Detail

6.1. Nested Lists

Lists can be nested:

\begin{enumerate}
\item Group theory fundamentals
  \begin{itemize}
  \item Group axioms
  \item Subgroups
  \item Normal subgroups
  \end{itemize}
\item Linear algebra fundamentals
  \begin{itemize}
  \item Vector spaces
  \item Linear maps
  \item Eigenvalues and eigenvectors
  \end{itemize}
\end{enumerate}

Result:

  1. Group theory fundamentals

    • Group axioms

    • Subgroups

    • Normal subgroups

  2. Linear algebra fundamentals

    • Vector spaces

    • Linear maps

    • Eigenvalues and eigenvectors

6.2. description Environment

An environment suited for terminology explanations:

\begin{description}
\item[\texttt{theorem}] An environment for mathematical theorems.
\item[\texttt{definition}] An environment for mathematical definitions.
\item[\texttt{proof}] An environment for proofs.
\end{description}

Result:

theorem
An environment for mathematical theorems. The body is displayed in italic.
definition
An environment for mathematical definitions. The body is displayed in roman.
proof
An environment for proofs. A QED symbol is appended automatically.

7. Alignment and Layout

7.1. centering

\begin{center}
Centered text
\end{center}
Centered text

7.2. Box Commands

Use \fbox to enclose text in a box:

\fbox{Boxed text}

Result:

Boxed text

8. Summary

In this article, we covered cross-references (\label/\ref), links (\url/\href), footnotes (\footnote), custom commands (\newcommand/\DeclareMathOperator), list environments, and layout commands on Folio.

This concludes the "Folio Basics" series. For a quick-reference overview of all features, see the "Folio LaTeX Reference" article.


  1. Leonhard Euler, 1707–1783 ↩
  2. ∫−∞∞​e−x2dx=π​also appears frequently in probability theory. ↩
LaTeXFolioTutorialCross-ReferencesLinksnewcommand
FO
Folio Official

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

1 followers·107 articles
Folio BasicsPart 7 of 8
Previous
Diagrams and Tables — mermaid, tikzgraph, tikzcd, tabular
Next
Monetizing Your Articles — How to Earn Revenue Safely with Stripe Connect

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 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 ✅⚠️❌.

LaTeXFolioTutorial