npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

latex2unicode

v0.1.0

Published

Convert LaTeX math expressions to readable Unicode text

Readme

latex2unicode

Convert LaTeX math expressions to readable Unicode text. Zero dependencies, works in Node and browsers.

�?LaTeX 数学公式转换成可读的 Unicode 文本。零依赖,Node 和浏览器通用�?

Install

npm install latex2unicode
# or
bun add latex2unicode

Usage

import { latexToUnicode } from "latex2unicode"

latexToUnicode("y = \\beta_0 + \\beta_1 x + \\varepsilon")
// �?"𝑦 = β₀ + β₁�?+ ε"

latexToUnicode("\\hat{\\beta} = (X'X)^{-1}X'y")
// �?"β̂ = (𝑋′�?⁻¹𝑋′�?

latexToUnicode("\\frac{x^2+1}{x-1}")
// �?"(𝑥² + 1)/(𝑥 �?1)"

latexToUnicode("\\begin{bmatrix} 1 & 0 \\\\ 0 & 1 \\end{bmatrix}")
// �?"[1 0; 0 1]"

latexToUnicode("\\sum_{i=1}^{n} x_i")
// �?"∑ᵢ₌₁ⁿ𝑥ᵢ"

Options

latexToUnicode(input, { italic: false }) // 输出普通字母而非数学斜体字符

What it supports

  • 希腊字母与变�?α β γ �?ε φ)
  • 上下�?𝑥ᵢ²、β₀、𝑒⁻ᵝ�?
  • 分式:\frac{1}{2} �?½;\frac{a}{b} �?ᵃ⁄b;复杂分式回退�?(a)/(b)
  • 根号:\sqrt{x} �?√�?- 运算符与关系�?�?�?�?�?�?�?�?�?�?�?�?�?
  • 显示偏好符号(�?�?�?�?全系)
  • 数学字母样式(�?�?𝔼 �?
  • 矩阵�?cases 环境(bmatrix/pmatrix/vmatrix/cases)
  • 组合重音(β̂、𝑥̄、𝑎⃗)
  • 数学斜体变量(𝑥𝑦𝑧、𝐴𝐵�?

符号表数据驱�? �?LaTeX 官方 unicode-math 符号�?2469 个符�?+ KaTeX 符号�?(传统 LaTeX 命令�?自动生成(bun run generate),不手写白名单,杜绝遗漏�? 回退策略: 无法识别的命令原样输�?去掉反斜�?,保证信息不丢失�?

Test

bun test

License

MIT