Written by Stéphane GALLAND
Version: 4.0, 2006-04-10
Documentation for bib2html 4.0 and later
4. Some words about the BibTeX format supported by Bib2HTML
Many researchers make use of BibTeX for maintaining a comprehensive bibliography which they can then draw on at will when writing papers.
Bib2HTML is a handy utility that converts BibTeX files into HTML pages. You can use it to easily maintain an updated online bibliography. In addition, it is possible to specify, for each bibfile entry, a set of additional information that will appears inside the generated pages.
The output depends of the used theme. But the pages' hierarchy has a similar structure that the JavaDoc's ones (see the two screenshots generated with the theme Simple and the theme Dyna). It includes a overview page, an index, an list of scientifical domains in which the BibTeX's entries are...
Disclaimer: I've come across mention of other bib2html programs. This program is in no way related to any of them. For the curious, it was implemented using Perl.
To run BibHTML you must install a Perl interpreter. Bib2HTML was tested with Perl v5.8.3 under Linux.
You must also install the following Perl packages (mostly included inside the default Perl distributions):
File::Basename
File::Path
File::Spec
Getopt::Long
Pod::Usage
You could download the lastest sources from the Bib2HTML web page: http://www.arakhne.org/bib2html/download.html.
The sources are commonly stored inside an archive called bib2html-x.x-src.tar.gz
where x.x
is the number of the Bib2HTML's version.
After downloading the sources' archive, you could uncompress it:
$ gzip -d -c bib2html-x.x-src.tar.gz | tar -x
This command will create the directory ./bib2html-x.x
in which all the sources are.
The main step of the installation is the copy of all the files required by Bib2HTML. In fact, only a copy was necessary to install Bib2HTML, no compilation.
I assume that you want to install Bib2HTML into the directory /usr/local/lib/bib2html
. Type the following commands to install Bib2HTML:
./src
:
$ cd bib2html-x.x
$ mkdir /usr/local/lib/bib2html
$ cp -R -f ./src/* /usr/local/lib/bib2html/
$ chmod ugo+x /usr/local/lib/bib2html/bib2html.pl
$ cp -f ./COPYING /usr/local/lib/bib2html/
$ cp -f ./Changelog /usr/local/lib/bib2html/
$ cp -f ./AUTHORS /usr/local/lib/bib2html/
$ cp -f ./AUTHORS /usr/local/lib/bib2html/
$ cp -f ./VERSION /usr/local/lib/bib2html/
From now you could launch Bib2HTML by typing one of the following commands:
/usr/bin/perl
:
$ /usr/local/lib/bib2html/bib2html.pl
/usr/bin/perl
:
$ path_to_perl/perl /usr/local/lib/bib2html/bib2html.pl
Inside the section where I explain how to run Bib2HTML, I assume that the launching command was bib2html
. If you don't apply the commands for the section 2.5, you must replace bib2html
by one of the above commands.
To finalize the installation, you could create a symbolic link to the Bib2HTML's script from one of the directories inside your PATH
(I assume that /usr/local/bin
was in your PATH
):
$ cd /usr/local/bin
$ ln -s -f /usr/local/lib/bib2html/bib2html.pl bib2html
This recommendation will permits to all the users to run Bib2HTML very simply.
Warning: this recommendation works only if the Perl's interpreter was /usr/bin/perl
.
You could simplify your life by installing Bib2HTML with one of the proposed packages (see the download page) for a Linux distributions.
Bib2HTML and the Operating System's Supports | |||
GNU/Linux Mandrake | ![]() |
GNU/Linux Debian | ![]() |
GNU/Linux Slackware | ![]() |
GNU/Linux RedHat | ![]() |
Mac OS X | ![]() |
Windows with Cygwin | ![]() |
Windows without Cygwin | ![]() |
Other UNIX | ![]() |
![]() ![]() ![]() ![]() |
Bib2HTML takes a list of arguments: the names of the bibfiles you wish to process, e.g.
$ bib2html firstfile.bib secondfile.bib
The output is written by default is the directory ./bib2html
.
SYNOPSYS
bib2html [options] file [file ...]
OPTIONS
General options | |
-[no]b --[no]bibtex | These options permit to generate (or not) a verbatim of the BibTeX entry. |
--doctitle text | Sets the title that appears in the main page. |
-f --force | Forces to overwrite into the output directory. |
-? -h | Show the list of supported options. |
--help --man --manual | Show the manual page. |
-o directory --output&bnsp;directory |
Sets the directory in which the pages will be generated.
|
--version | Show the version of Bib2HTML. |
--windowtitle text | Sets the text that appears as the window's title. |
Generator options | |
--d name[=value] --generatorparam name[=value] |
Sets a generator param. It must be a key=value pair or simply a name. Example: "target=thisdirectory " defines the parameter target with corresponding value "thisdirectory ". The specified parameters which are not supported by the generator are ignored.
|
--g class --generator class |
Specify the generator to use. class must be a predefined generator's identifier of a valid Perl classname. See --genlist to obtain the list of the predefined generators. The default generator is HTML . See the list of supported generators for more details.
|
--generatorparams | Shows the list of supported parameters, and their semantics for the selected generator. |
--genlist | Shows the list of the supported generators. |
Checker options | |
--[no]checknames |
Force Bib2HTML to check the author's names. This checking includes:
|
Theme options | |
--theme name |
Specify the theme used by the generator. See the option --themelist to obtain the complete list of supported themes. See the list of the supported themes for more details about them.
|
--themelist | Shows the list of supported themes. See the list of the supported themes for more details about them. |
Localization options | |
--lang name |
Sets the language used by the generator. See --langlist to obtain the list of the supported languages.
|
--langlist | Shows the list of supported language. |
TeX options | |
-p file --preamble file | Sets the name of the file to read to include some TeX preambles. You could use this option to dynamicaly defined some unsupported LaTeX commands (see how to define and use a preamble). |
--texcmd | Shows the list of supported LaTeX commands. The supported TeX commands permits to create a specific HTML output accordingly to the TeX semantic. |
Logging options | |
-q | Don't be verbose: only error messages are displayed. |
--[no]sortw | Shows (or not) a sorted list of warnings by appearence line. For example, this could be use to obtain a better output for a parsing program. |
-v | Be more verbose. Each time this option was specified, the verbosing level was increazed. |
--[no]warning | If false, the warning are converted to errors. An error stops the program when it occurs. A warning does not stops the program. |
To be recognized by Bib2HTML, each entry must begin with an '@
', immediately followed by the type of entry it is (see the list of recognized entry types), immediately followed by a '{
'. It will then process the fields you've specified for that entry until it hits the closing '}
' (see the list of recognized fields). The format then looks something like this:
@entrytype{entry_key,
fieldname1 = "Contents",
fieldname2 = {Contents},
fieldname3 = contents,
...
}
The first information required by the BibTeX's file format is the identifier of the entry. This entry_key
must be unique and, in most of the cases, it is composed by the author's name, the publication year... In LaTeX, this key was used to reference this bibliographical entry.
Three types of field contents are valid, as shown here. In fieldname1
, the contents are enclosed in quotes; in fieldname2
they are enclosed in curly braces, and in fieldname3
there are no surrounding characters. The third type is often used to specify pre-defined string values, and any value specified in this way will be compared to the list of @strings
you've defined for a possible match (if there is a match, it will be expanded out to the full value of the @string
).
Any amount of whitespace can come between the fieldname
and the '=
', or between the '=
' and the contents. In addition, Bib2HTML can handle nested {}
's in the contents of a field.
Bib2HTML recognizes the following bibliography entry types (by the generator HTML):
@article
: an article inside a national or international journal, e.g. International Journal of Production Economics.@book
: a book, e.g. Les Systèmes Multi-Agents by Professor Jacques Ferber.@booklet
: a standalone part of a book, i.e. a part with its own author, title...@inbook
: a chapter or a part of a book.@incollection
: an article inside a collection of national or international journals, e.g. Lecture Notes on Artificial Intelligence.@inproceedings
: a paper inside the proceedings of an national ou international conference, e.g. European Simulaton Multiconferences.@manual
: a technical manual published (or not) by an university. Don't be confused with the technical report which is a report, not a manual.@mastersthesis
: a student thesis made under the authority of an university of a school, e.g. engineering's report.@misc: see the note below
@phdthesis
: a research thesis made under the authority of a laboratory, an institution, an university, e.g. PhD thesis, Doctorat thesis...@proceedings
: a book that contains all the papers of a conference. Don't choose if you want a paper inside a conference (see the @inproceedings
instead), e.g. Proceedings of the International Conference on Multi-Agent Systems.@techreport
: a technical report published by an university. In general a technical report has a internal number which is specific to the institution. Don't be confused with the technical manual which is a manual, not a report.@unpublished: a document which are never published.
Any other entry type will be proceeded as @misc
.
Note about the type @misc
:
this entry type is considered as the default. It requires the following fields: author
and year
. This constraint is not from the definition of the standard BibTeX file format. But it was introduced for the page's generation of Bib2HTML.
I welcome requests to support other entry types. The generators could support their own entry types. See the section about supported generator for more details
Bib2html recognizes the following bibliography field types (by the generator HTML):
address
annote
author
(see the definitions of the names)booktitle
chapter
comments
(alias annote
)edition
editor
(see the definitions of the names)howpublished
institution
month
note
number
organization
pages
publisher
school
series
title
type
volume
year
The real support of a field depends on the entry type in which it appears. The following table explains where the fields are needed and where they are optional.
Supported Fields by the Generator HTML | ||||||||||||
article | book | booklet | inbook | inproceeding incollection |
manual | masterthesis | misc | phdthesis | proceedings | techreport | unpublished | |
address | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
annote | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
author | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
booktitle | ![]() |
|||||||||||
chapter | ![]() |
|||||||||||
edition | ![]() |
![]() |
![]() |
|||||||||
editor | ![]() |
![]() |
![]() |
![]() |
![]() |
|||||||
howpublished | ![]() |
![]() |
||||||||||
institution | ![]() |
|||||||||||
journal | ![]() |
|||||||||||
month | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
note | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
number | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||
organization | ![]() |
![]() |
![]() |
|||||||||
pages | ![]() |
![]() |
![]() |
|||||||||
publisher | ![]() |
![]() |
![]() |
![]() |
||||||||
school | ![]() |
![]() |
||||||||||
series | ![]() |
![]() |
![]() |
![]() |
||||||||
title | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
type | ![]() |
![]() |
![]() |
![]() |
||||||||
volume | ![]() |
![]() |
![]() |
![]() |
![]() |
|||||||
year | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() When a cell was empty, this field is ignored by Bib2HTML |
I welcome requests to support other fields. The generators could support their own. See the section about supported generator for more details
Like BibTeX, Bib2HTML also handles arbitrary @string
definitions, which can be used in any entry field, e.g.
@string{acl = "Association for Computational Linguistics"}
...
@proceedings{PROC,
publisher = acl,
...
}
Bib2HTML also supports the definition of TeX preambles. The TeX preambles are TeX commands which are evaluated and ran before any treatement on the BibTeX entries. The definition of a preamble is done with @preamble
, e.g.
@preamble{\def\th{\ensuremath{^{th}}}}
...
The TeX commands which can be put inside a @preamble
are limited to the commands supported by Bib2HTML (see the command-line option --texcmd
to obtain a list).
In some fields (e.g. author
and editor
) you must specify a list of names. This list is composed of names separated by the keyword AND
. Each name must respect one of the following syntaxes:
[von] Last, jr, First
First [von] Last, jr
[von] Last, First [jr]
First [von] Last [jr]
If present the jr
part must be one of 'junior
', 'jr.
', 'jr
', 'senior
', 'sen.
', 'sen
', 'esq.
', 'esq
', 'phd.
' and 'phd
'.
Good Example: DUPONT, Henri and Pierre, Alain Michel and Jim WASHINGTON jr.
DUPONT,
Henri
and
Pierre,
Alain Michel
and
Jim
WASHINGTON
jr.
last
first
last
first
first
fast
jr
Bad Example: Henri DUPONT, Alain Michel Pierre and Jim WASHINGTON jr.
Henri DUPONT,
Alain Michel Pierre
and
Jim
WASHINGTON
jr.
last
first
first
fast
jr
The generator is one of the major module of Bib2HTML (with the BibTeX parser). It aims to create the HTML files from the internal data structure given by the parser. It is the generator which apply the canvas of the generated pages (use of 3 frames, links to the overview the index from the header of each entry's page...).
In addition to the usable generator listed below, Bib2HTML includes an abstract generator which is the basis of all the others.
The generator called HTML
is the default HTML generator of Bib2HTML. Its purpose is to generate a basic content which is quiet similar to a lot of BibTeX to HTML tools (such as the LaTeX distribution's bib2html
).
SUPPORTED FIELDS |
See this table. |
FEATURES |
The generated result in based on three frames:
|
One page per entry:
|
One short-overview page (inside the upper-left frame) which contains all the entry's types. |
One short-overview page (inside the lower-left frame) which contains all the entries grouped by year and sorted by authors and publication date. |
One overview page (inside the right frame) which contains a list of all the entries grouped by year and sorted by authors and publication date. |
One tree-view page which contains all the entries grouped by publication's type and sorted by authors and publication date. This page could be overwriting by subclasses of this generator to provide antoher kind of tree-view. |
A set of index pages. The index lists the significant words found inside the BibTeX file and propose a link to the entry's page where this word is. The generator produces one HTML page for each letter of the alphabet. A significant word is a word which has more than 2 letters and which are not known are not-significant by the Bib2HTML's internal database. |
GENERATOR'S PARAMETERS | |
author-regexp=expr |
A Perl's regular expression (which is case-insensitive) against which the lastname of an author is matched. If the author matches, (s)he is included in the overview window author list. |
hideindex |
If presents, hide the index link and do not generate the index files. |
max-names-overview=integer |
An integer which is the maximal count of authors in the overview page. |
max-names-list=integer |
An integer which is the maximal count of authors on the listing in the lower-left frame. |
newtype=expr |
A comma separated list of new publication's types, with singular and plural label. The value must respect the format: @misc entries (except if you define your own generator).
|
type-matching=expr |
A coma separated list of items which inititalizes an associative array of type entry mappings. Each item must respect one of the following syntaxes:
incollection,article,inproceedings,article means that all the
BibTeX's @incollection entries will be displayed as @article entries.
The same thing for the @inproceedings .So, the specified value for this parameters must be a list of pairs. An alternative syntax is: type=>type[,type=>type...] . With the same example a above,
the value should be incollection=>article,inproceedings=>article .
|
xml-verbatim |
If this parameter was given, Bib2HTML will generate a verbatim text that corresponds to the XML specification of the entries. This text is put just below the BibTeX verbatim text. |
The generator Extended
is an extension of HTML
. Its purpose is to provide some additional features.
NEW SUPPORTED FIELDS | |
abstract |
is the abstract associated to the entry (in most of the case, it is written at the begining of the paper's article). |
isbn |
is the ISBN number of the entry. |
issn |
is the ISSN number of the entry. |
keywords |
is list of the keywords associated to the entry (in most of the case, they are mentionned at the begining of the paper's article). |
localfile |
is the path (on your local host) to a electronical version of
the document that is described by the entry (I recommended to put only
a PDF or a Postscript file here). If this field was present and the corresponding file was found, Bib2HTML generates a link to this into the entry's page. See the parameters of this generator to influence the default location of the electronical files. |
readers |
is a list of people who read this entry. The value of this field must support the BibTeX's syntax for names. |
url |
is an URL associted to the entry. This field supports the URL's protocols
ftp: , file: , https: ,
gopher: , mailto: and http: (this last is the default).
|
pdf |
is an URL associted to the entry with
corresponds to a PDF file. This field supports the URL's protocols
ftp: , file: , https: ,
gopher: , mailto: and http: .
|
NEW FEATURES |
In the entry's pages:
|
The overview page is extended with the list of all the authors. |
NEW GENERATOR'S PARAMETERS | |
absolute-source=path |
is the absolute path of the directory where the downloadable documents could be found
(see the field localfile for details about the downloadable documents).The parameters absolute-source , relative-source and
target-url are mutually exclusive.
|
backslash |
if presents, indicates that backslashes will be removed from the link fields (url,ftp...). |
doc-repository=path |
if presents, indicates the directory where are stored the electronical documents. This option assumes hat electronical documents have a name similar to the BibTeX key. For example the entry with the key Galland.esm00 could have an associated electronical document with its name equals to one of Galland.esm00.pdf , Galland.esm00.PDF , Galland.esm00.ps or Galland.esm00.PS .
|
nodownload |
if presents, indicates that no link to the electronic documents will be generated. By extension, if presents no copy of there files will be made. |
relative-source=path |
is the relative path of the directory where the downloadable documents could be found
(see the field localfile for details about the downloadable documents).
This path is relative to the directory where the BibTeX file is located.The parameters absolute-source , relative-source and
target-url are mutually exclusive.
|
target-url=url |
is an URL where the downloadable documents could be find. It means that
if this URL was specified, Bib2HTML assumes that all the files
could be download from the specified URL. It means also that
no copy will be made by Bib2HTML. The parameters absolute-source , relative-source and
target-url are mutually exclusive.
|
The generator Domain
is an extension of Extended
. Its purpose is to provide some additional features about the scientifical domains of the entries.
This generator introduces the concept of «domain» which corresponds to the name of a scientifical context/domain. An entry could be inside one or more domains.
NEW SUPPORTED FIELDS | |
domain |
is the first domain in which this entry was. This field does not overset the previous domain's setting (except for domain ).
|
domains |
is a list of domains in which this entry was. The domain's separator is the character ': '.This field does not overset the previous domain's setting (except for domains ).
|
nddomain |
is the second domain in which this entry was. This field does not overset the previous domain's setting (except for nddomain ).
|
rddomain |
is the third domain in which this entry was. This field does not overset the previous domain's setting (except for rddomain ).
|
NEW FEATURES |
Inside the entry's page, a section with the other entries inside the same domains was added. The entries of this list are grouped by domains and sorted by authors. |
One domain-view page which contains all the entries grouped by domain and sorted by authors and publication date. This page could be overwriting by subclasses of this generator to provide antoher kind of domain-view. |
The generator called XML
is the default XML generator of Bib2HTML. Its purpose is to generate a basic content which respects the XML DTD defined by BibteXML.
SUPPORTED FIELDS |
See this table and the definition of the BibteXML's DTD. |
--theme
and list all the supported themes which --themelist
.
The theme Simple
is the default theme. It is quiet similar to the default output of JavaDoc.
The theme Dyna
is an experimental theme. It uses its own look policy and includes some dynamical features such a collapsing lists...
Bib2HTML supports the French, the English, Spanish (thanks to Sebastian), Portuguese (thanks to João) and Italian (thanks to Cristian).
Bib2HTML is under the GNU GPL license.
Bib2HTML is a converter of BibTeX data files into HTML pages.
opyright © 1998-2006 Stéphane GALLAND
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; see the file COPYING
. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
I would like to thank the following people for generously taking the time to point out bugs, suggest improvements, or send me Bib2HTML patches. Many thanks to:
uniq
to eliminate redundant
values from a sorted list.\#
' and '\L
'.__texcommand_map_to
when
a accentuated TeX command was encoutered but
Bib2HTML does not known any corresponding HTML character
(e.g. \'b
).__texcommand_map_to
which does not
return the right variable's value.save_generator_parameter
which prevent
to properly set the parameters' values.addentry
which permits to add an BibTeX's field.
All the fields' names are lower-cased to avoid
setting problems.max-titlelength-overview
and show-journalparams-overview
.You could submit bugs, suggest improvements, or send Bib2HTML patches by using one of the following methods:
galland@arakhne.org
;Copyright 2004-06 © Stéphane GALLAND<galland@arakhne.org>