|
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 p
Length: 2256 (0x8d0) Types: TextFile Names: »printbib«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« └─⟦036c765ac⟧ └─⟦this⟧ »TeX3.0/BibTeX.inputs/Contrib/printbib« └─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦this⟧ »./tex82/LaTeX/LaTeXbibtex/Contrib/printbib« └─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z« └─⟦c58930e5c⟧ └─⟦this⟧ »TeX3.14/BibTeX.inputs/Contrib/printbib«
#! /bin/sh # set -x usage='usage: printbib[key] [-noprint|-nocheck|-style bibstyle|-title "title"|-output file|-predef "file,file,..."] bibfile...' # you may have to change this for your site: files=${predef-"/users/bib/predef"} title=${title-", sorted by first author"} style=${style-skey} output=${output-test} check=${check-true} print=${print-true} while : do case "$1" in -p|-print) print=true; shift;; +p|-noprint) print=false; shift;; -c|-check) check=true; shift;; +c|-nocheck) check=false; shift;; -s|-style) style="$2"; shift 2;; -t|-title) title="$2"; shift 2;; -o|-output) output="$2"; shift 2;; -predef) files="$2"; shift 2;; -*|+*) echo "$usage" >&2; exit 1;; *) break;; esac done if [ $# -lt 1 ] then echo $usage >&2 exit 1 fi umask 0 rm -f ${output}.tex ${output}.aux ${output}.bbl ${output}.blg ${output}.log ${output}.dvi ${output}.DVI echo "Outputting to ${output}.tex" >&2 cat > ${output}.tex << EOD % tex file to print bibliography file(s) $@ % automatically generated by program $0 \\documentstyle[proc]{article} \\begin{document} \\title{Bibliography file $@ $title} \\author{Version of `date '+%a %d-%h-%y %H:%M'`} \\maketitle \\renewcommand\\thebibliography[1]{\\section*{Bibliography\\markboth {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\\list {[\\arabic{enumi}]}{\\settowidth\\labelwidth{12345678}\\leftmargin\\labelwidth \\advance\\leftmargin\\labelsep \\usecounter{enumi}} \\def\\newblock{\\hskip .11em plus .33em minus -.07em} \\sloppy \\sfcode\`\\.=1000\\relax} \\bibliography{$files} \\bibliographystyle{${style}} \\end{document} EOD echo '\relax' > ${output}.aux while [ $# -gt 0 ] do f=`basename $1 .bib` if [ ! -r $f.bib ] then echo $usage >&2 exit 1 fi sed -n -e 's+^[ ]*@\([a-zA-Z]*\)[ ]*[({][ ]*\([-:_a-zA-Z0-9]*\),+\\citation{\2}+p' $f.bib >> ${output}.aux files="$files,$f" shift done echo "\\bibdata{$files}" >> ${output}.aux echo "\\bibstyle{$style}" >> ${output}.aux bibtex ${output} if egrep -l '(^ : |---)' ${output}.blg then echo "There are errors in the bibliography file(s) (see ${output}.blg)" >&2 if $check; then exit 1; fi fi latex ${output} if $print; then lpr -d ${output}.dvi; fi