|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 1101 (0x44d)
Types: TextFile
Names: »slbibtex.sh«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
└─⟦this⟧ »./babel/swedish/SLaTeX/slbibtex.sh«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
└─⟦23cd347d5⟧ »unix3.0/babel.tar.Z«
└─⟦2fb9f645a⟧
└─⟦this⟧ »babel/swedish/SLaTeX/slbibtex.sh«
#!/bin/sh
case $# in
1) case $1 in
*.aux) IN=$1 ;;
*) IN=$1.aux ;;
esac ;;
*) echo "Usage: $0 file[.aux]"; exit 1;;
esac
ROOT=`basename $IN .aux`
TMP=/tmp/slbibtex.$$
ALL=
HERE=$IN
while true # Find ALL included .aux-files
do # Maybe this should preserve .aux-file order?
ALL="$ALL $HERE"
HERE=`sed -n '/@input/s/^.*@input.\(.*\.aux\).*$/\1/p' $HERE`
if test X = X$HERE
then # No more .aux-files
break
fi
done
trap 'rm -f $TMP.*; exit 1' 1 2 15
# Sort and remove duplicate .aux-files.
HERE=`for i in $ALL
do # sort needs a newline thus use a for-loop instead of plain echo
echo $i
done | sort -u`
# Extract bibtex info and convert (if needed) to LaTeX style
sed -n -e 's/[\!\\]citation[<{]\(.*\)[>}]/\\citation{\1}/p' \
-e 's/[\!\\]bibstyle[<{]\(.*\)[>}]/\\bibstyle{\1}/p' \
-e 's/[\!\\]bibdata[<{]\(.*\)[>}]/\\bibdata{\1}/p' $HERE > $TMP.aux
# Run bibtex on translated bibliography information
bibtex $TMP
# Convert to SLaTeX style
l2sl < $TMP.bbl > $ROOT.bbl
sed -e 's!'$TMP'!'$ROOT'!g' \
-e 's/\\/!/g' \
-e 's/{/</g' \
-e 's/}/>/g' $TMP.blg > $ROOT.blg
rm -f $TMP.*