Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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