Skip to content

Mermaid diagrams

A note with latex-env: mermaid and a caption: holds one ```mermaid block: Obsidian renders it live, the export rasterises it into a numbered figure. w: scales the figure in the PDF, scale: controls render resolution. Identical diagrams are cached across the document.

Open PDF

Source notes

---
title: "Feature: Mermaid"
author: MrIwan
notitlepage: true
toc: false
---

# Mermaid

![[mermaid-example]]

As shown in [[mermaid-example]], you can reference Mermaid environments.
---
latex-env: mermaid
caption: The example representation from the Mermaid documentation
w: 60%
scale: "3"
---

```mermaid
erDiagram
    CUSTOMER ||--|| ANALYSE : ""
    SERVICE ||--|| ANALYSE : ""
    ANALYSE {
        dim DATATYPE
        dim COMPANY
        dim BRAND
        dim INITIATIVE
        dim MONTH
        dim MONTH_INFLOW
        dim OFFSET
        dim PRODUCT
        dim CHOHORT_MEASURE
    }
    CUSTOMER {
        dim DATATYPE
        dim INITIATIVE
        dim MONTH
        dim MONTH_INFLOW
        dim OFFSET
        dim CHOHORT_MEASURE
    }
    SERVICE {
        dim DATATYPE
        dim COMPANY
        dim BRAND
        dim INITIATIVE
        dim MONTH
        dim MONTH_INFLOW
        dim OFFSET
        dim PRODUCT
        dim CHOHORT_MEASURE
    }
```