Canvas

Drawing tools, blocks, and connections

The canvas is your visual workspace for building and connecting mathematical models. It uses an Excalidraw-inspired tool system with drag-and-drop blocks and connections.

Tools

The canvas toolbar sits at the top center. Switch tools with keyboard shortcuts or by clicking.

ToolKeyDescription
FormulaFClick to place a formula block. Type LaTeX inline.
DataDClick to place a data block. Pick a dataset from the popup.
TransformTClean/preprocess tool for data blocks.
EvaluateECompute a formula symbolically (no training needed).
DrawPFreehand draw. MathExec uses OCR to recognize handwritten formulas.

💡Tip

Press Esc to return to the default pointer mode from any tool.

Block Types

Formula Blocks

Formula blocks contain LaTeX expressions that compile to PyTorch models. They appear with a dark background and teal accents. Each formula block has:

  • Input port (left) — accepts data connections
  • Output port (right) — feeds into other formula blocks in pipeline mode
  • Recognition status — green check when the formula has been parsed

Data Blocks

Data blocks represent datasets on the canvas. They have green/emerald styling and are always in a "recognized" state. They show:

  • Dataset name and row count
  • Output port (right) — connect to formula block inputs

Connections

Drag from an output port to an input port to create a connection. Connections define the data flow for training and pipeline compilation.

  • Data block output → Formula block input: wires a dataset to a model
  • Formula block output → Formula block input: chains models in pipeline mode

Click a connection line to select it, then press Delete or Backspace to remove it.

Canvas Navigation

  • Pan: Click and drag on empty canvas space
  • Zoom: Scroll wheel or pinch gesture
  • Fit to view: Cmd+0 to center all blocks on screen
  • Select: Click a block or connection to select it
  • Delete: Delete or Backspace removes the selected element
  • Undo: Cmd+Z to undo the last action

Paste LaTeX

With the Formula tool active, paste LaTeX from your clipboard (Cmd+V). If the clipboard text contains LaTeX characters (\, ^, _), MathExec creates a formula block automatically.