๐Ÿ“

Text Note

Layout
Run the live example Free ยท no sign-up ยท runs in your browser

The TextNote block provides frameless, rich-text on-canvas annotation for documenting block diagram models, equations, operating instructions, and subsystem architectures. It has no signal inputs or outputs and introduces zero computational overhead to the simulation engine. The block features integrated mathematical formula rendering (LaTeX/KaTeX math between dollar signs formulaformula), automatic or manual tile sizing, configurable typography and color palettes, and smart dynamic color synchronization with anchored signal wires.

Mathematical Model

The block operates as a static visual layout annotation. Incoming textual strings SS and styling attributes are rendered directly onto the canvas document object model without affecting numerical solver states:

DOMnote=renderโก(SuserNotes,stylevisual)\text{DOM}_{\text{note}} = \operatorname{render}(S_{\text{userNotes}}, \text{style}_{\text{visual}})

Text enclosed within dollar signs is parsed and rendered via KaTeX mathematical typesetting:

$formula$โ€…โ€ŠโŸนโ€…โ€ŠKaTeX(formula)\$ \text{formula} \$ \implies \text{KaTeX}(\text{formula})

When textColor = "signal" and the note is anchored to a signal connection wire, the note text dynamically inherits the wire's stroke color:

colortext={colorwire,textColor="signal"โˆงanchoredcolorpalette,otherwise\text{color}_{\text{text}} = \begin{cases} \text{color}_{\text{wire}}, & \text{textColor} = \text{"signal"} \land \text{anchored} \\ \text{color}_{\text{palette}}, & \text{otherwise} \end{cases}

Parameters

Parameters Label Type Default Description
userNotes Content text
autoSize Auto-size boolean true
fontSize Size select medium
textColor Text color select default Text colour. "Match signal" follows the anchored signal's colour.
fillColor Fill select none
border Border select accent
textAlign Align select left

Usage Examples

Example 1: Documenting Physical Plant Differential Equations

Placing a TextNote above an interconnected mass-spring-damper diagram to present the underlying second-order Newton-Euler equation. Writing userNotes = "Newton-Euler Balance:\nmxยจ+cxห™+kx=F(t)m \ddot{x} + c \dot{x} + k x = F(t)" renders a textbook KaTeX equation directly on the canvas, clarifying the mechanical dynamics for students and collaborating engineers.

Example 2: Signal-Matched Wire Callout and Operating Limit Warning

Annotating a critical control voltage connection. Configuring userNotes = "Maximum Motor Armature Voltage: ยฑ24V", textColor = "signal", fillColor = "yellow", and border = "solid". Anchoring the note to the motor driver wire synchronizes text color with the connection wire while the yellow box highlights electrical limits.

Remarks & Best Practices

  • KaTeX Mathematical Typesetting: Text enclosed between single dollar signs (e.g. Jฯ‰ห™=ฯ„J \dot{\omega} = \tau) is rendered with KaTeX mathematical typography without external plugin dependencies.
  • Signal Color Synchronization: Selecting textColor = "signal" automatically tracks the color of the connection line to which the note is anchored, ensuring visual consistency across complex multi-branch diagrams.
  • Zero Simulation Overhead: Ignored during simulation compilation and topological sorting; causes zero numerical solver delay or memory allocation.
  • Markdown Line Breaks: Supports standard multi-line text input with automatic word wrapping.

Related Components

  • Area: Visually bounds and groups related functional subsystems with a shaded background container.
  • Subsystem: Encapsulates complex block topologies into modular, reusable canvas components.
  • NumericDisplay: Real-time numerical signal readout.
  • Scope: Multi-channel graphical waveform visualization.