{"library":"latex-parser","type":"library","category":null,"description":"latex-parser is a JavaScript/TypeScript library designed to build abstract syntax trees (ASTs) for LaTeX documents. As of version 0.6.2, its primary focus is on parsing a subset of 'canonical' LaTeX, specifically prioritizing text mode over comprehensive mathematical typesetting. It distinguishes itself from full TeX parsers by acknowledging the extreme complexity of a complete LaTeX grammar, similar to how KaTeX focuses on math typesetting within a subset. The project evolved from a TypeScript fork of TeXnous and is now modeled after the Haskell LaTeX library HaTeX. While no explicit release cadence is stated, its versioning and active GitHub suggest ongoing iterative development. Developers should be aware of its intentional scope limitations when choosing this parser for their projects.","language":"javascript","status":"active","version":"0.6.2","tags":["javascript","LaTeX","TeX","parser","typescript","syntax tree","ast"],"last_verified":"Wed May 27","install":[{"cmd":"npm install latex-parser","imports":["import { latexParser } from 'latex-parser';","import { latexParser } from 'latex-parser';\nconst tokens = latexParser.parse('...');","import type { LaTeXASTNode } from 'latex-parser';"]},{"cmd":"yarn add latex-parser","imports":[]},{"cmd":"pnpm add latex-parser","imports":[]}],"homepage":null,"github":"https://github.com/digitalheir/latex-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/latex-parser","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/latex-parser/compatibility"}}