Possible Duplicate:
Definining commands/abbreviations that contain numbers
How can I define macros as \text1,\text2...\text3
which, when invoked will produce text with different
widths?
How can I define macros as |
|||||
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
There are many possible ways you can achieve this: 1) Provided, you only going to have
Note 2) You can define different environments for your users. A little known fact is that a LaTeX environment can use any combination of characters. These can be called as:
3) The most difficult method to employ is through the control sequences
This is a common technique for macro writers, especially if you want to automate the process and have an algorithm to automatically define these commands. The disantvantage of using this type of definition is that you will not be able to call such a macro directly. You will need to use Additional factoids. I have used TeX's I also used Lastly, I wouldn't recommend the use of such macro names as they are not semantically correct, does
|
|||
|
|
|
The UK TeX FAQ features an entry about Non-letters in macro names. (One of the recommendations is to "choose another name for your macro, one that contains only ordinary letters".) |
|||
|
|
|
You can't define macros with numbers in their names, because all parts of the macro name must consists with character from the category letter (category code 11) and the 0-9 digits are from category other (category code 12). TeX seems to only recognize them as numbers when they are in this category so changing this would break things. As already mentioned by Yiannis Lazarides you can however define a macro which takes the number as first argument. As long it is only one digit (0-9) this works without the braces! In the macro you can then use
The internal macros do not need to take an argument. An example for
|
|||
|
|