This monorepo contains the PreTeXt Tools VS Code extension and its supporting packages. PreTeXt is an XML-based authoring language for scholarly documents.
| Package | Description |
|---|---|
pretext-tools |
VS Code extension — language support, CLI front-end, live preview, visual editor, formatter, and more |
@pretextbook/completions |
Reusable completion/intellisense engine |
@pretextbook/schema |
Schema-based validation (duplicate ids, cross-references, and more) |
@pretextbook/format |
PreTeXt document formatter library |
@pretextbook/latex-pretext |
LaTeX-to-PreTeXt conversion |
@pretextbook/import |
Import wizard for turning existing documents into PreTeXt projects |
@pretextbook/pretext-html |
PreTeXt-to-HTML rendering in pure JS (official XSLT via WebAssembly), powering Instant/Live Preview |
@pretextbook/visual-editor |
React/TipTap-based WYSIWYG editor (webview UI) |
@pretextbook/ptxast |
TypeScript types for the PreTeXt AST |
@pretextbook/remark-pretext |
Markdown ⇄ PreTeXt AST conversion |
@pretextbook/ptxast-util-to-mdast |
PreTeXt AST ⇄ Markdown AST conversion |
This workspace uses npm workspaces. After cloning, install dependencies with:
npm install# Build the VS Code extension (and all dependencies)
npm run build
# Build in watch/dev mode
npm run build:dev
# Build a specific package
npm run build -w @pretextbook/format# Run all tests
npm test
# Test a specific package
npm run test -w @pretextbook/completionsSee Testing Guide for detailed instructions on running unit and integration tests for the VS Code extension, understanding the two-layer test architecture, and troubleshooting common issues.
npm run lintnpm run refresh:schemasLike this project? Star it on GitHub!
Have an idea or suggestion? Open a feature request.
Found something wrong? File an issue.
Pull requests welcome.