TeX in C
Explore TeX with modern c compiler.
|
宏定义 | |
#define | type(x) (mem[(x)].hh.UU.U2.b0) |
[p50#133] -> QuarterWord; identifies what kind of node this is. 更多... | |
#define | subtype(x) (mem[(x)].hh.UU.U2.b1) |
[p50#133] -> QuarterWord; secondary identification in some cases. 更多... | |
#define | is_char_node(x) ((x) >= hi_mem_min) |
[p50#134] does the argument point to a char node? 更多... | |
#define | font(x) link(x + 1) |
[50#134] -> HalfWord; the font code in a charnode . 更多... | |
#define | character(x) subtype(x) |
[50#134] -> QuarterWord; the character code in a charnode . 更多... | |
#define | CHAR_NODE_SIZE 2 |
#define | font_ligchar(x) type(ligchar(x)) |
#define | character_ligchar(x) subtype(ligchar(x)) |
#define | boxnodesize 7 |
[p51#135] number of words to allocate for a box node. 更多... | |
#define | widthoffset 1 |
[p51#135] position of width field in a box node. 更多... | |
#define | depthoffset 2 |
[p51#135] position of depth field in a box node. 更多... | |
#define | heightoffset 3 |
[p51#135] position of height field in a box node. 更多... | |
#define | width(x) mem[x + widthoffset].sc |
[p51#135] width of the box, in sp. 更多... | |
#define | depth(x) mem[x + depthoffset].sc |
[p51#135] depth of the box, in sp. 更多... | |
#define | height(x) mem[x + heightoffset].sc |
[p51#135] height of the box, in sp. 更多... | |
#define | shiftamount(x) mem[x + 4].sc |
[p51#135] repositioning distance, in sp. 更多... | |
#define | listoffset 5 |
[p51#135] position of list ptr field in a box node. 更多... | |
#define | listptr(x) link(x + listoffset) |
[p51#135] beginning of the list inside the box. 更多... | |
#define | glueorder(x) subtype(x + listoffset) |
[p51#135] applicable order of INFINITY. 更多... | |
#define | gluesign(x) type(x + listoffset) |
[p51#135] stretching or shrinking. 更多... | |
#define | NORMAL 0 |
[p51#135] the most common case when several cases are named. 更多... | |
#define | stretching 1 |
[p51#135] glue setting applies to the stretch components. 更多... | |
#define | shrinking 2 |
[p51#135] glue setting applies to the shrink components. 更多... | |
#define | glueoffset 6 |
[p51#135] position of glueset in a box node. 更多... | |
#define | glueset(x) mem[x + glueoffset].gr |
[p51#135] a word of type |glueratio| for glue setting. 更多... | |
#define | rulenodesize 4 |
[#138]: number of words to allocate for a rule node 更多... | |
#define | nullflag (-1073741824L) |
[#138]: -(2^30) signifies a missing item 更多... | |
#define | isrunning(x) ((x) == nullflag) |
[p51#138] tests for a running dimension. 更多... | |
#define | insnodesize 5 |
[p52#140]: number of words to allocate for an insertion 更多... | |
#define | floatcost(x) mem[x + 1].int_ |
[p52#140] the |floatingpenalty| to be used. 更多... | |
#define | insptr(x) info(x + 4) |
[p52#140] the vertical list to be inserted. 更多... | |
#define | splittopptr(x) link(x + 4) |
[p52#140] the |splittopskip| to be used. 更多... | |
#define | smallnodesize 2 |
[#141]: number of words to allocate for most node types 更多... | |
#define | markptr(x) mem[x + 1].int_ |
[p52#141] head of the token list for a mark. 更多... | |
#define | adjustptr markptr |
[p52#142] vertical list to be moved out of horizontal list. 更多... | |
#define | ligchar(x) ((x) + 1) |
[p52#143] the word where the ligature is to be found. 更多... | |
#define | ligptr(x) link(ligchar(x)) |
[p52#143] the list of characters. 更多... | |
#define | replacecount subtype |
[p53#145] how many subsequent nodes to replace. 更多... | |
#define | prebreak llink |
[p53#145] text that precedes a discretionary break. 更多... | |
#define | postbreak rlink |
[p53#145] text that follows a discretionary break. 更多... | |
#define | before 0 |
[#147]: subtype for math node that introduces a formula 更多... | |
#define | after 1 |
[#147]: subtype for math node that winds up a formula 更多... | |
#define | precedesbreak(x) (type(x) < MATH_NODE) |
[p54#148] 更多... | |
#define | nondiscardable(x) (type(x) < MATH_NODE) |
[p54#148] 更多... | |
#define | condmathglue 98 |
[p54#149] special subtype to suppress glue in the next node. 更多... | |
#define | muglue 99 |
[p54#149] subtype for math glue. 更多... | |
#define | aleaders 100 |
[p54#149] subtype for aligned leaders. 更多... | |
#define | cleaders 101 |
[p54#149] subtype for centered leaders. 更多... | |
#define | xleaders 102 |
[p54#149] subtype for expanded leaders. 更多... | |
#define | glueptr llink |
[p54#149] pointer to a glue specification. 更多... | |
#define | leaderptr rlink |
[p54#149] pointer to box or rule node for leaders. 更多... | |
#define | gluespecsize 4 |
[#150]: number of words to allocate for a glue specification 更多... | |
#define | gluerefcount(x) link(x) |
[p55#150] reference count of a glue specification. 更多... | |
#define | stretch(x) mem[x + 2].sc |
[p55#150] the stretchability of this glob of glue. 更多... | |
#define | shrink(x) mem[x + 3].sc |
[p55#150] the shrinkability of this glob of glue. 更多... | |
#define | stretchorder(x) type(x) |
[p55#150] order of INFINITY for stretching. 更多... | |
#define | shrinkorder(x) subtype(x) |
[p55#150] order of INFINITY for shrinking. 更多... | |
#define | explicit 1 |
[#155]: subtype of kern nodes from \kern and \/ 更多... | |
#define | acckern 2 |
[#155]: subtype of kern nodes from accents 更多... | |
#define | INF_PENALTY INF_BAD |
[#157]: "infinite" penalty value 更多... | |
#define | EJECT_PENALTY (-INF_PENALTY) |
[#157]: "negatively infinite penalty value 更多... | |
#define | penalty(x) mem[x + 1].int_ |
[p56#157] the added cost of breaking a list here. 更多... | |
#define | gluestretch(x) mem[x + glueoffset].sc |
[p57#159] total stretch in an unset node. 更多... | |
#define | glueshrink shiftamount |
[p57#159] total shrink in an unset node. 更多... | |
#define | spancount subtype |
[p57#159] indicates the number of spanned columns. 更多... | |
枚举 | |
enum | NodeType { HLIST_NODE , VLIST_NODE , RULE_NODE , INS_NODE , MARK_NODE , ADJUST_NODE , LIGATURE_NODE , DISC_NODE , WHATSIT_NODE , MATH_NODE , GLUE_NODE , KERN_NODE , PENALTY_NODE , UNSET_NODE } |
enum | InfinityOrder { FIL = 1 , FILL , FILLL } |
[#150]: the orders of INFINITY (normal, fil , fill , or filll ) corresponding to the stretch and shrink values. 更多... | |
函数 | |
Pointer | new_null_box (void) |
[#136] creates a new box node. 更多... | |
Pointer | new_rule (void) |
[#139] 更多... | |
Pointer | new_ligature (QuarterWord f, QuarterWord c, Pointer q) |
[#144] creates a ligature node having given contents of the font, character, and lig_ptr fields. 更多... | |
Pointer | new_lig_item (QuarterWord c) |
[#144] returns a two-word node having a given character field. 更多... | |
Pointer | new_disc (void) |
[#145] creates an empty disc node. 更多... | |
Pointer | new_math (Scaled w, SmallNumber s) |
[#147] A math node, which occurs only in horizontal lists, appears before and after mathematical formulas. 更多... | |
Pointer | new_spec (Pointer p) |
[#151] duplicates a glue specification. 更多... | |
Pointer | new_param_glue (SmallNumber n) |
[#152] creates a glue node for a given parameter identified by its code number; 更多... | |
Pointer | new_glue (Pointer q) |
[#153] argument points to a glue specification. 更多... | |
Pointer | new_skip_param (SmallNumber n) |
[#154] creates a glue node for one of the current glue parameters. 更多... | |
Pointer | new_kern (long w) |
[#156] creates a kern node having a given width. 更多... | |
Pointer | new_penalty (long m) |
[#158] 更多... | |
#define acckern 2 |
[#155]: subtype of kern nodes from accents
#define after 1 |
[#147]: subtype for math node that winds up a formula
#define aleaders 100 |
[p54#149] subtype for aligned leaders.
#define before 0 |
[#147]: subtype for math node that introduces a formula
#define boxnodesize 7 |
[p51#135] number of words to allocate for a box node.
#define CHAR_NODE_SIZE 2 |
#define cleaders 101 |
[p54#149] subtype for centered leaders.
#define condmathglue 98 |
[p54#149] special subtype to suppress glue in the next node.
#define depth | ( | x | ) | mem[x + depthoffset].sc |
[p51#135] depth of the box, in sp.
#define depthoffset 2 |
[p51#135] position of depth field in a box node.
#define EJECT_PENALTY (-INF_PENALTY) |
[#157]: "negatively infinite penalty value
#define explicit 1 |
[#155]: subtype of kern nodes from \kern
and \/
#define glueorder | ( | x | ) | subtype(x + listoffset) |
[p51#135] applicable order of INFINITY.
#define glueset | ( | x | ) | mem[x + glueoffset].gr |
[p51#135] a word of type |glueratio| for glue setting.
#define glueshrink shiftamount |
[p57#159] total shrink in an unset node.
#define gluesign | ( | x | ) | type(x + listoffset) |
[p51#135] stretching or shrinking.
#define gluespecsize 4 |
[#150]: number of words to allocate for a glue specification
#define gluestretch | ( | x | ) | mem[x + glueoffset].sc |
[p57#159] total stretch in an unset node.
#define height | ( | x | ) | mem[x + heightoffset].sc |
[p51#135] height of the box, in sp.
#define heightoffset 3 |
[p51#135] position of height field in a box node.
#define insnodesize 5 |
[p52#140]: number of words to allocate for an insertion
#define is_char_node | ( | x | ) | ((x) >= hi_mem_min) |
[p50#134] does the argument point to a char node?
#define ligchar | ( | x | ) | ((x) + 1) |
[p52#143] the word where the ligature is to be found.
#define listoffset 5 |
[p51#135] position of list ptr field in a box node.
#define listptr | ( | x | ) | link(x + listoffset) |
[p51#135] beginning of the list inside the box.
#define muglue 99 |
[p54#149] subtype for math glue.
#define NORMAL 0 |
[p51#135] the most common case when several cases are named.
#define nullflag (-1073741824L) |
[#138]: -(2^30) signifies a missing item
#define rulenodesize 4 |
[#138]: number of words to allocate for a rule node
#define shrinking 2 |
[p51#135] glue setting applies to the shrink components.
#define smallnodesize 2 |
[#141]: number of words to allocate for most node types
#define stretching 1 |
[p51#135] glue setting applies to the stretch components.
[p50#133] -> QuarterWord; secondary identification in some cases.
[p50#133] -> QuarterWord; identifies what kind of node this is.
#define width | ( | x | ) | mem[x + widthoffset].sc |
[p51#135] width of the box, in sp.
#define widthoffset 1 |
[p51#135] position of width field in a box node.
#define xleaders 102 |
[p54#149] subtype for expanded leaders.
enum InfinityOrder |
enum NodeType |
Pointer new_disc | ( | void | ) |
[#145] creates an empty disc node.
Pointer new_kern | ( | long | w | ) |
[#156] creates a kern node having a given width.
Pointer new_lig_item | ( | QuarterWord | c | ) |
[#144] returns a two-word node having a given character field.
Such nodes are used for temporary processing as ligatures are being created.
Pointer new_ligature | ( | QuarterWord | f, |
QuarterWord | c, | ||
Pointer | q | ||
) |
[#144] creates a ligature node having given contents of the font, character, and lig_ptr fields.
Pointer new_math | ( | Scaled | w, |
SmallNumber | s | ||
) |
[#147] A math node, which occurs only in horizontal lists, appears before and after mathematical formulas.
The subtype field is before before the formula and after after it. There is a width field, which represents the amount of surrounding space inserted by \mathsurround.
Pointer new_null_box | ( | void | ) |
[#136] creates a new box node.
The new_null_box function returns a pointer to an hlist_node in which all subfields have the values corresponding to ‘\hbox{}’. The subtype field is set to MIN_QUARTER_WORD, since that’s the desired span count value if this hlist_node is changed to an unset_node.
Pointer new_param_glue | ( | SmallNumber | n | ) |
[#152] creates a glue node for a given parameter identified by its code number;
Pointer new_penalty | ( | long | m | ) |
[#158]
Pointer new_rule | ( | void | ) |
[#139]
Pointer new_skip_param | ( | SmallNumber | n | ) |
[#154] creates a glue node for one of the current glue parameters.
but it makes a fresh copy of the glue specification, since that specification will probably be subject to change, while the parameter will stay put.
[#224] Current mem equivalent of glue parameter number n.