TeX in C
Explore TeX with modern c compiler.
|
宏定义 | |
#define | OCTAL_TOKEN (othertoken + '\'') |
[#438] apostrophe, indicates an octal constant. 更多... | |
#define | HEX_TOKEN (othertoken + '"') |
[#438] double quote, indicates a hex constant. 更多... | |
#define | ALPHA_TOKEN (othertoken + '`') |
[#438] reverse apostrophe, precedes alpha constants. 更多... | |
#define | POINT_TOKEN (othertoken + '.') |
[#438] decimal point. 更多... | |
#define | CONTINENTAL_POINT_TOKEN (othertoken + ',') |
[#438] decimal point, Eurostyle. 更多... | |
#define | INFINITY 2147483647L |
[#445] the largest positive value that \( \rm\TeX\ \) knows. 更多... | |
#define | A_TOKEN (lettertoken + 'A') |
[#445] the smallest special hex digit. 更多... | |
#define | OTHER_A_TOKEN (othertoken + 'A') |
[#445] special hex digit of type otherchar. 更多... | |
#define | DEFAULT_RULE 26214 |
[#463] 0.4 pt. 更多... | |
#define | INPUT_LINE_NO_CODE (GLUE_VAL + 1) |
[#416] \inputlineno 更多... | |
#define | BADNESS_CODE (GLUE_VAL + 2) |
[#416] \badness 更多... | |
#define | MAX_DIMEN 1073741823L |
[#421] \( 2^{30}-1 \) 更多... | |
#define | ZERO_TOKEN (othertoken + '0') |
[#445] zero, the smallest digit 更多... | |
#define | SCAN_NORMAL_DIMEN() scan_dimen(false, false, false) |
[#448] 更多... | |
枚举 | |
enum | TokenLevel { INT_VAL , DIMEN_VAL , GLUE_VAL , MU_VAL , IDENT_VAL , TOK_VAL } |
[#410] 更多... | |
函数 | |
void | scan_init () |
[#439] 更多... | |
void | skip_spaces (void) |
[#406] Get the next non-blank non-call token. 更多... | |
void | skip_spaces_or_relax (void) |
[#404] Get the next non-blank non-relax non-call token. 更多... | |
void | scan_left_brace (void) |
[#403] when a left brace is supposed to be the next non-blank token. 更多... | |
void | scan_optional_equals (void) |
[#405] looks for an optional = sign preceded by optional spaces. 更多... | |
Boolean | scankeyword (StrNumber s) |
[#407] look for a given string. 更多... | |
static void | mu_error (void) |
[#408] sounds an alarm when mu and non-mu units are being switched. 更多... | |
void | scan_something_internal (SmallNumber level, Boolean negative) |
[#413] fetch an internal parameter. 更多... | |
void | scan_eight_bit_int (void) |
[#433] scan register code = [0, 255] , use scan_int. 更多... | |
void | scan_char_num (void) |
[#434] scan character code = [0, 255] , use scan_int. 更多... | |
void | scan_four_bit_int (void) |
[#435] scan number = [0, 15] , use scan_int. 更多... | |
void | scan_fifteen_bit_int (void) |
[#436] scan mathchar = [0, 23767] , use scan_int. 更多... | |
void | scan_twenty_seven_bit_int (void) |
[#437] scan mathchar = \( [0, 2^{27}−1] \), use scan_int. 更多... | |
void | scan_int (void) |
[#440] sets cur_val to an integer. 更多... | |
void | scan_dimen (Boolean mu, Boolean inf, Boolean shortcut) |
[#448] sets cur_val to a dimension. 更多... | |
void | scan_glue (SmallNumber level) |
[#461] sets cur_val to a glue spec pointer. 更多... | |
HalfWord | scan_rule_spec (void) |
[#463] returns a pointer to a rule node. 更多... | |
变量 | |
Integer | cur_val |
[#410] value returned by numeric scanners. 更多... | |
SmallNumber | cur_val_level |
[#410] the "level" of this value. 更多... | |
SmallNumber | radix |
[#438] scan_int sets this to 8, 10, 16, or zero. 更多... | |
GlueOrd | cur_order |
[#447] order of INFINITY found by scan_dimen. 更多... | |
#define A_TOKEN (lettertoken + 'A') |
[#445] the smallest special hex digit.
#define ALPHA_TOKEN (othertoken + '`') |
[#438] reverse apostrophe, precedes alpha constants.
#define CONTINENTAL_POINT_TOKEN (othertoken + ',') |
[#438] decimal point, Eurostyle.
#define DEFAULT_RULE 26214 |
[#463] 0.4 pt.
#define HEX_TOKEN (othertoken + '"') |
[#438] double quote, indicates a hex constant.
#define INFINITY 2147483647L |
[#445] the largest positive value that \( \rm\TeX\ \) knows.
#define MAX_DIMEN 1073741823L |
[#421] \( 2^{30}-1 \)
#define OCTAL_TOKEN (othertoken + '\'') |
[#438] apostrophe, indicates an octal constant.
#define OTHER_A_TOKEN (othertoken + 'A') |
[#445] special hex digit of type otherchar.
#define POINT_TOKEN (othertoken + '.') |
[#438] decimal point.
#define SCAN_NORMAL_DIMEN | ( | ) | scan_dimen(false, false, false) |
[#448]
#define ZERO_TOKEN (othertoken + '0') |
[#445] zero, the smallest digit
enum TokenLevel |
|
static |
[#408] sounds an alarm when mu and non-mu units are being switched.
void scan_char_num | ( | void | ) |
[#434] scan character code = [0, 255]
, use scan_int.
xref[10]: 414, 935, 1030, 1038, 1123, 1124, 1151, 1154, 1224, 1232
[#448] sets cur_val to a dimension.
xref[6]: 410, 440, 447, 461, 462, 1061
< should the answer be negated?
< numerator of a fraction whose denominator is 2^16.
[#450] Local variables for dimension calculations
[#441] Get the next non-blank non-sign token; set negative appropriately
[#449] Fetch an internal dimension and goto attach sign, or fetch an internal integer
[#451] Coerce glue to a dimension.
[#452]
[#451]
[#453] Scan units and set cur_val to x · (cur val + f/2^16) where there are x sp per unit; goto attach sign if the units are internal
[#454] Scan for fil units; goto attach_fraction if found
[#455] Scan for units that are internal dimensions; goto attach sign with cur val set if found.
[#451] Coerce glue to a dimension.
[#558] The em width for cur_font.
[#559] The x-height for cur_font.
[#456] Scan for mu units and goto attach fraction.
[#443] Scan an optional space.
void scan_eight_bit_int | ( | void | ) |
[#433] scan register code = [0, 255]
, use scan_int.
xref[15]: 415, 420, 427, 505, 1079, 1082, 1099, 1110, 1224, 1226, 1227, 1237, 1241, 1247, 1296
void scan_fifteen_bit_int | ( | void | ) |
[#436] scan mathchar = [0, 23767]
, use scan_int.
xref[4]: 1151, 1154, 1165, 1224
void scan_four_bit_int | ( | void | ) |
[#435] scan number = [0, 15]
, use scan_int.
xref[5]: 501, 577, 1234, 1275, 1350
void scan_glue | ( | SmallNumber | level | ) |
[#461] sets cur_val to a glue spec pointer.
xref[5]: 410, 782, 1060, 1228, 1238
void scan_init | ( | ) |
[#439]
void scan_int | ( | void | ) |
[#440] sets cur_val to an integer.
xref[31]: 409, 410, 432, 433, 434, 435, 436, 437, 438, 447, 448, 461, 471, 503, 504, 509, 578, 1103, 1225, 1228, 1232, 1238, 1240, 1243, 1244, 1246, 1248, 1253, 1258, 1350, 1377
void scan_left_brace | ( | void | ) |
[#403] when a left brace is supposed to be the next non-blank token.
xref[12]: 473, 645, 785, 934, 960, 1025, 1099, 1117, 1119, 1153, 1172, 1174
void scan_optional_equals | ( | void | ) |
[#405] looks for an optional =
sign preceded by optional spaces.
\relax
is not ignored here.
xerf[19]: 782, 1224, 1226, 1228, 1232, 1234, 1236, 1241, 1243, 1244, 1245, 1246, 1247, 1248, 1253, 1257, 1275, 1351
HalfWord scan_rule_spec | ( | void | ) |
[#463] returns a pointer to a rule node.
This routine is called just after \( \rm\TeX\ \) has seen \hrule
or \vrule
; therefore cur cmd will be either hrule or vrule. The idea is to store the default rule dimensions in the node, then to override them if height
or width
or depth
specifications are found (in any order).
xref[2]: 1056, 1084
void scan_something_internal | ( | SmallNumber | level, |
Boolean | negative | ||
) |
[#413] fetch an internal parameter.
xref[9]: 409, 410, 432, 440, 449, 451, 455, 461, 465
void scan_twenty_seven_bit_int | ( | void | ) |
[#437] scan mathchar
= \( [0, 2^{27}−1] \), use scan_int.
xref[3]: 1151, 1154, 1160
[#407] look for a given string.
checks to see whether the next tokens of input match this string.
If a match is found, the characters are effectively removed from the input and true
is returned. Otherwise false is returned, and the input is left essentially unchanged (except for the fact that some macros may have been expanded, etc.).
void skip_spaces | ( | void | ) |
[#406] Get the next non-blank non-call token.
used in sections 405, 441, 455, 503, 526, 577, 785, 791, and 1045.
void skip_spaces_or_relax | ( | void | ) |
[#404] Get the next non-blank non-relax non-call token.
\( \rm\TeX\ \) allows \relax
to appear before the left brace. used in sections 403, 1078, 1084, 1151, 1160, 1211, 1226, and 1270.
GlueOrd cur_order |
[#447] order of INFINITY found by scan_dimen.
Integer cur_val |
[#410] value returned by numeric scanners.
SmallNumber cur_val_level |
[#410] the "level" of this value.
[INT_VAL=0, TOK_VAL=5]
SmallNumber radix |
[#438] scan_int sets this to 8, 10, 16, or zero.