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.

i want to learn to do some basic style programming with latex, I'm searching a bit but i can't find a clear source of information. I'm searching things like

   Conditionals
   Loops
   Comparison Operators
   Automatic Variables
   Arguments Uses

For example when i search information about conditionals i only found some sites that provide one miraculous command that do some specific comparison, is like that there is always \ifSomething=OtherThing command and not only one IF like i'm accustomed to use in any other language where the Comparison operator take the responsability to adapt what we want to compare. Same for the other topics.

share|improve this question
1  
Style Class Tutorials might be relevant here. –  Christian Lindig Apr 30 '11 at 15:53
3  
TeXbook, TeX by Topic and Advanced TeXbook. –  Leo Liu Apr 30 '11 at 16:02
3  
And for LaTeX, it is also useful to have a look at clsguide, keyval, etextools, etc. –  Leo Liu Apr 30 '11 at 16:04
    
In addition to the points already noted, I'd remind you that automatic variable typing, etc., is not universal. So it might be handy to say which languages you are familiar with. –  Joseph Wright Apr 30 '11 at 16:24

2 Answers 2

For ConTeXt, the ConTeXt wiki has a nice page explaining different programming extensions available in ConTeXt. In particular, see the page on System macros, which is based on an old MAPS article by Taco Hoekwater.

share|improve this answer

etoolbox (also see this post) is a big one for comparisons and conditionals, and it does loops, too. Rather than providing one miraculous command that does a specific comparison, it provides a ton of those commands, one for each comparison type.

It handles a lot of other useful things, too, including patching existing commands, adding things at the beginning or end of environments, documents, preambles, etc.

The included documentation may be a bit short on detailed examples, but for many audiences, it's fine.

share|improve this answer

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.