about photos bookshelf portfolio blog home
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:

   \usepackage[pdftex]{graphicx}
   \usepackage{graphviz}
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.

10:09 PM, 25 Mar 2007 by Mark Aufflick Permalink | Comments (1)

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...).

06:11 PM, 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.

12:45 PM, 17 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.

Priceless

07:49 PM, 14 Mar 2007 by Mark Aufflick Permalink | Comments (0)

XML

Notifications

Icon of Envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Unregistered Visitor: Site Down Page
  2. Unregistered Visitor: Who's counting!
  3. Vinod Kurup: Am I one of the three?
  4. Mark Aufflick: Fixed
  5. Unregistered Visitor: Feeds broken
  6. Unregistered Visitor: (anonymous == nemonik) Getting past the X11 issue on Leopard
  7. Unregistered Visitor: Short proof that transcendental numbers don't necessarily contain all sequences
  8. Unregistered Visitor: Yet another approach
  9. Mark Aufflick: Infinitives
  10. Mark Aufflick: Must only be finite