tags:

views:

39

answers:

1

I feel that the LaTeX syntax is quite easy to use. However, I'm starting to include diagrams in my document. I've discovered the exciting world of MetaPost! The thing is, the MetaPost syntax looks a little more intense than LaTeX... So I figured I'd buy a book on it. I'm wondering though, whether it's better to buy a generalised book that talks about both LaTeX (maybe I can learn something) and MetaPost, or should I buy a book that specialises on only MetaPost? Given that the specialised book is going to be more involved, I'm thinking something introductory might be better.

If it's relevant, the document is a software project specification; so it contains UML and data flow diagrams. To be honest, I'm actually wondering if LaTeX is relevant to this question -- if this is the case, is there a definitive book for MetaPost?

Udpdate:

I just realised that I was unwittingly using MetaUML, not raw MetaPost. So for those that don't know, MetaUML is a package for MetaPost. As user Little Bobby Tables has pointed out, there is no book for MetaUML.

+3  A: 
  1. It's pointless to buy a book about LaTeX if you know the basic syntax and structure already. LaTeX is like Java - Its power comes from many available packages and not from its syntax. If you want a LaTeX book nevertheless, it's worth investing in the LaTeX companion.
  2. MetaPost, on the other hand, has a tricky non-trivial syntax, so if you intend to use it, you had better have some reference handy.
  3. If you are interested in MetaPost for UML, take a look at MetaUML.
  4. My advice: Don't use MetaPost. It's an arcane and counter-intuitive language. You can achieve similar results by using the LaTeX-native PGF-Tikz (see also examples, like this class diagram). PGF-Tikz does not require additional compilation, and the code is less obscure.
Little Bobby Tables
Interesting answer - I didn't expect that people would steer me away from MetaPost, since it looks like the de facto for writing technical diagrams. Maybe I was looking in the wrong places. Is MetaUML more well used do you think?
nbolton
Re your question: Get a book about MetaPost. However, if you're only looking to hack technical diagrams in LaTeX, PGF-Tikz is a more lightweight choise IMHO.
Little Bobby Tables
Hmm, I'm not sure about Tikz - this looks harder to read than the what I imagine would be the equivalent code in MetaPost: http://www.texample.net/tikz/examples/class-diagram/ (or is it just badly written?)
nbolton
However, MetaUML looks nice simply because I can't find the equivalent MetaPost snippet for this activity diagram: http://metauml.sourceforge.net/old/activity-diagram.html (*update:* I just realised that MetaUML is a package for MetaPost, and that's actually what I've been using!)
nbolton
Tikz is still a bit obscure, admittedly. However, you can use LaTeX macros and Tikz loops to generate Tikz code. The problem with MetaPost starts with subroutines: It uses a really awkward arguments-passing mechanism. Facing the need to study a whole new language metaphor just to make a nice painting, I dropped MetaPost altogether - But that's just me.
Little Bobby Tables
MetaUML skillfully covers for many unpleasant parts of MetaPost. Try to write some *raw* MetaPost code, see if you enjoy it... Unfortunately, there is no book about MetaUML.
Little Bobby Tables
Thanks - you saved me some money there! I won't be buying a MetaPost book after all. It's a shame there's no book for MetaUML... I will have to rely on the interwebs.
nbolton
BTW - I just discovered that MetaUML does not have sequence diagrams. So I have used the pgf-umlsd (uses TikZ) to solve this -- unfortunately though, pgf-umlsd doesn't work out of the box with MiKTeX (they ship a version that is not compatible with the provided TikZ, which is silly).
nbolton