23 July 2007

My first useful, original script

LaTeX is wonderful, but it clutters up my folders with .aux, .bbl, and other files. So I wrote this script for one-part articles:

# q-tex - takes a .tex file, copies it to a hidden directory, runs
# pdflatex (and later, bibtex), and writes a symlink to the .pdf in
# the original directory.


if [ $# -eq 0 ] ; then
    echo "Usage: $0 basefilename (no .tex extension)" >&2
    exit 1

if [ $(echo $1 | grep '.tex') ] ; then
    echo "Usage: 0$ basefilename (OMIT .tex EXTENSION)"

basefilename="$(echo $1 | sed 's/.tex$//g')"

if [ ! -d $workdir ] ; then
    echo "q-tex directory does not exist yet; creating it."
    mkdir .q-tex

if [ -s ${basefilename}.pdf ] ; then 
    rm ${basefilename}.pdf ; 
elif [ -f ${basefilename}.pdf ] ; then
    echo "There is already ${basefilename}.pdf in this directory.  Delete or rename it to use $0"
    exit 1

cp $1 $workdir/
cd $workdir
pdflatex $basefilename
cd ..
ln -s $workdir/${basefilename}.pdf ${basefilename}.pdf

exit 0

# TODO: use the same basic plan with .bib file: copy it to .q-tex, run
# stuff there, return to original directory. This way, I can have my
# RCS directories in the original directory without screwing things
# up.  Where should I keep my .sty files, though?  bibq-tex.sh

19 July 2007

In the interest of science

Well, if you'll permit me to group finance with the sciences: I present this chart, which details the performance of a mutual fund premised on active (not to say frantic) churning according to William J. Oneil's rules. Investor's Business Daily is an interesting paper (I just started I trial subscription), and I hope to share more thoughts about it soon.

SuSE 10.1 minus Gnome

Fvwm sure looks strange. Well, no--it looks like Unix used to look in 1998. However, since I have so many important documents on this computer that I am afraid to upgrade, and since Gnome was so slow, Fvwm (OliCha theme) seems an appropriately conservative choice. Navigating the Fvwm menus is less intuitive, but the overall gain in speed more than makes up for a little fumbling.

(Side note: I would have preferred to compile IceWM on here, but gave up after a few tries. How annoying.)

Now: is it really the case that mirrors stop hosting releases of OpenSuSE after a couple of years? 10.1 is not that old, but I can't seem to get updates anymore. Slackware mirrors still have pretty much every release ever. I suppose I don't really understand how these things work. OpenSuSE still makes a good workstation, though.

08 July 2007

Compiling Gnucash 2.1.5 on Slackware 12.0

No more Ubuntu for me! Too many of my favorite applications (Claws-mail, Pybliographer, Gnucash) ran much better on Gnome, and so I could not switch completely over to Slackware. After much fighting, I think I have what I want now. Claws-mail was the easiest to get working . . . I think Slackware repositories had most of what I needed. I still don't have Pybliographer, but Kbibtex compiled after adding a patch, so the only thing left to do was fix Gnucash. It was hard, but not as hard as I expected. I compiled the required bits of Gnome (plus a couple other things), and that was that: a complete Gnome installation is totally unnecessary, and Gnucash looks great under XFCE or KDE. This list is probably not quite complete, but a useful desktop system probably has most other dependencies (mine did, after all). Unless otherwise noted, I compiled the newest version supplied by gnome.org, available as of 7 July 2007. From Slackware depositories pcre From gnome.org libbonobo ln -s /usr/local/lib/libbonobo-activation.la /usr/lib/libbonobo-activation.la ln -s /usr/local/lib/libbonobo-2.la /usr/lib/libbonobo-2.la ORBit ln -s /usr/local/lib/libORBitCosNaming-2.la /usr/lib/libORBitCosNaming-2.la ln -s /usr/local/lib/libORBit-2.la /usr/lib/lorbORBit-2.la gconf ln -s /usr/local/lib/libgconf-2.la /usr/lib/libgconf-2.la libgnome libbonoboui gnome-keyring libgnomecanvas ln -s /usr/local/lib/libcairo.la /usr/lib/libcairo.la gail gtkhtml-3.x (not the 1.x package that Slackware provides) libgnomeprint goffice Then Gnucash will ./configure && make, sudo make install as hoped. I realize that the symbolic links are not the proper and elegant way to do things; I did eventually add /usr/local/lib to /etc/ld.so.conf, but the procedure given above got me running. Still no Pybliographer, though, but I think Kbibtex is probably worth giving a try, anyway.