# latexjs

> A Node.js module for building LaTeX files

Latest version **0.2.0** (published 2016-05-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install latexjs
pnpm add latexjs
yarn add latexjs
bun add latexjs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-05-02 |
| First published | 2016-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Cristian Baldi |
| Maintainers | crisbal |
| Keywords | latex, tex |

## Links

- npm: https://www.npmjs.com/package/latexjs
- npm.io page: https://npm.io/package/latexjs

## Dependencies (1)

- [escape-latex](https://npm.io/package/escape-latex.md) ^0.1.3

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-05-02
- 0.1.1 — 2016-05-02
- 0.1.0 — 2016-05-02

## README

# latexjs



## Example

Using ES6 Javascript

```javascript
let doc = new Document("report");

let env = new Environment("testEnv");
    let dmath = new DisplayMath("6+4=10 \\beta");
    env.append(dmath);
doc.append(env);

let text = new Text("Inline text ");
let math = new Math("3+2 = \\alpha");
let text2 = new Text(" wow text.");
doc.append(text, math, text2);

let p = new Paragraph("This is a paragraph.");
doc.append(p);

console.log(doc.render());
```

Will print

```
\documentclass{report}
\begin{document}
\begin{testEnv}
$$6+4=10 \beta$$
\end{testEnv}
Inline text $3+2 = \alpha$ wow text.

This is a paragraph.

\end{document}
```

---
_Source: https://npm.io/package/latexjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
