Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with .cls? #15

Open
zaynv opened this issue Dec 27, 2016 · 2 comments
Open

Usage with .cls? #15

zaynv opened this issue Dec 27, 2016 · 2 comments

Comments

@zaynv
Copy link

zaynv commented Dec 27, 2016

Hi, thanks for writing this module. Here is an example of how I am using this:

var fs = require('fs');
var latex = require('latex');

var string = getTexDocument(); // Returns a string of .tex code
var writeStream = fs.createWriteStream('doc.pdf');
latex(string).pipe(writeStream);

This works for most situations, but what do I need to do if the string is a TeX document that wants to use a CLS file? Is there something I can do to pass CLS code as a string as well to make this work? Thanks!

@omgimanerd
Copy link

+1

@zaynv
Copy link
Author

zaynv commented Apr 5, 2017

For now, this module allows you to pass a path to your TEXINPUTS like if you have fonts or .cls files. Example:

var latex = require('node-latex')
var path = require('path')

var pdfStream = latex(texDoc, {
  inputs: path.resolve(__dirname, 'path', 'to', 'inputs')
})

// Do something with pdfStream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants