Neural Sketch

Diagramming Basics

An introduction to creating structured diagrams

Easily recreate Anthropic-like, publication-ready diagrams that clarify your research, engage your readers, and spotlight the insights that matter most.

Example - 1

examples/diagram-0.tex
\begin{nskFigure}[]
  % blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <<<
  \nskBlock[text-center=Say\\ Austin, fill=nskSecondaryAccent, border-type=dashed]
  \nskBlock[text-center=, last-pos={below left=}, fill=nskRed, pattern=rhatch]
  \nskBlock[text-center=Texas, last-pos={right=}]
  \nskBlock[text-center=capital, pos={below left=of \nskID{2}}]
  \nskBlock[text-center=state, last-pos={right=}]
  \nskBlock[text-center=Dallas, last-pos={right=}]
 
  % connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <<<
  \nskConnect[from=\nskID{1}, to=\nskID{4}, arrow-tip={-Straight Barb}]
  \nskConnect[from=\nskID{2}, to=\nskID{5}, arrow-tip={-Straight Barb}]
  \nskConnect[from=\nskID{4}, to=\nskID!{1}, arrow-tip={-Straight Barb}]
 
  \nskConnect[
    from=\nskID{3}.north, to=\nskID{5}.south,
    arrow-tip={-Straight Barb},
    bend-type=double, bend-direction=up, bend-distance=5mm,
  ]
 
  \nskConnect[
    from=\nskID{2}.north, to=\nskID{4}.south,
    arrow-tip={-Straight Barb},
    bend-type=double, bend-direction=up, bend-distance=5mm,
  ]
 
  \nskConnect[
    from=\nskID!{2}.north, to=\nskID!{1}.south,
    arrow-tip={-Straight Barb},
    bend-type=double, bend-direction=up, bend-distance=5mm,
  ]
 
\end{nskFigure}

Example - 2

examples/diagram-1.tex
\begin{nskFigure}[]
	% blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <<<
	\nskBlock[
		text-center=Rhymes with "it", width=3.5cm,
		fill=nskSecondaryAccent, stack=true, stack-count=double
	]
	\nskBlock[
		text-center=rabbit,
		stack=true, stack-count=double,
		last-pos={above left=1cm and -1cm}
	]
	\nskBlock[
    text-center=habit,
    stack=true, stack-count=double,
    pos={above right=1cm and -1cm of \nskID!{1}}
	]
 
	\nskMark[at={\nskID!{1}}.north, shift-x=3mm]
	\nskMark[at={\nskID!{1}}.north, shift-x=-3mm]
 
	% connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <<<
  \nskConnect[
    from=\nskID{1},to=\nskID!{2},
    arrow-tip={-Straight Barb},
    bend-type=double, bend-direction=up, bend-distance=4mm,
  ]
  \nskConnect[
    from=\nskID{2},to=\nskID!{3},
    arrow-tip={-Straight Barb},
    bend-type=double, bend-direction=up, bend-distance=4mm,
  ]
 
\end{nskFigure}

Example - 3

examples/diagram-2.tex
\begin{nskFigure}[]
	% blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <<<
	\nskBlock[
		text-center=BOMB, width=3.5cm,
		fill=nskOrange, border-type=dashed,
	]
 
	% dummy
	\nskMark[last-pos={below left=2cm and 2.7cm}]
 
	\foreach \c in {B, O, M, B} {
			\nskBlock[
				text-center=\c, height=1.1cm,
				stack=true, stack-count=double,
				last-pos={right=}
			]
 
		}
 
	\nskBlock[
    text-center=first letter, width=3.5cm,
    fill=nskSecondaryAccent, stack=true, stack-count=double,
    pos={below=4cm of \nskID!{1}}
	]
 
	% connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <<<
	\foreach \i in {3,...,6} {
    \nskConnect[
      from=\nskID!{\i}.north,to=\nskID!{1}.south,
      arrow-tip={-Straight Barb},
      bend-type=double, bend-direction=up, bend-distance=4mm,
    ]
 
    \nskConnect[
      from=\nskID!{\i}.south, to=\nskID!{7}.north,
      arrow-tip={-Straight Barb},
      bend-type=double, bend-direction=down, bend-distance=4mm,
    ]
}
\end{nskFigure}

Example - 4

examples/diagram-3.tex
\begin{nskFigure}[]
	\nskContainer[border-radius=8mm]{
	\nskBlock*[type=rounded rectangle, text-center=ENABLE, \s]
	\nskBlock[
		last-pos={below=},
		text-center={\textbf{REQUEST}\\ \small \color{nskFg!70!nskBg} Enable},
		height=2cm, fill=nskOrange!70!nskBg, border-color=nskOrange,
    pattern=hatch, pattern-opacity=.1, stack=true, stack-count=double,
	]
	\nskBlock[
		pos={right=4cm of \nskID{2}},
    text-center={\textbf{NEW REQUEST}\\ \small \color{nskFg!70!nskBg} Enable},
		height=2cm, fill=nskOrange!70!nskBg, border-color=nskOrange,
    pattern=dots, pattern-opacity=.1, stack=true, stack-count=double,
	]
	\nskBlock*[type=rounded rectangle, text-center=APPROVE, last-pos={below=}, \s]
 
	\nskConnect[id=rr, from=\nskID!{2}.east, to=\nskID!{3}.west,
    bend-type=double, bend-direction=right, corner-radius=1.2cm,
    bend-distance=2cm, arrow-type=dashed, arrow-tip={Circle-Straight Barb},
    shorten-from=-1mm,
	]
	\nskConnect[from=\nskID!{1}, to=\nskID!{2},arrow-tip={-Straight Barb}, color=nskMainAccent]
	\nskConnect[from=\nskID!{3}, to=\nskID!{4},arrow-tip={-Straight Barb}, color=nskOrange]
  \nskMarkPath[at=.5]{rr}{\nskMark[]}
  \nskBlock[
    type=rounded rectangle, pos={at=(\nskID{1})},
    text-center={\scriptsize \nskIcon[name=send, width=2.5mm] Request sent},
    width=0cm, padding-y=3mm, fill=nskGreen, shadow=false,
  ]
	}
\end{nskFigure}

On this page