Quick Start
Build your first diagram with Neural Sketch in minutes.
Introduction
Opinionated. Minimal. Precise.
But fully customizable—when it needs to be.
Neural Sketch (neural-sketch
) is a modern, opinionated, yet highly customizable package for crafting consistent, publication-ready diagrams with minimal effort.
A design grammar for structured technical ideas
It combines an intuitive, boilerplate-free syntax with a powerful key–value configuration system, allowing you to quickly produce top-tier diagrams—while retaining complete control over fine-grained customization when needed.
Built on l3build
and powered by modern paradigms such as expl3
and l3keys
, it delivers a fast, robust, and extensible framework for communicating ideas with precision.
This is not just a package. It's a design system.
Built on expl3
and l3keys
. Tested with l3build
.
Tailored for AI/ML researchers.
Bundles and Modules
Neural Sketch is modular. But modularity alone isn't enough.
To reduce friction, we provide bundles:
small, coherent sets of
modules
designed to work together.
Each module addresses a specific concern—layout, grouping, color, annotation, positioning, or routing.
You can load them all. Or only what you need.
The goal is not to overwhelm. The goal is to help you begin—with a toolkit that grows as your diagrams do.
Why selectively load modules?
Not every diagram needs every feature. Selective loading keeps things minimal—faster compiles, fewer surprises. Learn more in Why Module Loading.
Geometric Primitives
nsk@block
Module Loader
nsk@loader
Styles
nsk@styles
Colors
nsk@colors
Groups
nsk@groups
Containers
nsk@containers
Coordinates
nsk@coords
Geometric Primitives
nsk@block
Module Loader
nsk@loader
Styles
nsk@styles
Colors
nsk@colors
Groups
nsk@groups
Containers
nsk@containers
Coordinates
nsk@coords
Geometric Primitives
nsk@block
Module Loader
nsk@loader
Styles
nsk@styles
Colors
nsk@colors
Groups
nsk@groups
Containers
nsk@containers
Coordinates
nsk@coords
Geometric Primitives
nsk@block
Module Loader
nsk@loader
Styles
nsk@styles
Colors
nsk@colors
Groups
nsk@groups
Containers
nsk@containers
Coordinates
nsk@coords
Arrow Routing & Bridging
nsk@bridges
Annotations
nsk@annotations
Decorations
nsk@decorations
Conditional Rendering
nsk@render
Measurement Tools
nsk@measure
Zoom Areas
nsk@zoom
Dark Mode Support
nsk@pkgopts
Arrow Routing & Bridging
nsk@bridges
Annotations
nsk@annotations
Decorations
nsk@decorations
Conditional Rendering
nsk@render
Measurement Tools
nsk@measure
Zoom Areas
nsk@zoom
Dark Mode Support
nsk@pkgopts
Arrow Routing & Bridging
nsk@bridges
Annotations
nsk@annotations
Decorations
nsk@decorations
Conditional Rendering
nsk@render
Measurement Tools
nsk@measure
Zoom Areas
nsk@zoom
Dark Mode Support
nsk@pkgopts
Arrow Routing & Bridging
nsk@bridges
Annotations
nsk@annotations
Decorations
nsk@decorations
Conditional Rendering
nsk@render
Measurement Tools
nsk@measure
Zoom Areas
nsk@zoom
Dark Mode Support
nsk@pkgopts
At present, Neural Sketch ships with a single bundle: the core.
It consists of 13 foundational modules—handling layout, grouping, styling, annotation, positioning, and routing.
This core forms the structural backbone for most diagrams. Future bundles will extend this foundation—tailored to specific domains, dynamic interactions, or alternative visual grammars.
Want to learn more?
Read our in-depth What is Neural Sketch? Introduction.
Key Benefits
Publication-Ready by Default
Colors, borders, spacing, line thicknesses—everything is tuned for the aesthetic standards of top AI/ML venues. No need to wrestle with TikZ styles.
Concise by Construction
You define what matters: blocks, positions, annotations.
Everything else—IDs, alignment, spacing—is handled for you. Less code. Fewer distractions. Faster iteration.
Precise When You Need It
Every visual parameter—padding, corners, connectors, stacks, patterns—is exposed via keys. Override only what you need, when you need it.
Global Consistency, Local Overrides
Change a single style key—and update every figure across your document.
Consistency becomes effortless.
Built for Transferrability
Your diagrams shouldn't be locked to one medium.
Neural Sketch adapts gracefully—from papers to slides, posters, and web formats.
Supports dark mode, vector-safe rendering, and pixel-perfect styling for flexible reuse across platforms, devices, and display contexts.
Quick Start
Follow these simple steps to begin using Neural Sketch in your document.
Begin by loading the Neural Sketch package in your document preamble.
This step gives you immediate access to the core functionality and styles needed for creating your diagrams.
Neural Sketch is modular
. Activate all modules at once with:
You can later refine module loading for efficiency by choosing only necessary modules. (See Module Loading for details.)
Creating Your First Diagram
Now you're ready to create your first Neural Sketch diagram.
Let's begin with a simple composition—a pair of labeled blocks, neatly grouped inside a container and connected with a line.
Example Diagram
Let's craft a simple figure featuring grouped blocks neatly encapsulated within a labeled container:
What's Happening Here?
-
\nskFigure
The figure environment. It initializes the drawing space and resets internal counters, ensuring consistency across diagrams. -
\nskContainer
Think of it as a bounding box with structure and intent. It automatically wraps whatever is inside, adds padding, and can display a label—like a titled region. -
\nskBlock
The core primitive. Each block is styled by default and positioned using smart relative references likelast-pos
. You can control its appearance with keys like fill, border-type, or text-center. -
\nskConnect
Draws an arrow or connector between blocks. Here, it links the block with IDcat
to the one labeleddog
.
This is the heart of Neural Sketch: A declarative syntax that lets you focus on structure, not scaffolding.
Dark Mode Included
This diagram works automatically in dark mode—no extra code, no duplicated styles. Neural Sketch adjusts colors and contrast behind the scenes.
What's Next?
Neural Sketch empowers you to effortlessly create professional, publication-quality diagrams. To dive deeper, explore:
-
What is Neural Sketch? Dive into Neural Sketch's philosophy, core principles, and why it's tailored for top-tier research publications.
-
Notation & Conventions Learn the naming principles and visual grammar that unify diagrams.
-
Package Options Discover how to customize global styling—colors, borders, padding, and more—to align diagrams with your unique visual requirements.
-
Module Loading Learn how to optimize your workflow and reduce compilation overhead by selectively loading only the modules you need.
-
Color Palette Explore Neural Sketch's curated color scheme, and easily adapt or extend it to fit your personal or institutional style guidelines.
Happy Diagramming! 🎨