Code and formulas

Notes include two kinds of blocks aimed at technical content: the code block, with syntax highlighting per language and an automatic code formatter, and mathematical formulas written in LaTeX, which appear both inline in the text ("Inline math") and highlighted on their own line ("Math block"). This page explains how to insert each one, how to pick the code language and format a snippet, and how to write and edit formulas — including the "Formula builder" with its symbol palette and formula library.

Code blocks

The code block displays snippets in a monospaced font and preserves indentation, ideal for keeping commands, configurations, and programming examples inside the note.

How to insert

  1. 1Type "/" where you want the snippet to open the insert menu.
  2. 2Start typing "code" to filter the list and choose "Code block".
  3. 3Alternatively, type three backticks (```) at the start of an empty line — it converts into a code block instantly.
  4. 4Paste or type the code inside the block.

Language and syntax highlighting

With the cursor inside the block, a floating bar shows the "Language" selector: a searchable list with the most common languages (JavaScript, TypeScript, Python, SQL, JSON, YAML, HTML, CSS, Bash, Rust, Go, LaTeX, and many more). Once the language is set, keywords, strings, numbers, and comments appear in different shades — and the color theme adapts automatically to light and dark mode. Without a language, the snippet stays readable, just without the coloring.

Format code

Next to the language selector there is a "Format code" button. It reindents and normalizes the snippet deterministically (no AI involved) for supported languages: JavaScript, TypeScript, JSX/TSX, JSON, CSS, SCSS, Less, HTML, Markdown, YAML, and GraphQL. For other languages the button stays disabled ("Formatting not available for this language"), and if the code has syntax errors nothing is changed — you just get a notice.

For a single term in the middle of a sentence (a function name, a variable), prefer the "Inline code" formatting instead of a whole block — it keeps the text flowing.

Mathematical formulas

Formulas are written in LaTeX, the standard notation for math, and rendered with high typographic quality. There are two forms: "Inline math", in the middle of a paragraph, and "Math block", highlighted on its own line.

Inline formula

Insert it through the "/" menu ("Inline math") or simply write the expression between dollar signs — it converts as soon as you close the second dollar sign:

$a^2 + b^2 = c^2$

Click a rendered inline formula to edit its LaTeX in place; press Enter to confirm or Esc to cancel. The ƒₓ button next to the input opens the "Formula builder".

Math block

  1. 1Type "/" and choose "Math block" — or type two dollar signs ($$) at the start of an empty line.
  2. 2Double-click the block to type the LaTeX (Ctrl + Enter confirms, Esc cancels), or use the ƒₓ button to open the "Formula builder".
  3. 3Click the block once to select it: a floating bar appears with "Align left", "Align center", and "Align right", plus "Show as figure (with caption)".
  4. 4In figure mode, a caption field appears under the formula — useful for numbered equations in academic notes.

The Formula builder

The "Formula builder" is a helper window for anyone who does not write LaTeX by heart. It combines:

  • A text area with the LaTeX expression and a live "Preview" underneath.
  • A palette of buttons organized by category ("Structures", operators, Greek letters…) that insert the corresponding snippet.
  • A "Library" of well-known math and physics formulas ready to load and adapt.
  • The "Insert" button, which puts the finished expression into the note.

LaTeX notation

Inline or in a block, the expression follows LaTeX notation. Some common patterns:

Exponents
Use "^" to raise — for example, x^2 for x squared.
Subscripts
Use "_" for a subscript — for example, a_1 for a-sub-one.
Fractions
Use \frac{numerator}{denominator} for a fraction.
Greek symbols
Write the name preceded by a backslash, such as \alpha, \beta, or \pi.
Group more than one character in an exponent or subscript with braces: x^{10} raises to the tenth, while x^10 raises only the "1" and leaves the "0" beside it.