Neural Sketch
Commands/render

nsk@Default

Execute fallback code when no matching case is found in an `nskSwitch`.

Overview

The \nskDefault command provides a fallback action within the nskSwitch environment: if none of the preceding \nskCase branches match the switch operand, the code you supply to \nskDefault is executed. This ensures you can handle unexpected or catch-all situations elegantly.

Place \nskDefault at the end of an nskSwitch block to handle all unmatched cases.

Syntax

\nskDefault{<code>}
  • <code>: Arbitrary LaTeX or TikZ content to be executed as the default branch.

Example

\begin{nskSwitch}{myValue}
  \nskCase["foo"]{Matched foo}
  \nskCase["bar"]{Matched bar}
  \nskDefault{
    \node[text=red] {No matching case for myValue};
  }
\end{nskSwitch}

Reference Table

PropTypeDefault
codeLaTeX code{}

On this page