Code blocks and equations

Syntax highlighted code, TeX equations, and two ways to draw a diagram.

3 min readUpdated

Code Blocks#

The slash menu does not open inside a code block.

Insert one from the slash menu by choosing Code Block or from the Insert menu by choosing Code. Each block includes a language picker with around ninety languages. Use "Search language…" to narrow the list, and you'll see "No language found." if nothing matches. A copy button in the corner copies the entire block.

Equations#

BlockWhere It Goes
EquationA TeX equation on its own line. The editor prompts "Add a Tex equation", with E = mc^2 as the placeholder.
Inline EquationA TeX expression inside a sentence, available from the Inline group in the slash menu.
Mark as equationAvailable on the selection toolbar. It turns text you've already typed into an inline equation.
Diagrams
• Excalidraw: A hand drawn style whiteboard that you can draw on directly in the page.
• Code Drawing: A diagram written as text and rendered for you, for flowcharts and graphs.
Dates
The Date entry in the slash menu inserts an inline date into the sentence. Select it to open a calendar with "Pick a date".

Was this article helpful?

Keep reading