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.

Since I switched to ConTeXt from plain TeX, I always get confused about macros in it. Now it is the command option in \setup* of ConTeXt.

In ConTeXt, some macros, like \setuphead, \setuplist, have some options which contain the command=\...#1#2 that we can define some \def\... to assign. for example, the \setuphead:

    \setuphead [1][2]
      1. SECTION
      2. ...
         command = \...#1#2
         ...

An example using this is given in page 209 of the ConTeXt manual

    {\hbox to \hsize
       {\hfill
        \framed[height=1cm, width=2cm, align=left]{#1}%
        \framed[height=1cm, width=4cm, align=right]{#2}}}

here, it is obviously that #1 is the headnumber and #2 the title. At the same time, some commands don't have the examples like this, so, how can I get the information about what meaning the parameters (#1, #2, and so on) refer to?

share|improve this question
1  
Empirically works best ;) But almost always, the arguments are to-be-typeset text arguments (as opposed to e.g. setups or variables) and generally, they are in the expected order: the text object that you expect to be the leftmost in the typeset output tends to be #1, next is #2, et cetera. –  Taco Hoekwater Mar 25 '13 at 8:20
    
Yeah, Taco, although some details are not presented in ConTeXt manual, the guess fits the experiments well :) –  Timothy Li Mar 25 '13 at 8:29

1 Answer 1

up vote 4 down vote accepted

Empirically works best ;)

But almost always, the arguments are to-be-typeset text arguments (as opposed to e.g. setups or variables) and generally, they are in the expected order: the text object that you expect to be the leftmost in the typeset output tends to be #1, next is #2, et cetera.

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.