TeX in C
Explore TeX with modern c compiler.
PART 35: Subroutines for math mode

[ #699. 更多...

宏定义

#define TEXT_SIZE   0
 p258#699: Subroutines for math mode 更多...
 
#define SCRIPT_SIZE   16
 
#define SCRIPT_SCRIPT_SIZE   32
 
#define totalmathsyparams   22
 
#define totalmathexparams   13
 
#define mathsy(x, y)   (fontinfo[(x) + parambase[fam_fnt(2 + (y))]].sc)
 [p258#700] 更多...
 
#define mathxheight(x)   mathsy(5, x) /* height of `\.x'}*/
 
#define mathquad(x)   mathsy(6, x) /* \.{18mu}}*/
 
#define num1(x)   mathsy(8,x) /* numerator shift-up in display styles}*/
 
#define num2(x)   mathsy(9,x) /* numerator shift-up in non-display, non-\.{\\atop}}*/
 
#define num3(x)   mathsy(10,x) /* numerator shift-up in non-display \.{\\atop}}*/
 
#define denom1(x)   mathsy(11,x) /* denominator shift-down in display styles}*/
 
#define denom2(x)   mathsy(12,x) /* denominator shift-down in non-display styles}*/
 
#define sup1(x)   mathsy(13,x) /* superscript shift-up in uncramped display style}*/
 
#define sup2(x)   mathsy(14,x) /* superscript shift-up in uncramped non-display}*/
 
#define sup3(x)   mathsy(15,x) /* superscript shift-up in cramped styles}*/
 
#define sub1(x)   mathsy(16,x) /* subscript shift-down if superscript is absent}*/
 
#define sub2(x)   mathsy(17,x) /* subscript shift-down if superscript is present}*/
 
#define supdrop(x)   mathsy(18,x) /* superscript baseline below top of large box}*/
 
#define subdrop(x)   mathsy(19,x) /* subscript baseline below bottom of large box}*/
 
#define delim1(x)   mathsy(20,x) /* size of \.{\\atopwithdelims} delimiters*/
 
#define delim2(x)   mathsy(21,x) /* size of \.{\\atopwithdelims} delimiters in non-displays}*/
 
#define axisheight(x)   mathsy(22,x) /* height of fraction lines above the baseline}*/
 
#define mathex(x)   fontinfo[x + parambase[fam_fnt(3 + cursize)]].sc
 [p258#701] 更多...
 
#define defaultrulethickness   mathex(8) /* thickness of \.{\\over} bars}*/
 
#define bigopspacing1   mathex(9) /* minimum clearance above a displayed op}*/
 
#define bigopspacing2   mathex(10) /* minimum clearance below a displayed op}*/
 
#define bigopspacing3   mathex(11) /* minimum baselineskip above displayed op}*/
 
#define bigopspacing4   mathex(12) /* minimum baselineskip below displayed op}*/
 
#define bigopspacing5   mathex(13) /* padding above and below displayed limits}*/
 
#define crampedstyle(x)   2*(x / 2)+cramped /* cramp the style}*/
 [p259#702] 更多...
 
#define substyle(x)   2*(x / 4)+scriptstyle+cramped /* smaller and cramped}*/
 
#define supstyle(x)   2*(x / 4)+scriptstyle+(x % 2) /* smaller}*/
 
#define numstyle(x)   x+2-2*(x / 6) /* smaller unless already script-script}*/
 
#define denomstyle(x)   2*(x / 2)+cramped+2-2*(x / 6) /* smaller, cramped}*/
 

函数

void print_size (Integer s)
 [#699] 更多...
 
HalfWord fractionrule (long t)
 
HalfWord overbar (HalfWord b, long k, long t)
 
HalfWord charbox (InternalFontNumber f, QuarterWord c)
 
void stackintobox (HalfWord b, InternalFontNumber f, QuarterWord c)
 
Integer heightplusdepth (InternalFontNumber f, QuarterWord c)
 
HalfWord vardelimiter (HalfWord d, SmallNumber s, long v)
 
HalfWord rebox (HalfWord b, long w)
 
HalfWord mathglue (HalfWord g, long m)
 
void mathkern (HalfWord p, long m)
 
void flushmath (void)
 

详细描述

[ #699.

Subroutines for math mode. ]

宏定义说明

◆ axisheight

#define axisheight (   x)    mathsy(22,x) /* height of fraction lines above the baseline}*/

◆ bigopspacing1

#define bigopspacing1   mathex(9) /* minimum clearance above a displayed op}*/

◆ bigopspacing2

#define bigopspacing2   mathex(10) /* minimum clearance below a displayed op}*/

◆ bigopspacing3

#define bigopspacing3   mathex(11) /* minimum baselineskip above displayed op}*/

◆ bigopspacing4

#define bigopspacing4   mathex(12) /* minimum baselineskip below displayed op}*/

◆ bigopspacing5

#define bigopspacing5   mathex(13) /* padding above and below displayed limits}*/

◆ crampedstyle

#define crampedstyle (   x)    2*(x / 2)+cramped /* cramp the style}*/

[p259#702]

◆ defaultrulethickness

#define defaultrulethickness   mathex(8) /* thickness of \.{\\over} bars}*/

◆ delim1

#define delim1 (   x)    mathsy(20,x) /* size of \.{\\atopwithdelims} delimiters*/

◆ delim2

#define delim2 (   x)    mathsy(21,x) /* size of \.{\\atopwithdelims} delimiters in non-displays}*/

◆ denom1

#define denom1 (   x)    mathsy(11,x) /* denominator shift-down in display styles}*/

◆ denom2

#define denom2 (   x)    mathsy(12,x) /* denominator shift-down in non-display styles}*/

◆ denomstyle

#define denomstyle (   x)    2*(x / 2)+cramped+2-2*(x / 6) /* smaller, cramped}*/

◆ mathex

#define mathex (   x)    fontinfo[x + parambase[fam_fnt(3 + cursize)]].sc

[p258#701]

◆ mathquad

#define mathquad (   x)    mathsy(6, x) /* \.{18mu}}*/

◆ mathsy

#define mathsy (   x,
 
)    (fontinfo[(x) + parambase[fam_fnt(2 + (y))]].sc)

[p258#700]

◆ mathxheight

#define mathxheight (   x)    mathsy(5, x) /* height of `\.x'}*/

◆ num1

#define num1 (   x)    mathsy(8,x) /* numerator shift-up in display styles}*/

◆ num2

#define num2 (   x)    mathsy(9,x) /* numerator shift-up in non-display, non-\.{\\atop}}*/

◆ num3

#define num3 (   x)    mathsy(10,x) /* numerator shift-up in non-display \.{\\atop}}*/

◆ numstyle

#define numstyle (   x)    x+2-2*(x / 6) /* smaller unless already script-script}*/

◆ SCRIPT_SCRIPT_SIZE

#define SCRIPT_SCRIPT_SIZE   32

◆ SCRIPT_SIZE

#define SCRIPT_SIZE   16

◆ sub1

#define sub1 (   x)    mathsy(16,x) /* subscript shift-down if superscript is absent}*/

◆ sub2

#define sub2 (   x)    mathsy(17,x) /* subscript shift-down if superscript is present}*/

◆ subdrop

#define subdrop (   x)    mathsy(19,x) /* subscript baseline below bottom of large box}*/

◆ substyle

#define substyle (   x)    2*(x / 4)+scriptstyle+cramped /* smaller and cramped}*/

◆ sup1

#define sup1 (   x)    mathsy(13,x) /* superscript shift-up in uncramped display style}*/

◆ sup2

#define sup2 (   x)    mathsy(14,x) /* superscript shift-up in uncramped non-display}*/

◆ sup3

#define sup3 (   x)    mathsy(15,x) /* superscript shift-up in cramped styles}*/

◆ supdrop

#define supdrop (   x)    mathsy(18,x) /* superscript baseline below top of large box}*/

◆ supstyle

#define supstyle (   x)    2*(x / 4)+scriptstyle+(x % 2) /* smaller}*/

◆ TEXT_SIZE

#define TEXT_SIZE   0

p258#699: Subroutines for math mode

◆ totalmathexparams

#define totalmathexparams   13

◆ totalmathsyparams

#define totalmathsyparams   22

函数说明

◆ charbox()

HalfWord charbox ( InternalFontNumber  f,
QuarterWord  c 
)

◆ flushmath()

void flushmath ( void  )

◆ fractionrule()

HalfWord fractionrule ( long  t)

◆ heightplusdepth()

Integer heightplusdepth ( InternalFontNumber  f,
QuarterWord  c 
)

◆ mathglue()

HalfWord mathglue ( HalfWord  g,
long  m 
)

◆ mathkern()

void mathkern ( HalfWord  p,
long  m 
)

◆ overbar()

HalfWord overbar ( HalfWord  b,
long  k,
long  t 
)

◆ print_size()

void print_size ( Integer  s)

[#699]

◆ rebox()

HalfWord rebox ( HalfWord  b,
long  w 
)

◆ stackintobox()

void stackintobox ( HalfWord  b,
InternalFontNumber  f,
QuarterWord  c 
)

◆ vardelimiter()

HalfWord vardelimiter ( HalfWord  d,
SmallNumber  s,
long  v 
)