{"_id":"@ayowel/asciidoctor-bibtex-js","name":"@ayowel/asciidoctor-bibtex-js","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@ayowel/asciidoctor-bibtex-js","version":"1.0.0","author":{"name":"Ayowel"},"license":"SEE LICENSE IN LICENSE","keywords":["asciidoctor","bibtex"],"main":"target/node.js","module":"target/node.js","browser":"target/core.js","homepage":"https://github.com/Ayowel/asciidoctor-bibtex-js","scripts":{"build":"tsc","lint":"eslint .","lint:write":"eslint --fix .","format":"prettier --check 'src/**/*.ts'","format:write":"prettier --write 'src/**/*.ts'"},"bugs":{"url":"https://github.com/Ayowel/asciidoctor-bibtex-js/issues"},"dependencies":{"@citation-js/core":"^0.7.0","@citation-js/plugin-bibtex":"^0.7.0","@citation-js/plugin-csl":"^0.7.0"},"devDependencies":{"@asciidoctor/core":"^3.0.4","@eslint/eslintrc":"^3.1.0","@eslint/js":"^9.7.0","@types/eslint__js":"^8.42.3","@types/node":"^20.14.10","eslint":"^8.57.0","eslintrc":"^1.0.5","prettier":"^3.3.3","typescript":"^5.5.3","typescript-eslint":"^7.16.0"},"optionalDependencies":{"@citation/csl-locale-all":"^1.0.0","@citation/csl-style-all":"^1.0.0"},"peerDependencies":{"@asciidoctor/core":"^2.0.0 || ^3.0.0"},"_id":"@ayowel/asciidoctor-bibtex-js@1.0.0","gitHead":"b3eb96e9ba5244f81d000520d510ae68b4a2cf5e","types":"./target/node.d.ts","description":"*This extension is a pure javascript implementation of [asciidoctor-bibtex](https://github.com/asciidoctor/asciidoctor-bibtex).*","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-MJYia5com3oy1VX7/htzgZEG7dkeB1lPTPjMTgreo2sVxYZ+g1oIv3AdewFFBiXLOj9q6Ym9qJqTmWOsYvvCqA==","shasum":"a583308bc5aeebca6ee082a1a373a0f102244ca8","tarball":"https://registry.npmjs.org/@ayowel/asciidoctor-bibtex-js/-/asciidoctor-bibtex-js-1.0.0.tgz","fileCount":17,"unpackedSize":35095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVefpcWhLrh8Ayd39qk3dq/lkHODmjeyYnFvQhG0rcBAiBtyfsBu/GOa/Zs84FtOJVKdTBgKK6cRbCVJHoPsYZrdw=="}]},"_npmUser":{"name":"ayowel","email":"ayowelsei@gmail.com"},"directories":{},"maintainers":[{"name":"ayowel","email":"ayowelsei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/asciidoctor-bibtex-js_1.0.0_1720970272109_0.15479309493692117"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-14T15:17:51.995Z","1.0.0":"2024-07-14T15:17:52.293Z","modified":"2024-07-14T15:17:52.575Z"},"maintainers":[{"name":"ayowel","email":"ayowelsei@gmail.com"}],"description":"*This extension is a pure javascript implementation of [asciidoctor-bibtex](https://github.com/asciidoctor/asciidoctor-bibtex).*","homepage":"https://github.com/Ayowel/asciidoctor-bibtex-js","keywords":["asciidoctor","bibtex"],"author":{"name":"Ayowel"},"bugs":{"url":"https://github.com/Ayowel/asciidoctor-bibtex-js/issues"},"license":"SEE LICENSE IN LICENSE","readme":"# Asciidoctor.js bibtex extension\n\n*This extension is a pure javascript implementation of [asciidoctor-bibtex](https://github.com/asciidoctor/asciidoctor-bibtex).*\n\nThis extension adds bibtex integration to AsciiDoc documents by introducing three new macros: `cite:[KEY]`, `bibitem:[KEY]` and `bibliography::[]`. Citations are parsed and replaced with formatted inline texts, and reference lists are automatically generated and inserted into where `bibliography::[]` is placed. `bibitem:[KEY]` will insert a rendered bibliography item directly into the text.\n\nIt is designed to be used as an extension to Asciidoctor. Thus this extension can be used together with other asciidoctor extensions such as asciidoctor-mathematical and asciidoctor-pdf to enrich your AsciiDoc experience.\n\n## Install for the command-line\n\n* Install this extension with `npm install @ayowel/asciidoctor-bibtex-js` (you may want to throw in a `-g` to install globally)\n* Run asciidoctor and require the extension with the option `-r @ayowel/asciidoctor-bibtex-js`\n\nAsciidoctor must also be installed for this extension to work. Asciidoctor version 2.0.0 or higher is required.\n\n## Usage\n\nFirst, you need to have a valid bibtex file.\nYou specify the location to this file using the `bibtex-file` document attribute.\n\n### Macros\n\nSyntax for inserting a citation is the following inline macro: `cite|citenp:[ref(pages), ...]` where `(pages)` is optional.\n\nExamples of \"chicago-author-date\" style:\n\n* `cite:[Lane12]` becomes \"(Lane 2012)\"\n* `citenp:[Lane12]` becomes \"Lane (2012)\"\n* `cite:[Lane12(59)]` becomes \"(Lane 2012, 59)\"\n\nFor *apa* (Harvard-like) style:\n\n* `cite:[Lane12]` becomes \"(Lane, 2012)\"\n* `citenp:[Lane12]` becomes \"Lane (2012)\"\n* `cite:[Lane12(59)]` becomes \"(Lane, 2012, p.59)\"\n\nFor *ieee*, a numeric style:\n\n`cite:[Lane12,Lane11]` becomes \"[1, 2]\"\n\nTo add a list of formatted references, place `bibliography::[]` on a line by itself.\n\nOne can use `bibitem:[Lane12]` to insert a rendered bibliography item inline, maybe to generate a cv. For example:\n\n```adoc\n= My CV\n\n== Publications\n\n=== 2019\n\n- bibitem:[Me2019a]\n- bibitem:[Me2019b]\n- bibitem:[Me2019c]\n```\n\n### Configuration\n\nConfiguration is applied in the form of AsciiDoc document attributes, which must be defined in the document header.\n\n| Attribute Name | Description | Valid Values | Default Value |\n| -------------- | ----------- | ------------ | ------------- |\n| `bibtex-file` | Bibtex database file | any string, or empty | Automatic searching\n| `bibtex-style` | Reference formatting style | any style supported by csl-styles | ieee\n| `bibtex-order` | Order of citations | `appearance` or `alphabetical` | `appearance`\n| `bibtex-format` | Formatting of citations and bibliography | `asciidoc`, `bibtex` or `biblatex` | `asciidoc`\n| `bibtex-locale` | Locale used to render the bibliography | strings supported by CSL | `en-US`\n| `bibtex-throw` | Throw an error on unknown references | `true` or `false` | `false`\n| `bibtex-citation-template` | Custom citation template for numeric style | Any string matching `/(.+?)\\$id(.+)/` | `[$id]`\n\n## Install to use with VSCode\n\nYou may use this extension with the `Asciidoc` extension for VSCode Desktop by doing the following:\n\n* In the `Asciidoc` extension's settings, enable workspace extensions (`asciidoc.extensions.registerWorkspaceExtensions`)\n* In your project's workspace:\n  * Create a new file `package.json` with the content `{}`\n  * Install this extension with `npm install --local @ayowel/asciidoctor-bibtex-js`\n  * Optionally add localisation and style libraries:\n    * `npm install --local @citation/csl-locale-all`\n    * `npm install --local @citation/csl-style-all`\n  * Create a new subdirectory `.asciidoctor/lib`\n    * Create a file `.asciidoctor/lib/bibtex.js` to load the extension:\n\n```javascript\nmodule.exports = require('@ayowel/asciidoctor-bibtex-js')\n```\n\n## What are the main differences ?\n\n* We do not interprete LaTeX entries in the bibtex file\n* We do not try to load bibtex file from your current directory or your home's `Documents` directory. We only try to load the path provided as a `bibtex-file` or - if it is not set - we search from your document's directory\n* If a biblio\n","readmeFilename":"README.md"}