Neural Sketch

Basic Styles

Learn the foundational styles and customizations available in Neural Sketch.

Introduction

Neural Sketch provides a comprehensive suite of basic styles that make your diagrams clear, elegant, and publication-ready. In this guide, you'll explore how to apply different border types, shadows, importance levels, and custom container styling to your diagram elements.

Border and Shadow Styles

Explore various border types and shadow effects to enhance the visual distinction of your elements.

Basic Styles
\nskBlock[
  id=A,
  text-north = {solid},
  border-type=solid,
]
\nskContainer[
  border-type=dashed,
  text-north=Attention,
]{
  \nskBlock[
    id=G,
    pos={right=.5cm of F},
    outer-border-type=solid,
    outer-border-size=4mm,
    outer-border-color=nskMainAccent!70,
  ]
}

Border Styles and Shadows

Use key-value pairs to customize borders and shadows on blocks individually, enhancing visual hierarchy and readability.

Border Types

Different border styles convey distinct visual cues:

  • Solid border (border-type=solid)
\nskBlock[
  id=A,
  text-north={Solid Border},
  border-type=solid
]
  • Dashed Border (border-type=dashed)
\nskBlock[
  id=B,
  text-north={Dashed Border},
  border-type=dashed
]

Shadow Effects

Apply shadows to emphasize depth and layering:

  • With Shadow (shadow=true)
\nskBlock[
  id=C,
  text-north={With Shadow},
  shadow=true
]
  • Without Shadow (shadow=false)
\nskBlock[
  id=D,
  text-north={No Shadow},
  shadow=false
]

Importance-Based Styling

Highlight blocks by adjusting their importance, visually scaling border thickness and emphasizing prominence:

  • Increased Importance (importance=2)
\nskBlock[
  id=E,
  text-north={Important Block},
  importance=2,
  shadow=false
]

Outer Borders

Use outer borders to accentuate important blocks or delineate interactive areas:

  • Outer Border (outer-border-type, outer-border-size, outer-border-color)
\nskBlock[
  id=F,
  outer-border-type=solid,
  outer-border-size=4mm,
  outer-border-color=nskSecondaryAccent!70
]

Exploring Shapes

Basic Geometric Shapes

Utilize fundamental geometric shapes available in Neural Sketch:

\foreach \shape in
  {rectangle, circle, diamond, ellipse, trapezium, semicircle}{
    \nskBlock[
      type=\shape,
      width=1cm, height=1cm,
      last-pos-s={right=.8cm}
    ]
  }
Routing Type

Regular Polygons

Any n-sided polygons with or without smoothed corners

\foreach \ns in {3,...,6}{
    \nskBlock[
      type=regular polygon,
      width=1.5cm, height=1.5cm,
      tikz-opts={regular polygon sides=\ns},
      last-pos-s={right=.8cm},
    ]
  }
Routing Type

Special Shapes

Employ specialized shapes for unique diagramming needs:

\nskContainer[
  id=ac,
  border-type=dashdotted,
  text-north=Specials,
  text-north-style={nskMidGray},
  text-north-loc=west,
  fill=nskMainAccent!20,
  border-color=nskMainAccent,
]{
  \foreach \shape in {isosceles triangle, kite, dart}{
      \nskBlock[
        type=\shape,
        id=ablock,
        last-pos-s={right=.8cm},
      ]
    }
}
 
\nskContainer[
  pos={right=5cm of ac},
  border-type=dashdotted,
  text-north=Specials,
  text-north-style={nskMidGray},
  text-north-loc=west,
  fill=nskMainAccent!20,
  border-color=nskMainAccent,
]{
 
  \foreach \shape in {cylinder, cloud, signal, tape}{
      \nskBlock[
        id=ablock,
        type=\shape,
        last-pos-s={right=.8cm},
        border-radius=0mm,
      ]
    }
}
Routing Type

Rounded and Chamfered Rectangles

Explore rectangles with customized rounded or chamfered corners:

% Rounded Rectangles
\nskBlock[
  type=rounded rectangle,
  tikz-opts={rounded rectangle arc length=120},
]
 
% Chamfered Rectangles
\nskBlock[
  type=chamfered rectangle,
  border-radius=.6mm,
  tikz-opts={chamfered rectangle corners={north east, south east}},
]
Rounded and Chamfered Rectangles

Best Practices

  • Combine different styles to emphasize key diagram components.
  • Use container groups to logically organize elements.
  • Customize embedded graphics for a personalized touch.

On this page