@tacolabs/latex-js

0.1.0 • Public • Published

jsTeX

js-standard-style

Create compilable LaTeX documents in Node

Example

const { LaTeX, elements: { Environment } } = require('latex-js')

const latex = new LaTeX()

latex.document(document => {
  document.title('My Great Project')

  const flushleft = new Environment('flushleft')
  document.environment(flushleft, content => {
    content.section('Introduction')
    content.par('lots of stuff...')
  })
})

const output = latex.output()

outputs the following:

\documentclass[10pt]{article}
\title{My Great Project}
\begin{document}
\maketitle
\begin{flushleft}
\section{Introduction}
\par lots of stuff...
\end{flushleft}
\end{document}

API

This project is developed in Typescript.

Build the library from source with yarn (will also install dependencies), or do yarn build to rebuild. The output is written to ./build.

Create and view the docs with yarn study.

Package Sidebar

Install

npm i @tacolabs/latex-js

Weekly Downloads

2

Version

0.1.0

License

ISC

Unpacked Size

24.3 kB

Total Files

20

Last publish

Collaborators

  • jefferyshivers