TeX in C
Explore TeX with modern c compiler.
PART 17: The table of equivalents

宏定义

#define ACTIVE_BASE   1
 [p82#222] [region 1] eqtb[ACTIVE_BASE, (HASH_BASE - 1)] holds current equivalents of single-character control sequences. 更多...
 
#define SINGLE_BASE   (ACTIVE_BASE + 256)
 [p82#222] [region 1] equivalents of one-character control sequences. 更多...
 
#define NULL_CS   (SINGLE_BASE + 256)
 [p82#222] [region 1] equivalent of \csname\endcsname 更多...
 
#define eq_level_field(x)   x.hh.UU.U2.b1
 [p81#221] MemoryWord -> QuarterWord 更多...
 
#define eq_type_field(x)   x.hh.UU.U2.b0
 [p81#221] MemoryWord -> QuarterWord 更多...
 
#define equiv_field(x)   x.hh.rh
 [p81#221] MemoryWord -> QuarterWord 更多...
 
#define eq_level(x)   eq_level_field(eqtb[x])
 [p81#221] -> QuarterWord = EqLevel; level of definition. 更多...
 
#define eq_type(x)   eq_type_field(eqtb[x])
 [p81#221] -> QuarterWord = TexCommandCode; command code for equivalent. 更多...
 
#define equiv(x)   equiv_field(eqtb[x])
 [p81#221] -> HalfWord; equivalent value. 更多...
 
#define HASH_BASE   (NULL_CS + 1)
 [p82#222] [region 2] eqtb[HASH_BASE, (GLUE_BASE - 1)] holds current equivalents of multiletter control sequences. 更多...
 
#define FONT_ID_BASE   (FROZEN_NULL_FONT - FONT_BASE)
 [region 2] begins table of 257 permanent font identifiers. 更多...
 
#define UNDEFINED_CONTROL_SEQUENCE   (FROZEN_NULL_FONT + 257)
 [region 2] dummy location. 更多...
 
#define GLUE_BASE   (UNDEFINED_CONTROL_SEQUENCE + 1)
 [p83#224] [region 3] eqtb[HASH_BASE, (GLUE_BASE - 1)] holds current equivalents of glue parameters like the current baselineskip. 更多...
 
#define SKIP_BASE   (GLUE_BASE + GLUE_PARS)
 [p83#224] [region 3] table of 256 “skip” registers 更多...
 
#define MU_SKIP_BASE   (SKIP_BASE + 256)
 [p83#224] [region 3] table of 256 “muskip” registers. 更多...
 
#define skip(x)   equiv(SKIP_BASE + x)
 [p83#224] mem location of glue specification. 更多...
 
#define muskip(x)   equiv(MU_SKIP_BASE + x)
 [p83#224] mem location of math glue spec. 更多...
 
#define glue_par(x)   equiv(GLUE_BASE + x)
 [p83#224] mem location of glue specification. 更多...
 
#define lineskip   glue_par(LINE_SKIP_CODE)
 
#define baselineskip   glue_par(BASELINE_SKIP_CODE)
 
#define parskip   glue_par(PAR_SKIP_CODE)
 
#define abovedisplayskip   glue_par(ABOVE_DISPLAY_SKIP_CODE)
 
#define belowdisplayskip   glue_par(BELOW_DISPLAY_SKIP_CODE)
 
#define abovedisplayshortskip   glue_par(ABOVE_DISPLAY_SHORT_SKIP_CODE)
 
#define belowdisplayshortskip   glue_par(BELOW_DISPLAY_SHORT_SKIP_CODE)
 
#define leftskip   glue_par(LEFT_SKIP_CODE)
 
#define rightskip   glue_par(RIGHT_SKIP_CODE)
 
#define topskip   glue_par(TOP_SKIP_CODE)
 
#define splittopskip   glue_par(SPLIT_TOP_SKIP_CODE)
 
#define tabskip   glue_par(TAB_SKIP_CODE)
 
#define spaceskip   glue_par(SPACE_SKIP_CODE)
 
#define xspaceskip   glue_par(XSPACE_SKIP_CODE)
 
#define parfillskip   glue_par(PAR_FILL_SKIP_CODE)
 
#define thinmuskip   glue_par(THIN_MU_SKIP_CODE)
 
#define medmuskip   glue_par(MED_MU_SKIP_CODE)
 
#define thickmuskip   glue_par(THICK_MU_SKIP_CODE)
 
#define LOCAL_BASE   (MU_SKIP_BASE + 256)
 [p87#230] [region 4] eqtb[GLUE_BASE, (LOCAL_BASE - 1)] holds current equivalents of local halfword quantities like 更多...
 
#define BOX_BASE   (TOKS_BASE + 256)
 [p87#230] [region 4] table of 256 box registers. 更多...
 
#define CUR_FONT_LOC   (BOX_BASE + 256)
 [p87#230] [region 4] internal font number outside math mode. 更多...
 
#define MATH_FONT_BASE   (CUR_FONT_LOC + 1)
 [p87#230] [region 4] table of 48 math font numbers. 更多...
 
#define CAT_CODE_BASE   (MATH_FONT_BASE + 48)
 [p87#230] [region 4] table of 256 command codes (the “catcodes”). 更多...
 
#define LC_CODE_BASE   (CAT_CODE_BASE + 256)
 [p87#230] [region 4] table of 256 lowercase mappings. 更多...
 
#define UC_CODE_BASE   (LC_CODE_BASE + 256)
 [p87#230] [region 4] table of 256 uppercase mappings. 更多...
 
#define SF_CODE_BASE   (UC_CODE_BASE + 256)
 [p87#230] [region 4] table of 256 spacefactor mappings. 更多...
 
#define MATH_CODE_BASE   (SF_CODE_BASE + 256)
 [p87#230] [region 4] table of 256 math mode mappings. 更多...
 
#define parshapeptr   equiv(PAR_SHAPE_LOC)
 
#define outputroutine   equiv(OUTPUT_ROUTINE_LOC)
 
#define everypar   equiv(EVERY_PAR_LOC)
 
#define everymath   equiv(EVERY_MATH_LOC)
 
#define everydisplay   equiv(EVERY_DISPLAY_LOC)
 
#define everyhbox   equiv(EVERY_HBOX_LOC)
 
#define everyvbox   equiv(EVERY_VBOX_LOC)
 
#define everyjob   equiv(EVERY_JOB_LOC)
 
#define everycr   equiv(EVERY_CR_LOC)
 
#define errhelp   equiv(ERR_HELP_LOC)
 
#define toks(x)   equiv(TOKS_BASE + x)
 [p87#230] 更多...
 
#define box(x)   equiv(BOX_BASE + x)
 
#define cur_font   equiv(CUR_FONT_LOC)
 
#define fam_fnt(x)   equiv(MATH_FONT_BASE + x)
 
#define cat_code(x)   equiv(CAT_CODE_BASE + x)
 
#define lc_code(x)   equiv(LC_CODE_BASE + x)
 
#define uc_code(x)   equiv(UC_CODE_BASE + x)
 
#define sf_code(x)   equiv(SF_CODE_BASE + x)
 
#define math_code(x)   equiv(MATH_CODE_BASE + x)
 Note: |mathcode(c)| is the true math code plus |minhalfword| 更多...
 
#define NULL_FONT   FONT_BASE
 [#232] 更多...
 
#define VAR_CODE   28672
 [#232] math code meaning “use the current family” 更多...
 
#define INT_BASE   (MATH_CODE_BASE + 256)
 [p91#236] [region 5] eqtb[INT_BASE, (DIMEN_BASE - 1)] holds current equivalents of fullword integer parameters like the current hyphenation penalty. 更多...
 
#define COUNT_BASE   (INT_BASE + INT_PARS)
 [p92#236] [region 5] 256 user \count registers. 更多...
 
#define DEL_CODE_BASE   (COUNT_BASE + 256)
 [p92#236] [region 5] 256 delimiter code mappings. 更多...
 
#define del_code(x)   eqtb[DEL_CODE_BASE + x].int_
 [p92#236] -> Integer; 更多...
 
#define count(x)   eqtb[COUNT_BASE + x].int_
 [p92#236] -> Integer; 更多...
 
#define int_par(x)   eqtb[INT_BASE + x].int_
 [p92#236] -> Integer; Integer parameters 更多...
 
#define pretolerance   int_par(pretolerancecode)
 
#define tolerance   int_par(tolerancecode)
 
#define linepenalty   int_par(linepenaltycode)
 
#define hyphenpenalty   int_par(hyphenpenaltycode)
 
#define exhyphenpenalty   int_par(exhyphenpenaltycode)
 
#define clubpenalty   int_par(clubpenaltycode)
 
#define widowpenalty   int_par(widowpenaltycode)
 
#define displaywidowpenalty   int_par(displaywidowpenaltycode)
 
#define brokenpenalty   int_par(brokenpenaltycode)
 
#define binoppenalty   int_par(binoppenaltycode)
 
#define relpenalty   int_par(relpenaltycode)
 
#define predisplaypenalty   int_par(predisplaypenaltycode)
 
#define postdisplaypenalty   int_par(postdisplaypenaltycode)
 
#define interlinepenalty   int_par(interlinepenaltycode)
 
#define doublehyphendemerits   int_par(doublehyphendemeritscode)
 
#define finalhyphendemerits   int_par(finalhyphendemeritscode)
 
#define adjdemerits   int_par(adjdemeritscode)
 
#define mag   int_par(magcode)
 
#define delimiterfactor   int_par(delimiterfactorcode)
 
#define looseness   int_par(loosenesscode)
 
#define tex_time   int_par(timecode)
 
#define day   int_par(daycode)
 
#define month   int_par(monthcode)
 
#define year   int_par(yearcode)
 
#define showboxbreadth   int_par(showboxbreadthcode)
 
#define showboxdepth   int_par(showboxdepthcode)
 
#define hbadness   int_par(hbadnesscode)
 
#define vbadness   int_par(vbadnesscode)
 
#define pausing   int_par(pausingcode)
 
#define tracingonline   int_par(tracingonlinecode)
 
#define tracingmacros   int_par(tracingmacroscode)
 
#define tracingstats   int_par(tracingstatscode)
 
#define tracingparagraphs   int_par(tracingparagraphscode)
 
#define tracingpages   int_par(tracingpagescode)
 
#define tracingoutput   int_par(tracingoutputcode)
 
#define tracinglostchars   int_par(tracinglostcharscode)
 
#define tracingcommands   int_par(tracingcommandscode)
 
#define tracingrestores   int_par(tracingrestorescode)
 
#define uchyph   int_par(uchyphcode)
 
#define outputpenalty   int_par(outputpenaltycode)
 
#define maxdeadcycles   int_par(maxdeadcyclescode)
 
#define hangafter   int_par(hangaftercode)
 
#define floatingpenalty   int_par(floatingpenaltycode)
 
#define globaldefs   int_par(globaldefscode)
 
#define curfam   int_par(curfamcode)
 
#define ESCAPE_CHAR   int_par(ESCAPE_CHARcode)
 
#define defaulthyphenchar   int_par(defaulthyphencharcode)
 
#define defaultskewchar   int_par(defaultskewcharcode)
 
#define end_line_char   int_par(endlinecharcode)
 
#define newlinechar   int_par(newlinecharcode)
 
#define language   int_par(languagecode)
 
#define lefthyphenmin   int_par(lefthyphenmincode)
 
#define righthyphenmin   int_par(righthyphenmincode)
 
#define holdinginserts   int_par(holdinginsertscode)
 
#define errorcontextlines   int_par(errorcontextlinescode)
 
#define DIMEN_BASE   (DEL_CODE_BASE + 256)
 [p99#247] [region 6] eqtb[DIMEN_BASE, EQTB_SIZE] holds current equivalents of fullword dimension parameters like the current hsize or amount of hanging indentation. 更多...
 
#define SCALED_BASE   (DIMEN_BASE + dimenpars)
 [#247] [region 6] 256 user-defined \dimen registers. 更多...
 
#define EQTB_SIZE   (SCALED_BASE + 255)
 
#define dimen(x)   eqtb[SCALED_BASE + x].sc
 [p99#247] -> Scaled; Dimen pars 更多...
 
#define dimen_par(x)   eqtb[DIMEN_BASE + x].sc
 [p99#247] -> Scaled; a scaled quantity 更多...
 
#define parindent   dimen_par(parindentcode)
 
#define mathsurround   dimen_par(mathsurroundcode)
 
#define lineskiplimit   dimen_par(lineskiplimitcode)
 
#define hsize   dimen_par(hsizecode)
 
#define vsize   dimen_par(vsizecode)
 
#define maxdepth   dimen_par(maxdepthcode)
 
#define splitmaxdepth   dimen_par(splitmaxdepthcode)
 
#define boxmaxdepth   dimen_par(boxmaxdepthcode)
 
#define hfuzz   dimen_par(hfuzzcode)
 
#define vfuzz   dimen_par(vfuzzcode)
 
#define delimitershortfall   dimen_par(delimitershortfallcode)
 
#define nulldelimiterspace   dimen_par(nulldelimiterspacecode)
 
#define scriptspace   dimen_par(scriptspacecode)
 
#define predisplaysize   dimen_par(predisplaysizecode)
 
#define displaywidth   dimen_par(displaywidthcode)
 
#define displayindent   dimen_par(displayindentcode)
 
#define overfullrule   dimen_par(overfullrulecode)
 
#define hangindent   dimen_par(hangindentcode)
 
#define hoffset   dimen_par(hoffsetcode)
 
#define voffset   dimen_par(voffsetcode)
 
#define emergencystretch   dimen_par(emergencystretchcode)
 

枚举

enum  EqLevel { LEVEL_ZERO = MIN_QUARTER_WORD , LEVEL_ONE }
 [p81#221] level of grouping at which this equivalent was defined. 更多...
 
enum  FrozenControlSeq {
  FROZEN_CONTROL_SEQUENCE = (HASH_BASE + HASH_SIZE) , FROZEN_PROTECTION = FROZEN_CONTROL_SEQUENCE , FROZEN_CR , FROZEN_END_GROUP ,
  FROZEN_RIGHT , FROZEN_FI , FROZEN_END_TEMPLATE , FROZEN_ENDV ,
  FROZEN_RELAX , END_WRITE , FROZEN_DONT_EXPAND , FROZEN_NULL_FONT
}
 [p82#222] [region 2] for control sequences that are perpetually defined (since they are used in error recovery) 更多...
 
enum  SkipRegisters {
  LINE_SKIP_CODE = 0 , BASELINE_SKIP_CODE , PAR_SKIP_CODE , ABOVE_DISPLAY_SKIP_CODE ,
  BELOW_DISPLAY_SKIP_CODE , ABOVE_DISPLAY_SHORT_SKIP_CODE = 5 , BELOW_DISPLAY_SHORT_SKIP_CODE , LEFT_SKIP_CODE ,
  RIGHT_SKIP_CODE , TOP_SKIP_CODE , SPLIT_TOP_SKIP_CODE = 10 , TAB_SKIP_CODE ,
  SPACE_SKIP_CODE , XSPACE_SKIP_CODE , PAR_FILL_SKIP_CODE , THIN_MU_SKIP_CODE = 15 ,
  MED_MU_SKIP_CODE , THICK_MU_SKIP_CODE , GLUE_PARS
}
 [p83#224] [Region 3] of eqtb contains the 256 \skip registers 更多...
 
enum  TokenListLoc {
  PAR_SHAPE_LOC = LOCAL_BASE , OUTPUT_ROUTINE_LOC , EVERY_PAR_LOC , EVERY_MATH_LOC ,
  EVERY_DISPLAY_LOC , EVERY_HBOX_LOC , EVERY_VBOX_LOC , EVERY_JOB_LOC ,
  EVERY_CR_LOC , ERR_HELP_LOC , TOKS_BASE
}
 
enum  DelimiterCodesTable {
  pretolerancecode = 0 , tolerancecode , linepenaltycode , hyphenpenaltycode ,
  exhyphenpenaltycode , clubpenaltycode , widowpenaltycode , displaywidowpenaltycode ,
  brokenpenaltycode , binoppenaltycode , relpenaltycode = 10 , predisplaypenaltycode ,
  postdisplaypenaltycode , interlinepenaltycode , doublehyphendemeritscode , finalhyphendemeritscode ,
  adjdemeritscode , magcode , delimiterfactorcode , loosenesscode ,
  timecode = 20 , daycode , monthcode , yearcode ,
  showboxbreadthcode , showboxdepthcode , hbadnesscode , vbadnesscode ,
  pausingcode , tracingonlinecode , tracingmacroscode = 30 , tracingstatscode ,
  tracingparagraphscode , tracingpagescode , tracingoutputcode , tracinglostcharscode ,
  tracingcommandscode , tracingrestorescode , uchyphcode , outputpenaltycode ,
  maxdeadcyclescode = 40 , hangaftercode , floatingpenaltycode , globaldefscode ,
  curfamcode , ESCAPE_CHARcode , defaulthyphencharcode , defaultskewcharcode ,
  endlinecharcode , newlinecharcode , languagecode = 50 , lefthyphenmincode ,
  righthyphenmincode , holdinginsertscode , errorcontextlinescode , INT_PARS = 55
}
 [#236] [Region 5] of eqtb contains the integer parameters and registers defined here, as well as the del code table. 更多...
 
enum  DimensionRegisters {
  parindentcode = 0 , mathsurroundcode , lineskiplimitcode , hsizecode ,
  vsizecode , maxdepthcode , splitmaxdepthcode , boxmaxdepthcode ,
  hfuzzcode , vfuzzcode , delimitershortfallcode = 10 , nulldelimiterspacecode ,
  scriptspacecode , predisplaysizecode , displaywidthcode , displayindentcode ,
  overfullrulecode , hangindentcode , hoffsetcode , voffsetcode ,
  emergencystretchcode = 20 , dimenpars
}
 [p99#247]: final region [region 6] of eqtb contains the dimension parameters defined here, and the 256 \dimen registers. 更多...
 

函数

void eqtb_init_once ()
 [#222, #228, #232, #240, #250] 更多...
 
void eqtb_init ()
 [#254] 更多...
 
void print_skip_param (Integer code)
 [#225]: 打印 glue 参数的名称 更多...
 
void fix_date_and_time (Integer *p_time, Integer *p_day, Integer *p_month, Integer *p_year)
 [p97#241] establishes the initial values of the date and time. 更多...
 
void begin_diagnostic (void)
 [#245] prepare to do some tracing. 更多...
 
void end_diagnostic (Boolean blankline)
 [#245] restore proper conditions after tracing. 更多...
 
void show_eqtb (HalfWord n)
 #252: 更多...
 

变量

UChar diag_oldsetting
 [ #220~255: THE TABLE OF EQUIVALENTS ] 更多...
 
MemoryWord eqtb [EQTB_SIZE+1]
 #253 更多...
 
QuarterWord xeqlevel [EQTB_SIZE - INT_BASE+1]
 
Boolean use_independence_date = false
 

详细描述

宏定义说明

◆ abovedisplayshortskip

#define abovedisplayshortskip   glue_par(ABOVE_DISPLAY_SHORT_SKIP_CODE)

◆ abovedisplayskip

#define abovedisplayskip   glue_par(ABOVE_DISPLAY_SKIP_CODE)

◆ ACTIVE_BASE

#define ACTIVE_BASE   1

[p82#222] [region 1] eqtb[ACTIVE_BASE, (HASH_BASE - 1)] holds current equivalents of single-character control sequences.

[p82#222] beginning of [region 1], for active character equivalents.

◆ adjdemerits

#define adjdemerits   int_par(adjdemeritscode)

◆ baselineskip

#define baselineskip   glue_par(BASELINE_SKIP_CODE)

◆ belowdisplayshortskip

#define belowdisplayshortskip   glue_par(BELOW_DISPLAY_SHORT_SKIP_CODE)

◆ belowdisplayskip

#define belowdisplayskip   glue_par(BELOW_DISPLAY_SKIP_CODE)

◆ binoppenalty

#define binoppenalty   int_par(binoppenaltycode)

◆ box

#define box (   x)    equiv(BOX_BASE + x)

◆ BOX_BASE

#define BOX_BASE   (TOKS_BASE + 256)

[p87#230] [region 4] table of 256 box registers.

◆ boxmaxdepth

#define boxmaxdepth   dimen_par(boxmaxdepthcode)

◆ brokenpenalty

#define brokenpenalty   int_par(brokenpenaltycode)

◆ cat_code

#define cat_code (   x)    equiv(CAT_CODE_BASE + x)

◆ CAT_CODE_BASE

#define CAT_CODE_BASE   (MATH_FONT_BASE + 48)

[p87#230] [region 4] table of 256 command codes (the “catcodes”).

◆ clubpenalty

#define clubpenalty   int_par(clubpenaltycode)

◆ count

#define count (   x)    eqtb[COUNT_BASE + x].int_

[p92#236] -> Integer;

◆ COUNT_BASE

#define COUNT_BASE   (INT_BASE + INT_PARS)

[p92#236] [region 5] 256 user \count registers.

◆ cur_font

#define cur_font   equiv(CUR_FONT_LOC)

◆ CUR_FONT_LOC

#define CUR_FONT_LOC   (BOX_BASE + 256)

[p87#230] [region 4] internal font number outside math mode.

◆ curfam

#define curfam   int_par(curfamcode)

◆ day

#define day   int_par(daycode)

◆ defaulthyphenchar

#define defaulthyphenchar   int_par(defaulthyphencharcode)

◆ defaultskewchar

#define defaultskewchar   int_par(defaultskewcharcode)

◆ del_code

#define del_code (   x)    eqtb[DEL_CODE_BASE + x].int_

[p92#236] -> Integer;

◆ DEL_CODE_BASE

#define DEL_CODE_BASE   (COUNT_BASE + 256)

[p92#236] [region 5] 256 delimiter code mappings.

◆ delimiterfactor

#define delimiterfactor   int_par(delimiterfactorcode)

◆ delimitershortfall

#define delimitershortfall   dimen_par(delimitershortfallcode)

◆ dimen

#define dimen (   x)    eqtb[SCALED_BASE + x].sc

[p99#247] -> Scaled; Dimen pars

◆ DIMEN_BASE

#define DIMEN_BASE   (DEL_CODE_BASE + 256)

[p99#247] [region 6] eqtb[DIMEN_BASE, EQTB_SIZE] holds current equivalents of fullword dimension parameters like the current hsize or amount of hanging indentation.

[p92#236] [region 6] beginning of region 6.

◆ dimen_par

#define dimen_par (   x)    eqtb[DIMEN_BASE + x].sc

[p99#247] -> Scaled; a scaled quantity

◆ displayindent

#define displayindent   dimen_par(displayindentcode)

◆ displaywidowpenalty

#define displaywidowpenalty   int_par(displaywidowpenaltycode)

◆ displaywidth

#define displaywidth   dimen_par(displaywidthcode)

◆ doublehyphendemerits

#define doublehyphendemerits   int_par(doublehyphendemeritscode)

◆ emergencystretch

#define emergencystretch   dimen_par(emergencystretchcode)

◆ end_line_char

#define end_line_char   int_par(endlinecharcode)

◆ eq_level

#define eq_level (   x)    eq_level_field(eqtb[x])

[p81#221] -> QuarterWord = EqLevel; level of definition.

◆ eq_level_field

#define eq_level_field (   x)    x.hh.UU.U2.b1

[p81#221] MemoryWord -> QuarterWord

◆ eq_type

#define eq_type (   x)    eq_type_field(eqtb[x])

[p81#221] -> QuarterWord = TexCommandCode; command code for equivalent.

◆ eq_type_field

#define eq_type_field (   x)    x.hh.UU.U2.b0

[p81#221] MemoryWord -> QuarterWord

◆ EQTB_SIZE

#define EQTB_SIZE   (SCALED_BASE + 255)

◆ equiv

#define equiv (   x)    equiv_field(eqtb[x])

[p81#221] -> HalfWord; equivalent value.

may be

  • a font number,
  • a pointer into mem,
  • a variety of other things

◆ equiv_field

#define equiv_field (   x)    x.hh.rh

[p81#221] MemoryWord -> QuarterWord

◆ errhelp

#define errhelp   equiv(ERR_HELP_LOC)

◆ errorcontextlines

#define errorcontextlines   int_par(errorcontextlinescode)

◆ ESCAPE_CHAR

#define ESCAPE_CHAR   int_par(ESCAPE_CHARcode)

◆ everycr

#define everycr   equiv(EVERY_CR_LOC)

◆ everydisplay

#define everydisplay   equiv(EVERY_DISPLAY_LOC)

◆ everyhbox

#define everyhbox   equiv(EVERY_HBOX_LOC)

◆ everyjob

#define everyjob   equiv(EVERY_JOB_LOC)

◆ everymath

#define everymath   equiv(EVERY_MATH_LOC)

◆ everypar

#define everypar   equiv(EVERY_PAR_LOC)

◆ everyvbox

#define everyvbox   equiv(EVERY_VBOX_LOC)

◆ exhyphenpenalty

#define exhyphenpenalty   int_par(exhyphenpenaltycode)

◆ fam_fnt

#define fam_fnt (   x)    equiv(MATH_FONT_BASE + x)

◆ finalhyphendemerits

#define finalhyphendemerits   int_par(finalhyphendemeritscode)

◆ floatingpenalty

#define floatingpenalty   int_par(floatingpenaltycode)

◆ FONT_ID_BASE

#define FONT_ID_BASE   (FROZEN_NULL_FONT - FONT_BASE)

[region 2] begins table of 257 permanent font identifiers.

◆ globaldefs

#define globaldefs   int_par(globaldefscode)

◆ GLUE_BASE

#define GLUE_BASE   (UNDEFINED_CONTROL_SEQUENCE + 1)

[p83#224] [region 3] eqtb[HASH_BASE, (GLUE_BASE - 1)] holds current equivalents of glue parameters like the current baselineskip.

[p82#222] beginning of [region 3]; glue parameters

◆ glue_par

#define glue_par (   x)    equiv(GLUE_BASE + x)

[p83#224] mem location of glue specification.

◆ hangafter

#define hangafter   int_par(hangaftercode)

◆ hangindent

#define hangindent   dimen_par(hangindentcode)

◆ HASH_BASE

#define HASH_BASE   (NULL_CS + 1)

[p82#222] [region 2] eqtb[HASH_BASE, (GLUE_BASE - 1)] holds current equivalents of multiletter control sequences.

[p82#222] beginning of [region 2], for the hash table.

◆ hbadness

#define hbadness   int_par(hbadnesscode)

◆ hfuzz

#define hfuzz   dimen_par(hfuzzcode)

◆ hoffset

#define hoffset   dimen_par(hoffsetcode)

◆ holdinginserts

#define holdinginserts   int_par(holdinginsertscode)

◆ hsize

#define hsize   dimen_par(hsizecode)

◆ hyphenpenalty

#define hyphenpenalty   int_par(hyphenpenaltycode)

◆ INT_BASE

#define INT_BASE   (MATH_CODE_BASE + 256)

[p91#236] [region 5] eqtb[INT_BASE, (DIMEN_BASE - 1)] holds current equivalents of fullword integer parameters like the current hyphenation penalty.

[p87#230] [region 5] beginning of [region 5].

◆ int_par

#define int_par (   x)    eqtb[INT_BASE + x].int_

[p92#236] -> Integer; Integer parameters

◆ interlinepenalty

#define interlinepenalty   int_par(interlinepenaltycode)

◆ language

#define language   int_par(languagecode)

◆ lc_code

#define lc_code (   x)    equiv(LC_CODE_BASE + x)

◆ LC_CODE_BASE

#define LC_CODE_BASE   (CAT_CODE_BASE + 256)

[p87#230] [region 4] table of 256 lowercase mappings.

◆ lefthyphenmin

#define lefthyphenmin   int_par(lefthyphenmincode)

◆ leftskip

#define leftskip   glue_par(LEFT_SKIP_CODE)

◆ linepenalty

#define linepenalty   int_par(linepenaltycode)

◆ lineskip

#define lineskip   glue_par(LINE_SKIP_CODE)

◆ lineskiplimit

#define lineskiplimit   dimen_par(lineskiplimitcode)

◆ LOCAL_BASE

#define LOCAL_BASE   (MU_SKIP_BASE + 256)

[p87#230] [region 4] eqtb[GLUE_BASE, (LOCAL_BASE - 1)] holds current equivalents of local halfword quantities like

  • the current box registers,
  • the current “catcodes,”
  • the current font,
  • and a pointer to the current paragraph shape. [p83#224] beginning of [region 4].

◆ looseness

#define looseness   int_par(loosenesscode)

◆ mag

#define mag   int_par(magcode)

◆ math_code

#define math_code (   x)    equiv(MATH_CODE_BASE + x)

Note: |mathcode(c)| is the true math code plus |minhalfword|

◆ MATH_CODE_BASE

#define MATH_CODE_BASE   (SF_CODE_BASE + 256)

[p87#230] [region 4] table of 256 math mode mappings.

◆ MATH_FONT_BASE

#define MATH_FONT_BASE   (CUR_FONT_LOC + 1)

[p87#230] [region 4] table of 48 math font numbers.

◆ mathsurround

#define mathsurround   dimen_par(mathsurroundcode)

◆ maxdeadcycles

#define maxdeadcycles   int_par(maxdeadcyclescode)

◆ maxdepth

#define maxdepth   dimen_par(maxdepthcode)

◆ medmuskip

#define medmuskip   glue_par(MED_MU_SKIP_CODE)

◆ month

#define month   int_par(monthcode)

◆ MU_SKIP_BASE

#define MU_SKIP_BASE   (SKIP_BASE + 256)

[p83#224] [region 3] table of 256 “muskip” registers.

◆ muskip

#define muskip (   x)    equiv(MU_SKIP_BASE + x)

[p83#224] mem location of math glue spec.

◆ newlinechar

#define newlinechar   int_par(newlinecharcode)

◆ NULL_CS

#define NULL_CS   (SINGLE_BASE + 256)

[p82#222] [region 1] equivalent of \csname\endcsname

◆ NULL_FONT

#define NULL_FONT   FONT_BASE

[#232]

◆ nulldelimiterspace

#define nulldelimiterspace   dimen_par(nulldelimiterspacecode)

◆ outputpenalty

#define outputpenalty   int_par(outputpenaltycode)

◆ outputroutine

#define outputroutine   equiv(OUTPUT_ROUTINE_LOC)

◆ overfullrule

#define overfullrule   dimen_par(overfullrulecode)

◆ parfillskip

#define parfillskip   glue_par(PAR_FILL_SKIP_CODE)

◆ parindent

#define parindent   dimen_par(parindentcode)

◆ parshapeptr

#define parshapeptr   equiv(PAR_SHAPE_LOC)

◆ parskip

#define parskip   glue_par(PAR_SKIP_CODE)

◆ pausing

#define pausing   int_par(pausingcode)

◆ postdisplaypenalty

#define postdisplaypenalty   int_par(postdisplaypenaltycode)

◆ predisplaypenalty

#define predisplaypenalty   int_par(predisplaypenaltycode)

◆ predisplaysize

#define predisplaysize   dimen_par(predisplaysizecode)

◆ pretolerance

#define pretolerance   int_par(pretolerancecode)

◆ relpenalty

#define relpenalty   int_par(relpenaltycode)

◆ righthyphenmin

#define righthyphenmin   int_par(righthyphenmincode)

◆ rightskip

#define rightskip   glue_par(RIGHT_SKIP_CODE)

◆ SCALED_BASE

#define SCALED_BASE   (DIMEN_BASE + dimenpars)

[#247] [region 6] 256 user-defined \dimen registers.

◆ scriptspace

#define scriptspace   dimen_par(scriptspacecode)

◆ sf_code

#define sf_code (   x)    equiv(SF_CODE_BASE + x)

◆ SF_CODE_BASE

#define SF_CODE_BASE   (UC_CODE_BASE + 256)

[p87#230] [region 4] table of 256 spacefactor mappings.

◆ showboxbreadth

#define showboxbreadth   int_par(showboxbreadthcode)

◆ showboxdepth

#define showboxdepth   int_par(showboxdepthcode)

◆ SINGLE_BASE

#define SINGLE_BASE   (ACTIVE_BASE + 256)

[p82#222] [region 1] equivalents of one-character control sequences.

◆ skip

#define skip (   x)    equiv(SKIP_BASE + x)

[p83#224] mem location of glue specification.

◆ SKIP_BASE

#define SKIP_BASE   (GLUE_BASE + GLUE_PARS)

[p83#224] [region 3] table of 256 “skip” registers

◆ spaceskip

#define spaceskip   glue_par(SPACE_SKIP_CODE)

◆ splitmaxdepth

#define splitmaxdepth   dimen_par(splitmaxdepthcode)

◆ splittopskip

#define splittopskip   glue_par(SPLIT_TOP_SKIP_CODE)

◆ tabskip

#define tabskip   glue_par(TAB_SKIP_CODE)

◆ tex_time

#define tex_time   int_par(timecode)

◆ thickmuskip

#define thickmuskip   glue_par(THICK_MU_SKIP_CODE)

◆ thinmuskip

#define thinmuskip   glue_par(THIN_MU_SKIP_CODE)

◆ toks

#define toks (   x)    equiv(TOKS_BASE + x)

[p87#230]

◆ tolerance

#define tolerance   int_par(tolerancecode)

◆ topskip

#define topskip   glue_par(TOP_SKIP_CODE)

◆ tracingcommands

#define tracingcommands   int_par(tracingcommandscode)

◆ tracinglostchars

#define tracinglostchars   int_par(tracinglostcharscode)

◆ tracingmacros

#define tracingmacros   int_par(tracingmacroscode)

◆ tracingonline

#define tracingonline   int_par(tracingonlinecode)

◆ tracingoutput

#define tracingoutput   int_par(tracingoutputcode)

◆ tracingpages

#define tracingpages   int_par(tracingpagescode)

◆ tracingparagraphs

#define tracingparagraphs   int_par(tracingparagraphscode)

◆ tracingrestores

#define tracingrestores   int_par(tracingrestorescode)

◆ tracingstats

#define tracingstats   int_par(tracingstatscode)

◆ uc_code

#define uc_code (   x)    equiv(UC_CODE_BASE + x)

◆ UC_CODE_BASE

#define UC_CODE_BASE   (LC_CODE_BASE + 256)

[p87#230] [region 4] table of 256 uppercase mappings.

◆ uchyph

#define uchyph   int_par(uchyphcode)

◆ UNDEFINED_CONTROL_SEQUENCE

#define UNDEFINED_CONTROL_SEQUENCE   (FROZEN_NULL_FONT + 257)

[region 2] dummy location.

◆ VAR_CODE

#define VAR_CODE   28672

[#232] math code meaning “use the current family”

◆ vbadness

#define vbadness   int_par(vbadnesscode)

◆ vfuzz

#define vfuzz   dimen_par(vfuzzcode)

◆ voffset

#define voffset   dimen_par(voffsetcode)

◆ vsize

#define vsize   dimen_par(vsizecode)

◆ widowpenalty

#define widowpenalty   int_par(widowpenaltycode)

◆ xspaceskip

#define xspaceskip   glue_par(XSPACE_SKIP_CODE)

◆ year

#define year   int_par(yearcode)

枚举类型说明

◆ DelimiterCodesTable

[#236] [Region 5] of eqtb contains the integer parameters and registers defined here, as well as the del code table.

枚举值
pretolerancecode 

badness tolerance before hyphenation

tolerancecode 

badness tolerance after hyphenation

linepenaltycode 

added to the badness of every line

hyphenpenaltycode 

penalty for break after discretionary hyphen

exhyphenpenaltycode 

penalty for break after explicit hyphen

clubpenaltycode 

penalty for creating a club line

widowpenaltycode 

penalty for creating a widow line

displaywidowpenaltycode 

ditto, just before a display

brokenpenaltycode 

penalty for breaking a page at a broken line

binoppenaltycode 

penalty for breaking after a binary operation.

relpenaltycode 

penalty for breaking after a relation

predisplaypenaltycode 

penalty for breaking just before a displayed formula

postdisplaypenaltycode 

penalty for breaking just after a displayed formula

interlinepenaltycode 

additional penalty between lines

doublehyphendemeritscode 

demerits for double hyphen break

finalhyphendemeritscode 

demerits for final hyphen break

adjdemeritscode 

demerits for adjacent incompatible lines

magcode 

magnification ratio

delimiterfactorcode 

ratio for variable-size delimiters

loosenesscode 

change in number of lines for a paragraph

timecode 

current time of day

daycode 

current day of the month

monthcode 

current month of the year

yearcode 

current year of our Lord

showboxbreadthcode 

nodes per level in show_box

showboxdepthcode 

maximum level in show_box

hbadnesscode 

hboxes exceeding this badness will be shown by hpack

vbadnesscode 

vboxes exceeding this badness will be shown by vpack

pausingcode 

pause after each line is read from a file

tracingonlinecode 

show diagnostic output on terminal

tracingmacroscode 

show macros as they are being expanded

tracingstatscode 

show memory usage if TeX knows it

tracingparagraphscode 

show line-break calculations

tracingpagescode 

show page-break calculations

tracingoutputcode 

show boxes when they are shipped out

tracinglostcharscode 

show characters that aren’t in the font

tracingcommandscode 

show command codes at big_switch

tracingrestorescode 

show equivalents when they are restored

uchyphcode 

hyphenate words beginning with a capital letter

outputpenaltycode 

penalty found at current page break

maxdeadcyclescode 

bound on consecutive dead cycles of output

hangaftercode 

hanging indentation changes after this many lines

floatingpenaltycode 

penalty for insertions heldover after a split

globaldefscode 

override \global specifications

curfamcode 

current family

ESCAPE_CHARcode 

escape character for token output

defaulthyphencharcode 

value of \hyphenchar when a font is loaded

defaultskewcharcode 

value of \skewchar when a font is loaded

endlinecharcode 

character placed at the right end of the buffer

newlinecharcode 

character that prints as println

languagecode 

current hyphenation table

lefthyphenmincode 

minimum left hyphenation fragment size

righthyphenmincode 

minimum right hyphenation fragment size

holdinginsertscode 

do not remove insertion nodes from \box255

errorcontextlinescode 

maximum intermediate line pairs shown

INT_PARS 

total number of integer parameters

◆ DimensionRegisters

[p99#247]: final region [region 6] of eqtb contains the dimension parameters defined here, and the 256 \dimen registers.

枚举值
parindentcode 

indentation of paragraphs

mathsurroundcode 

space around math in text

lineskiplimitcode 

threshold for line skip instead of baseline skip

hsizecode 

line width in horizontal mode

vsizecode 

page height in vertical mode

maxdepthcode 

maximum depth of boxes on main pages

splitmaxdepthcode 

maximum depth of boxes on split pages

boxmaxdepthcode 

maximum depth of explicit vboxes

hfuzzcode 

tolerance for overfull hbox messages

vfuzzcode 

tolerance for overfull vbox messages.

delimitershortfallcode 

maximum amount uncovered by variable delimiters

nulldelimiterspacecode 

blank space in null delimiters

scriptspacecode 

extra space after subscript or superscript

predisplaysizecode 

length of text preceding a display

displaywidthcode 

length of line for displayed equation

displayindentcode 

indentation of line for displayed equation

overfullrulecode 

width of rule that identifies overfull hboxes

hangindentcode 

amount of hanging indentation

hoffsetcode 

amount of horizontal offset when shipping pages out

voffsetcode 

amount of vertical offset when shipping pages out

emergencystretchcode 

reduces badnesses on final pass of line-breaking

dimenpars 

total number of dimension parameters

◆ EqLevel

enum EqLevel

[p81#221] level of grouping at which this equivalent was defined.

EqLevel enum

  • LEVEL_ZERO: equivalent has never been defined
  • LEVEL_ONE: the outer level (outside of allgroups), and this level is also used for global definitions that never go away.
  • Higher levels: will disappear at the end of their group

See

eq_level, eq_level_field

枚举值
LEVEL_ZERO 

level for undefined quantities.

LEVEL_ONE 

outermost level for defined quantities.

◆ FrozenControlSeq

[p82#222] [region 2] for control sequences that are perpetually defined (since they are used in error recovery)

枚举值
FROZEN_CONTROL_SEQUENCE 

for error recovery.

FROZEN_PROTECTION 

inaccessible but definable.

FROZEN_CR 

permanent ‘\cr’.

FROZEN_END_GROUP 

permanent ‘\endgroup’.

FROZEN_RIGHT 

permanent ‘\right’.

FROZEN_FI 

permanent ‘\fi’.

FROZEN_END_TEMPLATE 

permanent ‘\endtemplate’.

FROZEN_ENDV 

second permanent ‘\endtemplate’.

FROZEN_RELAX 

permanent ‘\relax’.

END_WRITE 

permanent ‘\endwrite’.

FROZEN_DONT_EXPAND 

permanent ‘\notexpanded’.

FROZEN_NULL_FONT 

permanent ‘\nullfont’.

◆ SkipRegisters

[p83#224] [Region 3] of eqtb contains the 256 \skip registers

值得注意的点: muskip 比其他参数大

枚举值
LINE_SKIP_CODE 

interline glue if baseline skip is infeasible

BASELINE_SKIP_CODE 

desired glue between baselines

PAR_SKIP_CODE 

extra glue just above a paragraph

ABOVE_DISPLAY_SKIP_CODE 

extra glue just above displayed math

BELOW_DISPLAY_SKIP_CODE 

extra glue just below displayed math.

ABOVE_DISPLAY_SHORT_SKIP_CODE 

glue [above] displayed math following short lines

BELOW_DISPLAY_SHORT_SKIP_CODE 

glue [below] displayed math following short lines

LEFT_SKIP_CODE 

glue at left of justified lines

RIGHT_SKIP_CODE 

glue at right of justified lines

TOP_SKIP_CODE 

glue at top of main pages

SPLIT_TOP_SKIP_CODE 

glue at top of split pages

TAB_SKIP_CODE 

glue between aligned entries

SPACE_SKIP_CODE 

glue between words (if not zero glue)

XSPACE_SKIP_CODE 

glue after sentences (if not zero glue)

PAR_FILL_SKIP_CODE 

glue on last line of paragraph

THIN_MU_SKIP_CODE 

thin space in math formula

MED_MU_SKIP_CODE 

medium space in math formula

THICK_MU_SKIP_CODE 

thick space in math formula

GLUE_PARS 

total number of glue parameters

◆ TokenListLoc

枚举值
PAR_SHAPE_LOC 

specifies paragraph shape.

OUTPUT_ROUTINE_LOC 

points to token list for \output.

EVERY_PAR_LOC 

points to token list for \everypar.

EVERY_MATH_LOC 

points to token list for \everymath.

EVERY_DISPLAY_LOC 

points to token list for \everydisplay.

EVERY_HBOX_LOC 

points to token list for \everyhbox.

EVERY_VBOX_LOC 

points to token list for \everyvbox.

EVERY_JOB_LOC 

points to token list for \everyjob.

EVERY_CR_LOC 

points to token list for \everycr.

ERR_HELP_LOC 

points to token list for \errhelp.

TOKS_BASE 

table of 256 token list registers.

函数说明

◆ begin_diagnostic()

void begin_diagnostic ( void  )

[#245] prepare to do some tracing.

◆ end_diagnostic()

void end_diagnostic ( Boolean  blankline)

[#245] restore proper conditions after tracing.

◆ eqtb_init()

void eqtb_init ( )

[#254]

◆ eqtb_init_once()

void eqtb_init_once ( )

[#222, #228, #232, #240, #250]

[p82#222]

[p85#228]

[p88#232]

TODO: 为什么忽略了一部分 catcode?

[p97#240]

[p101#250]

◆ fix_date_and_time()

void fix_date_and_time ( Integer p_time,
Integer p_day,
Integer p_month,
Integer p_year 
)

[p97#241] establishes the initial values of the date and time.

参数
[out]p_timeminutes since midnight
[out]p_dayfourth day of the month
[out]p_monthseventh month of the year
[out]p_yearAnno Domini

◆ print_skip_param()

void print_skip_param ( Integer  code)

[#225]: 打印 glue 参数的名称

参数
[in]code
返回
void 无返回值

函数会打印参数对应的字符串。 如果没有对应的字符串,则打印 "[unknown glue parameter!]"

◆ show_eqtb()

void show_eqtb ( HalfWord  n)

#252:

[#223] Show equivalent n, in region 1 or 2.

[#229] Show equivalent n, in region 3.

[#223] Show equivalent n, in region 4.

[#234] Show the font identifier in eqtb[n]

[#242] Show equivalent n, in region 5

[#251] Show equivalent n, in region 6

n > EQTB_SIZE

变量说明

◆ diag_oldsetting

UChar diag_oldsetting

[ #220~255: THE TABLE OF EQUIVALENTS ]

◆ eqtb

#253

◆ use_independence_date

Boolean use_independence_date = false

◆ xeqlevel