Back to portfolio

Published npm package · Open source

Scientific content,
one renderer.

LaTeX Content Renderer brings math, chemistry, molecular structures and rich scientific notation into React, mobile WebViews and AI products without rebuilding the rendering pipeline for every platform.

v1.1.3Current releaseMITOpen-source license0Runtime dependencies27KBGzipped CDN build

Scientific rendering was fragmented.

Math tools do not automatically solve chemistry, molecule drawing, mobile WebViews or partial equations arriving from an AI stream. This package unifies those concerns behind a small set of components and functions.

App.tsxReact
npm install latex-content-renderer

import { SciContent } from
  'latex-content-renderer';

<SciContent content={`
  Solve: $x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}
  Water: $\\ce{H2O}$
  Ethanol: \\smiles{CCO}
`} />
Live output concept

Solve the quadratic equation

x = −b ± √(b² − 4ac) / 2a
H2O

Built for actual science products.

Mathematics

Inline and display equations rendered through MathJax 3.

Chemistry

mhchem reactions plus 2D molecular structures from eight SMILES input formats.

Cross-platform

React, React Native, Expo, Flutter, Android, iOS, WebViews and plain HTML.

AI streaming

Buffers incomplete LaTeX chunks so live LLM responses do not flash broken equations.

Accessibility

ARIA descriptions for equations, tables, images and chemistry structures.

Export

Convert equations to SVG strings or data URLs for documents and presentations.

ReactNext.jsReact NativeExpoFlutterAndroidiOSVueAngularSvelteNode.jsPlain HTML
npm install latex-content-renderer

Render the content.
Keep building the product.

Open npm Star on GitHub