{"id":18961629,"url":"https://github.com/trialanderrororg/ooxast-util-citations","last_synced_at":"2026-04-01T15:30:18.307Z","repository":{"id":130692338,"uuid":"607887804","full_name":"TrialAndErrorOrg/ooxast-util-citations","owner":"TrialAndErrorOrg","description":"This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).","archived":false,"fork":false,"pushed_at":"2024-06-28T18:52:52.000Z","size":1140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T04:52:43.434Z","etag":null,"topics":["ast","docx","ooxast","unified"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tefkah"}},"created_at":"2023-02-28T21:57:39.000Z","updated_at":"2023-03-29T20:08:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e4ec9ab-cf95-462e-a87f-e16296bb5f79","html_url":"https://github.com/TrialAndErrorOrg/ooxast-util-citations","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Fooxast-util-citations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Fooxast-util-citations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Fooxast-util-citations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrialAndErrorOrg%2Fooxast-util-citations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrialAndErrorOrg","download_url":"https://codeload.github.com/TrialAndErrorOrg/ooxast-util-citations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239958283,"owners_count":19724925,"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","docx","ooxast","unified"],"created_at":"2024-11-08T14:13:47.614Z","updated_at":"2026-04-01T15:30:18.238Z","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# ooxast-util-visit-citations\n\n[![npm version](https://badge.fury.io/js/ooxast-util-citations.svg)](https://badge.fury.io/js/ooxast-util-citations) [![npm downloads](https://img.shields.io/npm/dm/ooxast-util-citations.svg)](https://www.npmjs.com/package/ooxast-util-citations)\n\n*[ooxast][ooxast]* util to visit in text office citations.\n\n## Contents\n\n*   [ooxast-util-visit-citations](#ooxast-util-visit-citations)\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 ooxast-util-citations\n# or with yarn\n# yarn add ooxast-util-citations\n# or with npm\n# npm install ooxast-util-citations\n```\n\n## Use\n\n## API\n\n***\n\n### `constructCitation()`\n\nConstruct a citation for Mendeley or Zotero.\n\n#### Signature\n\n```ts\nconstructCitation(\n  curr: Citation, \n  type: string, \n  index: number, \n  bibliography?: Data[]): object;\n```\n\n#### Parameters\n\n| Name | Type | Description |\n| :------ | :------ | :------ |\n| `curr` | [`Citation`](modules.md#citation) | The citation to construct |\n| `type` | `string` | The type of citation to construct |\n| `index` | `number` | The index of the citation |\n| `bibliography?` | `Data`[] | The bibliography to use |\n\n#### Returns\n\n`object`\n\nThe constructed citation and instruction\n\n| Member | Type |\n| :------ | :------ |\n| `citation` | [`MendeleyCitation`](modules.md#mendeleycitation) | [`ZoteroCitation`](modules.md#zoterocitation) |\n| `instr` | `string` |\n\nDefined in:  [lib/ooxast-util-citations.ts:197](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/ooxast-util-citations.ts#L197)\n\n***\n\n### `findCitations()`\n\n#### Signature\n\n```ts\nfindCitations(tree: Node\u003cData\u003e, vfile?: VFile, options?: Options): Root;\n```\n\n#### Parameters\n\n| Name | Type |\n| :------ | :------ |\n| `tree` | `Node`\u003c`Data`\u003e |\n| `vfile?` | `VFile` |\n| `options?` | [`Options`](modules.md#options) |\n\n#### Returns\n\n`Root`\n\nDefined in:  [lib/ooxast-util-citations.ts:28](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/ooxast-util-citations.ts#L28)\n\n***\n\n### `citationTypesWithSuffixedForm`\n\n\u003e **`Const`** `string`[]\n\nDefined in:  [lib/ooxast-util-citations.ts:21](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/ooxast-util-citations.ts#L21)\n\n***\n\n### `Citation`\n\n#### Properties\n\n##### `citationId`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:6](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L6)\n\n##### `citationItems`\n\n\u003e [`CitationItem`](modules.md#citationitem)[]\n\nDefined in:  [lib/types.ts:7](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L7)\n\n##### `originalText?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:9](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L9)\n\n##### `properties`\n\n\u003e [`Properties`](modules.md#properties)\n\nDefined in:  [lib/types.ts:8](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L8)\n\n***\n\n### `CitationItem`\n\n#### Properties\n\n##### `id`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:18](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L18)\n\n##### `infix?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:22](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L22)\n\n##### `itemData`\n\n\u003e `Data`\n\nDefined in:  [lib/types.ts:19](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L19)\n\n##### `label?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:23](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L23)\n\n##### `locator?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:24](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L24)\n\n##### `prefix?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:20](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L20)\n\n##### `suffix?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:21](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L21)\n\n***\n\n### `Mendeley`\n\n#### Properties\n\n##### `formattedCitation`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:52](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L52)\n\n##### `plainTextFormattedCitation`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:53](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L53)\n\n##### `previouslyFormattedCitation`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:54](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L54)\n\n***\n\n### `MendeleyCitation`\n\n#### Properties\n\n##### `citationId`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:40](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L40)\n\n##### `citationItems`\n\n\u003e [`MendeleyCitationItem`](modules.md#mendeleycitationitem)[]\n\nDefined in:  [lib/types.ts:41](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L41)\n\n##### `mendeley`\n\n\u003e [`Mendeley`](modules.md#mendeley)\n\nDefined in:  [lib/types.ts:42](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L42)\n\n##### `properties`\n\n\u003e [`MendeleyProperties`](modules.md#mendeleyproperties)\n\nDefined in:  [lib/types.ts:43](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L43)\n\n##### `schema`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:44](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L44)\n\n***\n\n### `MendeleyCitationItem`\n\n#### Properties\n\n##### `id`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:58](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L58)\n\n##### `itemData`\n\n\u003e `Data`\n\nDefined in:  [lib/types.ts:59](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L59)\n\n##### `uris`\n\n\u003e `string`[]\n\nDefined in:  [lib/types.ts:60](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L60)\n\n***\n\n### `MendeleyProperties`\n\n#### Properties\n\n##### `noteIndex`\n\n\u003e `number`\n\nDefined in:  [lib/types.ts:48](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L48)\n\n***\n\n### `Options`\n\n#### Properties\n\n##### `bibliography?`\n\n\u003e `Data`[]\n\nDefined in:  [lib/ooxast-util-citations.ts:23](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/ooxast-util-citations.ts#L23)\n\n##### `log?`\n\n\u003e `boolean`\n\nDefined in:  [lib/ooxast-util-citations.ts:24](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/ooxast-util-citations.ts#L24)\n\n##### `type?`\n\n\u003e `\"endnote\"` | `\"citavi\"` | `\"mendeley\"` | `\"word\"` | `\"zotero\"`\n\nDefined in:  [lib/ooxast-util-citations.ts:25](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/ooxast-util-citations.ts#L25)\n\n***\n\n### `Properties`\n\n#### Properties\n\n##### `mode?`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:14](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L14)\n\n##### `noteIndex`\n\n\u003e `number`\n\nDefined in:  [lib/types.ts:13](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L13)\n\n***\n\n### `ZoteroCitation`\n\n#### Properties\n\n##### `citationID`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:28](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L28)\n\n##### `citationItems`\n\n\u003e [`MendeleyCitationItem`](modules.md#mendeleycitationitem)[]\n\nDefined in:  [lib/types.ts:29](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L29)\n\n##### `properties`\n\n\u003e [`ZoteroProperties`](modules.md#zoteroproperties)\n\nDefined in:  [lib/types.ts:30](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L30)\n\n##### `schema`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:31](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L31)\n\n***\n\n### `ZoteroProperties`\n\n#### Properties\n\n##### `formattedCitation`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:36](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L36)\n\n##### `noteIndex`\n\n\u003e `number`\n\nDefined in:  [lib/types.ts:35](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L35)\n\n##### `plainCitation`\n\n\u003e `string`\n\nDefined in:  [lib/types.ts:37](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L37)\n\n***\n\n### `CiteOutput`\n\n\u003e (`string` | [`Citation`](modules.md#citation))[]\n\nDefined in:  [lib/types.ts:3](https://github.com/TrialAndErrorOrg/parsers/blob/main/libs/ooxast/ooxast-util-citations/src/lib/types.ts#L3)\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[ooxast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/ooxast\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrialanderrororg%2Fooxast-util-citations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrialanderrororg%2Fooxast-util-citations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrialanderrororg%2Fooxast-util-citations/lists"}