@tacolabs/latex-js
v0.1.0
Published
create compilable LaTeX documents in javascript
Downloads
6
Maintainers
Readme
jsTeX
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
.