Exemplo com diagramas Mermaid JS

This commit is contained in:
Jurandy Soares 2026-03-17 16:08:53 -03:00
parent 3311fe18ef
commit 5cc7198043
6 changed files with 56 additions and 7 deletions

View File

@ -0,0 +1,20 @@
(aula:2026-03-17)=
# Aula de 17/03/2026
Diagramas com {cite:t}`mermaidjs`.
```{mermaid}
---
title: Simple sample
---
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```

View File

@ -7,6 +7,7 @@
maxdepth: 2 maxdepth: 2
caption: Sumário caption: Sumário
glob: true glob: true
reversed: true
--- ---
*/* */*

View File

@ -17,6 +17,7 @@ release = 'ANO_PERIODO'
extensions = [ extensions = [
'myst_parser', 'myst_parser',
'sphinxcontrib.bibtex', 'sphinxcontrib.bibtex',
'sphinxcontrib.mermaid',
] ]
templates_path = ['_templates'] templates_path = ['_templates']

View File

@ -1,10 +1,3 @@
@book{1987:nelson,
author = {Edward Nelson},
title = {Radically Elementary Probability Theory},
publisher = {Princeton University Press},
year = {1987}
}
@book{kurose2013redes, @book{kurose2013redes,
title={Redes de computadores e a internet: uma abordagem top-down}, title={Redes de computadores e a internet: uma abordagem top-down},
author={Kurose, J.F. and Ross, K.W.}, author={Kurose, J.F. and Ross, K.W.},
@ -13,3 +6,20 @@
publisher={Pearson} publisher={Pearson}
} }
@book{1987:nelson,
author = {Edward Nelson},
title = {Radically Elementary Probability Theory},
publisher = {Princeton University Press},
year = {1987}
}
@online{mermaidjs,
title = {Mermaid},
author = {{The Mermaid Project Contributors}},
year = {2024},
url = {https://mermaid.ai/},
urldate = {2025-03-17},
organization = {Mermaid},
note = {Página oficial da ferramenta de diagramação e gráficos a partir de texto}
}

View File

@ -10,4 +10,5 @@ dependencies = [
"sphinx>=9.1.0", "sphinx>=9.1.0",
"sphinx-autobuild>=2025.8.25", "sphinx-autobuild>=2025.8.25",
"sphinxcontrib-bibtex>=2.6.5", "sphinxcontrib-bibtex>=2.6.5",
"sphinxcontrib-mermaid>=2.0.1",
] ]

16
uv.lock
View File

@ -122,6 +122,7 @@ dependencies = [
{ name = "sphinx" }, { name = "sphinx" },
{ name = "sphinx-autobuild" }, { name = "sphinx-autobuild" },
{ name = "sphinxcontrib-bibtex" }, { name = "sphinxcontrib-bibtex" },
{ name = "sphinxcontrib-mermaid" },
] ]
[package.metadata] [package.metadata]
@ -131,6 +132,7 @@ requires-dist = [
{ name = "sphinx", specifier = ">=9.1.0" }, { name = "sphinx", specifier = ">=9.1.0" },
{ name = "sphinx-autobuild", specifier = ">=2025.8.25" }, { name = "sphinx-autobuild", specifier = ">=2025.8.25" },
{ name = "sphinxcontrib-bibtex", specifier = ">=2.6.5" }, { name = "sphinxcontrib-bibtex", specifier = ">=2.6.5" },
{ name = "sphinxcontrib-mermaid", specifier = ">=2.0.1" },
] ]
[[package]] [[package]]
@ -506,6 +508,20 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" }, { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" },
] ]
[[package]]
name = "sphinxcontrib-mermaid"
version = "2.0.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "jinja2" },
{ name = "pyyaml" },
{ name = "sphinx" },
]
sdist = { url = "https://files.pythonhosted.org/packages/2b/ae/999891de292919b66ea34f2c22fc22c9be90ab3536fbc0fca95716277351/sphinxcontrib_mermaid-2.0.1.tar.gz", hash = "sha256:a21a385a059a6cafd192aa3a586b14bf5c42721e229db67b459dc825d7f0a497", size = 19839, upload-time = "2026-03-05T14:10:41.901Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/03/46/25d64bcd7821c8d6f1080e1c43d5fcdfc442a18f759a230b5ccdc891093e/sphinxcontrib_mermaid-2.0.1-py3-none-any.whl", hash = "sha256:9dca7fbe827bad5e7e2b97c4047682cfd26e3e07398cfdc96c7a8842ae7f06e7", size = 14064, upload-time = "2026-03-05T14:10:40.533Z" },
]
[[package]] [[package]]
name = "sphinxcontrib-qthelp" name = "sphinxcontrib-qthelp"
version = "2.0.0" version = "2.0.0"