# hoja > Theme-aware terminal PDF, arXiv, and live LaTeX/Markdown reader for Ghostty and Rex. Pixel-exact equations over the Kitty Graphics Protocol, 64^3 OKLab ink transfer, odd/even margin auto-crop, and 2x equation region handoff over OSC 52. - Canonical URL: https://hoja.crafter.run - About & FAQ: https://hoja.crafter.run/about - Repository: https://github.com/crafter-station/hoja - License: MIT - Author: Railly Hugo (https://www.railly.dev) - Publisher: Crafter Station (https://crafter.run) - Version: 0.1.0 - Full documentation for LLMs: https://hoja.crafter.run/llms-full.txt ## What hoja does 1. **Pixel-exact rendering over Kitty Graphics:** Renders PDFs through `pdfium-render` (Apache/BSD, MIT-compatible) directly into Ghostty and Rex instead of converting math into broken terminal text. 2. **OKLab perceptual theme recoloring:** Reads terminal `bg` and `fg` via OSC 10/11 and maps paper lightness to `bg` and neutral ink to `fg` via a 64^3 OKLab LUT (`src/recolor.rs`), preserving vector diagram hue instead of inverting red to cyan, and masking embedded raster photos occupying under 75% of page area. 3. **Odd/even margin auto-crop for split panes:** Strips publication whitespace and ignores single-page vertical arXiv margin stamps so formulas fit narrow coding-agent splits in `fit-w` mode. 4. **2x pixel region agent handoff:** Dragging a rectangle over any equation (or pressing `y` / `@`) saves `region.png` (2x crisp paper ink), `selection.md`, and `meta.json` under `~/.cache/hoja/handoff/` and copies the path via OSC 52 + `pbcopy` to paste straight into `fx`, Codex, or Claude Code. 5. **Live `.md` and `.tex` watch:** Compiles Markdown with `$...$`/`$$...$$` via `typst` (`cmarker` + `mitex`, ~100 ms warm) and `.tex` via `tectonic` with `--watch` without losing scroll position. ## Install ```sh cargo install --git https://github.com/crafter-station/hoja hoja setup # downloads and SHA-256 verifies pinned libpdfium hoja doctor # verifies Kitty graphics, OSC 10/11, libpdfium, tectonic, typst hoja 1706.03762 # open an arXiv paper directly in your terminal theme hoja rex install # install Rex Cmd+Shift+P palette actions ``` ## Non-interactive CLI for AI agents ```sh hoja 1706.03762 --text -p 4 hoja 1706.03762 --png -p 4 -o /tmp/page4.png --width 1800 ```