I've been playing with TikZ for while, and now I want to dig a bit deeper and produce some reusable components for future references. There are certain syntax that are used in many examples on TikZ site. For example I saw a \foreach loop, couple variables here and there. So I wonder which programming language is used to write Tikz document?


TikZ/PGF simply uses TeX as programming language. TeX is not just a typesetting system but also a fully Turing-complete programming language. However, the typesetting background and the macro format makes it quite different than usual software programming languages.

If you don't now yet the exact difference between LaTeX and TeX then have a look at What are TeX and LaTeX?. Further information and book sources can be found in What is the best way to learn TeX?.

In addition TikZ/PGF uses the output format, either PDF, Postscript and SVG, IIRC, to draw the vector graphics.

  • 1
    Thanks for the info. There are tons of book for LaTeX, surprisingly I haven't found one that mentions about programming in TeX. I wonder if you could suggest a book that targets only on TeX programming?
    – Chan
    Oct 7 '12 at 7:08
  • 1
    There are some good TeX books around, some are even free. See What is the best way to learn TeX?.
    – Martin Scharrer
    Oct 7 '12 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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