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.

At what level of the TeX system heirarchy is \newcommand? Where do I find documentation for these kinds of macros (e.g. \renewcommand, \def, \parskip, etc.)?

My objective is that I will be able to take an existing package or document class and customize it to my needs.

As much as possible, kindly point me to a free online resource. Bookstores here in the Philippines do not have LaTeX in their vocabulary.

share|improve this question
    
Does texdoc usrguide answer your questions? Section 3.4 discusses the latex way to define commands (newcommand etc). \def on the other hand is a tex primitive and is not recommended for latex users, but you can read about it in the TeXBook. –  Lev Bishop Oct 18 '10 at 0:58
2  
@Lev: should have put your comment as an answer ;) –  Will Robertson Oct 18 '10 at 4:30
1  
Kit, as someone who spends a huge amount of time traipsing around rubber plantations in southern and central Viet Nam (wife's family business) and PNG (where I come from), your remark that "bookstores here in the Philippines do not have LaTeX in their vocabulary" made me laugh so hard that I spilled my coffee everywhere. Well played, sir! :) –  Geoffrey Jones Oct 18 '10 at 7:03
    
@Geoffrey, I actually meant that as something sad; but don't worry, no offense taken. I was even amused at why it came across as funny :P Now that I thought about it, if bookstores and vocabulary went well together, I think the pun punched through :D –  Kit Oct 18 '10 at 15:29

3 Answers 3

up vote 6 down vote accepted

Try also the not-so-short introduction to latex. Section 6.1 talks about \newcommand et al.

share|improve this answer

To tell you the truth from the beginning, getting to the point where you're able to read the code in existing class or style files (which do make extensive use of TeX and not only LaTeX) takes some good deal of time and effort.

Usually the easiest thing to do in order to “customize” an existing package is to first load the package in question (without modifying it), and then redefine just a few commands in order to fit your needs. The best way to learn is by doing it, so try to do something very specific (i.e. try to change the specific way something is formatted) and ask a question here if/when you get stuck.

It might also be useful to browse through other questions here, particularly those tagged macros, in order to get an idea of what other people is doing and what does their code looks like.

Finally, in order to get some type of documentation for reading TeX code in existing packages, have a look at TeX by Topic, or one of the other suggested books in this other question.

share|improve this answer
    
Actually that is what I had in mind -- to customize existing classes/packages bit by bit. –  Kit Oct 19 '10 at 14:12

Does texdoc usrguide answer your questions? Section 3.4 discusses the latex way to define commands (newcommand etc). \def on the other hand is a tex primitive and is not recommended for latex users, but you can read about it in the TeXBook (I know you asked for online resources, not books, but the texbook is indispensable for learning tex).

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.