(((title . "Reference Manual of the LAML BibTeX library") (author (ast "span" ("Kurt N\370rmark" #t " " #t (char-ref copy)) () double xhtml10-transitional ()) #t "normark@cs.aau.dk") (affiliation "Department of Computer Science," #t "Aalborg University," #t "Denmark.") (abstract . " This is a collection of bibtex functionality for LAML. One main part of this collection provides a parsing function of a bibtex file, leaving the result as a list of Lisp association lists. Another part accesses information in parsed bibtex file. The last part has HTML/LAML presentation functions for bibtex.

Please notice that this is still not a complete bibtex parser. We currently support only the most common and most used constructs. The Bibtex presentation functions are not complete either.

The LAML bibtex parser is not very fast. So we envision that the parser is activated every now and then on a bibtex file f.bib, in order to produce the parsed lisp file f.lsp. We recommend that you place an LAML command file together with you bibtex file which does that job. You can read such files using the function read-parsed-bibtex-files.

Usage:

It is possible to parse a bibtex file and get the list bibtex entries represented as association lists. This is done by parse-bibtex-file. The variable parse-result will contain the entries.

As an example, the parser is can be activated by

 (parse-bibtex-file \"file\") 
where \"file\" is the file name without the bib extionsion.

Given the existence of a list of bibtex entries represented as a list of association lists bibtex-list, say parse-result, it is possible to HTML present this list by for instance

 (present-bibtex-entries parse-result (p)) 
Often it will be useful to extract some subset of a bibtex list. This can, of course, be done be filtering, but the following methods makes it possible to extract a subset given a key-list, for instance via
 (bibtex-entries key-list bibtex-list warn-if-non-existing-entry) 
The keylist itself can be produced from a bibtext-list via the following call:
 (key-list-matching \"normark\" bibtex-list) 

Besides the general library, this library requires the collect-skip parsing library (not loaded by bibtex). The presentation part also assumes that the HTML mirrors are loaded.

There exists a function called bibtex in laml.scm which activates the bibtex parser, and which in addition presents the bibtex entries in HTML via LAML. The bibtex function should be activated in an interactive LAML session (from a Scheme prompt with LAML loaded).

This tool can be used together with the HTML4.01 and XHTML validating mirrors. ") (scheme-source-file . "/user/normark/scheme/tools/bibtex/bibtex.scm/") (laml-resource . "true") (documentation-commenting-style . not-provided) (default-attribute-explanation . not-provided) (source-destination-delta . not-provided) (css-prestylesheet . "compact") (css-stylesheet . "argentina") (css-stylesheet-copying . "true") (make-dtd-manual-template . not-provided) (keep-syntactical-comment-file . not-provided) (manual-destination-name . not-provided) (mirror-names-defined . not-provided) (mirror-name-prefix . not-provided) (attribute-sorting . not-provided) (scheme-source-linking . not-provided)) ((kind "manual-section") (section-title "Bibtex parsing.") (section-body " The function bibtex-parse-file parses a bibtex file f.bib and delivers the parsed result on f.lsp. The parser is able to parse my all.bib file, but it cannot accept all variants allowed by bibtex. Multiple authors separated by 'and' are parsed to a list of authors. All bibtex values must be enclosed in {...}, not \"...\".")) ((kind "manual-page") (description "The result of bibtex-parsed can be accessed via the variable parse-result. ") (title "parse-result") (form parse-result)) ((kind "manual-page") (description "A variable that controls whether bibtex-parse-file emits messages to standard output while parsing. ") (title "bibtex-verbose") (form bibtex-verbose)) ((kind "manual-page") (description "A boolean variable that controls if a link is to be generated from the title of a biblographic item. Notice that a link is only generated if a url field is given in the bibtext record. ") (title "present-links-from-title?") (form present-links-from-title?)) ((kind "manual-page") (description "Parses a bibtex file file.bib and delivers the parsed result on file.lsp. The result is a list of association lists where two initial keys are used: type gives the bibtex type of an entry, and key gives the keyname which names the entry. The other keys in the association list are given by the field names in the bibtex record. All keys are symbols. ") (title "parse-bibtex-file") (form (parse-bibtex-file file))) ((kind "manual-section") (section-title "Access to bibtex files and entries.") (section-body "The functions in this section accesses parsed bibtex files and bibtex entries (alist representations of bibtex entries).")) ((kind "manual-page") (description "Read and return an appended list of parsed bibtex files. File-list is a list of full paths to bibtex-files without the trailing lsp extension. ") (title "read-parsed-bibtex-files") (form (read-parsed-bibtex-files . file-list))) ((kind "manual-page") (description "Read and return the parsed entries of the bibtex file file, which is a full path without the trailing lsp extension. ") (title "read-parsed-bibtex-file") (form (read-parsed-bibtex-file file))) ((kind "manual-page") (description "Access and return a bibtex entry (an association list) from bibtex-list (a parsed bibtex list). If it does not exit return #f. ") (title "get-bibtex-entry") (form (get-bibtex-entry key bibtex-list))) ((kind "manual-page") (description "Return a subset of bibtex-list, as ennumerated by key-list (a list of key strings), and in the order given by key-list. non-existing is a procedure or function, which is called with key as parameter if a key does not appear in bibtex-list. non-existing can ignore the error, in which case the collection of entries continues, it can issue a warning, or it can stop the collection. ") (title "bibtex-entries") (form (bibtex-entries key-list bibtex-list non-existing-key))) ((kind "manual-page") (description "A possible non-existing-key function to bibtex-entries. This function can be used as the last parameter to the function bibtex-entries. ") (title "ignore-non-existing-entry") (form (ignore-non-existing-entry key))) ((kind "manual-page") (description "A possible non-existing-key function to bibtex-entries. This function can be used as the last parameter to the function bibtex-entries. ") (title "warn-if-non-existing-entry") (form (warn-if-non-existing-entry key))) ((kind "manual-page") (description "A possible non-existing-key function to bibtex-entries. This function can be used as the last parameter to the function bibtex-entries. ") (title "stop-if-non-existing-entry") (form (stop-if-non-existing-entry key))) ((kind "manual-page") (description "Return a list of keys (string) which match partially or fully a key in bibtex-list. This function is useful to select a subset of the keys in a bibtex collection. Use bibtex-entries to access these entries. ") (title "key-list-matching") (form (key-list-matching key-part bibtex-list))) ((kind "manual-page") (description "A less than or equal predicate on parsed bibtex entries (association lists). Assumes as a pre-condition that the year field is defined in both entries. Takes a possible month field into consideration if necessary. ") (title "bibtex-entry-leq-by-time?") (form (bibtex-entry-leq-by-time? entry-1 entry-2))) ((kind "manual-section") (section-title "Bibtex HTML/LAML presentation functions.") (section-body " The functions in this section presents a single bibtex entry as HTML via LAML.")) ((kind "manual-page") (parameters (parameter "entry" "A parsed bibtex entry.") (parameter "trailing-presentation" "A function of entry that returns additional presentation to be string-appended to the main presentation. Defaults to (lambda (entry) \"\").")) (description "The overall top-level function that presents a single bibtex entry. Returns an HTML string. As an optional-parameter, trailing-presentation is a function that may present additional and specialized aspectes of the entry. trailing-presentation is a function of one parameter, namely entry. It defaults to a function that returns the empty string. ") (returns "a list of AST document constituents (pieces of markup, which for instance can be put into a div or p XHTML element).") (form "(present-bibtex-entry entry [trailing-presentation])") (title "present-bibtex-entry")) ((kind "manual-page") (description "Present a list of bibtex entries speparated by sep (a string). Returns an HTML string. ") (title "present-bibtex-entries") (form (present-bibtex-entries entries sep))) ((kind "manual-page") (description "Get the field with key from the parsed bibtex entry. The key names are as given in the bibtex source file. Two special key names apply: key and type. key is unique identification of a bibtex record. The key url is special too. It accesses in reality rawurl, if available, else url. type is the kind of bibtex record. The optional parameter status is either the symbol required or optional, with required as default (used for warning purposes only). ") (title "get-bibtex-field") (form (get-bibtex-field key entry . optional-parameters))))