Releases: rinadelph/htex
Releases · rinadelph/htex
🚀 Launch - htex v1.0.0
htex is now open source! 🎉
Transform LaTeX documents into beautiful, paginated HTML with automatic A4 page breaks based on actual content height.
✨ Key Features
- ✅ SDK-level pagination (works in React, Vue, Svelte, vanilla JS)
- ✅ Pixel-perfect typography matching LaTeX output
- ✅ KaTeX for gorgeous math rendering
- ✅ Dark/light themes with responsive zoom
- ✅ Automatic TikZ to SVG conversion
- ✅ Production-ready, fully tested (456 tests passing)
📦 Packages
- @htex/core - Main SDK (renderToHtml, htexPaginate)
- @htex/react - React component wrapper
- @htex/svelte - Svelte component wrapper
- @htex/vue - Vue component wrapper
- @htex/vanilla - Web component
🚀 Quick Start
npm install @htex/coreReact example:
import { renderToHtml, htexPaginate } from '@htex/core'
import { useEffect, useRef } from 'react'
export function Document() {
const ref = useRef(null)
const html = renderToHtml(latexSource, { renderMode: 'paged' })
useEffect(() => {
if (ref.current) htexPaginate(ref.current)
}, [html])
return <div ref={ref} dangerouslySetInnerHTML={{ __html: html }} />
}📖 Documentation
- README.md - Complete guide with examples and API reference
- CONTRIBUTING.md - Development setup and contribution guidelines
- GitHub Wiki - In-depth technical documentation (coming soon)
🎯 Architecture Highlights
- Tokenizer - Lexical analysis of LaTeX (100+ commands supported)
- Parser - Recursive descent parser building typed AST
- Renderers - HTML, SVG, and Canvas modes
- Paginator - DOM-based height measurement with contextual margin collapse handling
📊 Performance
- Parse + render + paginate: ~245ms for 8-page document
- Zero external dependencies (KaTeX only)
- Runs entirely in the browser
🐛 Known Limitations
- Advanced TikZ features (custom shapes, complex paths)
- Bibliography management
- Cross-references (\ref, \label)
- Floating figures
- Footnotes (in progress)
📄 License
MIT - Free to use in personal and commercial projects
🙏 Thanks
- KaTeX for beautiful math rendering
- TypeScript for type safety
- Bun for fast builds
Ready to contribute? See CONTRIBUTING.md for development setup.
Have feedback? Open an issue or start a discussion on GitHub!