All Projects → charlesvdv → nom-bibtex

charlesvdv / nom-bibtex

Licence: MIT license
A feature complete bibtex parser using nom

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to nom-bibtex

Betterbib
Update BibTeX files with info from online resources.
Stars: ✭ 380 (+2823.08%)
Mutual labels:  latex, bibtex
Docker Texlive
A docker container containing an installation of texlive as well as several useful scripts.
Stars: ✭ 52 (+300%)
Mutual labels:  latex, bibtex
Fiduswriter
Fidus Writer is an online collaborative editor for academics.
Stars: ✭ 405 (+3015.38%)
Mutual labels:  latex, bibtex
bibtex-js
Library for parsing .bib files, used in Bibliography.js 📚
Stars: ✭ 55 (+323.08%)
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 (+146.15%)
Mutual labels:  latex, bibtex
Rebiber
A simple tool to update bib entries with their official information (e.g., DBLP or the ACL anthology).
Stars: ✭ 1,005 (+7630.77%)
Mutual labels:  latex, bibtex
Bibsearch
Download, manage, and search a BibTeX database.
Stars: ✭ 52 (+300%)
Mutual labels:  latex, bibtex
Scihub2pdf
Downloads pdfs via a DOI number, article title or a bibtex file, using the database of libgen(sci-hub) , arxiv
Stars: ✭ 120 (+823.08%)
Mutual labels:  latex, bibtex
snipmate-snippets-bib
Snipmate.vim support for BibTeX files
Stars: ✭ 13 (+0%)
Mutual labels:  latex, bibtex
Zotero Better Bibtex
Make Zotero effective for us LaTeX holdouts
Stars: ✭ 2,336 (+17869.23%)
Mutual labels:  latex, bibtex
academic-cv-publications
Generate a customised list of publications for your LaTeX CV using BibTeX entries.
Stars: ✭ 60 (+361.54%)
Mutual labels:  latex, bibtex
Jabref
Graphical Java application for managing BibTeX and biblatex (.bib) databases
Stars: ✭ 2,385 (+18246.15%)
Mutual labels:  latex, bibtex
rfc-bibtex
A command line tool that creates bibtex entries for IETF RFCs and Internet Drafts.
Stars: ✭ 43 (+230.77%)
Mutual labels:  latex, bibtex
hustreport
📓 An Unofficial Graduate Report Template in LaTeX for Huazhong University of Science and Technology
Stars: ✭ 18 (+38.46%)
Mutual labels:  latex
awsome-list-of-cv-and-resume-templetes
a collection of cv and resume styles
Stars: ✭ 78 (+500%)
Mutual labels:  latex
typora-latex-theme
将Typora伪装成LaTeX的中文样式主题,本科生轻量级课程论文撰写的好帮手。This is a theme disguising Typora into Chinese LaTeX style.
Stars: ✭ 2,239 (+17123.08%)
Mutual labels:  latex
latex-template
南方科技大学 LaTeX 模板目录 SUSTech LaTeX templates
Stars: ✭ 72 (+453.85%)
Mutual labels:  latex
clj-book
Книга «Clojure на производстве»
Stars: ✭ 24 (+84.62%)
Mutual labels:  latex
xdupgthesis
西安电子科技大学研究生学位论文XeLaTeX模板
Stars: ✭ 271 (+1984.62%)
Mutual labels:  latex
cdcalendar
A customisable, multilingual calendar with 3 different sizes. With LaTeX.
Stars: ✭ 62 (+376.92%)
Mutual labels:  latex

nom-bibtex

Rust Docs Badge crates.io

A feature complete BibTeX parser using nom.

nom-bibtex can parse the four differents types of entries listed in the BibTeX format description:

  • Preambles which allows to call LaTeX command inside your BibTeX.
  • Strings which defines abbreviations in a key-value format.
  • Comments.
  • Bibliography entries.

Example

extern crate nom_bibtex;
use nom_bibtex::*;

const BIBFILE_DATA: &str = "@preamble{
        \"A bibtex preamble\"
    }

    @Comment{
        Here is a comment.
    }

    Another comment!

    @string ( name= \"Charles Vandevoorde\")
    @string (github = \"https://github.com/charlesvdv\")

    @misc {my_citation_key,
        author= name,
        title = \"nom-bibtex\",
        note = \"Github: \" # github
    }
";

fn main() {
    let bibtex = Bibtex::parse(BIBFILE_DATA).unwrap();

    let preambles = bibtex.preambles();
    assert_eq!(preambles[0], "A bibtex preamble");

    let comments = bibtex.comments();
    assert_eq!(comments[0], "Here is a comment.");
    assert_eq!(comments[1], "Another comment!");

    let variables = bibtex.variables();
    assert_eq!(variables[0], ("name".into(), "Charles Vandevoorde".into()));
    assert_eq!(variables[1], ("github".into(), "https://github.com/charlesvdv".into()));

    let biblio = &bibtex.bibliographies()[0];
    assert_eq!(biblio.entry_type(), "misc");
    assert_eq!(biblio.citation_key(), "my_citation_key");

    let bib_tags = biblio.tags();
    assert_eq!(bib_tags[0], ("author".into(), "Charles Vandevoorde".into()));
    assert_eq!(bib_tags[1], ("title".into(), "nom-bibtex".into()));
    assert_eq!(bib_tags[2], ("note".into(), "Github: https://github.com/charlesvdv".into()));
}
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].