PHP-BibHTML templates
=====================

PHP-BibHTML renders the bibtex information via templates. Templates are
small PHP files that specify how the information from the bibtex entry
should be formatted. They return a string, $bibHTML_bibentry_tmpl, which
contains the formatted text in HTML.

Supported Bibtex types
----------------------
PHP-BibHTML supports ONLY the following bibtex types:
   - article
   - book
   - booklet
   - conference
   - inbook
   - incollection
   - inproceedings
   - manual
   - mastersthesis
   - misc
   - phdthesis
   - proceedings
   - techreport
   - unpublished
Note that there are (as of this writing) no other valid bibtex entry
types.

The template fore each of these is stored in $NAME.tmpl - so e.g.
article.tmpl, book.tmpl, etc.
These templates are automatically loaded when parsing a bibtex entry of
the corresponding type.

How bibtex fields are passed
----------------------------
Bibtex information is accessible to the template file via the following
variables:
    - $address: address
    - $annote:  annote
    - $author:  author
    - $bktitle: booktitle
    - $chap:    chapter
    - $edition: edition
    - $editor:  editor
    - $howpub:  howpublished
    - $inst:    institution
    - $journal: journal
    - $key:     key
    - $month:   month
    - $note:    note
    - $num:     number
    - $org:     organization
    - $pg:      pages
    - $pub:     publisher
    - $school:  school
    - $sry:     series
    - $title:   title
    - $type:    type
    - $vol:     volume
    - $year:    year
These variables are just set to the information present in the
bibtex entry.
Note: each variable is processed by the latex2html function - so any
LaTex special characters (such as \"o, \'e, etc) are replaced by their
HTML equivalents insofar as known (&ouml;, &eacute; etc.)

Unset / empty fields are empty strings. Example:
	If note is not present in the bibtex entry, then $note = "".


For example:
	@inproceedings{KEY,
	  ...
	  pages = {39--42},
	  ...
	}
  Thus, $pg = "39-42".
  If you want this to appear in the output as "pp. 39-42", then you can
  add something like:
  	$pg = "pp. " . $pg;
  before formatting the final string.

How to return the HTML-formatted output
---------------------------------------
The template is to deliver the formatted text by setting the variable
$bibHTML_bib_entry_tmpl.

Example (from article.tmpl):

	$bibHTML_bibentry_tmpl = <<<TMPLARTICLE
			<span class="title">$title</span>.
			<span class="author">$author</span>.
			<span class="journaltitle">$journal</span>,
			$vol$num$pg$comma$year.
	TMPLARTICLE;

This variable is then trimmed, and automatically included in the output.

See the existing template files for more examples.
