Math, code, and diagrams
Math (KaTeX)
Section titled “Math (KaTeX)”Baram supports LaTeX math rendering powered by KaTeX.
Block Math:
- Type
$$and press Enter, or useCmd+Shift+M - Write your LaTeX formula in the editing area
- A live preview renders below as you type
$$E = mc^2$$Inline Math:
Type $formula$ to create an inline equation. When your cursor is inside the formula, you see the LaTeX source. Move away to see the rendered result.
Code Blocks (CodeMirror 6)
Section titled “Code Blocks (CodeMirror 6)”Baram embeds a full CodeMirror 6 editor for each code block:
- 14 supported languages: JavaScript, TypeScript, Python, Rust, Go, Java, C++, HTML, CSS, JSON, SQL, PHP, XML, YAML
- Language selection dropdown at the top of each block
- Syntax highlighting
- Languages are lazy-loaded for performance
To create a code block, type ``` followed by an optional language name and press Enter:
```pythondef hello(): print("Hello, Baram!")```Mermaid Diagrams
Section titled “Mermaid Diagrams”Create diagrams using Mermaid.js syntax:
- Type
/mermaidor pressCmd+Shift+D - Write your Mermaid diagram code
- A live preview renders below as you type
Supports all Mermaid diagram types: flowchart, sequence, class, state, entity-relationship, gantt, pie, mindmap, and more.
```mermaidgraph TD A[Start] --> B{Decision} B -->|Yes| C[Do something] B -->|No| D[Do something else]```
