在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):saadq/node-latex开源软件地址(OpenSource Url):https://github.com/saadq/node-latex开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):node-latexA small wrapper for generating PDFs with LaTeX in Node. RequirementsLaTeX must be installed on your machine. You can download it here. Install
Usageconst latex = require('node-latex')
const fs = require('fs')
const input = fs.createReadStream('input.tex')
const output = fs.createWriteStream('output.pdf')
const pdf = latex(input)
pdf.pipe(output)
pdf.on('error', err => console.error(err))
pdf.on('finish', () => console.log('PDF generated!')) View more examples here. APIlatex(doc[, options])doc [ReadableStream|String] Required - The (La)TeX document you want to use. options.inputs [String|Array] - The path (or an array of paths) to the directory which contains the assets necessary for the doc. options.precompiled [String|Array] - The path (or an array of paths) to the directory which contains the precompiled files necessary for the doc. options.fonts [String|Array] - The path (or an array of paths) to the directory which contains the fonts necessary for the doc (you will most likely want to use this option if you're working with options.cmd [String] - The command to run for your document ( options.args [Array] - Arguments passed to options.passes [Number] - The number of times to run options.errorLogs [String] - The path to the file where you want to save the contents of the error log to. LicenseMIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论