All Projects â†’ digitalheir â†’ bibtex-js

digitalheir / bibtex-js

Licence: MIT License
Library for parsing .bib files, used in Bibliography.js 📚

Programming Languages

typescript
32286 projects
Nearley
35 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to bibtex-js

Jabref
Graphical Java application for managing BibTeX and biblatex (.bib) databases
Stars: ✭ 2,385 (+4236.36%)
Mutual labels:  latex, bibtex, bibliography
Rebiber
A simple tool to update bib entries with their official information (e.g., DBLP or the ACL anthology).
Stars: ✭ 1,005 (+1727.27%)
Mutual labels:  latex, bibtex, bibliography
Zotero Better Bibtex
Make Zotero effective for us LaTeX holdouts
Stars: ✭ 2,336 (+4147.27%)
Mutual labels:  latex, bibtex, bib
Scihub2pdf
Downloads pdfs via a DOI number, article title or a bibtex file, using the database of libgen(sci-hub) , arxiv
Stars: ✭ 120 (+118.18%)
Mutual labels:  latex, bibtex
Adstex
Automated generation of NASA ADS bibtex entries directly from citation keys in your TeX source files
Stars: ✭ 89 (+61.82%)
Mutual labels:  latex, bibliography
citeproc-el
A CSL 1.0.2 Citation Processor for Emacs.
Stars: ✭ 75 (+36.36%)
Mutual labels:  bibtex, bibliography
bibtex-parser
BibTex Parser provides an API to read .bib files programmatically.
Stars: ✭ 36 (-34.55%)
Mutual labels:  bibtex, bib
LaTeX-Templates
Document templates composed using LaTeX for my college assignments and projects (Applicable for any other university or college) ✨
Stars: ✭ 18 (-67.27%)
Mutual labels:  bibtex, bibliography
Fiduswriter
Fidus Writer is an online collaborative editor for academics.
Stars: ✭ 405 (+636.36%)
Mutual labels:  latex, bibtex
rfc-bibtex
A command line tool that creates bibtex entries for IETF RFCs and Internet Drafts.
Stars: ✭ 43 (-21.82%)
Mutual labels:  latex, bibtex
academic-cv-publications
Generate a customised list of publications for your LaTeX CV using BibTeX entries.
Stars: ✭ 60 (+9.09%)
Mutual labels:  latex, bibtex
ads2bibdesk
ads2bibdesk helps you add astrophysics articles listed on NASA/ADS to your BibDesk database using the new ADS Developer API
Stars: ✭ 32 (-41.82%)
Mutual labels:  latex, bibtex
Docker Texlive
A docker container containing an installation of texlive as well as several useful scripts.
Stars: ✭ 52 (-5.45%)
Mutual labels:  latex, bibtex
Bibsearch
Download, manage, and search a BibTeX database.
Stars: ✭ 52 (-5.45%)
Mutual labels:  latex, bibtex
biblatex-abnt
📚 Estilo para BibLaTeX compatível com as normas da ABNT
Stars: ✭ 97 (+76.36%)
Mutual labels:  latex, bibliography
proofengineering-bib
BibTeX bibliographies for proof engineering-related papers
Stars: ✭ 24 (-56.36%)
Mutual labels:  bibtex, bibliography
Jekyll Scholar
jekyll extensions for the blogging scholar
Stars: ✭ 872 (+1485.45%)
Mutual labels:  bibtex, bibliography
Betterbib
Update BibTeX files with info from online resources.
Stars: ✭ 380 (+590.91%)
Mutual labels:  latex, bibtex
scholia
Wikidata-based scholarly profiles
Stars: ✭ 166 (+201.82%)
Mutual labels:  bibtex, bibliography
snipmate-snippets-bib
Snipmate.vim support for BibTeX files
Stars: ✭ 13 (-76.36%)
Mutual labels:  latex, bibtex

Bibtex.js

npm version Build Status License Code Climate

Library for parsing BibTeX .bib files, based mostly on the excellent guide to BibTeX, Tame the BeaST.

Live demo in browser

Written in Typescript, compiled to ES5 Javascript (with typings provided).

This module literally just parses a BibTex file and processes it as far as BibTeX goes. It doesn't process TeX commands (i.e., {\"o} is not translated to ö). It does however, parse author names, as this is part of the BibTeX standard (see example below). If you want to actually work with a bibliography, look into Bibliography.js (which is mine) or Citation.js or Zotero. If you want to convert LaTeX to Unicode, look into my latex-to-unicode-converter.

Implementation

Not all internal BibTeX functions are implemented, simply because I don't need them personally and can't imagine anyone to need them. Most notably sorting entries is still an open issue because BibTeX has a little complicated algorithm which required a function that "purifies" field values, which for example makes {\ss} equivalent to ss but makes ä come after z. I am unsure if that is actually what anyone wants in modern days though. A modern approach would be to use Unicode collation and then sort.

Pull requests and issues are welcome.

Usage

Download standalone ES5 file (latest) or get from npm:

npm install bibtex
import {parseBibFile, normalizeFieldValue} from "bibtex";

const bibFile = parseBibFile(`
          @InProceedings{realscience,
            author    = {Marteen Fredrik Adriaan ding de la Trumppert and مهدي N\\"allen and henQuq, jr, Mathize},
            title     = {You Won't Believe This Proof That {P} \\gtreqqless {NP} Using Super-{T}uring Computation Near Big Black Holes},
            booktitle = {Book of Qeq},
            month     = {September},
            year      = {2001},
            address   = {Dordrecht},
            publisher = {Willems Uitgeverij},
            url       = {https://github.com/digitalheir/},
            pages     = {6--9}
          }
`);

const entry = bibFile
  .getEntry("realscience") // Keys are case-insensitive

const fieldValue = entry
  .getField("TITLE"); // This is a complex BibTeX string

console.log(
    // But we can normalize to a JavaScript string
    normalizeFieldValue(fieldValue)
); 

const authorField = entry
  .getField("author"); // This is a special object, divided into first names, vons and last names according to BibTeX spec

authorField.authors$.map((author, i) => console.log("Author: " 
  + (author.firstNames
            .concat(author.vons)
            .concat(author.lastNames)
            .concat(author.jrs)).join(" ")));

Contact

Maarten Trompper ([email protected])

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].