TeX in C
Explore TeX with modern c compiler.
PART 45: The page builder

宏定义

#define insertsonly   1
 
#define boxthere   2
 
#define pageinsnodesize   4
 
#define inserting   0
 
#define splitup   1
 
#define contribute   80
 
#define brokenptr(x)   link(x+1)
 [p367#981] an insertion for this class will break here if anywhere 更多...
 
#define brokenins(x)   info(x+1) /* this insertion might break at |brokenptr|}*/
 
#define lastinsptr(x)   link(x+2) /* the most recent insertion for this |subtype|}*/
 
#define bestinsptr(x)   info(x+2) /* the optimum most recent insertion}*/
 
#define setpagesofarzero(x)   (pagesofar[(x)] = 0)
 [p369#987] 更多...
 
#define pagegoal   (pagesofar[0])
 [p368#982] desired height of information on page being built 更多...
 
#define pagetotal   (pagesofar[1]) /*height of the current page*/
 
#define pageshrink   (pagesofar[6]) /*shrinkability of the current page*/
 
#define pagedepth   (pagesofar[7]) /*depth of the current page*/
 
#define contribtail   (nest[0].tailfield) /*tail of the contribution list*/
 [p371#995] 更多...
 

函数

static void _new_cur_page ()
 [#991] page builder init 更多...
 
void page_builder_init ()
 [#990, #991] 更多...
 
void page_builder_init_once ()
 [#981, #988] 更多...
 
void printtotals (void)
 
void freezepagespecs (SmallNumber s)
 
void boxerror (EightBits n)
 
void ensurevbox (EightBits n)
 
void fireup (HalfWord c)
 
void buildpage (void)
 

变量

Pointer pagetail
 [#980] the final node on the current page 更多...
 
char pagecontents
 [#980] what is on the current page so far? 更多...
 
Scaled pagemaxdepth
 [#980] maximum box depth on page being built 更多...
 
Pointer bestpagebreak
 [#980] break here to get the best page known so far 更多...
 
Integer leastpagecost
 [#980] the score for this currently best page 更多...
 
Scaled bestsize
 [#980] its page goal 更多...
 
Scaled pagesofar [8]
 [#982] 更多...
 
Pointer lastglue
 
Scaled lastkern
 
Integer lastpenalty
 
Integer insertpenalties
 
Boolean outputactive
 [#989] 更多...
 

详细描述

宏定义说明

◆ bestinsptr

#define bestinsptr (   x)    info(x+2) /* the optimum most recent insertion}*/

◆ boxthere

#define boxthere   2

◆ brokenins

#define brokenins (   x)    info(x+1) /* this insertion might break at |brokenptr|}*/

◆ brokenptr

#define brokenptr (   x)    link(x+1)

[p367#981] an insertion for this class will break here if anywhere

◆ contribtail

#define contribtail   (nest[0].tailfield) /*tail of the contribution list*/

[p371#995]

◆ contribute

#define contribute   80

◆ inserting

#define inserting   0

◆ insertsonly

#define insertsonly   1

◆ lastinsptr

#define lastinsptr (   x)    link(x+2) /* the most recent insertion for this |subtype|}*/

◆ pagedepth

#define pagedepth   (pagesofar[7]) /*depth of the current page*/

◆ pagegoal

#define pagegoal   (pagesofar[0])

[p368#982] desired height of information on page being built

◆ pageinsnodesize

#define pageinsnodesize   4

◆ pageshrink

#define pageshrink   (pagesofar[6]) /*shrinkability of the current page*/

◆ pagetotal

#define pagetotal   (pagesofar[1]) /*height of the current page*/

◆ setpagesofarzero

#define setpagesofarzero (   x)    (pagesofar[(x)] = 0)

[p369#987]

◆ splitup

#define splitup   1

函数说明

◆ _new_cur_page()

static void _new_cur_page ( )
static

[#991] page builder init

◆ boxerror()

void boxerror ( EightBits  n)

◆ buildpage()

void buildpage ( void  )

◆ ensurevbox()

void ensurevbox ( EightBits  n)

◆ fireup()

void fireup ( HalfWord  c)

◆ freezepagespecs()

void freezepagespecs ( SmallNumber  s)

◆ page_builder_init()

void page_builder_init ( )

[#990, #991]

[#990]

[#991]

◆ page_builder_init_once()

void page_builder_init_once ( )

[#981, #988]

#981

#988

◆ printtotals()

void printtotals ( void  )

变量说明

◆ bestpagebreak

Pointer bestpagebreak

[#980] break here to get the best page known so far

◆ bestsize

Scaled bestsize

[#980] its page goal

◆ insertpenalties

Integer insertpenalties

◆ lastglue

Pointer lastglue

◆ lastkern

Scaled lastkern

◆ lastpenalty

Integer lastpenalty

◆ leastpagecost

Integer leastpagecost

[#980] the score for this currently best page

◆ outputactive

Boolean outputactive

[#989]

◆ pagecontents

char pagecontents

[#980] what is on the current page so far?

◆ pagemaxdepth

Scaled pagemaxdepth

[#980] maximum box depth on page being built

◆ pagesofar

Scaled pagesofar[8]

[#982]

◆ pagetail

Pointer pagetail

[#980] the final node on the current page