Neural Sketch
Commands

nsk@MarkPath

Comprehensive reference for the `\nskMarkPath` command in Neural Sketch.

Overview

The \nskMarkPath command introduces an elegant and precise mechanism to decorate or mark paths within Neural Sketch diagrams. Extending TikZ's powerful decoration library, \nskMarkPath allows users to place custom markings—such as arrows, dots, or custom symbols—at regular intervals, specific positions, or segments along a defined path.

This functionality is particularly beneficial for illustrating directions, emphasizing critical sections, or annotating significant transitions within complex diagrams.

Syntax

Basic usage follows the structure:

\nskMarkPath[<options>]{<path>}{<decoration commands>}

Detailed Usage

Defining Paths

Paths can be provided directly in TikZ syntax, or by referencing an existing path:

% Direct TikZ Path
\nskMarkPath{(A) -- (B)}{<content>}
 
% Referenced Path
\nskMarkPath{existingPath}{<content>}

Optional Parameters

The command accepts a variety of optional parameters to refine decorations:

ParameterTypeDefaultDescription
startfloat0Starting fractional position along the path (0 beginning).
endfloat1Ending fractional position along the path (1 path end).
atfloatSpecific fractional position to place a single decoration.
stepdimension10mmInterval between repeated decorations along the path.
colorcolornskFgColor of decoration elements.
path-widthdimension0ptWidth of the underlying path, used in skip calculations.
skip-firstbooleanfalseSkip placing decoration at the very start of the path.
skip-lastbooleanfalseSkip placing decoration at the very end of the path.

Examples

Regularly Spaced Decorations

Place arrows at regular intervals along a path:

\nskMarkPath[step=15mm, color=nskBlue]{(0,0) -- (4,0)}{<content>}

Specific Single Decoration

Decorate at a specific location:

\nskMarkPath[at=0.5]{(A) .. controls (B) .. (C)}{\node[circle, fill=nskGreen, inner sep=1.5pt] {};}

Skipping Path Ends

Exclude decorations from endpoints, useful for arrows or terminal indicators:

\nskMarkPath[skip-first=true, skip-last=true, path-width=1mm]{(start) -- (end)}{<content>}

Error Handling

  • Unrecognized optional parameters are gracefully ignored but generate warnings to help users diagnose potential typographical or conceptual issues.

Verify all provided parameters and path definitions to avoid unexpected behaviors.

See Also

Reference Table

PropTypeDefault
start?float0
end?float1
at?float
step?dimension10mm
color?colornskFg
path-width?dimension0pt
skip-first?booleanfalse
skip-last?booleanfalse

With \nskMarkPath, Neural Sketch users can precisely and elegantly articulate important nuances and directional flows, elevating the clarity and professional quality of their diagrams.

On this page