How nestmold/notratlatexplugin works
Notrat LaTeX 助手 is a Notrat plugin for editing .tex documents, navigating their structure, validating references, compiling PDFs, and exporting PDF or self-contained HTML. The main workflow starts when a user opens a LaTeX file in the host: the editor presents visual, source, or split views, while the outline supports navigation; users can then compile, validate, or export through the plugin’s MCP server. The README documents additional backup/history and AI-tool capabilities. Several server implementations were not sampled, so those capabilities are shown at the documented subsystem level without asserting internal call wiring.
Main entry points: index.js MCP tool server · editor.tsx Document editor · export-html.js Document export · main.tsx Tool panel
Components 18
Plugin interface
- Document editor
panels/editor.tsx - Tool panel
panels/main.tsx - Outline panel
panels/outline.tsx - LaTeX code blocks
panels/code-renderer.tsx
Editing and preview
- Preview renderer
server/preview-core.js - Lossless document model
server/docmodel.js - Visual editing core
server/wysiwyg.js - Transaction history
server/txlog.js
MCP services
- MCP tool server
server/index.js - Shared server utilities
server/contrib.js - Engine installation
server/engine-install.js
Compile and export
- PDF compilation
server/index.js - Document export
server/export-html.js - PDF rasterization
server/pdf-raster.js
Other components
- LaTeX author
- Notrat host
- TeX workspace
- TeX engine
Connections 25
- LaTeX author → Notrat host: opens document
- Notrat host → Document editor: mounts editor
- Notrat host → Tool panel: mounts tools
- Notrat host → Outline panel: mounts outline
- Notrat host → LaTeX code blocks: renders messages
- Document editor → TeX workspace: edits document
- Document editor → Preview renderer: renders preview
- Document editor → Visual editing core: edits visual blocks
- Document editor → Lossless document model: uses document model
- Document editor → Transaction history: records history
- Document editor → MCP tool server: requests assets
- Outline panel → MCP tool server: requests outline
- Tool panel → MCP tool server: calls tools
- LaTeX code blocks → MCP tool server: loads KaTeX assets
- MCP tool server → TeX workspace: reads and writes files
- MCP tool server → Shared server utilities: uses utilities
- MCP tool server → PDF compilation: dispatches compile
- MCP tool server → Document export: dispatches export
- MCP tool server → PDF rasterization: requests rasterization
- PDF compilation → TeX engine: runs compiler
- PDF compilation → TeX workspace: reads source
- Document export → TeX workspace: reads source and assets
- Document export → PDF compilation: produces PDF
- PDF rasterization → TeX engine: uses raster tools
- Engine installation → TeX engine: installs engine