tags:

views:

658

answers:

9

I use a Mac. But I also have a PC with Windows 7. So when I want to start programming functionality for LaTeX using TeX, what's my starting point? Is there an SDK and documentation? I couldn't find any book on TeX programming.

+1  A: 

To quote Eric Raymond:

TeX is intentionally Turing-complete (it has conditionals, loops, and recursion), but while it can be made to do amazing things, TeX code tends to be unreadable and painful to debug.

He goes on to say that even if it's possible to program in TeX, it's a really bad idea.

Skilldrick
What's the definition of "to program in TeX"? If you use it for making nice documents, it is rather easy, readable and no problem at all. In a day you have learned how to make PDFs or DVI documents, programmed using TeX.
Abel
It's a bit of a joke, Tex is a text layout language, but since it has loops and conditions you can program in it. But really this is only done for fun
Martin Beckett
Huh? There's a whole bunch of programming (in the form of LaTeX packages) that has been done over the years. It (the programming) is a little restrictive but it's certainly done for practical purposes.
Will Robertson
+1  A: 

Please see the answer I gave you to your previous question.

Alok
+1  A: 

TeX and LaTeX (its follow-up) are quite old languages nowadays, but are still widespread and often used. Their primary use is found in universities, specifically with mathematics and natural sciences. It's not a programming language like C#, PHP or JavaScript, it's more a document-layout language (a bit like HTML perhaps, without any of the modern events).

The idea behind TeX was to use the computer to calculate how the text would be best laid out on the paper when you print it. That means that in TeX, you lay out a table, but you don't say anything (or little) about its size. The TeX compiler will take care of that.

When it comes to books or sites, there's a sheer many of them. Try amazon, for instance this Guide To LaTeX.

Forget about TeX, use LaTeX. It's the same, it's easier, and it's more widespread. LaTeX is TeX. But TeX is not LaTeX.

Abel
+5  A: 

Programming something in TeX that isn't a document:

So it can be done — it's just an exercise in esoteric, obfuscated programming.

jleedev
+1  A: 

Let me suggest Prof. Knuth's site: link text

There are all the books you would want to have on TeX.

Jeremy Petzold
+1  A: 
Norman Ramsey
+1  A: 

You could also try starting out with the expl3 programming language, which is a layer on top of TeX with more consistent syntax, more abstracted data structures, and quite a deal more in-built functionality for performing programmatic tasks than LaTeX's kernel. Disclaimer: I'm involved with its development.

Will Robertson
A: 

Just to add to the other good answers, as TeX is a typesetting system there are not IDEs in that sense. There are lots of TeX aware editors (I use TeXworks, but Emacs is obviously a popular choice particularly on Linux, whole TeXniccenter is very common on Windows).

Joseph Wright
A: 

if you ever need to write an essay or a paper or anything that you want to look nice and publishable, LaTeX is definitely your friend. I recommend More Math into LaTeX as that book really helped me in the past. Wikibook also has an excellent LaTeX guide (on top of being free!).

If you're familiar with Eclipse IDE already then the TeXlipse plugin is great for beginners since it can show user immediate feedback and documentation.

Johan Harjono