Andrew Stacey


About
Andrew Stacey
Information about my research, teaching, and other interests.

By: Andrew Stacey
Contact details


Andrew Stacey


blosxom icon

home :: HowDidIDoThat :: Hints

This category contains little odds and ends that I find myself needing to know reasonably regularly but not often enough for me to actually remember them. Probably by recording them here then I've done enough to fix them in my memory so these entries don't need to actually exist, they just need to have existed. Thus by existing they remove the need for their existence. How sad. Stuff in this category hasn't really taken any great work to find; most of it is excerpts from manuals or just a note that a particular command is the right one to use.

Wed, 21 Nov 2007 (HowDidIDoThat :: Hints)

Galeon Tab Position

The gconf-editor provides more configuration options than are otherwise apparent, in particular the option for the position of the tab bar (located under UI).

[/HowDidIDoThat/Hints]

Wed, 31 Oct 2007 (HowDidIDoThat :: Hints)

Some TeX Hints

I've started writing really complicated style files for my TeX documents. Here are a few useful hints that I've come across and feel that I need to write down else I'll forget them.

See more ...

[/HowDidIDoThat/Hints]

Fri, 26 Oct 2007 (HowDidIDoThat :: Hints)

XYMatrix Hints

Here are a load of things that I often want to look up when using the xy.sty LaTeX package.

  • Centring the label on the arrow: the - in \ar[r]^-{f}
  • Invisible arrow: the @{} in \ar@{}[r]|{f} (the | puts the label in the middle of the arrow rather than above or below it).

[/HowDidIDoThat/Hints]

Some Handy Hints for Postscript and PDF Files

Resizing postscript files.

Use pstops. For example the following command doubles-up the postscript file, removing blank space:

pstops -p a4 "2:0@.9L(24cm,-2cm)+1@.9L(24cm,12.85cm)" original.ps new.ps

This one uses psnup to put the slides printed by beamer four to a sheet.

psnup -pa4 -W363 -H273 -4 -d5 -m10 -b5 -c algobj.handout.ps > algobj.handout_nup.ps

Merge PDFs with ghostscript

This took me absolutely ages to find out about. I'd been trying all sorts of silly things, almost including trying to edit the PDFs directly!

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf \
source1.pdf source2.pdf source3.pdf etc.pdf

[/HowDidIDoThat/Hints]

Z-Shell Hints

Some things that I keep having to look up about the Z-shell.

  • Argument modification
    mod result
    :h remove last component of pathname
    :t remove all leading components
    :r remove extension
    :e remove all but extension
    :u uppercase first letter
    :l lowercase first letter
    :s/l/r/ substitute l by r (& in r is replaced by l)
    :& repeat last substitution
    :g apply modifier once to each word
    :a apply modifier as much as possible
    :p print line but do not execute

[/HowDidIDoThat/Hints]