end-of-semester-report/node_modules/@unified-latex/unified-latex-util-print-raw
2025-05-14 16:14:35 +07:00
..
index.cjs initial commit 2025-05-14 16:14:35 +07:00
index.cjs.map initial commit 2025-05-14 16:14:35 +07:00
index.d.ts initial commit 2025-05-14 16:14:35 +07:00
index.js initial commit 2025-05-14 16:14:35 +07:00
index.js.map initial commit 2025-05-14 16:14:35 +07:00
package.json initial commit 2025-05-14 16:14:35 +07:00
README.md initial commit 2025-05-14 16:14:35 +07:00

unified-latex-util-print-raw

What is this?

Functions to print a unified-latex Abstract Syntax Tree (AST) to a string.

When should I use this?

If you want to directly print an Ast.Ast to a string without any pretty printing or formatting.

Install

npm install @unified-latex/unified-latex-util-print-raw

This package contains both esm and commonjs exports. To explicitly access the esm export, import the .js file. To explicitly access the commonjs export, import the .cjs file.

Functions

printRaw(node, options)

Renders the AST to a string without any pretty printing.

function printRaw(
  node: Printable | Printable[],
  options: { asArray: false }
): string;

Parameters

Param Type Description
node Printable | Printable[]
options { asArray: false; } * Setting asArray to true will return an array of strings and the symbol linebreak, so that printing can be customized.

Constants

Name Type
linebreak Symbol