Über dieses Paket#
Eine Mindmap, wie sie an der Tafel entsteht: ein Begriff in der Mitte, die Oberbegriffe rechts und links daneben, dahinter die Beispiele. brainroot setzt so eine Karte aus einer verschachtelten Liste. Jeder Ast bekommt eine Farbe, die er bis in seine Blätter weitergibt; die Kästen sind in einem helleren Ton derselben Farbe gefüllt, die Verbindungen laufen als weiche Kurven.
Das Paket basiert auf CeTZ. Die Kästen werden gemessen, deshalb passen sie sich der Schrift des umgebenden Dokuments an.
Schnellstart#
#import "@preview/brainroot:0.2.0": brainroot, branchDie einfachste Eingabe ist eine Liste: jeder Punkt wird zu einem Knoten, eingerückte Punkte zu seinen Kindern.
#brainroot(title: [Energiearten])[
- Bewegungsenergie
- Kinetische Energie
- Windenergie
- Spannenergie
- Dehnungsenergie
- Wärmeenergie
- Feuerenergie
- Höhenenergie
- Schwerkraftenergie
- Gewichtenergie
]Drei Zeichen in der Liste tragen Knotenoptionen: ein Typst-Label <name> am Ende gibt dem Knoten seine id für Querverbindungen, ein Punkt, der nur aus *Fettschrift* besteht, hebt ihn hervor, einer nur aus _Kursivschrift_ wird zur Lücke.
#brainroot(title: [Fotosynthese], links: (connect("licht", "dunkel", label: [ATP]),))[
- Lichtreaktion <licht>
- *Fotolyse*
- _ATP_
- Dunkelreaktion <dunkel>
- Calvin-Zyklus
- _Glucose_
]Wer einen Ast genauer bestimmen will, schreibt ihn als branch(label, ..kinder). Ein Kind ist dann entweder Content, also ein Blatt, oder wieder ein branch(...). Liste und branch-Aufrufe dürfen nebeneinander stehen; ohne title gilt das erste Argument als Wurzel.
Seiten und Farben#
Ohne Angabe verteilt brainroot die Äste selbst: die ersten gehen nach rechts, bis die rechte Seite etwa halb so hoch ist wie alle Äste zusammen, die übrigen nach links. side: left oder side: right legt einen Ast fest, color gibt ihm eine eigene Farbe statt der nächsten aus der Palette.
#brainroot(title: branch([Fotosynthese], fill: green.lighten(50%)), spacing: (max-width: 3cm),
branch([Lichtreaktion], branch([Fotolyse], [Wasser wird gespalten]), [ATP], side: right),
branch([Dunkelreaktion], [Calvin-Zyklus], [Glucose], color: purple),
branch([Voraussetzungen], [Licht], [Wasser], [CO₂], side: left),
)Knoten#
Eine Beschriftung ist Content: Formeln, Bilder und Links gehen wie überall. Ein icon steht links neben der Beschriftung oder mit icon-at: "top" darüber. Die Wurzel ist auch ein branch: title: branch([Energie], icon:. Je Knoten lassen sich
..., fill: ...)fill (eine Farbe oder none für einen Ring), ink und mark: true für einen hervorgehobenen Fachbegriff setzen.
#brainroot(title: branch([Energie], icon: text(size: 1.6em, emoji.bolt), icon-at: "top"),
branch([Formel], [$E = 1/2 m v^2$], [$E = m g h$], icon: emoji.abacus),
branch([Link], link("https://typst.app")[typst.app]),
branch([Wichtig], branch([Kernbegriff], mark: true), branch([Ring], fill: none), branch([Rot], ink: red)))Lückenkarte und Lösung#
blank: true an einem Ast zeichnet seinen Kasten leer, in voller Größe. blanks: "leaves", "branches" oder "all" tut das für eine ganze Klasse von Knoten. Dieselbe Karte mit solution: true füllt die Lücken, mit solution-ink in einer Farbe, die die Antworten hervorhebt. Aufgabe und Lösung entstehen so aus derselben Quelle.
#brainroot(title: [Energiearten], blanks: "leaves", karte)
#brainroot(title: [Energiearten], blanks: "leaves", solution: true, solution-ink: red, karte)Kantenbeschriftung#
edge-label setzt ein kleines Schild auf die Kante, die zu einem Knoten führt. Damit werden aus der Mindmap Baumdiagramme der Stochastik oder Entscheidungsbäume. equal: true an einem Ast macht seine Kinder gleich groß, "width" oder "height" in einer Richtung; an der Wurzel gilt es für die erste Ebene.
#brainroot(title: branch([Start], equal: true), layout: "right", theme: "outline", palette: "plain",
branch([Kopf], branch([Kopf], edge-label: $1/2$), branch([Zahl], edge-label: $1/2$), edge-label: $1/2$, equal: true),
branch([Zahl], branch([Kopf], edge-label: $1/2$), branch([Zahl], edge-label: $1/2$), edge-label: $1/2$, equal: true))Querverbindungen, Klammern, Wolken#
Eine Mindmap ist ein Baum, die Gedanken darin sind es selten. id gibt einem Knoten einen Namen, connect(von, nach) in links zieht eine Kurve zwischen zwei Knoten über die Karte, mit label, arrow, dash und bend. Die Wurzel heißt "root". summary setzt eine Klammer mit Beschriftung hinter die Kinder eines Knotens, cloud legt eine Wolke hinter seinen Teilbaum. Klammern und Wolken gibt es in den Baum-Anordnungen, nicht bei radial und star. arrange: "links" ordnet die Äste und dreht Kinder um, damit verbundene Knoten nahe beieinander liegen; hier rückt CO₂ neben Glucose.
#brainroot(title: [Fotosynthese], arrange: "links",
links: (connect("licht", "dunkel", label: [ATP, NADPH]), connect("co2", "glucose", label: [C], dash: "dotted")),
branch([Lichtreaktion], [Fotolyse], [ATP], [NADPH], id: "licht", cloud: true),
branch([Dunkelreaktion], [Calvin-Zyklus], branch([Glucose], id: "glucose"), id: "dunkel", summary: [Produkte]),
branch([Voraussetzungen], [Licht], [Wasser], branch([CO₂], id: "co2"), summary: [von außen]))Punkte und Aufbau#
points an einem Ast zählt für die Bewertung einer Karte; brainroot-points mit denselben Argumenten summiert sie, show-points: true zeigt sie als Marke am Kasten. reveal zeichnet nur die ersten Äste oder die, für die eine Funktion des Index wahr ist. Das Layout bleibt dabei, so baut sich eine Karte Ast für Ast auf, in typstage etwa mit build(from => brainroot(..., reveal: i => from(i + 2)), steps: 5).
#brainroot(title: [Energiearten], reveal: 2, show-points: true,
branch([Bewegungsenergie], branch([Kinetische Energie], points: 1), branch([Windenergie], points: 1)),
branch([Spannenergie], branch([Dehnungsenergie], points: 2)),
branch([Wärmeenergie], [Feuerenergie]))Anordnungen#
layout bestimmt, wie die Äste um die Wurzel liegen. both ist die zweiseitige Karte von oben, right und left legen alles auf eine Seite. down und up setzen einen Baum von oben nach unten oder umgekehrt, wie ein Organigramm. radial ist die klassische Mindmap nach Buzan: der ganze Baum fächert von der Wurzel aus, jeder Teilbaum bekommt seinen eigenen Sektor. star legt nur die Äste im Kreis um die Wurzel, die Teilbäume wachsen waagerecht nach außen. fishbone ist das Ursache-Wirkungs-Diagramm nach Ishikawa: die Wurzel als Kopf einer Gräte, die Äste als Rippen abwechselnd oben und unten, die Blätter entlang der Rippen; zwei Ebenen unter der Wurzel. layout nimmt auch ein Dictionary: (kind: "down", align-levels: setzt in den Baum-Anordnungen jede Ebene auf eine Linie, wie in einem Organigramm;
true)start ist der Winkel des ersten Astes bei radial und star. Die Abstände stehen in spacing, siehe spacing-defaults.
#brainroot(title: [Energiearten], layout: "down", karte)#brainroot(title: [Energiearten], layout: "radial", karte,
branch([Druckenergie]), branch([Strahlungsenergie], [Lichtenergie]))#brainroot(title: [Energiearten], layout: "star", karte,
branch([Druckenergie]), branch([Strahlungsenergie], [Lichtenergie]))#brainroot(title: [Schlechte Note], layout: "fishbone", theme: "outline",
branch([Vorbereitung], [zu spät begonnen], [ohne Plan], [kein Üben]),
branch([Unterricht], [gefehlt], [nicht mitgeschrieben]),
branch([Prüfung], [Zeit falsch eingeteilt], [Aufgabe falsch gelesen]),
branch([Umfeld], [Lärm], [Müdigkeit]))#brainroot(title: [Stoffe], layout: (kind: "down", align-levels: true), theme: "blocks",
branch([Reinstoffe], branch([Elemente], [Metalle], [Nichtmetalle]), [Verbindungen]),
branch([Gemische], [homogen], [heterogen]))Bei radial und star steht der erste Ast bei start (Standard 60deg), die weiteren folgen im Uhrzeigersinn. Bei radial teilen sich die Kinder den Sektor ihres Elternknotens, gewichtet nach der Größe ihrer Teilbäume, und liegen auf dem Ring ihrer Tiefe; die Ringe beginnen bei spacing.root und werden so weit gedehnt, bis sich keine zwei Kästen überschneiden.
Paletten#
palette liefert die Farben der Äste und der Wurzel; die Kästen bekommen die Astfarbe um tint aufgehellt. Zehn Paletten sind eingebaut, alle mit derselben Karte gezeigt:
poster#
Kräftig bunt, wie Filzstifte an der Tafel. Der Standard.
#brainroot(title: [Energiearten], palette: "poster", karte)pastel#
Zarte, gedämpfte Töne.
#brainroot(title: [Energiearten], palette: "pastel", karte)grayscale#
Nur Graustufen, für den Schwarzweißdruck.
#brainroot(title: [Energiearten], palette: "grayscale", karte)mono#
Ein Blau in wechselnder Helligkeit.
#brainroot(title: [Energiearten], palette: "mono", karte)plain#
Eine dunkle Tinte für alles, wie mit dem Füller gezeichnet.
#brainroot(title: [Energiearten], palette: "plain", karte)earth#
Erdtöne: Terrakotta, Ocker, Oliv, Sand.
#brainroot(title: [Energiearten], palette: "earth", karte)ocean#
Meer: Türkis, Petrol, Seegrün.
#brainroot(title: [Energiearten], palette: "ocean", karte)sunset#
Abendhimmel: Rot, Orange, Rosa, Violett.
#brainroot(title: [Energiearten], palette: "sunset", karte)forest#
Wald: Grün mit etwas Braun.
#brainroot(title: [Energiearten], palette: "forest", karte)neon#
Grelle, gesättigte Farben.
#brainroot(title: [Energiearten], palette: "neon", karte)Eigene Farben gehen als Array, palette: (red, blue, green), oder mit Wurzelfarbe als Dictionary, palette: (colors: (red, blue), root: black). Eine Palette darf auch ink, ink-dark, ink-light und ink-threshold setzen, die Schriftfarben; base nimmt eine eingebaute Palette als Ausgangspunkt: palette: (base: "ocean", root: black). Die Wurzel selbst färbt title: branch([...], fill: ...).
Themes#
Ein Theme bestimmt, wie Kästen und Kanten aussehen; die Farben kommen weiterhin aus der Palette. Zehn sind eingebaut:
soft#
Pastellkästen mit runden Ecken, weiche S-Kurven. Die Vorlage von der Tafel.
#brainroot(title: [Energiearten], theme: "soft", karte)outline#
Weiße Kästen mit farbigem Rahmen, Kurven.
#brainroot(title: [Energiearten], theme: "outline", karte)blocks#
Vollfarbige eckige Kästen mit weißer Schrift, rechte Winkel: Organigramm-Optik.
#brainroot(title: [Energiearten], theme: "blocks", karte)lines#
Keine Kästen: der Text steht auf seiner farbigen Linie, die Kanten münden hinein. Die klassische Mindmap.
#brainroot(title: [Energiearten], theme: "lines", karte)sketch#
Dünner Rahmen ohne Füllung, gestrichelte Geraden.
#brainroot(title: [Energiearten], theme: "sketch", karte)bubbles#
Pillen mit Pastellfüllung und geraden Verbindungen.
#brainroot(title: [Energiearten], theme: "bubbles", karte)hand#
Wie soft, aber handgezeichnet: jede Linie wackelt leicht.
#brainroot(title: [Energiearten], theme: "hand", karte)scribble#
Gekritzelt: keine Füllung, jede Linie zweimal gezogen.
#brainroot(title: [Energiearten], theme: "scribble", karte)marker#
Filzstift: volle Farbe, breite gerade Striche mit langem Wackeln.
#brainroot(title: [Energiearten], theme: "marker", karte)pencil#
Bleistift: dünne Linien mit feinem Zittern, rechte Winkel.
#brainroot(title: [Energiearten], theme: "pencil", karte)organic#
Organisch nach Buzan: Äste, die zu den Blättern hin dünner werden, Pillen in Pastell.
#brainroot(title: [Energiearten], theme: "organic", karte)twigs#
Zweige: weiße Kreise auf der ersten Ebene, kastenlose Blätter an einem gemeinsamen Stamm mit je einem Zweig, wie in Infografiken.
#brainroot(title: [Energiearten], theme: "twigs", karte)Formen#
Das Theme-Feld shape macht aus den Kästen Kreise oder Ellipsen; size gibt je Tiefe einen festen Durchmesser vor, wie bei einem Bubble Tree. Bei festem Durchmesser schrumpft die Schrift bis auf 60 Prozent, damit der Text hineinpasst; reicht das nicht, wächst der Kreis. Ohne size passen Kreise zu kurzen Beschriftungen, ein langes Wort macht den Kreis groß. shade stuft die Astfarbe je Ebene ab.
#brainroot(title: [Energie], layout: "radial", palette: "sunset",
theme: (fill: "solid", shape: "circle", size: (5em, 4em, 2.8em), edge: "straight",
thickness: (0.5em, 0.25em), scale: (1.1, 0.9, 0.7), shade: 25%))[ ... ]#brainroot(title: [Mind Map], theme: (base: "outline", shape: "ellipse"), palette: "ocean", karte)Handgezeichnet#
Die Themes hand, scribble, marker und pencil wackeln jede Linie nach dem Muster der TikZ-Dekoration sketch: der Pfad wird in kleinen Schritten abgelaufen, jeder Punkt senkrecht dazu um eine langsam laufende Sinuswelle versetzt, deren Takt ein Zufallslauf bestimmt. Der Zufall ist reproduzierbar, dieselbe Karte sieht bei jedem Übersetzen gleich aus. Eine Handschrift wie „Patrick Hand“ oder „Kalam“ passt dazu; sie kommt per set text(font: ...) oder über das Theme-Feld font.
wobble regelt die Stärke: wobble: 0.5 wackelt halb so stark, wobble: 2 doppelt. Das Feld hand steuert das Wackeln im Einzelnen: amplitude (Ausschlag in pt), wavelength (Wellenlänge in pt), randomness (Unregelmäßigkeit, 1 ist ein reiner Sinus), segment (Schrittweite in pt) und passes (wie oft jede Linie gezogen wird). Jedes Theme lässt sich damit handgezeichnet machen:
#set text(font: "Patrick Hand")
#brainroot(title: [Energiearten],
theme: (base: "blocks", hand: (amplitude: 1, wavelength: 60, randomness: 2, segment: 1.5, passes: 1)),
karte)Ein Theme anpassen#
Ein Dictionary überschreibt einzelne Felder; base wählt das Ausgangstheme, sonst gilt soft. Ein Theme trägt alles, was das Aussehen betrifft: Kästen (shape, size, fill, stroke, radius, inset, underline, font, scale, bold-depth, tint, tint-min, shade), Kanten (edge, thickness, dash, taper, edge-label-fill), hand für das Wackeln, und root und branches mit Überschreibungen nur für die Wurzel und die erste Ebene. theme-defaults listet jedes Feld mit seiner Vorgabe; ein falsch geschriebenes Feld ist ein Fehler, kein stilles Nichts.
#brainroot(title: [Energiearten], layout: "right",
theme: (base: "outline", edge: "elbow", radius: 0pt), karte)Die vier Ebenen#
Alles, was eine Karte bestimmt, liegt auf einer von vier Ebenen, und jede hat eine Stelle:
- Theme ist das Aussehen von Kästen und Kanten: Form, Füllung, Rahmen, Schriftgrößen je Ebene, Linienstärken, Abstufung der Farben, das Wackeln. Ein Name oder ein Dictionary, Felder in
theme-defaults. - Palette ist die Zuordnung der Farben: die der Äste, der Wurzel, der Schrift. Ein Name, ein Array von Farben oder ein Dictionary.
- Layout ist die Anordnung,
spacingsind die Abstände:levelundrootin Wachstumsrichtung,siblingundbranchquer dazu,max-widthfür den Umbruch,brace,summary,cloud,label(Abstand der Kantenschilder von der Kante) undpadding. Felder inlayout-defaultsundspacing-defaults. - Knoten sind
branch(...), die Wurzel eingeschlossen: Icon, Füllung, Schriftfarbe, Hervorhebung, Lücke, Kantenbeschriftung,id, Klammer, Wolke, Punkte.
Was auf brainroot selbst bleibt, sind die Regler je Karte: wobble, links, blanks, solution, solution-ink, show-points, reveal, width, zoom, background und alt. width skaliert die fertige Karte samt Schrift auf eine Breite, als Länge oder als Anteil des umgebenden Blocks (width: 100%); zoom ist ein Faktor obendrauf. Beide ändern nur die Größe, nie das Layout.
Was in einem Dokument immer gleich ist, wird zur Vorgabe:
#let karte = brainroot.with(theme: "hand", palette: "ocean", spacing: (level: 5em))
#karte(title: [Energiearten])[ ... ]Barrierefreiheit und Leistung#
Die Karte ist eine Abbildung mit Alternativtext: alt: auto schreibt den Baum als Text aus, ein String gilt wie angegeben, none lässt ihn weg. So tragen PDFs mit Tags den Inhalt der Karte auch für Vorleseprogramme.
Eine Karte mit etwa 200 Knoten übersetzt in gut einer halben Sekunde, handgezeichnet in etwa zwei; das Messen der Kästen und das Wackeln der Linien sind die beiden Posten. Sehr große Karten werden deshalb nicht langsam, aber sie werden unübersichtlich, und das ist der Grund, sie zu teilen.
Funktionen#
brainroot#
brainroot(
..branches,
title: none,
layout: "both",
theme: "soft",
palette: "poster",
spacing: (:),
wobble: 1,
links: (),
arrange: "keep",
blanks: none,
solution: false,
solution-ink: auto,
show-points: false,
reveal: auto,
width: auto,
zoom: 100%,
background: none,
alt: auto,
) -> contentDraws the mind map. The first-level branches come as positional arguments: branch(...) calls, plain content, or a Typst list whose items become branches and whose nested lists become children. In a list, <name> at the end of an item gives the node an id, an item that is nothing but *bold* marks it, one that is nothing but _emphasised_ makes it a gap.
Recurring settings go into a preset: #let map = brainroot.with(theme:.
"hand", palette: "ocean")
| Name | Typ | Vorgabe | Beschreibung |
|---|---|---|---|
..branches | content | dictionary | – | First-level branches: branch(...), content, or a list. Without title, the first positional argument is the root. |
title | content | dictionary | none | none | The root: content, or a branch(...) to give it an icon, a fill or an ink of its own. |
layout | str | dictionary | "both" | Arrangement of the branches: a name (both, right, left, down, up, radial, star, fishbone) or a dictionary with kind and the further fields of layout-defaults. |
theme | str | dictionary | "soft" | How boxes and edges look: the name of a theme in themes, or a dictionary that overrides fields of one (base: picks the starting theme, otherwise soft); see theme-defaults for the fields. |
palette | str | array | dictionary | "poster" | The colours: the name of a palette in palettes, an array of colours, or a dictionary (base: picks the starting palette) with colors, root, ink, ink-dark, ink-light and ink-threshold. |
spacing | dictionary | (:) | Distances, overriding fields of spacing-defaults. |
wobble | float | ratio | 1 | Strength of the wobble in hand-drawn themes, a factor on their amplitude; 0 draws straight, 2 twice as restless. |
links | array | () | Cross-links between nodes, each a connect(...). |
arrange | str | "keep" | "keep" draws the branches in the order given; "links" orders the first-level branches, and turns the children of a branch around where that helps, so that nodes joined by cross-links come close together. Tree layouts only; up to seven branches are tried exhaustively, more by swapping neighbours. |
blanks | none | str | none | Draws whole classes of nodes as gaps: "leaves", "branches" (the first level) or "all"; none only honours each node’s own blank. |
solution | bool | false | true fills the gaps in: the solution of a map with blanks. |
solution-ink | auto | color | auto | Text colour for filled-in gaps, so the solution stands out; auto uses the normal text colour. |
show-points | bool | false | Shows each node’s points as a badge on its box. |
reveal | auto | int | function | auto | Which first-level branches are drawn: auto all, an integer the first so many, or a function of the branch index (from 0) returning a bool. The layout stays the same, so a map can build up branch by branch – in typstage: build(from => brainroot(..., reveal: i => from(i + 2))). |
width | auto | length | ratio | auto | auto draws the map at its natural size; a length or a ratio of the surrounding block scales the whole map, text included, to that width. |
zoom | ratio | float | 100% | A factor on the whole map, applied on top of width; zoom: 50% halves it. |
background | color | none | none | A colour behind the whole map, framed by spacing.padding; none leaves the page as it is. |
alt | auto | str | none | auto | Alternative text for the map in tagged PDFs: auto writes the tree out as text, a string is used as given, none adds nothing. |
contentbrainroot-points#
brainroot-points(..branches, title: none) -> int | floatpoints of every node in a map. Takes the same branches, lists and title as brainroot(), so the call can be repeated with the same arguments, or the arguments kept in a variable and spread.| Name | Vorgabe |
|---|---|
..branches | – |
title | none |
int | floatbranch#
branch(
label,
..kids,
color: none,
side: auto,
icon: none,
icon-at: "left",
fill: auto,
ink: auto,
mark: false,
blank: false,
edge-label: none,
id: none,
summary: none,
cloud: none,
points: none,
equal: false,
) -> dictionarybranch(...) calls or plain content, which then counts as a leaf without children of its own.| Name | Typ | Vorgabe | Beschreibung |
|---|---|---|---|
label | content | str | – | Label of the node. |
..kids | content | dictionary | – | Children: branch(...) calls or content (leaves). |
color | color | none | none | Colour of the branch. Only read on the first level; below it every node inherits the colour of its parent. none takes the next colour from the palette. |
side | alignment | auto | auto | left or right forces the side in the two-sided layout; auto lets brainroot balance. Only read on the first level. |
icon | content | none | none | An icon, emoji or image set beside the label. |
icon-at | str | "left" | Where the icon goes: "left" of the label or "top", above it. |
fill | auto | color | none | auto | Fill of this node’s box; auto follows the theme, none leaves the box unfilled with a border in the branch colour (a ring). |
ink | auto | color | auto | Text colour of this node; auto follows the fill. |
mark | bool | false | Highlights the node: bold text and a strong border in the branch colour, for key terms. |
blank | bool | false | Draws the box empty, at its full size, unless the map is set with solution: true – a gap to fill in. |
edge-label | content | none | none | A small label on the edge that leads to this node, for decision trees and probability trees. |
id | str | none | none | A name for connect(...) to address this node by. The root is "root". |
summary | content | none | none | A brace beyond this node’s children with a label, summarising them. Not drawn in the radial and star layouts. |
cloud | bool | color | none | none | A soft cloud behind this node’s whole subtree: true for a light tint of the branch colour, or a colour. Not drawn in the radial and star layouts. |
points | int | float | none | none | Points this node is worth when a map is graded; brainroot-points() adds them up and show-points: true shows them as a badge. |
equal | bool | str | false | Makes this node’s children the same size: true in width and height, "width" or "height" in one of them. Every child grows to the largest sibling, so a row of leaves lines up. |
dictionaryconnect#
connect(
from,
to,
label: none,
arrow: true,
dash: "dashed",
bend: auto,
color: auto,
thickness: 0.09em,
) -> dictionaryid and pass the connections to brainroot(links: (...)).| Name | Typ | Vorgabe | Beschreibung |
|---|---|---|---|
from | str | – | id of the node the curve starts at; "root" is the root. |
to | str | – | id of the node the curve ends at. |
label | content | none | none | A label at the middle of the curve. |
arrow | bool | str | true | An arrowhead at the end; "both" puts one at each end. |
dash | str | "dashed" | Dash pattern of the curve. |
bend | auto | ratio | auto | How far the curve bows out, as a share of the distance: auto bows away from the root, a ratio bows to the left of the direction of travel, negative to the right, 0% is a straight line. |
color | color | auto | auto | Colour of the curve; auto is a dark grey. |
thickness | length | 0.09em | Line width. |
dictionaryVorgaben#
Die Felder von Theme, Palette, Layout und Abständen, mit ihren Vorgaben:
layout-defaults#
dictionarykind is one of both, right, left, down, up, radial, star, fishbone; start the angle of the first branch in radial and star; align-levels puts every level on one line in the tree layouts.palettes#
dictionaryposter, pastel, grayscale, mono, plain, earth, ocean, sunset, forest, neon. Each sets colors (an array, handed out to the branches in order) and root; a palette may also set ink (auto picks by the fill’s luminance), ink-dark, ink-light and ink-threshold. Take one as the starting point for your own: palette: (base: "ocean", root: black).spacing-defaults#
dictionarylevel between parent and child, root between the root and its branches (the first ring in radial and star). Across it: sibling between siblings, branch between the first-level branches. max-width wraps longer labels. brace and summary size a summary brace and its gaps, cloud pads a cloud, label is the gap between an edge label and its edge, padding frames a coloured background. Lengths in em follow the font size around the map.theme-defaults#
dictionaryshape ("rect", "circle", "ellipse"), size (a fixed diameter per depth, or none), fill ("tint", "solid", "white", "none"), stroke (border width), radius, inset, underline (text on a line instead of a box), font, scale (font size per level), bold-depth, tint and tint-min (how the branch colour is lightened for the boxes), shade (colour steps per level). Edges: edge ("curve", "elbow", "straight", "taper", "comb"), thickness (per level), dash, taper (factors at parent and child), edge-label-fill. hand is none or a dictionary with amplitude, wavelength, randomness, segment and passes for hand-drawn lines. root and branches override any of the box fields for the root and the first level only.themes#
dictionarysoft, outline, blocks, lines, sketch, bubbles, hand, scribble, marker, pencil, organic, twigs. A theme is a dictionary of everything that decides how boxes and edges look; each preset sets only what differs from the defaults, see theme-defaults for the full list of fields. Adapt one with theme: (base: "hand", hand: (amplitude: 1)).