p
pintorita
@previewPackage to draw Sequence Diagrams, Entity Relationship Diagrams, Component Diagrams, Activity Diagrams, Mind Maps, Gantt Diagrams, and DOT Diagrams based on Pintora which is heavily influenced by mermaid.js and plantuml.
v0.1.4
MIT
Pintorita - Pintora plugin for typst
Typst package for drawing the following from markup:
- Sequence Diagram
- Entity Relationship Diagram
- Component Diagram
- Activity Diagram
- Mind Map Experiment
- Gantt Diagram Experiment
- DOT Diagram Experiment
#import "@preview/pintorita:0.1.4"
#set page(height: auto, width: auto, fill: black, margin: 2em)
#set text(fill: white)
#show raw.where(lang: "pintora"): it => pintorita.render(it.text)
= pintora
Typst just got a load of diagrams.
```pintora
mindmap
@param layoutDirection TB
+ UML Diagrams
++ Behavior Diagrams
+++ Sequence Diagram
+++ State Diagram
+++ Activity Diagram
++ Structural Diagrams
+++ Class Diagram
+++ Component Diagram
```
```
mindmap
@param layoutDirection TB
+ UML Diagrams
++ Behavior Diagrams
+++ Sequence Diagram
+++ State Diagram
+++ Activity Diagram
++ Structural Diagrams
+++ Class Diagram
+++ Component Diagram
```
Documentation
render
Render a pintora string to an image
Arguments
src:str- pintora source stringfactor: scale output svg, "factor:0.5" will scale images down by half, so scale can be consistent across renders.style:strdiagram style,defaultordarkorlarkLightorlarkDarkfont:strfont family, default isSource Code Pro, sans-serif- All other arguments are passed to
image.decodeso you can customize the image size
Returns
The image, of type content
render-svg
Render a pintora string to an image
Arguments
src:str- pintora source stringstyle:strdiagram style,defaultordarkorlarkLightorlarkDarkfont:strfont family, default isSource Code Pro, sans-serif- All other arguments are passed to
image.decodeso you can customize the image size
Returns
The svg image
History
- 0.1.0 - Inital Release
- 0.1.1 - Updated to Jogs 0.2.3 and pintora 0.7.3
- 0.1.2 - Fixed strange offset of text rows in class diagram, added
render-svgfunction and more customization options - 0.1.3 - Bug Fixes for argument handling.
- 0.1.4 - Updated to Jogs 0.2.4 and pintora 0.7.5.