Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saswatpadhi/prismjs-bibtex
A language definition for BibTeX in the PrismJS syntax highlighting framework.
https://github.com/saswatpadhi/prismjs-bibtex
bibtex bibtex-js bibtex2html bibtexparser highlight prismjs publications syntax-highlighting
Last synced: 15 days ago
JSON representation
A language definition for BibTeX in the PrismJS syntax highlighting framework.
- Host: GitHub
- URL: https://github.com/saswatpadhi/prismjs-bibtex
- Owner: SaswatPadhi
- License: mit
- Created: 2019-03-17T06:25:34.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-24T08:37:40.000Z (about 1 year ago)
- Last Synced: 2024-11-07T19:53:51.373Z (about 2 months ago)
- Topics: bibtex, bibtex-js, bibtex2html, bibtexparser, highlight, prismjs, publications, syntax-highlighting
- Language: JavaScript
- Homepage: https://saswatpadhi.github.io/prismjs-bibtex
- Size: 729 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
PrismJS-BibTeX
========[![npm package](https://img.shields.io/npm/v/prismjs-bibtex?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/prismjs-bibtex)
[![jsDelivr hits](https://img.shields.io/jsdelivr/npm/hm/prismjs-bibtex?color=gold&logo=javascript&style=for-the-badge)](https://www.jsdelivr.com/package/npm/prismjs-bibtex)A [BibTeX] language extension for [PrismJS].
## Usage
### In HTML
Simply import the `prism-bibtex.min.js` (recommended at the end of `body`):
```html
```
I recommend using the [SRI (Subresource Integrity)][SRI] hash as well:
```html```
Remember to import the PrismJS stylesheets and scripts **before** importing this extension.
For example:```html
```
### In NodeJS
1. Add the package to your project:
```console
$ npm install prismjs-bibtex
```2. Import `prismjs-bibtex` your .js file, after Prism:
```js
import Prism from 'prismjs';
import 'prismjs-bibtex';
```## Examples
Check out some small BibTeX examples [on the project webpage](https://saswatpadhi.github.io/prismjs-bibtex/). You can also check the performance on large real-life `.bib` files below:
- (~68 KB) [Some BibTeX examples from CTAN](https://saswatpadhi.github.io/prismjs-bibtex/biblatex-examples.html)
- (~144 KB) [Bibliography of ACM Turing Award lectures](https://saswatpadhi.github.io/prismjs-bibtex/acm-turing-awards.html)
- (~534 KB) [STOC 2010 -- 2019 bibliography](https://saswatpadhi.github.io/prismjs-bibtex/stoc_2010-2019.html)[BibTeX]: http://www.bibtex.org/
[prismjs]: https://prismjs.com/
[SRI]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity