The making of an object model for Tikz
By Vincent Pit (vincent) from Paris.pm
Date: Thursday, 5 August 2010 10:00
Duration: 20 minutes
Target audience: Any
Tags: code generation latex model moose object optimization overloading
My PhD thesis requires me to draw a lot of geometrical figures based on points computed by a Perl program. Since those figures are to be included in a LaTeX document, the natural tool to use is TikZ (http://pgf.sourceforge.net/), a LaTeX package that provides a sublanguage for generating graphics. But given the complexity of my drawings, the code has to be generated, so the best way to solve the problem on the long term was to write an object model to cleanly generate TikZ code from Perl. Started as a one-file quick hack of classes, it became eventually a full featured Moose app and was released on CPAN as LaTeX::TikZ.
I'll cover some of the aspects of its development :
- The design of the object model for simplicity (unification of different TikZ concepts) and maintainability.
- How it allows simplifications and optimizations of the TikZ object code.
- Where Moose brought added value to the initial design.
- Integration with a set of existing classes.
- If there's some time left, the optimization of the Perl code itself, with Devel::NYTProf.
- Sébastien Aperghis-Tramoni (Maddingue)
- Tim Bunce
- John Scoles (byterock)
- Joel Bernstein (joel)
- Clinton Gormley (DrTech)
- Steffen Schwigon (renormalist)
- Karl Moens (CountZero)
- Lars Dɪᴇᴄᴋᴏᴡ (daxim)
- Shmuel Fomberg
- Herbert Breunung (lichtkind)
- Steffen Mueller
- Vincent Pit (vincent)
- Adde Nilsson
- Reini Urban (rurban)
- Franck Cuny