Learn Proseport · Lesson 6 of 11 · 7 min
Math, diagrams and code
Write LaTeX equations, draw Mermaid diagrams from text and highlight code in dozens of languages.
- Write inline and block equations
- Draw flowcharts and sequence diagrams from text
- Highlight code blocks
Inline math
Wrap LaTeX in single dollar signs:
$e^{i\pi} + 1 = 0$. ⌃⌘M inserts the pair for you.Block equations
Put an equation between lines of
$$to give it its own centred line. Use ⌃⇧⌘M.Diagrams from text
Start a code block with
```mermaidand describe the diagram, for exampleflowchart LRfollowed byWrite --> Preview --> Export. Proseport draws it in the preview.More diagram types
Mermaid also draws sequence diagrams, Gantt charts, pie charts, class diagrams and more. 04 Diagrams in the examples has one of each to copy.
Highlighted code
Name the language after the opening fence, such as
```pythonor```swift, and the preview highlights it.
Open 03 Math and Science in Split view and edit an equation. The preview updates as you type.
Shortcuts from this lesson
| ⌃⌘M | Inline math |
| ⌃⇧⌘M | Math block |
| ⌥⌘C | Code block |