Adobe Creative Cloud Web Add-on for Adobe Express
Convert LaTeX mathematical equations into high-quality PNG images and insert them as native bitmap graphics into Adobe Express documents.
- LaTeX to PNG Conversion: Render LaTeX equations using KaTeX and convert them to PNG images
- Native Adobe Express Integration: Insert equations as bitmap images that can be moved, resized, and edited
- Rich Example Library: 17+ example equations covering algebra, calculus, matrices, and more
- LaTeX Validation: Real-time syntax checking before conversion
- Quick Reference Guide: Built-in LaTeX cheatsheet for common commands
Stemvex uses Adobe's two-runtime architecture:
- UI Runtime (iframe): Handles LaTeX processing using KaTeX and html2canvas
- Document Sandbox Runtime: Manages Adobe Express document manipulation
- Bridge Communication: Secure data transfer between runtimes via ArrayBuffer
- Node.js (v16 or later)
- npm
- Adobe Express account
- Modern web browser (Chrome, Firefox, Edge, or Safari)
- Clone or extract this repository
- Install dependencies:
npm installStart the development server:
npm startThis will start a local development server (typically at http://localhost:5241).
Build the project:
npm run buildThe compiled add-on will be output to the dist/ directory.
Create a distributable package:
npm run package- Open Adobe Express in your browser
- Enable Developer Mode in settings
- Click Add Your Add-on
- Enter the development server URL (e.g.,
http://localhost:5241) - The Stemvex panel will appear in your Adobe Express workspace
- Enter LaTeX code in the text area (without
$delimiters) - Use the example buttons to load pre-made equations
- Click Insert Equation to render and insert into your document
- The equation appears as a PNG image that you can move and resize
E = mc^{2} # Einstein's equation
\frac{-b \pm \sqrt{b^{2} - 4ac}}{2a} # Quadratic formula
\int_{a}^{b} f(x) \, dx # Integral
\sum_{i=1}^{n} i = \frac{n(n+1)}{2} # Summation
\begin{pmatrix} a & b \\ c & d \end{pmatrix} # Matrixstemvex/
βββ src/
β βββ engines/
β β βββ math/
β β βββ MathEngine.ts # LaTeX β PNG conversion engine
β βββ sandbox/
β β βββ commands/
β β β βββ insertMath.ts # Document manipulation command
β β βββ code.ts # Sandbox runtime entry point
β β βββ tsconfig.json
β βββ ui/
β β βββ components/
β β β βββ App.tsx # Main application component
β β β βββ MathInput.tsx # LaTeX input component
β β βββ index.tsx # UI runtime entry point
β β βββ styles.css # Tailwind CSS imports
β β βββ global.d.ts
β β βββ tsconfig.json
β βββ models/
β β βββ DocumentSandboxApi.ts # Runtime bridge interface
β βββ index.html # HTML entry point
β βββ manifest.json # Add-on manifest
βββ package.json
βββ tsconfig.json
βββ webpack.config.js
βββ tailwind.config.js
βββ postcss.config.js
- TypeScript 5.3.2
- React 18.2.0
- Webpack 5.98.0
- KaTeX 0.16.27 - Fast LaTeX rendering
- html2canvas 1.4.1 - HTML to PNG conversion
- TailwindCSS 3.4.19
- Adobe Spectrum Web Components 1.7.0
- Adobe Creative Cloud Web Add-on SDK
- Adobe Express Document SDK
The add-on converts LaTeX to PNG (bitmap) rather than SVG (vector) because:
- Adobe Express SDK has better support for bitmap images
- Ensures consistent rendering across all platforms
- Avoids complex SVG path conversion issues
User Input (LaTeX)
β
UI Runtime: MathEngine.convertToPNG()
β KaTeX renders LaTeX to HTML
β html2canvas converts HTML to PNG
β PNG Blob β ArrayBuffer
β
Bridge: runtime.apiProxy()
β
Sandbox Runtime: insertMath()
β ArrayBuffer β Blob
β editor.loadBitmapImage()
β editor.createImageContainer()
β Added to document
npm install- Install dependenciesnpm start- Start development servernpm run build- Build for productionnpm run package- Create distribution packagenpm run clean- Remove build artifacts
Check browser console for errors. Ensure html2canvas is rendering correctly.
- Use braces for superscripts/subscripts:
x^{2}notx^2 - Don't include
$delimiters (they're stripped automatically) - Check bracket matching with the built-in validator
- Ensure all dependencies are installed:
npm install - Clear node_modules and reinstall if needed
- Check Node.js version is 16 or later
- Verify development server is running (
npm start) - Check that Developer Mode is enabled in Adobe Express
- Ensure the URL is correct (typically
http://localhost:5241)
This project is provided as-is for educational and development purposes.
This is a complete, production-ready add-on. Future features can follow the same architectural pattern:
- Code syntax highlighting
- Data visualization
- Diagram generation
Built with β€οΈ for technical storytellers