{"id":21020414,"url":"https://github.com/saadq/node-latex","last_synced_at":"2025-07-27T03:09:10.705Z","repository":{"id":45944841,"uuid":"79612894","full_name":"saadq/node-latex","owner":"saadq","description":"🧾 A utility for running LaTeX subprocesses in Node.","archived":false,"fork":false,"pushed_at":"2023-01-23T20:18:41.000Z","size":159,"stargazers_count":63,"open_issues_count":10,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-17T21:11:42.122Z","etag":null,"topics":["javascript","latex","node-latex","nodejs","pdflatex","wrapper","xelatex"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saadq.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-21T00:37:40.000Z","updated_at":"2025-07-03T18:02:45.000Z","dependencies_parsed_at":"2023-02-13T08:00:30.386Z","dependency_job_id":null,"html_url":"https://github.com/saadq/node-latex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saadq/node-latex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Fnode-latex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Fnode-latex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Fnode-latex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Fnode-latex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saadq","download_url":"https://codeload.github.com/saadq/node-latex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Fnode-latex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267293787,"owners_count":24065326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","latex","node-latex","nodejs","pdflatex","wrapper","xelatex"],"created_at":"2024-11-19T10:40:50.310Z","updated_at":"2025-07-27T03:09:10.682Z","avatar_url":"https://github.com/saadq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-latex\nA small wrapper for generating PDFs with LaTeX in Node.\n\n## Requirements\n\nLaTeX must be installed on your machine.  You can download it [here](https://www.latex-project.org/get/).\n\n## Install\n\n```\nnpm install node-latex\n```\n\n## Usage\n\n```js\nconst latex = require('node-latex')\nconst fs = require('fs')\n\nconst input = fs.createReadStream('input.tex')\nconst output = fs.createWriteStream('output.pdf')\nconst pdf = latex(input)\n\npdf.pipe(output)\npdf.on('error', err =\u003e console.error(err))\npdf.on('finish', () =\u003e console.log('PDF generated!'))\n```\n\nView more examples [here](https://github.com/saadq/node-latex/tree/master/examples).\n\n## API\n\n### latex(doc[, options])\n\n**doc** \\[ReadableStream|String\\] *Required* - The (La)TeX document you want to use.\n\n**options.inputs** \\[String|Array\u003cString\u003e\\] - The path (or an array of paths) to the directory which contains the assets necessary for the doc.\n\n**options.precompiled** \\[String|Array\u003cString\u003e\\] - The path  (or an array of paths) to the directory which contains the precompiled files necessary for the doc.\n\n**options.fonts** \\[String|Array\u003cString\u003e\\] - 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 `fontspec`).\n\n**options.cmd** \\[String\\] - The command to run for your document (`pdflatex`, `xetex`, etc). `pdflatex` is the default.\n\n**options.args** \\[Array\u003cString\u003e\\] - Arguments passed to `cmd`. Defaults to `['-halt-on-error']`.\n\n**options.passes** \\[Number\\] - The number of times to run `options.cmd`. Some documents require multiple passes. Only works when `doc` is a String. Defaults to `1`.\n\n**options.errorLogs** \\[String] - The path to the file where you want to save the contents of the error log to.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadq%2Fnode-latex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadq%2Fnode-latex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadq%2Fnode-latex/lists"}