Subject: | |
From: | |
Reply To: | |
Date: | Mon, 6 Jul 1998 17:57:56 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
l3basics.dtx mentions \c_space_chartok, evidently the equivalent of
\@sptoken, but it's not defined anywhere. In fact there is a group of
similar "character-token primitives". For experimentation purposes I
would suggest giving them new LaTeX3 names in l3basics. Some, if not
all of these, as I recall, are dealt with off somewhere in another
package, but it did not get included in the expl3 release.
(catcode 1) \bgroup -> \group_begin_lbrace: (?)
(catcode 2) \egroup -> \group_end_rbrace: (?)
(catcode 3) $ -> \math_start: (and also \math_end:)
\gdef:Npn \math_start_display: {\math_start:\math_start:}
\gdef:Npn \math_end_display: {\math_end:\math_end:}
(catcode 4) & -> \align_end_cell:
(catcode 6) # -> \param_marker:
(catcode 7) ^ -> \math_superscript:w
(catcode 8) _ -> \math_subscript:w
(catcode 10) space -> \c_space_chartok
Some interesting tricks can be done when a control sequence
\param_marker: instead of a character # is embedded in macro
definitions. The behavior of the macro is affected at run-time by the
current local definition of the control sequence. (LaTeX already uses
this in constructing preambles for array and tabular, but I played
around with the idea a little more, some time ago.)
If you wanted to handle the above single-character functions in
l3names.dtx in full generality, one could argue that you need 256
names for each catcode. But I guess 1 or 2 will be enough :-)
The following which are used by TeX when scanning numbers and dimens
probably are also useful to have (must be assigned with def, not let).
(catcode 12) ' -> \num_octal
(catcode 12) " -> \num_hex
(catcode 12) - -> \num_minus
(catcode 12) . -> \num_decimal
(catcode 12) = -> \num_equal
(catcode 12) ` -> \num_alph "alphabetic constant"
Michael Downes
|
|
|