#!/bin/csh -f
#
# bib2html - make an html file that is equivalent to the bib files,
# using one of the html bib styles
#
# usage:
set usage='usage: bib2html {alpha|abstract} file.bib...'
# Output is to bib.html.
# alpha makes a bibliography like bibstyle{alpha}
# abstract makes a bibliography like bibstyle{abstract}
#
# David Kotz 7/94
# dfk@cs.dartmouth.edu
# URL: http://www.cs.dartmouth.edu/faculty/kotz.html
set tmp=/tmp/bib2html$$
onintr cleanup
if ($#argv < 2) then
echo "$usage"
exit 1
endif
set style=$1
set files=($2:r)
foreach file ($argv[3-])
set files=($files,$file:r)
end
echo creating $tmp.aux for $files
cat > $tmp.aux < bib.html \
-e 's/\\ie/i.e./g' \
-e 's/\\eg/e.g./g' \
-e 's/\\etc/etc./g' \
-e 's+\\vs\\+vs.+g' \
-e 's/\\usec/usec/g' \
-e ':again' \
-e '/%$/N' \
-e 's/%\n//' \
-e 't again' \
$tmp.bbl
echo ""
echo output is in bib.html
cleanup:
rm -f $tmp.{aux,bbl,blg}