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

1.7.1 • Public • Published

unified-latex-cli

What is this?

Command line interface to common unified-latex functions.

When should I use this?

If you want to reformat, process, or gather statistic on LaTeX files from the command line.

Examples

Reformat and pretty-print a file

unified-latex input.tex -o output.tex

List all commands defined via \newcommand and friends (and hide the file output).

unified-latex input.tex --no-stdout --stats

Expand the definition of the macro \foo{...}, which takes one argument.

unified-latex input.tex -e "\\newcommand{foo}[1]{FOO(#1)}"

View the parsed AST.

unified-latex input.tex --inspect

Convert the file to HTML. (Note, you will need to include and configure a library like MathJax or KaTeX to render any math in the resulting HTML. Warnings are provided for macros that aren't recognized by the converter.)

unified-latex input.tex -o output.html --html

Lint all tex files in the current directory and watch for changes.

unified-latex . --no-stdout --lint-all --watch

Install

npm install @unified-latex/unified-latex-cli

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.

Package Sidebar

Install

npm i @unified-latex/unified-latex-cli

Weekly Downloads

0

Version

1.7.1

License

MIT

Unpacked Size

3.38 MB

Total Files

8

Last publish

Collaborators

  • siefkenj