Skip to content

davidtwco/node-pdflatex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-pdflatex

PDFLaTeX wrapper for Node

Install

npm install node-pdflatex

Usage

pdflatex takes latex source and returns a Promise of Buffer.

import pdflatex from 'node-pdflatex'

const source = `
\\documentclass{article}
\\begin{document}
Hello World!
\\end{document}
`

const pdf = await pdflatex(source)

Options

engine: string

Changes which LaTeX engine is used (such as pdflatex, xelatex, etc.).

pdflatex(latexContent, { engine: 'xelatex' })

shellEscape: boolean

Adds the -shell-escape flag during compilation.

pdflatex(latexContent, { shellEscape: true })

texInputs: Array<string>

Adds paths to TEXINPUTS env var during compilation.

pdflatex(latexContent, { texInputs: ['../resources/'] })

TypeScript

This package is written in TypeScript.

That means the NPM package comes with type definitions included.

License

MIT

About

PDFLaTeX wrapper for NodeJS

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%