TeX in C
Explore TeX with modern c compiler.
PART 34: Data structures for math mode

宏定义

#define limits   1
 [#682] subtype of op_noad whose scripts are to be above, below 更多...
 
#define nolimits   2
 [#682] subtype of op_noad whose scripts are to be normal 更多...
 
#define noadsize   (4 * CHAR_NODE_SIZE)
 [#681] number of words in a normal noad 更多...
 
#define radicalnoadsize   (5 * CHAR_NODE_SIZE)
 [#683] number of mem words in a radical noad 更多...
 
#define fractionnoadsize   (6 * CHAR_NODE_SIZE)
 [#683] number of mem words in a fraction noad 更多...
 
#define accentnoadsize   (5 * CHAR_NODE_SIZE)
 [#687] number of mem words in an accent noad 更多...
 
#define stylenode   (UNSET_NODE + 1)
 [#688] type of a style node 更多...
 
#define stylenodesize   3
 [#688] number of words in a style node 更多...
 
#define cramped   1
 [#688] add this to an uncramped style if you want to cramp it. 更多...
 
#define choicenode   (UNSET_NODE + 2)
 [#689] type of a choice node. 更多...
 
#define nucleus(x)   ((x)+CHAR_NODE_SIZE) /* the |nucleus| field of a noad}*/
 [p250#681] 更多...
 
#define supscr(x)   (nucleus(x)+CHAR_NODE_SIZE) /* the |supscr| field of a noad}*/
 
#define subscr(x)   (supscr(x)+CHAR_NODE_SIZE) /* the |subscr| field of a noad}*/
 
#define leftdelimiter(x)   (subscr(x)+CHAR_NODE_SIZE) /* first delimiter field of a noad}*/
 [p252#683] 更多...
 
#define rightdelimiter(x)   (leftdelimiter(x)+CHAR_NODE_SIZE) /* second delimiter field of a fraction noad}*/
 
#define accentchr(x)   (subscr(x)+CHAR_NODE_SIZE) /* the |accentchr| field of an accent noad}*/
 [p253#687] 更多...
 
#define mathtype   link
 [p250#681] a |halfword| in |mem|. 更多...
 
#define fam(x)   type(x)
 
#define smallfam(x)   mem[x].qqqq.b0 /* |fam| for ``small'' delimiter}*/
 [p252#683] 更多...
 
#define smallchar(x)   mem[x].qqqq.b1 /* |character| for ``small'' delimiter}*/
 
#define largefam(x)   mem[x].qqqq.b2 /* |fam| for ``large'' delimiter}*/
 
#define largechar(x)   mem[x].qqqq.b3 /* |character| for ``large'' delimiter}*/
 
#define thickness(x)   (mem[nucleus(x)-MEM_MIN].sc) /* |thickness| field in a fraction noad}*/
 
#define defaultcode   1073741824L
 
#define numerator   supscr /* |numerator| field in a fraction noad}*/
 
#define denominator   subscr /* |denominator| field in a fraction noad}*/
 
#define delimiter   nucleus /* |delimiter| field in left and right noads}*/
 [p253#687] 更多...
 
#define scriptsallowed(x)   ((type(x)>=ordnoad)&&(type(x)<leftnoad))
 [p253#687] 更多...
 
#define vpack(x, y, z)   vpackage((x), (y), (z), MAX_DIMEN)
 [p245#668] special case of unconstrained depth 更多...
 
#define displaymlist(x)   info(x+1) /* mlist to be used in display style}*/
 [p254#689] 更多...
 
#define textmlist(x)   link(x+1) /* mlist to be used in text style}*/
 
#define scriptmlist(x)   info(x+2) /* mlist to be used in script style}*/
 
#define scriptscriptmlist(x)   link(x+2) /* mlist to be used in scriptscript style}*/
 

枚举

enum  NoadType {
  ordnoad = (UNSET_NODE + 3) , opnoad , binnoad , relnoad ,
  opennoad , closenoad , punctnoad , innernoad ,
  radicalnoad , fractionnoad , undernoad , overnoad ,
  accentnoad , vcenternoad , leftnoad , rightnoad
}
 [p251#682] type of noad classified XXX. 更多...
 
enum  StyleNodeSubtype { displaystyle = 0 , textstyle = 2 , scriptstyle = 4 , scriptscriptstyle = 6 }
 [#688] 更多...
 

函数

void mmode_init ()
 [#685] 更多...
 
HalfWord newnoad (void)
 
HalfWord newstyle (SmallNumber s)
 
HalfWord newchoice (void)
 
void printfamandchar (HalfWord p)
 [#691] prints family and character. 更多...
 
void printdelimiter (HalfWord p)
 [#691] prints a delimiter as 24-bit hex value. 更多...
 
void printsubsidiarydata (HalfWord p, ASCIICode c)
 [#692] display a noad field. 更多...
 
void showinfo (void)
 
void printstyle (Integer c)
 [#694] 更多...
 

变量

TwoHalves emptyfield
 [p267#726] label not_use 更多...
 
FourQuarters nulldelimiter
 

详细描述

宏定义说明

◆ accentchr

#define accentchr (   x)    (subscr(x)+CHAR_NODE_SIZE) /* the |accentchr| field of an accent noad}*/

[p253#687]

◆ accentnoadsize

#define accentnoadsize   (5 * CHAR_NODE_SIZE)

[#687] number of mem words in an accent noad

◆ choicenode

#define choicenode   (UNSET_NODE + 2)

[#689] type of a choice node.

◆ cramped

#define cramped   1

[#688] add this to an uncramped style if you want to cramp it.

◆ defaultcode

#define defaultcode   1073741824L

◆ delimiter

#define delimiter   nucleus /* |delimiter| field in left and right noads}*/

[p253#687]

◆ denominator

#define denominator   subscr /* |denominator| field in a fraction noad}*/

◆ displaymlist

#define displaymlist (   x)    info(x+1) /* mlist to be used in display style}*/

[p254#689]

◆ fam

#define fam (   x)    type(x)

◆ fractionnoadsize

#define fractionnoadsize   (6 * CHAR_NODE_SIZE)

[#683] number of mem words in a fraction noad

◆ largechar

#define largechar (   x)    mem[x].qqqq.b3 /* |character| for ``large'' delimiter}*/

◆ largefam

#define largefam (   x)    mem[x].qqqq.b2 /* |fam| for ``large'' delimiter}*/

◆ leftdelimiter

#define leftdelimiter (   x)    (subscr(x)+CHAR_NODE_SIZE) /* first delimiter field of a noad}*/

[p252#683]

◆ limits

#define limits   1

[#682] subtype of op_noad whose scripts are to be above, below

◆ mathtype

#define mathtype   link

[p250#681] a |halfword| in |mem|.

◆ noadsize

#define noadsize   (4 * CHAR_NODE_SIZE)

[#681] number of words in a normal noad

◆ nolimits

#define nolimits   2

[#682] subtype of op_noad whose scripts are to be normal

◆ nucleus

#define nucleus (   x)    ((x)+CHAR_NODE_SIZE) /* the |nucleus| field of a noad}*/

[p250#681]

◆ numerator

#define numerator   supscr /* |numerator| field in a fraction noad}*/

◆ radicalnoadsize

#define radicalnoadsize   (5 * CHAR_NODE_SIZE)

[#683] number of mem words in a radical noad

◆ rightdelimiter

#define rightdelimiter (   x)    (leftdelimiter(x)+CHAR_NODE_SIZE) /* second delimiter field of a fraction noad}*/

◆ scriptmlist

#define scriptmlist (   x)    info(x+2) /* mlist to be used in script style}*/

◆ scriptsallowed

#define scriptsallowed (   x)    ((type(x)>=ordnoad)&&(type(x)<leftnoad))

[p253#687]

◆ scriptscriptmlist

#define scriptscriptmlist (   x)    link(x+2) /* mlist to be used in scriptscript style}*/

◆ smallchar

#define smallchar (   x)    mem[x].qqqq.b1 /* |character| for ``small'' delimiter}*/

◆ smallfam

#define smallfam (   x)    mem[x].qqqq.b0 /* |fam| for ``small'' delimiter}*/

[p252#683]

◆ stylenode

#define stylenode   (UNSET_NODE + 1)

[#688] type of a style node

◆ stylenodesize

#define stylenodesize   3

[#688] number of words in a style node

◆ subscr

#define subscr (   x)    (supscr(x)+CHAR_NODE_SIZE) /* the |subscr| field of a noad}*/

◆ supscr

#define supscr (   x)    (nucleus(x)+CHAR_NODE_SIZE) /* the |supscr| field of a noad}*/

◆ textmlist

#define textmlist (   x)    link(x+1) /* mlist to be used in text style}*/

◆ thickness

#define thickness (   x)    (mem[nucleus(x)-MEM_MIN].sc) /* |thickness| field in a fraction noad}*/

◆ vpack

#define vpack (   x,
  y,
 
)    vpackage((x), (y), (z), MAX_DIMEN)

[p245#668] special case of unconstrained depth

枚举类型说明

◆ NoadType

enum NoadType

[p251#682] type of noad classified XXX.

Each portion of a formula is classified as Ord, Op, Bin, Rel, Ope, Clo, Pun, or Inn, for purposes of spacing and line breaking.

枚举值
ordnoad 

[#682] [UNSET_NODE=13 + 3 = 16] type of a noad classified Ord.

opnoad 

noad classified Op

binnoad 

noad classified Bin

relnoad 

noad classified Rel

opennoad 

noad classified Ope

closenoad 

noad classified Clo

punctnoad 

noad classified Pun

innernoad 

noad classified Inn.

radicalnoad 

noad for square roots

fractionnoad 

noad for generalized fractions.

undernoad 

noad for underlining

overnoad 

noad for overlining

accentnoad 

noad for accented subformulas

vcenternoad 

noad for \vcenter

leftnoad 

noad for \left

rightnoad 

noad for \right

◆ StyleNodeSubtype

[#688]

枚举值
displaystyle 

subtype for \displaystyle

textstyle 

subtype for \textstyle

scriptstyle 

subtype for \scriptstyle

scriptscriptstyle 

subtype for \scriptscriptstyle

函数说明

◆ mmode_init()

void mmode_init ( )

[#685]

◆ newchoice()

HalfWord newchoice ( void  )

◆ newnoad()

HalfWord newnoad ( void  )

◆ newstyle()

HalfWord newstyle ( SmallNumber  s)

◆ printdelimiter()

void printdelimiter ( HalfWord  p)

[#691] prints a delimiter as 24-bit hex value.

◆ printfamandchar()

void printfamandchar ( HalfWord  p)

[#691] prints family and character.

◆ printstyle()

void printstyle ( Integer  c)

[#694]

◆ printsubsidiarydata()

void printsubsidiarydata ( HalfWord  p,
ASCIICode  c 
)

[#692] display a noad field.

◆ showinfo()

void showinfo ( void  )

变量说明

◆ emptyfield

TwoHalves emptyfield

[p267#726] label not_use

◆ nulldelimiter

FourQuarters nulldelimiter