{"id":18961621,"url":"https://github.com/trialanderrororg/reoff-unified-latex","last_synced_at":"2026-03-06T14:13:33.089Z","repository":{"id":132593160,"uuid":"611926141","full_name":"TrialAndErrorOrg/reoff-unified-latex","owner":"TrialAndErrorOrg","description":"Plugin for `reoff` that takes an `ooxast` tree and turns it into a `unified-latex` tree, allowing for .docx to .tex conversion","archived":false,"fork":false,"pushed_at":"2024-06-28T18:54:03.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T13:15:59.279Z","etag":null,"topics":["ast","converter","docx","latex","ooxast","reoff","unified","unified-latex"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TrialAndErrorOrg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"tefkah"}},"created_at":"2023-03-09T20:37:31.000Z","updated_at":"2023-03-29T19:53:08.000Z","dependencies_parsed_at":"2023-05-30T01:34:59.900Z","dependency_job_id":"c3717a15-fd54-40d1-951a-887be6355265","html_url":"https://github.com/TrialAndErrorOrg/reoff-unified-latex","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Freoff-unified-latex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Freoff-unified-latex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Freoff-unified-latex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Freoff-unified-latex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrialAndErrorOrg","download_url":"https://codeload.github.com/TrialAndErrorOrg/reoff-unified-latex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788773,"owners_count":19857696,"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":["ast","converter","docx","latex","ooxast","reoff","unified","unified-latex"],"created_at":"2024-11-08T14:13:46.819Z","updated_at":"2026-03-06T14:13:33.042Z","avatar_url":"https://github.com/TrialAndErrorOrg.png","language":"TypeScript","funding_links":["https://github.com/sponsors/tefkah"],"categories":[],"sub_categories":[],"readme":"\u003e **Note**\n\u003e This repository is automatically generated from the [main parser monorepo](https://github.com/TrialAndErrorOrg/parsers). Please submit any issues or pull requests there.\n\n# reoff-unified-latex\n\n[![npm version](https://badge.fury.io/js/reoff-unified-latex.svg)](https://badge.fury.io/js/reoff-unified-latex) [![npm downloads](https://img.shields.io/npm/dm/reoff-unified-latex.svg)](https://www.npmjs.com/package/reoff-unified-latex)\n\nPlugin for `reoff` that takes an `ooxast` tree and turns it into a `unified-latex` tree, allowing for .docx to .tex conversion\n\n## Contents\n\n*   [reoff-unified-latex](#reoff-unified-latex)\n    *   [Contents](#contents)\n    *   [What is this?](#what-is-this)\n    *   [When should I use this?](#when-should-i-use-this)\n    *   [Install](#install)\n    *   [Use](#use)\n    *   [API](#api)\n    *   [Syntax tree](#syntax-tree)\n    *   [Types](#types)\n    *   [Compatibility](#compatibility)\n    *   [Security](#security)\n    *   [Related](#related)\n    *   [Contribute](#contribute)\n    *   [License](#license)\n\n## What is this?\n\n## When should I use this?\n\n## Install\n\nThis package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install as\n\n```bash\npnpm add reoff-unified-latex\n# or with yarn\n# yarn add reoff-unified-latex\n# or with npm\n# npm install reoff-unified-latex\n```\n\n## Use\n\n## API\n\n***\n\n### `default()`\n\nPlugin to bridge or mutate to unified-latex\n\nIf a destination is given, runs the destination with the new jast\ntree (bridge-mode).\nWithout destination, returns the jast tree: further plugins run on that\ntree (mutate-mode).\n\nThis is done so that you can use this plugin as either the plugin before the stringify plugin, or the plugin before another mutate plugin\n\n#### Signature\n\n```ts\ndefault(this: Processor\u003cvoid, Root, void, void\u003e, ...settings: [Processor, Options?]): void | Transformer\u003cRoot, Root\u003e;\n```\n\n#### Parameters\n\n| Name | Type |\n| :------ | :------ |\n| `this` | `Processor`\u003c`void`, `Root`, `void`, `void`\u003e |\n| `...settings` | [`Processor`, `Options?`] |\n\n#### Returns\n\n`void` | `Transformer`\u003c`Root`, `Root`\u003e\n\nDefined in:  node\\_modules/.pnpm/unified\\@10.1.2/node\\_modules/unified/index.d.ts:531\n\nPlugin to bridge or mutate to unified-latex\n\nIf a destination is given, runs the destination with the new jast\ntree (bridge-mode).\nWithout destination, returns the jast tree: further plugins run on that\ntree (mutate-mode).\n\nThis is done so that you can use this plugin as either the plugin before the stringify plugin, or the plugin before another mutate plugin\n\n#### Signature\n\n```ts\ndefault(this: Processor\u003cvoid, Root, void, void\u003e, ...settings: [Options?] | void[]): void | Transformer\u003cRoot, Root\u003e;\n```\n\n#### Parameters\n\n| Name | Type |\n| :------ | :------ |\n| `this` | `Processor`\u003c`void`, `Root`, `void`, `void`\u003e |\n| `...settings` | [`Options?`] | `void`[] |\n\n#### Returns\n\n`void` | `Transformer`\u003c`Root`, `Root`\u003e\n\nDefined in:  node\\_modules/.pnpm/unified\\@10.1.2/node\\_modules/unified/index.d.ts:531\n\n***\n\n### `Options`\n\n#### Properties\n\n##### `bibliography?`\n\n\u003e `string` | `Data`[]\n\nA bibliography you can add manually\n\nNeeds to be in CSL format, which will be converted to BibTeX, or in BibTeX format\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:146](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L146)\n\n##### `bibname?`\n\n\u003e `string`\n\nName of the bibliography file\n\n###### Default\n\n'bibliography.bib'\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:47](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L47)\n\n##### `citationType?`\n\n\u003e `\"endnote\"` | `\"mendeley\"` | `\"word\"` | `\"citavi\"` | `\"zotero\"`\n\nWhat type of citation is used?\n\n###### Default\n\n'zotero'\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:70](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L70)\n\n##### `collectCitation?`\n\n\u003e `Function`\n\n###### Type declaration\n\n*Signature\\`*\n\n```ts\n(citation: any, index: string | number): any;\n```\n\n*Parameters\\`*\n\n| Name | Type |\n| :------ | :------ |\n| `citation` | `any` |\n| `index` | `string` | `number` |\n\n*Returns\\`*\n\n`any`\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:72](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L72)\n\n##### `columnSeparator?`\n\n\u003e `boolean`\n\nShould a column separator be added to tables?\ni.e. should `|` be added to the beginning and end of each row?\n\n###### Default\n\nfalse\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:52](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L52)\n\n##### `defaultCol?`\n\n\u003e `string`\n\nWhat column should be used as the default column?\n\ne.g `l` for left, `r` for right, `c` for center\n\n###### Default\n\n'l'\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:127](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L127)\n\n##### `displayMath?`\n\n\u003e `\"align\"` | `\"equation\"` | `\"equation*\"` | `\"align*\"` | `\"$$\"` | `\"[]\"`\n\nWhat type of display math should be used?\n\n-`$$`: `$$ ... $$`\n\n-`[]`: `[ ... \\]`\n\n-`equation` | `equation*` | `align` | `align*`: `\\begin{...} ... \\end{...}`\n\n###### Default\n\n'equation'\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:86](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L86)\n\n##### `document?`\n\n\u003e `boolean`\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:27](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L27)\n\n##### `documentClass?`\n\n\u003e `object`\n\n```ts\n{\n    name: string;\n    options?: string[];\n}\n```\n\nOptions for the document class\n\n###### Default\n\n###### Type declaration\n\n| Member | Type | Description |\n| :------ | :------ | :------ |\n| `name` | `string` | Name of the document class  `Default`  'article' |\n| `options`? | `string`[] | Options for the document class  `Default`  undefined |\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:56](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L56)\n\n##### `handlers?`\n\n\u003e `object`\n\nHandlers for specific node types\n\n###### Index signature\n\n[`handle`: `string`]: `Handle`\n\n###### Type declaration\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:26](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L26)\n\n##### `inlineMath?`\n\n\u003e `\"$\"` | `\"()\"`\n\nWhat type of inline math should be used?\n-`$`: `$ ... $`\n-`()` : `\\(...\\)`\n\n###### Default\n\n'$'\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:102](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L102)\n\n##### `italics?`\n\n\u003e `\"emph\"` | `\"textit\"`\n\nShould italics be rendered as \\textit or \\emph?\n\n###### Default\n\n'emph'\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:43](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L43)\n\n##### `newLines?`\n\n\u003e `boolean`\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:28](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L28)\n\n##### `packages?`\n\n\u003e (`string` | {\n\u003e `name`: `string`;\n\u003e `options`: `string`[];\n\u003e })[]\n\nA list of packages to add to the preamble\n\nby default, the following packages are added:\n\n*   `xcolor` (if `xcolor` is enabled)\n*   `hyperref`\n*   `graphicx`\n*   `caption`\n*   `tabularx` (if `tabularx` is enabled)\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:158](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L158)\n\n##### `parseCitation?`\n\n\u003e `Function`\n\n###### Type declaration\n\n*Signature\\`*\n\n```ts\n(citation: any): any;\n```\n\n*Parameters\\`*\n\n| Name | Type |\n| :------ | :------ |\n| `citation` | `any` |\n\n*Returns\\`*\n\n`any`\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:71](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L71)\n\n##### `preamble?`\n\n\u003e `string` | `Node`[]\n\nA list of commands and other stuff to add to the preamble\n\nYou are responsible for making sure that the commands are valid LaTeX\nand that they can be used in the preamble.\n\nYou need to directly use the unified-latex types here,\nor you can just put it in raw\n\n###### Default\n\n'\\title{\u003cwhatever title it can find\u003e}'\n\n###### Example\n\n```ts\nimport { m, args } from '@unified-latex/unified-latex-types'\n\nconst options = {\n preamble: [\n  // \\author{Leeroy Jenkins}\n  m('author', 'Leeroy Jenkins'),\n  // \\title{The Adventures of Leeroy Jenkins}\n  m('title', 'The Adventures of Leeroy Jenkins'),\n  // \\somemacrowithoptions[optional1][optional2]{firstArg}{secondArg}\n  m(\n     'somemacrowithoptions',\n     args(\n        ['optional1', 'optional2', 'firstArg', 'secondArg'],\n       { braces: '[][]{}{}'}\n      )\n   ),\n  ]\n}\n```\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:192](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L192)\n\n##### `quotes?`\n\n\u003e `string`[]\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:29](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L29)\n\n##### `relations?`\n\n\u003e `object`\n\n###### Index signature\n\n[`key`: `string`]: `string`\n\n###### Type declaration\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:74](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L74)\n\n##### `strikethrough?`\n\n\u003e `\"st\"` | `\"sout\"` | `\"s\"`\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:103](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L103)\n\n##### `tabularx?`\n\n\u003e `boolean` | {\n\u003e `width`?: `string`;\n\u003e }\n\nShould tabularx be used instead of tabular?\n\n###### Default\n\nfalse\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:132](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L132)\n\n##### `title?`\n\n\u003e `string`\n\nThe title of the document\n\nIf this is not set, the title will be taken from the heading with the \"Title\" style.\n\n###### Default\n\nundefined\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:119](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L119)\n\n##### `topSection?`\n\n\u003e `number`\n\nWhat the top section should be\n-1 = part\n0 = chapter\n1 = section\n2 = subsection\n3 = subsubsection\n4 = paragraph\n5 = subparagraph\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:39](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L39)\n\n##### `xcolor?`\n\n\u003e `boolean`\n\nAre you using xcolor?\n\nDisabling this will remove the `xcolor` package from the preamble\nand remove color related commands from the output.\n\n###### Default\n\ntrue\n\nDefined in:  [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:111](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L111)\n\n## Syntax tree\n\n## Types\n\n## Compatibility\n\n## Security\n\n## Related\n\n## Contribute\n\n## License\n\n[GPL-3.0-or-later](LICENSE) © Thomas F. K. Jorna\n\n[unified]: https://unifiedjs.com\n\n[unifiedgh]: https://github.com/unifiedjs/unified\n\n[xast-from-xml]: https://github.com/syntax-tree/xast-util-from-xml\n\n[rehype]: https://github.com/rehypejs/rehype\n\n[rejour]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour\n\n[rejour-parse]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-parse\n\n[rejour-stringify]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-stringify\n\n[rejour-move-abstract]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-move-abstract\n\n[rejour-meta]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-meta\n\n[rejour-relatex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-relatex\n\n[relatex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex\n\n[relatex-parse]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/relatex-parse\n\n[jast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/jast\n\n[jast-util-to-texast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/jast-util-to-texast\n\n[jastscript]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/jastscript\n\n[texast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/texast\n\n[texast-util-to-latex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/texast-util-to-latex\n\n[hast]: https://github.com/syntax-tree/hast\n\n[xast]: https://github.com/syntax-tree/xast\n\n[mdast]: https://github.com/syntax-tree/mdast\n\n[mdast-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown\n\n[latex-utensils]: https://github.com/tamuratak/latex-utensils\n\n[latexjs]: https://github.com/latexjs/latexjs\n\n[reoff]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff\n\n[reoff-parse]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff/reoff-parse\n\n[reoff-rejour]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff/reoff-rejour\n\n[ooxast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/ooxast/ooxast\n\n[ooxast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/ooxast/ooxast-util-to-jast\n\n[reoff-unified-latex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff-unified-latex\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrialanderrororg%2Freoff-unified-latex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrialanderrororg%2Freoff-unified-latex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrialanderrororg%2Freoff-unified-latex/lists"}