Begin main content

Embedding GraphViz in LaTeX documents

I have to say I'm loving using LaTeX for my Uni papers. It is so delightfully straightforward and powerful.

I am embedding some GraphViz diagrams in my documents, but I didn't want a round trip to a different editor buffer and the shell to edit/compile/insert the diagram.

Based on graphviz.tex code by Derek Rayside I have created a custom LaTeX function that will automatically compile and embed inline GraphViz code (man those wacky capitilisations are getting boring!)

You embed a graph like so:

   \digraph[scale=0.5]{MyGraph}{rankdir=LR; a->b; b->c}
Be careful not to have any double newlines or your dot file will have some bogus \par comments in it (which I should replace with newlines in the function...). Another possible enhancement would be to add a dynamic dot command to set the maximum diagram height & width to the current page/column dimensions.

You need my graphviz.sty and you need the following in your document preamble:

Remember to run texhash if you install the style in a system-wide location. Note this assumes pdflatex. Modifying the command for regular latex is an exercise left for the reader. Update: Derek now has an updated version available on GitHub (which didn't exist in 2007 :).

08:09 AM, 25 Mar 2007 by Mark Aufflick Permalink | Comments (8)

Simple Smalltalk/Seaside Blog

Given my current business, I'm unlikely to build a new site using Seaside any time soon (despite professing my web development epiphany last year), but I wanted to get the following links on record for my, and your, future enjoyment.

First is a screencast titled Screencast: How to Build a Blog in 15 Minutes with Seaside, second is a followup by the same author Mapping Seaside Blog to PostgreSQL with Glorp.

The simple blog makes use of the Seaside web framework and Magritte Meta-programming framework (no doubt such a package is unnecessary in Lisp...).

03:11 AM, 18 Mar 2007 by Mark Aufflick Permalink | Comments (2)

Silence is golden

I have been rather silent on this blog for a while. You may think that I have just had nothing to say, but you should know by now that that has never stopped me blogging before!

And unlike Lars I have not been on 2 weeks of yoga and ayurveda (although I'm sure that would do me a lot of good). It may be that Lars' positive Karma will make up for the negative Karma I am creating by studying a Master in Law and Legal Practice.

It's keeping me rather busy - that and developing my nth web framweork (why do I enjoy that so much!) in Perl for my employer - so I apologise for fewer and shorter tidbits.

Just don't tell me you prefer it that way.

09:45 PM, 16 Mar 2007 by Mark Aufflick Permalink | Comments (0)

Good intentions

Courtesy of a comment on an Edward Tufte forum I learned of the USA EPA's 2001 Improving Air Quality With Economic Incentive Programs.

Its second page reads:

This page unintentionally left blank.


04:49 AM, 14 Mar 2007 by Mark Aufflick Permalink | Comments (0)


Blog Categories

software (41)
..cocoa (23)
  ..heads up 'tunes (5)
..ruby (6)
..lisp (4)
..perl (4)
..openacs (1)
mac (21)
embedded (2)
..microprocessor (2)
  ..avr (1)
electronics (3)
design (1)
photography (26) and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
food (2)
Book Review (2)


Icon of envelope Request notifications

Syndication Feed


Recent Comments

  1. Mark Aufflick: Re: the go/Inbox go/Sent buttons
  2. Unregistered Visitor: How do make a button to jump to folder
  3. Unregistered Visitor: Note I've updated the gist
  4. Unregistered Visitor: umbrello is now an available port on macPorts
  5. Unregistered Visitor: Updated version on Github
  6. Unregistered Visitor: Modification request.
  7. Unregistered Visitor: Accents and labels with spaces
  8. Unregistered Visitor: Mel Kaye - additional info
  9. Unregistered Visitor: mmh
  10. Mark Aufflick: Thank you