| 1 |
#!/bin/csh -f |
| 2 |
# |
| 3 |
# printbib - print a full bibtex bib file out |
| 4 |
# |
| 5 |
# David Kotz |
| 6 |
# |
| 7 |
# usage: |
| 8 |
# printbib bibfile... |
| 9 |
# |
| 10 |
# Then send the dvi file 'abstract.dvi' to the printer |
| 11 |
# (usage varies; try lpr -d abstract.dvi) |
| 12 |
|
| 13 |
if ($#argv == 0) then |
| 14 |
echo usage: printbib bibfile... |
| 15 |
exit 1 |
| 16 |
endif |
| 17 |
|
| 18 |
if ($1:e == "bib") then |
| 19 |
set files=($1:r) |
| 20 |
else |
| 21 |
set files=($1) |
| 22 |
endif |
| 23 |
|
| 24 |
shift |
| 25 |
foreach f ($*) |
| 26 |
if ($f:e == "bib") then |
| 27 |
set files="$files,$f:r" |
| 28 |
else |
| 29 |
set files="$files,$f" |
| 30 |
endif |
| 31 |
end |
| 32 |
|
| 33 |
echo creating abstract.tex for $files |
| 34 |
|
| 35 |
cat > abstract.tex <<EOF |
| 36 |
\documentclass[11pt]{article} |
| 37 |
\usepackage{latexsym} |
| 38 |
\sloppy |
| 39 |
\setlength{\textwidth}{6.5in} |
| 40 |
\setlength{\textheight}{9in} |
| 41 |
\setlength{\topmargin}{-0.5in} |
| 42 |
\setlength{\oddsidemargin}{0pt} |
| 43 |
\setlength{\evensidemargin}{0pt} |
| 44 |
\newcommand{\eg}{e.g.} % e.g. |
| 45 |
\newcommand{\ie}{i.e.} % i.e. |
| 46 |
\newcommand{\etc}{etc.} % etc. |
| 47 |
\newcommand{\vs}{{\em vs.}} % vs. |
| 48 |
\begin{document} |
| 49 |
\begin{center} \Large Bibliography files \large \\\\ |
| 50 |
EOF |
| 51 |
echo $files >> abstract.tex |
| 52 |
cat >> abstract.tex <<EOF |
| 53 |
\\\\ \today |
| 54 |
\end{center} |
| 55 |
\nocite{*} |
| 56 |
\bibliographystyle{abstract} |
| 57 |
EOF |
| 58 |
|
| 59 |
echo "\bibliography{$files}" >> abstract.tex |
| 60 |
echo '\end{document}' >> abstract.tex |
| 61 |
|
| 62 |
rm -f abstract.{aux,log,dvi,bbl,blg} |
| 63 |
|
| 64 |
set echo |
| 65 |
latex abstract.tex |
| 66 |
bibtex abstract |
| 67 |
latex abstract.tex |
| 68 |
latex abstract.tex |