@unified-latex/unified-latex-util-argspec
TypeScript icon, indicating that this package has built-in type declarations

1.7.1 • Public • Published

unified-latex-util-argspec

What is this?

Tools to deal with xparse argument signatures. (E.g., "o m" for optional followed by mandatory argument).

When should I use this?

If you are working on the internals of unified-latex.

Install

npm install @unified-latex/unified-latex-util-argspec

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

parse(str)

Parse an xparse argument specification string to an AST. This function caches results. Don't mutate the returned AST!

function parse(str: String): ArgSpec.Node[];

Parameters

Param Type Description
str String * LaTeX string input

printRaw(node, root)

Print an xparse argument specification AST to a string.

function printRaw(
  node: string | ArgSpec.Node | (string | ArgSpec.Node)[],
  root: Boolean
): string;

Parameters

Param Type
node Omitted
root Boolean

/@unified-latex/unified-latex-util-argspec/

    Package Sidebar

    Install

    npm i @unified-latex/unified-latex-util-argspec

    Weekly Downloads

    2,305

    Version

    1.7.1

    License

    MIT

    Unpacked Size

    22.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • siefkenj