Neural Sketch

Package Options

An overview of Neural Sketch's global style keys and how to configure them

If you're new here, check out the Quick Start guide first. It lays the groundwork for what follows.


Global Style, Local Precision

Every diagram in your paper is a visual sentence. And like sentence structure, consistency in styling matters. Neural Sketch gives you the ability to define this consistency up front—globally, in one place—so each figure speaks in the same visual language.

This is what package-level options are for.

They let you shape the tone of your diagrams—what colors to speak in, how heavy the lines feel, how much breathing room surrounds each component. All of it defined once, applied everywhere.

How to Use Global Options

You load Neural Sketch in the preamble of your document with configuration keys passed directly into the package:

\usepackage[
  dark-mode = true,
  block-fill = nskBlue,
  container-border-color = nskMidGray,
]{neural-sketch}

These keys act like stylistic defaults. They govern the visual behavior of the system unless explicitly overridden later in the diagram itself.

Want every block to have rounded corners by default? Declare it once:

block-border-radius = 2mm

Want annotations to always use dashed outlines and soft gray fills? Just say so:

annotate-border-type = dashed,
annotate-fill = nskLightestGray

This doesn’t lock you in. These are defaults, not shackles. You can override any key at the point of use.

Why It Matters

Defining style globally is more than a convenience. It makes your diagrams:

  • Consistent across figures
  • Effortless to revise (change one key, update every figure)
  • Clearer to read (visual rhythm = less cognitive load)

And—critically—it decouples design from structure. You can focus on the logic of the diagram, not the aesthetics of every line.

Reference Table

The full list of package-level configuration keys is available below. Each entry defines a stylistic control point—its name, expected format, and default behavior.

PropTypeDefault
block-distance?token list1cm and 1cm
annotate-border-color?token listnskMidGray
annotate-border-radius?token list1mm
annotate-border-size?token list.4mm
annotate-border-type?token listsolid
annotate-box-padding?token list3pt
annotate-connect-opts?token listarrow-style = {dotted, thick
annotate-connect-to?token list{}
annotate-fill?token listnskLightestGray
annotate-from-anchor?token listeast
annotate-header?token list{}
annotate-header-style?token list\bfseries
annotate-main-style?token list{}
annotate-pos?token list{}
annotate-ref-tag?token list{}
annotate-text?token list{}
annotate-text-align?token listleft
annotate-text-color?token listc__nsk_principal
annotate-title?token list{}
annotate-title-style?token list\itshape
annotate-width?token list0cm
annotate-x?token list0
annotate-y?token list0
arrow-style?token listultra~thick, line~cap=round
arrow-tip?token list-
bend-distance?token list1cm
block-anchor?token list{}
block-border-color?token listnskDarkGray
block-border-radius?token list2.5mm
block-border-size?token list.4mm
block-embed-border-radius?token list1.3mm
block-embed-border-size?token list1pt
block-embed-padding?token list1mm
block-fill?token listnskLightGray
block-height?token list1cm
block-importance?token list1.0
block-outer-border-color?token listnskMainAccent!50!nskBg
block-outer-border-radius?token list2.5mm
block-outer-border-size?token list5mm
block-outer-border-type?token listnone
block-stack-count?token listsingle
block-stack-opts?token listopacity=.6
block-stack-xoffset?token list1mm
block-stack-yoffset?token list-.8mm
block-width?token list1cm
block-x?token list0
block-y?token list0
bridging-gap?token list4pt
bridging-span?token list8pt
bridging-style?token listarc
container-anchor?token list{}
container-border-color?token listnskLighterGray
container-border-type?token listsolid
container-fill?token listnskLightestGray
container-padding?token list.5cm
container-rotate?token list0
container-scale?token list1
container-shift-x?token list0
container-shift-y?token list0
measure-axis?token listhorizontal
measure-from?token list{}
measure-to?token list{}
shorten-from?token list0pt
shorten-to?token list0pt
text-center-loc?token list{}
text-east-loc?token list{}
text-north-loc?token list{}
text-south-loc?token list{}
text-west-loc?token list{}
zoom-at?token list{}
zoom-callout-border-color?token list\g__nsk_style_block_border_color_tl
zoom-callout-style?token listthick, densely~dashed
zoom-connecting-path?token list\draw[\g__nsk_style_zoom_connecting_style_tl] (tikzspyonnode) -- (tikzspyinnode);
zoom-connecting-style?token list\g__nsk_style_block_border_color_tl
zoom-magnification?token list4
zoom-size?token list2cm
zoom-to?token list{}
zoom-type?token listcircle
zoom-zoomed-fill?token listnone
zoom-zoomed-style?token listdraw=\g__nsk_style_block_border_color_tl, ultra~thick

On this page