Patrick's Blog

Illustrations in LaTeX

March 9th, 2008

I really like books with great illustrations (great here means that the font should be the same as in the text etc, probably the best example of such a book is the “The Art of Computer Programming” by D. Knuth). I thus hardly ever felt happy with drawing things in a vector graphics program and always chose to program/typeset the graphics in some sort of programming language. In the past years I’ve played around with different packages/programs for doing this; the list includes:

  • Matlab. I like it a lot for prototyping, but the plots usually look crappy. Same is true for the open source alternative octave.
  • Gnuplot. Very powerful but the standard outputs usually look really bad.
  • PSTricks. Some very impressive examples, but sucks when used in combination with PDF.
  • PyX. From the website: “PyX is a Python package for the creation of PostScript and PDF files.” While I liked the Python environment and the power it gives you, it lead to problems when I wanted to include the plots in presentations: the fonts don’t agree or it’s harder to draw edges to other elements on the slides. It just lacked the integration with LaTeX. Note: it’s possible to work around some of the issues like for example the font problem, but usually it feels quite hacky.
  • PGF/TikZ. As it’s from the same author who wrote the excellent Beamer package for presentations it integrates nicely with LaTeX and Beamer. It’s supposed to work with both DVI/PS and PDF. They recently released version 2 and by looking and the documentation you can immediately realize the sheer power this package has, especially for drawing general illustrations. It became my tool of choice about a year ago for drawing graphical models and such like, I however didn’t like the plot environment so much (it’s hardly existing at all).

This weekend I then finally played around with the Gnuplot TikZ terminal which addresses my last issue with PGF/TikZ: plotting functions and data. With this tool you can use gnuplot to create the actual plotting scripts and also to create the illustrations. However, instead of producing for example a PDF, the terminal outputs a .tex file that can then be included in the LaTeX document. The actual drawing in the document is then done by PGF/TikZ. The results look truly awesome. The installation is still a little bit messy as it needs the yet unreleased gnuplot 4.3 CVS.

Posted in academics, latex | 3 Comments »

New blog design

January 5th, 2008

I changed the blog design to something that looks very similar to the other parts of my webpage.

While the WordPress theme code is not as ugly as I initially thought, I would still consider it as horrible code and I think software like wordpress would greatly profit from a switch to the beloved smarty template engine.

I hope this is my last website related post for 2008.

Posted in programming, website | 1 Comment »

Happy New Year!

January 1st, 2008

I just finished uploading a new version of my website. It’s tailored towards my new role as a PhD student at ETH Zurich. I started this position already back in September, but only now found the time and motivation to write about it.

I hope everything works as expected with the new website.

Posted in life, website | No Comments »

Convert all eps in current directory to pdf’s

July 4th, 2007

I often have to convert graphics etc. in a certain directory to some other format. The loop below shows how to do this. This is trivial, but as I don’t use it often enough, I keep forgetting the exact syntax and thus have to google for it each time, which sucks balls.

for f in $( find . -name '*.eps' ); do
epstopdf $f
done

Another very useful one-liner:

for f in $( find . -name '*.pdf' ); do ps2pdf14 -dPDFSETTINGS=/prepress $f temp.pdf; mv temp.pdf $f; done;

this will embed all the fonts in the PDFs.

Posted in latex, linux | 2 Comments »

Gigabyte GA-965P-DS3 and 4GB of memory

May 11th, 2007

The prices of memory are currently quite low, so I thought I upgrade my workstation (running Ubuntu Feisty Fawn) from 2GB to 4GB. However, after the memory-upgrade the orangish Ubuntu-progress bar would just stall at around 15%. Rebooting and switching to the verbose, non-graphical boot-up, I got an error saying something about “Bad page state in process ‘modprobe’”. I googled a little bit and found a page describing a similar problem. There the solution was blacklisting the module intel_agp. As my motherboard doesn’t feature an on-board graphics chip anyways, I thought it wouldn’t hurt blacklisting this module. Et voilà: the computer seems to work fine now, with 4GB of RAM (don’t really know what’s the actual explanation of this behavior).

Posted in linux | 1 Comment »

74 bands

April 9th, 2007

Recently, I found this incredibly cool picture on digg: There are 74 bands supposed to be in the picture.

74bands_thumb.jpg

Solution can be found here.

Posted in misc | 1 Comment »

Webmail on your (dreamhost) webserver!

February 19th, 2007

I’m currently playing around with RoundCube Webmail. I followed the description in the support wiki on dreamhost in order to set it up on my account, this worked flawlessly. This seems to work great and looks beautiful, too; one thing that now bugs me: the connection is unencrypted!

Posted in website | No Comments »

New webhost

February 18th, 2007

I decided to finish with Swiss web hosters, who in my experience are bad (and pricy). This website is now hosted in the US on the servers of www.dreamhost.com. So far I’m really happy with their offering.

I will migrate my website in the next days, so expect some breakage.

Update: the migration seems to have been successful; if things still break I guess the most probable cause are DNS servers which haven’t updated their mappings, yet.

Posted in website | Comments Off

Jell-O!

January 30th, 2007

One of the funniest papers, I’ve ever read (when I come to think about it, I guess it’s actually the funniest): Ray Tracing Jell-O Brand Gelatin. Not that I would be particularly interested in graphics all of the sudden, but this is just too good, to deny it.

Paul Heckbert’s Jello site

Posted in misc | Comments Off

Back in Switzerland

January 28th, 2007

Last Friday, early morning, I arrived back in Switzerland.

Below you can find a last picture of Boston, that I took late last year.

Boston by night, thumbnail

Posted in life | Comments Off