LaTex2Web logo

Documents Live, a web authoring and publishing system

If you see this, something is wrong

Table of contents

First published on Wednesday, Sep 24, 2025 and last modified on Sunday, Feb 22, 2026 by François Chaplais.

Mermaid charts

François Chaplais

1 Introduction

2 Themeing and styling

3 Styling

4 Syntax

\begin{mermaid}[base]\label{styled-diagram}
\caption{The same diagram with custom colors, font and font size.}
\mermaidStyle{primaryColor=red secondaryColor=greenyellow fontFamily=verdana fontSize=20 secondaryTextColor=white textColor=white lineColor=blue}
flowchart TD
 A[Start] --> B{Is it?}
 B -->|Yes| C[OK]
 C --> D[Rethink]
 D --> B
 B ---->|No| E[End]
\end{mermaid}
flowchart TD
 A[Start] --> B{Is it?}
 B -->|Yes| C[OK]
 C --> D[Rethink]
 D --> B
 B ---->|No| E[End]
\begin{mermaid}
... mermaid code ...
\end{mermaid}

5 Diagram types and examples