TeX in C
Explore TeX with modern c compiler.
box.h 文件参考
#include "global.h"
#include "mem.h"
#include "texmath.h"
#include "str.h"
box.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define INC_BOX_H
 Box related. 更多...
 
#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. 更多...
 
#define nodelistdisplay(x)   (append_char('.'), shownodelist(x), flush_char())
 [p64#180] str_room need not be checked; see showbox 更多...
 
#define tokenrefcount(x)   info(x)
 
#define addtokenref(x)   (tokenrefcount(x)++)
 [#203] new reference to a token list. 更多...
 
#define addglueref(x)   (gluerefcount(x)++)
 [#203] new reference to a glue spec. 更多...
 

枚举

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] 更多...
 
void shortdisplay (Pointer p)
 [#174] prints highlights of list p. 更多...
 
void printspec (Integer p, StrNumber s)
 [#178] prints a glue specification. 更多...
 
void shownodelist (Integer p)
 [#182] prints a node list symbolically. 更多...
 
void showbox (HalfWord p)
 [#198] 更多...
 
void delete_token_ref (HalfWord p)
 
void delete_glue_ref (HalfWord p)
 
void flush_node_list (HalfWord p)
 
HalfWord copynodelist (HalfWord p)
 

变量

Integer font_in_short_display
 [#173] an internal font number. 更多...
 
Integer depth_threshold
 [#181] maximum nesting depth in box displays. 更多...
 
Integer breadth_max
 [#181] maximum number of items shown at the same list level. 更多...
 

宏定义说明

◆ INC_BOX_H

#define INC_BOX_H

Box related.

[#133] Data structures for boxes and their friends.