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.
Basic Usage
To create annotations, use the straightforward command:
Minimal Example
Here's how to attach a simple annotation to a block:
This generates an annotation box positioned neatly to the left of myblock
, connected via an arrow, and auto-incremented by default.
Annotation Customization
Annotations offer extensive customization through various keys:
Property | Default | Description |
---|---|---|
ref-tag | Auto-numbered | Custom identifier for referencing annotations explicitly. |
header | (none) | Bold-styled header for clear categorization. |
title | (none) | Italicized subheading offering additional context. |
text | (required) | Main annotation content. |
text-align | left | Alignment of annotation text (left , right , center , justify ). |
fill | nskLightestGray | Background color of the annotation box. |
border-color | nskMidGray | Color of annotation box border. |
border-type | solid | Border style (solid , dashed , none ). |
rounded-box | false | Toggles rounded corners for the annotation box. |
padding | 3pt | Padding within the annotation box. |
connect-to | (none) | Element the annotation arrow points to. |
anchor-from | east | Anchor point on annotation box from which the arrow emerges. |
Detailed Example
This example demonstrates advanced annotations featuring different styles and placements:
Customizing Reference Tags
Annotations are automatically numbered by default, providing convenient referencing. To explicitly define a tag, use ref-tag
:
Disabling Tags
To omit tags entirely, set disable-tag
:
Advanced Arrow Routing
Annotations support intricate arrow routing, beneficial in dense diagrams:
You can pass custom options to the connecting segments through the connect-opts
key to define more advanced arrow routing behaviors. For more details, refer to the Routing System documentation.
Text Alignment
Ensure readability with the text-align
property, ideal for multi-line annotations:
Best Practices
Recommendations
- Keep headers concise for quick recognition.
- Justify longer texts to maintain structured readability.
- Match annotation colors and styles consistently with your diagram theme.
- Arrange annotations logically to maintain visual flow.
- Utilize distinct borders or fills to visually differentiate annotation types.
Practical Example
The following illustrates how annotations clarify layers in a neural network:
Reference
Prop | Type | Default |
---|---|---|
anchor-from? | token list | east |
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 |
Key Takeaway
Annotations in Neural Sketch elegantly combine auto-management of numbering, positioning, and styling, allowing you to create diagrams that communicate ideas with unparalleled clarity and professional finesse.