{"id":21020417,"url":"https://github.com/saadq/latrex","last_synced_at":"2026-05-07T02:39:22.013Z","repository":{"id":62422361,"uuid":"423789631","full_name":"saadq/latrex","owner":"saadq","description":"A small library for running LaTeX child processes in Deno.","archived":false,"fork":false,"pushed_at":"2021-12-09T02:01:33.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-07T02:58:12.162Z","etag":null,"topics":["child-process","deno","latex","tex"],"latest_commit_sha":null,"homepage":"https://doc.deno.land/https://deno.land/x/latrex@v1.1.0/mod.ts","language":"TypeScript","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":"2021-11-02T09:58:17.000Z","updated_at":"2023-03-10T09:21:32.000Z","dependencies_parsed_at":"2022-11-01T17:45:32.239Z","dependency_job_id":null,"html_url":"https://github.com/saadq/latrex","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Flatrex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Flatrex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Flatrex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadq%2Flatrex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saadq","download_url":"https://codeload.github.com/saadq/latrex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243450624,"owners_count":20292985,"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","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":["child-process","deno","latex","tex"],"created_at":"2024-11-19T10:40:50.647Z","updated_at":"2025-12-30T03:03:58.244Z","avatar_url":"https://github.com/saadq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# latrex\n\n\u003e A small library for running LaTeX child processes in Deno.\n\n## Docs\n\nhttps://doc.deno.land/https://deno.land/x/latrex@v1.1.1/mod.ts\n\n## Requirements\n\nLaTeX must be installed on your machine. You can download it [here](https://www.latex-project.org/get/).\n\n## Usage\n\n\n### TeX file\n\n```ts\nimport { latrex } from \"https://deno.land/x/latrex@v1.1.1/mod.ts\";\n\nconst document = await Deno.readFile(\"./document.tex\");\nconst pdf = await latrex(document);\nawait Deno.writeFile(\"./output.pdf\", pdf);\n```\n\n### TeX string\n\n```ts\nimport { latrex } from \"https://deno.land/x/latrex@v1.1.1/mod.ts\";\n\nconst document = `\n  \\\\documentclass{article}\n  \\\\begin{document}\n  hello world\n  \\\\end{document}\n`\n\nconst pdf = await latrex(document);\nawait Deno.writeFile(\"./output.pdf\", pdf);\n```\n\n### With all options\n\n```ts\nconst pdf = await latrex(document, { \n  command: 'xelatex',\n  args: ['-no-file-line-error', '-no-pdf'],\n  inputs: ['./styles', './fonts'],\n  passes: 3,\n  errorLogsPath: './my-tex-errors.log'\n});\n```\n\n### Options\n\n| **Option**      | **Type**   | **Default**          | **Description**                                                                                                               | \n| --------------- | ---------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `command`       | `string`   | `'pdflatex'`         | The command to run for your compiling your LaTeX document (pdflatex, xetex, /user/bin/custom-tex, etc).                       |\n| `args`          | `string[]` | `['-halt-on-error']` | Arguments passed to the command.                                                                                              |\n| `passes`        | `number`   | `1`                  | The number of times to run `options.command`. Some documents require multiple passes. Only works when doc is a string.        |\n| `inputs`        | `string[]` | N/A                  | A list of absolute paths to the directory which contains the assets necessary for the doc (such as fonts or cls files, etc).  |\n| `errorLogsPath` | `string`   | N/A                  | The path to the file where you want to save the contents of the error log to.                                                 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadq%2Flatrex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadq%2Flatrex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadq%2Flatrex/lists"}