Annotations
Clearly label and reference diagram elements with automatically numbered annotations.
Overview
Annotations in Neural Sketch provide an elegant way to insert clear, auto-numbered labels and explanatory notes directly into your diagrams. This streamlines the creation of professional, self-explanatory visuals, crucial for effectively communicating complex ideas such as neural architectures, algorithmic steps, or intricate system diagrams.
Key Features:
- Automatic numbering or customizable reference tags.
- Flexible positioning relative to diagram elements.
- Rich styling options for annotation boxes and connector arrows.
- Seamless integration with the Neural Sketch ecosystem.
- Highly extensible reference system that allows overriding default numbering by providing custom reference tags and labels, ensuring complete control and adaptability.
- Integrated referencing: Easily incorporate citations, equations, and references directly within figures, seamlessly linking your diagrams to other sections of your paper.
Annotation as Thought Layer
Annotations in Neural Sketch are not decorative. They’re structural. They let you talk about your diagram from within the diagram—weaving explanation directly into the figure itself.
Think of them as embedded margin notes—auto-numbered, positioned with intent, and visually tuned to match your diagram’s geometry and voice.
They transform diagrams into narratives: part geometry, part language. Think of them as in-line commentary for structure, where insight is embedded next to form.
They automatically track, connect, and style themselves—letting you focus on content, not micromanagement.
What sets them apart
- They handle their own numbering. - They know how to connect back to what they’re describing. - They keep you out of the weeds of manual spacing and styling.
Minimal Form
The base form is simple:
Here’s the smallest working example:
You get a neatly placed label, auto-numbered, connected by a clean line. No glue code. No guesswork.
What You Can Control
Annotations expose a thoughtful set of keys. Here’s a feel for what’s in your toolbox:
Property | Default | Description |
---|---|---|
ref-tag | Auto-numbered | Manual override for the reference label |
header | (none) | Bold label placed at the top |
title | (none) | Italic subheading beneath the header |
text | (required) | The main content—usually your explanation |
text-align | left | Align annotation text (left , center , right , justify ) |
fill | nskLightestGray | Background of the annotation box |
border-color | nskMidGray | Color of the annotation border |
border-type | solid | Style of the border: solid , dashed , or none |
rounded-box | false | If true, the annotation uses a rounded rectangle |
padding | 3pt | Inner padding between box and text |
connect-to | (none) | Anchor the annotation points to |
anchor-from | east | Which edge of the annotation emits the connector |
width | 4.5cm | Sets the maximum width for text wrapping inside the box |
Styles in Practice
Manual Tags, or No Tags
Neural Sketch manages numbering for you, but you can override it:
Want no tag at all?
Routed with Precision
Annotations can connect to diagram nodes with custom arrows, bends, and corners:
This routing is powered by the bridges
and decorations
systems—so when needed, style your arrows to match your flow.
Text Layout
Control how the content behaves inside the box:
Text Wrapping
Annotations wrap by default, unless otherwise specified. You can:
- Set
width=0cm
to disable wrapping - Set a fixed width (e.g.
width=3cm
) for multiline text
Line breaks (using \\
) are only rendered when a fixed width
is specified.
Edge Alignment
If you want all annotations to align along a shared visual edge (e.g., same left edge), use \nskMeasure
to dynamically compute the required offset:
In practice
Reference Table
This table summarizes all available keys for \nskAnnotate
. Defaults are inherited from global styles unless explicitly overridden.
Prop | Type | Default |
---|---|---|
anchor-from? | token list | east |
width? | dim | 4.5cm |
border-color? | token list | nskMidGray |
border-radius? | dimension | 1mm |
border-size? | dimension | {} |
border-type? | token list | solid |
connect-opts? | token list | arrow-style = {dotted, thick |
connect-to? | token list | {} |
disable-tag? | boolean | false |
fill? | token list | nskLightestGray |
header? | token list | {} |
header-style? | token list | \bfseries |
padding? | dimension | 3pt |
pos? | token list | {} |
ref-tag? | token list | {} |
rounded-box? | boolean | false |
text? | token list | {} |
text-align? | choice | left |
text-color? | token list | c__nsk_principal |
text-style? | token list | {} |
tikz-opts? | token list | {} |
title? | token list | {} |
title-style? | token list | \itshape |
width? | dimension | 0cm |
x? | number | 0 |
y? | number | 0 |