|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
#!/bin/bash
# This: (find-angg "bin/run-latex")
# see: (find-angg "bin/scast")
# and: (find-angg ".emacs" "scast")
# (find-bashnode "The Set Builtin")
# run-latex
# (find-angg ".emacs" "scast")
# (scast "k")
# (scast "R=6;r;c;g")
# (find-bashnode "The Set Builtin" "`-e'")
set -e
# (find-sh "run-latex 'bbl00'")
# (find-sh "run-latex 'bbl0'")
# (find-sh "cp -v ~/LATEX/*.bib /tmp/")
# (find-sh "run-latex 'cd /tmp/; bbl0 > $stem.tex;la;bi;la;la'")
# (find-sh "run-latex 'cd /tmp/;veryclean;bbl;la;bi;la;la'")
# (find-fline "/tmp/")
# (find-fline "~/LATEX/idarct.tgz")
# (find-fline "~/LATEX/idarct.tgz" "Makefile")
# (find-zsh "cd /tmp/ && makebbl all.bbl catsem,filters")
# (find-xpdfpage "~/tmp/tmpbib.pdf")
# (find-pdftotext "~/tmp/tmpbib.pdf")
stem=STEM
# ----------------------------------------
# bibliographies
# (find-es "tex" "makebbl")
bibstyle=alpha
bibs=catsem,filters
citestar () { echo -E '\nocite{*}'; }
bibliographies () { echo -E '\bibliography{'$bibs'}'; }
bbl0 () {
cat <<EOF
\documentclass[oneside]{book}
\usepackage[latin1]{inputenc}
\usepackage{url}
\begin{document}
$(cat)
\bibliographystyle{$bibstyle}
\end{document}
EOF
}
bblstar0 () { { citestar; bibliographies; } | bbl0; }
bblstar () { bblstar0 > $stem.tex; }
DOECHO () { echo; echo "# $*"; }
DORUN () { $*; }
DO () { DOECHO $*; DORUN $*; }
makebbl () {
makebbl0 $* > tmpbib.tex
pdflatex tmpbib.tex
bibtex tmpbib || true
cp -v tmpbib.bbl $1
}
clean () { DO rm -fv $stem.aux $stem.bbl $stem.blg $stem.log $stem.out; }
cleandvi () { DO rm -fv $stem.dvi; }
cleanpdf () { DO rm -fv $stem.pdf; }
veryclean () { clean; cleandvi; cleanpdf; }
la () { DO latex $stem.tex; }
pla () { DO pdflatex $stem; }
bi () { DO bibtex $stem; }
xd () { DO xdvi $stem; }
xp () { DO xpdf $stem; }
d4 () { DO ~/dednat4/dednat41 $stem.tex; }
pt () { DO $stem; }
# ----------------------------------------
# (find-bashnode "Bourne Shell Builtins" "`eval'")
eval $1
# for source'ing
return
* (eepitch-bash)
* (eepitch-kill)
* (eepitch-bash)
rm -Rv /tmp/b/
mkdir /tmp/b/
cd /tmp/b/
cp -v ~/LATEX/*.bib .
. ~/bin/run-latex 'veryclean;bblstar;la;bi;la;la'
. ~/bin/run-latex 'xd'
. ~/bin/run-latex
set +e
laf
bbl
laf
pla
bi
pla
pla
# Porque duas cópias?
# (find-fline "/tmp/b/")
# (find-xdvipage "/tmp/b/STEM.tex")
# (find-xdvipage "/tmp/b/STEM.dvi")
# (find-xpdfpage "/tmp/b/STEM.pdf")
# (find-pdf-text "/tmp/b/STEM.pdf")
# Local Variables:
# coding: raw-text-unix
# mode: sh
# End: