Did you know ... Search Documentation:
Pack bibtex -- prolog/bibtex.pl
PublicShow source

Useful Predicates

entry/3 is used as a BibTeX entry (a "@" entry in the file). entry(+Name: term, +Label: string, FieldList: list) where FieldList are field/2 terms.

field/2 is used as a fields key-value from a BibTeX entry. field(+Key: atom, Value: String).

author
- Gimenez, Christian
license
- GPLv3
 field(-Key:codes, -Value:codes)// is det
Return the Key = Value field from a bibtex field.
 fields(-Lst:list)// is det
Return a list of field/2 terms parsed from a bibtex fields string. field(+Key: atom, +Value: string).
 entry(-Entry:pred)//
Return an entry/3 term corresponding with the codes parsed.
Arguments:
Entry- entry(Name:atom, Label:string, Lst: list).
 bibtex_file(+Path:term, -LstEntries:list)
Parse a whole file and retrieve its entries.

This is a slower predicate because it reads all the file into string codes. For bigger files use nth_bibtex_file/3.

 nth_bibtex_file(+Path:term, +Number:int, -Entry:term) is det
Search the nth arroba character and read that entry. Number is an integer number where 1 is the first entry.

Return false if there's no nth entry or file couldn't be readed.

 author_field(+Field:term, Authors:list)
Parse an author field.
Arguments:
Field- a field/2 term: field(+Author:term, +Value: String).
Authors- a list of author/2 terms: author(+Surname: string, +Name: string).
 bibtex_author(+File:term, +Author:string, -BibEntries:list)
Search in the BibTeX file all BibTeX entries related to the given author.
Arguments:
File- the filename.
Author- a string with the author name or surname word (just a word!).
BibEntries- a list of entry/3.
 all_keywords(+Codes:codes, -Keywords:list)
True if Keywords is a list with the keywords retrieved from Codes.

This predicate identify if the codes are separated by ",", ";" or spaces.

Arguments:
Codes- the value of a "keywords" field.
Keywords- a list of strings with the keywords.
 bibentry_keywords(+BibEntry:term, -Keywords:list)
return from a BibTeX entry/3 all the keywords declared.

This predicate parse each "keywords" field's values.

Arguments:
Keywords- a list of strings.
BibEntry- an entry/3 compound term.