Mark Path
Annotating paths with precision and clarity using Neural Sketch.
Overview
\nskMarkPath
enables precise placement of annotations along paths defined by other commands, such as \nskConnect
. It provides a robust yet intuitive interface for marking intermediate points along any drawn path, ideal for labeling distances, weights, points of interest, or other notable markers in your diagrams.
Basic Usage
The core syntax of \nskMarkPath
is:
<options>
: Configuration parameters such as positioning (at
), skipping steps (skip-first
,skip-last
), or defining intervals (step
).<path id or definition>
: The reference path identifier or explicit path definition.<content>
: Arbitrary TikZ commands (e.g., nodes, drawings, labels) executed at each specified position.
Annotating Specific Positions
Precisely place markers using fractional path positions (at
):
The position at
accepts a fractional value (e.g., 0.25
means 25% of the way along the path).
Fractional Value | Position on Path |
---|---|
.0 | Start of path |
.5 | Middle of path |
1.0 | End of path |
Complete Example
Illustrating markers placed at multiple intervals along connections:
Advanced Path Routing
Custom Path Definitions
Beyond marking paths defined by IDs
(e.g., from \nskConnect
), you can directly specify custom paths. This gives maximum flexibility for complex routing scenarios:
\nskMarkPath
also seamlessly integrates with complex paths involving bends and custom routes:
Tip
Combine \nskMarkPath
with anchors and markers to create informative visual annotations. Markers can include labels, connectors, and custom drawn indicators, greatly enhancing clarity in complex diagrams.
Interval-based Marking
Use evenly spaced markers along an arbitrary path by specifying intervals:
Explanation of Interval Marking Options
step
: Defines the interval at which markers are placed along the path.skip-first
,skip-last
: Allows skipping markers at endpoints for cleaner aesthetics.
Best Practices
- Consistency: Use consistent styles (line thickness, marker positions) across diagrams to enhance readability.
- Clarity: Ensure annotations do not clutter the diagram. Balance between informative content and visual cleanliness.
Reference
Prop | Type | Default |
---|---|---|
at? | token list | {} |
color? | token list | c__nsk_principal |
end? | number | 1 |
path-width? | dimension | 0pt |
skip-first? | boolean | false |
skip-last? | boolean | false |
start? | number | 0 |
step? | dimension | 10mm |
Key Takeaway
\nskMarkPath
empowers you to annotate paths precisely, clearly communicating detailed information without sacrificing visual appeal.