6. Skribilo User Manual — Bibliographies
Skribilo provides support for bibliographies. To setup a bibliography database and to be able to refer to its entries from a document, the following things must be done:
This section describes functions dealing with bibliography tables. Essentially, bibliography tables are the representation of your bibliographies used by Skribilo at run-time.
|The value to be tested|
*bib-table* returns a global, pre-existing
*bib-table* is actually an SRFI-39
parameter object, so it can be queried and modified like any other
make-bib-table constructs a new
|The name of the bibliography table.|
bibliography function loads bibliography entries
into the bibliography table specified using the :bib-table
parameter. It can be passed either lists representing entries (such as
an article or book reference), or strings denoting the names of files
that contains several entries. All the entries loaded in memory can
then be referred to with
ref. A bibliography database
must be loaded before any reference is introduced. It is
advised to place the
bibliography function call before
the call to the
document function call.
|:command||html lout latex context info xml||An external command to be applied when loading
the bibliography entries. The sequence |
|:bib-table||html lout latex context info xml||The table where entry is searched.|
Files passed as an argument to
searched in the current bibliography path, which is defined by
the *bib-path* SRFI-39 parameter. This parameter
contains a list of directories and its value can be obtained using
(*bib-path*). Its value can be altered using the -B command-line option of the skribilo compiler (see Chapter 14 for details).
The :command option can be used to import foreign bibliography. The following example, shows how to directly use a BibTeX bibliography using the Skribebibtex translator.
The Skribe/Skribilo bibliography database uses a format very close to the BibTeX one, which is a parenthetic version of BibTeX. Here is the syntax of an entry:
BibTeX files cannot be directly loaded but the tool skribebibtex can be use to automatically convert BibTeX format to Skribe bibliography format. Here is an example of a simple Skribe database.
the-bibliography displays the bibliography.
|:bib-table||html lout latex context info xml||The bibliography table to be displayed.|
|:pred||html lout latex context info xml||A predicate filtering the bibliography entries. It takes
two parameters: the bibliography entry and the
|:sort||html lout latex context info xml||A function sorting a list of entries.|
|:labels||html lout latex context info xml||Specifies the style for bibliography entries
labels. The default, |
|:count||html lout latex context info xml||The symbol |
Note that the
name+year label style will only work if the
following conventions are followed by the
author field of your
authorfields of bibliographic entries should be a string containing a comma-separated list of full author names;
first-name second-name ... last-name.
name+yearlabel style, it is sometimes desirable to preclude automatic abbreviations for some authors, e.g., when the author is the name of a consortium or company rather than that of a person. In that case, you should enclose the value of your
authorfield in a
|:ident||html lout latex context info xml||The node identifier.|
|:class||html lout latex context info xml||The node class.|
The following example illustrates typical use of a bibliography.
The :pred option is bound to a function of one argument
that filters bibliography entries. It is used to control which entries
must appears on a bibliography. The default behavior is to display
only the entries referenced to in the text. For instance, in order to
display all the entries of a bibliography, is it needed to
print the bibliography with a predicate returning always
The second example, filters out the entries that are not book or that are not referenced to from the document.
The last example, illustrates how to change the rendering of a
bibliography. It uses the [?mark processor: skribilo/documentation/manual.scm:307:] construction
and it defines two [?ident writer: ./bib.skb:245:] for
markups. These two markups are introduced by Skribe when it loads a
bibliography. All fields of bibliography entries are represented by
markups whose prefix are
&bib-entry-. The parent of all these
markups is the bibliography entry itself. The
are options of there parent.
The :sort option of the
markup is used for sorting the bibliography entries. There are three
pre-existing functions for sorting entries:
|The list of entries.|
The first function sorts the entries according to an alphabetic ordering on authors. The second sorts according to an alphabetic ordering on entries identifier. The last one sorts according to entries date.
In addition, the
(skribilo biblio author) module exports
a fourth procedure that sorts bibliography entries:
|The list of entries.|
This procedure allows entries to be sorted according to the last
name of the first author of each bibliography entry. For this to work,
the author field of bibliography entries must follow the same
conventions as for the
name+year label style of
FIXME: This tool is not available as of Skribilo version 0.9.2.