Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Can the experts here comment on the pros and cons of these two languages? I have been using metapost for a long time and I was wondering if I should learn pgf/tikz also.

How does both languages compare as far as the programming ability goes? I mean the ability to create user defined functions.

I am a research student in engineering. So my requirement is drawing graphs/block diagrams/engineering figures etc.

Thanks in advance for your opinions suresh

share|improve this question
2  
That's a very general and open question. You know MetaPost well, perhaps have a look at pgf/TikZ and post a very specific question? For explanation, see: Gorilla vs. Shark. –  Stefan Kottwitz Nov 11 '11 at 22:30
1  
I guess a look at the PGF manual can tell you about the power of TikZ/PGF. It starts with some very nice tutorials showing the general usage. –  Tobi Nov 11 '11 at 23:01
1  
I have the same dilemma as @suresh. I need to draw a plethora of technical drawings (e.g., statistical distributions with annotations, graph theory concepts) and include them both into lecture notes created with LaTeX and into Beamer slides. I'm now struggling between MetaPost and TikZ/PGF too. –  Andrej Nov 13 '11 at 14:33
1  
@suresh What I miss in MetaPost is better (i.e., fluent) integration with LaTeX documents. So I stay with TiKZ/PGF for now. –  Andrej Nov 17 '11 at 22:32
2  
Metapost code can be easily integrated in LaTex documents using the gmp package ctan.org/pkg/gmp . –  mmj Apr 8 '13 at 14:08

1 Answer 1

up vote 11 down vote accepted

For me, the main differences are:

  • metapost is an external program, so you need more complicated processing or \write18 calls; also, tikz pictures may be better integrated with the rest of the document (eg, they ingerit the fonts from their surroundings).
  • metapost is an easier programming language (no problems with TeX parsing, macros, expansion etc.).
  • metapost is better at drawing "nice" Bezier curves (you do not have to specify control points yourself).
  • tikz seems to have larger library of dedicated routines for different tasks; also, it has quite a few built-in ways of specifying coordinates, shape and decoration libraries etc.
  • tikz supports mainly pdf (in particular, transparencies); metapost had some problems with that (or with filling with patterns-but it was a long time ago I used it).
  • on the other hand, metapost has the excellent metafun macro package by Has Hagen.
share|improve this answer
2  
AFAIK with luaTeX metapost is not longer an external program. –  Schweinebacke Nov 13 '11 at 10:26
2  
@Schweinebacke Metapost has been turned into a library and LuaTeX has some APIs to link to it. But only ConTeXt has support for these calls, up to now. –  egreg Nov 13 '11 at 10:41
2  
Two recent packages allow for integration of Metapost into LaTeX (via shell-escape, of course): mpgraphics by Vafa Khaligi and gmp (it's a package of mine). –  egreg Nov 13 '11 at 10:43
2  
It's portable so long as the final user has a TeX distribution not several years old and they give the -shell-escape option (or -enable-write18 for MiKTeX; in the last version also MiKTeX knows -shell-escape) –  egreg Nov 13 '11 at 18:55
1  
I endorse egreg's comment, gmp package (ctan.org/pkg/gmp) allows easy Metapost integration into LaTex. –  mmj Apr 8 '13 at 14:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.