Difference between revisions of "System Macros/Mnemonics and Aliases"

From Wiki
Jump to navigation Jump to search
m (Basic navigation)
m
Line 1: Line 1:
< '''Prev:''' [[System Macros|Fundamentals]] | '''Top:''' [[System Macros]] | '''Next:''' [[System Macros/Scratch Variables|Scratch Variables]] >
+
< '''Prev:''' [[System Macros/Fundamentals|Fundamentals]] | '''Top:''' [[System Macros]] | '''Next:''' [[System Macros/Scratch Variables|Scratch Variables]] >
  
 
== Mnemonics and aliases ==
 
== Mnemonics and aliases ==
Line 29: Line 29:
 
instead of manipulating the catcode of @ directly. Protection macros handle nested usage.}}
 
instead of manipulating the catcode of @ directly. Protection macros handle nested usage.}}
  
< '''Prev:''' [[System Macros|Fundamentals]] | '''Top:''' [[System Macros]] | '''Next:''' [[System Macros/Scratch Variables|Scratch Variables]] >
+
< '''Prev:''' [[System Macros/Fundamentals|Fundamentals]] | '''Top:''' [[System Macros]] | '''Next:''' [[System Macros/Scratch Variables|Scratch Variables]] >
  
 
[[Category:System Macros]]
 
[[Category:System Macros]]
 
[[Category:ConTeXt programming]]
 
[[Category:ConTeXt programming]]

Revision as of 17:21, 1 August 2006

< Prev: Fundamentals | Top: System Macros | Next: Scratch Variables >

Mnemonics and aliases

In ConTeXt we sometimes manipulate the <catcodes> of certain characters. Because we are not that good at numbers, we introduce some symbolic names. This makes it easier to key in things like this:

\catcode'@\@@letter

If you don't understand the names of the macros, you can look them up in the TeXbook.

Two of these symbolic names are actually used so often that they even have non-protected aliases: \other and \active.

We often need a space as defined in Plain TeX. Because ConTeXt cannot be sure that \space is not redefined, it internally uses an alias: \normalspace.

When dealing with ConTeXt, please remember to never (re-)define macros that start with \normal.... Weird, unexpected things can, and probably will, occur!

These are constant counters, corresponding to 0, 1 and -1.


NOTE: Beware: if you want to have access to @ ! and ? in macronames, use
\unprotect
\def\My@@MAcro{..}
\unprotect

instead of manipulating the catcode of @ directly. Protection macros handle nested usage.

< Prev: Fundamentals | Top: System Macros | Next: Scratch Variables >