Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do PStricks and TikZ compare for ease of learning and for quality of API design? [closed]

My group uses Literate Programming for most of our source code---this means that internal documentation is written using LaTeX. We have been using PStricks for fancy technical diagrams of the system, but have recently been recommended to use TikZ. I've gathered this information:

  • TikZ/PGF is new and maintained; PStricks went a long time without a maintainer but has received some maintenance in the last couple of years.
  • TikZ works with many back ends, including (for those who care) pdftex. PStricks works only with dvips.
  • PStricks is more powerful and expressive than TikZ. In a dire emergency you even have the full power of PostScript.
  • PStricks has a significant ecology of extra packages that have been built on top of it; TikZ is too new to have many such things.
  • TikZ claims to have been designed "with the shortcomings of PStricks in mind." The author does not specify which shortcomings.

I'm interested in the answers to two questions. If you wish, feel free to post one answer per question:

  • What is the learning curve like for the two tools? (I consider PStricks to have a steep learning curve; about TikZ I am uninformed.)

  • Considered as programming APIs, is one of these two packages significantly better designed than the other? If so, which is the better design, and why? (What properties does it have that make you consider it better?)

To make a compelling argument why one API is better than another, you may want to resort to examples.

like image 792
Norman Ramsey Avatar asked Apr 18 '09 02:04

Norman Ramsey


People also ask

Which is better PStricks or TikZ?

PStricks is more powerful and expressive than TikZ. In a dire emergency you even have the full power of PostScript. PStricks has a significant ecology of extra packages that have been built on top of it; TikZ is too new to have many such things.

What is TikZ package?

Introduction. TikZ is probably the most complex and powerful tool to create graphic elements in LaTeX. Starting with a simple example, this article introduces some basic concepts: drawing lines, dots, curves, circles, rectangles etc.


1 Answers

Quick answer: I prefer TikZ to pstricks because I think TikZ

  • is better designed
  • is easier to learn
  • is compatible with pdftex
  • gives you more power and abstraction (you don't have to specify as many coordinates by hand)
  • lets you create more beautiful graphics with the same effort
  • it is easier to extend using TeX programming (it was designed from the ground up with extensibility in mind)

For the users of pstricks, I'd recommend writing all new documents using TikZ in the future. For the users of METAPOST, if their graphics don't use linear equation solving, I'd recommend TikZ. If the METAPOST graphics needs linear equation solving, I'd suggest trying Asymptote.

pstricks does indeed give you the power of PostScript, but it is not PostScript which makes your graphics authoring powerful, but it is abstraction: the use of automatic positioning, automatic intersection calculations, and display style templates. TikZ gives you powerful abstractions, even if you are not a programmer, or you are not willing to program this time.

I don't have experience writing TikZ extensions, but from a quick glimpse of the TikZ source code, it seems to be easy to understand and extend, compared to other TeX macro packages I came across.

like image 89
pts Avatar answered Sep 23 '22 23:09

pts