Some Improbable Uses for LaTeX

What is LaTeX?

Latex is a typesetting program, essentially made from TeX macros which enable users easy access to common default typesetting features for producing books, reports and letters. However, it can be used to typeset all sorts of things, in particular postscript objects. In fact the picture above was entirely produced from a text file, less than a page long and without importing a single 'preformatted' graphic! Closer inspection of the above picture should convince you that if you had to use a conventional GUI drawing program, such as the GIMP, the process would be long, tedious, and difficult to alter. This introductory page is intended as a breakneck introduction to some fun ways to use LaTeX to produce graphic illustrations. Should you wish to use LaTeX for more common uses, such as writing your thesis, you may wish to briefly consult our Dummies Guide to LaTeX. For now, however let's look at how the above picture was done.

Yuk, what's all that horrible programming stuff?

You might want to take a look the source file for the above picture, and to try compiling the output files for yourself. However, before you do, some words of preparation are in order to steel your resolve against what may appear as some horribly 'nerdish' way to typeset documents.

OK, deep breath and let's dive in...

So, you're curious? Well, let it be noted before we start, that much of source and the entire inspiration for the graphic came from the wonderful The LaTeX Graphics Companion which we review here.

The diagram was intended to showcase some of the more irritating diagrams you might have to produce in a technical paper, as well as a bit of fun curving some text around the letter `Y' and producing cut out letters in-filled with the unforgettable `The York Linux User Group'. Many packages are made use of, the first \usepackage{} line gives the xy package some options. The second is more general. Lines beginning with % are comments. For example while working with a graphic, it can be much easier if you put a grid on the screen to give you some co-ordinates to work with (everything here is positioned using co-ordinates). When you are happy with the position of an object, you can then simply comment out the grid to produce the final output. I've included some other examples of curved text which you can uncomment if you wish to view them (C-c : for emacs users!). The comments should be relatively easy follow. But I have not attempted to explain the 3 dimensional matrix or the cell diagram syntax. If you want to know how to produce diagrams like this, please read the chapters in The LaTeX Graphics Companion for the gory details.

Some other features are worth noting are the font definitions used in the banner logo. The fonts are defined using their shorthand names (Zapf Chancery and Times Roman for the cut out and infill fonts respectively). The fonts are then called using their aliases as I need them. These fonts, as far as I can tell, must reside as part of your tex fonts - I'd love to know a way of easily including any of my myriad type 1 fonts into latex to use like this. Anyone know how?

The final postscript output was then converted to a gif format using the GIMP to put on a web page. Postscript files are like bitmap files - huge! However, they compress dramatically when gzipped, and at the worse case such images can always be sent as their text source originals, occupying rarely more than 1K or 2K!

Have fun experimenting with the source, and if you wish, mail me your own efforts! ;-)


Thumbnail for YLUG logo -
	clicking takes you home
Kester Clegg
Last modified: Tue Aug 1 22:49:08 BST 2000