Neural Sketch
Commands/preloaded

nsk@SetStyle

Configure global style keys for Neural Sketch in one invocation.

This is an unstable deprecated API, only used internally. Deprecated in favor of Package Options

Overview

The \nskSetStyle command allows you to configure global style parameters for Neural Sketch in a single invocation by passing key=value pairs corresponding to the style keys defined under nsk/style. This macro is primarily intended for package- or document-level customization of default styling options.

\nskSetStyle is deprecated in favor of package options (pkgopts). For production documents, consider using class or package options to manage styles.

Usage

Place \nskSetStyle in the document preamble (or before any diagram code) to apply style overrides globally:

\nskSetStyle[block-fill=orange, arrow-color=red]

Syntax

\nskSetStyle[<key=value list>]
  • <key=value list>: Comma-separated list of style assignments. Accepts any keys from the nsk/style family (e.g., block-fill, container-padding, zoom-type, etc.).

Examples

Override block and arrow styles for all subsequent diagrams:

\documentclass{standalone}
\usepackage{neural-sketch}
 
% Apply global style overrides
\nskSetStyle[
  block-fill=nskBlue!20,
  block-border-color=nskBlue,
  arrow-style={thick, -Stealth},
  arrow-color=nskBlue
]
 
\begin{document}
\begin{nskFigure}
  \nskBlock[id=A, text-center={A}]
  \nskBlock[last-pos={right=of A}, id=B, text-center={B}]
  \nskConnect{A}{B}
\end{nskFigure}
\end{document}

Reference

PropTypeDefault
key=value list?key-value list{}

On this page