Andrew Stacey


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

By: Andrew Stacey
Contact details


Andrew Stacey


blosxom icon


Fri, 27th Jun 2008 (HowDidIDoThat :: Hints)

Hints and Tips

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.

[Full link]
Last modified on:
Fri, 27th Jun 2008


Tue, 18th Dec 2007 (HowDidIDoThat :: Hints)

Z-Shell Hints

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

See more ...

[Full link]
Last modified on:
Tue, 18th Dec 2007


Mon, 31st May 2010 (HowDidIDoThat :: Hints)

Emacs Hints

Some things that I keep having to look up about Emacs.

See more ...

[Full link]
Last modified on:
Mon, 31st May 2010


Wed, 21st 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).

[Full link]
Last modified on:
Wed, 21st Nov 2007


Wed, 31st 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 ...

[Full link]
Last modified on:
Wed, 31st Oct 2007


Fri, 26th 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).
  • Shifting an arrow: the @<> in \ar@<1ex>[dr]

[Full link]
Last modified on:
Fri, 1st Feb 2008


Fri, 26th Oct 2007 (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

Two Sides or Not Two Sides

For some reason, pstops mucks up duplex printing on my system. The solution that I've found is to insert a little text at the start of the postscript. Alternatively, these can be created as separate files and then concatenated with the document before being sent to the printer.

%!PS
statusdict /setduplexmode known
{statusdict begin true setduplexmode end} if {} pop

%!PS
statusdict /setduplexmode known
{statusdict begin true setduplexmode end} if {} pop
statusdict /settumble known
{statusdict begin true settumble end} if {} pop

Actually, it seems that only the bit in the braces is needed. The rest is probably just safety checks. An alternative to try is the following.

  <</Duplex true /Tumble true>> setpagedevice

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

[Full link]
Last modified on:
Wed, 23rd Apr 2008


Fri, 27th Aug 2010 (HowDidIDoThat :: Hints)

How to disable auctex

It appears that Emacs on Ubuntu now loads AucTeX automatically. As I have lots of customisations built on top of the simpler TeX-mode, I prefer to use that rather than AucTeX. To disable AucTeX, add the following line to ~/.emacs:

  (if (featurep 'tex-site) (unload-feature 'tex-site t))

(source of tip)

[Full link]
Last modified on:
Fri, 27th Aug 2010


Thu, 24th Jun 2010 (HowDidIDoThat :: Hints)

Bzr Hints and Tips

Some things about the bzr version control system.

See more ...

[Full link]
Last modified on:
Thu, 24th Jun 2010


Wed, 28th Oct 2009 (HowDidIDoThat :: Hints)

Things to Remember about Blender

Blender is great fun, and fairly intuitive, but there are things to remember and as it's not my day job (shame) I don't get quite the same "muscle memory" as I would do if I used it all the time. Here are a few things it's useful to remember.

See more ...

[Full link]
Last modified on:
Wed, 28th Oct 2009


Wed, 14th Jan 2009 (HowDidIDoThat :: Hints)

Enabling Vim Addons

Simply installing vim-fantastic-plugin from a registry doesn't automatically install it. For that, you have to issue the command

vim-addons install fantastic-addon

With zsh I got nice completions as well.

[Full link]
Last modified on:
Wed, 14th Jan 2009


Wed, 16th Jan 2008 (HowDidIDoThat :: Hints)

Boot Keys for Mac OS X

Mac OS X boot keys. Hold down as soon as possible after hearing the start-up noise and don't let go until something different happens.

key result
shift Safe Mode
Opt++o+f Open Firmware
+v Verbose Mode
c Boot from CD/DVD

The ⌘ symbol is &#8984; and ⌥ is &#8997;. Actually, looking at my ⌨ (keyboard), ⌥ is now just alt.

[Full link]
Last modified on:
Wed, 16th Jan 2008