@jorgelorenz/opencode-latex-pdf-reviewOpenCode plugin for synchronized LaTeX <-> PDF review with SyncTeX
0
54
12 in 7 days
28.5
Multi-signal model
1 month ago
2026-07-05
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@jorgelorenz/opencode-latex-pdf-review@1.1.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@jorgelorenz/opencode-latex-pdf-review@1.1.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @jorgelorenz/opencode-latex-pdf-reviewopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode plugin for PDF <-> LaTeX synchronized review using SyncTeX.
The plugin opens a local split-view UI: PDF on the left, LaTeX source on the right. Clicking in the PDF resolves the source line with SyncTeX, and review comments are submitted to the active OpenCode session.
Install
Add the package to your OpenCode config:
{
"plugins": [
"@jorgelorenz/opencode-latex-pdf-review"
]
}
No manual copying into .opencode/plugins is required.
Prerequisites
- OpenCode runtime with Bun-enabled plugins
- Bun installed and available on
PATH - SyncTeX binary (
synctex) available onPATH - A PDF compiled with SyncTeX enabled
Compile with SyncTeX (examples):
pdflatex --synctex=1 main.tex
latexmk -pdf -synctex=1 main.tex
Both main.pdf and main.synctex.gz (or main.synctex) must exist.
Usage
Run in OpenCode:
/latex-pdf-review
Or with an explicit PDF path:
/latex-pdf-review chapters/chapter1.pdf
Supported Operating Systems
- Linux
- macOS
- Windows
- WSL
The plugin uses Bun APIs and spawn-style process execution (no shell-specific script dependency at runtime).
Startup Validation
On startup, the plugin validates:
- Bun runtime is available
bunexecutable exists onPATHsynctexexecutable exists onPATH- target PDF exists
.synctex.gz/.synctexexists, or attempts safe auto-compile
Validation failures return clear, user-facing error messages in OpenCode.
Security
The local HTTP server is hardened for local-only usage:
- binds to
127.0.0.1only - validates API input payloads
- rejects path traversal and blocks filesystem access outside workspace
- serves only known UI assets and explicit workspace files
- uses a random per-session token for API authorization
Troubleshooting
synctex not found:
- Install TeX Live (Linux/macOS/WSL) or MiKTeX (Windows)
- Verify with:
synctex --version
PDF found but no SyncTeX mapping:
- Recompile with
--synctex=1 - Confirm
.synctex.gzexists next to the PDF
Browser UI does not open automatically:
- Copy the URL from the OpenCode toast and open it manually
Development
bun install
bun run typecheck
bun run lint
bun run build
Release
Publishing is automated with GitHub Actions on version tags:
git tag v1.0.0
git push origin v1.0.0
The workflow runs typecheck, lint, build, and then publishes to npm.
License
MIT