lout-3.39/0000700000076400007640000000000011446022453011040 5ustar jeffjefflout-3.39/z06.c0000644000076400007640000013676711442244516011663 0ustar jeffjeff/*@z06.c:Parser:PushObj(), PushToken(), etc.@*********************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z06.c */ /* MODULE: Parser */ /* EXTERNS: InitParser(), Parse() */ /* */ /*****************************************************************************/ #include "externs.h" #define LEFT_ASSOC 0 #define RIGHT_ASSOC 1 #define PREV_OP 0 /* means an operator was previous */ #define PREV_OBJ 1 /* prev was object not ending in RBR */ #define PREV_RBR 2 /* prev was object ending in RBR */ static OBJECT cross_name; /* name of the cr database */ #define MAX_STACK 200 /* size of parser stacks */ static OBJECT obj_stack[MAX_STACK]; /* stack of objects */ static int otop; /* top of obj_stack */ static OBJECT tok_stack[MAX_STACK]; /* stack of tokens */ static int ttop; /* top of tok_stack */ static int unknown_count; /* no. of unknown symbols */ BOOLEAN InDefinitions; /* TRUE when in definitions */ #if DEBUG_ON static BOOLEAN debug_now = FALSE; /* TRUE when want to debug */ #endif /*****************************************************************************/ /* */ /* OBJECT OptimizeCase(x) */ /* */ /* Optimize the @Case expression x, which is known to be of the form */ /* "@BackEnd @Case ...", by evaluating it immediately if its choices */ /* are all literal words or "else". */ /* */ /*****************************************************************************/ static void check_yield(OBJECT y, OBJECT *res_yield, BOOLEAN *all_literals) { OBJECT s1, link, z; Child(s1, Down(y)); debug1(DOP, DD, " checkyield(%s)", EchoObject(y)); if( is_word(type(s1)) ) { if( StringEqual(string(s1), BackEnd->name) || StringEqual(string(s1),STR_ELSE) ) if( *res_yield == nilobj ) *res_yield = y; } else if( type(s1) == ACAT ) { for( link = Down(s1); link != s1; link = NextDown(link) ) { Child(z, link); if( type(z) == GAP_OBJ ) continue; if( is_word(type(z)) ) { if( StringEqual(string(z), BackEnd->name) || StringEqual(string(s1), STR_ELSE)) if( *res_yield == nilobj ) *res_yield = y; } else { *all_literals = FALSE; *res_yield = nilobj; break; } } } else { *all_literals = FALSE; *res_yield = nilobj; } debug2(DOP, DD, " checkyield returning (%s, %s)", EchoObject(*res_yield), bool(*all_literals)); } OBJECT OptimizeCase(OBJECT x) { OBJECT link, s2, y, res_yield, res; BOOLEAN all_literals; debug1(DOP, DD, "OptimizeCase(%s)", EchoObject(x)); assert( type(x) == CASE, "OptimizeCase: type(x) != CASE!" ); Child(s2, LastDown(x)); all_literals = TRUE; res_yield = nilobj; if( type(s2) == YIELD ) { check_yield(s2, &res_yield, &all_literals); } else if( type(s2) == ACAT ) { for( link = Down(s2); link != s2 && all_literals; link = NextDown(link) ) { Child(y, link); debug2(DOP, DD, " OptimizeCase examining %s %s", Image(type(y)), EchoObject(y)); if( type(y) == GAP_OBJ ) continue; if( type(y) == YIELD ) { check_yield(y, &res_yield, &all_literals); } else { all_literals = FALSE; res_yield = nilobj; } } } else { all_literals = FALSE; res_yield = nilobj; } if( all_literals && res_yield != nilobj ) { Child(res, LastDown(res_yield)); DeleteLink(Up(res)); DisposeObject(x); } else { res = x; } debug1(DOP, DD, "OptimizeCase returning %s", EchoObject(res)); return res; } /* end OptimizeCase */ /*****************************************************************************/ /* */ /* HuntCommandOptions(x) */ /* */ /* See if any of the command-line options apply to closure x. If so, */ /* change x to reflect the overriding command line option. */ /* */ /*****************************************************************************/ static void HuntCommandOptions(OBJECT x) { OBJECT colink, coname, coval, opt = nilobj, y = nilobj, link, sym; BOOLEAN found; debug1(DOP, DD, "HuntCommandOptions(%s)", SymName(actual(x))); sym = actual(x); for( colink = Down(CommandOptions); colink != CommandOptions; colink = NextDown(NextDown(colink)) ) { Child(coname, colink); Child(coval, NextDown(colink)); debug2(DOP, DD, " hunting \"%s\" with value \"%s\"", string(coname), EchoObject(coval)); /* set found to TRUE iff coname is the name of an option of x */ found = FALSE; for( link = Down(sym); link != sym; link = NextDown(link) ) { Child(opt, link); if( type(opt) == NPAR && StringEqual(SymName(opt), string(coname)) ) { found = TRUE; debug2(DOP, DD, " %s is an option of %s", string(coname),SymName(sym)); break; } } if( found ) { /* see whether this option is already set within x */ found = FALSE; for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == PAR && actual(y) == opt ) { found = TRUE; debug2(DOP, DD, " %s is set in %s", string(coname), SymName(sym)); break; } } if( found ) { /* option exists already in x: replace it with oval */ DisposeChild(Down(y)); Link(y, coval); debug2(DOP, DD, " replacing %s value with %s; x =", string(coname), EchoObject(coval)); ifdebug(DOP, DD, DebugObject(x)); } else { /* option applies to x but has not yet been set in x */ New(y, PAR); Link(x, y); actual(y) = opt; Link(y, coval); debug2(DOP, DD, " inserting %s with value %s; x =", string(coname), EchoObject(coval)); ifdebug(DOP, DD, DebugObject(x)); } } } debug1(DOP, DD, "HuntCommandOptions(%s) returning", SymName(sym)); } /* end HuntCommandOptions */ /*****************************************************************************/ /* */ /* PushObj(x) */ /* PushToken(t) */ /* OBJECT PopObj() */ /* OBJECT PopToken() */ /* OBJECT TokenTop */ /* OBJECT ObjTop */ /* */ /* Push and pop from the object and token stacks; examine top item. */ /* */ /*****************************************************************************/ #define PushObj(x) \ { zz_hold = x; \ if( ++otop < MAX_STACK ) obj_stack[otop] = zz_hold; \ else Error(6, 1, "expression is too deeply nested", \ FATAL, &fpos(obj_stack[otop-1])); \ } #define PushToken(t) \ { if( ++ttop < MAX_STACK ) tok_stack[ttop] = t; \ else Error(6, 2, "expression is too deeply nested", \ FATAL, &fpos(tok_stack[ttop-1])); \ } #define PopObj() obj_stack[otop--] #define PopToken() tok_stack[ttop--] #define TokenTop tok_stack[ttop] #define ObjTop obj_stack[otop] /*@::DebugStacks(), InsertSpace()@********************************************/ /* */ /* DebugStacks() */ /* */ /* Print debug output of the stacks state */ /* */ /*****************************************************************************/ #if DEBUG_ON static void DebugStacks(int initial_ttop, int obj_prev) { int i; debug3(ANY, D, " obj_prev: %s; otop: %d; ttop: %d", obj_prev == PREV_OP ? "PREV_OP" : obj_prev == PREV_OBJ ? "PREV_OBJ" : obj_prev == PREV_RBR ? "PREV_RBR" : "???", otop, ttop); for( i = 0; i <= otop; i++ ) debug3(ANY, D, " obj[%d] = (%s) %s", i, Image(type(obj_stack[i])), EchoObject(obj_stack[i])); for( i = 0; i <= ttop; i++ ) { if( i == initial_ttop+1 ) debug0(DOP, DD, " $"); debug3(ANY, D, " tok[%d] = %s (precedence %d)", i, type(tok_stack[i]) == CLOSURE ? SymName(actual(tok_stack[i])) : Image(type(tok_stack[i])), precedence(tok_stack[i])); } } /* end DebugStacks */ #endif /*****************************************************************************/ /* */ /* InsertSpace(t) */ /* */ /* Add any missing catenation operator in front of token t. */ /* */ /*****************************************************************************/ #define InsertSpace(t) \ if( obj_prev ) \ { int typ, prec; \ if( hspace(t) + vspace(t) > 0 ) \ typ = TSPACE, prec = ACAT_PREC; \ else if( type(t) == LBR || obj_prev == PREV_RBR ) \ typ = TJUXTA, prec = ACAT_PREC; \ else \ typ = TJUXTA, prec = JUXTA_PREC; \ debugcond1(DOP, DD, debug_now, "[ InsertSpace(%s)", Image(typ)); \ while( obj_prev && precedence(TokenTop) >= prec ) \ obj_prev = Reduce(); \ if( obj_prev ) \ { New(tmp, typ); precedence(tmp) = prec; \ vspace(tmp) = vspace(t); hspace(tmp) = hspace(t); \ width(gap(tmp)) = 0; nobreak(gap(tmp)) = TRUE; \ mark(gap(tmp)) = FALSE; join(gap(tmp)) = TRUE; \ units(gap(tmp)) = FIXED_UNIT; mode(gap(tmp)) = EDGE_MODE; \ FposCopy(fpos(tmp), fpos(t)); \ PushToken(tmp); \ } \ debugcond0(DOP, DD, debug_now, "] end InsertSpace()"); \ } /* end InsertSpace */ /*@::Shift(), ShiftObj()@*****************************************************/ /* */ /* static Shift(t, prec, rassoc, leftpar, rightpar) */ /* static ShiftObj(t) */ /* */ /* Shift token or object t onto the stacks; it has the attributes shown. */ /* */ /*****************************************************************************/ #define Shift(t, prec, rassoc, leftpar, rightpar) \ { debugcond5(DOP, DD, debug_now, "[ Shift(%s, %d, %s, %s, %s)", \ Image(type(t)), prec, rassoc ? "rightassoc" : "leftassoc", \ leftpar ? "lpar" : "nolpar", rightpar ? "rpar" : "norpar"); \ if( leftpar ) \ { for(;;) \ { if( !obj_prev ) \ { PushObj( MakeWord(WORD, STR_EMPTY, &fpos(t)) ); \ obj_prev = PREV_OBJ; \ } \ else if( precedence(TokenTop) >= prec + rassoc ) \ { obj_prev = Reduce(); \ if( ttop == initial_ttop ) \ { *token = t; \ debugcond0(DOP, DD, debug_now, \ "] ] end Shift() and Parse(); stacks are:"); \ ifdebugcond(DOP, DD, debug_now, \ DebugStacks(initial_ttop, obj_prev)); \ return PopObj(); \ } \ } \ else break; \ } \ } \ else InsertSpace(t); \ PushToken(t); \ if( rightpar ) obj_prev = FALSE; \ else \ { obj_prev = Reduce(); \ if( ttop == initial_ttop ) \ { *token = nilobj; \ debugcond0(DOP, DD, debug_now, \ "] ] end Shift and Parse; stacks are:"); \ ifdebugcond(DOP, DD, debug_now, \ DebugStacks(initial_ttop, obj_prev)); \ return PopObj(); \ } \ } \ debugcond0(DOP, DD, debug_now, "] end Shift()"); \ } /* end Shift */ #define ShiftObj(t, new_obj_prev) \ { debugcond1(DOP, DD, debug_now, "[ ShiftObj(%s)", Image(type(t))); \ InsertSpace(t); \ PushObj(t); \ obj_prev = new_obj_prev; \ debugcond0(DOP, DD, debug_now, "] end ShiftObj()"); \ } /*@::Reduce()@****************************************************************/ /* */ /* static Reduce() */ /* */ /* Perform a single reduction of the stacks. */ /* */ /*****************************************************************************/ static BOOLEAN Reduce(void) { OBJECT p1, p2, p3, s1, s2, tmp; OBJECT op; int obj_prev; debugcond0(DOP, DD, debug_now, "[ Reduce()"); /* ifdebugcond(DOP, DD, debug_now, DebugStacks(0, TRUE)); */ op = PopToken(); obj_prev = PREV_OBJ; switch( type(op) ) { case GSTUB_INT: case GSTUB_EXT: debug0(DGT, D, "calling TransferEnd( PopObj() ) from Reduce()"); TransferEnd( PopObj() ); New(p1, NULL_CLOS); PushObj(p1); Dispose(op); break; case GSTUB_NONE: New(p1, NULL_CLOS); PushObj(p1); Dispose(op); break; case NULL_CLOS: case PAGE_LABEL: case BEGIN_HEADER: case END_HEADER: case SET_HEADER: case CLEAR_HEADER: case ONE_COL: case ONE_ROW: case WIDE: case HIGH: case HSHIFT: case VSHIFT: case HMIRROR: case VMIRROR: case HSCALE: case VSCALE: case HCOVER: case VCOVER: case SCALE: case KERN_SHRINK: case HCONTRACT: case VCONTRACT: case HLIMITED: case VLIMITED: case HEXPAND: case VEXPAND: case START_HVSPAN: case START_HSPAN: case START_VSPAN: case HSPAN: case VSPAN: case PADJUST: case HADJUST: case VADJUST: case ROTATE: case BACKGROUND: case YIELD: case BACKEND: case XCHAR: case FONT: case SPACE: case YUNIT: case ZUNIT: case SET_CONTEXT: case GET_CONTEXT: case BREAK: case UNDERLINE: case UNDERLINE_COLOUR: case COLOUR: case TEXTURE: case OUTLINE: case LANGUAGE: case CURR_LANG: case CURR_FAMILY: case CURR_FACE: case CURR_YUNIT: case CURR_ZUNIT: case COMMON: case RUMP: case MELD: case INSERT: case ONE_OF: case NEXT: case PLUS: case MINUS: case TAGGED: case INCGRAPHIC: case SINCGRAPHIC: case PLAIN_GRAPHIC: case GRAPHIC: case LINK_SOURCE: case LINK_DEST: case LINK_URL: case OPEN: case RAW_VERBATIM: case VERBATIM: if( has_rpar(actual(op)) ) { s2 = PopObj(); Link(op, s2); } if( has_lpar(actual(op)) ) { s1 = PopObj(); Link(Down(op), s1); } PushObj(op); break; case CASE: if( has_rpar(actual(op)) ) { s2 = PopObj(); Link(op, s2); } if( has_lpar(actual(op)) ) { s1 = PopObj(); Link(Down(op), s1); if( type(s1) == BACKEND ) { op = OptimizeCase(op); } } PushObj(op); break; case CROSS: case FORCE_CROSS: s2 = PopObj(); Link(op, s2); s1 = PopObj(); Link(Down(op), s1); if( type(s1) != CLOSURE ) Error(6, 3, "left parameter of %s is not a symbol (or not visible)", WARN, &fpos(s1), Image(type(op))); PushObj(op); break; case CLOSURE: if( has_rpar(actual(op)) ) { New(s2, PAR); tmp = PopObj(); Link(s2, tmp); FposCopy(fpos(s2), fpos(tmp)); actual(s2) = ChildSym(actual(op), RPAR); Link(op, s2); } if( has_lpar(actual(op)) ) { New(s1, PAR); tmp = PopObj(); Link(s1, tmp); FposCopy(fpos(s1), fpos(tmp)); actual(s1) = ChildSym(actual(op), LPAR); Link(Down(op), s1); } PushObj(op); break; case LBR: Error(6, 4, "unmatched %s (inserted %s)", WARN, &fpos(op), KW_LBR, KW_RBR); Dispose(op); obj_prev = PREV_RBR; break; case BEGIN: assert1(FALSE, "Reduce: unmatched", KW_BEGIN); break; case RBR: if( type(TokenTop) == LBR ) { /* *** FposCopy(fpos(ObjTop), fpos(TokenTop)); *** */ Dispose( PopToken() ); } else if( type(TokenTop) == BEGIN ) { if( file_num(fpos(TokenTop)) > 0 ) Error(6, 5, "unmatched %s; inserted %s at%s (after %s)", WARN, &fpos(op), KW_RBR, KW_LBR, EchoFilePos(&fpos(TokenTop)), KW_BEGIN); else Error(6, 6, "unmatched %s not enclosed in anything", FATAL, &fpos(op), KW_RBR); } else { assert1(FALSE, "Reduce: unmatched", KW_RBR); } Dispose(op); obj_prev = PREV_RBR; break; case END: if( type(TokenTop) != BEGIN ) { assert1(FALSE, "Reduce: unmatched", KW_END); } else { if( actual(op) != actual(TokenTop) ) { if( actual(op) == StartSym ) Error(6, 7, "%s %s appended at end of file to match %s at%s", WARN, &fpos(op), KW_END, SymName(actual(TokenTop)), KW_BEGIN, EchoFilePos(&fpos(TokenTop)) ); else if( actual(op) == nilobj ) Error(6, 8, "%s replaced by %s %s to match %s at%s", WARN, &fpos(op), KW_END, KW_END, actual(TokenTop) == nilobj ? AsciiToFull("??") : SymName(actual(TokenTop)), KW_BEGIN, EchoFilePos(&fpos(TokenTop)) ); else Error(6, 9, "%s %s replaced by %s %s to match %s at%s", WARN, &fpos(op), KW_END, SymName(actual(op)), KW_END, SymName(actual(TokenTop)), KW_BEGIN, EchoFilePos(&fpos(TokenTop)) ); } Dispose( PopToken() ); } Dispose(op); obj_prev = PREV_RBR; break; case GAP_OBJ: p1 = PopObj(); Link(op, p1); PushObj(op); obj_prev = PREV_OP; break; case VCAT: case HCAT: case ACAT: p3 = PopObj(); p2 = PopObj(); p1 = PopObj(); if( type(p1) == type(op) ) { Dispose(op); } else { Link(op, p1); p1 = op; } Link(p1, p2); Link(p1, p3); PushObj(p1); break; case TSPACE: case TJUXTA: p2 = PopObj(); p1 = PopObj(); if( type(p1) != ACAT ) { New(tmp, ACAT); Link(tmp, p1); FposCopy(fpos(tmp), fpos(p1)); p1 = tmp; } type(op) = GAP_OBJ; Link(p1, op); Link(p1, p2); PushObj(p1); break; default: assert1(FALSE, "Reduce:", Image(type(op))); break; } /* end switch */ debugcond1(DOP, DD, debug_now, "] end Reduce(), returning %s", obj_prev == PREV_OP ? "PREV_OP" : obj_prev == PREV_OBJ ? "PREV_OBJ" : obj_prev == PREV_RBR ? "PREV_RBR" : "???"); return obj_prev; } /* end Reduce */ /*@::SetScope(), InitParser()@************************************************/ /* */ /* SetScope(env, count, vis_only) */ /* */ /* Push scopes required to parse object whose environment is env. */ /* Add to *count the number of scope pushes made. */ /* */ /* If vis_only is true, we only want visible things of the top-level */ /* element of env to be visible in this scope. */ /* */ /*****************************************************************************/ void SetScope(OBJECT env, int *count, BOOLEAN vis_only) { OBJECT link, y, yenv; BOOLEAN visible_only; debugcond2(DOP,DD, debug_now, "[ SetScope(%s, %d)", EchoObject(env), *count); assert( env != nilobj && type(env) == ENV, "SetScope: type(env) != ENV!" ); if( Down(env) != env ) { Child(y, Down(env)); assert( LastDown(y) != y, "SetScope: LastDown(y)!" ); link = LastDown(env) != Down(env) ? LastDown(env) : LastDown(y); Child(yenv, link); assert( type(yenv) == ENV, "SetScope: type(yenv) != ENV!" ); SetScope(yenv, count, FALSE); visible_only = vis_only || (use_invocation(actual(y)) != nilobj); /* i.e. from @Use clause */ PushScope(actual(y), FALSE, visible_only); (*count)++; /*** this following was a bright idea that did not work owing to allowing body parameters at times they definitely shouldn't be BodyParAllowed(); ***/ } debugcond1(DOP, DD, debug_now, "] SetScope returning, count = %d", *count); } /* end SetScope */ /*****************************************************************************/ /* */ /* InitParser() */ /* */ /* Initialise the parser to contain just GstubExt. */ /* Remember cross_db, the name of the cross reference database, for Parse. */ /* */ /*****************************************************************************/ void InitParser(FULL_CHAR *cross_db) { otop = -1; ttop = -1; unknown_count = 0; InDefinitions = TRUE; debug0(DOP, D, "InitParser setting InDefinitions to TRUE"); #if DEBUG_ON debug_now = FALSE; #endif if( StringLength(cross_db) >= MAX_WORD ) Error(6, 10, "cross reference database file name %s is too long", FATAL, no_fpos, cross_db); cross_name = MakeWord(WORD, cross_db, no_fpos); PushToken( NewToken(GSTUB_EXT, no_fpos, 0, 0, DEFAULT_PREC, StartSym) ); } /* end InitParser */ /*@::ParseEnvClosure()@*******************************************************/ /* */ /* static OBJECT ParseEnvClosure(t, encl) */ /* */ /* Parse an object which is a closure with environment. Consume the */ /* concluding @LClos. */ /* */ /*****************************************************************************/ static OBJECT ParseEnvClosure(OBJECT t, OBJECT encl) { OBJECT env, res, y; int count, i; debugcond0(DOP, DDD, debug_now, "ParseEnvClosure(t, encl)"); assert( type(t) == ENV, "ParseEnvClosure: type(t) != ENV!" ); env = t; t = LexGetToken(); while( type(t) != CLOS ) switch( type(t) ) { case LBR: count = 0; SetScope(env, &count, FALSE); y = Parse(&t, encl, FALSE, FALSE); if( type(y) != CLOSURE ) { debug1(DIO, D, " Parse() returning %s:", Image(type(y))); ifdebug(DIO, D, DebugObject(y)); Error(6, 11, "syntax error in cross reference database", FATAL, &fpos(y)); } for( i = 1; i <= count; i++ ) PopScope(); AttachEnv(env, y); debug0(DCR, DDD, " calling SetEnv from ParseEnvClosure (a)"); env = SetEnv(y, nilobj); t = LexGetToken(); break; case ENV: y = ParseEnvClosure(t, encl); debug0(DCR, DDD, " calling SetEnv from ParseEnvClosure (b)"); env = SetEnv(y, env); t = LexGetToken(); break; default: Error(6, 12, "error in cross reference database", FATAL, &fpos(t)); break; } Dispose(t); if( Down(env) == env || Down(env) != LastDown(env) ) Error(6, 13, "error in cross reference database", FATAL, &fpos(env)); Child(res, Down(env)); DeleteNode(env); debugcond1(DOP, DDD, debug_now, "ParseEnvClosure ret. %s", EchoObject(res)); assert( type(res) == CLOSURE, "ParseEnvClosure: type(res) != CLOSURE!" ); return res; } /* end ParseEnvClosure */ /*@::Parse()@*****************************************************************/ /* */ /* OBJECT Parse(token, encl, defs_allowed, transfer_allowed) */ /* */ /* Parse input tokens, beginning with *token, looking for an object of the */ /* form { ... } or @Begin ... @End , and return the object. */ /* The parent definition is encl, and scope has been set appropriately. */ /* Parse reads up to and including the last token of the object */ /* (the right brace or ), and returns nilobj in *token. */ /* */ /* If defs_allowed == TRUE, there may be local definitions in the object. */ /* In this case, encl is guaranteed to be the enclosing definition. */ /* */ /* If transfer_allowed == TRUE, the parser may transfer components to the */ /* galley handler as they are read. */ /* */ /* Note: the lexical analyser returns "@End \Input" at end of input, so the */ /* parser does not have to handle end of input separately. */ /* */ /*****************************************************************************/ OBJECT Parse(OBJECT *token, OBJECT encl, BOOLEAN defs_allowed, BOOLEAN transfer_allowed) { OBJECT t, x, tmp, xsym, env, y, link, res, imps, xlink; int i, offset, lnum, initial_ttop = ttop; int obj_prev, scope_count, compulsory_count; BOOLEAN revealed; debugcond4(DOP, DD, debug_now, "[ Parse(%s, %s, %s, %s)", EchoToken(*token), SymName(encl), bool(defs_allowed), bool(transfer_allowed)); assert( type(*token) == LBR || type(*token) == BEGIN, "Parse: *token!" ); obj_prev = PREV_OP; Shift(*token, precedence(*token), 0, FALSE, TRUE); t = LexGetToken(); if( defs_allowed ) { ReadDefinitions(&t, encl, LOCAL); /* if error in definitions, stop now */ if( ErrorSeen() ) Error(6, 14, "exiting now (error in definitions)", FATAL, &fpos(t)); if( encl == StartSym ) { /* read @Use, @Database, and @Prepend commands and defs and construct env */ New(env, ENV); for(;;) { if( type(t) == WORD && ( StringEqual(string(t), KW_DEF) || /* StringEqual(string(t), KW_FONTDEF) || */ StringEqual(string(t), KW_LANGDEF) || StringEqual(string(t), KW_MACRO) || StringEqual(string(t), KW_IMPORT) || StringEqual(string(t), KW_EXTEND) || StringEqual(string(t), KW_EXPORT) ) ) { ReadDefinitions(&t, encl, LOCAL); /* if error in definitions, stop now */ if( ErrorSeen() ) Error(6, 39, "exiting now (error in definitions)", FATAL, &fpos(t)); } else if( type(t) == USE ) { OBJECT crs, res_env; STYLE style; Dispose(t); t = LexGetToken(); if( type(t) != LBR ) Error(6, 15, "%s expected after %s", FATAL, &fpos(t),KW_LBR,KW_USE); debug0(DOP, DD, " Parse() calling Parse for @Use clause"); y = Parse(&t, encl, FALSE, FALSE); if( is_cross(type(y)) ) { OBJECT z; Child(z, Down(y)); if( type(z) == CLOSURE ) { crs = nilobj; y = CrossExpand(y, env, &style, &crs, &res_env); if( crs != nilobj ) { Error(6, 16, "%s or %s tag not allowed here", FATAL, &fpos(y), KW_PRECEDING, KW_FOLLOWING); } HuntCommandOptions(y); AttachEnv(res_env, y); debug0(DCR, DDD, " calling SetEnv from Parse (a)"); env = SetEnv(y, env); } else Error(6, 17, "invalid parameter of %s", FATAL, &fpos(y), KW_USE); } else if( type(y) == CLOSURE ) { if( use_invocation(actual(y)) != nilobj ) Error(6, 18, "symbol %s occurs in two %s clauses", FATAL, &fpos(y), SymName(actual(y)), KW_USE); use_invocation(actual(y)) = y; HuntCommandOptions(y); AttachEnv(env, y); debug0(DCR, DDD, " calling SetEnv from Parse (b)"); env = SetEnv(y, nilobj); } else Error(6, 19, "invalid parameter of %s", FATAL, &fpos(y), KW_USE); PushScope(actual(y), FALSE, TRUE); t = LexGetToken(); } else if( type(t) == PREPEND || type(t) == SYS_PREPEND ) { ReadPrependDef(type(t), encl); Dispose(t); t = LexGetToken(); } else if( type(t) == INCG_REPEATED || type(t) == SINCG_REPEATED ) { ReadIncGRepeatedDef(type(t), encl); Dispose(t); t = LexGetToken(); } else if( type(t) == DATABASE || type(t) == SYS_DATABASE ) { ReadDatabaseDef(type(t), encl); Dispose(t); t = LexGetToken(); } else break; } /* transition point from defs to content; turn on debugging now */ #if DEBUG_ON debug_now = TRUE; #endif InDefinitions = FALSE; debug0(DOP, D, "Parse() setting InDefinitions to FALSE"); debugcond4(DOP, DD, debug_now, "[ Parse (first) (%s, %s, %s, %s)", EchoToken(*token), SymName(encl), bool(defs_allowed), bool(transfer_allowed)); /* load cross-references from previous run, open new cross refs */ if( AllowCrossDb ) { NewCrossDb = DbCreate(MakeWord(WORD, string(cross_name), no_fpos)); OldCrossDb = DbLoad(cross_name, SOURCE_PATH, FALSE, nilobj, InMemoryDbIndexes); } else OldCrossDb = NewCrossDb = nilobj; /* tidy up and possibly print symbol table */ FlattenUses(); ifdebug(DST, DD, DebugObject(StartSym)); TransferInit(env); debug0(DMA, D, "at end of definitions:"); ifdebug(DMA, D, DebugMemory()); } } for(;;) { debugcond0(DOP, DD, debug_now, ""); ifdebugcond(DOP, DD, debug_now, DebugStacks(0, obj_prev)); debugcond0(DOP, DD, debug_now, ""); debugcond2(DOP, DD, debug_now, ">> %s (precedence %d)", EchoToken(t), precedence(t)); switch( type(t) ) { case WORD: if( string(t)[0] == CH_SYMSTART && (obj_prev != PREV_OBJ || vspace(t) + hspace(t) > 0) ) { Error(6, 20, "symbol %s unknown or misspelt", WARN, &fpos(t), string(t)); if( ++unknown_count > 25 ) { Error(6, 21, "too many errors (%s lines missing or out of order?)", FATAL, &fpos(t), KW_SYSINCLUDE); } } ShiftObj(t, PREV_OBJ); t = LexGetToken(); break; case QWORD: ShiftObj(t, PREV_OBJ); t = LexGetToken(); break; case VCAT: case HCAT: case ACAT: /* clean up left context */ Shift(t, precedence(t), LEFT_ASSOC, TRUE, TRUE); /* invoke transfer subroutines if appropriate */ /* *** if( type(t) == VCAT && !has_join(actual(t)) *** */ if( transfer_allowed && type(t) == VCAT && !has_join(actual(t)) && type(tok_stack[ttop-2]) == GSTUB_EXT ) { debug0(DGT, DD, " calling TransferComponent from Parse:"); ifdebug(DGT, DD, DebugStacks(0, obj_prev)); TransferComponent( PopObj() ); New(tmp, NULL_CLOS); FposCopy( fpos(tmp), fpos(t) ); PushObj(tmp); } /* push GAP_OBJ token, to cope with 3 parameters */ New(x, GAP_OBJ); mark(gap(x)) = has_mark(actual(t)); join(gap(x)) = has_join(actual(t)); hspace(x) = hspace(t); vspace(x) = vspace(t); precedence(x) = GAP_PREC; FposCopy( fpos(x), fpos(t) ); Shift(x, GAP_PREC, LEFT_ASSOC, FALSE, TRUE); /* if op is followed by space, insert {} */ t = LexGetToken(); if( hspace(t) + vspace(t) > 0 ) { ShiftObj(MakeWord(WORD, STR_EMPTY, &fpos(x)), PREV_OBJ); } break; case CROSS: case FORCE_CROSS: case NULL_CLOS: case PAGE_LABEL: case BEGIN_HEADER: case END_HEADER: case SET_HEADER: case CLEAR_HEADER: case ONE_COL: case ONE_ROW: case WIDE: case HIGH: case HSHIFT: case VSHIFT: case HMIRROR: case VMIRROR: case HSCALE: case VSCALE: case HCOVER: case VCOVER: case SCALE: case KERN_SHRINK: case HCONTRACT: case VCONTRACT: case HLIMITED: case VLIMITED: case HEXPAND: case VEXPAND: case START_HVSPAN: case START_HSPAN: case START_VSPAN: case HSPAN: case VSPAN: case PADJUST: case HADJUST: case VADJUST: case ROTATE: case BACKGROUND: case CASE: case YIELD: case BACKEND: case XCHAR: case FONT: case SPACE: case YUNIT: case ZUNIT: case SET_CONTEXT: case GET_CONTEXT: case BREAK: case UNDERLINE: case UNDERLINE_COLOUR: case COLOUR: case TEXTURE: case OUTLINE: case LANGUAGE: case CURR_LANG: case CURR_FAMILY: case CURR_FACE: case CURR_YUNIT: case CURR_ZUNIT: case COMMON: case RUMP: case MELD: case INSERT: case ONE_OF: case NEXT: case TAGGED: case INCGRAPHIC: case SINCGRAPHIC: case PLAIN_GRAPHIC: case GRAPHIC: case LINK_SOURCE: case LINK_DEST: case LINK_URL: /* clean up left context of t (these ops are all right associative) */ Shift(t, precedence(t), RIGHT_ASSOC, has_lpar(actual(t)), has_rpar(actual(t))); t = LexGetToken(); break; case VERBATIM: case RAW_VERBATIM: /* clean up left context of t */ x = t; Shift(t, precedence(t), RIGHT_ASSOC, has_lpar(actual(t)), has_rpar(actual(t))); /* check for opening brace or begin following, and shift it onto the stacks */ t = LexGetToken(); if( type(t) != BEGIN && type(t) != LBR ) Error(6, 40, "right parameter of %s or %s must be enclosed in braces", FATAL, &fpos(x), KW_VERBATIM, KW_RAWVERBATIM); actual(t) = type(x) == VERBATIM ? VerbatimSym : RawVerbatimSym; Shift(t, LBR_PREC, 0, FALSE, TRUE); /* read right parameter and add it to the stacks, and reduce */ y = LexScanVerbatim( (FILE *) NULL, type(t) == BEGIN, &fpos(t), type(x) == RAW_VERBATIM); ShiftObj(y, PREV_OBJ); /* carry on, hopefully to the corresponding right brace or @End @Verbatim */ t = LexGetToken(); break; case PLUS: case MINUS: /* clean up left context of t (these ops are all left associative) */ Shift(t, precedence(t), LEFT_ASSOC, has_lpar(actual(t)), has_rpar(actual(t))); t = LexGetToken(); break; case UNEXPECTED_EOF: Error(6, 22, "unexpected end of input", FATAL, &fpos(t)); break; case BEGIN: if( actual(t) == nilobj ) { Error(6, 23, "%s replaced by %s", WARN, &fpos(t), KW_BEGIN, KW_LBR); type(t) = LBR; } /* NB NO BREAK! */ case LBR: Shift(t, LBR_PREC, 0, FALSE, TRUE); t = LexGetToken(); break; case END: if( actual(t) == nilobj ) /* haven't sought following symbol yet */ { x = LexGetToken(); if( type(x) == CLOSURE ) { actual(t) = actual(x); Dispose(x); x = nilobj; } else if( type(x) == VERBATIM ) { actual(t) = VerbatimSym; Dispose(x); x = nilobj; } else if( type(x) == RAW_VERBATIM ) { actual(t) = RawVerbatimSym; Dispose(x); x = nilobj; } else if( type(x) == WORD && string(x)[0] == CH_SYMSTART ) { Error(6, 24, "unknown or misspelt symbol %s after %s deleted", WARN, &fpos(x), string(x), KW_END); actual(t) = nilobj; Dispose(x); x = nilobj; } else { Error(6, 25, "symbol expected after %s", WARN, &fpos(x), KW_END); actual(t) = nilobj; } } else x = nilobj; Shift(t, precedence(t), 0, TRUE, FALSE); t = (x != nilobj) ? x : LexGetToken(); break; case RBR: Shift(t, precedence(t), 0, TRUE, FALSE); t = LexGetToken(); break; case USE: case NOT_REVEALED: case PREPEND: case SYS_PREPEND: case INCG_REPEATED: case SINCG_REPEATED: case DATABASE: case SYS_DATABASE: Error(6, 26, "%s symbol out of place", INTERN, &fpos(t), SymName(actual(t))); break; case ENV: /* only occurs in cross reference databases */ res = ParseEnvClosure(t, encl); ShiftObj(res, PREV_OBJ); t = LexGetToken(); break; case ENVA: /* only occurs in cross reference databases */ offset = LexNextTokenPos() -StringLength(KW_ENVA)-StringLength(KW_LBR)-1; Dispose(t); t = LexGetToken(); tmp = Parse(&t, encl, FALSE, FALSE); env = SetEnv(tmp, nilobj); ShiftObj(env, PREV_OBJ); t = LexGetToken(); EnvReadInsert(file_num(fpos(t)), offset, env); break; case ENVB: /* only occurs in cross reference databases */ offset = LexNextTokenPos() -StringLength(KW_ENVB)-StringLength(KW_LBR)-1; Dispose(t); t = LexGetToken(); env = Parse(&t, encl, FALSE, FALSE); t = LexGetToken(); res = Parse(&t, encl, FALSE, FALSE); env = SetEnv(res, env); ShiftObj(env, PREV_OBJ); t = LexGetToken(); EnvReadInsert(file_num(fpos(t)), offset, env); break; case ENVC: /* only occurs in cross reference databases */ Dispose(t); t = LexGetToken(); New(res, ENV); ShiftObj(res, PREV_OBJ); break; case ENVD: /* only occurs in cross reference databases */ Dispose(t); t = LexGetToken(); if( type(t) != QWORD || sscanf((char *) string(t), "%d %d", &offset, &lnum) != 2 ) Error(6, 37, "error in cross reference database", FATAL, &fpos(t)); if( !EnvReadRetrieve(file_num(fpos(t)), offset, &env) ) { LexPush(file_num(fpos(t)), offset, DATABASE_FILE, lnum, TRUE); Dispose(t); t = LexGetToken(); env = Parse(&t, encl, FALSE, FALSE); LexPop(); } else { Dispose(t); } ShiftObj(env, PREV_OBJ); t = LexGetToken(); break; case CENV: /* only occurs in cross reference databases */ Dispose(t); t = LexGetToken(); env = Parse(&t, encl, FALSE, FALSE); scope_count = 0; SetScope(env, &scope_count, FALSE); t = LexGetToken(); res = Parse(&t, encl, FALSE, FALSE); for( i = 0; i < scope_count; i++ ) PopScope(); AttachEnv(env, res); ShiftObj(res, PREV_OBJ); t = LexGetToken(); break; case LUSE: /* only occurs in cross-reference databases */ /* copy invocation from use_invocation(xsym), don't read it */ Dispose(t); t = LexGetToken(); if( type(t) != CLOSURE ) Error(6, 27, "symbol expected following %s", FATAL,&fpos(t),KW_LUSE); xsym = actual(t); if( use_invocation(xsym) == nilobj ) Error(6, 28, "%s clause(s) changed from previous run", FATAL, &fpos(t), KW_USE); x = CopyObject(use_invocation(xsym), no_fpos); for( link = LastDown(x); link != x; link = PrevDown(link) ) { Child(y, link); if( type(y) == ENV ) { DeleteLink(link); break; } } ShiftObj(x, PREV_OBJ); t = LexGetToken(); break; case LVIS: /* only occurs in cross-reference databases */ SuppressVisible(); Dispose(t); t = LexGetToken(); UnSuppressVisible(); if( type(t) != CLOSURE ) Error(6, 29, "symbol expected following %s", FATAL,&fpos(t),KW_LVIS); /* NB NO BREAK! */ case CLOSURE: x = t; xsym = actual(x); /* look ahead one token, which could be an NPAR */ /* or could be @NotRevealed */ PushScope(xsym, TRUE, FALSE); t = LexGetToken(); if( type(t) == NOT_REVEALED ) { Dispose(t); t = LexGetToken(); revealed = FALSE; } else revealed = TRUE; PopScope(); /* if x starts a cross-reference, make it a CLOSURE */ if( is_cross(type(t)) ) { ShiftObj(x, PREV_OBJ); break; } /* clean up left context of x */ Shift(x,precedence(x),right_assoc(xsym),has_lpar(xsym),has_rpar(xsym)); /* update uses relation if required */ if( encl != StartSym && encl != nilobj ) { if( has_target(xsym) ) { uses_galley(encl) = TRUE; dirty(encl) = (dirty(encl) || dirty(xsym)); } else if( revealed ) InsertUses(encl, xsym); } /* read named parameters */ compulsory_count = 0; while( (type(t) == CLOSURE && enclosing(actual(t)) == xsym && type(actual(t)) == NPAR) || (type(t) == LBR && precedence(t) != LBR_PREC) ) { OBJECT new_par; /* check syntax and attach the named parameter to x */ if( type(t) == CLOSURE ) { new_par = t; t = LexGetToken(); if( type(t) != LBR ) { Error(6, 30, "%s must follow named parameter %s", WARN, &fpos(new_par), KW_LBR, SymName(actual(new_par))); Dispose(new_par); break; } } else { /* compressed form of named parameter */ new_par = NewToken(CLOSURE, &fpos(t), vspace(t), hspace(t), NO_PREC, ChildSymWithCode(x, precedence(t))); precedence(t) = LBR_PREC; } /* add import list of the named parameter to current scope */ scope_count = 0; imps = imports(actual(new_par)); if( imps != nilobj ) { for( link = Down(imps); link != imps; link = NextDown(link) ) { Child(y, link); PushScope(actual(y), FALSE, TRUE); scope_count++; } } /* read the body of the named parameter */ PushScope(actual(new_par), FALSE, FALSE); tmp = Parse(&t, encl, FALSE, FALSE); PopScope(); type(new_par) = PAR; Link(new_par, tmp); /* pop the scopes pushed for the import list */ for( i = 0; i < scope_count; i++ ) PopScope(); /* check that new_par has not already occurred, then link it to x */ for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); assert( type(y) == PAR, "Parse: type(y) != PAR!" ); if( actual(new_par) == actual(y) ) { Error(6, 31, "named parameter %s of %s appears twice", WARN, &fpos(new_par), SymName(actual(new_par)), SymName(actual(x))); DisposeObject(new_par); new_par = nilobj; break; } } if( new_par != nilobj ) { /* keep track of the number of compulsory named parameters */ if( is_compulsory(actual(new_par)) ) compulsory_count++; Link(x, new_par); } /* get next token, possibly another NPAR */ PushScope(xsym, TRUE, FALSE); /* allow NPARs only */ if( t == nilobj ) t = LexGetToken(); PopScope(); } /* end while */ /* report absence of compulsory parameters */ debug4(DOP, DD, "%s %s %d : %d", EchoFilePos(&fpos(x)), SymName(xsym), compulsory_count, has_compulsory(xsym)); if( compulsory_count < has_compulsory(xsym) ) { for( xlink = Down(xsym); xlink != xsym; xlink = NextDown(xlink) ) { Child(tmp, xlink); if( type(tmp) == NPAR && is_compulsory(tmp) ) { for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == PAR && actual(y) == tmp ) break; } if( link == x ) { Error(6, 38, "compulsory option %s missing from %s", WARN, &fpos(x), SymName(tmp), SymName(xsym)); } } } } /* record symbol name in BEGIN following, if any */ if( type(t) == BEGIN ) { if( !has_rpar(xsym) ) Error(6, 32, "%s out of place here (%s has no right parameter)", WARN, &fpos(x), KW_BEGIN, SymName(xsym)); else actual(t) = xsym; } /* if x can be transferred, do so */ if( transfer_allowed && has_target(xsym) && !has_key(xsym) && filter(xsym) == nilobj ) { if( !has_rpar(xsym) || uses_count(ChildSym(xsym, RPAR)) <= 1 ) { debug1(DGT, D, "examining transfer of %s", SymName(xsym)); ifdebug(DGT, D, DebugStacks(initial_ttop, obj_prev)); i = has_rpar(xsym) ? ttop -1 : ttop; while( is_cat_op(type(tok_stack[i])) ) i--; if( (type(tok_stack[i])==LBR || type(tok_stack[i])==BEGIN) && type(tok_stack[i-1]) == GSTUB_EXT ) { /* at this point it is likely that x is transferable */ if( has_rpar(xsym) ) { New(tmp, CLOSURE); actual(tmp) = InputSym; FposCopy( fpos(tmp), fpos(t) ); ShiftObj(tmp, PREV_OBJ); obj_prev = Reduce(); } x = PopObj(); x = TransferBegin(x); if( type(x) == CLOSURE ) /* failure: unReduce */ { if( has_rpar(xsym) ) { Child(tmp, LastDown(x)); assert(type(tmp)==PAR && type(actual(tmp))==RPAR, "Parse: cannot undo rpar" ); DisposeChild(LastDown(x)); if( has_lpar(xsym) ) { Child(tmp, Down(x)); assert(type(tmp)==PAR && type(actual(tmp))==LPAR, "Parse: cannot undo lpar" ); Child(tmp, Down(tmp)); PushObj(tmp); DeleteLink(Up(tmp)); DisposeChild(Down(x)); } PushToken(x); obj_prev = PREV_OP; } else { PushObj(x); obj_prev = PREV_OBJ; } } else /* success */ { obj_prev = PREV_OP; Shift(x, NO_PREC, 0, FALSE, has_rpar(xsym)); } } } } /* end if has_target */ if( filter(xsym) != nilobj ) { if( type(t) == BEGIN || type(t) == LBR ) { /* create filter object and copy parameter into temp file */ tmp = FilterCreate((BOOLEAN) (type(t) == BEGIN), xsym, &fpos(t)); /* push filter object onto stacks and keep going */ Shift(t, precedence(t), 0, FALSE, TRUE); ShiftObj(tmp, PREV_OBJ); t = LexGetToken(); } else Error(6, 33, "right parameter of %s must be enclosed in braces", FATAL, &fpos(x), SymName(xsym)); } else if( has_body(xsym) ) { if( type(t) == BEGIN || type(t) == LBR ) { PushScope(xsym, FALSE, TRUE); PushScope(ChildSym(xsym, RPAR), FALSE, FALSE); PushObj( Parse(&t, encl, FALSE, TRUE) ); obj_prev = Reduce(); PopScope(); PopScope(); if( t == nilobj ) t = LexGetToken(); } else { Error(6, 34, "body parameter of %s must be enclosed in braces", WARN, &fpos(t), SymName(xsym)); } } break; case OPEN: x = t; xsym = nilobj; Shift(t, precedence(t), RIGHT_ASSOC, TRUE, TRUE); if( type(ObjTop) == CLOSURE ) xsym = actual(ObjTop); else if( is_cross(type(ObjTop)) && Down(ObjTop) != ObjTop ) { Child(tmp, Down(ObjTop)); if( type(tmp) == CLOSURE ) xsym = actual(tmp); } t = LexGetToken(); if( xsym == nilobj ) Error(6, 35, "invalid left parameter of %s", WARN, &fpos(x), KW_OPEN); else if( type(t) != BEGIN && type(t) != LBR ) Error(6, 36, "right parameter of %s must be enclosed in braces", WARN, &fpos(t), KW_OPEN); else { PushScope(xsym, FALSE, TRUE); tmp = Parse(&t, encl, FALSE, FALSE); ShiftObj(tmp, PREV_RBR); PopScope(); if( t == nilobj ) t = LexGetToken(); obj_prev = Reduce(); } break; default: assert1(FALSE, "Parse:", Image(type(t))); break; } /* end switch */ } /* end for */ } /* end Parse */ lout-3.39/makefile0000644000076400007640000006202511363700677012570 0ustar jeffjeff############################################################################### # # # Make file for installing Basser Lout # # # # Jeffrey H. Kingston # # # # make prg2lout Compile a small auxiliary program called prg2lout # # make lout Compile the Lout source # # make all Equivalent to "make prg2lout" and "make lout" # # # # make install Install the Lout and prg2lout binaries and libraries # # make installman Install the Lout and prg2lout manual entries # # make installdoc Install the Lout documentation # # make allinstall Equivalent to "make install", "make installman", # # and "make installdoc". # # # # make installfr Install French error messages (optional) # # make installde Install German error messages (optional) # # make clean Remove compilation temporaries # # make uninstall Undo the effect of make install, installman, # # installdoc, installfr, and installde # # make restart Undo everything except changes to this makefile, # # ready for a fresh start. # # # # Most installations of Lout should require only the following steps. If # # something goes wrong, you can start again with "make restart". Please # # carry out all the steps, in exactly the order given. Believe me, it # # will be much faster than doing it any other way. # # # # (1) Set exactly one of the following macros defined below to 1 and the # # others all to 0, to indicate the operating system under which the # # Lout binary is to run. At present OSUNIX and OSDOS work but OSMAC # # doesn't work. # # # # OSUNIX Unix in all its flavours, including Linux. # # OSDOS MS-DOS etc. ("rb" and "wb" file access modes where needed) # # OSMAC Macintosh # # # # (2) If you want to install Lout with debugging on for some reason, for # # example if a guru has asked you to do this in the course of tracking # # down some problem with Lout, then set these two macros as follows: # # # # DEBUGGING = 1 # # TRACING = -g # # # # Lout will run a bit slower and its binary will be a bit larger if # # you do this. The normal, non-debugging values are # # # # DEBUGGING = 0 # # TRACING = # # # # These should appear like this below. # # # # (3) Set the USESTAT macro defined below to 1 if the system you are # # compiling onto has the stat() file status system call. If you are # # unsure, or know it doesn't, set USESTAT to 0. The stat() call, # # if used, will allow Lout to determine the time of last change # # of database index files and rebuild them automatically if required. # # # # (4) Set the SAFEDFT macro defined below to 1 if you want safe execution # # (i.e. disabling calls to system()) to be the default behaviour. You # # can always specify safe or unsafe execution by means of the -S and # # -U options to lout when processing a document; SAFEDFT means that # # -S rather than -U is the default behaviour. Unsafe execution is # # required when formatting computer programs, so if in doubt, do not # # change the value of SAFEDFT. # # # # (5) Set the following four macros defined below to appropriate values: # # # # BINDIR Directory where Lout's binary goes. This directory is # # assumed to exist. # # # # LOUTLIBDIR Directory where Lout's libraries go. This directory will # # be created and must not exist already (but its parent # # must exist already). It will be completely removed by # # an uninstall. In short, it is the library directory for # # Lout only, not a general library directory. # # # # LOUTDOCDIR Directory where the documents describing the Lout system # # (written in Lout) go. This directory will be created # # (but its parent must exist already). # # # # MANDIR Directory where the lout and prg2lout manual entries # # (in nroff -man) go. This directory is assumed to exist. # # # # They are currently defined using a common stem called $(PREFIX), # # but you don't have to use $(PREFIX) if you don't want to. # # # # (6) Set the following two macros defined below to appropriate values. # # I strongly recommend CHARIN=1 and CHAROUT=0 for all sites (English # # and non-English language). This way we get a truly international # # standard in which everyone has access to accented characters, yet # # Lout's output is in the strict 7-bit ASCII that is recommended in # # the PostScript manual. # # # # CHARIN This macro determines the assignment of characters in Lout # # source files to character classes by the lexical analyser. # # That is, it determines which characters are letters, which # # is the comment character, etc. Supported values are: # # # # 0 For English language only ASCII installations # # # # 1 For installations using the ISO-LATIN-1 character set # # (adds accented letters to the LETTER character class) # # # # Lout will accept any 8-bit character except '\0'; CHARIN # # does not determine the acceptability of any character, just # # its class. # # # # CHAROUT This macro determines the format of strings of literal # # characters in the PostScript output. Currently supported # # values are: # # # # 0 Every output character will be printable ASCII # # # # 1 Every output character will be printable ISO-LATIN-1 # # # # The output will be valid PostScript irrespective of the # # value given to CHAROUT, which may be set independently of # # CHARIN. It just determines which characters are printed # # as \ddd escape sequences and which are printed as one-byte # # literal characters. # # # # (7) Set macro USELOC to one of the following values, NOT TO A LOCALE. # # # # 0 Lout's error messages will always appear in English, and no # # source code related to locales will be executed (although # # file will be read for collation stuff). # # # # 1 Lout's error messages may appear in languages other than # # English, depending on the current locale. The Lout source # # will be compiled including , , and # # calls to setlocale(), catopen(), catgets(), and catclose() # # # # If you choose to set USELOC to 1, you now need to set one or more of # # these macros: # # # # LOC_FR If you want French language error messages, set this macro # # to your French locale name, i.e. to the value that you # # expect setlocale(LC_MESSAGES, "") to return when you want # # to get French language error messages # # # # LOC_DE If you want German language error messages, set this macro # # to your German locale name, i.e. to the value that you # # expect setlocale(LC_MESSAGES, "") to return when you want # # to get German language error messages # # # # For error messages in other languages, consult ./locale/README. # # # # (8) Set macro COLLATE to either 0 or 1. If you set it to 1, Lout will # # use the strcoll() routine by default when sorting alphabetically # # (e.g. when sorting indexes), otherwise Lout will sort by default # # based on the ISO codes of the characters. This default setting may # # be changed during individual runs of Lout by the -l and -L flags. # # # # (9) Execute "make prg2lout". This will compile the prg2lout program, # # leaving its binary in this directory. Other directories unchanged. # # # # (10) If you want to be able to produce compressed PDF files, as opposed to # # uncompressed ones, you need to: # # # # (a) obtain the zlib compression library from # # . # # # # (b) decompress the zlib source files using gunzip and/or tar and # # then build the library by issuing the "make zlib.a" command # # whilst in the zlib directory. If you want to test the library, # # you should use the "make test" command (which also builds the # # library). # # # # (c) set the PDF_COMPRESSION variable below to 1 # # # # (d) set the ZLIB variable to the path of the libz.a file. For example: # # ZLIB = /usr/cs3/vtan/lout/lout.3.11/zlib-1.1.1/libz.a # # # # (e) set the ZLIBPATH variable to the path of the zlib directory with # # -I in front. For example: # # ZLIBPATH = -I/usr/cs3/vtan/lout/lout.3.11/zlib-1.1.1/ # # # # If you don't want zlib support or cannot obtain it or cannot use it, # # leave the PDF_COMPRESSION, ZLIB, and ZLIBPATH variables as they are. # # # # (11) Execute "make lout". This will compile the Lout source, leaving the # # binary in this directory. No changes are made in other directories. # # # # (12) This makefile assumes that Lout is not installed on your system # # already. If you do have an earlier version of Lout installed, the # # simplest way to get rid of it is to type "make uninstall" now. Of # # course, this is assuming that the old version was installed in the # # same directories as where you are about to install the new version. # # # # (13) Execute "make install". This will do the following things: # # # # (a) It will copy the lout and prg2lout binaries into $(BINDIR); # # # # (b) It will create $(LOUTLIBDIR) and copy the library files into it; # # # # (c) It will perform an initializing "lout -x" run. This run will # # do the following checks and initializations: # # # # (i) It will read all the hyphenation (.lh) files mentioned # # in file $(LOUTLIBDIR)/include/langdefs, check them, and # # build the packed (.lp) versions; # # # # (ii) It will read and check the four standard database (.ld) # # files in directory $(LOUTLIBDIR)/data, and build the # # corresponding database index (.li) files. # # # # (d) It will change the mode of the files created in (c) to be # # publicly readable, just in case they weren't created that way. # # # # It is good to build the various files during installation because # # later runs will not have write permission in the library directories. # # # # (14) Execute "make installman". This installs the manual entries for lout # # and prg2lout into directory $(MANDIR), which is assumed to exist. # # These entries are troff files; plain text versions are also available # # in directory ./man if you need them (install them yourself). # # # # (15) Execute "make installdoc". This creates directory $(LOUTDOCDIR) and # # copies the Lout documentation into it. # # # # (16) If you want French error messages, execute "make installfr" now. # # If you want German error messages, execute "make installde" now. # # These commands compile the error messages files into packed forms # # using the gencat command, and store them in $(LOUTLIBDIR)/locale. # # # # (17) Execute "make clean". This cleans up this directory. # # # # (18) If the usual language at your site is not English, you might like to # # now change the default value of the @InitialLanguage option on line # # 265 (or thereabouts) of file $(LOUTLIBDIR)/include/bsf. This will # # mean that by default the date and words like Chapter and July will # # appear in a different language, and hyphenation will be carried out # # according to patterns designed for that language. You can find the # # list of known languages in file $(LOUTLIBDIR)/include/langdefs, or in # # the User's Guide; if yours is not there, let me know and we can work # # together to add it. This has nothing to do with locales and USELOC. # # # # (19) If the usual size of a piece of paper at your site is not A4, you # # might like to now change the default value of the @PageType option # # on line 65 (or thereabouts) of file $(LOUTLIBDIR)/include/dsf: # # # # named @PageType { A4 @OrIfPlain Other } # # # # This says that the page type is to be A4 by default, unless plain # # text output is in effect (lout -p), in which case the page type is # # Other, which means that the page dimensions come from the @PageWidth # # and @PageHeight options. Just change the A4, not the rest. You can # # find the list of known page types, alternative to A4, in the User's # # Guide, or at line 764 (or thereabouts) in $(LOUTLIBDIR)/include/dsf. # # # # Mail jeff@it.usyd.edu.au if you have any problems. # # # ############################################################################### OSUNIX = 1 OSDOS = 0 OSMAC = 0 DBFIX = 0 USESTAT = 1 SAFEDFT = 0 DEBUGGING = 0 TRACING = # DEBUGGING = 1 # TRACING = -g PREFIX = /home/jeff BINDIR = $(PREFIX)/bin LOUTLIBDIR = $(PREFIX)/lout.lib LOUTDOCDIR = $(PREFIX)/lout.doc MANDIR = $(PREFIX)/lout.man LIBFONT = font LIBMAPS = maps LIBINCL = include LIBDATA = data LIBHYPH = hyph LIBLOCA = locale CHARIN = 1 CHAROUT = 0 USELOC = 1 LOC_FR = fr LOC_DE = de COLLATE = 1 PDF_COMPRESSION = 0 ZLIB = ZLIBPATH = CC = gcc RCOPY = cp -r COPTS = -ansi -pedantic -Wall -O3 CFLAGS = -DOS_UNIX=$(OSUNIX) \ -DOS_DOS=$(OSDOS) \ -DOS_MAC=$(OSMAC) \ -DDB_FIX=$(DBFIX) \ -DUSE_STAT=$(USESTAT) \ -DSAFE_DFT=$(SAFEDFT) \ -DCOLLATE=$(COLLATE) \ -DLIB_DIR=\"$(LOUTLIBDIR)\" \ -DFONT_DIR=\"$(LIBFONT)\" \ -DMAPS_DIR=\"$(LIBMAPS)\" \ -DINCL_DIR=\"$(LIBINCL)\" \ -DDATA_DIR=\"$(LIBDATA)\" \ -DHYPH_DIR=\"$(LIBHYPH)\" \ -DLOCALE_DIR=\"$(LIBLOCA)\" \ -DCHAR_IN=$(CHARIN) \ -DCHAR_OUT=$(CHAROUT) \ -DLOCALE_ON=$(USELOC) \ -DASSERT_ON=1 $(COPTS) \ -DDEBUG_ON=$(DEBUGGING) \ $(TRACING) \ -DPDF_COMPRESSION=$(PDF_COMPRESSION) \ $(ZLIBPATH) OBJS = z01.o z02.o z03.o z04.o z05.o z06.o z07.o z08.o \ z09.o z10.o z11.o z12.o z13.o z14.o z15.o z16.o \ z17.o z18.o z19.o z20.o z21.o z22.o z23.o z24.o \ z25.o z26.o z27.o z28.o z29.o z30.o z31.o z32.o \ z33.o z34.o z35.o z36.o z37.o z38.o z39.o z40.o \ z41.o z42.o z43.o z44.o z45.o z46.o z47.o z48.o \ z49.o z50.o z51.o z52.o lout: $(OBJS) $(CC) -o lout $(OBJS) $(ZLIB) -lm chmod a+x lout $(OBJS): externs.h externs.h: prg2lout: prg2lout.c $(CC) $(COPTS) -o prg2lout prg2lout.c chmod a+x prg2lout all: lout prg2lout install: lout prg2lout @echo "" @echo "(a) Installing lout and prg2lout binaries into BINDIR $(BINDIR)" cp lout $(BINDIR)/lout chmod 755 $(BINDIR)/lout cp prg2lout $(BINDIR)/prg2lout chmod 755 $(BINDIR)/prg2lout @echo "" @echo "(b) Installing library files into LOUTLIBDIR $(LOUTLIBDIR)" mkdir $(LOUTLIBDIR) chmod 755 $(LOUTLIBDIR) @echo "" mkdir $(LOUTLIBDIR)/$(LIBINCL) chmod 755 $(LOUTLIBDIR)/$(LIBINCL) cp include/* $(LOUTLIBDIR)/$(LIBINCL) chmod 644 $(LOUTLIBDIR)/$(LIBINCL)/* @echo "" mkdir $(LOUTLIBDIR)/$(LIBDATA) chmod 755 $(LOUTLIBDIR)/$(LIBDATA) cp data/* $(LOUTLIBDIR)/$(LIBDATA) chmod 644 $(LOUTLIBDIR)/$(LIBDATA)/* @echo "" mkdir $(LOUTLIBDIR)/$(LIBHYPH) chmod 755 $(LOUTLIBDIR)/$(LIBHYPH) cp hyph/* $(LOUTLIBDIR)/$(LIBHYPH) chmod 644 $(LOUTLIBDIR)/$(LIBHYPH)/* @echo "" mkdir $(LOUTLIBDIR)/$(LIBFONT) chmod 755 $(LOUTLIBDIR)/$(LIBFONT) cp font/* $(LOUTLIBDIR)/$(LIBFONT) chmod 644 $(LOUTLIBDIR)/$(LIBFONT)/* @echo "" mkdir $(LOUTLIBDIR)/$(LIBMAPS) chmod 755 $(LOUTLIBDIR)/$(LIBMAPS) cp maps/* $(LOUTLIBDIR)/$(LIBMAPS) chmod 644 $(LOUTLIBDIR)/$(LIBMAPS)/* @echo "" mkdir $(LOUTLIBDIR)/$(LIBLOCA) chmod 755 $(LOUTLIBDIR)/$(LIBLOCA) @echo "" @echo "(c) Initializing run (should be silent, no errors expected)" $(BINDIR)/lout -x -s $(LOUTLIBDIR)/$(LIBINCL)/init @echo "" @echo "(d) Changing mode of files just created by initializing run" chmod 644 $(LOUTLIBDIR)/$(LIBDATA)/* chmod 644 $(LOUTLIBDIR)/$(LIBHYPH)/* installman: @echo "" @echo "Installing manual entries into MANDIR $(MANDIR)" sed -e "s@@$(BINDIR)@" -e "s@@$(LOUTLIBDIR)@" \ -e "s@@$(LOUTDOCDIR)@" -e "s@@$(MANDIR)@" \ man/lout.1 > $(MANDIR)/lout.1 chmod 644 $(MANDIR)/lout.1 cp man/prg2lout.1 $(MANDIR)/prg2lout.1 chmod 644 $(MANDIR)/prg2lout.1 installdoc: @echo "" @echo "Creating LOUTDOCDIR $(LOUTDOCDIR) and copying documentation into it" $(RCOPY) doc/* $(LOUTDOCDIR) chmod 755 $(LOUTDOCDIR) chmod 755 $(LOUTDOCDIR)/* chmod 644 $(LOUTDOCDIR)/*/* allinstall: install installman installdoc installfr: @echo "" @echo "Putting French error messages into $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)" mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR) chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR) mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES cp locale/msgs.fr $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES/msgs.$(LOC_FR) gencat $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES/errors.$(LOC_FR) \ $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES/msgs.$(LOC_FR) chmod 644 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES/* installde: @echo "" @echo "Putting German error messages into $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)" mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE) chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE) mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES cp locale/msgs.de $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES/msgs.$(LOC_DE) gencat $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES/errors.$(LOC_DE) \ $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES/msgs.$(LOC_DE) chmod 644 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES/* uninstall: -rm -f $(BINDIR)/lout $(BINDIR)/prg2lout -rm -fr $(LOUTLIBDIR) -rm -fr $(LOUTDOCDIR) -rm -f $(MANDIR)/lout.1 $(MANDIR)/prg2lout.1 clean: -rm -f lout prg2lout *.o restart: clean uninstall lout-3.39/z37.c0000644000076400007640000025511211442244650011650 0ustar jeffjeff/*@z37.c:Font Service:Declarations@*******************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z37.c */ /* MODULE: Font Service */ /* EXTERNS: FontInit(), FontDefine(), FontChange(), FontWordSize(), */ /* FontSize(), FontHalfXHeight(), FontEncoding(), */ /* FontMapping(), FontFamilyAndFace(), FontNeeded() */ /* */ /* This module implements fonts, using encoding vectors and Adobe font */ /* metrics files (.AFM files, version 2). */ /* */ /*****************************************************************************/ #include "externs.h" #define DEFAULT_XHEIGHT 500 /* the default XHeight if font has none */ #define NO_FONT 0 /* the not-a-font font number */ #define SZ_DFT 1000 /* default lout size is 50p */ #define INIT_FINFO_SIZE 100 /* initial number of sized fonts set aside */ /*****************************************************************************/ /* */ /* These definitions have been moved to "externs.h" since z24.c needs them: */ /* */ /* struct metrics { */ /* FULL_LENGTH up; */ /* FULL_LENGTH down; */ /* FULL_LENGTH left; */ /* FULL_LENGTH right; */ /* FULL_LENGTH last_adjust; */ /* }; */ /* */ /* typedef struc composite_rec { */ /* FULL_CHAR char_code; */ /* FULL_LENGTH x_offset; */ /* FULL_LENGTH y_offset; */ /* } COMPOSITE; */ /* */ /* typedef struct font_rec { */ /* struct metrics *size_table; metrics of sized fonts */ /* FULL_CHAR *lig_table; ligatures */ /* unsigned short *composite; non-zero means composite */ /* COMPOSITE *cmp_table; composites to build */ /* int cmp_top; length of cmp_table */ /* OBJECT font_table; record of sized fonts */ /* OBJECT original_face; face object of font */ /* FULL_LENGTH underline_pos; position of underline */ /* FULL_LENGTH underline_thick; thickness of underline */ /* unsigned short *kern_table; first kerning chars */ /* FULL_CHAR *kern_chars; second kerning chars */ /* unsigned char *kern_value; points into kern_lengths */ /* FULL_LENGTH *kern_sizes; sizes of kernings */ /* FULL_LENGTH bbox_lly; lly of font bbox */ /* FULL_LENGTH bbox_ury; ury of font bbox */ /* } FONT_INFO; */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Private data structures of this module */ /* */ /* +++++++++++++++++++++++++++ */ /* + + */ /* root -> + ACAT + */ /* + + */ /* + + */ /* +++++++++++++++++++++++++++ */ /* | font families... */ /* | */ /* +-----+-----------------------------------------------+ ... */ /* | | */ /* | | */ /* +++++++++++++++++++++++++++ */ /* + + */ /* family -> + WORD + */ /* + string (family name) + */ /* + + */ /* +++++++++++++++++++++++++++ */ /* | faces of this family... */ /* | */ /* +-----+-----------------------------------------------+ ... */ /* | | */ /* | | */ /* +++++++++++++++++++++++++++++++++ */ /* + + */ /* face -> + WORD + */ /* + string (face name) + */ /* + font_recoded + */ /* + font_mapping + */ /* + font_page + */ /* + + */ /* +++++++++++++++++++++++++++++++++ */ /* | size records... */ /* | */ /* +----------+---------+--------------------+-----------------------+ */ /* | | | | */ /* | | | | */ /* +++++++++++++++++++ +++++++++++++++++++ +++++++++++++++++++++ */ /* + + + + + + */ /* + WORD + + WORD + + WORD + */ /* + string (font + + string (AFM + + string (short + */ /* + name) + + file name) + + font name) + */ /* + + + + + font_num + */ /* +++++++++++++++++++ +++++++++++++++++++ + font_size + */ /* | + font_xheight2 + */ /* | + font_recoded + */ /* ++++++++++++++++++++ + font_mapping + */ /* + + + font_spacewidth + */ /* (optional) + WORD + + font_bbox_lly + */ /* + string (extra + + font_bbox_ury + */ /* + AFM file name) + + + */ /* + + +++++++++++++++++++++ */ /* ++++++++++++++++++++ */ /* */ /*****************************************************************************/ OBJECT FontDefSym; /* symtab entry for @FontDef */ int font_curr_page; /* current page number */ FONT_INFO *finfo; /* all the font table info */ static int finfo_size; /* current finfo array size */ static OBJECT font_root; /* root of tree of fonts */ static OBJECT font_used; /* fonts used on this page */ static FONT_NUM font_count; /* number of sized fonts */ static int font_seqnum; /* unique number for a font */ static OBJECT fd_tag; /* @FontDef @Tag entry */ static OBJECT fd_family; /* @FontDef @Family entry */ static OBJECT fd_face; /* @FontDef @Face entry */ static OBJECT fd_name; /* @FontDef @Name entry */ static OBJECT fd_metrics; /* @FontDef @Metrics entry */ static OBJECT fd_extra_metrics; /* @FontDef @ExtraMetrics */ static OBJECT fd_mapping; /* @FontDef @Mapping entry */ static OBJECT fd_recode; /* @FontDef @Recode entry */ /*@::FontInit(), FontDebug()@*************************************************/ /* */ /* FontInit() */ /* */ /* Initialise this module. */ /* */ /*****************************************************************************/ static OBJECT load(FULL_CHAR *name, unsigned dtype, OBJECT encl, BOOLEAN compulsory) { OBJECT res; res = InsertSym(name, dtype, no_fpos, DEFAULT_PREC, FALSE, FALSE, 0, encl, MakeWord(WORD, STR_EMPTY, no_fpos)); if( dtype == NPAR ) visible(res) = TRUE; if( compulsory ) { has_compulsory(encl)++; is_compulsory(res) = TRUE; } return res; } void FontInit(void) { debug0(DFT, D, "FontInit()"); font_curr_page = 1; font_count = 0; New(font_root, ACAT); New(font_used, ACAT); font_seqnum = 0; finfo = (FONT_INFO *) malloc(INIT_FINFO_SIZE * sizeof(FONT_INFO)); finfo_size = INIT_FINFO_SIZE; ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 1, INIT_FINFO_SIZE * sizeof(FONT_INFO))); /* set up FontDefSym */ FontDefSym = load(KW_FONTDEF, LOCAL, StartSym, FALSE); fd_tag = load(KW_TAG, NPAR, FontDefSym, TRUE); fd_family = load(KW_FAMILY, NPAR, FontDefSym, TRUE); fd_face = load(KW_FACE, NPAR, FontDefSym, TRUE); fd_name = load(KW_NAME, NPAR, FontDefSym, TRUE); fd_metrics = load(KW_METRICS, NPAR, FontDefSym, TRUE); fd_extra_metrics = load(KW_EXTRA_METRICS, NPAR, FontDefSym, FALSE); fd_mapping = load(KW_MAPPING, NPAR, FontDefSym, TRUE); fd_recode = load(KW_RECODE, NPAR, FontDefSym, FALSE); debug0(DFT, D, "FontInit returning."); } /*****************************************************************************/ /* */ /* FontDebug() */ /* */ /* Print out font tree (not currectly used). */ /* */ /*****************************************************************************/ #if DEBUG_ON static void FontDebug(void) { OBJECT family, face, link, flink, zlink, z; int i; assert(font_root!=nilobj && type(font_root)==ACAT, "FontDebug: font_root!"); for( link = Down(font_root); link != font_root; link = NextDown(link) ) { Child(family, link); assert( is_word(type(family)), "FontDebug: family!" ); debug1(DFS, D, "family %s:", string(family)); for( flink = Down(family); flink != family; flink = NextDown(flink) ) { Child(face, flink); assert( is_word(type(face)), "FontDebug: face!" ); debug1(DFS, D, " face %s:", string(face)); for( zlink = Down(face); zlink != face; zlink = NextDown(zlink) ) { Child(z, zlink); if( is_word(type(z)) ) { debug2(DFS, D, " %s%s", string(z), Down(z) != z ? " child" : ""); } else { debug1(DFS, D, " %s", Image(type(z))); } } } } for( i = 1; i <= font_count; i++ ) fprintf(stderr, " finfo[%d].font_table = %s%s", i, EchoObject(finfo[i].font_table), STR_NEWLINE); } /* end FontDebug */ /*****************************************************************************/ /* */ /* DebugKernTable(fnum) */ /* */ /* Print debug output of kern table for font fnum. */ /* */ /*****************************************************************************/ static void DebugKernTable(FONT_NUM fnum) { int i, j; unsigned short *kt = finfo[fnum].kern_table; FULL_CHAR *kc = finfo[fnum].kern_chars; unsigned char *kv = finfo[fnum].kern_value; FULL_LENGTH *ks = finfo[fnum].kern_sizes; debug1(DFT, DD, "DebugKernTable(%d)", fnum); for( i = 0; i < MAX_CHARS; i++ ) { if( kt[i] != 0 ) { debug1(DFT, DD, "kt[%d]:", i); for( j = kt[i]; kc[j] != '\0'; j++ ) { debug3(DFT, DD, "KPX %c %c %d", i, kc[j], ks[kv[j]]); } } } debug1(DFT, DD, "DebugKernTable(%d) returning", fnum); } /* DebugKernTable */ #endif /*****************************************************************************/ /* */ /* ReadCharMetrics(face, fixed_pitch, xheight2,lig,ligtop,fnum,fnt,lnum,fp) */ /* */ /* Read a sequence of character metrics lines. The font record is */ /* face, its ligatures are lig[0..ligtop], font number fnum, metrics fnt. */ /* The line number is lnum; input is to be read from file fp. */ /* */ /*****************************************************************************/ static void ReadCharMetrics(OBJECT face, BOOLEAN fixed_pitch, int xheight2, FULL_CHAR *lig, int *ligtop, FILE_NUM fnum, struct metrics *fnt, int *lnum, FILE *fp) { FULL_CHAR buff[MAX_BUFF], command[MAX_BUFF], ch, ligchar; int prev_ligtop, prev_lig, i, wx = 0, llx = 0, lly = 0, urx = 0, ury = 0; float fl_wx, fl_llx, fl_lly, fl_urx, fl_ury; BOOLEAN wxfound, bfound; OBJECT AFMfilename; Child(AFMfilename, NextDown(Down(face))); while( ReadOneLine(fp, buff, MAX_BUFF) != 0 && !StringBeginsWith(buff, AsciiToFull("EndCharMetrics")) && !StringBeginsWith(buff, AsciiToFull("EndExtraCharMetrics")) ) { /* read one line containing metric info for one character */ debug1(DFT, DD, " ReadCharMetrics: %s", buff); (*lnum)++; ch = '\0'; wxfound = bfound = FALSE; i = 0; while( buff[i] == ' ' ) i++; while( buff[i] != '\0' ) { debug2(DFT, DDD, " ch = %d, &buff[i] = %s", ch, &buff[i]); sscanf( (char *) &buff[i], "%s", command); if( StringEqual(command, "N") ) { sscanf( (char *) &buff[i], "N %s", command); ch = MapCharEncoding(command, font_mapping(face)); } else if( StringEqual(command, "WX") ) { sscanf( (char *) &buff[i], "WX %f", &fl_wx); wx = fl_wx; wxfound = TRUE; } else if( StringEqual(command, "B") ) { sscanf( (char *) &buff[i], "B %f %f %f %f", &fl_llx, &fl_lly, &fl_urx, &fl_ury); llx = fl_llx; lly = fl_lly; urx = fl_urx; ury = fl_ury; bfound = TRUE; } else if( StringEqual(command, "L") && BackEnd->uses_font_metrics && ch != '\0' ) { prev_ligtop = *ligtop; prev_lig = lig[ch]; if( lig[ch] == 1 ) lig[ch] = (*ligtop) - MAX_CHARS; lig[(*ligtop)++] = ch; i++; /* skip L */ while( buff[i] == ' ' ) i++; while( buff[i] != ';' && buff[i] != '\0' ) { sscanf( (char *) &buff[i], "%s", command); ligchar = MapCharEncoding(command, font_mapping(face)); if( ligchar != '\0' ) lig[(*ligtop)++] = ligchar; else { Error(37, 1, "ignoring unencoded ligature character %s in font file %s (line %d)", WARN, &fpos(AFMfilename), command, FileName(fnum), *lnum); lig[ch] = prev_lig; /* patch by Ludovic Courtes, added v. 3.31 */ *ligtop = prev_ligtop; } if( *ligtop > 2*MAX_CHARS - 5 ) Error(37, 2, "too many ligature characters in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), *lnum); while( buff[i] != ' ' && buff[i] != ';' ) i++; while( buff[i] == ' ' ) i++; } if( *ligtop != prev_ligtop ) /* this test by Ludovic Courtes, 3.31 */ lig[(*ligtop)++] = '\0'; } while( buff[i] != ';' && buff[i] != '\0' ) i++; if( buff[i] == ';' ) { i++; while( buff[i] == ' ' ) i++; } } if( ch > '\0' ) { if( !wxfound ) { Error(37, 3, "WX missing in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), *lnum); } if( !bfound ) { Error(37, 4, "B missing in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), *lnum); } if( lig[ch] == 1 ) lig[ch] = 0; /* set to known if unknown */ else if( lig[ch] > 1 ) /* add '\0' to end of ligs */ lig[(*ligtop)++] = '\0'; if( BackEnd->uses_font_metrics ) { fnt[ch].left = llx; fnt[ch].down = lly - xheight2; fnt[ch].right = wx; fnt[ch].up = ury - xheight2; fnt[ch].last_adjust = (urx==0 || wx==0 || fixed_pitch) ? 0 : urx - wx; } else { fnt[ch].left = 0; fnt[ch].down = - PlainCharHeight / 2; fnt[ch].right = PlainCharWidth; fnt[ch].up = PlainCharHeight / 2; fnt[ch].last_adjust = 0; } debug6(DFT, DDD, " fnt[%c] = (%d,%d,%d,%d,%d)",ch, fnt[ch].left, fnt[ch].down, fnt[ch].right, fnt[ch].up, fnt[ch].last_adjust); } } } /* end ReadCharMetrics */ /*****************************************************************************/ /* */ /* ReadCompositeMetrics(face, Extrafilename, extra_fnum, lnum, composite, */ /* cmp, cmptop, fp) */ /* */ /* Read a sequence of composite metrics lines. The font record is face. */ /* The line number is lnum; input is to be read from file fp. */ /* */ /*****************************************************************************/ static void ReadCompositeMetrics(OBJECT face, OBJECT Extrafilename, FILE_NUM extra_fnum, int *lnum, unsigned short composite[], COMPOSITE cmp[], int *cmptop, FILE *fp) { int status; FULL_CHAR buff[MAX_BUFF], composite_name[100], name[100]; int composite_num, x_offset, y_offset, i, count; FULL_CHAR composite_code, code; /* build composites */ while( (status = ReadOneLine(fp, buff, MAX_BUFF)) != 0 && StringBeginsWith(buff, AsciiToFull("CC")) ) { (*lnum)++; debug1(DFT, DD, " composite: %s", buff); /* read CC ; and move i to after it */ if( sscanf((char *)buff, "CC %s %d ", composite_name, &composite_num) != 2 ) Error(37, 5, "syntax error in extra font file %s (line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); for( i = 0; buff[i] != ';' && buff[i] != '\0'; i++ ); if( buff[i] != ';' ) Error(37, 5, "syntax error in extra font file %s (line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); i++; /* add entry for this character to composite */ composite_code = MapCharEncoding(composite_name,font_mapping(face)); if( composite_code == (FULL_CHAR) '\0' ) Error(37, 6, "unknown character name %s in font file %s (line %d)", FATAL, &fpos(Extrafilename), composite_name, FileName(extra_fnum), *lnum); composite[composite_code] = *cmptop; for( count = 0; count < composite_num; count++ ) { /* read one PCC ; and move i to after it */ if( sscanf((char *)&buff[i]," PCC %s %d %d",name,&x_offset,&y_offset)!=3 ) Error(37, 5, "syntax error in extra font file %s (line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); for( ; buff[i] != ';' && buff[i] != '\0'; i++ ); if( buff[i] != ';' ) Error(37, 5, "syntax error in extra font file %s (line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); i++; /* load this piece into cmp */ if( *cmptop >= MAX_CHARS ) Error(37, 7, "too many composites in file %s (at line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); code = MapCharEncoding(name, font_mapping(face)); cmp[*cmptop].char_code = code; cmp[*cmptop].x_offset = x_offset; cmp[*cmptop].y_offset = y_offset; (*cmptop)++; } /* add null terminating component */ if( *cmptop >= MAX_CHARS ) Error(37, 8, "too many composites in file %s (at line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); cmp[*cmptop].char_code = (FULL_CHAR) '\0'; (*cmptop)++; } if( status == 0 || !StringBeginsWith(buff, AsciiToFull("EndBuildComposites")) ) Error(37, 9, "missing EndBuildComposites in extra font file %s (line %d)", FATAL, &fpos(Extrafilename), FileName(extra_fnum), *lnum); } /* end ReadCompositeMetrics */ /*@::FontRead()@**************************************************************/ /* */ /* static OBJECT FontRead(FULL_CHAR *family_name, *face_name, OBJECT err) */ /* */ /* Search the font databases for a font with this family and face name. */ /* If found, read the font and update this module's data structures, then */ /* return the face object. */ /* */ /* If an error occurs, use fpos(err) for reporting its location if nothing */ /* better suggests itself. */ /* */ /*****************************************************************************/ static OBJECT FontRead(FULL_CHAR *family_name, FULL_CHAR *face_name, OBJECT err) { OBJECT cs, link, db, fontdef_obj, y, ylink; FULL_CHAR tag[100], seq[100]; FILE_NUM dfnum; long dfpos, cont; int dlnum; BOOLEAN font_name_found, font_bbox_found; OBJECT family, face, font_name, AFMfilename, Extrafilename, LCMfilename; OBJECT recode, first_size; FULL_CHAR buff[MAX_BUFF], command[MAX_BUFF], ch; int status; int xheight2, i, lnum, ligtop, cmptop; float fl_xheight2, fl_under_pos, fl_under_thick; int under_pos, under_thick; BOOLEAN upfound, utfound, xhfound; BOOLEAN fixed_pitch = FALSE; FILE_NUM fnum, extra_fnum; FILE *fp, *extra_fp; struct metrics *fnt; FULL_CHAR *lig; unsigned short *composite; COMPOSITE *cmp; unsigned short *kt; FULL_CHAR *kc; unsigned char *kv; FULL_LENGTH *ks; FULL_LENGTH bbox_llx, bbox_lly, bbox_urx, bbox_ury; debug2(DFT, D, "FontRead(%s, %s)", family_name, face_name); /***************************************************************************/ /* */ /* Get the @FontDef object with tag family_name-face_name from databases */ /* */ /***************************************************************************/ /* if no databases available, fatal error */ cs = cross_sym(FontDefSym); if( cs == nilobj ) { Error(37, 10, "unable to set font %s %s (no font databases loaded)", FATAL, no_fpos, family_name, face_name); } /* search the databases for @FontDef @Tag { family-face } */ sprintf( (char *) tag, "%s-%s", family_name, face_name); for( link = NextUp(Up(cs)); link != cs; link = NextUp(link) ) { Parent(db, link); if( DbRetrieve(db, FALSE, FontDefSym,tag,seq,&dfnum,&dfpos,&dlnum,&cont) ) break; } /* if not found, return nilobj */ if( link == cs ) { debug0(DFT, D, "FontRead returning nilobj (not in any database)"); return nilobj; } /* found it; read @FontDef object from database file */ SwitchScope(nilobj); fontdef_obj = ReadFromFile(dfnum, dfpos, dlnum); UnSwitchScope(nilobj); if( fontdef_obj == nilobj ) Error(37, 11, "cannot read %s for %s", INTERN, no_fpos, KW_FONTDEF, tag); /***************************************************************************/ /* */ /* Extract the attributes of fontdef_obj, and check that they are OK. */ /* */ /***************************************************************************/ /* extract the various attributes */ family = face = font_name = AFMfilename = nilobj; Extrafilename = LCMfilename = recode = nilobj; for( ylink=Down(fontdef_obj); ylink != fontdef_obj; ylink=NextDown(ylink) ) { Child(y, ylink); if( type(y) == PAR ) { assert( type(y) == PAR, "FontRead: type(y) != PAR!" ); if( actual(y) == fd_tag ) { /* do nothing with this one */ } else if( actual(y) == fd_family ) { Child(family, Down(y)); if( !is_word(type(family)) || !StringEqual(string(family), family_name) ) Error(37, 12, "font family name %s incompatible with %s value %s", FATAL, &fpos(fontdef_obj), string(family), KW_TAG, tag); } else if( actual(y) == fd_face ) { Child(face, Down(y)); if( !is_word(type(face)) || !StringEqual(string(face), face_name) ) Error(37, 13, "font face name %s incompatible with %s value %s", FATAL, &fpos(fontdef_obj), string(face), KW_TAG, tag); } else if( actual(y) == fd_name ) { Child(font_name, Down(y)); font_name = ReplaceWithTidy(font_name, WORD_TIDY); if( !is_word(type(font_name)) ) Error(37, 14, "illegal font name (quotes needed?)", FATAL, &fpos(font_name)); } else if( actual(y) == fd_metrics ) { Child(AFMfilename, Down(y)); AFMfilename = ReplaceWithTidy(AFMfilename, WORD_TIDY); if( !is_word(type(AFMfilename)) ) Error(37, 15, "illegal font metrics file name (quotes needed?)", FATAL, &fpos(AFMfilename)); } else if( actual(y) == fd_extra_metrics ) { Child(Extrafilename, Down(y)); Extrafilename = ReplaceWithTidy(Extrafilename, WORD_TIDY); if( !is_word(type(Extrafilename)) ) Error(37, 16, "illegal font extra metrics file name (quotes needed?)", FATAL, &fpos(Extrafilename)); } else if( actual(y) == fd_mapping ) { Child(LCMfilename, Down(y)); LCMfilename = ReplaceWithTidy(LCMfilename, WORD_TIDY); if( !is_word(type(LCMfilename)) ) Error(37, 17, "illegal mapping file name (quotes needed?)", FATAL, &fpos(LCMfilename)); } else if( actual(y) == fd_recode ) { Child(recode, Down(y)); recode = ReplaceWithTidy(recode, WORD_TIDY); if( !is_word(type(recode)) ) Error(37, 18, "illegal value of %s", FATAL, &fpos(recode), SymName(fd_recode)); } else { assert(FALSE, "FontRead: cannot identify component of FontDef") } } } /* check that all the compulsory ones were found */ /* a warning message will have already been given if not */ if( family == nilobj || face == nilobj || font_name == nilobj || AFMfilename == nilobj || LCMfilename == nilobj ) { debug0(DFT, D, "FontRead returning nilobj (missing compulsory)"); return nilobj; } /***************************************************************************/ /* */ /* Update font tree to have this family, face and first_size. */ /* */ /***************************************************************************/ /* insert family into font tree if not already present */ for( link = Down(font_root); link != font_root; link = NextDown(link) ) { Child(y, link); if( StringEqual(string(y), string(family)) ) { family = y; break; } } if( link == font_root ) MoveLink(Up(family), font_root, PARENT); /* insert face into family, or error if already present */ for( link = Down(family); link != family; link = NextDown(link) ) { Child(y, link); if( StringEqual(string(y), string(face)) ) { Error(37, 19, "font %s %s already defined, at%s", WARN, &fpos(face), string(family), string(face), EchoFilePos(&fpos(y))); debug0(DFT, D, "FontRead returning: font already defined"); DisposeObject(fontdef_obj); return y; } } MoveLink(Up(face), family, PARENT); /* PostScript name and AFM file name are first two children of face */ Link(face, font_name); Link(face, AFMfilename); /* AFM file name has extra file name as optional child */ if( Extrafilename != nilobj ) Link(AFMfilename, Extrafilename); /* load character mapping file */ if( recode != nilobj && StringEqual(string(recode), AsciiToFull("No")) ) { font_recoded(face) = FALSE; font_mapping(face) = MapLoad(LCMfilename, FALSE); } else if( recode == nilobj || StringEqual(string(recode), AsciiToFull("Yes")) ) { font_recoded(face) = TRUE; font_mapping(face) = MapLoad(LCMfilename, TRUE); } else Error(37, 20, "expecting either Yes or No here", FATAL, &fpos(recode)); /* say that this font is currently unused on any page */ font_page(face) = 0; /* get a new number for this (default) font size */ if( ++font_count >= finfo_size ) { if( font_count > MAX_FONT ) Error(37, 21, "too many different fonts and sizes (maximum is %d)", FATAL, &fpos(err),MAX_FONT); ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, -1, -finfo_size * sizeof(FONT_INFO))); finfo_size *= 2; ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 1, finfo_size * sizeof(FONT_INFO))); finfo = (FONT_INFO *) realloc(finfo, finfo_size * sizeof(FONT_INFO)); if( finfo == (FONT_INFO *) NULL ) Error(37, 22, "run out of memory when increasing font table size", FATAL, &fpos(err)); } /* build the first size record, and initialize it with what we know now */ first_size = MakeWordTwo(WORD, AsciiToFull("fnt"), StringInt(++font_seqnum), no_fpos); Link(face, first_size); font_num(first_size) = font_count; font_size(first_size) = BackEnd->uses_font_metrics ? SZ_DFT : PlainCharHeight; font_recoded(first_size) = font_recoded(face); font_mapping(first_size) = font_mapping(face); font_num(face) = font_num(first_size); /* Uwe's suggestion, helps PDF */ /* font_xheight2, font_bbox_lly, font_bbox_ury, font_spacewidth still to do */ /***************************************************************************/ /* */ /* Read the Adobe font metrics file, and record what's in it. */ /* */ /***************************************************************************/ /* open the Adobe font metrics (AFM) file of the font */ debug0(DFS, D, " calling DefineFile from FontRead"); fnum = DefineFile(string(AFMfilename), STR_EMPTY, &fpos(AFMfilename), FONT_FILE, FONT_PATH); fp = OpenFile(fnum, FALSE, FALSE); if( fp == NULL ) Error(37, 23, "cannot open font file %s", FATAL, &fpos(AFMfilename), FileName(fnum)); /* check that the AFM file begins, as it should, with "StartFontMetrics" */ if( ReadOneLine(fp, buff, MAX_BUFF) == 0 || sscanf( (char *) buff, "%s", command) != 1 || !StringEqual(command, "StartFontMetrics") ) { debug1(DFT, DD, "first line of AFM file:%s", buff); debug1(DFT, DD, "command:%s", command); Error(37, 24, "font file %s does not begin with StartFontMetrics", FATAL, &fpos(AFMfilename), FileName(fnum)); } /* initialise font metrics table for the new font */ ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 1, MAX_CHARS * sizeof(struct metrics))); fnt = (struct metrics *) malloc(MAX_CHARS * sizeof(struct metrics)); if( fnt == (struct metrics *) NULL ) Error(37, 25, "run out of memory while reading font file %s", FATAL, &fpos(err), FileName(fnum)); ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 0, 2*MAX_CHARS*sizeof(FULL_CHAR))); /* initialise ligature table for the new font */ lig = (FULL_CHAR *) malloc(2*MAX_CHARS*sizeof(FULL_CHAR)); if( lig == (FULL_CHAR *) NULL ) Error(37, 25, "run out of memory while reading font file %s", FATAL, &fpos(err), FileName(fnum)); for( i = 0; i < MAX_CHARS; i++ ) lig[i] = 1; /* i.e. char unknown */ ligtop = MAX_CHARS+2; /* must avoid ligtop - MAX_CHARS == 0 or 1 */ /* initialise composites table for the new font */ composite = (unsigned short *) malloc(MAX_CHARS * sizeof(unsigned short)); if( composite == (unsigned short *) NULL ) Error(37, 25, "run out of memory while reading font file %s", FATAL, &fpos(err), FileName(fnum)); cmp = (COMPOSITE *) malloc(MAX_CHARS * sizeof(COMPOSITE)); if( cmp == (COMPOSITE *) NULL ) Error(37, 25, "run out of memory while reading font file %s", FATAL, &fpos(err), FileName(fnum)); for( i = 0; i < MAX_CHARS; i++ ) composite[i] = 0; /* i.e. not composite */ cmptop = 1; /* must avoid cmptop == 0 */ /* initialise kerning table for the new font */ ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 0, MAX_CHARS * sizeof(unsigned short))); kt = (unsigned short *) malloc(MAX_CHARS * sizeof(unsigned short)); if( kt == (unsigned short *) NULL ) Error(37, 25, "run out of memory while reading font file %s", FATAL, &fpos(err), FileName(fnum)); for( i = 0; i < MAX_CHARS; i++ ) kt[i] = 0; /* i.e. no kerns */ ks = (FULL_LENGTH *) NULL; /* i.e. no kern sizes */ /* read font metrics file fp */ xhfound = upfound = utfound = FALSE; xheight2 = under_thick = under_pos = 0; kc = (FULL_CHAR *) NULL; kv = (unsigned char *) NULL; ks = (FULL_LENGTH *) NULL; font_name_found = font_bbox_found = FALSE; lnum = 1; bbox_llx = bbox_lly = bbox_urx = bbox_ury = 0; while( (status = ReadOneLine(fp, buff, MAX_BUFF)) != 0 && !(buff[0] == 'E' && StringEqual(buff, AsciiToFull("EndFontMetrics"))) ) { lnum++; if( sscanf( (char *) buff, "%s", command) != EOF ) switch( command[0] ) { case 'U': if( StringEqual(command, AsciiToFull("UnderlinePosition")) ) { if( upfound ) { Error(37, 26, "UnderlinePosition found twice in font file (line %d)", FATAL, &fpos(AFMfilename), lnum); } sscanf( (char *) buff, "UnderlinePosition %f", &fl_under_pos); under_pos = fl_under_pos; upfound = TRUE; } else if( StringEqual(command, AsciiToFull("UnderlineThickness")) ) { if( utfound ) { Error(37, 27, "UnderlineThickness found twice in font file (line %d)", FATAL, &fpos(AFMfilename), lnum); } sscanf( (char *) buff, "UnderlineThickness %f", &fl_under_thick); under_thick = fl_under_thick; utfound = TRUE; } break; case 'X': if( StringEqual(command, AsciiToFull("XHeight")) ) { if( xhfound ) { Error(37, 28, "XHeight found twice in font file (line %d)", FATAL, &fpos(AFMfilename), lnum); } sscanf( (char *) buff, "XHeight %f", &fl_xheight2); xheight2 = fl_xheight2 / 2; xhfound = TRUE; } break; case 'F': if( StringEqual(command, AsciiToFull("FontName")) ) { if( font_name_found ) { Error(37, 29, "FontName found twice in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), lnum); } sscanf( (char *) buff, "FontName %s", command); if( StringEqual(command, STR_EMPTY) ) { Error(37, 30, "FontName empty in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), lnum); } Child(y, Down(face)); if( !StringEqual(command, string(y)) ) Error(37, 31, "FontName in font file (%s) and %s (%s) disagree", WARN, &fpos(AFMfilename), command, KW_FONTDEF, string(y)); font_name_found = TRUE; } else if( StringEqual(command, AsciiToFull("FontBBox")) ) { if( font_bbox_found ) { Error(37, 69, "FontBBox found twice in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), lnum); } if( sscanf( (char *) buff, "FontBBox %d %d %d %d", &bbox_llx, &bbox_lly, &bbox_urx, &bbox_ury) != 4 ) { Error(37, 70, "FontBBox format error in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), lnum); } font_bbox_found = TRUE; } break; case 'I': if( StringEqual(command, AsciiToFull("IsFixedPitch")) ) { sscanf( (char *) buff, "IsFixedPitch %s", command); if( StringEqual(command, AsciiToFull("true")) ) { fixed_pitch = TRUE; } } break; case 'S': if( StringEqual(command, AsciiToFull("StartCharMetrics")) ) { if( !font_name_found ) Error(37, 32, "FontName missing in file %s", FATAL, &fpos(AFMfilename), FileName(fnum)); if( !xhfound ) xheight2 = DEFAULT_XHEIGHT / 2; ReadCharMetrics(face, fixed_pitch, xheight2, lig, &ligtop, fnum, fnt, &lnum, fp); } else if( BackEnd->uses_font_metrics && Kern && StringEqual(command, AsciiToFull("StartKernPairs")) ) { FULL_CHAR ch1, ch2, last_ch1; FULL_CHAR name1[30], name2[30]; int kc_top, ks_top, pos, num_pairs, ksize; float fl_ksize; if( sscanf( (char *) buff, "StartKernPairs %d", &num_pairs) != 1 ) Error(37, 33, "syntax error on StartKernPairs line in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), lnum); kc_top = 1; ks_top = 1; ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 0, 2*num_pairs * sizeof(FULL_CHAR))); kc = (FULL_CHAR *) malloc(2 * num_pairs * sizeof(FULL_CHAR)); ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 0, 2 * num_pairs * sizeof(unsigned char))); kv = (unsigned char *) malloc(2 * num_pairs * sizeof(unsigned char)); ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 0, num_pairs * sizeof(FULL_LENGTH))); ks = (FULL_LENGTH *) malloc(num_pairs * sizeof(FULL_LENGTH)); last_ch1 = '\0'; while( ReadOneLine(fp, buff, MAX_BUFF) != 0 && !StringBeginsWith(buff, AsciiToFull("EndKernPairs")) ) { debug1(DFT, DD, "FontRead reading %s", buff); lnum++; if( StringBeginsWith(buff, AsciiToFull("KPX")) ) { /* get the two character names and kern size from buff */ if( sscanf((char *)buff, "KPX %s %s %f",name1,name2,&fl_ksize)!=3 ) Error(37, 34, "syntax error in font file %s (line %d): %s", FATAL, &fpos(AFMfilename), FileName(fnum), lnum, buff); /* ignore size 0 kern pairs (they are frequent, why?) */ ksize = fl_ksize; if( ksize == 0 ) continue; /* check that both characters are encoded */ ch1 = MapCharEncoding(name1, font_mapping(face)); if( ch1 == '\0' ) { continue; } ch2 = MapCharEncoding(name2, font_mapping(face)); if( ch2 == '\0' ) { continue; } /* check that ch1 is contiguous with previous occurrences */ if( ch1 != last_ch1 && kt[ch1] != 0 ) { Error(37, 35, "ignoring out-of-order kerning pair %s %s in font file %s (line %d)", WARN, &fpos(AFMfilename), name1, name2, FileName(fnum), lnum); continue; } last_ch1 = ch1; /* if ch1 never seen before, make new entry in kt[] and kc[] */ if( kt[ch1] == 0 ) { debug2(DFT, DD, " kt[%d] = %d", ch1, kc_top); kt[ch1] = kc_top; kc[kc_top] = (FULL_CHAR) '\0'; kv[kc_top] = 0; kc_top++; } /* find kerning size in ks[] or else add it to the end */ for( pos = 1; pos < ks_top; pos++ ) { if( ks[pos] == ksize ) break; } if( pos == ks_top ) { if( ks_top == num_pairs ) Error(37, 36, "too many kerning pairs in font file %s (line %d)", FATAL, &fpos(AFMfilename), FileName(fnum), lnum); debug2(DFT, DD, " ks[%d] = %d", pos, ksize); ks[pos] = ksize; ks_top++; } /* insert ch2 into the kc entries (sorted decreasing) for ch1 */ for( i = kc_top-1; i >= kt[ch1] && kc[i] < ch2; i-- ) { kc[i+1] = kc[i]; kv[i+1] = kv[i]; } if( i >= kt[ch1] && kc[i] == ch2 ) Error(37, 37, "kerning pair %s %s appears twice in font file %s (line %d)", FATAL, &fpos(AFMfilename), name1, name2, FileName(fnum), lnum); kc[i+1] = ch2; kv[i+1] = pos; kc_top++; } } ks[0] = ks_top; } break; default: break; } } /* make sure we terminated the font metrics file gracefully */ if( status == 0 ) Error(37, 38, "EndFontMetrics missing from font file %s", FATAL, &fpos(AFMfilename), FileName(fnum)); fclose(fp); fp = (FILE *) NULL; /* complete the initialization of first_size */ if( BackEnd->uses_font_metrics ) { font_xheight2(first_size) = xheight2; font_bbox_lly(first_size) = bbox_lly - xheight2; font_bbox_ury(first_size) = bbox_ury - xheight2; } else { font_xheight2(first_size) = PlainCharHeight / 4; font_bbox_lly(first_size) = - PlainCharHeight / 2; font_bbox_ury(first_size) = PlainCharHeight / 2; } ch = MapCharEncoding(STR_PS_SPACENAME, font_mapping(first_size)); font_spacewidth(first_size) = ch == '\0' ? 0 : fnt[ch].right; /***************************************************************************/ /* */ /* Read the optional Extra font metrics file, and record what's in it. */ /* */ /***************************************************************************/ if( Extrafilename != nilobj ) { debug0(DFS, D, " calling DefineFile from FontRead (extra_filename)"); extra_fnum = DefineFile(string(Extrafilename), STR_EMPTY, &fpos(Extrafilename), FONT_FILE, FONT_PATH); extra_fp = OpenFile(extra_fnum, FALSE, FALSE); if( extra_fp == NULL ) Error(37, 39, "cannot open extra font file %s", FATAL, &fpos(Extrafilename), FileName(extra_fnum)); lnum = 0; while( ReadOneLine(extra_fp, buff, MAX_BUFF) != 0 ) { debug1(DFT, DD, " Extra: %s", buff); lnum++; sscanf( (char *) buff, "%s", command); if( command[0] == 'S' ) { if( StringEqual(command, AsciiToFull("StartExtraCharMetrics")) ) { /* get extra character metrics, just like the others */ debug0(DFT, DD, " StartExtraCharMetrics calling ReadCharMetrics"); ReadCharMetrics(face, fixed_pitch, xheight2, lig, &ligtop, extra_fnum, fnt, &lnum, extra_fp); } else if( StringEqual(command, AsciiToFull("StartBuildComposites")) ) { /* build composites */ debug0(DFT, DD, " StartBuildComposites"); ReadCompositeMetrics(face, Extrafilename, extra_fnum, &lnum, composite, cmp, &cmptop, extra_fp); } } } fclose(extra_fp); extra_fp = (FILE *) NULL; } /***************************************************************************/ /* */ /* Set finfo[fontcount] and exit. */ /* */ /***************************************************************************/ finfo[font_count].font_table = first_size; finfo[font_count].original_face = face; finfo[font_count].underline_pos = xheight2 - under_pos; finfo[font_count].underline_thick = under_thick; finfo[font_count].size_table = fnt; finfo[font_count].lig_table = lig; finfo[font_count].composite = composite; finfo[font_count].cmp_table = cmp; finfo[font_count].cmp_top = cmptop; finfo[font_count].kern_table = kt; finfo[font_count].kern_chars = kc; finfo[font_count].kern_value = kv; finfo[font_count].kern_sizes = ks; ifdebug(DFT, DD, DebugKernTable(font_count)); debug4(DFT, DD, "FontRead returning: %d, name %s, fs %d, xh2 %d", font_count, string(first_size), font_size(first_size), xheight2); return face; } /* end FontRead */ /*@::FontChange()@************************************************************/ /* */ /* FontChange(style, x) */ /* */ /* Returns an internal font number which is the current font changed */ /* according to word object x. e.g. if current font is Roman 12p and x is */ /* "-3p", then FontChange returns the internal font number of Roman 9p. */ /* */ /* FontChange permits empty and null objects within x; these have no */ /* effect. */ /* */ /*****************************************************************************/ void FontChange(STYLE *style, OBJECT x) { /* register */ int i; OBJECT requested_family, requested_face, requested_size; OBJECT par[3], family, face, fsize, y = nilobj, link, new, old, tmpf; GAP gp; FULL_LENGTH flen = 0; int num, c; unsigned inc; struct metrics *newfnt, *oldfnt; FULL_CHAR *lig; int cmptop; COMPOSITE *oldcmp, *newcmp; FULL_LENGTH *oldks, *newks; int klen; debug2(DFT, D, "FontChange( %s, %s )", EchoStyle(style), EchoObject(x)); assert( font(*style) <= font_count, "FontChange: font_count!"); ifdebug(DFT, DD, FontDebug()); /***************************************************************************/ /* */ /* Analyse x, doing any small-caps, baselinemark, strut, and ligatures */ /* immediately, and putting all the other words of x into par[0 .. num-1] */ /* for further analysis. */ /* */ /***************************************************************************/ num = 0; switch( type(x) ) { case NULL_CLOS: /* acceptable, but do nothing */ break; case WORD: case QWORD: if( StringEqual(string(x), STR_SMALL_CAPS_ON) ) small_caps(*style) = SMALL_CAPS_ON; else if( StringEqual(string(x), STR_SMALL_CAPS_OFF) ) small_caps(*style) = SMALL_CAPS_OFF; else if( StringEqual(string(x), STR_BASELINE_MARK) ) baselinemark(*style) = TRUE; else if( StringEqual(string(x), STR_XHEIGHT2_MARK) ) baselinemark(*style) = FALSE; else if( StringEqual(string(x), STR_NOSTRUT) ) strut(*style) = FALSE; else if( StringEqual(string(x), STR_STRUT) ) strut(*style) = TRUE; else if( StringEqual(string(x), STR_LIG) ) ligatures(*style) = TRUE; else if( StringEqual(string(x), STR_NOLIG) ) ligatures(*style) = FALSE; else if( StringEqual(string(x), STR_SMALL_CAPS_SET) ) Error(37, 65, "%s in left parameter of %s must be followed by a value", WARN, &fpos(x), STR_SMALL_CAPS_SET, KW_FONT); else if( !StringEqual(string(x), STR_EMPTY) ) par[num++] = x; break; case ACAT: for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); debug1(DFT, DDD, " pars examining y = %s", EchoObject(y)); if( type(y) == GAP_OBJ || type(y) == NULL_CLOS ) continue; if( is_word(type(y)) ) { if( StringEqual(string(y), STR_SMALL_CAPS_ON) ) small_caps(*style) = SMALL_CAPS_ON; else if( StringEqual(string(y), STR_SMALL_CAPS_OFF) ) small_caps(*style) = SMALL_CAPS_OFF; else if( StringEqual(string(y), STR_BASELINE_MARK) ) baselinemark(*style) = TRUE; else if( StringEqual(string(y), STR_XHEIGHT2_MARK) ) baselinemark(*style) = FALSE; else if( StringEqual(string(y), STR_NOSTRUT) ) strut(*style) = FALSE; else if( StringEqual(string(y), STR_STRUT) ) strut(*style) = TRUE; else if( StringEqual(string(y), STR_LIG) ) ligatures(*style) = TRUE; else if( StringEqual(string(y), STR_NOLIG) ) ligatures(*style) = FALSE; else if( StringEqual(string(y), STR_SMALL_CAPS_SET) ) { if( NextDown(link) == x || NextDown(NextDown(link)) == x ) Error(37, 65, "%s in %s must be followed by a value", WARN, &fpos(x), STR_SMALL_CAPS_SET, KW_FONT); else { float tmpf; Child(y, NextDown(NextDown(link))); if( !is_word(type(y)) ) Error(37, 66, "%s in %s must be followed by a word", WARN, &fpos(x), STR_SMALL_CAPS_SET, KW_FONT); else if( sscanf( (char *) string(y), "%f", &tmpf) != 1 ) Error(37, 67, "%s in %s followed by \"%s\" (should be number)", WARN, &fpos(x), STR_SMALL_CAPS_SET, KW_FONT, string(y)); else if( tmpf <= 0 || tmpf >= 10 ) Error(37, 68, "%s in %s followed by unreasonable number \"%s\"", WARN, &fpos(x), STR_SMALL_CAPS_SET, KW_FONT, string(y)); else smallcaps_len(*style) = tmpf * FR; link = NextDown(NextDown(link)); } } else if( !StringEqual(string(y), STR_EMPTY) ) { if( num >= 3 ) { Error(37, 40, "error in left parameter of %s", WARN, &fpos(x), KW_FONT); debug0(DFT, D, "FontChange returning: ACAT children"); return; } debug2(DFT, DD, " par[%d]++ = %s", num, string(y)); par[num++] = y; } } else { Error(37, 41, "error in left parameter of %s", WARN, &fpos(x), KW_FONT); debug0(DFT, D, "FontChange returning: ACAT children"); return; } } break; default: Error(37, 42, "error in left parameter of %s", WARN, &fpos(x), KW_FONT); debug0(DFT, D, "FontChange returning: wrong type"); return; } debug1(DFT, DDD, " found pars, num = %d", num); if( num == 0 ) { debug1(DFT, D, "FontChange returning %s", EchoStyle(style)); return; } /***************************************************************************/ /* */ /* Extract size, family, and face changes (if any) from par[0 .. num-1]. */ /* */ /***************************************************************************/ /* extract fsize parameter, if any */ assert( num >= 1 && num <= 3, "FontChange: num!" ); requested_size = nilobj; for( i = 0; i < num; i++ ) { c = string(par[i])[0]; if( c == CH_INCGAP || c == CH_DECGAP || decimaldigit(c) ) { /* extract fsize, shuffle the rest down */ requested_size = par[i]; for( i = i + 1; i < num; i++ ) par[i-1] = par[i]; num--; } } /* what remains must be family and face */ switch( num ) { case 0: requested_family = requested_face = nilobj; break; case 1: requested_family = nilobj; requested_face = par[0]; break; case 2: requested_family = par[0]; requested_face = par[1]; break; default: Error(37, 43, "error in left parameter of %s", WARN, &fpos(x), KW_FONT); debug0(DFT, D, "FontChange returning: too many parameters"); return; break; } /* check for initial font case: must have family, face, and size */ if( font(*style) == NO_FONT && (requested_size == nilobj || requested_family == nilobj || requested_face == nilobj) ) Error(37, 44, "initial font must have family, face and size", FATAL, &fpos(x)); /***************************************************************************/ /* */ /* Either find the family and face already existing, or load them. */ /* */ /***************************************************************************/ /* get font family */ family = nilobj; if( requested_family != nilobj ) { /* search for this family */ for( link = Down(font_root); link != font_root; link = NextDown(link) ) { Child(y, link); if( StringEqual(string(requested_family), string(y)) ) break; } if( link != font_root ) family = y; } else { /* preserve current family */ assert( Up(finfo[font(*style)].font_table)!=finfo[font(*style)].font_table, "FontChange: Up(finfo[font(*style)].font_table) !" ); Parent(tmpf, Up(finfo[font(*style)].font_table)); assert( is_word(type(tmpf)), "FontChange: type(tmpf)!" ); assert( Up(tmpf) != tmpf, "FontChange: Up(tmpf)!" ); Parent(family, Up(tmpf)); assert( is_word(type(family)), "FontChange: type(family)!" ); } /* get font face, if have family */ face = nilobj; if( family != nilobj ) { if( requested_face != nilobj ) { /* search for this face in family */ for( link = Down(family); link != family; link = NextDown(link) ) { Child(y, link); if( StringEqual(string(requested_face), string(y)) ) break; } if( link != family ) face = y; } else { /* preserve current face */ Parent(face, Up(finfo[font(*style)].font_table)); assert( is_word(type(face)), "FontChange: type(face)!" ); assert( Up(face) != face, "FontChange: Up(face)!" ); } } if( face == nilobj ) { /* face not loaded, try the font databases */ assert( family != nilobj || requested_family != nilobj, "FontChange fr!" ); assert( requested_face != nilobj, "FontChange requested_face!"); if( family != nilobj ) requested_family = family; face = FontRead(string(requested_family), string(requested_face), x); if( face == nilobj ) { /* missing face name error; check whether a family name was intended */ for( link = Down(font_root); link != font_root; link = NextDown(link) ) { Child(y, link); if( StringEqual(string(y), string(requested_face)) ) break; } if( link != font_root ) Error(37, 45, "font family name %s must be followed by a face name", WARN, &fpos(requested_face), string(requested_face)); else Error(37, 46, "no database contains a font with family name %s and face name %s", WARN, &fpos(requested_face), string(requested_family), string(requested_face)); debug0(DFT, D, "FontChange returning (unable to set face)"); return; } } assert( Down(face) != face, "FontChange: no children!" ); assert( NextDown(Down(face)) != face, "FontChange: 1 child!" ); assert( NextDown(NextDown(Down(face))) != face, "FontChange: 2 children!" ); /***************************************************************************/ /* */ /* Now have family and face; search for size and return it if found. */ /* */ /***************************************************************************/ /* get font size as integer flen */ if( requested_size == nilobj ) flen = font_size(finfo[font(*style)].font_table); else { GetGap(requested_size, style, &gp, &inc); if( mode(gp) != EDGE_MODE || units(gp) != FIXED_UNIT ) { Error(37, 47, "syntax error in font size %s; ignoring it", WARN, &fpos(requested_size), string(requested_size)); flen = font_size(finfo[font(*style)].font_table); } else if( inc == GAP_ABS ) flen = width(gp); else if( font(*style) == NO_FONT ) { Error(37, 48, "no current font on which to base size change %s", FATAL, &fpos(requested_size), string(requested_size)); } else if( inc == GAP_INC ) flen = font_size(finfo[font(*style)].font_table) + width(gp); else if( inc == GAP_DEC ) flen = font_size(finfo[font(*style)].font_table) - width(gp); else Error(37, 49, "FontChange: %d", INTERN, &fpos(x), inc); } if( flen <= 0 ) { Error(37, 50, "%s %s ignored (result is not positive)", WARN, &fpos(requested_size), string(requested_size), KW_FONT); debug0(DFT, D,"FontChange returning (non-positive size)"); return; } /* search fonts of face for desired size; return if already present */ if( !(BackEnd->uses_font_metrics) ) flen = PlainCharHeight; for( link=NextDown(NextDown(Down(face))); link!=face; link = NextDown(link) ) { Child(fsize, link); if( font_size(fsize) == flen ) { font(*style) = font_num(fsize); SetGap(space_gap(*style), nobreak(space_gap(*style)), FALSE, TRUE, FIXED_UNIT, EDGE_MODE, font_spacewidth(fsize)); debug2(DFT, D,"FontChange returning (old) %d (XHeight2 = %d)", font(*style), font_xheight2(finfo[font(*style)].font_table)); return; } } /***************************************************************************/ /* */ /* No suitable size right now, so scale the original size and exit. */ /* */ /***************************************************************************/ /* get a new number for this new size */ if( ++font_count >= finfo_size ) { if( font_count > MAX_FONT ) Error(37, 51, "too many different fonts and sizes (max is %d)", FATAL, &fpos(x), MAX_FONT); ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, -1, -finfo_size * sizeof(FONT_INFO))); finfo_size *= 2; ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 1, finfo_size * sizeof(FONT_INFO))); finfo = (FONT_INFO *) realloc(finfo, finfo_size * sizeof(FONT_INFO)); if( finfo == (FONT_INFO *) NULL ) Error(37, 52, "run out of memory when increasing font table size", FATAL, &fpos(x)); } /* create a new sized font record */ Child(old, NextDown(NextDown(Down(face)))); assert( is_word(type(old)), "FontChange: old!" ); new = MakeWord(WORD, string(old), no_fpos); Link(face, new); font_num(new) = font_count; font_size(new) = BackEnd->uses_font_metrics ? flen : font_size(old); font_xheight2(new) = font_xheight2(old) * font_size(new) / font_size(old); font_bbox_lly(new) = font_bbox_lly(old) * font_size(new) / font_size(old); font_bbox_ury(new) = font_bbox_ury(old) * font_size(new) / font_size(old); font_recoded(new) = font_recoded(old); font_mapping(new) = font_mapping(old); font_spacewidth(new) = font_spacewidth(old) * font_size(new)/font_size(old); finfo[font_count].font_table = new; finfo[font_count].original_face = face; finfo[font_count].underline_pos = (finfo[font_num(old)].underline_pos * font_size(new)) / font_size(old); finfo[font_count].underline_thick = (finfo[font_num(old)].underline_thick * font_size(new)) / font_size(old); ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 1, MAX_CHARS * sizeof(struct metrics))); finfo[font_count].size_table = (struct metrics *) malloc(MAX_CHARS * sizeof(struct metrics)); if( finfo[font_count].size_table == (struct metrics *) NULL ) Error(37, 53, "run out of memory when changing font or font size", FATAL, &fpos(x)); finfo[font_count].lig_table = lig = finfo[font_num(old)].lig_table; /* scale old font to new size */ newfnt = finfo[font_num(new)].size_table; oldfnt = finfo[font_num(old)].size_table; for( i = 0; i < MAX_CHARS; i++ ) if( lig[i] != 1 ) { newfnt[i].left = (oldfnt[i].left * font_size(new)) / font_size(old); newfnt[i].right = (oldfnt[i].right * font_size(new)) / font_size(old); newfnt[i].down = (oldfnt[i].down * font_size(new)) / font_size(old); newfnt[i].up = (oldfnt[i].up * font_size(new)) / font_size(old); newfnt[i].last_adjust = (oldfnt[i].last_adjust * font_size(new)) / font_size(old); } /* copy and scale composite table */ finfo[font_count].composite = finfo[font_num(old)].composite; finfo[font_count].cmp_top = cmptop = finfo[font_num(old)].cmp_top; oldcmp = finfo[font_num(old)].cmp_table; newcmp = (COMPOSITE *) malloc(cmptop*sizeof(COMPOSITE)); if( newcmp == (COMPOSITE *) NULL ) Error(37, 54, "run out of memory when changing font or font size", FATAL, &fpos(x)); for( i = 1; i < cmptop; i++ ) /* NB position 0 is unused */ { newcmp[i].char_code = oldcmp[i].char_code; if( newcmp[i].char_code != (FULL_CHAR) '\0' ) { newcmp[i].x_offset = (oldcmp[i].x_offset*font_size(new)) / font_size(old); newcmp[i].y_offset = (oldcmp[i].y_offset*font_size(new)) / font_size(old); debug5(DFT, DD, "FontChange scales composite %d from (%d, %d) to (%d, %d)", (int) newcmp[i].char_code, oldcmp[i].x_offset, oldcmp[i].y_offset, newcmp[i].x_offset, newcmp[i].y_offset); } } finfo[font_count].cmp_table = newcmp; /* copy and scale kerning tables */ finfo[font_count].kern_table = finfo[font_num(old)].kern_table; finfo[font_count].kern_chars = finfo[font_num(old)].kern_chars; finfo[font_count].kern_value = finfo[font_num(old)].kern_value; oldks = finfo[font_num(old)].kern_sizes; if( oldks != (FULL_LENGTH *) NULL ) { klen = oldks[0]; ifdebug(DMA, D, DebugRegisterUsage(MEM_FONTS, 0, klen * sizeof(FULL_LENGTH))); finfo[font_count].kern_sizes = newks = (FULL_LENGTH *) malloc(klen * sizeof(FULL_LENGTH)); if( newks == (FULL_LENGTH *) NULL ) Error(37, 55, "run out of memory when changing font or font size", FATAL, &fpos(x)); newks[0] = klen; for( i = 1; i < klen; i++ ) newks[i] = (oldks[i] * font_size(new)) / font_size(old); } else finfo[font_count].kern_sizes = (FULL_LENGTH *) NULL; /* return new font number and exit */ font(*style) = font_count; SetGap(space_gap(*style), nobreak(space_gap(*style)), FALSE, TRUE, FIXED_UNIT, EDGE_MODE, font_spacewidth(new)); debug2(DFT, D,"FontChange returning (scaled) %d (XHeight2 = %d)", font(*style), font_xheight2(finfo[font(*style)].font_table)); /* FontDebug(); */ } /* end FontChange */ /*****************************************************************************/ /* */ /* FULL_LENGTH FontKernLength(FONT_NUM fnum, FULL_CHAR *unacc_map, */ /* FULL_CHAR ch1, FULL_CHAR ch2) */ /* */ /* Set res to the kern length between ch1 and ch2 in font fnum, or 0 if */ /* none. */ /* */ /* Parameter unacc_map is the mapping from characters to their unaccented */ /* versions. If no kerning data is available for ch1 and ch2, then their */ /* unaccented versions are used instead. */ /* */ /*****************************************************************************/ /* *** old version which just used the unaccented characters FULL_LENGTH FontKernLength(FONT_NUM fnum, FULL_CHAR *unacc_map, FULL_CHAR ch1, FULL_CHAR ch2) { FULL_LENGTH res; int ua_ch1, ua_ch2, i, j; ua_ch1 = unacc_map[ch1]; ua_ch2 = unacc_map[ch2]; i = finfo[fnum].kern_table[ua_ch1]; if( i == 0 ) res = 0; else { FULL_CHAR *kc = finfo[fnum].kern_chars; for( j = i; kc[j] > ua_ch2; j++ ); res = (kc[j] == ua_ch2) ? finfo[fnum].kern_sizes[finfo[fnum].kern_value[j]] : 0; } return res; } *** */ FULL_LENGTH FontKernLength(FONT_NUM fnum, FULL_CHAR *unacc_map, FULL_CHAR ch1, FULL_CHAR ch2) { int ua_ch1, ua_ch2, i, j; FULL_CHAR *kc = finfo[fnum].kern_chars; /* search for a kern pair of the original characters */ i = finfo[fnum].kern_table[ch1]; if( i > 0 ) { for( j = i; kc[j] > ch2; j++ ); if( kc[j] == ch2 ) return finfo[fnum].kern_sizes[finfo[fnum].kern_value[j]]; } /* no luck, so search for a kern pair of their unaccented versions */ ua_ch1 = unacc_map[ch1]; ua_ch2 = unacc_map[ch2]; if( ua_ch1 != ch1 || ua_ch2 != ch2 ) { i = finfo[fnum].kern_table[ua_ch1]; if( i > 0 ) { for( j = i; kc[j] > ua_ch2; j++ ); if( kc[j] == ua_ch2 ) return finfo[fnum].kern_sizes[finfo[fnum].kern_value[j]]; } } /* no luck again, so return 0 */ return 0; } /* end FontKernLength */ /*@::FontWordSize()@**********************************************************/ /* */ /* FontWordSize(x) */ /* */ /* Calculate the horizontal and vertical size of WORD or QWORD x, including */ /* the effect of ligature sequences but not replacing them with ligatures. */ /* */ /*****************************************************************************/ void FontWordSize(OBJECT x) { FULL_CHAR *p, *q, *a, *b, *lig, *unacc, *acc; OBJECT tmp; FULL_CHAR buff[MAX_BUFF]; MAPPING m; int r, u, d, ksize; struct metrics *fnt; debug2(DFT, DD, "FontWordSize( %s ), font = %d", string(x), word_font(x)); assert( is_word(type(x)), "FontWordSize: !is_word(type(x))!" ); p = string(x); q = buff; if( *p ) { if( word_font(x) < 1 || word_font(x) > font_count ) Error(37, 56, "no current font at word %s", FATAL, &fpos(x), string(x)); if( word_colour(x) == 0 && BackEnd->colour_avail ) Error(37, 57, "no current colour at word %s", FATAL, &fpos(x), string(x)); if( word_language(x) == 0 ) Error(37, 58, "no current language at word %s", FATAL,&fpos(x),string(x)); fnt = finfo[word_font(x)].size_table; lig = finfo[word_font(x)].lig_table; m = font_mapping(finfo[word_font(x)].font_table); unacc = MapTable[m]->map[MAP_UNACCENTED]; acc = MapTable[m]->map[MAP_ACCENT]; d = u = r = 0; do { /* check for missing glyph (lig[] == 1) or ligatures (lig[] > 1) */ debug2(DFT, DD, " examining `%c' lig = %d", *p, lig[*p]); if( lig[*q = *p++] ) { if( lig[*q] == 1 ) { tmp = MakeWord(QWORD, STR_SPACE, &fpos(x)); string(tmp)[0] = *q; /* bug fix: unaccented version exists if unacc differs from self */ if( unacc[*q] != *q ) { debug2(DFT, DD, " unacc[%c] = `%c'", *q, unacc[*q]); fnt[*q].up = fnt[unacc[*q]].up; fnt[*q].down = fnt[unacc[*q]].down; fnt[*q].left = fnt[unacc[*q]].left; fnt[*q].right = fnt[unacc[*q]].right; fnt[*q].last_adjust = fnt[unacc[*q]].last_adjust; lig[*q] = 0; } else { debug1(DFT, DD, " unacc[%c] = 0, replacing by space", *q); Error(37, 60, "character %s replaced by space (it has no glyph in font %s)", WARN, &fpos(x), StringQuotedWord(tmp), FontFamilyAndFace(word_font(x))); *(p-1) = *q = CH_SPACE; } Dispose(tmp); } else if( word_ligatures(x) ) { debug1(DFT, DD, " processing ligature beginning at %c", *q); a = &lig[ lig[*(p-1)] + MAX_CHARS ]; while( *a++ == *(p-1) ) { b = p; while( *a == *b && *(a+1) != '\0' && *b != '\0' ) a++, b++; if( *(a+1) == '\0' ) { *q = *a; p = b; break; } else { while( *++a ); a++; } } } else debug1(DFT, DD, " ignoring ligature beginning at %c", *q); } /* accumulate size of *q */ if( fnt[*q].up > u ) u = fnt[*q].up; if( fnt[*q].down < d ) d = fnt[*q].down; r += fnt[*q++].right; } while( *p ); *q = '\0'; /* adjust for last character */ r += fnt[*(q-1)].last_adjust; /* add kern lengths to r */ for( p = buff, q = p+1; *q; p++, q++ ) { ksize = FontKernLength(word_font(x), unacc, *p, *q); debugcond3(DFT, DD, ksize != 0, " FontKernLength(fnum, %c, %c) = %d", *p, *q, ksize); r += ksize; } /* set sizes of x */ back(x, COLM) = 0; fwd(x, COLM) = r; if( word_strut(x) ) { int vadjust; vadjust = font_bbox_ury(finfo[word_font(x)].font_table); u = find_max(u, vadjust); vadjust = font_bbox_lly(finfo[word_font(x)].font_table); d = find_min(d, vadjust); } if( word_baselinemark(x) ) { int vadjust = font_xheight2(finfo[word_font(x)].font_table); back(x, ROWM) = u + vadjust; fwd(x, ROWM) = -d - vadjust; } else { back(x, ROWM) = u; fwd(x, ROWM) = -d; } } else back(x, COLM) = fwd(x, COLM) = back(x, ROWM) = fwd(x, ROWM) = 0; debug4(DFT, DD, "FontWordSize returning %hd %hd %hd %hd", back(x, COLM), fwd(x, COLM), back(x, ROWM), fwd(x, ROWM)); } /* end FontWordSize */ /*@::FontSize(), FontHalfXHeight(), FontEncoding(), FontName()@***************/ /* */ /* FULL_LENGTH FontSize(fnum, x) */ /* */ /* Return the size of this font. x is for error messages only, and may be */ /* nilobj if fnum is certain not to be NO_FONT. */ /* */ /*****************************************************************************/ FULL_LENGTH FontSize(FONT_NUM fnum, OBJECT x) { debug1(DFT, D, "FontSize( %d )", fnum); assert( fnum <= font_count, "FontSize!" ); if( fnum <= 0 ) Error(37, 61, "no current font at this point", FATAL, &fpos(x)); debug1(DFT, D, "FontSize returning %d", font_size(finfo[fnum].font_table)); return font_size(finfo[fnum].font_table); } /* end FontSize */ /*****************************************************************************/ /* */ /* FULL_LENGTH FontHalfXHeight(fnum) */ /* */ /* Return the xheight2 value of this font. */ /* */ /*****************************************************************************/ FULL_LENGTH FontHalfXHeight(FONT_NUM fnum) { debug1(DFT, DD, "FontHalfXHeight( %d )", fnum); assert( fnum <= font_count, "FontHalfXHeight!" ); debug1(DFT, DD, "FontHalfXHeight returning %d", font_xheight2(finfo[fnum].font_table)); return font_xheight2(finfo[fnum].font_table); } /* end FontHalfXHeight */ /*****************************************************************************/ /* */ /* MAPPING FontMapping(fnum, xfpos) */ /* */ /* Return the character mapping of this font, to use for small caps, etc. */ /* xfpos is the file position for error messages. */ /* */ /*****************************************************************************/ MAPPING FontMapping(FONT_NUM fnum, FILE_POS *xfpos) { debug1(DFT, DD, "FontMapping( %d )", fnum); assert( fnum <= font_count, "FontMapping!" ); if( fnum <= 0 ) Error(37, 62, "no current font at this point", FATAL, xfpos); debug1(DFT, DD, "FontMapping returning %d", font_mapping(finfo[fnum].font_table)); return font_mapping(finfo[fnum].font_table); } /* end FontMapping */ /*****************************************************************************/ /* */ /* FULL_CHAR *FontName(fnum) */ /* */ /* Return the short PostScript name of this font. */ /* */ /*****************************************************************************/ FULL_CHAR *FontName(FONT_NUM fnum) { debug1(DFT, D, "FontName( %d )", fnum); assert( fnum <= font_count, "FontName!" ); debug1(DFT, D, "FontName returning %s", string(finfo[fnum].font_table)); return string(finfo[fnum].font_table); } /* end FontName */ /*@::FontFamily(), FontFace@**************************************************/ /* */ /* FULL_CHAR *FontFamilyAndFace(fnum) */ /* */ /* Return a static string of the current font family and face. */ /* */ /*****************************************************************************/ FULL_CHAR *FontFamily(FONT_NUM fnum) { OBJECT face, family; debug1(DFT, D, "FontFamily( %d )", fnum); assert( fnum <= font_count, "FontFamiliy!" ); Parent(face, Up(finfo[fnum].font_table)); Parent(family, Up(face)); debug1(DFT, D, "FontFamily returning %s", string(family)); return string(family); } /* end FontFamilyAndFace */ FULL_CHAR *FontFace(FONT_NUM fnum) { OBJECT face, family; debug1(DFT, D, "FontFacec( %d )", fnum); assert( fnum <= font_count, "FontFamiliy!" ); Parent(face, Up(finfo[fnum].font_table)); Parent(family, Up(face)); debug1(DFT, D, "FontFace returning %s", string(face)); return string(face); } /* end FontFamilyAndFace */ /*@::FontFamilyAndFace(), FontPrintAll()@*************************************/ /* */ /* FULL_CHAR *FontFamilyAndFace(fnum) */ /* */ /* Return a static string of the current font family and face. */ /* */ /*****************************************************************************/ FULL_CHAR *FontFamilyAndFace(FONT_NUM fnum) { OBJECT face, family; static FULL_CHAR buff[80]; debug1(DFT, D, "FontFamilyAndFace( %d )", fnum); assert( fnum <= font_count, "FontName!" ); Parent(face, Up(finfo[fnum].font_table)); Parent(family, Up(face)); if( StringLength(string(family)) + StringLength(string(face)) + 1 > 80 ) Error(37, 63, "family and face names %s %s are too long", FATAL, no_fpos, string(family), string(face)); StringCopy(buff, string(family)); StringCat(buff, STR_SPACE); StringCat(buff, string(face)); debug1(DFT, D, "FontName returning %s", buff); return buff; } /* end FontFamilyAndFace */ /*****************************************************************************/ /* */ /* FontPrintAll(fp) */ /* */ /* Print all font encoding commands on output file fp */ /* */ /*****************************************************************************/ void FontPrintAll(FILE *fp) { OBJECT family, face, first_size, ps_name, link, flink; assert(font_root!=nilobj && type(font_root)==ACAT, "FontDebug: font_root!"); debug0(DFT, DD, "FontPrintAll(fp)"); for( link = Down(font_root); link != font_root; link = NextDown(link) ) { Child(family, link); assert( is_word(type(family)), "FontPrintAll: family!" ); for( flink = Down(family); flink != family; flink = NextDown(flink) ) { Child(face, flink); assert( is_word(type(face)), "FontPrintAll: face!" ); assert( Down(face) != face && NextDown(Down(face)) != face && NextDown(NextDown(Down(face))) != face, "FontDebug: Down(face)!"); Child(ps_name, Down(face)); assert( is_word(type(ps_name)), "FontPrintAll: ps_name!" ); Child(first_size, NextDown(NextDown(Down(face)))); assert( is_word(type(first_size)), "FontPrintAll: first_size!" ); if( font_recoded(face) ) { fprintf(fp, "/%s%s %s /%s LoutRecode%s", string(ps_name), string(first_size), MapEncodingName(font_mapping(face)), string(ps_name), (char *) STR_NEWLINE); fprintf(fp, "/%s { /%s%s LoutFont } def%s", string(first_size), string(ps_name), string(first_size), (char *) STR_NEWLINE); } else fprintf(fp, "/%s { /%s LoutFont } def%s", string(first_size), string(ps_name), (char *) STR_NEWLINE); } } fputs((char *) STR_NEWLINE, fp); debug0(DFT, DD, "FontPrintAll returning."); } /* end FontPrintAll */ /*@@**************************************************************************/ /* */ /* FontPrintPageSetup(fp) */ /* */ /* Print all font encoding commands needed for the current page onto fp. */ /* */ /*****************************************************************************/ void FontPrintPageSetup(FILE *fp) { OBJECT face, first_size, ps_name, link; assert(font_root!=nilobj && type(font_root)==ACAT, "FontDebug: font_root!"); assert(font_used!=nilobj && type(font_used)==ACAT, "FontDebug: font_used!"); debug0(DFT, DD, "FontPrintPageSetup(fp)"); for( link = Down(font_used); link != font_used; link = NextDown(link) ) { Child(face, link); assert( is_word(type(face)), "FontPrintPageSetup: face!" ); assert( Down(face) != face, "FontDebug: Down(face)!"); /* print font encoding command */ Child(first_size, NextDown(NextDown(Down(face)))); assert( is_word(type(first_size)), "FontPrintPageSetup: first_size!" ); Child(ps_name, Down(face)); assert( is_word(type(ps_name)), "FontPrintPageSetup: ps_name!" ); BackEnd->PrintPageSetupForFont(face, font_curr_page, string(ps_name), string(first_size)); } debug0(DFT, DD, "FontPrintPageSetup returning."); } /* end FontPrintPageSetup */ /*@@**************************************************************************/ /* */ /* FontPrintPageResources(fp) */ /* */ /* Print all page resources (i.e. fonts needed or supplied) onto fp. */ /* */ /*****************************************************************************/ void FontPrintPageResources(FILE *fp) { OBJECT face, ps_name, link, pface, pname, plink; BOOLEAN first; assert(font_root!=nilobj && type(font_root)==ACAT, "FontDebug: font_root!"); assert(font_used!=nilobj && type(font_used)==ACAT, "FontDebug: font_used!"); debug0(DFT, DD, "FontPrintPageResources(fp)"); first = TRUE; for( link = Down(font_used); link != font_used; link = NextDown(link) ) { Child(face, link); assert( is_word(type(face)), "FontPrintPageResources: face!" ); assert( Down(face) != face, "FontDebug: Down(face)!"); Child(ps_name, Down(face)); assert( is_word(type(ps_name)), "FontPrintPageResources: ps_name!" ); /* make sure this ps_name has not been printed before (ugly, I know). */ /* Repeats arise when the font appears twice in the database under */ /* different family-face names, perhaps because of sysnonyms like */ /* Italic and Slope, or perhaps because of different encoding vectors */ for( plink = Down(font_used); plink != link; plink = NextDown(plink) ) { Child(pface, plink); Child(pname, Down(pface)); if( StringEqual(string(pname), string(ps_name)) ) break; } if( plink == link ) { /* not seen before, so print it */ BackEnd->PrintPageResourceForFont(string(ps_name), first); first = FALSE; } } debug0(DFT, DD, "FontPrintPageResources returning."); } /* end FontPrintPageResources */ /*@@**************************************************************************/ /* */ /* FontAdvanceCurrentPage() */ /* */ /* Advance the current page. */ /* */ /*****************************************************************************/ void FontAdvanceCurrentPage(void) { debug0(DFT, DD, "FontAdvanceCurrentPage()"); while( Down(font_used) != font_used ) DeleteLink(Down(font_used)); font_curr_page++; debug0(DFT, DD, "FontAdvanceCurrentPage() returning."); } /* end FontAdvanceCurrentPage */ /*@::FontPageUsed()@**********************************************************/ /* */ /* OBJECT FontPageUsed(face) */ /* */ /* Declares that font face is used on the current page. */ /* */ /*****************************************************************************/ void FontPageUsed(OBJECT face) { debug1(DFT, DD, "FontPageUsed(%d)", font_num(face)); assert( font_page(face) < font_curr_page, "FontPageUsed!" ); Link(font_used, face); font_page(face) = font_curr_page; debug0(DFT, DD, "FontPageUsed returning"); } /* end FontPageUsed */ /*@::FontNeeded()@************************************************************/ /* */ /* OBJECT FontNeeded(fp) */ /* */ /* Writes font needed resources onto file out_fp. Returns TRUE if none. */ /* Now that we are using a database, every font that is actually loaded */ /* is really needed. */ /* */ /*****************************************************************************/ BOOLEAN FontNeeded(FILE *fp) { BOOLEAN first_need = TRUE; OBJECT link, flink, family, face, ps_name; for( link = Down(font_root); link != font_root; link = NextDown(link) ) { Child(family, link); for( flink = Down(family); flink != family; flink = NextDown(flink) ) { Child(face, flink); Child(ps_name, Down(face)); assert( is_word(type(ps_name)), "FontPrintPageResources: ps_name!" ); fprintf(fp, "%s font %s%s", first_need ? "%%DocumentNeededResources:" : "%%+", string(ps_name), (char *) STR_NEWLINE); first_need = FALSE; } } return first_need; } /* end FontNeeded */ /*@::FontGlyphHeight()@*******************************************************/ /* */ /* FULL_LENGTH FontGlyphHeight(fnum, chr) */ /* */ /* Contributed as part of margin kerning by Ludovic Courtes. */ /* */ /* Return the height of the glyph that corresponds to character chr in */ /* font fnum. */ /* */ /*****************************************************************************/ FULL_LENGTH FontGlyphHeight(FONT_NUM fnum, FULL_CHAR chr) { struct metrics *fnt; assert ((fnum >= 1) && (fnum <= font_count), "FontGlyphHeight"); fnt = finfo[fnum].size_table; return (fnt ? fnt[chr].up - fnt[chr].down : 0); } /*****************************************************************************/ /* */ /* FULL_LENGTH FontGlyphWidth(fnum, chr) */ /* */ /* Contributed as part of margin kerning by Ludovic Courtes. */ /* */ /* Return the width of the glyph that corresponds to character chr in */ /* font fnum. */ /* */ /*****************************************************************************/ FULL_LENGTH FontGlyphWidth(FONT_NUM fnum, FULL_CHAR chr) { struct metrics *fnt; assert ((fnum >= 1) && (fnum <= font_count), "FontGlyphWidth"); fnt = finfo[fnum].size_table; return (fnt ? fnt[chr].right - fnt[chr].left : 0); } lout-3.39/z24.c0000644000076400007640000002066211442244605011644 0ustar jeffjeff/*@z24.c:Print Service:PrintInit()@*******************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* PDF Back End by Vincent Tan, February 1998. */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z24.c */ /* MODULE: Print Service */ /* EXTERNS: EightBitToPrintForm */ /* */ /* This module used to be a combined implementation of all the back */ /* ends. Now these have been split off into separate files, there is */ /* very little left in this module. */ /* */ /*****************************************************************************/ #include "externs.h" /*@::EightBitToPrintForm()@***************************************************/ /* */ /* char *EightBitToPrintForm[] */ /* */ /* Given 8-bit character i, returns a string of characters that will be */ /* interpreted by PostScript as character i when read within a string. */ /* */ /* CHAR_OUT==1 Printable ASCII literal, others as escape sequences */ /* CHAR_OUT==2 Printable ISO-LATIN-1 literal, others escaped */ /* */ /*****************************************************************************/ char *EightBitToPrintForm[] = { #if CHAR_OUT==0 "", "\\001", "\\002", "\\003", "\\004", "\\005", "\\006", "\\007", "\\010", "\\011", "\\012", "\\013", "\\014", "\\015", "\\016", "\\017", "\\020", "\\021", "\\022", "\\023", "\\024", "\\025", "\\026", "\\027", "\\030", "\\031", "\\032", "\\033", "\\034", "\\035", "\\036", "\\037", " ", "!", "\"", "#", "$", "%", "&", "'", "\\(", "\\)", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "\\177", "\\200", "\\201", "\\202", "\\203", "\\204", "\\205", "\\206", "\\207", "\\210", "\\211", "\\212", "\\213", "\\214", "\\215", "\\216", "\\217", "\\220", "\\221", "\\222", "\\223", "\\224", "\\225", "\\226", "\\227", "\\230", "\\231", "\\232", "\\233", "\\234", "\\235", "\\236", "\\237", "\\240", "\\241", "\\242", "\\243", "\\244", "\\245", "\\246", "\\247", "\\250", "\\251", "\\252", "\\253", "\\254", "\\255", "\\256", "\\257", "\\260", "\\261", "\\262", "\\263", "\\264", "\\265", "\\266", "\\267", "\\270", "\\271", "\\272", "\\273", "\\274", "\\275", "\\276", "\\277", "\\300", "\\301", "\\302", "\\303", "\\304", "\\305", "\\306", "\\307", "\\310", "\\311", "\\312", "\\313", "\\314", "\\315", "\\316", "\\317", "\\320", "\\321", "\\322", "\\323", "\\324", "\\325", "\\326", "\\327", "\\330", "\\331", "\\332", "\\333", "\\334", "\\335", "\\336", "\\337", "\\340", "\\341", "\\342", "\\343", "\\344", "\\345", "\\346", "\\347", "\\350", "\\351", "\\352", "\\353", "\\354", "\\355", "\\356", "\\357", "\\360", "\\361", "\\362", "\\363", "\\364", "\\365", "\\366", "\\367", "\\370", "\\371", "\\372", "\\373", "\\374", "\\375", "\\376", "\\377" #else #if CHAR_OUT==1 "", "\\001", "\\002", "\\003", "\\004", "\\005", "\\006", "\\007", "\\010", "\\011", "\\012", "\\013", "\\014", "\\015", "\\016", "\\017", "\\020", "\\021", "\\022", "\\023", "\\024", "\\025", "\\026", "\\027", "\\030", "\\031", "\\032", "\\033", "\\034", "\\035", "\\036", "\\037", " ", "!", "\"", "#", "$", "%", "&", "'", "\\(", "\\)", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "\\177", "\\200", "\\201", "\\202", "\\203", "\\204", "\\205", "\\206", "\\207", "\\210", "\\211", "\\212", "\\213", "\\214", "\\215", "\\216", "\\217", "\220", "\221", "\222", "\223", "\224", "\225", "\226", "\227", "\230", "\\231", "\232", "\233", "\\234", "\235", "\236", "\237", "\240", "\241", "\242", "\243", "\244", "\245", "\246", "\247", "\250", "\251", "\252", "\253", "\254", "\255", "\256", "\257", "\260", "\261", "\262", "\263", "\264", "\265", "\266", "\267", "\270", "\271", "\272", "\273", "\274", "\275", "\276", "\277", "\300", "\301", "\302", "\303", "\304", "\305", "\306", "\307", "\310", "\311", "\312", "\313", "\314", "\315", "\316", "\317", "\320", "\321", "\322", "\323", "\324", "\325", "\326", "\327", "\330", "\331", "\332", "\333", "\334", "\335", "\336", "\337", "\340", "\341", "\342", "\343", "\344", "\345", "\346", "\347", "\350", "\351", "\352", "\353", "\354", "\355", "\356", "\357", "\360", "\361", "\362", "\363", "\364", "\365", "\366", "\367", "\370", "\371", "\372", "\373", "\374", "\375", "\376", "\377" #else If you are trying to compile this you have the wrong CHAR_OUT value! #endif #endif }; lout-3.39/z23.c0000644000076400007640000015507511442244602011647 0ustar jeffjeff/*@z23.c:Galley Printer:ScaleFactor()@****************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z23.c */ /* MODULE: Galley Printer */ /* EXTERNS: FixAndPrintObject() */ /* */ /*****************************************************************************/ #include "externs.h" #define NO_SUPPRESS FALSE #define SUPPRESS TRUE #define word_equal(x, str) (is_word(type(x)) && StringEqual(string(x), str)) /*****************************************************************************/ /* */ /* FirstDefiniteLDN(x, link, y, jn, ymk, dim, sp, pg) */ /* NextDefiniteWithGapLDN(x, link, y, g, jn, ymk, dim, sp, pg) */ /* */ /* Like FirstDefinite and NextDefiniteWithGap but during the scan, if a */ /* LINK_DEST_NULL is encountered, call FixAndPrintObject on it before */ /* continuing on to find the next definite object. */ /* */ /*****************************************************************************/ #define FirstDefiniteLDN(x, link, y, jn, ymk, dim, sp, pg) \ { jn = TRUE; \ for( link = Down(x); link != x; link = NextDown(link) ) \ { Child(y, link); \ if( type(y) == GAP_OBJ ) jn = jn && join(gap(y)); \ else if( type(y)==SPLIT ? SplitIsDefinite(y) : is_definite(type(y)))\ break; \ else if( type(y) == LINK_DEST_NULL ) \ FixAndPrintObject(y, ymk, 0, 0, dim, sp, pg, 0, &aback, &afwd); \ } \ } /* end FirstDefiniteLDN */ #define NextDefiniteWithGapLDN(x, link, y, g, jn, ymk, dim, sp, pg) \ { g = nilobj; jn = TRUE; \ for( link = NextDown(link); link != x; link = NextDown(link) ) \ { Child(y, link); \ if( type(y) == GAP_OBJ ) g = y, jn = jn && join(gap(y)); \ else if( type(y)==SPLIT ? SplitIsDefinite(y):is_definite(type(y)) ) \ { \ debug2(DFS, DD, " NextDefiniteWithGapLDN at %s %s", \ Image(type(y)), EchoObject(y)); \ assert( g != nilobj, "NextDefiniteWithGap: g == nilobj!" ); \ break; \ } \ else if( type(y) == LINK_DEST_NULL ) \ FixAndPrintObject(y, ymk, 0, 0, dim, sp, pg, 0, &aback, &afwd); \ } \ } /* end NextDefiniteWithGapLDN */ /*****************************************************************************/ /* */ /* static float ScaleFactor(avail_size, inner_size) */ /* */ /* Return the scale factor for this scaling, or 0 if impossible. */ /* */ /*****************************************************************************/ static float ScaleFactor(FULL_LENGTH avail_size, FULL_LENGTH inner_size) { float scale_factor; scale_factor = avail_size <= 0 ? 0 : inner_size <= 0 ? 0 : (float) avail_size / inner_size; return scale_factor; } /*@::FindAdjustIncrement()@***************************************************/ /* */ /* static FULL_LENGTH FindAdjustIncrement(x, frame_size, dim) */ /* */ /* Find the amount by which to increase the width of the subobjects of */ /* concatenation object x so that it is adjusted to fill size frame_size. */ /* */ /*****************************************************************************/ static FULL_LENGTH FindAdjustIncrement(OBJECT x, FULL_LENGTH frame_size,int dim) { OBJECT y = nilobj, link, prev = nilobj, g; int adjustable_gaps; BOOLEAN jn; FULL_LENGTH inc, mk, actual_size; debug2(DGP, DD, "FindAdjustIncrement(x, %s, %s)", EchoLength(frame_size), dimen(dim)); FirstDefinite(x, link, prev, jn); if( link != x ) { adjustable_gaps = 0; mk = back(prev, dim); NextDefiniteWithGap(x, link, y, g, jn); while( link != x ) { if ( mode(gap(g)) == TAB_MODE || units(gap(g)) == AVAIL_UNIT || units(gap(g)) == FRAME_UNIT ) { debug0(DGP, DD, "FindAdjustIncrement returning 0 (tab gap)"); return 0; } mk += ActualGap(fwd(prev, dim), back(y, dim), fwd(y, dim), &gap(g), frame_size, mk); prev = y; adjustable_gaps++; NextDefiniteWithGap(x, link, y, g, jn); } actual_size = mk + fwd(prev, dim); debug2(DGP, DD, " actual_size = %s, adjustable_gaps = %d", EchoLength(actual_size), adjustable_gaps); inc = adjustable_gaps==0 ? 0 : (frame_size - actual_size) / adjustable_gaps; } else inc = 0; debug1(DGP, DD, "FindAdjustIncrement returning %s", EchoLength(inc)); return inc; } /* end FindAdjustIncrement */ /*@::FixAndPrintObject()@*****************************************************/ /* */ /* OBJECT FixAndPrintObject(x, xmk, xb, xf, dim, suppress, pg, count, */ /* actual_back, actual_fwd) */ /* */ /* Fix the absolute position of object x in dimension dim, in such a way */ /* that the principal mark of x has coordinate xmk, and x has actual size */ /* (xb, xf), where usually xb >= back(x, dim) and xf >= fwd(x, dim). */ /* */ /* Actually, in the case where x includes an object lying on a thread */ /* leading outside x, the final size of x may be different. Because */ /* of this, the procedure sets *actual_back and *actual_fwd to the actual */ /* size of x upon return. The caller assumes that x will exactly occupy */ /* this space (actual_back, actual_fwd). */ /* */ /* The suppress parameter is true if a temporary suppression of adjustment */ /* in this direction is in effect (because a neighbouring adjustment has */ /* already been done). This is for @HAdjust and @VAdjust, not @PAdjust. */ /* */ /* If dim == COLM, the coordinate information is merely stored; but if */ /* dim == ROWM, it is used to generate PostScript for printing x. */ /* */ /* Parameter pg records the height of the current page. This is used */ /* to correct for the fact that Lout places its origin at the top left, */ /* while PostScript places its origin at the bottom left. This correction */ /* cannot be made by transforming user space. */ /* */ /* x is child number count of its parent (used by COL_THR and ROW_THR only) */ /* */ /* FixAndPrintObject ordinarily returns the object passed to it; however */ /* it occasionally replaces that object with another, and then it is the */ /* replacement object that is returned. */ /* */ /*****************************************************************************/ OBJECT FixAndPrintObject(OBJECT x, FULL_LENGTH xmk, FULL_LENGTH xb, FULL_LENGTH xf, int dim, BOOLEAN suppress, FULL_LENGTH pg, int count, FULL_LENGTH *actual_back, FULL_LENGTH *actual_fwd) { OBJECT y = nilobj, link, prev = nilobj, g, z, face, thr, res, uplink; /* OBJECT fixed_thr, tmp; */ FULL_LENGTH mk, ymk, frame_size, back_edge, yb, yf, inc, f; FULL_LENGTH aback, afwd; int i; float scale_factor; BOOLEAN jn; debug8(DGP, DD, "[ FixAndPrintObject(%s %s%s, %s, %s,%s, %s, %s, pg, count)", Image(type(x)), ((type(x) == WORD || type(x) == QWORD) ? string(x) : STR_EMPTY), EchoFilePos(&fpos(x)), EchoLength(xmk), EchoLength(xb), EchoLength(xf),dimen(dim), (suppress == SUPPRESS ? "suppress" : "no_suppress")); debug2(DGP, DD, " size(x) = %s,%s; x =", EchoLength(back(x, dim)), EchoLength(fwd(x, dim))); ifdebug(DGP, DD, DebugObject(x)); res = x; /*** start and stop debugging if( dim == COLM && is_word(type(x)) && StringEqual(string(x), AsciiToFull("STARTBUG")) ) dbg[DGP].on[DD] = dbg[DGP].on[D] = TRUE; if( dim == COLM && is_word(type(x)) && StringEqual(string(x), AsciiToFull("STOPBUG")) ) dbg[DGP].on[DD] = dbg[DGP].on[D] = FALSE; *** */ switch( type(x) ) { case CLOSURE: case NULL_CLOS: case PAGE_LABEL: case CROSS: case FORCE_CROSS: *actual_back = xb; *actual_fwd = xf; break; case START_HVSPAN: case START_HSPAN: case START_VSPAN: CountChild(y, DownDim(x, dim), count); if( type(y) == HSPANNER || type(y) == VSPANNER ) { Child(z, Down(y)); Parent(thr, UpDim(x, dim)); save_mark(y) = xmk - back(thr, dim) + back(z, dim); /* do the fix now if the first column is also the last one */ debug2(DGP, DD, " pre-inc spanner_fixed(y) = %d, spanner_count(y) = %d", spanner_fixed(y), spanner_count(y)); if( ++spanner_fixed(y) == spanner_count(y) ) { debug6(DGP, DD, " f+last SPAN: yf = max(%s + %s - %s, %s, %s - %s)", EchoLength(xmk), EchoLength(xf), EchoLength(save_mark(y)), EchoLength(fwd(z, dim)), EchoLength(bfc(constraint(y))), EchoLength(back(z, dim))); yf = find_max(xmk + xf - save_mark(y), fwd(z, dim)); yf = find_max(yf, bfc(constraint(y)) - back(z, dim)); z = FixAndPrintObject(z, save_mark(y), back(z, dim), yf, dim, FALSE, pg, 1, &aback, &afwd); spanner_fixed(y) = 0; /* restart for if printed again */ } *actual_back = back(x, dim); *actual_fwd = fwd(x, dim); } else { debug6(DGP, DD, "%s alternate FixAndPrintObject(%s, %s, %s, %s, %s, ..)", Image(type(x)), Image(type(y)), EchoLength(xmk), EchoLength(xb), EchoLength(xf), dimen(dim)); y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, actual_back, actual_fwd); } break; case HSPAN: case VSPAN: /* do the fix on the last one */ if( (dim == COLM) == (type(x) == HSPAN) ) { CountChild(y, DownDim(x, dim), count); assert(type(y) == HSPANNER || type(y) == VSPANNER, "FAPO HSPAN/VSPAN!"); debug2(DGP, DD, " pre-inc spanner_fixed(y) = %d, spanner_count(y) = %d", spanner_fixed(y), spanner_count(y)); if( ++spanner_fixed(y) == spanner_count(y) ) { Child(z, Down(y)); debug6(DGP, DD, " last SPAN: yf = max(%s + %s - %s, %s, %s - %s)", EchoLength(xmk), EchoLength(xf), EchoLength(save_mark(y)), EchoLength(fwd(z, dim)), EchoLength(bfc(constraint(y))), EchoLength(back(z, dim))); yf = find_max(xmk + xf - save_mark(y), fwd(z, dim)); yf = find_max(yf, bfc(constraint(y)) - back(z, dim)); z = FixAndPrintObject(z, save_mark(y), back(z, dim), yf, dim, FALSE, pg, 1, &aback, &afwd); *actual_back = back(x, dim); *actual_fwd = fwd(x, dim); spanner_fixed(y) = 0; /* restart for if printed again */ } } break; case WORD: case QWORD: if( dim == COLM ) { /* save horizontal position for PrintWord below */ word_save_mark(x) = xmk; /* if first occurrence of this font on this page, notify font */ if( string(x)[0] != '\0' ) { face = finfo[word_font(x)].original_face; if( font_page(face) < font_curr_page ) { debug3(DFT, DD, "FAPO: x = %s, word_font = %d, face = %s", string(x), word_font(x), EchoObject(face)); FontPageUsed(face); } } } else { if( string(x)[0] != '\0' ) { BackEnd->PrintWord(x, word_save_mark(x), pg - xmk); /* NB if this word is to be underlined, it will be already enclosed in an ACAT by Manifest, and that ACAT will do the underlining */ } } *actual_back = xb; *actual_fwd = xf; break; case WIDE: case HIGH: CountChild(y, Down(x), count); if( (dim == COLM) == (type(x) == WIDE) ) { yf = bfc(constraint(x)) - back(y, dim); y = FixAndPrintObject(y, xmk, back(y,dim), yf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = xb; *actual_fwd = xf; } else { y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, actual_back, actual_fwd); } break; case HSHIFT: case VSHIFT: CountChild(y, Down(x), count); if( (dim == COLM) == (type(x) == HSHIFT) ) { /* work out the size of the shift depending on the units */ f = FindShift(x, y, dim); ymk = xmk - f; yb = find_max(0, xb - f); yf = find_max(0, xf + f); y = FixAndPrintObject(y, ymk, yb, yf, dim, suppress, pg, count, &aback, &afwd); /* recalculate the size of x as in MinSize */ f = FindShift(x, y, dim); *actual_back = find_min(MAX_FULL_LENGTH, find_max(0, aback + f)); *actual_fwd = find_min(MAX_FULL_LENGTH, find_max(0, afwd - f)); } else { y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, actual_back, actual_fwd); } break; case HCONTRACT: case VCONTRACT: CountChild(y, Down(x), count); if( (dim == COLM) == (type(x) == HCONTRACT) ) { y = FixAndPrintObject(y, xmk, back(y,dim), fwd(y,dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = xb; *actual_fwd = xf; } else { y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, actual_back, actual_fwd); } break; case ONE_COL: case ONE_ROW: case HLIMITED: case VLIMITED: case HEXPAND: case VEXPAND: CountChild(y, Down(x), count); if( (dim == COLM) == (type(x) == ONE_COL || type(x) == HEXPAND) ) { y = FixAndPrintObject(y, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = xb; *actual_fwd = xf; } else { y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, actual_back, actual_fwd); } break; case HMIRROR: if( BackEnd->mirror_avail ) { CountChild(y, Down(x), count); if( dim == COLM ) { save_mark(x) = xmk; y = FixAndPrintObject(y, 0, back(y, COLM), fwd(y, COLM), dim, NO_SUPPRESS, pg, count, &aback, &afwd); } else { BackEnd->SaveGraphicState(y); BackEnd->CoordTranslate(save_mark(x), pg - xmk); BackEnd->CoordHMirror(); y = FixAndPrintObject(y, 0, back(y, ROWM), fwd(y, ROWM), dim, NO_SUPPRESS, 0, count, &aback, &afwd); BackEnd->RestoreGraphicState(); } } *actual_back = xb; *actual_fwd = xf; break; case VMIRROR: debug0(DRS, DD, "FixAndPrintObject at VMIRROR"); if( BackEnd->mirror_avail ) { CountChild(y, Down(x), count); if( dim == COLM ) y = FixAndPrintObject(y, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); else { BackEnd->SaveGraphicState(y); BackEnd->CoordTranslate(0, pg - xmk); BackEnd->CoordVMirror(); y = FixAndPrintObject(y, 0, back(y, ROWM), fwd(y, ROWM), dim, NO_SUPPRESS, 0, count, &aback, &afwd); BackEnd->RestoreGraphicState(); } } *actual_back = xb; *actual_fwd = xf; break; case VSCALE: debug0(DRS, DD, "FixAndPrintObject at VSCALE"); CountChild(y, Down(x), count); if( BackEnd->scale_avail ) { if( dim == COLM ) y = FixAndPrintObject(y, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); else if( (scale_factor = ScaleFactor(xb+xf, size(y, ROWM))) > 0 ) { BackEnd->SaveGraphicState(y); BackEnd->CoordTranslate(0, pg - (xmk - xb + (FULL_LENGTH) (back(y, ROWM) * scale_factor))); BackEnd->CoordScale(1.0, scale_factor); y = FixAndPrintObject(y, 0, back(y,ROWM), fwd(y,ROWM), dim, NO_SUPPRESS, 0, count, &aback, &afwd); BackEnd->RestoreGraphicState(); } else if( !is_word(type(y)) || string(y)[0] != '\0' ) Error(23, 1, "object deleted (it cannot be scaled vertically)", WARN, &fpos(x)); } *actual_back = xb; *actual_fwd = xf; break; case HSCALE: debug0(DRS, DD, "FixAndPrintObject at HSCALE"); CountChild(y, Down(x), count); if( BackEnd->scale_avail ) { if( dim == COLM ) { save_mark(x) = xmk; bc(constraint(x)) = xb; fc(constraint(x)) = xf; if( (scale_factor = ScaleFactor(xb+xf, size(y, COLM))) > 0 ) y = FixAndPrintObject(y, 0, back(y, COLM), fwd(y, COLM), dim, NO_SUPPRESS, pg, count, &aback, &afwd); else if( !is_word(type(y)) || string(y)[0] != '\0' ) Error(23, 2, "object deleted (it cannot be scaled horizontally)", WARN, &fpos(y)); } else if( (scale_factor = ScaleFactor(bc(constraint(x))+fc(constraint(x)),size(y,COLM))) > 0 ) { BackEnd->SaveGraphicState(y); BackEnd->CoordTranslate(save_mark(x) - bc(constraint(x)) + (FULL_LENGTH) (back(y, COLM)*scale_factor), 0); BackEnd->CoordScale(scale_factor, 1.0); y = FixAndPrintObject(y, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); BackEnd->RestoreGraphicState(); } } *actual_back = xb; *actual_fwd = xf; break; case SCALE: CountChild(y, Down(x), count); if( BackEnd->scale_avail ) { if( dim == COLM ) { assert( bc(constraint(x)) > 0, "FAPO: horizontal scale factor!" ); save_mark(x) = xmk; yb = xb * SF / bc(constraint(x)); yf = xf * SF / bc(constraint(x)); y = FixAndPrintObject(y, 0, yb, yf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); } else { assert( fc(constraint(x)) > 0, "FAPO: vertical scale factor!" ); yb = xb * SF / fc(constraint(x)); yf = xf * SF / fc(constraint(x)); BackEnd->SaveGraphicState(y); BackEnd->CoordTranslate(save_mark(x), pg - xmk); BackEnd->CoordScale( (float)bc(constraint(x))/SF, (float)fc(constraint(x))/SF); y = FixAndPrintObject(y, 0, yb, yf, dim, NO_SUPPRESS, 0, count, &aback, &afwd); BackEnd->RestoreGraphicState(); } } else if( bc(constraint(x)) == SF && fc(constraint(x)) == SF ) { y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, &aback, &afwd); } *actual_back = xb; *actual_fwd = xf; break; case KERN_SHRINK: CountChild(y, LastDown(x), count); if( dim == COLM ) { y = FixAndPrintObject(y, xmk, back(y,dim), fwd(y,dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = back(x, dim); *actual_fwd = fwd(x, dim); } else { y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, actual_back, actual_fwd); } break; case BACKGROUND: /* this object has the size of its second child; but its first */ /* child gets printed too, in the same space */ CountChild(y, Down(x), count); y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, &aback, &afwd); CountChild(y, LastDown(x), count); y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, &aback, &afwd); *actual_back = back(x, dim); *actual_fwd = fwd(x, dim); break; case ROTATE: CountChild(y, Down(x), count); if( BackEnd->rotate_avail ) { if( dim == COLM ) { CONSTRAINT colc, rowc, yc; save_mark(x) = xmk; SetConstraint(colc, back(x,COLM), MAX_FULL_LENGTH, fwd(x,COLM)); SetConstraint(rowc, back(x,ROWM), MAX_FULL_LENGTH, fwd(x,ROWM)); RotateConstraint(&yc, y, sparec(constraint(x)), &colc, &rowc,COLM); y = FixAndPrintObject(y, 0, bc(yc), fc(yc), COLM, NO_SUPPRESS, pg, count, &aback, &afwd); } else { CONSTRAINT colc, rowc, yc; BackEnd->SaveGraphicState(y); BackEnd->CoordTranslate(save_mark(x), pg - xmk); BackEnd->CoordRotate(sparec(constraint(x))); SetConstraint(colc, back(x,COLM), MAX_FULL_LENGTH, fwd(x,COLM)); SetConstraint(rowc, back(x,ROWM), MAX_FULL_LENGTH, fwd(x,ROWM)); RotateConstraint(&yc, y, sparec(constraint(x)), &colc, &rowc, ROWM); y = FixAndPrintObject(y, 0, bc(yc), fc(yc), ROWM, NO_SUPPRESS, 0, count, &aback, &afwd); BackEnd->RestoreGraphicState(); } } else if( sparec(constraint(x)) == 0 ) y = FixAndPrintObject(y,xmk,xb,xf,dim,suppress,pg,count,&aback,&afwd); *actual_back = xb; *actual_fwd = xf; break; case PLAIN_GRAPHIC: CountChild(y, LastDown(x), count); if( BackEnd->plaingraphic_avail ) { if( dim == COLM ) { back(x, dim) = xb; /* NB state change here */ fwd(x, dim) = xf; save_mark(x) = xmk - back(x, dim); debug2(DGP, DD, "PLAIN_GRAPHIC COLM storing size %s, %s", EchoLength(back(x, dim)), EchoLength(fwd(x, dim))); y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, &aback, &afwd); } else { OBJECT tmp, pre, post; Child(tmp, Down(x)); if( type(tmp) == VCAT ) { Child(pre, Down(tmp)); Child(post, LastDown(tmp)); } else pre = tmp, post = nilobj; back(x, dim) = xb; fwd(x, dim) = xf; BackEnd->PrintPlainGraphic(pre, save_mark(x), pg - (xmk - back(x, dim)), x); y = FixAndPrintObject(y, xmk, xb, xf, dim, suppress, pg, count, &aback, &afwd); if( post != nilobj ) BackEnd->PrintPlainGraphic(post, save_mark(x), pg - (xmk - back(x, dim)), x); } } else y = FixAndPrintObject(y, xmk,xb,xf,dim,suppress,pg,count,&aback,&afwd); *actual_back = xb; *actual_fwd = xf; break; case GRAPHIC: CountChild(y, LastDown(x), count); if( BackEnd->graphic_avail ) { if( dim == COLM ) { /* if first occurrence of this font on this page, notify font */ if( font(save_style(x)) > 0 ) { face = finfo[font(save_style(x))].original_face; if( font_page(face) < font_curr_page ) FontPageUsed(face); } back(x, dim) = xb; /* NB state change here */ fwd(x, dim) = xf; debug2(DGP, DD, "GRAPHIC COLM storing size %s, %s", EchoLength(back(x, dim)), EchoLength(fwd(x, dim))); save_mark(x) = xmk - back(x, COLM); y = FixAndPrintObject(y, xb, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); } else { OBJECT tmp, pre, post; Child(tmp, Down(x)); if( type(tmp) == VCAT ) { Child(pre, Down(tmp)); Child(post, LastDown(tmp)); } else pre = tmp, post = nilobj; back(x, dim) = xb; fwd(x, dim) = xf; BackEnd->SaveTranslateDefineSave(x, save_mark(x), pg - (xmk + fwd(x, ROWM))); BackEnd->PrintGraphicObject(pre); BackEnd->RestoreGraphicState(); y = FixAndPrintObject(y, xb, xb, xf, dim, NO_SUPPRESS, xb + xf, count, &aback, &afwd); if( post != nilobj ) BackEnd->PrintGraphicObject(post); BackEnd->RestoreGraphicState(); } } else y = FixAndPrintObject(y, xmk,xb,xf,dim,suppress,pg,count,&aback,&afwd); *actual_back = xb; *actual_fwd = xf; break; case LINK_SOURCE: case LINK_DEST: case LINK_DEST_NULL: case LINK_URL: ifdebug(DGP, D, Child(z, Down(x)); debug7(DGP, D, "[ FixAndPrintObject(%s %s%s, %s, %s, %s, %s, -)", Image(type(x)), ((type(x)==LINK_DEST || type(x)==LINK_DEST_NULL) ? string(z):STR_EMPTY), type(x)==LINK_DEST_NULL ? " (indef)" : "", EchoLength(xmk), EchoLength(xb), EchoLength(xf), dimen(dim)); ); CountChild(y, LastDown(x), count); if( dim == COLM ) save_mark(x) = xmk; else { Child(z, Down(x)); switch( type(x) ) { case LINK_SOURCE: BackEnd->LinkSource(z, save_mark(x) - back(x, COLM), (pg - xmk) - xf, save_mark(x) + fwd(x, COLM), (pg - xmk) + xb); break; case LINK_DEST: case LINK_DEST_NULL: BackEnd->LinkDest(z, save_mark(x) - back(x, COLM), (pg - xmk) - xf, save_mark(x) + fwd(x, COLM), (pg - xmk) + xb); break; case LINK_URL: BackEnd->LinkURL(z, save_mark(x) - back(x, COLM), (pg - xmk) - xf, save_mark(x) + fwd(x, COLM), (pg - xmk) + xb); break; } } y = FixAndPrintObject(y, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = xb; *actual_fwd = xf; debug0(DGP, D, "] FixAndPrintObject returning"); break; case INCGRAPHIC: case SINCGRAPHIC: CountChild(y, Down(x), count); if( BackEnd->incgraphic_avail ) { if( dim == COLM ) { save_mark(x) = xmk; if( incgraphic_ok(x) ) { debug2(DGP, DD, " %s (style %s)", EchoObject(x), EchoStyle(&save_style(x))); face = finfo[font(save_style(x))].original_face; if( font_page(face) < font_curr_page ) { debug3(DFT, DD, "FAPO-IG: x = %s, font = %d, face = %s", string(x), font(save_style(x)), EchoObject(face)); FontPageUsed(face); } } } else if( incgraphic_ok(x) ) BackEnd->PrintGraphicInclude(x, save_mark(x), pg - xmk); } *actual_back = xb; *actual_fwd = xf; break; case SPLIT: link = DownDim(x, dim); CountChild(y, link, count); y = FixAndPrintObject(y, xmk, find_max(back(y, dim), xb), find_max(fwd(y, dim), xf), dim, suppress, pg, count, actual_back, actual_fwd); break; case VCAT: case HCAT: if( (type(x) == VCAT) == (dim == ROWM) ) { debug6(DGP, DD, "[ FAPO-CAT %s (%s,%s): xmk %s, xb %s, xf %s", Image(type(x)), EchoLength(back(x, dim)), EchoLength(fwd(x, dim)), EchoLength(xmk), EchoLength(xb), EchoLength(xf)); FirstDefiniteLDN(x, link, prev, jn, xmk, dim, NO_SUPPRESS, pg); if( link != x ) { /*******************************************************************/ /* */ /* handle the special case of a 0rt gap at the beginning (left */ /* justify) by converting it to 0ie but increasing fwd(prev) to */ /* the maximum possible */ /* */ /*******************************************************************/ NextDefiniteWithGap(x, link, y, g, jn); /* not LDN since will redo */ if( link != x && mode(gap(g)) == TAB_MODE && units(gap(g)) == AVAIL_UNIT && width(gap(g)) == 0 ) { debug2(DGP, DD, " FAPO-CAT converting 0rt (back(x, dim) %s, xb %s)", EchoLength(back(x, dim)), EchoLength(xb)); /* NB state change here */ fwd(prev, dim) += xb - back(x, dim); back(x, dim) = xb; mode(gap(g)) = EDGE_MODE; units(gap(g)) = FIXED_UNIT; } FirstDefinite(x, link, prev, jn); /* not LDN since already done */ /*******************************************************************/ /* */ /* Initialize the following variables: */ /* */ /* frame_size the total width actually available */ /* */ /* back_edge where the first element begins */ /* */ /* inc the adjust increment, used when adjusting gaps */ /* */ /* mk where the mark of prev is to go */ /* */ /*******************************************************************/ frame_size = back(x, dim) + xf; back_edge = xmk - back(x, dim); if( adjust_cat(x) && !suppress ) inc = FindAdjustIncrement(x, frame_size, dim); else inc = 0; mk = back_edge + back(prev, dim); debug4(DGP, DD, " FAPO-CAT back_edge %s, mk %s, frame %s, inc %s", EchoLength(back_edge), EchoLength(mk), EchoLength(frame_size), EchoLength(inc)); /*******************************************************************/ /* */ /* Fix each element "prev" in turn along the cat operator */ /* */ /*******************************************************************/ NextDefiniteWithGapLDN(x, link, y, g, jn, mk, dim, NO_SUPPRESS, pg); while( link != x ) { if( mode(gap(g)) == TAB_MODE && units(gap(g)) == AVAIL_UNIT && width(gap(g))==FR ) { /* object is followed by 1rt gap, give it full space to print */ debug5(DGP,D," FAPO (a) calling FAPO(%s, %s, %s, max(%s, %s))", Image(type(prev)), EchoLength(mk), EchoLength(back(prev, dim)), EchoLength(fwd(prev, dim)), EchoLength(xmk+xf-mk-size(y,dim))); prev = FixAndPrintObject(prev, mk, back(prev, dim), find_max(fwd(prev, dim), xmk+xf-mk - size(y, dim)), dim, NO_SUPPRESS, pg, count, &aback, &afwd); } else { debug5(DGP, DD, " FAPO-CAT (b) calling FAPO(%s, %s, %s, %s+%s)", Image(type(prev)), EchoLength(mk), EchoLength(back(prev, dim)), EchoLength(fwd(prev, dim)), EchoLength(inc)); prev = FixAndPrintObject(prev, mk, back(prev, dim), fwd(prev, dim) + inc, dim, NO_SUPPRESS, pg, count,&aback,&afwd); } mk += ActualGap(afwd, back(y, dim), fwd(y, dim), &gap(g), frame_size, mk - back_edge); prev = y; NextDefiniteWithGapLDN(x, link, y, g, jn, mk, dim, NO_SUPPRESS, pg); } /*******************************************************************/ /* */ /* At end, fix last element in conformity with "suppress" */ /* and set *actual_back and *actual_fwd. */ /* */ /*******************************************************************/ if( suppress ) { debug4(DGP, DD, " FAPO-CAT (c) calling FAPO(%s, %s, %s, %s)", Image(type(prev)), EchoLength(mk), EchoLength(back(prev, dim)), EchoLength(fwd(prev, dim))); prev = FixAndPrintObject(prev, mk, back(prev, dim), fwd(prev, dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); } else { debug5(DGP, DD," FAPO-CAT (d) calls FAPO(%s, %s, %s, max(%s, %s))", Image(type(prev)), EchoLength(mk), EchoLength(back(prev, dim)), EchoLength(fwd(prev, dim)), EchoLength(xmk + xf - mk)); ifdebug(DGP, DD, DebugObject(prev)); prev = FixAndPrintObject(prev, mk, back(prev,dim), find_max(fwd(prev, dim), xmk + xf - mk), dim, NO_SUPPRESS, pg, count, &aback, &afwd); } *actual_back = find_max(back(x, dim), xb); *actual_fwd = mk + fwd(prev, dim) - back_edge - *actual_back; debugcond4(DGP, DD, type(x) == HCAT, "HCAT original (%s, %s) to actual (%s, %s)", EchoLength(back(x, dim)), EchoLength(fwd(x, dim)), EchoLength(*actual_back), EchoLength(*actual_fwd)); } else *actual_back = xb, *actual_fwd = xf; debug0(DGP, DD, "] FAPO-CAT returning."); } else { OBJECT start_group, zlink, m; BOOLEAN dble_found; FULL_LENGTH b, f, dlen; start_group = nilobj; dble_found = FALSE; dlen = 0; debug0(DGP, DD, " groups beginning."); FirstDefiniteLDN(x, link, y, jn, xmk, dim, NO_SUPPRESS, pg); if( link != x ) { /* start first group, with or without join */ b = back(y, dim); f = fwd(y, dim); m = y; start_group = link; dble_found = !jn; debug4(DGP, DD, " starting first group %s (%sdbl_found): b %s, f %s", Image(type(y)), dble_found ? "" : "not ", EchoLength(b), EchoLength(f)); NextDefiniteWithGapLDN(x, link, y, g, jn, xmk, dim, NO_SUPPRESS, pg); while( link != x ) { if( !jn ) { /* finish off and fix the group ending just before g */ debug2(DGP, DD, " finishing group: b = %s, f = %s", EchoLength(b), EchoLength(f)); m = FixAndPrintObject(m, xmk+b, b, xf-b, dim, NO_SUPPRESS, pg, count, &aback, &afwd); b = back(m, dim); f = fwd(m, dim); for( zlink = start_group; zlink != link; zlink=NextDown(zlink) ) { CountChild(z, zlink, count); if( !is_definite(type(z)) || z == m ) continue; z = FixAndPrintObject(z, xmk + b, b, xf - b, dim, SUPPRESS, pg, count, &aback, &afwd); b = find_max(b, back(z, dim)); f = find_max(f, fwd(z, dim)); } dlen = find_max(dlen, b + f); dble_found = TRUE; start_group = nilobj; /* start new group */ b = back(y, dim); f = fwd(y, dim); m = y; start_group = link; debug2(DGP, DD, " starting group: b = %s, f = %s", EchoLength(b), EchoLength(f)); } else { /* continue with current group */ b = find_max(b, back(y, dim)); f = find_max(f, fwd(y, dim)); if( fwd(y, dim) > fwd(m, dim) ) m = y; debug2(DGP, DD, " continuing group: b = %s, f = %s", EchoLength(b), EchoLength(f)); } NextDefiniteWithGapLDN(x, link, y, g, jn, xmk, dim, NO_SUPPRESS, pg); } assert( start_group != nilobj, "FAPO: final start_group!" ); if( dble_found || !jn ) { /* finish off and fix this last group */ debug2(DGP, DD, " finishing last group: b = %s, f = %s", EchoLength(b), EchoLength(f)); m = FixAndPrintObject(m, xmk+b, b, xf - b, dim, NO_SUPPRESS, pg, count, &aback, &afwd); b = back(m, dim); f = fwd(m, dim); for( zlink = start_group; zlink != x; zlink = NextDown(zlink) ) { CountChild(z, zlink, count); if( !is_definite(type(z)) || z == m ) continue; z = FixAndPrintObject(z, xmk+b, b, xf - b, dim, SUPPRESS, pg, count, &aback, &afwd); b = find_max(b, back(z, dim)); f = find_max(f, fwd(z, dim)); } dlen = find_max(dlen, b + f); *actual_back = 0; *actual_fwd = dlen; } else { /* finish off and fix this last and only group */ debug2(DGP, DD, " finishing last and only group: b = %s, f = %s", EchoLength(b), EchoLength(f)); m = FixAndPrintObject(m, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &b, &f); for( zlink = start_group; zlink != x; zlink = NextDown(zlink) ) { CountChild(z, zlink, count); if( !is_definite(type(z)) || z == m ) continue; z = FixAndPrintObject(z, xmk, xb, xf, dim, SUPPRESS, pg, count, &aback, &afwd); b = find_max(b, aback); f = find_max(f, afwd); } *actual_back = b; *actual_fwd = f; } } } break; case ACAT: if( dim == COLM ) { BOOLEAN will_adjust, adjusting; FULL_LENGTH actual_size, adjust_indent, frame_size, back_edge; FULL_LENGTH adjust_inc, inc = 0, adjust_sofar = 0; int adjustable_gaps, gaps_sofar = 0; BOOLEAN underlining; int underline_xstart = 0; FONT_NUM underline_font = 0; COLOUR_NUM underline_colour = 0; TEXTURE_NUM underline_texture = 0; OBJECT urec, last_bad_gap; /*********************************************************************/ /* */ /* The first step is to calculate the following values: */ /* */ /* last_bad_gap The rightmost tab gap, or nilobj if none; */ /* */ /* adjustable_gaps the number of gaps suitable for adjustment; */ /* i.e. to the right of the right-most tab gap, */ /* and of non-zero width; */ /* */ /* actual_size the actual size of x without adjustment. */ /* */ /* These are needed when adjusting the line. */ /* */ /*********************************************************************/ FirstDefinite(x, link, y, jn); /* no LDN since this is initial pass */ if( link == x ) { *actual_back = back(x, dim); *actual_fwd = fwd(x, dim); FirstDefiniteLDN(x, link, y, jn, xmk, dim, NO_SUPPRESS, pg); break; /* no definite children, nothing to print */ } /*** nasty bug finder { OBJECT ff = y; debugcond1(DGP, DD, word_equal(ff, "@ReportLayout"), "FAPO(%s, COLM)", EchoObject(x)); debugcond1(DGP, DD, word_equal(ff, "@ReportLayout"), " adjust_cat(x) = %s", bool(adjust_cat(x))); } ***/ last_bad_gap = nilobj; adjustable_gaps = 0; back_edge = xmk - xb; mk = back_edge + back(y, dim); frame_size = xb + xf; prev = y; NextDefiniteWithGap(x, link, y, g, jn); /* no LDN, initial pass */ while( link != x ) { save_actual_gap(g) = ActualGap(fwd(prev, dim), back(y, dim), fwd(y, dim), &gap(g), frame_size, mk - back_edge); mk += save_actual_gap(g); if( mode(gap(g)) == TAB_MODE || units(gap(g)) == AVAIL_UNIT || units(gap(g)) == FRAME_UNIT ) { last_bad_gap = g; adjustable_gaps = 0; } else if( width(gap(g)) > 0 ) adjustable_gaps++; prev = y; NextDefiniteWithGap(x, link, y, g, jn); /* no LDN, initial pass */ } actual_size = mk + fwd(prev, dim) - back_edge; /*********************************************************************/ /* */ /* It is possible that the line cannot be displayed in any */ /* reasonable way, because the paragraph breaker was forced to */ /* produce an overfull line. In this case, actual_size will */ /* exceed frame_size and there will be no adjustable gaps. The */ /* solution is to horizontally scale the line if possible, or */ /* else to not print it at all. */ /* */ /*********************************************************************/ if( actual_size > frame_size && adjustable_gaps == 0 ) { /* can't be fixed by adjustment, so scale the line or delete it */ CONSTRAINT c; SetConstraint(c, 0, frame_size, frame_size); fwd(x, dim) = actual_size; debug2(DGP, DD, " oversize, actual_size = %s, frame_size = %s", EchoLength(actual_size), EchoLength(frame_size)); if( BackEnd->scale_avail && InsertScale(x, &c) ) { /* the problem has just been fixed, by inserting a @Scale above x */ OBJECT prnt; Parent(prnt, Up(x)); Child(y, Down(x)); if( actual_size - frame_size < 1 * PT ) { /* the correction is probably due to roundoff error, and */ /* anyway is too small to print an error message about */ } else if( Down(x) == LastDown(x) && is_word(type(y)) ) { Error(23, 3, "word %s horizontally scaled by factor %.2f (too wide for %s paragraph)", WARN, &fpos(y), string(y), (float) bc(constraint(prnt)) / SF, EchoLength(frame_size)); } else { Error(23, 4, "%s object horizontally scaled by factor %.2f (too wide for %s paragraph)", WARN, &fpos(x), EchoLength(size(x, COLM)), (float) bc(constraint(prnt)) / SF, EchoLength(frame_size)); } prnt = FixAndPrintObject(prnt, xmk, back(prnt, dim), fwd(prnt, dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); } else { /* fix the problem by refraining from printing the line */ if( size(x, COLM) <= 0 ) Error(23, 5, "oversize object has size 0 or less", INTERN, &fpos(x)); Child(y, Down(x)); if( Down(x) == LastDown(x) && is_word(type(y)) ) { Error(23, 6, "word %s deleted (too wide for %s paragraph)", WARN, &fpos(y), string(y), EchoLength(frame_size)); } else { Error(23, 7, "%s object deleted (too wide for %s paragraph)", WARN, &fpos(x), EchoLength(size(x, COLM)), EchoLength(frame_size)); } /* delete and dispose every child of x */ while( Down(x) != x ) DisposeChild(Down(x)); y = MakeWord(WORD, STR_EMPTY, &fpos(x)); Link(x, y); back(y, COLM) = fwd(y, COLM) = 0; back(y, ROWM) = fwd(y, ROWM) = 0; } } else { /********************************************************************/ /* */ /* The line may be displayed in one of four ways: centred, right- */ /* justified, adjusted, or none of the above (i.e. left justified).*/ /* An overfull line is always adjusted; otherwise, the line will */ /* be centred or right justified if the display style asks for it; */ /* otherwise, the line will be adjusted if adjust_cat(x) == TRUE */ /* (i.e. there is an enclosing @PAdjust) or if the display style is*/ /* DO_ADJUST (meaning that this line is one of a paragraph set in */ /* the adjust or outdent break style, other than the last line); */ /* otherwise, the line is left justified. */ /* */ /* The second step is to decide which of these four cases holds */ /* for this line, and to record the decision in these variables: */ /* */ /* will_adjust TRUE if the adjusted style applies; in this */ /* case, variables adjust_inc and inc will be */ /* set to the appropriate adjustment value; */ /* */ /* adjust_indent If centring or right justification applies, */ /* the indent to produce this, else zero. */ /* */ /* NB adjust_inc may be negative, if the optimal paragraph breaker */ /* has chosen to shrink some gaps. */ /* */ /* NB we are assigning to adjust_cat here; is this a problem? */ /* */ /********************************************************************/ if( actual_size > frame_size ) { assert( adjustable_gaps > 0, "FAPO: adjustable_gaps!" ); adjust_cat(x) = TRUE; adjust_indent = 0; } else switch( display_style(save_style(x)) ) { case DO_ADJUST: adjust_cat(x) = TRUE; adjust_indent = 0; debug1(DSF, D, "adjust %s", EchoObject(x)); break; case DISPLAY_CENTRE: adjust_cat(x) = FALSE; adjust_indent = (frame_size - actual_size)/2; debug1(DGP, DD, "cdisp %s", EchoObject(x)); break; case DISPLAY_RIGHT: adjust_cat(x) = FALSE; adjust_indent = frame_size - actual_size; debug1(DGP, DD, "rdisp %s", EchoObject(x)); debug1(DSF, D, "rdisp %s", EchoObject(x)); break; default: /* leave adjust_cat(x) as is */ adjust_indent = 0; break; } debug1(DGP, DD, "ACAT COLM %s", EchoObject(x)); /* EchoStyle(&save_style(x)), EchoObject(x)); */ debug2(DGP, DD, "frame_size = %s, actual_size = %s", EchoLength(frame_size), EchoLength(actual_size)); if( adjust_cat(x) && adjustable_gaps > 0 ) { will_adjust = TRUE; adjust_inc = (frame_size - actual_size) / adjustable_gaps; inc = find_max(adjust_inc, 0); gaps_sofar = 0; /* number of gaps adjusted so far */ adjust_sofar = 0; /* total width of adjustments so far */ debug2(DGP, DD,"will_adjust: adjustable_gaps = %d, adjust_inc = %s", adjustable_gaps, EchoLength(adjust_inc)); } else will_adjust = FALSE; /********************************************************************/ /* */ /* The third and final step is to traverse x, fixing subobjects. */ /* Variable "adjusting" is true while adjusting is occurring. */ /* */ /********************************************************************/ underlining = FALSE; adjusting = will_adjust && last_bad_gap == nilobj; FirstDefiniteLDN(x, link, y, jn, xmk, dim, NO_SUPPRESS, pg); prev = y; mk = xmk - back(x, dim) + back(y, dim) + adjust_indent; NextDefiniteWithGapLDN(x, link, y, g, jn, mk, dim, NO_SUPPRESS, pg); while( link != x ) { /* check for underlining */ if( underline(prev) == UNDER_ON ) { debug3(DGP, DD, " FAPO/ACAT1 underline() := %s for %s %s", bool(FALSE), Image(type(prev)), EchoObject(prev)); if( !underlining ) { /* underlining begins here */ underlining = TRUE; debug2(DGP, DD, "underlining begins at %s %s", Image(type(prev)), EchoObject(prev)); if( is_word(type(prev)) ) { underline_font = word_font(prev); underline_colour = word_underline_colour(prev); underline_texture = word_texture(prev); } else { underline_font = font(save_style(x)); underline_colour = underline_colour(save_style(x)); underline_texture = texture(save_style(x)); } underline_xstart = mk - back(prev, dim); } if( underline(g) == UNDER_OFF ) { /* underlining ends here */ debug2(DGP, DD, "underlining ends at %s %s", Image(type(prev)), EchoObject(prev)); New(urec, UNDER_REC); back(urec, COLM) = underline_xstart; fwd(urec, COLM) = mk + fwd(prev, dim); word_font(urec) = underline_font; word_underline_colour(urec) = underline_colour; word_texture(urec) = underline_texture; underlining = FALSE; Link(NextDown(Up(prev)), urec); } } /* fix previous definite now we know it is not the last one */ if( adjusting && width(gap(g)) > 0 ) { int tmp; prev = FixAndPrintObject(prev, mk, back(prev, dim), fwd(prev, dim) + inc, dim, NO_SUPPRESS, pg, count,&aback,&afwd); gaps_sofar++; tmp = ((frame_size - actual_size) * gaps_sofar) / adjustable_gaps; mk += save_actual_gap(g) + (tmp - adjust_sofar); adjust_sofar = tmp; } else { prev = FixAndPrintObject(prev, mk, back(prev, dim), fwd(prev,dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); mk += save_actual_gap(g); } prev = y; /* commence adjustment if required */ if( !adjusting && will_adjust && g == last_bad_gap ) adjusting = TRUE; NextDefiniteWithGapLDN(x, link, y, g, jn, mk, dim, NO_SUPPRESS, pg); } /* check for underlining */ debugcond3(DGP, DD, underline(prev) == UNDER_UNDEF, " underlining is UNDER_UNDEF in %s: %s %s in para:", EchoFilePos(&fpos(prev)), Image(type(prev)), EchoObject(prev)); debugcond1(DGP, DD, underline(prev)==UNDER_UNDEF, "%s",EchoObject(x)); assert( underline(prev) == UNDER_OFF || underline(prev) == UNDER_ON, "FixAndPrint: underline(prev)!" ); if( underline(prev) == UNDER_ON ) { debug3(DGP, DD, " FAPO/ACAT1 underline() := %s for %s %s", bool(FALSE), Image(type(prev)), EchoObject(prev)); if( !underlining ) { /* underlining begins here */ debug2(DGP, DD, "underlining begins at %s %s", Image(type(prev)), EchoObject(prev)); underlining = TRUE; if( is_word(type(prev)) ) { underline_font = word_font(prev); underline_colour = word_underline_colour(prev); underline_texture = word_texture(prev); } else { underline_font = font(save_style(x)); underline_colour = underline_colour(save_style(x)); underline_texture = texture(save_style(x)); } underline_xstart = mk - back(prev, dim); } /* underlining must end here */ debug2(DGP, DD, "underlining ends at %s %s", Image(type(prev)), EchoObject(prev)); New(urec, UNDER_REC); back(urec, COLM) = underline_xstart; fwd(urec, COLM) = mk + fwd(prev, dim); word_font(urec) = underline_font; word_underline_colour(urec) = underline_colour; word_texture(urec) = underline_texture; underlining = FALSE; Link(NextDown(Up(prev)), urec); } /* fix the last definite subobject, prev, which must exist */ prev = FixAndPrintObject(prev, mk, back(prev, dim), frame_size - (mk - xmk) - back(x, dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); } } else { debug1(DGP, DD, "ACAT ROWM %s", EchoObject(x)); for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( !is_definite(type(y)) && type(y) != LINK_DEST_NULL ) { if( type(y) == UNDER_REC ) /* generate an underline now */ { BackEnd->PrintUnderline(word_font(y),word_underline_colour(y), word_texture(y), back(y, COLM), fwd(y, COLM), pg - xmk); link = PrevDown(link); /* remove all trace of underlining */ DisposeChild(Up(y)); /* in case we print this again */ } continue; } y = FixAndPrintObject(y, xmk, xb, xf, dim, NO_SUPPRESS, pg, count, &aback, &afwd); } } *actual_back = xb; *actual_fwd = xf; break; case COL_THR: case ROW_THR: assert( (type(x) == COL_THR) == (dim == COLM), "FixAndPrintObject: thr!" ); for( link = Down(x), uplink = Up(x), i = 1; link != x && uplink != x && i < count; link = NextDown(link), uplink = NextUp(uplink), i++ ); assert( link != x && uplink != x, "FixAndPrintObject: link or uplink!" ); CountChild(y, link, count); debug7(DGP, DD, " fapo of %s (%s,%s) child %d %s (%s,%s)", Image(type(x)), EchoLength(back(x, dim)), EchoLength(fwd(x, dim)), i, Image(type(y)), EchoLength(back(y, dim)), EchoLength(fwd(y, dim))); /* This line seems to have been an optimization. It won't * work if we are inside a running header, since subsequent * passes will have forgotten the thread. JeffK 13/11/02 MoveLink(uplink, link, CHILD); DeleteLink(link); */ assert( type(y) != GAP_OBJ, "FAPO: THR!"); if( thr_state(x) != FINALSIZE ) { back(x, dim) = xb; fwd(x, dim) = xf; thr_state(x) = FINALSIZE; } y = FixAndPrintObject(y, xmk, back(x, dim), fwd(x, dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = xb; *actual_fwd = xf; /* if( Up(x) == x ) Dispose(x); */ break; /* convert everyone to FIXED_COL_THR or FIXED_ROW_THR as appropriate */ /* *** old code if( thr_state(x) == FINALSIZE ) debug1(DGP, DD, "thr_state(%d)", (int) x); assert(thr_state(x) != FINALSIZE, "FAPO/COL_THR: thr_state(x)!"); ifdebug(DGP, DD, link = Down(x); uplink = Up(x); while( link != x && uplink != x ) { Parent(tmp, uplink); debug1(DGP, DD, "parnt: %s", EchoObject(tmp)); Child(tmp, link); debug1(DGP, DD, "child: %s", EchoObject(tmp)); link = NextDown(link); uplink = NextUp(uplink); } while( uplink != x ) { Parent(tmp, uplink); debug1(DGP, DD, "extra parnt: %s", EchoObject(tmp)); uplink = NextUp(uplink); } while( link != x ) { Child(tmp, link); debug1(DGP, DD, "extra child: %s", EchoObject(tmp)); link = NextDown(link); } ) i = 1; res = nilobj; while( Down(x) != x && Up(x) != x ) { New(fixed_thr, type(x) == COL_THR ? FIXED_COL_THR : FIXED_ROW_THR); MoveLink(Up(x), fixed_thr, CHILD); MoveLink(Down(x), fixed_thr, PARENT); back(fixed_thr, dim) = xb; fwd(fixed_thr, dim) = xf; if( count == i ) res = fixed_thr; i++; } if( Up(x) != x || Down(x) != x ) { debug2(DGP, DD, "links problem at %s %d:", Image(type(x)), (int) x); if( Up(x) != x ) { Parent(tmp, Up(x)); debug1(DGP, DD, "first parent is %s", EchoObject(tmp)); } if( Down(x) != x ) { Child(tmp, Down(x)); debug1(DGP, DD, "first child is %s", EchoObject(tmp)); } } assert( Up(x) == x && Down(x) == x, "FAPO/COL_THR: x links!" ); Dispose(x); assert(res != nilobj, "FixAndPrintObject: COL_THR res!"); x = res; *** */ /* NB NO BREAK! */ /* *** case FIXED_COL_THR: case FIXED_ROW_THR: assert( (type(x) == FIXED_COL_THR) == (dim == COLM), "FixAndPrintObject: fixed_thr!" ); CountChild(y, Down(x), count); y = FixAndPrintObject(y, xmk, back(x, dim), fwd(x, dim), dim, NO_SUPPRESS, pg, count, &aback, &afwd); *actual_back = back(x, dim); *actual_fwd = fwd(x, dim); break; *** */ case BEGIN_HEADER: case END_HEADER: case SET_HEADER: case CLEAR_HEADER: if( dim == COLM ) Error(23, 8, "%s symbol ignored (out of place)", WARN, &fpos(x), Image(type(x))); break; default: assert1(FALSE, "FixAndPrintObject:", Image(type(x))); break; } /* end switch */ debug2(DGP, DD, "] FixAndPrintObject returning (actual %s,%s).", EchoLength(*actual_back), EchoLength(*actual_fwd)); return res; } /* end FixAndPrintObject */ lout-3.39/z40.c0000644000076400007640000002774611442244664011661 0ustar jeffjeff/*@z40.c:Filter Handler:FilterInit()@*****************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z40.c */ /* MODULE: Filter Handler */ /* EXTERNS: FilterInit(), FilterCreate(), FilterSetFileNames(), */ /* FilterExecute(), FilterWrite(), FilterScavenge() */ /* */ /*****************************************************************************/ #include "externs.h" static int filter_count; /* number of filter files */ static OBJECT filter_active; /* the active filter file records */ static OBJECT filter_in_filename; /* initial name of filter input file */ static OBJECT filter_out_filename; /* initial name of filter ouput file */ /*****************************************************************************/ /* */ /* FilterInit() */ /* */ /* Initialize this module. */ /* */ /*****************************************************************************/ void FilterInit(void) { filter_count = 0; New(filter_active, ACAT); sym_body(FilterInSym) = MakeWord(WORD, FILTER_IN, no_fpos); sym_body(FilterOutSym) = MakeWord(WORD, FILTER_OUT, no_fpos); sym_body(FilterErrSym) = MakeWord(WORD, FILTER_ERR, no_fpos); filter_in_filename = sym_body(FilterInSym); filter_out_filename = sym_body(FilterOutSym); } /* end FilterInit */ /*@::FilterCreate(), FilterSetFileNames()@************************************/ /* */ /* OBJECT FilterCreate(use_begin, act, xfpos) */ /* */ /* Create and return a new FILTERED object. Open the corresponding file */ /* for writing and dump the parameter text to be filtered into it. */ /* */ /*****************************************************************************/ OBJECT FilterCreate(BOOLEAN use_begin, OBJECT act, FILE_POS *xfpos) { FULL_CHAR buff[MAX_LINE]; FILE *fp; OBJECT x, res, junk; debug3(DFH, D, "FilterCreate(%s, %s, %s)", bool(use_begin), SymName(act), EchoFilePos(xfpos)); New(res, FILTERED); FposCopy(fpos(res), *xfpos); ++filter_count; sprintf( (char *) buff, "%s%d", FILTER_IN, filter_count); fp = StringFOpen(buff, WRITE_FILE); if( fp == NULL ) Error(40, 1, "cannot open temporary filter file %s", FATAL, xfpos, buff); x = MakeWord(WORD, buff, xfpos); filter_use_begin(x) = use_begin; filter_actual(x) = act; Link(res, x); Link(filter_active, x); junk = LexScanVerbatim(fp, use_begin, xfpos, FALSE); fclose(fp); sprintf( (char *) buff, "%s%d", FILTER_OUT, filter_count); x = MakeWord(WORD, buff, xfpos); Link(res, x); if( has_body(act) ) PushScope(act, FALSE, TRUE); x = GetScopeSnapshot(); if( has_body(act) ) PopScope(); Link(res, x); debug2(DFH, D, "FilterCreate returning %d %s", (int) res, EchoObject(res)); return res; } /* end FilterCreate */ /*****************************************************************************/ /* */ /* FilterSetFileNames(x) */ /* */ /* Set @FilterIn, @FilterOut, and @FilterErr to suitable values for the */ /* manifesting of the command which runs filter x. */ /* */ /*****************************************************************************/ void FilterSetFileNames(OBJECT x) { OBJECT y; assert( type(x) == FILTERED, "FilterSetFileNames: type(x)!" ); assert( Down(x) != x, "FilterSetFileNames: x has no children!" ); debug2(DFH, D, "FilterSetFileNames(%d %s)", (int) x, EchoObject(x)); Child(y, Down(x)); assert( type(y) == WORD, "FilterSetFileNames: type(y)!" ); sym_body(FilterInSym) = y; Child(y, NextDown(Down(x))); assert( type(y) == WORD, "FilterSetFileNames: type(y) (2)!" ); sym_body(FilterOutSym) = y; debug0(DFH, D, "FilterSetFileNames returning."); } /* end FilterSetFileNames */ /*@::FilterExecute()@*********************************************************/ /* */ /* OBJECT FilterExecute(x, command, env) */ /* */ /* Execute the filter command on FILTERED object x, and return the result. */ /* */ /*****************************************************************************/ OBJECT FilterExecute(OBJECT x, FULL_CHAR *command, OBJECT env) { int status; OBJECT t, res, scope_snapshot; FULL_CHAR line[MAX_LINE]; FILE *err_fp; FILE_NUM filter_out_file; assert( type(x) == FILTERED, "FilterExecute: type(x)!" ); assert( type(env) == ENV, "FilterExecute: type(env)!" ); debug4(DFH, D, "FilterExecute(%d %s, \"%s\", %s)", (int) x, EchoObject(x), command, EchoObject(env)); /* reset FilterInSym since Manifest of @Filter is now complete */ sym_body(FilterInSym) = filter_in_filename; if( SafeExecution ) { /* if safe execution, print error message and return empty object */ Error(40, 2, "safe execution prohibiting command: %s", WARN, &fpos(x), command); res = MakeWord(WORD, STR_EMPTY, &fpos(x)); } else { /* execute the command, echo error messages, and check status */ status = system( (char *) command); err_fp = StringFOpen(FILTER_ERR, READ_FILE); if( err_fp != NULL ) { while( ReadOneLine(err_fp, line, MAX_LINE) != 0 ) Error(40, 3, "%s", WARN, &fpos(x), line); fclose(err_fp); StringRemove(FILTER_ERR); } if( status == 0 ) { /* system command succeeded; read in its output as a Lout object */ Child(scope_snapshot, LastDown(x)); LoadScopeSnapshot(scope_snapshot); debug0(DFS, D, " calling DefineFile from FilterExecute"); filter_out_file = DefineFile(string(sym_body(FilterOutSym)), STR_EMPTY, &fpos(x), FILTER_FILE, SOURCE_PATH); LexPush(filter_out_file, 0, FILTER_FILE, 1, FALSE); t = NewToken(BEGIN, &fpos(x), 0, 0, BEGIN_PREC, FilterOutSym); res = Parse(&t, nilobj, FALSE, FALSE); LexPop(); ClearScopeSnapshot(scope_snapshot); StringRemove(string(sym_body(FilterOutSym))); sym_body(FilterOutSym) = filter_out_filename; } else { /* system command failed; print warning message and substitute "??" */ Error(40, 4, "failure (status %d) of filter: %s", WARN, &fpos(x), status, command); res = MakeWord(WORD, STR_NOCROSS, &fpos(x)); /* i.e. "??" */ } } debug1(DFH, D, "FilterExecute returning %s", EchoObject(res)); return res; } /* end FilterExecute */ /*@::FilterWrite(), FilterScavenge()@*****************************************/ /* */ /* FilterWrite(x, fp, linecount) */ /* */ /* Write out the active FILTERED object x by copying the file. */ /* Increment *linecount by the number of lines written. */ /* */ /*****************************************************************************/ void FilterWrite(OBJECT x, FILE *fp, int *linecount) { FILE *in_fp; OBJECT y; int ch; assert( type(x) == FILTERED, "FilterWrite: type(x)!" ); debug2(DFH, D, "[ FilterWrite(%d %s, fp)", (int) x, EchoObject(x)); Child(y, Down(x)); in_fp = StringFOpen(string(y), READ_FILE); if( in_fp == NULL ) Error(40, 5, "cannot read filter temporary file %s", FATAL, &fpos(x), string(y)); if( filter_use_begin(y) ) StringFPuts(KW_BEGIN, fp); else StringFPuts(KW_LBR, fp); StringFPuts(STR_NEWLINE, fp); *linecount += 1; while( (ch = getc(in_fp)) != EOF ) { putc(ch, fp); if( ch == CH_CR ) { ch = getc(in_fp); if( ch != CH_LF ) ungetc(ch, in_fp); *linecount += 1; } else if( ch == CH_LF ) { ch = getc(in_fp); if( ch != CH_CR ) ungetc(ch, in_fp); *linecount += 1; } } if( filter_use_begin(y) ) { StringFPuts(KW_END, fp); StringFPuts(" ", fp); StringFPuts(SymName(filter_actual(y)), fp); } else StringFPuts(KW_RBR, fp); /* *** a line too far! JeffK 8/3/07 StringFPuts(STR_NEWLINE, fp); *linecount += 1; *** */ fclose(in_fp); debug0(DFH, D, "] FilterWrite returning."); } /* end FilterWrite */ /*****************************************************************************/ /* */ /* FilterScavenge(all) */ /* */ /* Unlink unneeded filter files, or all remaining filter files if all. */ /* */ /*****************************************************************************/ void FilterScavenge(BOOLEAN all) { OBJECT y, link, nextlink; ifdebug(DFH, D, return); debug1(DFH, D, "FilterScavenge(%s)", bool(all)); for( link = Down(filter_active); link != filter_active; link = nextlink ) { Child(y, link); nextlink = NextDown(link); if( all || Up(y) == LastUp(y) ) { debug1(DFH, D, "FilterScavenge scavenging %s", string(y)); StringRemove(string(y)); DisposeChild(link); } } debug0(DFH, D, "FilterScavenge returning."); } /* end FilterScavenge */ lout-3.39/maillist0000644000076400007640000000104311442375626012622 0ustar jeffjeffThe Lout mailing list A public mailing list has been set up for discussion of the Lout document formatting system. Thanks to Rodrigo Vanegas of Brown University for starting this list, to former maintainers Valeriy E. Ushakov and Greg Woods, and to the current initiator, Ludovic Courtes. To subscribe to the list or unsubscribe, visit http://lists.nongnu.org/mailman/listinfo/lout-users To post a message (only subscribers can do this), send email to lout-users@nongnu.org It will be forwarded by email to all current subscribers. lout-3.39/z27.c0000644000076400007640000002576211442244615011656 0ustar jeffjeff/*@z27.c:Debug Service:Debug flags@*******************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z27.c */ /* MODULE: Debug Service */ /* EXTERNS: dbg[], DebugInit(), Debug() */ /* ProfileOn(), ProfileOff(), ProfilePrint() */ /* */ /*****************************************************************************/ #include "externs.h" #if DEBUG_ON struct dbs dbg[] = { {"zz", {0, 0, 0}}, /* - unused - */ {"sp", {0, 0, 0}}, /* Supervise */ {"la", {0, 0, 0}}, /* Lexical Analyser */ {"fs", {0, 0, 0}}, /* File Service */ {"ts", {0, 0, 0}}, /* Token Service */ {"rd", {0, 0, 0}}, /* Read Definitions */ {"op", {0, 0, 0}}, /* Object Parser */ {"os", {0, 0, 0}}, /* Object Service */ {"om", {0, 0, 0}}, /* Object Manifest */ {"ce", {0, 0, 0}}, /* Closure Expansion */ {"cr", {0, 0, 0}}, /* Cross References */ {"ss", {0, 0, 0}}, /* Style Service */ {"sf", {0, 0, 0}}, /* Size Finder */ {"ob", {0, 0, 0}}, /* Object Breaking */ {"of", {0, 0, 0}}, /* Object Filling */ {"sc", {0, 0, 0}}, /* Size Constraints */ {"sa", {0, 0, 0}}, /* Size Adjustments */ {"gw", {0, 0, 0}}, /* Gap Widths */ {"gt", {0, 0, 0}}, /* Galley Transfer */ {"ga", {0, 0, 0}}, /* Galley Attaching */ {"gf", {0, 0, 0}}, /* Galley Flusher */ {"gm", {0, 0, 0}}, /* Galley Maker */ {"gs", {0, 0, 0}}, /* Galley Service */ {"gp", {0, 0, 0}}, /* Galley Printer */ {"ps", {0, 0, 0}}, /* Print Service */ {"oe", {0, 0, 0}}, /* Object Echo */ {"es", {0, 0, 0}}, /* Echo Service */ {"zz", {0, 0, 0}}, /* Debug Service (unused) */ {"yy", {0, 0, 0}}, /* Error Service */ {"st", {0, 0, 0}}, /* Symbol Table */ {"su", {0, 0, 0}}, /* Symbol Uses */ {"ma", {0, 0, 0}}, /* Memory Allocator */ {"cs", {0, 0, 0}}, /* Counter Service */ {"bs", {0, 0, 0}}, /* Database Service */ {"rs", {0, 0, 0}}, /* Rotation Service */ {"tk", {0, 0, 0}}, /* Time Keeper */ {"hy", {0, 0, 0}}, /* Hyphenation */ {"ft", {0, 0, 0}}, /* Font Tables */ {"cm", {0, 0, 0}}, /* Character Mappings */ {"sh", {0, 0, 0}}, /* String Handler */ {"fh", {0, 0, 0}}, /* Filter Handler */ {"io", {0, 0, 0}}, /* Object Input-Output */ {"co", {0, 0, 0}}, /* Colour Service */ {"ls", {0, 0, 0}}, /* Language Service */ {"vh", {0, 0, 0}}, /* Vertical Hyphenation */ {"ex", {0, 0, 0}}, /* External Sort */ {"og", {0, 0, 0}}, /* Optimal Galleys */ {"et", {0, 0, 0}}, /* Environment Table */ {"pd", {0, 0, 0}}, /* PDF Back End (old) */ {"po", {0, 0, 0}}, /* PostScript Back End */ {"pf", {0, 0, 0}}, /* PDF Back End */ {"pt", {0, 0, 0}}, /* Plain Text Back End */ {"tx", {0, 0, 0}}, /* Texture Service */ {"pp", {0, 0, 0}}, /* Profiling */ {"", {0, 0, 0}}, /* any */ }; /*@::DebugInit(), Debug()@****************************************************/ /* */ /* DebugInit(str) */ /* */ /* Turn on the debug flag given by str. */ /* */ /*****************************************************************************/ void DebugInit(FULL_CHAR *str) { int j, urg; for( urg = 0; urg < 2 && str[urg+2] == CH_FLAG_DEBUG; urg++ ); for( j = 1; ; j++ ) { if( StringEqual(AsciiToFull(dbg[j].flag), &str[urg+2]) ) break; if( StringEqual(AsciiToFull(dbg[j].flag), STR_EMPTY) ) Error(27, 1, "unknown debug flag %s", FATAL, no_fpos, str); } for( ; urg >= 0; urg-- ) dbg[j].on[urg] = dbg[ANY].on[urg] = TRUE; } /* end DebugInit */ /*****************************************************************************/ /* */ /* Debug(category, urgency, str, ...) */ /* */ /* Print str on debug output, if the flag corresponding to the given */ /* debug category and urgency is on. */ /* */ /*****************************************************************************/ void Debug(int category, int urgency, char *str, ...) { static BOOLEAN first_message = TRUE; va_list ap; if( first_message ) { fprintf(stderr, "%s", STR_NEWLINE); fprintf(stderr, "Lout Debug Output:"); fprintf(stderr, "%s", STR_NEWLINE); first_message = FALSE; } fprintf(stderr, "%2s: ", dbg[category].flag); va_start(ap, str); vfprintf(stderr, str, ap); va_end(ap); fprintf(stderr, "%s", STR_NEWLINE); fflush(stderr); } /* end Debug */ /*@::ProfileOn(), ProfileOff(), ProfilePrint()@*******************************/ /* */ /* ProfileOn(str) */ /* */ /* Start profiling label str. */ /* */ /*****************************************************************************/ #define MAXPROF 20 #include struct profrec { char *label; /* label of the profile */ int calls; /* number of calls with this label */ long time; /* total time of this label */ }; static struct profrec profstack[MAXPROF]; static struct profrec profstore[MAXPROF]; static int proftop = 0, profsize = 0; void ProfileOn(char *str) { int i; time_t raw_time; for( i = 0; i < proftop; i++ ) { if( strcmp(profstack[i].label, str) == 0 ) { for( i = 0; i < proftop; i++ ) { fprintf(stderr, "profstack[%d] = %s", i, profstack[i].label); fprintf(stderr, "%s", STR_NEWLINE); } assert1(FALSE, "ProfileOn: restarted", str); } } assert(proftop < MAXPROF, "ProfileOn: overflow"); time(&raw_time); profstack[proftop].label = str; profstack[proftop++].time = raw_time; } /* end ProfileOn */ /*****************************************************************************/ /* */ /* ProfileOff(str) */ /* */ /* Stop profiling label str. */ /* */ /*****************************************************************************/ void ProfileOff(char *str) { int i; time_t raw_time; assert1(proftop > 0 && strcmp(profstack[proftop-1].label, str) == 0, "ProfileOff: not current", str); for( i = 0; i < profsize && strcmp(profstore[i].label, str) != 0; i++ ); if( i >= profsize ) { profsize++; assert(profsize < MAXPROF, "ProfileOff: overflow"); profstore[i].label = str; profstore[i].calls = 0; profstore[i].time = 0; } time(&raw_time); profstore[i].calls += 1; profstore[i].time += (raw_time - profstack[--proftop].time); } /* end ProfileOff */ /*****************************************************************************/ /* */ /* ProfilePrint() */ /* */ /* Print results of profiling. */ /* */ /*****************************************************************************/ void ProfilePrint(void) { int i; for( i = 0; i < profsize; i++ ) { fprintf(stderr, "Profile %-20s %6ld secs, %3d calls, %6.2f secs/call", profstore[i].label, profstore[i].time, profstore[i].calls, (float) profstore[i].time / profstore[i].calls ); fprintf(stderr, "%s", STR_NEWLINE); } } /* end ProfilePrint */ #endif lout-3.39/z07.c0000644000076400007640000006522111442244522011643 0ustar jeffjeff/*@z07.c:Object Service:SplitIsDefinite(), DisposeObject()@*******************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z07.c */ /* MODULE: Object Service */ /* EXTERNS: MakeWord(), MakeWordTwo(), MakeWordThree(), */ /* DisposeObject(), CopyObject(), */ /* SplitIsDefinite(), InsertObject() */ /* */ /*****************************************************************************/ #include "externs.h" /*****************************************************************************/ /* */ /* BOOLEAN SplitIsDefinite(x) */ /* */ /* Return TRUE if x is a definite SPLIT object (both children definite) */ /* */ /*****************************************************************************/ BOOLEAN SplitIsDefinite(OBJECT x) { OBJECT y1, y2; assert( type(x) == SPLIT, "SplitIsDefinite: x not a SPLIT!" ); Child(y1, DownDim(x, COLM)); Child(y2, DownDim(x, ROWM)); return is_definite(type(y1)) && is_definite(type(y2)); } /* end SplitIsDefinite */ /*****************************************************************************/ /* */ /* DisposeSplitObject(x) */ /* */ /* Dispose SPLIT object x, taking care to handle COL_THR and ROW_THR */ /* children properly. */ /* */ /*****************************************************************************/ static void DisposeSplitObject(OBJECT x) { int i, count; OBJECT y, link, uplink; debug1(DOS, DDD, "[ DisposeSplitObject( %ld )", (long) x); assert(type(x) == SPLIT, "DisposeSplitObject: type(x) != SPLIT!"); assert(Down(x) != x, "DisposeSplitObject: x has no children!") assert(LastDown(x) != Down(x), "DisposeSplitObject: x has one child!") assert(LastDown(x) == NextDown(Down(x)), "DisposeSplitObject: children!") /* handle first child */ CountChild(y, Down(x), count); if( type(y) == COL_THR ) { /* find corresponding child link out of y and delete that link */ for( link = Down(y), uplink = Up(y), i = 1; link != y && uplink != y && i < count; link = NextDown(link), uplink = NextUp(uplink), i++ ); assert( link != y && uplink != y, "DisposeSplitObject: link (a)!" ); DisposeChild(link); } DisposeChild(Down(x)); /* handle second child */ CountChild(y, LastDown(x), count); if( type(y) == ROW_THR ) { /* find corresponding child link out of y and delete that link */ for( link = Down(y), uplink = Up(y), i = 1; link != y && uplink != y && i < count; link = NextDown(link), uplink = NextUp(uplink), i++ ); assert( link != y && uplink != y, "DisposeSplitObject: link (b)!" ); DisposeChild(link); } DisposeChild(LastDown(x)); debug0(DOS, DDD, "] DisposeSplitObject returning"); } /* end DisposeSplitObject */ /*****************************************************************************/ /* */ /* DisposeObject(x) */ /* */ /* Dispose object x recursively, leaving intact any shared descendants. */ /* We return a useless integer so that we can use this in expresssions. */ /* */ /* If x is a SPLIT object then one or both of its children could be */ /* COL_THR or ROW_THR objects. If such thread object is has this SPLIT */ /* as its ith parent, then we need to dispose its ith child. */ /* */ /*****************************************************************************/ int DisposeObject(OBJECT x) { debug2(DOS,DDD,"[DisposeObject( %ld ), type = %s, x =", (long) x, Image(type(x))); ifdebug(DOS, DDD, DebugObject(x)); assert( Up(x) == x, "DisposeObject: x has a parent!" ); if( type(x) == SPLIT ) DisposeSplitObject(x); else { while( Down(x) != x ) DisposeChild(Down(x)); Dispose(x); } debug0(DOS, DDD, "]DisposeObject returning."); return 0; } /* end DisposeObject */ /*@::MakeWord(), MakeWordTwo()@***********************************************/ /* */ /* OBJECT MakeWord(typ, str, pos) */ /* */ /* Return an unsized WORD or QWORD made from the given string and fpos. */ /* */ /*****************************************************************************/ OBJECT MakeWord(unsigned typ, FULL_CHAR *str, FILE_POS *pos) { OBJECT res; NewWord(res, typ, StringLength(str), pos); StringCopy(string(res), str); FposCopy(fpos(res), *pos); debug4(DOS, DDD, "MakeWord(%s, %s, %s) returning %s", Image(typ), str, EchoFilePos(pos), EchoObject(res)); return res; } /* end MakeWord */ /*****************************************************************************/ /* */ /* OBJECT MakeWordTwo(typ, str1, str2, pos) */ /* */ /* Return an unsized WORD or QWORD made from the two strings and fpos. */ /* */ /*****************************************************************************/ OBJECT MakeWordTwo(unsigned typ, FULL_CHAR *str1, FULL_CHAR *str2, FILE_POS *pos) { int len1 = StringLength(str1); int len2 = StringLength(str2); OBJECT res; debug4(DOS, DDD, "MakeWordTwo(%s, %s, %s, %s)", Image(typ), str1, str2, EchoFilePos(pos)); NewWord(res, typ, len1 + len2, pos); StringCopy(string(res), str1); StringCopy(&string(res)[len1], str2); FposCopy(fpos(res), *pos); debug5(DOS, DDD, "MakeWordTwo(%s, %s, %s, %s) returning %s", Image(typ), str1, str2, EchoFilePos(pos), EchoObject(res)); return res; } /* end MakeWordTwo */ /*****************************************************************************/ /* */ /* OBJECT MakeWordThree(s1, s2, s3) */ /* */ /* Return an unsized WORD containing these three strings. */ /* */ /*****************************************************************************/ OBJECT MakeWordThree(FULL_CHAR *s1, FULL_CHAR *s2, FULL_CHAR *s3) { int len1 = StringLength(s1); int len2 = StringLength(s2); int len3 = StringLength(s3); OBJECT res; debug3(DOS, DDD, "MakeWordThree(%s, %s, %s)", s1, s2, s3); NewWord(res, WORD, len1 + len2 + len3, no_fpos); StringCopy(string(res), s1); StringCopy(&string(res)[len1], s2); StringCopy(&string(res)[len1 + len2], s3); debug4(DOS, DDD, "MakeWordThree(%s, %s, %s) returning %s", s1, s2, s3, EchoObject(res)); return res; } /* end MakeWordThree */ /*@::CopyObject()@************************************************************/ /* */ /* OBJECT CopyObject(x, pos) */ /* */ /* Make a copy of unsized object x, setting all file positions to *pos, */ /* unless *pos is no_fpos, in which case set all file positions to what */ /* they are in the object being copied. */ /* */ /*****************************************************************************/ OBJECT CopyObject(OBJECT x, FILE_POS *pos) { OBJECT y, link, res, tmp; debug2(DOS, DDD, "[ CopyObject(%s, %s)", EchoObject(x), EchoFilePos(pos)); switch( type(x) ) { case WORD: case QWORD: NewWord(res, type(x), StringLength(string(x)), pos); StringCopy(string(res), string(x)); break; case GAP_OBJ: New(res, GAP_OBJ); GapCopy(gap(res), gap(x)); hspace(res) = hspace(x); vspace(res) = vspace(x); if( Down(x) != x ) { Child(y, Down(x)); tmp = CopyObject(y, pos); Link(res, tmp); } break; /* case HEAD: */ case NULL_CLOS: case PAGE_LABEL: case CROSS: case FORCE_CROSS: case BEGIN_HEADER: case END_HEADER: case SET_HEADER: case CLEAR_HEADER: case ONE_COL: case ONE_ROW: case WIDE: case HIGH: case HSHIFT: case VSHIFT: case HMIRROR: case VMIRROR: case HSCALE: case VSCALE: case HCOVER: case VCOVER: case SCALE: case KERN_SHRINK: case HCONTRACT: case VCONTRACT: case HLIMITED: case VLIMITED: case HEXPAND: case VEXPAND: case START_HVSPAN: case START_HSPAN: case START_VSPAN: case HSPAN: case VSPAN: case PADJUST: case HADJUST: case VADJUST: case ROTATE: case BACKGROUND: case RAW_VERBATIM: case VERBATIM: case CASE: case YIELD: case BACKEND: case XCHAR: case FONT: case SPACE: case YUNIT: case ZUNIT: case SET_CONTEXT: case GET_CONTEXT: case BREAK: case UNDERLINE: case UNDERLINE_COLOUR: case COLOUR: case TEXTURE: case OUTLINE: case LANGUAGE: case CURR_LANG: case CURR_FAMILY: case CURR_FACE: case CURR_YUNIT: case CURR_ZUNIT: case COMMON: case RUMP: case MELD: case INSERT: case ONE_OF: case NEXT: case PLUS: case MINUS: case OPEN: case TAGGED: case INCGRAPHIC: case SINCGRAPHIC: case PLAIN_GRAPHIC: case GRAPHIC: case LINK_SOURCE: case LINK_DEST: case LINK_DEST_NULL: case LINK_URL: case VCAT: case HCAT: case ACAT: case ENV_OBJ: New(res, type(x)); for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); tmp = CopyObject(y, pos); Link(res, tmp); } break; case FILTERED: New(res, type(x)); for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); Link(res, y); /* do not copy children of FILTERED */ } debug3(DFH, D, "copying FILTERED %d into %d %s", (int) x, (int) res, EchoObject(res)); break; case ENV: res = x; /* do not copy environments */ break; case PAR: New(res, PAR); actual(res) = actual(x); assert( Down(x) != x, "CopyObject: PAR child!" ); Child(y, Down(x)); tmp = CopyObject(y, pos); Link(res, tmp); break; case CLOSURE: New(res, CLOSURE); for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); assert( type(y) != CLOSURE, "CopyObject: CLOSURE!" ); tmp = CopyObject(y, pos); Link(res, tmp); } actual(res) = actual(x); StyleCopy(save_style(res), save_style(x)); break; default: assert1(FALSE, "CopyObject:", Image(type(x))); res = nilobj; break; } /* end switch */ if( pos == no_fpos ) FposCopy(fpos(res), fpos(x)); else FposCopy(fpos(res), *pos); debug1(DOS, DDD, "] CopyObject returning %s", EchoObject(res)); return res; } /* end CopyObject */ /*****************************************************************************/ /* */ /* OBJECT InsertObject(OBJECT x, OBJECT *ins, STYLE *style) */ /* */ /* Search through manifested object x for an ACAT where ins may be */ /* attached. If successful, set *ins to nilobj after the attachment. */ /* */ /*****************************************************************************/ OBJECT InsertObject(OBJECT x, OBJECT *ins, STYLE *style) { OBJECT link, y, g, res; debug2(DOS, D, "InsertObject(%s, %s)", EchoObject(x), EchoObject(*ins)); switch( type(x) ) { case WORD: case QWORD: New(res, ACAT); FposCopy(fpos(res), fpos(x)); ReplaceNode(res, x); Link(res, x); StyleCopy(save_style(res), *style); adjust_cat(res) = padjust(*style); res = InsertObject(res, ins, style); break; case NULL_CLOS: case BEGIN_HEADER: case END_HEADER: case SET_HEADER: case CLEAR_HEADER: case HEAD: case CROSS: case FORCE_CROSS: case PAGE_LABEL: case CLOSURE: case INCGRAPHIC: case SINCGRAPHIC: case HSPAN: case VSPAN: res = x; break; case HCAT: case VCAT: case COL_THR: case ROW_THR: case SPLIT: for( link = Down(x); link != x && *ins != nilobj; link = NextDown(link) ) { Child(y, link); y = InsertObject(y, ins, style); } res = x; break; case ONE_COL: case ONE_ROW: case PADJUST: case HADJUST: case VADJUST: case HCONTRACT: case VCONTRACT: case HLIMITED: case VLIMITED: case HEXPAND: case VEXPAND: case HMIRROR: case VMIRROR: case HSCALE: case VSCALE: case HCOVER: case VCOVER: case PLAIN_GRAPHIC: case GRAPHIC: case LINK_SOURCE: case LINK_DEST: case LINK_DEST_NULL: case LINK_URL: case ROTATE: case BACKGROUND: case SCALE: case KERN_SHRINK: case WIDE: case HIGH: case HSHIFT: case VSHIFT: case START_HVSPAN: case START_HSPAN: case START_VSPAN: Child(y, LastDown(x)); y = InsertObject(y, ins, style); res = x; break; case ACAT: New(g, GAP_OBJ); SetGap(gap(g), FALSE, FALSE, TRUE, FIXED_UNIT, EDGE_MODE, 0); hspace(g) = vspace(g) = 0; underline(g) = UNDER_OFF; Link(Down(x), g); Link(Down(x), *ins); underline(*ins) = UNDER_OFF; *ins = nilobj; res = x; break; default: assert1(FALSE, "InsertObject:", Image(type(x))); res = x; break; } debug2(DOS, D, "InsertObject returning (%s) %s", *ins == nilobj ? "success" : "failure", EchoObject(res)); return res; } /* end InsertObject */ /*****************************************************************************/ /* */ /* Meld(x, y) */ /* */ /* Return the meld of x with y. */ /* */ /*****************************************************************************/ #define NO_DIR 0 #define X_DIR 1 #define Y_DIR 2 #define XY_DIR 3 #define MAX_MELD 32 OBJECT Meld(OBJECT x, OBJECT y) { OBJECT res; char table[MAX_MELD][MAX_MELD], dir[MAX_MELD][MAX_MELD]; OBJECT xcomp[MAX_MELD], ycomp[MAX_MELD]; OBJECT xgaps[MAX_MELD], ygaps[MAX_MELD]; BOOLEAN is_equal; OBJECT link, z = nilobj, g; BOOLEAN jn; int xlen, ylen, xi, yi; debug2(DOS, D, "Meld(%s, %s)", EchoObject(x), EchoObject(y)); assert(type(x) == ACAT, "Meld: type(x) != ACAT"); assert(type(y) == ACAT, "Meld: type(y) != ACAT"); /* initialize xcomp, xgaps, xlen */ debug0(DOS, DD, " initializing xcomp[]"); xlen = 0; xcomp[xlen] = nilobj; xlen++; g = nilobj; FirstDefinite(x, link, z, jn); while( link != x ) { if( xlen >= MAX_MELD ) Error(7, 1, "%s: maximum paragraph length (%d) exceeded", FATAL, &fpos(x), KW_MELD, MAX_MELD-1); assert( type(z) != ACAT, "Meld: xcomp is ACAT!"); if( g == nilobj || width(gap(g)) != 0 ) { debug3(DOS, DD, " initializing xcomp[%d] to %s %s", xlen, Image(type(z)), EchoObject(z)); xcomp[xlen] = z; xgaps[xlen] = g; xlen++; } else { debug3(DOS, DD, " extending xcomp[%d] with %s %s", xlen-1, Image(type(z)), EchoObject(z)); if( type(xcomp[xlen-1]) != ACAT ) { New(res, ACAT); StyleCopy(save_style(res), save_style(x)); Link(res, xcomp[xlen-1]); xcomp[xlen-1] = res; } Link(xcomp[xlen-1], g); Link(xcomp[xlen-1], z); } NextDefiniteWithGap(x, link, z, g, jn) } /* initialize ycomp, ygaps, ylen */ debug0(DOS, DD, " initializing ycomp[]"); ylen = 0; ycomp[ylen] = nilobj; ylen++; g = nilobj; FirstDefinite(y, link, z, jn); while( link != y ) { if( ylen >= MAX_MELD ) Error(7, 1, "%s: maximum paragraph length (%d) exceeded", FATAL, &fpos(y), KW_MELD, MAX_MELD-1); assert( type(z) != ACAT, "Meld: ycomp is ACAT!"); if( g == nilobj || width(gap(g)) != 0 ) { debug3(DOS, DD, " initializing ycomp[%d] to %s %s", ylen, Image(type(z)), EchoObject(z)); ycomp[ylen] = z; ygaps[ylen] = g; ylen++; } else { debug3(DOS, DD, " extending ycomp[%d] with %s %s", ylen-1, Image(type(z)), EchoObject(z)); if( type(ycomp[ylen-1]) != ACAT ) { New(res, ACAT); StyleCopy(save_style(res), save_style(x)); Link(res, ycomp[ylen-1]); ycomp[ylen-1] = res; } Link(ycomp[ylen-1], g); Link(ycomp[ylen-1], z); } NextDefiniteWithGap(y, link, z, g, jn) } /* initialize table and dir */ debug0(DOS, DD, " initializing table[]"); table[0][0] = 0; dir[0][0] = NO_DIR; for( xi = 1; xi < xlen; xi++ ) { table[xi][0] = 0; dir[xi][0] = X_DIR; } for( yi = 1; yi < ylen; yi++ ) { table[0][yi] = 0; dir[0][yi] = Y_DIR; } for( xi = 1; xi < xlen; xi++ ) { for( yi = 1; yi < ylen; yi++ ) { is_equal = EqualManifested(xcomp[xi], ycomp[yi]); if( is_equal ) { table[xi][yi] = 1 + table[xi - 1][yi - 1]; dir[xi][yi] = XY_DIR; debug3(DOS, DD, " assigning (XY) table[%d][%d] = %d", xi, yi, table[xi][yi]); } else if( table[xi - 1][yi] > table[xi][yi - 1] ) { table[xi][yi] = table[xi - 1][yi]; dir[xi][yi] = X_DIR; debug3(DOS, DD, " assigning (X) table[%d][%d] = %d", xi, yi, table[xi][yi]); } else { table[xi][yi] = table[xi][yi - 1]; dir[xi][yi] = Y_DIR; debug3(DOS, DD, " assigning (Y) table[%d][%d] = %d", xi, yi, table[xi][yi]); } } } /* traverse table from [xlen-l][ylen-1] back to [0][0], finding who's in */ debug0(DOS, DD, " traversing table[]"); New(res, ACAT); StyleCopy(save_style(res), save_style(x)); for( xi = xlen - 1, yi = ylen - 1; dir[xi][yi] != NO_DIR; ) { switch( dir[xi][yi] ) { case XY_DIR: debug3(DOS, DD, " at table[%d][%d] (XY) linking %s", xi, yi, EchoObject(xcomp[xi])); if( type(xcomp[xi]) != ACAT ) { Link(Down(res), xcomp[xi]); } else TransferLinks(Down(xcomp[xi]), xcomp[xi], Down(res)); g = xgaps[xi]; xi--; yi--; break; case Y_DIR: debug3(DOS, DD, " at table[%d][%d] (ydec) linking %s", xi, yi, EchoObject(ycomp[yi])); if( type(ycomp[yi]) != ACAT ) { Link(Down(res), ycomp[yi]); } else TransferLinks(Down(ycomp[yi]), ycomp[yi], Down(res)); g = ygaps[yi]; yi--; break; case X_DIR: debug3(DOS, DD, " at table[%d][%d] (xdec) linking %s", xi, yi, EchoObject(xcomp[xi])); if( type(xcomp[xi]) != ACAT ) { Link(Down(res), xcomp[xi]); } else TransferLinks(Down(xcomp[xi]), xcomp[xi], Down(res)); g = xgaps[xi]; xi--; } /* add gap if not last time; either g or one we make up */ if( dir[xi][yi] != NO_DIR ) { if( g == nilobj ) { OBJECT tmp; New(g, GAP_OBJ); hspace(g) = 1; vspace(g) = 0; FposCopy(fpos(g), *no_fpos); SetGap(gap(g), FALSE, FALSE, TRUE, FIXED_UNIT, EDGE_MODE, width(space_gap(save_style(res)))); tmp = MakeWord(WORD, AsciiToFull("1s"), &fpos(g)); Link(g, tmp); Link(Down(res), g); } else { assert(Up(g) == LastUp(g), "Meld: g!" ); Link(Down(res), g); } } } debug1(DOS, D, "Meld returning %s", EchoObject(res)); return res; } /*****************************************************************************/ /* */ /* static BOOLEAN EqualChildren(x, y) */ /* */ /* Return TRUE if manifested objects x and y have equal children. */ /* */ /*****************************************************************************/ static BOOLEAN EqualChildren(OBJECT x, OBJECT y) { OBJECT xl, yl, xc, yc; xl = Down(x), yl = Down(y); for( ; xl != x && yl != y; xl = NextDown(xl), yl = NextDown(yl) ) { Child(xc, xl); Child(yc, yl); if( !EqualManifested(xc, yc) ) return FALSE; } return xl == x && yl == y; } /*****************************************************************************/ /* */ /* BOOLEAN EqualManifested(x, y) */ /* */ /* Return TRUE if manifested objects x and y are equal. */ /* */ /*****************************************************************************/ BOOLEAN EqualManifested(OBJECT x, OBJECT y) { OBJECT xc, yc; if( is_word(type(x)) && is_word(type(y)) ) { return StringEqual(string(x), string(y)); } else if( type(x) != type(y) ) { return FALSE; } else switch( type(x) ) { case GAP_OBJ: /* objects are equal if the two gaps are equal */ return GapEqual(gap(x), gap(y)); break; case CLOSURE: /* objects are equal if it's the same symbol and same parameters */ if( actual(x) != actual(y) ) return FALSE; return EqualChildren(x, y); break; case PAGE_LABEL: case NULL_CLOS: case CROSS: case FORCE_CROSS: case HEAD: case SPLIT: case HSPANNER: case VSPANNER: case COL_THR: case ROW_THR: case ACAT: case HCAT: case VCAT: case HMIRROR: case VMIRROR: case HSCALE: case VSCALE: case BEGIN_HEADER: case SET_HEADER: case END_HEADER: case CLEAR_HEADER: case ONE_COL: case ONE_ROW: case HCOVER: case VCOVER: case HCONTRACT: case VCONTRACT: case HEXPAND: case VEXPAND: case START_HSPAN: case START_VSPAN: case START_HVSPAN: case HSPAN: case VSPAN: case KERN_SHRINK: case BACKGROUND: case GRAPHIC: case PLAIN_GRAPHIC: case LINK_DEST: case LINK_DEST_NULL: case LINK_URL: case INCGRAPHIC: case SINCGRAPHIC: case PAR: /* objects are equal if the children are equal */ return EqualChildren(x, y); break; case LINK_SOURCE: /* objects are equal if right children are equal */ Child(xc, LastDown(x)); Child(yc, LastDown(y)); return EqualManifested(xc, yc); break; case WIDE: case HIGH: /* objects are equal if constraints and children are equal */ return EqualConstraint(constraint(x), constraint(y)) && EqualChildren(x, y); break; case HSHIFT: case VSHIFT: /* objects are equal if constraints and children are equal */ return shift_type(x) == shift_type(y) && GapEqual(shift_gap(x), shift_gap(y)) && EqualChildren(x, y); break; case SCALE: /* objects are equal if constraints and children are equal */ return bc(constraint(x)) == bc(constraint(y)) && fc(constraint(x)) == fc(constraint(y)) && EqualChildren(x, y); break; case ROTATE: /* objects are equal if angle is equal and children are equal */ return sparec(constraint(x)) == sparec(constraint(y)) && EqualChildren(x, y); break; default: Error(7, 2, "EqualUnsized: type == %s", FATAL, &fpos(x), Image(type(x))); return FALSE; break; } } lout-3.39/z19.c0000644000076400007640000011275111442244567011660 0ustar jeffjeff/*@z19.c:Galley Attaching:DetachGalley()@*************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z19.c */ /* MODULE: Galley Attaching */ /* EXTERNS: SearchGalley(), AttachGalley(), DetachGalley() */ /* */ /*****************************************************************************/ #include "externs.h" /*****************************************************************************/ /* */ /* OBJECT InterposeScale(y, scale_factor, dim) */ /* */ /* Interpose a @Scale symbol above y with the given scale factor. */ /* */ /*****************************************************************************/ static OBJECT InterposeScale(OBJECT y, int scale_factor, int dim) { OBJECT res; New(res, SCALE); FposCopy(fpos(res), fpos(y)); if( dim == COLM ) { bc(constraint(res)) = scale_factor; fc(constraint(res)) = 1 * SF; } else { bc(constraint(res)) = 1 * SF; fc(constraint(res)) = scale_factor; } back(res, dim) = (back(y, dim) * scale_factor) / SF; fwd(res, dim) = (fwd(y, dim) * scale_factor) / SF; back(res, 1-dim) = back(y, 1-dim); fwd(res, 1-dim) = fwd(y, 1-dim); ReplaceNode(res, y); Link(res, y); return res; } /* end InterposeScale */ /*****************************************************************************/ /* */ /* OBJECT InterposeWideOrHigh(y, dim) */ /* */ /* Interpose a @Wide or @High symbol above y with the same size as y, with */ /* a value which prevents any further increase in the size of y. */ /* */ /*****************************************************************************/ static OBJECT InterposeWideOrHigh(OBJECT y, int dim) { OBJECT res; New(res, dim == COLM ? WIDE : HIGH); FposCopy(fpos(res), fpos(y)); back(res, dim) = back(y, dim); fwd(res, dim) = fwd(y, dim); back(res, 1-dim) = back(y, 1-dim); fwd(res, 1-dim) = fwd(y, 1-dim); SetConstraint(constraint(res), MAX_FULL_LENGTH, size(res, dim), MAX_FULL_LENGTH); ReplaceNode(res, y); Link(res, y); return res; } /* end InterposeWideOrHigh */ /*****************************************************************************/ /* */ /* DetachGalley(hd) */ /* */ /* Detach galley hd from its target. */ /* */ /*****************************************************************************/ void DetachGalley(OBJECT hd) { OBJECT prnt, index; assert( type(hd) == HEAD && Up(hd) != hd, "DetachGalley: precondition!" ); debug1(DGA, D, "DetachGalley( %s )", SymName(actual(hd))); Parent(prnt, Up(hd)); assert( Up(prnt) != prnt, "DetachGalley: parent!" ); New(index, UNATTACHED); pinpoint(index) = nilobj; MoveLink(Up(hd), index, PARENT); Link(NextDown(Up(prnt)), index); debug0(DGA, D, "DetachGalley returning."); } /* end DetachGalley */ /*@::SearchGalley()@**********************************************************/ /* */ /* OBJECT SearchGalley(start, sym, forwards, subgalleys, closures, input) */ /* */ /* Search a galley and its sub-galleys for a target which uses sym. The */ /* meanings of the flags are as follows: */ /* */ /* forwards If TRUE, search forwards from just after start, else */ /* search backwards from just before start */ /* subgalleys If TRUE, search down into sub-galleys of this galley */ /* closures If TRUE, closures in this galley are acceptable results */ /* input If TRUE, InputSym is an acceptable result */ /* */ /*****************************************************************************/ OBJECT SearchGalley(OBJECT start, OBJECT sym, BOOLEAN forwards, BOOLEAN subgalleys, BOOLEAN closures, BOOLEAN input) { OBJECT y, res, z, zlink, link; debug5(DGA, DD, "[ SearchGalley(start, %s, %s, %s, %s, %s)", SymName(sym), forwards ? "fwd" : "back", subgalleys ? "subgalleys" : "nosubgalleys", closures ? "closures" : "noclosures", input ? "input" : "noinput"); assert( type(start) == LINK || type(start) == HEAD, "SearchGalley: start!" ); link = forwards ? NextDown(start) : PrevDown(start); res = nilobj; while( res == nilobj && type(link) != HEAD ) { Child(y, link); switch( type(y) ) { case UNATTACHED: case RECEIVING: debug1(DGA, DD, " examining %s", EchoIndex(y)); if( subgalleys ) for( zlink = Down(y); zlink!=y && res==nilobj; zlink=NextDown(zlink) ) { Child(z, zlink); res = SearchGalley(z, sym, TRUE, TRUE, TRUE, input); } if( res == nilobj && input && type(y) == RECEIVING && actual(actual(y)) == InputSym ) res = y; break; case RECEPTIVE: debug1(DGA, DD, " examining %s", EchoIndex(y)); if( closures && type(actual(y)) == CLOSURE && SearchUses(actual(actual(y)), sym) ) res = y; else if( input && actual(actual(y)) == InputSym ) res = y; break; default: break; } link = forwards ? NextDown(link) : PrevDown(link); } debug1(DGA, DD, "] SearchGalley returning %s", EchoIndex(res)); return res; } /* end SearchGalley */ /*@@**************************************************************************/ /* */ /* int AttachGalley(hd, inners, suspend_pt) */ /* */ /* Attach galley hd, which may be unsized, to a destination. This involves */ /* searching for a destination forward or back from the attachment point of */ /* hd and promoting up to and including the first definite component of hd. */ /* */ /* Although AttachGalley never flushes any galleys, it may identify some */ /* galleys which should be flushed, even if the attach is itself not */ /* successful. These are returned in *inners, or nilobj if none. */ /* */ /* The integer returned by AttachGalley indicates what happened to hd: */ /* */ /* ATTACH_KILLED The galley was sized to begin with but no target */ /* for it could be found. The galley has been killed */ /* and that's the end of it. */ /* */ /* ATTACH_INPUT When searching for a target for the galley we came */ /* upon InputSym, suggesting that the target might be */ /* still to be read. So the galley has been linked to */ /* that InputSym and must now wait. */ /* */ /* ATTACH_NOTARGET The galley is unsized and no target could be found */ /* for it. This is fine, it just means that we can't */ /* flush the galley now and we must try again later. */ /* */ /* ATTACH_SUSPEND The galley is sized and a target was found for it, */ /* but the first component of the galley proved to be */ /* indefinite so could not be promoted. The galley */ /* remains unattached but is moved to just before its */ /* target so that it can find it easily later when its */ /* first component becomes definite and it is flushed. */ /* */ /* ATTACH_NULL The galley is sized and a target was found for it, */ /* but the body of the galley proved to be null (i.e. */ /* there were no definite components to be flushed). */ /* This is to be treated just like the normal case */ /* following, except that the target is replaced by */ /* @Null rather than by its body. */ /* */ /* ATTACH_ACCEPT The galley is sized and a target was found for it, */ /* and one component of the galley has been promoted. */ /* */ /*****************************************************************************/ int AttachGalley(OBJECT hd, OBJECT *inners, OBJECT *suspend_pt) { OBJECT hd_index; /* the index of hd in the enclosing galley */ OBJECT hd_inners; /* inner galleys of hd, if unsized */ OBJECT dest; /* the target @Galley hd empties into */ OBJECT dest_index; /* the index of dest */ OBJECT target; /* the target indefinite containing dest */ OBJECT target_index; /* the index of target */ OBJECT target_galley; /* the body of target, made into a galley */ OBJECT tg_inners; /* inner galleys of target_galley */ BOOLEAN need_precedes = FALSE;/* true if destination lies before galley */ OBJECT recs; /* list of recursive definite objects */ OBJECT link, y = nilobj; /* for scanning through the components of hd */ CONSTRAINT c; /* temporary variable holding a constraint */ OBJECT env, n1, tmp, zlink, z, sym; /* placeholders and temporaries */ BOOLEAN was_sized; /* true if sized(hd) initially */ int dim; /* the galley direction */ FULL_LENGTH perp_back, perp_fwd; OBJECT why, junk; debug2(DGA, D, "[ AttachGalley(Galley %s into %s)", SymName(actual(hd)), SymName(whereto(hd))); ifdebug(DGA, DD, DebugGalley(hd, nilobj, 4)); assert( Up(hd) != hd, "AttachGalley: no index!" ); Parent(hd_index, Up(hd)); assert( type(hd_index) == UNATTACHED, "AttachGalley: not UNATTACHED!" ); hd_inners = tg_inners = nilobj; was_sized = sized(hd); dim = gall_dir(hd); for(;;) { /*************************************************************************/ /* */ /* Search for a destination for hd. If hd is unsized, search for */ /* inner galleys preceding it first of all, then for receptive objects */ /* following it, possibly in inner galleys. If no luck, exit. */ /* If hd is sized, search only for receptive objects in the current */ /* galley below the current spot, and fail if cannot find any. */ /* */ /*************************************************************************/ sym = whereto(hd); if( sized(hd) ) { /* sized galley case: search on from current spot */ target_index = SearchGalley(Up(hd_index), sym, TRUE, FALSE, TRUE, TRUE); if( target_index == nilobj ) { /* search failed to find any new target, so kill the galley */ for( link = Down(hd); link != hd; link = NextDown(link) ) { Child(y, link); if( type(y) == SPLIT ) Child(y, DownDim(y, dim)); if( is_definite(type(y)) ) break; } if( link != hd ) Error(19, 1, "galley %s deleted from here (no target)", WARN, &fpos(y), SymName(actual(hd))); if( hd_inners != nilobj ) DisposeObject(hd_inners), hd_inners=nilobj; if( tg_inners != nilobj ) DisposeObject(tg_inners), tg_inners=nilobj; KillGalley(hd, FALSE); *inners = nilobj; debug0(DGA, D, "] AttachGalley returning ATTACH_KILLED"); return ATTACH_KILLED; } else if( actual(actual(target_index)) == InputSym ) { /* search found input object, so suspend on that */ DeleteNode(hd_index); Link(target_index, hd); *inners = nilobj; debug0(DGA, D, "] AttachGalley returning ATTACH_INPUT"); return ATTACH_INPUT; } } else /* unsized galley, either backwards or normal */ { if( foll_or_prec(hd) == GALL_PREC ) { target_index= SearchGalley(Up(hd_index), sym, FALSE, TRUE,TRUE,FALSE); need_precedes = FALSE; } else { target_index = SearchGalley(Up(hd_index), sym, FALSE,TRUE,FALSE,FALSE); need_precedes = (target_index != nilobj); if( target_index == nilobj ) target_index = SearchGalley(Up(hd_index), sym, TRUE,TRUE,TRUE,FALSE); } /* if no luck, exit without error */ if( target_index == nilobj ) { *inners = nilobj; debug0(DGA, D, "] AttachGalley returning ATTACH_NOTARGET"); return ATTACH_NOTARGET; } } assert( type(target_index) == RECEPTIVE, "AttachGalley: target_index!" ); target = actual(target_index); assert( type(target) == CLOSURE, "AttachGalley: target!" ); /* set target_galley to the expanded value of target */ debug1(DYY, D, "[ EnterErrorBlock(FALSE) (expanding target %s)", SymName(actual(target))); EnterErrorBlock(FALSE); New(target_galley, HEAD); force_gall(target_galley) = FALSE; enclose_obj(target_galley) = limiter(target_galley) = nilobj; ClearHeaders(target_galley); opt_components(target_galley) = opt_constraints(target_galley) = nilobj; gall_dir(target_galley) = external_hor(target) ? COLM : ROWM; FposCopy(fpos(target_galley), fpos(target)); actual(target_galley) = actual(target); whereto(target_galley) = ready_galls(target_galley) = nilobj; foll_or_prec(target_galley) = GALL_FOLL; must_expand(target_galley) = FALSE; sized(target_galley) = FALSE; /* get perpendicular constraint (none if horizontal galley) */ if( dim == ROWM ) { Constrained(target, &c, 1-dim, &junk); if( !constrained(c) ) Error(19, 2, "receptive symbol %s has unconstrained width", FATAL, &fpos(target), SymName(actual(target))); debug2(DSC, DD, "Constrained( %s, 1-dim ) = %s", EchoObject(target), EchoConstraint(&c)); if( !FitsConstraint(0, 0, c) ) { debug0(DGA, D, " reject: target_galley horizontal constraint is -1"); y = nilobj; goto REJECT; } } else /* actually unused */ SetConstraint(c, MAX_FULL_LENGTH, MAX_FULL_LENGTH, MAX_FULL_LENGTH); debug1(DGA, DDD, " expanding %s", EchoObject(target)); tmp = CopyObject(target, no_fpos); Link(target_galley, tmp); env = DetachEnv(tmp); debug4(DGM, D, " external_ver(%s) = %s, external_hor(%s) = %s", SymName(actual(target)), bool(external_ver(target)), SymName(actual(target)), bool(external_hor(target))); SizeGalley(target_galley, env, external_ver(target) || external_hor(target), threaded(target), non_blocking(target_index), trigger_externs(target_index), &save_style(target), &c, whereto(hd), &dest_index, &recs, &tg_inners, enclose_obj(hd) != nilobj ? CopyObject(enclose_obj(hd), no_fpos):nilobj); debug1(DGA, DD, " SizeGalley tg_inners: %s", DebugInnersNames(tg_inners)); if( recs != nilobj ) ExpandRecursives(recs); dest = actual(dest_index); if( underline(dest) == UNDER_UNDEF ) underline(dest) = UNDER_OFF; /* verify that hd satisfies any horizontal constraint on dest */ if( dim == ROWM ) { debug1(DGA, DDD, " checking hor fit of hd in %s",SymName(actual(dest))); Constrained(dest, &c, 1-dim, &junk); debug3(DSC, DD, "Constrained( %s, %s ) = %s", EchoObject(dest), dimen(1-dim), EchoConstraint(&c)); assert( constrained(c), "AttachGalley: dest unconstrained!" ); if( !FitsConstraint(0, 0, c) ) { debug0(DGA, D, " reject: hd horizontal constraint is -1"); y = nilobj; goto REJECT; } } /* manifest and size the galley if not done yet */ if( !sized(hd) ) { debug2(DYY, D, "[ EnterErrorBlock(TRUE) (sizing galley %s into %s)", SymName(actual(hd)), SymName(whereto(hd))); EnterErrorBlock(TRUE); n1 = nilobj; Child(y, Down(hd)); env = DetachEnv(y); /*** threaded() only defined in ROWM case SizeGalley(hd, env, TRUE, threaded(dest), non_blocking(target_index), TRUE, &save_style(dest), &c, nilobj, &n1, &recs, &hd_inners); *** */ SizeGalley(hd, env, TRUE, dim == ROWM ? threaded(dest) : FALSE, non_blocking(target_index), TRUE, &save_style(dest), &c, nilobj, &n1, &recs, &hd_inners, nilobj); debug1(DGA,DD," SizeGalley hd_inners: %s", DebugInnersNames(hd_inners)); if( recs != nilobj ) ExpandRecursives(recs); if( need_precedes ) /* need an ordering constraint */ { OBJECT index1, index2; New(index1, PRECEDES); New(index2, FOLLOWS); blocked(index2) = FALSE; tmp = MakeWord(WORD, STR_EMPTY, no_fpos); Link(index1, tmp); Link(index2, tmp); Link(Up(hd_index), index1); Link(Down(hd), index2); debug0(DGA, D, " inserting PRECEDES and FOLLOWS"); } LeaveErrorBlock(TRUE); debug0(DYY, D, "] LeaveErrorBlock(TRUE) (finished sizing galley)"); } if( dim == ROWM ) { if( !FitsConstraint(back(hd, 1-dim), fwd(hd, 1-dim), c) ) { debug3(DGA, D, " reject: hd %s,%s does not fit target_galley %s", EchoLength(back(hd, 1-dim)), EchoLength(fwd(hd, 1-dim)), EchoConstraint(&c)); Error(19, 3, "too little horizontal space for galley %s at %s", WARN, &fpos(hd), SymName(actual(hd)), SymName(actual(dest))); goto REJECT; } } /* check status of first component of hd */ debug0(DGA, DDD, " now ready to attach; hd ="); ifdebug(DGA, DDD, DebugObject(hd)); for( link = Down(hd); link != hd; link = NextDown(link) ) { Child(y, link); debug1(DGA, DDD, " examining %s", EchoIndex(y)); if( type(y) == SPLIT ) Child(y, DownDim(y, dim)); switch( type(y) ) { case EXPAND_IND: case SCALE_IND: case COVER_IND: case GALL_PREC: case GALL_FOLL: case GALL_FOLL_OR_PREC: case GALL_TARG: case CROSS_PREC: case CROSS_FOLL: case CROSS_FOLL_OR_PREC: case CROSS_TARG: case PAGE_LABEL_IND: break; case PRECEDES: case UNATTACHED: if( was_sized ) { /* SizeGalley was not called, so hd_inners was not set by it */ if( hd_inners == nilobj ) New(hd_inners, ACAT); Link(hd_inners, y); } break; case RECEPTIVE: goto SUSPEND; case RECEIVING: goto SUSPEND; case FOLLOWS: Child(tmp, Down(y)); if( Up(tmp) == LastUp(tmp) ) { link = pred(link, CHILD); debug0(DGA, DD, " disposing FOLLOWS"); DisposeChild(NextDown(link)); break; } Parent(tmp, Up(tmp)); assert(type(tmp) == PRECEDES, "Attach: PRECEDES!"); switch( CheckComponentOrder(tmp, target_index) ) { case CLEAR: DeleteNode(tmp); link = pred(link, CHILD); DisposeChild(NextDown(link)); break; case PROMOTE: break; case BLOCK: debug0(DGA, DD, "CheckContraint: BLOCK"); goto SUSPEND; case CLOSE: debug0(DGA, D, " reject: CheckContraint"); goto REJECT; } break; case GAP_OBJ: underline(y) = underline(dest); if( !join(gap(y)) ) seen_nojoin(hd) = TRUE; break; case BEGIN_HEADER: case END_HEADER: case SET_HEADER: case CLEAR_HEADER: /* do nothing until actually promoted out of here */ underline(y) = underline(dest); break; case CLOSURE: case CROSS: case FORCE_CROSS: case NULL_CLOS: case PAGE_LABEL: underline(y) = underline(dest); break; case WORD: case QWORD: case ONE_COL: case ONE_ROW: case WIDE: case HIGH: case HSHIFT: case VSHIFT: case HMIRROR: case VMIRROR: case HSCALE: case VSCALE: case HCOVER: case VCOVER: case HCONTRACT: case VCONTRACT: case HLIMITED: case VLIMITED: case HEXPAND: case VEXPAND: case START_HVSPAN: case START_HSPAN: case START_VSPAN: case HSPAN: case VSPAN: case ROTATE: case BACKGROUND: case SCALE: case KERN_SHRINK: case INCGRAPHIC: case SINCGRAPHIC: case PLAIN_GRAPHIC: case GRAPHIC: case LINK_SOURCE: case LINK_DEST: case LINK_DEST_NULL: case LINK_URL: case ACAT: case HCAT: case VCAT: case ROW_THR: case COL_THR: underline(y) = underline(dest); if( dim == ROWM ) { /* make sure y is not joined to a target below (vertical only) */ for( zlink = NextDown(link); zlink != hd; zlink = NextDown(zlink) ) { Child(z, zlink); switch( type(z) ) { case RECEPTIVE: if( non_blocking(z) ) { zlink = PrevDown(zlink); DeleteNode(z); } else { y = z; goto SUSPEND; } break; case RECEIVING: if( non_blocking(z) ) { zlink = PrevDown(zlink); while( Down(z) != z ) { Child(tmp, Down(y)); if( opt_components(tmp) != nilobj ) { DisposeObject(opt_components(tmp)); opt_components(tmp) = nilobj; debug3(DOG, D, "AttachGalley(%s) de-optimizing %s %s", SymName(actual(hd)), SymName(actual(tmp)), "(join)"); } DetachGalley(tmp); KillGalley(tmp, FALSE); } DeleteNode(z); } else { y = z; goto SUSPEND; } break; case GAP_OBJ: if( !join(gap(z)) ) zlink = PrevDown(hd); break; default: break; } } /* if HCAT, try vertical hyphenation (vertical galleys only) */ if( type(y) == HCAT ) VerticalHyphenate(y); } /* check availability of parallel space for the first component */ why = nilobj; Constrained(dest, &c, dim, &why); debug3(DGF, DD, " dest parallel Constrained(%s, %s) = %s", EchoObject(dest), dimen(dim), EchoConstraint(&c)); if( !FitsConstraint(back(y, dim), fwd(y, dim), c) ) { BOOLEAN scaled; /* if forcing galley doesn't fit, try scaling first component */ scaled = FALSE; if( force_gall(hd) && size(y, dim) > 0 ) { int scale_factor; scale_factor = ScaleToConstraint(back(y,dim), fwd(y,dim), &c); if( scale_factor > 0.5 * SF ) { char num1[20], num2[20]; sprintf(num1, "%.1fc", (float) size(y, dim) / CM); sprintf(num2, "%.1fc", (float) bfc(c) / CM); if( dim == ROWM ) Error(19, 4, "%s object too high for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); else Error(19, 5, "%s object too wide for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); y = InterposeScale(y, scale_factor, dim); scaled = TRUE; } } /* otherwise we must reject, and warn the user */ if( !scaled ) { char num1[20], num2[20]; debug3(DGA, D, " reject: vsize %s,%s in %s; y=", EchoLength(back(y, dim)), EchoLength(fwd(y, dim)), EchoConstraint(&c)); ifdebug(DGA, D, DebugObject(y)); if( size(y, dim) > 0 ) { sprintf(num1, "%.1fc", (float) size(y, dim) / CM); sprintf(num2, "%.1fc", (float) bfc(c) / CM); if( dim == ROWM ) Error(19, 12, "%s object too high for %s space; will try elsewhere", WARN, &fpos(y), num1, num2); else Error(19, 13, "%s object too wide for %s space; will try elsewhere", WARN, &fpos(y), num1, num2); } goto REJECT; } } /* check availability of perpendicular space for first component */ if( dim == ROWM ) { perp_back = back(hd, 1-dim); perp_fwd = fwd(hd, 1-dim); } else { perp_back = back(y, 1-dim); perp_fwd = fwd(y, 1-dim); } Constrained(dest, &c, 1-dim, &junk); debug3(DGF, DD, " dest perpendicular Constrained(%s, %s) = %s", EchoObject(dest), dimen(1-dim), EchoConstraint(&c)); if( !FitsConstraint(perp_back, perp_fwd, c) ) { BOOLEAN scaled; /* if forcing galley doesn't fit, try scaling first component */ scaled = FALSE; if( force_gall(hd) && perp_back + perp_fwd > 0 ) { int scale_factor; scale_factor = ScaleToConstraint(perp_back, perp_fwd, &c); if( scale_factor > 0.5 * SF ) { char num1[20], num2[20]; sprintf(num1, "%.1fc", (float) (perp_back + perp_fwd) / CM); sprintf(num2, "%.1fc", (float) bfc(c) / CM); if( 1-dim == ROWM ) Error(19, 6, "%s object too high for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); else Error(19, 7, "%s object too wide for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); y = InterposeScale(y, scale_factor, 1-dim); scaled = TRUE; } } /* otherwise we must reject, and warn the user */ if( !scaled ) { debug3(DGA, D, " reject: vsize %s,%s in %s; y=", EchoLength(perp_back), EchoLength(perp_fwd), EchoConstraint(&c)); ifdebug(DGA, D, DebugObject(y)); goto REJECT; } } /* dest seems OK, so perform its size adjustments */ debug0(DSA, D, "calling AdjustSize from AttachGalley (a)"); AdjustSize(dest, back(y, dim), fwd(y, dim), dim); debug0(DSA, D, "calling AdjustSize from AttachGalley (b)"); AdjustSize(dest, perp_back, perp_fwd, 1-dim); /* now check parallel space for target_galley in target */ Constrained(target, &c, dim, &why); debug3(DGF, DD, " target parallel Constrained(%s, %s) = %s", EchoObject(target), dimen(dim), EchoConstraint(&c)); Child(z, LastDown(target_galley)); /* works in all cases? */ assert( !is_index(type(z)), "AttachGalley: is_index(z)!" ); assert( back(z, dim)>=0 && fwd(z, dim)>=0, "AttachGalley: z size!" ); if( !FitsConstraint(back(z, dim), fwd(z, dim), c) ) { BOOLEAN scaled; debug2(DGA, D, " why = %d %s", (int) why, EchoObject(why)); debug2(DGA, D, " limiter = %d %s", (int) limiter(hd), EchoObject(limiter(hd))); /* if forcing galley doesn't fit, try scaling z */ scaled = FALSE; if( force_gall(hd) && size(z, dim) > 0 && limiter(hd) != why ) { int scale_factor; scale_factor = ScaleToConstraint(back(z,dim), fwd(z,dim), &c); if( scale_factor > 0.5 * SF ) { char num1[20], num2[20]; sprintf(num1, "%.1fc", (float) size(z, dim) / CM); sprintf(num2, "%.1fc", (float) bfc(c) / CM); if( dim == ROWM ) Error(19, 8, "%s object too high for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); else Error(19, 9, "%s object too wide for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); z = InterposeWideOrHigh(z, dim); z = InterposeScale(z, scale_factor, dim); scaled = TRUE; } } if( !scaled ) { char num1[20], num2[20]; limiter(hd) = why; debug3(DGA, D, " set limiter(%s) = %d %s", SymName(actual(hd)), (int) limiter(hd), EchoObject(limiter(hd))); debug3(DGA, D, " reject: size was %s,%s in %s; y =", EchoLength(back(z, dim)), EchoLength(fwd(z, dim)), EchoConstraint(&c)); ifdebug(DGA, D, DebugObject(y)); if( size(z, dim) > 0 ) { sprintf(num1, "%.1fc", (float) size(z, dim) / CM); sprintf(num2, "%.1fc", (float) bfc(c) / CM); if( dim == ROWM ) Error(19, 14, "%s object too high for %s space; will try elsewhere", WARN, &fpos(y), num1, num2); else Error(19, 15, "%s object too wide for %s space; will try elsewhere", WARN, &fpos(y), num1, num2); } goto REJECT; } } limiter(hd) = why; debug3(DGA, D, " set limiter(%s) = %d %s", SymName(actual(hd)), (int) limiter(hd), EchoObject(limiter(hd))); /* now check perpendicular space for target_galley in target */ Constrained(target, &c, 1-dim, &junk); debug3(DGF, DD, " target perpendicular Constrained(%s, %s) = %s", EchoObject(target), dimen(1-dim), EchoConstraint(&c)); Child(z, LastDown(target_galley)); /* works in all cases? */ assert( !is_index(type(z)), "AttachGalley: is_index(z)!" ); assert( back(z, 1-dim)>=0 && fwd(z, 1-dim)>=0, "AttachGalley: z size (perpendicular)!" ); if( !FitsConstraint(back(z, 1-dim), fwd(z, 1-dim), c) ) { BOOLEAN scaled; /* if forcing galley doesn't fit, try scaling z */ scaled = FALSE; if( force_gall(hd) && size(z, 1-dim) > 0 ) { int scale_factor; scale_factor = ScaleToConstraint(back(z,1-dim), fwd(z,1-dim), &c); if( scale_factor > 0.5 * SF ) { char num1[20], num2[20]; sprintf(num1, "%.1fc", (float) size(z, 1-dim) / CM); sprintf(num2, "%.1fc", (float) bfc(c) / CM); if( 1-dim == ROWM ) Error(19, 10, "%s object too high for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); else Error(19, 11, "%s object too wide for %s space; %s inserted", WARN, &fpos(y), num1, num2, KW_SCALE); z = InterposeWideOrHigh(z, 1-dim); z = InterposeScale(z, scale_factor, 1-dim); scaled = TRUE; } } if( !scaled ) { debug3(DGA, D, " reject: size was %s,%s in %s; y =", EchoLength(back(z, 1-dim)), EchoLength(fwd(z, 1-dim)), EchoConstraint(&c)); ifdebug(DGA, D, DebugObject(y)); goto REJECT; } } /* target seems OK, so adjust sizes and accept */ if( external_hor(target) ) { /* don't adjust any sizes, none to adjust */ debug0(DSA, D, "not calling AdjustSize from AttachGalley (c)"); } else if( external_ver(target) ) { /* adjust perp size only, to galley size */ debug0(DSA, D, "calling AdjustSize from AttachGalley (d)"); AdjustSize(target, back(target_galley, 1-dim), fwd(target_galley, 1-dim), 1-dim); } else { /* adjust both directions, using z (last component) */ Child(z, LastDown(target_galley)); debug0(DSA, D, "AttachGalley AdjustSize using z ="); ifdebug(DSA, D, DebugObject(z)); debug0(DSA, D, "calling AdjustSize from AttachGalley (e)"); AdjustSize(target, back(z, dim), fwd(z, dim), dim); debug0(DSA, D, "calling AdjustSize from AttachGalley (f)"); AdjustSize(target, back(z, 1-dim), fwd(z, 1-dim), 1-dim); } goto ACCEPT; default: assert1(FALSE, "AttachGalley:", Image(type(y))); break; } /* end switch */ } /* end for */ /* null galley: promote whole galley without expanding the target */ debug0(DGA, D, " null galley"); if( tg_inners != nilobj ) DisposeObject(tg_inners), tg_inners = nilobj; DisposeObject(target_galley); LeaveErrorBlock(FALSE); debug0(DYY, D, "] LeaveErrorBlock(FALSE) (null galley)"); /* kill off any null objects within the galley, then transfer it */ /* don't use Promote() since it does extra unwanted things here */ for( link = Down(hd); link != hd; link = NextDown(link) ) { Child(y, link); switch( type(y) ) { case GAP_OBJ: case CLOSURE: case CROSS: case FORCE_CROSS: case NULL_CLOS: case PAGE_LABEL: link = PrevDown(link); debug1(DGA, D, " null galley, disposing %s", Image(type(y))); DisposeChild(NextDown(link)); break; default: break; } } TransferLinks(NextDown(hd), hd, Up(target_index)); /* attach hd temporarily to target_index */ MoveLink(Up(hd), target_index, PARENT); assert( type(hd_index) == UNATTACHED, "AttachGalley: type(hd_index)!" ); DeleteNode(hd_index); /* return; only hd_inners needs to be flushed now */ *inners = hd_inners; debug0(DGA, D, "] AttachGalley returning ATTACH_NULL"); return ATTACH_NULL; REJECT: /* reject first component */ /* debug1(DGA, D, " reject %s", EchoObject(y)); */ debug0(DGA, D, " reject first component"); LeaveErrorBlock(TRUE); debug0(DYY, D, "] LeaveErrorBlock(TRUE) (REJECT)"); if( tg_inners != nilobj ) DisposeObject(tg_inners), tg_inners = nilobj; DisposeObject(target_galley); if( foll_or_prec(hd) == GALL_PREC && !sized(hd) ) { /* move to just before the failed target */ MoveLink(Up(hd_index), Up(target_index), PARENT); } else { /* move to just after the failed target */ MoveLink(Up(hd_index), NextDown(Up(target_index)), PARENT); } continue; SUSPEND: /* suspend at first component */ debug1(DGA, D, " suspend %s", EchoIndex(y)); blocked(y) = TRUE; LeaveErrorBlock(FALSE); debug0(DYY, D, "] LeaveErrorBlock(FALSE) (SUSPEND)"); if( tg_inners != nilobj ) DisposeObject(tg_inners), tg_inners = nilobj; DisposeObject(target_galley); MoveLink(Up(hd_index), Up(target_index), PARENT); if( was_sized ) { /* nothing new to flush if suspending and already sized */ if( hd_inners != nilobj ) DisposeObject(hd_inners), hd_inners=nilobj; *inners = nilobj; } else { /* flush newly discovered inners if not sized before */ *inners = hd_inners; } debug0(DGA, D, "] AttachGalley returning ATTACH_SUSPEND"); *suspend_pt = y; return ATTACH_SUSPEND; ACCEPT: /* accept first component; now committed to the attach */ debug3(DGA, D, " accept %s %s %s", Image(type(y)), EchoObject(y), EchoFilePos(&fpos(y))); LeaveErrorBlock(TRUE); debug0(DYY, D, "] LeaveErrorBlock(TRUE) (ACCEPT)"); /* attach hd to dest */ MoveLink(Up(hd), dest_index, PARENT); assert( type(hd_index) == UNATTACHED, "AttachGalley: type(hd_index)!" ); DeleteNode(hd_index); /* move first component of hd into dest */ /* nb Interpose must be done after all AdjustSize calls */ if( dim == ROWM && !external_ver(dest) ) Interpose(dest, VCAT, hd, y); else if( dim == COLM && !external_hor(dest) ) { Interpose(dest, ACAT, y, y); Parent(junk, Up(dest)); assert( type(junk) == ACAT, "AttachGalley: type(junk) != ACAT!" ); StyleCopy(save_style(junk), save_style(dest)); adjust_cat(junk) = padjust(save_style(junk)); } debug1(DGS, D, "calling Promote(hd, %s) from AttachGalley/ACCEPT", link == hd ? "hd" : "NextDown(link)"); Promote(hd, link == hd ? hd : NextDown(link), dest_index, TRUE); /* move target_galley into target */ /* nb Interpose must be done after all AdjustSize calls */ if( !(external_ver(target) || external_hor(target)) ) { Child(z, LastDown(target_galley)); Interpose(target, VCAT, z, z); } debug0(DGS, D, "calling Promote(target_galley) from AttachGalley/ACCEPT"); Promote(target_galley, target_galley, target_index, TRUE); DeleteNode(target_galley); assert(Down(target_index)==target_index, "AttachGalley: target_ind"); if( blocked(target_index) ) blocked(dest_index) = TRUE; DeleteNode(target_index); /* return; both tg_inners and hd_inners need to be flushed now; */ /* if was_sized, hd_inners contains the inners of the first component; */ /* otherwise it contains the inners of all components, from SizeGalley */ if( tg_inners == nilobj ) *inners = hd_inners; else if( hd_inners == nilobj ) *inners = tg_inners; else { TransferLinks(Down(hd_inners), hd_inners, tg_inners); DeleteNode(hd_inners); *inners = tg_inners; } debug0(DGA, D, "] AttachGalley returning ATTACH_ACCEPT"); ifdebug(DGA, D, if( dim == COLM && !external_hor(dest) ) { OBJECT z; Parent(z, Up(dest)); debug2(DGA, D, " COLM dest_encl on exit = %s %s", Image(type(z)), EchoObject(z)); } ) return ATTACH_ACCEPT; } /* end for */ } /* end AttachGalley */ lout-3.39/z29.c0000644000076400007640000010117311442244622011645 0ustar jeffjeff/*@z29.c:Symbol Table:Declarations, hash()@***********************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z29.c */ /* MODULE: Symbol Table */ /* EXTERNS: InitSym(), PushScope(), PopScope(), SuppressVisible(), */ /* UnSuppressVisible(), SuppressScope(), UnSuppressScope(), */ /* SwitchScope(), UnSwitchScope(), BodyParAllowed(), */ /* BodyParNotAllowed(), InsertSym(), SearchSym(), */ /* SymName(), FullSymName(), ChildSym(), CheckSymSpread(), */ /* DeleteEverySym() */ /* */ /*****************************************************************************/ #include "externs.h" #define MAX_STACK 300 /* size of scope stack */ #define MAX_TAB 1783 /* size of hash table */ #define length(x) word_font(x) static OBJECT scope[MAX_STACK]; /* the scope stack */ static BOOLEAN npars_only[MAX_STACK]; /* look for NPAR exc */ static BOOLEAN vis_only[MAX_STACK]; /* look for visibles */ static BOOLEAN body_ok[MAX_STACK]; /* look for body par */ static BOOLEAN suppress_scope; /* suppress scoping */ static BOOLEAN suppress_visible; /* suppress visible */ static int scope_top; /* scope stack top */ static struct { OBJECT f1, f2; } symtab[MAX_TAB]; /* the hash table */ #if DEBUG_ON static int sym_spread[MAX_TAB]; /* hash table spread */ static int sym_count; /* symbol count */ #endif /*****************************************************************************/ /* */ /* #define hash(str, len, val) */ /* */ /* Set val to the hash value of string str, which has length len. */ /* The hash function is just the character sum mod MAX_TAB. */ /* This definition assumes that working variables rlen and x exist. */ /* */ /*****************************************************************************/ #define hash(str, len, val) \ { rlen = len; \ x = str; \ val = *x++; \ while( --rlen ) val += *x++; \ val %= MAX_TAB; \ } /*@::InitSym(), PushScope(), PopScope(), SuppressVisible(), etc.@*************/ /* */ /* InitSym() */ /* */ /* Initialize the symbol table to empty. */ /* */ /*****************************************************************************/ void InitSym(void) { int i; scope_top = 0; suppress_scope = FALSE; suppress_visible = FALSE; for( i = 0; i < MAX_TAB; i++ ) symtab[i].f1 = symtab[i].f2 = (OBJECT) &symtab[i]; #if DEBUG_ON for( i = 0; i < MAX_TAB; i++ ) sym_spread[i] = 0; sym_count = 0; #endif } /* end InitSym */ /*****************************************************************************/ /* */ /* PushScope(x, npars, vis) */ /* PopScope() */ /* */ /* Add or remove an OBJECT x (which must be in the symbol table) to or from */ /* the scope stack. If npars is TRUE, only the named parameters of x are */ /* added to scope. If vis is TRUE, only visible locals and parameters are */ /* added. */ /* */ /*****************************************************************************/ void PushScope(OBJECT x, BOOLEAN npars, BOOLEAN vis) { debug3(DST, DD, "[ PushScope(%s, %s, %s)", SymName(x), bool(npars), bool(vis)); assert( suppress_scope == FALSE, "PushScope: suppress_scope!" ); if( scope_top >= MAX_STACK ) { #if DEBUG_ON int i; for( i = 0; i < scope_top; i++ ) Error(29, 1, " scope[%2d] = %s", WARN, &fpos(x), i, SymName(scope[i])); #endif Error(29, 2, "scope depth limit exceeded", INTERN, &fpos(x)); } scope[scope_top] = x; npars_only[scope_top] = npars; vis_only[scope_top] = vis; body_ok[scope_top] = FALSE; scope_top++; } /* end PushScope */ void PopScope(void) { debug0(DST, DD, "] PopScope()"); assert( scope_top > 0, "PopScope: tried to pop empty scope stack"); assert( suppress_scope == FALSE, "PopScope: suppress_scope!" ); scope_top--; } /* end PopScope */ /*****************************************************************************/ /* */ /* SuppressVisible() */ /* UnSuppressVisible() */ /* */ /* Make all children of any symbol acceptable, not just the exported ones. */ /* */ /*****************************************************************************/ void SuppressVisible(void) { debug0(DST, DD, "[ SuppressVisible()"); suppress_visible = TRUE; } /* end SuppressVisible */ void UnSuppressVisible(void) { debug0(DST, DD, "] UnSuppressVisible()"); suppress_visible = FALSE; } /* end UnSuppressVisible */ /*@::SuppressScope(), UnSuppressScope(), SwitchScope(), UnswitchScope()@******/ /* */ /* SuppressScope() */ /* UnSuppressScope() */ /* */ /* Suppress all scopes (so that all calls to SearchSym fail); and undo it. */ /* */ /*****************************************************************************/ void SuppressScope(void) { debug0(DST, DD, "[ SuppressScope()"); suppress_scope = TRUE; } /* end SuppressScope */ void UnSuppressScope(void) { debug0(DST, DD, "] UnSuppressScope()"); suppress_scope = FALSE; } /* end UnSuppressScope */ /*****************************************************************************/ /* */ /* SwitchScope(sym) */ /* UnSwitchScope(sym) */ /* */ /* Switch to the scope of sym (if nilobj, StartSym); and switch back again. */ /* */ /*****************************************************************************/ void SwitchScope(OBJECT sym) { int i; OBJECT new_scopes[MAX_STACK]; if( sym == nilobj ) PushScope(StartSym, FALSE, FALSE); else { i = 0; while( sym != StartSym ) { new_scopes[i++] = enclosing(sym); sym = enclosing(sym); } while( i > 0 ) PushScope(new_scopes[--i], FALSE, FALSE); } } void UnSwitchScope(OBJECT sym) { if( sym == nilobj ) PopScope(); else { while( sym != StartSym ) { PopScope(); sym = enclosing(sym); } } } /*****************************************************************************/ /* */ /* BodyParAllowed() */ /* BodyParNotAllowed() */ /* */ /* Allow or disallow invocations of the body parameter of the current tos. */ /* */ /*****************************************************************************/ void BodyParAllowed(void) { debug0(DST, DD, "BodyParAllowed()"); body_ok[scope_top-1] = TRUE; } /* end BodyParAllowed */ void BodyParNotAllowed(void) { debug0(DST, DD, "BodyParNotAllowed()"); body_ok[scope_top-1] = FALSE; } /* end BodyParNotAllowed */ /*****************************************************************************/ /* */ /* DebugScope(void) */ /* */ /* Debug print of current scope stack */ /* */ /*****************************************************************************/ void DebugScope(void) { int i; if( suppress_scope ) { debug0(DST, D, "suppressed"); } else for( i = 0; i < scope_top; i++ ) { debug6(DST, D, "%s %s%s%s%s%s", i == scope_top - 1 ? "->" : " ", SymName(scope[i]), npars_only[i] ? " npars_only" : "", vis_only[i] ? " vis_only" : "", body_ok[i] ? " body_ok" : "", i == scope_top - 1 && suppress_visible ? " suppress_visible" : ""); } } /* end DebugScope */ /*@::ScopeSnapshot()@*********************************************************/ /* */ /* OBJECT GetScopeSnapshot() */ /* LoadScopeSnapshot(ss) */ /* ClearScopeSnapshot(ss) */ /* */ /* A scope snapshot is a complete record of the state of the scope stack */ /* at some moment. These routines allow you to take a scope snapshot, */ /* then subsequently load it (i.e. make it the current scope), then */ /* subsequently clear it (i.e. return to whatever was before the Load). */ /* */ /*****************************************************************************/ OBJECT GetScopeSnapshot() { OBJECT ss, x; int i; New(ss, ACAT); for( i = scope_top-1; scope[i] != StartSym; i-- ) { New(x, SCOPE_SNAPSHOT); Link(ss, x); Link(x, scope[i]); ss_npars_only(x) = npars_only[i]; ss_vis_only(x) = vis_only[i]; ss_body_ok(x) = body_ok[i]; } ss_suppress(ss) = suppress_visible; return ss; } /* end GetScopeSnapshot */ void LoadScopeSnapshot(OBJECT ss) { OBJECT link, x, sym; BOOLEAN tmp; assert( type(ss) == ACAT, "LoadScopeSnapshot: type(ss)!" ); PushScope(StartSym, FALSE, FALSE); for( link = LastDown(ss); link != ss; link = PrevDown(link) ) { Child(x, link); assert( type(x) == SCOPE_SNAPSHOT, "LoadScopeSnapshot: type(x)!" ); Child(sym, Down(x)); PushScope(sym, ss_npars_only(x), ss_vis_only(x)); body_ok[scope_top-1] = ss_body_ok(x); } tmp = suppress_visible; suppress_visible = ss_suppress(ss); ss_suppress(ss) = tmp; debug0(DST, D, "after LoadScopeSnapshot, scope is:") ifdebug(DST, D, DebugScope()); } /* end LoadScopeSnapshot */ void ClearScopeSnapshot(OBJECT ss) { while( scope[scope_top-1] != StartSym ) scope_top--; scope_top--; suppress_visible = ss_suppress(ss); } /* end ClearScopeSnapshot */ /*@::InsertSym()@*************************************************************/ /* */ /* OBJECT InsertSym(str, xtype, xfpos, xprecedence, indefinite, xrecursive, */ /* xpredefined, xenclosing, xbody) */ /* */ /* Insert a new symbol into the table. Its string value is str. */ /* Initialise the symbol as the parameters indicate. */ /* Return a pointer to the new symbol. */ /* If str is not a valid symbol name, InsertSym prints an error */ /* message and does not insert the symbol. */ /* */ /*****************************************************************************/ OBJECT InsertSym(FULL_CHAR *str, unsigned char xtype, FILE_POS *xfpos, unsigned char xprecedence, BOOLEAN xindefinite, BOOLEAN xrecursive, unsigned xpredefined, OBJECT xenclosing, OBJECT xbody) { register int sum, rlen; register unsigned char *x; OBJECT p, q, s, tmp, link, entry, plink; int len; debug3(DST, DD, "InsertSym( %s, %s, in %s )", Image(xtype), str, SymName(xenclosing)); if( !LexLegalName(str) ) Error(29, 3, "invalid symbol name %s", WARN, xfpos, str); New(s, xtype); FposCopy(fpos(s), *xfpos); has_body(s) = FALSE; filter(s) = nilobj; use_invocation(s) = nilobj; imports(s) = nilobj; imports_encl(s) = FALSE; right_assoc(s) = TRUE; precedence(s) = xprecedence; indefinite(s) = xindefinite; recursive(s) = xrecursive; predefined(s) = xpredefined; enclosing(s) = xenclosing; sym_body(s) = xbody; base_uses(s) = nilobj; uses(s) = nilobj; marker(s) = nilobj; cross_sym(s) = nilobj; is_extern_target(s) = FALSE; uses_extern_target(s)= FALSE; visible(s) = FALSE; uses_galley(s) = FALSE; horiz_galley(s) = ROWM; has_compulsory(s) = 0; is_compulsory(s) = FALSE; uses_count(s) = 0; dirty(s) = FALSE; if( enclosing(s) != nilobj && type(enclosing(s)) == NPAR ) dirty(s) = dirty(enclosing(s)) = TRUE; has_par(s) = FALSE; has_lpar(s) = FALSE; has_rpar(s) = FALSE; if( is_par(type(s)) ) has_par(enclosing(s)) = TRUE; if( type(s) == LPAR ) has_lpar(enclosing(s)) = TRUE; if( type(s) == RPAR ) has_rpar(enclosing(s)) = TRUE; /* assign a code letter between a and z to any NPAR symbol */ if( type(s) == NPAR ) { if( LastDown(enclosing(s)) != enclosing(s) ) { Child(tmp, LastDown(enclosing(s))); if( type(tmp) == NPAR ) { if( npar_code(tmp) == 'z' || npar_code(tmp) == ' ' ) npar_code(s) = ' '; else npar_code(s) = npar_code(tmp)+1; } else npar_code(s) = 'a'; } else npar_code(s) = 'a'; } has_target(s) = FALSE; force_target(s) = FALSE; if( !StringEqual(str, KW_TARGET) ) is_target(s) = FALSE; else { is_target(s) = has_target(enclosing(s)) = TRUE; /* if @Target is found after @Key, take note of external target */ if( has_key(enclosing(s)) && xbody != nilobj && is_cross(type(xbody)) ) { if( LastDown(xbody) != Down(xbody) ) { OBJECT sym; Child(sym, Down(xbody)); if( type(sym) == CLOSURE ) { is_extern_target(actual(sym)) = TRUE; uses_extern_target(actual(sym)) = TRUE; } } } } has_tag(s) = is_tag(s) = FALSE; has_key(s) = is_key(s) = FALSE; has_optimize(s) = is_optimize(s) = FALSE; has_merge(s) = is_merge(s) = FALSE; has_enclose(s) = is_enclose(s) = FALSE; if( enclosing(s) != nilobj && type(enclosing(s)) == LOCAL ) { if( StringEqual(str, KW_TAG) ) is_tag(s) = has_tag(enclosing(s)) = dirty(enclosing(s)) = TRUE; if( StringEqual(str, KW_OPTIMIZE) ) is_optimize(s) = has_optimize(enclosing(s)) = TRUE; if( StringEqual(str, KW_KEY) ) { is_key(s) = has_key(enclosing(s)) = dirty(enclosing(s)) = TRUE; /* if @Key is found after @Target, take note of external target */ for( link=Down(enclosing(s)); link!=enclosing(s); link=NextDown(link) ) { Child(p, link); if( is_target(p) && sym_body(p)!=nilobj && is_cross(type(sym_body(p))) ) { OBJECT sym; Child(sym, Down(sym_body(p))); if( type(sym) == CLOSURE ) { is_extern_target(actual(sym)) = TRUE; uses_extern_target(actual(sym)) = TRUE; } } } } if( StringEqual(str, KW_MERGE) ) is_merge(s) = has_merge(enclosing(s)) = TRUE; if( StringEqual(str, KW_ENCLOSE) ) is_enclose(s) = has_enclose(enclosing(s)) = TRUE; } if( StringEqual(str, KW_FILTER) ) { if( type(s) != LOCAL || enclosing(s) == StartSym ) Error(29, 4, "%s must be a local definition", WARN, &fpos(s), str); else if( !has_rpar(enclosing(s)) ) Error(29, 14, "%s must lie within a symbol with a right parameter", WARN, &fpos(s), KW_FILTER); else { filter(enclosing(s)) = s; precedence(enclosing(s)) = FILTER_PREC; } } if( type(s) == RPAR && has_body(enclosing(s)) && (is_tag(s) || is_key(s) || is_optimize(s)) ) Error(29, 5, "a body parameter may not be named %s", WARN, &fpos(s), str); if( type(s) == RPAR && has_target(enclosing(s)) && (is_tag(s) || is_key(s) || is_optimize(s)) ) Error(29, 6, "the right parameter of a galley may not be called %s", WARN, &fpos(s), str); len = StringLength(str); hash(str, len, sum); ifdebug(DST, D, sym_spread[sum]++; sym_count++); entry = (OBJECT) &symtab[sum]; for( plink = Down(entry); plink != entry; plink = NextDown(plink) ) { Child(p, plink); if( length(p) == len && StringEqual(str, string(p)) ) { for( link = Down(p); link != p; link = NextDown(link) ) { Child(q, link); if( enclosing(s) == enclosing(q) ) { Error(29, 7, "symbol %s previously defined at%s", WARN, &fpos(s), str, EchoFilePos(&fpos(q)) ); if( AltErrorFormat ) { Error(29, 13, "symbol %s previously defined here", WARN, &fpos(q), str); } break; } } goto wrapup; } } /* need a new OBJECT as well as s */ NewWord(p, WORD, len, xfpos); length(p) = len; StringCopy(string(p), str); Link(entry, p); wrapup: Link(p, s); if( enclosing(s) != nilobj ) Link(enclosing(s), s); debug2(DST, DD, "InsertSym Link(%s, %s) and returning.", SymName(enclosing(s)), SymName(s)); return s; } /* end InsertSym */ /*****************************************************************************/ /* */ /* InsertAlternativeName(str, s, xfpos) */ /* */ /* Insert an alternative name for symbol s. */ /* */ /*****************************************************************************/ void InsertAlternativeName(FULL_CHAR *str, OBJECT s, FILE_POS *xfpos) { register int sum, rlen; register unsigned char *x; int len; OBJECT entry, link, plink, p, q; debug3(DST, DD, "InsertAlternativeName(%s, %s, %s)", str, SymName(s), EchoFilePos(xfpos)); len = StringLength(str); hash(str, len, sum); ifdebug(DST, D, sym_spread[sum]++; sym_count++); entry = (OBJECT) &symtab[sum]; for( plink = Down(entry); plink != entry; plink = NextDown(plink) ) { Child(p, plink); if( length(p) == len && StringEqual(str, string(p)) ) { for( link = Down(p); link != p; link = NextDown(link) ) { Child(q, link); if( enclosing(s) == enclosing(q) ) { Error(29, 12, "symbol name %s previously defined at%s", WARN, &fpos(s), str, EchoFilePos(&fpos(q)) ); break; } } goto wrapup; } } /* need a new OBJECT as well as s */ NewWord(p, WORD, len, xfpos); length(p) = len; StringCopy(string(p), str); Link(entry, p); wrapup: Link(p, s); /* not for copies if( enclosing(s) != nilobj ) Link(enclosing(s), s); */ debug0(DST, DD, "InsertAlternativeName returning."); } /* end InsertAlternativeName */ /*@::SearchSym(), SymName()@**************************************************/ /* */ /* OBJECT SearchSym(str, len) */ /* */ /* Search the symbol table for str, with length len, and return an */ /* OBJECT referencing the entry if found. Otherwise return nilobj. */ /* */ /*****************************************************************************/ OBJECT SearchSym(FULL_CHAR *str, int len) { register int rlen, sum; register FULL_CHAR *x, *y; OBJECT p, q, link, plink, entry; int s; debug2(DST, DDD, "SearchSym( %c..., %d )", str[0], len); hash(str, len, sum); rlen = len; entry = (OBJECT) &symtab[sum]; for( plink = Down(entry); plink != entry; plink = NextDown(plink) ) { Child(p, plink); if( rlen == length(p) ) { x = str; y = string(p); do; while( *x++ == *y++ && --rlen ); if( rlen == 0 ) { debug1(DST, DDD, " found %s", string(p)); s = scope_top; do { s--; for( link = Down(p); link != p; link = NextDown(link) ) { Child(q, link); { debugcond4(DST, DDD, enclosing(q) == scope[s], " !npars_only[s] = %s, !vis_only[s] = %s, body_ok[s] = %s, !ss = %s", bool(!npars_only[s]), bool(!vis_only[s]), bool(body_ok[s]), bool(!suppress_scope)); } if( enclosing(q) == scope[s] && (!npars_only[s] || type(q) == NPAR) && (!vis_only[s] || visible(q) || suppress_visible ) && (body_ok[s] || type(q)!=RPAR || !has_body(enclosing(q)) || suppress_visible ) && (!suppress_scope || StringEqual(string(p), KW_INCLUDE) || StringEqual(string(p), KW_SYSINCLUDE)) ) { debug3(DST, DD, "SearchSym returning %s %s%%%s", Image(type(q)), SymName(q), SymName(enclosing(q))); return q; } } } while( scope[s] != StartSym ); } } rlen = len; } debug0(DST, DDD, "SearchSym returning "); return nilobj; } /* end SearchSym */ /*****************************************************************************/ /* */ /* FULL_CHAR *SymName(s) */ /* */ /* Return the string value of the name of symbol s. */ /* */ /*****************************************************************************/ FULL_CHAR *SymName(OBJECT s) { OBJECT p; if( s == nilobj ) return AsciiToFull(""); Parent(p, Up(s)); assert( is_word(type(p)), "SymName: !is_word(type(p))!" ); return string(p); } /* end SymName */ /*@::FullSymName(), ChildSym()@***********************************************/ /* */ /* FULL_CHAR *FullSymName(x, str) */ /* */ /* Return the path name of symbol x. with str separating each entry. */ /* */ /*****************************************************************************/ FULL_CHAR *FullSymName(OBJECT x, FULL_CHAR *str) { OBJECT stack[20]; int i; static FULL_CHAR buff[MAX_BUFF], *sname; if( x == nilobj ) return AsciiToFull(""); assert( enclosing(x) != nilobj, "FullSymName: enclosing(x) == nilobj!" ); for( i = 0; enclosing(x) != nilobj && i < 20; i++ ) { stack[i] = x; x = enclosing(x); } StringCopy(buff, STR_EMPTY); for( i--; i > 0; i-- ) { sname = SymName(stack[i]); if( StringLength(sname)+StringLength(str)+StringLength(buff) >= MAX_BUFF ) Error(29, 8, "full name of symbol is too long", FATAL, &fpos(x)); StringCat(buff, sname); StringCat(buff, str); } sname = SymName(stack[0]); if( StringLength(sname) + StringLength(buff) >= MAX_BUFF ) Error(29, 9, "full name of symbol is too long", FATAL, &fpos(x)); StringCat(buff, sname); return buff; } /* end FullSymName */ /*****************************************************************************/ /* */ /* OBJECT ChildSym(s, typ) */ /* */ /* Find the child of symbol s of type typ, either LPAR or RPAR. */ /* */ /*****************************************************************************/ OBJECT ChildSym(OBJECT s, unsigned typ) { OBJECT link, y; for( link = Down(s); link != s; link = NextDown(link) ) { Child(y, link); if( type(y) == typ && enclosing(y) == s ) return y; } Error(29, 10, "symbol %s has missing %s", FATAL, &fpos(s), SymName(s), Image(typ)); return nilobj; } /* end ChildSym */ /*****************************************************************************/ /* */ /* OBJECT ChildSymWithCode(s, code) */ /* */ /* Find the child of symbol s with the given npar code, else nil. */ /* */ /*****************************************************************************/ OBJECT ChildSymWithCode(OBJECT s, unsigned char code) { OBJECT link, y; for( link = Down(actual(s)); link != actual(s); link = NextDown(link) ) { Child(y, link); if( type(y) == NPAR && enclosing(y) == actual(s) && npar_code(y) == code ) return y; } Error(29, 11, "symbol %s has erroneous code %c (database out of date?)", FATAL, &fpos(s), SymName(actual(s)), (char) code); return nilobj; } /* end ChildSym */ /*@::CheckSymSpread(), DeleteSymBody()@***************************************/ /* */ /* CheckSymSpread() */ /* */ /* Check the spread of symbols through the hash table. */ /* */ /*****************************************************************************/ #if DEBUG_ON void CheckSymSpread(void) { int i, j, sum, usum; OBJECT entry, plink; fprintf(stderr, "Symbol table spread (table size = %d, symbols = %d):", MAX_TAB, sym_count); usum = sum = 0; for( i = 0; i < MAX_TAB; i++ ) { fprintf(stderr, "%4d: ", i); for( j = 1; j <= sym_spread[i]; j++ ) { fprintf(stderr, "."); sum += j; } entry = (OBJECT) &symtab[i]; for( plink=Down(entry), j=1; plink != entry; plink=NextDown(plink), j++ ) { fprintf(stderr, "+"); usum += j; } fprintf(stderr, "%s", STR_NEWLINE); } fprintf(stderr, "average length counting duplicate names = %.1f", (float) sum / sym_count); fprintf(stderr, "%s", STR_NEWLINE); fprintf(stderr, "average length not counting duplicate names = %.1f", (float) usum / sym_count); fprintf(stderr, "%s", STR_NEWLINE); } /* end CheckSymSpread */ /*****************************************************************************/ /* */ /* static DeleteSymBody(s) */ /* */ /* Delete the body of symbol s. */ /* */ /*****************************************************************************/ static void DeleteSymBody(OBJECT s) { OBJECT t; debug1(DST, DDD, "DeleteSymBody( %s )", SymName(s)); switch( type(s) ) { case MACRO: while( sym_body(s) != nilobj ) { t = sym_body(s); sym_body(s) = Delete(sym_body(s), PARENT); Dispose(t); } break; case LPAR: case NPAR: case RPAR: case LOCAL: if( sym_body(s) != nilobj ) DisposeObject(sym_body(s)); break; default: assert1(FALSE, "DeleteSymBody:", Image(type(s))); break; } debug0(DST, DDD, "DeleteSymBody returning."); } /* end DeleteSymBody */ /*@::DeleteEverySym()@********************************************************/ /* */ /* DeleteEverySym() */ /* */ /* Delete every symbol in the symbol table. */ /* Note that we first delete all bodies, then the symbols themselves. */ /* This is so that the closures within the bodies have well-defined */ /* actual() pointers, even while the symbol table is being disposed. */ /* If this is not done, debug output during the disposal gets confused. */ /* */ /*****************************************************************************/ void DeleteEverySym(void) { int i, j, load, cost; OBJECT p, plink, link, x, entry; debug0(DST, DD, "DeleteEverySym()"); /* dispose the bodies of all symbols */ for( i = 0; i < MAX_TAB; i++ ) { entry = (OBJECT) &symtab[i]; for( plink = Down(entry); plink != entry; plink = NextDown(plink) ) { Child(p, plink); for( link = Down(p); link != p; link = NextDown(link) ) { Child(x, link); DeleteSymBody(x); /* *** will not work now while( base_uses(x) != nilobj ) { tmp = base_uses(x); base_uses(x) = next(tmp); PutMem(tmp, USES_SIZE); } while( uses(x) != nilobj ) { tmp = uses(x); uses(x) = next(tmp); PutMem(tmp, USES_SIZE); } *** */ } } } /* dispose the symbol name strings, gather statistics, and print them */ load = cost = 0; for( i = 0; i < MAX_TAB; i++ ) { j = 1; entry = (OBJECT) &symtab[i]; while( Down(entry) != entry ) { load += 1; cost += j; j += 1; DisposeChild(Down(entry)); } } if( load > 0 ) { debug4(DST, DD, "size = %d, items = %d (%d%%), probes = %.1f", MAX_TAB, load, (100*load)/MAX_TAB, (float) cost/load); } else { debug1(DST, DD, "table size = %d, no entries in table", MAX_TAB); } debug0(DST, DD, "DeleteEverySym returning."); } /* end DeleteEverySym */ #endif lout-3.39/z41.c0000644000076400007640000007047111442244667011656 0ustar jeffjeff/*@z41.c:Object Input-Output:AppendToFile, ReadFromFile@**********************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z41.c */ /* MODULE: Object Input-Output */ /* EXTERNS: ReadFromFile(), AppendToFile(), CloseFiles() */ /* */ /*****************************************************************************/ #include "externs.h" static FILE_NUM last_write_fnum; static FILE *last_write_fp; /*****************************************************************************/ /* */ /* void ReadFromFileInit(void) */ /* */ /* Initialize this module. */ /* */ /*****************************************************************************/ void ReadFromFileInit(void) { last_write_fnum = NO_FILE; last_write_fp = null; } /*****************************************************************************/ /* */ /* OBJECT ReadFromFile(fnum, pos, lnum) */ /* */ /* Read an object from file fnum starting at position pos. */ /* The object may include @Env operators defining its environment, or */ /* not, but in any case ReadFromFile assumes that the correct scope is set. */ /* lnum is the line number of the spot you end up at when you seek to pos. */ /* */ /*****************************************************************************/ OBJECT ReadFromFile(FILE_NUM fnum, long pos, int lnum) { OBJECT t, res; #if DEBUG_ON int ipos = 0; #endif ifdebug(DPP, D, ProfileOn("ReadFromFile")); ifdebug(DIO, D, ipos = (int) pos); debug3(DIO, D, "ReadFromFile(%s, %d, %d)", FileName(fnum), ipos, lnum); LexPush(fnum, (int) pos, DATABASE_FILE, lnum, FALSE); t = LexGetToken(); if( type(t) != LBR ) { debug1(DIO, D, " following because type(t) = %s", Image(type(t))); Error(41, 1, "database index file seems to be out of date", FATAL, &fpos(t)); } res = Parse(&t, StartSym, FALSE, FALSE); if( t != nilobj || type(res) != CLOSURE ) { debug1(DIO, D, " following because of %s", t!=nilobj ? "t" : "type(res)"); Error(41, 2, "syntax error in database file", FATAL, &fpos(res)); } LexPop(); debug1(DIO, D, "ReadFromFile returning %s", EchoObject(res)); ifdebug(DPP, D, ProfileOff("ReadFromFile")); return res; } /* end ReadFromFile */ /*****************************************************************************/ /* */ /* static Optimize(x, env) */ /* */ /*****************************************************************************/ static void OptimizeParameterList(OBJECT x, OBJECT env); static void Optimize(OBJECT x, OBJECT env) { OBJECT tmp; if( Down(x) != x ) { OptimizeParameterList(x, env); } tmp = ParameterCheck(x, env); if( tmp != nilobj ) { ReplaceNode(tmp, x); DisposeObject(x); } } /*****************************************************************************/ /* */ /* OptimizeParameterList(x, env) */ /* */ /* Optimize the space required to print the parameters of x by evaluating */ /* them in environment env if this is feasible. */ /* */ /*****************************************************************************/ static void OptimizeParameterList(OBJECT x, OBJECT env) { OBJECT y, z, link, t, tlink; assert( type(x) == CLOSURE, "OptimizeParameterList: type(x) != CLOSURE!" ); if( env == nilobj ) return; for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == PAR ) { Child(z, Down(y)); if( type(z) == CLOSURE ) { Optimize(z, env); } else if( type(z) == ACAT ) { for( tlink = Down(z); tlink != z; tlink = NextDown(tlink) ) { Child(t, Down(tlink)); if( type(t) == CLOSURE ) Optimize(t, env); } } } } } /* end OptimizeParameter */ /*@::WriteClosure()@**********************************************************/ /* */ /* static WriteClosure(x, linecount, fnum, env) */ /* */ /* Write closure x to file last_write_fp, without enclosing braces and */ /* without any environment attached. If x happens to be a closure that */ /* was previously read as a @Use clause, write only @LUse and the name. */ /* Increment *linecount by the number of lines written. */ /* The file being written to is fnum; the environment is env (for optim.) */ /* */ /*****************************************************************************/ static void WriteObject(OBJECT x, int outer_prec, int *linecount, FILE_NUM fnum); static BOOLEAN need_lvis(OBJECT sym) /* true if @LVis needed before sym */ { return !visible(sym) && enclosing(sym) != StartSym && type(enclosing(sym)) == LOCAL; } /* end need_lvis */ static void WriteClosure(OBJECT x, int *linecount, FILE_NUM fnum, OBJECT env) { OBJECT y, link, z, sym; BOOLEAN npar_written, name_printed; debug2(DIO, D, "[ WriteClosure(%s %s)", Image(type(x)), EchoObject(x)); sym = actual(x); /* *** if( use_invocation(sym) == x ) *** */ if( use_invocation(sym) != nilobj ) { StringFPuts(KW_LUSE, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(SymName(sym), last_write_fp); } else { npar_written = FALSE; name_printed = FALSE; OptimizeParameterList(x, env); for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == PAR ) switch( type(actual(y)) ) { case LPAR: assert( Down(y) != y, "WriteObject/CLOSURE: LPAR!" ); Child(z, Down(y)); WriteObject(z, (int) precedence(sym), linecount, fnum); StringFPuts(STR_SPACE, last_write_fp); break; case NPAR: assert( Down(y) != y, "WriteObject/CLOSURE: NPAR!" ); Child(z, Down(y)); if( !name_printed ) { if( need_lvis(sym) ) { StringFPuts(KW_LVIS, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); } StringFPuts(SymName(sym), last_write_fp); name_printed = TRUE; } StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; StringFPuts(STR_SPACE, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); if( npar_code(actual(y)) != ' ' ) { StringFPuts(STR_ESCAPE, last_write_fp); fprintf(last_write_fp, "%c", (char) npar_code(actual(y))); } else { StringFPuts(SymName(actual(y)), last_write_fp); } StringFPuts(KW_LBR, last_write_fp); WriteObject(z, NO_PREC, linecount, fnum); StringFPuts(KW_RBR, last_write_fp); npar_written = TRUE; break; case RPAR: assert( Down(y) != y, "WriteObject/CLOSURE: RPAR!" ); Child(z, Down(y)); if( !name_printed ) { if( need_lvis(sym) ) { StringFPuts(KW_LVIS, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); } StringFPuts(SymName(sym), last_write_fp); name_printed = TRUE; } if( npar_written ) { StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } else { StringFPuts(STR_SPACE, last_write_fp); } /* old version: if( filter(sym) != nilobj ) */ if( filter(sym) != nilobj && type(z) == FILTERED ) /* ??? */ { debug1(DIO, D, " filter(sym) != nilobj, type(z) == %s", Image(type(z))); assert( type(z) == FILTERED, "WriteClosure: filter!" ); WriteObject(z, NO_PREC, linecount, fnum); } else if( has_body(sym) ) { StringFPuts(KW_LBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); WriteObject(z, NO_PREC, linecount, fnum); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_RBR, last_write_fp); } else WriteObject(z, (int) precedence(sym), linecount, fnum); break; default: assert1(FALSE, "WriteClosure:", Image(type(actual(y)))); break; } /* end switch */ } /* end for each parameter */ if( !name_printed ) { if( need_lvis(sym) ) { StringFPuts(KW_LVIS, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); } StringFPuts(SymName(sym), last_write_fp); name_printed = TRUE; } } debug0(DIO, D, "] WriteClosure returning"); } /* end WriteClosure */ /*@::WriteObject()@***********************************************************/ /* */ /* static WriteObject(x, outer_prec, linecount, fnum) */ /* */ /* Write object x to file last_write_fp, assuming it is a subobject of an */ /* object and the precedence of operators enclosing it is outer_prec. */ /* Increment *linecount by the number of lines written. */ /* The file being written to is fnum. */ /* */ /*****************************************************************************/ static void WriteObject(OBJECT x, int outer_prec, int *linecount, FILE_NUM fnum) { OBJECT link, y, z, gap_obj, sym, env; FULL_CHAR *name; int offset, lnum; int prec, i, last_prec; BOOLEAN braces_needed; debug2(DIO, D, "[ WriteObject(%s %s)", Image(type(x)), EchoObject(x)); switch( type(x) ) { case WORD: if( StringLength(string(x)) == 0 && outer_prec > ACAT_PREC ) { StringFPuts(KW_LBR, last_write_fp); StringFPuts(KW_RBR, last_write_fp); } else StringFPuts(string(x), last_write_fp); break; case QWORD: StringFPuts(StringQuotedWord(x), last_write_fp); break; case VCAT: prec = VCAT_PREC; goto ETC; case HCAT: prec = HCAT_PREC; goto ETC; case ACAT: prec = ACAT_PREC; goto ETC; ETC: if( prec < outer_prec ) StringFPuts(KW_LBR, last_write_fp); last_prec = prec; for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == GAP_OBJ ) { if( Down(y) == y ) { assert( type(x) == ACAT, "WriteObject: Down(y) == y!" ); for( i = 1; i <= vspace(y); i++ ) StringFPuts(STR_NEWLINE, last_write_fp); *linecount += vspace(y); for( i = 1; i <= hspace(y); i++ ) StringFPuts(STR_SPACE, last_write_fp); last_prec = (vspace(y) + hspace(y) == 0) ? JUXTA_PREC : ACAT_PREC; } else { Child(gap_obj, Down(y)); if( type(x)==ACAT ) StringFPuts(STR_SPACE, last_write_fp); else { StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } StringFPuts(EchoCatOp(type(x), mark(gap(y)), join(gap(y))), last_write_fp); if( !is_word(type(gap_obj)) || StringLength(string(gap_obj)) != 0 ) WriteObject(gap_obj, FORCE_PREC, linecount, fnum); StringFPuts(STR_SPACE, last_write_fp); last_prec = prec; } } else { if( type(x) == ACAT ) { OBJECT next_gap; int next_prec; if( NextDown(link) != x ) { Child(next_gap, NextDown(link)); assert( type(next_gap) == GAP_OBJ, "WriteObject: next_gap!" ); next_prec = (vspace(next_gap) + hspace(next_gap) == 0) ? JUXTA_PREC : ACAT_PREC; } else next_prec = prec; WriteObject(y, find_max(last_prec, next_prec), linecount, fnum); } else WriteObject(y, prec, linecount, fnum); } } if( prec < outer_prec ) StringFPuts(KW_RBR, last_write_fp); break; case ENV: if( Down(x) == x ) { /* environment is empty */ StringFPuts(KW_ENVC, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } else if( EnvWriteRetrieve(x, fnum, &offset, &lnum) ) { /* environment was previously written to this file */ StringFPuts(KW_ENVD, last_write_fp); fprintf(last_write_fp, " \"%d %d\"", offset, lnum); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } else { /* record the position of this environment */ EnvWriteInsert(x, fnum, (int) ftell(last_write_fp), *linecount); /* write the environment */ if( Down(x) == LastDown(x) ) { /* envt contains just one closure (with its environment) */ Child(y, Down(x)); assert( type(y) == CLOSURE, "WriteObject: ENV/CLOSURE!" ); StringFPuts(KW_LBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_ENVA, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_LBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); WriteObject(y, NO_PREC, linecount, fnum); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } else { /* envt contains a closure (with envt) plus an environment */ Child(env, LastDown(x)); assert( type(env) == ENV, "WriteObject: ENV/ENV!" ); StringFPuts(KW_LBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_ENVB, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_LBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); WriteObject(env, NO_PREC, linecount, fnum); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; Child(y, Down(x)); assert( type(y) == CLOSURE, "WriteObject: ENV/ENV+CLOSURE!" ); StringFPuts(KW_LBR, last_write_fp); WriteObject(y, NO_PREC, linecount, fnum); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } } break; case CLOSURE: sym = actual(x); env = nilobj; if( LastDown(x) != x ) { Child(y, LastDown(x)); if( type(y) == ENV ) env = y; } braces_needed = env != nilobj || (precedence(sym) <= outer_prec && (has_lpar(sym) || has_rpar(sym))) || outer_prec >= JUXTA_PREC; /* print environment */ if( env != nilobj ) { StringFPuts(KW_CENV, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_LBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; WriteObject(env, NO_PREC, linecount, fnum); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } /* print left brace if needed */ if( braces_needed ) StringFPuts(KW_LBR, last_write_fp); /* print the closure proper */ WriteClosure(x, linecount, fnum, env); /* print closing brace if needed */ if( braces_needed ) StringFPuts(KW_RBR, last_write_fp); /* print closing environment if needed */ /* *** if( env != nilobj ) { StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } *** */ break; case CROSS: case FORCE_CROSS: Child(y, Down(x)); assert( type(y) == CLOSURE, "WriteObject/CROSS: type(y) != CLOSURE!" ); if( DEFAULT_PREC <= outer_prec ) StringFPuts(KW_LBR, last_write_fp); if( need_lvis(actual(y)) ) { StringFPuts(KW_LVIS, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); } StringFPuts(SymName(actual(y)), last_write_fp); StringFPuts(type(x) == CROSS ? KW_CROSS : KW_FORCE_CROSS, last_write_fp); Child(y, LastDown(x)); WriteObject(y, FORCE_PREC, linecount, fnum); if( DEFAULT_PREC <= outer_prec ) StringFPuts(KW_RBR, last_write_fp); break; case NULL_CLOS: name = KW_NULL; goto SETC; case PAGE_LABEL: name = KW_PAGE_LABEL; goto SETC; case BEGIN_HEADER: name = KW_BEGIN_HEADER; goto SETC; case END_HEADER: name = KW_END_HEADER; goto SETC; case SET_HEADER: name = KW_SET_HEADER; goto SETC; case CLEAR_HEADER: name = KW_CLEAR_HEADER; goto SETC; case ONE_COL: name = KW_ONE_COL; goto SETC; case ONE_ROW: name = KW_ONE_ROW; goto SETC; case WIDE: name = KW_WIDE; goto SETC; case HIGH: name = KW_HIGH; goto SETC; case HSHIFT: name = KW_HSHIFT; goto SETC; case VSHIFT: name = KW_VSHIFT; goto SETC; case HMIRROR: name = KW_HMIRROR; goto SETC; case VMIRROR: name = KW_VMIRROR; goto SETC; case HSCALE: name = KW_HSCALE; goto SETC; case VSCALE: name = KW_VSCALE; goto SETC; case HCOVER: name = KW_HCOVER; goto SETC; case VCOVER: name = KW_VCOVER; goto SETC; case SCALE: name = KW_SCALE; goto SETC; case KERN_SHRINK: name = KW_KERN_SHRINK; goto SETC; case HCONTRACT: name = KW_HCONTRACT; goto SETC; case VCONTRACT: name = KW_VCONTRACT; goto SETC; case HLIMITED: name = KW_HLIMITED; goto SETC; case VLIMITED: name = KW_VLIMITED; goto SETC; case HEXPAND: name = KW_HEXPAND; goto SETC; case VEXPAND: name = KW_VEXPAND; goto SETC; case START_HVSPAN: name = KW_STARTHVSPAN; goto SETC; case START_HSPAN: name = KW_STARTHSPAN; goto SETC; case START_VSPAN: name = KW_STARTVSPAN; goto SETC; case HSPAN: name = KW_HSPAN; goto SETC; case VSPAN: name = KW_VSPAN; goto SETC; case PADJUST: name = KW_PADJUST; goto SETC; case HADJUST: name = KW_HADJUST; goto SETC; case VADJUST: name = KW_VADJUST; goto SETC; case ROTATE: name = KW_ROTATE; goto SETC; case BACKGROUND: name = KW_BACKGROUND; goto SETC; case CASE: name = KW_CASE; goto SETC; case YIELD: name = KW_YIELD; goto SETC; case BACKEND: name = KW_BACKEND; goto SETC; case XCHAR: name = KW_XCHAR; goto SETC; case FONT: name = KW_FONT; goto SETC; case SPACE: name = KW_SPACE; goto SETC; case YUNIT: name = KW_YUNIT; goto SETC; case ZUNIT: name = KW_ZUNIT; goto SETC; case SET_CONTEXT: name = KW_SET_CONTEXT; goto SETC; case GET_CONTEXT: name = KW_GET_CONTEXT; goto SETC; case BREAK: name = KW_BREAK; goto SETC; case UNDERLINE: name = KW_UNDERLINE; goto SETC; case UNDERLINE_COLOUR: name=KW_UNDERLINE_COLOUR ;goto SETC; case COLOUR: name = KW_COLOUR; goto SETC; case TEXTURE: name = KW_TEXTURE; goto SETC; case OUTLINE: name = KW_OUTLINE; goto SETC; case LANGUAGE: name = KW_LANGUAGE; goto SETC; case CURR_LANG: name = KW_CURR_LANG; goto SETC; case CURR_FAMILY: name = KW_CURR_FAMILY; goto SETC; case CURR_FACE: name = KW_CURR_FACE; goto SETC; case CURR_YUNIT: name = KW_CURR_YUNIT; goto SETC; case CURR_ZUNIT: name = KW_CURR_ZUNIT; goto SETC; case COMMON: name = KW_COMMON; goto SETC; case RUMP: name = KW_RUMP; goto SETC; case MELD: name = KW_MELD; goto SETC; case INSERT: name = KW_INSERT; goto SETC; case ONE_OF: name = KW_ONE_OF; goto SETC; case NEXT: name = KW_NEXT; goto SETC; case PLUS: name = KW_PLUS; goto SETC; case MINUS: name = KW_MINUS; goto SETC; case OPEN: name = KW_OPEN; goto SETC; case TAGGED: name = KW_TAGGED; goto SETC; case INCGRAPHIC: name = KW_INCGRAPHIC; goto SETC; case SINCGRAPHIC: name = KW_SINCGRAPHIC; goto SETC; case PLAIN_GRAPHIC: name = KW_PLAINGRAPHIC; goto SETC; case GRAPHIC: name = KW_GRAPHIC; goto SETC; case LINK_SOURCE: name = KW_LINK_SOURCE; goto SETC; case LINK_DEST: name = KW_LINK_DEST; goto SETC; case LINK_DEST_NULL:name = KW_LINK_DEST; goto SETC; case LINK_URL: name = KW_LINK_URL; goto SETC; /* print left parameter, if present */ SETC: if( DEFAULT_PREC <= outer_prec ) StringFPuts(KW_LBR, last_write_fp); if( Down(x) != LastDown(x) ) { Child(y, Down(x)); WriteObject(y, DEFAULT_PREC, linecount, fnum); StringFPuts(STR_SPACE, last_write_fp); } /* print the name of the symbol */ StringFPuts(name, last_write_fp); /* print right parameter, if present */ if( LastDown(x) != x ) { Child(y, LastDown(x)); StringFPuts(STR_SPACE, last_write_fp); if( type(x) == OPEN ) { StringFPuts(KW_LBR, last_write_fp); WriteObject(y, NO_PREC, linecount, fnum); StringFPuts(KW_RBR, last_write_fp); } else WriteObject(y, DEFAULT_PREC, linecount, fnum); } if( DEFAULT_PREC <= outer_prec ) StringFPuts(KW_RBR, last_write_fp); break; case RAW_VERBATIM: case VERBATIM: StringFPuts(type(x) == VERBATIM ? KW_VERBATIM : KW_RAWVERBATIM, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(KW_BEGIN, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); Child(y, Down(x)); if( type(y) == WORD ) { StringFPuts(string(y), last_write_fp); StringFPuts(STR_SPACE, last_write_fp); } else { assert( type(y) == VCAT, "WriteObject/VERBATIM!" ); for( link = Down(y); link != y; link = NextDown(link) ) { Child(z, link); if( type(z) == GAP_OBJ ) continue; assert( type(z) == WORD, "WriteObject/VERBATIM/WORD!"); StringFPuts(string(z), last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); *linecount += 1; } } StringFPuts(KW_END, last_write_fp); StringFPuts(STR_SPACE, last_write_fp); StringFPuts(type(x) == VERBATIM ? KW_VERBATIM : KW_RAWVERBATIM, last_write_fp); break; case FILTERED: FilterWrite(x, last_write_fp, linecount); break; default: assert1(FALSE, "WriteObject:", Image(type(x))); break; } /* end switch */ debug0(DIO, D, "] WriteObject returning"); } /* end WriteObject */ /*@::AppendToFile(), CloseFiles()@********************************************/ /* */ /* AppendToFile(x, fnum, pos, lnum) */ /* */ /* Append object x to file fnum, returning its fseek position in *pos. */ /* and its line number in lnum. Record that this file has been updated. */ /* */ /*****************************************************************************/ void AppendToFile(OBJECT x, FILE_NUM fnum, int *pos, int *lnum) { FULL_CHAR buff[MAX_BUFF], *str; int linecount; debug2(DIO, D, "[ AppendToFile( %s, %s )", EchoObject(x), FileName(fnum)); /* open file fnum for writing */ if( last_write_fnum != fnum ) { if( last_write_fnum != NO_FILE ) fclose(last_write_fp); str = FileName(fnum); if( StringLength(str) + StringLength(NEW_DATA_SUFFIX) >= MAX_BUFF ) Error(41, 3, "file name %s%s is too long", FATAL, PosOfFile(fnum), str, NEW_DATA_SUFFIX); StringCopy(buff, str); StringCat(buff, NEW_DATA_SUFFIX); last_write_fp = StringFOpen(buff, FileTestUpdated(fnum) ? APPEND_FILE : WRITE_FILE); if( last_write_fp == null ) Error(41, 4, "cannot append to database file %s", FATAL, no_fpos, buff); last_write_fnum = fnum; (void) fseek(last_write_fp, 0L, SEEK_END); } /* write x out and record the fact that fnum has changed */ *pos = (int) ftell(last_write_fp); StringFPuts(KW_LBR, last_write_fp); linecount = FileGetLineCount(fnum); *lnum = linecount + 1; WriteObject(x, NO_PREC, &linecount, fnum); StringFPuts(KW_RBR, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); StringFPuts(STR_NEWLINE, last_write_fp); FileSetUpdated(fnum, linecount + 2); debug0(DIO, D, "] AppendToFile returning."); } /* end AppendToFile */ /*****************************************************************************/ /* */ /* CloseFiles() */ /* */ /* Close all files and move new versions to the names of old versions. */ /* */ /*****************************************************************************/ void CloseFiles(void) { FILE_NUM fnum; FULL_CHAR oldname[MAX_BUFF], newname[MAX_BUFF]; FILE *fp; ifdebug(DPP, D, ProfileOn("CloseFiles")); debug0(DIO, D, "CloseFiles()"); /* close off last file opened by AppendToFile above */ if( last_write_fnum != NO_FILE ) fclose(last_write_fp); /* get rid of old database files */ for( fnum=FirstFile(SOURCE_FILE); fnum != NO_FILE; fnum = NextFile(fnum) ) { StringCopy(oldname, FileName(fnum)); StringCat(oldname, DATA_SUFFIX); debug1(DIO, D, "remove(%s)", oldname); StringRemove(oldname); } /* move any new database files to the old names, if updated */ /* just to avoid confusion: the "new name" means the ".ldx" */ /* temporary file name; the "old name" means the permanent */ /* name, i.e. ".ld". So we have to move the new name to */ /* the old name. */ for( fnum=FirstFile(DATABASE_FILE); fnum != NO_FILE; fnum = NextFile(fnum) ) { if( FileTestUpdated(fnum) ) { /* construct new and old file names */ StringCopy(oldname, FileName(fnum)); StringCopy(newname, oldname); StringCat(newname, NEW_DATA_SUFFIX); /* guaranteed portable algorithm for changing the name of file */ /* "newname" to "oldname": if "oldname" exists already, then */ /* remove it (avoids removing a non-existent file, which can */ /* be a problem); then rename "newname" to be "oldname" (avoids */ /* overwriting an existing file "oldname", another problem) */ if( (fp = StringFOpen(oldname, READ_FILE)) != NULL ) { fclose(fp); StringRemove(oldname); } debug2(DIO, D, "rename(%s, %s)", newname, oldname); if( StringRename(newname, oldname) != 0 ) Error(41, 5, "rename(%s, %s) failed", INTERN, no_fpos,newname,oldname); } } debug0(DIO, D, "CloseFiles returning."); ifdebug(DPP, D, ProfileOff("CloseFiles")); } /* end CloseFiles */ lout-3.39/blurb0000644000076400007640000000360111442264365012111 0ustar jeffjeff THE LOUT DOCUMENT FORMATTING SYSTEM, VERSION 3.39 Version 3.39 of the Lout document formatting system is now available (free of charge). The system reads a high-level description of a document similar in style to LaTeX and produces a PostScript or plain text output file. Lout offers an unprecedented range of advanced features, including optimal paragraph and page breaking, automatic hyphenation, PostScript EPS file inclusion and generation, equation formatting, tables, diagrams, rotation and scaling, sorted indexes, bibliographic databases, running headers and odd-even pages, automatic cross referencing, multilingual documents including hyphenation (most European languages are supported), formatting of computer programs, and much more, all ready to use. Furthermore, Lout is easily extended with definitions which are very much easier to write than troff of TeX macros because Lout is a high-level language, the outcome of an eight-year research project that went back to the beginning. Lout is written in highly portable ANSI C. It is distributed under the GNU public license and is obtainable from ftp://ftp.it.usyd.edu.au/jeff/lout/lout-3.39.tar.gz The distribution contains * Complete C source code, makefile, and installation instructions * Standard library packages of definitions for ordinary documents, technical reports, books, overhead transparencies, stand-alone illustrations, plain text documents, equations, tables, diagrams, graphs, and computer program formatting for most common languages * Complete documentation for all these features consisting of a User's Guide plus an Expert's Guide A PostScript version of the User's Guide is available at: ftp://ftp.it.usyd.edu.au/jeff/lout/lout-3.39-user.ps.gz Lout was created by Jeffrey H. Kingston (jeff@it.usyd.edu.au) of the School of Information Technologies at the University of Sydney. lout-3.39/notes_dsc0000644000076400007640000001056311363700677012774 0ustar jeffjeffBasser Lout Version 3 and the PostScript Document Structuring Conventions Jeffrey H. Kingston 24 March 1994 Modified to explain changes in font inclusion, 3 June 2000 The following notes detail all areas known to the author where Lout does not fully conform to Version 3.0 of the PostScript Document Structuring Conventions (DSC), as given in Appendix G of the PostScript Language Reference Manual, second edition (PLRM). Page numbers refer to PLRM. These are minor infringements which should not trouble anyone (I hope). Please let me know of any problems. Language level and extensions. Lout does not produce %%LanguageLevel and %%Extensions comments, implying that its output is Level 1 PostScript with no extensions (p644). This is true except for PostScript which user-level commands choose to add via @SetColour, @Graphic, @IncludeGraphic, and @PrependGraphic commands. If this added PostScript is not Level 1 then the absence of %%LanguageLevel and %%Extensions comments will be in violation of the DSC. Lout's standard packages use only Level 1, which should take care of most of the @SetColour, @Graphic, and @PrependGraphic commands encountered in practice. If a %%LanguageLevel or %%Extensions comment is encountered in an @IncludeGraphic file, Lout prints a warning message but takes no other action. Color separation conventions (pp685-688). At present Lout generates none of the comments described in this section. DocumentSuppliedResources. According to p671, each included document (%%Begin(End)Document pair in PostScript, @IncludeGraphic file in Lout) should have a corresponding "%%DocumentSuppliedResources: file" entry. This contradicts p660, where each %%DocumentSuppliedResources entry is said to correspond to a %%Begin(End)Resource pair. Lout does not record %%Begin(End)Document pairs in the %%DocumentSuppliedResources list. EOF. According to p673, the %%EOF comment of an included document (i.e. one enclosed in %%Begin(End)Document) will be ignored. However, p658 does not mention this exception, and one Adobe PostScript interpreter at least in the author's environment terminates at the first %%EOF whether or not it lies inside %%Begin(End)Document. Accordingly, Lout strips out any %%EOF comment within any included document during inclusion. Font inclusion. According to p678, "%%IncludeResource: font" comments relating to commonly available fonts should be placed in the document setup section. However no definition of which fonts fall into this category is offered, so this requirement is not observed by Lout. Instead, Lout generates one "%%IncludeResource: font" in the page setup section for each font used on the corresponding page. (It used to be the case that fonts used on the first page were an exception to this rule; they were done once only in the document setup section. This exception has been removed from Lout Version 3.22 and above.) Thus, fonts used on many pages will generate many "%%IncludeResource: font" comments, one for each page on which the font is used, which in turn implies that these fonts might be downloaded many times (Lout itself never downloads any font, but a document manager might react to an "%%IncludeResource: font" comment by doing so). However, most fonts used by most people are already in the printer, and in these cases "it is highly likely that the font server or document manager would ignore the inclusion request, because the font would already be available on the printer" (p678). The rationale for putting all "%%IncludeResource: font" comments into page setups is that it gives document managers exact information about what fonts are used on each page, which, hopefully, they can put to good use. PageResources. This comment is supposed to list all resources needed or supplied on the current page except for procsets (p685). At present Lout lists fonts but not encoding vectors under this comment. Definitions in EPS files. On p736, "it is strongly recommended that an EPS file make its definitions in its own dictionary or dictionaries". Lout -EPS does not follow this recommendation, since it is not clear where to create this dictionary or dictionaries, given that the DSC states (p625) that the prolog should be a sequence of procset definitions (after the header section and defaults section) only. Perhaps each procset should be in its own dictionary, as is done in lout/include/fig_prepend for example, but this is not stated anywhere. lout-3.39/z33.c0000644000076400007640000011316711442244635011652 0ustar jeffjeff/*@z33.c:Database Service:OldCrossDb(), NewCrossDb(), SymToNum()@*************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z33.c */ /* MODULE: Database Service */ /* EXTERNS: OldCrossDb, NewCrossDb, DbCreate(), DbInsert(), */ /* DbConvert(), DbClose(), DbLoad(), DbRetrieve(), */ /* DbRetrieveNext() */ /* */ /*****************************************************************************/ #define INIT_DBCHECK_NUM 107 #include "externs.h" /*****************************************************************************/ /* */ /* DBCHECK_TABLE */ /* */ /* A symbol table holding all non-galley cross references, basically */ /* implementing a function (sym, tag) -> fpos (if any). */ /* */ /* dtab_new(newsize) New empty table, newsize capacity */ /* dtab_insert(x, S) Insert new (sym, tag) pair x into S */ /* dtab_retrieve(sym, tag, S) Retrieve (sym, tag) pair from S */ /* dtab_debug(S, fp) Debug print of table S to file fp */ /* */ /*****************************************************************************/ typedef struct { int dbchecktab_size; /* size of table */ int dbchecktab_count; /* number of objects held */ OBJECT dbchecktab_item[1]; } *DBCHECK_TABLE; #define dtab_size(S) (S)->dbchecktab_size #define dtab_count(S) (S)->dbchecktab_count #define dtab_item(S, i) (S)->dbchecktab_item[i] #define hash(pos, sym, tag, S) \ { FULL_CHAR *p = tag; \ pos = (unsigned long) sym; \ while( *p ) pos += *p++; \ pos = pos % dtab_size(S); \ } static DBCHECK_TABLE dtab_new(int newsize) { DBCHECK_TABLE S; int i; ifdebug(DMA, D, DebugRegisterUsage(MEM_DBCHECK, 1, 2*sizeof(int) + newsize * sizeof(OBJECT))); S = (DBCHECK_TABLE) malloc(2*sizeof(int) + newsize * sizeof(OBJECT)); if( S == (DBCHECK_TABLE) NULL ) Error(33, 1, "run out of memory enlarging dbcheck table", FATAL, no_fpos); dtab_size(S) = newsize; dtab_count(S) = 0; for( i = 0; i < newsize; i++ ) dtab_item(S, i) = nilobj; return S; } /* end dtab_new */ static void dtab_insert(OBJECT x, DBCHECK_TABLE *S); static DBCHECK_TABLE dtab_rehash(DBCHECK_TABLE S, int newsize) { DBCHECK_TABLE NewS; int i; OBJECT link, z; NewS = dtab_new(newsize); for( i = 0; i < dtab_size(S); i++ ) { if( dtab_item(S, i) != nilobj ) { OBJECT ent = dtab_item(S, i); assert( type(ent) == ACAT, "dtab_rehash: ACAT!" ); for( link = Down(ent); link != ent; link = NextDown(link) ) { Child(z, link); dtab_insert(z, &NewS); } DisposeObject(ent); } } ifdebug(DMA, D, DebugRegisterUsage(MEM_DBCHECK, -1, -(2*sizeof(int) + dtab_size(S) * sizeof(OBJECT)))); free(S); return NewS; } /* end dtab_rehash */ static void dtab_insert(OBJECT x, DBCHECK_TABLE *S) { unsigned long pos; OBJECT z, link, y; if( dtab_count(*S) == dtab_size(*S) - 1 ) /* one less since 0 unused */ *S = dtab_rehash(*S, 2*dtab_size(*S)); dtab_count(*S)++; hash(pos, db_checksym(x), string(x), *S); if( dtab_item(*S, pos) == nilobj ) New(dtab_item(*S, pos), ACAT); z = dtab_item(*S, pos); for( link = Down(z); link != z; link = NextDown(link) ) { Child(y, link); if( db_checksym(x) == db_checksym(y) && StringEqual(string(x), string(y)) ) { assert(FALSE, "Dbcheck: entry inserted twice"); } } Link(dtab_item(*S, pos), x); } /* end dtab_insert */ static OBJECT dtab_retrieve(OBJECT sym, FULL_CHAR *tag, DBCHECK_TABLE S) { OBJECT x, link, y; unsigned long pos; hash(pos, sym, tag, S); x = dtab_item(S, pos); if( x == nilobj ) return nilobj; for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( sym == db_checksym(y) && StringEqual(tag, string(y)) ) return y; } return nilobj; } /* end dtab_retrieve */ #if DEBUG_ON static void dtab_debug(DBCHECK_TABLE S, FILE *fp) { int i; OBJECT x, link, y; fprintf(fp, " table size: %d; current number of items: %d%s", dtab_size(S), dtab_count(S), STR_NEWLINE); for( i = 0; i < dtab_size(S); i++ ) { x = dtab_item(S, i); fprintf(fp, "dtab_item(S, %d) =", i); if( x == nilobj ) fprintf(fp, " "); else if( type(x) != ACAT ) fprintf(fp, " not ACAT!"); else for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); fprintf(fp, " %s&&%s", is_word(type(y)) ? SymName(db_checksym(y)) : AsciiToFull("?"), is_word(type(y)) ? string(y) : AsciiToFull("not-WORD!")); } fprintf(fp, "%s", STR_NEWLINE); } } /* end dtab_debug */ #endif static DBCHECK_TABLE DbCheckTable; /* the dbcheck table */ static BOOLEAN DbCheckTableInit; /* TRUE if table inited */ static int extra_seq; /*****************************************************************************/ /* */ /* OldCrossDb Database containing cross references from previous run. */ /* NewCrossDb Writable database of cross references from this run. */ /* */ /*****************************************************************************/ OBJECT OldCrossDb, NewCrossDb; /*****************************************************************************/ /* */ /* void DbInit(void) */ /* */ /* Initialize this module.. */ /* */ /*****************************************************************************/ void DbInit(void) { DbCheckTable = NULL; DbCheckTableInit = FALSE; OldCrossDb = NewCrossDb = nilobj; extra_seq = 0; } /*****************************************************************************/ /* */ /* #define SymToNum(db, sym, num, gall) */ /* */ /* Set num to the number used to refer to sym in database db. If sym is */ /* not currently referred to in db, create a new number and record sym. */ /* If gall is true, sym is the target of galleys stored in this database. */ /* Store in boolean fields db_targ(link) and is_extern_target(sym). */ /* */ /*****************************************************************************/ #define SymToNum(db, sym, num, gall) \ { OBJECT link, yy; int count; \ count = 0; \ for( link = Down(db); link != db; link = NextDown(link) ) \ { Child(yy, link); \ assert(type(yy)==CROSS_SYM || type(yy)==ACAT, "SymToNum: yy!"); \ if( type(yy) != CROSS_SYM ) continue; \ if( symb(yy) == sym ) break; \ if( number(link) > count ) count = number(link); \ } \ if( link == db ) \ { if( cross_sym(sym) == nilobj ) CrossInit(sym); \ Link(db, cross_sym(sym)); \ link = LastDown(db); \ number(link) = count + 1; \ db_targ(link) = FALSE; \ } \ num = number(link); \ if( gall ) db_targ(link) = is_extern_target(sym) = \ uses_extern_target(sym) = TRUE; \ } /* end SymToNum */ /*@::NumToSym(), DbCreate()@**************************************************/ /* */ /* #define NumToSym(db, num, sym) */ /* */ /* Set sym to the symbol which is referred to in database db by num. */ /* */ /*****************************************************************************/ #define NumToSym(db, num, sym) \ { OBJECT link, y = nilobj; \ for( link = Down(db); link != db; link = NextDown(link) ) \ { Child(y, link); \ if( type(y) == CROSS_SYM && number(link) == num ) break; \ } \ assert( link != db, "NumToSym: no sym"); \ assert( type(y) == CROSS_SYM, "NumToSym: y!" ); \ sym = symb(y); \ } /* end NumToSym */ /*****************************************************************************/ /* */ /* OBJECT DbCreate(x) */ /* */ /* Create a new writable database with name (i.e. file stem) x and file */ /* position fpos for error messages. */ /* */ /*****************************************************************************/ OBJECT DbCreate(OBJECT x) { OBJECT db = x; debug1(DBS, DD, "DbCreate(%s)", string(db)); assert( is_word(type(x)), "DbCreate: !is_word(type(x))" ); reading(db) = FALSE; db_filep(db) = null; debug1(DBS, DD, "DbCreate returning %s", EchoObject(db)); return db; } /* end DbCreate */ /*@::DbInsert()@**************************************************************/ /* */ /* DbInsert(db, gall, sym, tag, tagfpos, seq, dfnum, dlnum, dfpos) */ /* */ /* Insert a new entry into writable database db. The primary key of the */ /* entry has these three parts: */ /* */ /* gall TRUE if inserting a galley */ /* sym The symbol which is the target of this entry */ /* tag The tag of this target (must be a non-null string) */ /* */ /* tagfpos is the file position that the tag originated from. */ /* There is also an auxiliary key, seq, which enforces an ordering on */ /* entries with equal primary keys but is not itself ever retrieved. This */ /* ordering is used for sorted galleys. The value of the entry has the */ /* following parts: */ /* */ /* dfnum The file containing the object */ /* dfpos The position of the object in that file */ /* dlnum The line number of the object in the file */ /* */ /* If check is TRUE, we need to check whether an entry with this key has */ /* been inserted before. This will never be the case with galley entries. */ /* */ /*****************************************************************************/ void DbInsert(OBJECT db, BOOLEAN gall, OBJECT sym, FULL_CHAR *tag, FILE_POS *tagfpos, FULL_CHAR *seq, FILE_NUM dfnum, long dfpos, int dlnum, BOOLEAN check) { int symnum; OBJECT chk; FULL_CHAR buff[MAX_BUFF]; assert( is_word(type(db)), "DbInsert: db!" ); assert( tag[0] != '\0', "DbInsert: null tag!" ); assert( seq[0] != '\0', "DbInsert: null seq!" ); ifdebug(DPP, D, ProfileOn("DbInsert")); debug6(DBS, DD, "DbInsert(%s, %s, %s, %s, %s, %s, dlnum, dfpos)", string(db), bool(gall), SymName(sym), tag, seq, dfnum == NO_FILE ? AsciiToFull(".") : FileName(dfnum)); assert(!reading(db), "DbInsert: insert into reading database"); /* if required, check that (sym, tag) not already inserted */ if( check ) { debug2(DBS, DD, " checking %s&&%s, DbCheckTable =", SymName(sym), tag); if( !DbCheckTableInit ) { DbCheckTable = dtab_new(INIT_DBCHECK_NUM); DbCheckTableInit = TRUE; } ifdebug(DBS, DD, dtab_debug(DbCheckTable, stderr)); chk = dtab_retrieve(sym, tag, DbCheckTable); if( chk == nilobj ) { chk = MakeWord(WORD, tag, tagfpos); db_checksym(chk) = sym; dtab_insert(chk, &DbCheckTable); } else { if( file_num(fpos(chk)) > 0 ) Error(33, 4, "cross reference %s&&%s used previously, at%s", WARN, tagfpos, SymName(sym), tag, EchoFilePos(&fpos(chk))); else Error(33, 5, "cross reference %s&&%s used previously", WARN, tagfpos, SymName(sym), tag); } } /* open database index file if not already done */ if( db_filep(db) == null ) { if( StringLength(string(db)) + StringLength(NEW_INDEX_SUFFIX) >= MAX_BUFF ) Error(33, 2, "database file name %s%s is too long", FATAL, no_fpos, string(db), NEW_INDEX_SUFFIX); StringCopy(buff, string(db)); StringCat(buff, NEW_INDEX_SUFFIX); db_filep(db) = StringFOpen(buff, WRITE_FILE); if( db_filep(db) == null ) Error(33, 3, "cannot write to database file %s", FATAL, &fpos(db), buff); } /* work out database index file entry and append it to file */ if( dfnum != NO_FILE ) { StringCopy(buff, FileName(dfnum)); StringCopy(&buff[StringLength(buff)-StringLength(DATA_SUFFIX)], STR_EMPTY); } else StringCopy(buff, AsciiToFull(".")); SymToNum(db, sym, symnum, gall); ifdebug(DBS, DD, fprintf(stderr, " -> %s%d&%s\t%s\t%ld\t%d\t%s%s", gall ? "0" : "", symnum, tag, seq, dfpos, dlnum, buff, STR_NEWLINE); ); fprintf(db_filep(db), "%s%d&%s\t%s\t%s\t%ld\t%d\t%s%s", gall ? "0" : "", symnum, tag, seq, StringFiveInt(++extra_seq), dfpos, dlnum, buff, STR_NEWLINE); /* return */ debug0(DBS, DD, "DbInsert returning."); ifdebug(DPP, D, ProfileOff("DbInsert")); } /* end DbInsert */ /*@::DbConvert(), DbClose()@**************************************************/ /* */ /* DbConvert(db, full_name) */ /* */ /* Convert database db from writable to readable, then dispose it. */ /* full_name is TRUE if symbols are to be known by their full path name. */ /* */ /*****************************************************************************/ void DbConvert(OBJECT db, BOOLEAN full_name) { FULL_CHAR oldname[MAX_BUFF+10], newname[MAX_BUFF]; OBJECT link, y; ifdebug(DPP, D, ProfileOn("DbConvert")); debug2(DBS, DD, "DbConvert( %ld %s )", (long) db, string(db)); assert( !reading(db), "DbConvert: reading database"); StringCopy(newname, string(db)); StringCat(newname, INDEX_SUFFIX); StringCopy(oldname, string(db)); StringCat(oldname, NEW_INDEX_SUFFIX); if( db_filep(db) != null ) { fprintf(db_filep(db), "00 %s %s%s", LOUT_VERSION, "database index file", (char *) STR_NEWLINE); for( link = Down(db); link != db; link = NextDown(link) ) { Child(y, link); assert( type(y) == CROSS_SYM || type(y) == ACAT, "DbConvert: y!" ); if( type(y) != CROSS_SYM ) continue; fprintf(db_filep(db), "%s %d %s%s", db_targ(link) ? "00target" : "00symbol", number(link), full_name ? FullSymName(symb(y), AsciiToFull(" ")) : SymName(symb(y)), (char *) STR_NEWLINE); } fclose(db_filep(db)); debug2(DBS, DD, " calling SortFile(%s, %s)", oldname, newname); SortFile(oldname, newname); } else StringRemove(newname); StringRemove(oldname); DeleteNode(db); debug0(DBS, DD, "DbConvert returning."); ifdebug(DPP, D, ProfileOff("DbConvert")); } /* end DbConvert */ /*****************************************************************************/ /* */ /* DbClose(db) */ /* */ /* Close readable database db. */ /* */ /*****************************************************************************/ void DbClose(OBJECT db) { if( db != nilobj && !in_memory(db) && db_filep(db) != NULL ) { fclose(db_filep(db)); db_filep(db) = NULL; } } /* end DbClose */ /*@::DbLoad()@****************************************************************/ /* */ /* OBJECT DbLoad(stem, fpath, create, symbs, in_mem) */ /* */ /* Open for reading the database whose index file name is string(stem).li. */ /* This file has not yet been defined; its search path is fpath. If it */ /* will not open and create is true, try creating it from string(stem).ld. */ /* */ /* symbs is an ACAT of CLOSUREs showing the symbols that the database may */ /* contain; or nilobj if the database may contain any symbol. */ /* */ /* If in_mem is true, this database index is to be kept in internal memory, */ /* rather than an external file, as a speed optimization. */ /* */ /*****************************************************************************/ OBJECT DbLoad(OBJECT stem, int fpath, BOOLEAN create, OBJECT symbs, BOOLEAN in_mem) { FILE *fp; OBJECT db, t, res, tag, par, sym, link, y; int i, lnum, dlnum, num, count, leftp; FILE_NUM index_fnum, dfnum; long dfpos; BOOLEAN gall; FULL_CHAR line[MAX_BUFF], sym_name[MAX_BUFF]; int status; ifdebug(DPP, D, ProfileOn("DbLoad")); debug3(DBS, DD, "[ DbLoad(%s, %d, %s, -)", string(stem), fpath, bool(create)); /* open or else create index file fp */ debug0(DFS, D, " calling DefineFile from DbLoad (1)"); index_fnum = DefineFile(string(stem), INDEX_SUFFIX, &fpos(stem), INDEX_FILE, fpath); fp = OpenFile(index_fnum, create, FALSE); /* read first line of database index file, which should have the version */ if( fp != null ) { if( ReadOneLine(fp, line, MAX_BUFF) == 0 || !StringBeginsWith(&line[3], LOUT_VERSION) ) { /* out of date, pretend it isn't there at all */ StringRemove(FileName(index_fnum)); fp = null; } } if( fp == null && create ) { db = nilobj; debug0(DFS, D, " calling DefineFile from DbLoad (2)"); dfnum = DefineFile(string(stem), DATA_SUFFIX, &fpos(stem), DATABASE_FILE, fpath); dfpos = 0L; LexPush(dfnum, 0, DATABASE_FILE, 1, FALSE); t = LexGetToken(); dlnum = line_num(fpos(t)); while( type(t) == LBR ) { res = Parse(&t, StartSym, FALSE, FALSE); if( t != nilobj || type(res) != CLOSURE ) Error(33, 6, "syntax error in database file %s", FATAL, &fpos(res), FileName(dfnum)); assert( symbs != nilobj, "DbLoad: create && symbs == nilobj!" ); if( symbs != nilobj ) { for( link = Down(symbs); link != symbs; link = NextDown(link) ) { Child(y, link); if( type(y) == CLOSURE && actual(y) == actual(res) ) break; } if( link == symbs ) Error(33, 7, "%s found in database but not declared in %s line", FATAL, &fpos(res), SymName(actual(res)), KW_DATABASE); } for( tag = nilobj, link = Down(res); link != res; link = NextDown(link) ) { Child(par, link); if( type(par) == PAR && is_tag(actual(par)) && Down(par) != par ) { Child(tag, Down(par)); break; } } if( tag == nilobj ) Error(33, 8, "database symbol %s has no tag", FATAL, &fpos(res), SymName(actual(res))); tag = ReplaceWithTidy(tag, WORD_TIDY); /* && */ if( !is_word(type(tag)) ) Error(33, 9, "database symbol tag is not a simple word", FATAL, &fpos(res)); if( StringEqual(string(tag), STR_EMPTY) ) Error(33, 10, "database symbol tag is an empty word", FATAL,&fpos(res)); if( db == nilobj ) { StringCopy(line, FileName(dfnum)); i = StringLength(line) - StringLength(INDEX_SUFFIX); assert( i > 0, "DbLoad: FileName(dfnum) (1)!" ); StringCopy(&line[i], STR_EMPTY); db = DbCreate(MakeWord(WORD, line, &fpos(stem))); } DbInsert(db, FALSE, actual(res), string(tag), &fpos(tag), STR_ZERO, NO_FILE, dfpos, dlnum, TRUE); DisposeObject(res); dfpos = LexNextTokenPos(); t = LexGetToken(); dlnum = line_num(fpos(t)); } if( type(t) != END ) Error(33, 11, "%s or end of file expected here", FATAL, &fpos(t), KW_LBR); LexPop(); if( db == nilobj ) { StringCopy(line, FileName(dfnum)); i = StringLength(line) - StringLength(INDEX_SUFFIX); assert( i > 0, "DbLoad: FileName(dfnum) (2)!" ); StringCopy(&line[i], STR_EMPTY); db = DbCreate(MakeWord(WORD, line, &fpos(stem))); } DbConvert(db, FALSE); if( (fp = OpenFile(index_fnum, FALSE, FALSE)) == null || ReadOneLine(fp, line, MAX_BUFF) == 0 || !StringBeginsWith(&line[3], LOUT_VERSION) ) Error(33, 12, "cannot open database file %s", FATAL, &fpos(db), FileName(index_fnum)); } /* set up database record */ StringCopy(line, FileName(index_fnum)); i = StringLength(line) - StringLength(INDEX_SUFFIX); assert( i > 0, "DbLoad: FileName(index_fnum)!" ); StringCopy(&line[i], STR_EMPTY); db = MakeWord(WORD, line, &fpos(stem)); reading(db) = TRUE; in_memory(db) = in_mem; if( symbs != nilobj ) { assert( type(symbs) == ACAT, "DbLoad: type(symbs)!" ); Link(db, symbs); } if( fp == null ) { debug1(DBS, DD, "] DbLoad returning (empty) %s", string(db)); db_filep(db) = null; db_lines(db) = (LINE *) NULL; ifdebug(DPP, D, ProfileOff("DbLoad")); return db; } /* read header lines of index file, find its symbols */ leftp = 0; lnum = 1; while( (status = ReadOneLine(fp, line, MAX_BUFF)) != 0 ) { debug1(DBS, D, "ReadOneLine returning \"%s\"", line); if( line[0] != '0' || line[1] != '0' ) break; lnum++; leftp = (int) ftell(fp); gall = StringBeginsWith(line, AsciiToFull("00target ")); sscanf( (char *) line, gall ? "00target %d" : "00symbol %d", &num); for( i = 9; line[i] != CH_SPACE && line[i] != '\0'; i++ ); if( symbs == nilobj ) { /* any symbols are possible, full path names in index file required */ count = 0; sym = StartSym; while( line[i] != '\0' ) { PushScope(sym, FALSE, FALSE); count++; sscanf( (char *) &line[i+1], "%s", sym_name); sym = SearchSym(sym_name, StringLength(sym_name)); i += StringLength(sym_name) + 1; } for( i = 1; i <= count; i++ ) PopScope(); } else { /* only symbs symbols possible, full path names not required */ sym = nilobj; sscanf( (char *) &line[i+1], "%s", sym_name); for( link = Down(symbs); link != symbs; link = NextDown(link) ) { Child(y, link); assert( type(y) == CLOSURE, "DbLoad: type(y) != CLOSURE!" ); if( StringEqual(sym_name, SymName(actual(y))) ) { sym = actual(y); break; } } } if( sym != nilobj && sym != StartSym ) { if( cross_sym(sym) == nilobj ) CrossInit(sym); Link(db, cross_sym(sym)); link = LastDown(db); number(link) = num; db_targ(link) = gall; if( gall ) is_extern_target(sym) = uses_extern_target(sym) = TRUE; } else { Error(33, 13, "undefined symbol in database file %s (line %d)", WARN, &fpos(db), FileName(index_fnum), lnum); debug1(DBS, DD, "] DbLoad returning %s (error)", string(db)); fclose(fp); in_memory(db) = FALSE; db_filep(db) = null; /* subsequently treated like an empty database */ ifdebug(DPP, D, ProfileOff("DbLoad")); return db; } } /* if in_memory, go on to read the entire database index into memory */ if( in_memory(db) ) { if( status == 0 ) db_lines(db) = 0; else { int len; db_lines(db) = ReadLines(fp, FileName(index_fnum), line, &len); db_lineslen(db) = len; SortLines(db_lines(db), db_lineslen(db)); } } else /* external, save leftpos and file pointer */ { db_filep(db) = fp; left_pos(db) = leftp; } /* return */ debug1(DBS, DD, "] DbLoad returning %s", string(db)); ifdebug(DPP, D, ProfileOff("DbLoad")); return db; } /* end DbLoad */ /*@::SearchFile()@************************************************************/ /* */ /* static BOOLEAN SearchFile(fp, left, right, str, line) */ /* */ /* File fp is a text file. left is the beginning of a line, right is the */ /* end of a line. Search the file by binary search for a line beginning */ /* with str. If found, return it in line, else return FALSE. */ /* */ /* NB if the line endings consist of two characters, the end of the line */ /* is at the second character. */ /* */ /*****************************************************************************/ static BOOLEAN SearchFile(FILE *fp, int left, int right, FULL_CHAR *str, FULL_CHAR *line) { int l, r, mid, mid_end; FULL_CHAR buff[MAX_BUFF]; BOOLEAN res; int ch; ifdebug(DPP, D, ProfileOn("SearchFile")); debug3(DBS, D, "SearchFile(fp, %d, %d, %s, line)", left, right, str); l = left; r = right; while( l <= r ) { /* loop invt: (l==0 or fp[l-1]==end_of_line) and (fp[r] == end_of_line) */ /* and first key >= str lies in the range fp[l..r+1] */ /* find line near middle of the range; mid..mid_end brackets it */ debug2(DBS, DD, " start loop: l = %d, r = %d", l, r); mid = (l + r)/2; fseek(fp, (long) mid, SEEK_SET); do { mid++; } while( (ch = getc(fp)) != CH_CR && ch != CH_LF ); if( ch == CH_CR ) { ch = getc(fp); if( ch != CH_LF ) ungetc(ch, fp); else mid++; } else /* ch == CH_LF */ { ch = getc(fp); if( ch != CH_CR ) ungetc(ch, fp); else mid++; } if( mid == r + 1 ) { mid = l; fseek(fp, (long) mid, SEEK_SET); } ReadOneLine(fp, line, MAX_BUFF); mid_end = (int) ftell(fp) - 1; debug3(DBS, DD, " mid: %d, mid_end: %d, line: %s", mid, mid_end, line); assert( l <= mid, "SearchFile: l > mid!" ); assert( mid < mid_end, "SearchFile: mid >= mid_end!" ); assert( mid_end <= r, "SearchFile: mid_end > r!" ); /* compare str with this line and prepare next step */ if( TabbedStringLessEqual(str, line) ) { debug2(DBS, D, " left after comparing key %s with line %s", str, line); r = mid - 1; } else { debug2(DBS, D, " right after comparing key %s with line %s", str, line); l = mid_end + 1; } } /* end while */ /* now first key >= str lies in fp[l]; compare it with str */ if( l < right ) { fseek(fp, (long) l, SEEK_SET); ReadOneLine(fp, line, MAX_BUFF); sscanf( (char *) line, "%[^\t]", buff); res = StringEqual(str, buff); } else res = FALSE; debug1(DBS, D, "SearchFile returning %s", bool(res)); ifdebug(DPP, D, ProfileOff("SearchFile")); return res; } /* end SearchFile */ /*@::SearchLines()@***********************************************************/ /* */ /* static BOOLEAN SearchLines(LINE *lines, int left, int right, str, lnum) */ /* */ /* Search the sorted array of LINE arrays lines[left..right] for a line */ /* beginning with str, and return TRUE if found else FALSE. */ /* */ /* If TRUE is returned then the number of the line is in *lnum. */ /* */ /*****************************************************************************/ static BOOLEAN SearchLines(LINE *lines, int left, int right, FULL_CHAR *str, int *lnum) { int l, r, mid; FULL_CHAR buff[MAX_BUFF]; BOOLEAN res; debug3(DBS, D, "SearchLines(lines, %d, %d, %s, lnum)", left, right, str); if( right < left ) { debug0(DBS, D, "SearchLines returning FALSE (empty lines)"); return FALSE; } l = left; r = right - 1; while( l <= r ) { /* loop invt: first key >= str (if any) lies in the range lines[l..r+1] */ /* and left <= l <= right and r < right */ mid = (l + r) / 2; debug4(DBS, D, " [l %d, r %d] examining lines[%d] = %s", l, r, mid, lines[mid]); if( TabbedStringLessEqual(str, (FULL_CHAR *) lines[mid]) ) r = mid - 1; else l = mid + 1; } sscanf( (char *) lines[l], "%[^\t]", buff); if( StringEqual(str, buff) ) { res = TRUE; *lnum = l; debug1(DBS, D, "SearchLines returning TRUE (lnum %d)", *lnum); } else { res = FALSE; debug0(DBS, D, "SearchLines returning FALSE"); } return res; } /* end SearchLines */ /*@::DbRetrieve()@************************************************************/ /* */ /* BOOLEAN DbRetrieve(db, gall, sym, tag, seq, dfnum, dfpos, dlnum, cont) */ /* */ /* Retrieve the first entry of database db with the given gall, sym and */ /* tag. Set *seq, *dfnum, *dlnum, *dfpos to the associated value. */ /* Set *cont to a private value for passing to DbRetrieveNext. */ /* */ /*****************************************************************************/ BOOLEAN DbRetrieve(OBJECT db, BOOLEAN gall, OBJECT sym, FULL_CHAR *tag, FULL_CHAR *seq, FILE_NUM *dfnum, long *dfpos, int *dlnum, long *cont) { int symnum, lnum; FULL_CHAR line[MAX_BUFF], buff[MAX_BUFF]; ifdebug(DPP, D, ProfileOn("DbRetrieve")); debug4(DBS, DD, "DbRetrieve(%s, %s%s&%s)", string(db), gall ? "0" : "", SymName(sym), tag); /* check OK to proceed */ if( !reading(db) || db_filep(db) == null ) { debug0(DBS, DD, "DbRetrieve returning FALSE (empty or not reading)"); ifdebug(DPP, D, ProfileOff("DbRetrieve")); return FALSE; } /* convert parameters into search key */ SymToNum(db, sym, symnum, FALSE); sprintf( (char *) buff, "%s%d&%s", gall ? "0" : "", symnum, tag); if( in_memory(db) ) { /* search internal table, return if not found; set *cont to continuation */ if( !SearchLines(db_lines(db), 0, db_lineslen(db) - 1, buff, &lnum) ) { debug0(DBS, DD, "DbRetrieve returning FALSE (key not present)"); ifdebug(DPP, D, ProfileOff("DbRetrieve")); return FALSE; } sscanf( (char *) db_lines(db)[lnum], "%*[^\t]\t%[^\t]\t%*[^\t]\t%ld\t%d\t%[^\n\f]", seq, dfpos, dlnum, buff); *cont = lnum+1; } else { /* search for key in file, return if not found; set *cont to continuatn */ fseek(db_filep(db), 0L, SEEK_END); if( !SearchFile(db_filep(db), (int) left_pos(db), (int) ftell(db_filep(db)) - 1, buff, line) ) { debug0(DBS, DD, "DbRetrieve returning FALSE (key not present)"); ifdebug(DPP, D, ProfileOff("DbRetrieve")); return FALSE; } sscanf( (char *) line, "%*[^\t]\t%[^\t]\t%*[^\t]\t%ld\t%d\t%[^\n\f]", seq, dfpos, dlnum, buff); *cont = ftell(db_filep(db)); } /* work out file name if . abbreviation used, and possibly define file */ if( StringEqual(buff, AsciiToFull(".")) ) { StringCopy(buff, string(db)); } *dfnum = FileNum(buff, DATA_SUFFIX); if( *dfnum == NO_FILE ) /* can only occur in cross reference database */ { debug0(DFS, D, " calling DefineFile from DbRetrieve"); *dfnum = DefineFile(buff, DATA_SUFFIX, &fpos(db), DATABASE_FILE, SOURCE_PATH); } /* return */ debug3(DBS, DD, "DbRetrieve returning TRUE (in %s at %ld, line %d)", FileName(*dfnum), *dfpos, *dlnum); ifdebug(DPP, D, ProfileOff("DbRetrieve")); return TRUE; } /* end DbRetrieve */ /*@::DbRetrieveNext()@********************************************************/ /* */ /* BOOLEAN DbRetrieveNext(db, gall, sym, tag, seq, dfnum, dfpos,dlnum,cont) */ /* */ /* Retrieve the entry of database db pointed to by *cont. */ /* Set *gall, *sym, *tag, *seq, *dfnum, *dlnum, *dfpos to the value. */ /* Reset *cont to the next entry for passing to the next DbRetrieveNext. */ /* */ /*****************************************************************************/ BOOLEAN DbRetrieveNext(OBJECT db, BOOLEAN *gall, OBJECT *sym, FULL_CHAR *tag, FULL_CHAR *seq, FILE_NUM *dfnum, long *dfpos, int *dlnum, long *cont) { FULL_CHAR line[MAX_BUFF], *cline, fname[MAX_BUFF]; int symnum; ifdebug(DPP, D, ProfileOn("DbRetrieveNext")); debug2(DBS, DD, "DbRetrieveNext( %s, %ld )", string(db), *cont); assert(reading(db), "DbRetrieveNext: not reading"); /* check OK to proceed */ if( db_filep(db) == null ) { debug0(DBS, DD, "DbRetrieveNext returning FALSE (empty database)"); ifdebug(DPP, D, ProfileOff("DbRetrieveNext")); return FALSE; } if( in_memory(db) ) { /* get next entry from internal database */ if( *cont >= db_lineslen(db) ) { debug0(DBS, DD, "DbRetrieveNext returning FALSE (no successor)"); ifdebug(DPP, D, ProfileOff("DbRetrieveNext")); return FALSE; } cline = (FULL_CHAR *) db_lines(db)[*cont]; *gall = (cline[0] == '0' ? 1 : 0); sscanf((char *)&cline[*gall], "%d&%[^\t]\t%[^\t]\t%*[^\t]\t%ld\t%d\t%[^\n\f]", &symnum, tag, seq, dfpos, dlnum, fname); *cont = *cont + 1; } else { /* use *cont to find position of next entry; advance *cont */ fseek(db_filep(db), *cont == 0L ? (long) left_pos(db) : *cont, SEEK_SET); if( ReadOneLine(db_filep(db), line, MAX_BUFF) == 0 ) { debug0(DBS, DD, "DbRetrieveNext returning FALSE (no successor)"); ifdebug(DPP, D, ProfileOff("DbRetrieveNext")); return FALSE; } *gall = (line[0] == '0' ? 1 : 0); sscanf((char *)&line[*gall], "%d&%[^\t]\t%[^\t]\t%*[^\t]\t%ld\t%d\t%[^\n\f]", &symnum, tag, seq, dfpos, dlnum, fname); *cont = ftell(db_filep(db)); } /* work out file name if . abbreviation used, and possibly define file */ if( StringEqual(fname, AsciiToFull(".")) ) { StringCopy(fname, string(db)); } *dfnum = FileNum(fname, DATA_SUFFIX); if( *dfnum == NO_FILE ) /* can only occur in cross reference database */ { debug0(DFS, D, " calling DefineFile from DbRetrieveNext"); *dfnum = DefineFile(fname, DATA_SUFFIX, &fpos(db), DATABASE_FILE, SOURCE_PATH); } NumToSym(db, symnum, *sym); /* return */ debug3(DBS, DD, "DbRetrieveNext returning TRUE (in %s at %ld, line %d)", FileName(*dfnum), *dfpos, *dlnum); ifdebug(DPP, D, ProfileOff("DbRetrieveNext")); return TRUE; } /* end DbRetrieveNext */ lout-3.39/z46.c0000644000076400007640000004630111442244704011646 0ustar jeffjeff/*@z46.c:Optimal Galleys:FindOptimize()@**************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z46.c */ /* MODULE: Optimal Galleys */ /* EXTERNS: FindOptimize(), SetOptimize(), GazumpOptimize(), */ /* CalculateOptimize(), DebugOptimize() */ /* */ /*****************************************************************************/ #include "externs.h" /*****************************************************************************/ /* */ /* BOOLEAN FindOptimize(x, env) */ /* */ /* Object x is a CLOSURE which represents an at present unsized galley. */ /* Return TRUE if x has an @Optimize parameter which is Yes. */ /* */ /*****************************************************************************/ BOOLEAN FindOptimize(OBJECT x, OBJECT env) { OBJECT y, link, res; OBJECT bt[2], ft[2], ntarget, nenclose, crs; debug1(DOG, D, "FindOptimize( %s )", EchoObject(x)); assert( type(x) == CLOSURE, "FindOptimize: type(x) != CLOSURE!" ); assert( has_target(actual(x)), "FindOptimize: x has no target!" ); /* search the parameter list of x for @Optimize */ res = nilobj; for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == PAR && is_optimize(actual(y)) ) { assert( Down(y) != y, "FindOptimize: Down(PAR)!" ); Child(res, Down(y)); res = CopyObject(res, &fpos(x)); break; } } /* search the children list of actual(x) for a default value of @Target */ if( res == nilobj ) for( link = Down(actual(x)); link != actual(x); link = NextDown(link) ) { Child(y, link); if( is_optimize(y) ) { res = CopyObject(sym_body(y), &fpos(x)); break; } } /* should have found it by now */ assert( res != nilobj, "FindOptimize: res == nilobj!" ); /* manifest and tidy the parameter, return TRUE if Yes */ bt[COLM] = ft[COLM] = bt[ROWM] = ft[ROWM] = ntarget = nenclose = crs = nilobj; res = Manifest(res, env, &save_style(x), bt, ft, &ntarget, &crs, TRUE, FALSE, &nenclose, FALSE); res = ReplaceWithTidy(res, WORD_TIDY); if( !is_word(type(res)) ) { Error(46, 1, "unable to evaluate %s parameter, assuming value is No", WARN, &fpos(x), KW_OPTIMIZE); debug2(DOG, D, "FindOptimize returning FALSE; found %s %s", Image(type(res)), EchoObject(res)); return FALSE; } else if( StringEqual(string(res), AsciiToFull("Yes")) ) { debug0(DOG, D, "FindOptimize returning TRUE"); return TRUE; } else if( StringEqual(string(res), AsciiToFull("No")) ) { debug0(DOG, D, "FindOptimize returning FALSE"); return FALSE; } else { Error(46, 2, "value of %s operator is neither Yes nor No, assuming No", WARN, &fpos(x), KW_OPTIMIZE); debug1(DOG, D, "FindOptimize returning FALSE (found WORD %s)", string(res)); return FALSE; } } /* end FindOptimize */ /*****************************************************************************/ /* */ /* SetOptimize(hd, style) */ /* */ /* Initialize the optimization data of galley hd. Search the cross ref */ /* database for information about its fate on the previous run. */ /* */ /*****************************************************************************/ void SetOptimize(OBJECT hd, STYLE *style) { FULL_CHAR buff[MAX_BUFF], seq[MAX_BUFF]; OBJECT res, y, link, z; FILE_NUM dfnum; long dfpos, cont; int dlnum; debug2(DOG, D, "SetOptimize(%s, %s)", SymName(actual(hd)), EchoStyle(style)); /* set opt_counts(hd) to result of previous run, if any */ StringCopy(buff, SymName(actual(hd))); StringCat(buff, AsciiToFull(".")); StringCat(buff, StringInt(line_num(fpos(hd)))); if( DbRetrieve(OldCrossDb, FALSE, OptGallSym, buff, seq, &dfnum, &dfpos, &dlnum, &cont) ) { SwitchScope(nilobj); res = ReadFromFile(dfnum, dfpos, dlnum); UnSwitchScope(nilobj); assert( res != nilobj, "SetOptimize: res == nilobj!" ); assert( type(res) == CLOSURE, "SetOptimize: type(res) != CLOSURE!" ); assert( actual(res) == OptGallSym, "SetOptimize: actual(res) != Opt!" ); assert( Down(res) != res, "SetOptimize: Down(res) == res!" ); Child(y, Down(res)); assert( type(y) == PAR, "SetOptimize: type(y) != PAR!" ); Child(y, Down(y)); assert( type(y) == ACAT, "SetOptimize: type(y) != ACAT!" ); y = ReplaceWithTidy(y, ACAT_TIDY); opt_hyph(hd) = FALSE; assert( type(y) == ACAT, "SetOptimize: type(y) != ACAT (2)!" ); for( link = y; NextDown(link) != y; link = NextDown(link) ) { Child(z, NextDown(link)); if( type(z) == GAP_OBJ ) { DisposeChild(NextDown(link)); link = PrevDown(link); } else if( is_word(type(z)) ) { if( StringEqual(string(z), AsciiToFull("h")) ) { opt_hyph(hd) = TRUE; DisposeChild(NextDown(link)); link = PrevDown(link); } else { int num = 0; sscanf( (char *) string(z), "%d", &num); assert( num > 0, "SetOptimize: num <= 0!" ); comp_count(z) = num; } } else { assert( FALSE, "SetOptimize: type(z)!" ); } } DeleteLink(Up(y)); DisposeObject(res); opt_counts(hd) = y; } else opt_counts(hd) = nilobj; /* set up first opt_comps_permitted value */ if( opt_counts(hd) != nilobj && Down(opt_counts(hd)) != opt_counts(hd) ) { Child(z, Down(opt_counts(hd))); opt_comps_permitted(hd) = comp_count(z) - 1; DisposeChild(Up(z)); } else opt_comps_permitted(hd) = MAX_FILES; /* a large number */ debug1(DOG, D, " initial permitted = %2d", opt_comps_permitted(hd)); /* set opt_components(hd) and opt_constraints(hd) for storing this run */ New(opt_components(hd), ACAT); opt_gazumped(hd) = FALSE; New(opt_constraints(hd), ACAT); StyleCopy(save_style(opt_components(hd)), *style); if( gall_dir(hd) == ROWM ) { hyph_style(save_style(opt_components(hd))) = HYPH_OFF; marginkerning(save_style(opt_components(hd))) = FALSE; } debug0(DOG, D, "SetOptimize returning:"); ifdebug(DOG, D, DebugOptimize(hd)); } /* end SetOptimize */ /*****************************************************************************/ /* */ /* GazumpOptimize(hd, dest) */ /* */ /* Optimizing galley hd, currently attached to @Galley dest, is to be */ /* gazumped by some other galley. Record the current size constraint and */ /* add &1rt {} to the list of components. */ /* */ /*****************************************************************************/ void GazumpOptimize(OBJECT hd, OBJECT dest) { OBJECT g, tmp, junk, prnt; debug2(DOG, D, "GazumpOptimize(%s, %s)", SymName(actual(hd)), EchoObject(dest)); assert( type(hd) == HEAD, "GazumpOptimize: type(hd) != HEAD!" ); assert( opt_components(hd) != nilobj, "GazumpOptimize: opt_c!" ); /* record the size of this just-completed target area for hd */ New(tmp, WIDE); if( (gall_dir(hd) == COLM && external_hor(dest)) || (gall_dir(hd) == COLM && external_hor(dest)) ) { SetConstraint(constraint(tmp), MAX_FULL_LENGTH, MAX_FULL_LENGTH, MAX_FULL_LENGTH); } else { Parent(prnt, Up(dest)); Constrained(prnt, &constraint(tmp), gall_dir(hd), &junk); } Link(opt_constraints(hd), tmp); debug2(DOG, D, "GazumpOptimize(%s) adding constraint %s", SymName(actual(hd)), EchoConstraint(&constraint(tmp))); /* optimizing galley is being gazumped; record this as &1rt {} &1c */ if( LastDown(opt_components(hd)) != opt_components(hd) ) { Child(g, LastDown(opt_components(hd))); assert( type(g) == GAP_OBJ, "FlushGalley: type(g) != GAP_OBJ!" ); /* *** SetGap(gap(g), FALSE, FALSE, TRUE, FRAME_UNIT, EDGE_MODE, 2 * FR); if( Down(g) == g ) { junk = MakeWord(WORD, AsciiToFull("2b"), &fpos(g)); Link(g, junk); } *** */ /* first we overwrite whatever is there now by &1rt */ SetGap(gap(g), FALSE, FALSE, TRUE, AVAIL_UNIT, TAB_MODE, 1 * FR); if( Down(g) != g ) DisposeChild(Down(g)); tmp = MakeWord(WORD, AsciiToFull("1rt"), &fpos(g)); Link(g, tmp); /* next we add an empty word */ tmp = MakeWord(WORD, STR_EMPTY, &fpos(g)); back(tmp, COLM) = fwd(tmp, COLM) = 0; back(tmp, ROWM) = fwd(tmp, ROWM) = 0; word_font(tmp) = word_colour(tmp) = 0; word_underline_colour(tmp) = 0; word_texture(tmp) = 1; word_outline(tmp) = FALSE; word_language(tmp) = word_hyph(tmp) = 0; word_baselinemark(tmp) = FALSE; word_strut(tmp) = FALSE; word_ligatures(tmp) = TRUE; Link(opt_components(hd), tmp); /* finally we add &1c */ New(g, GAP_OBJ); hspace(g) = 1; vspace(g) = 0; FposCopy(fpos(g), fpos(tmp)); SetGap(gap(g), FALSE, FALSE, TRUE, FIXED_UNIT, EDGE_MODE, 1 * CM); tmp = MakeWord(WORD, AsciiToFull("1c"), &fpos(g)); Link(g, tmp); Link(opt_components(hd), g); opt_gazumped(hd) = TRUE; debug2(DOG, D, "GazumpOptimize(%s) new gap is %s", SymName(actual(hd)), EchoGap(&gap(g))); } /* refresh the number of comps permitted into the next target */ if( opt_counts(hd) != nilobj && Down(opt_counts(hd)) != opt_counts(hd) ) { Child(tmp, Down(opt_counts(hd))); opt_comps_permitted(hd) += comp_count(tmp) - 1; DisposeChild(Up(tmp)); } else opt_comps_permitted(hd) = MAX_FILES; debug1(DOG, D, "GazumpOptimize returning, permitted = %2d", opt_comps_permitted(hd)); } /* end GazumpOptimize */ /*****************************************************************************/ /* */ /* CalculateOptimize(hd) */ /* */ /* Calculate the optimal break for galley hd and write the result into */ /* the cross reference database. */ /* */ /*****************************************************************************/ void CalculateOptimize(OBJECT hd) { OBJECT z, y, ylink, og, og_par, para, link, wd, g, last; int count, compcount; FULL_CHAR buff[MAX_BUFF]; FILE_NUM fnum; int write_pos, write_lnum; BOOLEAN hyph_used; debug1(DOG, D, "CalculateOptimize(%s)", SymName(actual(hd))); /* delete the concluding GAP_OBJ stuck in by Promote() */ assert( LastDown(opt_components(hd)) != opt_components(hd), "CO!" ); Child(last, LastDown(opt_components(hd))); assert( type(last) == GAP_OBJ, "CalculateOptimize: type(last)!" ); DisposeChild(Up(last)); ifdebug(DOG, D, DebugOptimize(hd)); /* break the paragraph; don't let user see any error messages */ assert( opt_constraints(hd) != nilobj, "KillGalley: no opt_constraints!" ); assert( Down(opt_constraints(hd)) != opt_constraints(hd), "KillGalleyo!" ); /* *** no longer needed since z14 doesn't refer to these fields back(opt_components(hd), COLM) = 0; fwd(opt_components(hd), COLM) = MAX_FULL_LENGTH; *** */ Child(y, LastDown(opt_constraints(hd))); EnterErrorBlock(FALSE); opt_components(hd) = FillObject(opt_components(hd), &constraint(y), opt_constraints(hd), FALSE, FALSE, TRUE, &hyph_used); LeaveErrorBlock(FALSE); debug1(DOG, D, "after breaking (%shyph_used):", hyph_used ? "" : "not "); ifdebug(DOG, D, DebugOptimize(hd)); /* quit if one line only */ if( type(opt_components(hd)) != VCAT || Down(opt_components(hd)) == LastDown(opt_components(hd)) ) { debug0(DOG, D, "CalculateOptimize returning (one target only)"); return; } /* construct a new @OptGall symbol */ New(og, CLOSURE); actual(og) = OptGallSym; FposCopy(fpos(og), fpos(hd)); New(og_par, PAR); actual(og_par) = ChildSym(OptGallSym, RPAR); Link(og, og_par); New(para, ACAT); Link(og_par, para); /* begin with "h" if hyphenation was used */ if( hyph_used ) { wd = MakeWord(WORD, AsciiToFull("h"), &fpos(hd)); Link(para, wd); } /* attach words showing the number of components per target */ compcount = 0; for( link = Down(opt_components(hd)); link != opt_components(hd); link = NextDown(link) ) { Child(y, link); if( type(y) != ACAT ) continue; /* let wd be a word containing the number of components in this target */ count = 0; for( ylink = Down(y); ylink != y; ylink = NextDown(ylink) ) { Child(z, ylink); if( type(z) != GAP_OBJ ) count++; } wd = MakeWord(WORD, StringInt(count), &fpos(y)); /* link wd to para, prepended by a gap if not first */ if( Down(para) != para ) { New(g, GAP_OBJ); SetGap(gap(g), FALSE, FALSE, TRUE, FIXED_UNIT, EDGE_MODE, 1*EM); if( ++compcount % 20 == 0 ) { hspace(g) = 0; vspace(g) = 1; } else { hspace(g) = 1; vspace(g) = 0; } Link(para, g); } Link(para, wd); } debug2(DOG, D, "CalculateOptimize(%s) made object %s", SymName(actual(hd)), EchoObject(og)); /* dispose the optimizing data structures */ DisposeObject(opt_components(hd)); opt_components(hd) = nilobj; DisposeObject(opt_constraints(hd)); opt_constraints(hd) = nilobj; /* write result onto cross-reference database */ if( AllowCrossDb ) { /* construct a suitable tag for this galley's entry */ StringCopy(buff, SymName(actual(hd))); StringCat(buff, AsciiToFull(".")); StringCat(buff, StringInt(line_num(fpos(hd)))); fnum = DatabaseFileNum(&fpos(hd)); AppendToFile(og, fnum, &write_pos, &write_lnum); DbInsert(NewCrossDb, FALSE, OptGallSym, buff, &fpos(hd), STR_ZERO, fnum, write_pos, write_lnum, FALSE); } debug0(DOG, D, "CalculateOptimize returning."); } #if DEBUG_ON /*****************************************************************************/ /* */ /* DebugOptimizedAcat(x) */ /* */ /* Debug output of one line of optimized ACAT. */ /* */ /*****************************************************************************/ static void DebugOptimizedAcat(OBJECT x) { OBJECT link, y; assert( type(x) == ACAT, "DebugOptimizedAcat!" ); for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == GAP_OBJ ) { debug1(DOG, D, " GAP_OBJ %s", EchoGap(&gap(y))); } else if( is_word(type(y)) ) { debug2(DOG, D, " word (%s, %s)", EchoLength(back(y, COLM)), EchoLength(fwd(y, COLM))); } else { debug1(DOG, D, " %s", Image(type(y))); } } } /* end DebugOptimizedAcat */ /*****************************************************************************/ /* */ /* DebugOptimize(hd) */ /* */ /* Debug output of optimized galley hd. */ /* */ /*****************************************************************************/ void DebugOptimize(OBJECT hd) { OBJECT link, y; assert( opt_components(hd) != nilobj, "DebugOptimize!"); debug3(DOG, D, "Optimized Galley %s %sinto %s", SymName(actual(hd)), gall_dir(hd) == COLM ? "horizontally " : "", SymName(whereto(hd))); /* print components */ /* *** believe this now *** if( type(opt_components(hd)) == ACAT ) DebugOptimizedAcat(opt_components(hd)); else if( type(opt_components(hd)) == VCAT ) { for( link = Down(opt_components(hd)); link != opt_components(hd); link = NextDown(link) ) { Child(y, link); if( type(y) == ACAT ) DebugOptimizedAcat(y); debug0(DOG, D, "----------------"); } } else debug1(DOG, D, "? %s ?", Image(type(opt_components(hd)))); *** */ debug0(DOG, D, "components:"); ifdebug(DOG, D, DebugObject(opt_components(hd))); debug0(DOG, D, ""); /* print constraints */ debug0(DOG, D, "constraints:"); for( link = Down(opt_constraints(hd)); link != opt_constraints(hd); link = NextDown(link) ) { Child(y, link); debug1(DOG, D, "%s", EchoConstraint(&constraint(y))); } debug0(DOG, D, ""); /* print counts */ debug0(DOG, D, "counts"); if( opt_counts(hd) != nilobj ) { if( opt_hyph(hd) ) fprintf(stderr, "hyph"); for( link = Down(opt_counts(hd)); link != opt_counts(hd); link = NextDown(link) ) { Child(y, link); fprintf(stderr, " %d", comp_count(y)); } fprintf(stderr, "%s", STR_NEWLINE); } debug0(DOG, D, ""); } /* end DebugOptimize */ #endif lout-3.39/z51.c0000644000076400007640000010614711442244722011647 0ustar jeffjeff/*@z51.c:Plain Text Back End:Plain_BackEnd@***********************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z51.c */ /* MODULE: Plain Text Back End */ /* EXTERNS: Plain_BackEnd, PlainCharWidth, PlainCharHeight, */ /* PlainFormFeed */ /* */ /*****************************************************************************/ #include "externs.h" /*****************************************************************************/ /* */ /* PlainCharWidth the width of each character */ /* PlainCharHeight the height of each character */ /* PlainFormFeed TRUE if components to be separated by \f. */ /* */ /*****************************************************************************/ FULL_LENGTH PlainCharWidth, PlainCharHeight; BOOLEAN PlainFormFeed; /*****************************************************************************/ /* */ /* State variables for this module */ /* */ /*****************************************************************************/ static FILE *out_fp; /* file to print output on */ static int hsize; /* horizontal size of page in chars */ static int vsize; /* vertical size of page in chars */ static FULL_CHAR *page; /* the page (two-dim array of chars) */ static BOOLEAN prologue_done; /* TRUE after prologue is printed */ /*****************************************************************************/ /* */ /* void Plain_PrintInitialize(FILE *fp, BOOLEAN enc) */ /* */ /* Initialize this module; fp is the output file. */ /* */ /*****************************************************************************/ void Plain_PrintInitialize(FILE *fp, BOOLEAN enc) { debug0(DPT, DD, "Plain_PrintInitialize(fp)"); assert(!enc, "Plain_PrintInitialize"); out_fp = fp; prologue_done = FALSE; debug0(DPT, DD, "Plain_PrintInitialize returning."); } /* end Plain_PrintInitialize */ /*****************************************************************************/ /* */ /* void Plain_PrintLength(FULL_CHAR *buff, int length, int length_dim) */ /* */ /* Print a length (debugging only) */ /* */ /*****************************************************************************/ static void Plain_PrintLength(FULL_CHAR *buff, int length, int length_dim) { if( length_dim == COLM ) { sprintf( (char *) buff, "%.2fs", (float) length/PlainCharWidth); } else { sprintf( (char *) buff, "%.2ff", (float) length/PlainCharHeight); } } /*****************************************************************************/ /* */ /* void Plain_PrintPageSetupForFont(OBJECT face, int font_curr_page, */ /* FULL_CHAR *font_name, FULL_CHAR *first_size_str) */ /* */ /* Print the page setup commands required to use a font on some page: */ /* */ /* face The font face record, defining which font we need */ /* font_curr_page The current page number */ /* font_name The name of the font */ /* first_size_str No idea, have to check */ /* */ /*****************************************************************************/ static void Plain_PrintPageSetupForFont(OBJECT face, int font_curr_page, FULL_CHAR *font_name, FULL_CHAR *first_size_str) { /* nothing to do here */ } /* end Plain_PrintPageSetupForFont */ /*****************************************************************************/ /* */ /* void Plain_PrintPageResourceForFont(FULL_CHAR *font_name, BOOLEAN first) */ /* BOOLEAN first) */ /* */ /* Print page resource info on file fp for font font_name; first is true */ /* if this is the first resource on this page. */ /* */ /*****************************************************************************/ static void Plain_PrintPageResourceForFont(FULL_CHAR *font_name, BOOLEAN first) { /* nothing to do here */ } /* end Plain_PrintPageResourceForFont */ /*****************************************************************************/ /* */ /* static void Plain_PrintMapping(MAPPING m) */ /* */ /* Print mapping m. */ /* */ /*****************************************************************************/ static void Plain_PrintMapping(MAPPING m) { /* nothing to do here */ } /* end Plain_PrintMapping */ /*****************************************************************************/ /* */ /* void Plain_PrintBeforeFirstPage(h, v, label) */ /* */ /* This procedure is called just before starting to print the first */ /* component of the output. Its size is h, v, and label is the page label. */ /* */ /*****************************************************************************/ static void Plain_PrintBeforeFirstPage(FULL_LENGTH h, FULL_LENGTH v, FULL_CHAR *label) { int i, j; debug2(DPT, DD, "PrintBeforeFirst(%d, %d)", h, v); /* get a new page[] and clear it */ hsize = ceiling(h, PlainCharWidth); vsize = ceiling(v, PlainCharHeight); debug2(DPT, DD, " PlainCharWidth: %d; PlainCharHeight: %d", PlainCharWidth, PlainCharHeight); ifdebug(DMA, D, DebugRegisterUsage(MEM_PAGES, 1, hsize * vsize * sizeof(FULL_CHAR))); debug2(DPT, DD, " PrintBeforeFirst allocating %d by %d", hsize, vsize); page = (FULL_CHAR *) malloc(hsize * vsize * sizeof(FULL_CHAR)); for( i = 0; i < vsize; i++ ) for( j = 0; j < hsize; j++ ) page[i*hsize + j] = ' '; prologue_done = TRUE; } /* end Plain_PrintBeforeFirstPage */ /*****************************************************************************/ /* */ /* void Plain_PrintBetweenPages(h, v, label) */ /* */ /* Start a new output component, of size h by v; label is the page label */ /* to attach to the %%Page comment. */ /* */ /*****************************************************************************/ static void Plain_PrintBetweenPages(FULL_LENGTH h, FULL_LENGTH v, FULL_CHAR *label) { int new_hsize, new_vsize, i, j, jmax; debug2(DPT, DD, "PrintBetween(%d, %d)", h, v); /* print the page that has just ended */ ifdebug(DPT, D, putc('+', out_fp); for( j = 0; j < hsize; j++ ) putc('-', out_fp); putc('+', out_fp); fputs((char *) STR_NEWLINE, out_fp); ); for( i = vsize - 1; i >= 0; i-- ) { ifdebug(DPT, D, putc('|', out_fp)); for( jmax = hsize-1; jmax >= 0 && page[i*hsize+jmax] == ' '; jmax--); ifdebug(DPT, D, jmax = hsize - 1); for( j = 0; j <= jmax; j++ ) putc(page[i*hsize + j], out_fp); ifdebug(DPT, D, putc('|', out_fp)); fputs((char *) STR_NEWLINE, out_fp); } ifdebug(DPT, D, putc('+', out_fp); for( j = 0; j < hsize; j++ ) putc('-', out_fp); putc('+', out_fp); fputs((char *) STR_NEWLINE, out_fp); ); /* separate the page from the next one with a form-feed if required */ if( PlainFormFeed ) putc('\f', out_fp); /* if page size has changed, get a new page[] array */ new_hsize = ceiling(h, PlainCharWidth); new_vsize = ceiling(v, PlainCharHeight); if( new_hsize != hsize || new_vsize != vsize ) { ifdebug(DMA, D, DebugRegisterUsage(MEM_PAGES, -1, -hsize * vsize * sizeof(FULL_CHAR))); free(page); hsize = new_hsize; vsize = new_vsize; debug2(DPT, DD, " PrintBetween allocating %d by %d", hsize, vsize); ifdebug(DPT, D, DebugRegisterUsage(MEM_PAGES, 1, hsize * vsize * sizeof(FULL_CHAR))); page = (FULL_CHAR *) malloc(hsize * vsize * sizeof(FULL_CHAR)); } /* clear page[] for the new page just beginning */ for( i = 0; i < vsize; i++ ) for( j = 0; j < hsize; j++ ) page[i*hsize + j] = ' '; } /* end Plain_PrintBetweenPges */ /*****************************************************************************/ /* */ /* Plain_PrintWord(x, hpos, vpos) */ /* */ /* Print non-empty word x; its marks cross at the point (hpos, vpos). */ /* */ /*****************************************************************************/ static void Plain_PrintWord(OBJECT x, int hpos, int vpos) { FULL_CHAR *p; int i, h, v; debug6(DPT, DD, "Plain_PrintWord( %s, %d, %d ) font %d colour %d%s", string(x), hpos, vpos, word_font(x), word_colour(x), word_outline(x) ? " outline" : ""); TotalWordCount++; h = ((float) hpos / PlainCharWidth) + 0.5; v = ((float) vpos / PlainCharHeight); debug3(DPT, DD, "PrintWord(%s at h = %d, v = %d)", string(x), h, v); if( h >= 0 && h + StringLength(string(x)) < hsize && v >= 0 && v < vsize ) { assert( h >= 0, "PrintWord: h < 0!" ); assert( h < hsize, "PrintWord: h >= hsize!" ); assert( v >= 0, "PrintWord: v < 0!" ); assert( v < vsize, "PrintWord: v >= vsize!" ); p = &page[v*hsize + h]; for( i = 0; string(x)[i] != '\0'; i++ ) *p++ = string(x)[i]; } else Error(51, 1, "word %s deleted (internal error, off page at %d,%d)", WARN, &fpos(x), string(x), h, v); debug0(DPT, DDD, "PrintWord returning"); } /* end Plain_PrintWord */ /*****************************************************************************/ /* */ /* Plain_PrintPlainGraphic(x, xmk, ymk, z) */ /* */ /* Print plain graphic object x at xmk, ymk with the size of z. */ /* */ /*****************************************************************************/ static void Plain_PrintPlainGraphic(OBJECT x, FULL_LENGTH xmk, FULL_LENGTH ymk, OBJECT z) { int i, len, starth, startv, stoph, stopv, h = 0, v = 0; debug2(DPT, D, "Plain_PrintPlainGraphic(x, xmk %s, ymk %s)", EchoLength(xmk), EchoLength(ymk)); if( type(x) != WORD && type(x) != QWORD ) { Error(51, 2, "left parameter of %s must be a simple word", WARN, &fpos(x), KW_PLAINGRAPHIC); return; } len = StringLength(string(x)); if( StringLength(string(x)) == 0 ) { Error(51, 3, "left parameter of %s must be a non-empty word", WARN, &fpos(x), KW_PLAINGRAPHIC); return; } starth = (((float) xmk ) / PlainCharWidth) + 0.5; startv = (((float) ymk ) / PlainCharHeight); stoph = (((float) xmk + size(z, COLM)) / PlainCharWidth) + 0.5; stopv = (((float) ymk - size(z, ROWM)) / PlainCharHeight); /* NB - not + */ SetLengthDim(COLM); debug5(DPT, D, " xmk %s bk %s fwd %s -> %d,%d", EchoLength(xmk), EchoLength(back(z, COLM)), EchoLength(fwd(z, COLM)), starth, stoph); SetLengthDim(ROWM); debug5(DPT, D, " ymk %s bk %s fwd %s -> %d,%d", EchoLength(ymk), EchoLength(back(z, ROWM)), EchoLength(fwd(z, ROWM)), startv, stopv); if( starth >= 0 && stoph < hsize && startv >= 0 && stopv < vsize ) { i = 0; for( v = startv-1; v >= stopv; v-- ) { for( h = starth; h < stoph; h++ ) { if( i == len ) i = 0; page[v*hsize + h] = string(x)[i++]; } } } else { Error(51, 4, "fill %s deleted (internal error, off page at %d,%d)", WARN, &fpos(x), string(x), h, v); } } /* end Plain_PrintPlainGraphic */ /*****************************************************************************/ /* */ /* Plain_PrintUnderline(fnum, col, pat, xstart, xstop, ymk) */ /* */ /* Draw an underline suitable for font fnum, in colour col, from xstart to */ /* xstop at the appropriate distance below mark ymk. */ /* */ /*****************************************************************************/ static void Plain_PrintUnderline(FONT_NUM fnum, COLOUR_NUM col, TEXTURE_NUM pat, FULL_LENGTH xstart, FULL_LENGTH xstop, FULL_LENGTH ymk) { debug5(DPT, DD, "Plain_PrintUnderline(fnum %d, col %d, xstart %s, xstop %s, ymk %s )", fnum, col, EchoLength(xstart), EchoLength(xstop), EchoLength(ymk)); /* do nothing */ debug0(DPT, DD, "PrintUnderline returning."); } /* end Plain_PrintUnderline */ /*****************************************************************************/ /* */ /* Plain_PrintAfterLastPage() */ /* */ /* Clean up this module and close output stream. */ /* */ /*****************************************************************************/ static void Plain_PrintAfterLastPage(void) { int i, j, jmax; if( prologue_done ) { /* print the page that has just ended (exists since prologue_done) */ ifdebug(DPT, D, putc('+', out_fp); for( j = 0; j < hsize; j++ ) putc('-', out_fp); putc('+', out_fp); fputs((char *) STR_NEWLINE, out_fp); ); for( i = vsize - 1; i >= 0; i-- ) { ifdebug(DPT, D, putc('|', out_fp)); for( jmax = hsize-1; jmax >= 0 && page[i*hsize+jmax] == ' '; jmax--); ifdebug(DPT, D, jmax = hsize - 1); for( j = 0; j <= jmax; j++ ) putc(page[i*hsize + j], out_fp); ifdebug(DPT, D, putc('|', out_fp)); fputs((char *) STR_NEWLINE, out_fp); } ifdebug(DPT, D, putc('+', out_fp); for( j = 0; j < hsize; j++ ) putc('-', out_fp); putc('+', out_fp); fputs((char *) STR_NEWLINE, out_fp); ); } } /* end Plain_PrintAfterLastPage */ /*****************************************************************************/ /* */ /* Plain_CoordTranslate(xdist, ydist) */ /* */ /* Translate coordinate system by the given x and y distances. */ /* */ /*****************************************************************************/ void Plain_CoordTranslate(FULL_LENGTH xdist, FULL_LENGTH ydist) { debug2(DPT, D, "Plain_CoordTranslate(%s, %s)", EchoLength(xdist), EchoLength(ydist)); assert(FALSE, "Plain_CoordTranslate: should never be called!"); debug0(DPT, D, "Plain_CoordTranslate returning."); } /* end Plain_CoordTranslate */ /*****************************************************************************/ /* */ /* Plain_CoordRotate(amount) */ /* */ /* Rotate coordinate system by given amount (in internal DG units) */ /* */ /*****************************************************************************/ static void Plain_CoordRotate(FULL_LENGTH amount) { debug1(DPT, D, "Plain_CoordRotate(%.1f degrees)", (float) amount / DG); assert(FALSE, "Plain_CoordRotate: should never be called!"); debug0(DPT, D, "Plain_CoordRotate returning."); } /* end Plain_CoordRotate */ /*****************************************************************************/ /* */ /* Plain_CoordScale(ratio, dim) */ /* */ /* Scale coordinate system by ratio in the given dimension. */ /* */ /*****************************************************************************/ void Plain_CoordScale(float hfactor, float vfactor) { assert(FALSE, "Plain_CoordScale: should never be called!"); } /* end Plain_CoordScale */ /*****************************************************************************/ /* */ /* Plain_SaveGraphicState(x) */ /* */ /* Save current coord system on stack for later restoration. */ /* Object x is just for error reporting, not really used at all. */ /* */ /*****************************************************************************/ void Plain_SaveGraphicState(OBJECT x) { debug0(DPT, D, "Plain_SaveGraphicState()"); assert(FALSE, "Plain_SaveGraphicState: should never be called!" ); debug0(DPT, D, "Plain_SaveGraphicState returning."); } /* end Plain_SaveGraphicState */ /*****************************************************************************/ /* */ /* Plain_RestoreGraphicState() */ /* */ /* Restore previously saved coordinate system. */ /* */ /*****************************************************************************/ void Plain_RestoreGraphicState(void) { debug0(DPT, D, "Plain_RestoreGraphicState()"); assert(FALSE, "Plain_RestoreGraphicState: should never be called!" ); debug0(DPT, D, "Plain_RestoreGraphicState returning."); } /* end Plain_RestoreGraphicState */ /*****************************************************************************/ /* */ /* Plain_PrintGraphicObject(x) */ /* */ /* Print object x on out_fp */ /* */ /*****************************************************************************/ void Plain_PrintGraphicObject(OBJECT x) { debug3(DPT, D, "Plain_PrintGraphicObject(%s %s %s)", EchoFilePos(&fpos(x)), Image(type(x)), EchoObject(x)); assert(FALSE, "Plain_PrintGraphicObject: should never be called!" ); debug0(DPT, D, "Plain_PrintGraphicObject returning"); } /* end Plain_PrintGraphicObject */ /*****************************************************************************/ /* */ /* Plain_DefineGraphicNames(x) */ /* */ /* Generate PostScript for xsize, ysize etc. names of graphic object. */ /* */ /*****************************************************************************/ void Plain_DefineGraphicNames(OBJECT x) { debug1(DPT, D, "Plain_DefineGraphicNames( %s )", EchoObject(x)); debug1(DPT, DD, " style = %s", EchoStyle(&save_style(x))); assert(FALSE, "Plain_DefineGraphicNames: should never be called!" ); debug0(DPT, D, "Plain_DefineGraphicNames returning."); } /* end Plain_DefineGraphicNames */ /*****************************************************************************/ /* */ /* Plain_SaveTranslateDefineSave(x, xdist, ydist) */ /* */ /* Equivalent to the sequence of calls */ /* */ /* SaveGraphicState(x) */ /* CoordTranslate(xdist, ydist) */ /* DefineGraphicNames(x) */ /* SaveGraphicState(x) */ /* */ /* but offers opportunities for optimization. */ /* */ /*****************************************************************************/ void Plain_SaveTranslateDefineSave(OBJECT x, FULL_LENGTH xdist, FULL_LENGTH ydist) { assert(FALSE, "Plain_SaveTranslateDefineSave: should never be called!" ); } /* end Plain_SaveTranslateDefineSave */ /*****************************************************************************/ /* */ /* Plain_PrintGraphicInclude(x, colmark, rowmark) */ /* */ /* Print graphic include file, with appropriate surrounds. */ /* */ /*****************************************************************************/ void Plain_PrintGraphicInclude(OBJECT x, FULL_LENGTH colmark, FULL_LENGTH rowmark) { debug0(DPT, D, "Plain_PrintGraphicInclude(x)"); assert(FALSE, "Plain_PrintGraphicInclude: should never be called!" ); debug0(DPT, D, "Plain_PrintGraphicInclude returning."); } /* end Plain_PrintGraphicInclude */ /*****************************************************************************/ /* */ /* Plain_LinkSource(name, llx, lly, urx, ury) */ /* */ /* Print a link source point. */ /* */ /*****************************************************************************/ static void Plain_LinkSource(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) { debug5(DPT, D, "Plain_LinkSource(%s, %d, %d, %d, %d)", EchoObject(name), llx, lly, urx, ury); /* do nothing; no links in plain text output */ debug0(DPT, D, "Plain_LinkSource returning."); } /* end Plain_LinkSource */ /*****************************************************************************/ /* */ /* Plain_LinkDest(name, llx, lly, urx, ury) */ /* */ /* Print a link dest point. */ /* */ /* Still to do: check that the name has not been used by a previous */ /* dest point. */ /* */ /*****************************************************************************/ static void Plain_LinkDest(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) { debug5(DPT, D, "Plain_LinkDest(%s, %d, %d, %d, %d)", EchoObject(name), llx, lly, urx, ury); /* do nothing; no links in plain text output */ debug0(DPT, D, "Plain_LinkDest returning."); } /* end Plain_LinkDest */ /*****************************************************************************/ /* */ /* Plain_LinkURL(url, llx, lly, urx, ury) */ /* */ /* Print an external link. */ /* */ /*****************************************************************************/ static void Plain_LinkURL(OBJECT url, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) { debug5(DPT, D, "Plain_LinkURL(%s, %d, %d, %d, %d)", EchoObject(url), llx, lly, urx, ury); /* do nothing; no links in plain text output */ debug0(DPT, D, "Plain_LinkURL returning."); } /* end Plain_LinkDest */ /*****************************************************************************/ /* */ /* Plain_LinkCheck(void) */ /* */ /* Called at end of run; will check that for every link source point there */ /* is a link dest point. */ /* */ /*****************************************************************************/ static void Plain_LinkCheck(void) { debug0(DPT, D, "Plain_LinkCheck()"); /* do nothing; no links in plain text output */ debug0(DPT, D, "Plain_LinkCheck returning."); } /* end Plain_LinkCheck */ /*****************************************************************************/ /* */ /* Plain_BackEnd */ /* */ /* The record into which all of these functions are packaged. */ /* */ /*****************************************************************************/ static struct back_end_rec plain_back = { PLAINTEXT, /* the code number of the back end */ STR_PLAINTEXT, /* string name of the back end */ FALSE, /* TRUE if @Scale is available */ FALSE, /* TRUE if @Rotate is available */ FALSE, /* TRUE if @VMirror, @HMirror avail */ FALSE, /* TRUE if @Graphic is available */ FALSE, /* TRUE if @IncludeGraphic is avail. */ TRUE, /* TRUE if @PlainGraphic is avail. */ FALSE, /* TRUE if fractional spacing avail. */ FALSE, /* TRUE if actual font metrics used */ FALSE, /* TRUE if colour is available */ Plain_PrintInitialize, Plain_PrintLength, Plain_PrintPageSetupForFont, Plain_PrintPageResourceForFont, Plain_PrintMapping, Plain_PrintBeforeFirstPage, Plain_PrintBetweenPages, Plain_PrintAfterLastPage, Plain_PrintWord, Plain_PrintPlainGraphic, Plain_PrintUnderline, Plain_CoordTranslate, Plain_CoordRotate, Plain_CoordScale, NULL, NULL, Plain_SaveGraphicState, Plain_RestoreGraphicState, Plain_PrintGraphicObject, Plain_DefineGraphicNames, Plain_SaveTranslateDefineSave, Plain_PrintGraphicInclude, Plain_LinkSource, Plain_LinkDest, Plain_LinkURL, Plain_LinkCheck, }; BACK_END Plain_BackEnd = &plain_back; /*****************************************************************************/ /* */ /* Plain_NullBackEnd */ /* */ /* The record into which all of these functions are packaged. */ /* */ /*****************************************************************************/ static void Plain_NullPrintInitialize(FILE *fp, BOOLEAN enc) {} static void Plain_NullPrintPageSetupForFont(OBJECT face, int font_curr_page, FULL_CHAR *font_name, FULL_CHAR *short_name) {} static void Plain_NullPrintPageResourceForFont(FULL_CHAR *font_name, BOOLEAN first) {} static void Plain_NullPrintMapping(MAPPING m) {} static void Plain_NullPrintBeforeFirstPage(FULL_LENGTH h, FULL_LENGTH v, FULL_CHAR *label) {} static void Plain_NullPrintBetweenPages(FULL_LENGTH h, FULL_LENGTH v, FULL_CHAR *label) {} static void Plain_NullPrintAfterLastPage(void) {} static void Plain_NullPrintWord(OBJECT x, int hpos, int vpos) {} static void Plain_NullPrintPlainGraphic(OBJECT x, FULL_LENGTH xmk, FULL_LENGTH ymk, OBJECT z) {} static void Plain_NullPrintUnderline(FONT_NUM fnum, COLOUR_NUM col, TEXTURE_NUM pat, FULL_LENGTH xstart, FULL_LENGTH xstop, FULL_LENGTH ymk) {} static void Plain_NullCoordTranslate(FULL_LENGTH xdist, FULL_LENGTH ydist) {} static void Plain_NullCoordRotate(FULL_LENGTH amount) {} static void Plain_NullCoordScale(float hfactor, float vfactor) {} static void Plain_NullSaveGraphicState(OBJECT x) {} static void Plain_NullRestoreGraphicState(void) {} static void Plain_NullPrintGraphicObject(OBJECT x) {} static void Plain_NullDefineGraphicNames(OBJECT x) {} static void Plain_NullSaveTranslateDefineSave(OBJECT x, FULL_LENGTH xdist, FULL_LENGTH ydist) {} static void Plain_NullPrintGraphicInclude(OBJECT x, FULL_LENGTH colmark, FULL_LENGTH rowmark) {} static void Plain_NullLinkSource(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) {} static void Plain_NullLinkDest(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) {} static void Plain_NullLinkURL(OBJECT url, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) {} static void Plain_NullLinkCheck(void) {} static struct back_end_rec plain_null_back = { PLAINTEXT, /* the code number of the back end */ STR_PLAINTEXT, /* string name of the back end */ FALSE, /* TRUE if @Scale is available */ FALSE, /* TRUE if @Rotate is available */ FALSE, /* TRUE if @VMirror, @HMirror avail */ FALSE, /* TRUE if @Graphic is available */ FALSE, /* TRUE if @IncludeGraphic is avail. */ TRUE, /* TRUE if @PlainGraphic is avail. */ FALSE, /* TRUE if fractional spacing avail. */ FALSE, /* TRUE if actual font metrics used */ FALSE, /* TRUE if colour is available */ Plain_NullPrintInitialize, Plain_PrintLength, Plain_NullPrintPageSetupForFont, Plain_NullPrintPageResourceForFont, Plain_NullPrintMapping, Plain_NullPrintBeforeFirstPage, Plain_NullPrintBetweenPages, Plain_NullPrintAfterLastPage, Plain_NullPrintWord, Plain_NullPrintPlainGraphic, Plain_NullPrintUnderline, Plain_NullCoordTranslate, Plain_NullCoordRotate, Plain_NullCoordScale, NULL, NULL, Plain_NullSaveGraphicState, Plain_NullRestoreGraphicState, Plain_NullPrintGraphicObject, Plain_NullDefineGraphicNames, Plain_NullSaveTranslateDefineSave, Plain_NullPrintGraphicInclude, Plain_NullLinkSource, Plain_NullLinkDest, Plain_NullLinkURL, Plain_NullLinkCheck, }; BACK_END Plain_NullBackEnd = &plain_null_back; lout-3.39/z50.c0000644000076400007640000011535711442244717011655 0ustar jeffjeff/*@z50.c:PDF Back End:PDF_BackEnd@********************************************/ /* */ /* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */ /* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */ /* School of Information Technologies */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA */ /* */ /* FILE: z50.c */ /* MODULE: PDF Back End (in addition to z48.c) */ /* EXTERNS: PDF_BackEnd */ /* */ /*****************************************************************************/ #include /* for fabs() */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #include "externs.h" /*****************************************************************************/ /* */ /* State variables for this module */ /* */ /*****************************************************************************/ #define NO_FONT 0 /* actually stolen from z37.c */ #define NO_COLOUR 0 #define NO_TEXTURE 0 #define MAX_GS 50 /* maximum depth of graphics states */ static FILE *out_fp; /* file to print PDF on */ typedef struct { FONT_NUM gs_font; /* font number of this state */ BOOLEAN gs_baselinemark; /* TRUE if baseline mark */ COLOUR_NUM gs_colour; /* colour number of this state */ TEXTURE_NUM gs_texture; /* texture number of this state */ BOOLEAN gs_cpexists; /* TRUE if a current point exists */ FULL_LENGTH gs_currenty; /* if cpexists, its y coordinate */ short gs_xheight2; /* of font exists, half xheight */ } GRAPHICS_STATE; static GRAPHICS_STATE gs_stack[MAX_GS];/* graphics state stack */ static int gs_stack_top; /* top of graphics state stack */ static FONT_NUM currentfont; /* font of most recent atom */ static BOOLEAN currentbaselinemark; /* baseline mark in use */ static COLOUR_NUM currentcolour; /* colour of most recent atom */ static TEXTURE_NUM currenttexture; /* texture of most recent atom */ static short currentxheight2;/* half xheight in current font */ static BOOLEAN cpexists; /* true if a current point exists */ static FULL_LENGTH currenty; /* if cpexists, its y coordinate */ static int wordcount; /* atoms printed since last newline */ static int pagecount; /* total number of pages printed */ static BOOLEAN prologue_done; /* TRUE after prologue is printed */ static OBJECT needs; /* Resource needs of included EPSFs */ static OBJECT supplied; /* Resources supplied by this file */ /*****************************************************************************/ /* */ /* Print a number x on file fp. */ /* */ /*****************************************************************************/ #define printnum(x, fp) \ { char buff[20]; register int i, y; \ if( x >= 0 ) y = x; \ else { y = -x; putc(CH_MINUS, fp); } \ i = 0; \ do { buff[i++] = numtodigitchar(y % 10); \ } while( (y = (y / 10)) > 0 ); \ do { --i; putc(buff[i], fp); \ } while( i ); \ } /*****************************************************************************/ /* */ /* void PDF_PrintInitialize(FILE *fp, BOOLEAN enc) */ /* */ /* Initialize this module; fp is the output file. */ /* */ /*****************************************************************************/ static void PDF_PrintInitialize(FILE *fp, BOOLEAN enc) { debug0(DPF, DD, "PDF_PrintInitialize(fp)"); assert(!enc, "PDF_PrintInitialize"); out_fp = fp; prologue_done = FALSE; gs_stack_top = -1; currentfont = NO_FONT; currentbaselinemark = FALSE; currentcolour = NO_COLOUR; currentcolour = NO_TEXTURE; cpexists = FALSE; wordcount = pagecount = 0; New(needs, ACAT); New(supplied, ACAT); debug0(DPF, DD, "PDF_PrintInitialize returning."); } /* end PDF_PrintInitialize */ /*****************************************************************************/ /* */ /* void PDF_PrintLength(FULL_CHAR *buff, int length, int length_dim) */ /* */ /* Print a length (debugging only) */ /* */ /*****************************************************************************/ static void PDF_PrintLength(FULL_CHAR *buff, int length, int length_dim) { sprintf( (char *) buff, "%.3fc", (float) length/CM); } /*****************************************************************************/ /* */ /* void PDF_PrintPageSetupForFont(OBJECT face, int font_curr_page, */ /* FULL_CHAR *font_name, FULL_CHAR *first_size_str) */ /* */ /* Print the page setup commands required to use a font on some page: */ /* */ /* face The font face record, defining which font we need */ /* font_curr_page The current page number */ /* fp The file to print the command(s) on */ /* font_name The name of the font */ /* first_size_str No idea, have to check */ /* */ /*****************************************************************************/ static void PDF_PrintPageSetupForFont(OBJECT face, int font_curr_page, FULL_CHAR *font_name, FULL_CHAR *first_size_str) { FULL_CHAR *enc = NULL; fprintf(out_fp, "%%%%IncludeResource: font %s%s", font_name, STR_NEWLINE); /*** PDFFont_AddFont(out_fp, first_size_str, font_name, MapEncodingName(font_mapping(face))); ***/ if (font_recoded(face)) { MAPPING m = font_mapping(face); /* This is a NASTY hack. Need to rework the interface Since PDF is random-access format - we don't care which page this encoding is for and we need to only print it once -- Uwe */ MapEnsurePrinted(m, 1); enc = MapEncodingName(m); } PDFFont_AddFont(out_fp, first_size_str, font_name, enc); } /* end PDF_PrintPageSetupForFont */ /*****************************************************************************/ /* */ /* PDF_PrintPageResourceForFont(FULL_CHAR *font_name, BOOLEAN first) */ /* */ /* Print page resource info on file fp for font font_name; first is true */ /* if this is the first resource on this page. */ /* */ /*****************************************************************************/ static void PDF_PrintPageResourceForFont(FULL_CHAR *font_name, BOOLEAN first) { /* JK: this was always commented out */ /* PDFWriteFontResource(out_fp, font_name); */ } /* end PDF_PrintPageResourceForFont */ /*****************************************************************************/ /* */ /* static void PDF_PrintMapping(MAPPING m) */ /* */ /* Print mapping m. */ /* */ /*****************************************************************************/ static void PDF_PrintMapping(MAPPING m) { MAP_VEC map = MapTable[m]; int i; PDFFile_BeginFontEncoding(out_fp, (char*) string(map->name)); for( i = 0; i < MAX_CHARS; i++ ) fprintf(out_fp, "/%s%s", string(map->vector[i]), (i+1)%8 != 0 ? STR_SPACE : STR_NEWLINE); PDFFile_EndFontEncoding(out_fp); } /* end PDF_PrintMapping */ /*****************************************************************************/ /* */ /* PDF_PrintBeforeFirstPage(h, v, label) */ /* */ /* This procedure is called just before starting to print the first */ /* component of the output. Its size is h, v, and label is the page */ /* label to attach to the %%Page comment. */ /* */ /*****************************************************************************/ static void PDF_PrintBeforeFirstPage(FULL_LENGTH h, FULL_LENGTH v, FULL_CHAR *label) { debug2(DPF, DD, "PrintBeforeFirst(%d, %d)", h, v); PDFFile_Init(out_fp, h/PT, v/PT, IN, CM, PT, EM); FontPrintPageSetup(out_fp); PDFPage_Init(out_fp, 1.0 / PT, PT/2); FontPrintPageResources(out_fp); /* write out font objects */ FontAdvanceCurrentPage(); prologue_done = TRUE; } /* end PDF_PrintBeforeFirstPage */ /*****************************************************************************/ /* */ /* PDF_PrintBetweenPages(h, v, label) */ /* */ /* Start a new output component, of size h by v; label is the page label */ /* to attach to the %%Page comment. */ /* */ /*****************************************************************************/ static void PDF_PrintBetweenPages(FULL_LENGTH h, FULL_LENGTH v, FULL_CHAR *label) { debug2(DPF, DD, "PrintBetween(%d, %d)", h, v); /* write out page objects */ PDFPage_Cleanup(out_fp); PDFPage_Init(out_fp, 1.0 / PT, PT/2); /* write out font objects */ FontPrintPageResources(out_fp); FontPrintPageSetup(out_fp); FontAdvanceCurrentPage(); } /* end PDF_PrintBetweenPages */ /*****************************************************************************/ /* */ /* static void PrintComposite(COMPOSITE *cp, BOOLEAN outline, FILE *fp) */ /* */ /* This routine is unused in this module because it is the PostScript */ /* version and no PDF version has been written so far. JeffK 2/5/00. */ /* */ /* Print composite character cp, assuming that the current point is */ /* set to the correct origin. If outline is true, we want to print the */ /* composite character in outline. */ /* */ /*****************************************************************************/ static void PrintComposite(COMPOSITE *cp, BOOLEAN outline, FILE *fp) { debug1(DPF, D, "PrintComposite(cp, %s, fp)", bool(outline)); while( cp->char_code != '\0' ) { debug4(DPF, D, " cp = %d printing code %d (%d, %d)", (int) cp, cp->char_code, cp->x_offset, cp->y_offset); fprintf(fp, "%d %d (%c)%s ", cp->x_offset, cp->y_offset, cp->char_code, outline ? "co" : "c"); cp++; } } /* end PrintComposite */ /*****************************************************************************/ /* */ /* PDF_PrintWord(x, hpos, vpos) */ /* */ /* Print non-empty word x; its marks cross at the point (hpos, vpos). */ /* */ /*****************************************************************************/ static void PDF_PrintWord(OBJECT x, int hpos, int vpos) { FULL_CHAR *p, *q, *a, *b, *lig, *unacc; int ksize; char *command; MAPPING m; /* *** currently unused unsigned short *composite; COMPOSITE *cmp; *** */ static int last_hpos; /* does not need to be initialised */ static int next_hpos = -1; #if 0 struct metrics *fnt; #endif debug6(DPF, DD, "PrintWord( %s, %d, %d ) font %d colour %d%s", string(x), hpos, vpos, word_font(x), word_colour(x), word_outline(x) ? " outline" : ""); TotalWordCount++; /* if baselinemark is different to previous word then record change */ if( word_baselinemark(x) != currentbaselinemark ) { currentbaselinemark = word_baselinemark(x); currentxheight2 = currentbaselinemark ? 0 : FontHalfXHeight(currentfont); } /* if font is different to previous word then print change */ if( word_font(x) != currentfont ) { currentfont = word_font(x); currentxheight2 = currentbaselinemark ? 0 : FontHalfXHeight(currentfont); PDFFont_Set(out_fp, FontSize(currentfont, x), FontName(currentfont)); } /* PDF textures not implemented */ /* if colour is different to previous word then print change */ if( word_colour(x) != currentcolour ) { currentcolour = word_colour(x); if( currentcolour > 0 ) { char str[256]; sprintf(str, "%s ", ColourCommand(currentcolour)); PDFPage_Write(out_fp, str); } } /* PDF textures not implemented */ /* move to coordinate of x */ debug1(DPF, DDD, " currentxheight2 = %d", currentxheight2); vpos = vpos - currentxheight2; if( cpexists && (currenty == vpos) && PDFHasValidTextMatrix() ) { /* printnum(hpos, out_fp); */ command = "s"; /* Note: I calculate the width of the space char here in case the font has changed. This prevents subtle spacing errors. */ #if 0 fnt = finfo[currentfont].size_table; if( (next_hpos + fnt[' '].right /* width of space char */ ) == hpos ) command = " "; #endif } else { currenty = vpos; /* printnum(hpos, out_fp); fputs(" ", out_fp); printnum(currenty, out_fp); */ command = "m"; cpexists = TRUE; } /* convert ligature sequences into ligature characters */ lig = finfo[word_font(x)].lig_table; p = q = string(x); do { /* check for missing glyph (lig[] == 1) or ligatures (lig[] > 1) */ if( lig[*q++ = *p++] ) { if( lig[*(q-1)] == 1 || !word_ligatures(x) ) continue; else { a = &lig[ lig[*(p-1)] + MAX_CHARS ]; while( *a++ == *(p-1) ) { b = p; while( *a == *b && *(a+1) != '\0' && *b != '\0' ) a++, b++; if( *(a+1) == '\0' ) { *(q-1) = *a; p = b; break; } else { while( *++a ); a++; } } } } } while( *p ); *q = '\0'; switch (command[0]) { case 'm': PDFText_OpenXY(out_fp, hpos, vpos); last_hpos = hpos; next_hpos = hpos + fwd(x, COLM); /* fwd(x, COLM) = width of wd */ break; case 's': #if 0 PDFText_Open(out_fp); PDFText_Kern(out_fp, hpos - next_hpos); #else PDFText_OpenX(out_fp, hpos - last_hpos); #endif last_hpos = hpos; next_hpos = hpos + fwd(x, COLM); /* fwd(x, COLM) = width of wd */ break; #if 0 case ' ': PDFText_Open(out_fp); #if 1 /* try kerning to get correct position */ PDFText_Kern(out_fp, fnt[' '].right); #else PDFPage_Write(out_fp, EightBitToPrintForm[' ']); #endif next_hpos += fwd(x, COLM) + fnt[' '].right; /* width of space ch */ break; #endif } p = string(x); PDFPage_Write(out_fp, EightBitToPrintForm[*p]); m = font_mapping(finfo[word_font(x)].font_table); unacc = MapTable[m]->map[MAP_UNACCENTED]; /* acc = MapTable[m]->map[MAP_ACCENT]; */ for( p++; *p; p++ ) { /* *** this seems right but is actually wrong for PDF, which according to Uwe uses original units for kerning ksize = FontKernLength(word_font(x), unacc, *(p-1), *p); *** */ ksize = FontKernLength(font_num(finfo[word_font(x)].original_face), unacc, *(p-1), *p); if ( ksize != 0 ) { PDFText_Kern(out_fp, ksize); } PDFPage_Write(out_fp, EightBitToPrintForm[*p]); } PDFText_Close(out_fp); debug0(DPF, DDD, "PDF_PrintWord returning"); } /* end PDF_PrintWord */ /*****************************************************************************/ /* */ /* PDF_PrintPlainGraphic(OBJECT x, FULL_LENGTH xmk, ymk, OBJECT z) */ /* */ /* Print a plain graphic object */ /* */ /*****************************************************************************/ static void PDF_PrintPlainGraphic(OBJECT x, FULL_LENGTH xmk, FULL_LENGTH ymk, OBJECT z) { assert(FALSE, "PDF_PrintPlainGraphic: this routine should never be called!"); } /* end PDF_PrintPlainGraphic */ /*****************************************************************************/ /* */ /* PDF_PrintUnderline(fnum, col, xstart, xstop, ymk) */ /* */ /* Draw an underline suitable for font fnum, in colour col from xstart to */ /* xstop at the appropriate distance below mark ymk. */ /* */ /*****************************************************************************/ static void PDF_PrintUnderline(FONT_NUM fnum, COLOUR_NUM col, TEXTURE_NUM pat, FULL_LENGTH xstart, FULL_LENGTH xstop, FULL_LENGTH ymk) { debug5(DPF, DD, "PDF_PrintUnderline(ft %d, co %d, xstrt %s, xstp %s, ymk %s)", fnum, col, EchoLength(xstart), EchoLength(xstop), EchoLength(ymk)); PDFPage_PrintUnderline(out_fp, xstart, xstop, ymk - finfo[fnum].underline_pos, finfo[fnum].underline_thick); debug0(DPF, DD, "PrintUnderline returning."); } /* end PDF_PrintUnderline */ /*****************************************************************************/ /* */ /* PDF_PrintAfterLastPage() */ /* */ /* Clean up this module and close output stream. */ /* */ /*****************************************************************************/ void PDF_PrintAfterLastPage(void) { if( prologue_done ) { PDFPage_Cleanup(out_fp); /* write out page objects */ /* MapPrintResources(out_fp); not needed */ PDFFile_Cleanup(out_fp); } } /* end PDF_PrintAfterLastPage */ /*****************************************************************************/ /* */ /* PDF_CoordTranslate(xdist, ydist) */ /* */ /* Translate coordinate system by the given x and y distances. */ /* */ /*****************************************************************************/ static void PDF_CoordTranslate(FULL_LENGTH xdist, FULL_LENGTH ydist) { debug2(DPF, D, "CoordTranslate(%s, %s)", EchoLength(xdist), EchoLength(ydist)); if ((xdist != 0) || (ydist != 0)) { #if 1 PDFPage_Translate(out_fp, xdist, ydist); #else char temp_str[64]; sprintf(temp_str, "1 0 0 1 %d %d cm%s", xdist, ydist, STR_NEWLINE); PDFPage_Write(out_fp, temp_str); #endif } cpexists = FALSE; debug0(DPF, D, "PDF_CoordTranslate returning."); } /* end PDF_CoordTranslate */ /*****************************************************************************/ /* */ /* PDF_CoordRotate(amount) */ /* */ /* Rotate coordinate system by given amount (in internal DG units) */ /* */ /*****************************************************************************/ static void PDF_CoordRotate(FULL_LENGTH amount) { int theAmount; debug1(DPF, D, "PDF_CoordRotate(%.1f degrees)", (float) amount / DG); theAmount = ((amount / DG) % 360); if( theAmount != 0 ) PDFPage_Rotate(out_fp, (double) theAmount * (double) M_PI / (double) 180.0); cpexists = FALSE; debug0(DPF, D, "CoordRotate returning."); } /* end PDF_CoordRotate */ /*****************************************************************************/ /* */ /* PDF_CoordScale(ratio, dim) */ /* */ /* Scale coordinate system by ratio in the given dimension. */ /* */ /*****************************************************************************/ static void PDF_CoordScale(float hfactor, float vfactor) { #if DEBUG_ON char buff[20]; #endif ifdebug(DPF, D, sprintf(buff, "%.3f, %.3f", hfactor, vfactor)); debug1(DPF, D, "CoordScale(%s)", buff); if ( (fabs(hfactor - 1.0) > 0.01) || (fabs(vfactor - 1.0) > 0.01) ) { #if 1 PDFPage_Scale(out_fp, hfactor, vfactor); #else char temp_str[64]; sprintf(temp_str, "%.2f 0 0 %.2f 0 0 cm%s", hfactor, vfactor, STR_NEWLINE); PDFPage_Write(out_fp, temp_str); #endif } cpexists = FALSE; debug0(DPF, D, "CoordScale returning."); } /* end PDF_CoordScale */ /*****************************************************************************/ /* */ /* PDF_SaveGraphicState(x) */ /* */ /* Save current coord system on stack for later restoration. */ /* Object x is just for error reporting, not really used at all. */ /* */ /*****************************************************************************/ void PDF_SaveGraphicState(OBJECT x) { debug0(DPF, D, "PDF_SaveGraphicState()"); PDFPage_Push(out_fp); gs_stack_top++; if( gs_stack_top >= MAX_GS ) Error(50, 1, "rotations, graphics etc. too deeply nested (max is %d)", FATAL, &fpos(x), MAX_GS); gs_stack[gs_stack_top].gs_font = currentfont; gs_stack[gs_stack_top].gs_baselinemark = currentbaselinemark; gs_stack[gs_stack_top].gs_colour = currentcolour; gs_stack[gs_stack_top].gs_texture = currenttexture; gs_stack[gs_stack_top].gs_cpexists = cpexists; gs_stack[gs_stack_top].gs_currenty = currenty; gs_stack[gs_stack_top].gs_xheight2 = currentxheight2; debug0(DPF, D, "PDF_SaveGraphicState returning."); } /* end PDF_SaveGraphicState */ /*****************************************************************************/ /* */ /* PDF_RestoreGraphicState() */ /* */ /* Restore previously saved coordinate system. */ /* */ /* The following note probably only applies to the PostScript back end */ /* but I have not looked into this issue myself: */ /* */ /* NB we normally assume that */ /* no white space is needed before any item of output, but since this */ /* procedure is sometimes called immediately after PrintGraphicObject(), */ /* which does not append a concluding space, we prepend one here. */ /* */ /*****************************************************************************/ void PDF_RestoreGraphicState(void) { debug0(DPF, D, "PDF_RestoreGraphicState()"); PDFPage_Pop(out_fp); currentfont = gs_stack[gs_stack_top].gs_font; currentbaselinemark = gs_stack[gs_stack_top].gs_baselinemark; currentcolour = gs_stack[gs_stack_top].gs_colour; currenttexture = gs_stack[gs_stack_top].gs_texture; cpexists = gs_stack[gs_stack_top].gs_cpexists; currenty = gs_stack[gs_stack_top].gs_currenty; currentxheight2 = gs_stack[gs_stack_top].gs_xheight2; gs_stack_top--; debug0(DPF, D, "PDF_RestoreGraphicState returning."); } /* end PDF_RestoreGraphicState */ /*****************************************************************************/ /* */ /* PDF_PrintGraphicObject(x) */ /* */ /* Print object x on out_fp */ /* */ /*****************************************************************************/ void PDF_PrintGraphicObject(OBJECT x) { OBJECT y, link; debug3(DPF, D, "PDF_PrintGraphicObject(%s %s %s)", EchoFilePos(&fpos(x)), Image(type(x)), EchoObject(x)); switch( type(x) ) { case WORD: case QWORD: PDFPage_WriteGraphic(out_fp, string(x)); break; case ACAT: for( link = Down(x); link != x; link = NextDown(link) ) { Child(y, link); if( type(y) == GAP_OBJ ) { if( vspace(y) > 0 ) PDFPage_Write(out_fp, (char *) STR_NEWLINE); else if( hspace(y) > 0 ) PDFPage_Write(out_fp, " "); } else if( is_word(type(y)) || type(y) == ACAT ) PDF_PrintGraphicObject(y); else if( type(y) == WIDE || is_index(type(y)) ) { /* ignore: @Wide, indexes are sometimes inserted by Manifest */ } else { Error(50, 2, "error in left parameter of %s", WARN, &fpos(x), KW_GRAPHIC); debug1(DPF, D, " type(y) = %s, y =", Image(type(y))); ifdebug(DPF, D, DebugObject(y)); } } break; default: Error(50, 3, "error in left parameter of %s", WARN, &fpos(x), KW_GRAPHIC); debug1(DPF, D, " type(x) = %s, x =", Image(type(x))); ifdebug(DPF, D, DebugObject(x)); break; } debug0(DPF, D, "PDF_PrintGraphicObject returning"); } /* end PDF_PrintGraphicObject */ /*****************************************************************************/ /* */ /* PDF_DefineGraphicNames(x) */ /* */ /* Generate PostScript for xsize, ysize etc. names of graphic object. */ /* */ /*****************************************************************************/ void PDF_DefineGraphicNames(OBJECT x) { assert( type(x) == GRAPHIC, "PrintGraphic: type(x) != GRAPHIC!" ); debug1(DPF, D, "DefineGraphicNames( %s )", EchoObject(x)); debug1(DPF, DD, " style = %s", EchoStyle(&save_style(x))); /* if baselinemark is different to previous word then record change */ if( baselinemark(save_style(x)) != currentbaselinemark ) { currentbaselinemark = baselinemark(save_style(x)); currentxheight2 = currentbaselinemark ? 0 : FontHalfXHeight(currentfont); } /* if font is different to previous word then print change */ if( font(save_style(x)) != currentfont ) { currentfont = font(save_style(x)); if( currentfont > 0 ) { currentxheight2 = currentbaselinemark ? 0 : FontHalfXHeight(currentfont); PDFFont_Set(out_fp, FontSize(currentfont, x), FontName(currentfont)); } } /* PDF textures not implemented */ /* if colour is different to previous word then print change */ if( colour(save_style(x)) != currentcolour ) { currentcolour = colour(save_style(x)); if( currentcolour > 0 ) { char str[256]; sprintf(str, "%s ", ColourCommand(currentcolour)); PDFPage_Write(out_fp, str); } } PDFPage_SetVars(size(x, COLM), size(x, ROWM), back(x, COLM), fwd(x, ROWM), currentfont <= 0 ? 12*PT : FontSize(currentfont, x), width(line_gap(save_style(x))), width(space_gap(save_style(x)))); debug0(DPF, D, "PDF_DefineGraphicNames returning."); } /* end PDF_DefineGraphicNames */ /*****************************************************************************/ /* */ /* PDF_SaveTranslateDefineSave(x, xdist, ydist) */ /* */ /* Equivalent to the sequence of calls */ /* */ /* SaveGraphicState(x) */ /* CoordTranslate(xdist, ydist) */ /* DefineGraphicNames(x) */ /* SaveGraphicState(x) */ /* */ /* but offers prospects for optimization (not taken up in PDF). */ /* */ /*****************************************************************************/ void PDF_SaveTranslateDefineSave(OBJECT x, FULL_LENGTH xdist, FULL_LENGTH ydist) { PDF_SaveGraphicState(x); PDF_CoordTranslate(xdist, ydist); PDF_DefineGraphicNames(x); PDF_SaveGraphicState(x); } /* end PDF_SaveTranslateDefineSave */ /*****************************************************************************/ /* */ /* PDF_PrintGraphicInclude(x, colmark, rowmark) */ /* */ /* Print graphic include file, with appropriate surrounds. */ /* */ /*****************************************************************************/ void PDF_PrintGraphicInclude(OBJECT x, FULL_LENGTH colmark, FULL_LENGTH rowmark) { OBJECT y; debug0(DPF, D, "PDF_PrintGraphicInclude(x)"); Child(y, Down(x)); Error(50, 4, "cannot include EPS file in PDF output; EPS file %s ignored", WARN, &fpos(x), string(y)); debug0(DPF, D, "PDF_PrintGraphicInclude returning."); } /* end PDF_PrintGraphicInclude */ /*****************************************************************************/ /* */ /* PDF_LinkSource(name, llx, lly, urx, ury) */ /* */ /* Print a link source point. */ /* */ /*****************************************************************************/ static void PDF_LinkSource(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) { debug5(DPF, D, "PDF_LinkSource(%s, %d, %d, %d, %d)", EchoObject(name), llx, lly, urx, ury); /* still to do */ debug0(DPF, D, "PDF_LinkSource returning."); } /* end PDF_LinkSource */ /*****************************************************************************/ /* */ /* PDF_LinkDest(name, llx, lly, urx, ury) */ /* */ /* Print a link dest point. */ /* */ /* Still to do: check that the name has not been used by a previous */ /* dest point. */ /* */ /*****************************************************************************/ static void PDF_LinkDest(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) { debug5(DPF, D, "PDF_LinkDest(%s, %d, %d, %d, %d)", EchoObject(name), llx, lly, urx, ury); /* still to do */ debug0(DPF, D, "PDF_LinkDest returning."); } /* end PDF_LinkDest */ /*****************************************************************************/ /* */ /* PDF_LinkURL(url, llx, lly, urx, ury) */ /* */ /* Print a URL link. */ /* */ /*****************************************************************************/ static void PDF_LinkURL(OBJECT url, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury) { debug5(DPF, D, "PDF_LinkURL(%s, %d, %d, %d, %d)", EchoObject(url), llx, lly, urx, ury); /* still to do */ debug0(DPF, D, "PDF_LinkURL returning."); } /* end PDF_LinkURL */ /*****************************************************************************/ /* */ /* PDF_LinkCheck(void) */ /* */ /* Called at end of run; will check that for every link source point there */ /* is a link dest point. */ /* */ /*****************************************************************************/ static void PDF_LinkCheck(void) { debug0(DPF, D, "PDF_LinkCheck()"); /* still to do */ debug0(DPF, D, "PDF_LinkCheck returning."); } /* end PDF_LinkCheck */ /*****************************************************************************/ /* */ /* PDF_BackEnd */ /* */ /* The record into which all of these functions are packaged. */ /* */ /*****************************************************************************/ static struct back_end_rec pdf_back = { PDF, /* the code number of the back end */ STR_PDF, /* string name of the back end */ TRUE, /* TRUE if @Scale is available */ TRUE, /* TRUE if @Rotate is available */ FALSE, /* TRUE if @VMirror, @HMirror avail. */ TRUE, /* TRUE if @Graphic is available */ TRUE, /* TRUE if @IncludeGraphic is avail. */ FALSE, /* TRUE if @PlainGraphic is avail. */ TRUE, /* TRUE if fractional spacing avail. */ TRUE, /* TRUE if actual font metrics used */ TRUE, /* TRUE if colour is available */ PDF_PrintInitialize, PDF_PrintLength, PDF_PrintPageSetupForFont, PDF_PrintPageResourceForFont, PDF_PrintMapping, PDF_PrintBeforeFirstPage, PDF_PrintBetweenPages, PDF_PrintAfterLastPage, PDF_PrintWord, PDF_PrintPlainGraphic, PDF_PrintUnderline, PDF_CoordTranslate, PDF_CoordRotate, PDF_CoordScale, NULL, NULL, PDF_SaveGraphicState, PDF_RestoreGraphicState, PDF_PrintGraphicObject, PDF_DefineGraphicNames, PDF_SaveTranslateDefineSave, PDF_PrintGraphicInclude, PDF_LinkSource, PDF_LinkDest, PDF_LinkURL, PDF_LinkCheck, }; BACK_END PDF_BackEnd = &pdf_back; lout-3.39/old_maillist0000644000076400007640000000114111442521530013442 0ustar jeffjeffThe Lout mailing list [this information is OBSOLETE] A public mailing list has been set up for discussion of the Lout document formatting system. Thanks to Rodrigo Vanegas of Brown University for starting this list, to Valeriy E. Ushakov for maintaining it for some years, and to the current maintainer, Greg Woods. To subscribe to the list or unsubscribe, visit http://lists.planix.com/mailman/options.cgi/lout-users/ To post a message (only subscribers can do this), send email to Lout Users Mailing List It will be forwarded by email to all current subscribers. lout-3.39/doc/0000700000076400007640000000000011446017136011607 5ustar jeffjefflout-3.39/doc/design/0000700000076400007640000000000011446021666013063 5ustar jeffjefflout-3.39/doc/design/s6_20000644000076400007640000001074311363700677013602 0ustar jeffjeff@SubSection @Tag { cross.impl } @Title { Implementation of cross references } @Begin @PP Before an object can be sized and printed, the values of any cross references within it must be known. If they refer to invocations that have not yet been read, there is a problem. Scribe [7] solves it by capitalizing on the fact that documents are formatted repeatedly during the drafting process. All tagged invocations are copied to an auxiliary file during the first run, and indexed for quick retrieval on the second. A new auxiliary file is written during the second run, for retrieval on the third, and so on. Cross references always lag one run behind the rest of the document; a perfect copy may be produced by formatting the same version twice, except in a few pathological cases that fail to converge. @PP Cross referencing in Lout is implemented on top of a simple database system. Each database is either writable or readable but not both at once, and holds a set of key-value entries: the keys are @S ASCII strings, and the values are Lout objects, possibly with environments, written in Lout source. Operations are provided for writing an entry, converting from writable to readable, retrieval by key, and sequential retrieval in key order. @PP The implementation, which is quite unsophisticated, employs one or more @S ASCII {@I{ database files}}, containing the values, and one @S ASCII {@I{ index file}} per database, containing the keys. To write an entry, the value is first appended to a database file, then a line like @ID @Code "@Chapter&&intro ch1.ld 57" is appended to the index file, giving the file and offset where the value is stored. To convert from writable to readable, the index file is sorted. Then retrieval by key requires a binary search of the index file and one seek into a database file, and sequential retrieval by key is trivial. @PP This database system is used in several ways. For an external database, say of bibliographic references, the user creates the database file of values (without environments), Lout creates the index file whenever it cannot find one, and retrievals by key proceed as usual. Cross references with tags other than @Code preceding and @Code following are treated as described above, by writing all tagged invocations (with environments) to a single database, which is converted to readable at the end of the run for retrievals on the next run. Sorted galleys, such as index entries, are written out indexed by target and key and retrieved sequentially on the next run. Unsorted galleys with preceding targets which pop off the top of the root galley without finding a target, such as entries in tables of contents, are treated similarly, except that they are indexed by target and a sequence number that preserves their relative order during the sort. @PP When Lout processes a multi-file document, one cross reference database file is written for each input file, but they share a common index file. At end of run, the new index file is sorted and merged with the old one in such a way as to preserve entries relating to files not read on the current run. This provides some support for piecemeal formatting, but eventually the files must all be formatted together. @PP When a @Code preceding or @Code following cross reference is found, it is attached to a galley index of type @Eq { CROSS_PREC } or {@Eq { CROSS_FOLL }}, together with an automatically generated tag composed of the current file name and a sequence number. When a tagged invocation is found, it is attached to a @Eq { CROSS_TARG } index. These galley indexes are carried along through the dynamic tree, and eventually pop off the top of the root galley, at which point it is easy to determine which cross references refer to which invocations, since the indexes are now in final printed document order. Each referenced invocation is then written to the cross reference database, multiply indexed by the generated tags of the associated cross references. On the next run, when the same @Code preceding and @Code following cross references are found, chances are good that the same tags will be generated, and the appropriate values can be retrieved from the database immediately. @PP This approach was the genesis of the @Code "@Tagged" operator, whose implementation is now immediate: for each @Code "@Tagged" operator we produce one @Eq { CROSS_PREC } or @Eq { CROSS_FOLL } galley index, replacing the generated tag with the right parameter of the @Code "@Tagged" operator. Nothing more is required. @End @SubSection lout-3.39/doc/design/s7_00000644000076400007640000000746711363700677013612 0ustar jeffjeff@Section @Title { Conclusion } @Begin @PP Since its public release in October 1991, the Basser Lout interpreter has been ported without incident to a wide variety of Unix systems and hardware. It was tested extensively before release on its own documentation, and the few minor bugs which have emerged since then have all been fixed in the second release, scheduled to appear in mid-1992. @PP Seven substantial packages of definitions are distributed with Basser Lout. The DocumentLayout package, and its variants ReportLayout and BookLayout, provide the standard features that all documents require: pages, columns, paragraphs, headings, footnotes, floating figures and tables, chapters and sections, displays and lists, access to bibliographic databases, cross references, and so on [11]. The BookLayout package has extra features needed by books, including an automatically generated table of contents, Roman page numbers for the prefatory material, running page headers, odd and even page layouts, and a sorted index. The Eq package formats equations, and Pas formats Pascal programs [10]; Tab formats tables [12]; and Fig draws figures [6]. @PP The non-expert user who uses these packages perceives a system of a standard quite similar to other fully developed batch formatters, although the interface is considerably more coherent than, say, the troff family's [8]. The expert user perceives a system which is radically different from previous ones, in which a great deal can be achieved very quickly. To take an extreme example, Pas was designed, implemented, tested, and documented in one afternoon. Eq took about a week, but most of that time was spent in marshalling the vast repertoire of mathematical symbols, and fine-tuning the spacing. Most of the effort seems to go into designing a good interface; most symbols are implemented in just one or a few lines of Lout. @PP A group of about 20 satisfied non-expert users has grown up within the author's department, mainly Honours students with no investment in older systems to hold them back. Basser Lout has been advertised on the Internet news as available via anonymous {@I ftp}, so the extent of its outside user community is hard to gauge. About 50 people have mailed comments or questions to the author; many of these people have ported the program, written small definitions, and modified the standard packages. @PP Future work could usefully begin with the improvements suggested in this paper: overlapping spanning columns, better semantics for available space, and especially horizontal galleys. Support for non-European languages is also needed. However, the main task is the development of an interactive document editor based on Lout. A structure editor similar to Lilac [13], which already has objects and user-defined symbols, is envisaged; since cross references are easy when the whole document is available, the only major new problem is the treatment of galleys, including the expansion and retraction of receptive symbols. @LP @LP @B { Note. } Since the above was written the author has completed a revised version of Basser Lout, in which the problem concerning available space mentioned in Section {@NumberOf style} has been resolved. @LP @LP @B { Acknowledgment. } The author gratefully acknowledges many valuable discussions with Douglas W. Jones, especially during the development of the galley abstraction; and also many helpful comments on presentation by the anonymous referee. @DP @DP @Heading { References } @NumberedList @LI @RefPrint kingston91 @LI @RefPrint kingston91over @LI @RefPrint kingston91basser @LI @RefPrint furuta82 @LI @RefPrint kernighan75 @LI @RefPrint kingston91fig @LI @RefPrint reid80 @LI @RefPrint ossanna76 @LI @RefPrint knuth84 @LI @RefPrint kingston91eq @LI @RefPrint kingston91begin @LI @RefPrint kingston91tab @LI @RefPrint brooks91 @EndList @End @Section lout-3.39/doc/design/s2_40000644000076400007640000002760011363700677013600 0ustar jeffjeff@SubSection @Tag { objects.impl } @Title { Implementation of objects and concatenation } @Begin @PP In this section we discuss the implementation of objects and concatenation, and especially mark alignment. The first step is to use an operator precedence parser to convert input such as @ID @Code "a |0.5i b /0.2i c | d" into parse trees such as @ID @Eq { @Fig { @Tree { @Node @FCircle fraction @FirstSub { @Node @FCircle bar @FirstSub { @Node @FCircle a } @NextSub { @Node @FEllipse 0.5i } @NextSub { @Node @FCircle b } } @NextSub { @Node @FEllipse 0.2i } @NextSub { @Node @FCircle bar @FirstSub { @Node @FCircle c } @NextSub { @Node @FCircle } @NextSub { @Node @FCircle d } } } } } Missing objects are replaced by empty objects, and sequences of concatenation operators are consolidated: @ID @Eq { @Fig { @Tree { @Node @FCircle bar @FirstSub { @Node @FCircle a } @NextSub { @Node @FEllipse 0.2i } @NextSub { @Node @FCircle bar @FirstSub { @Node @FCircle c } @NextSub { @Node @FEllipse 0.3i } @NextSub { @Node @FCircle d } } } } &2m ==> &2m @Fig { @Tree { @Node @FCircle bar @FirstSub { @Node @FCircle a } @NextSub { @Node @FEllipse 0.2i } @NextSub { @Node @FCircle c } @NextSub { @Node @FEllipse 0.3i } @NextSub { @Node @FCircle d } } } } to make manifest their associativity and reduce the depth of the tree for efficiency later. @PP The required semantic information is the size of each subobject, consisting of four integers: width to left and right of the distinguished column mark, and height above and below the distinguished row mark. These numbers are always non-negative in Basser Lout, but this restriction is unnecessary and should be dropped. @PP For the leaves, which are simple words, the numbers are obtained from font tables. For the higher levels we apply recursive rules. Suppose that @Eq { hgap(x, g, y) } returns the desired distance between the column marks of objects @Eq { x } and @Eq { y } when they are separated by gap @Eq { g }: @Eq { right(x) + length(g) + left(y) } when the gap mode is edge-to-edge, the larger of @Eq { length(g) } and @Eq { right(x) + left(y) } when the mode is mark-to-mark, and so on. Given an object @ID @Eq { X = x sub 1 ````` bar g sub 1 ````` ... ````` { "-2p" @Font "^"}bar g sub i-1 ````` x sub i ````` ... ````` bar g sub n-1 ````` x sub n } we may calculate its size as follows: @ID @Eq { left(X) ^= left( x sub 1 ) + hgap( x sub 1 , g sub 1 , x sub 2 ) + ... + hgap( x sub i-1 , g sub i-1 , x sub i ) /1.4vx right(X) ^= hgap( x sub i , g sub i , x sub i+1 ) + ... + hgap( x sub n-1 , g sub n-1 , x sub n ) + right( x sub n ) /1.4vx "above"(X) ^= "above"(x sub 1 ) up ... up "above"(x sub n ) /1.4vx "below"(X) ^= "below"(x sub 1 ) up ... up "below"(x sub n ) } where @Eq { non up } returns the larger of its two parameters. Similar formulas are easily derived for the other operators. @PP For purposes of exposition we will now make the simplifying assumptions that all gaps are {@Code "0i"}, all column marks lie at the left edge, and all row marks lie at the top edge. Then the size of each object can be expressed by just two numbers, width and height, and the four formulas reduce to @ID @Eq { width( x sub 1 rel bar ... rel bar x sub n ) ^= width( x sub 1 ) + ... + width( x sub n ) /1.4vx height( x sub 1 rel bar ... rel bar x sub n ) ^= height( x sub 1 ) up ... up height( x sub n ) } The corresponding formulas for vertical concatenation are @ID @Eq { width( x sub 1 rel "/" ... rel "/" x sub n ) ^= width( x sub 1 ) up ... up width( x sub n ) /1.4vx height( x sub 1 rel "/" ... rel "/" x sub n ) ^= height( x sub 1 ) + ... + height( x sub n ) } According to these formulas, the height of @ID @Eq { @Fig { @Tree { @Node @FCircle fraction @LeftSub { @Node @FCircle bar @LeftSub { @Node @FCircle a } @RightSub { @Node @FCircle b } } @RightSub { @Node @FCircle bar @LeftSub { @Node @FCircle c } @RightSub { @Node @FCircle d } } }}} is @ID @Eq { [ height(a) up height(b)] + [ height(c) up height(d)] } which is correct, but for width they yield @ID @Eq { [ width(a) + width(b)] up [ width(c) + width(d)] } which is not, since it does not take the merging of column marks into account. The asymmetry between horizontal and vertical has come about because the row entries, such as @Eq {a} and {@Eq {b}}, are adjacent in the tree, but the column entries, such as @Eq {a} and {@Eq {c}}, are not. It would be possible to solve this cross-linking problem by augmenting the size information stored in each node to record the number of marks and the size of each, but the author has preferred the following method which makes structural changes to the tree instead. @PP If @Eq { a } and @Eq { c } share a column mark, they each might as well have width { @Eq {width(a) up width(c) }}, since all width calculations apply to entire columns. Accordingly, we introduce a new operator, @Eq {COL}, defined by @ID @Eq { width( x sub 1 bin COL ... bin COL x sub n ) = width( x sub 1 ) up ... up width( x sub n ) } and replace both @Eq { a } and @Eq { c } by {@Eq { a bin COL c }}. To prevent @Eq { COL } operators from disturbing height calculations, we define a binary operator called @Eq { SPLIT } by @ID @Eq { width( x bin SPLIT y) ^= width(x) /1.4vx height( x bin SPLIT y) ^= height(y) } which switches height and width calculations onto different subtrees. Then the transformation @ID @Eq { @Fig { @Tree { @Node @FCircle a }} &2m ==> &2m @Fig { @Tree { @Node @FEllipse SPLIT @LeftSub { @Node @FEllipse COL @LeftSub { @Node @FCircle a } @RightSub { @Node @FCircle c } } @RightSub { @Node @FCircle a } }} } # where @Eq { S } denotes a @Eq { SPLIT } node and @Eq { C } denotes a # @Eq { COL } node, widens @Eq { a } to @Eq {width(a) up width(c) } without affecting its height; it is applied to every object that shares its column mark with at least one other object. A similar transformation involving a @Eq { ROW } operator deals with shared row marks. The effect on our little table is to replace @ID @Eq { @Fig { @Tree { @Node @FCircle fraction @LeftSub { @Node @FCircle bar @LeftSub { @Node @FCircle a } @RightSub { @Node @FCircle b } } @RightSub { @Node @FCircle bar @LeftSub { @Node @FCircle c } @RightSub { @Node @FCircle d } } }}} by @ID @Eq { @Fig maxlabels { "70" } { @Tree hmargin { "0.1c" } { @Node @FCircle fraction @FirstSub { @Node @FCircle bar @FirstSub { @Node @FEllipse SPLIT @FirstSub { @Node @FEllipse COL @FirstSub { @Node @FCircle a } @NextSub { @Node @FCircle c } } @NextSub { @Node @FEllipse ROW @FirstSub { @Node @FCircle a } @NextSub { @Node @FCircle b } } } @NextSub { @Node @FEllipse SPLIT @FirstSub { @Node @FEllipse COL @FirstSub { @Node @FCircle b } @NextSub { @Node @FCircle d } } @NextSub { @Node @FEllipse ROW @FirstSub { @Node @FCircle a } @NextSub { @Node @FCircle b } } } } @NextSub { @Node @FCircle bar @FirstSub { @Node @FEllipse SPLIT @FirstSub { @Node @FEllipse COL @FirstSub { @Node @FCircle a } @NextSub { @Node @FCircle c } } @NextSub { @Node @FEllipse ROW @FirstSub { @Node @FCircle c } @NextSub { @Node @FCircle d } } } @NextSub { @Node @FEllipse SPLIT @FirstSub { @Node @FEllipse COL @FirstSub { @Node @FCircle b } @NextSub { @Node @FCircle d } } @NextSub { @Node @FEllipse ROW @FirstSub { @Node @FCircle c } @NextSub { @Node @FCircle d } } } } }}} In fact, common subexpressions are identified (trivially) and the result is a directed acyclic graph; each affected leaf has two parents, one for width and one for height; and each @Eq { COL } or @Eq { ROW } node has one parent and one child for each object lying on the corresponding mark. The data structure roughly doubles in size, and this occurs only rarely in practice. @PP This method can cope with any legal input, including @ID @OneRow @Code { "{ a // c | d } | { b / e }" "/ { f / i } | { g | h // j }" } which produces overlapping spanning columns: @ID @I @Fig { @FBox margin { 0.2c } width { 1.6c } 1.2f @Font a | @FBox margin { 0.2c } width { 0.6c } 1.2f @Font b | // @FBox margin { 0.2c } width { 0.6c } 1.2f @Font c | @FBox margin { 0.2c } width { 0.6c } 1.2f @Font d | @FBox margin { 0.2c } width { 0.6c } 1.2f @Font e | // @FBox margin { 0.2c } width { 0.6c } 1.2f @Font f | @FBox margin { 0.2c } width { 0.6c } 1.2f @Font g | @FBox margin { 0.2c } width { 0.6c } 1.2f @Font h | // @FBox margin { 0.2c } width { 0.6c } 1.2f @Font i | @FBox margin { 0.2c } width { 1.6c } 1.2f @Font j | } The boxes have been added to clarify the structure. The width of this object is formally @ID @Eq { ((width(a) up (x + y)) + z) up (x + ((y + z) up width(j))) } where @IL @ListItem @Eq { x = width(c) up width(`f`) up width(i) } @ListItem @Eq { y = width(d`) up width(g) } @ListItem @Eq { z = width(b) up width(e) up width(h) } @EL It seems clear that @Eq { y } at least must appear twice in any expression for the width of this object made out of simple addition and maxing operations, showing that an ordinary tree structure is insufficient for overlapping spanning columns. The Basser Lout interpreter actually rejects such structures, owing to the author's doubts about the implementability of @I Constrained and @I AdjustSize (Section {@NumberOf constraints}) on them; but with hindsight this caution was unnecessary. @PP The directed acyclic graph is ordered in the sense that the order of the edges entering and leaving each node matters. The structure is highly dynamic, and traversals both with and against the arrows are required. After a few ad-hoc attempts to extend the usual tree representation had failed, the author developed a representation based on doubly linked lists of records denoting links, whose flexibility more than compensated for the somewhat excessive memory consumption. For example, @ID @Eq { @Fig { A:: @FCircle a |2c |2c B:: @FCircle b /1.5c C:: @FCircle c | D:: @FCircle d // A @JoinFigures arrow { forward } C // A @JoinFigures arrow { forward } D // B @JoinFigures arrow { forward } D }} is represented by @CD @Eq { @Fig maxlabels { "300" } { A:: @DagBox mid { @BlackDot } base { a } |2c |2c |2c |2c B:: @DagBox mid { @BlackDot } base { b } /1c L:: @DagBox top { @BlackDot } mid { @BlackDot } base { LK } | M:: @DagBox top { @BlackDot } mid { @BlackDot } base { LK } | | N:: @DagBox top { @BlackDot } mid { @BlackDot } base { LK } /1c C:: @DagBox top { @BlackDot } base { c } | | D:: @DagBox top { @BlackDot } base { d } // @TVShape nw { A@MID@CTR } ne { A@MID@CTR } sw {L@MID@CTR } se { M@MID@CTR } // @TVShape nw { L@TOP@CTR } ne { L@TOP@CTR } sw {C@TOP@CTR } se { C@TOP@CTR } // @TVShape nw { M@TOP@CTR } ne { N@TOP@CTR } sw {D@TOP@CTR } se { D@TOP@CTR } // @TVShape nw { B@MID@CTR } ne { B@MID@CTR } sw {N@MID@CTR } se { N@MID@CTR } }} where @Eq { LK } tags a record representing a link. The first list in any node contains all the incoming links, the second contains the outgoing ones. The node serves as the header for both lists. The required operations reduce to simple appends, deletes, and traversals of doubly linked lists, all having small constant cost. There is a highly tuned memory allocator, and care is taken to dispose of each node when the last incoming link is deleted, so that there is no need for garbage collection. @PP In normal use the number of nodes at higher levels of the dag is small in comparison with the leaves and their incoming links, so we may estimate the space complexity at about 60 bytes per input word (20 bytes per link, 40 per leaf node). Careful optimization could easily halve this, but since memory is reclaimed after printing each page there is little need. @End @SubSection lout-3.39/doc/design/s2_30000644000076400007640000003113511363700677013575 0ustar jeffjeff@SubSection @Tag { objects } @Title { Basic structural operators } @Begin @PP A programming language may be considered complete when it attains the power of a Turing machine, but no such criterion seems relevant to document formatting. Instead, as the language develops and new applications are attempted, deficiencies are exposed and the operator set is revised to overcome them. @PP Lout has a repertoire of 23 primitive operators (Figure {@NumberOf primitives}), @Figure @Caption { The 23 primitive operators of Lout, in order of increasing precedence. } @Tag { primitives } @Tab vmargin { 0.5vx } @Fmta { @Col @I A ! @Col B } { @Rowa A { object {@Code "/"}gap object } B { Vertical concatenation with mark alignment } @Rowa A { object {@Code "//"}gap object } B { Vertical concatenation with left justification } @Rowa A { object {@Code "|"}gap object } B { Horizontal concatenation with mark alignment } @Rowa A { object {@Code "||"}gap object } B { Horizontal concatenation with top-justification } @Rowa A { object {@Code "&"}gap object } B { Horizontal concatenation within paragraphs } @Rowa A { {@Code "@OneCol"} object } B { Hide all but one column mark of @I object } @Rowa A { {@Code "@OneRow"} object } B { Hide all but one row mark of @I object } @Rowa A { font @Code "@Font" object } B { Render @I object in nominated font } @Rowa A { breakstyle @Code "@Break" object} B { Break paragraphs of @I object in nominated style } @Rowa A { spacestyle @Code "@Space" object } B { Render spaces between words in nominated style } @Rowa A { length {@Code "@Wide"} object } B { Render @I object to width @I length } @Rowa A { length {@Code "@High"} object } B { Render @I object to height @I length } @Rowa A { {@Code "@HExpand"} object} B { Expand horizontal gaps to fill available space } @Rowa A { {@Code "@VExpand"} object} B { Expand vertical gaps to fill available space } @Rowa A { {@Code "@HScale"} object } B { Horizontal geometrical scaling to fill available space } @Rowa A { {@Code "@VScale"} object } B { Vertical geometrical scaling to fill available space } @Rowa A { angle {@Code "@Rotate"} object } B { Rotate @I object by @I angle } @Rowa A { PostScript {@Code "@Graphic"} object } B { Escape to graphics language } @Rowa A { @Code "@Next" object } B { Add 1 to an object denoting a number } @Rowa A { object @Code "@Case" alternatives } B { Select from a set of alternative objects } @Rowa A { identifier @Code "&&" object } B { Cross reference } @Rowa A { cross-reference @Code "@Open" object } B { Retrieve value from cross reference } @Rowa A { cross-reference @Code "@Tagged" object} B { Attach cross referencing tag to object } } which has proven adequate for a wide variety of features, including equations, tables, and page layout, and so seems to be reasonably complete in this pragmatic sense. In this section we introduce the eight concatenation and mark-hiding operators. To them falls the basic task of assembling complex objects from simple ones, and they were the first to be designed and implemented. @PP Many of the operators of Eqn can be viewed as building small tables. A built-up fraction, for example, has one column and three rows (numerator, line, and denominator). Numerous investigations of this kind convinced the author that operators capable of assembling the rows and columns of tables would suffice for building all kinds of objects. @PP The simplest objects are empty objects and literal words like {@Code metempsychosis}, which have one column mark and one row mark: @ID { @ShowMarks metempsychosis } To place two arbitrary objects side by side, we use the infix operator {@Code "|"}, denoting horizontal concatenation. For example, @ID { @Code "USA |0.2i Australia" } produces the object @ID { @ShowMarks USA |0.2i @ShowMarks Australia } The row marks are merged into one, fixing the vertical position of the objects relative to each other; their horizontal separation is determined by the @I gap attached to the operator, in this case 0.2 inches. We think of the gap as part of the operator, although strictly it is a third parameter. It may be omitted, defaulting to {@Code "0i"}. @PP @I {Vertical concatenation} & , denoted by the infix operator {@Code "/"}, is the same apart from the change of direction: @ID { @Code "Australia /0.1i USA" } produces the object @ID { @ShowMarks Australia /0.1i @ShowMarks USA } with column marks merged and a 0.1 inch gap. @PP Consider now what happens when horizontal and vertical are combined: @ID @OneRow @Code { |1m "{" USA |1m "|0.2i" |1m Australia "}" /1vx "/0.1i" | "{" Washington | "|" | Canberra "}" } The two parameters of @Code "/" now have two column marks each, and they will be merged with the corresponding marks in the other parameter, yielding the object @ID @OneRow { @BackEnd @Case { PostScript @Yield { @ShowMarks USA & { 0 ymark moveto xsize 10 pt add ymark lineto [ 3 pt ] 0 setdash stroke } @Graphic {1c @Wide } |0.2i @ShowMarks Australia /0.1i @ShowMarks Washington | @ShowMarks Canberra } PDF @Yield { @ShowMarks USA & { [ __mul(3, __pt) ] 0 d 0 __ymark m __add(__xsize, __mul(10, __pt)) __ymark l S } @Graphic {1c @Wide } |0.2i @ShowMarks Australia /0.1i @ShowMarks Washington | @ShowMarks Canberra } } } The @Code "0.2i" gap separates columns, not individual items in columns, so a gap attached to the second @Code "|" would serve no purpose; any such gap is ignored. If the number of marks to be merged differs, empty columns are added at the right to equalize the number. The four marks protruding from the result are all available for merging with neighbouring marks by other concatenation operators. The precedence of @Code "|" is higher than the precedence of {@Code "/"}, so the braces could be omitted. @PP When lines of text are concatenated, it is conventional to measure their separation from baseline to baseline (mark to mark in Lout), rather than from edge to edge as above. This idea of different reference points for measurement evolved over the years into a system of six @I {gap modes} (Figure {@NumberOf gapmodes}), expressed by appending a letter to the length. For example, @Code "|0.2i" is an abbreviation for {@Code "|0.2ie"}, meaning 0.2 inches measured from edge to edge; @Code "|0.3ix" produces a 0.3 inch gap measured from mark to mark and widened if necessary to prevent overstriking; and @Code "|2.5it" places its right parameter 2.5 inches from the current left margin, irrespective of the position of the left parameter. There is also a choice of eleven units of measurement (inches, centimetres, multiples of the current font size, etc.), the most interesting being the @Code r unit: one @Code r is the column width minus the width of the following object, so that @Code "|1rt" produces sufficient space to right justify the following object, and @Code "|0.5rt" to center it. These features implement spacings needed in practice rather than suggested by theory. They work with all five concatenation operators, horizontal and vertical. @Figure @Tag { gapmodes } @Caption { The six gap modes (@I length is any length). Hyphenation mode has an extra property not shown here. } @Fig { { /2.5vx Edge-to-edge |0.3i {@Code "|"} &1p {@I length} &1p {@Code e} /4.2vx Hyphenation |0.3i {@Code "|"} &1p {@I length} &1p {@Code h} /4.2vx Overstrike |0.3i {@Code "|"} &1p {@I length} &1p {@Code o} /4.2vx Mark-to-mark |0.3i {@Code "|"} &1p {@I length} &1p {@Code x} /4.2vx Kerning |0.3i {@Code "|"} &1p {@I length} &1p {@Code k} /4.2vx Tabulation |0.3i {@Code "|"} &1p {@I length} &1p {@Code t} } ||0.5i @Box margin { 0c } 6c @Wide 14.5c @High 9p @Font { @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 2.2c @Wide 1.4c @High } @Put { @DoubleArrow 1.8c } @At { 2.2c @Wide 1.6c @High } @Put { 1.8c @Wide { &0.5rt @I length } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 2.2c @Wide 1.4c @High } @Put { @DoubleArrow 1.8c } @At { 2.2c @Wide 1.6c @High } @Put { 1.8c @Wide { &0.5rt @I length } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 1.2c @Wide 1.5c @High } @Put { @DoubleArrow 3.3c } @At { 1.2c @Wide 1.7c @High } @Put { 3.3c @Wide { &0.5rt @I length } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 1.2c @Wide 1.5c @High } @Put { @DoubleArrow 3.3c } @At { 1.2c @Wide 1.7c @High } @Put 3.3c @Wide { |0.5rt @Eq { max(length, a+b) } } @At { 1.2c @Wide 0.4c @High } @Put { @DoubleArrow 1.0c } @At { 1.2c @Wide 0.2c @High } @Put { 1.0c @Wide { &0.5rt @I a } } @At { 4c @Wide 0.4c @High } @Put { @DoubleArrow 0.5c } @At { 4c @Wide 0.2c @High } @Put { 0.5c @Wide { &0.5rt @I b } } } //4.5vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 1.2c @Wide 1.5c @High } @Put { @DoubleArrow 3.3c } @At { 1.2c @Wide 1.7c @High } @Put { 3.3c @Wide { |0.5rt @Eq { max(length, a, b) } } } @At { 1.2c @Wide 0.4c @High } @Put { @DoubleArrow 1.0c } @At { 1.2c @Wide 0.2c @High } @Put { 1.0c @Wide { &0.5rt @I a } } @At { 4c @Wide 0.4c @High } @Put { @DoubleArrow 0.5c } @At { 4c @Wide 0.2c @High } @Put { 0.5c @Wide { &0.5rt @I b } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 0.0c @Wide 1.6c @High } @Put { @DoubleArrow 4.0c } @At { 2.8c @Wide 1.8c @High } @Put { @I length } } //5vx @DoubleArrow 6c //0.1c |0.5rt @I { current bound } } } @PP When we construct a built-up fraction, the result has three row marks, but only the second should be visible outside the object: @ID @Eq { @ShowMarks { X over Y } } This is a common problem, and accordingly a @Code "@OneRow" operator was introduced for hiding all but one of the row marks of its parameter. Normally, the first mark is the survivor, but a later mark can be chosen by prefixing @Code "^" to the preceding concatenation operator: @ID @Code "@OneRow { X ^/2p @HLine /2p Y }" has the desired result, where {@Code "2p"} is two points and @Code "@HLine" is an easy combination of Lout's graphics operators. A similar operator, {@Code "@OneCol"}, hides column marks. @PP A variant of @Code "/" called @Code "//" is provided which performs vertical concatenation but ignores all column marks and simply left-justifies its two parameters: @ID @OneRow @Code { "Heading //0.1i" "A |0.2i B /0.1i" "C | D" } has result @ID { Heading //0.1i A |0.2i B /0.1i C | D } showing that spanning columns in tables motivate the inclusion of this operator. There is an analogous @Code "||" operator. The author would have preferred to leave out these operators, since they complicate the implementation, and it is interesting to examine the prospects of doing so. @PP The @Code "//" operator is formally redundant, because in general the expression @Code "x // y" can be replaced by @ID @OneRow @Code { "@OneCol { | x } /" "@OneCol { | y }" } for any objects {@Code x} and {@Code y}. By concatenating an empty object at the left of @Code x and hiding all but that empty object's column mark, we effectively shift {@Code x}'s column mark to its left edge. The same goes for {@Code y}, so the @Code "/" operator has just one column mark to merge, at the extreme left, and its effect is indistinguishable from {@Code "//"}. @PP Unfortunately, if @Code y consists of two rows separated by {@Code "/"}, as in the example above, both rows must be placed inside the {@Code "@OneCol"}, and the table cannot be entered in the simple row-by-row manner that non-expert users naturally expect. Another advantage of @Code "//" is that its left parameter can be printed before its right parameter is known; this is important when the left parameter is an entire page. @PP The fifth and final concatenation operator, {@Code "&"}, is an explicit version of the horizontal concatenation operator interpolated when objects are separated by white space. It is formally identical to @Code "|" except for taking higher precedence and being subject to replacement by @Code "//1vx" during paragraph breaking (Section {@NumberOf style}). @End @SubSection lout-3.39/doc/design/s6_00000644000076400007640000000147511363700677013602 0ustar jeffjeff@Section @Title { Cross references } @Begin @PP Cross references, such as `see page 57' and `see Figure 5,' are a useful but highly error-prone feature of documents. Scribe [7] introduced a method of keeping them up to date automatically as the document changes: the user gives each referenced entity a tag, and operators are provided that return the page or sequence number of the entity with a given tag. @PP A cross reference takes an object (such as a page number) from one point in the document and copies it to another, and this generalization suggests other applications. For example, a running header is copied from the title of a nearby chapter, and a reference is copied from a bibliographic database. Making the unity of these applications manifest is an interesting language design problem. @BeginSubSections lout-3.39/doc/design/s6_10000644000076400007640000000731011363700677013575 0ustar jeffjeff@SubSection @Tag { cross } @Title { The cross reference abstraction } @Begin @PP In developing the cross reference abstraction, it seemed best to begin with the database application, since it is the simplest. Database relations are naturally mapped into Lout definitions: @ID @OneRow @Code { "def @Reference" " named @Tag {}" " named @Author {}" " named @Title {}" " named @Journal {}" "{}" } The set of all invocations of @Code "@Reference" is a relation whose attributes are the parameters, and whose tuples are the invocations. To complete the correspondence, we need only declare that the @Code "@Tag" parameter is special, serving as the key attribute. @PP Following the database model, we next need a notation for retrieving the invocation with a given tag: @ID @Code "@Reference&&kingston91" This @I {cross reference} is like an arrow pointing to the invocation. To access its attributes, we write @ID @Code "@Reference&&kingston91 @Open { @Author, @Title }" The @Code "@Open" operator evaluates its right parameter in an environment which includes the exported parameters of its left. @PP An invocation is chosen to be a running header because of its proximity to the place where it is used, rather than by its tag. Such proximity is naturally expressed by two special tags, {@Code preceding} and {@Code following}; for example, @Code "@Sym&&following" will point to the closest following invocation of @Code "@Sym" in the final printed document. This is much simpler conceptually than reference to the internal state of the document formatter at a critical moment, the usual approach to running headers. @PP It turns out that the above design solves all the cross referencing problems encountered in practice except one, which may be typified by the problem of finding the number of the page on which the chapter whose tag is @Code "intro" begins. Two cross referencing steps are needed, first to {@Code "@Chapter&&intro"}, then from there to {@Code "@Page&&preceding"}, where the page number is known. @PP Given our success so far, this last problem proves to be surprisingly difficult. We first try @ID @OneRow @Code { "@Chapter&&intro @Open {" " @Page&&preceding @Open { @PageNum }" "}" } but this fails because @Code "@Page&&preceding" is evaluated in the present context, not in the context of @Code "@Chapter&&intro" as required. So our next attempt is @ID @OneRow @Code { "def @Chapter" " named @PageNum { @Page&&preceding @Open { @PageNum } }" " ..." } with the @Code "@Page&&preceding" cross reference attached to the chapter; we write @ID @Code "@Chapter&&intro @Open { @PageNum }" This also fails, because parameters are evaluated after substitution, so once again @Code "@Page&&preceding" is evaluated in the wrong context. We could of course define a new operator specifically for this case: @ID @Code "@Page&&{ @Preceding @Chapter&&intro }" or some such. This is free of the annoying context-sensitivity, but it seems quite complex, and the expected cross reference @Code "@Page&&preceding" does not appear. @PP The author was lost in these obscurities for some time, and ultimately rescued himself by looking ahead to the implementation of the @Code preceding and @Code following tags, to see if a simple extension of it would solve the problem. This led to the @Code "@Tagged" operator: @ID @Code "@Page&&preceding @Tagged intro" placed at the beginning of the body of the chapter will attach @Code intro as an extra tag to the closest preceding invocation of {@Code "@Page"}, so that @ID @Code "@Page&&intro @Open { @PageNum }" yields the desired page number. There is something low-level and ad hoc about the @Code "@Tagged" operator, but the two cross references do appear naturally, and it works. @End @SubSection lout-3.39/doc/design/s2_20000644000076400007640000000643511363700677013601 0ustar jeffjeff@SubSection @Tag { lexical } @Title { Grammatical and lexical structure } @Begin @PP If objects are to be constructed like mathematical expressions, the natural notation is a functional language based on operators, as in Eqn. The grammar of Lout objects is accordingly @ID @OneRow @Eq { matrix { object nextcol --> above --> above --> above --> above --> above --> above --> above --> nextcol { object ``` infixop ``` object } labove gap { "1fx" } { prefixop ``` object } labove gap { "1fx" } { object ``` postfixop } labove gap { "1fx" } { noparsop } labove gap { "1fx" } { literalword } labove gap { "1fx" } { @Code "{" ``` object ``` @Code "}" } labove gap { "1fx" } { object ``` object } labove gap { "1fx" } } } where {@Eq {infixop}}, {@Eq {prefixop}}, {@Eq {postfixop}}, and {@Eq {noparsop}} are identifiers naming operators which take 0, 1 or 2 parameters, as shown, and @Eq {literalword} is a sequence of non-space characters, or an arbitrary sequence of characters enclosed in double quotes. Ambiguities are resolved by precedence and associativity. @PP The last production allows a meaning for expressions such as {@Code "{}"}, in which an object is missing. The value of this @I {empty object} is a rectangle of size 0 by 0, with one column mark and one row mark, that prints as nothing. @PP The second-last production generates sequences of arbitrary objects separated by white space, called {@I paragraphs}. Ignoring paragraph breaking for now, the natural meaning is that the two objects should appear side by side, and Lout's parser accordingly interpolates an infix horizontal concatenation operator (see below) between them. This operator is associative, so the grammatical ambiguity does no harm. However, the Algol-60 rule that white space should be significant only as a separator is necessarily broken by Lout in just this one place. @PP Algol-like languages distinguish literal strings from identifiers by enclosing them in quotes, but literals are far too frequent in document formatting for this to be viable. The conventional solution is to begin identifiers with a special character, and Lout follows Scribe [7] in using "`@'" rather than the "`\\'" of troff [8] and @TeX [9]. @PP However, Lout takes the unusual step of making an initial "`@'" optional. The designers of Eqn apparently considered such characters disfiguring in fine-grained input like equations, and this author agrees. The implementation is straightforward: "`@'" is classed as just another letter, and every word is searched for in the symbol table. If it is found, it is an identifier, otherwise it is a literal. A warning message is printed when a literal beginning with "`@'" is found, since it is probably a mis-spelt identifier. No such safety net is possible for identifiers without "`@'". @PP Equation formatting also demands symbols made from punctuation characters, such as @Code "+" and {@Code "<="}. It is traditional to allow such symbols to be juxtaposed, which means that the input @ID @Code "<=++" for example must be interpreted within the lexical analyser by searching the symbol table for its prefixes in the order {@Code "<=++"}, {@Code "<=+"}, {@Code "<="}. Although this takes quadratic time, in practice such sequences are too short to make a more sophisticated linear method like tries worthwhile. @End @SubSection lout-3.39/doc/design/s3_20000644000076400007640000000657011363700677013602 0ustar jeffjeff@SubSection @Tag { recursion } @Title { Recursion and page layout } @Begin @PP Design and implementation should proceed together in exploratory projects, since otherwise the design too easily becomes unrealistic. Sometimes the implementation does more than its designer intended. The author wrote the following purely as a testing scaffold: @ID @OneRow @Code { "def @Page right x" "{" " 8i @Wide 11i @High" " {" " //1i ||1i x ||1i" " //1i" " }" "}" } Only afterwards did he realize its significance: the concept of a page had been defined outside the implementation, removing the need for commands for setting page width and height, margins, and so on. @PP Defining a sequence of pages is harder, since their number is not known in advance. A simple version of this same problem is afforded by the leaders found in tables of contents: @ID { 4i @Wide { Chapter 7 @Leaders 53 } } This seemed to require recursion, specifically the definition @ID @Code { "def @Leaders { .. @Leaders }" } Note that both @Code ".." and @Code "@Leaders" are objects, so the two spaces separating them are significant. No base case is given, and indeed we have no boolean or conditional operators with which to express it; but we can adopt the implicit base `if space is not sufficient, delete {@Code "@Leaders"} and any preceding space'. Then the expression @ID @Code "4i @Wide { Chapter 7 @Leaders 53 }" will produce the object shown above. It is hard to see how this base could be made explicit, without violating the general principle of keeping all size information internal. In the implementation, @Code "@Leaders" remains unexpanded while sizes are being calculated; then it is treated similarly to a receptive symbol, with its body as an incoming galley (Section {@NumberOf flushing}). @PP With this settled, it is now clear how to define a document which is a numbered sequence of pages. Let @Code "@Next" be a prefix operator which returns its parameter plus one. Then @ID @OneRow @Code { "def @PageList" " right @PageNum" "{" " @Page {" " |0.5rt - @PageNum -" " //1v @TextPlace" " //1rt @FootSect" " }" " //" " @PageList @Next @PageNum" "}" } when invoked in the expression {@Code "@PageList 1"}, has for its result the potentially infinite object @ID @OneRow { @LittlePage { |0.5rt - 1 - //1.2vx @Code "@TextPlace" //1rt @Code "@FootSect" } // @LittlePage { |0.5rt - 2 - //1.2vx @Code "@TextPlace" //1rt @Code "@FootSect" } //0.2c 8p @Font @Code "@PageList 3" } Similarly, we may define @Code "@FootSect" like this: @ID @OneRow @Code { "def @FootSect" "{" " def @FootList" " right @Num" " {" " @FootPlace" " //1v" " @FootList @Next @Num" " }" "" " 1i @Wide @HLine" " //1v" " @FootList 1" "}" } so that an invocation of @Code "@FootSect" produces @ID @OneRow @Code { 1i @Wide @HLine "@FootPlace" "@FootPlace" "@FootPlace" "..." } The expansion process is very similar to a BNF derivation, and would be attempted only on demand. @PP Clearly, deciding which expansions to take and replacing @Code "@TextPlace" and {@Code "@FootPlace"} by the appropriate actual text will not be easy; this is the subject of Section {@NumberOf galleys}. The important point for now is that we have here a very simple and flexible method of specifying the layout of pages, which requires no specialized language features. @End @SubSection lout-3.39/doc/design/s5_40000644000076400007640000001117611363700677013604 0ustar jeffjeff@SubSection @Tag { lookahead } @Title { The limited lookahead problem } @Begin @PP Basser Lout assumes that there will be enough internal memory to hold the symbol table plus a few pages, but not an entire document. This section describes the consequent problems and how they were solved. Other interpreters, notably interactive editors running on virtual memory systems, would not necessarily need this assumption. @PP Although Basser Lout can read and format any legal input, its memory consumption will be optimized when the bulk of the document resides in galleys whose targets can be identified at the moment they are encountered. Let us take the typical example of a root galley which is a list of pages, a @Code "@BodyText" galley targeted into the pages, @Code "@Chapter" galleys targeted into {@Code "@BodyText"}, and @Code "@Section" galleys targeted into the @Code "@Chapter" galleys: @ID @OneRow @Code { "@PageList" "//" "@BodyText" "//" "@Chapter {" " @Section { ... }" " @Section { ... }" " ..." " @Section { ... }" "}" "@Chapter {" " ..." "}" } Basser Lout is able to read and process such galleys one paragraph at a time (strictly, from one @Code "//" at the outer level of a galley to the next), as we now describe. @PP When the parser encounters the beginning of a galley, like @Code "@Chapter" or {@Code "@Section"}, it initiates a new galley process. The special receptive symbol @Code "@Input" is substituted for the as yet unread right parameter of the galley. As each paragraph of the right parameter is read, it is deleted from the parse tree and injected into the galley's {@Code "@Input"}. The galley is then resumed. The parser thus acts as an extra concurrent process; it has low priority, so that input is read only when there is nothing else to do. Since galleys may be nested, a stack of @Code "@Input" symbols is needed, each with its own environment and style. If a galley is encountered for which a target is not immediately identifiable (a footnote, for example), it is read in its entirety and hung in pure parse tree form from an @I UNATTACHED index in the usual way, with an environment but without a style. It will be flushed later when its component is promoted. @PP In addition to producing a steady flow of components from input, we must also ensure that receptive symbols do not unduly block their promotion. The @Code "@FootSect" symbol at the foot of each page is a typical example: until it is deleted the page cannot be printed. @PP Receptive symbols are expanded only on demand, so @Code "@FootSect" can be deleted as soon as we can prove that it is not wanted. The symbol table can tell us that only @Code "@FootNote" galleys (with @Code "@FootPlace&&following" targets) want it, so it might be possible to deduce that @Code "@FootSect" may be deleted as soon as body text enters the following page. @PP The author was unable to make this work, so Basser Lout requires the user to identify those galleys which will carry the bulk of the document ({@Code "@Chapter"}, {@Code "@Section"}, {@Code "@BodyText"}) as {@I {forcing galleys}}, by writing @Code "force into" instead of @Code "into" in their definitions. As described in the previous section, when a forcing galley attaches to a target, all receptive symbols preceding the target in its galley are deleted, removing all impediments to flushing. For example, when a forcing body text galley enters a new page, the @Code "@FootSect" symbol on the preceding page will be deleted. It seems likely that a system which could afford to wait until all input was read before deleting any receptive symbols would not need forcing galleys. @PP Galleys whose targets are a long way from their invocation points can be a problem. If the direction is {@Code "following"}, such galleys are held in internal memory for a long time, unless they are to be sorted. If the direction is {@Code "preceding"}, then either the entire intervening document must be held in memory (prevented by the target from flushing), or else some forcing galley prematurely deletes the target, leaving the galley bereft. @PP The typical example of the latter case occurs when the galley is an entry in the table of contents, launched backwards from the beginning of a chapter or section. Its target in the table of contents will have been deleted long before, to permit the rest of the document to print, so the galley ultimately emerges as an unattached galley promoted out of the root galley. All such galleys are written to an auxiliary file, indexed by the missing target. On the next run, just before that target is deleted, the auxiliary file is checked and any galleys for it are read in and flushed. @End @SubSection lout-3.39/doc/design/s2_50000644000076400007640000001050211363700677013572 0ustar jeffjeff@SubSection @Tag { style } @Title { Context-sensitive attributes of objects } @Begin @PP Although we are free to place any object in any context, the context must influence the appearance of the object, since otherwise @ID @Code "A short paragraph of text." could not appear in a variety of fonts, column widths, etc. This influence cannot take the purely static form that block-structured languages use to associate values with identifiers, for then an operator could not influence the appearance of its parameters; and a state variable solution is not compatible with the overall functional design. @PP The information needed from the context seems quite limited, comprising the font family, face, and size to use, the style of paragraph breaking required, how much space to substitute between the words of paragraphs, and how much horizontal and vertical space is available to receive the object. These four items constitute the so-called `style information' of Lout. As graphics rendering hardware improves, the style information will probably grow to include colour and texture information. @PP The way to deal with fonts at least is very clear: @ID @Code "{ Times Slope 12p } @Font { Hello, world }" should have result @ID { { Times Slope 12p } @Font { Hello, world } } Lout also provides @Code "@Break" and @Code "@Space" symbols for controlling the paragraph breaking and space styles mentioned above. These work in the same way, returning their right parameters in the style of their left. The implementation is very simple: one merely broadcasts the style information down into the parse tree of the right parameter. A font, for example, is converted to an 8-bit internal name and stored in each leaf, while a breaking style is stored in the root node of each paragraph. @PP The same language design can be used for available width and height, only here the implementation is much more demanding: @ID @Code { "2i @Wide {" "(1) |0.1i An example" "containing a small" "paragraph of filled text." "}" } is guaranteed to be two inches wide: @ID { 2i @Wide { (1) |0.1i An example containing a small paragraph of filled text. } } One must calculate that 1.9 inches minus the width of @Code "(1)" is available to the paragraph, and break it accordingly; Basser Lout does this in two stages. In the first, upward-moving stage, widths are calculated using the formulae of Section {@NumberOf objects}, which assume that available space is infinite. If the upward movement reaches a @Eq { WIDE } node, corresponding to a @Code "@Wide" operator, and the calculated width exceeds that allowed, a second, downward-moving stage is initiated which attempts to reduce the width by finding and breaking paragraphs. This second stage is quite routine except at @Code "|" nodes, whose children are the columns of a table. It is necessary to apportion the available width (minus inter-column gaps) among the columns. Basser Lout leaves narrow columns unbroken and breaks the remaining columns to equal width, using up all of the available space. @PP The size of an object is not clearly determined when the upward-moving size is less than the downward-moving available space, and the object contains constructs that depend on available space (e.g. right justification). For example, in @ID @Code "2i @Wide { Heading // a |1rt b }" it seems natural to assign a width of two inches to the subobject @Code "a |1rt b" because of the right justification, but it would be equally plausible if the width of @Code Heading was assigned to the subobject instead. The author is conscious of having failed to resolve this matter properly; an extra operator for controlling available space is probably necessary. @PP The actual paragraph breaking is just a simple transformation on the parse tree; the real issue is how to describe the various styles: ragged right, adjusted, outdented, and so on. Their diversity suggests that they should somehow be defined using more basic features; but then there are algorithms for high-quality paragraph breaking, which presumably must be built-in. This dilemma was not clearly grasped by the author in 1985, and he included a built-in paragraph breaker, with the @Code "@Break" operator selecting from a fixed set of styles. A much better solution based on galleys will be given in Section {@NumberOf horizontal}, but, regrettably, it is not implemented. @End @SubSection lout-3.39/doc/design/s2_90000644000076400007640000000003611363700677013577 0ustar jeffjeff@EndSubSections @End @Section lout-3.39/doc/design/s5_30000644000076400007640000001120111363700677013570 0ustar jeffjeff@SubSection @Tag { constraints } @Title { Size constraints and size adjustments } @Begin @PP The galley flushing algorithm needs to know the available width and height at each receptive symbol. These symbols may lie within arbitrarily complex objects, and they may compete with each other for available space (as body text and footnote targets do), so this information must be extracted from the tree structure when required. @PP For example, consider the object @ID @Code "5i @Wide { a / b }" and suppose that the width of @Code { a } is @Eq { 1i, 2i } (@Eq {1i} to the left of the mark, @Eq { 2i } to the right). What then is the available width at {@Code { b }}? If we let the width of @Code b be @Eq {l,r}, we must have @ID @Eq { (1i up l) + (2i up r) <= 5i } with the @Eq {non up } (i.e. max) operations arising from mark alignment. Eliminating them gives @ID @OneRow @Eq { matrix { { 1i + 2i ^<= 5i } mabove { l + 2i ^<= 5i } mabove { 1i + r ^<= 5i } mabove { l + r ^<= 5i } } } and since we assume that @Code a fits into the available space, the first inequality may be dropped, leaving @ID @OneRow @Eq { matrix { { l ^<= 3i } mabove { l + r ^<= 5i } mabove { r ^<= 4i } } } Object @Code b may have width @Eq {l, r} for any @Eq { l } and @Eq { r } satisfying these inequalities, and no others. @PP Here is another example: @ID @Code "5i @High { a /2ix b }" Assuming that @Code a has height @Eq {1i,1i}, the height @Eq {l, r} of @Code b must satisfy @ID @Eq { 1i + ((1i + l) up 2i) + r <= 5i } This time the @Eq { non up } operation arises from the mark-to-mark gap mode, which will widen the @Eq { 2i } gap if necessary to prevent @Code a and @Code b from overlapping. This inequality can be rewritten as @ID @OneRow @Eq { matrix { { l ^<= infinity } mabove { l + r ^<= 3i } mabove { r ^<= 2i } } } In general, Lout is designed so that the available width or height at any point can be expressed by three inequalities of the form @ID @OneRow @Eq { matrix { { l ^<= x } mabove { l + r ^<= y } mabove { r ^<= z } } } where @Eq {x }, @Eq {y} and @Eq {z} may be @Eq { infinity }. We abbreviate these three inequalities to @Eq { l, r <= x, y, z }, and we call @Eq {x, y, z} a {@I{size constraint}}. @PP The two examples above showed how to propagate the size constraint @Eq { infinity, 5i, infinity } for @Code "a / b" down one level to the child {@Code b}. Basser Lout contains a complete set of general rules for all node types, too complicated to give here. Instead, we give just one example of how these rules are derived, using the object @ID @OneRow { @Eq {x sub 1} @Code "/" @Eq {x sub 2} @Code "/" @Eq {ldots} @Code "/" @Eq {x sub n} } where @Eq { x sub j } has width @Eq { l sub j , r sub j } for all @Eq {j}. @PP Suppose the whole object has width constraint @OneCol @Eq {X,Y,Z}, and we require the width constraint of {@Eq { x sub i }}. Let @Eq { L = max sub j ` l sub j } and @Eq { R = max sub j ` r sub j }, so that @OneCol @Eq {L, R} is the width of the whole object. We assume @Eq {L, R <= X,Y,Z}. Then @Eq { x sub i } can be enlarged to any size @Eq { l sub i ` , r sub i } satisfying @ID @Eq { ( l sub i up L), ( r sub i up R) <= X, Y, Z } which expands to eight inequalities: @ID @OneRow @Eq { matrix { { l sub i ^<= X } mabove { L ^<= X } mabove { l sub i + r sub i ^<= Y } mabove { l sub i + R ^<= Y } mabove { L + r sub i ^<= Y } mabove { L + R ^<= Y } mabove { r sub i ^<= Z } mabove { R ^<= Z } } } Three are already known, and slightly rearranging the others gives @ID @OneRow @Eq { matrix { { l sub i ^<= X } mabove { l sub i ^<= Y - R } mabove { l sub i + r sub i ^<= Y } mabove { r sub i ^<= Z } mabove { r sub i ^<= Y - L } } } Therefore the width constraint of @Eq { x sub i } is @ID @Eq { min(X, Y-R), Y, min(Z, Y-L) } The size constraint of any node can be found by climbing the tree to a @I WIDE or @I HIGH node where the constraint is trivial, then propagating it back down to the node, and this is the function of procedure {@I Constrained} in Basser Lout. @PP After some components have been promoted into a target, the sizes stored in its parent and higher ancestors must be adjusted to reflect the increased size. This is done by yet another set of recursive rules, upward-moving this time, which cease as soon as some ancestor's size does not change. These rules are embodied in procedure @I AdjustSize of Basser Lout. The adjustment must be done before relinquishing control to any other galley, but not after every component. @End @SubSection lout-3.39/doc/design/all0000644000076400007640000000261311363700677013576 0ustar jeffjeff@SysInclude { eq } @SysInclude { tab } @SysInclude { fig } @SysInclude { report } @SysDatabase @Reference { oldrefs } @Report @Title { The Design and Implementation of the Lout Document Formatting Language } @Author { Jeffrey H. Kingston } @Institution { Basser Department of Computer Science, The University of Sydney 2006, Australia } @DateLine { 27 January, 1993 } @InitialLanguage { English } @OptimizePages { Yes } @AbstractTitle { SUMMARY } @Abstract { Lout is a high-level language for document formatting, whose ease of use has permitted an unprecedented number of advanced features to be added quickly and reliably. This paper charts the evolution of the design and implementation of Lout from conception in mid-1984 to public release in October 1991. It includes extensive discussions of remaining problems and possible solutions. @DP {@B Keywords} document formatting typesetting } // @Include { s1_0 } @Include { s2_0 } @Include { s2_1 } @Include { s2_2 } @Include { s2_3 } @Include { s2_4 } @Include { s2_5 } @Include { s2_9 } @Include { s3_0 } @Include { s3_1 } @Include { s3_2 } @Include { s3_3 } @Include { s3_4 } @Include { s3_9 } @Include { s4_0 } @Include { s5_0 } @Include { s5_1 } @Include { s5_2 } @Include { s5_3 } @Include { s5_4 } @Include { s5_5 } @Include { s5_9 } @Include { s6_0 } @Include { s6_1 } @Include { s6_2 } @Include { s6_9 } @Include { s7_0 } lout-3.39/doc/design/s5_50000644000076400007640000001130711363700677013601 0ustar jeffjeff@SubSection @Tag { horizontal } @Title { Horizontal galleys } @Begin @PP There is a strong analogy between breaking a column of text into page-sized pieces, and breaking a paragraph into line-sized pieces. In fact, the two differ only in direction: vertical for body text, horizontal for paragraphs. In this section we define {@I{horizontal galleys}}, and show how they provide an unlimited number of paragraph breaking styles, as well as solve some other problems. Regrettably, lack of time has prevented their incorporation into the Basser Lout interpreter. @PP Imagine a galley whose components are separated by horizontal concatenation operators instead of vertical ones, perhaps indicated by a @Code { horizontally into } clause. Then all object breaking, including paragraph breaking, could be replaced by galley component promotion like this: @ID @OneRow @Code { "def @Paragraph right x" "{" " def @LinePlace { @Galley }" "" " def @LineList" " {" " @HExpand @LinePlace" " //1vx @LineList" " }" "" " def @Par horizontally into { @LinePlace&&preceding }" " right x" " { x }" "" " @LineList // @Par { 0.2i @Wide {} &0i x &1rt }" "}" } The @Code "@HExpand" operator, which is a primitive of Basser Lout, horizontally expands the gaps in its right parameter until the result fills the available space, thus implementing line adjustment, except when the parameter contains tabulation gaps like {@Code "&1rt"}, which cause the parameter to be already expanded. The result of @ID @Code "@Paragraph { A short paragraph of text. }" would then be something like @ID 1.5i @Wide { 0.2i @Wide {} & A short paragraph of text. } depending on the available horizontal space. An unlimited range of paragraph breaking styles could be defined, including ragged right, ragged left, break-and-center, and so on. @PP In Basser Lout, indented paragraphs are produced by preceding them with a horizontal concatenation operator, for example {@Code "|0.5i"}. This has the unfortunate effect of making an indented paragraph into a single component of the enclosing galley, so that it will always be kept together on one page. Horizontal galleys solve this problem with a simple change to {@Code "@LineList"}: @ID @OneRow @Code { "def @LineList" "{" " |0.5i @HExpand @LinePlace" " //1vx @LineList" "}" } showing the flexibility that comes from bringing the full power of the Lout language to bear on paragraph layout. It is easy to make provision for a tag on the first line. @PP Although Basser Lout permits receptive symbols within paragraphs, they are of little use, because their available width is calculated after paragraph breaking, and the incoming galley cannot spread over more than one line. With horizontal galleys, such symbols would have infinite available width, and we could easily produce a filled paragraph of footnotes like this: @ID 3.5i @Wide { @OneRow { -2p @Font 1 ^/0.3vo } & See Jones and Saunders (1982). &2m @OneRow { -2p @Font 2 ^/0.3vo } & Or so Jacobsen (1973) asserts. &2m @OneRow { -2p @Font 3 ^/0.3vo } & {@I ibid}, p. 327. } based on an infinite horizontal sequence of @Code "@FootPlace" symbols inside a horizontal galley. @PP When body text is placed on pages, the length of each column varies depending on the available vertical space. Horizontal galleys could analogously produce lines of varying length, and so could fill non-rectangular shapes. @PP An important theoretical benefit of horizontal galleys is that they would permit horizontal and vertical to be treated in a perfectly symmetrical way, whereas at present paragraph breaking is horizontal only, and galley breaking is vertical only. This must simplify the treatment of non-European languages which fill in unusual directions, although it is not itself sufficient to implement them. @PP There are a few minor problems with horizontal galleys. First, the syntactic overhead of enclosing each paragraph in @Code "@Paragraph { ... }" or whatever is unacceptable. Permitting user-defined operators to have lower precedence than the white space between two words might help here. Second, the built-in paragraph breaker includes hyphenation, and it permits line breaks in the input to determine line breaks in the output, if desired. These features must somehow be preserved. Finally, we have explained how the Basser Lout interpreter assigns equal width to the wider columns of tables (Section {@NumberOf style}). The equivalent situation in vertical galleys occurs when two receptive symbols compete for vertical space (e.g. @Code "@TextPlace" and {@Code "@FootSect"}), and there it is conventional to grant as much as required to the first arrival. It is not clear to the author how these different approaches can be reconciled. @End @SubSection lout-3.39/doc/design/s3_90000644000076400007640000000003611363700677013600 0ustar jeffjeff@EndSubSections @End @Section lout-3.39/doc/design/s2_10000644000076400007640000000770611363700677013602 0ustar jeffjeff@SubSection @Tag { genesis } @Title { The genesis of the object abstraction } @Begin @PP When one examines previous document formatting systems [4] looking for ideas for abstractions, as the author did in 1984, the Eqn formatting language [5] stands out like a beacon. In Eqn, a mathematical formula such as @ID @Eq { { x sup 2 + 1 } over 4 } is produced by typing @ID @Code "{ x sup 2 + 1 } over 4" in the input file; @Code sup and @Code over are binary operators, and braces are used for grouping. This is document formatting at a very high level, close to the language of mathematics itself, with all reference to font changes and spacing suppressed. @PP Eqn provides a single data type (let us call it the {@I expression}), built up recursively in context-free style: where one expression may appear, any expression may appear. This approach is common in algebra and programming languages, where its simplicity and expressiveness have long been appreciated; but Eqn was the first language to demonstrate its utility in document formatting. @PP Each expression is treated by Eqn as a rectangle with a {@I {horizontal axis}}, used for alignment with adjacent expressions: @ID @ShowMarks marks { horizontal } @Eq { { x sup 2 + 1 } over 4 } The size and rendering of the expression on the printed page are known only to the implementation, never explicitly calculated or accessed by the user. This prohibition is crucial to the maintenance of the context-free property in practice. In Lout, for example, equations, figures, tables, and arbitrary objects may be mixed together freely. This would be impossible if size information was hidden from the implementation in user calculations. @PP The object abstraction of Lout is a direct descendant of the Eqn expression. It employs the same context-free recursive style of construction, and each object is treated by Lout as a rectangle: @ID @Fig { @ShowMarks { 1c @Wide ^| 2c @Wide 0.45c @High ^/ 0.35c @High } } The horizontal axis, called a @I { row mark } in Lout, has a vertical analogue called a {@I {column mark}}, creating a valuable symmetry between horizontal and vertical. Multiple column and row marks are permitted: @ID @OneRow @Fig { A:: @Box margin { 0c } paint { grey } { 1.2c @Wide 0.8c @High } |1c B:: @Box margin { 0c } paint { grey } { 1c @Wide 0.8c @High } /0.5c C:: @Box margin { 0c } paint { grey } { 0.7c @Wide 0.8c @High } |1c D:: @Box margin { 0c } paint { grey } { 1.3c @Wide 0.8c @High } // @Line linestyle { dashed } from { A@W -- { 0.3 cm 0 } } to { B@W ++ { 1.6 cm 0 } } // @Line linestyle { dashed } from { C@W -- { 0.3 cm 0 } } to { D@W ++ { 1.6 cm 0 } } // @Line linestyle { dashed } from { A@NW ++ { 0 0.3 cm } } to { C@SW -- { 0 0.3 cm } } // @Line linestyle { dashed } from { B@NW ++ { 0.3 cm 0.3 cm } } to { D@SW ++ { 0.3 cm -0.3 cm } } } so that objects are able to represent tables. @PP This abstraction has some limitations, the most obvious being the restriction of size calculations to rectangular bounding boxes. Non-rectangular and disconnected shapes arise naturally in figures and in the characters of fonts; the extension to them is conceptually straightforward and might help to explain some fine points of layout such as kerning. However, there are implementation and language design problems, particularly when filling non-rectangular shapes with text, and so the author chose to keep to Eqn's rectangles. @PP A more fundamental limitation of the object abstraction arises from the inability of recursive data types to describe cross-linked structures, which seem to require some means of naming the multiply referenced parts. Lout is obliged to introduce additional abstractions to cope with cross linking: galleys for inserting text into pages (Section {@NumberOf galleys}), cross references (Section {@NumberOf cross}), and labelled points in figure drawing [6]. An abstraction closer to hypertext might form a more unified basis for these features. @End @SubSection lout-3.39/doc/design/s5_10000644000076400007640000001376611363700677013610 0ustar jeffjeff@SubSection @Tag { galleys } @Title { The galley abstraction } @Begin @PP Let us take the footnote as a representative example. At some point in the document, we wish to write @ID @OneRow @Code { "preceding text" "@FootNote { footnote text }" "following text" } and we expect the formatter to remove the footnote from this context and place it at the bottom of the current page, possibly splitting some or all of it onto a following page if space is insufficient. @PP An object appears in the final document at the point it is invoked, but this basic property does not hold for footnotes: the point of invocation and the point of appearance are different. In some way, the footnote is attached to the document at both points, introducing a cross linking (Section {@NumberOf genesis}) that cannot be described in purely functional terms. @PP Since the interpretation of any object depends on an environment and style inherited from the context, the first question must be whether the footnote inherits them through the invocation point or through the point(s) of appearance. @PP If symbols are to be interpreted statically as heretofore, then environments must be inherited through the invocation point alone. Dynamic inheritance through the point of appearance is enticing in some ways: it might replace the body parameter, and it might help with automatic numbering, since the number of a footnote is known only at the point of appearance; but the implementation problems are severe, and static inheritance seems much simpler and more comprehensible to the user. Style, at least its available width and height part, must of necessity be inherited through the point of appearance. For consistency, the entire style should be inherited in this way. There is a suggestive analogy here with actual parameters, which have a point of invocation from which they inherit an environment, and a point of appearance within the body of the enclosing definition, from which they inherit a style. It may be possible to treat a footnote as the actual parameter of some symbol, therefore, although the details seem very obscure. @PP But the most profound consequence of having two types of attachment point is that it leads to two distinctive tree structures. Considering invocation points only leads to static trees like this one: @ID @I @Fig margin { 0.3c } { @Tree { @Node @Ellipse { body text } @LeftSub { @Node @Ellipse footnote } @RightSub { @Node @Ellipse figure @FirstSub { @Node @Ellipse footnote } } }} which shows that the body text contains a footnote and a figure, the latter itself containing a footnote. Considering points of appearance only gives a completely different, dynamic tree: @ID @I @Fig margin { 0.3c } { @Tree { @Node @Ellipse { sequence of pages } @FirstSub { @Node @Ellipse { body text } } @NextSub { @Node @Ellipse { footnote } } @NextSub { @Node @Ellipse { figure } } @NextSub { @Node @Ellipse { footnote } } }} The tree can be deeper, for example with sections appearing within chapters which appear within the body text, which appears within the final sequence of pages. Document formatting languages generally shirk the issues raised by this dual tree structure, by making the dynamic tree built-in, by limiting one or both trees to two levels, and so on, providing a classic example of the impoverishing effect of failing to permit language features to attain their natural level of generality. @PP We are thus led to propose a second abstraction for document formatting, which we name the @I galley in recognition of its similarity to the galleys used in manual typesetting. A galley consists of an object (such as a footnote) together with a sequence of places where that object may appear (such as the bottoms of the current and following pages). Splitting occurs quite naturally when space at any place is insufficient to hold the entire object. @PP In Lout, a footnote galley and its place of appearance are defined as follows: @ID @OneRow @Code { "def @FootPlace { @Galley }" "" "def @FootNote into { @FootPlace&&following }" " right x" "{ x }" } The @Code "@FootPlace" symbol contains the special symbol {@Code "@Galley"}, indicating that it is a point of appearance for a galley. By placing invocations of @Code "@FootPlace" at the bottoms of pages, as in Section {@NumberOf recursion}, we define the desired points of appearance for footnotes. Symbols whose body contains @Code "@Galley" either directly or indirectly are called receptive symbols, meaning receptive to galleys, and they are expanded only on demand. The effect of the @Code "into" clause is to make each invocation of @Code "@FootNote" a galley whose object is the result of the invocation in the usual way, and whose sequence of points of appearance is specified by the @Code "into" clause; in this example, the sequence of all @Code "@FootPlace" symbols following the invocation point. @PP Lout permits galleys to be invoked within other galleys to arbitrary depth, so that one may have footnotes within figures within the body text galley, for example, creating arbitrary static trees. Receptive symbols like @Code "@FootPlace" may appear within any galley, creating arbitrary dynamic trees as well. The root of the dynamic tree, which would normally consist of the sequence of pages of the complete assembled document, is considered to be a galley whose point of appearance is the output file. Points of appearance may be @Code preceding or @Code following the invocation point; entries in tables of contents are the main users of {@Code preceding}. @PP The galley abstraction is adequate for all of the applications listed at the beginning of this section, except that there is no provision for sorting index entries and references. Sorting of galleys has been added to Lout as a built-in feature, invoked by adding a special @Code "@Key" parameter to the galleys, and using its value as the sort key. The author was at a loss to find any other way, or any useful generalization of this feature. Its implementation will be discussed in Section {@NumberOf cross.impl}. @End @SubSection lout-3.39/doc/design/s5_00000644000076400007640000000073411363700677013576 0ustar jeffjeff@Section @Title { Galleys } @Begin @PP With objects and definitions under control, the author faced the problem of getting body text, footnotes, floating figures and tables, references, index entries, and entries in the table of contents into their places. The resulting investigation occupied three months of full-time design work, and proceeded approximately as described in Section {@NumberOf galleys}; the implementation occupied the years 1987-89. @BeginSubSections lout-3.39/doc/design/README0000644000076400007640000000154311446017165013757 0ustar jeffjeffDirectory lout/doc/design This directory contains the Lout source files for the report entitled `The design and implementation of the Lout document formatting language' which appeared in Software--Practice and Experience, vol 23, pp1001-1041 (September 1993). To produce the report, type the command lout -r3 all > outfile.ps in this directory. The -r3 flag causes Lout to run over the document three times, which is needed to completely resolve all cross references, although a readable PostScript file outfile.ps would be produced after one run if -r3 is omitted. Auxiliary files with .li and .ld suffixes will be created in this directory. A copy of the final outfile.ps is included. The second and third runs should produce no error messages (although changing the paper size might produce one or two benign ones). Jeffrey H. Kingston 21 September 2010 lout-3.39/doc/design/s1_00000644000076400007640000000473311363700677013575 0ustar jeffjeff@Section @Title { Introduction } @Begin @PP Lout [1, 2] is a high-level language for document formatting, designed and implemented by the author. The implementation, known as Basser Lout, is a fully operational production version written in C for the Unix operating system, @FootNote { Unix is a trademark of "AT&T" Bell Laboratories. } which translates Lout source code into PostScript, @FootNote { PostScript is a trademark of Adobe Systems, Incorporated. } a device-independent graphics rendering language accepted by many high-resolution output devices, including most laser printers. Basser Lout is available free of charge [3]. It includes installation instructions, C source, seven standard packages, and complete documentation in the form of six technical reports and a manual page. @PP The Lout project arose out of the author's desire to bring to document formatting languages the elegance of expression found in programming languages like Algol-60 and Pascal. This emphasis on expressiveness has produced an order of magnitude reduction in the cost of developing document formatting applications. For example, an equation formatting application, which may be difficult or impossible to add to other systems, can be written in Lout in a few days. @PP When expert users can implement such applications quickly, non-experts benefit. Although Lout itself provides only a small kernel of carefully chosen primitives, packages written in Lout and distributed with Basser Lout provide an unprecedented array of advanced features in a form accessible to non-expert users. The features include rotation and scaling, fonts, paragraph and page breaking, displays and lists, floating figures and tables, footnotes, chapters and sections (automatically numbered), running page headers and footers, odd-even page layouts, automatically generated tables of contents, sorted indexes and reference lists, bibliographic and other databases (including databases of formats for printing references), equations, tables, diagrams, formatting of Pascal programs, and automatically maintained cross references. @PP This paper charts the evolution of Lout from conception in mid-1984 to the public release of Basser Lout in October 1991. Lout is organized around four key concepts -- objects, definitions, galleys, and cross references -- and they were developed in the order listed, so this paper will treat each in turn, discussing its design, implementation, problems, and prospects for further improvement. @End @Section lout-3.39/doc/design/s3_40000644000076400007640000000533211363700677013577 0ustar jeffjeff@SubSection @Tag { defs.impl } @Title { Implementation of definitions } @Begin @PP Input is processed by a hybrid parser which employs operator precedence for objects and simple recursive descent for the headers of definitions. A symbol table stores the body of each definition as a parse tree, except for macros which are lists of tokens, and manages the usual stack of static scopes, accepting @I PushScope and @I PopScope operations as the parser enters and leaves scope regions, including actual body parameters and the right parameter of the @Code "@Open" operator. @PP As the parse proceeds, a complete call graph is constructed, recording, for each symbol, which symbols are invoked within its body. Immediately after the last definition is read, the transitive closure of the call graph is computed, and used to determine whether each non-parameter symbol is recursive or receptive (Section {@NumberOf galleys}), and whether each parameter is invoked exactly once or not. @PP Purely functional systems may evaluate symbol invocations in applicative order (where parameters are evaluated before substitution into bodies), or in normal order (substitution before evaluation), and they may also share the value of a parameter among all uses of it. But in Basser Lout, the presence of context-sensitive style information (Section {@NumberOf style}) forces normal order evaluation and prevents sharing of parameter values. @PP To evaluate an unsized object (pure parse tree), its {@I environment}, the equivalent of the stack frames in Algol-like languages, must be available, containing the actual values of all formal parameters that are visible within the unsized object. Environment handling is a well-known implementation technique, so it will be discussed only briefly here. @PP Environments are extra subtrees hung from the objects they refer to. This organization makes excellent use of the ordered dag to permit environments to be shared, and deleted when the last reference to them is removed. Several optimizations have been implemented. Actual parameters known to be invoked only once are moved in from the environment, not copied; copying could lead to quadratic time complexity. Actual parameters of the form @Code "@Next" @I object receive an applicative pre-evaluation which prevents long chains of @Code "@Next" symbols from forming during the generation of large page numbers. Some environments which provably contribute nothing are deleted, most notably when a symbol invocation has no symbols within its actual parameters and no import list, so that only the environment of its body need be kept; this saves a great deal of space when objects with environments are written to auxiliary files (Section {@NumberOf cross}). @End @SubSection lout-3.39/doc/design/outfile.ps0000644000076400007640000153756111446021600015116 0ustar jeffjeff%!PS-Adobe-3.0 %%Creator: Basser Lout Version 3.39 (September 2010) %%CreationDate: Tue Sep 21 13:16:16 2010 %%DocumentData: Binary %%DocumentNeededResources: (atend) %%DocumentSuppliedResources: (atend) %%DocumentMedia: A4 595 842 0 white () %%PageOrder: Ascend %%LanguageLevel: 2 %%Pages: (atend) %%BoundingBox: 0 0 595 842 %%EndComments %%BeginProlog %%BeginResource: procset LoutStartUp /cp_x 0 def /cp_y 0 def /louts 0 def /loutv 0 def /loutf 0 def /ymark 0 def /xmark 0 def /ysize 0 def /xsize 0 def /save_cp { currentpoint /cp_y exch def /cp_x exch def } bind def /restore_cp { cp_x cp_y moveto } bind def /outline { gsave 1 1 1 setrgbcolor dup show save_cp grestore true charpath stroke restore_cp } bind def /m { 3 1 roll moveto show } bind def /mo { 3 1 roll moveto outline } bind def /s { exch currentpoint exch pop moveto show } bind def /so { exch currentpoint exch pop moveto outline } bind def /k { exch neg 0 rmoveto show } bind def /ko { exch neg 0 rmoveto outline } bind def /r { exch 0 rmoveto show } bind def /ro { exch 0 rmoveto outline } bind def /c { gsave 3 1 roll rmoveto show grestore } bind def /co { gsave 3 1 roll rmoveto outline grestore } bind def /ul { gsave setlinewidth dup 3 1 roll moveto lineto stroke grestore } bind def /in { 1440 mul } bind def /cm { 567 mul } bind def /pt { 20 mul } bind def /em { 120 mul } bind def /sp { louts mul } def /vs { loutv mul } def /ft { loutf mul } def /dg { } def /LoutGraphic { /louts exch def /loutv exch def /loutf exch def /ymark exch def /xmark exch def /ysize exch def /xsize exch def } def /LoutGr2 { gsave translate LoutGraphic gsave } def /LoutFont { findfont exch scalefont setfont } bind def /LoutRecode { { findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding exch def currentdict end definefont pop } stopped pop } bind def /PreEPSF_state 0 def /dict_stack 0 def /ops_count 0 def /LoutStartEPSF { % prepare for EPSF inclusion /PreEPSF_state save def /dict_stack countdictstack def /ops_count count 1 sub def 20 dict begin /showpage {} def 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit [] 0 setdash newpath /languagelevel where { pop languagelevel 1 ne { false setstrokeadjust false setoverprint } if } if } bind def /LoutEPSFCleanUp { % clean up after EPSF inclusion count ops_count sub { pop } repeat countdictstack dict_stack sub { end } repeat PreEPSF_state restore } bind def % Find current texture (may be null) % - LoutCurrentP p /LoutCurrentP { currentcolorspace 0 get /Pattern eq { [ currentcolor ] dup length 1 sub get } { null } ifelse } def % Find current color and color space % - LoutCurrentCCS c cs /LoutCurrentCCS { LoutCurrentP dup null eq { pop [ currentcolor ] currentcolorspace } { dup /UnderlyingColor get exch /UnderlyingColorSpace get } ifelse } def % Install c, cs, and (a copy of) p into graphics state % c cs p LoutSetCCSP - /LoutSetCCSP { dup null eq { pop setcolorspace aload pop setcolor } { % copy pattern dictionary 12 dict copy % record cs and c in p dup /UnderlyingColorSpace 3 index put dup /UnderlyingColor 4 index put % do setcolorspace and setcolor dup /PaintType get 1 eq { [ /Pattern ] setcolorspace setcolor pop pop } { [ /Pattern 4 -1 roll ] setcolorspace exch aload length 1 add -1 roll setcolor } ifelse } ifelse } bind def % num LoutSetGray - /LoutSetGray { [ 2 1 roll ] [ /DeviceGray ] LoutCurrentP LoutSetCCSP } bind def % r g b LoutSetRGBColor - /LoutSetRGBColor { [ 4 1 roll ] [ /DeviceRGB ] LoutCurrentP LoutSetCCSP } bind def % h s b LoutSetHSBColor - /LoutSetHSBColor { gsave sethsbcolor currentrgbcolor grestore LoutSetRGBColor } bind def % c m y k LoutSetRGBColor - /LoutSetCMYKColor { [ 5 1 roll ] [ /DeviceCMYK ] LoutCurrentP LoutSetCCSP } bind def % p LoutSetTexture - /LoutSetTexture { LoutCurrentCCS 3 -1 roll LoutSetCCSP } bind def % % LoutMakeTexture p /LoutMakeTexture { 12 dict begin /PaintProc exch def /YStep exch def /XStep exch def /BBox exch def /PaintType exch def /PatternType 1 def /TilingType 1 def currentdict end 7 1 roll matrix translate 5 1 roll matrix rotate 4 1 roll matrix scale exch dup matrix scale matrix concatmatrix matrix concatmatrix matrix concatmatrix /makepattern where { pop makepattern } { pop pop null } ifelse } bind def /LoutTextureSolid { null LoutSetTexture } bind def %%EndResource %%BeginResource: procset LoutTabPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/tabf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Tab % % % % This file has been placed in the public domain % % by its author, Jeffrey H. Kingston % % % % To assist in avoiding name clashes, the names % % of all these symbols begin with "ltab". % % % % Jeffrey H. Kingston % % 24 September 1991 % % 22 December 1992 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % linewidth ltabhs - % horizontal single line /ltabhs { 0 0 moveto xsize 0 lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhsp - % horizontal single line with projecting ends /ltabhsp { 0 0 moveto xsize 0 lineto setlinewidth 2 setlinecap stroke } def % linewidth ltabhd - % horizontal double line /ltabhd { dup dup 0 0 moveto xsize 0 lineto 0 exch 3 mul moveto xsize exch 3 mul lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhdb - % horizontal double line below mark /ltabhdb { dup dup 0 0 moveto xsize 0 lineto 0 exch -3 mul moveto xsize exch -3 mul lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhdnw - % horizontal double line with northwest corner /ltabhdnw { dup dup dup dup 0 0 moveto xsize 0 lineto xsize exch 3 mul moveto -3 mul exch 3 mul lineto -3 mul 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdne - % horizontal double line with northeast corner /ltabhdne { dup dup dup dup 0 0 moveto xsize 0 lineto 0 exch 3 mul moveto 3 mul xsize add exch 3 mul lineto 3 mul xsize add 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdsw - % horizontal double line with southwest corner /ltabhdsw { dup dup dup dup 0 0 moveto xsize 0 lineto xsize exch -3 mul moveto -3 mul exch -3 mul lineto -3 mul 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdse - % horizontal double line with southeast corner /ltabhdse { dup dup dup dup 0 0 moveto xsize 0 lineto 0 exch -3 mul moveto 3 mul xsize add exch -3 mul lineto 3 mul xsize add 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabvs - % vertical single line /ltabvs { 0 0 moveto 0 ysize lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabvd - % vertical double line /ltabvd { dup dup 0 0 moveto 0 ysize lineto -3 mul 0 moveto -3 mul ysize lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabvdr - % vertical double line to right of mark /ltabvdr { dup dup 0 0 moveto 0 ysize lineto 3 mul 0 moveto 3 mul ysize lineto setlinewidth 0 setlinecap stroke } def %%EndResource %%BeginResource: procset LoutFigPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/figf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Fig Jeffrey H. Kingston % % Version 2.0 (includes CIRCUM label) January 1992 % % % % This file has been placed in the public domain by its author, % % Jeffrey H. Kingston % % % % Although Fig is now obsolete I have updated it 20 October 2002 % % to work with textures, i.e. replacing setrgbcolor with % % LoutSetRGBColor. % % % % To assist in avoiding name clashes, the names of all symbols % % defined here begin with "lfig". However, this is not feasible % % with user-defined labels and some labels used by users. % % % % is two numbers, a point. % % is one number, a length % % is one number, an angle in degrees % % is one number, the preferred length of a dash % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% errordict begin /handleerror { { /Times-Roman findfont 8 pt scalefont setfont 0 setgray 4 pt 4 pt moveto $error /errorname get dup lfigdict exch known { lfigdict exch get } { 30 string cvs } ifelse show ( Command: ) show $error /command get 30 string cvs show } stopped {} if showpage stop } def end % concat strings: lfigconcat % must be defined outside lfigdict since used in lfigpromotelabels /lfigconcat { 2 copy length exch length add string dup 0 4 index putinterval dup 3 index length 3 index putinterval 3 1 roll pop pop } def % lfigdebugprint - % must be defined outside lfigdict since used in arbitrary places % /lfigdebugprint % { print % (; operand stack:\n) print % count copy % count 2 idiv % { == % (\n) print % } repeat % (\n) print % } def /lfigdict 120 dict def lfigdict begin % error messages /dictfull (dictfull error: too many labels?) def /dictstackoverflow (dictstackoverflow error: labels nested too deeply?) def /execstackoverflow (execstackoverflow error: figure nested too deeply?) def /limitcheck (limitcheck error: figure nested too deeply or too large?) def /syntaxerror (syntaxerror error: syntax error in text of figure?) def /typecheck (typecheck error: syntax error in text of figure?) def /undefined (undefined error: unknown or misspelt label?) def /VMError (VMError error: run out of memory?) def % push pi onto stack: - lfigpi /lfigpi 3.14159 def % arc directions /clockwise false def /anticlockwise true def % maximum of two numbers: lfigmax /lfigmax { 2 copy gt { pop } { exch pop } ifelse } def % minimum of two numbers: lfigmin /lfigmin { 2 copy lt { pop } { exch pop } ifelse } def % add two points: lfigpadd /lfigpadd { exch 3 1 roll add 3 1 roll add exch } def % subtract first point from second: lfigpsub /lfigpsub { 3 2 roll sub 3 1 roll exch sub exch } def % max two points: lfigpmax /lfigpmax { exch 3 1 roll lfigmax 3 1 roll lfigmax exch } def % min two points: lfigpmin /lfigpmin { exch 3 1 roll lfigmin 3 1 roll lfigmin exch } def % scalar multiplication: lfigpmul /lfigpmul { dup 3 1 roll mul 3 1 roll mul exch } def % point at angle and distance: lfigatangle /lfigatangle { 2 copy cos mul 3 1 roll sin mul lfigpadd } def % angle from one point to another: lfigangle /lfigangle { lfigpsub 2 copy 0 eq exch 0 eq and {pop} {exch atan} ifelse } def % distance between two points: lfigdistance /lfigdistance { lfigpsub dup mul exch dup mul add sqrt } def % difference in x coords: lfigxdistance /lfigxdistance { pop 3 1 roll pop sub } def %difference in y coords: lfigydistance /lfigydistance { 3 1 roll pop sub exch pop } def % stroke a solid line: lfigsolid - /lfigsolid { pop pop [] 0 setdash stroke } def % stroke a lfigdashed line: lfigdashed - /lfigdashed { 2 copy div 2 le 1 index 0 le or { exch pop 1 pt lfigmax [ exch dup ] 0 setdash } { dup [ exch 4 2 roll 2 copy div 1 sub 2 div ceiling dup 4 1 roll 1 add mul sub exch div ] 0 setdash } ifelse stroke } def % stroke a lfigcdashed line: lfigcdashed - /lfigcdashed { 2 copy le 1 index 0 le or { exch pop 1 pt lfigmax [ exch dup ] dup 0 get 2 div setdash } { dup [ 4 2 roll exch 2 copy exch div 2 div ceiling div 1 index sub ] exch 2 div setdash } ifelse stroke } def % stroke a dotted line: lfigdotted - /lfigdotted { 2 copy le 1 index 0 le or { exch pop 1 pt lfigmax [ exch 0 exch ] 0 setdash } { 1 index exch div ceiling div [ 0 3 2 roll ] 0 setdash } ifelse stroke } def % stroke a noline line: lfignoline - /lfignoline { pop pop } def % painting (i.e. filling): - lfigwhite - (etc.) /lfignopaint { } def /lfignochange { fill } def /lfigdarkblue { 0.0 0.0 0.5 LoutSetRGBColor fill } def /lfigblue { 0.0 0.0 1.0 LoutSetRGBColor fill } def /lfiglightblue { 0.5 0.5 1.0 LoutSetRGBColor fill } def /lfigdarkgreen { 0.0 0.5 0.0 LoutSetRGBColor fill } def /lfiggreen { 0.0 1.0 0.0 LoutSetRGBColor fill } def /lfiglightgreen { 0.5 1.0 0.5 LoutSetRGBColor fill } def /lfigdarkred { 0.5 0.0 0.0 LoutSetRGBColor fill } def /lfigred { 1.0 0.0 0.0 LoutSetRGBColor fill } def /lfiglightred { 1.0 0.5 0.5 LoutSetRGBColor fill } def /lfigdarkcyan { 0.0 0.5 0.5 LoutSetRGBColor fill } def /lfigcyan { 0.0 1.0 1.0 LoutSetRGBColor fill } def /lfiglightcyan { 0.5 1.0 1.0 LoutSetRGBColor fill } def /lfigdarkmagenta { 0.5 0.0 0.5 LoutSetRGBColor fill } def /lfigmagenta { 1.0 0.0 1.0 LoutSetRGBColor fill } def /lfiglightmagenta { 1.0 0.5 1.0 LoutSetRGBColor fill } def /lfigdarkyellow { 0.5 0.5 0.0 LoutSetRGBColor fill } def /lfigyellow { 1.0 1.0 0.0 LoutSetRGBColor fill } def /lfiglightyellow { 1.0 1.0 0.5 LoutSetRGBColor fill } def /lfigdarkgray { 0.2 0.2 0.2 LoutSetRGBColor fill } def /lfiggray { 0.5 0.5 0.5 LoutSetRGBColor fill } def /lfiglightgray { 0.8 0.8 0.8 LoutSetRGBColor fill } def /lfigdarkgrey { 0.2 0.2 0.2 LoutSetRGBColor fill } def /lfiggrey { 0.5 0.5 0.5 LoutSetRGBColor fill } def /lfiglightgrey { 0.8 0.8 0.8 LoutSetRGBColor fill } def /lfigblack { 0.0 0.0 0.0 LoutSetRGBColor fill } def /lfigwhite { 1.0 1.0 1.0 LoutSetRGBColor fill } def % line caps (and joins, not currently used) /lfigbutt 0 def /lfiground 1 def /lfigprojecting 2 def /lfigmiter 0 def /lfigbevel 2 def % shape and labels of the @Box symbol /lfigbox { 0 0 /SW lfigpointdef xsize 0 /SE lfigpointdef xsize ysize /NE lfigpointdef 0 ysize /NW lfigpointdef SE 0.5 lfigpmul /S lfigpointdef NW 0.5 lfigpmul /W lfigpointdef W SE lfigpadd /E lfigpointdef S NW lfigpadd /N lfigpointdef NE 0.5 lfigpmul /CTR lfigpointdef [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef SW SE NE NW SW } def % shape and labels of the @CurveBox symbol /lfigcurvebox { xsize 0.5 mul ysize 0.5 mul /CTR lfigpointdef xsize 0.5 mul 0 /S lfigpointdef xsize ysize 0.5 mul /E lfigpointdef xsize 0.5 mul ysize /N lfigpointdef 0 ysize 0.5 mul /W lfigpointdef xmark 0.293 mul xmark 0.293 mul /SW lfigpointdef xsize xmark 0.293 mul sub xmark 0.293 mul /SE lfigpointdef xsize xmark 0.293 mul sub ysize xmark 0.293 mul sub /NE lfigpointdef xmark 0.293 mul ysize xmark 0.293 mul sub /NW lfigpointdef [ xsize ysize 0.5 lfigpmul xmark /lfigcurveboxcircum cvx ] lfigcircumdef xmark 0 xsize xmark sub 0 [ xsize xmark sub xmark ] xsize xmark xsize ysize xmark sub [ xsize xmark sub ysize xmark sub ] xsize xmark sub ysize xmark ysize [ xmark ysize xmark sub ] 0 ysize xmark sub 0 xmark [ xmark xmark ] xmark 0 } def % shadow of the @ShadowBox symbol % its shape and labels are done, somewhat inaccurately, with lfigbox /lfigshadow { xmark 2 mul 0 moveto xsize 0 lineto xsize ysize xmark 2 mul sub lineto xsize xmark sub ysize xmark 2 mul sub lineto xsize xmark sub xmark lineto xmark 2 mul xmark lineto closepath fill } def % shape and labels of the @Square symbol /lfigsquare { xsize ysize 0.5 lfigpmul /CTR lfigpointdef CTR xsize xsize ysize ysize lfigpmax 0.5 lfigpmul lfigpadd /NE lfigpointdef CTR 0 0 CTR NE lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef CTR 0 0 CTR NE lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef CTR 0 0 CTR NE lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef SW 0.5 lfigpmul SE 0.5 lfigpmul lfigpadd /S lfigpointdef NW 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /N lfigpointdef SW 0.5 lfigpmul NW 0.5 lfigpmul lfigpadd /W lfigpointdef SE 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /E lfigpointdef [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef SW SE NE NW SW } def % shape and labels of the @Diamond symbol /lfigdiamond { xsize 0 0.5 lfigpmul /S lfigpointdef 0 ysize 0.5 lfigpmul /W lfigpointdef S W lfigpadd /CTR lfigpointdef CTR W lfigpadd /N lfigpointdef CTR S lfigpadd /E lfigpointdef [ xsize ysize 0.5 lfigpmul /lfigdiamondcircum cvx ] lfigcircumdef S E N W S } def % shape and labels of the @Ellipse symbol /lfigellipse { xsize 0 0.5 lfigpmul /S lfigpointdef 0 ysize 0.5 lfigpmul /W lfigpointdef S W lfigpadd /CTR lfigpointdef CTR W lfigpadd /N lfigpointdef CTR S lfigpadd /E lfigpointdef CTR xsize 0 0.3536 lfigpmul lfigpadd 0 ysize 0.3536 lfigpmul lfigpadd /NE lfigpointdef 0 ysize 0.3536 lfigpmul CTR xsize 0 0.3536 lfigpmul lfigpadd lfigpsub /SE lfigpointdef xsize 0 0.3536 lfigpmul CTR lfigpsub 0 ysize 0.3536 lfigpmul lfigpadd /NW lfigpointdef 0 ysize 0.3536 lfigpmul xsize 0 0.3536 lfigpmul CTR lfigpsub lfigpsub /SW lfigpointdef [ xsize ysize 0.5 lfigpmul /lfigellipsecircum cvx ] lfigcircumdef S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S } def % shape and labels of the @Circle symbol /lfigcircle { xsize ysize 0.5 lfigpmul /CTR lfigpointdef CTR xsize 0 ysize 0 lfigpmax 0.5 lfigpmul lfigpadd /E lfigpointdef CTR 0 0 CTR E lfigdistance 45 lfigatangle lfigpadd /NE lfigpointdef CTR 0 0 CTR E lfigdistance 90 lfigatangle lfigpadd /N lfigpointdef CTR 0 0 CTR E lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef CTR 0 0 CTR E lfigdistance 180 lfigatangle lfigpadd /W lfigpointdef CTR 0 0 CTR E lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef CTR 0 0 CTR E lfigdistance 270 lfigatangle lfigpadd /S lfigpointdef CTR 0 0 CTR E lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef [ S E lfigpsub /lfigellipsecircum cvx ] lfigcircumdef S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S } def % shape and labels of the @HLine and @HArrow symbols /lfighline { 0 ymark lfigprevious /FROM lfigpointdef xsize ymark lfigprevious /TO lfigpointdef } def % shape and labels of the @VLine and @VArrow symbols /lfigvline { xmark ysize lfigprevious /FROM lfigpointdef xmark 0 lfigprevious /TO lfigpointdef } def % points of a polygon around base with given no of sides, vert init angle: % figpolygon ... /lfigpolygon { xsize ysize 0.5 lfigpmul /CTR lfigpointdef 90 sub CTR 2 copy lfigmax 5 3 roll [ 4 copy pop /lfigpolycircum cvx ] lfigcircumdef exch dup 360 exch div exch 1 1 3 2 roll { 4 string cvs (P) exch lfigconcat cvn 6 copy pop pop lfigatangle 2 copy 10 2 roll 3 2 roll lfigpointdef dup 3 1 roll add exch } for pop lfigatangle } def % next array element: lfiggetnext true % or false /lfiggetnext { 2 copy exch length ge { false } { 2 copy get exch 1 add exch true } ifelse } def % check whether thing is number: lfigisnumbertype /lfigisnumbertype { dup type dup /integertype eq exch /realtype eq or } def % check whether thing is an array: lfigisarraytype /lfigisarraytype { dup type /arraytype eq } def % get next item: lfiggetnextitem 0 % or 1 % or 2 /lfiggetnextitem { lfiggetnext { lfigisarraytype { 1 } { lfigisnumbertype { 3 1 roll lfiggetnext { lfigisnumbertype { 4 3 roll exch 2 } { pop 3 2 roll pop 0 } ifelse } { 3 2 roll pop 0 } ifelse } { pop 0 } ifelse } ifelse } { 0 } ifelse } def % set arc path: bool x1 y1 x2 y2 x0 y0 lfigsetarc % the path goes from x1 y1 to x2 y2 about centre x0 y0, % anticlockwise if bool is true else clockwise. % The orientations of backwards pointing and forwards pointing % arrowheads are returned in the two angles, and % the length of the arc is returned in . /lfigsetarc { 20 dict begin matrix currentmatrix 8 1 roll 2 copy translate 2 copy 8 2 roll 4 2 roll lfigpsub 6 2 roll lfigpsub dup /y1 exch def dup mul /y1s exch def dup /x1 exch def dup mul /x1s exch def dup /y2 exch def dup mul /y2s exch def dup /x2 exch def dup mul /x2s exch def y1s y2s eq { -1 } { y1s x2s mul y2s x1s mul sub y1s y2s sub div } ifelse /da exch def x1s x2s eq { -1 } { x1s y2s mul x2s y1s mul sub x1s x2s sub div } ifelse /db exch def da 0 gt db 0 gt and { /LMax da sqrt db sqrt lfigmax def /scalex da sqrt LMax div def /scaley db sqrt LMax div def scalex scaley scale 0 0 LMax 0 0 x1 scalex mul y1 scaley mul lfigangle 0 0 x2 scalex mul y2 scaley mul lfigangle 2 copy eq { 360 add } if 2 copy 8 2 roll 5 index { arc } { arcn } ifelse 2 index 1 index { 90 sub } { 90 add } ifelse dup sin scaley mul exch cos scalex mul atan 2 index 2 index { 90 add } { 90 sub } ifelse dup sin scaley mul exch cos scalex mul atan 5 2 roll % res1 res2 ang1 ang2 anticlockwise { exch sub } { sub } ifelse dup 0 le { 360 add } if lfigpi mul LMax mul 180 div } { 0 0 x1 y1 lfigdistance 0 0 x2 y2 lfigdistance eq 0 0 x1 y1 lfigdistance 0 gt and { 0 0 0 0 x1 y1 lfigdistance 0 0 x1 y1 lfigangle 0 0 x2 y2 lfigangle 2 copy eq { 360 add } if 2 copy 8 2 roll 5 index { arc } { arcn } ifelse 2 index 1 index { 90 sub } { 90 add } ifelse 2 index 2 index { 90 add } { 90 sub } ifelse 5 2 roll % res1 res2 ang1 ang2 clockwise { exch sub } { sub } ifelse dup 0 le { 360 add } if lfigpi mul 0 0 x1 y1 lfigdistance mul 180 div } { x2 y2 lineto pop x2 y2 x1 y1 lfigangle x1 y1 x2 y2 lfigangle x1 y1 x2 y2 lfigdistance } ifelse } ifelse 4 -1 roll setmatrix end } def % lfigsetcurve: set up a Bezier curve from x0 y0 to x3 y3 % and return arrowhead angles and length of curve (actually 0) % x0 y0 x1 y1 x2 y2 x3 y3 lfigsetcurve /lfigsetcurve { 8 copy curveto pop pop lfigangle 5 1 roll 4 2 roll lfigangle exch 0 } def % lfigpaintpath: paint a path of the given shape % /paint [ shape ] lfigpaintpath - /lfigpaintpath { 10 dict begin 0 newpath /prevseen false def /curveseen false def { lfiggetnextitem dup 0 eq { pop exit } { 1 eq { /curveseen true def /curve exch def curve length 0 eq { /curveseen false def } if } { /ycurr exch def /xcurr exch def prevseen { curveseen { curve length 4 eq { xprev yprev curve 0 get curve 1 get curve 2 get curve 3 get xcurr ycurr lfigsetcurve pop pop pop } { xprev yprev xcurr ycurr curve length 1 ge { curve 0 get } { 0 } ifelse curve length 2 ge { curve 1 get } { 0 } ifelse curve length 3 ge { curve 2 get } { true } ifelse 7 1 roll lfigsetarc pop pop pop } ifelse } { xcurr ycurr lineto } ifelse } { xcurr ycurr moveto } ifelse /xprev xcurr def /yprev ycurr def /prevseen true def /curveseen false def } ifelse } ifelse } loop pop pop cvx exec end } def % stroke a path of the given shape in the given linestyle and dash length. % Return the origin and angle of the backward and forward arrow heads. % dashlength /linestyle [shape] lfigdopath [ ] [ ] /lfigdopath { 10 dict begin 0 /prevseen false def /curveseen false def /backarrow [] def /fwdarrow [] def { lfiggetnextitem dup 0 eq { pop exit } { 1 eq { /curveseen true def /curve exch def curve length 0 eq { /prevseen false def } if } { /ycurr exch def /xcurr exch def prevseen { newpath xprev yprev moveto curveseen { curve length 4 eq { xprev yprev curve 0 get curve 1 get curve 2 get curve 3 get xcurr ycurr lfigsetcurve } { xprev yprev xcurr ycurr curve length 1 ge { curve 0 get } { 0 } ifelse curve length 2 ge { curve 1 get } { 0 } ifelse curve length 3 ge { curve 2 get } { true } ifelse 7 1 roll lfigsetarc } ifelse } { xcurr ycurr lineto xcurr ycurr xprev yprev lfigangle dup 180 sub xprev yprev xcurr ycurr lfigdistance } ifelse 6 index 6 index cvx exec [ xprev yprev 5 -1 roll ] backarrow length 0 eq { /backarrow exch def } { pop } ifelse [ xcurr ycurr 4 -1 roll ] /fwdarrow exch def } if /xprev xcurr def /yprev ycurr def /prevseen true def /curveseen false def } ifelse } ifelse } loop pop pop pop pop backarrow length 0 eq { [ 0 0 0 ] } { backarrow } ifelse fwdarrow length 0 eq { [ 0 0 0 ] } { fwdarrow } ifelse end } def % lfigdoarrow: draw an arrow head of given form % dashlength /lstyle /pstyle hfrac height width [ ] lfigdoarrow - /lfigdoarrow { matrix currentmatrix 8 1 roll dup 0 get 1 index 1 get translate 2 get rotate [ 2 index neg 2 index 0 0 3 index 3 index neg 1 index 10 index mul 0 7 index 7 index ] 4 1 roll pop pop pop dup 3 1 roll gsave lfigpaintpath grestore lfigdopath pop pop setmatrix } def % arrow head styles /lfigopen 0.0 def /lfighalfopen 0.5 def /lfigclosed 1.0 def % stroke no arrows, forward, back, and both /lfignoarrow { pop pop pop pop pop pop pop pop } def /lfigforward { 7 -1 roll lfigdoarrow pop } def /lfigback { 8 -2 roll pop lfigdoarrow } def /lfigboth { 8 -1 roll 7 copy lfigdoarrow pop 7 -1 roll lfigdoarrow } def % lfigprevious: return previous point on path /lfigprevious { lfigisnumbertype { 2 copy } { lfigisarraytype { 2 index 2 index } { 0 0 } ifelse } ifelse } def % label a point in 2nd top dictionary: /name lfigpointdef - /lfigpointdef { % (Entering lfigpointdef) lfigdebugprint [ 4 2 roll transform /itransform cvx ] cvx currentdict end 3 1 roll % currentdict length currentdict maxlength lt % { def } % { exec moveto (too many labels) show stop } % ifelse def begin % (Leaving lfigpointdef) lfigdebugprint } def % promote labels from second top to third top dictionary % lfigpromotelabels - /lfigpromotelabels { % (Entering lfigpromotelabels) lfigdebugprint currentdict end exch currentdict end { exch 20 string cvs 2 index (@) lfigconcat exch lfigconcat cvn exch def } forall pop begin % (Leaving lfigpromotelabels) lfigdebugprint } def % show labels (except CIRCUM): - lfigshowlabels - /lfigshowlabels { % (Entering lfigshowlabels) lfigdebugprint currentdict end currentdict { 1 index 20 string cvs (CIRCUM) search % if CIRCUM in key { pop pop pop pop pop } { pop cvx exec 2 copy newpath 1.5 pt 0 360 arc 0 setgray fill /Times-Roman findfont 8 pt scalefont setfont moveto 0.2 cm 0.1 cm rmoveto 20 string cvs show } ifelse } forall begin % (Leaving lfigshowlabels) lfigdebugprint } def % fix an angle to 0 <= res < 360: lfigfixangle /lfigfixangle { % (Entering lfigfixangle) lfigdebugprint { dup 0 ge { exit } if 360 add } loop { dup 360 lt { exit } if 360 sub } loop % (Leaving lfigfixangle) lfigdebugprint } def % find point on circumference of box: alpha a b lfigboxcircum x y /lfigboxcircum { % (Entering lfigboxcircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def 0 0 a b lfigangle /theta exch def % if alpha <= theta, return (a, a*tan(alpha)) alpha theta le { a a alpha sin mul alpha cos div } { % else if alpha <= 180 - theta, return (b*cot(alpha), b) alpha 180 theta sub le { b alpha cos mul alpha sin div b } { % else if alpha <= 180 + theta, return (-a, -a*tan(alpha)) alpha 180 theta add le { a neg a neg alpha sin mul alpha cos div } { % else if alpha <= 360 - theta, return (-b*cot(alpha), -b) alpha 360 theta sub le { b neg alpha cos mul alpha sin div b neg } { % else 360 - theta <= alpha, return (a, a*tan(alpha)) a a alpha sin mul alpha cos div } ifelse } ifelse } ifelse } ifelse end % (Leaving lfigboxcircum) lfigdebugprint } def % find quadratic roots (assume a != 0): a b c lfigqroots x1 x2 2 % or x2 1 % or 0 /lfigqroots { 4 dict begin /c exch def /b exch def /a exch def /disc b b mul 4 a c mul mul sub def disc 0 lt { 0 } { disc 0 eq { b neg 2 a mul div 1 } { b neg disc sqrt add 2 a mul div b neg disc sqrt sub 2 a mul div 2 } ifelse } ifelse end } def % work our which quadrant: lfigquadrant <0-3> /lfigquadrant { dup 90 lt { pop 0 } { dup 180 lt { pop 1 } { 270 lt { 2 } { 3 } ifelse } ifelse } ifelse } def % find curvebox circum, assuming upper right quadrant: alpha a b xmk lfigcb x y /lfigcb { 6 dict begin /xmk exch def /b exch def /a exch def /alpha exch def /theta1 0 0 a b xmk sub lfigangle def /theta2 0 0 a xmk sub b lfigangle def alpha theta1 le { % if alpha <= theta1, return (a, a*tan(alpha)) a a alpha sin mul alpha cos div } { alpha theta2 ge { % else if alpha > theta2, return (b*cot(alpha), b) b alpha cos mul alpha sin div b } { % else, return the intersection of line and circle a xmk sub b xmk sub xmk 0 0 alpha lfigcircleintersect dup 0 eq { % should never happen, just return any reasonable point pop a b 0.5 lfigpmul } { 1 eq { % should never happen, just return the point on top of stack } { % the usual case, two points on stack, return the larger lfigpmax } ifelse } ifelse } ifelse } ifelse end } def % find point on circumference of curvebox: alpha a b xmk lfigcurveboxcircum x y /lfigcurveboxcircum { % (Entering lfigcurveboxcircum) lfigdebugprint 5 dict begin /xmk exch def /b exch def /a exch def lfigfixangle /alpha exch def % work out which quadrant we are in, and reflect accordingly /quad alpha lfigquadrant def quad 0 eq { alpha a b xmk lfigcb } { quad 1 eq { 180 alpha sub a b xmk lfigcb exch neg exch } { quad 2 eq { alpha 180 sub a b xmk lfigcb neg exch neg exch } { 360 alpha sub a b xmk lfigcb neg } ifelse } ifelse } ifelse end % (Leaving lfigcurveboxcircum) lfigdebugprint } def % find point on circumference of diamond: alpha a b lfigdiamondcircum x y /lfigdiamondcircum { % (Entering lfigdiamondcircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def b alpha cos abs mul a alpha sin abs mul add /denom exch def a b mul alpha cos mul denom div a b mul alpha sin mul denom div end % (Leaving lfigdiamondcircum) lfigdebugprint } def % find point on circumference of ellipse: alpha a b lfigellipsecircum x y /lfigellipsecircum { % (Entering lfigellipsecircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def b alpha cos mul dup mul a alpha sin mul dup mul add sqrt /denom exch def a b mul alpha cos mul denom div a b mul alpha sin mul denom div end % (Leaving lfigellipsecircum) lfigdebugprint } def % find point of intersection of two lines each defined by two points % x1 y1 x2 y2 x3 y3 x4 y4 lfiglineintersect x y /lfiglineintersect { % (Entering lfiglineintersect) lfigdebugprint 13 dict begin /y4 exch def /x4 exch def /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def /x1 exch def x2 x1 sub /x21 exch def x4 x3 sub /x43 exch def y2 y1 sub /y21 exch def y4 y3 sub /y43 exch def y21 x43 mul y43 x21 mul sub /det exch def % calculate x y21 x43 mul x1 mul y43 x21 mul x3 mul sub y3 y1 sub x21 mul x43 mul add det div % calculate y x21 y43 mul y1 mul x43 y21 mul y3 mul sub x3 x1 sub y21 mul y43 mul add det neg div end % (Leaving lfiglineintersect) lfigdebugprint } def % find point on circumference of polygon % alpha radius num theta lfigpolycircum x y /lfigpolycircum { % (Entering lfigpolycircum) lfigdebugprint 13 dict begin /theta exch def /num exch def /radius exch def /alpha exch def % calculate delta, the angle from theta to alpha alpha theta sub lfigfixangle % calculate the angle which is the multiple of 360/num closest to delta 360 num div div truncate 360 num div mul theta add /anglea exch def % calculate the next multiple of 360/num after anglea anglea 360 num div add /angleb exch def % intersect the line through these two points with the alpha line anglea cos anglea sin angleb cos angleb sin 0 0 alpha cos 2 mul alpha sin 2 mul lfiglineintersect radius lfigpmul end % (Leaving lfigpolycircum) lfigdebugprint } def % find point of intersection of a point and a circle % x0 y0 r x1 y1 theta lfigcircleintersect xa ya xb yb 2 % or xb yb 1 % or 0 /lfigcircleintersect { % (Entering lfigcircleintersect) lfigdebugprint 15 dict begin /theta exch def /y1 exch def /x1 exch def /r exch def /y0 exch def /x0 exch def % if sin(theta) = 0 then line is horizontal and y must be y1 theta sin abs 0.00001 lt { /a 1 def /b -2 x0 mul def /c x0 dup mul y1 y0 sub dup mul add r dup mul sub def a b c lfigqroots dup 0 eq { pop 0 } { 1 eq { y1 1 } { y1 exch y1 2 } ifelse } ifelse } { /ct theta cos theta sin div def /a ct ct mul 1 add def /b ct x1 x0 sub mul y1 add y0 sub 2 mul def /c x1 x0 sub dup mul y1 y0 sub dup mul add r dup mul sub def a b c lfigqroots dup 0 eq { pop 0 } { 1 eq { y1 add /yb exch def yb y1 sub ct mul x1 add /xb exch def xb yb 1 } { y1 add /ya exch def ya y1 sub ct mul x1 add /xa exch def y1 add /yb exch def yb y1 sub ct mul x1 add /xb exch def xa ya xb yb 2 } ifelse } ifelse } ifelse end % (Leaving lfigcircleintersect) lfigdebugprint } def % add CIRCUM operator with this body: lfigcircumdef - /lfigcircumdef { % (Entering lfigcircumdef) lfigdebugprint /CIRCUM exch cvx currentdict end 3 1 roll % currentdict length currentdict maxlength lt % { def } % { exec moveto (too many labels) show stop } % ifelse def begin % (Leaving lfigcircumdef) lfigdebugprint } def end %%EndResource %%BeginResource: procset LoutBasicSetup % @PrependGraphic file /home/jeff/lout.lib/include/bsf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @BasicSetup % % % % This file has been placed in the public domain by its author, % % Jeffrey H. Kingston % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % width height linethickness louteuro - % draw a Euro symbol of this width and height with this line thickness /louteuro { 20 dict begin /eurothick exch def /euroheight exch def /eurowidth exch def /eurostrokewidth euroheight 0.8 mul def /eurostep eurothick 60 cos mul 60 sin div def /eurotheta 40 def % llx lly width thickness louteurobox - % draw angled box starting at (llx, lly) with given width and thickness /louteurobox { /euroboxthick exch def /euroboxwidth exch def newpath moveto euroboxwidth 0 rlineto eurostep euroboxthick rlineto euroboxwidth neg 0 rlineto closepath fill } def % lower cross stroke 0 euroheight 2 div eurothick 1.5 mul sub eurostrokewidth eurothick louteurobox % upper cross stroke 0 euroheight 2 div eurothick 0.5 mul add eurostrokewidth eurostep 2 mul add eurothick louteurobox % circular part /eurohctr eurowidth euroheight 2 div eurotheta cos mul sub def /eurovctr euroheight 2 div def newpath eurohctr eurovctr eurovctr eurotheta 350 eurotheta sub arc eurohctr eurovctr eurovctr eurothick sub 365 eurotheta sub eurotheta arcn closepath fill end } def % path for @FullWidthRule symbol /LoutRule { 0 0 moveto xsize 0 lineto } def % path for @Box symbol /LoutBox { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath } def % path for @CurveBox symbol /LoutCurveBox { xmark 0 moveto xsize xmark sub xmark xmark 270 360 arc xsize xmark sub ysize xmark sub xmark 0 90 arc xmark ysize xmark sub xmark 90 180 arc xmark xmark xmark 180 270 arc closepath } def % path for @ShadowBox symbol /LoutShadowBox { xmark 2 mul 0 moveto xsize 0 lineto xsize ysize xmark 2 mul sub lineto xsize xmark sub ysize xmark 2 mul sub lineto xsize xmark sub xmark lineto xmark 2 mul xmark lineto closepath } def % set up dictionary containing margin note data: parity LoutMargSet - /LoutMargSet { /LoutMargDict 12 dict def LoutMargDict begin /parity exch def /matr matrix currentmatrix def /rightx xsize def /lefty ysize def % highest allowable point for top of next left note /righty ysize def % highest allowable point for top of next right note /max { 2 copy gt { pop } { exch pop } ifelse } def /min { 2 copy lt { pop } { exch pop } ifelse } def end } def %translate coordinate system for marginal notes: type LoutMargShift - % where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner /LoutMargShift { LoutMargDict begin % y coordinate of top of note, in margin coords, before vertical adjust 0 ysize transform matr itransform exch pop % decide whether left or right margin based on type and parity exch [ 0 1 parity 1 parity sub ] exch get 0 eq { % left margin: adjust top of note downwards if overlaps previous note lefty min % bottom of note is new lefty position and also translate position ysize sub dup /lefty exch def % want right edge of note at coordinate zero xsize neg exch } { % right margin: adjust top of note downwards if overlaps previous note righty min % bottom of note is new righty position and also translate position ysize sub dup /righty exch def % want left edge of note at coordinate rightx rightx exch } ifelse % stack now contains coord of bottom left corner in margin coordinates matr setmatrix translate end } def % create LoutPageDict with left, right, foot, top for @Place symbol users /LoutPageSet { /LoutPageDict 5 dict def LoutPageDict begin /matr matrix currentmatrix def /left 0 def /right xsize def /foot 0 def /top ysize def end } def %%EndResource %%EndProlog %%BeginSetup %%BeginResource: encoding vec2 /vec2 [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /quotesinglbase /quotedblbase /ellipsis /OE /oe /quotedblleft /quotedblright /fi /fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse %%EndSetup %%Page: i 1 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 14006 0 14006 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 240 fnt2 2897 12401(The)m 3352(Design)s 4099(and)s 4540(Implementation)s 4239 11998(of)m 4511(the)s 2589 11595(Lout)m 3141(Document)s 4250(F)s 6(ormatting)k 5468(Language)s 240 fnt3 3630 11097(J)m 6(ef)k 4(fr)k 8(e)k 7(y)k 4310(H.)s 4577(Kingston)s 240 fnt1 2551 10596(Basser)m 3248(Department)s 4436(of)s 4707(Computer)s 5724(Science,)s 3007 10308(The)m 3435(Uni)s 6(v)k 3(ersity)k 4489(of)s 4760(Sydne)s 3(y)k 5530(2006,)s 4095 10020(Australia)m 3739 9568(27)m 4027(January)s 15(,)k 4863(1993)s 240 fnt2 3901 8775(SUMMAR)m 8(Y)k 240 fnt1 0 8320(Lout)m 543(is)s 784(a)s 982(high-le)s 6(v)k 3(el)k 2028(language)s 2979(for)s 3349(document)s 4384(formatting,)s 5530(whose)s 6230(ease)s 6728(of)s 7030(use)s 7437(has)s 7838(permitted)s 8843(an)s 0 8032(unprecedented)m 1501(number)s 2340(of)s 2659(adv)s 6(anced)k 3663(features)s 4517(to)s 4804(be)s 5134(added)s 5812(quickly)s 6632(and)s 7084(reliably)s 15(.)k 8010(This)s 8535(paper)s 0 7744(charts)m 625(the)s 978(e)s 6(v)k 4(olution)k 1933(of)s 2209(the)s 2561(design)s 3248(and)s 3656(implementation)s 5218(of)s 5493(Lout)s 6010(from)s 6538(conception)s 7650(in)s 7897(mid-1984)s 8887(to)s 0 7456(public)m 672(release)s 1412(in)s 1677(October)s 2529(1991.)s 3194(It)s 3421(includes)s 4291(e)s 3(xtensi)k 6(v)k 3(e)k 5260(discussions)s 6422(of)s 6715(remaining)s 7759(problems)s 8722(and)s 0 7168(possible)m 840(solutions.)s 240 fnt2 0 6664(K)m 6(eyw)k 2(ords)k 240 fnt1 1143 6665(document)m 2147(formatting)s 3208(typesetting)s grestore gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 1 2 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 14006 0 14006 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 240 fnt2 2897 12401(The)m 3352(Design)s 4099(and)s 4540(Implementation)s 4239 11998(of)m 4511(the)s 2589 11595(Lout)m 3141(Document)s 4250(F)s 6(ormatting)k 5468(Language)s 240 fnt3 3630 11097(J)m 6(ef)k 4(fr)k 8(e)k 7(y)k 4310(H.)s 4577(Kingston)s 240 fnt1 2551 10596(Basser)m 3248(Department)s 4436(of)s 4707(Computer)s 5724(Science,)s 3007 10308(The)m 3435(Uni)s 6(v)k 3(ersity)k 4489(of)s 4760(Sydne)s 3(y)k 5530(2006,)s 4095 10020(Australia)m 3739 9568(27)m 4027(January)s 15(,)k 4863(1993)s 240 fnt2 0 8926(1.)m 291(Intr)s 4(oduction)k [ /Dest /LOUT18_694_s1_0_1 /DEST pdfmark 240 fnt1 480 8495(Lout)m 985([1,)s 1284(2])s 1515(is)s 1718(a)s 1877(high-le)s 6(v)k 3(el)k 2885(language)s 3798(for)s 4129(document)s 5126(formatting,)s 6234(designed)s 7136(and)s 7533(implemented)s 8832(by)s 0 8207(the)m 341(author)s 13(.)k 1096(The)s 1517(implementation,)s 3117(kno)s 6(wn)k 3814(as)s 4057(Basser)s 4747(Lout,)s 5299(is)s 5502(a)s 5661(fully)s 6159(operational)s 7282(production)s 8368(v)s 3(ersion)k 0 7919(written)m 736(in)s 983(C)s 1198(for)s 1540(the)s 1891(Unix)s 2429(operating)s 3389(system,)s 153 fnt1 4100 8008(1)m 240 fnt1 4223 7919(which)m 4869(translates)s 5824(Lout)s 6340(source)s 7023(code)s 7535(into)s 7964(PostScript,)s 153 fnt1 8993 8008(2)m 240 fnt1 0 7631(a)m 201(de)s 6(vice-independent)k 2164(graphics)s 3061(rendering)s 4066(language)s 5021(accepted)s 5951(by)s 6281(man)s 3(y)k 6900(high-resolution)s 8454(output)s 0 7343(de)m 6(vices,)k 833(including)s 1805(most)s 2346(laser)s 2871(printers.)s 3779(Basser)s 4492(Lout)s 5019(is)s 5244(a)s 4(v)k 6(ailable)k 6168(free)s 6609(of)s 6895(char)s 4(ge)k 7600([3].)s 8057(It)s 8278(includes)s 0 7055(installation)m 1118(instructions,)s 2339(C)s 2550(source,)s 3281(se)s 6(v)k 3(en)k 3873(standard)s 4740(packages,)s 5723(and)s 6127(complete)s 7058(documentation)s 8536(in)s 8778(the)s 0 6767(form)m 524(of)s 795(six)s 1129(technical)s 2046(reports)s 2760(and)s 3164(a)s 3330(manual)s 4089(page.)s 480 6393(The)m 900(Lout)s 1404(project)s 2118(arose)s 2670(out)s 3027(of)s 3290(the)s 3629(author')s 13(s)k 4442(desire)s 5060(to)s 5290(bring)s 5840(to)s 6070(document)s 7066(formatting)s 8118(languages)s 0 6105(the)m 343(ele)s 3(g)k 1(ance)k 1225(of)s 1491(e)s 3(xpression)k 2562(found)s 3174(in)s 3411(programming)s 4761(languages)s 5763(lik)s 2(e)k 6170(Algol-)s 6783(60)s 7072(and)s 7471(P)s 3(ascal.)k 8236(This)s 8706(em-)s 0 5817(phasis)m 638(on)s 924(e)s 3(xpressi)k 6(v)k 3(eness)k 2373(has)s 2731(produced)s 3669(an)s 3941(order)s 4493(of)s 4753(magnitude)s 5808(reduction)s 6757(in)s 6988(the)s 7325(cost)s 7759(of)s 8018(de)s 6(v)k 3(eloping)k 0 5529(document)m 998(formatting)s 2053(applications.)s 3366(F)s 3(or)k 3748(e)s 3(xample,)k 4656(an)s 4933(equation)s 5807(formatting)s 6862(application,)s 8025(which)s 8660(may)s 0 5241(be)m 282(dif\207cult)s 1098(or)s 1357(impossible)s 2449(to)s 2688(add)s 3092(to)s 3331(other)s 3882(systems,)s 4746(can)s 5135(be)s 5417(written)s 6150(in)s 6393(Lout)s 6905(in)s 7148(a)s 7314(fe)s 6(w)k 7720(days.)s 480 4867(When)m 1099(e)s 3(xpert)k 1742(users)s 2274(can)s 2652(implement)s 3724(such)s 4209(applications)s 5405(quickly)s 15(,)k 6204(non-)s 6632(e)s 3(xperts)k 7360(bene\207t.)s 8164(Although)s 0 4579(Lout)m 509(itself)s 1053(pro)s 3(vides)k 1922(only)s 2398(a)s 2560(small)s 3129(k)s 2(ernel)k 3775(of)s 4042(carefully)s 4941(chosen)s 5659(primiti)s 6(v)k 3(es,)k 6721(packages)s 7646(written)s 8375(in)s 8614(Lout)s 0 4291(and)m 399(distrib)s 4(uted)k 1470(with)s 1946(Basser)s 2638(Lout)s 3145(pro)s 3(vide)k 3923(an)s 4201(unprecedented)s 5649(array)s 6187(of)s 6453(adv)s 6(anced)k 7404(features)s 8204(in)s 8442(a)s 8602(form)s 0 4003(accessible)m 1035(to)s 1286(non-)s 1714(e)s 3(xpert)k 2380(users.)s 3047(The)s 3487(features)s 4305(include)s 5076(rotation)s 5888(and)s 6304(scaling,)s 7100(fonts,)s 7697(paragraph)s 8722(and)s 0 3715(page)m 500(breaking,)s 1435(displays)s 2262(and)s 2657(lists,)s 3139(\210oating)s 3915(\207gures)s 4608(and)s 5004(tables,)s 5659(footnotes,)s 6647(chapters)s 7486(and)s 7881(sections)s 8693(\(au-)s 0 3427(tomatically)m 1128(numbered\),)s 2272(running)s 3070(page)s 3579(headers)s 4361(and)s 4765(footers,)s 5536(odd-)s 5964(e)s 6(v)k 3(en)k 6464(page)s 6973(layouts,)s 7772(automatically)s 0 3139(generated)m 975(tables)s 1570(of)s 1829(contents,)s 2720(sorted)s 3350(inde)s 3(x)k 3(es)k 4113(and)s 4505(reference)s 5435(lists,)s 5914(bibliographic)s 7229(and)s 7621(other)s 8159(databases)s 0 2851(\(including)m 1038(databases)s 2008(of)s 2281(formats)s 3064(for)s 3405(printing)s 4217(references\),)s 5386(equations,)s 6412(tables,)s 7079(diagrams,)s 8065(formatting)s 0 2563(of)m 271(P)s 3(ascal)k 933(programs,)s 1943(and)s 2347(automatically)s 3701(maintained)s 4821(cross)s 5363(references.)s 480 2189(This)m 1015(paper)s 1666(charts)s 2347(the)s 2755(e)s 6(v)k 4(olution)k 3766(of)s 4097(Lout)s 4669(from)s 5253(conception)s 6420(in)s 6723(mid-1984)s 7768(to)s 8067(the)s 8475(public)s 0 1901(release)m 722(of)s 997(Basser)s 1699(Lout)s 2215(in)s 2462(October)s 3297(1991.)s 3945(Lout)s 4461(is)s 4676(or)s 4(g)k 1(anized)k 5676(around)s 6403(four)s 6866(k)s 2(e)k 3(y)k 7265(concepts)s 8157(\211)s 8342(objects,)s 0 1613(de\207nitions,)m 1131(g)s 1(alle)k 3(ys,)k 1925(and)s 2343(cross)s 2899(references)s 3944(\211)s 4138(and)s 4556(the)s 3(y)k 5033(were)s 5567(de)s 6(v)k 3(eloped)k 6614(in)s 6871(the)s 7233(order)s 7811(listed,)s 8449(so)s 8730(this)s 0 1325(paper)m 593(will)s 1022(treat)s 1508(each)s 2006(in)s 2252(turn,)s 2747(discussing)s 3800(its)s 4079(design,)s 4814(implementation,)s 6424(problems,)s 7424(and)s 7831(prospects)s 8788(for)s 1134 0 0 0 240 288 60 0 574 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 122 fnt1 0 379(1)m 192 fnt1 58 309(Unix)m 485(is)s 653(a)s 786(trademark)s 1609(of)s 1825(A)s 21(T&T)k 2370(Bell)s 2733(Laboratories.)s 122 fnt1 0 112(2)m 192 fnt1 67 42(PostScript)m 900(is)s 1068(a)s 1201(trademark)s 2024(of)s 2240(Adobe)s 2796(Systems,)s 3519(Incorporated.)s grestore gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 2 3 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Symbol %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5765 -1579(-)m 5893(2)s 6067(-)s 9066 13419 0 13310 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13256(further)m 709(impro)s 3(v)k 3(ement.)k 240 fnt2 0 12463(2.)m 291(Objects)s [ /Dest /LOUT18_694_s2_0_1 /DEST pdfmark 240 fnt1 480 11987(The)m 923(essence)s 1725(of)s 2011(an)s 3(y)k 2424(mo)s 3(v)k 3(e)k 3021(to)s 3276(a)s 3457(higher)s 4144(le)s 6(v)k 3(el)k 4669(is)s 4895(the)s 5258(introduction)s 6500(of)s 6786(some)s 7363(abstraction)s 8484(which)s 0 11699(serv)m 3(es)k 639(to)s 872(or)s 4(g)k 1(anize)k 1740(the)s 2082(lo)s 6(w-)k 2503(le)s 6(v)k 3(el)k 3006(operations,)s 4103(resulting)s 4986(in)s 5223(a)s 5383(more)s 5923(succinct)s 6760(e)s 3(xpression)k 7831(of)s 8096(their)s 8586(com-)s 0 11411(mon)m 475(combinations)s 1806(at)s 2030(the)s 2369(cost)s 2805(of)s 3068(some)s 3620(loss)s 4034(of)s 4297(detailed)s 5102(control.)s 5934(The)s 6354(early)s 6876(part)s 7298(of)s 7561(the)s 7900(Lout)s 8403(project)s 0 11123(w)m 2(as)k 426(spent)s 996(in)s 1245(the)s 1598(de)s 6(v)k 3(elopment)k 2891(of)s 3167(such)s 3668(an)s 3957(abstraction)s 5067(for)s 5411(the)s 5764(b)s 4(uilding)k 6616(blocks)s 7298(of)s 7574(documents,)s 8724(one)s 0 10835(which)m 635(could)s 1217(e)s 3(xplain,)k 2017(not)s 2375(just)s 2772(the)s 3113(simple)s 3798(phenomena)s 4954(of)s 5217(w)s 2(ords,)k 5899(lines,)s 6450(and)s 6846(paragraphs,)s 7994(b)s 4(ut)k 8348(also)s 8778(the)s 0 10547(alignment)m 1016(of)s 1287(columns)s 2149(in)s 2392(tables,)s 3056(and)s 3460(the)s 3808(comple)s 3(x)k 4684(nested)s 5353(structures)s 6332(of)s 6603(equations.)s 240 fnt2 0 9898(2.1.)m 471(The)s 926(genesis)s 1697(of)s 1969(the)s 2343(object)s 3026(abstraction)s [ /Dest /LOUTgenesis /DEST pdfmark 240 fnt1 480 9421(When)m 1163(one)s 1620(e)s 3(xamines)k 2626(pre)s 6(vious)k 3549(document)s 4608(formatting)s 5724(systems)s 6587([4])s 6958(looking)s 7798(for)s 8191(ideas)s 8788(for)s 0 9133(abstractions,)m 1245(as)s 1492(the)s 1837(author)s 2505(did)s 2866(in)s 3106(1984,)s 3690(the)s 4035(Eqn)s 4475(formatting)s 5533(language)s 6450([5])s 6764(stands)s 7410(out)s 7773(lik)s 2(e)k 8182(a)s 8344(beacon.)s 0 8845(In)m 256(Eqn,)s 749(a)s 915(mathematical)s 2256(formula)s 3072(such)s 3568(as)s 168 fnt4 586 8390(2)m 240 fnt3 480 8330(x)m 240 fnt4 738 8322(+)m 939(1)s gsave 480 8274 translate 240 fnt3 553 0 0 0 240 288 12 LoutGraphic gsave 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 700 8046(4)m 240 fnt1 0 7535(is)m 210(produced)s 1159(by)s 1453(typing)s 220 fnt5 480 7037({ x sup 2 + 1 } o)m 3(v)k 5(er 4)k 240 fnt1 0 6541(in)m 261(the)s 627(input)s 1197(\207le;)s 220 fnt5 1632 6538(sup)m 240 fnt1 2056 6541(and)m 220 fnt5 2478 6538(o)m 3(v)k 5(er)k 240 fnt1 2975 6541(are)m 3340(binary)s 4023(operators,)s 5037(and)s 5459(braces)s 6138(are)s 6503(used)s 7018(for)s 7374(grouping.)s 8421(This)s 8916(is)s 0 6253(document)m 1017(formatting)s 2091(at)s 2337(a)s 2516(v)s 3(ery)k 3006(high)s 3502(le)s 6(v)k 3(el,)k 4077(close)s 4638(to)s 4890(the)s 5252(language)s 6185(of)s 6469(mathematics)s 7741(itself,)s 8337(with)s 8833(all)s 0 5965(reference)m 943(to)s 1182(font)s 1627(changes)s 2449(and)s 2853(spacing)s 3637(suppressed.)s 480 5591(Eqn)m 916(pro)s 3(vides)k 1780(a)s 1938(single)s 2557(data)s 3008(type)s 3468(\(let)s 3837(us)s 4093(call)s 4485(it)s 4669(the)s 240 fnt3 5009 5593(e)m 4(xpr)k 8(ession)k 240 fnt1 6014 5591(\),)m 6192(b)s 4(uilt)k 6679(up)s 6964(recursi)s 6(v)k 3(ely)k 8062(in)s 8297(conte)s 3(xt-)k 0 5303(free)m 457(style:)s 1106(where)s 1778(one)s 2212(e)s 3(xpression)k 3321(may)s 3819(appear)s 9(,)k 4586(an)s 3(y)k 5015(e)s 3(xpression)k 6124(may)s 6622(appear)s 13(.)k 7442(This)s 7950(approach)s 8916(is)s 0 5015(common)m 905(in)s 1158(algebra)s 1931(and)s 2345(programming)s 3710(languages,)s 4785(where)s 5435(its)s 5721(simplicity)s 6740(and)s 7154(e)s 3(xpressi)k 6(v)k 3(eness)k 8625(ha)s 4(v)k 3(e)k 0 4727(long)m 479(been)s 987(appreciated;)s 2199(b)s 4(ut)k 2560(Eqn)s 3002(w)s 2(as)k 3423(the)s 3770(\207rst)s 4200(language)s 5119(to)s 5357(demonstrate)s 6581(its)s 6856(utility)s 7479(in)s 7721(document)s 8724(for)s 4(-)k 0 4439(matting.)m 480 4065(Each)m 1015(e)s 3(xpression)k 2092(is)s 2302(treated)s 3009(by)s 3304(Eqn)s 3747(as)s 3997(a)s 4163(rectangle)s 5094(with)s 5577(a)s 240 fnt3 5743 4067(horizontal)m 6787(axis)s 240 fnt1 7167 4065(,)m 7274(used)s 7771(for)s 8110(alignment)s 0 3777(with)m 482(adjacent)s 1338(e)s 3(xpressions:)k 553 519 0 288 240 288 60 480 2918 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 553 519 0 288 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 553 519 0 288 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd ] lfigdopath pop pop grestore 168 fnt4 106 404(2)m 240 fnt3 0 344(x)m 240 fnt4 258 336(+)m 459(1)s gsave 0 288 translate 240 fnt3 553 0 0 0 240 288 12 LoutGraphic gsave 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 220 60(4)m grestore grestore end end restore grestore 0 2467(The)m 425(size)s 848(and)s 1248(rendering)s 2213(of)s 2481(the)s 2825(e)s 3(xpression)k 3898(on)s 4191(the)s 4536(printed)s 5267(page)s 5771(are)s 6114(kno)s 6(wn)k 6815(only)s 7291(to)s 7526(the)s 7870(implementa-)s 0 2179(tion,)m 481(ne)s 6(v)k 3(er)k 1066(e)s 3(xplicitly)k 2021(calculated)s 3050(or)s 3312(accessed)s 4208(by)s 4505(the)s 4855(user)s 13(.)k 5407(This)s 5886(prohibition)s 7008(is)s 7221(crucial)s 7927(to)s 8169(the)s 8520(main-)s 0 1891(tenance)m 785(of)s 1055(the)s 1402(conte)s 3(xt-)k 2171(free)s 2596(property)s 3459(in)s 3701(practice.)s 4619(In)s 4874(Lout,)s 5432(for)s 5769(e)s 3(xample,)k 6682(equations,)s 7705(\207gures,)s 8462(tables,)s 0 1603(and)m 393(arbitrary)s 1256(objects)s 1972(may)s 2427(be)s 2697(mix)s 3(ed)k 3338(together)s 4169(freely)s 15(.)k 4863(This)s 5327(w)s 2(ould)k 5970(be)s 6241(impossible)s 7321(if)s 7526(size)s 7941(information)s 0 1315(w)m 2(as)k 421(hidden)s 1130(from)s 1654(the)s 2002(implementation)s 3559(in)s 3802(user)s 4260(calculations.)s 480 941(The)m 927(object)s 1591(abstraction)s 2715(of)s 3006(Lout)s 3537(is)s 3767(a)s 3952(direct)s 4575(descendant)s 5717(of)s 6008(the)s 6375(Eqn)s 6838(e)s 3(xpression.)k 8041(It)s 8266(emplo)s 2(ys)k 0 653(the)m 385(same)s 969(conte)s 3(xt-free)k 2212(recursi)s 6(v)k 3(e)k 3171(style)s 3715(of)s 4023(construction,)s 5350(and)s 5791(each)s 6323(object)s 7004(is)s 7251(treated)s 7995(by)s 8326(Lout)s 8876(as)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 3 4 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Symbol %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5770 -1579(-)m 5898(3)s 6062(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13253(a)m 166(rectangle:)s 1701 453 567 198 240 288 60 480 12460 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1701 453 567 198 240 288 60 0 0 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1701 453 567 198 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1701 453 567 198 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore grestore grestore end end restore grestore end end restore grestore 0 12007(The)m 442(horizontal)s 1481(axis,)s 1987(called)s 2630(a)s 240 fnt3 2810 12009(r)m 10(ow)k 3244(mark)s 240 fnt1 3814 12007(in)m 4072(Lout,)s 4645(has)s 5030(a)s 5210(v)s 3(ertical)k 5992(analogue)s 6926(called)s 7569(a)s 240 fnt3 7749 12009(column)m 8523(mark)s 240 fnt1 9019 12007(,)m 0 11719(creating)m 822(a)s 988(v)s 6(aluable)k 1848(symmetry)s 2857(between)s 3711(horizontal)s 4735(and)s 5139(v)s 3(ertical.)k 6014(Multiple)s 6893(column)s 7668(and)s 8072(ro)s 6(w)k 8491(marks)s 0 11431(are)m 347(permitted:)s 1984 1189 0 1189 240 288 60 480 9902 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 680 453 0 453 240 288 60 0 736 LoutGr2 currentdict end 200 dict begin begin grestore 680 453 0 453 240 288 60 0 0 LoutGr2 /lfiggrey [ lfigbox ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (A) lfigpromotelabels grestore 737 453 0 453 240 288 60 1247 736 LoutGr2 currentdict end 200 dict begin begin grestore 567 453 0 453 240 288 60 0 0 LoutGr2 /lfiggrey [ lfigbox ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (B) lfigpromotelabels grestore 680 453 0 453 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 396 453 0 453 240 288 60 0 0 LoutGr2 /lfiggrey [ lfigbox ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (C) lfigpromotelabels grestore 737 453 0 453 240 288 60 1247 0 LoutGr2 currentdict end 200 dict begin begin grestore 737 453 0 453 240 288 60 0 0 LoutGr2 /lfiggrey [ lfigbox ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (D) lfigpromotelabels grestore 0 0 0 0 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ 0.3 cm 0 A@W lfigpsub lfigprevious /FROM lfigpointdef B@W 1.6 cm 0 lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 0 0 0 0 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ 0.3 cm 0 C@W lfigpsub lfigprevious /FROM lfigpointdef D@W 1.6 cm 0 lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 0 0 0 0 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ A@NW 0 0.3 cm lfigpadd lfigprevious /FROM lfigpointdef 0 0.3 cm C@SW lfigpsub lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 0 0 0 0 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ B@NW 0.3 cm 0.3 cm lfigpadd lfigprevious /FROM lfigpointdef D@SW 0.3 cm -0.3 cm lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 0 9451(so)m 266(that)s 684(objects)s 1412(are)s 1759(able)s 2213(to)s 2452(represent)s 3387(tables.)s 480 9077(This)m 946(abstraction)s 2041(has)s 2401(some)s 2952(limitations,)s 4069(the)s 4407(most)s 4922(ob)s 3(vious)k 5719(being)s 6293(the)s 6631(restriction)s 7645(of)s 7906(size)s 8322(calcula-)s 0 8789(tions)m 507(to)s 736(rectangular)s 1860(bounding)s 2809(box)s 3(es.)k 3519(Non-)s 4000(rectangular)s 5124(and)s 5518(disconnected)s 6815(shapes)s 7494(arise)s 7990(naturally)s 8883(in)s 0 8501(\207gures)m 704(and)s 1111(in)s 1356(the)s 1707(characters)s 2727(of)s 3001(fonts;)s 3594(the)s 3944(e)s 3(xtension)k 4918(to)s 5159(them)s 5700(is)s 5912(conceptually)s 7191(straightforw)s 2(ard)k 8722(and)s 0 8213(might)m 615(help)s 1076(to)s 1311(e)s 3(xplain)k 2065(some)s 2622(\207ne)s 3033(points)s 3665(of)s 3933(layout)s 4587(such)s 5079(as)s 5325(k)s 2(erning.)k 6214(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 7170(there)s 7699(are)s 8042(implemen-)s 0 7925(tation)m 599(and)s 1001(language)s 1918(design)s 2598(problems,)s 3592(particularly)s 4744(when)s 5317(\207lling)s 5939(non-)s 6367(rectangular)s 7498(shapes)s 8185(with)s 8664(te)s 3(xt,)k 0 7637(and)m 404(so)s 670(the)s 1018(author)s 1689(chose)s 2290(to)s 2529(k)s 2(eep)k 3032(to)s 3271(Eqn')s 13(s)k 3867(rectangles.)s 480 7263(A)m 766(more)s 1370(fundamental)s 2676(limitation)s 3718(of)s 4045(the)s 4450(object)s 5151(abstraction)s 6312(arises)s 6963(from)s 7543(the)s 7948(inability)s 8855(of)s 0 6975(recursi)m 6(v)k 3(e)k 936(data)s 1408(types)s 1978(to)s 2231(describe)s 3097(cross-link)s 2(ed)k 4335(structures,)s 5384(which)s 6040(seem)s 6605(to)s 6858(require)s 7604(some)s 8179(means)s 8855(of)s 0 6687(naming)m 756(the)s 1089(multiply)s 1938(referenced)s 2988(parts.)s 3601(Lout)s 4098(is)s 4293(obliged)s 5054(to)s 5278(introduce)s 6222(additional)s 7218(abstractions)s 8395(to)s 8618(cope)s 0 6399(with)m 490(cross)s 1040(linking:)s 1892(g)s 1(alle)k 3(ys)k 2624(for)s 2970(inserting)s 3867(te)s 3(xt)k 4291(into)s 4724(pages)s 5328(\(Section)s 6189(5.1\),)s 6683(cross)s 7233(references)s 8273(\(Section)s 0 6111(6.1\),)m 490(and)s 898(labelled)s 1716(points)s 2356(in)s 2603(\207gure)s 3221(dra)s 3(wing)k 4059([6].)s 4506(An)s 4860(abstraction)s 5969(closer)s 6603(to)s 6846(h)s 1(yperte)k 3(xt)k 7809(might)s 8431(form)s 8960(a)s 0 5823(more)m 547(uni\207ed)s 1270(basis)s 1799(for)s 2137(these)s 2684(features.)s 240 fnt2 0 5224(2.2.)m 471(Grammatical)s 1893(and)s 2334(lexical)s 3039(structur)s 4(e)k [ /Dest /LOUTlexical /DEST pdfmark 240 fnt1 480 4792(If)m 700(objects)s 1417(are)s 1754(to)s 1982(be)s 2253(constructed)s 3403(lik)s 2(e)k 3804(mathematical)s 5134(e)s 3(xpressions,)k 6344(the)s 6681(natural)s 7388(notation)s 8219(is)s 8418(a)s 8573(func-)s 0 4504(tional)m 599(language)s 1519(based)s 2122(on)s 2419(operators,)s 3415(as)s 3665(in)s 3908(Eqn.)s 4458(The)s 4886(grammar)s 5808(of)s 6079(Lout)s 6591(objects)s 7319(is)s 7529(accordingly)s 240 fnt4 1332 3945(\256)m 1332 3612(\256)m 1332 3279(\256)m 1332 2995(\256)m 1332 2662(\256)m 1332 2368(\256)m 1332 2035(\256)m 1332 1751(\256)m 240 fnt3 480 3953(object)m 1826(object)s 2498(in\207xop)s 3227(object)s 1826 3620(pr)m 8(e\207xop)k 2680(object)s 1826 3287(object)m 2498(post\207xop)s 1826 3003(nopar)m 2(sop)k 1826 2670(liter)m 3(alwor)k 8(d)k 220 fnt5 1826 2371({)m 240 fnt3 1974 2376(object)m 220 fnt5 2646 2371(})m 240 fnt3 1826 2043(object)m 2498(object)s 240 fnt1 0 1248(where)m 240 fnt3 640 1250(in\207xop)m 240 fnt1 1285 1248(,)m 240 fnt3 1391 1250(pr)m 8(e\207xop)k 240 fnt1 2161 1248(,)m 240 fnt3 2267 1250(post\207xop)m 240 fnt1 3125 1248(,)m 3232(and)s 240 fnt3 3635 1250(nopar)m 2(sop)k 240 fnt1 4591 1248(are)m 4938(identi\207ers)s 5943(naming)s 6713(operators)s 7653(which)s 8294(tak)s 2(e)k 8745(0,)s 8971(1)s 0 960(or)m 255(2)s 424(parameters,)s 1573(as)s 1819(sho)s 6(wn,)k 2541(and)s 240 fnt3 2940 962(liter)m 3(alwor)k 8(d)k 240 fnt1 4067 960(is)m 4272(a)s 4433(sequence)s 5362(of)s 5628(non-space)s 6649(characters,)s 7719(or)s 7973(an)s 8251(arbitrary)s 0 672(sequence)m 969(of)s 1276(characters)s 2330(enclosed)s 3262(in)s 3541(double)s 4285(quotes.)s 5110(Ambiguities)s 6380(are)s 6763(resolv)s 3(ed)k 7664(by)s 7995(precedence)s 0 384(and)m 404(associati)s 6(vity)k 15(.)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 4 5 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5765 -1579(-)m 5893(4)s 6067(-)s 9066 13419 0 13310 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 480 13256(The)m 941(last)s 1366(production)s 2494(allo)s 6(ws)k 3197(a)s 3397(meaning)s 4307(for)s 4679(e)s 3(xpressions)k 5877(such)s 6407(as)s 220 fnt5 6691 13253({})m 240 fnt1 6828 13256(,)m 6968(in)s 7245(which)s 7921(an)s 8238(object)s 8916(is)s 0 12968(missing.)m 907(The)s 1333(v)s 6(alue)k 1899(of)s 2168(this)s 240 fnt3 2562 12970(empty)m 3187(object)s 240 fnt1 3833 12968(is)m 4041(a)s 4205(rectangle)s 5135(of)s 5404(size)s 5829(0)s 6002(by)s 6294(0,)s 6519(with)s 6999(one)s 7399(column)s 8172(mark)s 8722(and)s 0 12680(one)m 402(ro)s 6(w)k 822(mark,)s 1420(that)s 1838(prints)s 2433(as)s 2683(nothing.)s 480 12306(The)m 938(second-last)s 2103(production)s 3227(generates)s 4210(sequences)s 5261(of)s 5562(arbitrary)s 6467(objects)s 7225(separated)s 8215(by)s 8539(white)s 0 12018(space,)m 671(called)s 240 fnt3 1333 12020(par)m 3(a)k 2(gr)k 3(aphs)k 240 fnt1 2439 12018(.)m 2636(Ignoring)s 3547(paragraph)s 4593(breaking)s 5517(for)s 5888(no)s 6(w)k 15(,)k 6421(the)s 6802(natural)s 7554(meaning)s 8464(is)s 8708(that)s 0 11730(the)m 361(tw)s 2(o)k 784(objects)s 1525(should)s 2235(appear)s 2946(side)s 3400(by)s 3707(side,)s 4212(and)s 4629(Lout')s 13(s)k 5305(parser)s 5961(accordingly)s 7157(interpolates)s 8335(an)s 8632(in\207x)s 0 11442(horizontal)m 1017(concatenation)s 2395(operator)s 3244(\(see)s 3677(belo)s 6(w\))k 4377(between)s 5224(them.)s 5859(This)s 6328(operator)s 7177(is)s 7380(associati)s 6(v)k 3(e,)k 8519(so)s 8778(the)s 0 11154(grammatical)m 1262(ambiguity)s 2301(does)s 2806(no)s 3113(harm.)s 3783(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 4758(the)s 5120(Algol-60)s 6054(rule)s 6496(that)s 6928(white)s 7530(space)s 8132(should)s 8844(be)s 0 10866(signi\207cant)m 1056(only)s 1536(as)s 1786(a)s 1952(separator)s 2887(is)s 3097(necessarily)s 4212(brok)s 2(en)k 4932(by)s 5226(Lout)s 5738(in)s 5981(just)s 6386(this)s 6782(one)s 7184(place.)s 480 10492(Algol-lik)m 2(e)k 1506(languages)s 2504(distinguish)s 3601(literal)s 4201(strings)s 4879(from)s 5393(identi\207ers)s 6389(by)s 6673(enclosing)s 7633(them)s 8161(in)s 8394(quotes,)s 0 10204(b)m 4(ut)k 372(literals)s 1082(are)s 1440(f)s 2(ar)k 1773(too)s 2143(frequent)s 3010(in)s 3264(document)s 4278(formatting)s 5350(for)s 5699(this)s 6106(to)s 6356(be)s 6649(viable.)s 7408(The)s 7847(con)s 9(v)k 3(entional)k 0 9916(solution)m 829(is)s 1041(to)s 1282(be)s 3(gin)k 1870(identi\207ers)s 2878(with)s 3362(a)s 3530(special)s 4250(character)s 9(,)k 5224(and)s 5630(Lout)s 6144(follo)s 6(ws)k 6908(Scribe)s 7576([7])s 7895(in)s 8140(using)s 8714(`@')s 0 9628(rather)m 616(than)s 1085(the)s 1433(`\\')s 1690(of)s 1961(trof)s 6(f)k 2450([8])s 2767(and)s 3171(T)s 3313 9580(E)m 3456 9628(X)m 3685([9].)s 480 9254(Ho)m 6(we)k 6(v)k 3(er)k 9(,)k 1447(Lout)s 1966(tak)s 2(es)k 2513(the)s 2868(unusual)s 3675(step)s 4120(of)s 4398(making)s 5176(an)s 5466(initial)s 6084(`@')s 6503(optional.)s 7458(The)s 7893(designers)s 8855(of)s 0 8966(Eqn)m 449(apparently)s 1519(considered)s 2620(such)s 3122(characters)s 4147(dis\207guring)s 5244(in)s 5494(\207ne-grained)s 6713(input)s 7272(lik)s 2(e)k 7691(equations,)s 8722(and)s 0 8678(this)m 401(author)s 1077(agrees.)s 1856(The)s 2289(implementation)s 3851(is)s 4066(straightforw)s 2(ard:)k 5707(`@')s 6124(is)s 6339(classed)s 7092(as)s 7347(just)s 7757(another)s 8539(letter)s 9(,)k 0 8390(and)m 407(e)s 6(v)k 3(ery)k 986(w)s 2(ord)k 1537(is)s 1750(searched)s 2647(for)s 2988(in)s 3234(the)s 3585(symbol)s 4348(table.)s 4979(If)s 5212(it)s 5407(is)s 5620(found,)s 6289(it)s 6484(is)s 6697(an)s 6983(identi\207er)s 9(,)k 7946(otherwise)s 8934(it)s 0 8102(is)m 214(a)s 384(literal.)s 1107(A)s 1341(w)s 2(arning)k 2181(message)s 3051(is)s 3265(printed)s 4004(when)s 4585(a)s 4755(literal)s 5369(be)s 3(ginning)k 6381(with)s 6867(`@')s 7284(is)s 7498(found,)s 8168(since)s 8719(it)s 8916(is)s 0 7814(probably)m 905(a)s 1071(mis-spelt)s 2006(identi\207er)s 13(.)k 3019(No)s 3365(such)s 3861(safety)s 4485(net)s 4837(is)s 5047(possible)s 5887(for)s 6225(identi\207ers)s 7231(without)s 8022(`@'.)s 480 7440(Equation)m 1418(formatting)s 2496(also)s 2951(demands)s 3871(symbols)s 4737(made)s 5328(from)s 5869(punctuation)s 7074(characters,)s 8165(such)s 8678(as)s 220 fnt5 8946 7437(+)m 240 fnt1 0 7152(and)m 220 fnt5 404 7149(<=)m 240 fnt1 652 7152(.)m 816(It)s 1021(is)s 1231(traditional)s 2267(to)s 2506(allo)s 6(w)k 3085(such)s 3581(symbols)s 4430(to)s 4669(be)s 4951(juxtaposed,)s 6095(which)s 6737(means)s 7399(that)s 7817(the)s 8165(input)s 220 fnt5 480 6702(<=++)m 240 fnt1 0 6251(for)m 354(e)s 3(xample)k 1234(must)s 1776(be)s 2075(interpreted)s 3184(within)s 3869(the)s 4234(le)s 3(xical)k 4939(analyser)s 5812(by)s 6123(searching)s 7109(the)s 7474(symbol)s 8251(table)s 8788(for)s 0 5963(its)m 306(pre\207x)s 3(es)k 1142(in)s 1416(the)s 1795(order)s 220 fnt5 2390 5960(<=++)m 240 fnt1 2894 5963(,)m 220 fnt5 3032 5960(<=+)m 240 fnt1 3408 5963(,)m 220 fnt5 3546 5960(<=)m 240 fnt1 3794 5963(.)m 3988(Although)s 4981(this)s 5408(tak)s 2(es)k 5979(quadratic)s 6952(time,)s 7514(in)s 7788(practice)s 8630(such)s 0 5675(sequences)m 1021(are)s 1368(too)s 1727(short)s 2265(to)s 2504(mak)s 2(e)k 3076(a)s 3242(more)s 3789(sophisticated)s 5095(linear)s 5698(method)s 6474(lik)s 2(e)k 6886(tries)s 7347(w)s 2(orthwhile.)k 240 fnt2 0 5026(2.3.)m 471(Basic)s 1073(structural)s 2149(operators)s [ /Dest /LOUTobjects /DEST pdfmark 240 fnt1 480 4549(A)m 696(programming)s 2036(language)s 2941(may)s 3393(be)s 3660(considered)s 4739(complete)s 5656(when)s 6218(it)s 6395(attains)s 7054(the)s 7388(po)s 6(wer)k 8025(of)s 8281(a)s 8432(T)s 10(uring)k 0 4261(machine,)m 917(b)s 4(ut)k 1280(no)s 1574(such)s 2071(criterion)s 2937(seems)s 3573(rele)s 6(v)k 6(ant)k 4390(to)s 4630(document)s 5635(formatting.)s 6808(Instead,)s 7606(as)s 7857(the)s 8206(language)s 0 3973(de)m 6(v)k 3(elops)k 913(and)s 1338(ne)s 6(w)k 1806(applications)s 3033(are)s 3401(attempted,)s 4471(de\207ciencies)s 5670(are)s 6038(e)s 3(xposed)k 6899(and)s 7324(the)s 7693(operator)s 8570(set)s 8916(is)s 0 3685(re)m 6(vised)k 742(to)s 981(o)s 3(v)k 3(ercome)k 1974(them.)s 480 3311(Lout)m 1025(has)s 1429(a)s 1629(repertoire)s 2646(of)s 2950(23)s 3268(primiti)s 6(v)k 3(e)k 4224(operators)s 5198(\(Figure)s 5990(1\),)s 6390(which)s 7066(has)s 7470(pro)s 3(v)k 3(en)k 8220(adequate)s 0 3023(for)m 348(a)s 525(wide)s 1056(v)s 6(ariety)k 1778(of)s 2059(features,)s 2932(including)s 3899(equations,)s 4934(tables,)s 5609(and)s 6023(page)s 6542(layout,)s 7257(and)s 7672(so)s 7948(seems)s 8594(to)s 8844(be)s 0 2735(reasonably)m 1077(complete)s 1995(in)s 2225(this)s 2607(pragmatic)s 3602(sense.)s 4270(In)s 4513(this)s 4895(section)s 5616(we)s 5937(introduce)s 6883(the)s 7217(eight)s 7741(concatenation)s 0 2447(and)m 424(mark-hiding)s 1680(operators.)s 2754(T)s 19(o)k 3075(them)s 3634(f)s 2(alls)k 4114(the)s 4482(basic)s 5047(task)s 5514(of)s 5806(assembling)s 6956(comple)s 3(x)k 7853(objects)s 8602(from)s 0 2159(simple)m 693(ones,)s 1239(and)s 1643(the)s 3(y)k 2106(were)s 2626(the)s 2974(\207rst)s 3405(to)s 3644(be)s 3926(designed)s 4835(and)s 5239(implemented.)s 480 1785(Man)m 3(y)k 1094(of)s 1370(the)s 1723(operators)s 2668(of)s 2944(Eqn)s 3392(can)s 3786(be)s 4073(vie)s 6(wed)k 4821(as)s 5076(b)s 4(uilding)k 5928(small)s 6505(tables.)s 7231(A)s 7466(b)s 4(uilt-up)k 8277(fraction,)s 0 1497(for)m 367(e)s 3(xample,)k 1310(has)s 1710(one)s 2141(column)s 2945(and)s 3379(three)s 3941(ro)s 6(ws)k 4480(\(numerator)s 9(,)k 5669(line,)s 6163(and)s 6596(denominator\).)s 8078(Numerous)s 0 1209(in)m 9(v)k 3(estig)k 1(ations)k 1377(of)s 1660(this)s 2068(kind)s 2564(con)s 9(vinced)k 3609(the)s 3969(author)s 4652(that)s 5082(operators)s 6034(capable)s 6832(of)s 7115(assembling)s 8256(the)s 8616(ro)s 6(ws)k 0 921(and)m 404(columns)s 1266(of)s 1537(tables)s 2145(w)s 2(ould)k 2800(suf\207ce)s 3493(for)s 3831(b)s 4(uilding)k 4678(all)s 4971(kinds)s 5541(of)s 5812(objects.)s 480 547(The)m 906(simplest)s 1759(objects)s 2485(are)s 2829(empty)s 3479(objects)s 4204(and)s 4605(literal)s 5213(w)s 2(ords)k 5844(lik)s 2(e)k 220 fnt5 6254 544(metempsychosis)m 240 fnt1 7882 547(,)m 7986(which)s 8625(ha)s 4(v)k 3(e)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 5 6 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5769 -1582(-)m 5897(5)s 6063(-)s 9066 13413 0 13413 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 240 fnt3 266 13217(object)m 220 fnt5 974 13212(/)m 240 fnt3 1038 13217(gap)m 1511(object)s 240 fnt1 3816 13215(V)m 26(ertical)k 4613(concatenation)s 5998(with)s 6480(mark)s 7032(alignment)s 240 fnt3 266 12929(object)m 220 fnt5 974 12924(//)m 240 fnt3 1099 12929(gap)m 1572(object)s 240 fnt1 3816 12927(V)m 26(ertical)k 4613(concatenation)s 5998(with)s 6480(left)s 6857(justi\207cation)s 240 fnt3 266 12641(object)m 220 fnt5 974 12636(|)m 240 fnt3 1011 12641(gap)m 1484(object)s 240 fnt1 3816 12639(Horizontal)m 4893(concatenation)s 6278(with)s 6760(mark)s 7312(alignment)s 240 fnt3 266 12353(object)m 220 fnt5 974 12348(||)m 240 fnt3 1068 12353(gap)m 1541(object)s 240 fnt1 3816 12351(Horizontal)m 4893(concatenation)s 6278(with)s 6760(top-justi\207cation)s 240 fnt3 266 12065(object)m 220 fnt5 974 12060(&)m 240 fnt3 1116 12065(gap)m 1589(object)s 240 fnt1 3816 12063(Horizontal)m 4893(concatenation)s 6278(within)s 6946(paragraphs)s 220 fnt5 266 11772(@OneCol)m 240 fnt3 1338 11777(object)m 240 fnt1 3816 11775(Hide)m 4337(all)s 4630(b)s 4(ut)k 4992(one)s 5394(column)s 6169(mark)s 6721(of)s 240 fnt3 6992 11777(object)m 220 fnt5 266 11484(@OneRo)m 3(w)k 240 fnt3 1457 11489(object)m 240 fnt1 3816 11487(Hide)m 4337(all)s 4630(b)s 4(ut)k 4992(one)s 5394(ro)s 6(w)k 5814(mark)s 6366(of)s 240 fnt3 6637 11489(object)m 266 11201(font)m 220 fnt5 762 11196(@F)m 6(ont)k 240 fnt3 1534 11201(object)m 240 fnt1 3816 11199(Render)m 240 fnt3 4567 11201(object)m 240 fnt1 5215 11199(in)m 5458(nominated)s 6526(font)s 240 fnt3 266 10913(br)m 8(eakstyle)k 220 fnt5 1353 10908(@Break)m 240 fnt3 2269 10913(object)m 240 fnt1 3816 10911(Break)m 4448(paragraphs)s 5548(of)s 240 fnt3 5819 10913(object)m 240 fnt1 6467 10911(in)m 6710(nominated)s 7778(style)s 240 fnt3 266 10625(spacestyle)m 220 fnt5 1361 10620(@Space)m 240 fnt3 2318 10625(object)m 240 fnt1 3816 10623(Render)m 4567(spaces)s 5242(between)s 6096(w)s 2(ords)k 6730(in)s 6973(nominated)s 8041(style)s 240 fnt3 266 10337(length)m 220 fnt5 979 10332(@Wide)m 240 fnt3 1813 10337(object)m 240 fnt1 3816 10335(Render)m 240 fnt3 4567 10337(object)m 240 fnt1 5215 10335(to)m 5454(width)s 240 fnt3 6056 10337(length)m 266 10049(length)m 220 fnt5 979 10044(@High)m 240 fnt3 1758 10049(object)m 240 fnt1 3816 10047(Render)m 240 fnt3 4567 10049(object)m 240 fnt1 5215 10047(to)m 5454(height)s 240 fnt3 6112 10049(length)m 220 fnt5 266 9756(@HExpand)m 240 fnt3 1499 9761(object)m 240 fnt1 3816 9759(Expand)m 4606(horizontal)s 5630(g)s 1(aps)k 6119(to)s 6358(\207ll)s 6678(a)s 4(v)k 6(ailable)k 7586(space)s 220 fnt5 266 9468(@VExpand)m 240 fnt3 1487 9473(object)m 240 fnt1 3816 9471(Expand)m 4606(v)s 3(ertical)k 5373(g)s 1(aps)k 5862(to)s 6101(\207ll)s 6421(a)s 4(v)k 6(ailable)k 7329(space)s 220 fnt5 266 9180(@HScale)m 240 fnt3 1307 9185(object)m 240 fnt1 3816 9183(Horizontal)m 4893(geometrical)s 6075(scaling)s 6805(to)s 7044(\207ll)s 7364(a)s 4(v)k 6(ailable)k 8272(space)s 220 fnt5 266 8892(@VScale)m 240 fnt3 1295 8897(object)m 240 fnt1 3816 8895(V)m 26(ertical)k 4613(geometrical)s 5795(scaling)s 6525(to)s 6764(\207ll)s 7084(a)s 4(v)k 6(ailable)k 7992(space)s 240 fnt3 266 8609(angle)m 220 fnt5 911 8604(@Rotate)m 240 fnt3 1892 8609(object)m 240 fnt1 3816 8607(Rotate)m 240 fnt3 4496 8609(object)m 240 fnt1 5144 8607(by)m 240 fnt3 5438 8609(angle)m 266 8321(P)m 19(ostScript)k 220 fnt5 1367 8316(@Gr)m 2(aphic)k 240 fnt3 2471 8321(object)m 240 fnt1 3816 8319(Escape)m 4549(to)s 4788(graphics)s 5649(language)s 220 fnt5 266 8028(@Ne)m 6(xt)k 240 fnt3 1050 8033(object)m 240 fnt1 3816 8031(Add)m 4287(1)s 4442(to)s 4681(an)s 4964(object)s 5608(denoting)s 6499(a)s 6665(number)s 240 fnt3 266 7745(object)m 220 fnt5 974 7740(@Case)m 240 fnt3 1821 7745(alternatives)m 240 fnt1 3816 7743(Select)m 4459(from)s 4983(a)s 5149(set)s 5474(of)s 5745(alternati)s 6(v)k 3(e)k 6799(objects)s 240 fnt3 266 7457(identi\207er)m 220 fnt5 1254 7452(&&)m 240 fnt3 1662 7457(object)m 240 fnt1 3816 7455(Cross)m 4412(reference)s 240 fnt3 266 7169(cr)m 10(oss-r)k 8(efer)k 8(ence)k 220 fnt5 1839 7164(@Open)m 240 fnt3 2705 7169(object)m 240 fnt1 3816 7167(Retrie)m 6(v)k 3(e)k 4672(v)s 6(alue)k 5240(from)s 5764(cross)s 6306(reference)s 240 fnt3 266 6881(cr)m 10(oss-r)k 8(efer)k 8(ence)k 220 fnt5 1839 6876(@T)m 26(agged)k 240 fnt3 2888 6881(object)m 240 fnt1 3816 6879(Attach)m 4510(cross)s 5052(referencing)s 6192(tag)s 6537(to)s 6776(object)s [ /Dest /LOUTprimitives /DEST pdfmark 200 fnt2 1346 6226(Figur)m 3(e)k 1954(1.)s 200 fnt1 2196 6227(The)m 2552(23)s 2789(primiti)s 5(v)k 3(e)k 3556(operators)s 4338(of)s 4564(Lout,)s 5030(in)s 5232(order)s 5702(of)s 5928(increasing)s 6789(precedence.)s 240 fnt1 0 5596(one)m 402(column)s 1177(mark)s 1729(and)s 2133(one)s 2535(ro)s 6(w)k 2955(mark:)s 1572 215 0 106 240 288 60 480 5090 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1572 215 0 106 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1572 215 0 106 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 52(metempsychosis)m grestore grestore end end restore grestore 0 4639(T)m 19(o)k 337(place)s 934(tw)s 2(o)k 1381(arbitrary)s 2294(objects)s 3059(side)s 3537(by)s 3868(side,)s 4398(we)s 4770(use)s 5182(the)s 5567(in\207x)s 6099(operator)s 220 fnt5 6992 4636(|)m 240 fnt1 7029 4639(,)m 7173(denoting)s 8102(horizontal)s 0 4351(concatenation.)m 1492(F)s 3(or)k 1881(e)s 3(xample,)k 220 fnt5 480 3850(USA |0.2i A)m 6(ustr)k 2(alia)k 240 fnt1 0 3395(produces)m 915(the)s 1263(object)s 476 166 0 57 240 288 60 480 2889 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 476 165 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 476 165 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(USA)m grestore grestore end end restore grestore 875 166 0 57 240 288 60 1244 2889 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 875 165 0 56 240 288 60 0 1 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 875 165 0 56 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 2(Australia)m grestore grestore end end restore grestore 0 2438(The)m 443(ro)s 6(w)k 879(marks)s 1529(are)s 1892(mer)s 4(ged)k 2678(into)s 3119(one,)s 3587(\207xing)s 4215(the)s 4579(v)s 3(ertical)k 5361(position)s 6205(of)s 6491(the)s 6855(objects)s 7598(relati)s 6(v)k 3(e)k 8376(to)s 8631(each)s 0 2150(other;)m 611(their)s 1116(horizontal)s 2148(separation)s 3196(is)s 3414(determined)s 4555(by)s 4857(the)s 240 fnt3 5214 2152(gap)m 240 fnt1 5635 2150(attached)m 6497(to)s 6744(the)s 7101(operator)s 9(,)k 8003(in)s 8254(this)s 8659(case)s 0 1862(0.2)m 361(inches.)s 1143(W)s 19(e)k 1519(think)s 2080(of)s 2358(the)s 2713(g)s 1(ap)k 3118(as)s 3376(part)s 3814(of)s 4092(the)s 4448(operator)s 9(,)k 5349(although)s 6251(strictly)s 6974(it)s 7174(is)s 7391(a)s 7564(third)s 8081(parameter)s 13(.)k 0 1574(It)m 205(may)s 671(be)s 953(omitted,)s 1790(def)s 2(aulting)k 2810(to)s 220 fnt5 3049 1571(0i)m 240 fnt1 3205 1574(.)m 240 fnt3 480 1202(V)m 26(ertical)k 1294(concatenation)s 240 fnt1 2644 1200(,)m 2762(denoted)s 3590(by)s 3895(the)s 4254(in\207x)s 4760(operator)s 220 fnt5 5627 1197(/)m 240 fnt1 5691 1200(,)m 5809(is)s 6031(the)s 6390(same)s 6948(apart)s 7497(from)s 8032(the)s 8392(change)s 0 912(of)m 271(direction:)s 220 fnt5 480 461(A)m 6(ustr)k 2(alia /0.1i USA)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 6 7 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5765 -1581(-)m 5893(6)s 6066(-)s 9066 13414 0 13305 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13251(produces)m 915(the)s 1263(object)s 875 165 0 56 240 288 60 480 12746 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 875 165 0 56 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 875 165 0 56 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 2(Australia)m grestore grestore end end restore grestore 875 165 0 57 240 288 60 480 12437 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 476 165 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 476 165 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(USA)m grestore grestore end end restore grestore 0 11986(with)m 482(column)s 1257(marks)s 1892(mer)s 4(ged)k 2663(and)s 3067(a)s 3233(0.1)s 3568(inch)s 4037(g)s 1(ap.)k 480 11612(Consider)m 1404(no)s 6(w)k 1865(what)s 2390(happens)s 3226(when)s 3802(horizontal)s 4826(and)s 5230(v)s 3(ertical)k 5997(are)s 6344(combined:)s 220 fnt5 1000 11111({)m 1186(USA)s 2442(|0.2i)s 2958(A)s 6(ustr)k 2(alia)k 3919(})s 480 10823(/0.1i)m 1000({)s 1186(W)s 8(ashington)k 2442(|)s 2958(Canberr)s 2(a)k 3987(})s 240 fnt1 0 10324(The)m 445(tw)s 2(o)k 872(parameters)s 1987(of)s 220 fnt5 2275 10321(/)m 240 fnt1 2416 10324(no)m 6(w)k 2895(ha)s 4(v)k 3(e)k 3413(tw)s 2(o)k 3840(column)s 4632(marks)s 5284(each,)s 5846(and)s 6268(the)s 3(y)k 6748(will)s 7191(be)s 7490(mer)s 4(ged)k 8278(with)s 8778(the)s 0 10036(corresponding)m 1422(marks)s 2057(in)s 2300(the)s 2648(other)s 3199(parameter)s 9(,)k 4251(yielding)s 5088(the)s 5436(object)s 476 166 0 57 240 288 60 480 9530 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 476 165 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 476 165 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(USA)m grestore grestore end end restore grestore 659 166 0 57 240 288 60 956 9530 LoutGr2 0 ymark moveto xsize 10 pt add ymark lineto [ 3 pt ] 0 setdash stroke grestore grestore 876 166 0 57 240 288 60 1903 9530 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 875 165 0 56 240 288 60 0 1 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 875 165 0 56 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 2(Australia)m grestore grestore end end restore grestore 1135 215 0 106 240 288 60 480 9171 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1135 215 0 106 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1135 215 0 106 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 52(W)m 19(ashington)k grestore grestore end end restore grestore 876 215 0 106 240 288 60 1903 9171 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 876 166 0 57 240 288 60 0 49 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 876 166 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(Canberra)m grestore grestore end end restore grestore 0 8720(The)m 220 fnt5 425 8717(0.2i)m 240 fnt1 821 8720(g)m 1(ap)k 1216(separates)s 2139(columns,)s 3054(not)s 3416(indi)s 6(vidual)k 4432(items)s 4997(in)s 5237(columns,)s 6152(so)s 6414(a)s 6577(g)s 1(ap)k 6972(attached)s 7823(to)s 8059(the)s 8403(second)s 220 fnt5 0 8429(|)m 240 fnt1 96 8432(w)m 2(ould)k 749(serv)s 3(e)k 1304(no)s 1595(purpose;)s 2464(an)s 3(y)k 2859(such)s 3353(g)s 1(ap)k 3749(is)s 3957(ignored.)s 4851(If)s 5079(the)s 5425(number)s 6214(of)s 6484(marks)s 7117(to)s 7354(be)s 7634(mer)s 4(ged)k 8403(dif)s 6(fers,)k 0 8144(empty)m 638(columns)s 1485(are)s 1818(added)s 2433(at)s 2651(the)s 2984(right)s 3481(to)s 3705(equalize)s 4542(the)s 4876(number)s 13(.)k 5743(The)s 6157(four)s 6600(marks)s 7221(protruding)s 8269(from)s 8778(the)s 0 7856(result)m 601(are)s 959(all)s 1263(a)s 4(v)k 6(ailable)k 2182(for)s 2531(mer)s 4(ging)k 3389(with)s 3882(neighbouring)s 5223(marks)s 5869(by)s 6174(other)s 6736(concatenation)s 8133(operators.)s 0 7568(The)m 428(precedence)s 1559(of)s 220 fnt5 1830 7565(|)m 240 fnt1 1927 7568(is)m 2137(higher)s 2808(than)s 3277(the)s 3625(precedence)s 4756(of)s 220 fnt5 5027 7565(/)m 240 fnt1 5091 7568(,)m 5198(so)s 5464(the)s 5812(braces)s 6473(could)s 7063(be)s 7345(omitted.)s 480 7194(When)m 1131(lines)s 1656(of)s 1950(te)s 3(xt)k 2387(are)s 2757(concatenated,)s 4135(it)s 4349(is)s 4582(con)s 9(v)k 3(entional)k 5884(to)s 6145(measure)s 7020(their)s 7540(separation)s 8602(from)s 0 6906(baseline)m 832(to)s 1063(baseline)s 1894(\(mark)s 2517(to)s 2748(mark)s 3292(in)s 3527(Lout\),)s 4157(rather)s 4765(than)s 5226(from)s 5742(edge)s 6242(to)s 6473(edge)s 6973(as)s 7215(abo)s 3(v)k 3(e.)k 7937(This)s 8405(idea)s 8855(of)s 0 6618(dif)m 6(ferent)k 863(reference)s 1794(points)s 2417(for)s 2743(measurement)s 4065(e)s 6(v)k 4(olv)k 3(ed)k 4855(o)s 3(v)k 3(er)k 5322(the)s 5658(years)s 6200(into)s 6613(a)s 6767(system)s 7478(of)s 7737(six)s 240 fnt3 8059 6620(gap)m 8459(modes)s 240 fnt1 0 6330(\(Figure)m 769(2\),)s 1085(e)s 3(xpressed)k 2094(by)s 2398(appending)s 3460(a)s 3636(letter)s 4195(to)s 4445(the)s 4803(length.)s 5576(F)s 3(or)k 5975(e)s 3(xample,)k 220 fnt5 6899 6327(|0.2i)m 240 fnt1 7366 6330(is)m 7586(an)s 7880(abbre)s 6(viation)k 0 6042(for)m 220 fnt5 377 6039(|0.2ie)m 240 fnt1 901 6042(,)m 1047(meaning)s 1963(0.2)s 2356(inches)s 3057(measured)s 4070(from)s 4633(edge)s 5180(to)s 5458(edge;)s 220 fnt5 6061 6039(|0.3ix)m 240 fnt1 6678 6042(produces)m 7632(a)s 7837(0.3)s 8220(inch)s 8728(g)s 1(ap)k 0 5754(measured)m 972(from)s 1493(mark)s 2043(to)s 2279(mark)s 2829(and)s 3230(widened)s 4097(if)s 4311(necessary)s 5292(to)s 5528(pre)s 6(v)k 3(ent)k 6294(o)s 3(v)k 3(erstriking;)k 7552(and)s 220 fnt5 7954 5751(|2.5it)m 240 fnt1 8478 5754(places)m 0 5466(its)m 273(right)s 781(parameter)s 1792(2.5)s 2135(inches)s 2794(from)s 3314(the)s 3659(current)s 4392(left)s 4766(mar)s 4(gin,)k 5543(irrespecti)s 6(v)k 3(e)k 6699(of)s 6967(the)s 7312(position)s 8137(of)s 8405(the)s 8749(left)s 0 5178(parameter)m 13(.)k 1098(There)s 1704(is)s 1907(also)s 2338(a)s 2496(choice)s 3169(of)s 3433(ele)s 6(v)k 3(en)k 4098(units)s 4606(of)s 4870(measurement)s 6197(\(inches,)s 6987(centimetres,)s 8186(multiples)s 0 4890(of)m 288(the)s 654(current)s 1407(font)s 1870(size,)s 2365(etc.\),)s 2907(the)s 3272(most)s 3815(interesting)s 4894(being)s 5496(the)s 220 fnt5 5862 4887(r)m 240 fnt1 6012 4890(unit:)m 6568(one)s 220 fnt5 6987 4887(r)m 240 fnt1 7138 4890(is)m 7365(the)s 7731(column)s 8524(width)s 0 4602(minus)m 635(the)s 982(width)s 1583(of)s 1852(the)s 2199(follo)s 6(wing)k 3175(object,)s 3864(so)s 4129(that)s 220 fnt5 4546 4599(|1r)m -8(t)k 240 fnt1 4921 4602(produces)m 5835(suf\207cient)s 6783(space)s 7368(to)s 7606(right)s 8116(justify)s 8778(the)s 0 4314(follo)m 6(wing)k 987(object,)s 1688(and)s 220 fnt5 2103 4311(|0.5r)m -8(t)k 240 fnt1 2673 4314(to)m 2923(center)s 3576(it.)s 3883(These)s 4520(features)s 5337(implement)s 6429(spacings)s 7315(needed)s 8061(in)s 8315(practice)s 0 4026(rather)m 608(than)s 1069(suggested)s 2063(by)s 2349(theory)s 15(.)k 3101(The)s 3(y)k 3636(w)s 2(ork)k 4179(with)s 4653(all)s 4938(\207v)s 3(e)k 5342(concatenation)s 6719(operators,)s 7707(horizontal)s 8722(and)s 0 3738(v)m 3(ertical.)k 480 3364(When)m 1113(we)s 1452(construct)s 2392(a)s 2562(b)s 4(uilt-up)k 3372(fraction,)s 4225(the)s 4577(result)s 5171(has)s 5545(three)s 6082(ro)s 6(w)k 6506(marks,)s 7201(b)s 4(ut)k 7567(only)s 8051(the)s 8403(second)s 0 3076(should)m 697(be)s 979(visible)s 1672(outside)s 2419(the)s 2767(object:)s gsave 480 2245 translate 240 fnt3 156 491 0 288 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 156 491 0 288 240 288 12 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 156 491 0 288 240 288 12 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 336(X)m 156 0 0 0 240 288 12 0 288 LoutGr2 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 2 68(Y)m grestore grestore end end restore grestore 0 1794(This)m 493(is)s 721(a)s 905(common)s 1817(problem,)s 2739(and)s 3161(accordingly)s 4361(a)s 220 fnt5 4545 1791(@OneRo)m 3(w)k 240 fnt1 5694 1794(operator)m 6567(w)s 2(as)k 7006(introduced)s 8105(for)s 8461(hiding)s 0 1506(all)m 291(b)s 4(ut)k 650(one)s 1050(of)s 1318(the)s 1663(ro)s 6(w)k 2081(marks)s 2713(of)s 2981(its)s 3255(parameter)s 13(.)k 4357(Normally)s 15(,)k 5363(the)s 5708(\207rst)s 6136(mark)s 6686(is)s 6893(the)s 7238(survi)s 6(v)k 4(or)k 9(,)k 8121(b)s 4(ut)k 8480(a)s 8643(later)s 0 1218(mark)m 552(can)s 941(be)s 1223(chosen)s 1945(by)s 2239(pre\207xing)s 220 fnt5 3156 1215(^)m 240 fnt1 3322 1218(to)m 3561(the)s 3909(preceding)s 4905(concatenation)s 6290(operator:)s 220 fnt5 480 717(@OneRo)m 3(w { X ^/2p @HLine /2p )k 19(Y })k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 7 8 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic %%+ font Symbol %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5768 -1575(-)m 5896(7)s 6064(-)s 9066 13422 0 13422 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 6693 8221 0 8221 240 288 60 1186 5201 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 0 7447(Edge-to-edge)m 220 fnt5 1786 7444(|)m 240 fnt3 1843 7449(length)m 220 fnt5 2456 7444(e)m 240 fnt1 0 6238(Hyphenation)m 220 fnt5 1786 6235(|)m 240 fnt3 1843 6240(length)m 220 fnt5 2456 6235(h)m 240 fnt1 0 5029(Ov)m 3(erstrik)k 2(e)k 220 fnt5 1786 5026(|)m 240 fnt3 1843 5031(length)m 220 fnt5 2456 5026(o)m 240 fnt1 0 3820(Mark-to-mark)m 220 fnt5 1786 3817(|)m 240 fnt3 1843 3822(length)m 220 fnt5 2456 3817(x)m 240 fnt1 0 2611(K)m 6(erning)k 220 fnt5 1786 2608(|)m 240 fnt3 1843 2613(length)m 220 fnt5 2456 2608(k)m 240 fnt1 0 1402(T)m 19(ab)k 4(ulation)k 220 fnt5 1786 1399(|)m 240 fnt3 1843 1404(length)m 220 fnt5 2456 1399(t)m gsave 3291 0 translate 240 fnt1 3402 8221 0 8221 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 567 7485 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 7371 translate 180 fnt1 2722 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 7485 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 7371 translate 180 fnt1 851 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2267 7395 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 1247 7395 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 1247 7395 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 1247 7395 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt3 1534 7192(length)m gsave 567 6304 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 6190 translate 180 fnt1 2722 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 6304 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 6190 translate 180 fnt1 851 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2267 6214 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 1247 6214 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 1247 6214 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 1247 6214 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1534 6011(length)m gsave 567 5123 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 5009 translate 180 fnt1 2722 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 5123 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 5009 translate 180 fnt1 851 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2551 4976 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 4976 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 4976 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 4976 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1392 4774(length)m gsave 567 3886 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 3772 translate 180 fnt1 2722 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 3886 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 3772 translate 180 fnt1 851 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2551 3739 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 3739 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 3739 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 3739 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt1 941 3536(max)m 180 fnt4 1256 3531(\()m 180 fnt3 1319 3537(length)m 180 fnt4 1774 3531(,)m 180 fnt3 1854 3537(a)m 180 fnt4 1994 3531(+)m 180 fnt3 2145 3537(b)m 180 fnt4 2240 3531(\))m gsave 1247 4363 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 567 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 4363 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 4363 translate 180 fnt1 567 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 4363 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt3 920 4431(a)m gsave 2551 4363 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 2268 4363 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 2268 4363 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 2268 4363 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 2366 4387(b)m gsave 567 2590 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 2476 translate 180 fnt1 2722 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 2590 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 2476 translate 180 fnt1 851 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2551 2443 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 2443 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 2443 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 2443 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt1 999 2240(max)m 180 fnt4 1314 2235(\()m 180 fnt3 1377 2241(length)m 180 fnt4 1832 2235(,)m 180 fnt3 1912 2241(a)m 180 fnt4 2007 2235(,)m 180 fnt3 2087 2241(b)m 180 fnt4 2182 2235(\))m gsave 1247 3067 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 567 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 3067 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 3067 translate 180 fnt1 567 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 3067 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt3 920 3135(a)m gsave 2551 3067 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 2268 3067 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 2268 3067 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 2268 3067 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 2366 3091(b)m gsave 567 1438 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 1324 translate 180 fnt1 2722 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 1438 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 1324 translate 180 fnt1 851 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 1234 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 2268 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 0 1234 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 1234 translate 180 fnt1 2268 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 1234 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1587 1032(length)m gsave 3402 734 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 3402 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 0 734 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 734 translate 180 fnt1 3402 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 734 translate -30.0000 rotate gsave 0 1 translate 180 fnt1 68 -2 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1189 523(curr)m 6(ent)k 1759(bound)s grestore end end restore grestore [ /Dest /LOUTgapmodes /DEST pdfmark 200 fnt2 180 4638(Figur)m 3(e)k 788(2.)s 200 fnt1 1030 4639(The)m 1386(six)s 1664(g)s 1(ap)k 1995(modes)s 2557(\()s 200 fnt3 2618 4640(length)m 200 fnt1 3162 4639(is)m 3336(an)s 3(y)k 3666(length\).)s 4367(Hyphenation)s 5444(mode)s 5933(has)s 6240(an)s 6475(e)s 3(xtra)k 6919(property)s 7639(not)s 7944(sho)s 5(wn)k 8507(here.)s 240 fnt1 0 4008(has)m 396(the)s 770(desired)s 1545(result,)s 2208(where)s 220 fnt5 2874 4005(2p)m 240 fnt1 3197 4008(is)m 3433(tw)s 2(o)k 3870(points)s 4532(and)s 220 fnt5 4962 4005(@HLine)m 240 fnt1 5836 4008(is)m 6072(an)s 6381(easy)s 6887(combination)s 8166(of)s 8464(Lout')s 13(s)k 0 3720(graphics)m 861(operators.)s 1914(A)s 2144(similar)s 2866(operator)s 9(,)k 220 fnt5 3760 3717(@OneCol)m 240 fnt1 4712 3720(,)m 4819(hides)s 5375(column)s 6150(marks.)s 480 3346(A)m 728(v)s 6(ariant)k 1463(of)s 220 fnt5 1753 3343(/)m 240 fnt1 1895 3346(called)m 220 fnt5 2542 3343(//)m 240 fnt1 2745 3346(is)m 2974(pro)s 3(vided)k 3898(which)s 4558(performs)s 5490(v)s 3(ertical)k 6275(concatenation)s 7679(b)s 4(ut)k 8059(ignores)s 8833(all)s 0 3058(column)m 775(marks)s 1410(and)s 1814(simply)s 2519(left-justi\207es)s 3709(its)s 3985(tw)s 2(o)k 4395(parameters:)s 220 fnt5 480 2557(Heading //0.1i)m 480 2269(A |0.2i B /0.1i)m 480 1981(C | D)m 240 fnt1 0 1526(has)m 370(result)s 480 1073(Heading)m 480 716(A)m 938(B)s 480 410(C)m 938(D)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 8 9 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Bold %%+ font Times-Italic %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5768 -1579(-)m 5896(8)s 6063(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13253(sho)m 6(wing)k 883(that)s 1325(spanning)s 2267(columns)s 3153(in)s 3420(tables)s 4052(moti)s 6(v)k 6(ate)k 4956(the)s 5328(inclusion)s 6286(of)s 6581(this)s 7001(operator)s 13(.)k 7972(There)s 8609(is)s 8843(an)s 0 12965(analogous)m 220 fnt5 1029 12962(||)m 240 fnt1 1191 12965(operator)m 13(.)k 2145(The)s 2581(author)s 3259(w)s 2(ould)k 3922(ha)s 4(v)k 3(e)k 4430(preferred)s 5370(to)s 5616(lea)s 4(v)k 3(e)k 6177(out)s 6550(these)s 7105(operators,)s 8108(since)s 8663(the)s 3(y)k 0 12677(complicate)m 1104(the)s 1452(implementation,)s 3059(and)s 3463(it)s 3655(is)s 3865(interesting)s 4926(to)s 5165(e)s 3(xamine)k 6028(the)s 6376(prospects)s 7330(of)s 7601(doing)s 8200(so.)s 480 12303(The)m 220 fnt5 953 12300(//)m 240 fnt1 1184 12303(operator)m 2086(is)s 2342(formally)s 3263(redundant,)s 4373(because)s 5232(in)s 5521(general)s 6324(the)s 6718(e)s 3(xpression)k 220 fnt5 7841 12300(x // y)m 240 fnt1 8409 12303(can)m 8844(be)s 0 12015(replaced)m 867(by)s 220 fnt5 480 11514(@OneCol { | x } /)m 480 11226(@OneCol { | y })m 240 fnt1 0 10728(for)m 338(an)s 3(y)k 734(objects)s 220 fnt5 1462 10725(x)m 240 fnt1 1629 10728(and)m 220 fnt5 2032 10725(y)m 240 fnt1 2140 10728(.)m 2304(By)s 2637(concatenating)s 4017(an)s 4300(empty)s 4951(object)s 5594(at)s 5826(the)s 6173(left)s 6549(of)s 220 fnt5 6820 10725(x)m 240 fnt1 6987 10728(and)m 7390(hiding)s 8055(all)s 8347(b)s 4(ut)k 8708(that)s 0 10440(empty)m 641(object')s 13(s)k 1423(column)s 2186(mark,)s 2772(we)s 3095(ef)s 6(fecti)k 6(v)k 3(ely)k 4143(shift)s 220 fnt5 4615 10437(x)m 240 fnt1 4723 10440(')m 13(s)k 4921(column)s 5684(mark)s 6224(to)s 6452(its)s 6716(left)s 7081(edge.)s 7685(The)s 8101(same)s 8636(goes)s 0 10152(for)m 220 fnt5 349 10149(y)m 240 fnt1 457 10152(,)m 575(so)s 852(the)s 220 fnt5 1211 10149(/)m 240 fnt1 1347 10152(operator)m 2214(has)s 2595(just)s 3011(one)s 3424(column)s 4211(mark)s 4774(to)s 5024(mer)s 4(ge,)k 5735(at)s 5978(the)s 6338(e)s 3(xtreme)k 7171(left,)s 7606(and)s 8021(its)s 8308(ef)s 6(fect)k 8916(is)s 0 9864(indistinguishable)m 1690(from)s 220 fnt5 2214 9861(//)m 240 fnt1 2339 9864(.)m 480 9490(Unfortunately)m 15(,)k 1915(if)s 220 fnt5 2134 9487(y)m 240 fnt1 2304 9490(consists)m 3114(of)s 3387(tw)s 2(o)k 3799(ro)s 6(ws)k 4311(separated)s 5274(by)s 220 fnt5 5570 9487(/)m 240 fnt1 5634 9490(,)m 5743(as)s 5995(in)s 6240(the)s 6590(e)s 3(xample)k 7455(abo)s 3(v)k 3(e,)k 8130(both)s 8616(ro)s 6(ws)k 0 9202(must)m 533(be)s 823(placed)s 1513(inside)s 2148(the)s 220 fnt5 2504 9199(@OneCol)m 240 fnt1 3456 9202(,)m 3571(and)s 3983(the)s 4340(table)s 4868(cannot)s 5574(be)s 5864(entered)s 6633(in)s 6884(the)s 7240(simple)s 7942(ro)s 6(w-by-ro)k 6(w)k 0 8914(manner)m 777(that)s 1194(non-e)s 3(xpert)k 2287(users)s 2828(naturally)s 3731(e)s 3(xpect.)k 4515(Another)s 5359(adv)s 6(antage)k 6378(of)s 220 fnt5 6649 8911(//)m 240 fnt1 6833 8914(is)m 7043(that)s 7460(its)s 7736(left)s 8112(parameter)s 0 8626(can)m 382(be)s 657(printed)s 1385(before)s 2044(its)s 2313(right)s 2817(parameter)s 3824(is)s 4027(kno)s 6(wn;)k 4779(this)s 5168(is)s 5371(important)s 6353(when)s 6922(the)s 7263(left)s 7633(parameter)s 8640(is)s 8843(an)s 0 8338(entire)m 599(page.)s 480 7964(The)m 960(\207fth)s 1468(and)s 1924(\207nal)s 2457(concatenation)s 3895(operator)s 9(,)k 220 fnt5 4841 7961(&)m 240 fnt1 4983 7964(,)m 5143(is)s 5405(an)s 5741(e)s 3(xplicit)k 6567(v)s 3(ersion)k 7377(of)s 7701(the)s 8102(horizontal)s 0 7676(concatenation)m 1402(operator)s 2275(interpolated)s 3492(when)s 4085(objects)s 4830(are)s 5195(separated)s 6172(by)s 6483(white)s 7088(space.)s 7800(It)s 8022(is)s 8250(formally)s 0 7388(identical)m 907(to)s 220 fnt5 1177 7385(|)m 240 fnt1 1305 7388(e)m 3(xcept)k 2017(for)s 2386(taking)s 3068(higher)s 3770(precedence)s 4932(and)s 5367(being)s 5983(subject)s 6751(to)s 7021(replacement)s 8279(by)s 220 fnt5 8604 7385(//1vx)m 240 fnt1 0 7100(during)m 678(paragraph)s 1691(breaking)s 2581(\(Section)s 3434(2.5\).)s 240 fnt2 0 6451(2.4.)m 471(Implementation)s 2159(of)s 2431(objects)s 3201(and)s 3642(concatenation)s [ /Dest /LOUTobjects_impl /DEST pdfmark 240 fnt1 480 5974(In)m 738(this)s 1136(section)s 1872(we)s 2210(discuss)s 2954(the)s 3304(implementation)s 4863(of)s 5137(objects)s 5867(and)s 6273(concatenation,)s 7710(and)s 8117(especially)s 0 5686(mark)m 552(alignment.)s 1672(The)s 2100(\207rst)s 2531(step)s 2969(is)s 3179(to)s 3418(use)s 3793(an)s 4076(operator)s 4932(precedence)s 6063(parser)s 6706(to)s 6945(con)s 9(v)k 3(ert)k 7710(input)s 8262(such)s 8758(as)s 220 fnt5 480 5185(a |0.5i b /0.2i c | d)m 240 fnt1 0 4730(into)m 425(parse)s 985(trees)s 1486(such)s 1982(as)s gsave 480 3036 translate 240 fnt3 3396 1354 0 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1867 338 56 282 240 288 12 1529 1016 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 136 106(\244)m grestore (T) lfigpromotelabels grestore 1413 846 0 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 876 338 56 282 240 288 12 537 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 511 338 56 282 240 288 12 451 0 LoutGr2 currentdict end 200 dict begin begin grestore 511 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 511 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt4 56 105(0)m 192 fnt3 195 111(.)m 192 fnt4 270 105(5)m 192 fnt3 404 111(i)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 962 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 1075 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1413 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1413 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 517 846 56 790 240 288 12 1526 0 LoutGr2 currentdict end 200 dict begin begin grestore 517 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 517 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt4 56 105(0)m 192 fnt3 195 111(.)m 192 fnt4 270 105(2)m 192 fnt3 410 111(i)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 2043 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1240 846 0 790 240 288 12 2156 0 LoutGr2 currentdict end 200 dict begin begin grestore 789 338 56 282 240 288 12 451 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 451 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 789 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 902 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1240 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 3396 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 0 2585(Missing)m 879(objects)s 1662(are)s 2065(replaced)s 2987(by)s 3336(empty)s 4044(objects,)s 4883(and)s 5342(sequences)s 6419(of)s 6745(concatenation)s 8186(operators)s 0 2297(are)m 347(consolidated:)s gsave 480 648 translate 240 fnt3 2492 1359 0 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1415 338 56 282 240 288 12 1077 1016 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 517 846 56 790 240 288 12 451 0 LoutGr2 currentdict end 200 dict begin begin grestore 517 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 517 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt4 56 105(0)m 192 fnt3 195 111(.)m 192 fnt4 270 105(2)m 192 fnt3 410 111(i)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 968 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1411 846 0 790 240 288 12 1081 0 LoutGr2 currentdict end 200 dict begin begin grestore 875 338 56 282 240 288 12 536 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 509 338 56 282 240 288 12 451 0 LoutGr2 currentdict end 200 dict begin begin grestore 509 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 509 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt4 56 105(0)m 192 fnt3 195 111(.)m 192 fnt4 270 105(3)m 192 fnt3 402 111(i)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 960 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 1073 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1411 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 2492 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 240 fnt4 3284 1886(\336)m gsave 3825 648 translate 240 fnt3 2492 1359 0 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1415 338 56 282 240 288 12 1077 1016 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 517 846 56 790 240 288 12 451 0 LoutGr2 currentdict end 200 dict begin begin grestore 517 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 517 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt4 56 105(0)m 192 fnt3 195 111(.)m 192 fnt4 270 105(2)m 192 fnt3 410 111(i)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 968 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 846 56 790 240 288 12 1081 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1419 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 509 846 56 790 240 288 12 1532 0 LoutGr2 currentdict end 200 dict begin begin grestore 509 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 509 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt4 56 105(0)m 192 fnt3 195 111(.)m 192 fnt4 270 105(3)m 192 fnt3 402 111(i)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 2041 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 846 56 790 240 288 12 2154 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 2492 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 9 10 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Symbol %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5766 -1579(-)m 5894(9)s 6065(-)s 9066 13414 0 13305 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13251(to)m 239(mak)s 2(e)k 811(manifest)s 1693(their)s 2190(associati)s 6(vity)k 3432(and)s 3836(reduce)s 4529(the)s 4877(depth)s 5466(of)s 5737(the)s 6085(tree)s 6498(for)s 6836(ef\207cienc)s 3(y)k 7829(later)s 13(.)k 480 12877(The)m 970(required)s 1887(semantic)s 2851(information)s 4099(is)s 4371(the)s 4782(size)s 5271(of)s 5605(each)s 6162(subobject,)s 7249(consisting)s 8334(of)s 8668(four)s 0 12589(inte)m 3(gers:)k 920(width)s 1524(to)s 1765(left)s 2144(and)s 2550(right)s 3062(of)s 3335(the)s 3685(distinguished)s 5021(column)s 5798(mark,)s 6397(and)s 6803(height)s 7463(abo)s 3(v)k 3(e)k 8087(and)s 8493(belo)s 6(w)k 0 12301(the)m 368(distinguished)s 1722(ro)s 6(w)k 2162(mark.)s 2837(These)s 3484(numbers)s 4379(are)s 4746(al)s 2(w)k 2(ays)k 5477(non-ne)s 3(g)k 1(ati)k 6(v)k 3(e)k 6789(in)s 7052(Basser)s 7769(Lout,)s 8348(b)s 4(ut)k 8730(this)s 0 12013(restriction)m 1024(is)s 1234(unnecessary)s 2457(and)s 2861(should)s 3558(be)s 3840(dropped.)s 480 11639(F)m 3(or)k 867(the)s 1212(lea)s 4(v)k 3(es,)k 1907(which)s 2546(are)s 2890(simple)s 3581(w)s 2(ords,)k 4268(the)s 4614(numbers)s 5486(are)s 5830(obtained)s 6710(from)s 7231(font)s 7674(tables.)s 8392(F)s 3(or)k 8778(the)s 0 11351(higher)m 678(le)s 6(v)k 3(els)k 1285(we)s 1628(apply)s 2222(recursi)s 6(v)k 3(e)k 3152(rules.)s 3788(Suppose)s 4664(that)s 240 fnt3 5090 11353(hgap)m 240 fnt4 5583 11345(\()m 240 fnt3 5675 11353(x)m 240 fnt4 5801 11345(,)m 240 fnt3 5932 11353(g)m 240 fnt4 6066 11345(,)m 240 fnt3 6197 11353(y)m 240 fnt4 6319 11345(\))m 240 fnt1 6453 11351(returns)m 7175(the)s 7531(desired)s 8287(distance)s 0 11063(between)m 846(the)s 1186(column)s 1952(marks)s 2579(of)s 2841(objects)s 240 fnt3 3561 11065(x)m 240 fnt1 3719 11063(and)m 240 fnt3 4114 11065(y)m 240 fnt1 4268 11063(when)m 4835(the)s 3(y)k 5290(are)s 5629(separated)s 6580(by)s 6866(g)s 1(ap)k 240 fnt3 7255 11065(g)m 240 fnt1 7369 11063(:)m 240 fnt3 7527 11065(right)m 240 fnt4 8000 11057(\()m 240 fnt3 8075 11065(x)m 240 fnt4 8185 11057(\))m 8298(+)s 240 fnt3 8473 11065(length)m 240 fnt4 0 10769(\()m 240 fnt3 89 10777(g)m 240 fnt4 221 10769(\))m 376(+)s 240 fnt3 594 10777(left)m 240 fnt4 920 10769(\()m 240 fnt3 1009 10777(y)m 240 fnt4 1129 10769(\))m 240 fnt1 1261 10775(when)m 1842(the)s 2196(g)s 1(ap)k 2600(mode)s 3193(is)s 3409(edge-to-edge,)s 4770(the)s 5124(lar)s 4(ger)k 5741(of)s 240 fnt3 6018 10777(length)m 240 fnt4 6629 10769(\()m 240 fnt3 6718 10777(g)m 240 fnt4 6850 10769(\))m 240 fnt1 6982 10775(and)m 240 fnt3 7391 10777(right)m 240 fnt4 7878 10769(\()m 240 fnt3 7968 10777(x)m 240 fnt4 8091 10769(\))m 8246(+)s 240 fnt3 8464 10777(left)m 240 fnt4 8790 10769(\()m 240 fnt3 8880 10777(y)m 240 fnt4 9000 10769(\))m 240 fnt1 0 10487(when)m 576(the)s 924(mode)s 1512(is)s 1722(mark-to-mark,)s 3155(and)s 3559(so)s 3825(on.)s 4229(Gi)s 6(v)k 3(en)k 4862(an)s 5145(object)s 240 fnt3 480 9992(X)m 240 fnt4 720 9984(=)m 240 fnt3 933 9992(x)m 168 fnt4 1039 9899(1)m 240 fnt4 1249 9984(|)m 240 fnt3 1294 9992(g)m 168 fnt4 1405 9899(1)m 240 fnt4 1615 9984(\274)m 200 fnt3 1973 10000(^)m 240 fnt4 2069 9984(|)m 240 fnt3 2114 9992(g)m 168 fnt3 2225 9905(i)m 168 fnt4 2291 9899(-)m 2403(1)s 240 fnt3 2613 9992(x)m 168 fnt3 2719 9905(i)m 240 fnt4 2907 9984(\274)m 3265(|)s 240 fnt3 3310 9992(g)m 168 fnt3 3421 9905(n)m 168 fnt4 3523 9899(-)m 3635(1)s 240 fnt3 3845 9992(x)m 168 fnt3 3951 9905(n)m 240 fnt1 0 9448(we)m 335(may)s 801(calculate)s 1705(its)s 1981(size)s 2408(as)s 2658(follo)s 6(ws:)k 240 fnt3 740 8945(left)m 240 fnt4 1060 8937(\()m 240 fnt3 1144 8945(X)m 240 fnt4 1312 8937(\))m 1474(=)s 240 fnt3 1687 8945(left)m 240 fnt4 2007 8937(\()m 240 fnt3 2091 8945(x)m 168 fnt4 2197 8852(1)m 240 fnt4 2275 8937(\))m 2413(+)s 240 fnt3 2614 8945(hgap)m 240 fnt4 3099 8937(\()m 240 fnt3 3183 8945(x)m 168 fnt4 3289 8852(1)m 240 fnt4 3367 8937(,)m 240 fnt3 3474 8945(g)m 168 fnt4 3585 8852(1)m 240 fnt4 3663 8937(,)m 240 fnt3 3770 8945(x)m 168 fnt4 3876 8852(2)m 240 fnt4 3968 8937(\))m 4106(+)s 4307(\274)s 4593(+)s 240 fnt3 4794 8945(hgap)m 240 fnt4 5279 8937(\()m 240 fnt3 5363 8945(x)m 168 fnt3 5469 8858(i)m 168 fnt4 5535 8852(-)m 5647(1)s 240 fnt4 5725 8937(,)m 240 fnt3 5832 8945(g)m 168 fnt3 5943 8858(i)m 168 fnt4 6009 8852(-)m 6121(1)s 240 fnt4 6199 8937(,)m 240 fnt3 6306 8945(x)m 168 fnt3 6412 8858(i)m 240 fnt4 6468 8937(\))m 240 fnt3 579 8542(right)m 240 fnt4 1060 8534(\()m 240 fnt3 1144 8542(X)m 240 fnt4 1312 8534(\))m 1474(=)s 240 fnt3 1687 8542(hgap)m 240 fnt4 2172 8534(\()m 240 fnt3 2256 8542(x)m 168 fnt3 2362 8455(i)m 240 fnt4 2418 8534(,)m 240 fnt3 2525 8542(g)m 168 fnt3 2636 8455(i)m 240 fnt4 2692 8534(,)m 240 fnt3 2799 8542(x)m 168 fnt3 2905 8455(i)m 168 fnt4 2971 8449(+)m 3084(1)s 240 fnt4 3162 8534(\))m 3300(+)s 3501(\274)s 3787(+)s 240 fnt3 3988 8542(hgap)m 240 fnt4 4473 8534(\()m 240 fnt3 4557 8542(x)m 168 fnt3 4663 8455(n)m 168 fnt4 4765 8449(-)m 4877(1)s 240 fnt4 4955 8534(,)m 240 fnt3 5062 8542(g)m 168 fnt3 5173 8455(n)m 168 fnt4 5275 8449(-)m 5387(1)s 240 fnt4 5465 8534(,)m 240 fnt3 5572 8542(x)m 168 fnt3 5678 8455(n)m 240 fnt4 5770 8534(\))m 5908(+)s 240 fnt3 6109 8542(right)m 240 fnt4 6590 8534(\()m 240 fnt3 6674 8542(x)m 168 fnt3 6780 8455(n)m 240 fnt4 6872 8534(\))m 240 fnt3 485 8139(abo)m 2(ve)k 240 fnt4 1060 8131(\()m 240 fnt3 1144 8139(X)m 240 fnt4 1312 8131(\))m 1474(=)s 240 fnt3 1687 8139(abo)m 2(ve)k 240 fnt4 2262 8131(\()m 240 fnt3 2346 8139(x)m 168 fnt4 2452 8044(1)m 240 fnt4 2530 8131(\))m 2680(\255)s 2901(\274)s 3199(\255)s 240 fnt3 3420 8139(abo)m 2(ve)k 240 fnt4 3995 8131(\()m 240 fnt3 4079 8139(x)m 168 fnt3 4185 8050(n)m 240 fnt4 4277 8131(\))m 240 fnt3 480 7736(below)m 240 fnt4 1060 7728(\()m 240 fnt3 1144 7736(X)m 240 fnt4 1312 7728(\))m 1474(=)s 240 fnt3 1687 7736(below)m 240 fnt4 2267 7728(\()m 240 fnt3 2351 7736(x)m 168 fnt4 2457 7641(1)m 240 fnt4 2535 7728(\))m 2685(\255)s 2906(\274)s 3204(\255)s 240 fnt3 3425 7736(below)m 240 fnt4 4005 7728(\()m 240 fnt3 4089 7736(x)m 168 fnt3 4195 7647(n)m 240 fnt4 4287 7728(\))m 240 fnt1 0 7141(where)m 240 fnt4 693 7135(\255)m 240 fnt1 943 7141(returns)m 1678(the)s 2046(lar)s 4(ger)k 2679(of)s 2971(its)s 3267(tw)s 2(o)k 3698(parameters.)s 4930(Similar)s 5712(formulas)s 6633(are)s 7001(easily)s 7632(deri)s 6(v)k 3(ed)k 8419(for)s 8778(the)s 0 6853(other)m 551(operators.)s 480 6479(F)m 3(or)k 866(purposes)s 1765(of)s 2033(e)s 3(xposition)k 3081(we)s 3412(will)s 3835(no)s 6(w)k 4293(mak)s 2(e)k 4862(the)s 5207(simplifying)s 6358(assumptions)s 7589(that)s 8004(all)s 8294(g)s 1(aps)k 8779(are)s 220 fnt5 0 6188(0i)m 240 fnt1 156 6191(,)m 248(all)s 525(column)s 1285(marks)s 1904(lie)s 2183(at)s 2399(the)s 2732(left)s 3093(edge,)s 3637(and)s 4025(all)s 4303(ro)s 6(w)k 4707(marks)s 5327(lie)s 5605(at)s 5822(the)s 6154(top)s 6498(edge.)s 7098(Then)s 7632(the)s 7964(size)s 8376(of)s 8631(each)s 0 5903(object)m 644(can)s 1033(be)s 1315(e)s 3(xpressed)k 2313(by)s 2607(just)s 3012(tw)s 2(o)k 3422(numbers,)s 4353(width)s 4955(and)s 5359(height,)s 6064(and)s 6468(the)s 6816(four)s 7274(formulas)s 8174(reduce)s 8867(to)s 240 fnt3 555 5400(width)m 240 fnt4 1094 5392(\()m 240 fnt3 1178 5400(x)m 168 fnt4 1284 5307(1)m 240 fnt4 1434 5392(|)m 1551(\274)s 1849(|)s 240 fnt3 1966 5400(x)m 168 fnt3 2072 5313(n)m 240 fnt4 2164 5392(\))m 2326(=)s 240 fnt3 2539 5400(width)m 240 fnt4 3078 5392(\()m 240 fnt3 3162 5400(x)m 168 fnt4 3268 5307(1)m 240 fnt4 3346 5392(\))m 3484(+)s 3685(\274)s 3971(+)s 240 fnt3 4172 5400(width)m 240 fnt4 4711 5392(\()m 240 fnt3 4795 5400(x)m 168 fnt3 4901 5313(n)m 240 fnt4 4993 5392(\))m 240 fnt3 480 4997(height)m 240 fnt4 1094 4989(\()m 240 fnt3 1178 4997(x)m 168 fnt4 1284 4904(1)m 240 fnt4 1434 4989(|)m 1551(\274)s 1849(|)s 240 fnt3 1966 4997(x)m 168 fnt3 2072 4910(n)m 240 fnt4 2164 4989(\))m 2326(=)s 240 fnt3 2539 4997(height)m 240 fnt4 3153 4989(\()m 240 fnt3 3237 4997(x)m 168 fnt4 3343 4904(1)m 240 fnt4 3421 4989(\))m 3571(\255)s 3792(\274)s 4090(\255)s 240 fnt3 4311 4997(height)m 240 fnt4 4925 4989(\()m 240 fnt3 5009 4997(x)m 168 fnt3 5115 4910(n)m 240 fnt4 5207 4989(\))m 240 fnt1 0 4453(The)m 428(corresponding)s 1850(formulas)s 2750(for)s 3088(v)s 3(ertical)k 3855(concatenation)s 5240(are)s 240 fnt3 555 3903(width)m 240 fnt4 1094 3895(\()m 240 fnt3 1178 3903(x)m 168 fnt4 1284 3810(1)m 240 fnt3 1434 3903(/)m 240 fnt4 1609 3895(\274)m 240 fnt3 1907 3903(/)m 2082(x)s 168 fnt3 2188 3816(n)m 240 fnt4 2280 3895(\))m 2442(=)s 240 fnt3 2655 3903(width)m 240 fnt4 3194 3895(\()m 240 fnt3 3278 3903(x)m 168 fnt4 3384 3810(1)m 240 fnt4 3462 3895(\))m 3612(\255)s 3833(\274)s 4131(\255)s 240 fnt3 4352 3903(width)m 240 fnt4 4891 3895(\()m 240 fnt3 4975 3903(x)m 168 fnt3 5081 3816(n)m 240 fnt4 5173 3895(\))m 240 fnt3 480 3500(height)m 240 fnt4 1094 3492(\()m 240 fnt3 1178 3500(x)m 168 fnt4 1284 3407(1)m 240 fnt3 1434 3500(/)m 240 fnt4 1609 3492(\274)m 240 fnt3 1907 3500(/)m 2082(x)s 168 fnt3 2188 3413(n)m 240 fnt4 2280 3492(\))m 2442(=)s 240 fnt3 2655 3500(height)m 240 fnt4 3269 3492(\()m 240 fnt3 3353 3500(x)m 168 fnt4 3459 3407(1)m 240 fnt4 3537 3492(\))m 3675(+)s 3876(\274)s 4162(+)s 240 fnt3 4363 3500(height)m 240 fnt4 4977 3492(\()m 240 fnt3 5061 3500(x)m 168 fnt3 5167 3413(n)m 240 fnt4 5259 3492(\))m 240 fnt1 0 2956(According)m 1063(to)s 1302(these)s 1849(formulas,)s 2805(the)s 3153(height)s 3811(of)s gsave 480 1262 translate 240 fnt3 3044 1354 56 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1240 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (L) lfigpromotelabels grestore 338 338 56 282 240 288 12 451 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 789 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 902 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 1240 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (L) lfigpromotelabels grestore 338 338 56 282 240 288 12 1353 1016 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 136 106(\244)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 1691 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1240 846 56 790 240 288 12 1804 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (L) lfigpromotelabels grestore 338 338 56 282 240 288 12 451 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 789 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 902 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 1240 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 3044 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 10 11 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Symbol %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5704 -1579(-)m 5832(10)s 6127(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13253(is)m 240 fnt4 480 12745([)m 240 fnt3 563 12753(height)m 240 fnt4 1177 12745(\()m 240 fnt3 1261 12753(a)m 240 fnt4 1388 12745(\))m 1538(\255)s 240 fnt3 1759 12753(height)m 240 fnt4 2373 12745(\()m 240 fnt3 2457 12753(b)m 240 fnt4 2583 12745(\))m 2661(])s 2792(+)s 2993([)s 240 fnt3 3076 12753(height)m 240 fnt4 3690 12745(\()m 240 fnt3 3774 12753(c)m 240 fnt4 3888 12745(\))m 4038(\255)s 240 fnt3 4259 12753(height)m 240 fnt4 4873 12745(\()m 240 fnt3 4957 12753(d)m 240 fnt4 5095 12745(\))m 5173(])s 240 fnt1 0 12249(which)m 642(is)s 852(correct,)s 1621(b)s 4(ut)k 1983(for)s 2321(width)s 2923(the)s 3(y)k 3386(yield)s 240 fnt4 480 11691([)m 240 fnt3 563 11699(width)m 240 fnt4 1102 11691(\()m 240 fnt3 1186 11699(a)m 240 fnt4 1313 11691(\))m 1451(+)s 240 fnt3 1652 11699(width)m 240 fnt4 2191 11691(\()m 240 fnt3 2275 11699(b)m 240 fnt4 2401 11691(\))m 2479(])s 2622(\255)s 2843([)s 240 fnt3 2926 11699(width)m 240 fnt4 3465 11691(\()m 240 fnt3 3549 11699(c)m 240 fnt4 3663 11691(\))m 3801(+)s 240 fnt3 4002 11699(width)m 240 fnt4 4541 11691(\()m 240 fnt3 4625 11699(d)m 240 fnt4 4763 11691(\))m 4841(])s 240 fnt1 0 11195(which)m 645(is)s 859(not,)s 1276(since)s 1827(it)s 2023(does)s 2517(not)s 2887(tak)s 2(e)k 3343(the)s 3694(mer)s 4(ging)k 4544(of)s 4819(column)s 5598(marks)s 6237(into)s 6666(account.)s 7578(The)s 8010(asymmetry)s 0 10907(between)m 874(horizontal)s 1918(and)s 2342(v)s 3(ertical)k 3130(has)s 3520(come)s 4114(about)s 4726(because)s 5560(the)s 5928(ro)s 6(w)k 6368(entries,)s 7131(such)s 7648(as)s 240 fnt3 7918 10909(a)m 240 fnt1 8113 10907(and)m 240 fnt3 8537 10909(b)m 240 fnt1 8651 10907(,)m 8779(are)s 0 10619(adjacent)m 849(in)s 1085(the)s 1426(tree,)s 1883(b)s 4(ut)k 2238(the)s 2579(column)s 3346(entries,)s 4082(such)s 4571(as)s 240 fnt3 4814 10621(a)m 240 fnt1 4982 10619(and)m 240 fnt3 5379 10621(c)m 240 fnt1 5481 10619(,)m 5581(are)s 5920(not.)s 6383(It)s 6581(w)s 2(ould)k 7229(be)s 7504(possible)s 8337(to)s 8568(solv)s 3(e)k 0 10331(this)m 395(cross-linking)s 1694(problem)s 2550(by)s 2842(augmenting)s 4024(the)s 4370(size)s 4795(information)s 5979(stored)s 6619(in)s 6861(each)s 7354(node)s 7875(to)s 8112(record)s 8778(the)s 0 10043(number)m 791(of)s 1063(marks)s 1698(and)s 2103(the)s 2451(size)s 2879(of)s 3150(each,)s 3696(b)s 4(ut)k 4058(the)s 4407(author)s 5078(has)s 5449(preferred)s 6381(the)s 6730(follo)s 6(wing)k 7707(method)s 8484(which)s 0 9755(mak)m 2(es)k 660(structural)s 1616(changes)s 2438(to)s 2677(the)s 3025(tree)s 3438(instead.)s 480 9381(If)m 240 fnt3 715 9383(a)m 240 fnt1 896 9381(and)m 240 fnt3 1305 9383(c)m 240 fnt1 1473 9381(share)m 2038(a)s 2210(column)s 2990(mark,)s 3594(the)s 3(y)k 4063(each)s 4563(might)s 5187(as)s 5442(well)s 5914(ha)s 4(v)k 3(e)k 6420(width)s 240 fnt3 7028 9383(width)m 240 fnt4 7572 9375(\()m 240 fnt3 7662 9383(a)m 240 fnt4 7795 9375(\))m 7961(\255)s 240 fnt3 8199 9383(width)m 240 fnt4 8743 9375(\()m 240 fnt3 8833 9383(c)m 240 fnt4 8953 9375(\))m 240 fnt1 9019 9381(,)m 0 9093(since)m 547(all)s 840(width)s 1442(calculations)s 2635(apply)s 3221(to)s 3460(entire)s 4060(columns.)s 5035(Accordingly)s 15(,)k 6323(we)s 6659(introduce)s 7618(a)s 7784(ne)s 6(w)k 8232(operator)s 9(,)k 240 fnt3 0 8807(COL)m 240 fnt1 466 8805(,)m 573(de\207ned)s 1336(by)s 240 fnt3 480 8255(width)m 240 fnt4 1019 8247(\()m 240 fnt3 1103 8255(x)m 168 fnt4 1209 8162(1)m 240 fnt3 1347 8255(COL)m 240 fnt4 1885 8247(\274)m 240 fnt3 2171 8255(COL)m 2709(x)s 168 fnt3 2815 8168(n)m 240 fnt4 2907 8247(\))m 3057(=)s 240 fnt3 3270 8255(width)m 240 fnt4 3809 8247(\()m 240 fnt3 3893 8255(x)m 168 fnt4 3999 8162(1)m 240 fnt4 4077 8247(\))m 4227(\255)s 4448(\274)s 4746(\255)s 240 fnt3 4967 8255(width)m 240 fnt4 5506 8247(\()m 240 fnt3 5590 8255(x)m 168 fnt3 5696 8168(n)m 240 fnt4 5788 8247(\))m 240 fnt1 0 7711(and)m 440(replace)s 1221(both)s 240 fnt3 1741 7713(a)m 240 fnt1 1952 7711(and)m 240 fnt3 2393 7713(c)m 240 fnt1 2591 7711(by)m 240 fnt3 2922 7713(a)m 3218(COL)s 3865(c)s 240 fnt1 3967 7711(.)m 4168(T)s 19(o)k 4504(pre)s 6(v)k 3(ent)k 240 fnt3 5309 7713(COL)m 240 fnt1 5871 7711(operators)m 6848(from)s 7408(disturbing)s 8468(height)s 0 7423(calculations,)m 1248(we)s 1583(de\207ne)s 2224(a)s 2390(binary)s 3055(operator)s 3911(called)s 240 fnt3 4539 7425(SPLIT)m 240 fnt1 5228 7423(by)m 240 fnt3 555 6920(width)m 240 fnt4 1094 6912(\()m 240 fnt3 1178 6920(x)m 1356(SPLIT)s 2057(y)s 240 fnt4 2171 6912(\))m 2333(=)s 240 fnt3 2546 6920(width)m 240 fnt4 3085 6912(\()m 240 fnt3 3169 6920(x)m 240 fnt4 3287 6912(\))m 240 fnt3 480 6517(height)m 240 fnt4 1094 6509(\()m 240 fnt3 1178 6517(x)m 1356(SPLIT)s 2057(y)s 240 fnt4 2171 6509(\))m 2333(=)s 240 fnt3 2546 6517(height)m 240 fnt4 3160 6509(\()m 240 fnt3 3244 6517(y)m 240 fnt4 3358 6509(\))m 240 fnt1 0 6013(which)m 642(switches)s 1516(height)s 2174(and)s 2578(width)s 3180(calculations)s 4372(onto)s 4851(dif)s 6(ferent)k 5726(subtrees.)s 6673(Then)s 7222(the)s 7570(transformation)s gsave 480 4314 translate 240 fnt3 338 1359 56 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 338 1359 56 1298 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 1016 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore end end restore grestore 240 fnt4 1130 5552(\336)m gsave 1671 4314 translate 240 fnt3 2564 1359 56 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1386 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (L) lfigpromotelabels grestore 484 338 56 282 240 288 12 451 508 LoutGr2 currentdict end 200 dict begin begin grestore 484 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(COL)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 935 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 1048 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 1386 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (L) lfigpromotelabels grestore 614 338 56 282 240 288 12 1499 1016 LoutGr2 currentdict end 200 dict begin begin grestore 614 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(SPLIT)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 2113 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 846 56 790 240 288 12 2226 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 508 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 2564 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 240 fnt1 0 3814(widens)m 240 fnt3 740 3816(a)m 240 fnt1 926 3814(to)m 240 fnt3 1176 3816(width)m 240 fnt4 1726 3808(\()m 240 fnt3 1821 3816(a)m 240 fnt4 1959 3808(\))m 2142(\255)s 240 fnt3 2396 3816(width)m 240 fnt4 2946 3808(\()m 240 fnt3 3041 3816(c)m 240 fnt4 3166 3808(\))m 240 fnt1 3303 3814(without)m 4105(af)s 6(fecting)k 5011(its)s 5298(height;)s 6019(it)s 6222(is)s 6443(applied)s 7216(to)s 7466(e)s 6(v)k 3(ery)k 8053(object)s 8708(that)s 0 3526(shares)m 638(its)s 904(column)s 1669(mark)s 2211(with)s 2683(at)s 2905(least)s 3392(one)s 3784(other)s 4325(object.)s 5063(A)s 5283(similar)s 5995(transformation)s 7448(in)s 9(v)k 4(olving)k 8396(a)s 240 fnt3 8552 3528(R)m 9(O)k 12(W)k 240 fnt1 0 3238(operator)m 856(deals)s 1398(with)s 1880(shared)s 2562(ro)s 6(w)k 2982(marks.)s 3730(The)s 4158(ef)s 6(fect)k 4754(on)s 5051(our)s 5430(little)s 5922(table)s 6442(is)s 6652(to)s 6891(replace)s gsave 480 1544 translate 240 fnt3 3044 1354 56 1298 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1240 846 56 790 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (L) lfigpromotelabels grestore 338 338 56 282 240 288 12 451 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 789 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 902 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 1240 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (L) lfigpromotelabels grestore 338 338 56 282 240 288 12 1353 1016 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 136 106(\244)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 1691 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1240 846 56 790 240 288 12 1804 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (L) lfigpromotelabels grestore 338 338 56 282 240 288 12 451 508 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 12 789 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 902 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 1240 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 12 3044 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 0 1093(by)m grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 11 12 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Symbol %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5714 -1579(-)m 5842(11)s 6117(-)s 9066 13419 0 13363 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore gsave 480 11049 translate 240 fnt3 6248 2370 0 2314 240 288 12 LoutGraphic gsave grestore save gsave 70 dict begin lfigdict begin grestore 3293 338 56 282 240 288 12 2955 2032 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 136 106(\244)m grestore (T) lfigpromotelabels grestore 3096 1862 0 1806 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 1717 338 56 282 240 288 12 1379 1524 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 1520 1354 0 1298 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 1067 338 56 282 240 288 12 453 1016 LoutGr2 currentdict end 70 dict begin begin grestore 614 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(SPLIT)m grestore (T) lfigpromotelabels grestore 732 846 0 790 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 608 338 56 282 240 288 12 124 508 LoutGr2 currentdict end 70 dict begin begin grestore 484 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(COL)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 732 846 0 790 240 288 12 788 0 LoutGr2 currentdict end 70 dict begin begin grestore 628 338 56 282 240 288 12 104 508 LoutGr2 currentdict end 70 dict begin begin grestore 524 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(R)m 7(O)k 9(W)k grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1520 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1520 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1520 1354 0 1298 240 288 12 1576 0 LoutGr2 currentdict end 70 dict begin begin grestore 1067 338 56 282 240 288 12 453 1016 LoutGr2 currentdict end 70 dict begin begin grestore 614 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(SPLIT)m grestore (T) lfigpromotelabels grestore 732 846 0 790 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 608 338 56 282 240 288 12 124 508 LoutGr2 currentdict end 70 dict begin begin grestore 484 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(COL)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 732 846 0 790 240 288 12 788 0 LoutGr2 currentdict end 70 dict begin begin grestore 628 338 56 282 240 288 12 104 508 LoutGr2 currentdict end 70 dict begin begin grestore 524 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(R)m 7(O)k 9(W)k grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1520 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 3096 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 3096 1806 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 3096 1862 0 1806 240 288 12 3152 0 LoutGr2 currentdict end 70 dict begin begin grestore 1717 338 56 282 240 288 12 1379 1524 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt4 156 121(|)m grestore (T) lfigpromotelabels grestore 1520 1354 0 1298 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 1067 338 56 282 240 288 12 453 1016 LoutGr2 currentdict end 70 dict begin begin grestore 614 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(SPLIT)m grestore (T) lfigpromotelabels grestore 732 846 0 790 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 608 338 56 282 240 288 12 124 508 LoutGr2 currentdict end 70 dict begin begin grestore 484 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(COL)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 732 846 0 790 240 288 12 788 0 LoutGr2 currentdict end 70 dict begin begin grestore 628 338 56 282 240 288 12 104 508 LoutGr2 currentdict end 70 dict begin begin grestore 524 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(R)m 7(O)k 9(W)k grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1520 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1520 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1520 1354 0 1298 240 288 12 1576 0 LoutGr2 currentdict end 70 dict begin begin grestore 1067 338 56 282 240 288 12 453 1016 LoutGr2 currentdict end 70 dict begin begin grestore 614 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(SPLIT)m grestore (T) lfigpromotelabels grestore 732 846 0 790 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 608 338 56 282 240 288 12 124 508 LoutGr2 currentdict end 70 dict begin begin grestore 484 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(COL)m grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 732 846 0 790 240 288 12 788 0 LoutGr2 currentdict end 70 dict begin begin grestore 628 338 56 282 240 288 12 104 508 LoutGr2 currentdict end 70 dict begin begin grestore 524 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 192 fnt3 56 107(R)m 7(O)k 9(W)k grestore (T) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 338 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 338 338 56 282 240 288 12 394 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 70 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 732 282 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 1520 790 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 3096 1298 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 12 6248 1806 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 0 10598(In)m 244(f)s 2(act,)k 693(common)s 1576(sube)s 3(xpressions)k 3060(are)s 3395(identi\207ed)s 4343(\(tri)s 6(vially\))k 5286(and)s 5678(the)s 6013(result)s 6591(is)s 6788(a)s 6942(directed)s 7756(ac)s 3(yclic)k 8469(graph;)s 0 10310(each)m 486(af)s 6(fected)k 1296(leaf)s 1716(has)s 2076(tw)s 2(o)k 2477(parents,)s 3264(one)s 3657(for)s 3985(width)s 4578(and)s 4972(one)s 5365(for)s 5693(height;)s 6394(and)s 6788(each)s 240 fnt3 7274 10312(COL)m 240 fnt1 7790 10310(or)m 240 fnt3 8040 10312(R)m 9(O)k 12(W)k 240 fnt1 8604 10310(node)m 0 10022(has)m 360(one)s 752(parent)s 1398(and)s 1792(one)s 2184(child)s 2709(for)s 3037(each)s 3521(object)s 4155(lying)s 4690(on)s 4976(the)s 5314(corresponding)s 6726(mark.)s 7370(The)s 7788(data)s 8235(structure)s 0 9734(roughly)m 799(doubles)s 1595(in)s 1838(size,)s 2316(and)s 2720(this)s 3116(occurs)s 3791(only)s 4271(rarely)s 4881(in)s 5124(practice.)s 480 9360(This)m 956(method)s 1732(can)s 2121(cope)s 2629(with)s 3111(an)s 3(y)k 3508(le)s 3(g)k 1(al)k 4023(input,)s 4622(including)s 220 fnt5 480 8859({ a // c | d } | { b / e })m 480 8571(/ { f / i } | { g | h // j })m 240 fnt1 0 8072(which)m 642(produces)s 1557(o)s 3(v)k 3(erlapping)k 2747(spanning)s 3665(columns:)s gsave 480 5924 translate 240 fnt3 1699 1808 0 1695 240 288 60 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1133 452 113 339 240 288 60 0 1356 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 511 178(a)m grestore 566 452 113 339 240 288 60 1133 1356 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 228 150(b)m grestore 566 452 113 339 240 288 60 0 904 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 234 178(c)m grestore 566 452 113 339 240 288 60 566 904 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 222 150(d)m grestore 566 452 113 339 240 288 60 1132 904 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 235 178(e)m grestore 566 452 113 339 240 288 60 0 452 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 235 173(f)m grestore 566 452 113 339 240 288 60 566 452 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 228 200(g)m grestore 566 452 113 339 240 288 60 1132 452 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 228 149(h)m grestore 566 452 113 339 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 253 153(i)m grestore 1133 452 113 339 240 288 60 566 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 230 fnt3 535 176(j)m grestore end end restore grestore 0 5473(The)m 428(box)s 3(es)k 1035(ha)s 4(v)k 3(e)k 1536(been)s 2045(added)s 2675(to)s 2914(clarify)s 3590(the)s 3938(structure.)s 4937(The)s 5365(width)s 5967(of)s 6238(this)s 6634(object)s 7278(is)s 7488(formally)s 240 fnt4 480 4915(\()m 564(\()s 240 fnt3 648 4923(width)m 240 fnt4 1187 4915(\()m 240 fnt3 1271 4923(a)m 240 fnt4 1398 4915(\))m 1548(\255)s 1769(\()s 240 fnt3 1853 4923(x)m 240 fnt4 2031 4915(+)m 240 fnt3 2232 4923(y)m 240 fnt4 2346 4915(\))m 2424(\))s 2562(+)s 240 fnt3 2763 4923(z)m 240 fnt4 2866 4915(\))m 3016(\255)s 3237(\()s 240 fnt3 3321 4923(x)m 240 fnt4 3499 4915(+)m 3700(\()s 3784(\()s 240 fnt3 3868 4923(y)m 240 fnt4 4042 4915(+)m 240 fnt3 4243 4923(z)m 240 fnt4 4346 4915(\))m 4496(\255)s 240 fnt3 4717 4923(width)m 240 fnt4 5256 4915(\()m 240 fnt3 5340 4923(j)m 240 fnt4 5418 4915(\))m 5496(\))s 5574(\))s 240 fnt1 0 4419(where)m 240 fnt3 480 3918(x)m 240 fnt4 670 3910(=)m 240 fnt3 883 3918(width)m 240 fnt4 1422 3910(\()m 240 fnt3 1506 3918(c)m 240 fnt4 1620 3910(\))m 1770(\255)s 240 fnt3 1991 3918(width)m 240 fnt4 2530 3910(\()m 240 fnt3 2662 3918(f)m 240 fnt4 2823 3910(\))m 2973(\255)s 240 fnt3 3194 3918(width)m 240 fnt4 3733 3910(\()m 240 fnt3 3817 3918(i)m 240 fnt4 3892 3910(\))m [ /Dest /LOUT12_1748_s2_4_1 /DEST pdfmark 240 fnt3 480 3367(y)m 240 fnt4 666 3359(=)m 240 fnt3 879 3367(width)m 240 fnt4 1418 3359(\()m 240 fnt3 1502 3367(d)m 240 fnt4 1688 3359(\))m 1838(\255)s 240 fnt3 2059 3367(width)m 240 fnt4 2598 3359(\()m 240 fnt3 2682 3367(g)m 240 fnt4 2808 3359(\))m [ /Dest /LOUT12_1748_s2_4_2 /DEST pdfmark 240 fnt3 480 2816(z)m 240 fnt4 655 2808(=)m 240 fnt3 868 2816(width)m 240 fnt4 1407 2808(\()m 240 fnt3 1491 2816(b)m 240 fnt4 1617 2808(\))m 1767(\255)s 240 fnt3 1988 2816(width)m 240 fnt4 2527 2808(\()m 240 fnt3 2611 2816(e)m 240 fnt4 2722 2808(\))m 2872(\255)s 240 fnt3 3093 2816(width)m 240 fnt4 3632 2808(\()m 240 fnt3 3716 2816(h)m 240 fnt4 3843 2808(\))m [ /Dest /LOUT12_1748_s2_4_3 /DEST pdfmark 240 fnt1 0 2312(It)m 224(seems)s 878(clear)s 1420(that)s 240 fnt3 1857 2314(y)m 240 fnt1 2038 2312(at)m 2289(least)s 2805(must)s 3349(appear)s 4065(twice)s 4657(in)s 4919(an)s 3(y)k 5335(e)s 3(xpression)k 6431(for)s 6788(the)s 7155(width)s 7776(of)s 8066(this)s 8482(object)s 0 2024(made)m 602(out)s 997(of)s 1297(simple)s 2019(addition)s 2889(and)s 3322(maxing)s 4121(operations,)s 5253(sho)s 6(wing)k 6141(that)s 6588(an)s 6900(ordinary)s 7793(tree)s 8235(structure)s 0 1736(is)m 227(insuf\207cient)s 1379(for)s 1734(o)s 3(v)k 3(erlapping)k 2941(spanning)s 3876(columns.)s 4868(The)s 5313(Basser)s 6027(Lout)s 6556(interpreter)s 7626(actually)s 8453(rejects)s 0 1448(such)m 521(structures,)s 1581(o)s 6(wing)k 2252(to)s 2517(the)s 2890(author')s 13(s)k 3736(doubts)s 4451(about)s 5069(the)s 5442(implementability)s 7153(of)s 240 fnt3 7449 1450(Constr)m 3(ained)k 240 fnt1 8722 1448(and)m 240 fnt3 0 1162(AdjustSize)m 240 fnt1 1049 1160(\(Section)m 1902(5.3\))s 2330(on)s 2627(them;)s 3217(b)s 4(ut)k 3579(with)s 4061(hindsight)s 5012(this)s 5408(caution)s 6169(w)s 2(as)k 6590(unnecessary)s 15(.)k 480 786(The)m 915(directed)s 1749(ac)s 3(yclic)k 2482(graph)s 3091(is)s 3308(ordered)s 4104(in)s 4354(the)s 4709(sense)s 5290(that)s 5715(the)s 6071(order)s 6642(of)s 6920(the)s 7275(edges)s 7878(entering)s 8722(and)s 0 498(lea)m 4(ving)k 746(each)s 1234(node)s 1748(matters.)s 2607(The)s 3028(structure)s 3911(is)s 4114(highly)s 4773(dynamic,)s 5696(and)s 6093(tra)s 4(v)k 3(ersals)k 7044(both)s 7519(with)s 7994(and)s 8390(ag)s 1(ainst)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 12 13 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1579(-)m 5833(12)s 6127(-)s 9066 13419 0 13310 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13256(the)m 349(arro)s 6(ws)k 1045(are)s 1394(required.)s 2355(After)s 2920(a)s 3087(fe)s 6(w)k 3494(ad-)s 3788(hoc)s 4189(attempts)s 5050(to)s 5291(e)s 3(xtend)k 5985(the)s 6334(usual)s 6896(tree)s 7310(representation)s 8722(had)s 0 12968(f)m 2(ailed,)k 665(the)s 1030(author)s 1718(de)s 6(v)k 3(eloped)k 2769(a)s 2952(representation)s 4379(based)s 5000(on)s 5314(doubly)s 6051(link)s 2(ed)k 6723(lists)s 7175(of)s 7463(records)s 8235(denoting)s 0 12680(links,)m 578(whose)s 1252(\210e)s 3(xibility)k 2238(more)s 2792(than)s 3267(compensated)s 4580(for)s 4924(the)s 5279(some)s 6(what)k 6309(e)s 3(xcessi)k 6(v)k 3(e)k 7275(memory)s 8133(consump-)s 0 12392(tion.)m 536(F)s 3(or)k 925(e)s 3(xample,)k gsave 480 10526 translate 240 fnt3 3282 1526 0 1470 240 288 12 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 338 338 56 282 240 288 12 0 1188 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 128(a)m grestore (A) lfigpromotelabels grestore 338 338 56 282 240 288 12 2944 1188 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 123 105(b)m grestore (B) lfigpromotelabels grestore 338 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 128 128(c)m grestore (C) lfigpromotelabels grestore 338 338 56 282 240 288 12 1472 0 LoutGr2 currentdict end 200 dict begin begin grestore 338 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore 192 fnt3 118 105(d)m grestore (D) lfigpromotelabels grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR C@CTR lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef C@CTR C@CTR A@CTR lfigangle C@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR D@CTR lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef D@CTR D@CTR A@CTR lfigangle D@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ B@CTR B@CTR D@CTR lfigangle B@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef D@CTR D@CTR B@CTR lfigangle D@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore end end restore grestore 0 10075(is)m 210(represented)s 1369(by)s gsave 1135 5559 translate 240 fnt3 6796 4176 0 4120 240 288 12 LoutGraphic gsave grestore save gsave 300 dict begin lfigdict begin grestore 452 1014 0 958 240 288 12 0 3162 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 180 128(a)m grestore (BASE) lfigpromotelabels grestore (A) lfigpromotelabels grestore 452 1014 0 958 240 288 12 6344 3162 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 180 105(b)m grestore (BASE) lfigpromotelabels grestore (B) lfigpromotelabels grestore 452 1014 0 958 240 288 12 0 1581 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 104 107(LK)m grestore (BASE) lfigpromotelabels grestore (L) lfigpromotelabels grestore 452 1014 0 958 240 288 12 1586 1581 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 104 107(LK)m grestore (BASE) lfigpromotelabels grestore (M) lfigpromotelabels grestore 452 1014 0 958 240 288 12 4758 1581 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 104 107(LK)m grestore (BASE) lfigpromotelabels grestore (N) lfigpromotelabels grestore 452 1014 0 958 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 185 128(c)m grestore (BASE) lfigpromotelabels grestore (C) lfigpromotelabels grestore 452 1014 0 958 240 288 12 3172 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 676 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 206 150 translate 192 fnt3 39 39 0 39 192 288 48 LoutGraphic gsave /lfigblack [ lfigcircle ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigcircle ] lfigdopath pop pop grestore grestore grestore (TOP) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 338 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (MID) lfigpromotelabels grestore 452 338 56 282 240 288 12 0 0 LoutGr2 currentdict end 300 dict begin begin grestore 452 338 56 282 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 192 fnt3 175 105(d)m grestore (BASE) lfigpromotelabels grestore (D) lfigpromotelabels grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ 0.5 cm 0 A@MID@CTR L@MID@CTR A@MID@CTR M@MID@CTR lfigpmin lfigpmin lfigpmin lfigpsub /BL lfigpointdef A@MID@CTR L@MID@CTR A@MID@CTR M@MID@CTR lfigpmax lfigpmax lfigpmax 0.5 cm 0 lfigpadd /TR lfigpointdef BL 0 BL TR lfigydistance lfigpadd /TL lfigpointdef BL BL TR lfigxdistance 0 lfigpadd /BR lfigpointdef BL BR [ BR 0 0.5 cm lfigpadd ] BR 0.5 cm 0.5 cm lfigpadd TR 0.5 cm -0.5 cm lfigpadd [ 0 0.5 cm TR lfigpsub ] TR TL [ 0 0.5 cm TL lfigpsub ] 0.5 cm 0.5 cm TL lfigpsub BL -0.5 cm 0.5 cm lfigpadd [ BL 0 0.5 cm lfigpadd ] BL ] lfigdopath pop pop grestore grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ 0.5 cm 0 L@TOP@CTR C@TOP@CTR L@TOP@CTR C@TOP@CTR lfigpmin lfigpmin lfigpmin lfigpsub /BL lfigpointdef L@TOP@CTR C@TOP@CTR L@TOP@CTR C@TOP@CTR lfigpmax lfigpmax lfigpmax 0.5 cm 0 lfigpadd /TR lfigpointdef BL 0 BL TR lfigydistance lfigpadd /TL lfigpointdef BL BL TR lfigxdistance 0 lfigpadd /BR lfigpointdef BL BR [ BR 0 0.5 cm lfigpadd ] BR 0.5 cm 0.5 cm lfigpadd TR 0.5 cm -0.5 cm lfigpadd [ 0 0.5 cm TR lfigpsub ] TR TL [ 0 0.5 cm TL lfigpsub ] 0.5 cm 0.5 cm TL lfigpsub BL -0.5 cm 0.5 cm lfigpadd [ BL 0 0.5 cm lfigpadd ] BL ] lfigdopath pop pop grestore grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ 0.5 cm 0 M@TOP@CTR D@TOP@CTR N@TOP@CTR D@TOP@CTR lfigpmin lfigpmin lfigpmin lfigpsub /BL lfigpointdef M@TOP@CTR D@TOP@CTR N@TOP@CTR D@TOP@CTR lfigpmax lfigpmax lfigpmax 0.5 cm 0 lfigpadd /TR lfigpointdef BL 0 BL TR lfigydistance lfigpadd /TL lfigpointdef BL BL TR lfigxdistance 0 lfigpadd /BR lfigpointdef BL BR [ BR 0 0.5 cm lfigpadd ] BR 0.5 cm 0.5 cm lfigpadd TR 0.5 cm -0.5 cm lfigpadd [ 0 0.5 cm TR lfigpsub ] TR TL [ 0 0.5 cm TL lfigpsub ] 0.5 cm 0.5 cm TL lfigpsub BL -0.5 cm 0.5 cm lfigpadd [ BL 0 0.5 cm lfigpadd ] BL ] lfigdopath pop pop grestore grestore 0 0 0 0 240 288 12 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ 0.5 cm 0 B@MID@CTR N@MID@CTR B@MID@CTR N@MID@CTR lfigpmin lfigpmin lfigpmin lfigpsub /BL lfigpointdef B@MID@CTR N@MID@CTR B@MID@CTR N@MID@CTR lfigpmax lfigpmax lfigpmax 0.5 cm 0 lfigpadd /TR lfigpointdef BL 0 BL TR lfigydistance lfigpadd /TL lfigpointdef BL BL TR lfigxdistance 0 lfigpadd /BR lfigpointdef BL BR [ BR 0 0.5 cm lfigpadd ] BR 0.5 cm 0.5 cm lfigpadd TR 0.5 cm -0.5 cm lfigpadd [ 0 0.5 cm TR lfigpsub ] TR TL [ 0 0.5 cm TL lfigpsub ] 0.5 cm 0.5 cm TL lfigpsub BL -0.5 cm 0.5 cm lfigpadd [ BL 0 0.5 cm lfigpadd ] BL ] lfigdopath pop pop grestore grestore end end restore grestore 0 5108(where)m 240 fnt3 645 5110(LK)m 240 fnt1 1017 5108(tags)m 1458(a)s 1630(record)s 2304(representing)s 3543(a)s 3715(link.)s 4257(The)s 4690(\207rst)s 5127(list)s 5484(in)s 5732(an)s 3(y)k 6135(node)s 6663(contains)s 7516(all)s 7815(the)s 8169(incoming)s 0 4820(links,)m 577(the)s 931(second)s 1660(contains)s 2514(the)s 2867(outgoing)s 3778(ones.)s 4387(The)s 4821(node)s 5348(serv)s 3(es)k 5999(as)s 6255(the)s 6609(header)s 7311(for)s 7655(both)s 8144(lists.)s 8698(The)s 0 4532(required)m 890(operations)s 1974(reduce)s 2704(to)s 2979(simple)s 3709(appends,)s 4638(deletes,)s 5444(and)s 5885(tra)s 4(v)k 3(ersals)k 6880(of)s 7187(doubly)s 7944(link)s 2(ed)k 8635(lists,)s 0 4244(all)m 325(ha)s 4(ving)k 1058(small)s 1663(constant)s 2552(cost.)s 3133(There)s 3779(is)s 4021(a)s 4219(highly)s 4918(tuned)s 5540(memory)s 6423(allocator)s 9(,)k 7389(and)s 7825(care)s 8310(is)s 8553(tak)s 2(en)k 0 3956(to)m 269(dispose)s 1073(of)s 1374(each)s 1900(node)s 2452(when)s 3058(the)s 3436(last)s 3858(incoming)s 4845(link)s 5308(is)s 5549(deleted,)s 6376(so)s 6672(that)s 7120(there)s 7684(is)s 7924(no)s 8247(need)s 8788(for)s 0 3668(g)m 1(arbage)k 812(collection.)s 480 3294(In)m 739(normal)s 1475(use)s 1854(the)s 2205(number)s 3000(of)s 3275(nodes)s 3888(at)s 4124(higher)s 4799(le)s 6(v)k 3(els)k 5402(of)s 5676(the)s 6028(dag)s 6431(is)s 6644(small)s 7220(in)s 7467(comparison)s 8644(with)s 0 3006(the)m 351(lea)s 4(v)k 3(es)k 995(and)s 1402(their)s 1903(incoming)s 2863(links,)s 3438(so)s 3707(we)s 4046(may)s 4515(estimate)s 5369(the)s 5720(space)s 6311(comple)s 3(xity)k 7441(at)s 7676(about)s 8271(60)s 8570(bytes)s 0 2718(per)m 355(input)s 896(w)s 2(ord)k 1433(\(20)s 1797(bytes)s 2342(per)s 2696(link,)s 3165(40)s 3449(per)s 3803(leaf)s 4222(node\).)s 4920(Careful)s 5680(optimization)s 6935(could)s 7514(easily)s 8114(halv)s 3(e)k 8674(this,)s 0 2430(b)m 4(ut)k 362(since)s 909(memory)s 1760(is)s 1970(reclaimed)s 2969(after)s 3465(printing)s 4275(each)s 4770(page)s 5278(there)s 5811(is)s 6021(little)s 6513(need.)s 240 fnt2 0 1781(2.5.)m 471(Context-sensiti)s 2(v)k 2(e)k 2274(attrib)s 4(utes)k 3318(of)s 3590(objects)s [ /Dest /LOUTstyle /DEST pdfmark 240 fnt1 480 1305(Although)m 1466(we)s 1826(are)s 2198(free)s 2649(to)s 2913(place)s 3498(an)s 3(y)k 3920(object)s 4588(in)s 4856(an)s 3(y)k 5278(conte)s 3(xt,)k 6111(the)s 6484(conte)s 3(xt)k 7270(must)s 7820(in\210uence)s 8778(the)s 0 1017(appearance)m 1131(of)s 1402(the)s 1750(object,)s 2441(since)s 2988(otherwise)s 220 fnt5 480 518(A shor)m -8(t par)k 2(ag)k 2(r)k 2(aph of te)k 6(xt.)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 13 14 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5710 -1579(-)m 5838(13)s 6122(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13253(could)m 588(not)s 952(appear)s 1647(in)s 1887(a)s 2051(v)s 6(ariety)k 2760(of)s 3028(fonts,)s 3611(column)s 4384(widths,)s 5126(etc.)s 5566(This)s 6040(in\210uence)s 6970(cannot)s 7666(tak)s 2(e)k 8116(the)s 8461(purely)s 0 12965(static)m 569(form)s 1106(that)s 1538(block-structured)s 3175(languages)s 4196(use)s 4585(to)s 4837(associate)s 5769(v)s 6(alues)k 6438(with)s 6933(identi\207ers,)s 8009(for)s 8360(then)s 8843(an)s 0 12677(operator)m 850(could)s 1434(not)s 1794(in\210uence)s 2721(the)s 3063(appearance)s 4188(of)s 4453(its)s 4723(parameters;)s 5876(and)s 6274(a)s 6434(state)s 6921(v)s 6(ariable)k 7734(solution)s 8556(is)s 8760(not)s 0 12389(compatible)m 1118(with)s 1600(the)s 1948(o)s 3(v)k 3(erall)k 2660(functional)s 3684(design.)s 480 12015(The)m 914(information)s 2105(needed)s 2848(from)s 3378(the)s 3733(conte)s 3(xt)k 4500(seems)s 5141(quite)s 5682(limited,)s 6471(comprising)s 7607(the)s 7961(font)s 8413(f)s 2(amily)k 15(,)k 0 11727(f)m 2(ace,)k 525(and)s 952(size)s 1402(to)s 1664(use,)s 2114(the)s 2485(style)s 3015(of)s 3309(paragraph)s 4345(breaking)s 5259(required,)s 6185(ho)s 6(w)k 6669(much)s 7281(space)s 7891(to)s 8154(substitute)s 0 11439(between)m 873(the)s 1240(w)s 2(ords)k 1893(of)s 2184(paragraphs,)s 3359(and)s 3782(ho)s 6(w)k 4263(much)s 4871(horizontal)s 5914(and)s 6337(v)s 3(ertical)k 7124(space)s 7730(is)s 7959(a)s 4(v)k 6(ailable)k 8887(to)s 0 11151(recei)m 6(v)k 3(e)k 763(the)s 1139(object.)s 1914(These)s 2569(four)s 3054(items)s 3650(constitute)s 4662(the)s 5038(so-called)s 5985(`style)s 6599(information')s 7866(of)s 8165(Lout.)s 8809(As)s 0 10863(graphics)m 902(rendering)s 1912(hardw)s 2(are)k 2896(impro)s 3(v)k 3(es,)k 3928(the)s 4317(style)s 4865(information)s 6091(will)s 6558(probably)s 7504(gro)s 6(w)k 8085(to)s 8366(include)s 0 10575(colour)m 671(and)s 1075(te)s 3(xture)k 1791(information.)s 480 10201(The)m 908(w)s 2(ay)k 1359(to)s 1598(deal)s 2051(with)s 2533(fonts)s 3062(at)s 3294(least)s 3791(is)s 4001(v)s 3(ery)k 4477(clear:)s 220 fnt5 480 9700({ )m 11(Times Slope 12p } @F)k 6(ont { Hello)k 8(, w)k 2(or)k -3(ld })k 240 fnt1 0 9204(should)m 697(ha)s 4(v)k 3(e)k 1198(result)s 240 fnt3 480 8750(Hello,)m 1104(world)s 240 fnt1 0 8268(Lout)m 528(also)s 983(pro)s 3(vides)k 220 fnt5 1872 8265(@Break)m 240 fnt1 2745 8268(and)m 220 fnt5 3166 8265(@Space)m 240 fnt1 4080 8268(symbols)m 4946(for)s 5301(controlling)s 6420(the)s 6785(paragraph)s 7815(breaking)s 8722(and)s 0 7980(space)m 610(styles)s 1229(mentioned)s 2320(abo)s 3(v)k 3(e.)k 3074(These)s 3724(w)s 2(ork)k 4299(in)s 4565(the)s 4937(same)s 5507(w)s 2(ay)k 15(,)k 6020(returning)s 6972(their)s 7493(right)s 8028(parameters)s 0 7692(in)m 261(the)s 627(style)s 1152(of)s 1441(their)s 1956(left.)s 2455(The)s 2901(implementation)s 4476(is)s 4704(v)s 3(ery)k 5198(simple:)s 6019(one)s 6439(merely)s 7174(broadcasts)s 8252(the)s 8619(style)s 0 7404(information)m 1183(do)s 6(wn)k 1765(into)s 2188(the)s 2533(parse)s 3091(tree)s 3502(of)s 3771(the)s 4116(right)s 4625(parameter)s 13(.)k 5728(A)s 5956(font,)s 6445(for)s 6781(e)s 3(xample,)k 7693(is)s 7901(con)s 9(v)k 3(erted)k 8887(to)s 0 7116(an)m 278(8-bit)s 783(internal)s 1562(name)s 2130(and)s 2529(stored)s 3165(in)s 3403(each)s 3892(leaf,)s 4351(while)s 4932(a)s 5093(breaking)s 5977(style)s 6479(is)s 6683(stored)s 7320(in)s 7557(the)s 7900(root)s 8339(node)s 8855(of)s 0 6828(each)m 495(paragraph.)s 480 6454(The)m 954(same)s 1547(language)s 2514(design)s 3242(can)s 3677(be)s 4006(used)s 4549(for)s 4933(a)s 4(v)k 6(ailable)k 5888(width)s 6536(and)s 6986(height,)s 7738(only)s 8264(here)s 8778(the)s 0 6166(implementation)m 1557(is)s 1767(much)s 2356(more)s 2903(demanding:)s 220 fnt5 480 5665(2i @Wide {)m 480 5377(\(1\) |0.1i An e)m 6(xample)k 480 5089(containing a small)m 480 4801(par)m 2(ag)k 2(r)k 2(aph of \207lled te)k 6(xt.)k 480 4513(})m 240 fnt1 0 4019(is)m 210(guaranteed)s 1317(to)s 1556(be)s 1838(tw)s 2(o)k 2248(inches)s 2910(wide:)s 480 3516(\(1\))m 891(An)s 1270(e)s 3(xample)k 2162(containing)s 3254(a)s 891 3228(small)m 1504(paragraph)s 2558(of)s 2871(\207lled)s 891 2940(te)m 3(xt.)k 0 2487(One)m 448(must)s 966(calculate)s 1863(that)s 2273(1.9)s 2617(inches)s 3272(minus)s 3900(the)s 4241(width)s 4836(of)s 220 fnt5 5100 2484(\(1\))m 240 fnt1 5406 2487(is)m 5609(a)s 4(v)k 6(ailable)k 6510(to)s 6741(the)s 7082(paragraph,)s 8138(and)s 8534(break)s 0 2199(it)m 186(accordingly;)s 1421(Basser)s 2111(Lout)s 2617(does)s 3100(this)s 3490(in)s 3727(tw)s 2(o)k 4130(stages.)s 4872(In)s 5121(the)s 5463(\207rst,)s 5935(upw)s 2(ard-mo)k 3(ving)k 7505(stage,)s 8097(widths)s 8779(are)s 0 1911(calculated)m 1018(using)s 1581(the)s 1920(formulae)s 2829(of)s 3091(Section)s 3856(2.3,)s 4254(which)s 4887(assume)s 5638(that)s 6047(a)s 4(v)k 6(ailable)k 6946(space)s 7524(is)s 7725(in\207nite.)s 8557(If)s 8778(the)s 0 1623(upw)m 2(ard)k 763(mo)s 3(v)k 3(ement)k 1815(reaches)s 2570(a)s 240 fnt3 2724 1625(WIDE)m 240 fnt1 3375 1623(node,)m 3936(corresponding)s 5346(to)s 5573(a)s 220 fnt5 5728 1620(@Wide)m 240 fnt1 6490 1623(operator)m 9(,)k 7372(and)s 7764(the)s 8100(calculated)s 0 1335(width)m 627(e)s 3(xceeds)k 1457(that)s 1900(allo)s 6(wed,)k 2784(a)s 2975(second,)s 3772(do)s 6(wnw)k 2(ard-mo)k 3(ving)k 5661(stage)s 6234(is)s 6469(initiated)s 7334(which)s 8001(attempts)s 8887(to)s 0 1047(reduce)m 681(the)s 1017(width)s 1606(by)s 1888(\207nding)s 2607(and)s 2999(breaking)s 3877(paragraphs.)s 5077(This)s 5541(second)s 6251(stage)s 6786(is)s 6984(quite)s 7505(routine)s 8226(e)s 3(xcept)k 8894(at)s 220 fnt5 0 756(|)m 240 fnt1 84 759(nodes,)m 736(whose)s 1390(children)s 2216(are)s 2549(the)s 2883(columns)s 3731(of)s 3988(a)s 4141(table.)s 4755(It)s 4946(is)s 5142(necessary)s 6111(to)s 6336(apportion)s 7296(the)s 7630(a)s 4(v)k 6(ailable)k 8524(width)s 0 471(\(minus)m 727(inter)s 4(-column)k 2026(g)s 1(aps\))k 2604(among)s 3321(the)s 3681(columns.)s 4668(Basser)s 5377(Lout)s 5901(lea)s 4(v)k 3(es)k 6554(narro)s 6(w)k 7291(columns)s 8166(unbrok)s 2(en)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 14 15 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Bold %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1579(-)m 5833(14)s 6127(-)s 9066 13419 0 13310 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13256(and)m 404(breaks)s 1079(the)s 1427(remaining)s 2449(columns)s 3311(to)s 3550(equal)s 4123(width,)s 4775(using)s 5347(up)s 5640(all)s 5933(of)s 6204(the)s 6552(a)s 4(v)k 6(ailable)k 7460(space.)s 480 12882(The)m 897(size)s 1313(of)s 1572(an)s 1844(object)s 2476(is)s 2675(not)s 3029(clearly)s 3721(determined)s 4843(when)s 5407(the)s 5744(upw)s 2(ard-mo)k 3(ving)k 7309(size)s 7725(is)s 7923(less)s 8321(than)s 8778(the)s 0 12594(do)m 6(wnw)k 2(ard-mo)k 3(ving)k 1871(a)s 4(v)k 6(ailable)k 2786(space,)s 3431(and)s 3842(the)s 4197(object)s 4849(contains)s 5704(constructs)s 6731(that)s 7156(depend)s 7913(on)s 8218(a)s 4(v)k 6(ailable)k 0 12306(space)m 587(\(e.g.)s 1056(right)s 1567(justi\207cation\).)s 2938(F)s 3(or)k 3327(e)s 3(xample,)k 4241(in)s 220 fnt5 480 11805(2i @Wide { Heading // a |1r)m -8(t b })k 240 fnt1 0 11306(it)m 211(seems)s 865(natural)s 1603(to)s 1861(assign)s 2536(a)s 2721(width)s 3342(of)s 3633(tw)s 2(o)k 4062(inches)s 4744(to)s 5002(the)s 5369(subobject)s 220 fnt5 6366 11303(a |1r)m -8(t b)k 240 fnt1 7124 11306(because)m 7957(of)s 8247(the)s 8615(right)s 0 11018(justi\207cation,)m 1270(b)s 4(ut)k 1667(it)s 1895(w)s 2(ould)k 2585(be)s 2903(equally)s 3696(plausible)s 4650(if)s 4903(the)s 5286(width)s 5924(of)s 220 fnt5 6230 11015(Heading)m 240 fnt1 7129 11018(w)m 2(as)k 7586(assigned)s 8503(to)s 8778(the)s 0 10730(subobject)m 989(instead.)s 1843(The)s 2284(author)s 2968(is)s 3191(conscious)s 4199(of)s 4483(ha)s 4(ving)k 5197(f)s 2(ailed)k 5809(to)s 6061(resolv)s 3(e)k 6817(this)s 7226(matter)s 7908(properly;)s 8843(an)s 0 10442(e)m 3(xtra)k 534(operator)s 1390(for)s 1728(controlling)s 2830(a)s 4(v)k 6(ailable)k 3738(space)s 4325(is)s 4535(probably)s 5440(necessary)s 15(.)k 480 10068(The)m 930(actual)s 1578(paragraph)s 2614(breaking)s 3527(is)s 3759(just)s 4187(a)s 4376(simple)s 5092(transformation)s 6578(on)s 6897(the)s 7268(parse)s 7851(tree;)s 8343(the)s 8714(real)s 0 9780(issue)m 544(is)s 764(ho)s 6(w)k 1235(to)s 1484(describe)s 2346(the)s 2704(v)s 6(arious)k 3463(styles:)s 4183(ragged)s 4902(right,)s 5470(adjusted,)s 6384(outdented,)s 7445(and)s 7859(so)s 8135(on.)s 8549(Their)s 0 9492(di)m 6(v)k 3(ersity)k 874(suggests)s 1729(that)s 2140(the)s 3(y)k 2596(should)s 3286(someho)s 6(w)k 4245(be)s 4519(de\207ned)s 5275(using)s 5840(more)s 6380(basic)s 6917(features;)s 7777(b)s 4(ut)k 8132(then)s 8593(there)s 0 9204(are)m 367(algorithms)s 1461(for)s 1820(high-quality)s 3064(paragraph)s 4098(breaking,)s 5063(which)s 5726(presumably)s 6917(must)s 7463(be)s 7766(b)s 4(uilt-in.)k 8650(This)s 0 8916(dilemma)m 915(w)s 2(as)k 1355(not)s 1741(clearly)s 2463(grasped)s 3285(by)s 3598(the)s 3966(author)s 4656(in)s 4919(1985,)s 5525(and)s 5949(he)s 6250(included)s 7152(a)s 7337(b)s 4(uilt-in)k 8113(paragraph)s 0 8628(break)m 2(er)k 9(,)k 818(with)s 1306(the)s 220 fnt5 1660 8625(@Break)m 240 fnt1 2522 8628(operator)m 3384(selecting)s 4292(from)s 4822(a)s 4995(\207x)s 3(ed)k 5535(set)s 5866(of)s 6143(styles.)s 6857(A)s 7093(much)s 7688(better)s 8298(solution)s 0 8340(based)m 603(on)s 900(g)s 1(alle)k 3(ys)k 1624(will)s 2050(be)s 2332(gi)s 6(v)k 3(en)k 2912(in)s 3155(Section)s 3929(5.5,)s 4336(b)s 4(ut,)k 4745(re)s 3(grettably)k 15(,)k 5868(it)s 6060(is)s 6270(not)s 6636(implemented.)s 240 fnt2 0 7547(3.)m 291(De\207nitions)s [ /Dest /LOUT18_694_s3_0_1 /DEST pdfmark 240 fnt1 480 7116(The)m 936(need)s 1474(to)s 1741(pro)s 3(vide)k 2554(a)s 2748(means)s 3438(of)s 3737(packaging)s 4803(useful)s 5470(pieces)s 6146(of)s 6445(code)s 6982(for)s 7348(easy)s 7855(repeated)s 8751(use)s 0 6828(w)m 2(as)k 440(recognised)s 1554(in)s 1816(the)s 2184(v)s 3(ery)k 2679(earliest)s 3447(programming)s 4822(languages.)s 5962(This)s 6458(need)s 6987(is)s 7217(e)s 6(v)k 3(en)k 7736(more)s 8303(acute)s 8883(in)s 0 6540(document)m 1004(formatting,)s 2118(if)s 2335(that)s 2752(is)s 2962(possible,)s 3852(because)s 4664(the)s 5012(majority)s 5874(of)s 6145(users)s 6686(are)s 7033(not)s 7398(programmers)s 8722(and)s 0 6252(do)m 293(not)s 659(understand)s 1767(the)s 2115(code)s 2623(the)s 3(y)k 3086(in)s 9(v)k 4(ok)k 2(e.)k 240 fnt2 0 5603(3.1.)m 471(Operators)s [ /Dest /LOUToperators /DEST pdfmark 240 fnt1 480 5126(It)m 680(is)s 885(e)s 6(vident)k 1637(from)s 2156(the)s 2498(e)s 3(xample)k 3356(of)s 3621(Eqn)s 4059(that)s 4471(user)s 4(-de\207ned)k 5702(operators)s 6636(are)s 6978(needed)s 7708(that)s 8121(mimic)s 8778(the)s 0 4838(primiti)m 6(v)k 3(e)k 929(ones)s 1426(in)s 1677(taking)s 2335(objects)s 3071(as)s 3328(parameters)s 4434(and)s 4845(returning)s 5781(objects)s 6517(as)s 6774(results.)s 7569(F)s 3(or)k 7965(e)s 3(xample,)k 8887(to)s 0 4550(de\207ne)m 641(a)s 807(superscript)s 1915(operator)s 2771(so)s 3037(that)s 220 fnt5 480 4056(2 sup n)m 240 fnt1 0 3531(appears)m 781(as)s 168 fnt1 1145 3647(n)m 240 fnt4 1031 3525(2)m 240 fnt1 1227 3531(,)m 1334(the)s 1682(follo)s 6(wing)k 2659(operator)s 3515(de\207nition)s 4489(may)s 4955(be)s 5237(used:)s 220 fnt5 480 3032(def sup)m 480 2744( precedence 50)m 480 2456( associativity r)m -3(ight)k 480 2168( left x)m 480 1880( r)m -3(ight y)k 480 1592({)m 480 1304( @OneRo)m 3(w { | {-2p @F)k 6(ont y} ^/0.5fk x })k 480 1016(})m 240 fnt1 0 520(The)m 220 fnt5 481 517(sup)m 240 fnt1 940 520(operator)m 1850(has)s 2273(precedence)s 3458(50,)s 3858(is)s 4122(right)s 4686(associati)s 6(v)k 3(e,)k 5886(tak)s 2(es)k 6479(tw)s 2(o)k 6943(objects)s 7724(as)s 8028(parameters)s 0 232(passed)m 720(on)s 1041(the)s 1413(left)s 1814(and)s 2242(right,)s 2825(and)s 3253(returns)s 3991(the)s 4363(object)s 5031(between)s 5910(braces)s 6595(as)s 6869(result.)s 7587(This)s 8087(object)s 8756(has)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 15 16 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5709 -1582(-)m 5837(15)s 6123(-)s 9066 13413 0 13304 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13250(the)m 348(structure)s gsave 608 12769 translate 280 fnt3 128 191 0 123 280 288 70 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 128 191 0 123 280 288 70 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 128 191 0 123 280 288 70 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 260 fnt5 0 56(y)m grestore grestore end end restore grestore gsave 480 12634 translate 280 fnt3 128 135 0 67 280 288 70 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 128 135 0 67 280 288 70 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 128 135 0 67 280 288 70 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 260 fnt5 0 0(x)m grestore grestore end end restore grestore 0 12183(b)m 4(ut)k 381(with)s 882(the)s 1249(\207rst)s 1699(ro)s 6(w)k 2138(mark)s 2709(hidden)s 3437(by)s 3751(the)s 220 fnt5 4118 12180(@OneRo)m 3(w)k 240 fnt1 5268 12183(operator)m 9(,)k 6181(and)s 220 fnt5 6604 12180(y)m 240 fnt1 6791 12183(tw)m 2(o)k 7220(points)s 7875(smaller)s 8657(than)s 0 11895(it)m 220(w)s 2(ould)k 904(otherwise)s 1917(ha)s 4(v)k 3(e)k 2447(been.)s 3091(The)s 3548(length)s 220 fnt5 4231 11892(0.5f)m 240 fnt1 4683 11895(speci\207es)m 5585(half)s 6057(the)s 6433(current)s 7198(font)s 7671(size;)s 8243(Figure)s 8952(2)s 0 11607(describes)m 936(the)s 220 fnt5 1280 11604(k)m 240 fnt1 1446 11607(g)m 1(ap)k 1840(mode.)s 2532(In)s 2784(the)s 3128(Eq)s 3448(equation)s 4325(formatting)s 5382(package)s 6218([10])s 6651(the)s 6995(equation)s 7872(as)s 8118(a)s 8280(whole)s 8916(is)s 0 11319(set)m 331(in)s 580(italic)s 1116(font,)s 1614(and)s 220 fnt5 2024 11316(2)m 240 fnt1 2203 11319(is)m 2419(an)s 2709(identi\207er)s 3637(whose)s 4311(body)s 4852(contains)s 5706(a)s 5879(font)s 6330(change)s 7070(back)s 7590(to)s 7835(Roman.)s 8698(The)s 0 11031(digits)m 220 fnt5 586 11028(0)m 240 fnt1 765 11031(to)m 220 fnt5 1009 11028(9)m 240 fnt1 1186 11031(are)m 1538(classed)s 2291(as)s 2546(punctuation)s 3737(characters,)s 4816(permitting)s 220 fnt5 5869 11028(234)m 240 fnt1 6293 11031(for)m 6635(e)s 3(xample)k 7503(to)s 7747(be)s 8034(interpreted)s 0 10743(as)m 250(a)s 416(sequence)s 1349(of)s 1620(three)s 2153(identi\207ers.)s 480 10369(These)m 1152(de\207nitions)s 2258(are)s 2650(easily)s 3307(implemented)s 4658(by)s 4997(a)s 5208(standard)s 6122(symbol)s 6927(table)s 7492(and)s 7941(an)s 8270(operator)s 0 10081(precedence)m 1155(parser)s 13(.)k 1914(Algol)s 2539(block)s 3157(structure)s 4073(with)s 4580(the)s 4953(usual)s 5538(scope)s 6164(rules)s 6704(w)s 2(as)k 7150(adopted)s 7991(as)s 8266(a)s 8457(matter)s 0 9793(of)m 271(course.)s 480 9419(Operators)m 1481(are)s 1837(limited)s 2580(to)s 2828(at)s 3069(most)s 3603(tw)s 2(o)k 4022(parameters,)s 5185(left)s 5571(and)s 5984(right,)s 6551(and)s 6964(the)s 7321(parameters)s 8428(cannot)s 0 9131(be)m 282(gi)s 6(v)k 3(en)k 862(def)s 2(ault)k 1583(v)s 6(alues.)k 240 fnt3 2352 9133(Named)m 240 fnt1 3097 9131(parameters)m 4195(solv)s 3(e)k 4753(both)s 5236(problems:)s 220 fnt5 480 8630(def @Pref)m 6(ace)k 480 8342( named @T)m 26(ag {})k 480 8054( named @Title { Pref)m 6(ace })k 480 7766( r)m -3(ight @Body)k 480 7478({)m 480 7190( Bold @F)m 6(ont @Title)k 480 6902( //0.3v @Body)m 480 6614(})m 240 fnt1 0 6120(The)m 452(def)s 2(ault)k 1197(v)s 6(alue)k 1789(appears)s 2594(just)s 3023(after)s 3543(the)s 3915(parameter')s 13(s)k 5103(declaration,)s 6295(between)s 7173(braces.)s 7972(In)s 9(v)k 4(ocations)k 0 5832(ha)m 4(v)k 3(e)k 501(a)s 667(natural)s 1385(syntax:)s 220 fnt5 480 5331(@Pref)m 6(ace)k 480 5043( @Title { About this book })m 480 4755({)m 480 4467( F)m 6(e)k 4(w obser)k -6(v)k 5(ers w)k 2(ould ha)k 4(v)k 5(e supposed in 1984, that ...)k 480 4179(})m 240 fnt1 0 3685(with)m 480(the)s 826(actual)s 1449(named)s 2143(parameters)s 3239(follo)s 6(wing)k 4214(directly)s 4995(after)s 5489(the)s 5835(operator)s 9(,)k 6727(before)s 7391(an)s 3(y)k 7786(right)s 8295(parame-)s 0 3397(ter)m 13(.)k 400(In)s 653(this)s 1046(e)s 3(xample,)k 220 fnt5 1958 3394(@T)m 26(ag)k 240 fnt1 2578 3397(will)m 3001(recei)s 6(v)k 3(e)k 3735(its)s 4008(def)s 2(ault)k 4726(v)s 6(alue,)k 5342(and)s 5744(a)s 5907(less)s 6313(e)s 3(xpert)k 6965(user)s 7420(could)s 8007(safely)s 8628(omit)s 0 3109(the)m 220 fnt5 348 3106(@Title)m 240 fnt1 1036 3109(parameter)m 2050(as)s 2300(well.)s 480 2735(Lout)m 1007(permits)s 1789(named)s 2500(parameters)s 3613(to)s 3867(ha)s 4(v)k 3(e)k 4384(parameters,)s 5553(a)s 5734(feature)s 6467(with)s 6964(applications)s 8185(to)s 8440(biblio-)s 0 2447(graphic)m 781(databases,)s 1816(running)s 2626(headers,)s 3475(and)s 3891(other)s 4454(places)s 5114(where)s 5766(a)s 5944(format)s 6652(has)s 7034(to)s 7285(be)s 7579(supplied)s 8460(before)s 0 2159(content)m 760(is)s 965(kno)s 6(wn.)k 1771(One)s 2221(could)s 2806(go)s 3094(further)s 3798(and)s 4197(pro)s 3(vide)k 4976(a)s 5137(complete)s 6064(lambda)s 6823(calculus,)s 7708(with)s 8185(functions)s 0 1871(as)m 250(\207rst-)s 689(class)s 1204(objects,)s 1988(pro)s 3(vided)k 2894(care)s 3347(w)s 2(as)k 3768(tak)s 2(en)k 4341(not)s 4707(to)s 4946(intimidate)s 5970(the)s 6318(non-)s 6746(e)s 3(xpert)k 7400(user)s 13(.)k 240 fnt2 0 1222(3.2.)m 471(Recursion)s 1563(and)s 2004(page)s 2539(lay)s 6(out)k [ /Dest /LOUTrecursion /DEST pdfmark 240 fnt1 480 745(Design)m 1302(and)s 1794(implementation)s 3439(should)s 4223(proceed)s 5126(together)s 6057(in)s 6387(e)s 3(xploratory)k 7628(projects,)s 8579(since)s 0 457(otherwise)m 988(the)s 1340(design)s 2025(too)s 2388(easily)s 3003(becomes)s 3894(unrealistic.)s 5056(Sometimes)s 6173(the)s 6524(implementation)s 8085(does)s 8579(more)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 16 17 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1581(-)m 5833(16)s 6126(-)s 9066 13414 0 13305 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13251(than)m 469(its)s 745(designer)s 1615(intended.)s 2603(The)s 3031(author)s 3702(wrote)s 4302(the)s 4650(follo)s 6(wing)k 5627(purely)s 6292(as)s 6542(a)s 6708(testing)s 7398(scaf)s 6(fold:)k 220 fnt5 480 12750(def @P)m 8(age r)k -3(ight x)k 480 12462({)m 480 12174( 8i @Wide 11i @High)m 480 11886( {)m 480 11598( //1i ||1i x ||1i)m 480 11310( //1i)m 480 11022( })m 480 10734(})m 240 fnt1 0 10240(Only)m 518(afterw)s 2(ards)k 1558(did)s 1906(he)s 2172(realize)s 2848(its)s 3108(signi\207cance:)s 4400(the)s 4732(concept)s 5521(of)s 5776(a)s 5926(page)s 6418(had)s 6807(been)s 7300(de\207ned)s 8047(outside)s 8778(the)s 0 9952(implementation,)m 1619(remo)s 3(ving)k 2598(the)s 2959(need)s 3481(for)s 3831(commands)s 4932(for)s 5282(setting)s 5984(page)s 6505(width)s 7119(and)s 7535(height,)s 8253(mar)s 4(gins,)k 0 9664(and)m 404(so)s 670(on.)s 480 9290(De\207ning)m 1393(a)s 1582(sequence)s 2538(of)s 2831(pages)s 3450(is)s 3683(harder)s 9(,)k 4414(since)s 4983(their)s 5503(number)s 6317(is)s 6550(not)s 6938(kno)s 6(wn)k 7665(in)s 7931(adv)s 6(ance.)k 8896(A)s 0 9002(simple)m 693(v)s 3(ersion)k 1451(of)s 1722(this)s 2118(same)s 2665(problem)s 3522(is)s 3732(af)s 6(forded)k 4593(by)s 4887(the)s 5235(leaders)s 5962(found)s 6579(in)s 6822(tables)s 7430(of)s 7701(contents:)s 480 8497(Chapter)m 1297(7)s 1525(..)s 1809(..)s 2093(..)s 2377(..)s 2661(..)s 2945(..)s 3229(..)s 3513(..)s 3797(..)s 4081(..)s 4365(..)s 4649(..)s 4933(..)s 5217(..)s 5501(..)s 5785(..)s 6009(53)s 0 7994(This)m 476(seemed)s 1251(to)s 1490(require)s 2222(recursion,)s 3218(speci\207cally)s 4360(the)s 4708(de\207nition)s 220 fnt5 480 7493(def @Leaders { ..)m 13( @Leaders })k 240 fnt1 0 6999(Note)m 535(that)s 968(both)s 220 fnt5 1465 6996(..)m 240 fnt1 1643 6999(and)m 220 fnt5 2061 6996(@Leaders)m 240 fnt1 3145 6999(are)m 3506(objects,)s 4305(so)s 4585(the)s 4948(tw)s 2(o)k 5372(spaces)s 6062(separating)s 7111(them)s 7664(are)s 8026(signi\207cant.)s 0 6711(No)m 361(base)s 858(case)s 1341(is)s 1567(gi)s 6(v)k 3(en,)k 2213(and)s 2633(indeed)s 3345(we)s 3696(ha)s 4(v)k 3(e)k 4213(no)s 4522(boolean)s 5353(or)s 5628(conditional)s 6775(operators)s 7731(with)s 8229(which)s 8887(to)s 0 6423(e)m 3(xpress)k 757(it;)s 993(b)s 4(ut)k 1346(we)s 1673(can)s 2053(adopt)s 2637(the)s 2977(implicit)s 3770(base)s 4243(`if)s 4530(space)s 5109(is)s 5311(not)s 5668(suf\207cient,)s 6656(delete)s 220 fnt5 7273 6420(@Leaders)m 240 fnt1 8334 6423(and)m 8729(an)s 3(y)k 0 6135(preceding)m 996(space'.)s 1770(Then)s 2319(the)s 2667(e)s 3(xpression)k 220 fnt5 480 5634(4i @Wide { Chapter 7 @Leaders 53 })m 240 fnt1 0 5138(will)m 416(produce)s 1233(the)s 1571(object)s 2205(sho)s 6(wn)k 2872(abo)s 3(v)k 3(e.)k 3592(It)s 3787(is)s 3987(hard)s 4460(to)s 4689(see)s 5040(ho)s 6(w)k 5491(this)s 5877(base)s 6348(could)s 6928(be)s 7200(made)s 7764(e)s 3(xplicit,)k 8573(with-)s 0 4850(out)m 348(violating)s 1232(the)s 1561(general)s 2301(principle)s 3187(of)s 3439(k)s 2(eeping)k 4230(all)s 4504(size)s 4912(information)s 6079(internal.)s 6953(In)s 7190(the)s 7519(implementation,)s 220 fnt5 0 4559(@Leaders)m 240 fnt1 1071 4562(remains)m 1881(une)s 3(xpanded)k 3097(while)s 3686(sizes)s 4204(are)s 4554(being)s 5142(calculated;)s 6224(then)s 6696(it)s 6891(is)s 7103(treated)s 7813(similarly)s 8718(to)s 8960(a)s 0 4274(recepti)m 6(v)k 3(e)k 922(symbol,)s 1734(with)s 2216(its)s 2492(body)s 3026(as)s 3276(an)s 3559(incoming)s 4516(g)s 1(alle)k 3(y)k 5150(\(Section)s 6003(5.2\).)s 480 3900(W)m 9(ith)k 1014(this)s 1418(settled,)s 2156(it)s 2356(is)s 2574(no)s 6(w)k 3044(clear)s 3575(ho)s 6(w)k 4044(to)s 4291(de\207ne)s 4940(a)s 5115(document)s 6127(which)s 6777(is)s 6995(a)s 7169(numbered)s 8193(sequence)s 0 3612(of)m 271(pages.)s 980(Let)s 220 fnt5 1358 3609(@Ne)m 6(xt)k 240 fnt1 2082 3612(be)m 2364(a)s 2530(pre\207x)s 3143(operator)s 3999(which)s 4641(returns)s 5355(its)s 5631(parameter)s 6645(plus)s 7095(one.)s 7605(Then)s 220 fnt5 480 3111(def @P)m 8(ageList)k 480 2823( r)m -3(ight @P)k 8(ageNum)k 480 2535({)m 480 2247( @P)m 8(age {)k 480 1959( |0.5r)m -8(t - @P)k 8(ageNum -)k 480 1671( //1v @T)m 26(e)k 6(xtPlace)k 480 1383( //1r)m -8(t @F)k 6(ootSect)k 480 1095( })m 480 807( //)m 480 519( @P)m 8(ageList @Ne)k 6(xt @P)k 8(ageNum)k 480 231(})m grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 17 18 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5708 -1579(-)m 5836(17)s 6124(-)s 9066 13418 0 13418 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13255(when)m 576(in)s 9(v)k 4(ok)k 2(ed)k 1391(in)s 1634(the)s 1982(e)s 3(xpression)k 220 fnt5 3059 13252(@P)m 8(ageList 1)k 240 fnt1 4267 13255(,)m 4374(has)s 4744(for)s 5082(its)s 5358(result)s 5948(the)s 6296(potentially)s 7372(in\207nite)s 8105(object)s 1927 2494 0 2494 240 288 60 480 10421 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt1 845 2216(-)m 931(1)s 1035(-)s 140 fnt5 170 2000(@T)m 16(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 1927 2494 0 2494 240 288 60 480 7927 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt1 839 2216(-)m 925(2)s 1041(-)s 140 fnt5 170 2000(@T)m 16(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 140 fnt5 480 7712(@P)m 5(ageList 3)k 240 fnt1 0 7230(Similarly)m 15(,)k 980(we)s 1315(may)s 1781(de\207ne)s 220 fnt5 2422 7227(@F)m 6(ootSect)k 240 fnt1 3573 7230(lik)m 2(e)k 3985(this:)s 220 fnt5 480 6729(def @F)m 6(ootSect)k 480 6441({)m 480 6153( def @F)m 6(ootList)k 480 5865( r)m -3(ight @Num)k 480 5577( {)m 480 5289( @F)m 6(ootPlace)k 480 5001( //1v)m 480 4713( @F)m 6(ootList @Ne)k 6(xt @Num)k 480 4425( })m 480 3849( 1i @Wide @HLine)m 480 3561( //1v)m 480 3273( @F)m 6(ootList 1)k 480 2985(})m 240 fnt1 0 2491(so)m 266(that)s 684(an)s 967(in)s 9(v)k 4(ocation)k 2021(of)s 220 fnt5 2292 2488(@F)m 6(ootSect)k 240 fnt1 3443 2491(produces)m gsave 480 2151 translate 220 fnt5 1440 0 0 0 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore 220 fnt5 480 1806(@F)m 6(ootPlace)k 480 1518(@F)m 6(ootPlace)k 480 1230(@F)m 6(ootPlace)k 480 942(...)m grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 18 19 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5708 -1579(-)m 5836(18)s 6123(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13253(The)m 476(e)s 3(xpansion)k 1550(process)s 2367(is)s 2626(v)s 3(ery)k 3150(similar)s 3921(to)s 4209(a)s 4424(BNF)s 4997(deri)s 6(v)k 6(ation,)k 6109(and)s 6562(w)s 2(ould)k 7266(be)s 7597(attempted)s 8646(only)s 0 12965(on)m 297(demand.)s 480 12591(Clearly)m 15(,)k 1276(deciding)s 2154(which)s 2797(e)s 3(xpansions)k 3910(to)s 4150(tak)s 2(e)k 4603(and)s 5008(replacing)s 220 fnt5 5951 12588(@T)m 26(e)k 6(xtPlace)k 240 fnt1 7170 12591(and)m 220 fnt5 7575 12588(@F)m 6(ootPlace)k 240 fnt1 8832 12591(by)m 0 12303(the)m 338(appropriate)s 1471(actual)s 2085(te)s 3(xt)k 2489(will)s 2904(not)s 3259(be)s 3530(easy;)s 4056(this)s 4441(is)s 4640(the)s 4977(subject)s 5703(of)s 5963(Section)s 6726(5.1.)s 7179(The)s 7596(important)s 8574(point)s 0 12015(for)m 331(no)s 6(w)k 784(is)s 986(that)s 1397(we)s 1724(ha)s 4(v)k 3(e)k 2217(here)s 2677(a)s 2835(v)s 3(ery)k 3303(simple)s 3989(and)s 4385(\210e)s 3(xible)k 5147(method)s 5916(of)s 6179(specifying)s 7220(the)s 7561(layout)s 8211(of)s 8474(pages,)s 0 11727(which)m 642(requires)s 1462(no)s 1755(specialized)s 2874(language)s 3794(features.)s 240 fnt2 0 11079(3.3.)m 471(Modules)s [ /Dest /LOUTmodules /DEST pdfmark 240 fnt1 480 10648(It)m 679(is)s 882(well)s 1342(accepted)s 2229(that)s 2641(the)s 2982(visibility)s 3879(of)s 4143(symbols)s 4986(is)s 5189(not)s 5549(adequately)s 6632(controlled)s 7653(by)s 7940(Algol)s 8533(block)s 0 10360(structure.)m 999(The)s 1427(author)s 2098(is)s 2308(a)s 3(w)k 2(are)k 2929(of)s 3200(se)s 6(v)k 3(eral)k 3922(major)s 4539(problems)s 5480(of)s 5751(this)s 6147(kind)s 6631(in)s 6874(document)s 7878(formatting.)s 480 9986(One)m 976(problem)s 1874(is)s 2126(that)s 2585(some)s 3187(symbols)s 4078(should)s 4816(be)s 5139(visible)s 5874(only)s 6395(within)s 7104(restricted)s 8091(parts)s 8647(of)s 8960(a)s 0 9698(document.)m 1108(F)s 3(or)k 1497(e)s 3(xample,)k 2411(we)s 2746(naturally)s 3649(e)s 3(xpect)k 4330(equation)s 5211(formatting)s 6272(to)s 6511(be)s 6793(accomplished)s 8166(lik)s 2(e)k 8578(this:)s 220 fnt5 480 9201(surrounding te)m 6(xt)k 480 8913(@Eq { {x sup 2 + 1} o)m 3(v)k 5(er 4 })k 480 8625(surrounding te)m 6(xt)k 240 fnt1 0 8126(with)m 482(the)s 830(symbols)s 220 fnt5 1679 8123(sup)m 240 fnt1 2025 8126(,)m 220 fnt5 2132 8123(o)m 3(v)k 5(er)k 240 fnt1 2551 8126(,)m 2658(etc.,)s 3103(visible)s 3796(only)s 4276(within)s 4944(the)s 5292(equation,)s 6223(not)s 6589(in)s 6832(the)s 7180(surrounding)s 8390(te)s 3(xt.)k 480 7752(It)m 695(seems)s 1341(natural)s 2069(to)s 2319(de\207ne)s 2970(these)s 3528(symbols)s 4387(within)s 220 fnt5 5066 7749(@Eq)m 240 fnt1 5544 7752(,)m 5661(since)s 6219(the)s 3(y)k 6692(are)s 7050(local)s 7579(to)s 7829(equations.)s 8921(It)s 0 7464(only)m 494(remains)s 1316(then)s 1799(to)s 2053(decree)s 2746(that)s 3179(symbols)s 4043(local)s 4576(to)s 220 fnt5 4830 7461(@Eq)m 240 fnt1 5382 7464(are)m 5744(to)s 5998(be)s 6294(visible)s 7002(within)s 7684(its)s 7975(actual)s 8615(right)s 0 7176(parameter)m 9(,)k 1052(and)s 1456(this)s 1852(is)s 2062(done)s 2584(by)s 2878(replacing)s 3820(the)s 4168(right)s 4679(formal)s 5370(parameter)s 6384(with)s 6866(a)s 240 fnt3 7032 7178(body)m 240 fnt1 7554 7176(parameter:)m 220 fnt5 480 6690(e)m 6(xpor)k -8(t sup o)k 3(v)k 5(er)k 480 6402(def @Eq)m 480 6114( body @Body)m 480 5826({)m 480 5538( def sup ...)m 480 5250( def o)m 3(v)k 5(er ...)k 480 4674( Slope @F)m 6(ont @Body)k 480 4386(})m 240 fnt1 0 3892(The)m 220 fnt5 426 3889(e)m 6(xpor)k -8(t)k 240 fnt1 1092 3892(clause)m 1743(lists)s 2176(the)s 2522(identi\207ers)s 3526(which)s 4166(are)s 4511(permitted)s 5482(to)s 5719(be)s 5999(visible)s 6690(outside)s 7435(their)s 7930(usual)s 8488(range,)s 0 3604(the)m 359(body)s 905(of)s 220 fnt5 1188 3601(@Eq)m 240 fnt1 1666 3604(;)m 1790(and)s 2206(the)s 220 fnt5 2566 3601(body)m 240 fnt1 3112 3604(declaration)m 4241(imports)s 5034(them)s 5584(into)s 6021(\(mak)s 2(es)k 6772(them)s 7322(visible)s 8027(within\))s 8778(the)s 0 3316(actual)m 614(right)s 1114(parameter)s 2117(of)s 2376(each)s 2860(in)s 9(v)k 4(ocation)k 3903(of)s 220 fnt5 4162 3313(@Eq)m 240 fnt1 4640 3316(.)m 4793(This)s 5258(arrangement)s 6500(has)s 6859(pro)s 3(v)k 3(en)k 7564(v)s 3(ery)k 8028(con)s 9(v)k 3(enient)k 0 3028(for)m 338(de\207ning)s 1176(a)s 1342(v)s 6(ariety)k 2053(of)s 2324(special-purpose)s 3880(packages.)s 480 2654(Another)m 1361(problem)s 2256(arises)s 2888(when)s 3502(global)s 4193(symbols,)s 5136(such)s 5669(as)s 5957(the)s 6343(ones)s 6871(used)s 7406(for)s 7782(headings)s 8722(and)s 0 2366(paragraph)m 1034(separators,)s 2130(call)s 2550(on)s 2868(v)s 6(alues)k 3545(that)s 3984(the)s 4353(non-e)s 3(xpert)k 5468(user)s 5947(will)s 6394(need)s 6925(to)s 7185(modify)s 15(,)k 7989(such)s 8506(as)s 8778(the)s 0 2078(initial)m 605(font)s 1044(or)s 1297(paragraph)s 2303(indent.)s 3059(These)s 3680(v)s 6(alues)k 4329(are)s 4670(lik)s 2(e)k 5076(parameters)s 6167(of)s 6432(the)s 6774(document)s 7771(as)s 8015(a)s 8175(whole,)s 8860(so)s 0 1790(it)m 192(is)s 402(natural)s 1120(to)s 1359(try)s 1678(this:)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 19 20 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5706 -1579(-)m 5834(19)s 6125(-)s 9066 13414 0 13310 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 220 fnt5 480 13253(e)m 6(xpor)k -8(t @Heading @PP ...)k 480 12965(def @BookLa)m 6(y)k 4(out)k 480 12677( named @InitialF)m 6(ont { )k 11(Times Base 12p })k 480 12389( named @InitialBreak { adjust 14p })m 480 12101( named @ColumnWidth { 6i })m 480 11813( ...)m 480 11525({)m 480 11237( def @Heading ...)m 480 10949( def @PP ...)m 480 10661(})m 240 fnt1 0 10167(No)m 6(w)k 220 fnt5 579 10164(@Heading)m 240 fnt1 1732 10167(and)m 220 fnt5 2202 10164(@PP)m 240 fnt1 2833 10167(may)m 3365(in)s 9(v)k 4(ok)k 2(e)k 220 fnt5 4124 10164(@InitialF)m 6(ont)k 240 fnt1 5411 10167(and)m 5881(the)s 6295(other)s 6911(parameters.)s 8188(T)s 19(o)k 8554(mak)s 2(e)k 220 fnt5 0 9876(@Heading)m 240 fnt1 1100 9879(and)m 220 fnt5 1517 9876(@PP)m 240 fnt1 2096 9879(visible)m 2802(throughout)s 3926(the)s 4287(document,)s 5352(we)s 5700(need)s 6223(only)s 6716(add)s 7133(a)s 7312(body)s 7859(parameter)s 8887(to)s 220 fnt5 0 9588(@BookLa)m 6(y)k 4(out)k 240 fnt1 1428 9591(and)m 1832(present)s 2582(the)s 2930(entire)s 3529(document)s 4533(as)s 220 fnt5 480 9090(@BookLa)m 6(y)k 4(out)k 480 8802( @InitialF)m 6(ont { Helv)k 5(etica Base 10p })k 480 8514( @InitialBreak { adjust 12p })m 480 8226({)m 480 7938( )m 11(The document.)k 480 7650(})m 240 fnt1 0 7156(b)m 4(ut)k 383(for)s 742(practical)s 1639(reasons)s 2429(gi)s 6(v)k 3(en)k 3030(belo)s 6(w)k 3684(we)s 4040(prefer)s 4691(not)s 5078(to)s 5338(enclose)s 6132(the)s 6502(entire)s 7122(document)s 8147(in)s 8412(braces.)s 0 6868(Instead,)m 797(we)s 1132(write)s 220 fnt5 480 6386(@Use { @BookLa)m 6(y)k 4(out)k 480 6098( @InitialF)m 6(ont { Helv)k 5(etica Base 10p })k 480 5810( @InitialBreak { adjust 12p })m 480 5522(})m 480 5234(The document.)m 240 fnt1 0 4780(which)m 643(has)s 1015(the)s 1365(same)s 1914(ef)s 6(fect:)k 220 fnt5 2617 4777(@Use)m 240 fnt1 3284 4780(mak)m 2(es)k 3946(the)s 4296(e)s 3(xported)k 5190(symbols)s 6040(of)s 220 fnt5 6313 4777(@BookLa)m 6(y)k 4(out)k 240 fnt1 7743 4780(visible)m 8438(for)s 8778(the)s 0 4492(remainder)m 1028(of)s 1299(the)s 1647(document,)s 2698(and)s 3102(is)s 3312(permitted)s 4285(only)s 4765(at)s 4997(the)s 5345(be)s 3(ginning.)k 480 4118(The)m 925(third)s 1451(feature)s 2187(that)s 2622(af)s 6(fects)k 3319(visibility)s 15(,)k 4278(and)s 4699(which)s 5359(will)s 5802(pro)s 3(v)k 3(e)k 6414(useful)s 7071(for)s 7426(cross)s 7986(referencing)s 0 3830(\(Section)m 851(6.1\),)s 1335(is)s 1543(the)s 220 fnt5 1889 3827(@Open)m 240 fnt1 2693 3830(symbol.)m 3560(It)s 3763(mak)s 2(es)k 4421(the)s 4767(e)s 3(xported)k 5657(symbols)s 6504(of)s 6773(its)s 7047(left)s 7422(parameter)s 8433(visible)s 0 3542(within)m 668(its)s 944(right)s 1455(parameter)s 9(,)k 2507(and)s 2911(is)s 3121(therefore)s 4038(similar)s 4760(to)s 4999(the)s 5347(P)s 3(ascal)k 220 fnt5 6009 3539(with)m 240 fnt1 6444 3542(statement.)m 480 3168(It)m 698(could)s 1301(be)s 1596(ar)s 4(gued)k 2314(that)s 2745(Lout)s 3270(is)s 3493(o)s 3(v)k 3(er)k 4(-supplied)k 4869(with)s 5364(these)s 5924(visibility)s 6840(modifying)s 7903(features:)s 8778(the)s 0 2880(body)m 544(parameter)s 9(,)k 220 fnt5 1606 2877(@Use)m 240 fnt1 2282 2880(and)m 220 fnt5 2696 2877(@Open)m 240 fnt1 3513 2880(do)m 3816(not)s 4193(seem)s 4754(suf\207ciently)s 5894(dif)s 6(ferent)k 6779(from)s 7314(each)s 7819(another)s 13(.)k 8698(The)s 220 fnt5 0 2589(@Open)m 240 fnt1 806 2592(symbol)m 1566(is)s 1776(the)s 2124(most)s 2649(general,)s 3459(being)s 4044(capable)s 4830(of)s 5101(replacing)s 6043(the)s 6391(other)s 6942(tw)s 2(o.)k 7463(F)s 3(or)k 7852(e)s 3(xample,)k 220 fnt5 480 2091(@Use { x })m 480 1803(@Use { y })m 480 1515(Body of document)m 240 fnt1 0 1017(can)m 389(be)s 671(replaced)s 1538(by)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 20 21 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5704 -1579(-)m 5832(20)s 6127(-)s 9066 13416 0 13312 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 220 fnt5 480 13255(x @Open {)m 480 12967(y @Open {)m 480 12679(Body of document)m 480 12391(}})m 240 fnt1 0 11897(and,)m 453(taking)s 1104(the)s 220 fnt5 1452 11894(@Eq)m 240 fnt1 1990 11897(symbol)m 2750(abo)s 3(v)k 3(e)k 3372(as)s 3622(e)s 3(xample,)k 4536(we)s 4871(could)s 5461(eliminate)s 6405(its)s 6681(body)s 7215(parameter)s 9(,)k 8267(add)s 220 fnt5 480 11396(def @Body r)m -3(ight x { Slope @F)k 6(ont x })k 240 fnt1 0 10897(to)m 239(the)s 587(e)s 3(xported)k 1479(de\207nitions)s 2540(of)s 220 fnt5 2811 10894(@Eq)m 240 fnt1 3289 10897(,)m 3396(and)s 3800(replace)s 220 fnt5 480 10396(@Eq { object })m 240 fnt1 0 9899(by)m 220 fnt5 480 9398(@Eq @Open { @Body { object } })m 240 fnt1 0 8898(If)m 220 fnt5 232 8895(@Eq)m 240 fnt1 772 8898(is)m 985(a)s 1153(g)s 1(alle)k 3(y)k 1790(\(Section)s 2645(5.1\),)s 220 fnt5 3133 8895(@Body)m 240 fnt1 3917 8898(must)m 4444(tak)s 2(e)k 4899(o)s 3(v)k 3(er)k 5380(that)s 5800(function.)s 6764(But)s 7172(one)s 7577(w)s 2(ould)k 8234(not)s 8603(w)s 2(ant)k 0 8610(to)m 253(write)s 813(these)s 1374(clumsy)s 2133(e)s 3(xpressions)k 3311(in)s 3568(practice,)s 4444(and)s 4862(the)s 5224(enclosure)s 6210(of)s 6495(lar)s 4(ge)k 7038(quantities)s 8032(of)s 8317(input)s 8883(in)s 0 8322(e)m 3(xtra)k 534(braces)s 1195(could)s 1785(cause)s 2372(Basser)s 3069(Lout)s 3581(to)s 3820(run)s 4196(out)s 4562(of)s 4833(memory)s 5684(\(Section)s 6537(5.4\).)s 480 7948(A)m 700(quite)s 1224(separate)s 2052(kind)s 2526(of)s 2786(visibility)s 3679(problem)s 4526(arises)s 5110(when)s 5676(e)s 3(xpert)k 6319(users)s 6851(wish)s 7350(to)s 7579(de\207ne)s 8210(an)s 8482(object)s 0 7660(or)m 259(operator)s 1115(for)s 1453(repeated)s 2320(use)s 2695(within,)s 3413(say)s 15(,)k 3824(equations:)s 220 fnt5 480 7161(def isum { sum from i=1 to n })m 240 fnt1 0 6667(As)m 338(it)s 551(stands)s 1221(this)s 1638(can)s 2048(only)s 2549(be)s 2852(placed)s 3555(within)s 4244(the)s 220 fnt5 4613 6664(@Eq)m 240 fnt1 5172 6667(package)m 6033(itself,)s 6637(where)s 220 fnt5 7298 6664(sum)m 240 fnt1 7780 6667(and)m 8205(the)s 8575(other)s 0 6379(symbols)m 841(are)s 1179(visible,)s 1915(b)s 4(ut)k 2268(it)s 2451(is)s 2653(not)s 3010(desirable)s 3919(to)s 4150(modify)s 4886(the)s 5225(source)s 5897(code)s 6396(of)s 6658(a)s 6816(standard)s 7675(package.)s 8614(Lout)s 0 6091(pro)m 3(vides)k 872(an)s 220 fnt5 1155 6088(impor)m -8(t)k 240 fnt1 1828 6091(clause)m 2481(to)s 2720(solv)s 3(e)k 3278(this)s 3674(problem:)s 220 fnt5 480 5590(impor)m -8(t @Eq)k 480 5302(def isum { sum from i=1 to n })m 240 fnt1 0 4808(may)m 469(appear)s 1169(after)s 220 fnt5 1669 4805(@Eq)m 240 fnt1 2210 4808(is)m 2423(de\207ned,)s 3239(and)s 3646(it)s 3842(will)s 4271(mak)s 2(e)k 4846(the)s 5198(e)s 3(xported)k 6093(symbols)s 6945(of)s 220 fnt5 7220 4805(@Eq)m 240 fnt1 7761 4808(visible)m 8458(within)s 0 4520(the)m 335(body)s 855(of)s 220 fnt5 1112 4517(isum)m 240 fnt1 1561 4520(.)m 1711(This)s 2174(feature)s 2878(complicates)s 4056(the)s 4390(treatment)s 5337(of)s 5595(en)s 9(vironments)k 6925(\(Section)s 7764(3.4\),)s 8236(and)s 8626(e)s 6(v)k 3(en)k 0 4232(introduces)m 1050(an)s 1336(insecurity)s 15(,)k 2373(when)s 220 fnt5 2952 4229(isum)m 240 fnt1 3464 4232(is)m 3677(in)s 9(v)k 4(ok)k 2(ed)k 4495(outside)s 5245(an)s 5531(equation.)s 6522(A)s 6755(simpler)s 7534(approach)s 8471(w)s 2(ould)k 0 3944(be)m 290(to)s 538(allo)s 6(w)k 1126(only)s 1615(one)s 2026(symbol)s 2795(in)s 3047(an)s 220 fnt5 3339 3941(impor)m -8(t)k 240 fnt1 4020 3944(clause,)m 4733(and)s 5146(treat)s 5638(the)s 5995(follo)s 6(wing)k 6981(de\207nition)s 7964(e)s 3(xactly)k 8714(lik)s 2(e)k 0 3656(a)m 174(local)s 702(de\207nition)s 1684(of)s 1964(that)s 2390(symbol;)s 3216(b)s 4(ut)k 3587(then)s 4064(it)s 4265(w)s 2(ould)k 4928(not)s 5303(be)s 5594(possible)s 6442(to)s 6690(de\207ne)s 7339(symbols)s 8197(using)s 8778(the)s 0 3368(resources)m 953(of)s 1224(more)s 1771(than)s 2240(one)s 2642(of)s 2913(the)s 3261(standard)s 4129(packages.)s 240 fnt2 0 2719(3.4.)m 471(Implementation)s 2159(of)s 2431(de\207nitions)s [ /Dest /LOUTdefs_impl /DEST pdfmark 240 fnt1 480 2242(Input)m 1089(is)s 1343(processed)s 2388(by)s 2726(a)s 2936(h)s 1(ybrid)k 3663(parser)s 4350(which)s 5036(emplo)s 2(ys)k 5940(operator)s 6840(precedence)s 8015(for)s 8398(objects)s 0 1954(and)m 433(simple)s 1156(recursi)s 6(v)k 3(e)k 2108(descent)s 2915(for)s 3283(the)s 3661(headers)s 4472(of)s 4772(de\207nitions.)s 5976(A)s 6236(symbol)s 7026(table)s 7576(stores)s 8214(the)s 8592(body)s 0 1666(of)m 278(each)s 780(de\207nition)s 1761(as)s 2018(a)s 2191(parse)s 2758(tree,)s 3229(e)s 3(xcept)k 3917(for)s 4263(macros)s 5011(which)s 5660(are)s 6014(lists)s 6456(of)s 6734(tok)s 2(ens,)k 7471(and)s 7882(manages)s 8778(the)s 0 1378(usual)m 564(stack)s 1121(of)s 1397(static)s 1958(scopes,)s 2708(accepting)s 240 fnt3 3682 1380(PushScope)m 240 fnt1 4791 1378(and)m 240 fnt3 5200 1380(P)m 19(opScope)k 240 fnt1 6197 1378(operations)m 7249(as)s 7504(the)s 7857(parser)s 8505(enters)s 0 1090(and)m 447(lea)s 4(v)k 3(es)k 1131(scope)s 1775(re)s 3(gions,)k 2626(including)s 3627(actual)s 4295(body)s 4872(parameters)s 6013(and)s 6461(the)s 6852(right)s 7406(parameter)s 8463(of)s 8778(the)s 220 fnt5 0 799(@Open)m 240 fnt1 806 802(operator)m 13(.)k 480 428(As)m 818(the)s 1187(parse)s 1769(proceeds,)s 2747(a)s 2934(complete)s 3888(call)s 4308(graph)s 4932(is)s 5163(constructed,)s 6393(recording,)s 7438(for)s 7797(each)s 8314(symbol,)s 0 140(which)m 633(symbols)s 1472(are)s 1809(in)s 9(v)k 4(ok)k 2(ed)k 2615(within)s 3273(its)s 3539(body)s 15(.)k 4159(Immediately)s 5410(after)s 5896(the)s 6235(last)s 6616(de\207nition)s 7580(is)s 7781(read,)s 8289(the)s 8627(tran-)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 21 22 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5714 -1579(-)m 5842(21)s 6117(-)s 9066 13419 0 13310 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13256(siti)m 6(v)k 3(e)k 565(closure)s 1312(of)s 1584(the)s 1933(call)s 2334(graph)s 2937(is)s 3148(computed,)s 4200(and)s 4605(used)s 5104(to)s 5344(determine)s 6356(whether)s 7187(each)s 7684(non-)s 8112(parameter)s 0 12968(symbol)m 775(is)s 1001(recursi)s 6(v)k 3(e)k 1939(or)s 2214(recepti)s 6(v)k 3(e)k 3151(\(Section)s 4020(5.1\),)s 4522(and)s 4942(whether)s 5787(each)s 6298(parameter)s 7328(is)s 7554(in)s 9(v)k 4(ok)k 2(ed)k 8385(e)s 3(xactly)k 0 12680(once)m 508(or)s 767(not.)s 480 12306(Purely)m 1188(functional)s 2243(systems)s 3082(may)s 3579(e)s 6(v)k 6(aluate)k 4450(symbol)s 5240(in)s 9(v)k 4(ocations)k 6412(in)s 6686(applicati)s 6(v)k 3(e)k 7812(order)s 8407(\(where)s 0 12018(parameters)m 1092(are)s 1433(e)s 6(v)k 6(aluated)k 2389(before)s 3049(substitution)s 4216(into)s 4635(bodies\),)s 5440(or)s 5693(in)s 5930(normal)s 6656(order)s 7214(\(substitution)s 8460(before)s 0 11730(e)m 6(v)k 6(aluation\),)k 1164(and)s 1562(the)s 3(y)k 2018(may)s 2478(also)s 2909(share)s 3463(the)s 3804(v)s 6(alue)k 4366(of)s 4630(a)s 4790(parameter)s 5798(among)s 6496(all)s 6783(uses)s 7239(of)s 7504(it.)s 7793(But)s 8193(in)s 8429(Basser)s 0 11442(Lout,)m 603(the)s 996(presence)s 1932(of)s 2248(conte)s 3(xt-sensiti)k 6(v)k 3(e)k 3955(style)s 4507(information)s 5736(\(Section)s 6634(2.5\))s 7106(forces)s 7785(normal)s 8562(order)s 0 11154(e)m 6(v)k 6(aluation)k 1041(and)s 1445(pre)s 6(v)k 3(ents)k 2297(sharing)s 3054(of)s 3325(parameter)s 4339(v)s 6(alues.)k 480 10780(T)m 19(o)k 780(e)s 6(v)k 6(aluate)k 1620(an)s 1903(unsized)s 2692(object)s 3336(\(pure)s 3896(parse)s 4456(tree\),)s 4999(its)s 240 fnt3 5275 10782(en)m 9(vir)k 10(onment)k 240 fnt1 6456 10780(,)m 6563(the)s 6911(equi)s 6(v)k 6(alent)k 7955(of)s 8226(the)s 8574(stack)s 0 10492(frames)m 728(in)s 999(Algol-lik)s 2(e)k 2064(languages,)s 3156(must)s 3710(be)s 4020(a)s 4(v)k 6(ailable,)k 5008(containing)s 6099(the)s 6476(actual)s 7129(v)s 6(alues)k 7814(of)s 8113(all)s 8435(formal)s 0 10204(parameters)m 1119(that)s 1558(are)s 1927(visible)s 2641(within)s 3330(the)s 3700(unsized)s 4510(object.)s 5279(En)s 9(vironment)k 6601(handling)s 7513(is)s 7744(a)s 7932(well-kno)s 6(wn)k 0 9916(implementation)m 1557(technique,)s 2594(so)s 2860(it)s 3052(will)s 3478(be)s 3760(discussed)s 4735(only)s 5215(brie\210y)s 5893(here.)s 480 9542(En)m 9(vironments)k 1894(are)s 2272(e)s 3(xtra)k 2837(subtrees)s 3702(hung)s 4265(from)s 4820(the)s 5199(objects)s 5958(the)s 3(y)k 6451(refer)s 6991(to.)s 7372(This)s 7879(or)s 4(g)k 1(anization)k 0 9254(mak)m 2(es)k 668(e)s 3(xcellent)k 1595(use)s 1978(of)s 2257(the)s 2613(ordered)s 3409(dag)s 3816(to)s 4063(permit)s 4754(en)s 9(vironments)k 6106(to)s 6353(be)s 6643(shared,)s 7382(and)s 7794(deleted)s 8550(when)s 0 8966(the)m 339(last)s 721(reference)s 1655(to)s 1885(them)s 2413(is)s 2614(remo)s 3(v)k 3(ed.)k 3600(Se)s 6(v)k 3(eral)k 4353(optimizations)s 5695(ha)s 4(v)k 3(e)k 6187(been)s 6687(implemented.)s 8090(Actual)s 8772(pa-)s 0 8678(rameters)m 860(kno)s 6(wn)k 1552(to)s 1778(be)s 2048(in)s 9(v)k 4(ok)k 2(ed)k 2850(only)s 3318(once)s 3814(are)s 4148(mo)s 3(v)k 3(ed)k 4840(in)s 5070(from)s 5582(the)s 5918(en)s 9(vironment,)k 7212(not)s 7566(copied;)s 8303(cop)s 2(ying)k 0 8390(could)m 581(lead)s 1028(to)s 1258(quadratic)s 2191(time)s 2662(comple)s 3(xity)k 15(.)k 3875(Actual)s 4558(parameters)s 5647(of)s 5909(the)s 6248(form)s 220 fnt5 6763 8387(@Ne)m 6(xt)k 240 fnt3 7478 8392(object)m 240 fnt1 8117 8390(recei)m 6(v)k 3(e)k 8843(an)s 0 8102(applicati)m 6(v)k 3(e)k 1105(pre-)s 1478(e)s 6(v)k 6(aluation)k 2529(which)s 3181(pre)s 6(v)k 3(ents)k 4044(long)s 4533(chains)s 5205(of)s 220 fnt5 5486 8099(@Ne)m 6(xt)k 240 fnt1 6221 8102(symbols)m 7080(from)s 7614(forming)s 8448(during)s 0 7814(the)m 359(generation)s 1437(of)s 1719(lar)s 4(ge)k 2260(page)s 2779(numbers.)s 3779(Some)s 4391(en)s 9(vironments)k 5747(which)s 6400(pro)s 3(v)k 6(ably)k 7308(contrib)s 4(ute)k 8341(nothing)s 0 7526(are)m 344(deleted,)s 1137(most)s 1659(notably)s 2427(when)s 3000(a)s 3162(symbol)s 3918(in)s 9(v)k 4(ocation)k 4969(has)s 5335(no)s 5625(symbols)s 6470(within)s 7135(its)s 7407(actual)s 8028(parameters)s 0 7238(and)m 406(no)s 702(import)s 1402(list,)s 1803(so)s 2071(that)s 2492(only)s 2975(the)s 3326(en)s 9(vironment)k 4589(of)s 4862(its)s 5141(body)s 5678(need)s 6191(be)s 6476(k)s 2(ept;)k 7000(this)s 7399(sa)s 4(v)k 3(es)k 7964(a)s 8133(great)s 8673(deal)s 0 6950(of)m 271(space)s 858(when)s 1434(objects)s 2162(with)s 2644(en)s 9(vironments)k 3988(are)s 4335(written)s 5068(to)s 5307(auxiliary)s 6210(\207les)s 6659(\(Section)s 7512(6.1\).)s 240 fnt2 0 6157(4.)m 291(Implementation)s 1979(of)s 2251(the)s 2625(functional)s 3715(subset)s [ /Dest /LOUTfunctional /DEST pdfmark 240 fnt1 480 5680(The)m 941(objects)s 1702(and)s 2139(de\207nitions)s 3233(of)s 3537(Lout)s 4082(are)s 4462(v)s 3(ery)k 4971(similar)s 5726(to)s 5998(those)s 6592(found)s 7242(in)s 7518(other)s 8102(functional)s 0 5392(languages,)m 1085(and)s 1510(the)s 3(y)k 1994(form)s 2539(a)s 2726(natural)s 3465(subset)s 4144(of)s 4436(the)s 4805(language.)s 5854(So)s 6181(we)s 6537(pause)s 7159(here)s 7647(and)s 8072(present)s 8843(an)s 0 5104(o)m 3(v)k 3(ervie)k 6(w)k 932(of)s 1203(the)s 1551(Basser)s 2248(Lout)s 2760(object)s 3404(e)s 6(v)k 6(aluation)k 4445(algorithm.)s 480 4730(The)m 922(problem)s 1794(is)s 2019(to)s 2272(tak)s 2(e)k 2739(an)s 3037(unsized)s 3841(object)s 4499(\(pure)s 5074(parse)s 5649(tree\),)s 6206(its)s 6497(en)s 9(vironment)k 7772(\(Section)s 8640(3.4\),)s 0 4442(and)m 404(its)s 681(style)s 1188(\(Section)s 2042(2.5\),)s 2528(and)s 2933(to)s 3173(produce)s 4000(a)s 4167(PostScript)s 5209(\207le)s 5571(for)s 5910(rendering)s 6879(the)s 7228(object)s 7872(on)s 8170(an)s 8454(output)s 0 4154(de)m 6(vice.)k 786(This)s 1267(\207le)s 1632(is)s 1847(essentially)s 2914(a)s 3084(sequence)s 4022(of)s 4298(instructions)s 5468(to)s 5712(print)s 6227(a)s 6398(gi)s 6(v)k 3(en)k 6983(string)s 7584(of)s 7860(characters)s 8883(in)s 0 3866(a)m 166(gi)s 6(v)k 3(en)k 746(font)s 1191(at)s 1423(a)s 1589(gi)s 6(v)k 3(en)k 2169(point.)s 480 3492(Before)m 1189(the)s 1541(algorithm)s 2534(be)s 3(gins,)k 3266(the)s 3618(parse)s 4182(tree)s 4599(must)s 5127(be)s 5413(obtained,)s 6348(either)s 6955(by)s 7252(parsing)s 8013(input)s 8569(or)s 8832(by)s 0 3204(cop)m 2(ying)k 823(from)s 1347(the)s 1695(symbol)s 2455(table.)s 3082(Afterw)s 2(ards)k 4205(the)s 4553(data)s 5011(structure)s 5901(must)s 6426(be)s 6708(disposed.)s 7710(The)s 8137(algorithm)s 0 2916(proper)m 692(consists)s 1508(of)s 1787(\207v)s 3(e)k 2207(passes,)s 2933(each)s 3437(a)s 3611(recursi)s 6(v)k 3(e)k 4541(tra)s 4(v)k 3(ersal)k 5418(of)s 5697(the)s 6054(structure)s 6953(from)s 7485(the)s 7841(root)s 8294(do)s 6(wn)k 8887(to)s 0 2628(the)m 348(lea)s 4(v)k 3(es)k 989(and)s 1393(back.)s 240 fnt3 0 2174(1.)m 330(Evaluation)s 1490(of)s 1827(unsized)s 2667(objects.)s 240 fnt1 3554 2172(On)m 3960(the)s 4364(w)s 2(ay)k 4871(do)s 6(wn,)k 5561(calculate)s 6521(en)s 9(vironments)k 7921(and)s 8381(replace)s 0 1884(non-recursi)m 6(v)k 3(e,)k 1404(non-recepti)s 6(v)k 3(e)k 2757(symbols)s 3598(by)s 3884(their)s 4373(bodies)s 5041(\(Section)s 5886(3.4\);)s 6369(broadcast)s 7337(fonts)s 7858(to)s 8089(the)s 8429(lea)s 4(v)k 3(es,)k 0 1596(and)m 409(paragraph)s 1427(breaking)s 2322(and)s 2731(spacing)s 3521(styles)s 4121(to)s 4365(the)s 4718(paragraph)s 5736(nodes.)s 6465(On)s 6820(the)s 7173(w)s 2(ay)k 7629(back)s 8147(up,)s 8500(delete)s 240 fnt3 0 1310(FONT)m 240 fnt1 630 1308(,)m 240 fnt3 737 1310(BREAK)m 240 fnt1 1494 1308(,)m 1601(and)s 240 fnt3 2005 1310(SP)m 21(A)k 7(CE)k 240 fnt1 2760 1308(nodes,)m 3426(and)s 3830(insert)s 240 fnt3 4420 1310(SPLIT)m 240 fnt1 5049 1308(,)m 240 fnt3 5156 1310(COL)m 240 fnt1 5622 1308(,)m 5729(and)s 240 fnt3 6133 1310(R)m 9(O)k 12(W)k 240 fnt1 6707 1308(nodes)m 7317(\(Section)s 8170(2.3\).)s 240 fnt3 0 815(2.)m 293(W)s 13(idth)k 925(calculations)s 2169(and)s 2614(br)s 8(eaking)k 3(.)k 240 fnt1 3628 813(Calculate)m 4605(the)s 4973(width)s 5594(of)s 5885(e)s 6(v)k 3(ery)k 6480(subobject)s 7477(from)s 8020(the)s 8388(bottom)s 0 525(up.)m 404(As)s 720(described)s 1693(in)s 1936(Section)s 2709(2.3,)s 240 fnt3 3115 527(WIDE)m 240 fnt1 3777 525(nodes)m 4386(may)s 4851(trigger)s 5547(object)s 6190(breaking)s 7079(sub-tra)s 4(v)k 3(ersals)k 8448(during)s 0 237(this)m 396(pass.)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 22 23 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1579(-)m 5833(22)s 6127(-)s 9066 13419 0 13308 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 240 fnt3 0 13256(3.)m 274(Height)s 989(calculations.)s 240 fnt1 2312 13254(Calculate)m 3270(the)s 3618(height)s 4276(of)s 4547(e)s 6(v)k 3(ery)k 5123(subobject,)s 6147(from)s 6671(the)s 7019(bottom)s 7757(up.)s 240 fnt3 0 12751(4.)m 283(Horizontal)s 1389(coor)s 8(dinates.)k 240 fnt1 2674 12749(Calculate)m 3641(the)s 3998(horizontal)s 5032(coordinate)s 6106(of)s 6386(each)s 6890(subobject)s 7876(from)s 8409(the)s 8767(top)s 0 12461(do)m 6(wn,)k 634(and)s 1038(store)s 1558(each)s 2053(leaf)s -13(')k 13(s)k 2633(coordinate)s 3698(in)s 3941(the)s 4289(leaf.)s 240 fnt3 0 11977(5.)m 295(V)s 26(ertical)k 1119(coor)s 8(dinates)k 2317(and)s 2765(P)s 19(ostScript)k 3827(g)s 2(ener)k 3(ation.)k 240 fnt1 5034 11975(Calculate)m 6013(the)s 6383(v)s 3(ertical)k 7171(coordinate)s 8257(of)s 8550(e)s 6(v)k 3(ery)k 0 11687(subobject)m 981(from)s 1509(the)s 1861(top)s 2224(do)s 6(wn,)k 2862(and)s 3270(at)s 3506(each)s 4005(leaf,)s 4473(retrie)s 6(v)k 3(e)k 5252(the)s 5604(character)s 6542(string,)s 7197(font,)s 7693(and)s 8102(horizontal)s 0 11399(coordinate,)m 1116(and)s 1520(print)s 2031(the)s 2379(PostScript)s 3421(instruction)s 4500(for)s 4838(rendering)s 5807(that)s 6225(leaf.)s 0 10896(Figure)m 692(3)s 869(gi)s 6(v)k 3(es)k 1428(the)s 1789(amount)s 2579(of)s 2863(code)s 3383(required)s 4250(for)s 4600(each)s 5168(pass.)s 5756(Symmetry)s 6819(between)s 7685(horizontal)s 8722(and)s 0 10608(v)m 3(ertical)k 764(is)s 971(e)s 3(xploited)k 1913(throughout)s 3021(Basser)s 3715(Lout,)s 4271(and)s 4672(passes)s 5331(2)s 5502(and)s 5903(3,)s 6127(as)s 6374(well)s 6837(as)s 7084(4)s 7255(and)s 7656(5,)s 7880(are)s 8224(e)s 3(x)k 3(ecuted)k 0 10320(on)m 297(shared)s 979(code.)s 480 9946(The)m 929(author)s 1621(can)s 2031(see)s 2413(no)s 2728(simple)s 3442(w)s 2(ay)k 3914(to)s 4174(reduce)s 4888(the)s 5258(number)s 6070(of)s 6362(passes.)s 7158(The)s 7607(introduction)s 8855(of)s 0 9658(horizontal)m 1027(g)s 1(alle)k 3(ys)k 1755(\(Section)s 2612(5.5\))s 3044(w)s 2(ould)k 3703(remo)s 3(v)k 3(e)k 4474(the)s 4826(need)s 5340(for)s 5682(the)s 6034(object)s 6682(breaking)s 7576(transformations)s 0 9370(within)m 700(this)s 1128(algorithm)s 2149(that)s 2599(are)s 2978(the)s 3359(principal)s 4295(obstacles)s 5254(in)s 5529(the)s 5909(w)s 2(ay)k 6393(of)s 6696(the)s 7076(mer)s 4(ging)k 7954(of)s 8257(passes)s 8952(2)s 0 9082(and)m 404(3.)s 240 fnt2 0 8338(5.)m 291(Galleys)s [ /Dest /LOUT18_694_s5_0_1 /DEST pdfmark 240 fnt1 480 7861(W)m 9(ith)k 1022(objects)s 1767(and)s 2188(de\207nitions)s 3266(under)s 3888(control,)s 4689(the)s 5053(author)s 5741(f)s 2(aced)k 6331(the)s 6696(problem)s 7570(of)s 7858(getting)s 8592(body)s 0 7573(te)m 3(xt,)k 478(footnotes,)s 1491(\210oating)s 2291(\207gures)s 3009(and)s 3429(tables,)s 4109(references,)s 5213(inde)s 3(x)k 5813(entries,)s 6572(and)s 6992(entries)s 7695(in)s 7954(the)s 8318(table)s 8855(of)s 0 7285(contents)m 844(into)s 1264(their)s 1757(places.)s 2513(The)s 2937(resulting)s 3821(in)s 9(v)k 3(estig)k 1(ation)k 5095(occupied)s 6013(three)s 6541(months)s 7293(of)s 7559(full-time)s 8444(design)s 0 6997(w)m 2(ork,)k 612(and)s 1031(proceeded)s 2088(approximately)s 3538(as)s 3803(described)s 4793(in)s 5051(Section)s 5840(5.1;)s 6268(the)s 6631(implementation)s 8204(occupied)s 0 6709(the)m 348(years)s 903(1987-89.)s 240 fnt2 0 6060(5.1.)m 471(The)s 926(galley)s 1580(abstraction)s [ /Dest /LOUTgalleys /DEST pdfmark 240 fnt1 480 5583(Let)m 870(us)s 1147(tak)s 2(e)k 1611(the)s 1972(footnote)s 2838(as)s 3100(a)s 3279(representati)s 6(v)k 3(e)k 4677(e)s 3(xample.)k 5661(At)s 5973(some)s 6546(point)s 7111(in)s 7366(the)s 7727(document,)s 8791(we)s 0 5295(wish)m 509(to)s 748(write)s 220 fnt5 480 4847(preceding te)m 6(xt)k 480 4559(@F)m 6(ootNote { f)k 6(ootnote te)k 6(xt })k 480 4271(f)m 6(ollo)k 3(wing te)k 6(xt)k 240 fnt1 0 3772(and)m 406(we)s 744(e)s 3(xpect)k 1428(the)s 1779(formatter)s 2729(to)s 2971(remo)s 3(v)k 3(e)k 3741(the)s 4092(footnote)s 4947(from)s 5474(this)s 5873(conte)s 3(xt)k 6637(and)s 7044(place)s 7607(it)s 7802(at)s 8037(the)s 8388(bottom)s 0 3484(of)m 282(the)s 641(current)s 1388(page,)s 1958(possibly)s 2821(splitting)s 3668(some)s 4240(or)s 4510(all)s 4814(of)s 5096(it)s 5299(onto)s 5789(a)s 5966(follo)s 6(wing)k 6954(page)s 7473(if)s 7701(space)s 8299(is)s 8520(insuf-)s 0 3196(\207cient.)m 480 2822(An)m 844(object)s 1503(appears)s 2298(in)s 2556(the)s 2918(\207nal)s 3413(document)s 4431(at)s 4678(the)s 5040(point)s 5607(it)s 5813(is)s 6038(in)s 9(v)k 4(ok)k 2(ed,)k 6916(b)s 4(ut)k 7293(this)s 7703(basic)s 8262(property)s 0 2534(does)m 503(not)s 882(hold)s 1379(for)s 1730(footnotes:)s 2799(the)s 3160(point)s 3725(of)s 4009(in)s 9(v)k 4(ocation)k 5076(and)s 5493(the)s 5854(point)s 6419(of)s 6703(appearance)s 7847(are)s 8207(dif)s 6(ferent.)k 0 2246(In)m 254(some)s 813(w)s 2(ay)k 15(,)k 1299(the)s 1645(footnote)s 2496(is)s 2703(attached)s 3555(to)s 3791(the)s 4137(document)s 5139(at)s 5368(both)s 5849(points,)s 6539(introducing)s 7692(a)s 7856(cross)s 8395(linking)s 0 1958(\(Section)m 853(2.1\))s 1281(that)s 1699(cannot)s 2397(be)s 2679(described)s 3653(in)s 3896(purely)s 4561(functional)s 5585(terms.)s 480 1584(Since)m 1069(the)s 1420(interpretation)s 2766(of)s 3040(an)s 3(y)k 3440(object)s 4087(depends)s 4926(on)s 5226(an)s 5512(en)s 9(vironment)k 6775(and)s 7182(style)s 7692(inherited)s 8602(from)s 0 1296(the)m 347(conte)s 3(xt,)k 1153(the)s 1499(\207rst)s 1929(question)s 2795(must)s 3318(be)s 3598(whether)s 4427(the)s 4773(footnote)s 5624(inherits)s 6390(them)s 6926(through)s 7726(the)s 8072(in)s 9(v)k 4(ocation)k 0 1008(point)m 552(or)s 811(through)s 1613(the)s 1961(point\(s\))s 2753(of)s 3024(appearance.)s 480 634(If)m 697(symbols)s 1533(are)s 1867(to)s 2092(be)s 2361(interpreted)s 3440(statically)s 4341(as)s 4578(heretofore,)s 5653(then)s 6108(en)s 9(vironments)k 7439(must)s 7951(be)s 8219(inherited)s 0 346(through)m 829(the)s 1204(in)s 9(v)k 4(ocation)k 2285(point)s 2865(alone.)s 3574(Dynamic)s 4531(inheritance)s 5675(through)s 6505(the)s 6880(point)s 7459(of)s 7757(appearance)s 8916(is)s 0 58(enticing)m 836(in)s 1092(some)s 1666(w)s 2(ays:)k 2335(it)s 2541(might)s 3172(replace)s 3930(the)s 4291(body)s 4838(parameter)s 9(,)k 5904(and)s 6321(it)s 6526(might)s 7157(help)s 7635(with)s 8131(automatic)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 23 24 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5710 -1579(-)m 5838(23)s 6122(-)s 9066 13416 0 13416 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 1659 13218(1.)m 2163(Initialization)s 7172(200)s 1659 12930(2.)m 2163(Memory)s 3041(allocation,)s 4090(ordered)s 4878(dag)s 5277(operations)s 7172(400)s 1659 12642(3.)m 2163(Le)s 3(xical)k 2931(analysis,)s 3808(macros,)s 4605(\207le)s 4966(handling)s 6992(1,350)s 1659 12354(4.)m 2163(P)s 3(arsing)k 2930(of)s 3201(objects)s 3929(and)s 4333(de\207nitions)s 6992(1,150)s 1659 12066(5.)m 2163(Symbol)s 2963(table)s 3483(and)s 3887(call)s 4286(graph)s 7172(600)s 1659 11778(6.)m 2163(Ev)s 6(aluation)k 3250(of)s 3521(pure)s 4002(parse)s 4562(trees)s 6992(1,650)s 1659 11490(7.)m 2163(Reading,)s 3068(storing,)s 3839(and)s 4243(scaling)s 4973(of)s 5244(fonts)s 7172(600)s 1659 11202(8.)m 2163(Cross)s 2759(references)s 3790(and)s 4194(databases)s 6992(1,000)s 1659 10914(9.)m 2163(W)s 9(idth)k 2809(and)s 3213(height)s 3871(calculations,)s 5119(and)s 5523(breaking)s 7172(700)s 1539 10626(10.)m 240 fnt3 2163 10628(Constr)m 3(ained)k 240 fnt1 3410 10626(and)m 240 fnt3 3814 10628(AdjustSize)m 240 fnt1 7172 10626(700)m 1539 10338(11.)m 2163(T)s 8(ransfer)k 3023(of)s 3294(sized)s 3843(objects)s 4571(into)s 4996(g)s 1(alle)k 3(y)k 5630(tree)s 7172(450)s 1539 10050(12.)m 2163(Galle)s 3(y)k 2851(\210ushing)s 3676(algorithm)s 6992(1,500)s 1539 9762(13.)m 2163(Coordinate)s 3282(calculations)s 4474(and)s 4878(PostScript)s 5920(output)s 7172(700)s 1539 9474(14.)m 2163(Deb)s 4(ugging)k 3277(and)s 3681(error)s 4204(handling)s 6992(1,200)s 655 0 0 0 240 288 60 6872 9328 LoutGr2 0.5 pt ltabhs grestore grestore 6872 9074(12,200)m [ /Dest /LOUTcomponents /DEST pdfmark 200 fnt2 41 8421(Figur)m 3(e)k 649(3.)s 200 fnt1 891 8422(Major)m 1427(components)s 2432(of)s 2658(the)s 2947(Basser)s 3526(Lout)s 3953(interpreter)s 8(,)k 4861(sho)s 5(wing)k 5576(the)s 5865(approximate)s 6906(number)s 7565(of)s 7791(lines)s 8208(of)s 8434(C)s 8611(code.)s 240 fnt1 0 7791(numbering,)m 1163(since)s 1730(the)s 2097(number)s 2908(of)s 3198(a)s 3384(footnote)s 4256(is)s 4486(kno)s 6(wn)k 5209(only)s 5709(at)s 5960(the)s 6328(point)s 6899(of)s 7190(appearance;)s 8396(b)s 4(ut)k 8778(the)s 0 7503(implementation)m 1606(problems)s 2597(are)s 2993(se)s 6(v)k 3(ere,)k 3751(and)s 4204(static)s 4810(inheritance)s 5976(seems)s 6661(much)s 7299(simpler)s 8125(and)s 8579(more)s 0 7215(comprehensible)m 1572(to)s 1814(the)s 2165(user)s 13(.)k 2716(Style,)s 3317(at)s 3552(least)s 4052(its)s 4330(a)s 4(v)k 6(ailable)k 5241(width)s 5846(and)s 6253(height)s 6913(part,)s 7394(must)s 7922(of)s 8196(necessity)s 0 6927(be)m 268(inherited)s 1160(through)s 1947(the)s 2280(point)s 2817(of)s 3073(appearance.)s 4297(F)s 3(or)k 4671(consistenc)s 3(y)k 15(,)k 5861(the)s 6194(entire)s 6778(style)s 7270(should)s 7952(be)s 8219(inherited)s 0 6639(in)m 256(this)s 666(w)s 2(ay)k 15(.)k 1226(There)s 1853(is)s 2077(a)s 2257(suggesti)s 6(v)k 3(e)k 3328(analogy)s 4154(here)s 4635(with)s 5131(actual)s 5770(parameters,)s 6938(which)s 7594(ha)s 4(v)k 3(e)k 8109(a)s 8289(point)s 8855(of)s 0 6351(in)m 9(v)k 4(ocation)k 1060(from)s 1591(which)s 2240(the)s 3(y)k 2710(inherit)s 3400(an)s 3690(en)s 9(vironment,)k 5004(and)s 5414(a)s 5587(point)s 6146(of)s 6424(appearance)s 7562(within)s 8237(the)s 8592(body)s 0 6063(of)m 265(the)s 606(enclosing)s 1569(de\207nition,)s 2587(from)s 3104(which)s 3739(the)s 3(y)k 4196(inherit)s 4872(a)s 5031(style.)s 5639(It)s 5838(may)s 6297(be)s 6572(possible)s 7406(to)s 7638(treat)s 8114(a)s 8273(footnote)s 0 5775(as)m 250(the)s 598(actual)s 1223(parameter)s 2237(of)s 2508(some)s 3069(symbol,)s 3881(therefore,)s 4849(although)s 5744(the)s 6092(details)s 6766(seem)s 7317(v)s 3(ery)k 7793(obscure.)s 480 5401(But)m 881(the)s 1224(most)s 1744(profound)s 2674(consequence)s 3948(of)s 4214(ha)s 4(ving)k 4910(tw)s 2(o)k 5314(types)s 5865(of)s 6131(attachment)s 7234(point)s 7780(is)s 7985(that)s 8398(it)s 8584(leads)s 0 5113(to)m 261(tw)s 2(o)k 693(distincti)s 6(v)k 3(e)k 1757(tree)s 2192(structures.)s 3306(Considering)s 4551(in)s 9(v)k 4(ocation)k 5627(points)s 6285(only)s 6787(leads)s 7351(to)s 7612(static)s 8190(trees)s 8714(lik)s 2(e)k 0 4825(this)m 396(one:)s gsave 480 2539 translate 240 fnt3 3666 1996 170 1715 240 288 60 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1117 1273 170 993 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 1273 170 993 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 551 170 272 240 288 60 0 721 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(footnote)m grestore (T) lfigpromotelabels grestore (L) lfigpromotelabels grestore 1206 553 170 272 240 288 60 1230 1443 LoutGr2 currentdict end 200 dict begin begin grestore 1206 553 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(body)m 692(te)s 4(xt)k grestore (T) lfigpromotelabels grestore 0 0 0 0 240 288 60 2436 1715 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ L@T@CTR L@T@CTR T@CTR lfigangle L@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR L@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1117 1273 0 993 240 288 60 2549 0 LoutGr2 currentdict end 200 dict begin begin grestore 1001 552 170 272 240 288 60 116 721 LoutGr2 currentdict end 200 dict begin begin grestore 884 552 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(\207gur)m 8(e)k grestore (T) lfigpromotelabels grestore 1117 551 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 551 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 551 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(footnote)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 60 1117 272 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore (R) lfigpromotelabels grestore 0 0 0 0 240 288 60 3666 1715 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ R@T@CTR R@T@CTR T@CTR lfigangle R@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR R@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore 0 2088(which)m 663(sho)s 6(ws)k 1329(that)s 1769(the)s 2139(body)s 2695(te)s 3(xt)k 3131(contains)s 4001(a)s 4189(footnote)s 5064(and)s 5490(a)s 5677(\207gure,)s 6364(the)s 6734(latter)s 7305(itself)s 7875(containing)s 8960(a)s 0 1800(footnote.)m 961(Considering)s 2184(points)s 2820(of)s 3091(appearance)s 4222(only)s 4702(gi)s 6(v)k 3(es)k 5249(a)s 5415(completely)s 6531(dif)s 6(ferent,)k 7453(dynamic)s 8330(tree:)s gsave 480 186 translate 240 fnt3 4663 1274 0 995 240 288 60 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 3382 551 170 272 240 288 60 1281 723 LoutGr2 currentdict end 200 dict begin begin grestore 2101 551 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(sequence)m 1100(of)s 1381(pa)s 2(g)k 2(es)k grestore (T) lfigpromotelabels grestore 1206 553 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1206 553 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1206 553 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(body)m 692(te)s 4(xt)k grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 60 1206 272 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1117 553 170 272 240 288 60 1319 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 553 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 551 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(footnote)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 60 2436 272 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 884 553 170 272 240 288 60 2549 0 LoutGr2 currentdict end 200 dict begin begin grestore 884 553 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 884 552 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(\207gur)m 8(e)k grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 60 3433 272 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore 1117 553 170 272 240 288 60 3546 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 553 170 272 240 288 60 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 1117 551 170 272 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 170 220(footnote)m grestore (T) lfigpromotelabels grestore (S) lfigpromotelabels grestore 0 0 0 0 240 288 60 4663 272 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ S@T@CTR S@T@CTR T@CTR lfigangle S@T@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef T@CTR T@CTR S@T@CTR lfigangle T@CIRCUM lfigpadd lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore grestore end end restore grestore grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 24 25 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1579(-)m 5833(24)s 6127(-)s 9066 13419 0 13419 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13256(The)m 468(tree)s 921(can)s 1351(be)s 1673(deeper)s 9(,)k 2448(for)s 2827(e)s 3(xample)k 3730(with)s 4253(sections)s 5114(appearing)s 6150(within)s 6859(chapters)s 7746(which)s 8429(appear)s 0 12968(within)m 680(the)s 1041(body)s 1587(te)s 3(xt,)k 2062(which)s 2717(appears)s 3510(within)s 4191(the)s 4551(\207nal)s 5044(sequence)s 5990(of)s 6273(pages.)s 6995(Document)s 8065(formatting)s 0 12680(languages)m 1024(generally)s 1984(shirk)s 2540(the)s 2905(issues)s 3544(raised)s 4189(by)s 4500(this)s 4912(dual)s 5396(tree)s 5826(structure,)s 6785(by)s 7096(making)s 7884(the)s 8249(dynamic)s 0 12392(tree)m 421(b)s 4(uilt-in,)k 1235(by)s 1537(limiting)s 2354(one)s 2764(or)s 3032(both)s 3523(trees)s 4032(to)s 4279(tw)s 2(o)k 4697(le)s 6(v)k 3(els,)k 5360(and)s 5773(so)s 6047(on,)s 6402(pro)s 3(viding)k 7391(a)s 7565(classic)s 8263(e)s 3(xample)k 0 12104(of)m 295(the)s 667(impo)s 3(v)k 3(erishing)k 2120(ef)s 6(fect)k 2740(of)s 3035(f)s 2(ailing)k 3733(to)s 3997(permit)s 4704(language)s 5648(features)s 6478(to)s 6741(attain)s 7352(their)s 7873(natural)s 8616(le)s 6(v)k 3(el)k 0 11816(of)m 271(generality)s 15(.)k 480 11442(W)m 19(e)k 854(are)s 1206(thus)s 1662(led)s 2017(to)s 2261(propose)s 3081(a)s 3252(second)s 3980(abstraction)s 5091(for)s 5434(document)s 6443(formatting,)s 7564(which)s 8211(we)s 8552(name)s 0 11154(the)m 240 fnt3 371 11156(galle)m 7(y)k 240 fnt1 1028 11154(in)m 1294(recognition)s 2464(of)s 2759(its)s 3058(similarity)s 4050(to)s 4312(the)s 4684(g)s 1(alle)k 3(ys)k 5432(used)s 5952(in)s 6219(manual)s 7001(typesetting.)s 8238(A)s 8492(g)s 1(alle)k 3(y)k 0 10866(consists)m 817(of)s 1098(an)s 1391(object)s 2045(\(such)s 2630(as)s 2890(a)s 3066(footnote\))s 4001(together)s 4854(with)s 5346(a)s 5522(sequence)s 6465(of)s 6746(places)s 7404(where)s 8054(that)s 8482(object)s 0 10578(may)m 491(appear)s 1214(\(such)s 1814(as)s 2090(the)s 2464(bottoms)s 3311(of)s 3608(the)s 3982(current)s 4743(and)s 5173(follo)s 6(wing)k 6176(pages\).)s 6989(Splitting)s 7891(occurs)s 8592(quite)s 0 10290(naturally)m 903(when)s 1479(space)s 2066(at)s 2298(an)s 3(y)k 2695(place)s 3255(is)s 3465(insuf\207cient)s 4600(to)s 4839(hold)s 5323(the)s 5671(entire)s 6270(object.)s 480 9916(In)m 736(Lout,)s 1295(a)s 1461(footnote)s 2314(g)s 1(alle)k 3(y)k 2948(and)s 3352(its)s 3628(place)s 4188(of)s 4459(appearance)s 5590(are)s 5937(de\207ned)s 6700(as)s 6950(follo)s 6(ws:)k 220 fnt5 480 9415(def @F)m 6(ootPlace { @Galle)k 4(y })k 480 8839(def @F)m 6(ootNote into { @F)k 6(ootPlace&&f)k 6(ollo)k 3(wing })k 480 8551( r)m -3(ight x)k 480 8263({ x })m 240 fnt1 0 7769(The)m 220 fnt5 445 7766(@F)m 6(ootPlace)k 240 fnt1 1719 7769(symbol)m 2496(contains)s 3362(the)s 3727(special)s 4463(symbol)s 220 fnt5 5240 7766(@Galle)m 4(y)k 240 fnt1 6078 7769(,)m 6203(indicating)s 7229(that)s 7665(it)s 7874(is)s 8102(a)s 8285(point)s 8855(of)s 0 7481(appearance)m 1143(for)s 1493(a)s 1672(g)s 1(alle)k 3(y)k 15(.)k 2413(By)s 2759(placing)s 3529(in)s 9(v)k 4(ocations)k 4682(of)s 220 fnt5 4965 7478(@F)m 6(ootPlace)k 240 fnt1 6234 7481(at)m 6478(the)s 6838(bottoms)s 7673(of)s 7956(pages,)s 8620(as)s 8883(in)s 0 7193(Section)m 801(3.2,)s 1235(we)s 1597(de\207ne)s 2265(the)s 2640(desired)s 3415(points)s 4078(of)s 4376(appearance)s 5534(for)s 5899(footnotes.)s 6980(Symbols)s 7896(whose)s 8592(body)s 0 6905(contains)m 220 fnt5 863 6902(@Galle)m 4(y)k 240 fnt1 1776 6905(either)m 2394(directly)s 3192(or)s 3466(indirectly)s 4450(are)s 4812(called)s 5455(recepti)s 6(v)k 3(e)k 6392(symbols,)s 7312(meaning)s 8204(recepti)s 6(v)k 3(e)k 0 6617(to)m 239(g)s 1(alle)k 3(ys,)k 1019(and)s 1423(the)s 3(y)k 1886(are)s 2233(e)s 3(xpanded)k 3207(only)s 3687(on)s 3984(demand.)s 4906(The)s 5334(ef)s 6(fect)k 5930(of)s 6202(the)s 220 fnt5 6550 6614(into)m 240 fnt1 6956 6617(clause)m 7609(is)s 7819(to)s 8058(mak)s 2(e)k 8631(each)s 0 6329(in)m 9(v)k 4(ocation)k 1057(of)s 220 fnt5 1332 6326(@F)m 6(ootNote)k 240 fnt1 2506 6329(a)m 2676(g)s 1(alle)k 3(y)k 3313(whose)s 3985(object)s 4632(is)s 4846(the)s 5198(result)s 5791(of)s 6066(the)s 6417(in)s 9(v)k 4(ocation)k 7475(in)s 7721(the)s 8073(usual)s 8637(w)s 2(ay)k 15(,)k 0 6041(and)m 406(whose)s 1076(sequence)s 2011(of)s 2285(points)s 2923(of)s 3196(appearance)s 4329(is)s 4542(speci\207ed)s 5452(by)s 5748(the)s 220 fnt5 6098 6038(into)m 240 fnt1 6507 6041(clause;)m 7218(in)s 7463(this)s 7861(e)s 3(xample,)k 8778(the)s 0 5753(sequence)m 933(of)s 1204(all)s 220 fnt5 1497 5750(@F)m 6(ootPlace)k 240 fnt1 2753 5753(symbols)m 3602(follo)s 6(wing)k 4579(the)s 4927(in)s 9(v)k 4(ocation)k 5981(point.)s 480 5379(Lout)m 995(permits)s 1766(g)s 1(alle)k 3(ys)k 2494(to)s 2737(be)s 3023(in)s 9(v)k 4(ok)k 2(ed)k 3842(within)s 4514(other)s 5069(g)s 1(alle)k 3(ys)k 5797(to)s 6040(arbitrary)s 6919(depth,)s 7562(so)s 7832(that)s 8254(one)s 8660(may)s 0 5091(ha)m 4(v)k 3(e)k 514(footnotes)s 1468(within)s 2149(\207gures)s 2864(within)s 3546(the)s 3907(body)s 4454(te)s 3(xt)k 4882(g)s 1(alle)k 3(y)k 15(,)k 5568(for)s 5919(e)s 3(xample,)k 6846(creating)s 7681(arbitrary)s 8570(static)s 0 4803(trees.)m 649(Recepti)s 6(v)k 3(e)k 1688(symbols)s 2573(lik)s 2(e)k 220 fnt5 3021 4800(@F)m 6(ootPlace)k 240 fnt1 4313 4803(may)m 4815(appear)s 5548(within)s 6252(an)s 3(y)k 6685(g)s 1(alle)k 3(y)k 15(,)k 7393(creating)s 8251(arbitrary)s 0 4515(dynamic)m 912(trees)s 1449(as)s 1734(well.)s 2345(The)s 2808(root)s 3289(of)s 3595(the)s 3979(dynamic)s 4891(tree,)s 5391(which)s 6068(w)s 2(ould)k 6759(normally)s 7711(consist)s 8471(of)s 8778(the)s 0 4227(sequence)m 959(of)s 1257(pages)s 1880(of)s 2178(the)s 2553(complete)s 3512(assembled)s 4593(document,)s 5671(is)s 5908(considered)s 7029(to)s 7295(be)s 7604(a)s 7797(g)s 1(alle)k 3(y)k 8458(whose)s 0 3939(point)m 563(of)s 845(appearance)s 1987(is)s 2208(the)s 2567(output)s 3250(\207le.)s 3730(Points)s 4390(of)s 4672(appearance)s 5814(may)s 6291(be)s 220 fnt5 6584 3936(preceding)m 240 fnt1 7606 3939(or)m 220 fnt5 7876 3936(f)m 6(ollo)k 3(wing)k 240 fnt1 8778 3939(the)m 0 3651(in)m 9(v)k 4(ocation)k 1054(point;)s 1658(entries)s 2345(in)s 2588(tables)s 3196(of)s 3467(contents)s 4315(are)s 4662(the)s 5010(main)s 5545(users)s 6087(of)s 220 fnt5 6358 3648(preceding)m 240 fnt1 7309 3651(.)m 480 3277(The)m 913(g)s 1(alle)k 3(y)k 1552(abstraction)s 2662(is)s 2877(adequate)s 3788(for)s 4131(all)s 4429(of)s 4706(the)s 5059(applications)s 6270(listed)s 6850(at)s 7087(the)s 7440(be)s 3(ginning)k 8453(of)s 8730(this)s 0 2989(section,)m 808(e)s 3(xcept)k 1514(that)s 1957(there)s 2515(is)s 2749(no)s 3067(pro)s 3(vision)k 4050(for)s 4413(sorting)s 5155(inde)s 3(x)k 5763(entries)s 6475(and)s 6904(references.)s 8073(Sorting)s 8855(of)s 0 2701(g)m 1(alle)k 3(ys)k 715(has)s 1075(been)s 1574(added)s 2194(to)s 2423(Lout)s 2925(as)s 3165(a)s 3321(b)s 4(uilt-in)k 4068(feature,)s 4827(in)s 9(v)k 4(ok)k 2(ed)k 5632(by)s 5916(adding)s 6611(a)s 6767(special)s 220 fnt5 7475 2698(@K)m 8(e)k 4(y)k 240 fnt1 8112 2701(parameter)m 0 2413(to)m 227(the)s 563(g)s 1(alle)k 3(ys,)k 1330(and)s 1722(using)s 2281(its)s 2545(v)s 6(alue)k 3100(as)s 3338(the)s 3673(sort)s 4079(k)s 2(e)k 3(y)k 15(.)k 4556(The)s 4972(author)s 5631(w)s 2(as)k 6039(at)s 6259(a)s 6412(loss)s 6823(to)s 7049(\207nd)s 7468(an)s 3(y)k 7852(other)s 8391(w)s 2(ay)k 15(,)k 8867(or)s 0 2125(an)m 3(y)k 397(useful)s 1036(generalization)s 2446(of)s 2717(this)s 3113(feature.)s 3939(Its)s 4228(implementation)s 5785(will)s 6211(be)s 6493(discussed)s 7468(in)s 7711(Section)s 8485(6.2.)s 240 fnt2 0 1476(5.2.)m 471(The)s 926(galley)s 1580(\210ushing)s 2447(algorithm)s [ /Dest /LOUTflushing /DEST pdfmark 240 fnt1 480 999(Galle)m 3(y)k 1177(components)s 2395(are)s 2751(promoted)s 3736(one)s 4148(by)s 4451(one)s 4863(into)s 5298(the)s 5655(point)s 6217(of)s 6498(appearance)s 7638(in)s 7891(the)s 8249(dynamic)s 0 711(parent)m 672(g)s 1(alle)k 3(y)k 15(,)k 1359(then)s 1843(carried)s 2579(along)s 3179(with)s 3676(it,)s 3931(ultimately)s 4968(to)s 5222(the)s 5586(root)s 6046(g)s 1(alle)k 3(y)k 6695(and)s 7115(the)s 7478(output)s 8165(\207le.)s 8650(This)s 0 423(process)m 800(is)s 1042(called)s 240 fnt3 1703 425(galle)m 7(y)k 2368(\210ushing)s 240 fnt1 3121 423(:)m 3259(the)s 3640(g)s 1(alle)k 3(ys)k 4396(are)s 4775(ri)s 6(v)k 3(ers)k 5393(running)s 6223(together)s 7098(to)s 7370(the)s 7750(sea,)s 8194(and)s 8631(each)s 0 135(component)m 1124(is)s 1334(a)s 1500(drop)s 1992(of)s 2263(w)s 2(ater)k 13(.)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 25 26 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5709 -1582(-)m 5837(25)s 6123(-)s 9066 13413 0 13304 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 480 13250(Here)m 1057(is)s 1324(a)s 1547(snapshot)s 2502(of)s 2830(a)s 3053(small)s 3682(dynamic)s 4616(tree,)s 5137(based)s 5797(on)s 6151(the)s 220 fnt5 6556 13247(@P)m 8(ageList)k 240 fnt1 7737 13250(de\207nitions)m 8855(of)s 0 12962(Section)m 774(3.2:)s 6982 3257 0 3257 240 288 60 480 9414 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 200 fnt3 0 3121(output)m 563(\207le)s gsave 860 0 translate 240 fnt1 0 3257 0 3165 240 288 60 LoutGraphic gsave currentdict end 200 dict begin begin grestore 0 0 0 0 240 288 60 0 3165 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore grestore (A) lfigpromotelabels grestore 1994(r)s 9(oot)k 2370(galle)s 6(y)k gsave 1994 2967 translate 240 fnt1 1927 0 0 0 240 288 60 LoutGraphic gsave currentdict end 200 dict begin begin grestore 0 0 0 0 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore grestore (B) lfigpromotelabels grestore gsave 1994 473 translate 240 fnt1 1927 2494 0 2494 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt1 845 2216(-)m 931(1)s 1035(-)s 410 2000(A)m 563(small)s 140 fnt5 170 1784(@Galle)m 2(y)k 160 fnt1 743(*)s 904 1617 5 1545 160 180 40 853 275 LoutGr2 currentdict end 200 dict begin begin grestore 10 10 5 5 160 180 40 0 1540 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore grestore (C) lfigpromotelabels grestore 140 fnt5 170 173(@F)m 4(ootSect)k grestore gsave 1994 0 translate 240 fnt1 1927 473 170 237 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 140 fnt5 170 201(@P)m 5(ageList 2)k grestore 5055 2611(body)m 5490(te)s 4(xt)k gsave 5055 1974 translate 240 fnt1 1927 483 170 240 240 288 60 LoutGraphic gsave currentdict end 200 dict begin begin grestore 1927 483 170 240 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 160 fnt1 170 204(paragraph)m grestore (D) lfigpromotelabels grestore gsave 5055 1524 translate 240 fnt1 1927 450 170 207 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 160 fnt1 170 171(of)m 351(te)s 2(xt.)k grestore gsave 5055 1034 translate 240 fnt1 1927 490 170 244 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 160 fnt5 170 203(@Input)m grestore gsave 0 0 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ B@W lfigprevious /FROM lfigpointdef A@E lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore gsave 0 0 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ D@W lfigprevious /FROM lfigpointdef C@E lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore end end restore grestore 0 8963(The)m 472(components)s 1724(of)s 2039(the)s 2431(body)s 3009(te)s 3(xt)k 3468(g)s 1(alle)k 3(y)k 4146(are)s 4537(lines,)s 5139(e)s 3(xcept)k 5864(for)s 6246(the)s 6638(special)s 7400(recepti)s 6(v)k 3(e)k 8366(symbol)s 220 fnt5 0 8672(@Input)m 240 fnt1 759 8675(which)m 1393(is)s 1595(a)s 1753(placeholder)s 2920(for)s 3249(as)s 3491(yet)s 3835(unread)s 4536(input)s 5080(\(Section)s 5924(5.4\).)s 6459(The)s 6879(components)s 8079(of)s 8342(the)s 8681(root)s 0 8387(g)m 1(alle)k 3(y)k 646(are)s 1006(pages,)s 1671(e)s 3(xcept)k 2364(for)s 2715(the)s 3076(concluding)s 4205(une)s 3(xpanded)k 5431(in)s 9(v)k 4(ocation)k 6498(of)s 220 fnt5 6781 8384(@P)m 8(ageList)k 240 fnt1 7845 8387(,)m 7965(which)s 8620(is)s 8843(an)s 0 8099(ine)m 3(xhaustible)k 1328(source)s 2008(of)s 2279(more)s 2826(pages,)s 3478(e)s 3(xpanded)k 4451(on)s 4748(demand.)s 480 7725(The)m 923(concrete)s 1804(data)s 2277(structure)s 3184(used)s 3696(by)s 4006(Basser)s 4718(Lout)s 5246(permits)s 6028(the)s 6392(g)s 1(alle)k 3(y)k 7041(\210ushing)s 7882(algorithm)s 8887(to)s 0 7437(na)m 4(vig)k 1(ate)k 861(the)s 1209(dynamic)s 2086(tree)s 2499(and)s 2903(\207nd)s 3334(signi\207cant)s 4390(features)s 5196(quickly:)s gsave 480 78 translate 200 fnt1 8081 7019 226 7019 200 288 50 LoutGraphic gsave grestore save gsave 100 dict begin lfigdict begin grestore 980 7019 226 6704 200 288 50 0 0 LoutGr2 currentdict end 100 dict begin begin grestore 980 585 226 270 200 288 50 0 6434 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 226(HEAD)m grestore (A) lfigpromotelabels grestore 1927 588 226 273 200 288 50 1830 6431 LoutGr2 currentdict end 100 dict begin begin grestore 1631 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(RECEIVING)m 1306(*)s grestore (B) lfigpromotelabels grestore 0 0 0 0 200 288 50 1830 6431 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR B@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef B@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 588 226 273 200 288 50 1830 5503 LoutGr2 currentdict end 100 dict begin begin grestore 1498 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(RECEPTIVE)m grestore (C) lfigpromotelabels grestore 0 0 0 0 200 288 50 1830 5503 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR C@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef C@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 0 0 0 200 288 50 1830 5163 LoutGr2 currentdict end 100 dict begin begin grestore 0 0 0 0 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore grestore (D) lfigpromotelabels grestore 0 0 0 0 200 288 50 1830 5163 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR D@NW lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef D@NW lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 2494 0 2494 200 288 50 1830 2669 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt1 845 2216(-)m 931(1)s 1035(-)s 410 2000(A)m 563(small)s 1587 1611 0 1545 160 180 40 170 275 LoutGr2 currentdict end 100 dict begin begin grestore 572 132 0 66 160 180 40 0 1479 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 140 fnt5 0 30(@Galle)m 2(y )k grestore (E) lfigpromotelabels grestore 1587 105 0 39 160 180 40 170 170 LoutGr2 currentdict end 100 dict begin begin grestore 731 105 0 39 160 180 40 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 140 fnt5 0 3(@F)m 4(ootSect )k grestore (F) lfigpromotelabels grestore grestore 0 0 0 0 200 288 50 1830 2669 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ B@E B@E 0 B@E E@E lfigydistance lfigpadd E@E ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 0 0 0 0 200 288 50 1830 2669 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ C@E C@E 0 C@E F@E lfigydistance lfigpadd F@E ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 588 226 273 200 288 50 1830 1741 LoutGr2 currentdict end 100 dict begin begin grestore 839 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(GAP)m grestore (C) lfigpromotelabels grestore 0 0 0 0 200 288 50 1830 1741 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR C@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef C@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 588 226 273 200 288 50 1830 813 LoutGr2 currentdict end 100 dict begin begin grestore 1498 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(RECEPTIVE)m grestore (C) lfigpromotelabels grestore 0 0 0 0 200 288 50 1830 813 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR C@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef C@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 473 170 237 200 288 50 1830 0 LoutGr2 currentdict end 100 dict begin begin grestore 1927 473 170 237 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 140 fnt5 170 201(@P)m 5(ageList 2)k grestore (D) lfigpromotelabels grestore 0 0 0 0 200 288 50 1830 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR D@NW lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef D@NW lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 0 0 0 0 200 288 50 1830 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ C@E C@E 0 C@E D@W 1.8 cm 0 lfigpadd lfigydistance lfigpadd D@W 1.8 cm 0 lfigpadd ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 980 7019 226 6704 200 288 50 4324 0 LoutGr2 currentdict end 100 dict begin begin grestore 980 585 226 270 200 288 50 0 6434 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 226(HEAD)m grestore (A) lfigpromotelabels grestore 0 0 0 0 200 288 50 5304 6704 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ B@E lfigprevious /FROM lfigpointdef A@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 483 170 240 200 288 50 6154 6536 LoutGr2 currentdict end 100 dict begin begin grestore 1927 483 170 240 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 160 fnt1 170 204(paragraph)m grestore (B) lfigpromotelabels grestore 0 0 0 0 200 288 50 6154 6536 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR B@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef B@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 588 226 273 200 288 50 6154 5608 LoutGr2 currentdict end 100 dict begin begin grestore 839 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(GAP)m grestore (B) lfigpromotelabels grestore 0 0 0 0 200 288 50 6154 5608 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR B@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef B@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 450 170 207 200 288 50 6154 4818 LoutGr2 currentdict end 100 dict begin begin grestore 1927 450 170 207 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 160 fnt1 170 171(of)m 351(te)s 2(xt.)k grestore (B) lfigpromotelabels grestore 0 0 0 0 200 288 50 6154 4818 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR B@NW lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef B@NW lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 588 226 273 200 288 50 6154 3890 LoutGr2 currentdict end 100 dict begin begin grestore 839 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(GAP)m grestore (B) lfigpromotelabels grestore 0 0 0 0 200 288 50 6154 3890 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR B@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef B@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 588 226 273 200 288 50 6154 2962 LoutGr2 currentdict end 100 dict begin begin grestore 1498 588 226 273 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore 200 fnt3 226 229(RECEPTIVE)m grestore (B) lfigpromotelabels grestore 0 0 0 0 200 288 50 6154 2962 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR B@W lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef B@W lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 1927 471 170 235 200 288 50 6154 2151 LoutGr2 currentdict end 100 dict begin begin grestore 1927 471 170 235 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 140 fnt5 170 199(@Input)m grestore (C) lfigpromotelabels grestore 0 0 0 0 200 288 50 6154 2151 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@CTR A@CTR C@NW lfigangle A@CIRCUM lfigpadd lfigprevious /FROM lfigpointdef C@NW lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore 0 0 0 0 200 288 50 6154 2151 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ B@E B@E 0 B@E C@W 1.2 cm 0 lfigpadd lfigydistance lfigpadd C@W 1.2 cm 0 lfigpadd ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore end end restore grestore grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 26 27 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1581(-)m 5833(26)s 6126(-)s 9066 13414 0 13414 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13251(Each)m 521(g)s 1(alle)k 3(y)k 1140(has)s 1495(a)s 240 fnt3 1647 13253(HEAD)m 240 fnt1 2325 13251(node)m 2832(whose)s 3485(children)s 4311(are)s 4643(its)s 4904(component)s 6013(objects,)s 6783(separated)s 7728(by)s 240 fnt3 8007 13253(GAP)m 240 fnt1 8516 13251(nodes)m 0 12963(recording)m 969(the)s 1317(inter)s 4(-component)k 2953(g)s 1(aps.)k 480 12589(Each)m 1026(component)s 2161(is)s 2383(preceded)s 3315(by)s 3621(zero)s 4096(or)s 4367(more)s 240 fnt3 4925 12591(galle)m 7(y)k 5569(inde)s 4(x)k 6155(nodes)s 240 fnt1 6780 12589(of)m 7063(v)s 6(arious)k 7823(types.)s 8504(Ev)s 3(ery)k 0 12301(recepti)m 6(v)k 3(e)k 922(symbol)s 1681(has)s 2050(a)s 240 fnt3 2216 12303(RECEPTIVE)m 240 fnt1 3528 12301(inde)m 3(x)k 4111(pointing)s 4962(to)s 5200(it,)s 5438(so)s 5704(that)s 6121(it)s 6312(can)s 6701(be)s 6982(found)s 7598(without)s 8388(search-)s 0 12013(ing)m 355(through)s 1152(its)s 1423(component.)s 2646(If)s 2871(the)s 3215(symbol)s 3970(is)s 4175(currently)s 5086(the)s 5429(tar)s 4(get)k 6023(of)s 6290(a)s 6451(g)s 1(alle)k 3(y)k 15(,)k 7118(it)s 7305(has)s 7670(a)s 240 fnt3 7831 12015(RECEIVING)m 240 fnt1 0 11725(inde)m 3(x)k 595(instead)s 1342(which)s 1995(is)s 2217(also)s 2667(link)s 2(ed)k 3332(to)s 3583(the)s 3942(incoming)s 4911(g)s 1(alle)k 3(y)k 15(.)k 5652(Galle)s 3(ys)k 6441(that)s 6871(are)s 7229(currently)s 8157(without)s 8960(a)s 0 11437(tar)m 4(get)k 586(are)s 920(link)s 2(ed)k 1560(to)s 1786(the)s 2120(dynamic)s 2984(tree)s 3383(by)s 240 fnt3 3664 11439(UN)m 6(A)k 8(TT)k 12(A)k 7(CHED)k 240 fnt1 5215 11437(g)m 1(alle)k 3(y)k 5836(inde)s 3(x)k 3(es,)k 6654(either)s 7244(just)s 7635(after)s 8118(their)s 8601(most)s 0 11149(recent)m 643(tar)s 4(get)k 1242(if)s 1459(there)s 1992(has)s 2362(been)s 2871(one,)s 3324(or)s 3583(else)s 4010(at)s 4242(their)s 4739(point)s 5291(of)s 5562(in)s 9(v)k 4(ocation.)k 480 10775(Each)m 1041(g)s 1(alle)k 3(y)k 1701(should)s 2424(be)s 2732(thought)s 3550(of)s 3847(as)s 4123(a)s 4315(concurrent)s 5423(process,)s 6273(although)s 7194(the)s 7569(implementation)s 0 10487(in)m 268(C)s 506(uses)s 995(coroutines)s 2067(implemented)s 3399(by)s 3719(procedures.)s 4957(A)s 5213(g)s 1(alle)k 3(y)k 5873(may)s 6364(promote)s 7243(its)s 7545(\207rst)s 8002(component)s 0 10199(only)m 499(if)s 735(it)s 946(has)s 1335(a)s 1520(tar)s 4(get,)k 2185(suf\207cient)s 3153(space)s 3759(is)s 3988(a)s 4(v)k 6(ailable)k 4915(at)s 5166(the)s 5533(tar)s 4(get)k 6151(to)s 6409(recei)s 6(v)k 3(e)k 7164(the)s 7531(component,)s 8722(and)s 0 9911(the)m 349(component)s 1475(contains)s 2325(no)s 2620(recepti)s 6(v)k 3(e)k 3544(symbols.)s 4508(This)s 4986(last)s 5379(condition)s 6342(seems)s 6979(to)s 7220(be)s 7504(the)s 7854(k)s 2(e)k 3(y)k 8251(to)s 8492(g)s 1(alle)k 3(y)k 0 9623(synchronization:)m 1722(it)s 1943(forces)s 2606(a)s 2801(bottom-up)s 3880(promotion)s 4963(re)s 3(gime,)k 5759(pre)s 6(v)k 3(enting)k 6855(pages)s 7480(from)s 8033(\210ushing)s 8887(to)s 0 9335(output)m 672(before)s 1338(te)s 3(xt)k 1753(\210ushes)s 2469(into)s 2894(them,)s 3479(for)s 3817(e)s 3(xample.)k 480 8961(Each)m 1022(g)s 1(alle)k 3(y)k 1663(contains)s 2519(a)s 2692(number)s 3490(of)s 3769(binary)s 4441(semaphores,)s 5685(sho)s 6(wn)k 6369(as)s 6626(asterisks)s 7507(in)s 7757(our)s 8144(snapshots)s 0 8673(when)m 583(set.)s 1019(At)s 1325(an)s 3(y)k 1730(gi)s 6(v)k 3(en)k 2317(moment,)s 3215(a)s 3389(g)s 1(alle)k 3(y)k 4030(process)s 4805(is)s 5022(either)s 5633(running)s 6438(or)s 6704(else)s 7139(is)s 7356(suspended)s 8419(on)s 8724(one)s 0 8385(of)m 269(its)s 543(o)s 6(wn)k 1005(semaphores.)s 2296(The)s 240 fnt3 2722 8387(HEAD)m 240 fnt1 3413 8385(node)m 3933(contains)s 4779(a)s 4943(semaphore)s 6033(which)s 6673(is)s 6881(set)s 7204(when)s 7778(the)s 8124(g)s 1(alle)k 3(y)k 8756(has)s 0 8097(tried)m 499(to)s 742(\207nd)s 1177(a)s 1347(tar)s 4(get)k 1950(and)s 2359(f)s 2(ailed.)k 3068(Each)s 3607(recepti)s 6(v)k 3(e)k 4533(symbol)s 5297(has)s 5671(a)s 5842(semaphore)s 6938(which)s 7584(is)s 7798(set)s 8127(when)s 8708(that)s 0 7809(symbol)m 760(is)s 970(pre)s 6(v)k 3(enting)k 2037(the)s 2385(\207rst)s 2816(component)s 3940(from)s 4464(being)s 5049(promoted.)s 480 7435(F)m 3(or)k 859(e)s 3(xample,)k 1762(in)s 1994(the)s 2331(snapshot)s 3218(at)s 3439(the)s 3776(be)s 3(ginning)k 4773(of)s 5033(this)s 5418(section,)s 6191(the)s 6528(root)s 6962(g)s 1(alle)k 3(y)k 7585(is)s 7784(suspended)s 8829(on)s 0 7147(the)m 220 fnt5 351 7144(@Galle)m 4(y)k 240 fnt1 1253 7147(symbol,)m 2069(b)s 4(ut)k 2435(the)s 2787(te)s 3(xt)k 3205(g)s 1(alle)k 3(y)k 3843(is)s 4057(running.)s 4970(It)s 5179(will)s 5608(suspend)s 6442(on)s 6743(the)s 220 fnt5 7095 7144(@Input)m 240 fnt1 7866 7147(symbol)m 8630(after)s 0 6859(the)m 348(\207rst)s 779(tw)s 2(o)k 1189(components)s 2397(are)s 2744(promoted.)s 480 6485(Ev)m 3(ery)k 1145(g)s 1(alle)k 3(y)k 240 fnt3 1822 6487(G)m 240 fnt1 1995 6485(,)m 2145(be)s 2470(it)s 2705(a)s 2914(list)s 3308(of)s 3623(pages,)s 4318(body)s 4895(te)s 3(xt,)k 5400(a)s 5609(footnote,)s 6556(or)s 6858(whate)s 6(v)k 3(er)k 9(,)k 7866(e)s 3(x)k 3(ecutes)k 8778(the)s 0 6197(follo)m 6(wing)k 977(algorithm)s 1966(in)s 2209(parallel)s 2979(with)s 3461(e)s 6(v)k 3(ery)k 4037(other)s 4588(g)s 1(alle)k 3(y:)k 0 5694(1.)m 303(Initially)s 240 fnt3 1132 5696(G)m 240 fnt1 1384 5694(is)m 1614(unattached.)s 2834(Search)s 3560(forw)s 2(ards)k 4478(or)s 4756(backw)s 2(ards)k 5848(from)s 6392(its)s 240 fnt3 6687 5696(UN)m 6(A)k 8(TT)k 12(A)k 7(CHED)k 240 fnt1 8272 5694(inde)m 3(x)k 8876(as)s 0 5406(required,)m 903(to)s 1142(\207nd)s 1573(a)s 1739(recepti)s 6(v)k 3(e)k 2661(symbol)s 240 fnt3 3421 5408(S)m 240 fnt1 3602 5406(which)m 4244(can)s 4633(e)s 3(xpand)k 5380(to)s 5619(re)s 6(v)k 3(eal)k 6248(a)s 6414(tar)s 4(get)k 7013(for)s 240 fnt3 7351 5408(G)m 240 fnt1 7524 5406(.)m 0 4903(2.)m 284(If)s 514(no)s 240 fnt3 807 4905(S)m 240 fnt1 988 4903(can)m 1377(be)s 1659(found,)s 2325(suspend)s 3155(on)s 3452(the)s 3800(attachment)s 4908(semaphore.)s 6108(Resume)s 6935(later)s 7418(from)s 7942(step)s 8380(1.)s 0 4400(3.)m 281(Expand)s 240 fnt3 1068 4402(S)m 240 fnt1 1246 4400(to)m 1482(re)s 6(v)k 3(eal)k 2107(the)s 2452(tar)s 4(get)k 3048(of)s 240 fnt3 3316 4402(G)m 240 fnt1 3489 4400(.)m 3649(Preserv)s 3(e)k 240 fnt3 4521 4402(S)m 240 fnt1 4642 4400(')m 13(s)k 4849(semaphore)s 5938(by)s 6229(mo)s 3(ving)k 7007(it)s 7196(to)s 7432(the)s 7777(\207rst)s 8204(recepti)s 6(v)k 3(e)k 0 4112(symbol)m 760(within)s 1428(the)s 1776(e)s 3(xpansion)k 2801(of)s 240 fnt3 3072 4114(S)m 240 fnt1 3193 4112(.)m 0 3609(4.)m 295(Calculate)s 1264(the)s 1624(a)s 4(v)k 6(ailable)k 2543(width)s 3156(and)s 3572(height)s 4241(at)s 4484(the)s 4844(tar)s 4(get,)k 5501(and)s 5917(if)s 240 fnt3 6145 3611(G)m 240 fnt1 6389 3609(is)m 6611(still)s 7034(a)s 7211(pure)s 7704(parse)s 8275(tree,)s 8751(use)s 0 3321(the)m 377(en)s 9(vironment)k 1667(attached)s 2550(to)s 240 fnt3 2819 3323(G)m 240 fnt1 3081 3321(and)m 3515(the)s 3892(style)s 4429(information)s 5643(from)s 6197(the)s 6574(tar)s 4(get)k 7203(to)s 7471(e)s 6(v)k 6(aluate)k 240 fnt3 8341 3323(G)m 240 fnt1 8603 3321(as)m 8883(in)s 0 3033(Section)m 774(4.)s 0 2577(5.)m 284(Examine)s 1190(the)s 1538(components)s 2746(of)s 240 fnt3 3017 2579(G)m 240 fnt1 3250 2577(one)m 3652(by)s 3946(one.)s 4456(F)s 3(or)k 4845(each)s 5340(component)s 6464(there)s 6997(are)s 7344(three)s 7877(possibilities:)s 240 fnt3 480 2205(A)m 7(CCEPT)k 17(.)k 240 fnt1 1513 2203(If)m 1756(the)s 2116(component)s 3253(\207ts)s 3609(into)s 4046(the)s 4407(a)s 4(v)k 6(ailable)k 5328(space,)s 5978(and)s 6395(has)s 6778(no)s 7083(other)s 7647(problems,)s 8657(then)s 0 1915(promote)m 875(it)s 1090(into)s 1538(the)s 1909(tar)s 4(get.)k 2635(If)s 2888(this)s 3306(is)s 3539(the)s 3910(\207rst)s 4364(component)s 5511(promoted)s 6509(into)s 6956(this)s 7375(tar)s 4(get,)k 8044(and)s 240 fnt3 8471 1917(G)m 240 fnt1 8727 1915(is)m 8960(a)s 0 1627(forcing)m 768(g)s 1(alle)k 3(y)k 1428(\(Section)s 2307(5.4\),)s 2819(delete)s 3470(e)s 6(v)k 3(ery)k 4072(recepti)s 6(v)k 3(e)k 5020(symbol)s 5806(preceding)s 6827(the)s 7201(tar)s 4(get)k 7826(in)s 8095(the)s 8469(parent)s 0 1339(g)m 1(alle)k 3(y)k 15(.)k 729(If)s 240 fnt3 959 1341(G)m 240 fnt1 1192 1339(is)m 1402(the)s 1750(root)s 2195(g)s 1(alle)k 3(y)k 15(,)k 2867(render)s 3537(the)s 3885(component)s 5009(on)s 5306(the)s 5654(output)s 6326(\207le)s 6687(and)s 7091(dispose)s 7865(it;)s 240 fnt3 480 967(REJECT)m 17(.)k 240 fnt1 1490 965(If)m 1756(the)s 2140(component)s 3300(is)s 3546(too)s 3941(lar)s 4(ge)k 4506(for)s 4880(the)s 5264(a)s 4(v)k 6(ailable)k 6208(space,)s 6882(or)s 7177(a)s 240 fnt3 7379 967(FOLLO)m 12(WS)k 240 fnt1 8542 965(inde)m 3(x)k 0 677(\(described)m 1043(belo)s 6(w\))k 1740(forbids)s 2458(its)s 2723(promotion)s 3767(into)s 4182(this)s 4568(tar)s 4(get,)k 5203(then)s 5662(detach)s 240 fnt3 6333 679(G)m 240 fnt1 6556 677(from)m 7069(the)s 7407(tar)s 4(get.)k 8100(If)s 8320(this)s 8705(w)s 2(as)k 0 389(the)m 338(\207rst)s 758(component)s 1872(at)s 2093(this)s 2479(tar)s 4(get,)k 240 fnt3 3114 391(S)m 240 fnt1 3284 389(has)m 3644(been)s 4142(a)s 4298(complete)s 5219(f)s 2(ailure,)k 5936(so)s 6191(undo)s 6713(step)s 7141(3)s 7294(\(Basser)s 8060(Lout)s 8561(is)s 8760(not)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 27 28 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5708 -1579(-)m 5836(27)s 6124(-)s 9066 13418 0 13309 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13255(able)m 454(to)s 693(undo)s 1226(step)s 1664(4\);)s 1975(otherwise)s 2960(delete)s 3586(the)s 3934(tar)s 4(get.)k 4637(Return)s 5345(to)s 5584(step)s 6022(1)s 6177(and)s 6581(continue)s 7461(immediately;)s 240 fnt3 480 12883(SUSPEND.)m 240 fnt1 1685 12881(If)m 1928(the)s 2289(component)s 3426(contains)s 4287(a)s 4466(recepti)s 6(v)k 3(e)k 5402(symbol,)s 6227(it)s 6432(cannot)s 7143(be)s 7438(promoted)s 8426(yet.)s 8896(If)s 0 12593(this)m 392(symbol)s 1148(is)s 1354(the)s 1697(tar)s 4(get)k 2292(of)s 2559(a)s 2720(g)s 1(alle)k 3(y)k 3350(that)s 3764(w)s 2(as)k 4180(written)s 4909(to)s 5144(an)s 5423(auxiliary)s 6321(\207le)s 6678(on)s 6971(a)s 7132(pre)s 6(vious)k 7997(run,)s 8419(read)s 8883(in)s 0 12305(that)m 427(g)s 1(alle)k 3(y)k 1071(and)s 1484(\210ush)s 2017(it.)s 2322(Otherwise)s 3370(suspend)s 4209(on)s 4516(the)s 4873(recepti)s 6(v)k 3(e)k 5805(symbol')s 13(s)k 6729(semaphore;)s 7887(resume)s 8643(later)s 0 12017(from)m 524(step)s 962(4.)s 0 11513(6.)m 284(T)s 16(erminate)k 1305(when)s 1881(the)s 2229(g)s 1(alle)k 3(y)k 2863(is)s 3073(empty)s 15(.)k 0 11010(At)m 354(v)s 6(arious)k 1158(points)s 1850(in)s 2148(this)s 2599(algorithm,)s 3691(recepti)s 6(v)k 3(e)k 4668(symbols)s 5572(\(and)s 6111(their)s 6663(semaphores\))s 7975(are)s 8378(deleted)s 0 10722(in)m 273(the)s 652(dynamic)s 1560(parent)s 2247(g)s 1(alle)k 3(y)k 15(,)k 2950(possibly)s 3833(permitting)s 4911(it)s 5134(to)s 5404(resume)s 6180(\210ushing.)s 7147(When)s 7807(this)s 8234(happens,)s 0 10434(Basser)m 701(Lout)s 1218(resumes)s 2057(the)s 2410(parent)s 3071(immediately)s 4324(after)s 240 fnt3 4825 10436(G)m 240 fnt1 5063 10434(suspends)m 5983(or)s 6247(terminates.)s 7410(Also,)s 7974(whene)s 6(v)k 3(er)k 8960(a)s 0 10146(component)m 1140(is)s 1366(promoted,)s 2406(an)s 3(y)k 2819(child)s 3371(g)s 1(alle)k 3(ys)k 4111(connected)s 5156(to)s 5411(it)s 5619(by)s 240 fnt3 5929 10148(UN)m 6(A)k 8(TT)k 12(A)k 7(CHED)k 240 fnt1 7510 10146(inde)m 3(x)k 3(es)k 8302(must)s 8844(be)s 0 9858(resumed,)m 918(since)s 1466(these)s 2014(g)s 1(alle)k 3(ys)k 2739(may)s 3206(be)s 3490(able)s 3945(to)s 4185(\207nd)s 4617(a)s 4784(tar)s 4(get)k 5384(no)s 6(w)k 15(.)k 5942(A)s 6173(good)s 6712(e)s 3(xample)k 7576(of)s 7848(this)s 8246(situation)s 0 9570(occurs)m 664(when)s 1228(a)s 1382(line)s 1785(of)s 2044(body)s 2566(te)s 3(xt)k 2969(with)s 3440(one)s 3830(or)s 4077(more)s 4613(footnotes)s 5542(is)s 5740(promoted)s 6703(onto)s 7171(a)s 7325(page.)s 7929(Basser)s 8614(Lout)s 0 9282(gi)m 6(v)k 3(es)k 547(priority)s 1317(to)s 1556(such)s 2052(children,)s 2942(suspending)s 240 fnt3 4073 9284(G)m 240 fnt1 4306 9282(while)m 4893(each)s 5388(is)s 5598(gi)s 6(v)k 3(en)k 6178(a)s 6344(chance)s 7064(to)s 7303(\210ush.)s 480 8908(Basser)m 1211(Lout)s 1758(searches)s 2653(for)s 3025(the)s 3408(\207rst)s 3874(tar)s 4(get)k 4507(of)s 240 fnt3 4813 8910(G)m 240 fnt1 5081 8908(only)m 5595(in)s 5873(re)s 3(gions)k 6660(of)s 6965(the)s 7348(dynamic)s 8260(tree)s 8708(that)s 0 8620(will)m 437(clearly)s 1152(precede)s 1963(or)s 2233(follo)s 6(w)k 240 fnt3 2917 8622(G)m 240 fnt1 3090 8620(')m 13(s)k 3312(in)s 9(v)k 4(ocation)k 4378(point)s 4941(in)s 5196(the)s 5556(\207nal)s 6047(printed)s 6794(document,)s 7857(whiche)s 6(v)k 3(er)k 8916(is)s 0 8332(speci\207ed)m 904(in)s 1142(the)s 220 fnt5 1486 8329(into)m 240 fnt1 1887 8332(clause;)m 2591(subsequent)s 3711(tar)s 4(gets)k 4389(are)s 4731(sought)s 5426(later)s 5904(in)s 6142(the)s 6486(same)s 7028(g)s 1(alle)k 3(y)k 7657(as)s 7903(the)s 8246(\207rst.)s 8776(An)s 0 8044(e)m 3(xception)k 982(to)s 1219(this)s 1613(rule,)s 2089(whose)s 2755(necessity)s 3683(will)s 4107(be)s 4387(made)s 4959(clear)s 5480(later)s 9(,)k 5999(is)s 6207(that)s 6623(a)s 6787(\207rst)s 220 fnt5 7216 8041(f)m 6(ollo)k 3(wing)k 240 fnt1 8104 8044(tar)m 4(get)k 8700(will)s 0 7756(be)m 282(sought)s 981(within)s 1649(a)s 1815(dynamic)s 2692(sibling)s 3396(g)s 1(alle)k 3(y)k 4030(preceding)s 240 fnt3 5026 7758(G)m 240 fnt1 5199 7756(')m 13(s)k 5409(in)s 9(v)k 4(ocation)k 6463(point:)s gsave 480 2770 translate 200 fnt1 5379 4646 0 4646 200 288 50 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 200 fnt3 0 4510(dynamic)m 722(par)s 7(ent)k gsave 0 1353 translate 200 fnt1 2039 3003 226 2777 200 288 50 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1587 171 0 86 200 288 50 226 2323 LoutGr2 currentdict end 200 dict begin begin grestore 796 171 0 86 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 180 fnt5 0 40(@XT)m 21(arget)k grestore (A) lfigpromotelabels grestore 1587 136 0 47 200 288 50 226 1620 LoutGr2 currentdict end 200 dict begin begin grestore 1254 136 0 47 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 200 fnt3 0 3(UN)m 5(A)k 7(TT)k 10(A)k 6(CHED)k grestore (C) lfigpromotelabels grestore 180 fnt5 226 752(@XT)m 21(arget)k grestore gsave 2889 4135 translate 200 fnt1 2490 171 0 86 200 288 50 LoutGraphic gsave currentdict end 200 dict begin begin grestore 2450 171 0 86 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 180 fnt5 0 40(X into { @XT)m 21(arget&&f)k 5(ollo)k 2(wing })k grestore (B) lfigpromotelabels grestore gsave 2889 2720 translate 200 fnt1 2039 1302 226 1076 200 288 50 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 180 fnt5 226 492(@GT)m 21(arget)k grestore gsave 2889 1982 translate 200 fnt1 2490 171 0 86 200 288 50 LoutGraphic gsave currentdict end 200 dict begin begin grestore 2490 171 0 86 200 288 50 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 180 fnt5 0 40(G into { @GT)m 21(arget&&f)k 5(ollo)k 2(wing })k grestore (D) lfigpromotelabels grestore gsave 2889 0 translate 200 fnt1 2039 1869 226 1643 200 288 50 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore gsave 0 0 translate 200 fnt1 0 0 0 0 200 288 50 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@E 0.2 cm 0 lfigpadd lfigprevious /FROM lfigpointdef 0.2 cm 0 B@W lfigpsub lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore gsave 0 0 translate 200 fnt1 0 0 0 0 200 288 50 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ C@E 0.2 cm 0 lfigpadd lfigprevious /FROM lfigpointdef 0.2 cm 0 D@W lfigpsub lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore end end restore grestore 0 2319(Here)m 240 fnt3 524 2321(G)m 240 fnt1 762 2319(will)m 1193(\207nd)s 1629(the)s 220 fnt5 1982 2316(@GT)m 26(arget)k 240 fnt1 3045 2319(tar)m 4(get)k 3649(within)s 240 fnt3 4322 2321(X)m 240 fnt1 4478 2319(.)m 4647(This)s 5128(is)s 5343(dangerous,)s 6439(since)s 6991(if)s 7213(the)s 7566(\207rst)s 8002(component)s 0 2031(of)m 240 fnt3 303 2033(G)m 240 fnt1 568 2031(is)m 811(then)s 1312(promoted)s 2320(via)s 240 fnt3 2704 2033(X)m 240 fnt1 2952 2031(into)m 3410(the)s 3790(\207rst)s 220 fnt5 4254 2028(@XT)m 26(arget)k 240 fnt1 5319 2031(rather)m 5967(than)s 6469(into)s 6926(the)s 7307(second,)s 240 fnt3 8111 2033(G)m 240 fnt1 8284 2031(')m 13(s)k 8527(tar)s 4(get)k 0 1743(will)m 438(not)s 817(appear)s 1526(later)s 2022(in)s 2277(the)s 2638(\207nal)s 3130(printed)s 3878(document)s 4894(than)s 5376(its)s 5664(in)s 9(v)k 4(ocation)k 6731(point,)s 7342(as)s 7605(required)s 8471(by)s 8778(the)s 220 fnt5 0 1452(into)m 240 fnt1 406 1455(clause.)m 480 1081(Accordingly)m 15(,)k 1753(when)s 2313(such)s 2794(a)s 2944(tar)s 4(get)k 3528(is)s 3722(chosen,)s 4478(tw)s 2(o)k 4873(special)s 5575(g)s 1(alle)k 3(y)k 6194(inde)s 3(x)k 3(es)k 6954(are)s 7286(inserted)s 8084(and)s 8472(link)s 2(ed)k 0 793(together:)m 898(a)s 240 fnt3 1074 795(PRECEDES)m 240 fnt1 2327 793(inde)m 3(x)k 2921(at)s 240 fnt3 3163 795(G)m 240 fnt1 3336 793(')m 13(s)k 3555(in)s 9(v)k 4(ocation)k 4619(point,)s 5227(and)s 5641(a)s 240 fnt3 5817 795(FOLLO)m 12(WS)k 240 fnt1 6952 793(inde)m 3(x)k 7546(at)s 7787(the)s 8145(\207rst)s 8586(com-)s 0 505(ponent)m 720(of)s 240 fnt3 1000 507(G)m 240 fnt1 1173 505(.)m 1346(The)s 1783(algorithm)s 2781(checks)s 3492(before)s 4167(promoting)s 5226(an)s 3(y)k 240 fnt3 5632 507(FOLLO)m 12(WS)k 240 fnt1 6767 505(inde)m 3(x)k 7360(that)s 7787(its)s 8072(promotion)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 28 29 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5708 -1579(-)m 5836(28)s 6123(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13253(w)m 2(ould)k 661(not)s 1033(place)s 1599(it)s 1797(earlier)s 2471(than)s 2946(the)s 3300(corresponding)s 240 fnt3 4728 13255(PRECEDES)m 240 fnt1 5978 13253(inde)m 3(x)k 6568(in)s 6817(the)s 7171(same)s 7724(g)s 1(alle)k 3(y)k 15(,)k 8402(and)s 8813(re-)s 0 12965(jects)m 486(the)s 831(component)s 1952(if)s 2166(it)s 2355(w)s 2(ould.)k 3113(Since)s 240 fnt3 3697 12967(PRECEDES)m 240 fnt1 4939 12965(and)m 240 fnt3 5340 12967(FOLLO)m 12(WS)k 240 fnt1 6463 12965(inde)m 3(x)k 3(es)k 7236(are)s 7580(rarely)s 8187(used,)s 8730(this)s 0 12677(check)m 619(can)s 1008(be)s 1290(implemented)s 2596(by)s 2890(linear)s 3493(search.)s 480 12303(When)m 1114(tw)s 2(o)k 1529(components)s 2742(are)s 3094(separated)s 4060(by)s 220 fnt5 4359 12300(/)m 240 fnt1 4423 12303(,)m 4535(as)s 4790(opposed)s 5652(to)s 5897(the)s 6250(more)s 6802(usual)s 220 fnt5 7367 12300(//)m 240 fnt1 7492 12303(,)m 7604(each)s 8105(in\210uences)s 0 12015(the)m 358(horizontal)s 1393(position)s 2232(of)s 2514(the)s 2872(other)s 13(.)k 3525(Because)s 4389(of)s 4671(this,)s 5133(the)s 240 fnt3 5492 12017(SUSPEND)m 240 fnt1 6596 12015(action)m 7248(is)s 7468(in)s 7722(f)s 2(act)k 8148(tak)s 2(en)k 8732(if)s 8960(a)s 0 11727(recepti)m 6(v)k 3(e)k 930(symbol)s 1698(occurs)s 2382(in)s 2633(an)s 3(y)k 3039(component)s 4171(separated)s 5140(from)s 5672(the)s 6028(\207rst)s 6468(by)s 220 fnt5 6770 11724(/)m 240 fnt1 6903 11727(operators)m 7851(only)s 15(.)k 8435(Ag)s 1(ain,)k 0 11439(linear)m 603(search)s 1270(forw)s 2(ards)k 2168(to)s 2407(the)s 2755(\207rst)s 220 fnt5 3186 11436(//)m 240 fnt1 3371 11439(suf\207ces)m 4152(for)s 4490(this)s 4886(check.)s 480 11065(A)m 740(good)s 1308(illustration)s 2430(of)s 2731(these)s 3308(unusual)s 4139(cases)s 4724(is)s 4964(af)s 6(forded)k 5856(by)s 6180(the)s 220 fnt5 6558 11062(@Align)m 240 fnt1 7344 11065(symbols)m 8223(from)s 8778(the)s 0 10777(standard)m 867(DocumentLayout)s 2600(package.)s 3546(These)s 4171(are)s 4516(used)s 5012(to)s 5249(produce)s 6074(displayed)s 7047(equations,)s 8069(aligned)s 8829(on)s 0 10489(their)m 497(equals)s 1159(signs)s 1702(despite)s 2435(being)s 3020(separated)s 3980(by)s 4274(arbitrary)s 5149(body)s 5683(te)s 3(xt.)k 480 10115(The)m 220 fnt5 921 10112(@Align)m 240 fnt1 1689 10115(symbols)m 2551(are)s 2911(packaged)s 3886(neatly)s 4537(for)s 4889(the)s 5250(con)s 9(v)k 3(enience)k 6503(of)s 6787(the)s 7148(non-e)s 3(xpert)k 8254(user)s 9(,)k 8764(b)s 4(ut)k 0 9827(we)m 335(will)s 761(sho)s 6(w)k 1315(just)s 1720(the)s 2067(essence)s 2853(of)s 3124(the)s 3472(implementation)s 5029(here.)s 5603(First,)s 6147(an)s 220 fnt5 6430 9824(@AlignList)m 240 fnt1 7536 9827(g)m 1(alle)k 3(y)k 8170(is)s 8379(created)s 0 9539(which)m 642(contains)s 1490(an)s 1773(in\207nite)s 2506(supply)s 3199(of)s 220 fnt5 3470 9536(@AlignPlace)m 240 fnt1 4779 9539(recepti)m 6(v)k 3(e)k 5701(symbols)s 6550(separated)s 7510(by)s 220 fnt5 7804 9536(/)m 240 fnt1 7928 9539(operators:)m 4777 3207 0 3207 240 288 60 480 5992 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 240 fnt3 0 3044(body)m 522(te)s 4(xt)k 926(galle)s 7(y)k gsave 0 161 translate 240 fnt1 2039 2720 226 2494 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1587 1418 0 1314 240 288 60 226 226 LoutGr2 currentdict end 200 dict begin begin grestore 838 208 0 104 240 288 60 0 1210 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 220 fnt5 0 47(@Galle)m 4(y)k grestore (A) lfigpromotelabels grestore grestore gsave 2889 1638 translate 240 fnt1 1888 209 0 105 240 288 60 LoutGraphic gsave currentdict end 200 dict begin begin grestore 1046 209 0 105 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 220 fnt5 0 48(@AlignList)m grestore (B) lfigpromotelabels grestore gsave 2889 0 translate 240 fnt1 1888 1525 226 1195 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 220 fnt5 226 1138(@AlignPlace)m 226 850(@AlignPlace)m 226 562(...)m 226 274(@EndAlignList)m grestore gsave 0 0 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@E 0.2 cm 0 lfigpadd lfigprevious /FROM lfigpointdef 0.2 cm 0 B@W lfigpsub lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore end end restore grestore 0 5541(Then)m 549(equations)s 1517(lik)s 2(e)k 1471 214 393 105 240 288 60 480 4987 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1471 214 393 105 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1471 214 393 105 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 240 fnt3 0 53(f)m 240 fnt4 113 45(\()m 240 fnt3 197 53(x)m 240 fnt4 315 45(\))m 477(=)s 240 fnt3 690 53(g)m 240 fnt4 816 45(\()m 240 fnt3 900 53(x)m 240 fnt4 1018 45(\))m 1156(+)s 1357(2)s grestore grestore end end restore grestore 0 4536(are)m 358(created)s 1117(and)s 1532(sent)s 1989(to)s 220 fnt5 2239 4533(@AlignPlace&&f)m 6(ollo)k 3(wing)k 240 fnt1 4690 4536(tar)m 4(gets.)k 5498(The)s 3(y)k 6052(collect)s 6760(in)s 7014(the)s 220 fnt5 7374 4533(@AlignList)m 240 fnt1 8492 4536(g)m 1(alle)k 3(y)k 0 4248(and)m 404(are)s 751(aligned)s 1513(there:)s 5836 3212 0 3212 240 288 60 480 696 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 240 fnt3 0 3049(body)m 522(te)s 4(xt)k 926(galle)s 7(y)k gsave 0 166 translate 240 fnt1 2039 2720 226 2494 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1587 1418 0 1314 240 288 60 226 226 LoutGr2 currentdict end 200 dict begin begin grestore 838 208 0 104 240 288 60 0 1210 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 220 fnt5 0 47(@Galle)m 4(y)k grestore (A) lfigpromotelabels grestore grestore gsave 2889 1643 translate 240 fnt1 2947 209 0 105 240 288 60 LoutGraphic gsave currentdict end 200 dict begin begin grestore 1046 209 0 105 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigbox ] lfigdopath pop pop grestore 220 fnt5 0 48(@AlignList)m grestore (B) lfigpromotelabels grestore gsave 2889 0 translate 240 fnt1 2947 1530 1285 1195 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 2495 1078 1059 969 240 288 60 226 226 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ xmark ysize lfigprevious /FROM lfigpointdef xmark 0 lfigprevious /TO lfigpointdef ] lfigdopath pop pop grestore 240 fnt3 666 917(f)m 240 fnt4 779 909(\()m 240 fnt3 863 917(x)m 240 fnt4 981 909(\))m 1143(=)s 240 fnt3 1356 917(g)m 240 fnt4 1482 909(\()m 240 fnt3 1566 917(x)m 240 fnt4 1684 909(\))m 1822(+)s 2023(2)s 240 fnt3 0 629(f)m 240 fnt4 113 621(\()m 240 fnt3 197 629(x)m 240 fnt4 315 621(\))m 453(-)s 240 fnt3 653 629(g)m 240 fnt4 779 621(\()m 240 fnt3 863 629(x)m 240 fnt4 981 621(\))m 1143(=)s 1356(2)s 220 fnt5 1059 336(...)m 1059 48(@EndAlignList)m grestore grestore gsave 0 0 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ A@E 0.2 cm 0 lfigpadd lfigprevious /FROM lfigpointdef 0.2 cm 0 B@W lfigpsub lfigprevious /TO lfigpointdef ] lfigdopath 0.15 cm /lfigsolid /lfigblack lfigopen 0.15 cm 0.05 cm lfigforward grestore grestore end end restore grestore grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 29 30 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic %%+ font Times-Bold %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5706 -1579(-)m 5834(29)s 6125(-)s 9066 13414 0 13305 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13251(The)m 220 fnt5 450 13248(@AlignList)m 240 fnt1 1579 13251(g)m 1(alle)k 3(y)k 2236(does)s 2749(not)s 3138(\210ush,)s 3734(because)s 4570(its)s 4868(\207rst)s 5322(component)s 6469(is)s 6702(connected)s 7753(to)s 8015(a)s 8204(recepti)s 6(v)k 3(e)k 0 12963(symbol)m 760(by)s 220 fnt5 1054 12960(/)m 240 fnt1 1178 12963(operators.)m 480 12589(After)m 1048(the)s 1402(last)s 1799(equation,)s 2736(an)s 3025(empty)s 3683(forcing)s 4432(g)s 1(alle)k 3(y)k 5072(is)s 5288(sent)s 5739(to)s 220 fnt5 5984 12586(@EndAlignList)m 240 fnt1 7420 12589(,)m 7533(deleting)s 8362(the)s 8716(tw)s 2(o)k 0 12301(remaining)m 1028(recepti)s 6(v)k 3(e)k 1957(symbols)s 2813(from)s 3344(the)s 220 fnt5 3699 12298(@AlignList)m 240 fnt1 4812 12301(g)m 1(alle)k 3(y)k 5452(and)s 5863(permitting)s 6918(it)s 7117(to)s 7363(\210ush.)s 240 fnt3 8000 12303(FOLLO)m 12(WS)k 240 fnt1 0 12013(inde)m 3(x)k 3(es)k 797(ensure)s 1499(that)s 1939(each)s 2456(equation)s 3359(\207nds)s 3898(a)s 4086(tar)s 4(get)k 4707(placed)s 5410(in)s 5675(the)s 6045(body)s 6601(te)s 3(xt)k 7038(just)s 7465(after)s 7983(its)s 8281(point)s 8855(of)s 0 11725(in)m 9(v)k 4(ocation,)k 1090(so)s 1341(the)s 1675(equations)s 2628(return,)s 3290(aligned,)s 4087(to)s 4311(approximately)s 5732(the)s 6065(points)s 6686(where)s 7312(the)s 3(y)k 7760(were)s 8265(in)s 9(v)k 4(ok)k 2(ed.)k 0 11437(Notice)m 703(that)s 1131(the)s 1489(\210ushing)s 2324(of)s 2605(body)s 3149(te)s 3(xt)k 3574(is)s 3794(suspended)s 4860(until)s 5363(the)s 5721(list)s 6082(of)s 6363(equations)s 7341(is)s 7561(completed,)s 8674(as)s 8934(it)s 0 11149(must)m 513(be,)s 833(since)s 1367(the)s 1702(horizontal)s 2713(position)s 3528(of)s 3786(the)s 4121(\207rst)s 4539(equation)s 5407(cannot)s 6092(be)s 6361(kno)s 6(wn)k 7052(until)s 7532(the)s 7867(last)s 8245(equation)s 0 10861(is)m 210(added)s 840(to)s 1079(the)s 1427(list.)s 480 10487(Layout)m 1262(quality)s 2025(can)s 2459(occasionally)s 3753(be)s 4080(impro)s 3(v)k 3(ed)k 5094(by)s 5433(rejecting)s 6366(a)s 6577(component)s 7746(that)s 8209(could)s 8844(be)s 0 10199(promoted)m 978(\211)s 1161(for)s 1502(e)s 3(xample,)k 2419(a)s 2588(component)s 3715(of)s 3989(body)s 4526(te)s 3(xt)k 4944(that)s 5365(carries)s 6054(a)s 6223(footnote)s 7079(too)s 7441(lar)s 4(ge)k 7973(to)s 8215(\207t)s 8477(on)s 8778(the)s 0 9911(current)m 747(page.)s 1374(Since)s 1972(Lout)s 2496(does)s 2997(not)s 3374(specify)s 4130(ho)s 6(w)k 4602(breaking)s 5503(decisions)s 6455(are)s 6814(made,)s 7450(be)s 3(yond)k 8222(the)s 8582(basic)s 0 9623(constraints)m 1089(imposed)s 1961(by)s 2258(a)s 4(v)k 6(ailable)k 3169(space)s 3759(and)s 220 fnt5 4166 9620(into)m 240 fnt1 4575 9623(clauses,)m 5375(in)s 5621(principle)s 6529(such)s 7028(high)s 7514(quality)s 8236(breaking)s 0 9335(could)m 592(be)s 877(added)s 1510(to)s 1752(the)s 2102(implementation)s 3662(with)s 4147(no)s 4443(change)s 5180(to)s 5421(the)s 5772(language.)s 6803(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 7766(the)s 8117(generality)s 0 9047(of)m 280(the)s 637(g)s 1(alle)k 3(y)k 1280(\210ushing)s 2115(algorithm,)s 3160(and)s 3573(its)s 3859(already)s 4625(considerable)s 5898(comple)s 3(xity)k 15(,)k 7073(mak)s 2(e)k 7654(this)s 8059(a)s 8235(daunting)s 0 8759(problem)m 890(in)s 1167(practice,)s 2062(although)s 2991(a)s 3190(f)s 2(ascinating)k 4323(one.)s 4866(T)s 5008 8711(E)m 5151 8759(X)m 5414([9],)s 5832(with)s 6348(its)s 6657(unnested)s 7600(set)s 7958(of)s 8263(`\210oating)s 0 8471(insertions')m 1041(clearly)s 1744(identi\207able)s 2875(as)s 3125(each)s 3620(page)s 4128(is)s 4338(be)s 3(gun,)k 5028(has)s 5398(the)s 5746(adv)s 6(antage)k 6766(in)s 7009(this)s 7405(respect.)s 240 fnt2 0 7822(5.3.)m 471(Size)s 938(constraints)s 2120(and)s 2561(size)s 2988(adjustments)s [ /Dest /LOUTconstraints /DEST pdfmark 240 fnt1 480 7346(The)m 893(g)s 1(alle)k 3(y)k 1512(\210ushing)s 2321(algorithm)s 3295(needs)s 3876(to)s 4099(kno)s 6(w)k 4665(the)s 4998(a)s 4(v)k 6(ailable)k 5890(width)s 6477(and)s 6866(height)s 7508(at)s 7725(each)s 8204(recepti)s 6(v)k 3(e)k 0 7058(symbol.)m 869(These)s 1496(symbols)s 2346(may)s 2812(lie)s 3106(within)s 3775(arbitrarily)s 4782(comple)s 3(x)k 5659(objects,)s 6443(and)s 6847(the)s 3(y)k 7311(may)s 7777(compete)s 8644(with)s 0 6770(each)m 492(other)s 1040(for)s 1375(a)s 4(v)k 6(ailable)k 2280(space)s 2864(\(as)s 3189(body)s 3720(te)s 3(xt)k 4132(and)s 4533(footnote)s 5383(tar)s 4(gets)k 6062(do\),)s 6485(so)s 6748(this)s 7141(information)s 8323(must)s 8844(be)s 0 6482(e)m 3(xtracted)k 930(from)s 1454(the)s 1802(tree)s 2215(structure)s 3106(when)s 3682(required.)s 480 6108(F)m 3(or)k 869(e)s 3(xample,)k 1783(consider)s 2653(the)s 3001(object)s 220 fnt5 480 5607(5i @Wide { a / b })m 240 fnt1 0 5113(and)m 406(suppose)s 1236(that)s 1656(the)s 2006(width)s 2610(of)s 220 fnt5 2883 5110(a)m 240 fnt1 3062 5113(is)m 240 fnt4 3274 5107(1)m 240 fnt3 3382 5115(i)m 240 fnt4 3459 5107(,)m 3572(2)s 240 fnt3 3700 5115(i)m 240 fnt1 3825 5113(\()m 240 fnt4 3898 5107(1)m 240 fnt3 4006 5115(i)m 240 fnt1 4131 5113(to)m 4372(the)s 4722(left)s 5101(of)s 5374(the)s 5724(mark,)s 240 fnt4 6324 5107(2)m 240 fnt3 6452 5115(i)m 240 fnt1 6577 5113(to)m 6818(the)s 7168(right\).)s 7864(What)s 8444(then)s 8916(is)s 0 4825(the)m 348(a)s 4(v)k 6(ailable)k 1256(width)s 1858(at)s 220 fnt5 2090 4822(b)m 240 fnt1 2204 4825(?)m 2423(If)s 2653(we)s 2988(let)s 3286(the)s 3634(width)s 4236(of)s 220 fnt5 4507 4822(b)m 240 fnt1 4681 4825(be)m 240 fnt3 4963 4827(l)m 240 fnt4 5041 4819(,)m 240 fnt3 5148 4827(r)m 240 fnt1 5246 4825(,)m 5353(we)s 5688(must)s 6213(ha)s 4(v)k 3(e)k 240 fnt4 480 4277(\()m 564(1)s 240 fnt3 670 4285(i)m 240 fnt4 817 4277(\255)m 240 fnt3 1038 4285(l)m 240 fnt4 1116 4277(\))m 1254(+)s 1455(\()s 1539(2)s 240 fnt3 1665 4285(i)m 240 fnt4 1812 4277(\255)m 240 fnt3 2033 4285(r)m 240 fnt4 2143 4277(\))m 2293(\243)s 2503(5)s 240 fnt3 2622 4285(i)m 240 fnt1 0 3732(with)m 482(the)s 240 fnt4 842 3726(\255)m 240 fnt1 1051 3732(\(i.e.)m 1466(max\))s 2006(operations)s 3053(arising)s 3756(from)s 4280(mark)s 4832(alignment.)s 5952(Eliminating)s 7133(them)s 7671(gi)s 6(v)k 3(es)k 240 fnt4 480 3180(1)m 240 fnt3 586 3188(i)m 240 fnt4 721 3180(+)m 922(2)s 240 fnt3 1048 3188(i)m 240 fnt4 1207 3180(\243)m 1417(5)s 240 fnt3 1536 3188(i)m 583 2893(l)m 240 fnt4 721 2885(+)m 922(2)s 240 fnt3 1048 2893(i)m 240 fnt4 1207 2885(\243)m 1417(5)s 240 fnt3 1536 2893(i)m 240 fnt4 571 2597(1)m 240 fnt3 677 2605(i)m 240 fnt4 812 2597(+)m 240 fnt3 1013 2605(r)m 240 fnt4 1207 2597(\243)m 1417(5)s 240 fnt3 1536 2605(i)m 674 2310(l)m 240 fnt4 812 2302(+)m 240 fnt3 1013 2310(r)m 240 fnt4 1207 2302(\243)m 1417(5)s 240 fnt3 1536 2310(i)m 240 fnt1 0 1799(and)m 428(since)s 1000(we)s 1359(assume)s 2144(that)s 220 fnt5 2587 1796(a)m 240 fnt1 2788 1799(\207ts)m 3156(into)s 3606(the)s 3978(a)s 4(v)k 6(ailable)k 4911(space,)s 5573(the)s 5946(\207rst)s 6402(inequality)s 7436(may)s 7927(be)s 8234(dropped,)s 0 1511(lea)m 4(ving)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 30 31 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Symbol %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5704 -1579(-)m 5832(30)s 6127(-)s 9066 13416 0 12991 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 240 fnt3 851 13205(l)m 240 fnt4 1013 13197(\243)m 1223(3)s 240 fnt3 1340 13205(i)m 480 12910(l)m 240 fnt4 618 12902(+)m 240 fnt3 819 12910(r)m 240 fnt4 1013 12902(\243)m 1223(5)s 240 fnt3 1342 12910(i)m 819 12622(r)m 240 fnt4 1013 12614(\243)m 1223(4)s 240 fnt3 1348 12622(i)m 240 fnt1 0 12113(Object)m 220 fnt5 697 12110(b)m 240 fnt1 871 12113(may)m 1337(ha)s 4(v)k 3(e)k 1838(width)s 240 fnt3 2440 12115(l)m 240 fnt4 2518 12107(,)m 240 fnt3 2625 12115(r)m 240 fnt1 2783 12113(for)m 3121(an)s 3(y)k 240 fnt3 3518 12115(l)m 240 fnt1 3644 12113(and)m 240 fnt3 4048 12115(r)m 240 fnt1 4206 12113(satisfying)m 5188(these)s 5735(inequalities,)s 6943(and)s 7347(no)s 7640(others.)s 480 11739(Here)m 1000(is)s 1210(another)s 1987(e)s 3(xample:)k 220 fnt5 480 11238(5i @High { a /2ix b })m 240 fnt1 0 10737(Assuming)m 1024(that)s 220 fnt5 1442 10734(a)m 240 fnt1 1619 10737(has)m 1989(height)s 240 fnt4 2647 10731(1)m 240 fnt3 2753 10739(i)m 240 fnt4 2828 10731(,)m 2935(1)s 240 fnt3 3041 10739(i)m 240 fnt1 3104 10737(,)m 3211(the)s 3559(height)s 240 fnt3 4217 10739(l)m 240 fnt4 4295 10731(,)m 240 fnt3 4402 10739(r)m 240 fnt1 4560 10737(of)m 220 fnt5 4831 10734(b)m 240 fnt1 5005 10737(must)m 5530(satisfy)s 240 fnt4 480 10179(1)m 240 fnt3 586 10187(i)m 240 fnt4 721 10179(+)m 922(\()s 1006(\()s 1090(1)s 240 fnt3 1196 10187(i)m 240 fnt4 1331 10179(+)m 240 fnt3 1532 10187(l)m 240 fnt4 1610 10179(\))m 1760(\255)s 1981(2)s 240 fnt3 2107 10187(i)m 240 fnt4 2182 10179(\))m 2320(+)s 240 fnt3 2521 10187(r)m 240 fnt4 2703 10179(\243)m 2913(5)s 240 fnt3 3032 10187(i)m 240 fnt1 0 9634(This)m 478(time)s 960(the)s 240 fnt4 1325 9628(\255)m 240 fnt1 1539 9634(operation)m 2501(arises)s 3098(from)s 3624(the)s 3975(mark-to-mark)s 5364(g)s 1(ap)k 5765(mode,)s 6406(which)s 7050(will)s 7479(widen)s 8123(the)s 240 fnt4 8474 9628(2)m 240 fnt3 8602 9636(i)m 240 fnt1 8728 9634(g)m 1(ap)k 0 9346(if)m 217(necessary)s 1200(to)s 1439(pre)s 6(v)k 3(ent)k 220 fnt5 2207 9343(a)m 240 fnt1 2384 9346(and)m 220 fnt5 2788 9343(b)m 240 fnt1 2962 9346(from)m 3486(o)s 3(v)k 3(erlapping.)k 4787(This)s 5263(inequality)s 6273(can)s 6662(be)s 6944(re)s 6(written)k 7856(as)s 240 fnt3 851 8795(l)m 240 fnt4 1013 8787(\243)m 288 fnt4 1223 8775(\245)m 240 fnt3 480 8504(l)m 240 fnt4 618 8496(+)m 240 fnt3 819 8504(r)m 240 fnt4 1013 8496(\243)m 1223(3)s 240 fnt3 1340 8504(i)m 819 8216(r)m 240 fnt4 1013 8208(\243)m 1223(2)s 240 fnt3 1349 8216(i)m 240 fnt1 0 7709(In)m 263(general,)s 1080(Lout)s 1599(is)s 1816(designed)s 2732(so)s 3005(that)s 3430(the)s 3785(a)s 4(v)k 6(ailable)k 4700(width)s 5309(or)s 5575(height)s 6240(at)s 6479(an)s 3(y)k 6883(point)s 7442(can)s 7838(be)s 8128(e)s 3(xpressed)k 0 7421(by)m 294(three)s 827(inequalities)s 1979(of)s 2250(the)s 2598(form)s 240 fnt3 851 6870(l)m 240 fnt4 1013 6862(\243)m 240 fnt3 1223 6870(x)m 480 6579(l)m 240 fnt4 618 6571(+)m 240 fnt3 819 6579(r)m 240 fnt4 1013 6571(\243)m 240 fnt3 1223 6579(y)m 819 6264(r)m 240 fnt4 1013 6256(\243)m 240 fnt3 1223 6264(z)m 240 fnt1 0 5743(where)m 240 fnt3 641 5745(x)m 240 fnt1 747 5743(,)m 240 fnt3 855 5745(y)m 240 fnt1 1018 5743(and)m 240 fnt3 1423 5745(z)m 240 fnt1 1575 5743(may)m 2042(be)s 288 fnt4 2325 5725(\245)m 240 fnt1 2523 5743(.)m 2688(W)s 19(e)k 3058(abbre)s 6(viate)k 4104(these)s 4652(three)s 5186(inequalities)s 6339(to)s 240 fnt3 6579 5745(l)m 240 fnt4 6658 5737(,)m 240 fnt3 6768 5745(r)m 240 fnt4 6953 5737(\243)m 240 fnt3 7166 5745(x)m 240 fnt4 7285 5737(,)m 240 fnt3 7395 5745(y)m 240 fnt4 7510 5737(,)m 240 fnt3 7620 5745(z)m 240 fnt1 7711 5743(,)m 7819(and)s 8224(we)s 8560(call)s 240 fnt3 8960 5745(x)m 240 fnt4 0 5449(,)m 240 fnt3 107 5457(y)m 240 fnt4 221 5449(,)m 240 fnt3 328 5457(z)m 240 fnt1 479 5455(a)m 240 fnt3 645 5457(size)m 1056(constr)s 3(aint)k 240 fnt1 2027 5455(.)m 480 5081(The)m 920(tw)s 2(o)k 1343(e)s 3(xamples)k 2307(abo)s 3(v)k 3(e)k 2942(sho)s 6(wed)k 3739(ho)s 6(w)k 4213(to)s 4465(propag)s 1(ate)k 5475(the)s 5836(size)s 6276(constraint)s 288 fnt4 7291 5063(\245)m 240 fnt4 7514 5075(,)m 7659(5)s 240 fnt3 7791 5083(i)m 240 fnt4 7879 5075(,)m 288 fnt4 8025 5063(\245)m 240 fnt1 8296 5081(for)m 220 fnt5 8647 5078(a / b)m 240 fnt1 0 4793(do)m 6(wn)k 586(one)s 991(le)s 6(v)k 3(el)k 1504(to)s 1746(the)s 2097(child)s 220 fnt5 2636 4790(b)m 240 fnt1 2750 4793(.)m 2917(Basser)s 3617(Lout)s 4132(contains)s 4982(a)s 5151(complete)s 6086(set)s 6414(of)s 6688(general)s 7449(rules)s 7967(for)s 8308(all)s 8604(node)s 0 4505(types,)m 627(too)s 1002(complicated)s 2244(to)s 2499(gi)s 6(v)k 3(e)k 2974(here.)s 3565(Instead,)s 4378(we)s 4729(gi)s 6(v)k 3(e)k 5203(just)s 5624(one)s 6042(e)s 3(xample)k 6921(of)s 7208(ho)s 6(w)k 7685(these)s 8248(rules)s 8779(are)s 0 4217(deri)m 6(v)k 3(ed,)k 815(using)s 1387(the)s 1735(object)s 240 fnt3 480 3721(x)m 168 fnt4 586 3628(1)m 220 fnt5 772 3716(/)m 240 fnt3 956 3721(x)m 168 fnt4 1062 3628(2)m 220 fnt5 1262 3716(/)m 240 fnt3 1446 3721(.)m 1552(.)s 1658(.)s 220 fnt5 1812 3716(/)m 240 fnt3 1996 3721(x)m 168 fnt3 2102 3634(n)m 240 fnt1 0 3175(where)m 240 fnt3 640 3177(x)m 168 fnt3 746 3090(j)m 240 fnt1 852 3175(has)m 1222(width)s 240 fnt3 1824 3177(l)m 168 fnt3 1890 3090(j)m 240 fnt4 1948 3169(,)m 240 fnt3 2055 3177(r)m 168 fnt3 2127 3090(j)m 240 fnt1 2233 3175(for)m 2571(all)s 240 fnt3 2864 3177(j)m 240 fnt1 2930 3175(.)m 480 2801(Suppose)m 1345(the)s 1689(whole)s 2326(object)s 2966(has)s 3333(width)s 3931(constraint)s 240 fnt3 4929 2803(X)m 240 fnt4 5097 2795(,)m 240 fnt3 5204 2803(Y)m 240 fnt4 5367 2795(,)m 240 fnt3 5474 2803(Z)m 240 fnt1 5619 2801(,)m 5722(and)s 6123(we)s 6454(require)s 7182(the)s 7526(width)s 8124(constraint)s 0 2513(of)m 240 fnt3 271 2515(x)m 168 fnt3 377 2428(i)m 240 fnt1 421 2513(.)m 586(Let)s 240 fnt3 965 2515(L)m 240 fnt4 1185 2507(=)m 240 fnt1 1401 2513(max)m 168 fnt3 1808 2428(j)m 240 fnt3 1917 2515(l)m 168 fnt3 1983 2428(j)m 240 fnt1 2090 2513(and)m 240 fnt3 2495 2515(R)m 240 fnt4 2723 2507(=)m 240 fnt1 2939 2513(max)m 168 fnt3 3346 2428(j)m 240 fnt3 3455 2515(r)m 168 fnt3 3527 2428(j)m 240 fnt1 3573 2513(,)m 3681(so)s 3948(that)s 240 fnt3 4367 2515(L)m 240 fnt4 4512 2507(,)m 240 fnt3 4619 2515(R)m 240 fnt1 4821 2513(is)m 5032(the)s 5381(width)s 5984(of)s 6256(the)s 6605(whole)s 7247(object.)s 7996(W)s 19(e)k 8366(assume)s 240 fnt3 0 2202(L)m 240 fnt4 145 2194(,)m 240 fnt3 252 2202(R)m 240 fnt4 477 2194(\243)m 240 fnt3 687 2202(X)m 240 fnt4 855 2194(,)m 240 fnt3 962 2202(Y)m 240 fnt4 1125 2194(,)m 240 fnt3 1232 2202(Z)m 240 fnt1 1377 2200(.)m 1541(Then)s 240 fnt3 2090 2202(x)m 168 fnt3 2196 2115(i)m 240 fnt1 2300 2200(can)m 2689(be)s 2971(enlar)s 4(ged)k 3848(to)s 4087(an)s 3(y)k 4484(size)s 240 fnt3 4911 2202(l)m 168 fnt3 4977 2115(i)m 240 fnt4 5081 2194(,)m 240 fnt3 5188 2202(r)m 168 fnt3 5260 2115(i)m 240 fnt1 5364 2200(satisfying)m 240 fnt4 480 1607(\()m 240 fnt3 564 1615(l)m 168 fnt3 630 1528(i)m 240 fnt4 758 1607(\255)m 240 fnt3 979 1615(L)m 240 fnt4 1124 1607(\))m 1202(,)s 1309(\()s 240 fnt3 1393 1615(r)m 168 fnt3 1465 1528(i)m 240 fnt4 1593 1607(\255)m 240 fnt3 1814 1615(R)m 240 fnt4 1967 1607(\))m 2117(\243)s 240 fnt3 2327 1615(X)m 240 fnt4 2495 1607(,)m 240 fnt3 2602 1615(Y)m 240 fnt4 2765 1607(,)m 240 fnt3 2872 1615(Z)m grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 31 32 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Symbol %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5714 -1579(-)m 5842(31)s 6117(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13253(which)m 642(e)s 3(xpands)k 1475(to)s 1714(eight)s 2252(inequalities:)s 240 fnt3 917 12702(l)m 168 fnt3 983 12615(i)m 240 fnt4 1123 12694(\243)m 240 fnt3 1333 12702(X)m 894 12338(L)m 240 fnt4 1123 12330(\243)m 240 fnt3 1333 12338(X)m 528 12047(l)m 168 fnt3 594 11960(i)m 240 fnt4 710 12039(+)m 240 fnt3 911 12047(r)m 168 fnt3 983 11960(i)m 240 fnt4 1123 12039(\243)m 240 fnt3 1333 12047(Y)m 503 11675(l)m 168 fnt3 569 11588(i)m 240 fnt4 685 11667(+)m 240 fnt3 886 11675(R)m 240 fnt4 1123 11667(\243)m 240 fnt3 1333 11675(Y)m 505 11311(L)m 240 fnt4 710 11303(+)m 240 fnt3 911 11311(r)m 168 fnt3 983 11224(i)m 240 fnt4 1123 11303(\243)m 240 fnt3 1333 11311(Y)m 480 10947(L)m 240 fnt4 685 10939(+)m 240 fnt3 886 10947(R)m 240 fnt4 1123 10939(\243)m 240 fnt3 1333 10947(Y)m 911 10664(r)m 168 fnt3 983 10577(i)m 240 fnt4 1123 10656(\243)m 240 fnt3 1333 10664(Z)m 886 10300(R)m 240 fnt4 1123 10292(\243)m 240 fnt3 1333 10300(Z)m 240 fnt1 0 9793(Three)m 613(are)s 960(already)s 1717(kno)s 6(wn,)k 2471(and)s 2875(slightly)s 3646(rearranging)s 4800(the)s 5148(others)s 5783(gi)s 6(v)k 3(es)k 240 fnt3 869 9242(l)m 168 fnt3 935 9155(i)m 240 fnt4 1075 9234(\243)m 240 fnt3 1285 9242(X)m 869 8870(l)m 168 fnt3 935 8783(i)m 240 fnt4 1075 8862(\243)m 240 fnt3 1285 8870(Y)m 240 fnt4 1508 8862(-)m 240 fnt3 1708 8870(R)m 480 8498(l)m 168 fnt3 546 8411(i)m 240 fnt4 662 8490(+)m 240 fnt3 863 8498(r)m 168 fnt3 935 8411(i)m 240 fnt4 1075 8490(\243)m 240 fnt3 1285 8498(Y)m 863 8134(r)m 168 fnt3 935 8047(i)m 240 fnt4 1075 8126(\243)m 240 fnt3 1285 8134(Z)m 863 7770(r)m 168 fnt3 935 7683(i)m 240 fnt4 1075 7762(\243)m 240 fnt3 1285 7770(Y)m 240 fnt4 1508 7762(-)m 240 fnt3 1708 7770(L)m 240 fnt1 0 7182(Therefore)m 997(the)s 1345(width)s 1947(constraint)s 2949(of)s 240 fnt3 3220 7184(x)m 168 fnt3 3326 7097(i)m 240 fnt1 3430 7182(is)m 480 6644(min)m 240 fnt4 861 6638(\()m 240 fnt3 945 6646(X)m 240 fnt4 1113 6638(,)m 240 fnt3 1220 6646(Y)m 240 fnt4 1443 6638(-)m 240 fnt3 1643 6646(R)m 240 fnt4 1796 6638(\))m 1874(,)s 240 fnt3 1981 6646(Y)m 240 fnt4 2144 6638(,)m 240 fnt1 2251 6644(min)m 240 fnt4 2632 6638(\()m 240 fnt3 2716 6646(Z)m 240 fnt4 2873 6638(,)m 240 fnt3 2980 6646(Y)m 240 fnt4 3203 6638(-)m 240 fnt3 3403 6646(L)m 240 fnt4 3548 6638(\))m 240 fnt1 0 6142(The)m 445(size)s 890(constraint)s 1909(of)s 2198(an)s 3(y)k 2613(node)s 3152(can)s 3559(be)s 3858(found)s 4493(by)s 4805(climbing)s 5725(the)s 6091(tree)s 6521(to)s 6778(a)s 240 fnt3 6962 6144(WIDE)m 240 fnt1 7641 6142(or)m 240 fnt3 7918 6144(HIGH)m 240 fnt1 8604 6142(node)m 0 5854(where)m 636(the)s 980(constraint)s 1978(is)s 2184(tri)s 6(vial,)k 2850(then)s 3315(propag)s 1(ating)k 4506(it)s 4694(back)s 5203(do)s 6(wn)k 5783(to)s 6018(the)s 6362(node,)s 6931(and)s 7331(this)s 7723(is)s 7929(the)s 8272(function)s 0 5566(of)m 271(procedure)s 240 fnt3 1283 5568(Constr)m 3(ained)k 240 fnt1 2530 5566(in)m 2773(Basser)s 3470(Lout.)s 480 5192(After)m 1043(some)s 1604(components)s 2813(ha)s 4(v)k 3(e)k 3314(been)s 3824(promoted)s 4799(into)s 5225(a)s 5391(tar)s 4(get,)k 6038(the)s 6386(sizes)s 6902(stored)s 7544(in)s 7788(its)s 8064(parent)s 8722(and)s 0 4904(higher)m 665(ancestors)s 1598(must)s 2117(be)s 2392(adjusted)s 3241(to)s 3473(re\210ect)s 4122(the)s 4464(increased)s 5417(size.)s 5946(This)s 6415(is)s 6618(done)s 7134(by)s 7421(yet)s 7767(another)s 8537(set)s 8855(of)s 0 4616(recursi)m 6(v)k 3(e)k 925(rules,)s 1500(upw)s 2(ard-mo)k 3(ving)k 3081(this)s 3481(time,)s 4016(which)s 4662(cease)s 5239(as)s 5492(soon)s 6006(as)s 6260(some)s 6825(ancestor')s 13(s)k 7835(size)s 8266(does)s 8760(not)s 0 4328(change.)m 830(These)s 1445(rules)s 1948(are)s 2283(embodied)s 3273(in)s 3504(procedure)s 240 fnt3 4504 4330(AdjustSize)m 240 fnt1 5541 4328(of)m 5800(Basser)s 6485(Lout.)s 7089(The)s 7505(adjustment)s 8601(must)s 0 4040(be)m 282(done)s 804(before)s 1470(relinquishing)s 2785(control)s 3517(to)s 3756(an)s 3(y)k 4153(other)s 4704(g)s 1(alle)k 3(y)k 15(,)k 5376(b)s 4(ut)k 5738(not)s 6104(after)s 6600(e)s 6(v)k 3(ery)k 7176(component.)s 240 fnt2 0 3391(5.4.)m 471(The)s 926(limited)s 1696(lookahead)s 2802(pr)s 4(oblem)k [ /Dest /LOUTlookahead /DEST pdfmark 240 fnt1 480 2914(Basser)m 1189(Lout)s 1714(assumes)s 2575(that)s 3006(there)s 3552(will)s 3991(be)s 4286(enough)s 5062(internal)s 5859(memory)s 6723(to)s 6975(hold)s 7472(the)s 7833(symbol)s 8606(table)s 0 2626(plus)m 461(a)s 638(fe)s 6(w)k 1055(pages,)s 1719(b)s 4(ut)k 2092(not)s 2469(an)s 2764(entire)s 3374(document.)s 4493(This)s 4980(section)s 5726(describes)s 6677(the)s 7036(consequent)s 8185(problems)s 0 2338(and)m 441(ho)s 6(w)k 940(the)s 3(y)k 1441(were)s 1999(solv)s 3(ed.)k 2763(Other)s 3405(interpreters,)s 4636(notably)s 5446(interacti)s 6(v)k 3(e)k 6538(editors)s 7277(running)s 8113(on)s 8448(virtual)s 0 2050(memory)m 851(systems,)s 1715(w)s 2(ould)k 2370(not)s 2736(necessarily)s 3851(need)s 4361(this)s 4757(assumption.)s 480 1676(Although)m 1434(Basser)s 2122(Lout)s 2625(can)s 3005(read)s 3466(and)s 3861(format)s 4548(an)s 3(y)k 4936(le)s 3(g)k 1(al)k 5442(input,)s 6033(its)s 6300(memory)s 7142(consumption)s 8427(will)s 8844(be)s 0 1388(optimized)m 1004(when)s 1570(the)s 1908(b)s 4(ulk)k 2381(of)s 2642(the)s 2980(document)s 3974(resides)s 4677(in)s 4910(g)s 1(alle)k 3(ys)k 5624(whose)s 6282(tar)s 4(gets)k 6955(can)s 7334(be)s 7606(identi\207ed)s 8557(at)s 8778(the)s 0 1100(moment)m 843(the)s 3(y)k 1304(are)s 1650(encountered.)s 2981(Let)s 3358(us)s 3620(tak)s 2(e)k 4071(the)s 4417(typical)s 5121(e)s 3(xample)k 5982(of)s 6252(a)s 6416(root)s 6860(g)s 1(alle)k 3(y)k 7492(which)s 8133(is)s 8341(a)s 8506(list)s 8855(of)s 0 812(pages,)m 652(a)s 220 fnt5 818 809(@BodyT)m 26(e)k 6(xt)k 240 fnt1 1991 812(g)m 1(alle)k 3(y)k 2625(tar)s 4(geted)k 3448(into)s 3872(the)s 4220(pages,)s 220 fnt5 4872 809(@Chapter)m 240 fnt1 5934 812(g)m 1(alle)k 3(ys)k 6658(tar)s 4(geted)k 7481(into)s 220 fnt5 7905 809(@BodyT)m 26(e)k 6(xt)k 240 fnt1 9019 812(,)m 0 524(and)m 220 fnt5 404 521(@Section)m 240 fnt1 1404 524(g)m 1(alle)k 3(ys)k 2128(tar)s 4(geted)k 2951(into)s 3376(the)s 220 fnt5 3724 521(@Chapter)m 240 fnt1 4787 524(g)m 1(alle)k 3(ys:)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 32 33 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1579(-)m 5833(32)s 6127(-)s 9066 13416 0 13312 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 220 fnt5 480 13255(@P)m 8(ageList)k 480 12967(//)m 480 12679(@BodyT)m 26(e)k 6(xt)k 480 12391(//)m 480 12103(@Chapter {)m 480 11815( @Section { ...)m 13( })k 480 11527( @Section { ...)m 13( })k 480 11239( ...)m 480 10951( @Section { ...)m 13( })k 480 10663(})m 480 10375(@Chapter {)m 480 10087( ...)m 480 9799(})m 240 fnt1 0 9305(Basser)m 702(Lout)s 1220(is)s 1436(able)s 1896(to)s 2141(read)s 2616(and)s 3026(process)s 3800(such)s 4302(g)s 1(alle)k 3(ys)k 5032(one)s 5440(paragraph)s 6459(at)s 6697(a)s 6869(time)s 7355(\(strictly)s 15(,)k 8194(from)s 8724(one)s 220 fnt5 0 9014(//)m 240 fnt1 185 9017(at)m 417(the)s 765(outer)s 1316(le)s 6(v)k 3(el)k 1826(of)s 2097(a)s 2263(g)s 1(alle)k 3(y)k 2897(to)s 3136(the)s 3484(ne)s 3(xt\),)k 4079(as)s 4329(we)s 4664(no)s 6(w)k 5125(describe.)s 480 8643(When)m 1147(the)s 1534(parser)s 2215(encounters)s 3341(the)s 3727(be)s 3(ginning)k 4774(of)s 5083(a)s 5288(g)s 1(alle)k 3(y)k 15(,)k 5998(lik)s 2(e)k 220 fnt5 6449 8640(@Chapter)m 240 fnt1 7550 8643(or)m 220 fnt5 7848 8640(@Section)m 240 fnt1 8788 8643(,)m 8934(it)s 0 8355(initiates)m 831(a)s 1023(ne)s 6(w)k 1495(g)s 1(alle)k 3(y)k 2155(process.)s 3061(The)s 3515(special)s 4258(recepti)s 6(v)k 3(e)k 5206(symbol)s 220 fnt5 5991 8352(@Input)m 240 fnt1 6784 8355(is)m 7019(substituted)s 8139(for)s 8502(the)s 8876(as)s 0 8067(yet)m 357(unread)s 1071(right)s 1588(parameter)s 2607(of)s 2884(the)s 3237(g)s 1(alle)k 3(y)k 15(.)k 3972(As)s 4294(each)s 4795(paragraph)s 5813(of)s 6090(the)s 6443(right)s 6960(parameter)s 7979(is)s 8195(read,)s 8718(it)s 8916(is)s 0 7779(deleted)m 763(from)s 1302(the)s 1665(parse)s 2240(tree)s 2668(and)s 3087(injected)s 3916(into)s 4356(the)s 4719(g)s 1(alle)k 3(y')k 13(s)k 220 fnt5 5524 7776(@Input)m 240 fnt1 6231 7779(.)m 6410(The)s 6853(g)s 1(alle)k 3(y)k 7502(is)s 7727(then)s 8212(resumed.)s 0 7491(The)m 429(parser)s 1074(thus)s 1526(acts)s 1950(as)s 2202(an)s 2487(e)s 3(xtra)k 3022(concurrent)s 4106(process;)s 4937(it)s 5131(has)s 5503(lo)s 6(w)k 5912(priority)s 15(,)k 6721(so)s 6989(that)s 7409(input)s 7963(is)s 8175(read)s 8646(only)s 0 7203(when)m 597(there)s 1151(is)s 1382(nothing)s 2188(else)s 2636(to)s 2897(do.)s 3322(Since)s 3930(g)s 1(alle)k 3(ys)k 4675(may)s 5162(be)s 5465(nested,)s 6205(a)s 6392(stack)s 6965(of)s 220 fnt5 7257 7200(@Input)m 240 fnt1 8045 7203(symbols)m 8916(is)s 0 6915(needed,)m 781(each)s 1271(with)s 1749(its)s 2020(o)s 6(wn)k 2480(en)s 9(vironment)k 3735(and)s 4135(style.)s 4745(If)s 4971(a)s 5132(g)s 1(alle)k 3(y)k 5762(is)s 5967(encountered)s 7190(for)s 7523(which)s 8161(a)s 8322(tar)s 4(get)k 8916(is)s 0 6627(not)m 370(immediately)s 1622(identi\207able)s 2757(\(a)s 3006(footnote,)s 3914(for)s 4257(e)s 3(xample\),)k 5254(it)s 5450(is)s 5664(read)s 6137(in)s 6385(its)s 6665(entirety)s 7452(and)s 7860(hung)s 8397(in)s 8645(pure)s 0 6339(parse)m 551(tree)s 954(form)s 1468(from)s 1983(an)s 240 fnt3 2256 6341(UN)m 6(A)k 8(TT)k 12(A)k 7(CHED)k 240 fnt1 3811 6339(inde)m 3(x)k 4386(in)s 4619(the)s 4957(usual)s 5508(w)s 2(ay)k 15(,)k 5987(with)s 6459(an)s 6733(en)s 9(vironment)k 7983(b)s 4(ut)k 8335(without)s 0 6051(a)m 166(style.)s 781(It)s 986(will)s 1412(be)s 1694(\210ushed)s 2444(later)s 2927(when)s 3503(its)s 3779(component)s 4903(is)s 5113(promoted.)s 480 5677(In)m 735(addition)s 1575(to)s 1813(producing)s 2836(a)s 3001(steady)s 3665(\210o)s 6(w)k 4138(of)s 4407(components)s 5614(from)s 6137(input,)s 6735(we)s 7069(must)s 7593(also)s 8030(ensure)s 8708(that)s 0 5389(recepti)m 6(v)k 3(e)k 928(symbols)s 1783(do)s 2083(not)s 2455(unduly)s 3182(block)s 3781(their)s 4285(promotion.)s 5452(The)s 220 fnt5 5886 5386(@F)m 6(ootSect)k 240 fnt1 7044 5389(symbol)m 7810(at)s 8049(the)s 8403(foot)s 8855(of)s 0 5101(each)m 495(page)s 1003(is)s 1213(a)s 1379(typical)s 2084(e)s 3(xample:)k 3057(until)s 3550(it)s 3742(is)s 3952(deleted)s 4700(the)s 5048(page)s 5556(cannot)s 6254(be)s 6536(printed.)s 480 4727(Recepti)m 6(v)k 3(e)k 1501(symbols)s 2368(are)s 2733(e)s 3(xpanded)k 3724(only)s 4222(on)s 4537(demand,)s 5421(so)s 220 fnt5 5705 4724(@F)m 6(ootSect)k 240 fnt1 6874 4727(can)m 7281(be)s 7581(deleted)s 8347(as)s 8616(soon)s 0 4439(as)m 250(we)s 585(can)s 974(pro)s 3(v)k 3(e)k 1570(that)s 1988(it)s 2180(is)s 2390(not)s 2757(w)s 2(anted.)k 3610(The)s 4038(symbol)s 4799(table)s 5319(can)s 5708(tell)s 6067(us)s 6332(that)s 6750(only)s 220 fnt5 7230 4436(@F)m 6(ootNote)k 240 fnt1 8402 4439(g)m 1(alle)k 3(ys)k 0 4151(\(with)m 220 fnt5 555 4148(@F)m 6(ootPlace&&f)k 6(ollo)k 3(wing)k 240 fnt1 2935 4151(tar)m 4(gets\))k 3688(w)s 2(ant)k 4205(it,)s 4438(so)s 4697(it)s 4883(might)s 5494(be)s 5770(possible)s 6604(to)s 6836(deduce)s 7564(that)s 220 fnt5 7975 4148(@F)m 6(ootSect)k 240 fnt1 0 3863(may)m 466(be)s 748(deleted)s 1496(as)s 1746(soon)s 2256(as)s 2506(body)s 3040(te)s 3(xt)k 3455(enters)s 4076(the)s 4424(follo)s 6(wing)k 5401(page.)s 480 3489(The)m 904(author)s 1571(w)s 2(as)k 1987(unable)s 2677(to)s 2912(mak)s 2(e)k 3479(this)s 3871(w)s 2(ork,)k 4463(so)s 4725(Basser)s 5418(Lout)s 5925(requires)s 6741(the)s 7085(user)s 7538(to)s 7773(identify)s 8565(those)s 0 3201(g)m 1(alle)k 3(ys)k 715(which)s 1348(will)s 1764(carry)s 2299(the)s 2637(b)s 4(ulk)k 3111(of)s 3372(the)s 3711(document)s 4705(\()s 220 fnt5 4778 3198(@Chapter)m 240 fnt1 5781 3201(,)m 220 fnt5 5879 3198(@Section)m 240 fnt1 6819 3201(,)m 220 fnt5 6916 3198(@BodyT)m 26(e)k 6(xt)k 240 fnt1 8030 3201(\))m 8149(as)s 240 fnt3 8389 3203(for)m 8(cing)k 0 2915(galle)m 7(ys)k 240 fnt1 665 2913(,)m 792(by)s 1107(writing)s 220 fnt5 1871 2910(f)m 6(orce into)k 240 fnt1 2841 2913(instead)m 3596(of)s 220 fnt5 3888 2910(into)m 240 fnt1 4315 2913(in)m 4579(their)s 5097(de\207nitions.)s 6291(As)s 6629(described)s 7624(in)s 7888(the)s 8257(pre)s 6(vious)k 0 2625(section,)m 790(when)s 1373(a)s 1546(forcing)s 2296(g)s 1(alle)k 3(y)k 2937(attaches)s 3763(to)s 4009(a)s 4182(tar)s 4(get,)k 4835(all)s 5135(recepti)s 6(v)k 3(e)k 6063(symbols)s 6919(preceding)s 7922(the)s 8277(tar)s 4(get)k 8883(in)s 0 2337(its)m 278(g)s 1(alle)k 3(y)k 914(are)s 1263(deleted,)s 2062(remo)s 3(ving)k 3031(all)s 3326(impediments)s 4614(to)s 4855(\210ushing.)s 5793(F)s 3(or)k 6184(e)s 3(xample,)k 7100(when)s 7678(a)s 7846(forcing)s 8592(body)s 0 2049(te)m 3(xt)k 421(g)s 1(alle)k 3(y)k 1062(enters)s 1690(a)s 1863(ne)s 6(w)k 2317(page,)s 2882(the)s 220 fnt5 3237 2046(@F)m 6(ootSect)k 240 fnt1 4395 2049(symbol)m 5162(on)s 5466(the)s 5820(preceding)s 6823(page)s 7338(will)s 7771(be)s 8060(deleted.)s 8921(It)s 0 1761(seems)m 629(lik)s 2(ely)k 1219(that)s 1631(a)s 1791(system)s 2509(which)s 3145(could)s 3729(af)s 6(ford)k 4358(to)s 4591(w)s 2(ait)k 5054(until)s 5541(all)s 5828(input)s 6374(w)s 2(as)k 6789(read)s 7252(before)s 7912(deleting)s 8729(an)s 3(y)k 0 1473(recepti)m 6(v)k 3(e)k 922(symbols)s 1771(w)s 2(ould)k 2426(not)s 2792(need)s 3302(forcing)s 4045(g)s 1(alle)k 3(ys.)k 480 1099(Galle)m 3(ys)k 1258(whose)s 1925(tar)s 4(gets)k 2607(are)s 2953(a)s 3118(long)s 3597(w)s 2(ay)k 4047(from)s 4570(their)s 5066(in)s 9(v)k 4(ocation)k 6119(points)s 6755(can)s 7143(be)s 7424(a)s 7589(problem.)s 8549(If)s 8778(the)s 0 811(direction)m 917(is)s 220 fnt5 1139 808(f)m 6(ollo)k 3(wing)k 240 fnt1 1969 811(,)m 2087(such)s 2595(g)s 1(alle)k 3(ys)k 3330(are)s 3689(held)s 4170(in)s 4425(internal)s 5221(memory)s 6083(for)s 6433(a)s 6610(long)s 7101(time,)s 7643(unless)s 8304(the)s 3(y)k 8779(are)s 0 523(to)m 248(be)s 539(sorted.)s 1296(If)s 1535(the)s 1892(direction)s 2807(is)s 220 fnt5 3026 520(preceding)m 240 fnt1 3977 523(,)m 4093(then)s 4571(either)s 5183(the)s 5540(entire)s 6148(interv)s 3(ening)k 7296(document)s 8309(must)s 8844(be)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 33 34 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5710 -1579(-)m 5838(33)s 6122(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13253(held)m 466(in)s 704(memory)s 1551(\(pre)s 6(v)k 3(ented)k 2617(by)s 2907(the)s 3250(tar)s 4(get)k 3844(from)s 4364(\210ushing\),)s 5317(or)s 5572(else)s 5994(some)s 6551(forcing)s 7289(g)s 1(alle)k 3(y)k 7918(prematurely)s 0 12965(deletes)m 714(the)s 1062(tar)s 4(get,)k 1708(lea)s 4(ving)k 2461(the)s 2809(g)s 1(alle)k 3(y)k 3443(bereft.)s 480 12591(The)m 929(typical)s 1655(e)s 3(xample)k 2539(of)s 2832(the)s 3201(latter)s 3771(case)s 4260(occurs)s 4956(when)s 5553(the)s 5922(g)s 1(alle)k 3(y)k 6578(is)s 6809(an)s 7113(entry)s 7680(in)s 7944(the)s 8313(table)s 8855(of)s 0 12303(contents,)m 907(launched)s 1832(backw)s 2(ards)k 2907(from)s 3435(the)s 3786(be)s 3(ginning)k 4797(of)s 5071(a)s 5241(chapter)s 6007(or)s 6269(section.)s 7113(Its)s 7406(tar)s 4(get)k 8008(in)s 8254(the)s 8606(table)s 0 12015(of)m 286(contents)s 1150(will)s 1592(ha)s 4(v)k 3(e)k 2108(been)s 2633(deleted)s 3397(long)s 3891(before,)s 4624(to)s 4879(permit)s 5578(the)s 5941(rest)s 6361(of)s 6648(the)s 7011(document)s 8031(to)s 8286(print,)s 8860(so)s 0 11727(the)m 349(g)s 1(alle)k 3(y)k 985(ultimately)s 2009(emer)s 4(ges)k 2854(as)s 3106(an)s 3391(unattached)s 4487(g)s 1(alle)k 3(y)k 5122(promoted)s 6099(out)s 6467(of)s 6740(the)s 7090(root)s 7537(g)s 1(alle)k 3(y)k 15(.)k 8268(All)s 8630(such)s 0 11439(g)m 1(alle)k 3(ys)k 717(are)s 1056(written)s 1781(to)s 2013(an)s 2288(auxiliary)s 3183(\207le,)s 3588(inde)s 3(x)k 3(ed)k 4390(by)s 4676(the)s 5016(missing)s 5806(tar)s 4(get.)k 6501(On)s 6843(the)s 7184(ne)s 3(xt)k 7645(run,)s 8063(just)s 8460(before)s 0 11151(that)m 418(tar)s 4(get)k 1017(is)s 1227(deleted,)s 2024(the)s 2372(auxiliary)s 3275(\207le)s 3636(is)s 3846(check)s 2(ed)k 4686(and)s 5090(an)s 3(y)k 5487(g)s 1(alle)k 3(ys)k 6211(for)s 6549(it)s 6741(are)s 7088(read)s 7557(in)s 7800(and)s 8204(\210ushed.)s 240 fnt2 0 10502(5.5.)m 471(Horizontal)s 1628(galleys)s [ /Dest /LOUThorizontal /DEST pdfmark 240 fnt1 480 10025(There)m 1108(is)s 1333(a)s 1514(strong)s 2180(analogy)s 3007(between)s 3876(breaking)s 4781(a)s 4962(column)s 5752(of)s 6038(te)s 3(xt)k 6468(into)s 6908(page-sized)s 8003(pieces,)s 8722(and)s 0 9737(breaking)m 912(a)s 1101(paragraph)s 2137(into)s 2585(line-sized)s 3594(pieces.)s 4378(In)s 4657(f)s 2(act,)k 5142(the)s 5513(tw)s 2(o)k 5946(dif)s 6(fer)k 6552(only)s 7055(in)s 7321(direction:)s 8359(v)s 3(ertical)k 0 9449(for)m 343(body)s 883(te)s 3(xt,)k 1351(horizontal)s 2381(for)s 2724(paragraphs.)s 3943(In)s 4205(this)s 4607(section)s 5347(we)s 5687(de\207ne)s 240 fnt3 6334 9451(horizontal)m 7384(galle)s 7(ys)k 240 fnt1 8049 9449(,)m 8162(and)s 8572(sho)s 6(w)k 0 9161(ho)m 6(w)k 493(the)s 3(y)k 989(pro)s 3(vide)k 1806(an)s 2122(unlimited)s 3129(number)s 3953(of)s 4257(paragraph)s 5302(breaking)s 6225(styles,)s 6909(as)s 7192(well)s 7691(as)s 7974(solv)s 3(e)k 8565(some)s 0 8873(other)m 587(problems.)s 1677(Re)s 3(grettably)k 15(,)k 2917(lack)s 3412(of)s 3719(time)s 4235(has)s 4641(pre)s 6(v)k 3(ented)k 5669(their)s 6202(incorporation)s 7583(into)s 8044(the)s 8429(Basser)s 0 8585(Lout)m 512(interpreter)s 13(.)k 480 8211(Imagine)m 1337(a)s 1521(g)s 1(alle)k 3(y)k 2173(whose)s 2859(components)s 4085(are)s 4450(separated)s 5428(by)s 5740(horizontal)s 6782(concatenation)s 8186(operators)s 0 7923(instead)m 725(of)s 986(v)s 3(ertical)k 1742(ones,)s 2278(perhaps)s 3062(indicated)s 3986(by)s 4269(a)s 220 fnt5 4425 7920(hor)m -3(iz)k 3(ontally)k 5582(into)s 240 fnt1 5977 7923(clause.)m 6728(Then)s 7266(all)s 7549(object)s 8182(breaking,)s 0 7635(including)m 957(paragraph)s 1970(breaking,)s 2914(could)s 3504(be)s 3786(replaced)s 4653(by)s 4947(g)s 1(alle)k 3(y)k 5581(component)s 6705(promotion)s 7759(lik)s 2(e)k 8171(this:)s 220 fnt5 480 7134(def @P)m 8(ar)k 2(ag)k 2(r)k 2(aph r)k -3(ight x)k 480 6846({)m 480 6558( def @LinePlace { @Galle)m 4(y })k 480 5982( def @LineList)m 480 5694( {)m 480 5406( @HExpand @LinePlace)m 480 5118( //1vx @LineList)m 480 4830( })m 480 4254( def @P)m 8(ar hor)k -3(iz)k 3(ontally into { @LinePlace&&preceding })k 480 3966( r)m -3(ight x)k 480 3678( { x })m 480 3102( @LineList // @P)m 8(ar { 0.2i @Wide {} &0i x &1r)k -8(t })k 480 2814(})m 240 fnt1 0 2320(The)m 220 fnt5 431 2317(@HExpand)m 240 fnt1 1607 2320(operator)m 9(,)k 2504(which)s 3149(is)s 3362(a)s 3531(primiti)s 6(v)k 3(e)k 4456(of)s 4730(Basser)s 5430(Lout,)s 5992(horizontally)s 7204(e)s 3(xpands)k 8040(the)s 8391(g)s 1(aps)k 8883(in)s 0 2032(its)m 290(right)s 816(parameter)s 1844(until)s 2352(the)s 2715(result)s 3319(\207lls)s 3743(the)s 4105(a)s 4(v)k 6(ailable)k 5028(space,)s 5681(thus)s 6145(implementing)s 7541(line)s 7970(adjustment,)s 0 1744(e)m 3(xcept)k 689(when)s 1274(the)s 1631(parameter)s 2654(contains)s 3511(tab)s 4(ulation)k 4529(g)s 1(aps)k 5027(lik)s 2(e)k 220 fnt5 5447 1741(&1r)m -8(t)k 240 fnt1 5853 1744(,)m 5969(which)s 6620(cause)s 7216(the)s 7573(parameter)s 8596(to)s 8844(be)s 0 1456(already)m 757(e)s 3(xpanded.)k 1836(The)s 2264(result)s 2854(of)s 220 fnt5 480 955(@P)m 8(ar)k 2(ag)k 2(r)k 2(aph { A shor)k -8(t par)k 2(ag)k 2(r)k 2(aph of te)k 6(xt.)k 13( })k 240 fnt1 0 456(w)m 2(ould)k 655(then)s 1124(be)s 1406(something)s 2456(lik)s 2(e)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 34 35 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1579(-)m 5833(34)s 6127(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 768 13253(A)m 1073(short)s 1687(paragraph)s 480 12965(of)m 751(te)s 3(xt.)k 0 12512(depending)m 1061(on)s 1368(the)s 1726(a)s 4(v)k 6(ailable)k 2645(horizontal)s 3679(space.)s 4384(An)s 4744(unlimited)s 5729(range)s 6326(of)s 6607(paragraph)s 7630(breaking)s 8531(styles)s 0 12224(could)m 590(be)s 872(de\207ned,)s 1684(including)s 2641(ragged)s 3350(right,)s 3908(ragged)s 4617(left,)s 5041(break-and-center)s 9(,)k 6757(and)s 7161(so)s 7427(on.)s 480 11850(In)m 765(Basser)s 1492(Lout,)s 2081(indented)s 2992(paragraphs)s 4122(are)s 4499(produced)s 5477(by)s 5801(preceding)s 6827(them)s 7394(with)s 7906(a)s 8102(horizontal)s 0 11562(concatenation)m 1380(operator)s 9(,)k 2269(for)s 2602(e)s 3(xample)k 220 fnt5 3459 11559(|0.5i)m 240 fnt1 3855 11562(.)m 4014(This)s 4485(has)s 4849(the)s 5192(unfortunate)s 6345(ef)s 6(fect)k 6935(of)s 7201(making)s 7967(an)s 8244(indented)s 0 11274(paragraph)m 1007(into)s 1426(a)s 1586(single)s 2207(component)s 3325(of)s 3590(the)s 3932(enclosing)s 4895(g)s 1(alle)k 3(y)k 15(,)k 5561(so)s 5821(that)s 6233(it)s 6419(will)s 6839(al)s 2(w)k 2(ays)k 7544(be)s 7820(k)s 2(ept)k 8283(together)s 0 10986(on)m 297(one)s 699(page.)s 1315(Horizontal)s 2392(g)s 1(alle)k 3(ys)k 3116(solv)s 3(e)k 3674(this)s 4070(problem)s 4927(with)s 5409(a)s 5575(simple)s 6268(change)s 7002(to)s 220 fnt5 7241 10983(@LineList)m 240 fnt1 8215 10986(:)m 220 fnt5 480 10485(def @LineList)m 480 10197({)m 480 9909( |0.5i @HExpand @LinePlace)m 480 9621( //1vx @LineList)m 480 9333(})m 240 fnt1 0 8839(sho)m 6(wing)k 860(the)s 1210(\210e)s 3(xibility)k 2192(that)s 2611(comes)s 3275(from)s 3801(bringing)s 4666(the)s 5016(full)s 5404(po)s 6(wer)k 6057(of)s 6330(the)s 6680(Lout)s 7193(language)s 8115(to)s 8356(bear)s 8829(on)s 0 8551(paragraph)m 1013(layout.)s 1775(It)s 1980(is)s 2190(easy)s 2669(to)s 2908(mak)s 2(e)k 3480(pro)s 3(vision)k 4438(for)s 4776(a)s 4942(tag)s 5287(on)s 5584(the)s 5932(\207rst)s 6363(line.)s 480 8177(Although)m 1451(Basser)s 2158(Lout)s 2679(permits)s 3456(recepti)s 6(v)k 3(e)k 4387(symbols)s 5246(within)s 5923(paragraphs,)s 7089(the)s 3(y)k 7561(are)s 7918(of)s 8198(little)s 8700(use,)s 0 7889(because)m 835(their)s 1355(a)s 4(v)k 6(ailable)k 2286(width)s 2911(is)s 3144(calculated)s 4193(after)s 4711(paragraph)s 5747(breaking,)s 6714(and)s 7141(the)s 7512(incoming)s 8492(g)s 1(alle)k 3(y)k 0 7601(cannot)m 736(spread)s 1456(o)s 3(v)k 3(er)k 1973(more)s 2558(than)s 3065(one)s 3505(line.)s 4066(W)s 9(ith)k 4630(horizontal)s 5692(g)s 1(alle)k 3(ys,)k 6510(such)s 7044(symbols)s 7931(w)s 2(ould)k 8625(ha)s 4(v)k 3(e)k 0 7313(in\207nite)m 733(a)s 4(v)k 6(ailable)k 1641(width,)s 2293(and)s 2697(we)s 3032(could)s 3622(easily)s 4233(produce)s 5060(a)s 5226(\207lled)s 5775(paragraph)s 6788(of)s 7059(footnotes)s 8000(lik)s 2(e)k 8412(this:)s 200 fnt1 480 6838(1)m 240 fnt1 559 6743(See)m 987(Jones)s 1597(and)s 2028(Saunders)s 2983(\(1982\).)s 200 fnt1 3932 6838(2)m 240 fnt1 4027 6743(Or)m 4366(so)s 4659(Jacobsen)s 480 6443(\(1973\))m 1167(asserts.)s 200 fnt1 2087 6538(3)m 240 fnt3 2174 6445(ibid)m 240 fnt1 2552 6443(,)m 2659(p.)s 2883(327.)s 0 5940(based)m 603(on)s 900(an)s 1183(in\207nite)s 1916(horizontal)s 2940(sequence)s 3873(of)s 220 fnt5 4144 5937(@F)m 6(ootPlace)k 240 fnt1 5400 5940(symbols)m 6249(inside)s 6876(a)s 7042(horizontal)s 8066(g)s 1(alle)k 3(y)k 15(.)k 480 5566(When)m 1133(body)s 1692(te)s 3(xt)k 2132(is)s 2367(placed)s 3074(on)s 3395(pages,)s 4072(the)s 4445(length)s 5125(of)s 5421(each)s 5940(column)s 6740(v)s 6(aries)k 7380(depending)s 8456(on)s 8778(the)s 0 5278(a)m 4(v)k 6(ailable)k 914(v)s 3(ertical)k 1687(space.)s 2389(Horizontal)s 3472(g)s 1(alle)k 3(ys)k 4203(could)s 4799(analogously)s 6017(produce)s 6850(lines)s 7359(of)s 7636(v)s 6(arying)k 8421(length,)s 0 4990(and)m 404(so)s 670(could)s 1260(\207ll)s 1580(non-rectangular)s 3153(shapes.)s 480 4616(An)m 835(important)s 1829(theoretical)s 2896(bene\207t)s 3612(of)s 3888(horizontal)s 4918(g)s 1(alle)k 3(ys)k 5647(is)s 5862(that)s 6285(the)s 3(y)k 6753(w)s 2(ould)k 7413(permit)s 8102(horizontal)s 0 4328(and)m 403(v)s 3(ertical)k 1168(to)s 1405(be)s 1685(treated)s 2390(in)s 2631(a)s 2795(perfectly)s 3695(symmetrical)s 4928(w)s 2(ay)k 15(,)k 5415(whereas)s 6247(at)s 6477(present)s 7225(paragraph)s 8236(breaking)s 0 4040(is)m 243(horizontal)s 1300(only)s 15(,)k 1851(and)s 2288(g)s 1(alle)k 3(y)k 2955(breaking)s 3878(is)s 4121(v)s 3(ertical)k 4921(only)s 15(.)k 5529(This)s 6038(must)s 6596(simplify)s 7479(the)s 7860(treatment)s 8855(of)s 0 3752(non-European)m 1432(languages)s 2459(which)s 3121(\207ll)s 3460(in)s 3722(unusual)s 4542(directions,)s 5610(although)s 6525(it)s 6736(is)s 6965(not)s 7351(itself)s 7918(suf\207cient)s 8887(to)s 0 3464(implement)m 1082(them.)s 480 3090(There)m 1132(are)s 1519(a)s 1725(fe)s 6(w)k 2170(minor)s 2841(problems)s 3822(with)s 4343(horizontal)s 5407(g)s 1(alle)k 3(ys.)k 6284(First,)s 6867(the)s 7255(syntactic)s 8197(o)s 3(v)k 3(erhead)k 0 2802(of)m 319(enclosing)s 1337(each)s 1880(paragraph)s 2941(in)s 220 fnt5 3233 2799(@P)m 8(ar)k 2(ag)k 2(r)k 2(aph { ...)k 13( })k 240 fnt1 5064 2802(or)m 5371(whate)s 6(v)k 3(er)k 6346(is)s 6604(unacceptable.)s 8065(Permitting)s 0 2514(user)m 4(-de\207ned)k 1234(operators)s 2172(to)s 2409(ha)s 4(v)k 3(e)k 2908(lo)s 6(wer)k 3504(precedence)s 4633(than)s 5100(the)s 5446(white)s 6031(space)s 6616(between)s 7468(tw)s 2(o)k 7876(w)s 2(ords)k 8508(might)s 0 2226(help)m 450(here.)s 1009(Second,)s 1805(the)s 2137(b)s 4(uilt-in)k 2877(paragraph)s 3874(break)s 2(er)k 4632(includes)s 5464(h)s 1(yphenation,)k 6738(and)s 7126(it)s 7302(permits)s 8053(line)s 8451(breaks)s 0 1938(in)m 246(the)s 598(input)s 1153(to)s 1396(determine)s 2410(line)s 2828(breaks)s 3506(in)s 3753(the)s 4105(output,)s 4827(if)s 5048(desired.)s 5905(These)s 6536(features)s 7345(must)s 7874(someho)s 6(w)k 8844(be)s 0 1650(preserv)m 3(ed.)k 1081(Finally)s 15(,)k 1841(we)s 2167(ha)s 4(v)k 3(e)k 2659(e)s 3(xplained)k 3634(ho)s 6(w)k 4086(the)s 4425(Basser)s 5113(Lout)s 5616(interpreter)s 6659(assigns)s 7392(equal)s 7956(width)s 8549(to)s 8778(the)s 0 1362(wider)m 607(columns)s 1473(of)s 1748(tables)s 2359(\(Section)s 3216(2.5\).)s 3763(The)s 4194(equi)s 6(v)k 6(alent)k 5242(situation)s 6126(in)s 6372(v)s 3(ertical)k 7143(g)s 1(alle)k 3(ys)k 7871(occurs)s 8550(when)s 0 1074(tw)m 2(o)k 416(recepti)s 6(v)k 3(e)k 1345(symbols)s 2201(compete)s 3074(for)s 3419(v)s 3(ertical)k 4193(space)s 4786(\(e.g.)s 220 fnt5 5262 1071(@T)m 26(e)k 6(xtPlace)k 240 fnt1 6487 1074(and)m 220 fnt5 6898 1071(@F)m 6(ootSect)k 240 fnt1 7989 1074(\),)m 8182(and)s 8593(there)s 0 786(it)m 187(is)s 392(con)s 9(v)k 3(entional)k 1666(to)s 1900(grant)s 2446(as)s 2691(much)s 3274(as)s 3519(required)s 4368(to)s 4602(the)s 4945(\207rst)s 5371(arri)s 6(v)k 6(al.)k 6140(It)s 6339(is)s 6544(not)s 6905(clear)s 7423(to)s 7657(the)s 8000(author)s 8665(ho)s 6(w)k 0 498(these)m 547(dif)s 6(ferent)k 1422(approaches)s 2549(can)s 2938(be)s 3220(reconciled.)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 35 36 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5709 -1582(-)m 5837(35)s 6123(-)s 9066 13413 0 13413 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 240 fnt2 0 12672(6.)m 291(Cr)s 4(oss)k 926(r)s 4(efer)k 4(ences)k [ /Dest /LOUT18_694_s6_0_1 /DEST pdfmark 240 fnt1 480 12240(Cross)m 1064(references,)s 2138(such)s 2622(as)s 2859(`see)s 3286(page)s 3782(57')s 4121(and)s 4512(`see)s 4940(Figure)s 5607(5,)s 16(')k 5871(are)s 6205(a)s 6358(useful)s 6985(b)s 4(ut)k 7334(highly)s 7987(error)s 4(-prone)k 0 11952(feature)m 716(of)s 985(documents.)s 2184(Scribe)s 2848([7])s 3163(introduced)s 4242(a)s 4406(method)s 5180(of)s 5449(k)s 2(eeping)k 6256(them)s 6792(up)s 7083(to)s 7320(date)s 7772(automatically)s 0 11664(as)m 245(the)s 587(document)s 1585(changes:)s 2517(the)s 2859(user)s 3311(gi)s 6(v)k 3(es)k 3852(each)s 4342(referenced)s 5401(entity)s 5993(a)s 6153(tag,)s 6547(and)s 6945(operators)s 7879(are)s 8220(pro)s 3(vided)k 0 11376(that)m 418(return)s 1045(the)s 1393(page)s 1901(or)s 2160(sequence)s 3093(number)s 3884(of)s 4155(the)s 4503(entity)s 5101(with)s 5583(a)s 5749(gi)s 6(v)k 3(en)k 6329(tag.)s 480 11002(A)m 712(cross)s 1256(reference)s 2201(tak)s 2(es)k 2743(an)s 3028(object)s 3674(\(such)s 4251(as)s 4503(a)s 4671(page)s 5181(number\))s 6042(from)s 6568(one)s 6972(point)s 7526(in)s 7771(the)s 8122(document)s 0 10714(and)m 435(copies)s 1128(it)s 1351(to)s 1621(another)s 9(,)k 2467(and)s 2902(this)s 3329(generalization)s 4770(suggests)s 5663(other)s 6245(applications.)s 7595(F)s 3(or)k 8015(e)s 3(xample,)k 8960(a)s 0 10426(running)m 831(header)s 1562(is)s 1806(copied)s 2536(from)s 3094(the)s 3475(title)s 3935(of)s 4240(a)s 4440(nearby)s 5179(chapter)s 9(,)k 6013(and)s 6451(a)s 6651(reference)s 7628(is)s 7872(copied)s 8602(from)s 0 10138(a)m 207(bibliographic)s 1576(database.)s 2604(Making)s 3443(the)s 3832(unity)s 4419(of)s 4731(these)s 5319(applications)s 6566(manifest)s 7489(is)s 7740(an)s 8065(interesting)s 0 9850(language)m 920(design)s 1602(problem.)s 240 fnt2 0 9201(6.1.)m 471(The)s 926(cr)s 4(oss)k 1494(r)s 4(efer)k 4(ence)k 2496(abstraction)s [ /Dest /LOUTcross /DEST pdfmark 240 fnt1 480 8770(In)m 736(de)s 6(v)k 3(eloping)k 1844(the)s 2191(cross)s 2733(reference)s 3675(abstraction,)s 4830(it)s 5021(seemed)s 5796(best)s 6241(to)s 6479(be)s 3(gin)k 7065(with)s 7546(the)s 7894(database)s 8772(ap-)s 0 8482(plication,)m 943(since)s 1490(it)s 1682(is)s 1892(the)s 2240(simplest.)s 3200(Database)s 4132(relations)s 5005(are)s 5352(naturally)s 6255(mapped)s 7071(into)s 7496(Lout)s 8008(de\207nitions:)s 220 fnt5 480 7981(def @Ref)m 6(erence)k 480 7693( named @T)m 26(ag {})k 480 7405( named @A)m 6(uthor {})k 480 7117( named @Title {})m 480 6829( named @Jour)m -5(nal {})k 480 6541({})m 240 fnt1 0 6047(The)m 434(set)s 766(of)s 1043(all)s 1343(in)s 9(v)k 4(ocations)k 2490(of)s 220 fnt5 2768 6044(@Ref)m 6(erence)k 240 fnt1 4055 6047(is)m 4272(a)s 4444(relation)s 5237(whose)s 5911(attrib)s 4(utes)k 6853(are)s 7206(the)s 7561(parameters,)s 8722(and)s 0 5759(whose)m 659(tuples)s 1271(are)s 1608(the)s 1946(in)s 9(v)k 4(ocations.)k 3191(T)s 19(o)k 3481(complete)s 4403(the)s 4741(correspondence,)s 6339(we)s 6665(need)s 7165(only)s 7635(declare)s 8370(that)s 8778(the)s 220 fnt5 0 5468(@T)m 26(ag)k 240 fnt1 623 5471(parameter)m 1637(is)s 1847(special,)s 2617(serving)s 3374(as)s 3624(the)s 3972(k)s 2(e)k 3(y)k 4367(attrib)s 4(ute.)k 480 5097(F)m 3(ollo)k 6(wing)k 1508(the)s 1856(database)s 2735(model,)s 3440(we)s 3775(ne)s 3(xt)k 4244(need)s 4755(a)s 4921(notation)s 5762(for)s 6100(retrie)s 6(ving)k 7075(the)s 7423(in)s 9(v)k 4(ocation)k 8477(with)s 8960(a)s 0 4809(gi)m 6(v)k 3(en)k 580(tag:)s 220 fnt5 480 4308(@Ref)m 6(erence&&kingston91)k 240 fnt1 0 3809(This)m 240 fnt3 534 3811(cr)m 10(oss)k 1143(r)s 8(efer)k 8(ence)k 240 fnt1 2141 3809(is)m 2410(lik)s 2(e)k 2881(an)s 3223(arro)s 6(w)k 3887(pointing)s 4796(to)s 5094(the)s 5501(in)s 9(v)k 4(ocation.)k 6721(T)s 19(o)k 7080(access)s 7800(its)s 8135(attrib)s 4(utes,)k 0 3521(we)m 335(write)s 220 fnt5 480 3069(@Ref)m 6(erence&&kingston91 @Open { @A)k 6(uthor)k 11(, @Title })k 240 fnt1 0 2570(The)m 220 fnt5 484 2567(@Open)m 240 fnt1 1347 2570(operator)m 2260(e)s 6(v)k 6(aluates)k 3245(its)s 3578(right)s 4146(parameter)s 5217(in)s 5517(an)s 5857(en)s 9(vironment)k 7174(which)s 7873(includes)s 8778(the)s 0 2282(e)m 3(xported)k 892(parameters)s 1990(of)s 2261(its)s 2537(left.)s 480 1908(An)m 829(in)s 9(v)k 4(ocation)k 1882(is)s 2091(chosen)s 2812(to)s 3050(be)s 3331(a)s 3496(running)s 4293(header)s 4989(because)s 5801(of)s 6071(its)s 6346(proximity)s 7342(to)s 7580(the)s 7927(place)s 8486(where)s 0 1620(it)m 223(is)s 465(used,)s 1043(rather)s 1691(than)s 2192(by)s 2517(its)s 2825(tag.)s 3313(Such)s 3881(proximity)s 4910(is)s 5151(naturally)s 6086(e)s 3(xpressed)k 7116(by)s 7442(tw)s 2(o)k 7884(special)s 8634(tags,)s 220 fnt5 0 1329(preceding)m 240 fnt1 1049 1332(and)m 220 fnt5 1491 1329(f)m 6(ollo)k 3(wing)k 240 fnt1 2321 1332(;)m 2471(for)s 2848(e)s 3(xample,)k 220 fnt5 3800 1329(@Sym&&f)m 6(ollo)k 3(wing)k 240 fnt1 5682 1332(will)m 6146(point)s 6737(to)s 7014(the)s 7400(closest)s 8149(follo)s 6(wing)k 0 1044(in)m 9(v)k 4(ocation)k 1083(of)s 220 fnt5 1383 1041(@Sym)m 240 fnt1 2121 1044(in)m 2393(the)s 2771(\207nal)s 3280(printed)s 4045(document.)s 5182(This)s 5688(is)s 5927(much)s 6546(simpler)s 7351(conceptually)s 8657(than)s 0 756(reference)m 937(to)s 1169(the)s 1511(internal)s 2288(state)s 2775(of)s 3039(the)s 3381(document)s 4378(formatter)s 5319(at)s 5544(a)s 5704(critical)s 6413(moment,)s 7298(the)s 7639(usual)s 8192(approach)s 0 468(to)m 239(running)s 1037(headers.)s 480 94(It)m 691(turns)s 1227(out)s 1600(that)s 2025(the)s 2380(abo)s 3(v)k 3(e)k 3009(design)s 3698(solv)s 3(es)k 4350(all)s 4650(the)s 5005(cross)s 5554(referencing)s 6701(problems)s 7649(encountered)s 8883(in)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 36 37 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5705 -1581(-)m 5833(36)s 6126(-)s 9066 13414 0 13305 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13251(practice)m 825(e)s 3(xcept)k 1521(one,)s 1988(which)s 2645(may)s 3126(be)s 3422(typi\207ed)s 4226(by)s 4535(the)s 4897(problem)s 5769(of)s 6054(\207nding)s 6801(the)s 7164(number)s 7969(of)s 8255(the)s 8618(page)s 0 12963(on)m 303(which)s 952(the)s 1306(chapter)s 2076(whose)s 2750(tag)s 3102(is)s 220 fnt5 3318 12960(intro)m 240 fnt1 3804 12963(be)m 3(gins.)k 4596(T)s 19(w)k 2(o)k 5074(cross)s 5622(referencing)s 6769(steps)s 7304(are)s 7658(needed,)s 8449(\207rst)s 8887(to)s 220 fnt5 0 12672(@Chapter&&intro)m 240 fnt1 1714 12675(,)m 1821(then)s 2290(from)s 2814(there)s 3347(to)s 220 fnt5 3586 12672(@P)m 8(age&&preceding)k 240 fnt1 5556 12675(,)m 5663(where)s 6303(the)s 6651(page)s 7159(number)s 7950(is)s 8160(kno)s 6(wn.)k 480 12301(Gi)m 6(v)k 3(en)k 1113(our)s 1492(success)s 2260(so)s 2526(f)s 2(ar)k 9(,)k 2886(this)s 3282(last)s 3673(problem)s 4530(pro)s 3(v)k 3(es)k 5213(to)s 5452(be)s 5734(surprisingly)s 6930(dif\207cult.)s 7850(W)s 19(e)k 8219(\207rst)s 8650(try)s 220 fnt5 480 11800(@Chapter&&intro @Open {)m 480 11512( @P)m 8(age&&preceding @Open { @P)k 8(ageNum })k 480 11224(})m 240 fnt1 0 10730(b)m 4(ut)k 363(this)s 761(f)s 2(ails)k 1222(because)s 220 fnt5 2037 10727(@P)m 8(age&&preceding)k 240 fnt1 4069 10730(is)m 4281(e)s 6(v)k 6(aluated)k 5245(in)s 5490(the)s 5840(present)s 6592(conte)s 3(xt,)k 7402(not)s 7770(in)s 8015(the)s 8365(conte)s 3(xt)k 0 10442(of)m 220 fnt5 271 10439(@Chapter&&intro)m 240 fnt1 2045 10442(as)m 2295(required.)s 3255(So)s 3561(our)s 3940(ne)s 3(xt)k 4409(attempt)s 5185(is)s 220 fnt5 480 9941(def @Chapter)m 480 9653( named @P)m 8(ageNum { @P)k 8(age&&preceding @Open { @P)k 8(ageNum } })k 480 9365( ...)m 240 fnt1 0 8914(with)m 482(the)s 220 fnt5 830 8911(@P)m 8(age&&preceding)k 240 fnt1 2860 8914(cross)m 3402(reference)s 4345(attached)s 5199(to)s 5438(the)s 5786(chapter;)s 6601(we)s 6936(write)s 220 fnt5 480 8413(@Chapter&&intro @Open { @P)m 8(ageNum })k 240 fnt1 0 7914(This)m 604(also)s 1170(f)s 2(ails,)k 1813(because)s 2754(parameters)s 3980(are)s 4456(e)s 6(v)k 6(aluated)k 5546(after)s 6170(substitution,)s 7521(so)s 7915(once)s 8552(ag)s 1(ain)k 220 fnt5 0 7623(@P)m 8(age&&preceding)k 240 fnt1 2015 7626(is)m 2209(e)s 6(v)k 6(aluated)k 3156(in)s 3383(the)s 3716(wrong)s 4365(conte)s 3(xt.)k 5215(W)s 19(e)k 5568(could)s 6143(of)s 6398(course)s 7063(de\207ne)s 7688(a)s 7839(ne)s 6(w)k 8270(operator)s 0 7338(speci\207cally)m 1142(for)s 1480(this)s 1876(case:)s 220 fnt5 480 6837(@P)m 8(age&&{ @Preceding @Chapter&&intro })k 240 fnt1 0 6338(or)m 267(some)s 836(such.)s 1448(This)s 1932(is)s 2151(free)s 2585(of)s 2864(the)s 3221(anno)s 2(ying)k 4172(conte)s 3(xt-sensiti)k 6(vity)k 15(,)k 6029(b)s 4(ut)k 6399(it)s 6599(seems)s 7243(quite)s 7785(comple)s 3(x,)k 8722(and)s 0 6050(the)m 348(e)s 3(xpected)k 1253(cross)s 1795(reference)s 220 fnt5 2738 6047(@P)m 8(age&&preceding)k 240 fnt1 4768 6050(does)m 5258(not)s 5624(appear)s 13(.)k 480 5676(The)m 939(author)s 1642(w)s 2(as)k 2095(lost)s 2532(in)s 2806(these)s 3385(obscurities)s 4503(for)s 4873(some)s 5465(time,)s 6028(and)s 6464(ultimately)s 7518(rescued)s 8338(himself)s 0 5388(by)m 306(looking)s 1103(ahead)s 1731(to)s 1982(the)s 2342(implementation)s 3912(of)s 4195(the)s 220 fnt5 4555 5385(preceding)m 240 fnt1 5578 5388(and)m 220 fnt5 5994 5385(f)m 6(ollo)k 3(wing)k 240 fnt1 6897 5388(tags,)m 7401(to)s 7652(see)s 8025(if)s 8254(a)s 8433(simple)s 0 5100(e)m 3(xtension)k 971(of)s 1242(it)s 1434(w)s 2(ould)k 2089(solv)s 3(e)k 2647(the)s 2995(problem.)s 3956(This)s 4432(led)s 4782(to)s 5021(the)s 220 fnt5 5369 5097(@T)m 26(agged)k 240 fnt1 6358 5100(operator:)m 220 fnt5 480 4599(@P)m 8(age&&preceding @T)k 26(agged intro)k 240 fnt1 0 4100(placed)m 686(at)s 922(the)s 1274(be)s 3(ginning)k 2286(of)s 2562(the)s 2914(body)s 3452(of)s 3727(the)s 4079(chapter)s 4847(will)s 5277(attach)s 220 fnt5 5908 4097(intro)m 240 fnt1 6391 4100(as)m 6645(an)s 6933(e)s 3(xtra)k 7471(tag)s 7820(to)s 8063(the)s 8416(closest)s 0 3812(preceding)m 996(in)s 9(v)k 4(ocation)k 2050(of)s 220 fnt5 2321 3809(@P)m 8(age)k 240 fnt1 3040 3812(,)m 3147(so)s 3413(that)s 220 fnt5 480 3311(@P)m 8(age&&intro @Open { @P)k 8(ageNum })k 240 fnt1 0 2812(yields)m 635(the)s 996(desired)s 1758(page)s 2279(number)s 13(.)k 3174(There)s 3801(is)s 4024(something)s 5087(lo)s 6(w-le)k 6(v)k 3(el)k 6043(and)s 6460(ad)s 6757(hoc)s 7170(about)s 7775(the)s 220 fnt5 8137 2809(@T)m 26(agged)k 240 fnt1 0 2524(operator)m 9(,)k 894(b)s 4(ut)k 1256(the)s 1604(tw)s 2(o)k 2014(cross)s 2556(references)s 3587(do)s 3880(appear)s 4577(naturally)s 15(,)k 5518(and)s 5922(it)s 6114(w)s 2(orks.)k 240 fnt2 0 1875(6.2.)m 471(Implementation)s 2159(of)s 2431(cr)s 4(oss)k 2999(r)s 4(efer)k 4(ences)k [ /Dest /LOUTcross_impl /DEST pdfmark 240 fnt1 480 1398(Before)m 1185(an)s 1466(object)s 2109(can)s 2496(be)s 2777(sized)s 3324(and)s 3727(printed,)s 4509(the)s 4855(v)s 6(alues)k 5510(of)s 5779(an)s 3(y)k 6175(cross)s 6715(references)s 7745(within)s 8411(it)s 8601(must)s 0 1110(be)m 279(kno)s 6(wn.)k 1086(If)s 1312(the)s 3(y)k 1772(refer)s 2277(to)s 2512(in)s 9(v)k 4(ocations)k 3650(that)s 4064(ha)s 4(v)k 3(e)k 4561(not)s 4924(yet)s 5272(been)s 5777(read,)s 6292(there)s 6821(is)s 7027(a)s 7190(problem.)s 8147(Scribe)s 8809([7])s 0 822(solv)m 3(es)k 649(it)s 844(by)s 1141(capitalizing)s 2311(on)s 2611(the)s 2962(f)s 2(act)k 3381(that)s 3802(documents)s 4893(are)s 5243(formatted)s 6232(repeatedly)s 7284(during)s 7965(the)s 8317(drafting)s 0 534(process.)m 868(All)s 1214(tagged)s 1897(in)s 9(v)k 4(ocations)k 3024(are)s 3358(copied)s 4040(to)s 4266(an)s 4535(auxiliary)s 5425(\207le)s 5772(during)s 6437(the)s 6771(\207rst)s 7189(run,)s 7601(and)s 7992(inde)s 3(x)k 3(ed)k 8788(for)s 0 246(quick)m 593(retrie)s 6(v)k 6(al)k 1429(on)s 1725(the)s 2072(second.)s 2901(A)s 3130(ne)s 6(w)k 3576(auxiliary)s 4478(\207le)s 4839(is)s 5048(written)s 5780(during)s 6457(the)s 6805(second)s 7527(run,)s 7952(for)s 8289(retrie)s 6(v)k 6(al)k grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 37 38 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt5 vec2 /Helvetica LoutRecode /fnt5 { /Helveticafnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5708 -1579(-)m 5836(37)s 6124(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 0 13253(on)m 301(the)s 654(third,)s 1217(and)s 1625(so)s 1896(on.)s 2305(Cross)s 2906(references)s 3941(al)s 2(w)k 2(ays)k 4657(lag)s 5007(one)s 5413(run)s 5794(behind)s 6509(the)s 6862(rest)s 7270(of)s 7546(the)s 7899(document;)s 8960(a)s 0 12965(perfect)m 711(cop)s 2(y)k 1217(may)s 1671(be)s 1942(produced)s 2879(by)s 3161(formatting)s 4210(the)s 4547(same)s 5082(v)s 3(ersion)k 5828(twice,)s 6440(e)s 3(xcept)k 7110(in)s 7341(a)s 7495(fe)s 6(w)k 7889(pathological)s 0 12677(cases)m 555(that)s 973(f)s 2(ail)k 1343(to)s 1582(con)s 9(v)k 3(er)k 4(ge.)k 480 12303(Cross)m 1123(referencing)s 2310(in)s 2600(Lout)s 3159(is)s 3416(implemented)s 4769(on)s 5113(top)s 5519(of)s 5837(a)s 6050(simple)s 6790(database)s 7716(system.)s 8591(Each)s 0 12015(database)m 879(is)s 1089(either)s 1692(writable)s 2530(or)s 2790(readable)s 3655(b)s 4(ut)k 4017(not)s 4383(both)s 4867(at)s 5099(once,)s 5658(and)s 6062(holds)s 6633(a)s 6799(set)s 7124(of)s 7395(k)s 2(e)k 3(y-v)k 6(alue)k 8384(entries:)s 0 11727(the)m 348(k)s 2(e)k 3(ys)k 833(are)s 1180(ASCII)s 1861(strings,)s 2605(and)s 3009(the)s 3358(v)s 6(alues)k 4014(are)s 4361(Lout)s 4873(objects,)s 5658(possibly)s 6510(with)s 6992(en)s 9(vironments,)k 8393(written)s 0 11439(in)m 290(Lout)s 850(source.)s 1685(Operations)s 2833(are)s 3227(pro)s 3(vided)k 4181(for)s 4566(writing)s 5357(an)s 5687(entry)s 15(,)k 6318(con)s 9(v)k 3(erting)k 7429(from)s 8001(writable)s 8887(to)s 0 11151(readable,)m 916(retrie)s 6(v)k 6(al)k 1753(by)s 2047(k)s 2(e)k 3(y)k 15(,)k 2480(and)s 2884(sequential)s 3908(retrie)s 6(v)k 6(al)k 4745(in)s 4988(k)s 2(e)k 3(y)k 5383(order)s 13(.)k 480 10777(The)m 905(implementation,)s 2509(which)s 3148(is)s 3354(quite)s 3885(unsophisticated,)s 5477(emplo)s 2(ys)k 6334(one)s 6732(or)s 6988(more)s 7532(ASCII)s 240 fnt3 8208 10779(database)m 0 10491(\207les)m 240 fnt1 380 10489(,)m 485(containing)s 1545(the)s 1891(v)s 6(alues,)k 2600(and)s 3001(one)s 3401(ASCII)s 240 fnt3 4078 10491(inde)m 4(x)k 4650(\207le)s 240 fnt1 4992 10489(per)m 5354(database,)s 6282(containing)s 7342(the)s 7688(k)s 2(e)k 3(ys.)k 8283(T)s 19(o)k 8580(write)s 0 10201(an)m 283(entry)s 15(,)k 866(the)s 1214(v)s 6(alue)k 1782(is)s 1992(\207rst)s 2423(appended)s 3399(to)s 3638(a)s 3804(database)s 4683(\207le,)s 5095(then)s 5564(a)s 5730(line)s 6144(lik)s 2(e)k 220 fnt5 480 9700(@Chapter&&intro ch1.ld 57)m 240 fnt1 0 9204(is)m 204(appended)s 1174(to)s 1406(the)s 1748(inde)s 3(x)k 2326(\207le,)s 2731(gi)s 6(ving)k 3384(the)s 3725(\207le)s 4080(and)s 4478(of)s 6(fset)k 5068(where)s 5702(the)s 6043(v)s 6(alue)k 6605(is)s 6809(stored.)s 7550(T)s 19(o)k 7844(con)s 9(v)k 3(ert)k 8602(from)s 0 8916(writable)m 831(to)s 1062(readable,)s 1971(the)s 2311(inde)s 3(x)k 2887(\207le)s 3241(is)s 3443(sorted.)s 4183(Then)s 4725(retrie)s 6(v)k 6(al)k 5554(by)s 5840(k)s 2(e)k 3(y)k 6228(requires)s 7040(a)s 7198(binary)s 7856(search)s 8515(of)s 8778(the)s 0 8628(inde)m 3(x)k 584(\207le)s 945(and)s 1349(one)s 1751(seek)s 2237(into)s 2662(a)s 2828(database)s 3707(\207le,)s 4119(and)s 4523(sequential)s 5547(retrie)s 6(v)k 6(al)k 6384(by)s 6678(k)s 2(e)k 3(y)k 7073(is)s 7283(tri)s 6(vial.)k 480 8254(This)m 945(database)s 1813(system)s 2526(is)s 2725(used)s 3211(in)s 3443(se)s 6(v)k 3(eral)k 4154(w)s 2(ays.)k 4797(F)s 3(or)k 5175(an)s 5447(e)s 3(xternal)k 6257(database,)s 7176(say)s 7538(of)s 7798(bibliographic)s 0 7966(references,)m 1093(the)s 1447(user)s 1912(creates)s 2631(the)s 2985(database)s 3871(\207le)s 4238(of)s 4516(v)s 6(alues)k 5178(\(without)s 6054(en)s 9(vironments\),)k 7540(Lout)s 8058(creates)s 8778(the)s 0 7678(inde)m 3(x)k 587(\207le)s 951(whene)s 6(v)k 3(er)k 1935(it)s 2130(cannot)s 2831(\207nd)s 3265(one,)s 3721(and)s 4128(retrie)s 6(v)k 6(als)k 5057(by)s 5354(k)s 2(e)k 3(y)k 5752(proceed)s 6570(as)s 6823(usual.)s 7495(Cross)s 8095(references)s 0 7390(with)m 476(tags)s 906(other)s 1451(than)s 220 fnt5 1913 7387(preceding)m 240 fnt1 2918 7390(and)m 220 fnt5 3316 7387(f)m 6(ollo)k 3(wing)k 240 fnt1 4200 7390(are)m 4540(treated)s 5241(as)s 5485(described)s 6453(abo)s 3(v)k 3(e,)k 7119(by)s 7407(writing)s 8144(all)s 8430(tagged)s 0 7102(in)m 9(v)k 4(ocations)k 1131(\(with)s 1681(en)s 9(vironments\))k 3092(to)s 3320(a)s 3475(single)s 4092(database,)s 5011(which)s 5643(is)s 5842(con)s 9(v)k 3(erted)k 6820(to)s 7049(readable)s 7903(at)s 8125(the)s 8462(end)s 8855(of)s 0 6814(the)m 334(run)s 695(for)s 1018(retrie)s 6(v)k 6(als)k 1930(on)s 2212(the)s 2545(ne)s 3(xt)k 3000(run.)s 3468(Sorted)s 4135(g)s 1(alle)k 3(ys,)k 4900(such)s 5382(as)s 5617(inde)s 3(x)k 6186(entries,)s 6915(are)s 7247(written)s 7965(out)s 8316(inde)s 3(x)k 3(ed)k 0 6526(by)m 307(tar)s 4(get)k 920(and)s 1337(k)s 2(e)k 3(y)k 1746(and)s 2163(retrie)s 6(v)k 3(ed)k 3074(sequentially)s 4297(on)s 4607(the)s 4969(ne)s 3(xt)k 5451(run.)s 5948(Unsorted)s 6896(g)s 1(alle)k 3(ys)k 7634(with)s 8130(preceding)s 0 6238(tar)m 4(gets)k 684(which)s 1327(pop)s 1741(of)s 6(f)k 2086(the)s 2435(top)s 2795(of)s 3067(the)s 3416(root)s 3863(g)s 1(alle)k 3(y)k 4498(without)s 5290(\207nding)s 6023(a)s 6190(tar)s 4(get,)k 6837(such)s 7334(as)s 7585(entries)s 8273(in)s 8518(tables)s 0 5950(of)m 274(contents,)s 1181(are)s 1532(treated)s 2242(similarly)s 15(,)k 3186(e)s 3(xcept)k 3870(that)s 4291(the)s 3(y)k 4758(are)s 5108(inde)s 3(x)k 3(ed)k 5922(by)s 6219(tar)s 4(get)k 6821(and)s 7229(a)s 7398(sequence)s 8335(number)s 0 5662(that)m 418(preserv)s 3(es)k 1368(their)s 1865(relati)s 6(v)k 3(e)k 2627(order)s 3191(during)s 3869(the)s 4217(sort.)s 480 5288(When)m 1107(Lout)s 1617(processes)s 2581(a)s 2745(multi-\207le)s 3687(document,)s 4735(one)s 5135(cross)s 5674(reference)s 6615(database)s 7492(\207le)s 7850(is)s 8058(written)s 8788(for)s 0 5000(each)m 504(input)s 1065(\207le,)s 1486(b)s 4(ut)k 1858(the)s 3(y)k 2330(share)s 2899(a)s 3074(common)s 3979(inde)s 3(x)k 4572(\207le.)s 5050(At)s 5358(end)s 5772(of)s 6052(run,)s 6487(the)s 6844(ne)s 6(w)k 7301(inde)s 3(x)k 7894(\207le)s 8264(is)s 8484(sorted)s 0 4712(and)m 404(mer)s 4(ged)k 1176(with)s 1658(the)s 2007(old)s 2371(one)s 2774(in)s 3017(such)s 3514(a)s 3680(w)s 2(ay)k 4132(as)s 4383(to)s 4622(preserv)s 3(e)k 5485(entries)s 6172(relating)s 6955(to)s 7194(\207les)s 7644(not)s 8010(read)s 8480(on)s 8778(the)s 0 4424(current)m 737(run.)s 1221(This)s 1699(pro)s 3(vides)k 2572(some)s 3135(support)s 3914(for)s 4254(piecemeal)s 5278(formatting,)s 6395(b)s 4(ut)k 6758(e)s 6(v)k 3(entually)k 7801(the)s 8150(\207les)s 8601(must)s 0 4136(all)m 293(be)s 575(formatted)s 1561(together)s 13(.)k 480 3762(When)m 1120(a)s 220 fnt5 1297 3759(preceding)m 240 fnt1 2319 3762(or)m 220 fnt5 2590 3759(f)m 6(ollo)k 3(wing)k 240 fnt1 3491 3762(cross)m 4044(reference)s 4998(is)s 5220(found,)s 5897(it)s 6100(is)s 6321(attached)s 7187(to)s 7437(a)s 7614(g)s 1(alle)k 3(y)k 8259(inde)s 3(x)k 8855(of)s 0 3474(type)m 240 fnt3 474 3476(CR)m 9(OSS_PREC)k 240 fnt1 1973 3474(or)m 240 fnt3 2238 3476(CR)m 9(OSS_FOLL)k 240 fnt1 3653 3474(,)m 3766(together)s 4615(with)s 5103(an)s 5392(automatically)s 6752(generated)s 7745(tag)s 8097(composed)s 0 3186(of)m 258(the)s 593(current)s 1316(\207le)s 1663(name)s 2224(and)s 2615(a)s 2767(sequence)s 3687(number)s 13(.)k 4556(When)s 5172(a)s 5324(tagged)s 6007(in)s 9(v)k 4(ocation)k 7048(is)s 7244(found,)s 7897(it)s 8076(is)s 8272(attached)s 0 2898(to)m 237(a)s 240 fnt3 401 2900(CR)m 9(OSS_T)k 12(ARG)k 240 fnt1 1875 2898(inde)m 3(x.)k 2565(These)s 3190(g)s 1(alle)k 3(y)k 3822(inde)s 3(x)k 3(es)k 4595(are)s 4940(carried)s 5658(along)s 6241(through)s 7040(the)s 7386(dynamic)s 8261(tree,)s 8722(and)s 0 2610(e)m 6(v)k 3(entually)k 1049(pop)s 1470(of)s 6(f)k 1822(the)s 2178(top)s 2545(of)s 2824(the)s 3180(root)s 3633(g)s 1(alle)k 3(y)k 15(,)k 4313(at)s 4553(which)s 5203(point)s 5763(it)s 5963(is)s 6181(easy)s 6668(to)s 6915(determine)s 7934(which)s 8584(cross)s 0 2322(references)m 1029(refer)s 1536(to)s 1773(which)s 2413(in)s 9(v)k 4(ocations,)k 3608(since)s 4153(the)s 4499(inde)s 3(x)k 3(es)k 5273(are)s 5618(no)s 6(w)k 6077(in)s 6318(\207nal)s 6796(printed)s 7529(document)s 8531(order)s 13(.)k 0 2034(Each)m 541(referenced)s 1613(in)s 9(v)k 4(ocation)k 2674(is)s 2891(then)s 3367(written)s 4107(to)s 4353(the)s 4708(cross)s 5257(reference)s 6207(database,)s 7144(multiply)s 8015(inde)s 3(x)k 3(ed)k 8832(by)s 0 1746(the)m 344(generated)s 1327(tags)s 1758(of)s 2025(the)s 2369(associated)s 3404(cross)s 3942(references.)s 5082(On)s 5427(the)s 5771(ne)s 3(xt)k 6236(run,)s 6657(when)s 7229(the)s 7573(same)s 220 fnt5 8115 1743(preceding)m 240 fnt1 0 1458(and)m 220 fnt5 408 1455(f)m 6(ollo)k 3(wing)k 240 fnt1 1302 1458(cross)m 1848(references)s 2883(are)s 3234(found,)s 3904(chances)s 4716(are)s 5067(good)s 5609(that)s 6031(the)s 6383(same)s 6934(tags)s 7374(will)s 7804(be)s 8090(generated,)s 0 1170(and)m 404(the)s 752(appropriate)s 1896(v)s 6(alues)k 2552(can)s 2941(be)s 3223(retrie)s 6(v)k 3(ed)k 4120(from)s 4644(the)s 4992(database)s 5871(immediately)s 15(.)k 480 796(This)m 982(approach)s 1942(w)s 2(as)k 2389(the)s 2763(genesis)s 3544(of)s 3842(the)s 220 fnt5 4216 793(@T)m 26(agged)k 240 fnt1 5231 796(operator)m 9(,)k 6151(whose)s 6845(implementation)s 8428(is)s 8665(no)s 6(w)k 0 508(immediate:)m 1106(for)s 1436(each)s 220 fnt5 1923 505(@T)m 26(agged)k 240 fnt1 2903 508(operator)m 3751(we)s 4078(produce)s 4897(one)s 240 fnt3 5290 510(CR)m 9(OSS_PREC)k 240 fnt1 6775 508(or)m 240 fnt3 7026 510(CR)m 9(OSS_FOLL)k 240 fnt1 8492 508(g)m 1(alle)k 3(y)k 0 220(inde)m 3(x,)k 645(replacing)s 1596(the)s 1953(generated)s 2949(tag)s 3304(with)s 3795(the)s 4152(right)s 4672(parameter)s 5696(of)s 5976(the)s 220 fnt5 6333 217(@T)m 26(agged)k 240 fnt1 7331 220(operator)m 13(.)k 8288(Nothing)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 38 39 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5708 -1579(-)m 5836(38)s 6123(-)s 9066 13416 0 13307 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore 0 13253(more)m 547(is)s 757(required.)s 240 fnt2 0 12460(7.)m 291(Conclusion)s [ /Dest /LOUT18_694_s7_0_1 /DEST pdfmark 240 fnt1 480 12028(Since)m 1054(its)s 1316(public)s 1953(release)s 2657(in)s 2886(October)s 3702(1991,)s 4275(the)s 4609(Basser)s 5292(Lout)s 5790(interpreter)s 6829(has)s 7185(been)s 7680(ported)s 8335(without)s 0 11740(incident)m 819(to)s 1047(a)s 1202(wide)s 1712(v)s 6(ariety)k 2412(of)s 2672(Unix)s 3195(systems)s 3992(and)s 4385(hardw)s 2(are.)k 5425(It)s 5619(w)s 2(as)k 6029(tested)s 6633(e)s 3(xtensi)k 6(v)k 3(ely)k 7753(before)s 8408(release)s 0 11452(on)m 293(its)s 565(o)s 6(wn)k 1025(documentation,)s 2549(and)s 2949(the)s 3293(fe)s 6(w)k 3695(minor)s 4321(b)s 4(ugs)k 4817(which)s 5455(ha)s 4(v)k 3(e)k 5952(emer)s 4(ged)k 6824(since)s 7367(then)s 7832(ha)s 4(v)k 3(e)k 8329(all)s 8617(been)s 0 11164(\207x)m 3(ed)k 534(in)s 777(the)s 1125(second)s 1848(release,)s 2617(scheduled)s 3632(to)s 3871(appear)s 4568(in)s 4811(mid-1992.)s 480 10790(Se)m 6(v)k 3(en)k 1105(substantial)s 2173(packages)s 3093(of)s 3355(de\207nitions)s 4407(are)s 4746(distrib)s 4(uted)k 5813(with)s 6286(Basser)s 6975(Lout.)s 7582(The)s 8001(Document-)s 0 10502(Layout)m 748(package,)s 1649(and)s 2063(its)s 2349(v)s 6(ariants)k 3160(ReportLayout)s 4560(and)s 4974(BookLayout,)s 6289(pro)s 3(vide)k 7083(the)s 7441(standard)s 8320(features)s 0 10214(that)m 411(all)s 696(documents)s 1776(require:)s 2610(pages,)s 3254(columns,)s 4165(paragraphs,)s 5313(headings,)s 6263(footnotes,)s 7252(\210oating)s 8028(\207gures)s 8722(and)s 0 9926(tables,)m 683(chapters)s 1550(and)s 1974(sections,)s 2871(displays)s 3726(and)s 4150(lists,)s 4660(access)s 5341(to)s 5600(bibliographic)s 6948(databases,)s 7991(cross)s 8553(refer)s 4(-)k 0 9638(ences,)m 623(and)s 1012(so)s 1263(on)s 1545([11].)s 2092(The)s 2505(BookLayout)s 3748(package)s 4572(has)s 4927(e)s 3(xtra)k 5446(features)s 6237(needed)s 6958(by)s 7237(books,)s 7902(including)s 8843(an)s 0 9350(automatically)m 1354(generated)s 2342(table)s 2863(of)s 3135(contents,)s 4040(Roman)s 4790(page)s 5298(numbers)s 6174(for)s 6513(the)s 6862(pref)s 2(atory)k 7790(material,)s 8679(run-)s 0 9062(ning)m 468(page)s 965(headers,)s 1790(odd)s 2197(and)s 2589(e)s 6(v)k 3(en)k 3078(page)s 3574(layouts,)s 4361(and)s 4754(a)s 4908(sorted)s 5539(inde)s 3(x.)k 6220(The)s 6637(Eq)s 6949(package)s 7778(formats)s 8546(equa-)s 0 8774(tions,)m 572(and)s 976(P)s 3(as)k 1356(formats)s 2136(P)s 3(ascal)k 2798(programs)s 3752([10];)s 4262(T)s 19(ab)k 4668(formats)s 5448(tables)s 6056([12];)s 6566(and)s 6970(Fig)s 7342(dra)s 3(ws)k 7961(\207gures)s 8663([6].)s 480 8400(The)m 899(non-e)s 3(xpert)k 1983(user)s 2431(who)s 2888(uses)s 3341(these)s 3879(packages)s 4797(percei)s 6(v)k 3(es)k 5732(a)s 5889(system)s 6603(of)s 6865(a)s 7021(standard)s 7880(quite)s 8404(similar)s 0 8112(to)m 246(other)s 804(fully)s 1317(de)s 6(v)k 3(eloped)k 2357(batch)s 2940(formatters,)s 4034(although)s 4936(the)s 5292(interf)s 2(ace)k 6187(is)s 6405(considerably)s 7688(more)s 8243(coherent)s 0 7824(than,)m 525(say)s 15(,)k 942(the)s 1297(trof)s 6(f)k 1792(f)s 2(amily')k 13(s)k 2630([8].)s 3078(The)s 3512(e)s 3(xpert)k 4173(user)s 4637(percei)s 6(v)k 3(es)k 5588(a)s 5760(system)s 6490(which)s 7139(is)s 7355(radically)s 8251(dif)s 6(ferent)k 0 7536(from)m 547(pre)s 6(vious)k 1440(ones,)s 2009(in)s 2276(which)s 2941(a)s 3131(great)s 3691(deal)s 4168(can)s 4580(be)s 4886(achie)s 6(v)k 3(ed)k 5808(v)s 3(ery)k 6308(quickly)s 15(.)k 7198(T)s 19(o)k 7522(tak)s 2(e)k 7997(an)s 8304(e)s 3(xtreme)k 0 7248(e)m 3(xample,)k 936(P)s 3(as)k 1338(w)s 2(as)k 1781(designed,)s 2761(implemented,)s 4138(tested,)s 4825(and)s 5251(documented)s 6501(in)s 6766(one)s 7190(afternoon.)s 8292(Eq)s 8639(took)s 0 6960(about)m 587(a)s 747(week,)s 1353(b)s 4(ut)k 1709(most)s 2229(of)s 2494(that)s 2906(time)s 3380(w)s 2(as)k 3796(spent)s 4355(in)s 4592(marshalling)s 5767(the)s 6110(v)s 6(ast)k 6543(repertoire)s 7520(of)s 7785(mathematical)s 0 6672(symbols,)m 934(and)s 1367(\207ne-tuning)s 2499(the)s 2876(spacing.)s 3800(Most)s 4381(of)s 4681(the)s 5059(ef)s 6(fort)k 5671(seems)s 6335(to)s 6603(go)s 6925(into)s 7379(designing)s 8392(a)s 8588(good)s 0 6384(interf)m 2(ace;)k 944(most)s 1469(symbols)s 2318(are)s 2665(implemented)s 3971(in)s 4214(just)s 4619(one)s 5021(or)s 5280(a)s 5446(fe)s 6(w)k 5852(lines)s 6354(of)s 6625(Lout.)s 480 6010(A)m 698(group)s 1297(of)s 1556(about)s 2135(20)s 2418(satis\207ed)s 3246(non-e)s 3(xpert)k 4327(users)s 4856(has)s 5214(gro)s 6(wn)k 5864(up)s 6145(within)s 6800(the)s 7136(author')s 13(s)k 7944(department,)s 0 5722(mainly)m 703(Honours)s 1563(students)s 2383(with)s 2849(no)s 3127(in)s 9(v)k 3(estment)k 4208(in)s 4436(older)s 4971(systems)s 5764(to)s 5987(hold)s 6456(them)s 6978(back.)s 7579(Basser)s 8260(Lout)s 8756(has)s 0 5434(been)m 511(adv)s 3(ertised)k 1550(on)s 1849(the)s 2199(Internet)s 3003(ne)s 6(ws)k 3542(as)s 3794(a)s 4(v)k 6(ailable)k 4704(via)s 5058(anon)s 3(ymous)k 240 fnt3 6213 5436(ftp)m 240 fnt1 6458 5434(,)m 6567(so)s 6835(the)s 7185(e)s 3(xtent)k 7828(of)s 8101(its)s 8379(outside)s 0 5146(user)m 469(community)s 1624(is)s 1845(hard)s 2339(to)s 2589(g)s 1(auge.)k 3335(About)s 4005(50)s 4311(people)s 5016(ha)s 4(v)k 3(e)k 5528(mailed)s 6247(comments)s 7292(or)s 7562(questions)s 8528(to)s 8778(the)s 0 4858(author;)m 733(man)s 3(y)k 1327(of)s 1608(these)s 2166(people)s 2871(ha)s 4(v)k 3(e)k 3382(ported)s 4062(the)s 4420(program,)s 5348(written)s 6092(small)s 6674(de\207nitions,)s 7802(and)s 8217(modi\207ed)s 0 4570(the)m 348(standard)s 1216(packages.)s 480 4196(Future)m 1160(w)s 2(ork)k 1711(could)s 2300(usefully)s 3124(be)s 3(gin)k 3709(with)s 4191(the)s 4539(impro)s 3(v)k 3(ements)k 5951(suggested)s 6953(in)s 7195(this)s 7591(paper:)s 8287(o)s 3(v)k 3(erlap-)k 0 3908(ping)m 489(spanning)s 1418(columns,)s 2346(better)s 2960(semantics)s 3964(for)s 4312(a)s 4(v)k 6(ailable)k 5231(space,)s 5880(and)s 6294(especially)s 7314(horizontal)s 8349(g)s 1(alle)k 3(ys.)k 0 3620(Support)m 814(for)s 1147(non-)s 1575(European)s 2544(languages)s 3547(is)s 3752(also)s 4185(needed.)s 5022(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 5977(the)s 6320(main)s 6850(task)s 7291(is)s 7496(the)s 7839(de)s 6(v)k 3(elopment)k 0 3332(of)m 271(an)s 553(interacti)s 6(v)k 3(e)k 1607(document)s 2610(editor)s 3227(based)s 3829(on)s 4126(Lout.)s 4741(A)s 4971(structure)s 5861(editor)s 6478(similar)s 7199(to)s 7438(Lilac)s 7980([13],)s 8484(which)s 0 3044(already)m 753(has)s 1119(objects)s 1843(and)s 2243(user)s 4(-)k 2705(de\207ned)s 3463(symbols,)s 4364(is)s 4570(en)s 9(visaged;)k 5626(since)s 6168(cross)s 6706(references)s 7733(are)s 8076(easy)s 8550(when)s 0 2756(the)m 343(whole)s 979(document)s 1977(is)s 2182(a)s 4(v)k 6(ailable,)k 3135(the)s 3478(only)s 3953(major)s 4564(ne)s 6(w)k 5006(problem)s 5857(is)s 6062(the)s 6405(treatment)s 7360(of)s 7626(g)s 1(alle)k 3(ys,)k 8400(includ-)s 0 2468(ing)m 359(the)s 707(e)s 3(xpansion)k 1732(and)s 2136(retraction)s 3107(of)s 3378(recepti)s 6(v)k 3(e)k 4300(symbols.)s 240 fnt2 0 1719(Note.)m 240 fnt1 657 1720(Since)m 1253(the)s 1610(abo)s 3(v)k 3(e)k 2240(w)s 2(as)k 2670(written)s 3412(the)s 3768(author)s 4448(has)s 4827(completed)s 5889(a)s 6064(re)s 6(vised)k 6815(v)s 3(ersion)k 7581(of)s 7861(Basser)s 8567(Lout,)s 0 1432(in)m 243(which)s 885(the)s 1233(problem)s 2090(concerning)s 3206(a)s 4(v)k 6(ailable)k 4114(space)s 4701(mentioned)s 5769(in)s 6012(Section)s 6786(2.5)s 7132(has)s 7502(been)s 8011(resolv)s 3(ed.)k 240 fnt2 0 683(Ackno)m 2(wledgment.)k 240 fnt1 2027 684(The)m 2534(author)s 3283(gratefully)s 4344(ackno)s 6(wledges)k 5824(man)s 3(y)k 6485(v)s 6(aluable)k 7424(discussions)s 8644(with)s 0 396(Douglas)m 862(W)s 22(.)k 1183(Jones,)s 1835(especially)s 2857(during)s 3548(the)s 3909(de)s 6(v)k 3(elopment)k 5209(of)s 5493(the)s 5854(g)s 1(alle)k 3(y)k 6501(abstraction;)s 7674(and)s 8091(also)s 8543(man)s 3(y)k 0 108(helpful)m 732(comments)s 1766(on)s 2063(presentation)s 3288(by)s 3582(the)s 3930(anon)s 3(ymous)k 5083(referee.)s grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 39 40 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt2 vec2 /Times-Bold LoutRecode /fnt2 { /Times-Boldfnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt3 vec2 /Times-Italic LoutRecode /fnt3 { /Times-Italicfnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 0.0 0.0 0.0 LoutSetRGBColor 5706 -1579(-)m 5834(39)s 6125(-)s 9066 13414 0 13414 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore 240 fnt2 0 12961(Refer)m 4(ences)k 240 fnt1 0 12507(1.)m 480(Kingston,)s 1501(Jef)s 6(fre)k 3(y)k 2244(H..)s 2677(Document)s 3770(F)s 3(ormatting)k 4918(with)s 5436(Lout)s 5888(.)s 6088(T)s 16(ech.)k 6690(Rep.)s 7216(408)s 7659(\(1991\))s 8286(,)s 8429(Basser)s 480 12219(Department)m 1668(of)s 1939(Computer)s 2956(Science,)s 3806(The)s 4234(Uni)s 6(v)k 3(ersity)k 5288(of)s 5559(Sydne)s 3(y)k 15(,)k 6367(Australia)s 7242(.)s [ /Dest /LOUT12_1748_s7_0_1 /DEST pdfmark 0 11716(2.)m 480(Kingston,)s 1492(Jef)s 6(fre)k 3(y)k 2227(H..)s 2652(A)s 2910(ne)s 6(w)k 3385(approach)s 4347(to)s 4613(document)s 5645(formatting)s 6646(.)s 6838(T)s 16(ech.)k 7432(Rep.)s 7950(412)s 8392(\(1991\))s 9019(,)s 480 11428(Basser)m 1177(Department)s 2365(of)s 2636(Computer)s 3653(Science,)s 4503(The)s 4931(Uni)s 6(v)k 3(ersity)k 5985(of)s 6256(Sydne)s 3(y)k 15(,)k 7064(Australia)s 7939(.)s [ /Dest /LOUT12_1748_s7_0_2 /DEST pdfmark 0 10925(3.)m 480(Kingston,)s 1491(Jef)s 6(fre)k 3(y)k 2224(H..)s 2647(The)s 3101(Basser)s 3824(Lout)s 4362(Document)s 5445(F)s 3(ormatter)k 6383(,)s 6516(1991)s 6971(.)s 7161(Computer)s 8204(program;)s 480 10637(V)m 26(ersion)k 1287(2)s 1480(publicly)s 2337(a)s 4(v)k 6(ailable)k 3264(in)s 3526(the)s 240 fnt3 3893 10639(pub)m 240 fnt1 4326 10637(subdirectory)m 5595(of)s 5885(the)s 6252(home)s 6859(directory)s 7794(of)s 240 fnt3 8084 10639(ftp)m 240 fnt1 8408 10637(to)m 8667(host)s 240 fnt3 480 10351(ftp.cs.su.oz.au)m 240 fnt1 1924 10349(with)m 2439(login)s 3021(name)s 240 fnt3 3628 10351(anonymous)m 240 fnt1 4808 10349(and)m 5246(no)s 5572(passw)s 2(ord.)k 6671(Distrib)s 4(ution)k 7912(via)s 8297(email)s 8916(is)s 480 10061(a)m 4(v)k 6(ailable)k 1388(for)s 1726(non-)s 240 fnt3 2154 10063(ftp)m 240 fnt1 2459 10061(sites.)m 3047(All)s 3407(enquiries)s 4334(to)s 4573(jef)s 6(f@cs.su.oz.au.)k [ /Dest /LOUT12_1748_s7_0_3 /DEST pdfmark 0 9558(4.)m 480(Furuta,)s 1211(Richard,)s 2075(Sco\207eld,)s 2965(Jef)s 6(fre)k 3(y)k 15(,)k 3710(and)s 4113(Sha)s 3(w)k 15(,)k 4734(Alan.)s 5363(Document)s 6419(formatting)s 7480(systems:)s 8402(surv)s 3(e)k 3(y)k 15(,)k 480 9270(concepts,)m 1424(and)s 1828(issues)s 2390(.)s 240 fnt3 2554 9272(Computing)m 3673(Surve)s 7(ys)k 240 fnt2 4465 9269(14)m 240 fnt1 4699 9270(,)m 4806(417\211472)s 5700(\(1982\))s 6327(.)s [ /Dest /LOUT12_1748_s7_0_4 /DEST pdfmark 0 8765(5.)m 480(K)s 6(ernighan,)k 1645(Brian)s 2287(W)s 22(.)k 2649(and)s 3107(Cherry)s 15(,)k 3917(Lorinda)s 4789(L..)s 5213(A)s 5497(system)s 6275(for)s 6667(typesetting)s 7824(mathematics)s 9022(.)s 240 fnt3 480 8479(Communications)m 2158(of)s 2439(the)s 2784(A)s 7(CM)k 240 fnt2 3351 8476(18)m 240 fnt1 3585 8477(,)m 3692(182\211193)s 4576(\(1975\))s 5203(.)s [ /Dest /LOUT12_1748_s7_0_5 /DEST pdfmark 0 7977(6.)m 480(Kingston,)s 1488(Jef)s 6(fre)k 3(y)k 2218(H..)s 2638(Fig)s 3033(\211)s 3236(a)s 3425(Lout)s 3961(package)s 4824(for)s 5185(dra)s 3(wing)k 6042(\207gures)s 6684(.)s 6871(T)s 16(ech.)k 7460(Rep.)s 7973(411)s 8392(\(1991\))s 9019(,)s 480 7689(Basser)m 1177(Department)s 2365(of)s 2636(Computer)s 3653(Science,)s 4503(The)s 4931(Uni)s 6(v)k 3(ersity)k 5985(of)s 6256(Sydne)s 3(y)k 15(,)k 7064(Australia)s 7939(.)s [ /Dest /LOUT12_1748_s7_0_6 /DEST pdfmark 0 7184(7.)m 480(Reid,)s 1042(Brian)s 1634(K..)s 2034(A)s 2268(High-)s 2815(Le)s 6(v)k 3(el)k 3409(Approach)s 4413(to)s 4656(Computer)s 5677(Document)s 6737(Production)s 7784(.)s 7952(In)s 240 fnt3 8212 7186(Pr)m 10(oceed-)k 480 6898(ings)m 934(of)s 1216(the)s 1562(7th)s 1924(Symposium)s 3072(on)s 3367(the)s 3713(Principles)s 4751(of)s 5033(Pr)s 10(o)k 2(gr)k 3(amming)k 6417(Langua)s 2(g)k 2(es)k 7521(\(POPL\),)s 8371(Las)s 8773(V)s 26(e-)k 480 6610(gas)m 868(NV)s 240 fnt1 1192 6608(,)m 1299(pages)s 1895(24\21131)s 2470(,)s 2577(1980)s 3052(.)s [ /Dest /LOUT12_1748_s7_0_7 /DEST pdfmark 0 6103(8.)m 480(Joseph)s 1207(F)s 19(.)k 1443(Ossanna.)s 2436(Nrof)s 6(f/T)k 8(rof)k 6(f)k 3605(User')s 13(s)k 4284(Manual)s 5010(.)s 5193(T)s 16(ech.)k 5777(Rep.)s 6285(54)s 6597(\(1976\))s 7224(,)s 7349(Bell)s 7821(Laboratories)s 9019(,)s 480 5815(Murray)m 1251(Hill,)s 1729(NJ)s 2051(07974)s 2645(.)s [ /Dest /LOUT12_1748_s7_0_8 /DEST pdfmark 0 5310(9.)m 480(Knuth,)s 1186(Donald)s 1949(E..)s 240 fnt3 2319 5312(The)m 2731(T)s 2882 5264(E)m 3033 5312(XBook)m 240 fnt1 3675 5310(.)m 3839(Addison-W)s 19(esle)k 3(y)k 5419(,)s 5526(1984)s 6000(.)s [ /Dest /LOUT12_1748_s7_0_9 /DEST pdfmark 0 4807(10.)m 480(Kingston,)s 1485(Jef)s 6(fre)k 3(y)k 2212(H..)s 2629(Eq)s 2973(\211)s 3173(a)s 3359(Lout)s 3892(package)s 4752(for)s 5110(typesetting)s 6232(mathematics)s 7430(.)s 7614(T)s 16(ech.)k 8200(Rep.)s 8711(410)s 480 4519(\(1991\))m 1107(,)s 1248(Basser)s 1980(Department)s 3203(of)s 3509(Computer)s 4561(Science,)s 5446(The)s 5909(Uni)s 6(v)k 3(ersity)k 6998(of)s 7304(Sydne)s 3(y)k 15(,)k 8147(Australia)s 9022(.)s 480 4231(\(Contains)m 1461(an)s 1744(appendix)s 2677(describing)s 3726(the)s 4074(P)s 3(as)k 4454(P)s 3(ascal)k 5116(formatter)s 13(.\))k [ /Dest /LOUT12_1748_s7_0_10 /DEST pdfmark 0 3728(11.)m 480(Kingston,)s 1478(Jef)s 6(fre)k 3(y)k 2198(H..)s 2608(A)s 2851(be)s 3(ginners')k 3903(guide)s 4504(to)s 4756(Lout)s 5208(.)s 5385(T)s 16(ech.)k 5964(Rep.)s 6467(409)s 6891(\(1991\))s 7518(,)s 7638(Basser)s 8348(Depart-)s 480 3440(ment)m 1018(of)s 1289(Computer)s 2306(Science,)s 3156(The)s 3584(Uni)s 6(v)k 3(ersity)k 4638(of)s 4909(Sydne)s 3(y)k 15(,)k 5717(Australia)s 6592(.)s [ /Dest /LOUT12_1748_s7_0_11 /DEST pdfmark 0 2937(12.)m 480(Kingston,)s 1475(Jef)s 6(fre)k 3(y)k 2193(H..)s 2600(T)s 19(ab)k 3017(\211)s 3207(a)s 3384(Lout)s 3907(package)s 4757(for)s 5106(formatting)s 6177(tables)s 6725(.)s 6900(T)s 16(ech.)k 7476(Rep.)s 7977(413)s 8392(\(1991\))s 9019(,)s 480 2649(Basser)m 1177(Department)s 2365(of)s 2636(Computer)s 3653(Science,)s 4503(The)s 4931(Uni)s 6(v)k 3(ersity)k 5985(of)s 6256(Sydne)s 3(y)k 15(,)k 7064(Australia)s 7939(.)s [ /Dest /LOUT12_1748_s7_0_12 /DEST pdfmark 0 2146(13.)m 480(Brooks,)s 1279(K)s 6(enneth)k 2141(P)s 26(..)k 2472(Lilac:)s 3068(a)s 3234(tw)s 2(o-vie)k 6(w)k 4183(document)s 5187(editor)s 5744(.)s 240 fnt3 5908 2148(IEEE)m 6490(Computer)s 240 fnt1 7453 2146(,)m 7560(7\21119)s 8091(\(1991\))s 8718(.)s [ /Dest /LOUT12_1748_s7_0_13 /DEST pdfmark grestore 0 0 0 0 240 288 60 1417 -15423 LoutGr2 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Trailer %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Symbol %%+ font Helvetica %%DocumentSuppliedResources: procset LoutStartUp %%+ procset LoutTabPrependGraphic %%+ procset LoutFigPrependGraphic %%+ procset LoutBasicSetup %%+ encoding vec2 %%Pages: 40 %%EOF lout-3.39/doc/design/mydefs0000644000076400007640000003265711363700677014330 0ustar jeffjeff def @TeX { T{ /0.2fo E}X } def @Code right x { { Helvetica Base -1p } @Font lines @Break x } ###################################################### # # # Nodes and trees. # # # ###################################################### import @Fig def @FBox named width { 0.6c } named height { 0.4c } named margin { 0.1c } right x { @Box margin { margin } { width @Wide height @High { /0.5rt |0.5rt @OneCol @OneRow 0.8f @Font x } } } import @Fig def @FEllipse named width { 0.6c } named height { 0.4c } named margin { 0.1c } right x { @Ellipse margin { margin } { height @High { /0.5rt |0.5rt @OneCol @OneRow 0.8f @Font x } } } import @Fig def @FCircle named width { 0.4c } named height { 0.4c } named margin { 0.1c } right x { @Circle margin { margin } { width @Wide height @High { /0.5rt |0.5rt @OneCol @OneRow 0.8f @Font x } } } import @Fig def @JoinFigures left A named linestyle { solid } named linewidth { 0.5 pt } named linecap { round } named dashlength { 0.15 cm } named arrow { noarrow } named headstyle { open } named headwidth { 0.05 cm } named headlength { 0.15 cm } right B { @Line from { {A"@CTR"} ++ {{A"@CTR"} @Angle {B"@CTR"} A"@CIRCUM"} } to { {B"@CTR"} ++ {{B"@CTR"} @Angle {A"@CTR"} B"@CIRCUM"} } linestyle { linestyle } linewidth { linewidth } linecap { linecap } dashlength { dashlength } arrow { arrow } headstyle { headstyle } headwidth { headwidth } headlength { headlength } {} } import @Fig export @LeftSub @RightSub @FirstSub @NextSub @StubSub @Node def @Tree named hmargin { 0.2c } named vmargin { 0.3c } named linestyle { solid } named linewidth { 0.5 pt } named linecap { round } named dashlength { 0.15 cm } named arrow { noarrow } named headstyle { open } named headwidth { 0.05 cm } named headlength { 0.15 cm } body x @Begin def @LeftSub precedence 90 associativity left left root named hmargin { hmargin } named linestyle { linestyle } named linewidth { linewidth } named linecap { linecap } named dashlength { dashlength } named arrow { arrow } named headstyle { headstyle } named headwidth { headwidth } named headlength { headlength } right x { { /vmargin {L::x} } |hmargin root | L@T @JoinFigures linestyle { linestyle } linewidth { linewidth } linecap { linecap } dashlength { dashlength } arrow { arrow } headstyle { headstyle } headwidth { headwidth } headlength { headlength } T } def fixroot precedence 90 left root { |0.5rt root } def firstsub precedence 90 associativity left named hmargin { hmargin } named linestyle { linestyle } named linewidth { linewidth } named linecap { linecap } named dashlength { dashlength } named arrow { arrow } named headstyle { headstyle } named headwidth { headwidth } named headlength { headlength } right x { S::x & S@T @JoinFigures linestyle { linestyle } linewidth { linewidth } linecap { linecap } dashlength { dashlength } arrow { arrow } headstyle { headstyle } headwidth { headwidth } headlength { headlength } T } macro @FirstSub { fixroot //vmargin |0.5rt firstsub } def @NextSub precedence 90 associativity left left others named hmargin { hmargin } named linestyle { linestyle } named linewidth { linewidth } named linecap { linecap } named dashlength { dashlength } named arrow { arrow } named headstyle { headstyle } named headwidth { headwidth } named headlength { headlength } right x { others &hmargin S::x & S@T @JoinFigures linestyle { linestyle } linewidth { linewidth } linecap { linecap } dashlength { dashlength } arrow { arrow } headstyle { headstyle } headwidth { headwidth } headlength { headlength } T } def @RightSub precedence 90 associativity left left root named hmargin { hmargin } named linestyle { linestyle } named linewidth { linewidth } named linecap { linecap } named dashlength { dashlength } named arrow { arrow } named headstyle { headstyle } named headwidth { headwidth } named headlength { headlength } right x { root |hmargin { /vmargin {R::x} } | R@T @JoinFigures linestyle { linestyle } linewidth { linewidth } linecap { linecap } dashlength { dashlength } arrow { arrow } headstyle { headstyle } headwidth { headwidth } headlength { headlength } T } def @StubSub precedence 90 associativity left left root named linestyle { linestyle } named linewidth { linewidth } named linecap { linecap } named dashlength { dashlength } { root | @Figure shape { T@SW T@W -- { 0.1 cm 0.7 cm } T@E -- {-0.1 cm 0.7 cm } T@SE } linestyle { linestyle } linewidth { linewidth } linecap { linecap } dashlength { dashlength } { @Null } } def @Node # named mark {} right root { T:: root # & T@W ++ { -0.2 cm 0.1 cm } @BaseOf mark } @OneCol @OneRow x @End @Tree def @ShowMarks named linewidth { 0.015 cm } named linestyle { dashed } named dashlength { 0.15 cm } named paint { lightgrey } named marks { both } # none, horizontal, vertical, or both right x { @Fig { @Box margin { 0c } linewidth { linewidth } paint { paint } { @Figure shape { marks @Case { { horizontal both } @Yield { -0.3 cm ymark {xsize ymark} ++ {0.3 cm 0} } else @Yield {} } marks @Case { both @Yield [] else @Yield {} } marks @Case { { vertical both } @Yield { xmark -0.3 cm {xmark ysize} ++ {0 0.3 cm} } else @Yield {} } } linewidth { linewidth } linestyle { linestyle } dashlength { dashlength } x } } } import @Fig def @DagBox named top {} named mid {} named base {} { @OneRow { TOP:: @FBox top // MID:: @FBox mid // BASE:: @FBox base } } import @Fig def @BlackDot named diameter { 0.07c } { @Circle margin { 0c } paint { black } { diameter @Wide diameter @High {} } } import @Fig def @TVShape # television shape enclosing points ne, nw, se, sw named nw {} named ne {} named sw {} named se {} named delta { 0.5 cm } { @Figure shape { { {nw @Min sw @Min ne @Min se} -- { delta 0 } } @Label BL { {nw @Max sw @Max ne @Max se} ++ { delta 0 } } @Label TR BL ++ { 0 BL @YDistance TR } @Label TL BL ++ { BL @XDistance TR 0 } @Label BR BL BR [ BR ++ {0 delta} ] BR ++ {delta delta} TR ++ {delta -delta} [ TR -- {0 delta} ] TR TL [ TL -- {0 delta} ] TL -- {delta delta} BL ++ {-delta delta} [ BL ++ {0 delta} ] BL } {} } import @Fig def @FunnyArrow named from {} named to {} named arrow { forward } { @Figure shape {from from ++ {0 from @YDistance to} to} arrow { arrow } {} } def "->" { {Symbol Base} @Font "\256" } #174 decimal def "=>" { {Symbol Base} @Font "\336" } #222 decimal macro @JP { /0.5v } ################################################### # # # Lout keywords. # # # ################################################### def @@Begin { @Code "@Begin" } def @@Break { @Code "@Break" } def @@Case { @Code "@Case" } def @@Database { @Code "@Database" } def @@End { @Code "@End" } def @@Font { @Code "@Font" } def @@Galley { @Code "@Galley" } def @@Graphic { @Code "@Graphic" } def @@HExpand { @Code "@HExpand" } def @@HScale { @Code "@HScale" } def @@High { @Code "@High" } def @@Include { @Code "@Include" } def @@Key { @Code "@Key" } def @@LClos { @Code "@LClos" } def @@LEnv { @Code "@LEnv" } def @@LInput { @Code "@LInput" } def @@Moment { @Code "@Moment" } def @@Next { @Code "@Next" } def @@Null { @Code "@Null" } def @@OneCol { @Code "@OneCol" } def @@OneRow { @Code "@OneRow" } def @@Open { @Code "@Open" } def @@Prepend { @Code "@Prepend" } def @@Rotate { @Code "@Rotate" } def @@Space { @Code "@Space" } def @@SysDatabase { @Code "@SysDatabase" } def @@SysInclude { @Code "@SysInclude" } def @@SysPrepend { @Code "@SysPrepend" } def @@Tag { @Code "@Tag" } def @@Tagged { @Code "@Tagged" } def @@Use { @Code "@Use" } def @@VExpand { @Code "@VExpand" } def @@VScale { @Code "@VScale" } def @@Yield { @Code "@Yield" } def @@Wide { @Code "@Wide" } ################################################### # # # Miscellaneous, mostly graphical definitions. # # # ################################################### def @Leaders { .. @Leaders } def @HLine { @BackEnd @Case { PostScript @Yield { { 0 0 moveto xsize 0 lineto stroke } @Graphic {} } PDF @Yield { { 0 0 m __xsize 0 l S } @Graphic {} } } } def @VDashLine right length { @BackEnd @Case { PostScript @Yield { length @High { 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke } @Graphic {} } PDF @Yield { length @High { [ __mul(3, __pt) ] 0 d 0 0 m 0 __ysize l stroke } @Graphic {} } } } def @LBox right offset { @BackEnd @Case { PostScript @Yield { @OneCol @OneRow { { //0.2c 0.6c @High 1.2c @Wide { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke } @Graphic {} } ||offset @VDashLine 1c } } PDF @Yield { @OneCol @OneRow { { //0.2c 0.6c @High 1.2c @Wide { 0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h q 0.9 g f Q S } @Graphic {} } ||offset @VDashLine 1c } } } } def @Arrow right length { @OneCol @OneRow { 30d @Rotate {0.12c @Wide @HLine} // length @Wide @HLine // "-30d" @Rotate {0.12c @Wide @HLine} } } def @DoubleArrow right length { @OneCol @OneRow { & 180d @Rotate @Arrow length |0io @Arrow length } } def @Put left coord right x { @OneCol @OneRow { coord / | @OneCol @OneRow x } } macro @At { //0io } ################################################### # # # Interpolated example documents. # # # ################################################### def @LittleEndRunPlace { @Galley } def @LittleEndRun force into { @LittleEndRunPlace&&preceding } {} def @LittleTextPlace { @Galley } def @LittleText into { @LittleTextPlace&&preceding } right x { x } def @LittleFootPlace { @Galley } def @LittleFootNote into { @LittleFootPlace&&following } right x { x } def @LittlePageColumn right x { 9px @Break 8p @Font 2.8c @Wide x } def @LittlePage right x { @BackEnd @Case { PostScript @Yield { @HContract @VContract { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke } @Graphic { //0.3c ||0.3c 9px @Break 8p @Font 2.8c @Wide 3.8c @High x ||0.3c //0.3c } } PDF @Yield { @HContract @VContract { 0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l s } @Graphic { //0.3c ||0.3c 9px @Break 8p @Font 2.8c @Wide 3.8c @High x ||0.3c //0.3c } } } } def @LittleFootSect { 1c @Wide @HLine //0.3v @LittleFootPlace ||0.5c } def @LittlePageList right @PageNum { @LittlePage { # |0.5rt @PageNum //0.8v //0.3v @LittleTextPlace //1rt @LittleFootSect } // @LittlePageList @Next @PageNum } def @LittleDocument { @LittlePage { @LittleTextPlace //1rt @LittleFootSect } // @LittlePageList 2 // @LittleEndRunPlace } def @Strange named @Format right @Val { [@Val] } right x { @Format x } lout-3.39/doc/design/s3_00000644000076400007640000000057211363700677013574 0ustar jeffjeff@Section @Title { Definitions } @Begin @PP The need to provide a means of packaging useful pieces of code for easy repeated use was recognised in the very earliest programming languages. This need is even more acute in document formatting, if that is possible, because the majority of users are not programmers and do not understand the code they invoke. @BeginSubSections lout-3.39/doc/design/s5_20000644000076400007640000003343111363700677013600 0ustar jeffjeff@SubSection @Tag { flushing } @Title { The galley flushing algorithm } @Begin @PP Galley components are promoted one by one into the point of appearance in the dynamic parent galley, then carried along with it, ultimately to the root galley and the output file. This process is called @I galley {@I flushing}: the galleys are rivers running together to the sea, and each component is a drop of water. @PP Here is a snapshot of a small dynamic tree, based on the @Code "@PageList" definitions of Section {@NumberOf recursion}: @ID @Fig { @I 10p @Font { output file } A:: @Box linestyle { noline } margin { 0c } ||2c { @I 10p @Font { root galley } //0.2c B:: @Box margin { 0c } linestyle { noline } // @LittlePage { |0.5rt - 1 - //1.2vx &2m A small //1.2vx @Code "@Galley" * C:: @Box margin { 0.01c } linestyle { noline } //1rt @Code "@FootSect" } // @Box margin { 0.3c } 2.8c @Wide 8p @Font @Code "@PageList 2" } ||2c { //0.9c @I 10p @Font { body text } //0.2c D:: @Box margin { 0.3c } 2.8c @Wide 8p @Font paragraph // @Box margin { 0.3c } 2.8c @Wide 8p @Font { of text. } // @Box margin { 0.3c } 2.8c @Wide @Code 8p @Font "@Input" } // @Arrow from { B@W } to { A@E } // @Arrow from { D@W } to { C@E } } The components of the body text galley are lines, except for the special receptive symbol @Code "@Input" which is a placeholder for as yet unread input (Section {@NumberOf lookahead}). The components of the root galley are pages, except for the concluding unexpanded invocation of {@Code "@PageList"}, which is an inexhaustible source of more pages, expanded on demand. @PP The concrete data structure used by Basser Lout permits the galley flushing algorithm to navigate the dynamic tree and find significant features quickly: @ID 10p @Font @Fig maxlabels { 100 } { A:: @Ellipse @I { HEAD } ||1.5c @OneCol @OneRow { B:: @Ellipse @I { RECEIVING * } // @Arrow from { A@CTR ++ {A@CTR @Angle B@W A@CIRCUM} } to { B@W } //0.6c C:: @Ellipse @I { RECEPTIVE } // @Arrow from { A@CTR ++ {A@CTR @Angle C@W A@CIRCUM} } to { C@W } //0.6c D:: @Box margin { 0c } linestyle { noline } // @Arrow from { A@CTR ++ {A@CTR @Angle D@NW A@CIRCUM} } to { D@NW } // @LittlePage { |0.5rt - 1 - //1.2vx &2m A small //1.2vx E:: @Box margin { 0c } linestyle { noline } @Code "@Galley " //1rt F:: @Box margin { 0c } linestyle { noline } @Code "@FootSect " } // @FunnyArrow arrow { forward } from { B@E } to { E@E } // @FunnyArrow arrow { forward } from { C@E } to { F@E } //0.6c C:: @Ellipse @I { GAP } // @Arrow from { A@CTR ++ {A@CTR @Angle C@W A@CIRCUM} } to { C@W } //0.6c C:: @Ellipse @I { RECEPTIVE } // @Arrow from { A@CTR ++ {A@CTR @Angle C@W A@CIRCUM} } to { C@W } //0.6c D:: @Box margin { 0.3c } 2.8c @Wide 8p @Font @Code "@PageList 2" // @Arrow from { A@CTR ++ {A@CTR @Angle D@NW A@CIRCUM} } to { D@NW } // @FunnyArrow from { C@E } to { D@W ++ { 1.8 cm 0 } } } ||1.0c A:: @Ellipse @I { HEAD } & @Arrow from { B@E } to { A@W } ||1.5c @OneCol @OneRow { B:: @Box margin { 0.3c } 2.8c @Wide 8p @Font paragraph // @Arrow from { A@CTR ++ {A@CTR @Angle B@W A@CIRCUM} } to { B@W } //0.6c B:: @Ellipse @I { GAP } // @Arrow from { A@CTR ++ {A@CTR @Angle B@W A@CIRCUM} } to { B@W } //0.6c B:: @Box margin { 0.3c } 2.8c @Wide 8p @Font { of text. } // @Arrow from { A@CTR ++ {A@CTR @Angle B@NW A@CIRCUM} } to { B@NW } //0.6c B:: @Ellipse @I { GAP } // @Arrow from { A@CTR ++ {A@CTR @Angle B@W A@CIRCUM} } to { B@W } //0.6c B:: @Ellipse @I { RECEPTIVE } // @Arrow from { A@CTR ++ {A@CTR @Angle B@W A@CIRCUM} } to { B@W } //0.6c C:: @Box margin { 0.3c } 2.8c @Wide 8p @Font @Code "@Input" // @Arrow from { A@CTR ++ {A@CTR @Angle C@NW A@CIRCUM} } to { C@NW } // @FunnyArrow from { B@E } to { C@W ++ { 1.2 cm 0 } } } } Each galley has a @Eq { HEAD } node whose children are its component objects, separated by @Eq { GAP } nodes recording the inter-component gaps. @PP Each component is preceded by zero or more @I {galley index nodes} of various types. Every receptive symbol has a @Eq { RECEPTIVE } index pointing to it, so that it can be found without searching through its component. If the symbol is currently the target of a galley, it has a @Eq { RECEIVING } index instead which is also linked to the incoming galley. Galleys that are currently without a target are linked to the dynamic tree by @Eq { UNATTACHED } galley indexes, either just after their most recent target if there has been one, or else at their point of invocation. @PP Each galley should be thought of as a concurrent process, although the implementation in C uses coroutines implemented by procedures. A galley may promote its first component only if it has a target, sufficient space is available at the target to receive the component, and the component contains no receptive symbols. This last condition seems to be the key to galley synchronization: it forces a bottom-up promotion regime, preventing pages from flushing to output before text flushes into them, for example. @PP Each galley contains a number of binary semaphores, shown as asterisks in our snapshots when set. At any given moment, a galley process is either running or else is suspended on one of its own semaphores. The @Eq { HEAD } node contains a semaphore which is set when the galley has tried to find a target and failed. Each receptive symbol has a semaphore which is set when that symbol is preventing the first component from being promoted. @PP For example, in the snapshot at the beginning of this section, the root galley is suspended on the @Code "@Galley" symbol, but the text galley is running. It will suspend on the @Code "@Input" symbol after the first two components are promoted. @PP Every galley {@I G}, be it a list of pages, body text, a footnote, or whatever, executes the following algorithm in parallel with every other galley: @DP 1. Initially @I G is unattached. Search forwards or backwards from its @Eq { UNATTACHED } index as required, to find a receptive symbol @I S which can expand to reveal a target for {@I G}. @DP 2. If no @I S can be found, suspend on the attachment semaphore. Resume later from step 1. @DP 3. Expand @I S to reveal the target of {@I G}. Preserve {@I S}'s semaphore by moving it to the first receptive symbol within the expansion of {@I S}. @DP 4. Calculate the available width and height at the target, and if @I G is still a pure parse tree, use the environment attached to @I G and the style information from the target to evaluate @I G as in Section {@NumberOf functional}. @DP 5. Examine the components of @I G one by one. For each component there are three possibilities: @PP @I ACCEPT. If the component fits into the available space, and has no other problems, then promote it into the target. If this is the first component promoted into this target, and @I G is a forcing galley (Section {@NumberOf lookahead}), delete every receptive symbol preceding the target in the parent galley. If @I G is the root galley, render the component on the output file and dispose it; @PP @I REJECT. If the component is too large for the available space, or a @Eq { FOLLOWS } index (described below) forbids its promotion into this target, then detach @I G from the target. If this was the first component at this target, @I S has been a complete failure, so undo step 3 (Basser Lout is not able to undo step 4); otherwise delete the target. Return to step 1 and continue immediately; @PP @I SUSPEND. If the component contains a receptive symbol, it cannot be promoted yet. If this symbol is the target of a galley that was written to an auxiliary file on a previous run, read in that galley and flush it. Otherwise suspend on the receptive symbol's semaphore; resume later from step 4. @DP 6. Terminate when the galley is empty. @DP At various points in this algorithm, receptive symbols (and their semaphores) are deleted in the dynamic parent galley, possibly permitting it to resume flushing. When this happens, Basser Lout resumes the parent immediately after @I G suspends or terminates. Also, whenever a component is promoted, any child galleys connected to it by @Eq { UNATTACHED } indexes must be resumed, since these galleys may be able to find a target now. A good example of this situation occurs when a line of body text with one or more footnotes is promoted onto a page. Basser Lout gives priority to such children, suspending @I G while each is given a chance to flush. @PP Basser Lout searches for the first target of @I G only in regions of the dynamic tree that will clearly precede or follow {@I G}'s invocation point in the final printed document, whichever is specified in the @Code into clause; subsequent targets are sought later in the same galley as the first. An exception to this rule, whose necessity will be made clear later, is that a first @Code following target will be sought within a dynamic sibling galley preceding {@I G}'s invocation point: @ID 10p @Font @Fig { { @I { dynamic parent } //0.2c @Box 2.8c @Wide 4.5c @High { //0.5c A:: @Box margin { 0c } linestyle { noline } @Code "@XTarget" //1.0c C:: @Box margin { 0c } linestyle { noline } @Eq { UNATTACHED } //1.3c @Code "@XTarget" } } ||1.5c { //0.6c B:: @Box margin {0c} linestyle {noline} @Code "X into { @XTarget&&following }" //0.2c @Box 2.8c @Wide 1.5c @High { //0.8c @Code "@GTarget" } //1.0c D:: @Box margin {0c} linestyle {noline} @Code "G into { @GTarget&&following }" //0.2c @Box 2.8c @Wide 2.5c @High {} } // @Arrow from { A@E ++ {0.2 cm 0} } to { B@W -- {0.2 cm 0} } // @Arrow from { C@E ++ {0.2 cm 0} } to { D@W -- {0.2 cm 0} } } Here @I G will find the @Code "@GTarget" target within {@I X}. This is dangerous, since if the first component of @I G is then promoted via @I X into the first {@Code "@XTarget"} rather than into the second, {@I G}'s target will not appear later in the final printed document than its invocation point, as required by the @Code into clause. @PP Accordingly, when such a target is chosen, two special galley indexes are inserted and linked together: a @Eq { PRECEDES } index at {@I G}'s invocation point, and a @Eq { FOLLOWS } index at the first component of {@I G}. The algorithm checks before promoting any @Eq { FOLLOWS } index that its promotion would not place it earlier than the corresponding @Eq { PRECEDES } index in the same galley, and rejects the component if it would. Since @Eq { PRECEDES } and @Eq { FOLLOWS } indexes are rarely used, this check can be implemented by linear search. @PP When two components are separated by {@Code "/"}, as opposed to the more usual {@Code "//"}, each influences the horizontal position of the other. Because of this, the @I SUSPEND action is in fact taken if a receptive symbol occurs in any component separated from the first by {@Code "/"} operators only. Again, linear search forwards to the first {@Code "//"} suffices for this check. @PP A good illustration of these unusual cases is afforded by the @Code "@Align" symbols from the standard DocumentLayout package. These are used to produce displayed equations, aligned on their equals signs despite being separated by arbitrary body text. @PP The @Code "@Align" symbols are packaged neatly for the convenience of the non-expert user, but we will show just the essence of the implementation here. First, an @Code "@AlignList" galley is created which contains an infinite supply of @Code "@AlignPlace" receptive symbols separated by @Code "/" operators: @ID @Fig { { @I { body text galley } //0.2c @Box 2.8c @Wide 4.0c @High { //1.5c A:: @Box margin { 0c } linestyle { noline } @Code "@Galley" } } ||1.5c { //2.4c B:: @Box margin { 0c } linestyle { noline } @Code "@AlignList" //0.2c @Box { @Code "@AlignPlace" //1vx @Code "@AlignPlace" //1vx @Code "..." //1vx @Code "@EndAlignList" } } // @Arrow from { A@E ++ {0.2 cm 0} } to { B@W -- {0.2 cm 0} } } Then equations like @ID @ShowMarks @Eq { f(x) ^= g(x) + 2 } are created and sent to @Code "@AlignPlace&&following" targets. They collect in the @Code "@AlignList" galley and are aligned there: @ID @Fig { { @I { body text galley } //0.2c @Box 2.8c @Wide 4.0c @High { //1.5c A:: @Box margin { 0c } linestyle { noline } @Code "@Galley" } } ||1.5c { //2.4c B:: @Box margin { 0c } linestyle { noline } @Code "@AlignList" //0.2c @Box { @Line linestyle { dashed } from { xmark ysize } to { xmark 0 } { @Eq { f(x) ^= g(x) + 2 } /1vx @Eq { f(x) - g(x) ^= 2 } /1vx @Code "..." /1vx @Code "@EndAlignList" } } } // @Arrow from { A@E ++ {0.2 cm 0} } to { B@W -- {0.2 cm 0} } } The @Code "@AlignList" galley does not flush, because its first component is connected to a receptive symbol by @Code "/" operators. @PP After the last equation, an empty forcing galley is sent to {@Code "@EndAlignList"}, deleting the two remaining receptive symbols from the @Code "@AlignList" galley and permitting it to flush. @Eq { FOLLOWS } indexes ensure that each equation finds a target placed in the body text just after its point of invocation, so the equations return, aligned, to approximately the points where they were invoked. Notice that the flushing of body text is suspended until the list of equations is completed, as it must be, since the horizontal position of the first equation cannot be known until the last equation is added to the list. @PP Layout quality can occasionally be improved by rejecting a component that could be promoted -- for example, a component of body text that carries a footnote too large to fit on the current page. Since Lout does not specify how breaking decisions are made, beyond the basic constraints imposed by available space and @Code into clauses, in principle such high quality breaking could be added to the implementation with no change to the language. However, the generality of the galley flushing algorithm, and its already considerable complexity, make this a daunting problem in practice, although a fascinating one. @TeX [9], with its unnested set of `floating insertions' clearly identifiable as each page is begun, has the advantage in this respect. @End @SubSection lout-3.39/doc/design/s5_90000644000076400007640000000003611363700677013602 0ustar jeffjeff@EndSubSections @End @Section lout-3.39/doc/design/s3_10000644000076400007640000000536211363700677013577 0ustar jeffjeff@SubSection @Tag { operators } @Title { Operators } @Begin @PP It is evident from the example of Eqn that user-defined operators are needed that mimic the primitive ones in taking objects as parameters and returning objects as results. For example, to define a superscript operator so that @ID @Code "2 sup n" appears as {@Eq {2 sup @R n}}, the following operator definition may be used: @ID @OneRow @Code { "def sup" " precedence 50" " associativity right" " left x" " right y" "{" " @OneRow { | {-2p @Font y} ^/0.5fk x }" "}" } The @Code "sup" operator has precedence 50, is right associative, takes two objects as parameters passed on the left and right, and returns the object between braces as result. This object has the structure @ID @I +2p @Font { | @ShowMarks @Code y / @ShowMarks @Code x } but with the first row mark hidden by the @Code "@OneRow" operator, and @Code y two points smaller than it would otherwise have been. The length @Code "0.5f" specifies half the current font size; Figure {@NumberOf gapmodes} describes the @Code k gap mode. In the Eq equation formatting package [10] the equation as a whole is set in italic font, and @Code 2 is an identifier whose body contains a font change back to Roman. The digits @Code 0 to @Code 9 are classed as punctuation characters, permitting @Code 234 for example to be interpreted as a sequence of three identifiers. @PP These definitions are easily implemented by a standard symbol table and an operator precedence parser. Algol block structure with the usual scope rules was adopted as a matter of course. @PP Operators are limited to at most two parameters, left and right, and the parameters cannot be given default values. @I Named parameters solve both problems: @ID @OneRow @Code { "def @Preface" " named @Tag {}" " named @Title { Preface }" " right @Body" "{" " Bold @Font @Title" " //0.3v @Body" "}" } The default value appears just after the parameter's declaration, between braces. Invocations have a natural syntax: @ID @OneRow @Code { "@Preface" " @Title { About this book }" "{" " Few observers would have supposed in 1984, that ..." "}" } with the actual named parameters following directly after the operator, before any right parameter. In this example, @Code "@Tag" will receive its default value, and a less expert user could safely omit the @Code "@Title" parameter as well. @PP Lout permits named parameters to have parameters, a feature with applications to bibliographic databases, running headers, and other places where a format has to be supplied before content is known. One could go further and provide a complete lambda calculus, with functions as first-class objects, provided care was taken not to intimidate the non-expert user. @End @SubSection lout-3.39/doc/design/s6_90000644000076400007640000000003611363700677013603 0ustar jeffjeff@EndSubSections @End @Section lout-3.39/doc/design/s4_00000644000076400007640000001000511363700677013565 0ustar jeffjeff@Section @Tag { functional } @Title { Implementation of the functional subset } @Begin @PP The objects and definitions of Lout are very similar to those found in other functional languages, and they form a natural subset of the language. So we pause here and present an overview of the Basser Lout object evaluation algorithm. @PP The problem is to take an unsized object (pure parse tree), its environment (Section {@NumberOf defs.impl}), and its style (Section {@NumberOf style}), and to produce a PostScript file for rendering the object on an output device. This file is essentially a sequence of instructions to print a given string of characters in a given font at a given point. @PP Before the algorithm begins, the parse tree must be obtained, either by parsing input or by copying from the symbol table. Afterwards the data structure must be disposed. The algorithm proper consists of five passes, each a recursive traversal of the structure from the root down to the leaves and back. @DP @I {1. Evaluation of unsized objects.} On the way down, calculate environments and replace non-recursive, non-receptive symbols by their bodies (Section {@NumberOf defs.impl}); broadcast fonts to the leaves, and paragraph breaking and spacing styles to the paragraph nodes. On the way back up, delete @Eq { FONT }, @Eq { BREAK }, and @Eq { SPACE } nodes, and insert @Eq { SPLIT }, @Eq { COL }, and @Eq { ROW } nodes (Section {@NumberOf objects}). @DP @I {2. Width calculations and breaking.} Calculate the width of every subobject from the bottom up. As described in Section {@NumberOf objects}, @Eq { WIDE } nodes may trigger object breaking sub-traversals during this pass. @DP @I {3. Height calculations.} Calculate the height of every subobject, from the bottom up. @DP @I {4. Horizontal coordinates.} Calculate the horizontal coordinate of each subobject from the top down, and store each leaf's coordinate in the leaf. @DP @I {5. Vertical coordinates and PostScript generation.} Calculate the vertical coordinate of every subobject from the top down, and at each leaf, retrieve the character string, font, and horizontal coordinate, and print the PostScript instruction for rendering that leaf. @DP Figure {@NumberOf components} gives the amount of code required for each @Figure @Tag { components } @Caption { Major components of the Basser Lout interpreter, showing the approximate number of lines of C code. } @Begin @Tab vmargin { 0.5vx } @Fmta { @Col @RR A ! @Col B ! @Col @RR C } @Fmtb { @Col @RR A ! @Col B ! @Col C } { @Rowa A { 1. } B { Initialization } C { 200 } @Rowa A { 2. } B { Memory allocation, ordered dag operations } C { 400 } @Rowa A { 3. } B { Lexical analysis, macros, file handling } C { 1,350 } @Rowa A { 4. } B { Parsing of objects and definitions } C { 1,150 } @Rowa A { 5. } B { Symbol table and call graph } C { 600 } @Rowa A { 6. } B { Evaluation of pure parse trees } C { 1,650 } @Rowa A { 7. } B { Reading, storing, and scaling of fonts } C { 600 } @Rowa A { 8. } B { Cross references and databases } C { 1,000 } @Rowa A { 9. } B { Width and height calculations, and breaking } C { 700 } @Rowa A { 10. } B { @I Constrained and @I AdjustSize } C { 700 } @Rowa A { 11. } B { Transfer of sized objects into galley tree } C { 450 } @Rowa A { 12. } B { Galley flushing algorithm } C { 1,500 } @Rowa A { 13. } B { Coordinate calculations and PostScript output } C { 700 } @Rowa A { 14. } B { Debugging and error handling } C { 1,200 } @Rowb vmargin { 0.1c } C { @Line } @Rowa C { 12,200 } } @End @Figure pass. Symmetry between horizontal and vertical is exploited throughout Basser Lout, and passes 2 and 3, as well as 4 and 5, are executed on shared code. @PP The author can see no simple way to reduce the number of passes. The introduction of horizontal galleys (Section {@NumberOf horizontal}) would remove the need for the object breaking transformations within this algorithm that are the principal obstacles in the way of the merging of passes 2 and 3. @End @Section lout-3.39/doc/design/s2_00000644000076400007640000000115011363700677013564 0ustar jeffjeff@Section @Title { Objects } @Begin @PP The essence of any move to a higher level is the introduction of some abstraction which serves to organize the low-level operations, resulting in a more succinct expression of their common combinations at the cost of some loss of detailed control. The early part of the Lout project was spent in the development of such an abstraction for the building blocks of documents, one which could explain, not just the simple phenomena of words, lines, and paragraphs, but also the alignment of columns in tables, and the complex nested structures of equations. @BeginSubSections lout-3.39/doc/design/s3_30000644000076400007640000001232011363700677013571 0ustar jeffjeff@SubSection @Tag { modules } @Title { Modules } @Begin @PP It is well accepted that the visibility of symbols is not adequately controlled by Algol block structure. The author is aware of several major problems of this kind in document formatting. @PP One problem is that some symbols should be visible only within restricted parts of a document. For example, we naturally expect equation formatting to be accomplished like this: @ID @OneRow @Code { "surrounding text" "@Eq { {x sup 2 + 1} over 4 }" "surrounding text" } with the symbols {@Code "sup"}, {@Code "over"}, etc., visible only within the equation, not in the surrounding text. @PP It seems natural to define these symbols within {@Code "@Eq"}, since they are local to equations. It only remains then to decree that symbols local to @Code "@Eq" are to be visible within its actual right parameter, and this is done by replacing the right formal parameter with a @I body parameter: @ID @OneRow @Code { "export sup over" "def @Eq" " body @Body" "{" " def sup ..." " def over ..." "" " Slope @Font @Body" "}" } The @Code export clause lists the identifiers which are permitted to be visible outside their usual range, the body of {@Code "@Eq"}; and the @Code body declaration imports them into (makes them visible within) the actual right parameter of each invocation of {@Code "@Eq"}. This arrangement has proven very convenient for defining a variety of special-purpose packages. @PP Another problem arises when global symbols, such as the ones used for headings and paragraph separators, call on values that the non-expert user will need to modify, such as the initial font or paragraph indent. These values are like parameters of the document as a whole, so it is natural to try this: @ID @OneRow @Code { "export @Heading @PP ..." "def @BookLayout" " named @InitialFont { Times Base 12p }" " named @InitialBreak { adjust 14p }" " named @ColumnWidth { 6i }" " ..." "{" " def @Heading ..." " def @PP ..." "}" } Now @Code "@Heading" and @Code "@PP" may invoke @Code "@InitialFont" and the other parameters. To make @Code "@Heading" and @Code "@PP" visible throughout the document, we need only add a body parameter to @Code "@BookLayout" and present the entire document as @ID @OneRow @Code { "@BookLayout" " @InitialFont { Helvetica Base 10p }" " @InitialBreak { adjust 12p }" "{" " The document." "}" } but for practical reasons given below we prefer not to enclose the entire document in braces. Instead, we write @ID @OneRow @Code { "@Use { @BookLayout" " @InitialFont { Helvetica Base 10p }" " @InitialBreak { adjust 12p }" "}" "The document." } which has the same effect: @Code "@Use" makes the exported symbols of @Code "@BookLayout" visible for the remainder of the document, and is permitted only at the beginning. @PP The third feature that affects visibility, and which will prove useful for cross referencing (Section {@NumberOf cross}), is the @Code "@Open" symbol. It makes the exported symbols of its left parameter visible within its right parameter, and is therefore similar to the Pascal @Code with statement. @PP It could be argued that Lout is over-supplied with these visibility modifying features: the body parameter, @Code "@Use" and @Code "@Open" do not seem sufficiently different from each another. The @Code "@Open" symbol is the most general, being capable of replacing the other two. For example, @ID @OneRow @Code { "@Use { x }" "@Use { y }" "Body of document" } can be replaced by @ID @OneRow @Code { "x @Open {" "y @Open {" "Body of document" "}}" } and, taking the @Code "@Eq" symbol above as example, we could eliminate its body parameter, add @ID @Code "def @Body right x { Slope @Font x }" to the exported definitions of {@Code "@Eq"}, and replace @ID @Code "@Eq { object }" by @ID @Code "@Eq @Open { @Body { object } }" If @Code "@Eq" is a galley (Section {@NumberOf galleys}), @Code "@Body" must take over that function. But one would not want to write these clumsy expressions in practice, and the enclosure of large quantities of input in extra braces could cause Basser Lout to run out of memory (Section {@NumberOf lookahead}). @PP A quite separate kind of visibility problem arises when expert users wish to define an object or operator for repeated use within, say, equations: @ID @Code "def isum { sum from i=1 to n }" As it stands this can only be placed within the @Code "@Eq" package itself, where @Code "sum" and the other symbols are visible, but it is not desirable to modify the source code of a standard package. Lout provides an @Code "import" clause to solve this problem: @ID @OneRow @Code { "import @Eq" "def isum { sum from i=1 to n }" } may appear after @Code "@Eq" is defined, and it will make the exported symbols of @Code "@Eq" visible within the body of {@Code "isum"}. This feature complicates the treatment of environments (Section {@NumberOf defs.impl}), and even introduces an insecurity, when @Code isum is invoked outside an equation. A simpler approach would be to allow only one symbol in an @Code import clause, and treat the following definition exactly like a local definition of that symbol; but then it would not be possible to define symbols using the resources of more than one of the standard packages. @End @SubSection lout-3.39/doc/user/0000700000076400007640000000000011446022200012551 5ustar jeffjefflout-3.39/doc/user/str_figs0000644000076400007640000003325511363700677014361 0ustar jeffjeff@Section @Title { Figures and tables } @Tag { figures } @Begin @PP Figures are created in a similar way to footnotes: figures. @Index { figures } @ID @OneRow @Code { "@Figure" " @Caption { Basser Lout }" "@Diag vstrut { yes } treehsep { 1c } {" " @HTree { @Box Lout @FirstSub arrow { yes } @Box PostScript }" "}" } The @Code "@Figure" symbol places the following object (which in this example is figure. @Index @Code "@Figure" created using the advanced graphics features of Chapter {@NumberOf diagrams}) at the top of the following column or page, @Figure @Tag { figex } @Caption { Basser Lout } @Diag vstrut { yes } treehsep { 1c } { @HTree { @Box Lout @FirstSub arrow { yes } @Box PostScript } } labelled by the @Code "@Caption" option and automatically numbered. You captions. @RawIndex { captions } captions.figures @SubIndex { in @Code "@Figure" and @Code "@Table" } can see this example at the top of page {@PageOf figex}. Tables are table. @Index @Code "@Table" obtained in the same way using {@Code "@Table"} instead of {@Code "@Figure"}. There is a third symbol called {@Code "@Floater"}. It won't be mentioned again, but it works exactly like like @Code "@Figure" and {@Code "@Table"}. @PP @Code "@Figure" and @Code "@Table" each have an @Code "@InitialLanguage" option which determines the language of the figure or table. If this is omitted, the language of the document as a whole will be used, not the language where the figure or table occurs. @PP The two symbols also have a @Code "@CaptionPos" option, which determines whether the caption appears above or below the figure or table. The default is {@Code "Below"}, the alternative is {@Code "Above"}. @PP The question of what is a suitable running header to print on pages containing figures and tables (possibly from different sections) is a rather awkward one. On any page with a figure or table at the top, Lout uses whatever running header was appropriate for the text on the previous page. In practice it seems to work quite well. @PP If your document contains many figures, large figures, or multi-page figures, you are likely to encounter cases where Lout's assignment of figures to pages is not pleasing. In that case, you can improve things by moving the figures around within the body text, and by using the @Code "@Location" option of the @Code "@Figure" symbol, which determines location. @Index @Code "@Location" where the figure will appear. Its possible values are @DP @Tab @Fmta { @Col @Code A ! @Col B } { @FirstRowa A { PageTop } B { The figure will appear at the top of the following page, occupying the full page width; or, if there is insufficient space there (owing to other figures already present), at the top of the first subsequent page with sufficient space. } @Rowa A { EvenPageTop } B { Like @Code PageTop except that the first page of the figure or table will be an even-numbered (left-hand or verso) page -- useful for double-page spreads. } @Rowa A { FullPage } B { Like {@Code PageTop} except that nothing else will appear on the same page as the figure except the usual running headers and footers, and possibly other @Code FullPage figures and tables. @FootNote { This location replaces the @Code "@FullPage" option of earlier versions of Lout, which has been withdrawn. } } @Rowa A { EvenFullPage } B { Like {@Code FullPage} except that the first page of the figure or table will be an even-numbered (left-hand or verso) page, like {@Code EvenPageTop}. } @Rowa A { PageFoot } B { The figure will appear at the foot of the current page, occupying the full page width; or, if there is insufficient space there, at the top of the following page and so on as for {@Code PageTop}. } @Rowa A { ColTop } B { The figure will appear at the top of the following column, occupying the column width; or, if there is insufficient space there, at the top of the first subsequent column with sufficient space. This is different from @Code PageTop only in multi-column documents. } @Rowa A { ColFoot } B { The figure will appear at the foot of the current column, occupying the column width; or, if there is insufficient space there, at the top of the following column as for {@Code ColTop}. This differs from @Code PageFoot only in multi-column documents. } @Rowa A { ColEnd } B { The figure will appear in a column at the end of the document (or chapter, appendix etc. in the case of books). There is no @Code PageEnd value corresponding to {@Code ColEnd}. } @Rowa A { AfterLine } B { The figure will appear as a column-width display immediately after the line in the final printed document in which it occurs. } @Rowa A { TryAfterLine } B { The same as @Code {AfterLine} unless there is insufficient space in the current column to hold the displayed figure, in which case it switches to @Code {ColTop} instead. } @Rowa A { Display } B { The figure will appear as a display at the point it occurs. There is no @Code TryDisplay value corresponding to {@Code Display}. } @Rowa A { Raw } B { The figure will appear as an object, with no extra spacing, at the point it occurs. This is useful, for example, for getting two figures side by side in one display: use a displayed table containing two raw figures. } } @DP The @Code "@Table" symbol also has this option. The default location is {@Code "PageTop"}, but this can be changed by changing the figurelocation. @Index @Code "@FigureLocation" tablelocation. @Index @Code "@TableLocation" @Code "@FigureLocation" and @Code "@TableLocation" setup file options. @PP The numbers assigned to figures and tables, and their ordering in any list of figures or tables, is based on where they appear in the final printed document, not on where they appear in the source files. This is better for the reader in the unusual case of a fixed figure being overtaken by a floating one. If a section number is printed as part of a figure number, and the figure floats forward from one section into another, the figure number will reflect the later section, not the earlier one as it should. You can fix this problem by moving the figure to an earlier point in the section, or by not having section numbers in figures (see below). @PP @Code "@Figure" and @Code "@Table" each have a @Code "@OnePage" option, whose value may be @Code "Yes" or {@Code No}. Setting @Code "@OnePage" to @Code Yes causes the figure or table and its caption to be kept together on one page or column (enclosing the body of the figure or table in @Code "@OneRow" would have the same effect except that it would not incorporate the caption, hence the need for this option). You need to be certain that the whole assembly will fit on one page when setting @Code "@OnePage" to {@Code "Yes"}. If it doesn't, Lout should warn you with a message such as @ID @Code "25.3c object too high for 23.4c space; will try elsewhere" giving the size of the oversize object and the size of the space it failed to fit into; but (unfortunately) it does not given a clear indication of whether trying elsewhere succeeded or not. When you see this message you need to check for yourself whether the figure was actually printed or not; it may mean merely that the figure was put back to a later page than the first possible one. @PP The @I default value of the @Code "@OnePage" option for each figure or table depends on the value of its @Code "@Location" option as follows: @ID @Tab @Fmta { @Col @Code A ! @Col ! @Col @Code B } { @Rowa A { No } B { PageTop ColTop ColEnd Raw } @Rowa A { Yes } B { PageFoot ColFoot Display AfterLine TryAfterLine } } These choices represent a guess that figures that the user is happy to see at the page foot or in a display are probably going to be small enough to keep on one page, but that other figures may not be. In any case, these are only default values and you may set @Code "@OnePage" as you wish. @PP By default, the body of the figure will be centred, and this usually looks best, at least for small figures. @Code "@Figure" and @Code "@Table" each have a @Code "@Format" option which controls this format: @ID @Code { "@Figure" " @Format { @CurveBox @HExpand @CC @Body }" } Within the @Code "@Format" option, the @Code "@Body" symbol stands for the body of the figure or table; it must appear exactly once. Display symbols such as @Code "@CentredDisplay" may not be applied to the {@Code "@Body"} symbol; instead, there are {@Code "@II"}, {@Code "@QQ"}, {@Code "@CC"}, and {@Code "@RR"}, which indent, quote, centre, or right-justify the following object. The example just given centres the figure inside a @Code "@CurveBox" which is horizontally expanded (by the @Code "@HExpand" symbol, which is not specific to figures) to occupy the full width of the page or column, rather than fitting snugly around the figure. @PP Although @Code "@CC" will always centre the figure or table, occasionally it underestimates the amount of space available to centre in, and hence the figure or table appears only partly centred, or even left justified. This occurs when nothing on the page extends the full width of the page. If this problem occurs, use @ID @Code "@Format { @HExpand @CC @Body }" The @Code "@HExpand" symbol expands the space available to the following object to the maximum possible amount, so that the centring is with respect to the full available width as desired. @PP The @Code "@Format" option applies to just the body of the figure, not to its caption. It applies to each page or column of a multi-page or multi-column figure; for example, the above format will draw a box around each page of a multi-page figure, and each page will be separately centred. @Code "ColEnd" and @Code "Raw" figures are exceptions to this rule: they always apply the format to the figure as a whole. This means that you cannot box multi-page figures of these two types, since the result would be an unbreakable object too large to fit on one page. @PP There are setup file options for controlling the appearance of figures and tables. Only those for figures will be given here, since the ones for tables are identical except that @Code Table replaces @Code Figure in their names. Here they all are: @FootNote { These are as of Version 3.15 and above. Prior to that there were {@Code "@CaptionFont"}, {@Code "@CaptionBreak"}, and {@Code "@CaptionFormat"} options, and {@Code "@CaptionFormat"} took values that did not include the @Code "caption" symbol. } @ID @OneCol @Code { "@FigureLocation { PageTop }" "@FigureFormat { @CC @Body }" "@FigureWord { figure }" "@FigureNumbers { Arabic }" "@FigureCaptionPos { Below }" "@FigureCaptionFont { }" "@FigureCaptionBreak { }" "@FigureCaptionFormat { @B { word @NumSep number. &2s } @Insert caption }" "@MakeFigureContents { No }" "@FigureListWord { figurelist }" } @Code "@FigureLocation" is the default value of the @Code "@Location" option of figures. Changing it, for example to {@Code "FullPage"}, changes the location of all figures at once. You may still override this location for any individual figure, however, by giving that figure a @Code "@Location" option. In a similar way, figureformat. @Index @Code "@FigureFormat" tableformat. @Index @Code "@TableFormat" @Code "@FigureFormat" is the default value of the @Code "@Format" option (this shows why figures are centred by default) and figurecaptionpos. @Index @Code "@FigureCaptionPos" tablecaptionpos. @Index @Code "@TableCaptionPos" @Code "@FigureCaptionPos" is the default value of {@Code "@CaptionPos"}. @PP @Code "@FigureWord" determines the word that is part of the figure number. The default value, {@Code figure}, produces `Figure' or its equivalent in the current language; any other value produces itself. @PP @Code "@FigureNumbers" figurenumbers. @Index @Code "@FigureNumbers" tablenumbers. @Index @Code "@TableNumbers" determines whether figures are numbered automatically or not; the choices are {@Code "None"}, {@Code "Arabic"}, {@Code "Roman"}, {@Code "UCRoman"}, {@Code "Alpha"}, and {@Code "UCAlpha"}. Depending on the document type and where the figure or table occurs, the number might include a chapter number as well. This is determined by options in the setup file for your document type; for example, @ID @Code "@SectionNumInFigures { No }" appears in the @Code "report" setup file, and means that a section number will not appear in the figure number (unless you change the option to {@Code Yes}). @PP @Code "@FigureCaptionFont" and @Code "@FigureCaptionBreak" determine the font and paragraph breaking style used in the captions of figures. Their default values are empty, meaning to use the initial font and break styles; but, for example, you could have @ID @Code "@FigureCaptionFont { -2p }" in your setup file to get a smaller font size in your captions. @PP The @Code "@FigureCaptionFormat" option determines the format of the caption. Within it, the symbol @Code word stands for the `Figure' word as defined by {@Code "@FigureWord"}; the @Code number symbol stands for the number of the figure; and @Code caption stands for the body of the caption. The default value shown above prints the word and number and a period in bold, inserted together with a gap of two spaces into the first paragraph of the caption. If you don't use the @Code "@Insert" symbol you'll run into problems with multi-paragraph captions. @PP You can get a list of figures at the start of your document by setting the @Code "@MakeFigureContents" setup file option to {@Code Yes}. The format of these lists will follow the format of tables of contents. These lists are only available in books (Section {@NumberOf books}). The title printed above the list of figures is determined by the @Code "@FigureListWord" option; the default value, {@Code "figurelist"}, produces `List of Figures' or its equivalent in the current language; any other value produces itself. @End @Section lout-3.39/doc/user/equ0000644000076400007640000000166711363700677013335 0ustar jeffjeff@Chapter @Title { Equations } @Tag { equations } @Begin @LP This chapter explains how to produce mathematical formulas in Lout, equations. @Index { equations } mathematics. @Index mathematics equations. @RawIndex { equations } equations.eq @SubIndex { @Code "@Eq" } eq.equations @Index { @Code "@Eq" (equations) } using the @Code "@Eq" symbol like this: @ID @Code { "@Eq { big int supp 1 on 0 ` dx over sqrt {1 - x sup 2} = pi over 2 }" } This example produces @ID @Eq { big int supp 1 on 0 ` dx over sqrt {1 - x sup 2} = pi over 2 } The @Code "@Eq" symbol looks after all the details of spacing for you, and it provides several hundred mathematical symbols. @BeginSections @Include { equ_intr } @Include { equ_symb } @Include { equ_vert } @Include { equ_spac } @Include { equ_disp } @Include { equ_defs } @Include { equ_summ } # @Include { equ_tequ } apparently not offered any more, forget why @Include { equ_math } @EndSections @End @Chapter lout-3.39/doc/user/dia_geom0000644000076400007640000001642011363700677014300 0ustar jeffjeff@Section @Tag { dia_geom } @Title { Expert usage: numbers, lengths, angles, and points } @Begin @PP @@Diag has many options whose values contain lengths, angles, and diagrams. @RawIndex { diagrams } diagrams.geometry @SubIndex { geometry } geometry.diagrams @Index { geometry in diagrams } points. Options such as @Code margin and {@Code vsize}, which affect the size or appearance of the base of a node, may contain only the kinds of lengths described in Section {@NumberOf objects}; but in all other cases arbitrarily complex algebraic expressions may be used to specify the values. @PP The usual mathematical operations may be applied to numbers, angles, and lengths: @ID @Code "2.0f + 3.0f * sin { 30d }" is a valid length. Since this is just ordinary algebra on real numbers, the unsurprising details are deferred to the summary (Section {@NumberOf dia_summ}). Grouping is always done with braces, never parentheses. @PP More interesting are the geometrical symbols that @@Diag provides. The most fundamental is not a symbol at all: two lengths side by side define a point. For example, @ID @Code "xsize ysize * 0.5" within an outline is the point at the far right of the base, halfway up. @PP There are @Code "++" and @Code "--" symbols for vector addition and subtraction of two points, and @Code "**" for multiplication by a scalar. For example, @ID @Code "A@CTR ++ { 1.0f 0 }" is the point @Code 1f to the right of {@Code "A@CTR"}. It is a good idea to distinguish between @I { absolute points }, like {@Code "A@CTR"} and @Code "0.5,1", which denote fixed positions on the page, and @I { relative points }, like {@Code "1.0f 0"}, which serve as offsets from absolute points. The difference of two absolute points is a relative point; adding two absolute points gives an unpredictable result because it depends on the origin of the coordinate system. However, the expression @ID @Code "P1 ** x ++ P2 ** {1 - x}" is safe for any two absolute points {@Code P1} and {@Code P2} and any number {@Code x}; it produces a point on the line through the two points. @PP These remarks on safety do not apply within the @Code outline option of {@Code "@Node"}, because there the coordinate system is clearly specified. Vector operations, with the aid of a few well-chosen tags, can greatly simplify the production of outlines: @ID { @Code @Verbatim { @Node outline { SB:: {0 ysize} ** 0.4 ST:: {0 ysize} ** 0.6 HB:: {xsize 0} ** 0.7 SB SB ++ HB HB xsize ysize * 0.5 HB ++ {0 ysize} HB ++ ST ST SB } paint { grey } { 6c @Wide 2c @High } } ||7ct @Diag { @ShowTags @Node outline { SB:: {0 ysize} ** 0.4 ST:: {0 ysize} ** 0.6 HB:: {xsize 0} ** 0.7 SB SB ++ HB HB xsize ysize * 0.5 HB ++ {0 ysize} HB ++ ST ST SB } paint { grey } { 6c @Wide 2c @High } } } But absolute sums like @Code "SB ++ HB" are not safe in link paths and stray options like {@Code "alabelpos"}. @PP Sometimes it is useful to define tags which are not wanted afterwards and are better forgotten. For this there is the @Code ":=" symbol, which works in much the same way as @Code "::" except that the tag is forgotten after the outline or path option ends. The value assigned does not have to be a point, it can be a length or angle, or even a sequence of values. It is permissible to change the value assigned to a tag by reassigning. @PP Two very useful symbols, {@Code angleto} and {@Code atangle}, bring angles into the algebra. The {@Code angleto} symbol finds the angle from one point to another. For example, @ID @Code "SB angleto ST" in the outline above would produce {@Code 90d}. The @Code atangle symbol finds the point at a given length and angle from the origin. For example, @ID @Code "1.4142f atangle 45d" is the point {@Code "1f 1f"}, and @ID @Code "B@NE ++ 2f atangle 115d" is the point @Code 2f from {@Code "B@NE"} to its northwest. @PP There is a @Code prev symbol, used only within {@Code outline} and {@Code path}, which returns the previous point on the outline or path, ignoring points within {@Code "[]"}. It makes relative movements very easy: @ID { @Code @Verbatim { outline { 0 0 { 2c atangle 30d } prev ++ { 2c atangle 90d } prev ++ { 2c atangle 150d } prev ++ { 2c atangle 210d } prev ++ { 2c atangle 270d } 0 0 } } ||7ct @Diag { ||2.5c @Node outline { 0 0 { 2c atangle 30d } prev ++ { 2c atangle 90d } prev ++ { 2c atangle 150d } prev ++ { 2c atangle 210d } prev ++ { 2c atangle 270d } 0 0 } { 4c @Wide 4c @High } } } This example is rather naughty because the outline does not grow and shrink with the base as it should. Such outlines, while tempting, are always regretted later. @PP There are {@Code xcoord} and {@Code ycoord} symbols for finding the @I x and @I y coordinates of a point: @ID @Code { "{xcoord P1} min {xcoord P2}" "{ycoord P1} max {ycoord P2}" } is the point at the top left-hand corner of the smallest rectangle containing points {@Code P1} and {@Code P2}. And there is a @Code distance symbol which produces the (non-negative) distance between two points: @ID @Code "CTR ++ { CTR distance NW } atangle { CTR angleto NW }" equals {@Code NW}. @PP The rest of this section is concerned with how the `special virtue' of the @Code from and @Code to options, their ability to accept a node tag as well as a point, is implemented behind the scenes. A good user-defined link should also have this virtue, because it is extremely useful. @PP The solution is based on a symbol called {@Code boundaryatangle}, whose preceding object should be either a point or else the tag of a node with one of the standard shapes, and whose following object is an angle: @ID @Code @Verbatim { { xsize ysize*0.5 } boundaryatangle 45d A boundaryatangle 45d } In the first case the result is the point, regardless of the angle. In the second case, the result is the point on the boundary of the node whose tag is given, at the given angle from the centre. @PP There is a second symbol with a similar adaptive ability, called {@Code "??"}, which is defined to be @Code "@" whenever that would make sense, and otherwise to produce the preceding object for its result. For example, @Code "A??CTR" will equal @Code "A@CTR" if there is such a thing; but @ID @Code "{ xsize ysize*0.5 }??CTR" will have result {@Code "{ xsize ysize*0.5 }"} since replacing @Code "??" by @Code "@" does not produce anything sensible. @PP Now suppose we want a link path that connects @Code "from" and @Code "to" by a straight line, where @Code "from" and @Code "to" may be either node tags or points. In either case a suitable direction for the line to take is @ID @Code "from??CTR angleto to??CTR" and so the desired path is @ID @Code @Verbatim { path { FROM:: from boundaryatangle { from??CTR angleto to??CTR } TO:: to boundaryatangle { to??CTR angleto from??CTR } FROM TO } } The first line defines point @Code FROM to be on the boundary of @Code from at the appropriate angle, if @Code "from" is a node tag; otherwise @Code "FROM" is just the point {@Code from}. The second line defines point @Code TO similarly, and then the last two lines join these two points. The @Code line standard link type is exactly this plus a few additional tags and directions. @End @Section lout-3.39/doc/user/tbl_inde0000644000076400007640000000515611363700677014320 0ustar jeffjeff@Section @Title { Indenting and struts } @Tag { tbl_inde } @Begin @PP By default, entries appear at the left within cells, not counting the cell margin. The @Code indent option causes entries to be indented tables. @RawIndex { tables } tables.indent @SubIndex { @Code "indent" option } indent.tables @Index { @Code "indent" option (tables) } horizontally. For example, @ID @OneRow @Code "@Cell indent { ctr }" horizontally centres the entry within the cell. Other possible values centred.entries @Index { centred entries in tables } right.justified.entries @Index { right justified entries in tables } are {@Code "left"} (the default value), {@Code "right"}, {@Code "align"} (Section {@NumberOf tbl_alig}), or any length (for example, {@Code 2f}) meaning that much indent. @PP There is a corresponding @Code "indentvertical" option for vertical indenting tables. @RawIndex { tables } tables.indentvertical @SubIndex { @Code "indentvertical" option } indentvertical.tables @Index { @Code "indentvertical" option (tables) } within the cell. It takes the same values except that @Code "left" is renamed {@Code "top"} (the default), and @Code "right" is renamed {@Code foot}. A common problem with vertical placement is that words that lack ascenders (parts of letters that rise up) or descenders (parts that sink down) can easily become misaligned. Looking at @CD @Tbl mv { 0i } aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { resume } B { poppy } C { title } } which is the result of @ID @OneRow @Code @Verbatim { @Tbl aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { resume } B { poppy } C { title } } } we see that the words are aligned correctly despite these worries. This is because by default @Code "@Tbl" adds a @I { vertical strut } to each entry: an invisible object of zero width and height {@Code "1f"}, which covers for any absent tables. @RawIndex { tables } tables.strut @SubIndex { @Code "strut" option } strut.option. @RawIndex { @Code "strut" option } strut.option.in.tables @SubIndex { in tables } ascenders and descenders. The option @ID @OneRow @Code "@Cell strut { no }" can be used to remove the strut; other acceptable values for this option are {@Code yes} (the default value), and any length, which will add a strut of that length. @PP For completeness there is a corresponding @Code "struthorizontal" option; it tables. @RawIndex { tables } tables.struthorizontal @SubIndex { @Code "struthorizontal" option } struthorizontal.tables @Index { @Code "struthorizontal" option (tables) } takes the same values, its default value is {@Code no}, and it unlikely ever to be used. @End @Section lout-3.39/doc/user/equ_summ0000644000076400007640000005270511363700677014375 0ustar jeffjeff@Section @Title { Summary } @Begin @PP This section is a complete list of the symbols provided by {@Code "@Eq"}. We divide them into auxiliary, parameterized, short names (further divided into relations, binary operators, and punctuation), and full names. The auxiliary symbols are: @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col B } { @Rowa A { @Code "`" } B { Thin space } @Rowa A { @Code "``" } B { Medium space } @Rowa A { @Code "```" } B { Thick space } @Rowa A { @Code "bin x" } B { Treat @Code x as a binary operator } @Rowa A { @Code "rel x" } B { Treat @Code x as a relation } @Rowa A { @Code "punct x" } B { Treat @Code x as a punctuation symbol } @Rowa A { @Code "non x" } B { Remove spaces normally put into @Code x } @Rowa A { @Code "vctr x" } B { Centre @Code x vertically equations. @RawIndex { equations } equations.vctr @SubIndex { @Code "vctr" symbol } vctr.equations @Index { @Code "vctr" symbol (equations) } } @Rowa A { @Code "big x" } B { Make @Code x larger } @Rowa A { @Code "small x" } B { Make @Code x smaller } } Here are all the parameterized symbols, shown in groups of equal precedence, with the precedence itself at right: @ID @OneRow lines @Break { @Code "matrix pmatrix bmatrix brmatrix fmatrix cmatrix amatrix not" (100) @Code "dot dotdot hat tilde vec dyad overbar underbar" (62) @Code "sup sub tsub supp" (60) @Code "on ton" (61) @Code "from to widefrom wideto" (58) @Code "sqrt root" (56) @Code "over frac" (54) @Code "col lcol ccol rcol mcol" (52) @Code "row axisrow" (50) # @Code "above labove cabove rabove mabove" (52) # @Code "nextcol" (50) } See Section {@NumberOf symbols} for examples of matrices. Here are some examples of the other symbols: @IL @LI { @Code "x dot" |7ct @Eq { x dot } equations. @RawIndex { equations } equations.dot @SubIndex { @Code "dot" symbol } dot.equations @Index { @Code "dot" symbol (equations) } } @LI { @Code "x dotdot" |7ct @Eq { x dotdot } equations. @RawIndex { equations } equations.dotdot @SubIndex { @Code "dotdot" symbol } dotdot.equations @Index { @Code "dotdot" symbol (equations) } } @LI { @Code "x hat" |7ct @Eq { x hat } equations. @RawIndex { equations } equations.hat @SubIndex { @Code "hat" symbol } hat.equations @Index { @Code "hat" symbol (equations) } } @LI { @Code "x tilde" |7ct @Eq { x tilde } equations. @RawIndex { equations } equations.tilde @SubIndex { @Code "tilde" symbol } tilde.equations @Index { @Code "tilde" symbol (equations) } } @LI { @Code "x vec" |7ct @Eq { x vec } equations. @RawIndex { equations } equations.vec @SubIndex { @Code "vec" symbol } vec.equations @Index { @Code "vec" symbol (equations) } } @LI { @Code "x dyad" |7ct @Eq { x dyad } equations. @RawIndex { equations } equations.dyad @SubIndex { @Code "dyad" symbol } dyad.equations @Index { @Code "dyad" symbol (equations) } } @LI { @Code "x+y overbar" |7ct @Eq { x+y overbar } equations. @RawIndex { equations } equations.overbar @SubIndex { @Code "overbar" symbol } overbar.equations @Index { @Code "overbar" symbol (equations) } } @LI { @Code "x+y underbar" |7ct @Eq { x+y underbar } equations. @RawIndex { equations } equations.underbar @SubIndex { @Code "underbar" symbol } underbar.equations @Index { @Code "underbar" symbol (equations) } } @EL These marks are centred over the preceding object, except the last two which are extended to the width of the object. @IL @LI { @Code "a sup b" |7ct @Eq {a sup b} } @LI { @Code "a sub b" |7ct @Eq {a sub b} } @LI { @Code "W tsub b" |7ct @Eq {W tsub b} } @LI { @Code "a supp b on c" |7ct @Eq {a supp b on c} } @LI { @Code "W supp b ton c" |7ct @Eq {W supp b ton c} } @EL Note that @Code "supp" and @Code "on" (or {@Code "ton"}) must be used together as shown; @Code "tsub" and @Code "ton" are exactly like @Code "sub" and @Code "on" except that the subscript is tucked in. @IL @LI { @Code "big sum from i" |7ct @Eq {big sum from i} } @LI { @Code "big prod to j" |7ct @Eq {big prod to j} } @LI { @Code { "{a, ... , z} widefrom" "{90d @Rotate blbrace}" } |7ct @Eq { {a, ... , z} widefrom {90d @Rotate blbrace} } equations. @RawIndex { equations } equations.widefrom @SubIndex { @Code "widefrom" symbol } widezzzfrom.equations @Index { @Code "widefrom" symbol (equations) } } @LI { @Code "{a, ... , z} wideto minus" |7ct @Eq { {a, ... , z} wideto minus } equations. @RawIndex { equations } equations.wideto @SubIndex { @Code "wideto" symbol } widezzzto.equations @Index { @Code "wideto" symbol (equations) } } @EL @Code "widefrom" and @Code "wideto" are like @Code "from" and @Code "to" except that they horizontally scale the right parameter to the width of the left. @IL @LI { @Code "sqrt {x over y}" |7ct @Eq { sqrt {x over y} } equations. @RawIndex { equations } equations.sqrt @SubIndex { @Code "sqrt" symbol } sqrt.equations @Index { @Code "sqrt" symbol (equations) } } @LI { @Code "3 root {x over y}" |7ct @Eq { 3 root {x over y} } equations. @RawIndex { equations } equations.root @SubIndex { @Code "root" symbol } root.equations @Index { @Code "root" symbol (equations) } } @EL The left parameter of @Code "root" may be any object. Here are four ways to denote division: @IL @LI { @Code "2 over 3" |7ct @Eq { 2 over 3 } equations. @RawIndex { equations } equations.over @SubIndex { @Code "over" symbol } over.equations @Index { @Code "over" symbol (equations) } } @LI { @Code "2 frac 3" |7ct @Eq { 2 frac 3 } equations. @RawIndex { equations } equations.frac @SubIndex { @Code "frac" symbol } frac.equations @Index { @Code "frac" symbol (equations) } } @LI { @Code "2 div 3" |7ct @Eq { 2 div 3 } equations. @RawIndex { equations } equations.div @SubIndex { @Code "div" symbol } div.equations @Index { @Code "div" symbol (equations) } } @LI { @Code "2 slash 3" |7ct @Eq { 2 slash 3 } equations. @RawIndex { equations } equations.slash @SubIndex { @Code "slash" symbol } slash.equations @Index { @Code "slash" symbol (equations) } } @EL The @Code "div" symbol is a binary operator (see below), and @Code "slash" is the full name for the @Code "/" character from the Adobe Symbol font. You can't use @Code "/" itself, because it is one of Lout's special symbols. @PP The following short names define relations (that is, they have a thick space on each side): @DP ragged @Break { "<" @Dbl @Eq { < } ">" @Dbl @Eq { > } "=" @Dbl @Eq { = } "<=" @Dbl @Eq { <= } "prec" @Dbl @Eq { prec } "preceq" @Dbl @Eq { preceq } "<<" @Dbl @Eq { << } "subset" @Dbl @Eq { subset } "subseteq" @Dbl @Eq { subseteq } "sqsubseteq" @Dbl @Eq { sqsubseteq } "in" @Dbl @Eq { in } "vdash" @Dbl @Eq { vdash } "smile" @Dbl @Eq { smile } "frown" @Dbl @Eq { frown } ">=" @Dbl @Eq { >= } "succ" @Dbl @Eq { succ } "succeq" @Dbl @Eq { succeq } ">>" @Dbl @Eq { >> } "supset" @Dbl @Eq { supset } "supseteq" @Dbl @Eq { supseteq } "sqsupseteq" @Dbl @Eq { sqsupseteq } "ni" @Dbl @Eq { ni } "dashv" @Dbl @Eq { dashv } "mid" @Dbl @Eq { mid } "parallel" @Dbl @Eq { parallel } "==" @Dbl @Eq { == } "~" @Dbl @Eq { ~ } "-~" @Dbl @Eq { -~ } "asymp" @Dbl @Eq { asymp } "~~" @Dbl @Eq { ~~ } "=~" @Dbl @Eq { =~ } "bowtie" @Dbl @Eq { bowtie } "propto" @Dbl @Eq { propto } "models" @Dbl @Eq { models } "doteq" @Dbl @Eq { doteq } "trieq" @Dbl @Eq { trieq } "perp" @Dbl @Eq { perp } "notsub" @Dbl @Eq { notsub } "notin" @Dbl @Eq { notin } "!=" @Dbl @Eq { != } "<->" @Dbl @Eq { <-> } "<--" @Dbl @Eq { <-- } "-->" @Dbl @Eq { --> } "up" @Dbl @Eq { up } "down" @Dbl @Eq { down } "<=>" @Dbl @Eq { <=> } "<==" @Dbl @Eq { <== } "==>" @Dbl @Eq { ==> } "dblup" @Dbl @Eq { dblup } "dbldown" @Dbl @Eq { dbldown } ":" @Dbl @Eq { : } "::" @Dbl @Eq { :: } ":=" @Dbl @Eq { := } } @DP These can be negated by preceding them with {@Code "not"}, as in equations. @RawIndex { equations } equations.not @SubIndex { @Code "not" symbol } not.equations @Index { @Code "not" symbol (equations) } negation. @Index { negation of equation symbols } {@Code "not =="}, for example, which yields {@Eq { not == }}. The following short names define binary operators (medium space on each side): @DP ragged @Break { "+" @Dbl @Eq { + } "-" @Dbl @Eq { - } "+-" @Dbl @Eq { +- } "-+" @Dbl @Eq { -+ } "setminus" @Dbl @Eq { setminus } "cdot" @Dbl @Eq { cdot } "times" @Dbl @Eq { times } "*" @Dbl @Eq { * } "circ" @Dbl @Eq { circ } "div" @Dbl @Eq { div } "cap" @Dbl @Eq { cap } "cup" @Dbl @Eq { cup } "uplus" @Dbl @Eq { uplus } "sqcap" @Dbl @Eq { sqcap } "sqcup" @Dbl @Eq { sqcup } "triangleleft" @Dbl @Eq { triangleleft } "triangleright" @Dbl @Eq { triangleright } "wr" @Dbl @Eq { wr } "bigcirc" @Dbl @Eq { bigcirc } "bigtriangleup" @Dbl @Eq { bigtriangleup } "bigtriangledown"@Dbl @Eq { bigtriangledown } "vee" @Dbl @Eq { vee } "wedge" @Dbl @Eq { wedge } "oplus" @Dbl @Eq { oplus } "ominus" @Dbl @Eq { ominus } "otimes" @Dbl @Eq { otimes } "oslash" @Dbl @Eq { oslash } "odot" @Dbl @Eq { odot } "dagger" @Dbl @Eq { dagger } "daggerdbl" @Dbl @Eq { daggerdbl } "amalg" @Dbl @Eq { amalg } } @DP The following names define arrow symbols (no extra space): @DP ragged @Break { "leftarrow" @Dbl @Eq { leftarrow } "longleftarrow" @Dbl @Eq { longleftarrow } "dblleftarrow" @Dbl @Eq { dblleftarrow } "dbllongleftarrow" @Dbl @Eq { dbllongleftarrow } "rightarrow" @Dbl @Eq { rightarrow } "longrightarrow" @Dbl @Eq { longrightarrow } "dblrightarrow" @Dbl @Eq { dblrightarrow } "dbllongrightarrow" @Dbl @Eq { dbllongrightarrow } "leftrightarrow" @Dbl @Eq { leftrightarrow } "longleftrightarrow" @Dbl @Eq { longleftrightarrow } "dblleftrightarrow" @Dbl @Eq { dblleftrightarrow } { 1.15i @Wide @HScale "dbllongleftrightarrow" } @Dbl @Eq { dbllongleftrightarrow } "mapsto" @Dbl @Eq { mapsto } "longmapsto" @Dbl @Eq { longmapsto } "hookleftarrow" @Dbl @Eq { hookleftarrow } "hookrightarrow" @Dbl @Eq { hookrightarrow } "leadsto" @Dbl @Eq { leadsto } "leftharpoonup" @Dbl @Eq { leftharpoonup } "rightharpoonup" @Dbl @Eq { rightharpoonup } "leftharpoondown" @Dbl @Eq { leftharpoondown } "rightharpoondown" @Dbl @Eq { rightharpoondown } "rightleftharpoons" @Dbl @Eq { rightleftharpoons } "uparrow" @Dbl @Eq { uparrow } "dbluparrow" @Dbl @Eq { dbluparrow } "downarrow" @Dbl @Eq { downarrow } "dbldownarrow" @Dbl @Eq { dbldownarrow } "updownarrow" @Dbl @Eq { updownarrow } "dblupdownarrow" @Dbl @Eq { dblupdownarrow } "nearrow" @Dbl @Eq { nearrow } "searrow" @Dbl @Eq { searrow } "swarrow" @Dbl @Eq { swarrow } "nwarrow" @Dbl @Eq { nwarrow } } @DP The following names define punctuation symbols (thin space on the right-hand side): @DP ragged @Break { ";" @Dbl @Eq { ; } "," @Dbl @Eq { , } "col" @Dbl @Eq { col } } @DP The following symbols are used in ways typified by the large sum and product symbols. In display equations they should be preceded by the @Code "big" symbol: @DP ragged @Break { "sum" @Dbl @Eq { sum } "prod" @Dbl @Eq { prod } "coprod" @Dbl @Eq { coprod } @LP "int" @Dbl @Eq { int } "oint" @Dbl @Eq { oint } "bcap" @Dbl @Eq { bcap } @LP "bcup" @Dbl @Eq { bcup } "bvee" @Dbl @Eq { bvee } "bwedge" @Dbl @Eq { bwedge } @LP "bodot" @Dbl @Eq { bodot } "botimes" @Dbl @Eq { botimes } "boplus" @Dbl @Eq { boplus } @LP "buplus" @Dbl @Eq { buplus } } @DP The following symbols are defined so that they will appear in Roman, as is conventional for them in equations: @DP ragged @Break { "arccos" @Dbl @Eq { arccos } "arcsin" @Dbl @Eq { arcsin } "arctan" @Dbl @Eq { arctan } "arg" @Dbl @Eq { arg } "cos" @Dbl @Eq { cos } "cosh" @Dbl @Eq { cosh } "cot" @Dbl @Eq { cot } "coth" @Dbl @Eq { coth } "csc" @Dbl @Eq { csc } "deg" @Dbl @Eq { deg } "det" @Dbl @Eq { det } "dim" @Dbl @Eq { dim } "exp" @Dbl @Eq { exp } "gcd" @Dbl @Eq { gcd } "hom" @Dbl @Eq { hom } "inf" @Dbl @Eq { inf } "ker" @Dbl @Eq { ker } "lg" @Dbl @Eq { lg } "lim" @Dbl @Eq { lim } "liminf" @Dbl @Eq { liminf } "limsup" @Dbl @Eq { limsup } "ln" @Dbl @Eq { ln } "log" @Dbl @Eq { log } "max" @Dbl @Eq { max } "min" @Dbl @Eq { min } "Pr" @Dbl @Eq { Pr } "sec" @Dbl @Eq { sec } "sin" @Dbl @Eq { sin } "sinh" @Dbl @Eq { sinh } "supr" @Dbl @Eq { supr } "tan" @Dbl @Eq { tan } "tanh" @Dbl @Eq { tanh } "mod" @Dbl @Eq { mod } } @DP The following symbols are also defined to ensure that they will appear in Roman: @DP ragged @Break { "0" @Dbl @Eq { 0 } "1" @Dbl @Eq { 1 } "2" @Dbl @Eq { 2 } "3" @Dbl @Eq { 3 } "4" @Dbl @Eq { 4 } "5" @Dbl @Eq { 5 } "6" @Dbl @Eq { 6 } "7" @Dbl @Eq { 7 } "8" @Dbl @Eq { 8 } "9" @Dbl @Eq { 9 } "!" @Dbl @Eq { ! } "?" @Dbl @Eq { ? } "%" @Dbl @Eq { % } "(" @Dbl @Eq { ( } ")" @Dbl @Eq { ) } "[" @Dbl @Eq { [ } "]" @Dbl @Eq { ] } } @DP The following symbols make good @Code atleft and @Code atright parameters of the @Code matrix symbol: @LP @LP ragged @Break { "lpar" @Dbl @Eq { lpar } "blpar" @Dbl @Eq { blpar } "rpar" @Dbl @Eq { rpar } "brpar" @Dbl @Eq { brpar } "lbrack" @Dbl @Eq { lbrack } "blbrack" @Dbl @Eq { blbrack } "rbrack" @Dbl @Eq { rbrack } "brbrack" @Dbl @Eq { brbrack } "lbrace" @Dbl @Eq { lbrace } "blbrace" @Dbl @Eq { blbrace } "rbrace" @Dbl @Eq { rbrace } "brbrace" @Dbl @Eq { brbrace } "lfloor" @Dbl @Eq { lfloor } "blfloor" @Dbl @Eq { blfloor } "rfloor" @Dbl @Eq { rfloor } "brfloor" @Dbl @Eq { brfloor } "lceil" @Dbl @Eq { lceil } "blceil" @Dbl @Eq { blceil } "rceil" @Dbl @Eq { rceil } "brceil" @Dbl @Eq { brceil } "langle" @Dbl @Eq { langle } "blangle" @Dbl @Eq { blangle } "rangle" @Dbl @Eq { rangle } "brangle" @Dbl @Eq { brangle } } @LP @LP Here are some miscellaneous symbols: @DP ragged @Break { "hbar" @Dbl @Eq { hbar } "Re" @Dbl @Eq { Re } "Im" @Dbl @Eq { Im } "partial" @Dbl @Eq { partial } "infty" @Dbl @Eq { infty } "prime" @Dbl @Eq { prime } "nabla" @Dbl @Eq { nabla } "surd" @Dbl @Eq { surd } "top" @Dbl @Eq { top } "bot" @Dbl @Eq { bot } "dbar" @Dbl @Eq { dbar } "triangle" @Dbl @Eq { triangle } "backslash" @Dbl @Eq { backslash } "forall" @Dbl @Eq { forall } "exists" @Dbl @Eq { exists } "neg" @Dbl @Eq { neg } "circle" @Dbl @Eq { circle } "filledcircle" @Dbl @Eq { filledcircle } "square" @Dbl @Eq { square } "ldots" @Dbl @Eq { ldots } "cdots" @Dbl @Eq { cdots } "vdots" @Dbl @Eq { vdots } "ddots" @Dbl @Eq { ddots } "del" @Dbl @Eq { del } "grad" @Dbl @Eq { grad } "triangleup" @Dbl @Eq { triangleup } "triangledown" @Dbl @Eq { triangledown } "..." @Dbl @Eq { ... } ",...," @Dbl @Eq { ,..., } "half" @Dbl @Eq { half } "third" @Dbl @Eq { third } "'" @Dbl @Eq { ' } "empty" @Dbl @Eq { empty } } @DP Finally, here is the long list of full names from the Adobe Symbol font; these are as for the @Code "@Sym" symbol of Section {@NumberOf characters}, but within equations you don't type {@Code "@Sym"}: @DP ragged @Break { "space" @Dbl @Eq { space } "exclam" @Dbl @Eq { exclam } "universal" @Dbl @Eq { universal } "numbersign" @Dbl @Eq { numbersign } "existential" @Dbl @Eq { existential } "percent" @Dbl @Eq { percent } "ampersand" @Dbl @Eq { ampersand } "suchthat" @Dbl @Eq { suchthat } "parenleft" @Dbl @Eq { parenleft } "parenright" @Dbl @Eq { parenright } "asteriskmath" @Dbl @Eq { asteriskmath } "plus" @Dbl @Eq { plus } "comma" @Dbl @Eq { comma } "minus" @Dbl @Eq { minus } "period" @Dbl @Eq { period } "slash" @Dbl @Eq { slash } "zero" @Dbl @Eq { zero } "one" @Dbl @Eq { one } "two" @Dbl @Eq { two } "three" @Dbl @Eq { three } "four" @Dbl @Eq { four } "five" @Dbl @Eq { five } "six" @Dbl @Eq { six } "seven" @Dbl @Eq { seven } "eight" @Dbl @Eq { eight } "nine" @Dbl @Eq { nine } "colon" @Dbl @Eq { colon } "semicolon" @Dbl @Eq { semicolon } "less" @Dbl @Eq { less } "equal" @Dbl @Eq { equal } "greater" @Dbl @Eq { greater } "question" @Dbl @Eq { question } "congruent" @Dbl @Eq { congruent } "Alpha" @Dbl @Eq { Alpha } "Beta" @Dbl @Eq { Beta } "Chi" @Dbl @Eq { Chi } "Delta" @Dbl @Eq { Delta } "Epsilon" @Dbl @Eq { Epsilon } "Phi" @Dbl @Eq { Phi } "Gamma" @Dbl @Eq { Gamma } "Eta" @Dbl @Eq { Eta } "Iota" @Dbl @Eq { Iota } "thetaone" @Dbl @Eq { thetaone } "Kappa" @Dbl @Eq { Kappa } "Lambda" @Dbl @Eq { Lambda } "Mu" @Dbl @Eq { Mu } "Nu" @Dbl @Eq { Nu } "Omicron" @Dbl @Eq { Omicron } "Pi" @Dbl @Eq { Pi } "Theta" @Dbl @Eq { Theta } "Rho" @Dbl @Eq { Rho } "Sigma" @Dbl @Eq { Sigma } "Tau" @Dbl @Eq { Tau } "Upsilon" @Dbl @Eq { Upsilon } "sigmaone" @Dbl @Eq { sigmaone } "Omega" @Dbl @Eq { Omega } "Xi" @Dbl @Eq { Xi } "Psi" @Dbl @Eq { Psi } "Zeta" @Dbl @Eq { Zeta } "bracketleft" @Dbl @Eq { bracketleft } "therefore" @Dbl @Eq { therefore } "bracketright" @Dbl @Eq { bracketright } "perpendicular" @Dbl @Eq { perpendicular } "underscore" @Dbl @Eq { underscore } "radicalex" @Dbl @Eq { radicalex } "alpha" @Dbl @Eq { alpha } "beta" @Dbl @Eq { beta } "chi" @Dbl @Eq { chi } "delta" @Dbl @Eq { delta } "epsilon" @Dbl @Eq { epsilon } "phi" @Dbl @Eq { phi } "gamma" @Dbl @Eq { gamma } "eta" @Dbl @Eq { eta } "iota" @Dbl @Eq { iota } "phione" @Dbl @Eq { phione } "kappa" @Dbl @Eq { kappa } "lambda" @Dbl @Eq { lambda } "mu" @Dbl @Eq { mu } "nu" @Dbl @Eq { nu } "omicron" @Dbl @Eq { omicron } "pi" @Dbl @Eq { pi } "theta" @Dbl @Eq { theta } "rho" @Dbl @Eq { rho } "sigma" @Dbl @Eq { sigma } "tau" @Dbl @Eq { tau } "upsilon" @Dbl @Eq { upsilon } "omegaone" @Dbl @Eq { omegaone } "omega" @Dbl @Eq { omega } "xi" @Dbl @Eq { xi } "psi" @Dbl @Eq { psi } "zeta" @Dbl @Eq { zeta } "braceleft" @Dbl @Eq { braceleft } "bar" @Dbl @Eq { bar } "braceright" @Dbl @Eq { braceright } "similar" @Dbl @Eq { similar } "Upsilonone" @Dbl @Eq { Upsilonone } "minute" @Dbl @Eq { minute } "lessequal" @Dbl @Eq { lessequal } "fraction" @Dbl @Eq { fraction } "infinity" @Dbl @Eq { infinity } "florin" @Dbl @Eq { florin } "club" @Dbl @Eq { club } "diamond" @Dbl @Eq { diamond } "heart" @Dbl @Eq { heart } "spade" @Dbl @Eq { spade } "arrowboth" @Dbl @Eq { arrowboth } "arrowleft" @Dbl @Eq { arrowleft } "arrowup" @Dbl @Eq { arrowup } "arrowright" @Dbl @Eq { arrowright } "arrowdown" @Dbl @Eq { arrowdown } "degree" @Dbl @Eq { degree } "plusminus" @Dbl @Eq { plusminus } "second" @Dbl @Eq { second } "greaterequal" @Dbl @Eq { greaterequal } "multiply" @Dbl @Eq { multiply } "proportional" @Dbl @Eq { proportional } "partialdiff" @Dbl @Eq { partialdiff } "bullet" @Dbl @Eq { bullet } "divide" @Dbl @Eq { divide } "notequal" @Dbl @Eq { notequal } "equivalence" @Dbl @Eq { equivalence } "approxequal" @Dbl @Eq { approxequal } "ellipsis" @Dbl @Eq { ellipsis } "arrowvertex" @Dbl @Eq { arrowvertex } "arrowhorizex" @Dbl @Eq { arrowhorizex } "carriagereturn"@Dbl @Eq { carriagereturn } "aleph" @Dbl @Eq { aleph } "Ifraktur" @Dbl @Eq { Ifraktur } "Rfraktur" @Dbl @Eq { Rfraktur } "weierstrass" @Dbl @Eq { weierstrass } "circlemultiply"@Dbl @Eq { circlemultiply } "circleplus" @Dbl @Eq { circleplus } "emptyset" @Dbl @Eq { emptyset } "intersection" @Dbl @Eq { intersection } "union" @Dbl @Eq { union } "propersuperset"@Dbl @Eq { propersuperset } "reflexsuperset"@Dbl @Eq { reflexsuperset } "notsubset" @Dbl @Eq { notsubset } "propersubset" @Dbl @Eq { propersubset } "reflexsubset" @Dbl @Eq { reflexsubset } "element" @Dbl @Eq { element } "notelement" @Dbl @Eq { notelement } "angle" @Dbl @Eq { angle } "gradient" @Dbl @Eq { gradient } "registerserif" @Dbl @Eq { registerserif } "copyrightserif"@Dbl @Eq { copyrightserif } "trademarkserif"@Dbl @Eq { trademarkserif } "product" @Dbl @Eq { product } "radical" @Dbl @Eq { radical } "dotmath" @Dbl @Eq { dotmath } "logicalnot" @Dbl @Eq { logicalnot } "logicaland" @Dbl @Eq { logicaland } "logicalor" @Dbl @Eq { logicalor } "arrowdblboth" @Dbl @Eq { arrowdblboth } "arrowdblleft" @Dbl @Eq { arrowdblleft } "arrowdblup" @Dbl @Eq { arrowdblup } "arrowdblright" @Dbl @Eq { arrowdblright } "arrowdbldown" @Dbl @Eq { arrowdbldown } "lozenge" @Dbl @Eq { lozenge } "angleleft" @Dbl @Eq { angleleft } "registersans" @Dbl @Eq { registersans } "copyrightsans" @Dbl @Eq { copyrightsans } "trademarksans" @Dbl @Eq { trademarksans } "summation" @Dbl @Eq { summation } "parenlefttp" @Dbl @Eq { parenlefttp } "parenleftex" @Dbl @Eq { parenleftex } "parenleftbt" @Dbl @Eq { parenleftbt } "bracketlefttp" @Dbl @Eq { bracketlefttp } "bracketleftex" @Dbl @Eq { bracketleftex } "bracketleftbt" @Dbl @Eq { bracketleftbt } "bracelefttp" @Dbl @Eq { bracelefttp } "braceleftmid" @Dbl @Eq { braceleftmid } "braceleftbt" @Dbl @Eq { braceleftbt } "braceex" @Dbl @Eq { braceex } "angleright" @Dbl @Eq { angleright } "integral" @Dbl @Eq { integral } "integraltp" @Dbl @Eq { integraltp } "integralex" @Dbl @Eq { integralex } "integralbt" @Dbl @Eq { integralbt } "parenrighttp" @Dbl @Eq { parenrighttp } "parenrightex" @Dbl @Eq { parenrightex } "parenrightbt" @Dbl @Eq { parenrightbt } "bracketrighttp"@Dbl @Eq { bracketrighttp } "bracketrightex"@Dbl @Eq { bracketrightex } "bracketrightbt"@Dbl @Eq { bracketrightbt } "bracerighttp" @Dbl @Eq { bracerighttp } "bracerightmid" @Dbl @Eq { bracerightmid } "bracerightbt" @Dbl @Eq { bracerightbt } } @DP The names given are the same as Adobe's, as used by the @Code "@Sym" symbol, except in a few places where the Adobe name contains a digit, which is not possible for a symbol name in Lout. @End @Section lout-3.39/doc/user/str_list0000644000076400007640000004636011363700677014405 0ustar jeffjeff@Section @Title { Lists } @Tag { lists } @Begin @PP The @Code "@IndentedList" symbol introduces a sequence of items to be indentedlist. @Index @Code "@IndentedList" il. @Index @Code "@IL" lists. @Index { lists } made into a displayed list: @ID @OneRow @Code @Verbatim { preceding text @IndentedList @ListItem @I Emma @ListItem @I { Mansfield Park } @EndList following text } After the initial @Code "@IndentedList" symbol, each item is introduced by list.item. @Index @Code "@ListItem" li. @Index @Code "@LI" {@Code "@ListItem"}, and the list ends with {@Code "@EndList"}. The end.list. @Index @Code "@EndList" el. @Index @Code "@EL" result here is @ID @OneRow { preceding text @IndentedList @ListItem @I Emma @ListItem @I { Mansfield Park } @EndList following text } with space inserted automatically before, between, and after the items. @PP As the example shows, the @Code "@IndentedList" symbol causes the items to be indented. Also available are {@Code "@LeftList"}, leftlist. @Index @Code "@LeftList" ll. @Index @Code "@LL" {@Code "@QuotedList"}, {@Code "@CentredList"}, and {@Code "@CenteredList"}, quotedlist. @Index @Code "@QuotedList" ql. @Index @Code "@QL" centredlist. @Index @Code "@CentredList" centeredlist. @Index @Code "@CenteredList" cl. @Index @Code "@CL" which format the items like the corresponding display symbols do. Other list symbols generate a @I label for each item. For example, @Code "@NumberedList" causes the items to be numbered: numberedlist. @Index @Code "@NumberedList" nl. @Index @Code "@NL" @ID @OneRow @Code @Verbatim { @Heading { Quiz } @NumberedList @ListItem { Which American statesman owned a two-storey clock? } @ListItem { Which Yankee commander from the Civil War cut a swathe of destruction through the State of Georgia? } @EndList } has result @ID @OneRow { @Heading { Quiz } @NumberedList @ListItem { Which American statesman owned a two-storey clock? } @ListItem { Which Yankee commander from the Civil War cut a swathe of destruction through the State of Georgia? } @RawEndList } The generated labels are added at the left margin. Here is the full set of label-generating list symbols, showing the first label produced by each: parennumberedlist. @Index @Code "@ParenNumberedList" pnl. @Index @Code "@PNL" romanlist. @Index @Code "@RomanList" rl. @Index @Code "@RL" parenromanlist. @Index @Code "@ParenRomanList" prl. @Index @Code "@PRL" ucromanlist. @Index @Code "@UCRomanList" ucrl. @Index @Code "@UCRL" parenucromanlist. @Index @Code "@ParenUCRomanList" pucrl. @Index @Code "@PUCRL" alphalist. @Index @Code "@AlphaList" al. @Index @Code "@AL" parenalphalist. @Index @Code "@ParenAlphaList" pal. @Index @Code "@PAL" ucalphalist. @Index @Code "@UCAlphaList" ucal. @Index @Code "@UCAL" parenucalphalist. @Index @Code "@ParenUCAlphaList" pucal. @Index @Code "@PUCAL" bulletlist. @Index @Code "@BulletList" bl. @Index @Code "@BL" starlist. @Index @Code "@StarList" sl. @Index @Code "@SL" dashlist. @Index @Code "@DashList" dl. @Index @Code "@DL" @ID @Tab @Fmta { @Col @CC A ! @Col @Code B ! @Col ! @Col @CC C ! @Col @Code D } { @Rowa A { 1. } B { "@NumberedList" } C { (1) } D { "@ParenNumberedList" } @Rowa A { i. } B { "@RomanList" } C { (i) } D { "@ParenRomanList" } @Rowa A { I. } B { "@UCRomanList" } C { (I) } D { "@ParenUCRomanList" } @Rowa A { a. } B { "@AlphaList" } C { (a) } D { "@ParenAlphaList" } @Rowa A { A. } B { "@UCAlphaList" } C { (A) } D { "@ParenUCAlphaList" } @Rowa A { @Bullet } B { "@BulletList" } @Rowa A { @Star } B { "@StarList" } @Rowa A { -- } B { "@DashList" } } roman @Index { Roman numerals } The Roman numerals end at cc (200), but ordinary decimal numbers have no limit. The labels produced by the four alphabetical list symbols are determined by the current language; in English they start at @Code "a" and end at {@Code "z"}. @PP You may also supply your own labels using the @Code "@TaggedList" taggedlist @Index @Code "@TaggedList" tl. @Index @Code "@TL" symbol. Each item is introduced by @Code "@TagItem" instead of tagitem. @Index @Code "@TagItem" ti. @Index @Code "@TI" {@Code "@ListItem"}. Since such labels tend to be quite wide, there are @Code "@WideTaggedList" and @Code "@VeryWideTaggedList" symbols widezzztaggedlist @Index @Code "@WideTaggedList" wtl. @Index @Code "@WTL" verywidetaggedlist @Index @Code "@VeryWideTaggedList" vwtl. @Index @Code "@VWTL" which leave extra space for them: @ID @OneRow @Code @Verbatim { @WideTaggedList @TagItem { 9 a.m. } { Breakfast in the Ipamena Lounge, served with Irish coffee and fresh croissants. } @TagItem { 10 a.m. } { Prof. A. Smith speaks on `The Wealth of Nations.' } @EndList } Each @Code "@TagItem" symbol is followed by the desired label between braces, and then the item proper. The label may be empty, but still its enclosing braces must be there. The result here is @ID @OneRow { @RawWideTaggedList @TagItem { 9 a.m. } { Breakfast in the Ipamena Lounge, served with Irish coffee and fresh croissants. } @TagItem { 10 a.m. } { Prof. A. Smith speaks on `The Wealth of Nations.' } @RawEndList } An alternative way to accommodate wide labels is the `drop item,' drop.item @Index { drop items } which looks like this: @ID @OneRow { @RawTaggedList @DTI { 10 a.m. } { Prof. A. Smith speaks on `The Wealth of Nations.' } @RawEndList } Individual items are dropped in this way by using @Code "@DropTagItem" drop.tag.item @Index @Code "@DropTagItem" dti. @Index @Code "@DTI" instead of {@Code "@TagItem"}. There is also a @Code "@DropListItem" drop.list.item @Index @Code "@DropListItem" dli. @Index @Code "@DLI" symbol corresponding to {@Code "@ListItem"}, but it is very rarely needed. Lout is not able to decide for itself whether a label is wide enough to require a drop item. Lout will refuse to skip to the next column or page between a drop tag and its item, preferring instead to move the drop tag to the next column or page. @PP Each list has a `raw' version which omits the preceding space, and raw.lists @Index { raw lists } raw.list. @Index @Code "@RawList" raw.end.list. @Index @Code "@RawEndList" @Code "@EndList" has a raw version which omits the following space. These are mainly used when an item is itself a list: @ID @OneRow @Code @Verbatim { @ParenNumberedList @ListItem { @RawParenRomanList @ListItem { MV Nominees, hereinafter called the vendor, ... } @RawEndList } @EndList } produces @ID @OneRow { @RawParenNumberedList @ListItem { @RawParenRomanList @ListItem { MV Nominees, hereinafter called the vendor, ... } @RawEndList } @RawEndList } If @Code "@ParenRomanList" had been used instead of {@Code "@RawParenRomanList"}, (1) and (i) would have appeared on different lines; or if @Code "@EndList" had been used instead of {@Code "@RawEndList"}, there would have been too much space following the list. @PP A list item may come out partly on one page or column and partly on the next, if it has places where it obviously can be broken in two. For example, a list item which is an ordinary paragraph of text might be broken in two between any two lines. To force a list item to keep together on one page or column, use the @Code "@OneRow" symbol like this: @Code "@ListItem @OneRow { ... }". @PP Occasionally it is desirable to start a new page or column between two list items. This cannot be done by inserting @Code "@NP" between them, because the space between two list items is a kind of no-man's land where nothing is allowed to be. Instead, the @Code "@ListNewPage" symbol is used: it is permitted only between two list items, and its effect is to make the following list item appear at the top of the next page or column. It may be used within any kind of list. @PP Another special list item is {@Code "@ListInterruptItem"}. This prints its content without any numbering or formatting: @ID @OneRow @Code @Verbatim { @NumberedList @ListItem { This is the first list item. } @ListInterruptItem { This is an interruption to the list. } @ListItem { This is the second list item. } @EndList } produces @ID @OneRow { @RawNumberedList @ListItem { This is the first list item. } @ListInterruptItem { This is an interruption to the list. } @ListItem { This is the second list item. } @RawEndList } Although @Code "@ListInterruptItem" is written like a list item, the result appears to be an interruption to the list. It may be used in any kind of list. @PP Yet another kind of list item symbol is paragraph.item. @Index @Code "@ParagraphItem" pi. @Index @Code "@PI" {@Code "@ParagraphItem"}, which introduces a list item whose labels are integrated into a paragraph: @ID @OneRow @Code @Verbatim { @Heading { Extract from GNU General Public License } @LeftList @ParagraphItem { You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty ... } @ParagraphItem { You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you ... } @EndList } has result @ID @OneRow { @Heading { Extract from GNU General Public License } @LeftList @ParagraphItem { You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty ... } @ParagraphItem { You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you ... } @RawEndList } Since the numbers are part of the item, the kind of list to use is just {@Code "@LeftList"} rather than {@Code "@NumberedList"}. It would be better if @Code "@ListItem" could be used, but problems behind the scenes prevent this. @Code "@ParagraphItem" has a @Code "style" option that works much like the @Code "style" option of {@Code "@List"} described just below. @PP Another useful variation is the @I { multi-column list }, in which the items are spread over several columns within the current column. Any kind of list may be converted into a multi-column list. For example, here is how to get a multi-column bullet list: @ID @OneRow @Code @Verbatim { @BulletList colnum { 3 } colgap { 1.0c } colheight { 5.0c } } followed by the list items and @Code "@EndList" as usual. This list will appear spread over three columns, with the items placed down the first column, then down the second, and so on. The columns will have equal width, as wide as possible given that they are separated from each other by the gap given by {@Code "colgap"}. Ideally, one would want the columns to have equal height, just enough to hold all the items; but since Lout is not clever enough to do this, you must specify a fixed height for each column, using the @Code "colheight" option; and this height must be small enough to allow the entire list to fit onto one page, since it is effectively an unbreakable display. @PP The value of @Code "colnum" must be either 1, 2, 3, 4, or 5. If it is 1 (the default value), @Code "colgap" and @Code "colheight" are not used and the result is an ordinary list. The value of @Code "colgap" and @Code "colheight" may be any width; the default values are those shown above. All the features available for ordinary lists and list items work in the usual way with multi-column lists: one may keep a list item in one column by enclosing it in {@Code "@OneRow"}, cause a break to the next column using {@Code "@ListNewPage"}, and so on. If there is not enough space in the columns to hold all the items (a real possibility since their height is fixed), any excess is dropped, sometimes with and sometimes without a confusing error message. @PP Every symbol introduced in this section has an abbreviated form consisting of @Code "@" followed by its capital letters only. For example, @Code "@RawNumberedList" abbreviates to {@Code "@RNL"}, and @Code "@ListItem" to {@Code "@LI"}. The sole exception is {@Code "@RawList"}, which has no abbreviation because @Code "@RL" is the abbreviation for {@Code "@RomanList"}. @PP list.symbol.options @Index { list symbol options } Expert users will be interested to learn that all of the list symbols described in this section are derived from the two basic ones, @Code "@List" and {@Code "@RawList"}, merely by setting options. Here list. @Index @Code "@List" l. @Index @Code "@L" are all the options, together with their default values: @ID @OneRow @Code @Verbatim { @List type { num } style { num } labelwidth { 2f } labelright { No } labelrightgap { 2s } indent { 0c } rightindent { 0c } gap { 1v } start { 1 } font { } break { } colnum { 1 } colgap { 1.0c } colheight { 5.0c } } These options may be used with all of the list and raw list symbols, except that some combinations don't make sense, for example @Code "indent" with {@Code "@CentredList"} or @Code "style" with {@Code "@BulletList"}, since the list symbol has clearly already set the option. @PP The @Code "type" option determines the type of numbering (Arabic, Roman, etc.) and is not intended for ordinary use, since there are distinct symbols for each type, as we have seen. The @Code "style" option determines the format of the label, any @Code "num" symbol within it being replaced by the number (in Arabic, Roman, etc. as determined by the @Code "type" option) of the item. For example, @Code "@ParenNumberedList" is just @ID @OneRow @Code @Verbatim { @List style { (num) } } and @Code "@BulletList" is just @ID @OneRow @Code @Verbatim { @List style { @Bullet } } with @Code "num" not mentioned since no number is wanted. The @Code "@TaggedList" symbol and its variants also have the @Code "style" option; in their case, the @Code "num" symbol within it must be mentioned exactly once, and its value is set to produce the label supplied by the author. @PP The @Code "labelwidth" option determines the width set aside for the labels; this is where @Code "@WideTaggedList" and @Code "@VeryWideTaggedList" differ from {@Code "@TaggedList"}. If @Code "labelright" is {@Code "Yes"}, it means that the label is to appear right-justified in this width, apart from a width @Code "labelrightgap" to the right of it to separate it from the content of the list item. The default value of {@Code "labelrightgap"}, {@Code "2s"}, is the width of two spaces. If @Code "labelright" is {@Code No}, @Code "labelrightgap" is not used. @PP The @Code "indent" and @Code "rightindent" options determine the space left blank at the left and right margins. The value given to these options may be any length, for example @Code "0.5i" (half an inch), or @Code "0.5f" (half the current font size). Section {@NumberOf objects} describes lengths in general. There are also three useful symbols denoting lengths: @Code "@DisplayIndent" is the amount by which indented and quoted displays are indented; @Code "@WideIndent" and @Code "@VeryWideIndent" are the indents used by @Code "@WideTaggedList" and {@Code "@VeryWideTaggedList"}. Using these symbols helps to keep documents consistent. @PP The @Code "gap" option determines the vertical space inserted between items. Once again this must be a length, although since it is vertical rather than horizontal, somewhat different kinds of lengths are appropriate: @Code "1.5v" for 1.5 times the current vertical space between lines, or the default value, {@Code "@DisplayGap"}, which produces the amount of vertical space used before and after displays. Owing to problems behind the scenes, there is no list option for the space before or after the list as a whole. To change this space in one list, use a raw list and insert your own paragraph symbols; to change it in every list there is a setup file option, described below. @PP The @Code "start" option is the number assigned to the first item. It must be decimal: @ID @OneRow @Code @Verbatim { @ParenRomanList start { 25 } } looks strange, but it is the correct way to number the first item (xxv). @PP The @Code "font" option defines a font (or any value suited for the @Code "@Font" symbol) which is to be applied to each item (but not the labels). For example, you might be bothered by the fact that a list item whose last line has no descenders in its letters is closer to the next list item, producing a slightly irregular appearance. One way to solve this problem is @ID @OneRow @Code @Verbatim { @NumberedList font { strut } } since the value @Code "strut" given to the @Code "@Font" symbol causes it to insert an invisible vertical strut into every word under the influence of that symbol. For more information, including another way to insert struts, consult Section {@NumberOf precise}. @PP The @Code "break" option defines a break style (suitable for the @Code "@Break" symbol) which is to be applied to each item. If you wanted each item in a ragged style, for example, you could just write @ID @OneRow @Code @Verbatim { @NumberedList break { ragged } } rather than laboriously enclosing each item in @Code "ragged @Break". @PP The last three options, {@Code "colnum"}, {@Code "colgap"}, and {@Code "colheight"} work together to produce multi-column lists, as explained earlier. When the default value of @Code "colnum" is used (i.e. 1), {@Code "colgap"} and {@Code "colheight"} are ignored and the result is an ordinary list. @PP Here is a larger example of these options in action. Setting both @Code "indent" and @Code "rightindent" to @Code "@DisplayIndent" produces an effect similar to {@Code "@QuotedDisplay"}: @ID @OneRow @Code @Verbatim { preceding text @List style { @I {Item num}: } indent { @DisplayIndent } rightindent { @DisplayIndent } labelwidth { @WideIndent } start { 10 } @ListItem { The vendor ... in the case of accident. } @ListItem { The vendor ... adjacent to the facility. } @EndList following text } The result is @ID @OneRow { preceding text @List style { @I {Item num}: } indent { @DisplayIndent } rightindent { @DisplayIndent } labelwidth { @WideIndent } start { 10 } @ListItem { The vendor will not be liable for any injury caused by the escape of radiation or radioactive materials from the facility, nor for the costs of repair of any property damaged by nuclear blast or fallout in the case of accident. } @ListItem { The vendor will not be liable for any injury caused by radioactive materials being transported to or from the facility, nor for injury caused by radioactive materials stored adjacent to the facility. } @EndList following text } You can change the @I default values of the {@Code "labelwidth"}, {@Code "labelright"}, {@Code "labelrightgap"}, {@Code "indent"}, {@Code "rightindent"}, {@Code "gap"}, and {@Code "break"} options, by setting options called {@Code "@ListLabelWidth"}, {@Code "@ListLabelRight"}, {@Code "@ListLabelRightGap"}, {@Code "@ListIndent"}, {@Code "@ListRightIndent"}, {@Code "@ListGap"}, and {@Code "@ListBreak"} options in the setup file (Section {@NumberOf setup}). These default values will then apply to every list in the document unless overridden by an option, just like the usual default values. The setup file also has a {@Code "@ListOuterGap"} option which determines the gap before the first and after the last list item in non-raw lists. @End @Section lout-3.39/doc/user/str_larg0000644000076400007640000002141711363700677014353 0ustar jeffjeff@Section @Title { Large-scale structure: chapters, sections, etc. } @RunningTitle { Large-scale structure } @Tag { largescale } @Begin @PP Lout's large-scale structure symbols vary with the type of document large.scale. @Index { large-scale structure } ({@Code "@Chapter"} for books, @Code "@Overhead" for overhead transparencies, etc.), but they all work in the same way. Here is a typical example, {@Code "@Section"}, as it would actually be used: @ID @OneRow @Code { "@Section" " @Title { Allocation of teachers }" "@Begin" "@PP" "Apart from the usual need to avoid clashes, the allocation of teachers must" "ensure that no teacher teaches more than seven periods per day, or ..." "@End @Section" } First comes the symbol itself, then any options in the usual way, and then the following object, enclosed in @Code "@Begin" and {@Code "@End @Section"}. The following object, also called the body of the section, may contain paragraphs, displays, and all the other features as usual. The body should begin with a paragraph symbol, which may be @Code "@PP" or @Code "@LP" as you prefer. The result is a section like the present one, automatically numbered, with the @Code "@Title" option for its heading, preceded by a conditional new title. @Index @Code "@Title" page symbol (Section {@NumberOf paragraphs}). @PP When @Code "@Section" symbols are used within an ordinary document, they must be bracketed by @Code "@BeginSections" and @Code "@EndSections" symbols, like this: @ID @OneRow @Code { "@SysInclude { doc }" "@Doc @Text @Begin" "preceding text" "@BeginSections" "@Section ... @End @Section" "@Section ... @End @Section" "..." "@Section ... @End @Section" "@EndSections" "@End @Text" } This arrangement is reminiscent of the one for lists, and, as for lists, there may be no paragraph or new page symbols before, between, or after the sections. @PP The @Code "@Begin ... @End @Section" that brackets the body of each section may be abbreviated to {@Code "{ ... }"}. However, the long form is recommended because it helps Lout to detect missing or extra braces within the body of the section. @PP To change the gap between sections, you need to change the @Code "@SectionGap" option in the setup file, as explained in Chapter {@NumberOf types}. If you just want a new page or column before one section, then use the @Code "@NewPage" option of that section, like this: @ID @OneRow @Code { "@Section" " @Title { Bandicoots and quolls }" " @NewPage { Yes }" "@Begin" "..." "@End @Section" } The @Code "@NewPage" option is only available with large-scale structure symbols that usually do not appear on a new page (like {@Code "@Section"}), and it forces them to appear on a new page. You can't use it with large-scale structure symbols that usually appear on a new page (like {@Code "@Chapter"}) to force them not to -- there is no way to do that. @PP All large-scale structure symbols have a @Code "@Tag" option, whose use is explained in Section {@NumberOf cross}, and a @Code "@RunningTitle" runningtitle. @Index @Code "@RunningTitle" option. If running page headers have been requested, @Code "@RunningTitle" will be used if it is given, otherwise @Code "@Title" will be used for the running header. For example, the present section begins like this: @ID @OneRow @Code { "@Section" " @Title { Large-scale structure: chapters, sections, etc. }" " @RunningTitle { Large-scale structure }" " @Tag { largescale }" "@Begin" "..." } The point is that the section title is rather long for a running title, and so we use @Code "@RunningTitle" to get an abbreviated version of it. @PP Section titles typically appear in Bold face in the section heading, but in Roman face in tables of contents and running page headers. So if part of your title is in italics, enclose it in @Code "@II" rather than just @Code "@I" to ensure that you get the right kind of italics in both contexts. @PP All large-scale structure symbols also have an @Code "@InitialLanguage" option which sets the current language for the duration of that symbol. However, footnotes, endnotes, figures, tables, references, and index entries are set in the initial language of the document as a whole, unless you change their language explicitly using the @Code "@Language" symbol. @PP The remainder of this section describes the setup file options for controlling the appearance of large-scale structure symbols. (For an introduction to setup files, consult Section {@NumberOf setup}.) These options mainly appear in the third @Code "@Use" clause, since exactly which large-scale structure symbols exist depends on the type of document. For example, here are the setup file options from the @Code "doc" setup file relating to appendices: @ID @OneRow @Code { "@AppendixWord { appendix }" "@AppendixNumbers { UCAlpha }" "@FirstAppendixNumber { 1 }" "@AppendixHeadingFont { Bold }" "@AppendixHeadingBreak { ragged 1.2fx nohyphen }" "@AppendixHeadingFormat { number @DotSep title }" "@AppendixGap { 2.0v @OrIfPlain 2f }" "@AppendixInContents { Yes }" "@AppendixNumInTheorems { No }" "@AppendixNumInDisplays { Yes }" "@AppendixNumInFigures { No }" "@AppendixNumInTables { No }" "@AppendixPrefix { }" } There are similar options for each large-scale structure symbol. Here is a brief explanation. @PP @Code "@AppendixWord" contains the word that is to be prefixed to the appendix number in full headings. The special value @Code appendix produces Appendix or its equivalent translated into the current language. Any other value produces itself. @PP @Code "@AppendixNumbers" determines the style of numbering of appendices, and may be {@Code Arabic}, {@Code Roman}, {@Code UCRoman}, {@Code Alpha}, {@Code UCAlpha}, or {@Code None} meaning unnumbered. Most common is {@Code Arabic}, but appendices traditionally use upper-case letters, hence the value {@Code UCAlpha} given above. @PP @Code "@FirstAppendixNumber { 1 }" is the number (always in Arabic) to assign to the first appendix. It is almost always 1, but a few people like to start their numbering from 0; this is only possible if the style of numbering specified by @Code "@AppendixNumbers" is {@Code Arabic}. @PP @Code "@AppendixHeadingFont" and @Code "@AppendixHeadingBreak" specify the font and paragraph breaking style to be applied to the appendix heading (relative to {@Code "@InitialFont"} and {@Code "@InitialBreak"}); the default values shown above produce Bold in the current font family and size, and ragged breaking without hyphenation. @PP @Code "@AppendixHeadingFormat" defines the format of the appendix heading. Within it, the symbols @Code number and @Code title stand for the appendix number (including the appendix word) and title respectively. The @Code "@DotSep" symbol produces a dot and two spaces, except when there is no number, when it produces nothing. For example, to draw a full-width rule under the heading, change this option to @ID @Code "@AppendixHeadingFormat { number @DotSep title @LP @FullWidthRule }" Arbitrary formats are acceptable. @PP @Code "@AppendixGap" determines the vertical space to leave between appendices; the default above leaves {@Code 2v}, except that when plain text output is in effect it leaves @Code 2f instead. To get a new page between appendices, use the magic value {@Code 2b}, which is raw Lout for new page. In books, the major components (preface, introduction, tables of contents, parts, chapters, appendices, and indexes) always start on a new page and there is nothing you can do to change that. @PP @Code "@AppendixInContents" determines whether the appendix will be listed in the table of contents, and may be @Code "Yes" or {@Code No}. The next few options determine whether an appendix number will be included in the numbers assigned to theorems etc., numbered displays, figures, and tables. @PP There is a @Code "@StructPageNums" setup file option which determines whether page numbers will include the numbers of large-scale structure symbols. If it is {@Code "Yes"}, @Code "@AppendixPrefix" is prefixed to all page numbers of pages containing appendices. For example, setting @Code "@AppendixPrefix" to @Code { APP- } produces page numbers APP-A-1, APP-A-2, and so on. The object separating each element of such compound numbers is determined by the @Code "@NumberSeparator" numberseparator. @Index @Code "@NumberSeparator" setup file option, which has default value @Code "." but which can easily be set to @Code "-" or @Code "--" if desired. @PP Running page headers above appendices always include the title of the appendix, so there is no option for specifying whether to do so or not. But for subappendices and other such smaller units, the choice of whether to mention them in running headers is left to the user: @ID @Code "@SubAppendixNumInRunners { Yes }" Despite the misleading name, this option determines whether the entire subappendix @I title as well as number will be used as a running header. @End @Section lout-3.39/doc/user/pascal0000644000076400007640000001300511363700677013773 0ustar jeffjeff@Chapter @Title { Pascal and Modula-2 Programs } @Begin @LP There is a @Code "@Pas" symbol for printing Pascal programs pascal @Index { Pascal programs } pas. @Index @Code "@Pas" @Cite { $jensen1975pascal }. No attempt is made to follow any particular printing standard; the design simply reflects this author's taste. To use {@Code "@Pas"}, place @Code "@SysInclude { pas }" at the start of your document in the usual way. A Pascal program or program fragment is entered like this: @ID @Code { "@ID @Pas {" "procedure PriDelete(x: PriEntry; var Q: PriorityQueue);" " var i: integer;" "begin" " with Q^ do begin" " size := size - 1;" " if x^.back <= size then" " begin" " i := x^.back;" " A[i] := A[size + 1];" " A[i]^.back := i;" " PriAddRoot(i, Q);" " PriAddLeaf(i, Q)" " end" " end" "end;" "}" } This produces @ID @Pas { procedure PriDelete(x: PriEntry; var Q: PriorityQueue); var i: integer; begin with Q^ do begin size := size - 1; if x^.back <= size then begin i := x^.back; A[i] := A[size + 1]; A[i]^.back := i; PriAddRoot(i, Q); PriAddLeaf(i, Q) end end end; } Blank lines, line breaks, indents and spaces in the input are respected, with a tab being considered equal to eight spaces. @Code "@Pas" can also be used within a paragraph to produce a fragment like @OneCol @Pas { A[i..j] }. Use @Code "@OneCol @Pas { ... }" to prevent the result from breaking over two lines. @PP @Code "@Pas" does not attempt to rearrange the program in any way. Each item is simply printed according to the following plan: @ID { 7c @Wide { @Code and |2.5ct @Pas { and } //1vx @Code array |2.5ct @Pas { array } //1vx @Code begin |2.5ct @Pas { begin } //1vx @Code case |2.5ct @Pas { case } //1vx @Code const |2.5ct @Pas { const } //1vx @Code div |2.5ct @Pas { div } //1vx @Code do |2.5ct @Pas { do } //1vx @Code downto |2.5ct @Pas { downto } //1vx @Code else |2.5ct @Pas { else } //1vx @Code end |2.5ct @Pas { end } //1vx @Code file |2.5ct @Pas { file } //1vx @Code for |2.5ct @Pas { for } //1vx @Code forward |2.5ct @Pas { forward } //1vx @Code function |2.5ct @Pas { function } //1vx @Code goto |2.5ct @Pas { goto } //1vx @Code if |2.5ct @Pas { if } //1vx @Code in |2.5ct @Pas { in } //1vx @Code label |2.5ct @Pas { label } //1vx @Code mod |2.5ct @Pas { mod } //1vx @Code nil |2.5ct @Pas { nil } //1vx @Code not |2.5ct @Pas { not } //1vx @Code of |2.5ct @Pas { of } //1vx @Code or |2.5ct @Pas { or } //1vx @Code otherwise |2.5ct @Pas { otherwise } //1vx @Code packed |2.5ct @Pas { packed } //1vx @Code procedure |2.5ct @Pas { procedure } //1vx @Code program |2.5ct @Pas { program } //1vx @Code record |2.5ct @Pas { record } //1vx @Code repeat |2.5ct @Pas { repeat } //1vx @Code set |2.5ct @Pas { set } //1vx @Code then |2.5ct @Pas { then } //1vx @Code to |2.5ct @Pas { to } //1vx @Code type |2.5ct @Pas { type } //1vx @Code until |2.5ct @Pas { until } //1vx @Code var |2.5ct @Pas { var } //1vx @Code while |2.5ct @Pas { while } //1vx @Code with |2.5ct @Pas { with } } | 7c @Wide { @Code "0" |2.5ct @Pas { 0 } //1vx @Code "1" |2.5ct @Pas { 1 } //1vx @Code "2" |2.5ct @Pas { 2 } //1vx @Code "3" |2.5ct @Pas { 3 } //1vx @Code "4" |2.5ct @Pas { 4 } //1vx @Code "5" |2.5ct @Pas { 5 } //1vx @Code "6" |2.5ct @Pas { 6 } //1vx @Code "7" |2.5ct @Pas { 7 } //1vx @Code "8" |2.5ct @Pas { 8 } //1vx @Code "9" |2.5ct @Pas { 9 } //1vx @Code "." |2.5ct @Pas { . } //1vx @Code "," |2.5ct @Pas { , } //1vx @Code ":" |2.5ct @Pas { : } //1vx @Code ";" |2.5ct @Pas { ; } //1vx @Code "'" |2.5ct @Pas { ' } //1vx @Code "`" |2.5ct @Pas { ` } //1vx @Code "+" |2.5ct @Pas { + } //1vx @Code "-" |2.5ct @Pas { - } //1vx @Code "*" |2.5ct @Pas { * } //1vx @Code "/" |2.5ct @Pas { / } //1vx @Code "(" |2.5ct @Pas { ( } //1vx @Code ")" |2.5ct @Pas { ) } //1vx @Code "[" |2.5ct @Pas { [ } //1vx @Code "]" |2.5ct @Pas { ] } //1vx @Code "^" |2.5ct @Pas { ^ } //1vx @Code ".." |2.5ct @Pas { .. } //1vx @Code "=" |2.5ct @Pas { = } //1vx @Code "<" |2.5ct @Pas { < } //1vx @Code ">" |2.5ct @Pas { > } //1vx @Code "<>" |2.5ct @Pas { <> } //1vx @Code "<=" |2.5ct @Pas { <= } //1vx @Code ">=" |2.5ct @Pas { >= } //1vx @Code ":=" |2.5ct @Pas { := } } } Anything not mentioned here will appear in italic font. @PP Unlike the @Code "@CP" symbol from the previous chapter, the @Code "@Pas" symbol is a quick-and-dirty production which does not offer you any options, or indeed attempt to solve every problem of Pascal formatting. In particular, Pascal strings need attention before formatting by {@Code "@Pas"}. Their interiors are best enclosed in double quotes to prevent the above transformations from occurring inside them. Any @Code "\\" or @Code "\"" characters inside strings will need to be replaced by @Code "\\\\" and @Code "\\\"" respectively, and the opening quote should be replaced by {@Code "`"}. @PP Similar remarks apply to Pascal comments; don't forget that @Code "{" and @Code "}" must be enclosed in double quotes. Alternatively, a @Code "@Com" symbol can be placed in front of a comment enclosed in braces. It will add literal braces: @ID @Code { "@Com { A Pascal comment }" } has result @ID @Pas { @Com { A Pascal comment } } It may still be necessary to enclose the interior in double quotes. @PP There is a @Code "@Modula" symbol which allows you to format Modula-2 programs in the same way as @Code "@Pas" does for Pascal. You get it via {@Code "@SysInclude { modula }"}, and once again it is a quick-and-dirty production. @End @Chapter lout-3.39/doc/user/dia_node0000644000076400007640000005277711363700677014315 0ustar jeffjeff@Section @Tag { dia_node } @Title { Nodes } @Begin @PP @Code "@Diag" has one basic symbol for creating nodes. It is called diagrams. @RawIndex { diagrams } diagrams.node @SubIndex { @Code "@Node" symbol } node.diagrams @Index { @Code "@Node" symbol (diagrams) } {@Code "@Node"}, and it takes the following object and encloses it in an outline whose shape is determined by the {@Code "outline"} option: diagrams. @RawIndex { diagrams } diagrams.outline @SubIndex { @Code "outline" option } outline.diagrams @Index { @Code "outline" option (diagrams) } @ID { @Code @Verbatim { @Node outline { curvebox } { Hello, world } } ||7ct @Diag { @Node outline { curvebox } { Hello, world } } } As Section {@NumberOf dia_defi} explains, the @Code outline option may be used to produce an outline of any shape. There are also nine values that produce standard shapes: {@Code box}, {@Code curvebox}, {@Code shadowbox}, {@Code square}, {@Code diamond}, {@Code polygon}, {@Code isosceles}, {@Code ellipse}, and {@Code circle}. @PP The shape of the outline is determined by the @Code outline option, but its size and position depend on the size and position of its {@I base}: the following object with a small margin around it. For diagrams. @RawIndex { diagrams } diagrams.base @SubIndex { base of a node } base.diagrams @Index { base of a node in diagrams } example, this is how a circle is positioned over its base (shown in grey): @ID @OneRow { @Code @Verbatim { @Node outline { circle } { Hello, world } } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @Node outline { circle } { Hello, world } } } Lout works only with the base, having no idea where the outline is, which explains why this circle is too high for the space allowed it. Section {@NumberOf dia_summ} shows how each of the standard outlines is positioned over its base. @PP The @Code "@Node" symbol has many options, but all of them without exception share the following very useful property: they may be given to the @Code "@Diag" symbol as well, where they apply to every node in the diagram: @ID @OneRow { @Code @Verbatim { @Diag outline { circle } { @Node @I a @DP @Node @I b } } ||7ct @Diag outline { circle } { @Node @I a @DP @Node @I b } } These options also appear in the setup file ({@Code diag}); if set there, they apply to every node in every diagram of the document. As the number of nodes increases, it becomes very tedious and error-prone to duplicate options at all the nodes. Giving each option just once, at the @Code "@Diag" symbol or in the setup file, saves time and makes it easy to change all the nodes into squares or any other shape later on. Any setup file option may be overridden in a diagram by giving the option to its @Code "@Diag" symbol; any @Code "@Diag" option or setup file option may be overridden at any node by giving the option again there. @PP Sometimes a diagram contains several different node types, each with its own combination of options (for example, the syntax diagrams of Section {@NumberOf dia_synt} have three node types). To handle these cases there are five alternative versions of the @Code "@Node" symbol, called {@Code "@ANode"}, diagrams. @RawIndex { diagrams } diagrams.anode @SubIndex { @Code "@ANode" symbol } anode.diagrams @Index { @Code "@ANode" symbol (diagrams) } {@Code "@BNode"}, diagrams. @RawIndex { diagrams } diagrams.bnode @SubIndex { @Code "@BNode" symbol } bnode.diagrams @Index { @Code "@BNode" symbol (diagrams) } {@Code "@CNode"}, diagrams. @RawIndex { diagrams } diagrams.cnode @SubIndex { @Code "@CNode" symbol } cnode.diagrams @Index { @Code "@CNode" symbol (diagrams) } {@Code "@DNode"}, diagrams. @RawIndex { diagrams } diagrams.dnode @SubIndex { @Code "@DNode" symbol } dnode.diagrams @Index { @Code "@DNode" symbol (diagrams) } and diagrams. @RawIndex { diagrams } diagrams.enode @SubIndex { @Code "@ENode" symbol } enode.diagrams @Index { @Code "@ENode" symbol (diagrams) } {@Code "@ENode"}. These have exactly the same options as {@Code "@Node"}, but the @I default values of these options are different, in that they come from @Code "@Diag" options, or else setup file options, that have an extra letter in front of their name: @Code { a }, @Code { b }, @Code { c }, @Code { d }, or @Code { e }. Here is a small example (see later in this section for the @Code font option): @ID @OneRow { @Code @Verbatim { @Diag aoutline { box } afont { Italic } boutline { curvebox } bfont { Bold } { @ANode identifier @DP @BNode keyword } } ||7ct @Diag aoutline { box } afont { Italic } boutline { curvebox } bfont { Bold } { @ANode identifier @DP @BNode keyword } } Note that when giving an option directly to {@Code "@ANode"}, {@Code "@BNode"}, {@Code "@CNode"}, {@Code "@DNode"}, and {@Code "@ENode"}, the initial @Code { a }, @Code { b }, @Code { c }, @Code { d }, or @Code { e } used with @Code "@Diag" and in the setup file is omitted. @PP To save time in simple cases, @Code "@Diag" provides nine other node symbols called {@Code "@Box"}, diagrams. @RawIndex { diagrams } diagrams.box @SubIndex { @Code "@Box" symbol } boxzzz.diagrams @Index { @Code "@Box" symbol (diagrams) } {@Code "@CurveBox"}, diagrams. @RawIndex { diagrams } diagrams.curvebox @SubIndex { @Code "@CurveBox" symbol } curvebox.diagrams @Index { @Code "@CurveBox" symbol (diagrams) } {@Code "@ShadowBox"}, diagrams. @RawIndex { diagrams } diagrams.shadowbox @SubIndex { @Code "@ShadowBox" symbol } shadowbox.diagrams @Index { @Code "@ShadowBox" symbol (diagrams) } {@Code "@Square"}, diagrams. @RawIndex { diagrams } diagrams.square @SubIndex { @Code "@Square" symbol } square.diagrams @Index { @Code "@Square" symbol (diagrams) } {@Code "@Diamond"}, diagrams. @RawIndex { diagrams } diagrams.diamond @SubIndex { @Code "@Diamond" symbol } diamond.diagrams @Index { @Code "@Diamond" symbol (diagrams) } {@Code "@Polygon"}, diagrams. @RawIndex { diagrams } diagrams.polygon @SubIndex { @Code "@Polygon" symbol } {@Code "@Isosceles"}, diagrams. @RawIndex { diagrams } diagrams.isosceles @SubIndex { @Code "@Isosceles" symbol } isosceles.diagrams @Index { @Code "@Isosceles" symbol (diagrams) } {@Code "@Ellipse"}, diagrams. @RawIndex { diagrams } diagrams.ellipse @SubIndex { @Code "@Ellipse" symbol } ellipse.diagrams @Index { @Code "@Ellipse" symbol (diagrams) } diagrams. @RawIndex { diagrams } diagrams.circle @SubIndex { @Code "@Circle" symbol } circle.diagrams @Index { @Code "@Circle" symbol (diagrams) } and {@Code "@Circle"}. These are just abbreviations for @Code "@Node" with the appropriate value of {@Code outline}, nothing more. They take the same options as {@Code "@Node"} (except that @Code outline is already fixed), and everything works in the same way. @PP There is a @Code shadow option which determines the depth of the shadow diagrams. @RawIndex { diagrams } diagrams.shadow @SubIndex { @Code "shadow" option } shadow.diagrams @Index { @Code "shadow" option (diagrams) } in shadow boxes: @ID { @Code @Verbatim { @Node outline { shadowbox } shadow { 0.4f } { WARNING } } ||7ct @Diag { @Node outline { shadowbox } shadow { 0.4f } { WARNING } } } This example shows the default value, 0.4 times the current font size. For polygons there is a @Code sides option for specifying the number diagrams. @RawIndex { diagrams } diagrams.sides @SubIndex { @Code "sides" option } sides.diagrams @Index { @Code "sides" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.angle @SubIndex { @Code "angle" option } angle.diagrams @Index { @Code "angle" option (diagrams) } polygon.diagrams @Index { @Code "@Polygon" (diagrams) } of sides, and an @Code angle option for rotating the outline: @IL @LI { @Code @Verbatim { @Polygon sides { 5 } } ||7ct @Diag { @Polygon sides { 5 } { 1c @High 1c @Wide } } } @LI { @Code @Verbatim { @Polygon sides { 5 } angle { 0d } } ||7ct @Diag { @Polygon sides { 5 } angle { 0d } { 1c @High 1c @Wide } } } @EL Setting @Code angle to @Code 0d causes the first vertex to be placed directly underneath the centre, and as the angle increases, the position of the first vertex rotates anticlockwise. The defaults are 3 sides and the angle that gives the polygon a horizontal base (i.e. 180 degrees divided by the number of sides). Thus the two cases with symmetry about a vertical axis are obtained by the default angle and @Code "0d" respectively, which is convenient. The {@Code "shadow"}, {@Code "sides"}, and {@Code "angle"} options may be given to any node, and also to {@Code "@Diag"} and in the setup file, where they apply to every node as usual. However, they only affect the appearance of shadow boxes and polygons, respectively. @PP The {@Code outlinestyle}, {@Code outlinedashlength}, and {@Code outlinewidth} diagrams. @RawIndex { diagrams } diagrams.outlinestyle @SubIndex { @Code "outlinestyle" option } outlinestyle. @RawIndex { @Code "outlinestyle" option } outlinestyle.in.diagrams @SubIndex { in diagrams } diagrams. @RawIndex { diagrams } diagrams.outlinedashlength @SubIndex { @Code "outlinedashlength" option } outlinedashlength. @RawIndex { @Code "outlinedashlength" option } outlinedashlength.in.diagrams @SubIndex { in diagrams } diagrams. @RawIndex { diagrams } diagrams.outlinewidth @SubIndex { @Code "outlinewidth" option } outlinewidth. @RawIndex { @Code "outlinewidth" option } outlinewidth.in.diagrams @SubIndex { in diagrams } options apply to any node and affect the appearance of the outline: @ID @OneRow { @Code @Verbatim { @CurveBox outlinestyle { solid } outlinedashlength { 0.2f } outlinewidth { thin } { Hello, world } } ||7ct @Diag { @CurveBox outlinestyle { solid } outlinedashlength { 0.2f } outlinewidth { thin } { Hello, world } } } This example shows the default values of these options. The {@Code outlinestyle} option's allowed values include {@Code solid}, {@Code dashed}, diagrams. @RawIndex { diagrams } diagrams.solid @SubIndex { @Code "solid" outlines } solid.diagrams @Index { @Code "solid" outlines (diagrams) } diagrams. @RawIndex { diagrams } diagrams.dashed @SubIndex { @Code "dashed" outlines } dashed.diagrams @Index { dashed outlines (diagrams) } {@Code cdashed}, {@Code dotted}, and {@Code noline}. diagrams. @RawIndex { diagrams } diagrams.cdashed @SubIndex { @Code "cdashed" outlines } cdashed.diagrams @Index { cdashed outlines (diagrams) } diagrams. @RawIndex { diagrams } diagrams.dotted @SubIndex { @Code "dotted" outlines } dotted.diagrams @Index { dotted outlines (diagrams) } diagrams. @RawIndex { diagrams } diagrams.noline @SubIndex { @Code "noline" outlines } noline.diagrams @Index { noline outlines (diagrams) } There are also six values for mixing dots and dashes (Section {@NumberOf dia_summ}). @PP The @Code dashed option makes all dashes the same length, whereas @Code cdashed halves the length of the first and last dash on each segment, which usually looks better: @ID @OneRow { @Code @Verbatim { @CurveBox outlinestyle { cdashed } { Hello, world } } ||7ct @Diag { @CurveBox outlinestyle { cdashed } { Hello, world } } } The length of dashes is {@Code outlinedashlength}, and the distance between dashes or dots is at most {@Code outlinedashlength}, reduced to make the dashes or dots fit evenly. The @Code outlinewidth option determines the width of the line, dashes, or dots, and may be {@Code thin}, {@Code medium}, {@Code thick}, or any length. The values used for {@Code thin}, {@Code medium}, and {@Code thick} are {@Code 0.04f}, {@Code 0.08f}, and {@Code 0.12f}. @PP The {@Code outlinestyle} option may contain a sequence of the values mentioned above, meaning that they are to be applied in turn to each segment of the outline: @ID @OneRow { @Code @Verbatim { @CurveBox outlinestyle { solid cdashed } { Hello, world } } ||7ct @Diag { @CurveBox outlinestyle { solid cdashed } { Hello, world } } } If there are more segments than values, {@Code outlinestyle} cycles back to the first value again; this is why a single value is applied to all segments. Section {@NumberOf dia_summ} shows how each of the standard shapes is divided into segments. @PP The node symbols of @Code "@Diag" are quite separate symbols from the three basic box symbols of Section {@NumberOf boxes}. Although much is the same, one obvious difference between the two is that to get no outline in those boxes you use @Code { "linewidth { none }" }, whereas to get no outline here you use @Code { "outlinestyle { noline }" }. The basic boxes can only draw the outline solid or not at all, and their options have been kept simple to reflect that. @PP Nodes may be painted any of the colours listed in Section {@NumberOf colour}, using the @Code "paint" option: diagrams. @RawIndex { diagrams } diagrams.paint @SubIndex { @Code "paint" option } paint. @RawIndex { @Code "paint" option } paint.in.diagrams @SubIndex { in diagrams } @ID @OneRow { @Code @Verbatim { @Box paint { grey } @Diamond outlinestyle { noline } paint { white } { Hello, world } } ||7ct @Diag { @Box paint { grey } @Diamond outlinestyle { noline } paint { white } { Hello, world } } } In this example the object following @Code "@Box" is a diamond containing {@Code "Hello, world"}. The default value of @Code "paint" is {@Code none}, a special value (not a colour) meaning don't use any paint. There is also a @Code "texture" option which causes this paint to be applied with a diagrams. @RawIndex { diagrams } diagrams.texture @SubIndex { @Code "texture" option } texture.option. @RawIndex { @Code "texture" option } texture.option.in.diagrams @SubIndex { in diagrams } given texture. This works exacly like the @Code texture option described in Section {@NumberOf boxes}, so we'll say no more about it here. @PP When painting it is important to know what order things are done in, because anything put down earlier will disappear under the paint. This is why @Code none and @Code white are different. Painting is done first, then boundaries, and finally the following object. @PP Each node symbol has @Code "font" and @Code "break" options which may be used to diagrams. @RawIndex { diagrams } diagrams.font @SubIndex { @Code "font" option } font.option. @RawIndex { @Code "font" option } font.option.in.diagrams @SubIndex { in diagrams } diagrams. @RawIndex { diagrams } diagrams.break @SubIndex { @Code "break" option } break. @RawIndex { @Code "break" option } break.diagrams @SubIndex { in diagrams } set the font and paragraph breaking style of the following object: @ID @OneRow { @Code @Verbatim { @Box font { Helvetica Base } break { clines } { WARNING DANGEROUS PENGUINS } } ||7ct @Diag { @Box font { Helvetica Base } break { clines } { WARNING DANGEROUS PENGUINS } } } Both options have empty default values, which leave the font and break style unchanged. There is also a @Code "format" option for making more diagrams. @RawIndex { diagrams } diagrams.format @SubIndex { @Code "format" option } format.diagrams @Index { @Code "format" option (diagrams) } radical changes to the appearance of the following object: @ID @OneRow { @Code @Verbatim { @Box format { {0.8 1.5} @Scale @S @Body } { Dangerous Penguins } } ||7ct @Diag { @Box format { { 0.8 1.5 } @Scale @S @Body } { Dangerous Penguins } } } The result is the @Code "format" option with any @Code "@Body" symbol within it replaced by the following object. These are very useful when attached to the @Code "@Diag" symbol: @ID @OneRow @Code @Verbatim { @Diag font { Helvetica Base } break { clines } format { { 0.8 1.5 } @Scale @S @Body } { ... } } since then they apply to every node, as usual, thereby eliminating a lot of tedious, error-prone duplication of formatting information at each node. @PP The @Code margin option determines the size of the margin added to diagrams. @RawIndex { diagrams } diagrams.margin @SubIndex { @Code "margin" option } margin.options @RawIndex { margin options } margin.options.in.diagrams @SubIndex { in diagrams } the following object: @ID @OneRow { @Code @Verbatim { @Box margin { 0c } { Hello, world } } ||7ct @Diag { @Box margin { 0c } { Hello, world } } } These margins are included in the node's base (described above), so a larger margin enlarges the base and hence the outline as well. The default value of @Code margin is {@Code 0.6f} (six-tenths of the current font size), and so the margin will automatically increase when the font size does, for example in overhead transparencies. @PP The @Code margin option adds the same margin to all four sides. For finer control, the @Code hmargin option determines the horizontal (left and right) margins only, overriding {@Code margin}. Similarly, the @Code vmargin option determines the vertical (top and foot) margins. There are also {@Code leftmargin}, {@Code rightmargin}, {@Code topmargin}, and {@Code footmargin} options which override {@Code margin}, {@Code hmargin}, and {@Code vmargin}. @PP When nodes appear side by side, the {@Code valign} option is diagrams. @RawIndex { diagrams } diagrams.valign @SubIndex { @Code "valign" option } valign.diagrams @Index { @Code "valign" option (diagrams) } useful for controlling their vertical position with respect to each other. For example, @ID @OneRow { @Code @Verbatim { @Diag valign { foot } { @Box font { 24p } Big @Box font { 8p } Small } } ||7ct @Diag valign { foot } { @Box font { 24p } Big @Box font { 8p } Small } } causes the feet of the boxes to be aligned. In this example it is applied to all nodes at once, but of course it can be applied to individual nodes as well. The value of {@Code valign} can be a length, which means that the point of alignment is to be that far down from the top of the base (including margins); or it may be {@Code top}, {@Code ctr}, or {@Code foot}, meaning alignment through the top, centre (the default value), or foot. @PP The {@Code vsize} option specifies a particular diagrams. @RawIndex { diagrams } diagrams.vsize @SubIndex { @Code "vsize" option } vsize.diagrams @Index { @Code "vsize" option (diagrams) } height for a node (not including margins): @ID @OneRow { @Code @Verbatim { @Diag vsize { 2f } { @Box font { 24p } Big @Box font { 8p } Small } } ||7ct @Diag vsize { 2f } { @Box font { 24p } Big @Box font { 8p } Small } } The font size used when calculating @Code vsize is not affected by the value of any @Code font option. If the following object is too tall for the chosen height, Lout will print a warning message (`forced to enlarge {@Code "@High"}', probably) and enlarge the base. @PP There is a @Code vindent option which is effective only when @Code vsize diagrams. @RawIndex { diagrams } diagrams.vindent @SubIndex { @Code "vindent" option } vindent.diagrams @Index { @Code "vindent" option (diagrams) } is used. It controls where in the vertical space the following object is to appear: @ID @OneRow { @Code @Verbatim { @Diag vsize { 3f } { @Box vindent { top } Top @Box Centre @Box vindent { foot } Foot } } ||7ct @Diag vsize { 3f } vindent { ctr } { @Box vindent { top } Top @Box Centre @Box vindent { foot } Foot } } The value may be {@Code top} for at the top, {@Code ctr} (the default value) for in the centre, {@Code foot} for at the foot, or a length, meaning that distance down from the top. These values are the same as for the @Code valign option. @PP Small discrepancies in the size of nodes can be very annoying, particularly when the nodes appear side by side: @ID @OneRow { @Code @Verbatim { @Diag { @Box Hole @Box in @Box my @Box pocket } } ||7ct @Diag { @Box Hole @Box in @Box my @Box pocket } } These are caused by the slightly different heights of the objects within the nodes. Selecting a fixed vertical size for all nodes goes some way towards solving this problem: @ID @OneRow { @Code @Verbatim { @Diag vsize { 1f } { @Box Hole @Box in @Box my @Box pocket } } ||7ct @Diag vsize { 1f } { @Box Hole @Box in @Box my @Box pocket } } The size @Code "1f" is a good choice because most fonts are designed to be @Code "1f" high from the top of the tallest character to the foot of the deepest. However, there is still a problem with the baselines of the words being misaligned. A better solution is to insert a @I { vertical strut } into each node: an invisible object with zero width and height equal to {@Code 1f}. This is done using the @Code vstrut option: diagrams. @RawIndex { diagrams } diagrams.vstrut @SubIndex { @Code "vstrut" option } vstrut.diagrams @Index { @Code "vstrut" option (diagrams) } @ID @OneRow { @Code @Verbatim { @Diag vstrut { yes } { @Box Hole @Box in @Box my @Box pocket } } ||7ct @Diag vstrut { yes } { @Box Hole @Box in @Box my @Box pocket } } The @Code vstrut option may be {@Code yes}, {@Code no} (the default value), or a length, meaning to insert a strut of this height. So @Code "vstrut { yes }" is equivalent to {@Code "vstrut { 1.0f }"}. @PP There are {@Code halign}, {@Code hsize}, {@Code hindent}, and {@Code hstrut} diagrams. @RawIndex { diagrams } diagrams.halign @SubIndex { @Code "halign" option } halign.diagrams @Index { @Code "halign" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.hsize @SubIndex { @Code "hsize" option } hsize.diagrams @Index { @Code "hsize" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.hindent @SubIndex { @Code "hindent" option } hindent.diagrams @Index { @Code "hindent" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.hstrut @SubIndex { @Code "hstrut" option } hstrut.diagrams @Index { @Code "hstrut" option (diagrams) } options which work horizontally exactly as {@Code valign}, {@Code vsize}, {@Code vindent}, and {@Code vstrut} work vertically, except that they use {@Code left} and {@Code right} where the vertical ones use {@Code top} and {@Code foot}. The best way to fix horizontal size discrepancies is with {@Code hsize}, not {@Code hstrut}. @End @Section lout-3.39/doc/user/mat_summ0000644000076400007640000012713711363700677014366 0ustar jeffjeff@Section @Title { Summary } @Tag { mat_summ } @Begin @PP This section is a complete list of the symbols provided by {@Code "@Math"}. We divide them into @I { helper }, @I { ordinary }, @I { variable-building }, @I { large operator }, @I { unary operator }, @I { binary operator }, @I { relation }, and @I { punctuation } symbols. mathematics.precedence @SubIndex { precedence of symbols } precedence.mathematics @Index { precedence of symbols (mathematics) } The precedences of these symbols, where relevant, are as follows: @ID @OneRow @Tbl mv { 0.5vx } aformat { @Cell ml { 0i } A | @Cell indent { ctr } B | @Cell mr { 0i } C } afont { Italic } bformat { @Cell ml { 0i } A | @Cell indent { ctr } B | @Cell mr { 0i } C } { @Rowa ma { 0i } A { Symbol type } B { Precedence } C { Symbols } rb { yes } @Rowb A { Helper } B { 100 } C { @Code { "big" } @Code { "small" } @Code { "vctr" } @Code { "@SuperScriptStyle" } etc. # @Code { "@SubScriptStyle" } # @Code { "@NumeratorStyle" } @Code { "@DenominatorStyle" } # @Code { "@SquareRootStyle" } } @Rowb A { Variable-building } B { 84 } C { @Code { "dot" } @Code { "dotdot" } @Code { "hat" } @Code { "tilde" } @Code { "vec" } @Code { "dyad" } @Code { "overbar" } @Code { "underbar" } } @Rowb A { Variable-building } B { 82 } C { @Code { "sub" } @Code { "on" } @Code { "ton" } } @Rowb A { Variable-building } B { 80 } C { @Code { "sup" } @Code { "supp" } } @Rowb A { Unary operator } B { 70 } C { @Code { sqrt } @Code { root } @Code { zroot } @Code { matrix } etc. } @Rowb A { Binary operator } B { 64 } C { @Code { "times" } @Code { "*" } } @Rowb A { Binary operator } B { 62 } C { @Code { "div" } @Code { "frac" } @Code { "over" } } @Rowb A { Binary operator } B { 60 } C { @Code { "bin" } @Code { "+" } @Code { "-" } and all other binary operator symbols } @Rowb A { Relation } B { 50 } C { @Code "rel" and all other relation symbols } @Rowb A { Punctuation } B { 40 } C { @Code { "punct" } @Code { ";" } @Code { "," } @Code { "col" } } @Rowb A { Helper } B { 26 } C { @Code "non" } @Rowb A { Helper } B { 24 } C { @Code { "above" } @Code { "below" } @Code { "wideabove" } @Code { "widebelow" } } @Rowb A { Helper } B { 22 } C { @Code { "col" } @Code { "lcol" } @Code { "ccol" } @Code { "rcol" } @Code { "mcol" } } @Rowb A { Helper } B { 20 } C { @Code { "row" } @Code { "axisrow" } } rb { yes } mb { 0i } } Results are shown in display style in this section; the other styles give more compressed results. @BeginSubSections @SubSection @Title { Helper symbols } @Begin @LP The full list of helper symbols is @ID @OneRow @Tbl mv { 0.5vx } aformat { @Cell ml { 0i } A | @Cell mr { 0i } B } { @Rowa ma { 0i } A { @Code "`" } B { Thin space, as after punctuation symbols } @Rowa A { @Code "``" } B { Medium space, as around binary operator symbols } @Rowa A { @Code "```" } B { Thick space, as around relation symbols } @Rowa A { @Code "big x" mathematics.big. @SubIndex { @Code "big" symbol } big. @Index { @Code "big" symbol (mathematics) } } B { Make @Code x larger } @Rowa A { @Code "small x" mathematics.small. @SubIndex { @Code "small" symbol } small. @Index { @Code "small" symbol (mathematics) } } B { Make @Code x smaller } @Rowa A { @Code "vctr x" mathematics.vctr. @SubIndex { @Code "vctr" symbol } vctr. @Index { @Code "vctr" symbol (mathematics) } } B { Centre @Code x vertically } @Rowa A { @Code "@SuperScriptStyle x" mathematics.superscriptstyle. @SubIndex { @Code "@SuperScriptStyle" } superscriptstyle. @Index { @Code "@SuperScriptStyle" (mathematics) } } B { Set @Code x in the style of a superscript } @Rowa A { @Code "@SubScriptStyle x" mathematics.subscriptstyle. @SubIndex { @Code "@SubScriptStyle" } subscriptstyle. @Index { @Code "@SubScriptStyle" (mathematics) } } B { Set @Code x in the style of a subscript } @Rowa A { @Code "@NumeratorStyle x" mathematics.numeratorstyle. @SubIndex { @Code "@NumeratorStyle" } numeratorstyle. @Index { @Code "@NumeratorStyle" (mathematics) } } B { Set @Code x in the style of a numerator } @Rowa A { @Code "@DenominatorStyle x" mathematics.denominatorstyle. @SubIndex { @Code "@DenominatorStyle" } denominatorstyle. @Index { @Code "@DenominatorStyle" (mathematics) } } B { Set @Code x in the style of a denominator } @Rowa A { @Code "@SquareRootStyle x" mathematics.squarerootstyle. @SubIndex { @Code "@SquareRootStyle" } squarerootstyle. @Index { @Code "@SquareRootStyle" (mathematics) } } B { Set @Code x in the style of a square root } @Rowa A { @Code { above } @Code { below } @Code { wideabove } @Code { widebelow } } B { Vertical stacking (see below) } @Rowa A { @Code { "col" } @Code { "lcol" } @Code { "ccol" } @Code { "rcol" } @Code { "mcol" } @Code { "row" } @Code { "axisrow" } } B { Used only within matrices (Section {@NumberOf matrices}) } @Rowa A { @Code "non x" } B { Remove spaces from @Code x (see below) } mb { 0i } } where @Code "x" is arbitrary as usual. The @Code "above" symbol prints mathematics.above. @SubIndex { @Code "above" symbol } above. @Index { @Code "above" symbol (mathematics) } the preceding object above the following object, while the @Code "below" mathematics.below. @SubIndex { @Code "below" symbol } below. @Index { @Code "below" symbol (mathematics) } symbol prints it below: @ID { @Code @Verbatim { { a above f } + { z below b } } |7ct @Math { { a above f } + { z below b } } } Here is a larger example: @ID { @Code @Verbatim { sum from { { 1 <= i <= p } above { 1 <= j <= q } above { 1 <= k <= r } } { a sub ij b sub jk c sub ki } } ||7ct @Math { sum from { { 1 <= i <= p } above { 1 <= j <= q } above { 1 <= k <= r } } { a sub { ij } b sub { jk } c sub { ki } } } } The @Code "wideabove" and @Code "widebelow" symbols are like @Code "above" mathematics.wideabove. @SubIndex { @Code "wideabove" symbol } wideabove. @Index { @Code "wideabove" symbol (mathematics) } mathematics.widebelow. @SubIndex { @Code "widebelow" symbol } widebelow. @Index { @Code "widebelow" symbol (mathematics) } and @Code "below" except that they horizontally scale the right parameter to the width of the left: @IL @LI { @Code @Verbatim { {a, ... , z} wideabove {90d @Rotate blbrace} } ||7ct @Math { {a, ... , z} wideabove {90d @Rotate blbrace} } } @LI { @Code "{a, ... , z} widebelow minus" |7ct @Math { {a, ... , z} widebelow minus } } @EL The @Code "non" symbol prints the following object without the mathematics.non. @SubIndex { @Code "non" symbol } non. @Index { @Code "non" symbol (mathematics) } horizontal spacing it would usually contain. It has low precedence so that, in examples like @ID @Code @Verbatim { The `@M { non <= }' operation is reflexive and transitive. } which produces @ID { The `@M { non <= }' operation is reflexive and transitive. } it is easy to use the familiar symbolic names for relations and operators without getting the usual surrounding spaces, saving the trouble of looking up the names of the characters. @End @SubSection @SubSection @Title { Ordinary symbols } @Begin @LP Ordinary symbols are the simplest symbols. They do not take objects mathematics.ordinary. @SubIndex { ordinary symbols } ordinary. @Index { ordinary symbols (mathematics) } to their left or right, and they always look the same except for the usual change of size in certain contexts (superscripts, subscripts, etc.). There are hundreds of these symbols, so they are presented here in groups. @PP The first group consists of all the symbols from the Adobe Symbol font; these are as for the @Code "@Sym" symbol of Section {@NumberOf characters}, but within @Code "@Math" you don't type {@Code "@Sym"}: @DP @Tbl mv { 0.5vx } aformat { @Cell ml {@DisplayIndent} indent {right} w {@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "space" } B { @Math { space } } C { "exclam" } D { @Math { exclam } } E { "universal" } F { @Math { universal } } @Rowa A { "numbersign" } B { @Math { numbersign } } C { "existential" } D { @Math { existential } } E { "percent" } F { @Math { percent } } @Rowa A { "ampersand" } B { @Math { ampersand } } C { "suchthat" } D { @Math { suchthat } } E { "parenleft" } F { @Math { parenleft } } @Rowa A { "parenright" } B { @Math { parenright } } C { "asteriskmath" } D { @Math { asteriskmath } } E { "plus" } F { @Math { plus } } @Rowa A { "comma" } B { @Math { comma } } C { "minus" } D { @Math { minus } } E { "period" } F { @Math { period } } @Rowa A { "slash" } B { @Math { slash } } C { "zero" } D { @Math { zero } } E { "one" } F { @Math { one } } @Rowa A { "two" } B { @Math { two } } C { "three" } D { @Math { three } } E { "four" } F { @Math { four } } @Rowa A { "five" } B { @Math { five } } C { "six" } D { @Math { six } } E { "seven" } F { @Math { seven } } @Rowa A { "eight" } B { @Math { eight } } C { "nine" } D { @Math { nine } } E { "colon" } F { @Math { colon } } @Rowa A { "semicolon" } B { @Math { semicolon } } C { "less" } D { @Math { less } } E { "equal" } F { @Math { equal } } @Rowa A { "greater" } B { @Math { greater } } C { "question" } D { @Math { question } } E { "congruent" } F { @Math { congruent } } @Rowa A { "Alpha" } B { @Math { Alpha } } C { "Beta" } D { @Math { Beta } } E { "Chi" } F { @Math { Chi } } @Rowa A { "Delta" } B { @Math { Delta } } C { "Epsilon" } D { @Math { Epsilon } } E { "Phi" } F { @Math { Phi } } @Rowa A { "Gamma" } B { @Math { Gamma } } C { "Eta" } D { @Math { Eta } } E { "Iota" } F { @Math { Iota } } @Rowa A { "thetaone" } B { @Math { thetaone } } C { "Kappa" } D { @Math { Kappa } } E { "Lambda" } F { @Math { Lambda } } @Rowa A { "Mu" } B { @Math { Mu } } C { "Nu" } D { @Math { Nu } } E { "Omicron" } F { @Math { Omicron } } @Rowa A { "Pi" } B { @Math { Pi } } C { "Theta" } D { @Math { Theta } } E { "Rho" } F { @Math { Rho } } @Rowa A { "Sigma" } B { @Math { Sigma } } C { "Tau" } D { @Math { Tau } } E { "Upsilon" } F { @Math { Upsilon } } @Rowa A { "sigmaone" } B { @Math { sigmaone } } C { "Omega" } D { @Math { Omega } } E { "Xi" } F { @Math { Xi } } @Rowa A { "Psi" } B { @Math { Psi } } C { "Zeta" } D { @Math { Zeta } } E { "bracketleft" } F { @Math { bracketleft } } @Rowa A { "therefore" } B { @Math { therefore } } C { "bracketright" } D { @Math { bracketright } } E { "perpendicular" } F { @Math { perpendicular } } @Rowa A { "underscore" } B { @Math { underscore } } C { "radicalex" } D { @Math { radicalex } } E { "alpha" } F { @Math { alpha } } @Rowa A { "beta" } B { @Math { beta } } C { "chi" } D { @Math { chi } } E { "delta" } F { @Math { delta } } @Rowa A { "epsilon" } B { @Math { epsilon } } C { "phi" } D { @Math { phi } } E { "gamma" } F { @Math { gamma } } @Rowa A { "eta" } B { @Math { eta } } C { "iota" } D { @Math { iota } } E { "phione" } F { @Math { phione } } @Rowa A { "kappa" } B { @Math { kappa } } C { "lambda" } D { @Math { lambda } } E { "mu" } F { @Math { mu } } @Rowa A { "nu" } B { @Math { nu } } C { "omicron" } D { @Math { omicron } } E { "pi" } F { @Math { pi } } @Rowa A { "theta" } B { @Math { theta } } C { "rho" } D { @Math { rho } } E { "sigma" } F { @Math { sigma } } @Rowa A { "tau" } B { @Math { tau } } C { "upsilon" } D { @Math { upsilon } } E { "omegaone" } F { @Math { omegaone } } @Rowa A { "omega" } B { @Math { omega } } C { "xi" } D { @Math { xi } } E { "psi" } F { @Math { psi } } @Rowa A { "zeta" } B { @Math { zeta } } C { "braceleft" } D { @Math { braceleft } } E { "bar" } F { @Math { bar } } @Rowa A { "braceright" } B { @Math { braceright } } C { "similar" } D { @Math { similar } } E { "Upsilonone" } F { @Math { Upsilonone } } @Rowa A { "minute" } B { @Math { minute } } C { "lessequal" } D { @Math { lessequal } } E { "fraction" } F { @Math { fraction } } @Rowa A { "infinity" } B { @Math { infinity } } C { "florin" } D { @Math { florin } } E { "club" } F { @Math { club } } @Rowa A { "diamond" } B { @Math { diamond } } C { "heart" } D { @Math { heart } } E { "spade" } F { @Math { spade } } @Rowa A { "arrowboth" } B { @Math { arrowboth } } C { "arrowleft" } D { @Math { arrowleft } } E { "arrowup" } F { @Math { arrowup } } @Rowa A { "arrowright" } B { @Math { arrowright } } C { "arrowdown" } D { @Math { arrowdown } } E { "degree" } F { @Math { degree } } @Rowa A { "plusminus" } B { @Math { plusminus } } C { "second" } D { @Math { second } } E { "greaterequal" } F { @Math { greaterequal } } @Rowa A { "multiply" } B { @Math { multiply } } C { "proportional" } D { @Math { proportional } } E { "partialdiff" } F { @Math { partialdiff } } @Rowa A { "bullet" } B { @Math { bullet } } C { "divide" } D { @Math { divide } } E { "notequal" } F { @Math { notequal } } @Rowa A { "equivalence" } B { @Math { equivalence } } C { "approxequal" } D { @Math { approxequal } } E { "ellipsis" } F { @Math { ellipsis } } @Rowa A { "arrowvertex" } B { @Math { arrowvertex } } C { "arrowhorizex" } D { @Math { arrowhorizex } } E { "carriagereturn" } F { @Math { carriagereturn } } @Rowa A { "aleph" } B { @Math { aleph } } C { "Ifraktur" } D { @Math { Ifraktur } } E { "Rfraktur" } F { @Math { Rfraktur } } @Rowa A { "weierstrass" } B { @Math { weierstrass } } C { "circlemultiply" } D { @Math { circlemultiply } } E { "circleplus" } F { @Math { circleplus } } @Rowa A { "emptyset" } B { @Math { emptyset } } C { "intersection" } D { @Math { intersection } } E { "union" } F { @Math { union } } @Rowa A { { 0.92 1.0 } @Scale "propersuperset" } B { @Math { propersuperset } } C { "reflexsuperset" } D { @Math { reflexsuperset } } E { "notsubset" } F { @Math { notsubset } } @Rowa A { "propersubset" } B { @Math { propersubset } } C { "reflexsubset" } D { @Math { reflexsubset } } E { "element" } F { @Math { element } } @Rowa A { "notelement" } B { @Math { notelement } } C { "angle" } D { @Math { angle } } E { "gradient" } F { @Math { gradient } } @Rowa A { "registerserif" } B { @Math { registerserif } } C { "copyrightserif" } D { @Math { copyrightserif } } E { "trademarkserif" } F { @Math { trademarkserif } } @Rowa A { "product" } B { @Math { product } } C { "radical" } D { @Math { radical } } E { "dotmath" } F { @Math { dotmath } } @Rowa A { "logicalnot" } B { @Math { logicalnot } } C { "logicaland" } D { @Math { logicaland } } E { "logicalor" } F { @Math { logicalor } } @Rowa A { "arrowdblboth" } B { @Math { arrowdblboth } } C { "arrowdblleft" } D { @Math { arrowdblleft } } E { "arrowdblup" } F { @Math { arrowdblup } } @Rowa A { "arrowdblright" } B { @Math { arrowdblright } } C { "arrowdbldown" } D { @Math { arrowdbldown } } E { "lozenge" } F { @Math { lozenge } } @Rowa A { "angleleft" } B { @Math { angleleft } } C { "registersans" } D { @Math { registersans } } E { "copyrightsans" } F { @Math { copyrightsans } } @Rowa A { { 0.92 1.0 } @Scale "trademarksans" } B { @Math { trademarksans } } C { "summation" } D { @Math { summation } } E { "parenlefttp" } F { @Math { parenlefttp } } @Rowa A { "parenleftex" } B { @Math { parenleftex } } C { "parenleftbt" } D { @Math { parenleftbt } } E { "bracketlefttp" } F { @Math { bracketlefttp } } @Rowa A { "bracketleftex" } B { @Math { bracketleftex } } C { "bracketleftbt" } D { @Math { bracketleftbt } } E { "bracelefttp" } F { @Math { bracelefttp } } @Rowa A { "braceleftmid" } B { @Math { braceleftmid } } C { "braceleftbt" } D { @Math { braceleftbt } } E { "braceex" } F { @Math { braceex } } @Rowa A { "angleright" } B { @Math { angleright } } C { "integral" } D { @Math { integral } } E { "integraltp" } F { @Math { integraltp } } @Rowa A { "integralex" } B { @Math { integralex } } C { "integralbt" } D { @Math { integralbt } } E { "parenrighttp" } F { @Math { parenrighttp } } @Rowa A { "parenrightex" } B { @Math { parenrightex } } C { "parenrightbt" } D { @Math { parenrightbt } } E { "bracketrighttp" } F { @Math { bracketrighttp } } @Rowa A { "bracketrightex" } B { @Math { bracketrightex } } C { "bracketrightbt" } D { @Math { bracketrightbt } } E { "bracerighttp" } F { @Math { bracerighttp } } @Rowa A { "bracerightmid" } B { @Math { bracerightmid } } C { "bracerightbt" } D { @Math { bracerightbt } } mb { 0i } } @DP The symbols that produce the Symbol font characters @Code { theta1 }, @Code { sigma1 }, @Code { phi1 }, @Code { omega1 }, and @Code { Upsilon1 } are called @Code { thetaone }, @Code { sigmaone }, @Code { phione }, @Code { omegaone }, and @Code { Upsilonone }, since Lout symbol names cannot contain both letters and digits. The second group of ordinary symbols produces arrows: @ID @OneRow @Tbl mv { 0.5vx } aformat { @Cell ml{0i} indent{right} w{@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "leftarrow" } B { @Math { leftarrow } } C { "longleftarrow" } D { @Math { longleftarrow } } E { "dblleftarrow" } F { @Math { dblleftarrow } } @Rowa A { "dbllongleftarrow" } B { @Math { dbllongleftarrow } } C { "rightarrow" } D { @Math { rightarrow } } E { "longrightarrow" } F { @Math { longrightarrow } } @Rowa A { "dblrightarrow" } B { @Math { dblrightarrow } } C { "dbllongrightarrow" } D { @Math { dbllongrightarrow } } E { "leftrightarrow" } F { @Math { leftrightarrow } } @Rowa A { "longleftrightarrow" } B { @Math { longleftrightarrow } } C { "dblleftrightarrow" } D { @Math { dblleftrightarrow } } E { { 0.85 1.0 } @Scale "dbllongleftrightarrow" } F { @Math { dbllongleftrightarrow } } @Rowa A { "mapsto" } B { @Math { mapsto } } C { "longmapsto" } D { @Math { longmapsto } } E { "hookleftarrow" } F { @Math { hookleftarrow } } @Rowa A { "hookrightarrow" } B { @Math { hookrightarrow } } C { "leadsto" } D { @Math { leadsto } } E { "leftharpoonup" } F { @Math { leftharpoonup } } @Rowa A { "rightharpoonup" } B { @Math { rightharpoonup } } C { "leftharpoondown" } D { @Math { leftharpoondown } } E { { 0.95 1.0 } @Scale "rightharpoondown" } F { @Math { rightharpoondown } } @Rowa A { "rightleftharpoons" } B { @Math { rightleftharpoons } } C { "uparrow" } D { @Math { uparrow } } E { "dbluparrow" } F { @Math { dbluparrow } } @Rowa A { "downarrow" } B { @Math { downarrow } } C { "dbldownarrow" } D { @Math { dbldownarrow } } E { "updownarrow" } F { @Math { updownarrow } } @Rowa A { "dblupdownarrow" } B { @Math { dblupdownarrow } } C { "nearrow" } D { @Math { nearrow } } E { "searrow" } F { @Math { searrow } } @Rowa A { "swarrow" } B { @Math { swarrow } } C { "nwarrow" } D { @Math { nwarrow } } mb { 0i } } The members of the third group of ordinary symbols stand for themselves, but in Roman font rather than the Italic which is the default in mathematics: @ID @OneRow @Tbl mv { 0.45vx } aformat { @Cell ml {0i} indent {right} w {@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "arccos" } B { @Math { arccos } } C { "arcsin" } D { @Math { arcsin } } E { "arctan" } F { @Math { arctan } } @Rowa A { "arg" } B { @Math { arg } } C { "cos" } D { @Math { cos } } E { "cosh" } F { @Math { cosh } } @Rowa A { "cot" } B { @Math { cot } } C { "coth" } D { @Math { coth } } E { "csc" } F { @Math { csc } } @Rowa A { "deg" } B { @Math { deg } } C { "det" } D { @Math { det } } E { "dim" } F { @Math { dim } } @Rowa A { "exp" } B { @Math { exp } } C { "gcd" } D { @Math { gcd } } E { "hom" } F { @Math { hom } } @Rowa A { "inf" } B { @Math { inf } } C { "ker" } D { @Math { ker } } E { "lg" } F { @Math { lg } } @Rowa A { "lim" } B { @Math { lim } } C { "liminf" } D { @ZeroWidth @Math { liminf } } E { "limsup" } F { @Math { limsup } } @Rowa A { "ln" } B { @Math { ln } } C { "log" } D { @Math { log } } E { "max" } F { @Math { max } } @Rowa A { "min" } B { @Math { min } } C { "Pr" } D { @Math { Pr } } E { "sec" } F { @Math { sec } } @Rowa A { "sin" } B { @Math { sin } } C { "sinh" } D { @Math { sinh } } E { "supr" } F { @Math { supr } } @Rowa A { "tan" } B { @Math { tan } } C { "tanh" } D { @Math { tanh } } E { "mod" } F { @Math { mod } } @Rowa A { "0" } B { @Math { 0 } } C { "1" } D { @Math { 1 } } E { "2" } F { @Math { 2 } } @Rowa A { "3" } B { @Math { 3 } } C { "4" } D { @Math { 4 } } E { "5" } F { @Math { 5 } } @Rowa A { "6" } B { @Math { 6 } } C { "7" } D { @Math { 7 } } E { "8" } F { @Math { 8 } } @Rowa A { "9" } B { @Math { 9 } } C { "!" } D { @Math { ! } } E { "?" } F { @Math { ? } } @Rowa A { "%" } B { @Math { % } } C { "(" } D { @Math { ( } } E { ")" } F { @Math { ) } } @Rowa A { "[" } B { @Math { [ } } C { "]" } D { @Math { ] } } mb { 0i } } The fourth group make good values for the @Code "atleft" and @Code "atright" options of @Code { matrix }: @ID @OneRow @Tbl mv { 0.5vx } aformat { @Cell ml { 0i } indent { right } w {@LCodeWidth} @Code A | @Cell B | @Cell | @Cell indent { right } @Code C | @Cell D | @Cell | @Cell indent { right } @Code E | @Cell F | @Cell | @Cell indent { right } @Code G | @Cell mr { 0i } H } { @Rowa ma { 0i } strut { 1.2f } A { "lpar" } B { @Math { lpar } } C { "rpar" } D { @Math { rpar } } E { "lbrack" } F { @Math { lbrack } } G { "rbrack" } H { @Math { rbrack } } @Rowa strut { 1.2f } A { "lbrace" } B { @Math { lbrace } } C { "rbrace" } D { @Math { rbrace } } E { "lfloor" } F { @Math { lfloor } } G { "rfloor" } H { @Math { rfloor } } @Rowa strut { 1.2f } A { "lceil" } B { @Math { lceil } } C { "rceil" } D { @Math { rceil } } E { "langle" } F { @Math { langle } } G { "rangle" } H { @Math { rangle } } @Rowa strut { 3.5f } A { "blpar" } B { @Math { blpar } } C { "brpar" } D { @Math { brpar } } E { "blbrack" } F { @Math { blbrack } } G { "brbrack" } H { @Math { brbrack } } @Rowa strut { 3.5f } A { "blbrace" } B { @Math { blbrace } } C { "brbrace" } D { @Math { brbrace } } E { "blfloor" } F { @Math { blfloor } } G { "brfloor" } H { @Math { brfloor } } @Rowa strut { 3.5f } A { "blceil" } B { @Math { blceil } } C { "brceil" } D { @Math { brceil } } E { "blangle" } F { @Math { blangle } } G { "brangle" } H { @Math { brangle } } mb { 0i } } The last group is miscellaneous: @DP @RID @OneRow @Tbl mv { 0.5vx } aformat { @Cell ml {0i} indent {right} w {@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "hbar" } B { @Math { hbar } } C { "Re" } D { @Math { Re } } E { "Im" } F { @Math { Im } } @Rowa A { "partial" } B { @Math { partial } } C { "infty" } D { @Math { infty } } E { "prime" } F { @Math { prime } } @Rowa A { "nabla" } B { @Math { nabla } } C { "surd" } D { @Math { surd } } E { "top" } F { @Math { top } } @Rowa A { "bot" } B { @Math { bot } } C { "dbar" } D { @Math { dbar } } E { "triangle" } F { @Math { triangle } } @Rowa A { "backslash" } B { @Math { backslash } } C { "forall" } D { @Math { forall } } E { "exists" } F { @Math { exists } } @Rowa A { "neg" } B { @Math { neg } } C { "circle" } D { @Math { circle } } E { "filledcircle" } F { @Math { filledcircle } } @Rowa A { "square" } B { @Math { square } } C { "ldots" } D { @Math { ldots } } E { "cdots" } F { @Math { cdots } } @Rowa A { "vdots" } B { @Math { vdots } } C { "ddots" } D { @Math { ddots } } E { "del" } F { @Math { del } } @Rowa A { "grad" } B { @Math { grad } } C { "..." } D { @Math { ... } } E { ",...," } F { @Math { ,..., } } @Rowa A { "'" } B { @Math { ' } } C { "''" } D { @Math { '' } } E { "'''" } F { @Math { ''' } } @Rowa A { "''''" } B { @Math { '''' } } C { "empty" } D { @Math { empty } } E { "triangleup" } F { @Math { triangleup } } @Rowa A { "triangledown" } B { @Math { triangledown } } C { "half" } D { @Math { half } } E { "third" } F { @Math { third } } mb { 0i } } @End @SubSection @SubSection @Title { Variable-building symbols } @Begin @LP Under this category are symbols that are mainly used to build mathematics.variablebuilding. @SubIndex { variable-building symbols } variablebuilding. @Index { variable-building symbols (mathematics) } variables. However, as usual in Lout, the objects they link together may in fact be arbitrary. First we have symbols that place a mark over or under an object: mathematics.dot. @SubIndex { @Code "dot" symbol } dot. @Index { @Code "dot" symbol (mathematics) } mathematics.dotdot. @SubIndex { @Code "dotdot" symbol } dotdot. @Index { @Code "dotdot" symbol (mathematics) } mathematics.hat. @SubIndex { @Code "hat" symbol } hat. @Index { @Code "hat" symbol (mathematics) } mathematics.tilde. @SubIndex { @Code "tilde" symbol } tilde. @Index { @Code "tilde" symbol (mathematics) } mathematics.vec. @SubIndex { @Code "vec" symbol } vec. @Index { @Code "vec" symbol (mathematics) } mathematics.dyad. @SubIndex { @Code "dyad" symbol } dyad. @Index { @Code "dyad" symbol (mathematics) } mathematics.overbar. @SubIndex { @Code "overbar" symbol } overbar. @Index { @Code "overbar" symbol (mathematics) } mathematics.underbar. @SubIndex { @Code "underbar" symbol } underbar. @Index { @Code "underbar" symbol (mathematics) } @ID @Tbl mv { 0.5vx } aformat { @Cell ml{0i} indent{right} w{@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "x dot" } B { @Math { x dot } } C { "x dotdot" } D { @Math { x dotdot } } E { "x hat" } F { @Math { x hat } } @Rowa A { "x tilde" } B { @Math { x tilde } } C { "x vec" } D { @Math { x vec } } E { "x dyad" } F { @Math { x dyad } } @Rowa A { "{x + y} overbar" } B { @Math { {x + y} overbar } } C { "{x + y} underbar" } D { @Math { {x + y} underbar } } mb { 0i } } These marks are centred, with a small skew to allow for italic slant, except the last two which are extended to the width of the object. @PP The remaining variable-building symbols produce superscripts and subscripts: # These differ in appearance depending on the style, mathematics.sup. @SubIndex { @Code "sup" symbol } sup. @Index { @Code "sup" symbol (mathematics) } mathematics.sub. @SubIndex { @Code "sub" symbol } sub. @Index { @Code "sub" symbol (mathematics) } mathematics.tsub. @SubIndex { @Code "tsub" symbol } tsub. @Index { @Code "tsub" symbol (mathematics) } mathematics.supp. @SubIndex { @Code "supp" symbol } supp. @Index { @Code "supp" symbol (mathematics) } mathematics.on. @SubIndex { @Code "on" symbol } on. @Index { @Code "on" symbol (mathematics) } mathematics.ton. @SubIndex { @Code "ton" symbol } ton. @Index { @Code "ton" symbol (mathematics) } so the results are shown in both display and text style: @ID @Tbl mv { 0.6vx } # aformat { @Cell ml {0i} indent {right} @Code A | @Cell B | @Cell C | @Cell | # @Cell indent {right} @Code D | @Cell E | @Cell F | @Cell | # @Cell indent {right} @Code G | @Cell H | @Cell mr {0i} I } aformat { @Cell ml {0i} indent {right} @Code A | @Cell B | @Cell | @Cell indent {right} @Code D | @Cell E | @Cell | @Cell indent {right} @Code G | @Cell mr {0i} H } { @Rowa ma { 0i } A { "x sup y" } B { @Math { x sup y } } C { @M { x sup y } } D { "x sub y" } E { @Math { x sub y } } F { @M { x sub y } } G { "W tsub y" } H { @Math { W tsub y } } I { @M { W tsub y } } @Rowa A { "x supp y on z" } B { @Math {x supp y on z } } C { @M {x supp y on z } } D { "W supp y ton z" } E { @Math {W supp y ton z} } F { @M {W supp y ton z} } mb { 0i } } The @Code "supp" and @Code "on" (or {@Code "ton"}) symbols must be used together as shown; @Code "tsub" and @Code "ton" are exactly like @Code "sub" and @Code "on" except that the subscript is tucked in. @End @SubSection @SubSection @Title { Large operator symbols } @Begin @LP Large operator symbols have @Code "from" and @Code "to" mathematics.large.operators. @SubIndex { large operators } large.operators. @Index { large operators (mathematics) } options which work as described for the @Code "sum" symbol in Section {@NumberOf mat_comm}. Here they all are, with their results in both display style and text style: @CD @OneRow @Tbl mv { 0.7vx } strut { 2.5f } aformat { @Cell ml {0i} indent {right} @Code A | @Cell B | @Cell C | @Cell | @Cell indent {right} @Code D | @Cell E | @Cell mr {0i} F } { @Rowa ma { 0i } A { "sum from { a } to { b } x" } B { @Math { sum from { a } to { b } x } } C { @M { sum from { a } to { b } x } } D { "prod from { a } to { b } x" } E { @Math { prod from { a } to { b } x } } F { @M { prod from { a } to { b } x } } @Rowa A { "coprod from { a } to { b } x" } B { @Math { coprod from { a } to { b } x } } C { @M { coprod from { a } to { b } x } } D { "bcap from { a } to { b } x" } E { @Math { bcap from { a } to { b } x } } F { @M { bcap from { a } to { b } x } } @Rowa A { "bcup from { a } to { b } x" } B { @Math { bcup from { a } to { b } x } } C { @M { bcup from { a } to { b } x } } D { "bvee from { a } to { b } x" } E { @Math { bvee from { a } to { b } x } } F { @M { bvee from { a } to { b } x } } @Rowa A { "bwedge from { a } to { b } x" } B { @Math { bwedge from { a } to { b } x } } C { @M { bwedge from { a } to { b } x } } D { "bodot from { a } to { b } x" } E { @Math { bodot from { a } to { b } x } } F { @M { bodot from { a } to { b } x } } @Rowa A { "botimes from { a } to { b } x" } B { @Math { botimes from { a } to { b } x } } C { @M { botimes from { a } to { b } x } } D { "boplus from { a } to { b } x" } E { @Math { boplus from { a } to { b } x } } F { @M { boplus from { a } to { b } x } } @Rowa A { "buplus from { a } to { b } x" } B { @Math { buplus from { a } to { b } x } } C { @M { buplus from { a } to { b } x } } D { "int from { a } to { b } x" } E { @Math { int from { a } to { b } x } } F { @M { int from { a } to { b } x } } @Rowa A { "oint from { a } to { b } x" } B { @Math { oint from { a } to { b } x } } C { @M { oint from { a } to { b } x } } mb { 0i } } All these symbols also have a @Code "limits" option; when set to @Code "yes" it causes the limits to be shown above and below the symbol, when @Code "no" it causes them to be shown as superscripts and subscripts, and when omitted it defaults to @Code "yes" in display style and @Code "no" otherwise, except for integrals, where the default is uniformly @Code "no" as required by mathematical convention. @PP The @Code "largeop" symbol causes an arbitrary object to be treated mathematics.largeop. @SubIndex { @Code "largeop" symbol } largeop. @Index { @Code "largeop" symbol (mathematics) } options which work as described for the @Code "sum" symbol as a large operator: @ID { @Code @Verbatim { largeop symbol { diamond } from { a } to { b } x } |10ct @Math { largeop symbol { diamond } from { a } to { b } x } } In addition to {@Code "limits"}, {@Code "from"}, and {@Code "to"} options, @Code "largeop" has a @Code "symbol" option holding the object to be made into a large operator. In display style, this object is enlarged using the @Code "big" helper function. @End @SubSection @SubSection @Title { Unary operator symbols } @Begin @LP This category mainly contains symbols that take one object on the right mathematics.unaryoperator. @SubIndex { unary operators } unaryoperator. @Index { unary operators (mathematics) } and transform it. @IL @LI { @Code "sqrt {x over y}" |7ct @Math { sqrt {x over y} } mathematics.sqrt. @SubIndex { @Code "sqrt" symbol } sqrt. @Index { @Code "sqrt" symbol (mathematics) } } @LI { @Code "3 root {x over y}" |7ct @Math { 3 root {x over y} } mathematics.root @SubIndex { @Code "root" symbol } root.mathematics @Index { @Code "root" symbol (mathematics) } } @LI { @Code @Verbatim { matrix atleft { ( } atright { ) } { x } } |7ct @Math { matrix atleft { ( } atright { ) } { x } } } @EL As usual, any object may appear to the left of {@Code "root"}. The @Code "matrix" symbol produces matrices, as explained in detail in Section {@NumberOf matrices}. Its following object must be enclosed in braces. @PP There are symbols which produce `matrices' with commonly needed @Code atleft and @Code atright options already set for you. Here are these symbols, on the left, with the equivalent @Code matrix symbol and, on the right, the result produced: @ID @Tbl aformat { @Cell ml { 0i } @Code A | @Cell | @Cell @Code B | @Cell | @Cell mr { 0i } C } { @Rowa ma { 0i } A { "pmatrix { M }" } B { "matrix atleft { ( } atright { ) } { M }" } C { @Math { pmatrix { M } } mathematics.pmatrix @SubIndex { @Code "pmatrix" symbol } pmatrix.mathematics @Index { @Code "pmatrix" symbol (mathematics) } } @Rowa A { "bmatrix { M }" } B { "matrix atleft { blbrack } atright { brbrack } { M }" } C { @Math { bmatrix { M } } mathematics.bmatrix @SubIndex { @Code "bmatrix" symbol } bmatrix.mathematics @Index { @Code "bmatrix" symbol (mathematics) } } @Rowa A { "brmatrix { M }" } B { "matrix atleft { blbrace } atright { brbrace } { M }" } C { @Math { brmatrix { M } } mathematics.brmatrix @SubIndex { @Code "brmatrix" symbol } brmatrix.mathematics @Index { @Code "brmatrix" symbol (mathematics) } } @Rowa A { "fmatrix { M }" } B { "matrix atleft { blfloor } atright { brfloor } { M }" } C { @Math { fmatrix { M } } mathematics.fmatrix @SubIndex { @Code "fmatrix" symbol } fmatrix.mathematics @Index { @Code "fmatrix" symbol (mathematics) } } @Rowa A { "cmatrix { M }" } B { "matrix atleft { blceil } atright { brceil } { M }" } C { @Math { cmatrix { M } } mathematics.cmatrix @SubIndex { @Code "cmatrix" symbol } cmatrix.mathematics @Index { @Code "cmatrix" symbol (mathematics) } } @Rowa A { "amatrix { M }" } B { "matrix atleft { blangle } atright { brangle } { M }" } C { @Math { amatrix { M } } mathematics.amatrix @SubIndex { @Code "amatrix" symbol } amatrix.mathematics @Index { @Code "amatrix" symbol (mathematics) } } mb { 0i } } These are very useful for getting large scaled delimiters around things that aren't necessarily matrices at all. @End @SubSection @SubSection @Title { Binary operator symbols } @Begin @LP The symbols in this category take an object on the left and on mathematics.binary.operators. @SubIndex { binary operators } binary.operators. @Index { binary operators (mathematics) } the right. The first two produce built-up fractions: mathematics.over. @SubIndex { @Code "over" symbol } over. @Index { @Code "over" symbol (mathematics) } mathematics.frac @SubIndex { @Code "frac" symbol } frac.mathematics @Index { @Code "frac" symbol (mathematics) } @ID @Tbl aformat { @Cell ml { 0i } indent { right } @Code A | @Cell B | @Cell | @Cell indent { right } @Code C | @Cell mr { 0i } D } { @Rowa ma { 0i } A { "x over y" } B { @Math { x over y } } C { "x frac y" } D { @Math { x frac y } } mb { 0i } } The remaining binary operator symbols print the objects to the left and right separated by the operator with a medium-width space on each side. Most have precedence 80, but a few (those representing multiplication and division operations) have higher precedence in accordance with mathematical convention. Here is the full list of these operators: @ID @Tbl mv { 0.5vx } aformat { @Cell ml{0i} indent{right} w{@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "x + y" } B { @Math { x + y } } C { "x - y" } D { @Math { x - y } } E { "x +- y" } F { @Math { x +- y } } @Rowa A { "x -+ y" } B { @Math { x -+ y } } C { "x setminus y" } D { @Math { x setminus y } } E { "x cdot y" } F { @Math { x cdot y } } @Rowa A { "x times y" } B { @Math { x times y } } C { "x * y" } D { @Math { x * y } } E { "x circ y" } F { @Math { x circ y } } @Rowa A { "x div y" } B { @Math { x div y } } C { "x cap y" } D { @Math { x cap y } } E { "x cup y" } F { @Math { x cup y } } @Rowa A { "x uplus y" } B { @Math { x uplus y } } C { "x sqcap y" } D { @Math { x sqcap y } } E { "x sqcup y" } F { @Math { x sqcup y } } @Rowa A { "x triangleleft y" } B { @Math { x triangleleft y } } C { "x triangleright y" } D { @Math { x triangleright y } } E { "x wr y" } F { @Math { x wr y } } @Rowa A { "x bigcirc y" } B { @Math { x bigcirc y } } C { "x bigtriangleup y" } D { @Math { x bigtriangleup y } } E { { 0.85 1.0 } @Scale "x bigtriangledown y" } F { @Math { x bigtriangledown y } } @Rowa A { "x vee y" } B { @Math { x vee y } } C { "x wedge y" } D { @Math { x wedge y } } E { "x oplus y" } F { @Math { x oplus y } } @Rowa A { "x ominus y" } B { @Math { x ominus y } } C { "x otimes y" } D { @Math { x otimes y } } E { "x oslash y" } F { @Math { x oslash y } } @Rowa A { "x odot y" } B { @Math { x odot y } } C { "x dagger y" } D { @Math { x dagger y } } E { "x daggerdbl y" } F { @Math { x daggerdbl y } } @Rowa A { "x amalg y" } B { @Math { x amalg y } } mb { 0i } } The @Code "bin" symbol causes an arbitrary object to be treated mathematics.bin @SubIndex { @Code "bin" symbol } bin.mathematics @Index { @Code "bin" symbol (mathematics) } as a binary operator: @ID { @Code @Verbatim { x bin op { diamond } y } |7ct @Math { x bin op { diamond } y } } The @Code "op" option following @Code "bin" contains the object to be treated as a binary operator; its two parameters precede and follow @Code "bin" as usual. @End @SubSection @SubSection @Title { Relation symbols } @Begin @LP These symbols represent relations. They take an object on mathematics.relation. @SubIndex { relation symbols } relation.symbols. @Index { relation symbols (mathematics) } the left and on the right, and print them separated by the relation symbol, with a slightly wider space on each side than is used for binary operators. They have lower precedence than binary operators, in accordance with mathematical convention. Here is the full list of these relations: @ID @Tbl mv { 0.5vx } aformat { @Cell ml{0i} indent{right} w{@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "x < y" } B { @Math { x < y } } C { "x > y" } D { @Math { x > y } } E { "x = y" } F { @Math { x = y } } @Rowa A { "x <= y" } B { @Math { x <= y } } C { "x prec y" } D { @Math { x prec y } } E { "x preceq y" } F { @Math { x preceq y } } @Rowa A { "x << y" } B { @Math { x << y } } C { "x subset y" } D { @Math { x subset y } } E { "x subseteq y" } F { @Math { x subseteq y } } @Rowa A { "x sqsubseteq y" } B { @Math { x sqsubseteq y } } C { "x in y" } D { @Math { x in y } } E { "x vdash y" } F { @Math { x vdash y } } @Rowa A { "x smile y" } B { @Math { x smile y } } C { "x frown y" } D { @Math { x frown y } } E { "x >= y" } F { @Math { x >= y } } @Rowa A { "x succ y" } B { @Math { x succ y } } C { "x succeq y" } D { @Math { x succeq y } } E { "x >> y" } F { @Math { x >> y } } @Rowa A { "x supset y" } B { @Math { x supset y } } C { "x supseteq y" } D { @Math { x supseteq y } } E { "x sqsupseteq y" } F { @Math { x sqsupseteq y } } @Rowa A { "x ni y" } B { @Math { x ni y } } C { "x dashv y" } D { @Math { x dashv y } } E { "x mid y" } F { @Math { x mid y } } @Rowa A { "x parallel y" } B { @Math { x parallel y } } C { "x == y" } D { @Math { x == y } } E { "x ~ y" } F { @Math { x ~ y } } @Rowa A { "x -~ y" } B { @Math { x -~ y } } C { "x asymp y" } D { @Math { x asymp y } } E { "x ~~ y" } F { @Math { x ~~ y } } @Rowa A { "x =~ y" } B { @Math { x =~ y } } C { "x bowtie y" } D { @Math { x bowtie y } } E { "x propto y" } F { @Math { x propto y } } @Rowa A { "x models y" } B { @Math { x models y } } C { "x trieq y" } D { @Math { x trieq y } } E { "x doteq y" } F { @Math { x doteq y } } @Rowa A { "x perp y" } B { @Math { x perp y } } C { "x notsub y" } D { @Math { x notsub y } } E { "x notin y" } F { @Math { x notin y } } @Rowa A { "x != y" } B { @Math { x != y } } C { "x <-> y" } D { @Math { x <-> y } } E { "x <-- y" } F { @Math { x <-- y } } @Rowa A { "x --> y" } B { @Math { x --> y } } C { "x up y" } D { @Math { x up y } } E { "x down y" } F { @Math { x down y } } @Rowa A { "x <=> y" } B { @Math { x <=> y } } C { "x <== y" } D { @Math { x <== y } } E { "x ==> y" } F { @Math { x ==> y } } @Rowa A { "x dblup y" } B { @Math { x dblup y } } C { "x dbldown y" } D { @Math { x dbldown y } } E { "x : y" } F { @Math { x : y } } @Rowa A { "x :: y" } B { @Math { x :: y } } C { "x := y" } D { @Math { x := y } } mb { 0i } } All of these symbols have a @Code "neg" option which, when set to {@Code "yes"}, causes a slash to overstrike the relation symbol: @ID { @Code @Verbatim { x ==> neg { yes } y } |7ct @Math { x ==> neg { yes } y } } The slash is horizontally centred over the relation symbol, which is not always best. @PP The @Code "rel" symbol causes an arbitrary object to be treated mathematics.rel @SubIndex { @Code "rel" symbol } rel.mathematics @Index { @Code "rel" symbol (mathematics) } as a relation: @ID { @Code @Verbatim { x rel op { diamond } y } |7ct @Math { x rel op { diamond } y } } The @Code "op" option following @Code "rel" contains the object to be treated as a relation; @Code "rel" also has the @Code "neg" option, plus the left and right parameters as usual. @End @SubSection @SubSection @Title { Punctuation symbols } @Begin @LP These symbols represent punctuation. They take an object on mathematics.punctuation. @SubIndex { punctuation symbols } punctuation.mathematics @Index { punctuation symbols (mathematics) } the left and on the right, and print them separated by the punctuation symbol, with no space to the left and a thin space to the right. Here is the full list of these symbols: @ID @Tbl aformat { @Cell ml{0i} indent{right} w{@LCodeWidth} @Code A | @Cell w {@ResultWidth} B | @Cell indent {right} w {@CodeWidth} @Code C | @Cell w {@ResultWidth} D | @Cell indent {right} w {@CodeWidth} @Code E | @Cell w {@ResultWidth} mr { 0i } F } { @Rowa ma { 0i } A { "x ; y" } B { @Math { x ; y } } C { "x , y" } D { @Math { x , y } } E { "x col y" } F { @Math { x col y } } mb { 0i } } The @Code "punct" symbol causes an arbitrary object to be treated mathematics.punct @SubIndex { @Code "punct" symbol } punct.mathematics @Index { @Code "punct" symbol (mathematics) } as punctuation: @ID { @Code @Verbatim { x punct symbol { diamond } y } |7ct @Math { x punct symbol { diamond } y } } The @Code "symbol" option following @Code "punct" contains the object to be treated as punctuation; its two parameters precede and follow @Code "punct" as usual. @End @SubSection @EndSubSections @End @Section lout-3.39/doc/user/dia_defi0000644000076400007640000002350411363700677014261 0ustar jeffjeff@Section @Tag { dia_defi } @Title { Expert usage: defining new shapes } @Begin @PP @@Diag permits you to create your own node outlines and link paths, by diagrams. @RawIndex { diagrams } diagrams.definitions @SubIndex { definitions } definitions. @RawIndex { definitions } definitions.use.with.diagrams @SubIndex { use with diagrams } giving non-standard values to the @Code outline and @Code path options. This section shows how to do this for very simple shapes only; the following section introduces the large repertoire of geometrical symbols that @@Diag offers for helping you create complex shapes. @PP As explained earlier, a node outline is drawn over its {@I base}, which is a rectangle containing the following object plus margins. The base defines a coordinate system with the point (0, 0) at the bottom left corner, and @M { (xsize, ysize) } at the top right: @CD @OneRow @Diag { @Box nodelabelmargin { 0.3f } blabel { @M { ysize } } blabelprox { E } clabel { @M { 0 } } clabelprox { E } dlabel { @M { xsize } } dlabelprox { N } alabel { @M { 0 } } alabelpos { SW } alabelprox { N } paint { lightgrey } outlinestyle { noline } margin { 0c } { 3c @Wide 2c @High } //0.5c } The value of the @Code outline option is a sequence of points defined in this coordinate system: @ID { @Code @Verbatim { @Node outline { 0 0 xsize 0 0 ysize 0 0 } } ||7ct @Diag { @Box margin { 0c } outlinestyle { noline } paint { lightgrey } @Node outline { 0 0 xsize 0 0 ysize 0 0 } margin { 0c } { 3c @Wide 2c @High } } } As shown, the resulting outline is created by joining each point to the next with a straight line. It is conventional to proceed anticlockwise around the outline, but you may start anywhere. @PP The {@Code paint}, {@Code texture}, {@Code outlinestyle}, {@Code outlinedashlength}, and {@Code outlinewidth} options of @Code "@Node" work for user-defined outlines exactly as they do for the standard ones: @ID { @Code @Verbatim { @Node outline { 0 0 xsize 0 0 ysize 0 0 } paint { lightgrey } outlinestyle { solid dashed } } ||7ct @Diag { @Node outline { 0 0 xsize 0 0 ysize 0 0 } paint { lightgrey } outlinestyle { solid dashed } margin { 0c } { 3c @Wide 2c @High } } } Each line in the outline is one segment for {@Code outlinestyle}. @PP If two points in an outline are separated by {@Code "[]"}, no line is drawn between them, and the outline is treated as two separate, disconnected regions when painting. @PP Two points may also be separated by {@Code "["}{@I point}{@Code "]"}, where @I point stands for any point. This causes the two points to be joined by an arc whose centre is at the given point: @ID { @Code @Verbatim { @Node outline { 0 0 ysize 0 [ 0 0 ] 0 ysize 0 0 } } ||7ct @Diag { @Box margin { 0c } outlinestyle { noline } paint { lightgrey } @Node outline { 0 0 ysize 0 [ 0 0 ] 0 ysize 0 0 } margin { 0c } { 3c @Wide 2c @High } } } The arc will be circular if possible, otherwise it will be part of elliptical. @Index { elliptical arcs } an ellipse whose axes are oriented horizontally and vertically. The arc goes anticlockwise; to get a clockwise arc, use {@Code "["}{@I point}{@Code " clockwise]"}. @PP Two points may be separated by @M { [x sub 1 ``` y sub 1 ``` x sub 2 ``` y sub 2 ] }, which requests that a Bezier curve be drawn between them with control points bezier.curve @Index { Bezier curve } @M { (x sub 1 , y sub 1 ) } and @M { (x sub 2 , y sub 2 ) }: @CD @Diag { @Node outline { A:: { xsize*0.2 ysize*0.5 } B:: { xsize*0.4 ysize*0.9 } C:: { xsize*0.9 ysize*0.4 } D:: { xsize*0.3 ysize*0.1 } A B C D A } alabelpos { A } blabelpos { B } clabelpos { C } dlabelpos { D } alabelprox { SE } blabelprox { SW } clabelprox { SW } dlabelprox { NW } outlinestyle { cdashed cdashed cdashed noline } alabel { @M { ( x sub 0 , y sub 0 ) } } blabel { @M { ( x sub 1 , y sub 1 ) } } clabel { @M { ( x sub 2 , y sub 2 ) } } dlabel { @M { ( x sub 3 , y sub 3 ) } } { 6c @Wide 2c @High } // @Link path { A [B C] D } } The curve is attracted toward the control points, without reaching them; it is tangent to the straight line from the start point to the first control point, and from the second control point to the finishing point, and it lies wholly inside the quadrilateral formed by the four points. Owing to the author's laziness, dashes and dots do not fit as neatly onto Bezier curves as they do onto lines and arcs. @PP Tags (Section {@NumberOf dia_tags}) may be assigned to points within the outline option, like this: @ID { @Code @Verbatim { @Node outline { LR:: { xsize 0 } UL:: { 0 ysize } 0 0 LR UL 0 0 } } ||7ct @Diag { //0.5f @ShowTags @Node outline { LR:: { xsize 0 } UL:: { 0 ysize } 0 0 LR UL 0 0 } { 2c @High 3c @Wide } } } The tagged point does not have to lie on the outline, and it is not automatically added to the outline. Once defined, a tag stands for a point in the usual way; it may be used later in the outline, as was done above, relabelled, and so on, exactly like the tags of the standard nodes. @PP Once a point has been tagged, a @I direction may be associated with it, to inform @@Diag which way the outline or link path is going at that point. The standard outlines have directions: @ID { @Code { "@Ellipse { 3c @Wide 1c @High }" } ||7ct @Diag { //0.5f @ShowTags @ShowDirections @Ellipse { 3c @Wide 1c @High } } } @Code CTR has no direction. If available, direction information is used when placing labels, in the proximity step (by {@Code above}, for example) and in the angle step if the label is aligned, perpendicular, parallel, or antiparallel. A direction is given using the @Code ":<" symbol within an outline: @ID { @Code @Verbatim { @Node outline { LR:: { xsize 0 } LR:< 0d UL:: { 0 ysize } UL:< 270d 0 0 LR UL 0 0 } } ||7ct @Diag { //0.5f @ShowTags @ShowDirections @Node outline { LR:: { xsize 0 } LR:< 0d UL:: { 0 ysize } UL:< 270d 0 0 LR UL 0 0 } { 2c @High 3c @Wide } } } It is often helpful when creating outlines to check where the tagged points and directions really are, by printing them out as is done above. For this there is a @Code "@ShowTags" symbol whose result is the following (arbitrary) object with its tagged points visible, and a @Code "@ShowDirections" symbol which works similarly and shows the directions. The diagram above was printed using {@Code "@ShowTags @ShowDirections @Node ..."}. There is also a @Code "@ShowPoints" symbol which is like @Code "@ShowTags" except that it omits the tags, just placing circles on the points. @PP Link paths are similar to node outlines, created using the @Code path option of @Code "@Link" instead of the @Code outline option of {@Code "@Node"}. The major difference is that links have no base, so @Code xsize and @Code ysize cannot be used. Indeed, even @Code "0 0" does not have any useful meaning inside a link path. @PP Within a link path, the symbols @Code from and @Code to denote the values of the link's @Code from and @Code to options, and these form the basis of constructing the link path: @ID { @Code @Verbatim { @Link path { FROM:: from TO:: to FROM TO } } ||7ct { //1.0c @VContract @Diag { 3c @Wide 1c @High // @ShowTags @Link path { FROM:: from TO:: to FROM TO } from { 0,1 } to { 1,0 } } } } This simple example creates two tagged points and joins them with a straight line. If you want a link that can carry arrowheads, it is best to ensure that it creates @Code FROM and @Code TO tags, with directions pointing along the link from @Code FROM to @Code TO at both points, since then the default values of the various arrow options will do the rest. Similarly, if you want labels you need to define {@Code LFROM}, {@Code LMID}, and {@Code LTO} labels, ideally also with directions. @PP Once the outline or path is complete, unless it is really a one-off production the best thing to do with it is to add it to your extend. @Index { @Code extend keyword } @Code "mydefs" file in the following form: @ID @OneRow @Code @Verbatim { extend @DiagSetup @Diag macro @MyNode { @Node outline { LR:: { xsize 0 } LR:< 0d UL:: { 0 ysize } UL:< 270d 0 0 LR UL 0 0 } } } This says that we are `extending' the @@Diag symbol by adding a new symbol, {@Code "@MyNode"}, which stands for what follows it between braces. @Code "@MyNode" will then behave exactly like @Code "@Circle" and the other standard node symbols. The same pattern works for links: @ID @OneRow @Code @Verbatim { extend @DiagSetup @Diag macro @MyLink { @Link path { FROM:: from TO:: to FROM TO } } } If it is worth the effort to construct a new outline or link path, it is worth packaging it like this and thinking up a good name for it, for then it will be available, easily, forever. @PP This same approach is also useful to define common combinations of options, even when there is no new outline or path: @ID @OneRow @Code @Verbatim { extend @DiagSetup @Diag macro @BigOctagon { @Polygon sides { 8 } hsize { 5c } vsize { 5c } font { Bold } } } Such definitions are very useful if the combinations occur frequently. Any options not mentioned have their usual default values, and may be set in the usual way: @ID @Code "@BigOctagon outlinestyle { dashed } ..." Attempts to reset an already set option will elicit a warning message. @End @Section lout-3.39/doc/user/typ_illu0000644000076400007640000000675211363700677014404 0ustar jeffjeff@Section @Title { Stand-alone illustrations } @Tag { illustrations } @Begin @PP This section describes how to use Lout to produce an illustration for stand.alone.illustrations. @Index { stand-alone illustrations } illustrations. @Index { illustrations } inclusion in some other document, which may itself be a Lout document but need not be. The opposite process, the inclusion of an illustration in a Lout document, is the subject of Section {@NumberOf include}. @PP Suppose you want to produce the following logo for inclusion in some other document: @ID { 45d @Rotate @CurveBox { ARMY @LP 180d @Rotate ARMY } } This is just an object, and it is not hard to make it using Lout's graphics features: @ID @Code "45d @Rotate @CurveBox { ARMY @LP 180d @Rotate ARMY }" The problem is that objects ordinarily come out on pages with margins, page numbers, and so forth, which we don't want here. The solution is to use the illustration document type, whose setup file, curiously enough, is called {@Code "picture"}: illustration. @Index @Code "@Illustration" @ID @OneRow @Code { "@SysInclude { picture }" "@Illustration {" " 45d @Rotate @CurveBox { ARMY @LP 180d @Rotate ARMY }" "}" } After the usual @Code "@SysInclude" line comes one @Code "@Illustration" symbol. Following it is an arbitrary object which becomes the entire result, with no pages and no margins, ready for inclusion in some other document as an illustration. @PP The @Code "@Illustration" symbol has options for setting the initial font, paragraph breaking style, colour, and language. Here they are with their default values: @ID @OneRow @Code { "@Illustration" " @InitialFont { Times Base 12p }" " @InitialBreak { adjust 1.2fx hyphen }" " @InitialSpace { lout }" " @InitialLanguage { English }" " @InitialColour { black }" " @InitialBackgroundColour { white }" "{" " ..." "}" } You can specify any colour from the list in Section {@NumberOf colour}, for example {@Code blue}, and then your illustration will have that colour wherever it is included. @PP Because there are no pages, the width and height of the result are indeterminate, depending on how large the object turns out to be. This makes things very awkward for filled paragraphs and centring, which depend on knowing how much space is available to be occupied. So you should either avoid filled paragraphs and all displays and lists altogether in illustrations, or else enclose your object in a @Code "@Wide" symbol: wide. @RawIndex { @Code "@Wide" } wide.illustrations @SubIndex { with illustrations } @ID @OneRow @Code { "@Illustration 5c @Wide {" " ..." "}" } to make clear how wide you want your illustration to be. @PP The technical name for a file containing a stand-alone illustration encapsulated.postscript @Index { encapsulated PostScript file } eps @Index { EPS file } is `encapsulated PostScript file' or `EPS file' for short. To get Lout to produce an encapsulated PostScript file instead of an ordinary PostScript file, you have to use the @Code "-EPS" Unix command line flag. For example, suppose the Lout file containing our example illustration is called {@Code "army"}; then the appropriate Unix command for formatting it is @ID @Code "lout -EPS army > army.eps" An EPS file is supposed to contain only one `page', so Lout will refuse to generate any second or subsequent pages when the @Code "-EPS" flag is given. There is also a minor difference in format between ordinary and encapsulated PostScript files, which is why the @Code "-EPS" flag is needed at all. @End @Section lout-3.39/doc/user/bgr_mirr0000644000076400007640000000215511363700677014337 0ustar jeffjeff@Section @Title { Mirror reflections } @Tag { mirroring } @Begin @PP The @Code "@HMirror" symbol produces a horizontal mirror reflection reflect. @Index { Reflected objects } mirror. @Index { Mirror images } hmirror. @Index @Code "@HMirror" of the following object: @ID @Code { "@HMirror AMBULANCE" } produces @ID @HMirror AMBULANCE The @Code "@VMirror" symbol produces a vertical mirror reflection vmirror. @Index @Code "@VMirror" of the following object: @ID @Code { "@VMirror 5c @Wide @Box {" "@B { Pond life. } Pond life includes" "frogs, tadpoles, newts, salamanders," "eels, and mosquito larvae." "}" } produces @ID @VMirror 5c @Wide @Box { @B { Pond life. } Pond life includes frogs, tadpoles, newts, salamanders, eels, and mosquito larvae. } As this example shows, the object to be mirror reflected may be arbitrary. We have used a @Code "@Wide" symbol in this example to restrict the width of the result to be five centimetres wide. See the description of the @Code "@VShift" symbol in Section {@NumberOf include} for what to do if your reflected object is not aligned properly with adjacent objects. @End @Section lout-3.39/doc/user/ref_cite0000644000076400007640000001071211363700677014312 0ustar jeffjeff@Section @Title { Citation } @Tag { citation } @Begin @PP To cite one or more references, use the @Code "@Cite" symbol like this: references. @RawIndex { references } references.cite @SubIndex { @Code "@Cite" } cite.references @Index { @Code "@Cite" (references) } @ID @Code @Verbatim { This feature is beyond our scope @Cite { $kingston1995lout.expert, page 97 }. } The following object must be enclosed in braces. It may be an arbitrary object as usual. Within it the @Code "$" character is a symbol with a special meaning: it causes a citation to be made of the reference whose @Code "@Tag" option is the word following the @Code "$" symbol: @ID { This feature is beyond our scope @Cite { $kingston1995lout.expert, page 97 }. } The reference itself will appear automatically in a reference list at the end of the document, and the citation(s) will be enclosed in brackets as shown. There is no need to write @Code "${kingston1995lout.expert}," as would normally be the case, because within @Code "@Cite" special arrangements are made to prevent commas and semicolons from being a nuisance. @PP A reference may be cited many times, but it will appear in the reference list only once. The references will ordinarily be sorted by tag and labelled with Arabic numbers, although this can be changed by setting options in the setup file (Section {@NumberOf changeref}). @PP If you are making a book, there is a @Code "@ChapCite" symbol which is references. @RawIndex { references } references.chap.cite @SubIndex { @Code "@ChapCite" } chap.cite.references @Index { @Code "@ChapCite" (references) } the same as @Code "@Cite" except that its references come out at the end of the current preface, introduction, chapter, or appendix, rather than at the end of the document. @PP It is quite all right to cite a reference from within a footnote, figure, table, or index entry. The reference will appear in the closest reference list following the citation point in the final printed document, or if there is no such list, the closest preceding reference list. This is fine in documents with just one reference list; but when using @Code "@ChapCite" in books, if the citation point appears after the intended reference list (because the footnote or figure has floated past the reference list at the end of the chapter), the reference will come out in the wrong list. @PP Although it is frowned upon by the authorities, some people include references which are not cited anywhere in the body of their document. For this there is {@Code "@NoCite"}: references. @RawIndex { references } references.no.cite @SubIndex { @Code "@NoCite" } no.cite.references @Index { @Code "@NoCite" (references) } @ID @Code { "... our scope @NoCite { $kingston1995lout.expert $kingston1993lout.design }." } produces @ID { ... our scope @NoCite { $kingston1995lout.expert $kingston1993lout.design }. } with the @Code "@NoCite" symbol and any preceding space removed. The references will nevertheless appear in the reference list as usual. Note that if you put commas between the references inside @Code "@NoCite" you will get commas in the output (so don't). There is a @Code "@NoChapCite" symbol that combines @Code "@NoCite" and references. @RawIndex { references } references.no.chap.cite @SubIndex { @Code "@NoChapCite" } no.chap.cite.references @Index { @Code "@NoChapCite" (references) } {@Code "@ChapCite"}. For compatibility with previous versions of Lout, there is a @Code "@Ref" symbol: ref. @Index { @Code "@Ref" (references) } @ID @Code "@Ref kingston1995lout.expert" is the same as @Code "@Cite { $kingston1995lout.expert }" without the brackets. There are analogous {@Code "@ChapRef"}, {@Code "@NoRef"}, and {@Code "@NoChapRef"} chap.ref @Index { @Code "@ChapRef" (references) } no.ref @Index { @Code "@NoRef" (references) } no.chap.ref @Index { @Code "@NoChapRef" (references) } symbols, which are not recommended. @PP The @Code "@RefPrint" symbol will print a reference on the spot: resume. @Index { resumes } curriculum. @Index { curriculum vitae } references. @RawIndex { references } references.refprint @SubIndex { @Code "@RefPrint" } refprint.references @Index { @Code "@RefPrint" (references) } @ID @Code "@RefPrint kingston1995lout.expert" has result @ID @RefPrint kingston1995lout.expert unrelated to any reference list. For example, @ID @OneRow @Code @Verbatim { @Heading { Journal Articles } @NumberedList @LI @RefPrint kingston1985tree ... @LI @RefPrint kingston1993lout.design @EndList } might appear in someone's resume. @End @Section lout-3.39/doc/user/dia_erro0000644000076400007640000000717411363700677014326 0ustar jeffjeff@Section @Tag { dia_erro } @Title { Errors } @Begin @PP Lout normally produces an output file that will print without mishap on any PostScript device. However, some of the options of {@Code "@Diag"}'s symbols are passed through Lout to the output file without checking, including anything containing @Code "@Diag" lengths, angles, points, and tags. Any errors in these options will not be detected until the file errors. @RawIndex { errors } errors.in.diagrams @SubIndex { in diagrams } is printed. @PP The most likely errors are {@I syntax @I errors}, as in @Code "outline { 0 0 [ 0 xsize }" for example, in which a @Code "]" is missing; @I { type errors }, as in @Code "SE:: 45d" where the following object should have been a point; and @I { undefined errors }, arising from labels misspelt or used before being defined. Less commonly, the options may all be correct but the figure is too large in some way: too many labels, too deeply nested, and so on. @PP When an error is detected, @@Diag arranges for the offending page to be printed up to the point where the error occurred, with a message nearby describing the error. Printing of the document is then aborted. It is often quite easy to find the problem, because it lies in whatever should have been printed next. @PP If you see {@Code VMerror} in an error message, it means that the printer vmerror. @Index { @Code VMerror PostScript error } is running out of memory. In that case, one thing you can try is diagrams. @RawIndex { diagrams } diagrams.save @SubIndex { @Code "save" option } save. @RawIndex { @Code "save" option } save.in.diagrams @SubIndex { in diagrams } @ID @Code { "@Diag" " save { yes }" "..." } This causes the memory used by @@Diag to be reclaimed as soon as the diagram is printed, rather than at the end of the current page as is usual. However, if the diagram is nested inside some other major Lout package, such as {@Code "@Graph"}, use of this option may cause other PostScript errors. @PP If you see @Code "dictfull" in an error message, it means that you are dictfull. @Index { @Code dictfull PostScript error } using an old version of PostScript. Increasing the @Code "maxlabels" option of @@Diag (Section {@NumberOf dia_summ}) might fix the problem. @PP On other occasions your document might print without problems but you see things that should not be there. Here is a typical example, reported by a user: @CD @Diag margin { 0.3f } outline { shadowbox } shadow { 0.2f } paint { lightyellow } zindent { 0.4f } { @Tbl marginhorizontal { 0.55f } aformat { @Cell A } { @Rowa A { QEVENT:: @Node paint { lightblue } { QEvent } } @Rowa A { QIMEVENT:: @Node paint { lightblue } halign { right } { QIMEvent } } @Rowa A { QKEYEVENT:: @Node paint { lightblue } { QKeyEvent } } } // @RVLCurveArrow from { QEVENT } to { QIMEVENT } bias { 1.5f } @RVLCurveArrow from { QEVENT } to { QKEYEVENT } bias { 1.5f } } The problem here is the two short lengths of straight line protruding backwards beyond the point where the arrow starts to curve. This has occurred because the @Code TO labels are to the right of the point where the curving begins; it can be corrected either by reducing the @Code radius option, or else by decreasing @Code { zindent }. Ideally @Code "@Diag" would adjust options for you so as to ensure that the diagram always look good; but this is quite difficult to do, especially when space to turn in is tight or there is a choice of which option to adjust, as in the example above. So @Code "@Diag" just does a few basic things and leaves the rest to you. @End @Section lout-3.39/doc/user/vfmt0000755000076400007640000000010111363700677013500 0ustar jeffjeffgvim fmt gvim fmt_setu gvim fmt_size gvim fmt_marg gvim fmt_head lout-3.39/doc/user/tbl_mult0000644000076400007640000001517711363700677014366 0ustar jeffjeff@Section @Title { Multi-page tables } @Tag { tbl_mult } @Begin @PP The tables produced by @Code "@Tbl" permit page breaks (including breaking tables. @RawIndex { tables } tables.multipage @SubIndex { multi-page } multi.page.tables @Index { multi-page tables } to a new column) between every two rows, except rows that have a vertically spanning cell in common. Page breaks cannot occur within rows. The choice of page breaks can either be left to Lout, or it can be forced by placing the new page symbol @Code "@NP" between two tables. @RawIndex { tables } tables.np @SubIndex { @Code "@NP" (new page) in } np. @RawIndex { @Code "@NP" (new page) } np.in.tables @SubIndex { in tables } rows. @PP To prevent page breaks within a table, precede the @Code "@Tbl" symbol by {@Code "@OneRow"}: @ID @Code "@CD @OneRow @Tbl ..." @Code "@OneRow" is a general Lout symbol which binds the following object into a single, unbreakable row. Make sure your table is small enough to fit on one page when you do this, otherwise an error message will be printed and it will be scaled to fit. Display symbols like @Code "@CD" often have this effect anyway. @PP To prevent a page break between two particular rows, but not in general, replace the @Code "@Row" symbol of the second row with tables. @RawIndex { tables } tables.nobreakrow @SubIndex { @Code "@NoBreakRow" symbols } nobreakrow.tables @Index { @Code "@NoBreakRow" symbols (tables) } the corresponding @Code "@NoBreakRow" symbol (@Code "@NoBreakRowa" instead of {@Code "@Rowa"}, @Code "@NoBreakRowb" instead of {@Code "@Rowb"}, and so on). @PP Some care is needed over where to put multi-page tables. They can't go within any of the display symbols, because display symbols are not clever enough to break tables between rows, even though they are sometimes able to break simpler displays. (A display symbol will scale a very high table to fit on one page, and it will go wrong on a table containing {@Code "@NP"}.) Multi-page tables can go inside @Code "@Figure" or @Code "@Table" symbols, because these symbols have been set up to accept multi-page objects. Or they can go into the body text of the document at full width with a paragraph symbol before and after, like this: @ID @Code @Verbatim { @DP @Tbl ... @DP } An example of this kind of multi-page table appears in Section {@NumberOf tbl_summ}. You can simulate an indent by means of an empty cell at the left of each row format, although in the author's opinion a multi-page table looks better at full width anyway. Lout will expand the rightmost column to the full page width; one way to prevent this is to add a @Code "|" after the last cell within each {@Code format} option, creating an empty extra column. @PP One practical problem in multi-page tables is getting the rules right. The simplest way to do this is to set @Code "rulehorizontal" to {@Code yes}. This places a rule above every row including the first on each page, and a rule below every row including the last on each page. There is nothing equivalent to running headers (described below) at the bottom of the page -- nothing that would allow you to insert a rule after the last line of each page, but not elsewhere. (However, if you are using the @Code "@Table" symbol, its @Code "@Format" option can be used to do this.) @PP Another practical problem with multi-page tables is that of getting a heading over every page after the first. This is easy if you know where the page breaks are going to fall (if you are using {@Code "@NP"}, for example), but you usually don't. To solve this problem, @Code {"@Tbl"} offers the @Code "@HeaderRowa" ... @Code "@HeaderRowh" and tables. @RawIndex { tables } tables.headerrow @SubIndex { @Code "@HeaderRow" symbols } headerrow.tables @Index { @Code "@HeaderRow" symbols (tables) } @Code "@EndHeaderRow" symbols. For example, the multi-page table in Section {@NumberOf tbl_summ} is arranged like this: @ID -1px @Break @OneRow @Code @Verbatim { @Tbl ... { @Rowd A { Option names } B { Default in PS, PDF } C { Default in plain text } D { Allowed values } rulebelow { yes } @HeaderRowd A { Option names (ctd.) } B { Default in PS, PDF } C { Default in plain text } D { Allowed values } rulebelow { yes } @Rowa A { paint p } B { none } D { any colour from Section {@NumberOf colour} } ... @Rowa A { ruleplainchar rpc } C { . } D { any simple word e.g. @Code + } rulebelow { yes } @EndHeaderRow } } @Code "@HeaderRowd" is exactly like {@Code "@Rowd"}, except that the row is not printed at all where it occurs; instead, it is saved up and used as a running header on subsequent pages. @PP The @Code "@EndHeaderRow" symbol goes where a @Code "@Row" symbol might go. Notice that it does not end with a letter between {@Code a} and {@Code h}, and that it has no options. Its effect is to cancel the closest preceding @Code "@HeaderRowa" ... @Code "@HeaderRowh" symbol. If you forget it, the result is bizarre: the header row will remain in effect, and then every page from this point on will have the running header, even though the table ended long before. @PP There may be any number of header rows saved up at any moment, all to be printed at the top of subsequent pages. Having @Code "@EndHeaderRow" allows them to be `nested.' For example, @ID -1px @Break @OneRow @Code @Verbatim { @HeaderRowa ... @HeaderRowb ... @EndHeaderRow @HeaderRowb ... @EndHeaderRow @EndHeaderRow } could be used in a table to say that the entire table has the first header row; and that the first part also has the second header row, but that subsequent parts of the table have their own, different second header row, but still the same first header row. @PP Certain kinds of objects are not allowed in header rows, and Lout will complain and quit if you try to put them there. Galleys (e.g. {@Code "@FootNote"} and {@Code "@Index"}) are not allowed, nor are cross references (e.g. {@Code "@NumberOf"} and {@Code "@PageOf"}), nor are {@Code "@HExpand"}, {@Code "@VExpand"}, or {@Code "@Scale"} in the form that works out its own scale factor. Spanning symbols ({@Code "@StartHSpan"}, {@Code "@StartVSpan"} etc.) work well in header row formats, however. @PP Header rows have some other peculiarities, not likely to trouble the ordinary user but worth pointing out. Header rows are taken account of by Lout when deciding column widths, whether they are actually printed or not. Basser Lout copies running header rows into the table after each page break, with no check on whether the next page has enough space to accommodate them, so if your running headers are so high that there is no room for ordinary rows on the page after they are inserted, then the document will never end. @End @Section lout-3.39/doc/user/str_glos0000644000076400007640000002064311363700677014372 0ustar jeffjeff@Section @Title { Glossaries } @Tag { glossaries } @Begin @PP A glossary @FootNote { The features described in this section are closely based on a design by Thorsten Seitz. } is a section at the end of a document containing terms and their definitions, with a reference back to the page of the document where each term is first used. It's similar to an index, except that there are fewer entries and they are longer and more spaced out -- for reading rather than just reference. @PP In order to get a glossary, you have to be using either the @Code book or @Code report setup file, and you have to make your own copy of the setup file (as described in Section {@NumberOf setup}) and change the @Code "@MakeGlossary" option within it to {@Code "Yes"}. Lout does not insert a glossary automatically. The glossary will appear at the end of the document, immediately before any index. @PP To make an entry in the glossary, place something like this in your main text at the point you are defining the term: @ID @Code @Verbatim { Object @Glossary { Part of a document occupying a rectangular area; may be a simple word, or a collection of smaller objects composed in arbitrary ways. } } The object to the left of @Code "@Glossary" is the term being defined, and the object to the right is its definition. Nothing will appear in the main text where you put this, but the term will appear in the glossary, accompanied by its definition and the page number of this spot. @PP The term should be just a word or a short sequence of words. The definition may be as long and complex as you wish, containing paragraphs, displays, and so on. @PP The glossary items will appear sorted alphabetically. You can use the @Code "sortkey" option of @Code "@Glossary" to provide a separate sorting key: @ID @Code @Verbatim { {@Char florin} @Glossary sortkey { florin } { The florin character. } } This entry will appear in the list where things beginning with @Code f do, not where the @Code florin character code would place it. If you do this, since the term being defined is no longer used as a sort key it is free to be an arbitrary object, not restricted to be a word or a short sequence of words. @PP Creating a glossary entry does not automatically create an index entry (Section {@NumberOf indexes}). If you want an index entry for your glossary term as well (as you probably will) you need to make that separately, and you will need to use a different tag from the tag used by the glossary entry (which is either the term being defined, or @Code sortkey if given). To make an index entry that points into the actual glossary, which you also probably need, just place your index entry somewhere inside the definition. @PP In your main text you may want to indicate to the reader that some word or phrase appears in the glossary. For that there is the @Code "@InGlossary" symbol: @ID @Code "... where you can put one @InGlossary { object } ..." The thing between braces does not actually have to be in the glossary; @Code "@InGlossary" usually just changes the font, by default to small capitals, and it does not change anything unless @Code "@MakeGlossary" is {@Code Yes}. @PP The remainder of this section explains how to change the appearance of the printed glossary, by setting options in the setup file. For a general introduction to setup files and their options, see Section {@NumberOf setup}; here we just explain how the particular options relating to glossaries work. @PP Most of the glossary options appear within the @Code "@DocumentSetup" @Code "@Use" clause. Here they are (except {@Code "@GlossaryFormat"} which we'll discuss in a moment) with their default values: @ID @Code @OneRow @Verbatim { @MakeGlossary { No } @GlossaryText { @Null } @GlossaryFont {} @GlossaryBreak {} @GlossaryGap { @DisplayGap } @GlossaryColumnNumber{ 2 } @GlossaryColumnGap { 1.00c @OrIfPlain 6s } @InGlossaryFont { smallcaps } @InGlossaryFormat { @Body } } First comes {@Code "@MakeGlossary"}, which determines whether to make a glossary, as we know. @PP {@Code "@GlossaryText"} is some arbitrary text that will be placed before the first entry of the glossary. You can also give this option to the @Code "@Book" and @Code "@Report" symbols, and that would probably be the best place since such text is usually part of the document content, not the setup. @PP @Code "@GlossaryFont" and @Code "@GlossaryBreak" are font and break style options which are applied to each glossary entry. The default values don't change the font or break style at all. @PP @Code "@GlossaryGap" determines the vertical separation between one glossary entry and the next. You can give any length (Section {@NumberOf objects}) here; the default is the gap used around displays. @PP @Code "@GlossaryColumnNumber" and @Code "@GlossaryColumnGap" determine the number of columns on glossary pages, and the width of the gap between them. By default you get two columns per page and a one centimetre gap (or six spaces in plain text output), as for indexes (Section {@NumberOf indexes}). @PP @Code "@InGlossaryFont" and @Code "@InGlossaryFormat" determine the appearance of the result of the @Code "@InGlossary" symbol. The first changes the font; the second allows for more radical formatting. Within it, {@Code "@Body"} stands for the object following the {@Code "@InGlossary"} object, and you can do anything you like with it here. For example, @ID @Code "@InGlossaryFormat { @CurveBox @Body }" would cause @Code "@InGlossary" to enclose the following object in a curvebox (which would look horrible, of course). The default values change to small capitals but nothing more. @PP {@Code "@GlossaryFormat"}, which we omitted earlier because it is more complex, determines the format of each glossary entry. Here it is with its default value: @ID @OneRow @Code @Verbatim { @GlossaryFormat { +3p @Font @S @Name @Right @I { @Word&&page @PageNum } @DP @RawIndentedDisplay @Body } } We'll go through this bit by bit. @PP First, the value of the option is longer than usual so we have spread it over three lines. There is nothing significant in this; end of line is the same as a space to Lout, and we've used three lines just to show the value clearly. @PP Within @Code "@GlossaryFormat" three symbols are made available specially: @QD @OneRow @Tbl aformat { @Cell @Code A | @Cell B } { @Rowa A { "@Name" } B { Will be replaced by the term being defined } @Rowa A { "@PageNum" } B { Will be replaced by the number of the page of the spot where the @Code "@Glossary" symbol is placed } @Rowa A { "@Body" } B { Will be replaced by the definition } } Now let's look at what the default format does. The first bit, @ID @Code "+3p @Font @S @Name" produces the term being defined, three points larger than would have been the case otherwise, and in small capitals. The @Code "@Right" symbol causes what follows it to appear at the far right, so @ID @Code "@I { @Word&&page @PageNum }" will appear at the right of the column on the same line as the term. The value of {@Code "@Word&&page"} is just {@Code page} in the current language, and @Code "@PageNum" is a page number as we know, so this produces something like @ID @I { page 143 } at the right. After that we have {@Code "@DP"} which leaves a display-sized vertical gap, then the body appears in an indented display, made Raw so that there is no trailing vertical space. @PP You can change this option to anything you like. For example, suppose you prefer bold to small capitals, you want the page number in parentheses after the term, and you want each entry to be kept together in one column: @ID @OneRow @Code @Verbatim { @GlossaryFormat { @OneRow { @B @Name (@I { @Word&&page @PageNum }) @DP @RawIndentedDisplay @Body } } } And so on. @PP There are a few more setup file options for glossaries, to be found in the {@Code "@BookSetup"} or {@Code "@ReportSetup"} @Code "@Use" clause of the setup file. Here they are with their default values: @ID @OneRow @Code @Verbatim { @GlossaryWord { glossary } @GlossaryInContents { Yes } @GlossaryPrefix {} } The first determines the word that will be used as the title of the glossary. The default value shown produces {@Code Glossary} in English and its equivalent in other languages. You could change it, for example, to @ID @Code "@GlossaryWord { List of Definitions }" @Code "@GlossaryInContents" determines whether the glossary will be listed in the table of contents if there is one; and @Code "@GlossaryPrefix" is used by structure page numbers. @End @Section lout-3.39/doc/user/bgr_clip0000644000076400007640000000313211363700677014311 0ustar jeffjeff@Section @Title { Clipping } @Tag { clipping } @Begin @PP The @Code "@HClip" symbol clips the following object horizontally to the available width: @ID @Code { "@Box 1c @Wide @HClip WARNING!" } produces @ID { @Box 1c @Wide @HClip WARNING! } The following object may be arbitrary as usual; for example, it could be an illustration included using @Code "@IncludeGraphic" (Section {@NumberOf include}). @PP We have used the @Code "@Wide" symbol from Section {@NumberOf precise} to make clear what the available width is in this small example (one centimetre), but @Code "@HClip" will work in any context; for example, you could use it to clip a table entry, or a display. @PP The @Code "@HClip" symbol has a @Code "shift" option which determines which part of the clipped object is displayed. It may take on any value between {@Code "0.0"}, meaning to display the leftmost part (the default value), and {@Code "1.0"}, meaning to display the rightmost part: @ID @Code { "@Box 1c @Wide @HClip shift { 1.0 } WARNING!" } produces @ID { @Box 1c @Wide @HClip shift { 1.0 } WARNING! } To display the central part, use shift value {@Code "0.5"}. Notice that there is no unit of measurement attached to the value of {@Code "shift"}. @PP There is also a @Code "@VClip" symbol which works in exactly the same way, only vertically. The two symbols combine together naturally: @ID @Code { "@Box 1c @Wide 0.2c @High @HClip @VClip WARNING!" } produces @ID { @Box 1c @Wide 0.2c @High @HClip @VClip WARNING! } The @Code "shift" options may be used as usual to determine which part of the two-dimensional area is displayed. @End @Section lout-3.39/doc/user/typ_orga0000644000076400007640000001153011363700677014355 0ustar jeffjeff@Section @Title { Organizing large documents } @Tag { organizing } @Begin @PP It is not a good plan to store a large document in a single large organizing.large @Index { organizing large documents } file. It takes too long to find things in it, and if some catastrophe occurs, you lose the lot. Lout encourages you to break documents into pieces by its willingness to read a sequence of files ({@Code "lout file1 file2 ..."}). For large documents, the following plan is recommended. @PP Suppose you are making a book whose third chapter contains sections on banksias, grevilleas, acacias, and eucalypts. Place each section, from @Code "@Section" to {@Code "@End @Section"}, in a separate file, making four files called, say, {@Code banksias}, {@Code grevilleas}, {@Code acacias}, and {@Code eucalypts}. Then make a single file for the chapter as a whole whose contents are as follows: @ID @OneRow @Code { "@Chapter" " @Title { Australian Native Plants }" " @Tag { natives }" "@Begin" "Australian native plants provide a distinctive identity to the garden. Although" "less colourful than their European alternatives, some banksias and grevilleas do" "flower strongly, and of course the acacias (wattles) are unsurpassable in late winter." "@BeginSections" "@Include { banksias }" "@Include { grevilleas }" "@Include { acacias }" "@Include { eucalypts }" "@EndSections" "@End @Chapter" } The @Code "@Include" symbol causes Lout to read the file whose name follows include. @Index @Code "@Include" it between braces, just as though the contents of that file had been included at that point. @PP With this arrangement you can easily rearrange the order of the sections: just swap their @Code "@Include" lines. You should be using Lout's automatic cross referencing features (Section {@NumberOf cross}), so you don't have to worry about keeping cross references up to date. You can also temporarily delete a section by placing a @Code "#" character at the start of its line: @ID @Code "# @Include { acacias }" This works because @Code "#" is the @I { comment character }: Lout will comment. @Index { comments } ignore this character (unless enclosed in double quotes) and everything following it up to the end of the line. You can even temporarily delete every section except the one you are working on at the moment, using these comments. @PP Suppose now that this chapter file is called @Code { natives }, and you have others called @Code { preface }, @Code { flowers }, etc. Then you can make one file (call it @Code { garden }) for the whole book like this: @ID @OneRow @Code { "@SysInclude { book }" "@Book" " @Title { The Australian Garden }" " @Author { Martha S. Vineyard }" "//" "@Include { preface }" "@Include { flowers }" "@Include { shrubs }" "@Include { natives }" "@Include { trees }" } You can play the same tricks here: swap chapters around, or temporarily delete one or more with a {@Code "#"}. When a chapter is finished you can temporarily delete it to save formatting time and paper, and bring it back at the end. To format the book, use @Code "lout garden > out.ps" in Unix. Lout will read each @Code "@Include" file as it comes to it, and if it finds an @Code "@Include" of a section while reading a chapter file, it will read the section too. @PP If the order of your chapters is fairly stable, it might be advantageous to use the @Code "@BypassNumber" option of @Code "@Chapter" (described in Appendix {@NumberOf bypass}) to fix the numbers of all your chapters, so that you get correct chapter numbers even when formatting one chapter at a time. @PP If you decide to store chapters in separate Unix directories, make sure that any @Code "/" characters in the file names are enclosed in double quotes: @ID @Code "@Include { \"natives.dir/acacias\" }" Be careful not to give the directory the same name as your chapter file. You might also find it useful to construct your book @I { top-down }, as computer scientists call it, laying out all the chapters and sections as empty skeletons and filling their contents in later. @PP When some part of your document has to be repeated, one way to avoid entering it twice is to place that part in a separate file and use @Code "@Include" in two places to include it twice. This works, but there are two caveats. First, it may be better to use a definition (Section {@NumberOf definitions}), since that gives you an object with a name, which you can use with confidence anywhere at all. Second, Lout treats @Code "@Include" in a peculiar way when it appears in the setup part of a document (in definitions, databases, and the @Code "@Use" clauses that appear within setup files): it reads the file as usual the first time, and silently skips it the other times. This is done to simplify the handling of files of definitions that depend on other files of definitions, as described in the Expert's Guide @Cite { $kingston1995lout.expert }. @End @Section lout-3.39/doc/user/tbl_widt0000644000076400007640000000621511363700677014345 0ustar jeffjeff@Section @Title { Cell width and height } @Tag { tbl_widt } @Begin @PP Lout is quite good a choosing suitable widths for cells. It leaves column.width @RawIndex { column width } column.width.in.tables @SubIndex { in tables } narrow cells at their natural width, then uses paragraph breaking to reduce the wider cells to a common width which is as large as the available space allows: @QD @OneRow @Tbl aformat { @Cell @I A | @Cell B | @Cell C } { @Rowa A { Acacia } B { Shrub or small tree with grey-green foliage and brilliant yellow blossom in late winter. } C { Distributed widely throughout Australia except in the most arid parts; many varieties. } } This usually looks good, but if you need something else, there is the @Code width option: tables. @RawIndex { tables } tables.width @SubIndex { @Code "width" option } width. @RawIndex { @Code "width" option } width.in.tables @SubIndex { in tables } @ID @OneRow @Code "@Cell width { 3c }" Here we have asked for a cell width of three centimetres; this includes the cell margins. When using @Code width to fine-tune the appearance of a table wide enough to require paragraph breaking, it is best to use @Code width to make cells narrower, not wider. @PP Regrettably, there is no way to request that several cells in a row be given a common width equal to the width of the widest. One simple way to approximate this is to give these cells the same @Code width value. The @Code width option also has a special value, {@Code "expand"}. All cells with @Code "width { expand }" are assigned a common width tables. @RawIndex { tables } tables.expand @SubIndex { @Code expand cell width } expand.cell.width @Index { @Code expand cell width in tables } equal to the maximum amount permitted by the available space. For example, @ID @OneRow @Code @Verbatim { @QuotedDisplay @Tbl width { expand } paint { lightgrey } aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { 23.56 } B { 98.76 } C { 65.00 } } } has result @QuotedDisplay @Tbl width { expand } paint { lightgrey } aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { 23.56 } B { 98.76 } C { 65.00 } } We have used our usual trick of making the option apply to several cells by moving it to a more general level, in this case to {@Code "@Tbl"}. The available space can be reduced using the @Code "@Wide" symbol; if we replace @Code "@QuotedDisplay @Tbl" in the example above with @ID @OneRow @Code "@CentredDisplay 4i @Wide @Tbl" the result will be @CentredDisplay 4i @Wide @Tbl width { expand } paint { lightgrey } aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { 23.56 } B { 98.76 } C { 65.00 } } with the total table width reduced to four inches. @PP There is an analogous @Code height option which makes a cell take on tables. @RawIndex { tables } tables.height @SubIndex { @Code height option } height. @RawIndex { @Code "height" option } height.in.tables @SubIndex { in tables } a particular fixed height, again including margins. Make sure there is enough height in the cell to hold its entry when you use this option. The @Code "expand" value is not available for height. @End @Section lout-3.39/doc/user/gra_data0000644000076400007640000003221511363700677014276 0ustar jeffjeff@Section @Title { Changing the appearance of the data } @Tag { data } @Begin @PP The @Code "@Data" symbol has options for controlling the graphs. @RawIndex { graphs (statistical) } graphs.data @SubIndex { @Code "@Data" symbol } data.graph @Index { @Code "@Data" symbol (graphs) } appearance of its data. We have already seen the @Code "points" option, which controls what is printed at each data graphs. @RawIndex { graphs (statistical) } graphs.points @SubIndex { @Code points option } points.graph @Index { @Code "points" option (graphs) } point: @CD @Tab vmargin { 0.5vx } @Fmta { @Col @Code A ! @Col B ! @Col ! @Col @Code C ! @Col D } { @Rowa A { cross } B { @GraphCross } C { plus } D { @GraphPlus } @Rowa A { square } B { @GraphSquare } C { filledsquare } D { @GraphFilledSquare } @Rowa A { diamond } B { @GraphDiamond } C { filleddiamond } D { @GraphFilledDiamond } @Rowa A { circle } B { @GraphCircle } C { filledcircle } D { @GraphFilledCircle } @Rowa A { triangle } B { @GraphTriangle } C { filledtriangle } D { @GraphFilledTriangle } } Filled and open squares have exactly the same size, filled and open diamonds have exactly the same size, and so on. If the @Code "points" option is omitted or empty, nothing is printed. The symbols are centred over the data point. There is a @Code "symbolsize" graphs. @RawIndex { graphs (statistical) } graphs.symbolsize @SubIndex { @Code symbolsize option } symbolsize.graph @Index { @Code "symbolsize" option (graphs) } option which controls the size (radius) of all these symbols, and a @Code "symbollinewidth" option @FootNote { The @Code "symbollinewidth" option was introduced in Version 3.37, as part of a bug fix which also caused the printed size of some symbols to change slightly. } which controls their line width: @ID @OneRow @Code { "@Data" " symbolsize { 0.15f }" " symbollinewidth { 0.5p }" } shows their default values, 0.15 times the current font size and half a point. More precisely, these default values are taken from options to the @Code "@Graph" symbol with the same names. By setting those options you can therefore control all data points in the graph at once. The @Code "symbollinewidth" option does not affect the appearance of @Code { filledsquare }, @Code { filleddiamond }, @Code { filledcircle }, or @Code { filledtriangle }. @PP The @Code "@Data" symbol also has a @Code "pairs" option which graphs. @RawIndex { graphs (statistical) } graphs.pairs @SubIndex { @Code pairs option } pairs.graph @Index { @Code "pairs" option (graphs) } determines how each pair of points is connected. The choices are @Code none (not connected, the default), @Code solid (a solid line), @Code dashed (a dashed line), @Code dotted (a dotted line), or @Code { dotdashed }, @Code { dotdotdashed }, and @Code { dotdotdotdashed } for mixing dots and dashes. For example, @ID @OneRow @Code @Verbatim { @Graph abovecaption { Estimated population of Boston, New York, and Philadelphia } { @Data points { plus } pairs { solid } { 1720 12000 1730 13000 1740 15601 1760 15631 1770 15877 } @Data points { plus } pairs { dashed } { 1720 7000 1730 8622 1740 10451 1750 14255 1760 18000 1770 22667 } @Data points { plus } pairs { dotdashed } { 1720 10000 1730 11500 1740 12654 1750 18202 1760 23750 1770 34583 } } } produces @CD @Graph abovecaption { Estimated population of Boston, New York, and Philadelphia } { @Data points { plus } pairs { solid } { 1720 12000 1730 13000 1740 15601 1760 15631 1770 15877 } @Data points { plus } pairs { dashed } { 1720 7000 1730 8622 1740 10451 1750 14255 1760 18000 1770 22667 } @Data points { plus } pairs { dotdashed } { 1720 10000 1730 11500 1740 12654 1750 18202 1760 23750 1770 34583 } } (R. C. Simmons, @I { The American Colonies }, W. W. Norton, New York, 1981.) We will see in Section {@NumberOf key} how to add an explanatory key to this graph. If the points have symbols, these connecting lines will stop 1.5 symbolsizes away from the data points, so as not to overstrike them. If the points have no symbols and @Code "pairs" is {@Code "dashed"}, the first and last dash in each segment will have half the length of the others. @PP A @Code "dashlength" option controls the length of dashes and also the graphs. @RawIndex { graphs (statistical) } graphs.dashlength @SubIndex { @Code dashlength option } dashlength.graph @Index { @Code "dashlength" option (graphs) } separation between dots, and a @Code "linewidth" option controls the graphs. @RawIndex { graphs (statistical) } graphs.linewidth @SubIndex { @Code linewidth option } linewidth.graph @Index { @Code "linewidth" option (graphs) } width (thickness) of the lines and dots: @ID @OneRow @Code @Verbatim { @Data dashlength { 0.2f } linewidth { 0.5p } { ... } } This shows the default values, {@Code "0.2f"} for @Code "dashlength" and {@Code "0.5p"} (half a point) for {@Code "linewidth"}. Actually the default value for @Code "linewidth" is whatever happens to be already in use, but Lout sets line widths to half a point initially. This option also controls the separation between bars in histograms. @PP The @Code "pairs" option is also used for producing histograms, like graphs. @RawIndex { graphs (statistical) } graphs.histograms @SubIndex { histograms } histograms. @Index { histograms } graphs. @RawIndex { graphs (statistical) } graphs.yhisto @SubIndex { @Code yhisto option } yhisto.graph @Index { @Code "yhisto" option (graphs) } this: @ID @OneRow @Code @Verbatim { @Graph hidecaptions { yes } abovecaption { Computer Science 3 Results (1993) } leftcaption { Number of students } belowcaption { Final mark (%) } yextra { 0c } ymax { 80 } { @Data pairs { yhisto } { 0 1 10 3 20 2 30 4 40 15 50 60 60 58 70 28 80 15 90 7 100 0 } } } which has result @CD @Graph hidecaptions { yes } abovecaption { Computer Science 3 Results (1993) } leftcaption { Number of students } belowcaption { Final mark (%) } yextra { 0c } ymax { 80 } { @Data pairs { yhisto } { 0 1 10 3 20 2 30 4 40 15 50 60 60 58 70 28 80 15 90 7 100 0 } } Note carefully that one y histogram rectangle occupies the space from one x value to the next, with height equal to the y value lying between these two x values. This means that the very last y value has no effect on the result (however, there must be a last y value anyway). @PP There is an alternative to @Code "yhisto" called {@Code "surfaceyhisto"}: graphs. @RawIndex { graphs (statistical) } graphs.surfaceyhisto @SubIndex { @Code surfaceyhisto option } surfaceyhisto.graph @Index { @Code "surfaceyhisto" option (graphs) } @CD @Graph hidecaptions { yes } abovecaption { Computer Science 3 Results (1993) } leftcaption { Number of students } belowcaption { Final mark (%) } yextra { 0c } ymax { 80 } { @Data pairs { surfaceyhisto } { 0 1 10 3 20 2 30 4 40 15 50 60 60 58 70 28 80 15 90 7 100 0 } } As you can see, @Code "surfaceyhisto" draws just the surface of the histogram, not the descending lines. @PP There are @Code "xhisto" and @Code "surfacexhisto" values of graphs. @RawIndex { graphs (statistical) } graphs.xhisto @SubIndex { @Code xhisto option } xhisto.graph @Index { @Code "xhisto" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.surfacexhisto @SubIndex { @Code surfacexhisto option } surfacexhisto.graph @Index { @Code "surfacexhisto" option (graphs) } @Code "pairs" which produce a histogram whose bars are parallel to the x axis. There are also {@Code "filledyhisto" } and {@Code "filledxhisto" } values which produce filled rectangles rather graphs. @RawIndex { graphs (statistical) } graphs.filledxhisto @SubIndex { @Code filledxhisto option } filledxhisto.graph @Index { @Code "filledxhisto" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.filledyhisto @SubIndex { @Code filledyhisto option } filledyhisto.graph @Index { @Code "filledyhisto" option (graphs) } than outlined ones: @ID @OneRow @Code @Verbatim { @Graph abovecaption { Fertility rates in some developing countries } xextra { 0c } yextra { 0c } xmax { 8 } yticks { 1.5 (Turkey) 2.5 (Thailand) 3.5 (Indonesia) 4.5 (Costa Rica) 5.5 (Colombia) 6.5 (Cameroon) 7.5 (Botswana) 8.5 (Bangladesh) } yticklength { 0c } { @Data pairs { filledxhisto } { 0 1 3.2 2 2.2 3 3.0 4 3.5 5 2.8 6 5.9 7 4.8 8 5.3 9 } } } produces @CD @Graph abovecaption { Fertility rates in some developing countries } xextra { 0c } yextra { 0c } xmax { 8 } yticks { 1.5 (Turkey) 2.5 (Thailand) 3.5 (Indonesia) 4.5 (Costa Rica) 5.5 (Colombia) 6.5 (Cameroon) 7.5 (Botswana) 8.5 (Bangladesh) } yticklength { 0c } { @Data pairs { filledxhisto } { 0 1 3.2 2 2.2 3 3.0 4 3.5 5 2.8 6 5.9 7 4.8 8 5.3 9 } } (Bryant Robey, Shea O. Rutstein, and Leo Morros: The fertility decline in developing countries, @I { Scientific American }, December 1993.) Once again each bar goes from one y value to the next, with its x value equal to the x value lying between the two y values; this time the very first x value has no effect on the result. @PP The colour of one set of data can be changed with a @Code "colour" graphs. @RawIndex { graphs (statistical) } graphs.colour @SubIndex { @Code colour option } colour.graph @Index { @Code "colour" option (graphs) } option: @ID @OneRow @Code @Verbatim { @Data colour { blue } } For the complete list of acceptable colours, see Section {@NumberOf colour}. The @Code "colour" option's name may also be spelt @Code {"color"}. @PP It is also possible to paint the area between the data points and the x axis (or frame if @Code "style" is not {@Code "axes"}), using graphs. @RawIndex { graphs (statistical) } graphs.paint @SubIndex { @Code paint option } paint. @RawIndex { @Code "paint" option } paint.in.graphs @SubIndex { in graphs } @ID @OneRow @Code { "@Data" " paint { yes }" } The paint colour is determined by the @Code "colour" option just introduced; it will be @Code "black" if no colour is specified. Paint (including white paint) hides paint, points, and lines drawn by previous data sets. However the points and lines of each data set are drawn after painting that set, so they cannot be hidden under their own paint; and axes and frames are drawn last so that they too are never hidden. @PP Wherever there is a @Code paint option in Lout's standard packages, there is a neighbouring @Code texture option. For historical reasons the @Code paint option of @Code "@Graph" is not quite the same as other @Code "paint" options, but the @Code "texture" option is available graphs. @RawIndex { graphs (statistical) } graphs.texture @SubIndex { @Code texture option } texture.option. @RawIndex { @Code "texture" option } texture.option.in.graph @SubIndex { in graphs } as usual: @ID @OneRow @Code @Verbatim { @Graph yextra { 0c } { @Data paint { yes } texture { chessboard angle { 45d } } { 0 0.00 1 1.00 2 1.50 3 1.83 4 2.08 5 2.28 6 2.45 } } } produces @FootNote { If you can't see any textures here, the fault is probably with your PostScript viewer. See Section {@NumberOf textures}. } @CD @Graph yextra { 0c } { @Data paint { yes } texture { striped angle { 90d } } { 0 0.00 1 1.00 2 1.50 3 1.83 4 2.08 5 2.28 6 2.45 } } Any value acceptable to the @Code "texture" option of @Code "@Box" (Section {@NumberOf boxes}) is acceptable here. The @Code "texture" option will also give a texture to the filled areas of a {@Code filledxhisto} or {@Code filledyhisto}: @ID @OneRow @Code @Verbatim { @Graph yextra { 0c } { @Data pairs { filledyhisto } texture { striped angle { 45d } } { 0 0.00 1 1.00 2 1.50 3 1.83 4 2.08 5 2.28 6 2.45 7 0 } } } produces @CD @Graph yextra { 0c } { @Data pairs { filledyhisto } texture { striped angle { 45d } } { 0 0.00 1 1.00 2 1.50 3 1.83 4 2.08 5 2.28 6 2.45 7 0 } } If you want the bars to vary in colour or texture, you have to give multiple @Code "@Data" sets, one for each combination of colour and texture. @PP A @Code "dataformat" option is provided for changing the interpretation graphs. @RawIndex { graphs (statistical) } graphs.dataformat @SubIndex { @Code dataformat option } dataformat.graph @Index { @Code "dataformat" option (graphs) } of the data. Ordinarily, as we know, the numbers are taken to be pairs of x and y coordinates, like this: @ID @OneRow @Code { "@Data" "{" " x y x y ... x y" "}" } However, by setting @Code "dataformat" to {@Code "yonly"}, the interpretation is changed to a sequence of y coordinates only: @ID @OneRow @Code { "@Data" " dataformat { yonly }" "{" " y y ... y" "}" } and x values 1, 2, and so on are inserted automatically, as though the original input was @ID @OneRow @Code { "@Data" "{" " 1 y 2 y ..." "}" } Similarly, {@Code "xonly"} inserts y values 1, 2, and so on. The default value, {@Code "xandy"}, gives the usual interpretation, and {@Code "swapxandy"} exchanges adjacent pairs of numbers: the data is interpreted as @M { (y, x) } pairs rather than @M { (x, y) } pairs. The layout of data on lines has no effect on the interpretation. @End @Section lout-3.39/doc/user/prg_chan0000644000076400007640000001514211363700677014315 0ustar jeffjeff@Section @Title { Changing the appearance of all programs simultaneously } @Tag { cpsetup } @Begin @PP We have just seen that the {@Code "@CP"}, {@Code "@Eiffel"} etc. symbols have many options for changing the appearance of the program text. However, most people would not want to have a different style for every program text in their document; they want to define the style once at the start, and have all their program texts come out in that style without laboriously setting options on every symbol. You do this by copying the setup file and changing it. @PP For general information about how to make your own setup file, consult Section {@NumberOf setup}. The options that determine the default values are in the @Code "@Use" clause which occupies most of the setup programs. @RawIndex { programs } programs.setup @SubIndex { setup files for } setup.files. @RawIndex { setup files } setup.files.for.programs @SubIndex { for programs } file. Here is part of the @Code "@Use" clause from {@Code cprint}: @ID @Code @Tbl mv { 0.5vx } aformat { @Cell A | @Cell B | @Cell C } bformat { @Cell { " #" A } | @Cell { "{" B } | @Cell "}" } { @Rowa A { "@Use { @CPSetup" } @Rowb A { "pipe" } B { } @Rowb A { "numbered" } B { No } @Rowb A { "blanknumbered" } B { Yes } @Rowb A { "style" } B { fixed } @Rowa @Rowb A { "fixedfont" } B { Courier } @Rowb A { "fixedsize" } B { -1.0p } @Rowb A { "fixedline" } B { 1.0vx } @Rowb A { "fixedblanklinescale" } B { 1.0 } @Rowb A { "fixedspace" } B { lout } @Rowb A { "fixedtabin" } B { 8 } @Rowb A { "fixedtabout" } B { 8s } @Rowa @Rowb A { "fixedidentifiers" } B { Base } @Rowb A { "fixedkeywords" } B { Base } @Rowb A { "fixedoperators" } B { Base } @Rowb A { "fixednumbers" } B { Base } @Rowb A { "fixedstrings" } B { Base } @Rowb A { "fixedcomments" } B { Base } @Rowb A { "fixedlinenumbers" } B { Base } @Rowa @Rowb A { "fixedidentifiersformat" } B { "@Body" } @Rowb A { "fixedkeywordsformat" } B { "@Body" } @Rowb A { "fixedoperatorsformat" } B { "@Body" } @Rowb A { "fixednumbersformat" } B { "@Body" } @Rowb A { "fixedstringsformat" } B { "@Body" } @Rowb A { "fixedcommentsformat" } B { "@Body" } @Rowb A { "fixedlinenumbersformat" } B { "@Body" } #@Rowa #@Rowa A { "..." } # #@Rowa @Rowa A { "}" } } The @Code pipe option will be explained in Section {@NumberOf pipes}. The options whose name begins with @Code "fixed" apply only when @Code style is {@Code fixed}; there are corresponding options, not shown, which apply when @Code style is {@Code varying} and {@Code symbol}. @PP This extract shows that the default value of @Code "numbered" is {@Code No}, of @Code "blanknumbered" is {@Code Yes}, and of @Code style is {@Code fixed}. It also shows the default font family, font face, font size, line spacing, blank line scale factor, spacing mode, and tab settings when the style is {@Code "fixed"}. The font family name for @Code "fixed" style is {@Code "Courier"}, but for the other styles (not shown) it is empty. This causes the @Code "fixed" style to always switch to Courier, and the other styles to use the same font family as in the surrounding document. @PP The options from @Code "fixedidentifiers" to @Code "fixedlinenumbers" allow you to set the font face to use for each of these parts of your program. People who want fixed-width fonts do not usually want very exciting font faces either, so the default values above are all {@Code "Base"}, but for the {@Code varying} and {@Code symbol} styles, the default identifier face is {@Code Slope}, the default keyword face is {@Code Bold}, and so on. You can actually give a family name before the face name in these options, allowing you to switch font families for different parts of the program if you wish. @PP The @Code fixedidentifiersformat option allows you to make a more radical change to the format of identifiers than just the font. Within this option, @Code "@Body" stands for the identifier being formatted, and by applying Lout symbols to it, you apply them to every identifier. For example, @ID @Code "fixedidentifiersformat { red @Colour @Body }" will cause identifiers to be printed red. @FootNote { @Code "@Colour" is not a Lout primitive like, say, {@Code "@Font"}; it is defined when you write @Code "@SysInclude { doc }" or the equivalent for the other document types. This is true of quite a few generally useful symbols, including {@Code "@Box"} and {@Code "@I"}. If you want to use these symbols here, you must include your setup file @I after @Code "@SysInclude { doc }" or whatever, the reverse of the usual arrangement, so that they are defined before Lout reads your setup file. This is always done when formatting programs independently of any document, so you can use these symbols in a setup file given by a @Code { -S } command line flag. } If you do use exotic formats, remember that in some programming languages, comments and even strings may occupy more than one line: {@Code "@Box"}, for example, will give a logical but probably unwanted result when formatting a multi-line string. @PP As always with setup files, to change a default value, delete the preceding @Code "#" and change the part between braces. For example, suppose you are happy with @Code "fixed" except that you want bold keywords. Then one line needs to be changed, to @ID @Code "fixedkeywords { Bold }" Or suppose you like @Code "varying" as it stands, but would like it to be the default style rather than {@Code "fixed"}. Again, only one line needs to be changed, to {@Code "style { varying }"}. @PP It is probably not a good idea to change the default value of @Code { numbered } to {@Code Yes}, because small fragments of code within paragraphs will then get line numbers as well as large displayed programs. If you do have many large numbered programs as well as small fragments, a better approach would be to place @ID @OneRow @Code @Verbatim { import @CPSetup macro @NCP { @CP numbered { Yes } } } (or the equivalent for your language) in your @Code mydefs file, so that you can type @Code "@NCP" instead of {@Code "@CP numbered { Yes }"}. On the other hand, it is quite safe to change @Code "blanknumbered" to {@Code "No"} or {@Code "NoPrint"} in the setup file; this will cause line numbers to be omitted from blank lines whenever there happen to be line numbers. @PP The setup files for the other languages are identical to this one, except that the symbol after @Code "@Use" is different, and some of the default values may be different. Changing an option affects only the language of that setup file; if you have multiple languages you can have multiple setup files and change their options quite independently of each other. @End @Section lout-3.39/doc/user/ap_col0000644000076400007640000002670511363700677014000 0ustar jeffjeff@Appendix @Title { Lots more colours } @Tag { morecolours } @Begin Here is the long list of extra colours, said to be from the xrgb @Index { @Code "@Xrgb" symbol } X windows system, that you can get by placing @Code "@SysInclude { xrgb }" at the start of your document and using the @Code "@Xrgb" symbol. For example, you might write @ID @Code "{@Xrgb oldlace} @Colour ..." or @ID @Code "@Box paint { @Xrgb oldlace } ..." You can't get these colours just by giving their names; you have to use the @Code "@Xrgb" symbol. Wherever @Code "grey" appears it may also be spelt {@Code gray}. @PP There are 541 colours here. I've removed capitalized alternative spellings and hyphens from the information provided to me. Thanks to Mark Summerfield for providing this information. @DP @XRGBTest black @XRGBTest snow @XRGBTest ghostwhite @XRGBTest whitesmoke @XRGBTest gainsboro @XRGBTest floralwhite @XRGBTest oldlace @XRGBTest linen @XRGBTest antiquewhite @XRGBTest papayawhip @XRGBTest blanchedalmond @XRGBTest bisque @XRGBTest peachpuff @XRGBTest navajowhite @XRGBTest moccasin @XRGBTest cornsilk @XRGBTest ivory @XRGBTest lemonchiffon @XRGBTest seashell @XRGBTest honeydew @XRGBTest mintcream @XRGBTest azure @XRGBTest aliceblue @XRGBTest lavender @XRGBTest lavenderblush @XRGBTest mistyrose @XRGBTest white @XRGBTest darkslategrey @XRGBTest dimgrey @XRGBTest slategrey @XRGBTest lightslategrey @XRGBTest grey @XRGBTest lightgrey @XRGBTest midnightblue @XRGBTest navy @XRGBTest navyblue @XRGBTest cornflowerblue @XRGBTest darkslateblue @XRGBTest slateblue @XRGBTest mediumslateblue @XRGBTest lightslateblue @XRGBTest mediumblue @XRGBTest royalblue @XRGBTest blue @XRGBTest dodgerblue @XRGBTest deepskyblue @XRGBTest skyblue @XRGBTest lightskyblue @XRGBTest steelblue @XRGBTest lightsteelblue @XRGBTest lightblue @XRGBTest powderblue @XRGBTest paleturquoise @XRGBTest darkturquoise @XRGBTest mediumturquoise @XRGBTest turquoise @XRGBTest cyan @XRGBTest lightcyan @XRGBTest cadetblue @XRGBTest mediumaquamarine @XRGBTest aquamarine @XRGBTest darkgreen @XRGBTest darkolivegreen @XRGBTest darkseagreen @XRGBTest seagreen @XRGBTest mediumseagreen @XRGBTest lightseagreen @XRGBTest palegreen @XRGBTest springgreen @XRGBTest lawngreen @XRGBTest green @XRGBTest chartreuse @XRGBTest mediumspringgreen @XRGBTest greenyellow @XRGBTest limegreen @XRGBTest yellowgreen @XRGBTest forestgreen @XRGBTest olivedrab @XRGBTest darkkhaki @XRGBTest khaki @XRGBTest palegoldenrod @XRGBTest lightgoldenrodyellow @XRGBTest lightyellow @XRGBTest yellow @XRGBTest gold @XRGBTest lightgoldenrod @XRGBTest goldenrod @XRGBTest darkgoldenrod @XRGBTest rosybrown @XRGBTest indianred @XRGBTest saddlebrown @XRGBTest sienna @XRGBTest peru @XRGBTest burlywood @XRGBTest beige @XRGBTest wheat @XRGBTest sandybrown @XRGBTest tan @XRGBTest chocolate @XRGBTest firebrick @XRGBTest brown @XRGBTest darksalmon @XRGBTest salmon @XRGBTest lightsalmon @XRGBTest orange @XRGBTest darkorange @XRGBTest coral @XRGBTest lightcoral @XRGBTest tomato @XRGBTest orangered @XRGBTest red @XRGBTest hotpink @XRGBTest deeppink @XRGBTest pink @XRGBTest lightpink @XRGBTest palevioletred @XRGBTest maroon @XRGBTest mediumvioletred @XRGBTest violetred @XRGBTest magenta @XRGBTest violet @XRGBTest plum @XRGBTest orchid @XRGBTest mediumorchid @XRGBTest darkorchid @XRGBTest darkviolet @XRGBTest blueviolet @XRGBTest purple @XRGBTest mediumpurple @XRGBTest thistle @XRGBNoTest @XRGBNoTest @XRGBNoTest @XRGBNoTest @DP @XRGBTest snow1 @XRGBTest snow2 @XRGBTest snow3 @XRGBTest snow4 @XRGBTest seashell1 @XRGBTest seashell2 @XRGBTest seashell3 @XRGBTest seashell4 @XRGBTest antiquewhite1 @XRGBTest antiquewhite2 @XRGBTest antiquewhite3 @XRGBTest antiquewhite4 @XRGBTest bisque1 @XRGBTest bisque2 @XRGBTest bisque3 @XRGBTest bisque4 @XRGBTest peachpuff1 @XRGBTest peachpuff2 @XRGBTest peachpuff3 @XRGBTest peachpuff4 @XRGBTest navajowhite1 @XRGBTest navajowhite2 @XRGBTest navajowhite3 @XRGBTest navajowhite4 @XRGBTest lemonchiffon1 @XRGBTest lemonchiffon2 @XRGBTest lemonchiffon3 @XRGBTest lemonchiffon4 @XRGBTest cornsilk1 @XRGBTest cornsilk2 @XRGBTest cornsilk3 @XRGBTest cornsilk4 @XRGBTest ivory1 @XRGBTest ivory2 @XRGBTest ivory3 @XRGBTest ivory4 @XRGBTest honeydew1 @XRGBTest honeydew2 @XRGBTest honeydew3 @XRGBTest honeydew4 @XRGBTest lavenderblush1 @XRGBTest lavenderblush2 @XRGBTest lavenderblush3 @XRGBTest lavenderblush4 @XRGBTest mistyrose1 @XRGBTest mistyrose2 @XRGBTest mistyrose3 @XRGBTest mistyrose4 @XRGBTest azure1 @XRGBTest azure2 @XRGBTest azure3 @XRGBTest azure4 @XRGBTest slateblue1 @XRGBTest slateblue2 @XRGBTest slateblue3 @XRGBTest slateblue4 @XRGBTest royalblue1 @XRGBTest royalblue2 @XRGBTest royalblue3 @XRGBTest royalblue4 @XRGBTest blue1 @XRGBTest blue2 @XRGBTest blue3 @XRGBTest blue4 @XRGBTest dodgerblue1 @XRGBTest dodgerblue2 @XRGBTest dodgerblue3 @XRGBTest dodgerblue4 @XRGBTest steelblue1 @XRGBTest steelblue2 @XRGBTest steelblue3 @XRGBTest steelblue4 @XRGBTest deepskyblue1 @XRGBTest deepskyblue2 @XRGBTest deepskyblue3 @XRGBTest deepskyblue4 @XRGBTest skyblue1 @XRGBTest skyblue2 @XRGBTest skyblue3 @XRGBTest skyblue4 @XRGBTest lightskyblue1 @XRGBTest lightskyblue2 @XRGBTest lightskyblue3 @XRGBTest lightskyblue4 @XRGBTest lightsteelblue1 @XRGBTest lightsteelblue2 @XRGBTest lightsteelblue3 @XRGBTest lightsteelblue4 @XRGBTest lightblue1 @XRGBTest lightblue2 @XRGBTest lightblue3 @XRGBTest lightblue4 @XRGBTest lightcyan1 @XRGBTest lightcyan2 @XRGBTest lightcyan3 @XRGBTest lightcyan4 @XRGBTest paleturquoise1 @XRGBTest paleturquoise2 @XRGBTest paleturquoise3 @XRGBTest paleturquoise4 @XRGBTest cadetblue1 @XRGBTest cadetblue2 @XRGBTest cadetblue3 @XRGBTest cadetblue4 @XRGBTest turquoise1 @XRGBTest turquoise2 @XRGBTest turquoise3 @XRGBTest turquoise4 @XRGBTest cyan1 @XRGBTest cyan2 @XRGBTest cyan3 @XRGBTest cyan4 @XRGBTest aquamarine1 @XRGBTest aquamarine2 @XRGBTest aquamarine3 @XRGBTest aquamarine4 @XRGBTest darkseagreen1 @XRGBTest darkseagreen2 @XRGBTest darkseagreen3 @XRGBTest darkseagreen4 @XRGBTest seagreen1 @XRGBTest seagreen2 @XRGBTest seagreen3 @XRGBTest seagreen4 @XRGBTest palegreen1 @XRGBTest palegreen2 @XRGBTest palegreen3 @XRGBTest palegreen4 @XRGBTest springgreen1 @XRGBTest springgreen2 @XRGBTest springgreen3 @XRGBTest springgreen4 @XRGBTest green1 @XRGBTest green2 @XRGBTest green3 @XRGBTest green4 @XRGBTest chartreuse1 @XRGBTest chartreuse2 @XRGBTest chartreuse3 @XRGBTest chartreuse4 @XRGBTest olivedrab1 @XRGBTest olivedrab2 @XRGBTest olivedrab3 @XRGBTest olivedrab4 @XRGBTest darkolivegreen1 @XRGBTest darkolivegreen2 @XRGBTest darkolivegreen3 @XRGBTest darkolivegreen4 @XRGBTest khaki1 @XRGBTest khaki2 @XRGBTest khaki3 @XRGBTest khaki4 @XRGBTest lightgoldenrod1 @XRGBTest lightgoldenrod2 @XRGBTest lightgoldenrod3 @XRGBTest lightgoldenrod4 @XRGBTest lightyellow1 @XRGBTest lightyellow2 @XRGBTest lightyellow3 @XRGBTest lightyellow4 @XRGBTest yellow1 @XRGBTest yellow2 @XRGBTest yellow3 @XRGBTest yellow4 @XRGBTest gold1 @XRGBTest gold2 @XRGBTest gold3 @XRGBTest gold4 @XRGBTest goldenrod1 @XRGBTest goldenrod2 @XRGBTest goldenrod3 @XRGBTest goldenrod4 @XRGBTest darkgoldenrod1 @XRGBTest darkgoldenrod2 @XRGBTest darkgoldenrod3 @XRGBTest darkgoldenrod4 @XRGBTest rosybrown1 @XRGBTest rosybrown2 @XRGBTest rosybrown3 @XRGBTest rosybrown4 @XRGBTest indianred1 @XRGBTest indianred2 @XRGBTest indianred3 @XRGBTest indianred4 @XRGBTest sienna1 @XRGBTest sienna2 @XRGBTest sienna3 @XRGBTest sienna4 @XRGBTest burlywood1 @XRGBTest burlywood2 @XRGBTest burlywood3 @XRGBTest burlywood4 @XRGBTest wheat1 @XRGBTest wheat2 @XRGBTest wheat3 @XRGBTest wheat4 @XRGBTest tan1 @XRGBTest tan2 @XRGBTest tan3 @XRGBTest tan4 @XRGBTest chocolate1 @XRGBTest chocolate2 @XRGBTest chocolate3 @XRGBTest chocolate4 @XRGBTest firebrick1 @XRGBTest firebrick2 @XRGBTest firebrick3 @XRGBTest firebrick4 @XRGBTest brown1 @XRGBTest brown2 @XRGBTest brown3 @XRGBTest brown4 @XRGBTest salmon1 @XRGBTest salmon2 @XRGBTest salmon3 @XRGBTest salmon4 @XRGBTest lightsalmon1 @XRGBTest lightsalmon2 @XRGBTest lightsalmon3 @XRGBTest lightsalmon4 @XRGBTest orange1 @XRGBTest orange2 @XRGBTest orange3 @XRGBTest orange4 @XRGBTest darkorange1 @XRGBTest darkorange2 @XRGBTest darkorange3 @XRGBTest darkorange4 @XRGBTest coral1 @XRGBTest coral2 @XRGBTest coral3 @XRGBTest coral4 @XRGBTest tomato1 @XRGBTest tomato2 @XRGBTest tomato3 @XRGBTest tomato4 @XRGBTest orangered1 @XRGBTest orangered2 @XRGBTest orangered3 @XRGBTest orangered4 @XRGBTest red1 @XRGBTest red2 @XRGBTest red3 @XRGBTest red4 @XRGBTest deeppink1 @XRGBTest deeppink2 @XRGBTest deeppink3 @XRGBTest deeppink4 @XRGBTest hotpink1 @XRGBTest hotpink2 @XRGBTest hotpink3 @XRGBTest hotpink4 @XRGBTest pink1 @XRGBTest pink2 @XRGBTest pink3 @XRGBTest pink4 @XRGBTest lightpink1 @XRGBTest lightpink2 @XRGBTest lightpink3 @XRGBTest lightpink4 @XRGBTest palevioletred1 @XRGBTest palevioletred2 @XRGBTest palevioletred3 @XRGBTest palevioletred4 @XRGBTest maroon1 @XRGBTest maroon2 @XRGBTest maroon3 @XRGBTest maroon4 @XRGBTest violetred1 @XRGBTest violetred2 @XRGBTest violetred3 @XRGBTest violetred4 @XRGBTest magenta1 @XRGBTest magenta2 @XRGBTest magenta3 @XRGBTest magenta4 @XRGBTest orchid1 @XRGBTest orchid2 @XRGBTest orchid3 @XRGBTest orchid4 @XRGBTest plum1 @XRGBTest plum2 @XRGBTest plum3 @XRGBTest plum4 @XRGBTest mediumorchid1 @XRGBTest mediumorchid2 @XRGBTest mediumorchid3 @XRGBTest mediumorchid4 @XRGBTest darkorchid1 @XRGBTest darkorchid2 @XRGBTest darkorchid3 @XRGBTest darkorchid4 @XRGBTest purple1 @XRGBTest purple2 @XRGBTest purple3 @XRGBTest purple4 @XRGBTest mediumpurple1 @XRGBTest mediumpurple2 @XRGBTest mediumpurple3 @XRGBTest mediumpurple4 @XRGBTest thistle1 @XRGBTest thistle2 @XRGBTest thistle3 @XRGBTest thistle4 @XRGBNoTest @XRGBNoTest @XRGBNoTest @XRGBNoTest @DP @XRGBTest grey0 @XRGBTest grey1 @XRGBTest grey2 @XRGBTest grey3 @XRGBTest grey4 @XRGBTest grey5 @XRGBTest grey6 @XRGBTest grey7 @XRGBTest grey8 @XRGBTest grey9 @XRGBTest grey10 @XRGBTest grey11 @XRGBTest grey12 @XRGBTest grey13 @XRGBTest grey14 @XRGBTest grey15 @XRGBTest grey16 @XRGBTest grey17 @XRGBTest grey18 @XRGBTest grey19 @XRGBTest grey20 @XRGBTest grey21 @XRGBTest grey22 @XRGBTest grey23 @XRGBTest grey24 @XRGBTest grey25 @XRGBTest grey26 @XRGBTest grey27 @XRGBTest grey28 @XRGBTest grey29 @XRGBTest grey30 @XRGBTest grey31 @XRGBTest grey32 @XRGBTest grey33 @XRGBTest grey34 @XRGBTest grey35 @XRGBTest grey36 @XRGBTest grey37 @XRGBTest grey38 @XRGBTest grey39 @XRGBTest grey40 @XRGBTest grey41 @XRGBTest grey42 @XRGBTest grey43 @XRGBTest grey44 @XRGBTest grey45 @XRGBTest grey46 @XRGBTest grey47 @XRGBTest grey48 @XRGBTest grey49 @XRGBTest grey50 @XRGBTest grey51 @XRGBTest grey52 @XRGBTest grey53 @XRGBTest grey54 @XRGBTest grey55 @XRGBTest grey56 @XRGBTest grey57 @XRGBTest grey58 @XRGBTest grey59 @XRGBTest grey60 @XRGBTest grey61 @XRGBTest grey62 @XRGBTest grey63 @XRGBTest grey64 @XRGBTest grey65 @XRGBTest grey66 @XRGBTest grey67 @XRGBTest grey68 @XRGBTest grey69 @XRGBTest grey70 @XRGBTest grey71 @XRGBTest grey72 @XRGBTest grey73 @XRGBTest grey74 @XRGBTest grey75 @XRGBTest grey76 @XRGBTest grey77 @XRGBTest grey78 @XRGBTest grey79 @XRGBTest grey80 @XRGBTest grey81 @XRGBTest grey82 @XRGBTest grey83 @XRGBTest grey84 @XRGBTest grey85 @XRGBTest grey86 @XRGBTest grey87 @XRGBTest grey88 @XRGBTest grey89 @XRGBTest grey90 @XRGBTest grey91 @XRGBTest grey92 @XRGBTest grey93 @XRGBTest grey94 @XRGBTest grey95 @XRGBTest grey96 @XRGBTest grey97 @XRGBTest grey98 @XRGBTest grey99 @XRGBTest grey100 @XRGBNoTest @XRGBNoTest @XRGBNoTest @XRGBNoTest @DP @XRGBTest darkgrey @XRGBTest darkblue @XRGBTest darkcyan @XRGBTest darkmagenta @XRGBTest darkred @XRGBTest lightgreen @XRGBNoTest # makes a dummy last line to ensure adjusting on all lines @XRGBNoTest @XRGBNoTest @XRGBNoTest @End @Appendix lout-3.39/doc/user/typ_apdf0000644000076400007640000000431111363700677014336 0ustar jeffjeff@Section @Title { PDF (Adobe Portable Document Format) documents } @Tag { pdf } @Begin @PP You can get Lout to produce PDF (Adobe Portable Document Format) output as an alternative to PostScript, by adding @Code "-PDF" to the command line like this: pdf. @Index { PDF documents } @ID @Code "lout -PDF simple > simple.pdf" No other changes are required. @PP When viewed with a PDF viewer, entries in tables of contents and indexes can be clicked on and this transports the viewer to the part of the document referenced by the link, as described in cross @CrossLink { Section {@NumberOf cross} }. Recent versions of PostScript support this feature too, via the @I pdfmark feature, and Lout's PostScript contains links expressed in this way. Unfortunately, few PostScript viewers know how to handle these links; those that don't just ignore them. @PP Regrettably, the PDF output produced by Lout is inferior at graphics: the advanced features of the @Code "@Diag" and @Code "@Graph" packages do not produce any output. One can still format documents that contain them, but the results are disappointing. The only way to get the best of everything is to produce PostScript, and then either pass it through a `distillation' program to produce PDF, or else view it with a PostScript viewer that understands links. @PP When generating PostScript for subsequent distillation to PDF, the docinfo. @Index @Code "@DocInfo" @Code "@DocInfo" symbol may be useful. Placed anywhere in the document, it generates PostScript which causes the subsequent PDF to contain a `document info dictionary' containing the author of the document, its title, and some keywords: @ID @Code @Verbatim { @DocInfo author { Jeffrey H. Kingston } title { A User's Guide to the Lout Document Formatting System } keywords { Lout, PostScript, PDF } } The values of the options are restricted to sequences of simple words, as shown, since this is all that PDF document info dictionaries may contain. All three options are optional; if one is omitted, the dictionary will simply not have the corresponding entry, which is legal in PDF. There is no way to have the author and title taken automatically from @Code "@Author" and @Code "@Title" options. @End @Section lout-3.39/doc/user/prg_erro0000644000076400007640000000415311363700677014353 0ustar jeffjeff@Section @Title { Error messages } @Tag { cpp_erro } @Begin @PP In order to understand the error messages produced by program printing, it is necessary to understand that Lout's first step when programs. @RawIndex { programs } programs.errors @SubIndex { errors } errors. @RawIndex { errors } errors.in.programs @SubIndex { in program formatting } given a program text is to pass it to the separate {@Code prg2lout} program for analysis. This separate program is the source of most of the error messages associated with program printing. @PP The {@Code prg2lout} program is quite happy to format a fragment of a computer program: there is no need to supply a complete routine, or a complete statement, or any such thing. However, it will complain if you supply only a fragment of one lexical unit, such as a comment or string without its terminating delimiter. It will also complain if there is a character that cannot be classified as part of an identifier, number, etc. according to the rules of the language as they have been given to @Code prg2lout by the implementer. Irrespective of the language rules, @Code prg2lout always interprets spaces, tabs, newlines, and formfeed characters in the usual way. @PP If an error message is generated by {@Code prg2lout}, it will contain a line and column number counting from the start of the program text involved. Lout will precede this error message with a file name, line number, and column number pointing to the Lout symbol ({@Code "@CP"}, {@Code "@Eiffel"} etc.) whose program text caused the error message, like this: @ID @OneRow @Code @Verbatim { lout file "prg_tabs" (from "prg" line 96, from "all" line 46): 56,23: prg2lout 2,1: program text ended within comment } This is an actual message produced when formatting this chapter. The program text in question has only one line, containing an incomplete comment, so when @Code "prg2lout" tried to start the second line and found nothing, it complained as shown. In general, then, you have to add {@Code "prg2lout"}'s line number to Lout's line number, and use some initiative, to find the precise point of the problem. @End @Section lout-3.39/doc/user/dia_labe0000644000076400007640000003717011442270505014247 0ustar jeffjeff@Section @Tag { dia_labe } @Title { Labels } @Begin @PP Diagrams often contain small @I labels adjacent to their nodes and links: diagrams. @RawIndex { diagrams } diagrams.labels @SubIndex { labels } labels. @RawIndex { labels } labels.in.diagrams @SubIndex { in diagrams } @CD @Diag nodelabelformat { @I @Body } { @Tab @Fmta { @Col A ! @Col ! @Col ! @Col B ! @Col ! @Col ! @Col C } { @Rowa B { B:: @Circle alabel { b } } @Rowa A { A:: @Circle alabel { a } } @Rowa C { C:: @Circle dlabel { c } } } // @Arrow from { A } to { B } ylabel { 10 } @Arrow from { A } to { C } ylabel { 15 } @Arrow from { B } to { C } ylabel { 20 } } Each node may have up to four labels, called {@Code alabel}, {@Code blabel}, diagrams. @RawIndex { diagrams } diagrams.alabel @SubIndex { @Code "alabel" option } alabel.diagrams @Index { @Code "alabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.blabel @SubIndex { @Code "blabel" option } blabel.diagrams @Index { @Code "blabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.clabel @SubIndex { @Code "clabel" option } clabel.diagrams @Index { @Code "clabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.dlabel @SubIndex { @Code "dlabel" option } dlabel.diagrams @Index { @Code "dlabel" option (diagrams) } {@Code clabel}, and {@Code dlabel}: @ID { @Code @Verbatim { @Ellipse alabel { a } blabel { b } clabel { c } dlabel { d } { Hello, world } } ||7ct @VContract @Diag { @Ellipse alabel { a } blabel { b } clabel { c } dlabel { d } { Hello, world } } } Links also have labels, five in fact: diagrams. @RawIndex { diagrams } diagrams.fromlabel @SubIndex { @Code "fromlabel" option } fromlabel.diagrams @Index { @Code "fromlabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.xlabel @SubIndex { @Code "xlabel" option } xlabel.diagrams @Index { @Code "xlabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.ylabel @SubIndex { @Code "ylabel" option } ylabel.diagrams @Index { @Code "ylabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.zlabel @SubIndex { @Code "zlabel" option } zlabel.diagrams @Index { @Code "zlabel" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.tolabel @SubIndex { @Code "tolabel" option } tolabel.diagrams @Index { @Code "tolabel" option (diagrams) } @ID { @Code @Verbatim { @Link fromlabel { f } xlabel { x } ylabel { y } zlabel { z } tolabel { t } } ||7ct @VContract @Diag { 3c @Wide 1c @High // @Link from { 0 0 } to { 1,1 } fromlabel { f } xlabel { x } ylabel { y } zlabel { z } tolabel { t } } } The {@Code fromlabel} and {@Code tolabel} options are positioned directly over the endpoints of the link, and {@Code fromlabel} is by default printed at a funny angle, because these labels are the means of attaching arrowheads to links: @ID { @Code @Verbatim { @Link tolabel { @SolidArrowHead } } ||7ct @VContract @Diag { 3c @Wide 1c @High // @Link from { 0 0 } to { 1,1 } tolabel { @SolidArrowHead } } } @Code "@SolidArrowHead" is a symbol available for use anywhere whose value is an object in the shape of a small solid arrowhead. The arrowhead options of Section {@NumberOf dia_link} work by setting {@Code fromlabel} and {@Code tolabel} in exactly this way. Usually it is best to forget about {@Code fromlabel} and {@Code tolabel}, and think of links as having three labels: {@Code xlabel} near the start, {@Code ylabel} in the middle, and {@Code zlabel} near the end. @PP Adding a label will not change the size of the diagram or the position of any node, link, or other label. Although a label may be an arbitrary object, it is treated as having zero size and will overstrike anything that happens to be where it wants to go. @PP There are options for controlling the appearance and position of labels. These are described below mainly for {@Code alabel}, but there are corresponding options for all nine labels. @PP The {@Code alabelfont} and {@Code alabelbreak} options determine the diagrams. @RawIndex { diagrams } diagrams.labelfont @SubIndex { @Code "labelfont" options } labelfont. @RawIndex { @Code "labelfont" options } labelfont.in.diagrams @SubIndex { in diagrams } diagrams. @RawIndex { diagrams } diagrams.labelbreak @SubIndex { @Code "labelbreak" options } labelbreak. @RawIndex { @Code "labelbreak" options } labelbreak.in.diagrams @SubIndex { in diagrams } font and paragraph breaking style of the label: @ID { @Code @Verbatim { @Ellipse alabel { a } alabelfont { -2p } alabelbreak { ragged nohyphen } { Hello, world } } ||7ct @VContract @Diag { @Ellipse alabel { a } alabelfont { -2p } alabelbreak { ragged nohyphen } { Hello, world } } } This example shows the default values of these two options; @Code "-2p" explains why the labels in earlier examples were printed in a smaller font size. There is also an {@Code alabelformat} option which allows diagrams. @RawIndex { diagrams } diagrams.labelformat @SubIndex { @Code "labelformat" options } labelformat. @RawIndex { @Code "labelformat" options } labelformat.in.diagrams @SubIndex { in diagrams } for more radical changes in appearance: @ID { @Code @Verbatim { @Ellipse alabel { a } alabelformat { @Box @I @Body } { Hello, world } } ||7ct @Diag { //0.5c @Ellipse alabel { a } alabelformat { @Box @I @Body } { Hello, world } } } The value attached to the ellipse will be the value of {@Code alabelformat}, with any @Code "@Body" symbol within it replaced by the value of the {@Code alabel} option. This example produces boxed italic labels. @PP Nodes also have {@Code nodelabelfont}, {@Code nodelabelbreak}, and {@Code nodelabelformat} options which work in the same way but affect all of the node labels, not just one: @ID { @Code @Verbatim { @Ellipse nodelabelformat { @Box @I @Body } alabel { a } blabel { b } { Hello, world } } ||7ct @Diag { //0.5c @Ellipse nodelabelformat { @Box @I @Body } alabel { a } blabel { b } { Hello, world } } } Links similarly have {@Code linklabelfont}, {@Code linklabelbreak}, and {@Code linklabelformat} options which affect all the link labels (except {@Code fromlabel} and {@Code tolabel}, since that would produce results that people do not expect.) The @Code "@Diag" symbol also has these options, in the usual way, and they are extremely useful there: @ID { @Code @Verbatim { @Diag nodelabelfont { Slope -2p } linklabelformat { "/"@Body"/" } hsize { 1.8c } { A:: @Ellipse alabel { a } { OK } @DP @DP B:: @Ellipse alabel { b } { FAULT } // @Arrow from { A } to { B } ylabel { sig } } } ||7ct @VContract @Diag nodelabelfont { Slope -2p } linklabelformat { "/"@Body"/" } hsize { 1.8c } { A:: @Ellipse alabel { a } { OK } @DP @DP B:: @Ellipse alabel { b } { FAULT } // @Arrow from { A } to { B } ylabel { sig } } } These settings specify that every node label will be set in italics, two points smaller than the surrounding text, and that every link label will appear between two @Code "/" characters, also two points smaller because the default value of @Code "linklabelfont" still applies. Of course, it remains open to any node or link to override these settings by supplying its own label options. @PP The remaining five label options, {@Code alabelpos}, {@Code alabelangle}, {@Code alabelprox}, {@Code alabelmargin}, {@Code alabelctr}, and {@Code alabeladjust}, affect the position of the label. Don't be daunted by the number of options. As previous examples have shown, they all have sensible default values and thus need to be set only rarely. @PP Each label inhabits its own characteristic region of the node or link: {@Code alabel} in the north-east corner of the node, {@Code ylabel} halfway along the link, and so on. This general location of the label is defined by the {@Code alabelpos} option. Here diagrams. @RawIndex { diagrams } diagrams.labelpos @SubIndex { @Code "labelpos" options } labelpos.diagrams @Index { @Code "labelpos" options (diagrams) } are the default values for all nine labels: @IL @LI { @Code @Verbatim { @Node alabelpos { NE } blabelpos { NW } clabelpos { SW } dlabelpos { SE } } ||7ct @VContract @Diag { //0.5f @ShowTags @Ellipse { 3c @Wide 2c @High } } } @LI { @Code @Verbatim { @Link fromlabelpos { FROM } xlabelpos { LFROM } ylabelpos { LMID } zlabelpos { LTO } tolabelpos { TO } } ||7ct @VContract @Diag { //1.0f 2c @Wide 2.2c @High // @ShowTags @Link from { 0,0.7 } to { 1,0 } # tolabel { @SolidArrowHead } } } @EL Thus, by changing @Code clabelpos to @Code S you can move the position of the @Code clabel label to beneath the node. You can do this for every node by setting this option in the @Code "@Diag" symbol, as was done for the formatting options above. @PP In a similar vein, there is an @Code { xindent } option which controls how diagrams. @RawIndex { diagrams } diagrams.xindent @SubIndex { @Code "xindent" option } xindent.diagrams @Index { @Code "xindent" option (diagrams) } far from the start of the link the @Code "LFROM" tag, and hence the {@Code xlabel}, will appear. A similar option, @Code { zindent }, determines diagrams. @RawIndex { diagrams } diagrams.zindent @SubIndex { @Code "zindent" option } zindent.diagrams @Index { @Code "zindent" option (diagrams) } how far from the end of the link the @Code "LTO" tag and hence the {@Code zlabel} will appear: @ID { @Code @Verbatim { @Link xindent { 1f } zindent { 2f } } ||7ct @VContract @Diag { //1f 2c @Wide 1.2c @High // @ShowTags @Link xindent { 1f } zindent { 2f } from { 0,0.7 } to { 1,0 } } } Both options have default value {@Code 0.8f}. @PP The @Code alabelangle option determines the angle at which the label is diagrams. @RawIndex { diagrams } diagrams.labelangle @SubIndex { @Code "labelangle" options } labelangle.diagrams @Index { @Code "labelangle" options (diagrams) } printed: @ID @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { "alabelangle { horizontal }" } B { Horizontal (the default) } @Rowa A { "alabelangle { aligned }" } B { Aligned with the node outline or link path } @Rowa A { "alabelangle { perpendicular }" } B { Perpendicular to the outline or link path } } The @Code "alabelprox" option determines where in the proximity of diagrams. @RawIndex { diagrams } diagrams.labelprox @SubIndex { @Code "labelprox" options } labelprox.diagrams @Index { @Code "labelprox" options (diagrams) } @Code alabelpos the label is printed: @ID @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { "alabelprox { above }" } B { Above the node outline or link path (the default for link labels) } @Rowa A { "alabelprox { below }" } B { Below the node outline or link path } @Rowa A { "alabelprox { left }" } B { To the left of the node outline or link path } @Rowa A { "alabelprox { right }" } B { To the right of the node outline or link path } @Rowa A { "alabelprox { inside }" } B { Inside the node outline or on the left of the link path going from @Code from to @Code to } @Rowa A { "alabelprox { outside }" } B { Outside the node outline or on the right of the link path going from @Code from to @Code to (the default for node labels) } } The {@Code alabelmargin} option adds a margin around all four sides of diagrams. @RawIndex { diagrams } diagrams.labelmargin @SubIndex { @Code "labelmargin" options } labelmargin. @RawIndex { @Code "labelmargin" options } labelmargin.in.diagrams @SubIndex { in diagrams } the label, thereby moving it away from {@Code alabelpos} irrespective of which direction it happens to lie in: @ID { @Code @Verbatim { @Ellipse alabel { a } alabelmargin { 0f } { Hello, world } } ||7ct @VContract @Diag { @Ellipse alabel { a } alabelmargin { 0f } { Hello, world } } } The default value is {@Code 0.2f}, and so there is scope for some reduction as well as increase. @PP @@Diag takes careful account of the @Code alabelangle option, the @Code alabelprox option, the direction that the node outline or link path is heading, and which label it is, and places the label in a way that looks good nearly always. When it doesn't, the remainder of this section should help. @PP The @Code alabelangle option may be given an arbitrary angle, and then the label will be printed at that angle. There are also the special values @Code parallel and {@Code antiparallel}, which give the direction that the node outline or link path is going at that point and its opposite. These are the default values for @Code tolabelangle and @Code fromlabelangle respectively, which explains why arrowheads point the right way. The @Code aligned value above is one of these two angles, the one closest to {@Code 0d}. @PP The @Code alabelprox option may be {@Code N}, {@Code S}, {@Code E}, {@Code W}, {@Code NE}, {@Code SE}, {@Code NW}, {@Code SW}, {@Code NNW}, {@Code NNE}, {@Code SSW}, {@Code SSE}, or {@Code CTR}: @CD @Diag { //1f @ShowTags @Box margin { 0.5c } { 24p @Font grey @Colour @I label } } meaning that the indicated point of the label will coincide with {@Code alabelpos}. These points lie on the outside of the margins added by {@Code alabelmargin}. @PP The six values of @Code alabelprox given earlier (@Code { above }, @Code { below }, etc.) all produce one of {@Code N}, {@Code S} etc. for their ultimate result; which one they produce depends on the direction the outline or link is going at that point. For example, @Code { above } produces @Code { SE } when the outline or link is going from northeast to southwest or vice versa, @Code { SW } when the outline or link is going from northwest to southeast and vice versa, and @Code { S } when it happens to be exactly horizontal. There is also a dependence on which label it is: for example, if it is @Code "xlabel" and the direction happens to be vertical, the result is {@Code "NW"}. @PP The preceding discussion is all under the assumption that the @Code "alabelctr" option is {@Code no}. When it is {@Code "yes"}, a small adjustment is made to the position of the label. The selected corner or side midpoint of the label will no longer coincide with {@Code alabelpos}, although it will still lie on the straight line passing through {@Code alabelpos} at the angle of {@Code alabelpos}. The corner or side midpoint slides up or down this line to the point which minimises the distance from {@Code alabelpos} to the centre of the label. Only @Code ylabelctr has @Code "yes" for its default value; the diagrams. @RawIndex { diagrams } diagrams.labelctr @SubIndex { @Code "labelctr" options } labelctr.diagrams @Index { @Code "labelctr" options (diagrams) } @Code y label often looks better centred when this adjustment is made, particularly on lines with shallow but non-zero slope: @CD @Tab @Fmta { @Col @CC A ! @Col ! @Col @CC B } { @Rowa A { @Code "ylabelctr { no }" } B { @Code "ylabelctr { yes }" } @Rowa @Rowa @Rowa A { @Diag ylabelctr { no } { A:: @Square //0.5c &3c B:: @Square // @Link from { A } to { B } ylabel { @I { ylabel } } } } B { @Diag ylabelctr { yes } { A:: @Square //0.5c &3c B:: @Square // @Link from { A } to { B } ylabel { @I { ylabel } } } } } since it is then the centre of the label which is centred on the link, rather than one of its corners. @PP Finally, when all else fails there is an {@Code alabeladjust} option diagrams. @RawIndex { diagrams } diagrams.labeladjust @SubIndex { @Code "labeladjust" options } labeladjust. @RawIndex { @Code "labeladjust" options } labeladjust.in.diagrams @SubIndex { in diagrams } which translates the label by an arbitrary amount: @ID @Code "alabeladjust { -0.5c 1.5c }" causes the label to appear 0.5 centimetres to the left of and 1.5 centimetres above the point where it otherwise would have done. @End @Section lout-3.39/doc/user/equ_defs0000644000076400007640000000340511363700677014326 0ustar jeffjeff@Section @Title { Defining new equation formatting symbols } @Begin @PP Whenever you type particular equations or parts of equations repeatedly, you can save time by using definitions. Definitions are the subject of Section {@NumberOf definitions}, so here we will just give a few examples equations. @RawIndex { equations } equations.definitions @SubIndex { definitions, use with } definitions. @RawIndex { definitions } definitions.use.with.equations @SubIndex { use with equations } of their use in equation formatting. @PP Suppose for example that @OneCol @Eq { p sub i ` log sub 2 ` p sub i } occurs frequently in your document. Then @ID @Code "def epi { p sub i ` log sub 2 ` p sub i }" makes the symbol @Code "epi" stand for the object between the braces: @ID { @Code "big sum from i=1 to n ` epi" |7ct @Eq { big sum from i=1 to n ` epi } } Parameters are very useful when parts of the symbol vary: @ID @OneRow @Code { "def ep" " right x" "{ p sub x ` log sub 2 ` p sub x" "}" } The parameter @Code x will be replaced by the object just to the right of {@Code "ep"}: @ID { @Code { "big sum from i=1 to k ` ep i +" "big sum from j=k+1 to n ep j" } ||7ct @Eq { big sum from i=1 to k ` ep i + big sum from j=k+1 to n ep j } } The precedence of the symbols you define will be 100 by default. @PP To make the symbols of @Code "@Eq" available within such definitions, each must be preceded by {@Code "import @Eq"}. As explained in Section {@NumberOf definitions}, the definitions go into a file called {@Code "mydefs"}, which might then look like this: @ID @OneRow @Code { "import @Eq" "def epi { p sub i ` log sub 2 ` p sub i }" "" "import @Eq" "def ep right x { p sub x ` log sub 2 ` p sub x }" } Use of @Code "epi" and @Code "ep" outside @Code "@Eq" will cause an error. @End @Section lout-3.39/doc/user/tbl_alig0000644000076400007640000000667511363700677014324 0ustar jeffjeff@Section @Title { Aligned columns } @Tag { tbl_alig } @Begin @PP Columns of numbers are often presented with decimal points aligned: tables. @RawIndex { tables } tables.aligned @SubIndex { aligned columns } aligned.columns @Index { aligned columns in tables } @CD @OneRow @Tbl marginvertical { 0.5vx } aformat { @Cell indent { align } A } { @Rowa A { 5^.46 } marginabove { 0i } @Rowa A { 3^.4159 } @Rowa A { 5772^ } marginbelow { 0i } } To produce this you need two steps. First, indicate that you want an aligned column, using @Code "indent { align }" on the relevant cell; and second, place a @Code "^" symbol, which is used generally throughout Lout for alignment, just before the alignment point in each entry: @ID @OneRow @Code @Verbatim { @Tbl marginvertical { 0.5vx } aformat { @Cell indent { align } A } { @Rowa A { 5^.46 } @Rowa A { 3^.4159 } @Rowa A { 5772^ } } } The equals signs of equations can be aligned in the same way. @PP Owing to problems behind the scenes, in a column in which one cell is labelled {@Code "indent { align }"}, all the other cells have to be so labelled, otherwise Lout make a mess of things. This is a problem when we want to get a heading over the top of an aligned column: if we follow the rule, the @I heading gets aligned, which is wrong. There is no ideal solution to this problem. @PP What most people want is for the heading to be centred in the column, and the aligned entries to be centred in the column as a block, but Lout cannot do this. One approximation is to make the heading cell a spanning cell (Section {@NumberOf tbl_span}) with centring, like this: @FootNote { Lout does not currently accept single-column tables with {@Code "@StartHSpan"}, so we've had to add an empty second column. } @ID @OneRow @Code @Verbatim { @Tbl marginvertical { 0.5vx } aformat { @StartHSpan @Cell indent { ctr } @B A | } bformat { @Cell indent { align } A | } { @Rowa A { Head } @Rowb A { 5^.46 } @Rowb A { 3^.4159 } @Rowb A { 5772^ } } } The spanning quarantines the centred cell, permitting @Code "indent { ctr }" to work: @CD @OneRow @Tbl marginvertical { 0.5vx } aformat { @StartHSpan @Cell indent { ctr } @B A | } bformat { @Cell indent { align } A | } { @Rowa A { Head } marginabove { 0i } @Rowb A { 5^.46 } @Rowb A { 3^.4159 } @Rowb A { 5772^ } marginbelow { 0i } } But if the heading cell is wider than the aligned cells, you get this: @CD @OneRow @Tbl marginvertical { 0.5vx } aformat { @StartHSpan @Cell indent { ctr } @B A | } bformat { @Cell indent { align } A | } { @Rowa A { A Wider Heading } marginabove { 0i } @Rowb A { 5^.46 } @Rowb A { 3^.4159 } @Rowb A { 5772^ } marginbelow { 0i } } In other words, this will centre a heading with respect to aligned entries, but it will not centre aligned entries with respect to a heading. In these cases you could forget about @Code "@StartHSpan" and treat the heading as an aligned entry, either by placing a @Code "^" within it or by using @ID @Code "@Cell 0.5w @HShift A" which places the alignment point in the centre of the entry: @CD @OneRow @Tbl indent { align } marginvertical { 0.5vx } aformat { @Cell 0.5w @HShift @B A } bformat { @Cell A } { @Rowa A { A Wider Heading } marginabove { 0i } @Rowb A { 5^.46 } @Rowb A { 3^.4159 } @Rowb A { 5772^ } marginbelow { 0i } } You can move the alignment point about by changing the 0.5 to something smaller or larger. Of course, all this is a poor substitute for the real thing. @End @Section lout-3.39/doc/user/bas_font0000644000076400007640000004241211363700677014327 0ustar jeffjeff@Section @Title { Fonts and font sizes } @Tag { fonts } @Begin @PP A @I font is a collection of characters that may be printed. For example, here is the Times Roman font: @ID @OneRow { Times Base } @Font 0.05c @Space { { @Char space } { @Char exclam } { @Char quotedbl } { @Char numbersign } { @Char dollar } { @Char percent } { @Char ampersand } { @Char quoteright } { @Char parenleft } { @Char parenright } { @Char asterisk } { @Char plus } { @Char comma } { @Char hyphen } { @Char period } { @Char slash } { @Char zero } { @Char one } { @Char two } { @Char three } { @Char four } { @Char five } { @Char six } { @Char seven } { @Char eight } { @Char nine } { @Char colon } { @Char semicolon } { @Char less } { @Char equal } { @Char greater } { @Char question } { @Char at } { @Char bracketleft } { @Char backslash } { @Char bracketright } { @Char asciicircum } { @Char underscore } { @Char quoteleft } //1vx { @Char A } { @Char B } { @Char C } { @Char D } { @Char E } { @Char F } { @Char G } { @Char H } { @Char I } { @Char J } { @Char K } { @Char L } { @Char M } { @Char N } { @Char O } { @Char P } { @Char Q } { @Char R } { @Char S } { @Char T } { @Char U } { @Char V } { @Char W } { @Char X } { @Char Y } { @Char Z } //1vx { @Char a } { @Char b } { @Char c } { @Char d } { @Char e } { @Char f } { @Char g } { @Char h } { @Char i } { @Char j } { @Char k } { @Char l } { @Char m } { @Char n } { @Char o } { @Char p } { @Char q } { @Char r } { @Char s } { @Char t } { @Char u } { @Char v } { @Char w } { @Char x } { @Char y } { @Char z } //1vx { @Char braceleft } { @Char bar } { @Char braceright } { @Char asciitilde } { @Char dotlessi } { @Char grave } { @Char acute } { @Char circumflex } { @Char tilde } { @Char macron } { @Char breve } { @Char dotaccent } { @Char dieresis } { @Char ring } { @Char cedilla } { @Char hungarumlaut } { @Char ogonek } { @Char caron } { @Char space } { @Char exclamdown } { @Char cent } { @Char sterling } { @Char currency } { @Char yen } { @Char brokenbar } { @Char section } { @Char dieresis } { @Char copyright } { @Char ordfeminine } { @Char guillemotleft } { @Char logicalnot } { @Char hyphen } { @Char registered } { @Char macron } { @Char degree } { @Char plusminus } { @Char twosuperior } { @Char threesuperior } { @Char acute } { @Char mu } { @Char paragraph } { @Char periodcentered } { @Char cedilla } { @Char onesuperior } { @Char ordmasculine } { @Char guillemotright } { @Char onequarter } { @Char onehalf } { @Char threequarters } { @Char questiondown } //1vx { @Char Agrave } { @Char Aacute } { @Char Acircumflex } { @Char Atilde } { @Char Adieresis } { @Char Aring } { @Char AE } { @Char Ccedilla } { @Char Egrave } { @Char Eacute } { @Char Ecircumflex } { @Char Edieresis } { @Char Igrave } { @Char Iacute } { @Char Icircumflex } { @Char Idieresis } { @Char Eth } { @Char Ntilde } { @Char Ograve } { @Char Oacute } { @Char Ocircumflex } { @Char Otilde } { @Char Odieresis } { @Char multiply } { @Char Oslash } { @Char Ugrave } { @Char Uacute } { @Char Ucircumflex } { @Char Udieresis } { @Char Yacute } { @Char Thorn } //1vx { @Char germandbls } { @Char agrave } { @Char aacute } { @Char acircumflex } { @Char atilde } { @Char adieresis } { @Char aring } { @Char ae } { @Char ccedilla } { @Char egrave } { @Char eacute } { @Char ecircumflex } { @Char edieresis } { @Char igrave } { @Char iacute } { @Char icircumflex } { @Char idieresis } { @Char eth } { @Char ntilde } { @Char ograve } { @Char oacute } { @Char ocircumflex } { @Char otilde } { @Char odieresis } { @Char divide } { @Char oslash } { @Char ugrave } { @Char uacute } { @Char ucircumflex } { @Char udieresis } { @Char yacute } { @Char thorn } { @Char ydieresis } } and here is the Times Italic font: @ID @OneRow { Times Slope } @Font 0.05c @Space { { @Char space } { @Char exclam } { @Char quotedbl } { @Char numbersign } { @Char dollar } { @Char percent } { @Char ampersand } { @Char quoteright } { @Char parenleft } { @Char parenright } { @Char asterisk } { @Char plus } { @Char comma } { @Char hyphen } { @Char period } { @Char slash } { @Char zero } { @Char one } { @Char two } { @Char three } { @Char four } { @Char five } { @Char six } { @Char seven } { @Char eight } { @Char nine } { @Char colon } { @Char semicolon } { @Char less } { @Char equal } { @Char greater } { @Char question } { @Char at } { @Char bracketleft } { @Char backslash } { @Char bracketright } { @Char asciicircum } { @Char underscore } { @Char quoteleft } //1vx { @Char A } { @Char B } { @Char C } { @Char D } { @Char E } { @Char F } { @Char G } { @Char H } { @Char I } { @Char J } { @Char K } { @Char L } { @Char M } { @Char N } { @Char O } { @Char P } { @Char Q } { @Char R } { @Char S } { @Char T } { @Char U } { @Char V } { @Char W } { @Char X } { @Char Y } { @Char Z } //1vx { @Char a } { @Char b } { @Char c } { @Char d } { @Char e } { @Char f } { @Char g } { @Char h } { @Char i } { @Char j } { @Char k } { @Char l } { @Char m } { @Char n } { @Char o } { @Char p } { @Char q } { @Char r } { @Char s } { @Char t } { @Char u } { @Char v } { @Char w } { @Char x } { @Char y } { @Char z } //1vx { @Char braceleft } { @Char bar } { @Char braceright } { @Char asciitilde } { @Char dotlessi } { @Char grave } { @Char acute } { @Char circumflex } { @Char tilde } { @Char macron } { @Char breve } { @Char dotaccent } { @Char dieresis } { @Char ring } { @Char cedilla } { @Char hungarumlaut } { @Char ogonek } { @Char caron } { @Char space } { @Char exclamdown } { @Char cent } { @Char sterling } { @Char currency } { @Char yen } { @Char brokenbar } { @Char section } { @Char dieresis } { @Char copyright } { @Char ordfeminine } { @Char guillemotleft } { @Char logicalnot } { @Char hyphen } { @Char registered } { @Char macron } { @Char degree } { @Char plusminus } { @Char twosuperior } { @Char threesuperior } { @Char acute } { @Char mu } { @Char paragraph } { @Char periodcentered } { @Char cedilla } { @Char onesuperior } { @Char ordmasculine } { @Char guillemotright } { @Char onequarter } { @Char onehalf } { @Char threequarters } { @Char questiondown } //1vx { @Char Agrave } { @Char Aacute } { @Char Acircumflex } { @Char Atilde } { @Char Adieresis } { @Char Aring } { @Char AE } { @Char Ccedilla } { @Char Egrave } { @Char Eacute } { @Char Ecircumflex } { @Char Edieresis } { @Char Igrave } { @Char Iacute } { @Char Icircumflex } { @Char Idieresis } { @Char Eth } { @Char Ntilde } { @Char Ograve } { @Char Oacute } { @Char Ocircumflex } { @Char Otilde } { @Char Odieresis } { @Char multiply } { @Char Oslash } { @Char Ugrave } { @Char Uacute } { @Char Ucircumflex } { @Char Udieresis } { @Char Yacute } { @Char Thorn } //1vx { @Char germandbls } { @Char agrave } { @Char aacute } { @Char acircumflex } { @Char atilde } { @Char adieresis } { @Char aring } { @Char ae } { @Char ccedilla } { @Char egrave } { @Char eacute } { @Char ecircumflex } { @Char edieresis } { @Char igrave } { @Char iacute } { @Char icircumflex } { @Char idieresis } { @Char eth } { @Char ntilde } { @Char ograve } { @Char oacute } { @Char ocircumflex } { @Char otilde } { @Char odieresis } { @Char divide } { @Char oslash } { @Char ugrave } { @Char uacute } { @Char ucircumflex } { @Char udieresis } { @Char yacute } { @Char thorn } { @Char ydieresis } } As their names imply, these two fonts belong to the @I { Times family }, a collection of fonts designed to go well together. Every font has a @I { family name }, such as Times, Helvetica, or Courier, and a family.name @Index { family name of font } face.name @Index { face name of font } @I { face name }, such as Roman or Italic. To find out how to get the unusual characters, see Section {@NumberOf characters}. @PP Documents look best when they use just one font family, so the most common need is to change to a different face within the current family. We have already seen {@Code "@I"}, which changes to the Italic face of the current family; there are six such symbols: b. @Index @Code "@B" i. @Index @Code "@I" bi. @Index @Code "@BI" ii. @Index @Code "@II" s. @Index @Code "@S" r. @Index @Code "@R" @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { "@B { Hello World }" } B { @B { Hello World } } @Rowa A { "@I { Hello World }" } B { @I { Hello World } } @Rowa A { "@BI { Hello World }" } B { @BI { Hello World } } @Rowa A { "@II { Hello World }" } B { @II { Hello World } } @Rowa A { "@S { Hello World }" } B { @S { Hello World } } @Rowa A { "@R { Hello World }" } B { @R { Hello World } } } The symbols' names stand for Bold, Italic, Bold-Italic, Italic-Italic (see below), Small capitals, and Roman. It is conventional to use Bold for headings; Italic for emphasis, terms being defined, and subsidiary headings; and Roman for the rest. Small capitals are not really a different font; they are small.caps @Index { small capitals } made on demand from the current font. So you can write, for example, @ID @Code "@I @S { Hello World }" and get @I @S { Hello World }. You can change the size of small capitals using the @Code "@Font" or @Code "@InitialFont" symbols, as described below. @PP The @Code "@R" symbol is almost unnecessary, since the document as a whole is set in a Roman face; but it is occasionally useful: @ID @Code "@I { An Italic sentence with one @R Roman word }" produces @ID @I { An Italic sentence with one @R Roman word } This illustrates the general principle that the effect of a font symbol on the following object is subject to font symbols within that object. @PP When part of a title is to be set in italic font, neither @Code "@I" nor @Code "@BI" is suitable because the part should appear in bold italics in the title itself, but in ordinary italics in running headers and the table of contents. The @Code "@II" symbol is the one for this situation: it produces bold italics when the current font is bold, and ordinary italics otherwise. @PP Changing families is a little more complicated. Here is the complete list of font families and their faces available with Basser Lout Version 3: @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col { ragged nohyphen } @Break @Code B } { @Rowa A { AvantGarde } B { Base Slope Bold BoldSlope BoldObl Book BookOblique CondBold CondBook CondDemi CondMedium Demi DemiOblique ExtraLight ExtraLightObl Medium MediumObl } @Rowa A { Bookman } B { Base Slope Bold BoldSlope BoldItalic Demi DemiItalic Light LightItalic Medium MediumItalic } @Rowa A { Chancery } B { Base Slope Bold BoldSlope Roman Bold Italic Light Demi LightItalic MediumItalic } @Rowa A { Courier } B { Base Slope Bold BoldSlope BoldOblique Oblique } @Rowa A { Helvetica } B { Base Slope Bold BoldSlope Black BlackOblique BoldOblique Compressed Cond CondBlack CondBlackObl CondBold CondBoldObl CondLight CondLightObl CondOblique ExtraCompressed Light LightOblique Narrow NarrowBold NarrowBoldObl NarrowObl Oblique UltraCompressed } @Rowa A { Schoolbook } B { Base Slope Bold BoldSlope BoldItalic Italic Roman } @Rowa A { Palatino } B { Base Slope Bold BoldSlope BoldItalic BoldItalicOsF BoldOsF Italic ItalicOsF Roman SC } @Rowa A { Symbol } B { Base Slope Bold BoldSlope } @Rowa A { Times } B { Base Slope Bold BoldSlope BoldItalic BoldItalicOsF BoldSC ExtraBold Italic ItalicOsF Roman RomanSC Semibold SemiboldItalic } @Rowa A { Dingbats } B { Base Slope Bold BoldSlope } } Lout understands all these fonts, but your printing device may not. Times, Helvetica, Courier, and Symbol at least seem to be ubiquitous, although not in every face. These fonts work only with languages that use the Latin1 character set; consult Section {@NumberOf languages} for more information about this. It is not difficult for a Lout expert to extend this list @Cite { $kingston1995lout.expert }. @PP It is a convention in Lout that every font family should at least base. @Index { @Code Base font } slope. @Index { @Code Slope font } bold. @Index { @Code Bold font } boldslope. @Index { @Code BoldSlope font } contain faces called @Code { Base }, @Code { Slope }, @Code { Bold }, and @Code { BoldSlope }, and these faces are what the @Code { "@R" }, @Code { "@I" }, @Code { "@B" }, and @Code { "@BI" } symbols give you. But this convention is something of a fiction for two reasons. First, some font families don't have faces that could reasonably be described as bold or whatever. In particular, the @Code Symbol family contains just one face, and all four conventional face names produce that face. Second, the four conventional face names are not names that typographers actually use, @Code { Bold } excepted. @Code { Slope } produces an italic face in some families and an oblique one in others. As the table shows, the true names are available if you want to use them, but it is very convenient to have a @Code { Slope } face that is guaranteed to exist no matter which family is used. @PP The @Code "@Font" symbol changes the font of the following object. For font.sym @Index { @Code "@Font" symbol } example, @ID @Code "{ Helvetica Slope } @Font { Hello World }" produces @ID { Helvetica Slope } @Font { Hello World } When changing to a different family, a face name must follow the family name; but when changing face within a family, just the face name is sufficient. @PP To make the characters larger or smaller, you need to change the font.size @Index { font size } @I { font size }, which can also be done with the @Code "@Font" symbol. Font sizes are traditionally measured in {@I points}: there are 72 points to one inch, and the most common font sizes are 12 point and 10 point. However, as Section {@NumberOf objects} explains in detail, any length including fractional lengths is acceptable: @ID @Code "24p @Font { Hello World }" changes to 24 point size, producing @ID 24p @Font { Hello World } It is also possible to specify a font size relative to the current size: @Code "+2p" means two points larger, @Code "-2p" means two points smaller, and @Code "1.5f" means 1.5 times the current font size. @PP If you switch font sizes in the middle of a line, as in @ID @Code "Here's a 20p @Font big word" you will discover one of Lout's obscure secrets: @ID { Here's a 20p @Font big word } Adjacent letters are aligned vertically through their middles, not through the baseline, causing this awkward alignment. This was done because it makes equation formatting easy, and examples like the above look poor anyway. However, if you want to do this and so require alignment through the baseline, you can get it, with the @Code baselinemark option to the @Code "@Font" symbol: @ID @Code "baselinemark @Font { Here's a 20p @Font big word }" which produces @ID @Code { baselinemark @Font { Here's a 20p @Font big word } } If you want it this way throughout your document, you can put @Code { baselinemark } in your initial font (see below). Lout's equation formatter contains the opposite option, which is @Code "xheight2mark @Font { ... }" (which aligns through a point half the height of an x character) so you won't disrupt equation formatting if you do this, although if you put an equation inside a paragraph, its axis will be aligned with the baseline of the adjacent words. @PP There is an @Code "@F" symbol which switches to a fixed width font family: @ID @Code "@F { Hello world }" produces the equivalent of @Code "{ Courier Base -1p } @Font ...", like this: @ID @F { Hello world } The @Code "-1p" is included to compensate for the relatively large appearance of the Courier font. @PP The document as a whole will be set in @Code { Times Base 12p }. To change this you need to change the @Code "@InitialFont" option, for initialfont. @Index @Code "@InitialFont" example to @ID @Code "@InitialFont { Helvetica Base 10p }" to get Helvetica 10 point. You must give all three parts in {@Code "@InitialFont"}: family, face, size. If you are using your own setup file, as explained in Section {@NumberOf setup}, you can find the @Code "@InitialFont" option there. If not, you can set it at the beginning of your document as explained in Section {@NumberOf ordinary}. @PP The @Code "@InitialFont" option is also a good place to set the size of small capitals if you don't like the default size that Lout gives you: @ID @Code "@InitialFont { Helvetica Base 10p setsmallcaps 0.9 }" In this example we're asking for small capitals to have size 0.9 times the height of ordinary capitals. The number following @Code "setsmallcaps" is a ratio, not a length, so it carries no unit of measurement. You can put @Code "setsmallcaps" in an ordinary @Code "@Font" symbol too, if you like. For example, @ID @Code "{ setsmallcaps 0.9 } @Font @S { Hello, world }" has result @ID { { setsmallcaps 0.9 } @Font @S { Hello, world } } However for consistency most people would use @Code "setsmallcaps" only in {@Code "@InitialFont"}, if at all. @PP There are two features that make fonts look better on the page. @I Ligatures are pairs of letters run together; the most ligatures. @Index { ligatures } common ligatures are `fi' and `fl.' @I Kerning is moving adjacent kerning. @Index { kerning } letters closer together, for example in `VA.' Lout considers ligatures and kerning to be integral parts of each font; you can prevent them from happening only by enclosing one of the letters in a @Code "@OneCol" symbol, as in {@Code "@OneCol { V }A" }. Alternatively, to turn off ligatures you can write @ID @Code "nolig @Font { ... }" and then ligatures will not be used within the object following {@Code "@Font"}. Should you ever need to turn ligatures on within a region where they are turned off, use {@Code "lig @Font"}. @End @Section lout-3.39/doc/user/bas_unde0000644000076400007640000000420711363700677014314 0ustar jeffjeff@Section @Title { Underlining } @Tag { underlining } @Begin @PP The @Code "@Underline" symbol underlines the following object: underline.sym @Index @Code "@Underline" @ID @OneRow @Code { "This little paragraph of text will have" "@Underline { three underlined words } in it." } produces @ID @OneRow 1.6i @Wide { This little paragraph of text will have @Underline { three underlined words } in it. } The underlining is continuous unless a line break intervenes. You can't use this symbol to underline an arbitrary object: it is carefully designed to produce high-quality underlining of single words and parts of paragraphs, and it works only for those objects. @PP Each font contains information about how words in that font should be underlined: how far below the baseline the line should be drawn, and how thick. The @Code "@Underline" symbol uses this information; the font it bases its underlining on is the font of the first object underlined if it is a word, or else the font of the enclosing paragraph. @PP The underline produced by @Code "@Underline" will have the same colour as whatever is being underlined. If you want a different colour, you need the @Code "@ColouredUnderline" or equivalently @Code "@ColoredUnderline" symbol, which takes a colour on the left as well as the thing to be underlined on the right: @ID @OneRow @Code { "This little paragraph of text will have" "blue @ColouredUnderline { three underlined words } in it." } produces @ID @OneRow 1.6i @Wide { This little paragraph of text will have blue @ColouredUnderline { three underlined words } in it. } The colours available are as for the @Code "@Colour" symbol from Section {@NumberOf colour}. @PP There is no way to set a default value for the colour of a coloured underline, but you can make it easy to get an underline of a specific colour, by placing a definition at the start of your document, like this: @ID @OneRow @Code @Verbatim { import @BasicSetup def @MustCheck right x { blue @ColouredUnderline x } } This allows you to type @Code "@MustCheck" instead of {@Code "blue @ColouredUnderline"}. Definitions are explained in general in Section {@NumberOf definitions}. @End @Section lout-3.39/doc/user/tbl_mark0000644000076400007640000000431311363700677014325 0ustar jeffjeff@Section @Title { Vertical alignment of tables } @Tag { tbl_mark } @Begin @PP Occasionally the vertical alignment of a table with objects to its left tables. @RawIndex { tables } tables.vertical.alignment @SubIndex { vertical alignment of } vertical.alignment @Index { vertical alignment of tables } and right becomes an issue. Examples are hard to find, but let's say that we need to construct a symbol @ID @AmberLight and include it in running text. The obvious first attempt at a table with three rows is @ID -1px @Break @OneRow @Code @Verbatim { @Tbl aformat { @Cell A } margin { 0i } strut { no } { @Rowa A { @OpenCircle } @Rowa A { @ClosedCircle } @Rowa A { @OpenCircle } } } where @Code "@OpenCircle" and @Code "@ClosedCircle" produce open and closed circles (they may be defined using the @Code "@Diag" package); but this produces @Tbl aformat { @Cell A } margin { 0i } strut { no } { @Rowa A { @OpenCircle } @Rowa A { @ClosedCircle } @Rowa A { @OpenCircle } } in running text, because vertical alignment is by default through the top boundary of the table. To make the alignment pass through one of the rows, replace its @Code "@Row" symbol by a corresponding tables. @RawIndex { tables } tables.markrow @SubIndex { @Code "@MarkRow" symbols } thing.tables @Index { @Code "@MarkRow" symbols (tables) } @Code "@MarkRow" symbol. Here is the revised table, enclosed in a definition for ease of use: amberlight @Index { @Code "@AmberLight" symbol } @ID -1px @Break @OneRow @Code @Verbatim { import @TblSetup def @AmberLight { @OneRow @Tbl aformat { @Cell indentvertical { align } A } margin { 0i } strut { no } paint { no } rule { no } { @Rowa A { @OpenCircle } @MarkRowa A { @ClosedCircle } @Rowa A { @OpenCircle } } } } Now when we write @ID @Code "produces @AmberLight in running text" we find that this definition produces @AmberLight in running text, as desired. We have enclosed the table in @Code "@OneRow" to ensure that its rows will never become separated, and added some options just in case the definition is ever used with a setup file (Section {@NumberOf tbl_setu}) that has default painting or rules. @End @Section lout-3.39/doc/user/equ_disp0000644000076400007640000001351411363700677014346 0ustar jeffjeff@Section @Title { Displaying equations } @Tag { mathdisplays } @Begin @PP The result of the @Code "@Eq" symbol is an object which, according to the displayed.equations @Index { displayed equations } golden rule (Section {@NumberOf objects}), may appear anywhere: inside a paragraph, inside a table, and so on. In particular, equations are often displayed using the @Code "@CentredDisplay" or @Code "@IndentedDisplay" symbols from Section {@NumberOf displays}: @ID @Code "@IndentedDisplay @Eq { ... }" Now displayed equations are often numbered, and often aligned with one another on their equals signs. For this there are special display symbols which are the the subject of this section. These symbols can align and number any display at all, but since in practice they seem to be used only with equations, we discuss them here rather than in Section {@NumberOf displays} where they really belong. @PP Let's begin by looking at a first example of a numbered display: aligned.displays @Index { aligned displays } aligned.equations @Index { aligned equations } numbered.displays @Index { numbered displays } numbered.equations @Index { numbered equations } @BeginAlignedDisplays @CentredAlignedNumberedDisplay @Tag { fibeq } @Eq { F sub n ^= F sub {n-1} + F sub {n-2} } After the display we might have some more text for a while, and then we might want a second display, aligned on its equals sign with the first, and also numbered in sequence with it: @CentredAlignedNumberedDisplay @Eq { F sub n - F sub {n-1} ^= F sub {n-2} } @EndAlignedDisplays Notice that the two displays are centred as a block as well as aligned. Altogether there are four ways in which displays vary: @BL @LI { A display can be raw or not raw (see below); } @LI { It can be a {@Code "@Display"}, {@Code "@LeftDisplay"}, {@Code "@IndentedDisplay"}, {@Code "@QuotedDisplay"}, {@Code "@CentredDisplay"}, {@Code "@CenteredDisplay"}, or {@Code "@RightDisplay"}; } @LI { It can be aligned or not aligned; } @LI { It can be numbered or not numbered. } @EL All possible combinations are allowed. The display that has everything is called @ID @Code "@RawCentredAlignedNumberedDisplay" By leaving out some or all of {@Code Raw}, {@Code Aligned}, and {@Code Numbered}, and by changing or leaving out {@Code Centred}, we get all these combinations. The two displays numbereddisplay. @Index @Code "@NumberedDisplay" aligneddisplay. @Index @Code "@AlignedDisplay" given earlier were made like this: @ID @OneRow @Code { "... a first example of a numbered display:" "@BeginAlignedDisplays" "@CentredAlignedNumberedDisplay" " @Tag { fibeq }" "@Eq { F sub n ^= F sub { n-1 } + F sub { n-2 } }" "After the display we might ... numbered in sequence with it:" "@CentredAlignedNumberedDisplay @Eq { F sub n - F sub { n-1 } ^= F sub { n-2 } }" "@EndAlignedDisplays" "Notice that the two displays are centred ..." } All numbered displays have an optional @Code "@Tag" option which is used for cross referencing (see Section {@NumberOf cross}). Alignment and numbering work quite independently; they don't have to start or end together, and there can be non-aligned and non-numbered displays among the others. @PP When aligned displays are used, it is necessary to indicate where the aligned group begins and ends, by placing @Code "@BeginAlignedDisplays" beginaligneddisplays @Index @Code "@BeginAlignedDisplays" endaligneddisplays @Index @Code "@EndAlignedDisplays" just before the first, and @Code "@EndAlignedDisplays" just after the last. The alignment points are indicated by preceding them by the symbol {@Code "^"}, so you aren't restricted to aligning at equals signs. @Code "@BeginAlignedDisplays" and @Code "@EndAlignedDisplays" cannot span across several sections or subsections: the equations aligned by them must lie within a single large-scale structure symbol. @PP In our example of aligned and numbered displays, the two displays were separated by some ordinary text. Very often, though, aligned displays follow directly after each other. This is a problem, because if you have one display directly following another there will be too much vertical space between them. This problem was mentioned in Section {@NumberOf displays}, and the recommended solution was to use a list. However, there are no aligned or numbered (in this sense) lists. @PP Fortunately, each display symbol has a `raw' version, which means that no space is inserted above or below the display. Instead, raw.displays @Index { raw displays } you must insert it yourself using paragraph symbols: @ID @OneRow @Code @Verbatim { preceding text @DP @RawAlignedDisplay @Eq { ... } @DP @RawAlignedNumberedDisplay @Eq { ... } @DP following text } You get the right spacing by placing {@Code "@DP"} symbols before, between, and after each display; and you get to use the specialized displays that you need. Raw and non-raw displays may be numbered and aligned together. @PP Numbered displays are numbered automatically. Depending on where in the document they appear, the number might include a chapter number or section number, etc. This is controlled by options in the setup file; for example, setting @Code "@ChapterNumInDisplays" to @Code Yes ensures that numbered displays will be numbered afresh at the beginning of each chapter, and that the number will include a chapter number. There is also a @Code "@DisplayNumStyle" option which controls the style of displays; the default value, {@Code "(num)"}, encloses the number in parentheses as is conventional when numbering equations. @PP Every display symbol has an abbreviated form consisting of @Code "@" followed by its capital letters only. For example, @Code "@BeginAlignedDisplays" may be abbreviated to {@Code "@BAD"}, and the display that has everything to {@Code "@RCAND"}. Owing to an unfortunate clash between the initial letters of `raw' and `right', @Code "@RightDisplay" and the other right displays have no abbreviations. @End @Section lout-3.39/doc/user/bas_lang0000644000076400007640000001174311363700677014305 0ustar jeffjeff@Section @Title { Languages other than English } @Tag { languages } @Begin @PP When part of a document is written in a language other than English, languages. @Index { languages other than English } Lout should be informed of this using the @Code "@Language" symbol: language. @Index @Code "@Language" @ID @OneRow @Code { "... the garter, he said: French @Language { `Honi soit qui mal y" "pense' }, and this saying ..." } Changing language is quite analogous to changing font using the @Code "@Font" symbol. @PP At the time of writing, the following languages were available: @CD @OneRow @Tbl aformat { @Cell ml { 0i } @Code A | @Cell mr { 0i } @Code B } mv { 0.5vx } { @Rowa A { Croatian Hrvatski } B { Italian Italiano it } @Rowa A { Czech Cesky Cestina cs } B { Norwegian Norsk no } @Rowa A { Danish Dansk da } B { Polish Polski pl } @Rowa A { Dutch Nederlands nl } B { Portuguese Português pt } @Rowa A { English en } B { Programming } @Rowa A { EnglishUK en-GB } B { Russian ru } @Rowa A { Esperanto eo } B { Slovak Slovensky Slovencina } @Rowa A { Finnish Suomi fi } B { Slovenian Slovenia Slovenija sl } @Rowa A { French Francais Fran{@Char ccedilla}ais fr } B { Spanish Espa{@Char ntilde}ol es } @Rowa A { German Deutsch de } B { Swedish Svenska sv } @Rowa A { Hungarian Magyar hu } B { UpperSorbian hornjoserbsce serbsce } } File @Code "include/langdefs" in the distribution always has the exact list of known languages. As shown, most languages have alternative names, all equally acceptable to the @Code "@Language" symbol. @Code "EnglishUK" differs from @Code "English" only by applying hyphenation rules said to be more appropriate for British English; @Code "Programming" is for programming languages and is used by the symbols of Chapter {@NumberOf cprint}. @PP Since accented characters (Section {@NumberOf characters}) are always available irrespective of the language, at first sight it might seem that there is no need to bother informing Lout what language you are writing in. However, words are hyphenated differently depending on the hyphenation.languages @SubIndex { in languages other than English } language, and some symbols have different results in different languages. For example, @ID @Code "Danish @Language @Date" produces @ID { Danish @Language @Date } date.languages @SubIndex { in languages other than English } time.languages @SubIndex { in languages other than English } lists.languages @SubIndex { in languages other than English } and the alphabetic list symbols of Section {@NumberOf lists} also vary with the current language. So it's worth doing for the sake of knowing that non-English parts will appear as they should. @PP If your entire document is in a language other than English, you need to change the @Code "@InitialLanguage" option: initiallanguage. @Index @Code "@InitialLanguage" @ID @Code "@InitialLanguage { Deutsch }" If you are using your own setup file (Section {@NumberOf setup}), you can change it there. If not, you can change it at the start of your document, as explained in Section {@NumberOf ordinary}. @PP Czech, Polish, and Slovenian (at least) use the Latin2 character set, and users of these languages have to place @ID @Code "@SysInclude { latin2 }" at the start of their documents in order to get access to the Latin2 versions of the fonts. @FootNote { Prior to Version 3.21 of Lout, some accented characters were missing from these Latin2 fonts, but this deficiency has now been corrected by getting Lout to generate output for these characters which prints their base letter and accent separately. } These have family names such as TimesCE, CourierCE, HelveticaCE, and so on (CE standing for Central European), to distinguish them from the same fonts encoded in Latin1. The face names are unchanged. A typical Latin2 document would therefore start off like this: @ID @OneRow @Code { "@SysInclude { latin2 }" "@SysInclude { doc }" "@Document" " @InitialLanguage { Polish }" " @InitialFont { TimesCE Base 12p }" "//" } Depending on the document type there may be a few other font-setting options in the setup file that need to be changed; in fact, it might be best to produce your own setup file in this case, replacing {@Code "doc"}, with the changed options in it. See Section {@NumberOf setup} for how to do this. You could even start your setup file off with @Code "@SysInclude { latin2 }" to avoid the trouble of typing it at the top of every document. Consult database file @Code "latin2.ld" in the standard database directory for a complete list of Latin2 fonts. @PP Russian uses Cyrillic characters. In principle, users of Russian have to place @ID @Code "@SysInclude { russian }" at the very start of their documents in order to get access to Cyrillic fonts. However no such fonts are distributed with the current version of Lout, so this line does nothing at present. Other left-to-right languages are easily added, so consult the author if your language is not listed. @End @Section lout-3.39/doc/user/vref0000755000076400007640000000013511363700677013475 0ustar jeffjeffgvim ref gvim ref_sett gvim ref_cite gvim ref_labe gvim ref_entr gvim ref_chan gvim ref_crea lout-3.39/doc/user/equ_symb0000644000076400007640000003320311363700677014356 0ustar jeffjeff@Section @Title { Symbols } @Tag { symbols } @Begin @PP @Code "@Eq" prints characters in the fonts appropriate for mathematics: @ID { @Code "x - 2" |7ct @Eq { x-2 } } Here @Eq { x } is in Italic, @Eq { 2 } is in Roman, and @Eq { minus } is from the Symbol font. The character @Code "-" is a @I symbol which stands for @Eq {minus}, and @Code "2" is also a symbol, standing for @Eq { 2 }. @Code "@Eq" includes a vast number of symbols: @ID { @Code "Omega delta int partial club" |7ct @Eq { Omega delta int partial club } } The summary at the end of this chapter has the complete list. @PP Symbols whose names are made from letters should be separated from each other by at least one space or end of line, as was done above, or else @Code "@Eq" will become confused: @ID { @Code "Omegadelta" |7ct @Eq { Omegadelta } } Symbols whose names are made from digits and punctuation characters can, however, be run together with each other and with symbols made from letters: @ID { @Code "Omega-delta<=2" |7ct @Eq { Omega-delta<=2 } } This rule applies throughout Lout (Section {@NumberOf spaces}). @PP Some symbols join objects together in mathematical ways: @ID { @Code "x sub 2" |7ct @Eq { x sub 2 } } Here the @Code "sub" symbol has taken the object just to its left, and equations. @RawIndex { equations } equations.sub @SubIndex { @Code "sub" symbol } sub.sym.equations @Index { @Code "sub" symbol (equations) } the object just to its right, and joined them into one object in the form of a subscript. The two objects are called the left and right parameters of {@Code "sub"}, and they may be arbitrary Lout objects. @PP Other symbols of a similar kind include {@Code "sup"} for equations. @RawIndex { equations } equations.sup @SubIndex { @Code "sup" symbol } sup.equations @Index { @Code "sup" symbol (equations) } superscripting, @Code "over" for built-up fractions, and @Code "from" equations. @RawIndex { equations } equations.over @SubIndex { @Code "over" symbol } over.equations @Index { @Code "over" symbol (equations) } equations. @RawIndex { equations } equations.from @SubIndex { @Code "from" symbol } from.equations @Index { @Code "from" symbol (equations) } equations. @RawIndex { equations } equations.to @SubIndex { @Code "to" symbol } to.equations @Index { @Code "to" symbol (equations) } and @Code "to" for the lower and upper limits of sums, products, etc. These symbols may be used together to produce complicated equations very easily: @ID { @Code { "big sum from i=0 to n r sup i" "= {r sup n+1 - 1} over r-1" } ||7ct @Eq { big sum from i=0 to n r sup i = {r sup n+1 - 1} over r-1 } } Here @Code "sum" is just the @Eq { summation } symbol; @Code "from" and @Code "to" do all the work of placing the limits. They are quite independent, so either or both may be omitted. To get a superscript directly over a subscript, use the @Code "supp" and @Code "on" symbols: equations. @RawIndex { equations } equations.supp @SubIndex { @Code "supp" symbol } supp.equations @Index { @Code "supp" symbol (equations) } equations. @RawIndex { equations } equations.on @SubIndex { @Code "on" symbol } on.equations @Index { @Code "on" symbol (equations) } @ID { @Code "A supp b on a" |7ct @Eq { A supp b on a } } These two symbols should always be used together as shown. @PP Sometimes a subscript appears to be too far to the right, owing to the slope of italic letters: in @Eq { W sub n }, for example. You can fix this by using `tucked' subscripts, like this: @IndentedList @LI { @Code "W tsub n" |7ct @Eq { W tsub n } } @LI { @Code "W supp b ton a" |7ct @Eq { W supp b ton a } } @EndList The @Code "tsub" and @Code "ton" symbols are exactly like @Code "sub" equations. @RawIndex { equations } equations.tsub @SubIndex { @Code "tsub" symbol } tsub.equations @Index { @Code "tsub" symbol (equations) } equations. @RawIndex { equations } equations.ton @SubIndex { @Code "ton" symbol } ton.equations @Index { @Code "ton" symbol (equations) } and @Code "on" except for this tucking-in effect. However, the @Code "sub" symbol itself does a certain amount of tucking in; the amount is determined by kerning information in the font files and so is sensitive to the shape of the letters. @PP As usual in Lout, braces are used to group something into an indivisible object. Leaving them out creates ambiguities: @ID @Code "a sup b over c" There are two possible interpretations for this: @IndentedList @LI { @Code "{a sup b} over c" |7ct @Eq { {a sup b} over c } } @LI { @Code "a sup {b over c}" |7ct @Eq { a sup {b over c} } } @EndList @Code "@Eq" chooses between them in the following way. Every symbol that takes a parameter also has a {@I precedence}, which is a number. For equations. @RawIndex { equations } equations.precedence @SubIndex { precedence of symbols } precedence.equations @Index { precedence of symbols in equations } example, @Code "sup" has precedence 60 and @Code "over" has precedence 54. The symbol with the highest precedence wins the object lying between them, so in the above case the first interpretation is chosen. If two symbols of equal precedence compete for an object, the association is towards the left: @ID { @Code "a sup b sub 2" |7ct @Eq { a sup b sub 2 } } In this case it is more probable that the following right association was actually wanted: @ID { @Code "a sup { b sub 2 }" |7ct @Eq { a sup { b sub 2 } } } When in doubt, use braces to make the grouping clear. @PP White space between two objects is considered to be a symbol with precedence 7, which is lower than the precedence of any @Code "@Eq" symbol; but if the two objects are immediately adjacent and neither is enclosed in braces the precedence is 102, which is higher than the precedence of any @Code "@Eq" symbol. Compare these three examples: @IL @LI { @Code "big sum from i=0 to n" |7ct @Eq { big sum from i=0 to n } } @LI { @Code "big sum from {i = 0} to n" |7ct @Eq { big sum from {i = 0} to n } } @LI { @Code "big sum from i = 0 to n" |7ct @Eq { big sum from i = 0 to n } } @EL and you will see that some care is needed on this point. Braces can always be used to override precedence and associativity, and when in doubt the easiest course is to insert them. Although Lout allows symbols to associate towards the left or right, @Code "@Eq" chooses to have only left associative symbols. The summary at the end of this chapter gives the precedence of every symbol. @PP The @Code matrix symbol {@PageMark matrix} builds an array of objects: equations. @RawIndex { equations } equations.matrix @SubIndex { @Code "matrix" symbol } matrix.equations @Index { @Code "matrix" symbol (equations) } @ID { @Code @Verbatim { matrix atleft { blpar } atright { brpar } { row col x sup 2 col y sup 2 col z sup 2 row col x col y col z row col 1 col 1 col 1 } } ||9ct @Eq { matrix atleft { blpar } atright { brpar } { row col x sup 2 col y sup 2 col z sup 2 row col x col y col z row col 1 col 1 col 1 } } } The @Code atleft and @Code atright options place vertically scaled equations. @RawIndex { equations } equations.atleft @SubIndex { @Code "atleft" option } atleft.equations @Index { @Code "atleft" option (equations) } equations. @RawIndex { equations } equations.atright @SubIndex { @Code "atright" option } atright.equations @Index { @Code "atright" option (equations) } versions of their values at each side; if either is omitted the value is taken to be an empty object of zero width by default. Although we have used @Code blpar and @Code brpar here, since the options are vertically scaled to the correct size some people prefer simply @ID @OneRow @Code @Verbatim { matrix atleft { ( } atright { ) } } The right parameter of @Code matrix is the array itself. It must be enclosed in braces, and it is a sequence of rows introduced by equations. @RawIndex { equations } equations.row @SubIndex { @Code "row" symbol } row.equations @Index { @Code "row" symbol (equations) } equations. @RawIndex { equations } equations.col @SubIndex { @Code "col" symbol } col.equations @Index { @Code "col" symbol (equations) } @Code row symbols; each row is a sequence of objects introduced by @Code col symbols. @FootNote { Older versions of Lout use different symbols, {@Code "above"} and {@Code "nextcol"}, at this point. For backward compatibility these symbols are still available, but they are obsolete and no longer documented. } The @Code row and @Code col symbols have low precedence, but not as low as white space between two objects. Therefore, unless the entries in the array are very simple, it is safest to enclose each of them in braces. @PP Entries built with the @Code col symbol have their objects centred in the column. Also available are @Code lcol for left-justified entries, equations. @RawIndex { equations } equations.lcol @SubIndex { @Code "lcol" symbol } lcol.equations @Index { @Code "lcol" symbol (equations) } @Code ccol meaning the same as {@Code col}, @Code rcol for equations. @RawIndex { equations } equations.ccol @SubIndex { @Code "ccol" symbol } ccol.equations @Index { @Code "ccol" symbol (equations) } equations. @RawIndex { equations } equations.rcol @SubIndex { @Code "rcol" symbol } rcol.equations @Index { @Code "rcol" symbol (equations) } right-justified entries, and @Code mcol for alignment along column equations. @RawIndex { equations } equations.mcol @SubIndex { @Code "mcol" symbol } mcol.equations @Index { @Code "mcol" symbol (equations) } marks. Each column may contain entries of different kinds, except that @Code mcol does not work well with any other sort. @PP When several matrices appear side by side, slight differences in height can cause an unsightly appearance: @ID @Eq { matrix atleft { ( } atright { ) } { row col a sub 11 col a sub 12 row col a sub 21 col a sub 22 } matrix atleft { ( } atright { ) } { row col b sub 11 col b sub 12 row col b sub 21 col b sub 22 } = matrix atleft { ( } atright { ) } { row col c sub 11 col c sub 12 row col c sub 21 col c sub 22 } } To assist in resolving this problem, the @Code "matrix" symbol has a @Code "strut" option, which causes a strut to be inserted into equations. @RawIndex { equations } equations.strut @SubIndex { @Code "strut" option } strut.option. @RawIndex { @Code "strut" option } strut.option.in.equations @SubIndex { in equations } every row, guaranteeing that every row has height at least equal to the height of the strut. By using @ID @Code { "matrix" " strut { Yes }" "..." } in each of the three matrices above, the result is improved to @ID @Eq { matrix atleft { ( } atright { ) } strut { Yes } { row col a sub 11 col a sub 12 row col a sub 21 col a sub 22 } matrix atleft { ( } atright { ) } strut { Yes } { row col b sub 11 col b sub 12 row col b sub 21 col b sub 22 } = matrix atleft { ( } atright { ) } strut { Yes } { row col c sub 11 col c sub 12 row col c sub 21 col c sub 22 } } By default, the strut has height @Code "0.5f" (half the current font size) both above and below the axis of the row. This can be changed by giving any length as the value of the @Code "strut" option: @Code "strut { 2.0c }" for two centimetres above and below the axis, and so on. @PP Some symbols have been added which produce `matrices' with commonly needed @Code atleft and @Code atright options already set for you. Here are these symbols, on the left, with the equivalent @Code matrix symbol and, on the right, the result produced: @ID @Tab @Fmta { @Col @Code A ! @Col ! @Col @Code B ! @Col ! @Col C } { @Rowa A { "pmatrix" } B { "matrix atleft { ( } atright { ) } { M }" } C { @Eq { pmatrix { M } } equations. @RawIndex { equations } equations.pmatrix @SubIndex { @Code "pmatrix" symbol } pmatrix.equations @Index { @Code "pmatrix" symbol (equations) } } @Rowa A { "bmatrix" } B { "matrix atleft { blbrack } atright { brbrack } { M }" } C { @Eq { bmatrix { M } } equations. @RawIndex { equations } equations.bmatrix @SubIndex { @Code "bmatrix" symbol } bmatrix.equations @Index { @Code "bmatrix" symbol (equations) } } @Rowa A { "brmatrix" } B { "matrix atleft { blbrace } atright { brbrace } { M }" } C { @Eq { brmatrix { M } } equations. @RawIndex { equations } equations.brmatrix @SubIndex { @Code "brmatrix" symbol } brmatrix.equations @Index { @Code "brmatrix" symbol (equations) } } @Rowa A { "fmatrix" } B { "matrix atleft { blfloor } atright { brfloor } { M }" } C { @Eq { fmatrix { M } } equations. @RawIndex { equations } equations.fmatrix @SubIndex { @Code "fmatrix" symbol } fmatrix.equations @Index { @Code "fmatrix" symbol (equations) } } @Rowa A { "cmatrix" } B { "matrix atleft { blceil } atright { brceil } { M }" } C { @Eq { cmatrix { M } } equations. @RawIndex { equations } equations.cmatrix @SubIndex { @Code "cmatrix" symbol } cmatrix.equations @Index { @Code "cmatrix" symbol (equations) } } @Rowa A { "amatrix" } B { "matrix atleft { blangle } atright { brangle } { M }" } C { @Eq { amatrix { M } } equations. @RawIndex { equations } equations.amatrix @SubIndex { @Code "amatrix" symbol } amatrix.equations @Index { @Code "amatrix" symbol (equations) } } } For example: @ID { @Code { "fmatrix { (n+1) over 2 }" } |7ct @Eq { fmatrix { (n+1) over 2 } } } As this example shows, these symbols are very useful for getting large scaled delimiters around things that aren't necessarily matrices at all. @PP Each of the @Code "@Eq" symbols that takes parameters also has a @Code gap equations. @RawIndex { equations } equations.gap @SubIndex { @Code "gap" option } gap.equations @Index { @Code "gap" option (equations) } option, which controls the amount of space inserted by the symbol: @IL @LI { @Code "x over y" |7ct @Eq { x over y } } @LI { 6c @Wide @Code "x over gap { 3p } y" |7ct @Eq { x over gap { 3p } y } } @EL @Code "@Eq" usually gets the spacing right without help. @End @Section lout-3.39/doc/user/dia0000644000076400007640000000340611363700677013271 0ustar jeffjeff@Chapter @Title { Diagrams } @Tag { diagrams } @Begin @LP This chapter describes how to use the @@Diag symbol diagrams. @RawIndex { diagrams } diag.diagrams @Index { @Code "@Diag" (diagrams) } @FootNote { Starting with Version 3.18 of Lout, the @@Diag symbol was enhanced with the {@Code "@ANode"}, {@Code "@BNode"}, and {@Code "@CNode"} symbols described in Section {@NumberOf dia_node}, and with the symbols for syntax diagrams described in Section {@NumberOf dia_synt}. #These #enhancements are upwardly compatible, unless the user has defined #symbols with these same names and used them within diagrams. @LP Prior to Version 3.09 of Lout, this chapter described a symbol called fig. @Index @Code "@Fig" {@Code "@Fig"} which was similar to but more primitive than {@Code "@Diag"}. For backward compatibility the @Code "@Fig" symbol is still available and still works exactly as described in the old documentation, but there is no reason to use it in new documents. } to make diagrams like this one: diag. @Index @Code "@Diag" @CD @Diag margin { 0.2c } { -2p @Font { A:: @Ellipse { 25, 39 } /0.3c |0.2c B:: @Ellipse { 43 } |0.1c |0.8c E:: @Box outlinestyle {noline} {Problem node} /0.3c C:: @Ellipse { 40, 41 } | | D:: @Ellipse paint { lightgrey } {44, 45, 46} } // @Link from { A } to { B } // @Link from { B } to { C } // @Link from { B } to { D } // @Arrow from { E } to { D } } @@Diag offers nodes and links, arrows, labels, coordinates, tree diagrams, and syntax diagrams. @BeginSections @Include { dia_intr } @Include { dia_node } @Include { dia_link } @Include { dia_tags } @Include { dia_labe } @Include { dia_posi } @Include { dia_tree } @Include { dia_synt } @Include { dia_erro } @Include { dia_defi } @Include { dia_geom } @Include { dia_summ } @EndSections @End @Chapter lout-3.39/doc/user/bgr0000644000076400007640000000133411363700677013304 0ustar jeffjeff@Chapter @Title { Basic Graphics } @Tag { graphics } @Begin @LP This chapter introduces some basic graphics symbols for colour, texture, graphics. @Index { graphics (basic) } graphics.see @RawSubIndex { @I { see also } diagrams, graphs, pie graphs } rotation, scaling, and included illustrations. These are all from the standard BasicLayout package, so no @Code "@SysInclude" line is needed to get them beyond the usual @Code "@SysInclude { doc }" or whatever. @BeginSections @Include { bgr_colo } @Include { bgr_text } @Include { bgr_boxs } @Include { bgr_outl } @Include { bgr_rota } @Include { bgr_scal } @Include { bgr_clip } @Include { bgr_mirr } @Include { bgr_incl } @Include { bgr_prec } @EndSections @End @Chapter lout-3.39/doc/user/bas0000644000076400007640000000150011363700677013272 0ustar jeffjeff@Chapter @Title { The Basics } @Tag { basics } @Begin @LP The Lout document formatting system has been designed with the needs of the ordinary user very much in mind. Although the features of Lout are virtually endless, and include mathematical equations, diagrams made from lines and shapes, bibliographic databases, and so on, the system is very simple to use. @BeginSections @Include { bas_star } @Include { bas_objs } @Include { bas_spac } @Include { bas_char } @Include { bas_empt } @Include { bas_font } @Include { bas_head } @Include { bas_par1 } @Include { bas_par2 } @Include { bas_line } @Include { bas_hyph } @Include { bas_marg } @Include { bas_unde } @Include { bas_lang } @Include { bas_date } @Include { bas_supe } @Include { bas_verb } @Include { bas_drop } @Include { bas_conv } @EndSections @End @Chapter lout-3.39/doc/user/bas_par20000644000076400007640000002552211363700677014230 0ustar jeffjeff@Section @Title { Paragraph breaking } @Tag { paras } @Begin @PP @I { Paragraph breaking } is the process of paragraph.breaking @Index { paragraph breaking } inserting line breaks into paragraphs at places appropriate to the column width. Lout works out suitable column widths and performs paragraph breaking automatically, finding an `optimal' break with the method used by the @TeX tex.paragraph @SubIndex { paragraph breaking } system. It offers ten styles of paragraph breaking, which we will explore with the aid of this example: @ID @OneRow @Code { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. } Changing the paragraph breaking style is similar to changing the font, colour, or language, and is done using the @Code "@Break" symbol: breakzzz.sym @Index { @Code "@Break" symbol } @ID @Code "ragged @Break ..." This example causes every paragraph in the following object to be broken using the @Code ragged style, of which more below. @PP The first two of the ten styles perform @I { line adjustment }, which line.adjustment @Index { line adjustment } means that they enlarge the spaces between the objects making up each line so as to fill the lines completely: @IndentedList @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "adjust @Break ..." } B { adjust @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "outdent @Break ..." } B { outdent @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @EndList The @Code adjust style is frequently used, so it has been chosen as the default style. Outdenting adds a small space at the start of each line outdent. @Index { outdented paragraphs } except the first, and is much less common. @PP The next four styles do not adjust lines, leaving the paragraph ragged. @Index { @Code ragged paragraph breaking style } cragged. @Index { @Code cragged paragraph breaking style } rragged. @Index { @Code rragged paragraph breaking style } oragged. @Index { @Code oragged paragraph breaking style } {@I ragged}: @IndentedList @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "ragged @Break ..." } B { ragged @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "cragged @Break ..." } B { cragged @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "rragged @Break ..." } B { rragged @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "oragged @Break ..." } B { oragged @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @EndList The paragraph is broken in the same places as @Code adjust breaks it, but the resulting lines are left-justified, centred, or right-justified with respect to each other, rather than adjusted; @Code "oragged" is like @Code "outdent" except the resulting lines are not adjusted. @PP If you have a few words that must be kept together on one line, the preventing. @Index { preventing line breaks } keeping. @Index { keeping things on one line } recommended way is to separate them by an @Code "~" symbol: @ID @Code "According to Prof.~Jones, the effect of ..." It's best not to bother about this until you actually get a bad line break, since chances are good that the words will fall on one line anyway. @PP The last four styles differ from the first six in breaking the paragraph at the points where it is broken in the original input: lines. @Index { @Code lines paragraph breaking style } clines. @Index { @Code clines paragraph breaking style } olines. @Index { @Code olines paragraph breaking style } rlines. @Index { @Code rlines paragraph breaking style } @IndentedList @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "lines @Break ..." } B { lines @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "clines @Break ..." } B { clines @Break { It @PageMark clines is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "rlines @Break ..." } B { rlines @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @LI @Tab @Fmta { @Col 6c @Wide @Code A ! @Col 7c @Wide B } { @Rowa A { "olines @Break ..." } B { olines @Break { It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. }} } @EndList The lines are left-justified, centred, right-justified, or outdented with respect to each other in the same way as for the ragged styles. @PP When using the @Code lines style, there are some fine points concerning the proper use of white space. Consider this example: @ID @OneRow @Code { "@IndentedDisplay lines @Break @I {" "Teach me to hear Mermaides singing," "Or to keep off envies stinging," " And finde" " What winde" "Serves to'advance an honest minde." "}" } The result is the indented display @IndentedDisplay lines @Break @I { Teach me to hear Mermaides singing, Or to keep off envies stinging, And finde What winde Serves to'advance an honest minde. } This style is the only one for which it is useful to indent individual lines in the input; as the result shows, such indents will be respected. However, Lout's rule that only white space separating objects affects the result (Section {@NumberOf spaces}) still holds, which means that indenting the first line is not effective: @ID @OneRow @Code { "@IndentedDisplay lines @Break @I {" " And finde" " What winde" "Serves to'advance an honest minde." "}" } produces @IndentedDisplay lines @Break @I { And finde What winde Serves to'advance an honest minde. } This may seem awkward at first, but actually it is extremely convenient because you don't have to worry about whether the first line of the paragraph should appear on a new line as above, or immediately after the opening brace: space at that point does not separate two objects, so it has no effect. The indent can be obtained by starting the first line with an empty object (Section {@NumberOf empty}): @ID @OneRow @Code { "@IndentedDisplay lines @Break @I {" "{} And finde" " What winde" "Serves to'advance an honest minde." "}" } The result is @IndentedDisplay lines @Break @I { {} And finde What winde Serves to'advance an honest minde. } as desired. @PP When using {@Code lines}, {@Code clines}, {@Code rlines}, and {@Code "olines @Break"}, blank lines are respected and ordinarily appear at their full height. However, it often looks better to give somewhat blanklinescale. @Index { @Code blanklinescale } less than this to blank lines. For this there is the {@Code blanklinescale} option to {@Code "@Break"}: @ID @OneRow @Code @Verbatim { @IndentedDisplay { lines blanklinescale 0.6 } @Break @I { Go, and catch a falling star, Get with child a mandrake root, Tell me, where all past years are, Or who cleft the Devil's foot, Teach me to hear Mermaides singing, Or to keep off envies stinging, And finde What winde Serves to'advance an honest minde. If thou be'st born to strange sights, Things invisible to see, Ride ten thousand days and nights, Till age snow white hairs on thee, Thou, when thou return'st, wilt tell me All strange wonders that befell thee, And swear No where Lives a woman true, and fair. } } As shown, @Code "blanklinescale" may appear at any point in the object to the left of {@Code "@Break"}, followed by a number indicating how much to scale the usual height of a blank line by. The object to the left of @Code "@Break" has to be enclosed in braces as shown, to ensure that its extent is clear. The result is @IndentedDisplay { lines blanklinescale 0.6 } @Break @I { Go, and catch a falling star, Get with child a mandrake root, Tell me, where all past years are, Or who cleft the Devil's foot, Teach me to hear Mermaides singing, Or to keep off envies stinging, And finde What winde Serves to'advance an honest minde. If thou be'st born to strange sights, Things invisible to see, Ride ten thousand days and nights, Till age snow white hairs on thee, Thou, when thou return'st, wilt tell me All strange wonders that befell thee, And swear No where Lives a woman true, and fair. } in which the verses are separated by considerably less than a full blank line; instead of a baseline-to-baseline gap of twice the interline space, as usual, the gap here is only 1.6 times the interline space. Two blank lines would give 2.2 times the interline space, and so on. There is no unit of measurement associated with {@Code "blanklinescale"}, because it is a scale factor, not a length. @PP To set the entire document in a paragraph breaking style other than {@Code "adjust"}, you need to change the @Code "@InitialBreak" option, as explained at the end of Section {@NumberOf linespace}. @PP Some people don't like to see the first line of a paragraph alone at the widows @Index { widow lines } orphans @Index { orphan lines } unbreakablefirst. @Index { @Code unbreakablefirst } unbreakablelast. @Index { @Code unbreakablelast } foot of a page or column (the rest appearing on the next page). You can instruct Lout not to allow this with @ID @Code "unbreakablefirst @Break ..." meaning that the first line cannot be broken off from the rest of the paragraph. Similarly, @ID @Code "unbreakablelast @Break ..." instructs Lout to prevent the last line of a paragraph from appearing alone at the top of a page or column. These features would probably be invoked in the @Code "@InitialBreak" option, like this: @ID @Code "@InitialBreak { unbreakablefirst unbreakablelast hyphen adjust 1.2fx }" You can turn them off with @Code "breakablefirst @Break" and @Code "breakablelast @Break". In both cases Lout makes it happen by breaking at the previous place, either between paragraphs or two lines from the end of a paragraph. Both features are compatible with Lout's @Code "@OptimizePages" option, which optimizes the overall page layout subject to these requirements. @End @Section lout-3.39/doc/user/tbl_rule0000644000076400007640000001225511363700677014346 0ustar jeffjeff@Section @Title { Rules } @Tag { tbl_rule } @Begin @PP There is a @Code "rule" option for drawing a rule around a cell: tables. @RawIndex { tables } tables.rule @SubIndex { @Code "rule" options } rule.tables @Index { @Code "rule" options (tables) } @ID @OneRow @Code "@Cell rule { yes }" Other values are {@Code no} (the default), {@Code single} (the same as {@Code yes}), and {@Code double} (for a double rule). @PP There are @Code "rulehorizontal" and @Code "rulevertical" options which draw only horizontal or vertical rules, and also {@Code "ruleabove"}, {@Code "rulebelow"}, {@Code "ruleleft"}, and {@Code "ruleright"} options: @ID @OneRow @Code @Verbatim { @Tbl aformat { @Cell A | @Cell B } { @Rowa ruleabove { yes } A { Commercial property } B { 10% } @Rowa A { Stock market } B { 15% } rulebelow { yes } } } produces @CD @OneRow @Tbl aformat { @Cell A | @Cell B } { @Rowa ruleabove { yes } A { Commercial property } B { 10% } @Rowa A { Stock market } B { 15% } rulebelow { yes } } These options take the same values as {@Code "rule"}, but draw along only one or two of the four edges. @PP Other options control the appearance of rules. Here they are with their default values: @ID @OneRow @Code @Verbatim { @Tbl rulewidth { 0.05f } rulegap { 0.15f } rulecolour { black } } These say that rules are to be @Code "0.05f" wide (thick), double rules are to appear @Code "0.15f" apart, and the colour of rules is to be black. Once again, more specific versions of these symbols exist for controlling above, below, left, and right rules: @ID @OneRow @Code @Tbl aformat { @Cell ml { 0i } A | @Cell B | @Cell C } marginvertical { 0.5vx } { @Rowa A { rulehorizontalwidth } B { rulehorizontalgap } C { rulehorizontalcolour } @Rowa A { ruleabovewidth } B { ruleabovegap } C { ruleabovecolour } @Rowa A { rulebelowwidth } B { rulebelowgap } C { rulebelowcolour } @Rowa A { ruleverticalwidth } B { ruleverticalgap } C { ruleverticalcolour } @Rowa A { ruleleftwidth } B { ruleleftgap } C { ruleleftcolour } @Rowa A { rulerightwidth } B { rulerightgap } C { rulerightcolour } } All these options have alternative, abbreviated names; and @Code { colour } may be spelt @Code { color } wherever it appears. Section {@NumberOf tbl_summ} has a complete summary of all spellings of all options. @PP To clarify exactly where the rules are drawn, let's start with a cell with no rules at all: @CD @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } paint { lightgrey } A } { @Rowa } Above rules and left rules are drawn within the cell boundary, just touching it, with any above rule overstriking any left rule: @CD { @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } paint { lightgrey } A } { @Rowa } @Background @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } A } ruleleft { yes } ruleabove { yes } rulehorizontalwidth { 0.8v } ruleverticalwidth { 0.5v } ruleverticalcolour { grey } rulehorizontalcolour { black } { @Rowa } } Below and right rules are drawn just outside the boundary of the cell, also touching it: @CD @Tbl mv { 0i } aformat { @Cell A | @Cell | @Cell B } { @Rowa A { @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } paint { lightgrey } A } { @Rowa } @Background @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } A } rulebelow { yes } rulehorizontalwidth { 0.8v } ruleverticalwidth { 0.5v } ruleverticalcolour { grey } rulehorizontalcolour { black } { @Rowa } } B { @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } paint { lightgrey } A } { @Rowa } @Background @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } A } ruleright { yes } rulehorizontalwidth { 0.8v } ruleverticalwidth { 0.5v } ruleverticalcolour { grey } rulehorizontalcolour { black } { @Rowa } } } @DP When a right rule is present, any above and below rules are extended by the width of the right rule, and they overstrike it: @CD { @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } paint { lightgrey } A } { @Rowa } @Background @Tbl mv { 0i } aformat { @Cell width { 3c } height { 1.2c } A } ruleabove { yes } ruleright { yes } rulebelow { yes } rulehorizontalwidth { 0.8v } ruleverticalwidth { 0.5v } ruleverticalcolour { grey } rulehorizontalcolour { black } { @Rowa } } @DP (These diagrams were produced by @Code "@Tbl" itself, using horizontal rules of width @Code 0.8v drawn in black, and vertical rules of width @Code 0.5v drawn in grey.) These arrangements ensure that even thick rules produce clean corners, and also that a right rule and a neighbouring left rule exactly overstrike each other, as do a below rule and its neighbouring above rule. # @PP # For information about rules in plain text tables, consult Section # {@NumberOf tbl_plai}. @End @Section lout-3.39/doc/user/ref_entr0000644000076400007640000002633511363700677014346 0ustar jeffjeff@Section @Title { Constructing database entries } @Tag { entries } @Begin @PP Here is the complete, fixed list of options that you may give to the @Code "@Reference" symbol: @ID @Tab vmargin { 0.5vx } @Fmta { @Col @Code A ! @Col B } { @Rowa A { "{ @Reference" } @Rowa A { " @Tag {}" } B { Used to cite this reference } @Rowa A { " @Type {}" } B { The type of reference, for example {@Code Book}, {@Code Article} } @Rowa A { " @Abstract {}" } B { Not used, intended to hold an abstract } @Rowa A { " @Address {}" } B { The address of a publisher, organization, or institution } @Rowa A { " @Annote {}" } B { Not used, intended for annotations } @Rowa A { " @Author {}" } B { The author(s) or editor(s) } @Rowa A { " @Day {}" } B { The day of the month, for newspaper articles } @Rowa A { " @Edition {}" } B { The edition, for example @Code "Second Edition" } @Rowa A { " @HowPublished {}" } B { How something strange has been published } @Rowa A { " @InAuthor {}" } B { The author of the work that the cited work appears within } @Rowa A { " @InTitle {}" } B { The title of the work that the cited work appears within } @Rowa A { " @Institution {}" } B { The institution or school } @Rowa A { " @Journal {}" } B { The journal name } @Rowa A { " @Keywords {}" } B { Not used, intended to hold keywords } @Rowa A { " @Label {}" } B { The label of a labelled reference } @Rowa A { " @Month {}" } B { The month of publication or writing } @Rowa A { " @Note {}" } B { Any additional helpful information } @Rowa A { " @Number {}" } B { The number of a technical report } @Rowa A { " @Organization {}" } B { The organization sponsoring the work } @Rowa A { " @Page {}" } B { Page number if only one, for example @Code "23" } @Rowa A { " @Pages {}" } B { Page numbers if more than one, for example @Code "23--47" } @Rowa A { " @Pinpoint {}" } B { A point or part of the work, for example @Code "Chapter VI" } @Rowa A { " @Publisher {}" } B { The publisher of the work } @Rowa A { " @Title {}" } B { The title of the work } @Rowa A { " @TitleNote {}" } B { Additional title information (series, editor, etc.) } @Rowa A { " @TRType {}" } B { The type of a technical report, for example @Code "Research Note" } @Rowa A { " @URL {}" } B { The URL of the reference } @Rowa A { " @Volume {}" } B { The volume of a journal } @Rowa A { " @Year {}" } B { The year of publication or writing } @Rowa A { "}" } } Every reference may contain any of these options, although, depending on the {@Code "@Type"} option, only some will be printed. You can't give an option twice; in particular, multiple authors must be placed within one @Code "@Author" option, arranged as you want them to appear. Here is the complete set of values that you may give to the @Code "@Type" option: @ID @Tab vmargin { 0.5vx } @Fmta { @Col @Code A ! @Col @Code B ! @Col @Code C ! @Col @Code D } { @Rowa A { Book } B { TechReport } C { Article } D { InBook } @Rowa A { Proceedings } B { MastersThesis } C {} D { InProceedings } @Rowa A { PhDThesis } B { Misc } C {} D {} } Each column represents one broad category of reference type: the first contains large works; the second contains small works not appearing within anything else (although possibly part of a series); the third contains small works appearing within an ongoing forum for such works; and the fourth contains small works appearing within large works. In each case, the reference may be to the work as a whole, or to one point or part of it (known as pinpointing). @PP Some care is needed when choosing the @Code "@Tag" option, since references are both cited and sorted by tag. It is best to choose a three-part tag consisting of the first author's surname and possibly initial, the year of publication, and a brief reminder of the contents: @ID @Code "@Tag { kingston1995lout.expert }" Keep to lower-case letters, since mixed cases confuse the sorting, and give the full four digits of the year to avoid trouble in the year 2000. Multi-word tags are possible but not recommended. @PP Unusually for Lout, you can have unquoted @Code "/" and @Code "~" references. @RawIndex { references } references.url @SubIndex { @Code "@URL" } url.references @Index { @Code "@URL" (references) } characters inside the @Code "@URL" option: @ID @Code "@URL { ftp://ftp.cs.su.oz.au/jeff/lout }" In fact it is better not to use quotes because then Lout will be able to break lines at @Code "/" characters, which is very useful since URLs tend to be long and prone to causing bad line breaks. @PP Since the types within each broad category are similar, our plan is to give one example of each and briefly note how the others differ. Here is a @Code Book entry showing all its options: references. @RawIndex { references } references.book @SubIndex { @Code Book reference type } book.references @Index { @Code "Book" reference type } @ID @OneRow @Code @Verbatim { { @Reference @Tag { homer.odyssey } @Type { Book } @Author { Homer } @Title { The Odyssey } @TitleNote { Translated by E. V. Rieu } @Pinpoint { Chapter VI } @Pages { 102--111 } @Page { 102 } @Publisher { Penguin Books } @Address { Harmondsworth, Middlesex } @Edition { Penguin Classics Edition } @Month { August } @Year { 1942 } @Note { The date of composition is unknown, but is thought to be about the tenth century BC. } } } And here is what it produces: @ID @RefPrint homer.odyssey The only compulsory options are {@Code "@Tag"}, {@Code "@Type"}, and {@Code "@Title"}, and Lout will carefully adjust the formatting to the right thing when you omit others. A basic book would have just {@Code "@Tag"}, {@Code "@Type"}, {@Code "@Author"}, {@Code "@Title"}, {@Code "@Publisher"}, and {@Code "@Year"} options. @PP @Code Proceedings is similar, except you references. @RawIndex { references } references.proceedings @SubIndex { @Code Proceedings reference type } proceedings.references @Index { @Code "Proceedings" reference type } may have an @Code "@Organization" or @Code "@Institution" option for the sponsoring organization if you wish, and the author will either be absent or an editor: @ID @Code "@Author { P. W. Lamb, editor }" There is no option specifically for editors, translators, and so forth. @PP @Code PhDThesis is very similar again, with @Code "@Institution" references. @RawIndex { references } references.phdthesis @SubIndex { @Code PhDThesis reference type } phdthesis.references @Index { @Code "PhDThesis" reference type } instead of {@Code "@Publisher"}, and the phrase `Ph.D. thesis' appearing by magic in the right spot. Like all words and phrases introduced automatically by Lout, it will be translated into the current language if this is not English. @PP Moving now to the second broad category, here is a typical {@Code TechReport}: references. @RawIndex { references } references.techreport @SubIndex { @Code TechReport reference type } techreport.references @Index { @Code "TechReport" reference type } @ID @OneRow @Code @Verbatim { { @Reference @Tag { christofides1976tsp } @Type { TechReport } @Author { Christofides, N. } @Title { Worst-case analysis of a new heuristic for the travelling salesman problem } @Number { 388 } @Institution { Graduate School of Industrial Administration, Carnegie-Mellon University } @Address { Pittsburgh, PA } @Year { 1976 } } } Here is the result: @ID @RefPrint christofides1976tsp The two novelties here are the @Code "@Number" option, which is the number of the report, and the `Tech. Rep.' phrase. If you need some other phrase instead, use the @Code "@TRType" option: @ID @Code "@TRType { Programmer's Manual }" or whatever. The phrase will be `Master's Thesis' in the current language for type {@Code MastersThesis}, and absent in type references. @RawIndex { references } references.mastersthesis @SubIndex { @Code MastersThesis reference type } mastersthesis.references @Index { @Code "MastersThesis" reference type } references. @RawIndex { references } references.misc @SubIndex { @Code Misc reference type } misc.references @Index { @Code "Misc" reference type } {@Code Misc}. You may use the pinpointing options ({@Code "@Pinpoint"}, {@Code "@Page"}, and {@Code "@Pages"}) and {@Code "@TitleNote"}, {@Code "@Month"}, and {@Code "@Note"} in the same way as for books. @PP Journal articles are referenced by journal name, volume, number, and page(s): references. @RawIndex { references } references.article @SubIndex { @Code Article reference type } article.references @Index { @Code "Article" reference type } @ID @OneRow @Code @Verbatim { { @Reference @Tag { kingston1993lout.design } @Type { Article } @Author { Jeffrey H. Kingston } @Title { The design and implementation of the Lout document formatting language } @Journal { Software---Practice and Experience } @Volume { 23 } @Pages { 1001--1041 } @Year { 1993 } } } The result of this is @ID @RefPrint kingston1993lout.design All are optional, as usual. Notice that @Code "@Pages" and @Code "@Page" refer to the whole article so are not available for pinpointing here, but you may still use {@Code "@Pinpoint"}. @PP Finally, small works that appear within large works have @Code "@Author" references. @RawIndex { references } references.inbook @SubIndex { @Code InBook reference type } inbook.references @Index { @Code "InBook" reference type } and @Code "@Title" options for the work itself, and @Code "@InAuthor" and @Code "@InTitle" for the work that it appears within: @ID @OneRow @Code @Verbatim { { @Reference @Tag { rieu1942intro } @Type { InBook } @Author { E. V. Rieu } @Title { Introduction to @I { The Odyssey } } @InAuthor { Homer } @InTitle { The Odyssey } @Publisher { Penguin } @Year { 1942 } } } @Code "@InAuthor" would often be absent or an editor. The result is @ID @RefPrint rieu1942intro The other options are as for large works. Type @Code InProceedings is references. @RawIndex { references } references.inproceedings @SubIndex { @Code InProceedings reference type } inproceedings.references @Index { @Code "InProceedings" reference type } similar to {@Code InBook}. @PP A database usually has a long life, and some day it might find itself used in a document whose language is not the one its original compiler had in mind. For this reason, a truly meticulous compiler of database entries would enclose @I all language-specific options in @Code "@Language" symbols: @ID @OneRow @Code @Verbatim { { @Reference @Tag { zimand1986size.sets.strings } @Type { Article } @Author { French @Language { M. Zimand } } @Title { English @Language { On the topological size of sets of random strings } } @Journal { German @Language { Zeitschr. f. math. Logik und Grundlagen d. Math. } } @Volume { 32 } @Pages { 81--88 } @Year { 1986 } } } (My apologies to M. Zimand if he or she is not French.) This ensures correct hyphenation whatever the language of the document in which the reference appears. @End @Section lout-3.39/doc/user/bgr_outl0000644000076400007640000000102411363700677014343 0ustar jeffjeff@Section @Title { Outlined words } @Tag { outline } @Begin @PP The @@Outline symbol outline.sym @Index { @@Outline symbol } causes all the words in the following object (which may be arbitrary as usual) to be printed in outline. For example, @ID @Code @Verbatim { @Outline @Box 24p @Font HELP } produces @ID @Outline @Box 24p @Font HELP There is no way to control the thickness of the outline, and @@Outline has no effect in PDF output. On the other hand, it works with any font likely to be used in practice. @End @Section lout-3.39/doc/user/bgr_prec0000644000076400007640000002305011363700677014314 0ustar jeffjeff@Section @Title { Precise object placement } @Tag { precise } @Begin @PP This section offers some tips on placing objects precisely where you want them relative to each other. If your problem is to place objects precisely at some unusual point on the page, you probably need a margin note or the @Code "@Place" symbol, for which see Section {@NumberOf marginnotes}. @PP Precise object placement is not a subject with any clear boundaries, so this section is mainly a list of examples, covering the use of the @Code {"@OneCol"}, @Code {"@OneRow"}, @Code {"@Wide"}, @Code {"@High"}, @Code {"@HExpand"}, @Code {"@VExpand"}, @Code {"@HShift"}, @Code {"@VShift"}, @Code {"@VStrut"}, @Code {"@OverStrike"}, @Code {"@ZeroHeight"}, and @Code {"@ZeroWidth"} symbols. @PP The @Code "@OneCol" symbol causes the following object to be kept onecol. @Index @Code "@OneCol" on one line. (The name stands for `one column', which is a bit confusing unless you are an expert.) For example, you could use it to prevent hyphenation in a particular word, or to keep someone's name together on one line: @ID @Code "@OneCol { Mr. Jones }" although there is also the @Code "~" symbol for that. Similarly, @Code "@OneRow" causes the following object to be kept in one onerow. @Index @Code "@OneRow" column. It is commonly used to keep displays and list items together: @ID @Code "@IndentedDisplay @OneRow ..." and @ID @Code "@ListItem @OneRow ..." are the usual uses. @PP Loosely speaking, the @Code {"@Wide"} symbol causes the object following wide. @Index @Code "@Wide" it to have a particular width. It also has a @Code "@OneCol" effect. Paragraphs within the object will be broken if necessary in order to satisfy the width restriction. More precisely, the result of the @Code {"@Wide"} symbol is an object with the given width, with the following object fitting inside it, so having at most that width. Compare @ID @Code "5c @Wide @Box { A box }" which produces @ID 5c @Wide @Box { A box } with @ID @Code "@Box 5c @Wide { A box }" which produces @ID @Box 5c @Wide { A box } In the first example, the only obligation on the box is to be at most five centimetres wide, so that it fits into the space allowed it. In the second example, the box is drawn around an object guaranteed to be exactly five centimetres wide. The width of the box itself will be five centimetres plus twice the box margin width. Any length (Section {@NumberOf objects}) is allowed, and the object following @Code "@Wide" may be arbitrary as usual. @PP The @Code "@High" symbol is like @Code {"@Wide"}, only vertical. The two high. @Index @Code "@High" may be used together: @ID @Code "@Box 5c @Wide 5c @High { A box }" produces @ID @Box 5c @Wide 5c @High { A box } Be careful when using @Code "@High" to allow enough space for whatever is inside. An error message will be printed if you don't, and the @Code "@High" symbol will be ignored. @PP Instead of a particular width, it is quite common to want something to be as wide as possible. For this there is the @Code "@HExpand" hexpand. @Index @Code "@HExpand" symbol: @ID @Code "@IndentedDisplay @Box @HExpand { A box }" produces @IndentedDisplay @Box @HExpand { A box } Notice how @Code "@HExpand" is placed after the @Code "@Box" symbol, to ensure that the box is drawn around something as wide as possible, analogously to the second @Code "@Wide" example above. Lout has carefully worked out that `as wide as possible' means the column width minus the indent width and box margins. @PP Here is an example of @Code "@Wide" and @Code "@HExpand" working together: @ID @Box margin { 0.3c } 8c @Wide { Name: @Underline @HExpand @LP Address: @Underline @HExpand } The problem is to get the underlines to be as wide as possible. The solution is @ID @Code @Verbatim { @Box margin { 0.3c } 8c @Wide { Name: @Underline @HExpand @LP Address: @Underline @HExpand } } Each @Code "@HExpand" symbol produces for its result an object which is as wide as possible, in this example containing nothing. When that object is underlined, the underline is as wide as possible. @PP Although there is a corresponding @Code "@VExpand" symbol, it is not very vexpand. @Index @Code "@VExpand" useful alone because `as high as possible' does not mean `down to the foot of the page' as you would expect. It is mainly useful within {@Code "@High"}. @PP The @Code {"@HShift"} and @Code {"@VShift"} symbols control the alignment hshift. @Index @Code "@HShift" vshift. @Index @Code "@VShift" of objects with neighbouring objects. There are not many places in document formatting where alignment actually matters. Ordinary lines of text are one of them: @ID @Code "faults such as {-0.3f @VShift s}lipped letters" produces @ID { faults such as {-0.3f @VShift s}lipped letters } with the object following @Code "@VShift" aligned with neighbouring objects such that it appears 0.3 times the current font size lower than it normally would. The object following @Code {"@VShift"} may be arbitrary as usual. Examples requiring @Code "@HShift" are very rare; one appears below. @PP The @Code "@VStrut" symbol is used to compensate for missing vstrut. @Index @Code "@VStrut" letter ascenders and descenders. For example, the three boxes @Box { e }, @Box { f }, and @Box { g } look ragged because their contents differ in their ascenders and descenders. The solution is to insert a @I strut into each box: an invisible object of zero width whose height is that of a letter with both an ascender and a descender. This is done with the @Code "@VStrut" symbol, which attaches such a strut to the following object: @ID @Code "@Box { @VStrut e }, @Box { @VStrut f }, and @Box { @VStrut g }" produces @ID { @Box { @VStrut e }, @Box { @VStrut f }, and @Box { @VStrut g } } The @Code "@VStrut" symbol has @Code "above" and @Code "below" options which determine how high and low (relative to the middle of the letter `x') the strut is to go. Their default values are both @Code { "0.5f" }. @PP Missing descenders can cause list items to appear unequally spaced, because the space between list items is ordinarily measured from the bottom edge of the higher list item to the top edge of the lower one, rather than from baseline to baseline. Enclosing the last word of the troublesome items in @Code "@VStrut" will fix this problem. @PP Alternatively, and possibly more conveniently, Version 3.33 of Lout has added a @Code "strut" option to the @Code "@Font" symbol, used alone like this: @ID @Code "strut @Font ..." or in combination with other values suited to go to the left of {@Code "@Font"}, like this: @ID @Code "{ strut +2p } @Font ..." This causes a vertical strut to be added to every word under the influence of the {@Code "@Font"} symbol. The height of this kind of strut is fixed at the height of the highest character in the font, and its depth at the depth of the deepest character, as recorded by the `font bounding box' stored with the description of the font. For example, @ID @Code "strut @Font { @Box { e }, @Box { @f }, and @Box { g } }" produces @ID strut @Font { @Box { e }, @Box { f }, and @Box { g } } If you need many struts, it might pay to include @Code "strut" in the @Code "@InitialFont" option of your document, so that it applies everywhere. @PP The @Code "@OverStrike" symbol causes the objects on overstrike. @Index @Code "@OverStrike" each side of it to be overstruck: @ID @Code "= @OverStrike \"/\"" produces @ID { = @OverStrike "/" } The objects to be overstruck may be arbitrary as usual. For example, Section {@NumberOf overall} recommends this symbol for overstriking two graphs, to get what appears to be one graph with two coordinate systems superimposed. The second object is printed after the first and will paint over it. @PP Sometimes the best way to get Lout to do what you want is to make it pretend that some object has zero width or height, using the zerowidth. @Index @Code "@ZeroWidth" zeroheight. @Index @Code "@ZeroHeight" @Code "@ZeroWidth" and @Code "@ZeroHeight" symbols. Lout will format the overall document as though the object in question had zero width or height, but it will still print the entire object. @PP For example, you might have an inline equation that causes the line spacing to increase to accommodate it -- @M { 2 sup 2 sup N } say -- but you would rather it didn't. Writing @ID @Code "@ZeroHeight @M { 2 sup 2 sup N }" causes Lout to pretend that the object has zero height, and so it will not increase the line spacing around this version of {@ZeroHeight @M { 2 sup 2 sup N }}, as you can see. @PP The @Code "@HShift" and @Code "@VShift" symbols provide a way to move the printed object with respect to the zero-width one: @ID @Code @Verbatim { {@ZeroWidth 1w @HShift ``}My dear Sir Thomas!'' cried Mrs. Norris, red with anger, ``Fanny can walk.'' } This example produces `hanging punctuation': @ID 5c @Wide ragged @Break { {@ZeroWidth 1w @HShift ``}My dear Sir Thomas!'' cried Mrs. Norris, red with anger, ``Fanny can walk.'' } The double quotes are printed at zero width, and @Code "1w @HShift" ensures that they appear just to the left of the empty object that Lout thinks it is placing, so that they protrude into the margin rather than overstriking the next word (the Expert's Guide @Cite { $kingston1995lout.expert } explains the @Code "w" unit of measurement). @PP Some of the symbols described in this section are Lout primitives, described in full detail in the Expert's Guide @Cite { $kingston1995lout.expert }; and that is also the place to look for more information about precise object placement. In particular, the Lout primitives described there for horizontal and vertical concatenation, @Code "/" and {@Code "|"}, offer possibilities beyond what has been described here. @End @Section lout-3.39/doc/user/bas_hyph0000644000076400007640000000276011363700677014333 0ustar jeffjeff@Section @Title { Hyphenation } @Tag { hyph } @Begin @PP The @Code "@Break" symbol also controls hyphenation: @Code "hyphen" hyphenation. @Index hyphenation @Code "@Break" turns it on, @Code "nohyphen" @Code "@Break" turns it off. For example, ragged breaking is often done without hyphenation: @ID @OneRow @Code { "@IndentedDisplay { ragged nohyphen } @Break {" "This little paragraph will appear with" "ragged ends to its lines." "}" } Lout's method of choosing hyphenation points is copied from the @TeX tex.hyph @SubIndex { hyphenation } system, except that Lout will never place a hyphen within a sequence of characters that form a ligature (fl and ligatures.hyph @SubIndex { and hyphenation } fi are the most common ligatures). @PP Hyphenation usually works well by itself; you should never need to interfere with its ideas of what to do. However, if you do want to tell Lout where you think a hyphen could be inserted, you can use the @Code "&-" symbol: @IndentedDisplay @Code { "after&-math" } This both allows hyphenation at the point marked and prevents it in the adjacent word fragments. If @Code "&-" occurs directly after a hyphen or slash character, hyphenation will be permitted but no extra hyphen will be inserted. @PP To prevent hyphenation of a word, enclose the word in a @Code "@OneCol" symbol. To turn hyphenation off throughout the document, you need to set the @Code "@InitialBreak" option to {@Code "nohyphen"}, as described at the end of Section {@NumberOf linespace}. @End @Section lout-3.39/doc/user/vtbl0000755000076400007640000000031611363700677013503 0ustar jeffjeffgvim tbl gvim tbl_intr gvim tbl_cell gvim tbl_rows gvim tbl_rule gvim tbl_marg gvim tbl_widt gvim tbl_inde gvim tbl_alig gvim tbl_span gvim tbl_mark gvim tbl_mult gvim tbl_plai gvim tbl_setu gvim tbl_summ lout-3.39/doc/user/gra_keys0000644000076400007640000001415011363700677014336 0ustar jeffjeff@Section @Title { Adding a key to the graph } @Tag { key } @Begin @PP A @I key to a graph is an explanation of what each data set graphs. @RawIndex { graphs (statistical) } graphs.keys @SubIndex { keys } keys.graph @Index { keys in graphs } represents. To assist you in constructing a key, some extra symbols are provided in addition to {@Code "@Graph"}: graphs. @RawIndex { graphs (statistical) } graphs.graphcross @SubIndex { @Code "@GraphCross" symbol } { graphacross } @Index { @Code "@GraphCross" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphplus @SubIndex { @Code "@GraphPlus" symbol } { graphaplus } @Index { @Code "@GraphPlus" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphsquare @SubIndex { @Code "@GraphSquare" symbol } { graphasquare } @Index { @Code "@GraphSquare" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphfilled.square @SubIndex { @Code "@GraphFilledSquare" symbol } { graphafilled.square } @Index { @Code "@GraphFilledSquare" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphdiamond @SubIndex { @Code "@GraphDiamond" symbol } { graphadiamond } @Index { @Code "@GraphDiamond" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphfilled.diamond @SubIndex { @Code "@GraphFilledDiamond" symbol } { graphafilled.diamond } @Index { @Code "@GraphFilledDiamond" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphcircle @SubIndex { @Code "@GraphCircle" symbol } { graphacircle } @Index { @Code "@GraphCircle" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphfilled.circle @SubIndex { @Code "@GraphFilledCircle" symbol } { graphafilled.circle } @Index { @Code "@GraphFilledCircle" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphtriangle @SubIndex { @Code "@GraphTriangle" symbol } { graphatriangle } @Index { @Code "@GraphTriangle" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphfilled.triangle @SubIndex { @Code "@GraphFilledTriangle" symbol } { graphafilled.triangle } @Index { @Code "@GraphFilledTriangle" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphnoline @SubIndex { @Code "@GraphNoLine" symbol } { graphanoline } @Index { @Code "@GraphNoLine" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphsolid @SubIndex { @Code "@GraphSolid" symbol } { graphasolid } @Index { @Code "@GraphSolid" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphdashed @SubIndex { @Code "@GraphDashed" symbol } { graphadashed } @Index { @Code "@GraphDashed" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphdotted @SubIndex { @Code "@GraphDotted" symbol } { graphadotted } @Index { @Code "@GraphDotted" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphdotdashed @SubIndex { @Code "@GraphDotDashed" symbol } { graphadotdashed } @Index { @Code "@GraphDotDashed" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphdotdotdashed @SubIndex { @Code "@GraphDotDotDashed" symbol } { graphadotdotdashed } @Index { @Code "@GraphDotDotDashed" symbol (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.graphdotdotdotdashed @SubIndex { @Code "@GraphDotDotDotDashed" symbol } { graphadotdotdotdashed } @Index { @Code "@GraphDotDotDotDashed" symbol (graphs) } @ID @Tab @Fmta { @Col @Code A ! @Col B ! @Col @Code C ! @Col D } { @Rowa A { "@GraphCross" } B { @GraphCross } C { "@GraphPlus" } D { @GraphPlus } @Rowa A { "@GraphSquare" } B { @GraphSquare } C { "@GraphFilledSquare" } D { @GraphFilledSquare } @Rowa A { "@GraphDiamond" } B { @GraphDiamond } C { "@GraphFilledDiamond" } D { @GraphFilledDiamond } @Rowa A { "@GraphCircle" } B { @GraphCircle } C { "@GraphFilledCircle" } D { @GraphFilledCircle } @Rowa A { "@GraphTriangle" } B { @GraphTriangle } C { "@GraphFilledTriangle" } D { @GraphFilledTriangle } @Rowa @Rowa A { "@GraphNoLine" } B { @GraphNoLine } @Rowa A { "@GraphSolid" } B { @GraphSolid } @Rowa A { "@GraphDashed" } B { @GraphDashed } @Rowa A { "@GraphDotted" } B { @GraphDotted } @Rowa A { "@GraphDotDashed" } B { @GraphDotDashed } @Rowa A { "@GraphDotDotDashed" } B { @GraphDotDotDashed } @Rowa A { "@GraphDotDotDotDashed" } B { @GraphDotDotDotDashed } } These extra symbols may be used anywhere in your document except within the right parameter of {@Code "@Graph"}; they are commonly used within the caption options of {@Code "@Graph"}: @ID @OneRow @Code @Verbatim { @Graph rightcaption { @GraphPlus @GraphSolid @GraphPlus Boston @GraphPlus @GraphDashed @GraphPlus New York @GraphPlus @GraphDotDashed @GraphPlus Philadelphia } } (You can also use them within the @Code objects option, which is the way to place your key within the graph itself.) Recall that unlike the other captions, @Code rightcaption is set using the @Code "lines @Break" style rather than {@Code "clines @Break"} (Section {@NumberOf captions}). Adding this caption to the graph from Section {@NumberOf data}, the complete result is @CD @Graph rightcaption { @GraphPlus @GraphSolid @GraphPlus Boston @GraphPlus @GraphDashed @GraphPlus New York @GraphPlus @GraphDotDashed @GraphPlus Philadelphia } { @Data points { plus } pairs { solid } { 1720 12000 1730 13000 1740 15601 1760 15631 1770 15877 } @Data points { plus } pairs { dashed } { 1720 7000 1730 8622 1740 10451 1750 14255 1760 18000 1770 22667 } @Data points { plus } pairs { dotdashed } { 1720 10000 1730 11500 1740 12654 1750 18202 1760 23750 1770 34583 } } The first eight symbols have a @Code "symbolsize" and @Code "symbollinewidth" options with the usual meaning and the usual default values ({@Code "0.15f"} and {@Code "0.5p"}). The last four symbols have @Code "dashlength" and @Code "linewidth" options with the usual default values, {@Code "0.2f"} and {@Code "0.5p"}, and a @Code "length" option, which determines the length of the line drawn by each symbol; its default value is {@Code "1.0f"}. @End @Section lout-3.39/doc/user/fmt_head0000644000076400007640000003410211363700677014300 0ustar jeffjeff@Section @Title { Page numbers and running headers } @Tag { headers } @Begin @PP A @I { page header } is a line at the top of a page containing a page page.header @Index { page header } running.header @Index { running header } number or running title. A @I { page footer } is a similar line at page.footer @Index { page footer } the bottom of a page. This section describes the setup file options that control the appearance of page headers and footers. @PP There are four basic styles, selected by the @Code "@PageHeaders" option: page.headers @Index @Code "@PageHeaders" @ID @Tab @Fmta { @Col @Code { "@PageHeaders {" A "}" } ! @Col B } { @Rowa A { None } B { No page headers, no page footers. } @Rowa A { Simple } B { No footers, and a centred page number between hyphens for header on every page whose number is not 0 or 1. } @Rowa A { Titles } B { Full running titles as in the present document. } @Rowa A { NoTitles } B { Page numbers placed as for @Code { Titles }, but with the titles themselves blanked out. } } @Code Titles and @Code NoTitles use Lout's cross-referencing machinery, so will require a few runs to settle down. @Code None and @Code Simple do not, so they work first time and may be used with the @Code "-s" command line flag. Section {@NumberOf cross} has a fuller discussion of these ramifications of cross referencing. @PP The next step is to set the page numbers, using the @Code "@PageNumbers" and @Code "@FirstPageNumber" options. There page.numbers @Index @Code "@PageNumbers" are two useful values for {@Code "@PageNumbers"}: @ID @Tab @Fmta { @Col @Code { "@PageNumbers {" A "}" } ! @Col B } { @Rowa A { Arabic } B { Arabic page numbers } @Rowa A { Roman } B { Lower-case Roman page numbers } } although the full range of choices is {@Code "None"}, {@Code "Arabic"}, {@Code "Roman"}, {@Code "UCRoman"}, {@Code "Alpha"}, and {@Code "UCAlpha"}. @Code "@FirstPageNumber" is the number of the first.page.number @Index @Code "@FirstPageNumber" first page. Its default value is of course {@Code 1}, although @ID @Code "@FirstPageNumber { 0 }" might be useful if the first page is really an unnumbered cover sheet. @Code "@FirstPageNumber" must be an Arabic number even if @Code "@PageNumbers" is set to something other than {@Code "Arabic"}. @PP Some document types, such as books and technical reports with cover sheets, have a separate introductory sequence of pages preceding the main sequence. For the page numbers on introductory pages there are two options, @Code "@IntroPageNumbers" intro.page.numbers @Index @Code "@IntroPageNumbers" intro.first.page.number @Index @Code "@IntroFirstPageNumber" and {@Code "@IntroFirstPageNumber"}, which are exactly analogous to @Code "@PageNumbers" and {@Code "@FirstPageNumber"}. It is traditional to number introductory pages using Roman numerals, so @Code Roman is the default value of {@Code "@IntroPageNumbers"}. @PP Let's summarize the five options so far by looking at their values in the @Code book setup file, which was used to produce the present document: @ID @OneRow @Code @Verbatim { @PageHeaders { Titles } @PageNumbers { Arabic } @FirstPageNumber { 1 } @IntroPageNumbers { Roman } @IntroFirstPageNumber { 1 } } The remainder of this section goes beyond these basic choices to explain how to change the detailed appearance of page headers and footers. Inevitably it gets quite a lot harder. @PP Pages are classified by the page header options in three ways: @NumberedList @LI { @I { Odd vs. even }. The first page is odd, the second is even, odd.pages @Index { odd and even pages } the third is odd, and so on. If @Code "@FirstPageNumber" is set to an even number, the first page will have that number, but it will still be classified as odd. } @LI { @I { Start vs. non-start }. A start page is the first page of start.pages @Index { start and non-start pages } some major part of the document (a chapter, say); other pages are non-start. The @Code { Simple } header type uses a simpler definition: a page whose number is 0 or 1 is a start page, all others are non-start. } @LI { @I { Intro vs. non-intro }. Intro pages form a separate sequence of intro.pages @Index { intro and non-intro pages } pages that precede the main (non-intro) sequence. They typically contain prefatory material such as a title page, preface, and table of contents. In a book there will always be an even number of Intro pages, even if it means that the last one is empty. } @EndList These classifications are quite independent of each other: a page could be a non-intro start odd page, or an intro non-start even page, and so on. This makes eight (@Eq { 2 times 2 times 2 }) possibilities altogether. Depending on the type of document there may also be pages that Lout will never place a page header or footer on (e.g. pages containing part titles in books). @PP If you choose {@Code "@PageHeaders { None }"}, there are no page headers or footers, so there is nothing more to say. If you choose {@Code "@PageHeaders { Simple }"}, then eight options become relevant for controlling the page headers on each of the eight kinds of pages. Here they are with their default values: @ID @OneRow @Code @Verbatim { @OddTop { @Centre { - @PageNum - } } @EvenTop { @Centre { - @PageNum - } } @StartOddTop { @Null } @StartEvenTop { @Null } @IntroOddTop { @Null } @IntroEvenTop { @Null } @IntroStartOddTop { @Null } @IntroStartEvenTop { @Null } } If the word @Code Start is missing from an option name, the option applies to non-start pages; if @Code Intro is missing, it applies to non-intro pages. Another eight options control footers in the same way: @ID @OneRow @Code @Verbatim { @OddFoot { @Null } @EvenFoot { @Null } @StartOddFoot { @Null } @StartEvenFoot { @Null } @IntroOddFoot { @Centre @PageNum } @IntroEvenFoot { @Null } @IntroStartOddFoot { @Centre @PageNum } @IntroStartEvenFoot { @Null } } The value of the option is an object which becomes the header or footer. It may be any object, but there are some peculiarities that will be explained now. @PP The full set of symbols of the BasicSetup package can be used when setting page header options (and indeed any of the options of the @Code "@BasicSetup" @Code "@Use" clause package), as well as symbols from special-purpose packages that have been included before this setup file. This means you can use any symbol you might reasonably expect to. But footnotes and floating figures and tables, for example, are not from BasicSetup so cannot be used. @PP There are five symbols of special relevance to page headers and footers: {@Code "@Null"}, {@Code "@Centre"}, {@Code "@Center"}, {@Code "@Right"}, and {@Code "@PageNum"}. @PP The @Code "@Null" symbol is similar to the empty object in printing as null. @Index @Code "@Null" nothing, but in addition it removes the vertical space that ordinarily separates the header line from the page body. If there is no header there should be no vertical space either, so always use @Code "@Null" rather than the empty object in header and footer options. @PP @Code "@Centre" and @Code "@Center" centre the following object, and centre. @Index @Code "@Centre" center. @Index @Code "@Center" right. @Index @Code "@Right" @Code "@Right" right-justifies it: @ID @Code "at left @Centre { - 27 - } @Right { at right }" produces @QD @HExpand { at left @Centre { - 27 - } @Right { at right } } The objects should be enclosed in braces if they contain spaces. @PP The @Code "@PageNum" symbol produces the number of the current page, in page.num. @Index @Code "@PageNum" Arabic, Roman, etc. as specified by the @Code "@PageNumbers" or @Code "@IntroPageNumbers" option. @Code "@PageNum" is available only within page header and footer options. @PP To get the @I last page into a header, so that you can have page headers like `Page 5 of 8', you need @Code "@NumberOf last.page" as described in Section {@NumberOf cross}. You might have @ID @Code "@Centre { Page @PageNum of @NumberOf last.page }" as the value of @Code "@EvenTop" and the rest. @PP At this point you might like to pause and verify that the default values of the sixteen options given above produce what we said they would: no footers, and a centred page number between hyphens on every page whose number is not 0 or 1. It should be clear now what to do if you want to remove the hyphens, move the numbers to the page footer, make them bold, have them at the left on even pages and at the right on odd pages, and so on. @PP A different set of sixteen options applies when @Code "@PageHeaders" is set to @Code Titles or {@Code "NoTitles"}. Here are the eight options for headers, with their default values: @ID @OneRow @Code @Verbatim { @RunningOddTop { @I { @MinorNum @DotSep @MinorTitle } @Right @B @PageNum } @RunningEvenTop { @B @PageNum @Right @I { @MajorNum @DotSep @MajorTitle } } @RunningStartOddTop { @Null } @RunningStartEvenTop { @Null } @RunningIntroOddTop { @Null } @RunningIntroEvenTop { @Null } @RunningIntroStartOddTop { @Null } @RunningIntroStartEvenTop { @Null } } Some options occupy two lines, but only because they are long: as usual, the end of a line is the same as one space. Here are the options for footers: @ID @OneRow @Code @Verbatim { @RunningOddFoot { @Null } @RunningEvenFoot { @Null } @RunningStartOddFoot { @Centre { Bold 0.8f } @Font @PageNum } @RunningStartEvenFoot { @Centre { Bold 0.8f } @Font @PageNum } @RunningIntroOddFoot { @Right @PageNum } @RunningIntroEvenFoot { @PageNum } @RunningIntroStartOddFoot { @Null } @RunningIntroStartEvenFoot { @Null } } All these options are similar to the earlier ones, in providing one option for each of the eight kinds of pages. The names are the same except that @Code Running is added to each. Remember that a start page is now one that begins a major part of the document. @PP In addition to the symbols described earlier for simple page headers and footers, these running header options may contain the symbols {@Code "@MajorNum"}, {@Code "@MajorTitle"}, {@Code "@MinorNum"}, {@Code "@MinorTitle"}, {@Code "@DotSep"}, {@Code "@NoDotSep"}, {@Code "@DotJoin"}, {@Code "@NoDotJoin"}, {@Code "@DashJoin"}, and {@Code "@NumSep"} described below. major.num @Index @Code "@MajorNum" major.title @Index @Code "@MajorTitle" minor.num @Index @Code "@MinorNum" minor.title @Index @Code "@MinorTitle" @PP The exact values of {@Code "@MajorNum"}, {@Code "@MajorTitle"}, {@Code "@MinorNum"}, and {@Code "@MinorTitle"} depend on the document type, but they are intended to describe what is on the current page. Here are some values typical of books: @ID @Tab @Fmta { @Col @Code A ! @Col @Code B } vmargin { 0.5vx } { @Rowa A { "@MajorNum" } B { Chapter 2 } @Rowa A { "@MajorTitle" } B { Adding Structure to Documents } @Rowa A { "@MinorNum" } B { 2.7 } @Rowa A { "@MinorTitle" } B { Tables of contents } } It is not possible to change the values assigned to these symbols, but the sixteen options allow you to choose whether to use them and how to arrange them, in the usual way. @PP The @Code "@DotSep" symbol consumes the objects to its left and right dot.sep @Index @Code "@DotSep" and produces them separated by a dot and two spaces: @ID @Code "@MinorNum @DotSep @MinorTitle" is the same as @ID @Code "@MinorNum. @MinorTitle" However, if either object is empty, the dot and two spaces are omitted. It's a fine point, needed mainly for unnumbered chapters and sections. @Code "@DotJoin" is the same as @Code "@DotSep" but dot.join @Index @Code "@DotJoin" without the two spaces. @Code "@NoDotSep" is the same as nodot.sep @Index @Code "@NoDotSep" @Code "@DotSep" but leaving out the dot, @Code "@NoDotJoin" is the same nodot.join @Index @Code "@NoDotJoin" as @Code "@DotJoin" but again leaving out the dot, and @Code "@DashJoin" dash.join @Index @Code "@DashJoin" is the same as @Code "@DotJoin" except that `--' replaces the dot. @PP Lout uses @Code "@DotSep" between numbers and titles by default. To get rid of all dots between numbers and titles it is necessary to change all occurrences of @Code "@DotSep" in the setup file to {@Code "@NoDotSep"}. There are about ten occurrences, depending on the setup file. @PP @Code "@NumSep" {@PageMark numsep} is similar to @Code "@NoDotSep" except that one space num.sep @Index @Code "@NumSep" hungarian @Index { Hungarian and @Code "@NumSep" } is used, not two, and also the order of the two parts is reversed and a dot is added if the current language is Hungarian (apparently Hungarians write `3. Table' where other people write `Table 3'). @Code "@NumSep" is used behind the scenes in a variety of places. @PP The present document was produced using @Code "@PageHeaders { Titles }" with the default values of the sixteen options unchanged, as you might like to verify. @Code "@PageHeaders { NoTitles }" is identical to @Code "@PageHeaders { Titles }" except that {@Code "@MajorNum"}, {@Code "@MajorTitle"}, {@Code "@MinorNum"}, and {@Code "@MinorTitle"} are always replaced by empty objects. The description given at the beginning of this section, `like @Code "Titles" but with the titles blanked out,' is therefore accurate. @PP There is a @Code "@StructPageNums" setup file option that produces structpagenums. @Index @Code "@StructPageNums" structured page numbers when it is changed to {@Code Yes}; that is, page numbers that include a section number, subsection number, and so on. Precisely which structure numbers are included is determined by the @Code "@SectionNumInRunners" option and its relatives. @Code "@PageHeaders" must be @Code Titles when structured page numbers are used, and it is probably best to set @Code "@SectionGap" and some similar options to {@Code "2b"} (meaning new page) as well. The @Code "@NumberSeparator" setup file option (Section {@NumberOf largescale}) affects the format of the structured page numbers. @PP There is a @Code "@PageNumberFormat" setup file option that pagenumberformat. @Index @Code "@PageNumberFormat" allows a uniform format to be applied to every page number. Its default value, @ID @Code "@PageNumberFormat { number }" just produces the number. To change the format, change the object within the braces. For example, @ID @Code "@PageNumberFormat { (number) }" will cause parentheses to be printed around every page number, and so on. @End @Section lout-3.39/doc/user/equ_spac0000644000076400007640000001117211363700677014333 0ustar jeffjeff@Section @Title { Spacing } @Tag { equ_spacing } @Begin @PP There is a basic rule governing the use of white space characters (space, tab, and newline) in the input to Lout: white space between two objects affects the result; white space between a symbol and its parameter does not. This is explained at length in Section {@NumberOf spaces}. @PP Although this rule is just right most of the time, it is not adequate for equation formatting. Getting the horizontal spacing right in equations is a very fiddly business, involving four different sizes of space (zero, thin, medium, and thick), and different rules for spacing within superscripts and subscripts to those applying outside, according to a leading authority @Cite { $knuth1984tex }. {@Code "@Eq"} therefore takes the spacing decisions upon itself, and consequently chooses to ignore all white space in its input, even between two objects. (The simplest way to restore the effect of white space to part of an equation is to enclose that part in a @Code "@Font" symbol.) @PP Every symbol provided by {@Code "@Eq"} has a @I {full name}, which equations. @RawIndex { equations } equations.fullname @SubIndex { full name of symbol } full.name @Index { full name of equation symbol } denotes the symbol without any space attached. Many symbols also have a @I {short name}, which denotes the same symbol with what equations. @RawIndex { equations } equations.shortname @SubIndex { short name of symbol } short.name @Index { short name of equation symbol } {@Code "@Eq"} considers to be an appropriate amount of space for that symbol attached to it. For example, @Eq { lessequal } has full name @Code lessequal and short name {@Code "<="}: @IL @LI { @Code "a lessequal b" |7ct @Eq { a lessequal b } } @LI { @Code "a <= b" |7ct @Eq { a <= b } } @EL {@Code "@Eq"} puts a thick space around relation symbols like {@Code "<="}, equations. @RawIndex { equations } equations.relation.symbols @SubIndex { relation symbols } relation.symbols @Index { relation symbols in equations } a medium space around binary operator symbols like {@Code "+"}, and a thin equations. @RawIndex { equations } equations.binaryoperators @SubIndex { binary operator symbols } binaryoperators @Index { binary operator symbols in equations } space after punctuation symbols (@Code ";" and {@Code ","}); except that equations. @RawIndex { equations } equations.punctuation @SubIndex { punctuation symbols } punctuation @Index { punctuation symbols in equations } in places where the symbols appear in a smaller size (superscripts, subscripts, etc.), these spaces are omitted. No other horizontal space is ever inserted. @PP The short names have been carefully designed to produce good-looking mathematics most of the time. It is best to rely on them in the first instance and only think about spacing when the result is not pleasing. In that case, {@Code "@Eq"}'s space can be removed by using the full names, equations. @RawIndex { equations } equations.spacing @SubIndex { spacing symbols } spacing.equations @Index { spacing symbols in equations } and thin, medium and thick space can be added using the following symbols: @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col B } { @Rowa A { @Code "`" } B { {@Code "0.18f"} ({@Code "0.018f"} in subscripts, etc.) } @Rowa A { @Code "``" } B { {@Code "0.24f"} ({@Code "0.024f"} in subscripts, etc.) } @Rowa A { @Code "```" } B { {@Code "0.30f"} ({@Code "0.030f"} in subscripts, etc.) } } where @Code "1f" is the current font size. These symbols have low precedence. The @Code "&" symbol from raw Lout is also available; the @Code "s" unit has value 0 and so is not very useful, but one can write @Code "&2m" for example for a two em space. The full names are tedious to remember, so {@Code "@Eq"} provides a @Code "non" symbol equations. @RawIndex { equations } equations.non @SubIndex { @Code "non" symbol } non.equations @Index { @Code "non" symbol (equations) } which removes spaces from its right parameter; thus @Code "non <=" is equivalent to {@Code "lessequal"}. There are also {@Code "rel"}, equations. @RawIndex { equations } equations.rel @SubIndex { @Code "rel" symbol } rel.equations @Index { @Code "rel" symbol (equations) } {@Code "bin"}, and {@Code "punct"} symbols for telling {@Code "@Eq"} equations. @RawIndex { equations } equations.bin @SubIndex { @Code "bin" symbol } bin.equations @Index { @Code "bin" symbol (equations) } equations. @RawIndex { equations } equations.punct @SubIndex { @Code "punct" symbol } punct.equations @Index { @Code "punct" symbol (equations) } to add space to the following symbol as though it was a relation symbol, binary operator, or punctuation symbol. @End @Section lout-3.39/doc/user/mat_intr0000644000076400007640000000470611363700677014355 0ustar jeffjeff@Section @Title { Getting started } @Begin @PP The Lout definitions for the @Code "@Math" symbol are accessed via a setup file called {@Code "math"}, which you must include at the start of your document if math.file @Index { @Code "math" file } you want mathematics, like this: @ID @OneRow @Code { "@SysInclude { tbl }" "@SysInclude { math }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } This shows what to do if you want both tables and mathematics, but you may leave out the line for tables if you don't want them. Setup files for specialized packages, such as {@Code "tbl"} and {@Code "math"}, are best included before the main setup file, but may be included in any order. @PP With the @Code "math" file included, you may write @ID @Code "@Math { ... }" at any point in your document, and the symbols of @Code "@Math" will be available between the braces. Any symbols available outside continue to be available inside, which means that mathematics may be freely mixed with other symbols. @PP The @Code "@Math" symbol may appear anywhere; its job is to produce an object containing mathematics, and it neither knows nor cares where that object goes. To display mathematics, use a display symbol like @Code "@IndentedDisplay" or @Code "@CentredDisplay" (Section {@NumberOf displays}). For example, @ID @Code "@CentredDisplay @Math { int from { 0 } to { pi } sin ` x = 0 }" produces @CentredDisplay @Math { int from { 0 } to { pi } sin ` x = 0 } There are also symbols for aligned and numbered displays (Section {@NumberOf mathdisplays}). @PP The @Code "@Math" symbol sets the mathematics in @I { display style }, mathematics.display.style @SubIndex { display style } display.style @Index { display style (mathematics) } a style suited to displays. To get mathematics within a paragraph, it is best to use a variant of @Code "@Math" called {@Code "@M"}. The mathematics.maaa @SubIndex { @Code "@M" } maaa. @Index { @Code "@M" (mathematics) } value of @Code "@M { ... }" will be kept together on one line, and it will appear in @I { text style }, a more compact style suited to mathematics.text.style @SubIndex { text style } text.style @Index { text style (mathematics) } mathematics within paragraphs. @PP Throughout this chapter we show the Lout input at the left, and its result at the right: @ID { @Code "@Math { {x sup 2 + y sup 2} over 2 }" |7ct @Math { {x sup 2 + y sup 2} over 2 } } Subsequent examples will omit the enclosing {@Code "@Math { ... }"}. @End @Section lout-3.39/doc/user/str_cont0000644000076400007640000001065111363700677014367 0ustar jeffjeff@Section @Title { Tables of contents } @Tag { contents } @Begin @PP Lout takes note of the titles of all your large-scale structure symbols contents. @Index { contents, tables of } tables.zzz.of.contents. @Index { tables of contents } (Section {@NumberOf largescale}) and what pages they begin on, and it uses this information to produce a table of contents like the one at the start of the present document. It is totally automatic; you do nothing. @PP Some details of the appearance of the table of contents, including whether to make one or not, are controlled by options in the setup file. The default setting is to make one in books but not to in other types of documents, but by changing the setup file you can have a table of contents in any type of document. @PP Section @NumberOf setup describes setup files in general and how to change the options within them. The options relevant to tables of contents and their default values are: @ID @OneRow @Code @Verbatim { @MakeContents { No } @ContentsGap { 0.2v } @ContentsGapAbove { 0.8v } @ContentsGapBelow { 0.0v } @ContentsFont { Bold } @ContentsPartGapAbove { 1.0v } @ContentsPartGapBelow { 0.0v } @ContentsFormat { number @DotSep title } @ContentsLeader { .. } @ContentsLeaderGap { 4s } @ContentsRightWidth { 3f } } The @Code "@MakeContents" option may be @Code Yes or {@Code No}, and makecontents. @Index @Code "@MakeContents" determines whether a table of contents is made or not. Its default value is @Code No but it is set to @Code Yes in the @Code book setup file. @PP @Code "@ContentsGap" determines how much vertical space to leave contentsgap. @Index @Code "@ContentsGap" above each line of the table of contents, in addition to the usual single line spacing; its value may be any length (Section {@NumberOf objects}). The default value, {@Code "0.2v"}, is twenty percent of the current inter-line spacing. @PP Some entries, such as those for chapters and appendices in books, are more important than others. @Code "@ContentsGap" does not apply to these entries; instead, @Code "@ContentsGapAbove" and @Code "@ContentsGapBelow" contentsgapabove. @Index @Code "@ContentsGapAbove" contentsgapbelow. @Index @Code "@ContentsGapBelow" are used above and below each of them, again in addition to the usual single line spacing. @Code "@ContentsFont" also applies only to these `major entries', and determines their font. The default value causes them to appear in Bold. @PP @Code "@ContentsPartGapAbove" and @Code "@ContentsPartGapBelow" are like @Code "@ContentsGapAbove" and @Code "@ContentsGapBelow", except that they are used before and after contents entries that denote book parts. @PP @Code "@ContentsFormat" determines the format of each entry of contentsformat. @Index @Code "@ContentsFormat" the table of contents. Within it, @Code number stands for the number of the chapter, section, or whatever, and @Code title for its title. The default value, {@Code "number @DotSep title"}, produces the number followed by a dot, two spaces, and the title, or just the title if there is no number. @PP @Code "@ContentsLeader" is the object which is repeated across the page contentsleader. @Index @Code "@ContentsLeader" to connect each entry with its page number; popular values are @Code ".." and @Code "." and the empty object. @Code "@ContentsLeaderGap" determines contentsleadergap. @Index @Code "@ContentsLeaderGap" how far apart these objects are; the default value, {@Code "4s"}, is four times the width of a space character. @Code "@ContentsLeaderGap" may be {@Code "0s"}, but only if @Code "@ContentsLeader" is non-empty. @PP @Code "@ContentsRightWidth" reserves some contentsrightwidth. @Index @Code "@ContentsRightWidth" space at the far right for page numbers. Any entry wide enough to intrude into this space is broken into two or more lines to keep it clear. @PP In addition to these options, each document type has options that determine which large-scale structure symbols will be listed in the table of contents. For example, among the options to the @Code "@BookSetup" symbol in the @Code book setup file are these: @ID @OneRow @Code { "@ChapterInContents { Yes }" "@SectionInContents { Yes }" "@SubSectionInContents { Yes }" "@SubSubSectionInContents { No }" "@AppendixInContents { Yes }" "@SubAppendixInContents { Yes }" "@SubSubAppendixInContents { No }" } Each may be either {@Code "Yes"} or {@Code "No"}; these default values produce entries for everything except sub-subsections and sub-subappendices. @End @Section lout-3.39/doc/user/bgr_incl0000644000076400007640000000772711363700677014325 0ustar jeffjeff@Section @Title { Including an illustration } @Tag { include } @Begin @PP The @Code "@IncludeGraphic" symbol incorporates into a Lout document an include.graphic @Index @Code "@IncludeGraphic" include.illus @Index { including an illustration } illustration (that is, an encapsulated PostScript or EPS file) produced by other means. For the opposite process, using Lout to produce an illustration for inclusion in some other document, see Section {@NumberOf illustrations}. @PP For example, suppose the encapsulated PostScript file @Code "su_crest.eps" contains the University of Sydney crest. Then @ID @Code "@IncludeGraphic su_crest.eps" produces @ID @IncludeGraphic su_crest.eps In general, the result produced by @Code "@IncludeGraphic" is an object that may be scaled, clipped, rotated, made into a display or placed within a paragraph, just like any other object. Accolades for this remarkable flexibility should go to the PostScript page description language, whose extraordinary power makes the provision of this feature in Lout almost trivial. @PP The @Code "@IncludeGraphic" command understands that files ending with any of the suffixes {@Code ".gz"}, {@Code "-gz"}, {@Code ".z"}, {@Code "-z"}, {@Code "_z"}, and {@Code ".Z"} are compressed files, and it will uncompress such files using the @Code "gunzip" command before including them. The uncompressed version is stored in a file called @Code "lout.eps" in the current directory, and removed after being copied into the output file. @PP If you place an included illustration in a line of text, or anywhere where you care about its alignment with things on each side, it will be positioned with its centre at the same height as the centre of the letter x. If this is not what you want, use the @Code "@VShift" symbol from Section {@NumberOf precise}: vshift. @Index @Code "@VShift" @ID @Code "... +0.5f @VShift @IncludeGraphic ..." prints the illustration half of the current font size higher on the page than would otherwise have been the case, and @ID @Code "... -0.5f @VShift @IncludeGraphic ..." prints it half the current font size lower. @PP Sometimes you need to include the same EPS file many times, for example once per page. If it is a large file it can make the output file very large to include it over and over again. Lout offers a solution to this problem, in the form of the includegraphicrepeated. @Index @Code "@IncludeGraphicRepeated" @Code "@IncludeGraphicRepeated" symbol. You place this at the start of your document, like this for example: @ID @Code { "@Include { doc }" "@IncludeGraphicRepeated { su_crest.eps }" } (note the braces around the following EPS file name). Adding @Code "@IncludeGraphicRepeated" like this does not actually print the graphic anywhere on any page; on the contrary, it is guaranteed to not change the appearance of your document at all. What it does do is give Lout a hint that the EPS file between the braces is likely to be included many times over in this document. Lout then handles this EPS file in a different way that involves copying it into the PostScript output file just once, no matter how many times it is included by subsequent @Code "@IncludeGraphic" symbols. @PP When your EPS file would otherwise be included many times over, using @Code "@IncludeGraphicRepeated" definitely makes your PostScript output file a lot shorter, and it usually makes it print faster as well. On the other hand, {@Code "@IncludeGraphicRepeated"} uses Level 2 PostScript features which some older printers may not have, and it consumes a lot of memory in the printer. If memory runs out your job will not print properly, so use @Code "@IncludeGraphicRepeated" with caution. @FootNote { A test file using @Code "@IncludeGraphicRepeated" generated by the author is currently (Version 3.35) being displayed correctly in two PostScript viewers and converted to PDF correctly by the Unix @Code ps2pdf command. This PDF file prints without any problems on the author's printer, but the original PostScript file does not. } @End @Section lout-3.39/doc/user/dia_tree0000644000076400007640000002704611363700677014316 0ustar jeffjeff@Section @Tag { dia_tree } @Title { Trees } @Begin @PP @@Diag offers some symbols for producing tree diagrams, using the diagrams. @RawIndex { diagrams } diagrams.tree @SubIndex { @Code "@Tree" symbol } tree.diagrams @Index { @Code "@Tree" symbol (diagrams) } @Code "@Tree" symbol, which may appear anywhere within the nodes part: @ID @OneRow @Code @Verbatim { @Diag { ... @Tree { ... } ... } } Within this symbol, new symbols {@Code "@LeftSub"}, {@Code "@RightSub"}, diagrams. @RawIndex { diagrams } diagrams.leftsub @SubIndex { @Code "@LeftSub" symbol } leftsub.diagrams @Index { @Code "@LeftSub" symbol (diagrams) } diagrams. @RawIndex { diagrams } diagrams.rightsub @SubIndex { @Code "@RightSub" symbol } rightsub.diagrams @Index { @Code "@RightSub" symbol (diagrams) } {@Code "@FirstSub"}, {@Code "@NextSub"}, and {@Code "@StubSub"} become available. The first two are used to get a (non-empty) binary tree: @ID @OneRow { @Code @Verbatim { @Tree { @Circle A @LeftSub { @Circle B @LeftSub @Square C @RightSub @Square D } @RightSub @Circle E } } ||7ct @Diag { @Tree { @Circle A @LeftSub { @Circle B @LeftSub @Square C @RightSub @Square D } @RightSub @Circle E } } } The root of the tree, which must be a single node but may have any outline, comes first. After that comes the @Code "@LeftSub" symbol followed by the left subtree, which must be enclosed in braces unless it consists of a single node. After that comes the @Code "@RightSub" symbol followed by the right subtree, again enclosed in braces unless it consists of a single node. These rules apply recursively and will produce a binary tree of arbitrary size and depth. If a node has no left or right subtree, leave out the corresponding @Code "@LeftSub" or @Code "@RightSub" symbol. @PP A similar system using @Code "@FirstSub" and @Code "@NextSub" produces diagrams. @RawIndex { diagrams } diagrams.firstsub @SubIndex { @Code "@FirstSub" symbol } firstsub.diagrams @Index { @Code "@FirstSub" symbol (diagrams) } diagrams. @RawIndex { diagrams } diagrams.nextsub @SubIndex { @Code "@NextSub" symbol } nextsub.diagrams @Index { @Code "@NextSub" symbol (diagrams) } trees in which each node may have arbitrarily many children: @ID @OneRow { @Code @Verbatim { @Tree { @Circle A @FirstSub { @Circle B @FirstSub @Square C @NextSub @Square D } @NextSub @Circle E @NextSub @Circle F } } ||7ct @Diag { @Tree { @Circle A @FirstSub { @Circle B @FirstSub @Square C @NextSub @Square D } @NextSub @Circle E @NextSub @Circle F } } } The first subtree is preceded by {@Code "@FirstSub"}, and subsequent trees are preceded by {@Code "@NextSub"}. The subtrees are spaced at equal separations from each other, with the root centred over them, in contrast to the binary tree arrangement in which the two subtrees are positioned to the left and right of the root, never intruding into the space beneath it. @PP Although each subtree must contain a node for its root, it is not hard to get around this: @ID @OneRow { @Code @Verbatim { @Tree { @Circle @FirstSub @Circle @NextSub pathstyle { noline } @Circle outlinestyle { noline } ... @NextSub @Circle } } ||7ct @Diag { @Tree { @Circle @FirstSub @Circle @NextSub pathstyle { noline } @Circle outlinestyle { noline } ... @NextSub @Circle } } } Clumsy as this is, it often assists in placing the unenclosed object in a way consistent with the surrounding nodes, and offers margins and so forth which help with fine-tuning its position. @PP The fifth subtree symbol, {@Code "@StubSub"}, produces a stub subtree: diagrams. @RawIndex { diagrams } diagrams.stubsub @SubIndex { @Code "@StubSub" symbol } stubsub.diagrams @Index { @Code "@StubSub" symbol (diagrams) } @ID @OneRow { @Code @Verbatim { @Tree { @Circle @Math { a } @StubSub @Math { T tsub a } } } ||7ct @Diag { @Tree { @Circle @Math { a } @StubSub @Math { T tsub a } } } } Unlike the other subtree symbols, {@Code "@StubSub"} is not followed by a subtree with a node for its root; rather, it is followed by an arbitrary object, and the path is drawn around this stub object, which is placed directly underneath the parent node with zero vertical separation. In practice, it is usually necessary to attach margins to the following object; the easiest way to do that is to enclose it in {@Code "@Box outlinestyle { noline }"}. An example appears below. @PP It is possible to mix the three subtree types, by having binary tree symbols following some nodes, non-binary tree symbols following others, and a single {@Code "@StubSub"} following others. However, at any one node the subtrees must be all either binary, non-binary, or stub. @PP The subtree symbols have all of the options of {@Code "@Link"}, and these apply to the link drawn from the parent of the root of the subtree to the root of the subtree (or anticlockwise around the stub object): @ID @OneRow { @Code @Verbatim { @Tree { @Circle A @LeftSub arrow { yes } xlabel { 1 } @Circle B @RightSub arrow { yes } xlabel { 2 } @Circle C } } ||7ct @Diag { @Tree { @Circle A @LeftSub arrow { yes } xlabel { 1 } @Circle B @RightSub arrow { yes } xlabel { 2 } @Circle C } } } To get reverse arrows use @Code "arrow { back }" as usual. @PP The subtree symbols do not need @Code from and @Code to options, because they already know which nodes they are linking together. However, you may use @Code from or @Code to to give a tag specifying a particular diagrams. @RawIndex { diagrams } diagrams.from @SubIndex { @Code "from" option } from.diagrams @Index { @Code "from" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.to @SubIndex { @Code "to" option } to.diagrams @Index { @Code "to" option (diagrams) } point within the node: @ID @OneRow { @Code @Verbatim { @Tree { @Circle @LeftSub from { S } to { N } @Isosceles vsize { 2f } @RightSub from { S } to { N } @Isosceles vsize { 2f } } } ||7ct @Diag { @Tree { @Circle @LeftSub from { S } to { N } @Isosceles vsize { 2f } @RightSub from { S } to { N } @Isosceles vsize { 2f } } } } In this example both links go from the @Code S tag of the parent node to the @Code N tag of the child node (at the apex of the iscosceles triangle). These options also work for {@Code "@StubSub"}, where they refer to the start and end of the stub path: @ID @OneRow { @Code @Verbatim { @Tree { @Circle @Math { a } @StubSub from { SW } to { SE } @Box outlinestyle { noline } @Math { T tsub a } } } ||7ct @Diag { @Tree { @Circle @Math { a } @StubSub from { SW } to { SE } @Box outlinestyle { noline } @Math { T tsub a } } } } and so the tags both refer to points in the parent node in this case. @PP The @Code "@LeftSub" and @Code "@RightSub" symbols have variants called @Code "@ZeroWidthLeftSub" and @Code "@ZeroWidthRightSub" which are the diagrams. @RawIndex { diagrams } diagrams.zerowidthleftsub @SubIndex { @Code "@ZeroWidthLeftSub" symbol } zerowidthleftsub.diagrams @Index { @Code "@ZeroWidthLeftSub" (diagrams) } diagrams. @RawIndex { diagrams } diagrams.zerowidthrightsub @SubIndex { @Code "@ZeroWidthRightSub" symbol } zerowidthrightsub.diagrams @Index { @Code "@ZeroWidthRightSub" (diagrams) } same except that the resulting subtrees consume no width: @ID @OneRow { @Code @Verbatim { @Tree { @Circle @LeftSub { @Circle @LeftSub @Square @RightSub @Square } @RightSub { @Circle @LeftSub { @Circle @ZeroWidthLeftSub @Square @ZeroWidthRightSub @Square } @RightSub @Square } } } ||7ct @Diag { @Tree { @Circle @LeftSub { @Circle @LeftSub @Square @RightSub @Square } @RightSub { @Circle @LeftSub { @Circle @ZeroWidthLeftSub @Square @ZeroWidthRightSub @Square } @RightSub @Square } } } } There is nothing analogous for the other subtree symbols. @PP The @Code "@Diag" symbol has a few options for adjusting the appearance of the tree. The @Code "treehsep" option determines the horizontal space left diagrams. @RawIndex { diagrams } diagrams.treehsep @SubIndex { @Code "treehsep" option } treehsep.diagrams @Index { @Code "treehsep" option (diagrams) } between a root and its left subtree, between a root and its right subtree, and between one subtree and the next when @Code "@NextSub" is used. The @Code "treevsep" option determines the vertical space left between a root diagrams. @RawIndex { diagrams } diagrams.treevsep @SubIndex { @Code "treevsep" option } treevsep.diagrams @Index { @Code "treevsep" option (diagrams) } and its subtrees: @ID @OneRow { @Code @Verbatim { @Diag treehsep { 0c } treevsep { 0c } { @Tree { @Circle A @LeftSub @Square B @RightSub @Square C } } } ||7ct @Diag treehsep { 0c } treevsep { 0c } { @Tree { @Circle A @LeftSub @Square B @RightSub @Square C } } } These options may also be given to individual subtree symbols, although @Code "treevsep" works as expected only with @Code "@LeftSub" and {@Code "@FirstSub"}, since these determine the vertical separation of all children of their parent. @PP The @Code "treehindent" option determines where the root of a non-binary diagrams. @RawIndex { diagrams } diagrams.treehindent @SubIndex { @Code "treehindent" option } treehindent.diagrams @Index { @Code "treehindent" option (diagrams) } tree is positioned over its subtrees; the value may be @Code "left" for at left, @Code "ctr" for centred over them (the default), @Code "right" for at the right, or any length, meaning that far from the left. Owing to problems behind the scenes, this option may not be given to individual subtree symbols; so as a consolation, it is permitted as an option to the @Code "@Tree" symbol. @PP It is not possible to attach tags to nodes within a tree, because tags are attached automatically by the tree symbols and any extra tags would disrupt the linking. However, you can use @Code "@ShowTags" to find out what these automatic tags are, and use them in a subsequent links part. For example, the tag attached to the right child of the left child of the root of a binary tree is {@Code "L@R@T"}, and in general the tag records the path from the root to the node, with @Code "T" added to the end. The root always has tag {@Code "T"}. The tree as a whole may be retagged in the usual way. @PP There is an @Code "@HTree" symbol which is the same as diagrams. @RawIndex { diagrams } diagrams.htree @SubIndex { @Code "@HTree" symbol } htree.diagrams @Index { @Code "@HTree" symbol (diagrams) } @Code "@Tree" except that the tree grows horizontally (from left to right) instead of vertically. The same symbols are available within @Code "@HTree" as within {@Code "@Tree"}; @Code "@LeftSub" and @Code "@FirstSub" produce what might be called the top subtree, and @Code "@RightSub" and @Code "@NextSub" produce lower trees. @Code "@HTree" has no @Code "treehindent" option; instead, it has an exactly analogous @Code "treevindent" option. diagrams. @RawIndex { diagrams } diagrams.treevindent @SubIndex { @Code "treevindent" option } treevindent.diagrams @Index { @Code "treevindent" option (diagrams) } @PP @Code "@HTree" may be used to get horizontal lists: @ID @OneRow { @Code @Verbatim { @I @Diag arrow { yes } treehsep { 1c } { @HTree { @Node A @FirstSub { @Node B @FirstSub @Node C } } } } ||7ct @I @Diag arrow { yes } treehsep { 1c } { @HTree { @Node A @FirstSub { @Node B @FirstSub @Node C } } } } The braces are clumsy but necessary. The first node has tag {@Code "T"}, the second has tag {@Code "S@T"}, the third has tag {@Code "S@S@T"}, and so on. @End @Section lout-3.39/doc/user/ap_byp0000644000076400007640000001021411363700677014001 0ustar jeffjeff@Appendix @Title { Bypass Symbols } @Tag { bypass } @Begin @PP The `bypass' symbols described in this appendix are intended to be bypass.symbols @Index { bypass symbols } used in Lout which is generated by computer programs. Their purpose is to bypass the Lout cross reference database, and so reduce the number of passes needed to finalise a document. These symbols are not intended to be used by people, because that would only lead back to the consistency problems that prompted the introduction of cross references in the first place. @PP To produce a bypass table of contents, set the @Code "@MakeContents" setup file option to @Code "Bypass" and use @Code "@BypassContentsEntry" symbols at the outermost level just before the introduction or first chapter: @ID @Tab @Fmta { @Col @Code A ! @Col ! @Col B } vmargin { 0.5vx } { @Rowa A { "@BypassContentsEntry" } @Rowa A { " indent { 0f }" } B { the indent, e.g. {@Code "0f"}, {@Code "2f"}, {@Code "4f"} ... } @Rowa A { " number {}" } B { the section (etc.) number e.g. {@Code "5.2"} } @Rowa A { " title {}" } B { the section (etc.) title e.g. @Code "Azaleas" } @Rowa A { " pagenum {}" } B { the page number e.g. @Code "@PageOf azaleas" } } For major entries such as chapters, use @Code "@BypassMajorContentsEntry" with the same options. This increases the vertical spacing and uses bold font. When @Code "@MakeContents" is {@Code "Bypass"}, no contents entries will be produced automatically. @PP To bypass Lout's automatic numbering of large-scale structure symbols, use the @Code "@BypassNumber" option: @ID @Code { "@Section" " @Title { Azaleas }" " @Tag { azaleas }" " @BypassNumber { 5.2 }" "..." } Give the full `path number' (5.2, B.3 or whatever) of the symbol. There is a @Code "@BypassNumber" option for every symbol that has a @Code "@Title" option and is usually assigned a number automatically by Lout, plus {@Code "@Figure"}, {@Code "@Table"}, and (since Version 3.36) the numbered display symbols. No changes to the setup file are required in order to use {@Code "@BypassNumber"}, and it is permitted for some large-scale structure symbols to have this option and others not. @PP To produce a bypass reference list, set the @Code "@MakeReferences" setup file option to @Code "Bypass" and place reference entries at the end of the document, after the last chapter or other large-scale structure symbol but before any bypass index entries (see below), like this: @ID @Code { "@BypassReference" " label { [Kin94a] }" " value { @RefPrint kingston1995lout.expert }" } The two options are objects which become the label and value of the reference entry. The @Code "value" option can be any object, including an explicit reference; but @Code "@RefPrint" does not introduce any cross-referencing delay if the @Code "@Reference" symbols lie in a separate database file. No sorting or removal of duplicate entries will be done by Lout. When @Code "@MakeReferences" is {@Code "Bypass"}, @Code "@Cite" and related symbols are ignored. @PP There is also @Code "@BypassChapReference" with the same options for producing bypass chapter reference lists; these symbols should be placed at the outer level immediately after the preface, introduction, chapter or appendix that they refer to. @PP To produce bypass indexes, set the @Code "@MakeIndex" setup file option to {@Code Bypass} and use the @Code "@BypassRawIndex" symbol repeatedly at the very end of the document, enclosed in @Code "@BypassBeginIndex" and @Code "@BypassEndIndex" symbols: @ID @Code { "@BypassBeginIndex" "@BypassRawIndex indent { 0f } { Azaleas, @PageOf azaleas }" "..." "@BypassEndIndex" } The @Code "indent" option gives the indent ({@Code "0f"}, @Code {"1f"}, @Code {2f}, etc.), and the right parameter is as for @Code "@RawIndex". No @Code "@PageMark" operations, sorting, merging, or attachment of page numbers will be done by Lout. When @Code "@MakeIndex" is {@Code Bypass}, @Code "@Index" and related symbols are ignored. At present, bypass index symbols work only in books, not with ordinary documents or technical reports. There are corresponding symbols for creating bypass indexes A and B. @End @Appendix lout-3.39/doc/user/prg_prog0000644000076400007640000000274311363700677014356 0ustar jeffjeff@Section @Title { Embedding program text within program comments } @Tag { cpp_prog } @Begin @PP The standard reference for the Eiffel language @Cite { $meyer1992eiffel } programs. @RawIndex { programs } programs.programtext @SubIndex { program text in comments } programtext.programs @Index { program text in program comments } specifies that identifiers within comments may or should be enclosed in ` and ' so that they may be noticed and printed in an italic font: @ID @OneRow @Code @Verbatim { @ID @Eiffel { deposit(amount: REAL) is -- deposit `amount' dollars } } produces @ID @OneRow @Eiffel { deposit(amount: REAL) is -- deposit `amount' dollars } This has been generalized in Lout: arbitrary text within an Eiffel comment between ` and ' will be treated as Eiffel text and printed accordingly. Some other languages may also offer this feature: see the fifth column of the table at the start of this chapter. In principle the precise means of getting it could vary from language to language, but the languages available at the moment either do not have it at all, or else they use ` and ' like Eiffel. @PP On the subject of Eiffel, the Eiffel reference @Cite { $meyer1992eiffel } has some quite detailed style guidelines, and these have been closely followed in the implementation of the @Code "@Eiffel" symbol. In particular, @Code "@Eiffel" prints dots larger than usual when they denote feature calls, as the example @OneCol @Eiffel { account.deposit(20) } shows. @End @Section lout-3.39/doc/user/vbgr0000755000076400007640000000022511363700677013473 0ustar jeffjeffgvim bgr gvim bgr_colo gvim bgr_text gvim bgr_boxs gvim bgr_outl gvim bgr_rota gvim bgr_scal gvim bgr_clip gvim bgr_mirr gvim bgr_incl gvim bgr_prec lout-3.39/doc/user/dia_posi0000644000076400007640000001525211363700677014325 0ustar jeffjeff@Section @Tag { dia_posi } @Title { Positioning } @Begin @PP Once the nodes of the diagram are in place, @@Diag can be trusted to look diagrams. @RawIndex { diagrams } diagrams.positioning @SubIndex { positioning nodes } positioning.diagrams @Index { positioning nodes in diagrams } after the rest: links to standard outlines will terminate neatly on their boundaries, labels will not overstrike links no matter what direction they are heading, and so on. The great weakness of @@Diag is in positioning the nodes. This is partly because `what pleases the eye' is the positioning rule in many diagrams, and an interactive system is really needed in such cases; and partly because, even when the rule is more formal (for example, when the nodes are to be laid out in a grid), @@Diag does not have symbols to produce it anyway. @PP Previous examples have used @Code "@DP" for getting nodes one under another, and white space between nodes for getting them side by side, but this is very primitive. This section suggests three better ways: using {@Code "@Tbl"}, using {@Code "@Graph"}, and using coordinates; and the following section adds a fourth, using @@Diag's tree-drawing symbols. It's a bit of a jumble. @PP The {@Code "@Tbl"} symbol (Chapter {@NumberOf tables}) is a good choice when the nodes have any kind of grid-like arrangement: @ID @OneRow { @Code @Verbatim { @Diag { @Tbl aformat { @Cell A | @Cell B | @Cell C } marginhorizontal { 0.5c } marginvertical { 0.25c } { @Rowa B { A:: @Square } @Rowa A { B:: @Square } C { C:: @Square } @Rowa B { D:: @Square } } // @Arrow from { A } to { B } @Arrow from { A } to { C } @Arrow from { B } to { D } @Arrow from { C } to { D } @Arrow from { A } to { D } } } ||9ct @Diag { @Tbl aformat { @Cell A | @Cell B | @Cell C } marginhorizontal { 0.5c } marginvertical { 0.25c } { @Rowa B { A:: @Square } @Rowa A { B:: @Square } C { C:: @Square } @Rowa B { D:: @Square } } // @Arrow from { A } to { B } @Arrow from { A } to { C } @Arrow from { B } to { D } @Arrow from { C } to { D } @Arrow from { A } to { D } } } The table occupies the nodes part. Tags may have the same name as columns; the two can never conflict. @PP Similarly, the @Code "@Graph" symbol from Chapter {@NumberOf graphs} has an @Code "objects" option which can place arbitrary objects, including labelled nodes, anywhere on a graph: @ID @OneRow { @Code @Verbatim { @Diag { @Graph xmin { 0 } xmax { 100 } ymin { 0 } ymax { 100 } objects { @CTR at { 20 30 } { A:: @Square } @CTR at { 60 70 } { B:: @Square } } {} // @Link from { A } to { B } } } ||8.5ct @Diag { @Graph xmin { 0 } xmax { 100 } ymin { 0 } ymax { 100 } objects { @CTR at { 20 30 } { A:: @Square } @CTR at { 60 70 } { B:: @Square } } {} // @Link from { A } to { B } } } Once again the @Code "@Graph" symbol occupies the nodes part. You can get rid of the axes by setting the @Code "style" option of @Code "@Graph" to {@Code none}, and then it won't look like a graph at all. @PP @@Diag has a system of node positioning based on coordinates which is somewhat similar to the @Code "@Graph" one. It is often the easiest way to scatter nodes about a diagram at random. The first step is to create a nodes part that is just an empty space of whatever size you want the final diagram to be: @ID @OneRow @Code @Verbatim { @Diag { 4c @High 6c @Wide // ... } } As shown, this is done with the @Code "@Wide" and @Code "@High" symbols from basic Lout; the above diagram will be four centimetres high by six centimetres wide. @PP @@Diag has a @Code "," symbol that allows you to specify a point by diagrams. @RawIndex { diagrams } diagrams.coordinates @SubIndex { coordinates } coordinates.diagrams @Index { coordinates in diagrams } its coordinates in the diagram's base. For example, @Code "0,0" denotes the bottom left-hand corner of the base, @Code "1,0" denotes the bottom right-hand corner, and @Code "0.5,0.5" denotes the centre of the base. Coordinates should usually be between 0 and 1, since otherwise they denote points outside the base (which is allowed but seldom useful). @PP Every node symbol has a @Code "translate" option which allows you diagrams. @RawIndex { diagrams } diagrams.translate @SubIndex { @Code "translate" option } translate.diagrams @Index { @Code "translate" option (diagrams) } to move the node about on the diagram's base (or off it if you use coordinates less than 0 or greater than 1). If you use this option, the node effectively has zero size and overstrikes anything else in the area you put it (like labels do). It is best to put these nodes in the links part: @ID @OneRow { @Code @Verbatim { @Diag { @Box margin { 0c } 4c @Wide 5c @High // A:: @Square translate { CTR to 0.5, 0.67 } { @I A } B:: @Circle translate { CTR to 0.8, 0.25 } { @I B } } } ||9ct @Diag { @Box margin { 0c } 4c @Wide 5c @High // A:: @Square translate { CTR to 0.5, 0.67 } { @I A } B:: @Circle translate { CTR to 0.8, 0.25 } { @I B } } } A box with margin zero has been drawn around the empty space to show its extent. The value of @Code "translate" should always be {@I point} @Code to {@I point}; the first point lies within the node, the second lies within the nodes part, and the translation makes these two points coincide. @PP You are free to have nodes in the nodes part as well, or any object at all. Here is an example which shows what a little ingenuity can accomplish: @ID @OneRow { @Code @Verbatim { @Diag { @Polygon sides { 5 } outlinestyle { noline } hsize { 4c } vsize { 4c } // A:: @Circle translate { N to P1 } {} B:: @Circle translate { N to P2 } {} C:: @Circle translate { N to P3 } {} D:: @Circle translate { N to P4 } {} E:: @Circle translate { N to P5 } {} @Link arrow { both } from { A } to { B } @Link arrow { both } from { B } to { C } @Link arrow { both } from { C } to { D } @Link arrow { both } from { D } to { E } @Link arrow { both } from { E } to { A } } } ||9ct @Diag { @Polygon sides { 5 } outlinestyle { noline } hsize { 4c } vsize { 4c } // A:: @Circle translate { N to P1 } {} B:: @Circle translate { N to P2 } {} C:: @Circle translate { N to P3 } {} D:: @Circle translate { N to P4 } {} E:: @Circle translate { N to P5 } {} @Link arrow { both } from { A } to { B } @Link arrow { both } from { B } to { C } @Link arrow { both } from { C } to { D } @Link arrow { both } from { D } to { E } @Link arrow { both } from { E } to { A } } } This uses the tags of a phantom polygon to position the real nodes. It would be a rare interactive system that could position nodes with this precision; @@Diag shines whenever there is a formal positioning rule to follow. @End @Section lout-3.39/doc/user/vgra0000755000076400007640000000014611363700677013474 0ustar jeffjeffgvt gra gra_intr gra_over gra_capt gra_tick gra_data gra_plac gra_func \ gra_keys gra_erro gra_summ lout-3.39/doc/user/bgr_colo0000644000076400007640000000534311363700677014324 0ustar jeffjeff@Section @Title { Colour } @Tag { colour } @Begin @PP Colour is obtained in much the same way that fonts and language changes colour. @Index @Code "@Colour" color. @Index @Code "@Color" are, using the @Code "@Colour" (or equivalently {@Code "@Color"}) symbol: @ID @Code "grey @Colour { Hello, world }" produces @ID grey @Colour { Hello, world } The @Code "@Colour" symbol will accept any of the following colours: @QD @HAdjust @Tab vmargin { 0.5vx } hmargin { 0.2c } @Fmta { @Col A @Colour @FilledBox ! @Col @Code A ! @Col ! @Col B @Colour @FilledBox ! @Col @Code B ! @Col ! @Col C @Colour @FilledBox ! @Col @Code C } @Fmtb { @Col A @Colour @FilledBox ! @Col @Code A ! @Col ! @Col B @Colour @FilledBox ! @Col @Code B ! @Col ! @Col ! @Col } { @Rowa A { darkred } B { red } C { lightred } @Rowa A { darkgreen } B { green } C { lightgreen } @Rowa A { darkblue } B { blue } C { lightblue } @Rowa A { darkcyan } B { cyan } C { lightcyan } @Rowa A { darkmagenta } B { magenta } C { lightmagenta } @Rowa A { darkyellow } B { yellow } C { lightyellow } @Rowa A { darkgrey } B { grey } C { lightgrey } @Rowa A { darkgray } B { gray } C { lightgray } @Rowb A { black } B { white } } Monochrome output devices will render them as shades of grey. Colouring something @Code white makes it invisible (unless printed on a coloured background), which is sometimes useful. See Appendix {@NumberOf morecolours} to get many more colour names, using the @Code xrgb include file and its @Code "@Xrgb" symbol. @PP In addition to the list of colours given above, there is a special {@Code nochange} colour which produces whatever colour you already happen to be using; you can also use an empty object to ask for this. And you can get lots more colours by specifying them using numbers, like this: @ID @Code "{ rgb 0.5 0.5 1.0 } @Colour { Hello, world }" which means use red at intensity 0.5, green at intensity 0.5, and blue at intensity 1.0, producing @ID { rgb 0.5 0.5 1.0 } @Colour { Hello, world } In the strange world of colour coordinates, in which 0 is dark and 1 is light, this is a light blue. You can also use the CMYK system: @ID @Code "{ cmyk 0.5 0.5 1.0 1.0 } @Colour { Hello, world }" produces @ID { cmyk 0.5 0.5 1.0 1.0 } @Colour { Hello, world } Wherever in this document it says that that you can use any colour from this section, it means any of the names above, or {@Code nochange}, or an object beginning with @Code "rgb" or @Code "cmyk" as shown. @PP Whether the colours produced by @Code "@Colour" actually correspond with the names depends on the output device; the same nominal colour can look quite different on screen and on paper. @End @Section lout-3.39/doc/user/prg_lone0000644000076400007640000000412611363700677014341 0ustar jeffjeff@Section @Title { Typesetting computer programs independently of any document } @Tag { alone } @Begin @PP Printing of program files independently of any document is done by programs. @RawIndex { programs } programs.standalone @SubIndex { stand-alone } standalone.programs @Index { stand-alone programs } the Unix pipeline @ID @Code "prg2lout -l language options files | lout -s > out.ps" where @Code language stands for any one of the programming language names in the first column of the table above. As usual with Lout, the output will be a PostScript file. Each input file will begin on a new page of the output, starting with its name in bold type. The @Code options are @WideTaggedList @TI { {@Code-p}{@I style} } { Select a printing style (Section {@NumberOf embedded}), either {@Code -pfixed}, {@Code -pvarying}, or {@Code -psymbol}. The default value varies with the language, as shown in the fourth column of the table above. } @TI { @Code -n } { Do not print file names. } @TI { {@Code -f}{@I font} } { Select a font family. The default is @Code "-fCourier" for {@Code -pfixed}, and @Code "-fTimes" otherwise. } @TI { {@Code -v}{@I vsize} } { Select an inter-line spacing size in Lout units. The default is @Code -v1.1fx meaning 1.1 times the font size measured from baseline to baseline. } @TI { {@Code -b}{@I number} } { Select a blank line scale factor, usually a number between 0.5 and 1.0, indicating the factor by which the usual amount of white space inserted to represent a blank line is to be reduced. The default is @Code { 1.0 }, meaning no reduction. } @TI { {@Code -L}{@I number} } { Add line numbers to the print, starting with {@I number}, or 1 if {@I number} is omitted. } @TI { {@Code -N} } { Do not print line numbers at the start of blank lines. } @TI { {@Code -S}{@I file} } { Use @I file as the setup file for printing your language. This allows you to change all the options mentioned in subsequent sections, rather than just the few given here. } @EndList There are also {@Code -t} and {@Code -T} options for dealing with tab characters (Section {@NumberOf tabs}). @End @Section lout-3.39/doc/user/.README.swp0000644000076400007640000003000011446021726014336 0ustar jeffjeffb0VIM 7.2˜Lž jefflocalhost~jeff/lout/lout/doc/user/README 3210#"! Utp.ad)ý.èç¤eTS87ú¼}=û ¸ € C  à ˆ ‡ ^  Þ Ÿ ^  ä ª © e # à œ Z Y  ͨ§i$#ýü21 September 2010Jeffrey H. Kingstonstored at "ftp://ftp.it.usyd.edu.au/jeff/lout/lout-3.39.user.ps.gz".A copy of the final PostScript output file (A4 paper size) isclose to large unbreakable displays.repeated failure to converge, caused by footnotes and floating figuresOptimal page breaking has been turned off for this document owing topaper, you will get a somewhat different set of warning messages.these cases was deliberate. If you set the document in Letter sizetwo places where a C program text ended inside a comment, which indown slightly to fit on the page. The last two warnings point toThe first two warnings are about large tables that had to be scaled 68,35: prg2lout 2,1: program text ended within comment 66,23: prg2lout 2,1: program text ended within commentlout file "prg_tabs" (from "prg" line 139, from "all" line 48): 10,1: 25.7c object too high for 23.6c space; @Scale insertedlout file "gra_summ" (from "gra" line 44, from "all" line 46): 234,1: 23.7c object too high for 23.7c space; @Scale insertedlout file "gra_tick" (from "gra" line 38, from "all" line 46): : lout -r beginning run 6:lout:error message output on the last run for A4 size printing:should gradually go away on later runs. The following shows thenearly all beginning with "unresolved cross reference". TheseThe first run will produce a large number of error messages,breaks in the early runs that so many runs are needed.is an unusually large number; it is owing to some unfortunate page.li and .ld suffixes will be created in this directory. Six runsproduced after one run if -r was omitted. Auxiliary files withcross references, although a readable PostScript file would bedocument six times. This is needed to completely resolve allin this directory. The -r6 flag causes Lout to run over the lout -r6 all > user.pstype the commandto the Lout Document Formatting System. To produce the Guide,This directory contains the Lout source files for the User's GuideDirectory lout/doc/userlout-3.39/doc/user/fmt_size0000644000076400007640000000671211363700677014357 0ustar jeffjeff@Section @Title { Page size and page orientation } @Tag { pagesize } @Begin @PP This section explains how to use the setup file options that determine page size and page orientation. Here they are with their default values: page.type @Index @Code "@PageType" @ID @OneRow @Code @Verbatim { @PageType { A4 } @PageWidth {} @PageHeight {} @PageOrientation { Portrait } } The default value at your site may be different, since installers of Lout are recommended to set it to the usual size of a piece of paper at their location. The easy way to change the page size is to set the @Code "@PageType" option to the name of the paper you use: @ID @Tab vmargin { 0.5vx } @Fmtb { @Col ! @Col ! @Col @I @RR B ! @Col @I @RR C } @Fmta { @Col @Code { "@PageType {" A "}" } ! @Col ! @Col @Code @CC B ! @Col @Code @CC C } { @Rowb B { width in points } C { height in points } @Rowa A { Letter } B { 612p } C { 792p } @Rowa A { Tabloid } B { 792p } C { 1224p } @Rowa A { Ledger } B { 1224p } C { 792p } @Rowa A { Legal } B { 612p } C { 1008p } @Rowa A { Statement } B { 396p } C { 612p } @Rowa A { Executive } B { 540p } C { 720p } @Rowa A { A0 } B { 2380p } C { 3368p } @Rowa A { A1 } B { 1684p } C { 2380p } @Rowa A { A2 } B { 1190p } C { 1684p } @Rowa A { A3 } B { 842p } C { 1190p } @Rowa A { A4 } B { 595p } C { 842p } @Rowa A { A5 } B { 420p } C { 595p } @Rowa A { B4 } B { 729p } C { 1032p } @Rowa A { B5 } B { 516p } C { 729p } @Rowa A { Folio } B { 612p } C { 936p } @Rowa A { Quarto } B { 610p } C { 780p } @Rowa A { 10x14 } B { 720p } C { 1008p } } This will automatically assign the widths and heights shown above to the @Code "@PageWidth" and @Code "@PageHeight" options, so you don't have to worry about those options. If your paper size is not on this list, set @Code "@PageType" to @Code Other and supply your own width and height: page.width @Index @Code "@PageWidth" page.height @Index @Code "@PageHeight" @ID @Tab vmargin { 0.5vx } @Fmta { @Col @Code A } { @Rowa A { "@PageType { Other }" } @Rowa A { "@PageWidth { 12.0c }" } @Rowa A { "@PageHeight { 18.0c }" } } The width and height may each be any length (Section {@NumberOf objects}), and do not have to be in points. @PP The basic page orientations are @I portrait and @I landscape: page.orientation @Index @Code "@PageOrientation" @ID @Tab @Fmta { @Col 8c @Wide @Code A ! @Col B } { @Rowa A { "@PageOrientation { Portrait }" } B { @Box 1.0c @Wide 1.4c @High { Hello } } @Rowa @Rowa A { "@PageOrientation { Landscape }" } B { @Box 1.4c @Wide 1.0c @High { Hello } } } When changing to {@Code Landscape}, do not change the page type, page width, or page height, and do not change the way you feed your paper into the printer. Lout knows what to do. @PP Two other orientations are provided which are 180@Degree rotations of the basic ones: @ID @Tab @Fmta { @Col 8c @Wide @Code A ! @Col B } { @Rowa A { "@PageOrientation { ReversePortrait }" } B { @Box 1.0c @Wide 1.4c @High { //1rt &1rt 180d @Rotate Hello } } @Rowa @Rowa A { "@PageOrientation { ReverseLandscape }" } B { @Box 1.4c @Wide 1.0c @High { //1rt &1rt 180d @Rotate Hello } } } @Code ReverseLandscape might be useful when post-processing the PostScript output to print two landscape pages per sheet. The @Code "@PageOrientation" symbol is available at the start of a document, as well as in the setup file, like {@Code "@InitialFont"} and {@Code "@PageHeaders"}. @End @Section lout-3.39/doc/user/gra_capt0000644000076400007640000001025311363700677014312 0ustar jeffjeff@Section @Title { Captions } @Tag { captions } @Begin @PP There are options for placing captions above, below, left, and right of captions. @RawIndex { captions } captions.graphs @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.captions @SubIndex { captions } graphs.abovecaption @SubIndex { @Code abovecaption option } abovecaption. @RawIndex { @Code "abovecaption" option } abovecaption.graph @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.belowcaption @SubIndex { @Code belowcaption option } belowcaption. @RawIndex { @Code "belowcaption" option } belowcaption.graph @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.leftcaption @SubIndex { @Code leftcaption option } leftcaption. @RawIndex { @Code "leftcaption" option } leftcaption.graph @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.rightcaption @SubIndex { @Code rightcaption option } rightcaption. @RawIndex { @Code "rightcaption" option } rightcaption.graph @SubIndex { in graphs } the frame: @ID @OneRow @Code { "@Graph" " abovecaption { This appears above }" " belowcaption { This appears below }" " leftcaption { At left }" " rightcaption { At right }" "{" "}" } produces @CD @Graph abovecaption { This appears above } belowcaption { This appears below } leftcaption { At left } rightcaption { At right } { } The captions may be arbitrary Lout objects, so may include equations, {@Code "@Rotate"}, and so on. Each caption except @Code rightcaption is printed in the @Code "clines @Break" style, which means that multiple lines in one caption will be centred beneath each other. The @Code rightcaption option uses the @Code "lines @Break" style, in which the lines are left justified beneath each other. Incidentally, this example shows what happens if there is no data. @PP There are options for controlling the amount of space between each caption (when non-empty) and the frame. Here they are with their graphs. @RawIndex { graphs (statistical) } graphs.abovegap @SubIndex { @Code abovegap option } abovegap. @RawIndex { @Code "abovegap" option } abovegap.graphs @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.belowgap @SubIndex { @Code belowgap option } belowgap. @RawIndex { @Code "belowgap" option } belowgap.graphs @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.leftgap @SubIndex { @Code leftgap option } leftgap. @RawIndex { @Code "leftgap" option } leftgap.graphs @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.rightgap @SubIndex { @Code rightgap option } rightgap. @RawIndex { @Code "rightgap" option } rightgap.graphs @SubIndex { in graphs } default values: @ID @OneRow @Code @Verbatim { @Graph abovegap { 0.5c } belowgap { 0.5c } leftgap { 1.5c } rightgap { 0.5c } { ... } } This is particularly important in the case of {@Code "leftgap"} (and @Code "rightgap" if @Code rticks is used), because Lout has no idea how wide the ticks and labels attached to the y axis are; 1.5c is just a wild guess and often needs adjustment. On the other hand, Lout does know how high the ticks and labels on the x axis are; it allows 1.7 times the current font size for them, and @Code "belowgap" is additional to this. @PP When a graph is to be presented as a centred display, it is generally best if the centring is done with respect to the frame alone, not the captions, ticks, and labels. The @Code "hidecaptions" option does this by graphs. @RawIndex { graphs (statistical) } graphs.hidecaptions @SubIndex { @Code hidecaptions option } hidecaptions. @RawIndex { @Code "hidecaptions" option } hidecaptions.in.graphs @SubIndex { in graphs } making the left and right captions and gaps seem to Lout to have zero width: @ID @OneRow @Code @Verbatim { @Graph hidecaptions { yes } { ... } } Actually @Code "yes" has been made the default value, since the vast majority of graphs are centred displays. In the rare cases where this feature is not wanted (for example, if a graph appears as an entry in a table), use {@Code "hidecaptions { no }"}. The y and r ticks and labels seem to Lout to have zero width already, so do not need to be hidden. @End @Section lout-3.39/doc/user/bas_verb0000644000076400007640000001056211363700677014320 0ustar jeffjeff@Section @Title { Verbatim and piped text } @Tag { verbatim } @Begin @PP The @Code "@Verbatim" symbol @FootNote { Prior to Version 3.13 the @Code "@Verbatim" symbol was restricted to Unix systems only. This restriction no longer applies to @Code "@Verbatim" and {@Code "@RawVerbatim"}, but it does apply to {@Code "@Pipe"}, {@Code "@PipeVerbatim"}, and {@Code "@PipeRawVerbatim"}. } prints the following object exactly as verbatim.sym @Index @Code "@Verbatim" it appears in the input file. All special meanings for characters, symbols, etc. are turned off; there is one result line for each input line. For example, @ID @Code @Verbatim { @IndentedDisplay @Verbatim { A line of "verbatim" text Another line, with a \ character } } has result @IndentedDisplay @Verbatim { A line of "verbatim" text Another line, with a \ character } Use @Code "@F @Verbatim { ... }" to get the result in a fixed-width font. @PP If the verbatim text contains @Code "{" or @Code "}" characters, then they should either be balanced or else you need to use the alternative form @ID @Code { "@Verbatim @Begin" "..." "@End @Verbatim" } so that there is no doubt about where the verbatim text ends. Although we have said that there are no special meanings, there is one exception to this rule: @Code "@Include" and @Code "@SysInclude" commands are recognized, allowing all or part of the verbatim text to come from some other file. Braces do not have to be balanced in that file. @PP Occasionally the first line of some verbatim text begins with some spaces that have to be preserved. This is a problem for @Code "@Verbatim" because it ignores all white spaces following the opening brace and all white spaces preceding the closing brace. However, the alternative @Code "@RawVerbatim" symbol stops ignoring white spaces at the opening raw.verbatim.sym @Index @Code "@RawVerbatim" as soon as a newline character is reached; in other words, it will preserve all white spaces following the first newline. @PP The @Code "@Pipe" symbol (available on Unix-style systems only) may be pipe.sym @Index @Code "@Pipe" used to pipe some text through a Unix command. For example, @ID @Code lines @Break @Verbatim { @ID lines @Break "sort" @Pipe { Gaskell, Elizabeth Lawrence, D. H. Austen, Jane Dickens, Charles } } will cause the object between braces following @Code "@Pipe" to be piped without interpretation through the Unix @Code "sort" command; its output is the result of the @Code "@Pipe" command, here made into a display preserving the line breaks in the output. The final result will be the four authors, one per line, in alphabetical order. We can't show this result to you because that would make this manual not compilable on non-Unix systems. @PP The double quotes around @Code sort are not necessary in this example, but may be in more complex ones. For example, one can see just the first few lines of the sorted result using @ID @Code @Verbatim { "sort | head" @Pipe ... } and here the quotes are necessary because @Code "|" is one of the special characters that need quoting, according to Section {@NumberOf characters}. The quotes also serve to group the command into a single Lout object. @PP Some Unix commands don't need any input, and then the object following @Code "@Pipe" may be empty. For example, @ID @Code @Verbatim { "ls" @Pipe {} } will list the files of the current directory. @PP Any Lout symbols in the result of the @Code "@Pipe" symbol, such as {@Code "@PP"}, {@Code "@Box"}, and so on, will be interpreted in the usual way. This is convenient because it allows you to write your own Unix commands that include Lout symbols in their output. However, sometimes it is preferable if the output is treated verbatim. For example, @ID @Code @Verbatim { "pwd" @Pipe {} } attempts to print the current working directory, but this will not come out well because the output contains {@Code "/"} symbols, which Lout will then attempt to interpret as Lout symbols. To avoid this problem, use @Code "@PipeVerbatim" instead of {@Code "@Pipe"}: pipeverbatim.sym @Index @Code "@PipeVerbatim" piperawverbatim.sym @Index @Code "@PipeRawVerbatim" @ID @Code @Verbatim { "pwd" @PipeVerbatim {} } This causes the output of the command to be enclosed in @Code "@Verbatim @Begin" and {@Code "@End @Verbatim"}. There is also a @Code "@PipeRawVerbatim" symbol which encloses the output in @Code "@RawVerbatim" rather than the ordinary {@Code "@Verbatim"}. @End @Section lout-3.39/doc/user/prg_embe0000644000076400007640000000734111363700677014316 0ustar jeffjeff@Section @Title { Typesetting computer programs as part of a larger document } @Tag { embedded } @Begin @PP When the program texts are to be part of a larger Lout document, the procedure is somewhat different. You need to include the setup file appropriate to your language, like this: @ID @OneRow @Code { "@SysInclude { cprint }" "@SysInclude { doc }" } The @Code cprint setup file includes everything needed to set up for C program formatting; for the other languages, consult the second column of the table at the start of this chapter. @PP The program texts within the Lout document are enclosed in braces preceded by the Lout symbol from the third column of the table, like this for the C language: @ID @OneRow @Code @Verbatim { @IndentedDisplay @CP { #include treeprint(struct tnode *p) /* print tree p recursively */ { if (p != NULL) { treeprint(p->left); printf(\%4d %s\\n\, p->count, p->word); treeprint(p->right); } } } } Although computer programs violate the rules of legal Lout input in many ways, these rules are suspended by the {@Code "@CP"}, {@Code "@Eiffel"} etc. symbols, allowing the program text to be incorporated with absolutely no modifications. The result is @ID @OneRow @CP { #include treeprint(struct tnode *p) /* print tree p recursively */ { if (p != NULL) { treeprint(p->left); printf("%4d %s\n", p->count, p->word); treeprint(p->right); } } } We have chosen to use the @Code "@IndentedDisplay" symbol from Section {@NumberOf displays} to obtain an indented display, but in fact {@Code "@CP"}, {@Code "@Eiffel"} and the rest may appear anywhere at all: the result is an object in the usual way, which may go anywhere. @PP It is quite normal to include fragments of programs, particularly identifiers, within paragraphs; this is done in the obvious way: @ID @OneRow @Code @Verbatim { Calling @CP { remove_cooling_rods() } without checking @CP { temp } first is not recommended since it may cause the reactor to melt down. } Use @Code "@OneCol @CP { ... }" (or @Code "@OneCol @Eiffel { ... }" etc. for other languages) to prevent the program text being broken across two lines, if desired. Hyphenation is on by default in computer programs; however, the current language is changed from @Code English or whatever to {@Code Programming}, whose hyhenation rules permit hyphenation after an underscore character or between a preceding lower-case letter and a following upper-case letter, but not elsewhere. @PP In cases where the program text has unbalanced braces, it is necessary to programs. @RawIndex { programs } programs.braces @SubIndex { braces in } braces. @RawIndex { braces } braces.in.program @SubIndex { in program formatting } use the alternative form @Code "@CP @Begin ... @End @CP" (or the equivalent for other languages), so that Lout does not confuse program braces with Lout braces. In that case the program text must not contain {@Code "@End"}; and in either case the program text must not include @Code "@Include" or @Code "@SysInclude" unless you are really including a file at that point (Section {@NumberOf pipes}). @PP If your Lout document contains program texts in several languages, simply add one @Code "@SysInclude" line for each of them and proceed as before. If your programming language is not currently supported, a viable alternative is @ID @Code "@F @Verbatim { ... }" This causes the text between braces to be set verbatim in a fixed-width font, as explained elsewhere in this guide. This method will not handle tab and formfeed characters very well. Again, use @Code "@Verbatim @Begin ... @End @Verbatim" if your program text contains unbalanced braces. @End @Section lout-3.39/doc/user/tbl_summ0000644000076400007640000001610211363700677014353 0ustar jeffjeff@Section @Title { Summary of options } @Tag { tbl_summ } @Begin @PP This summary applies to all @Code "@Tbl" options except the @Code format tables. @RawIndex { tables } tables.summary @SubIndex { summary of all options } options described in Section {@NumberOf tbl_rows}. Here is the complete list of these options, one option per line, showing its alternative spellings, default values (PostScript and PDF, and plain text) from the setup file, and allowed range of values. Where one option is indented below another, it means that the indented option is a specialized version of the other, which affects its default value. For more on this see below. @DP @Tbl marginvertical { 0.5vx } aformat { @Cell ml { 0i } @Code A | @Cell @Code B | @Cell @Code C | @Cell mr { 0i } D } bformat { @Cell ml { 0i } indent { 1f } @Code A | @Cell @Code B | @Cell @Code C | @Cell mr { 0i } D } cformat { @Cell ml { 0i } indent { 2f } @Code A | @Cell @Code B | @Cell @Code C | @Cell mr { 0i } D } dfont { Italic } dbreak { lines } dformat { @Cell ml { 0i } A | @Cell B | @Cell C | @Cell mr { 0i } D } fformat { @StartHSpan @Cell ml { 0i } @Code A | @HSpan | @HSpan | @Cell mr { 0i } D } gformat { @StartHSpan @Cell ml { 0i } indent { 1f } @Code A | @HSpan | @HSpan | @Cell mr { 0i } D } hformat { @StartHSpan @Cell ml { 0i } indent { 2f } @Code A | @HSpan | @HSpan | @Cell mr { 0i } D } { @Rowd A { Option names } B { Default in PS, PDF } C { Default in plain text } D { Allowed values } rulebelow { yes } @HeaderRowd A { Option names (ctd.) } B { Default in PS, PDF } C { Default in plain text } D { Allowed values } rulebelow { yes } @Rowa A { paint p } B { none } D { any colour from Section {@NumberOf colour} } @Rowa A { texture t } B { solid } D { any texture from Section {@NumberOf textures} } @Rowa A { background bg } D { any object } @Rowa A { font f } D { any font e.g. @Code "Helvetica Slope -2p" } @Rowa A { break b } D { any break e.g. @Code "ragged nohyphen" } @Rowa A { width w } D { @Code "expand" or any length e.g. @Code 5c } @Rowa A { height h } D { any length e.g. @Code 3c } @Rowa A { indent i } B { @Code left } D { {@Code left}, {@Code ctr}, {@Code align}, {@Code mctr}, {@Code right}, or any length } @Rowa A { indentvertical iv } B { @Code top } D { {@Code top}, {@Code ctr}, {@Code align}, {@Code mctr}, {@Code foot}, or any length } @Rowa A { strut s } B { yes } C { yes } D { {@Code no}, {@Code yes}, or any length } @Rowa A { struthorizontal sh } B { no } C { no } D { {@Code no}, {@Code yes}, or any length } @Rowa ma { 1v } A { margin m } B { } C { } D { any length } @Rowb A { marginhorizontal mh } B { 0.6f } C { 2s } D { any length } @Rowc A { marginleft ml } D { any length } @Rowc A { marginright mr } D { any length } @Rowb A { marginvertical mv } B { 0.3f } C { 2f } D { any length } @Rowc A { marginabove ma } D { any length } @Rowc A { marginbelow mb } D { any length } @Rowa ma { 1v } A { rule r } B { no } C { no } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowb A { rulehorizontal rh } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowc A { ruleabove ra } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowc A { rulebelow rb } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowb A { rulevertical rv } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowc A { ruleleft rl } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowc A { ruleright rr } D { {@Code no}, {@Code yes}, {@Code single}, or {@Code double} } @Rowa ma { 1v } A { rulewidth rw } B { 0.05f } D { any length } @Rowb A { rulehorizontalwidth rhw } C { 1f } D { any length } @Rowc A { ruleabovewidth raw } D { any length } @Rowc A { rulebelowwidth rbw } D { any length } @Rowb A { ruleverticalwidth rvw } C { 1s } D { any length } @Rowc A { ruleleftwidth rlw } D { any length } @Rowc A { rulerightwidth rrw } D { any length } @Rowa ma { 1v } A { rulegap rg } B { 0.15f } D { any length } @Rowb A { rulehorizontalgap rhg } C { 0f } D { any length } @Rowc A { ruleabovegap rag } D { any length } @Rowc A { rulebelowgap rbg } D { any length } @Rowb A { ruleverticalgap rvg } C { 0s } D { any length } @Rowc A { ruleleftgap rlg } D { any length } @Rowc A { rulerightgap rrg } D { any length } @Rowa ma { 1v } A { rulecolour rulecolor rc } B { black } D { any colour from Section {@NumberOf colour} } @Rowg A { rulehorizontalcolour rulehorizontalcolor rhc } D { any colour from Section {@NumberOf colour} } @Rowh A { ruleabovecolour ruleabovecolor rac } D { any colour from Section {@NumberOf colour} } @Rowh A { rulebelowcolour rulebelowcolor rbc } D { any colour from Section {@NumberOf colour} } @Rowg A { ruleverticalcolour ruleverticalcolor rvc } D { any colour from Section {@NumberOf colour} } @Rowh A { ruleleftcolour ruleleftcolor rlc } D { any colour from Section {@NumberOf colour} } @Rowh A { rulerightcolour rulerightcolor rrc } D { any colour from Section {@NumberOf colour} } @Rowa ma { 1v } A { ruleplainchar rpc } C { . } D { any simple word e.g. @Code + } rulebelow { yes } @EndHeaderRow } @DP There are seven places where these options may be given, counting the setup file (Section {@NumberOf tbl_setu}). To make it clear that this summary applies to any of these options, we illustrate the seven places with a fictitious option called {@Code option}: @ID @OneRow @Code @Verbatim { @Use { @TblSetup option { 1 } } @Tbl option { 2 } aoption { 3 } aformat { @Cell option { 4 } A } { @Rowa option { 5 } @Row option { 6 } format { @Cell option { 7 } A } } } Each occurrence of @Code option is of course optional. If there are none, the default value given in the table above applies. For any other combination of absent and present options, the value that applies is the present and relevant one with the largest number in the illustration just above. But before applying this rule, any general options must be thought of as being replaced by their more specialized versions: @ID @Code "rulehorizontal { yes }" is equivalent to @ID @Code @Verbatim { ruleabove { yes } rulebelow { yes } } for example. Conflicts are resolved in the logical way: @ID @Code @Verbatim { margin { 0.5f } marginleft { 0.0f } } is equivalent to the four specialized options @ID @Code @Verbatim { marginabove { 0.5f } marginbelow { 0.5f } marginleft { 0.0f } marginright { 0.5f } } General options are really just abbreviations for sets of specialized options. @End @Section lout-3.39/doc/user/ap_qck0000644000076400007640000001502411363700677013771 0ustar jeffjeff@Appendix @Title { Lout Quick Reference Guide } @Begin 10p @Font 1.15fx @Break @OneCol @Tab @Fmta { @Col 20c @Wide A ! @Col 20c @Wide B } { @Rowa A { @Heading { 1. Running Lout } @LD @Code { "lout filename > postscript.ps" } @LP @Heading { 2. Ordinary documents (simple form) } @LD @Code { "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } @LP @Heading { 3. Ordinary documents (full form) } @LD @Code { "@SysInclude { doc }" "@Document" " @InitialFont { Times Base 12p }" " @InitialBreak { adjust 1.2fx hyphen }" " @InitialLanguage { English }" " @PageHeaders { Simple }" " @FirstPageNumber { 1 }" " @ColumnNumber { 1 }" " @PageOrientation { Portrait }" "//" "@Text @Begin" "..." "@BeginSections" "@Section ... @End @Section" "@EndSections" "@End @Text" } @LP @Heading { 4. Technical reports } @LD @Code { "@SysInclude { report }" "@Report" " @Title { ... }" " @Author { ... }" " @Institution { ... }" " @DateLine { No }" " @CoverSheet { Yes }" " @InitialFont { Times Base 12p }" " @InitialBreak { adjust 1.2fx hyphen }" " @InitialLanguage { English }" " @PageHeaders { Simple }" " @FirstPageNumber { 1 }" " @ColumnNumber { 1 }" " @Abstract { ... }" "//" "@Section ... @End @Section" "@Appendix ... @End @Appendix" } } B { @Heading { 5. Large-scale structure symbols } @LL @LI @Code { "@Section" " @Title { ... }" " @RunningTitle { ... }" " @Tag { ... }" "@Begin" "@PP" "..." "@End @Section" } @LI lines @Break { @Code "@Section / @SubSection / @SubSubSection" @Code "@Appendix / @SubAppendix / @SubSubAppendix" @Code "@BeginSubSections" ... @Code "@EndSubSections" if inner. } @EndList @LP @Heading { 6. Cross references } @LD @Tab @Fmta { @Col @Code A ! @Col ! @Col @Code B } { @Rowa A { "@Tag { foo }" } B { "@PageOf foo" } @Rowa A { "@PageMark foo" } B { "@NumberOf foo" } } @LP @Heading { 7. Font changes } @LL @LI @Tab @Fmta { @Col @Code A ! @Col @Code B } vmargin { 0.5vx } { @Rowa A { "@B { bold font }" } B { "@I { italic font }" } @Rowa A { "@BI { bold-italic font }" } B { "@R { Roman font }" } @Rowa A { "@S { small-caps font}" } B { "@F { fixed-width font }" } @Rowa B { "@II { italic bold or Roman }" } } @LI @Code { "{ family face size } @Font { ... }" } @LI @Code { "Times Helvetica Courier ..." "Base Slope Bold BoldSlope ..." "10p 12p +2p -2p 2.0f ..." } @EndList @LP @Heading { 8. Paragraph breaking styles } @LL @LI @Code { "{ breakstyle linesep hyphen } @Break { ... }" } @LI @Code { "adjust ragged lines clines ..." "1.2fx 2vx 0.9vx ..." "hyphen nohyphen" } @EndList @LP @Heading { 9. New paragraph and new page } @LD @Tab @Fmta { @Col @Code A ! @Col B } vmargin { 0.5vx } { @Rowa A { "@PP" } B { Plain paragraph } @Rowa A { "@LP" } B { Left paragraph } @Rowa A { "@LLP" } B { New line } @Rowa A { "@DP" } B { Display paragraph } @Rowa A { "@NP" } B { New page } @Rowa A { "@CNP" } B { Conditional new page } } } } # end first table @LP 10p @Font 1.15fx @Break @OneCol @Tab @Fmta { @Col 20c @Wide A ! @Col 20c @Wide B } { @Rowa A { @Heading { 10. Displays and headings } @LL @LI @Code { "@CD @Heading { A centred heading }" "@ID { An indented display }" } @LI @Tab @Fmta { @Col @Code A ! @Col @Code B } vmargin { 0.5vx } { @Rowa A { "@D" } B { "@Display" } @Rowa A { "@LD" } B { "@LeftDisplay" } @Rowa A { "@ID" } B { "@IndentedDisplay" } @Rowa A { "@QD" } B { "@QuotedDisplay" } @Rowa A { "@CD" } B { "@CentredDisplay" } @Rowa B { "@CenteredDisplay" } @Rowa B { "@RightDisplay" } } @EndList @LP @Heading { 11. Lists} @LL @LI @Code { "@List" "@ListItem { A list item }" "@ListItem { Another list item }" "@EndList" } @LI @Tab @Fmta { @Col @Code A ! @Col @Code B } vmargin { 0.5vx } { @Rowa A { "@L" } B { "@List" } @Rowa A { "@LL" } B { "@LeftList" } @Rowa A { "@IL" } B { "@IndentedList" } @Rowa A { "@QL" } B { "@QuotedList" } @Rowa A { "@CL" } B { "@CentredList" } @Rowa B { "@CenteredList" } @Rowa A { "@NL" } B { "@NumberedList" } @Rowa A { "@RL" } B { "@RomanList" } @Rowa A { "@UCRL" } B { "@UCRomanList" } @Rowa A { "@AL" } B { "@AlphaList" } @Rowa A { "@UCAL" } B { "@UCAlphaList" } @Rowa A { "@PNL" } B { "@ParenNumberedList" } @Rowa A { "@PRL" } B { "@ParenRomanList" } @Rowa A { "@PUCRL" } B { "@ParenUCRomanList" } @Rowa A { "@PAL" } B { "@ParenAlphaList" } @Rowa A { "@PUCAL" } B { "@ParenUCAlphaList" } @Rowa A { "@BL" } B { "@BulletList" } @Rowa A { "@SL" } B { "@StarList" } @Rowa A { "@DL" } B { "@DashList" } } @LI @Code { "@TaggedList" "@TagItem { label } { A list item }" "@TagItem { label } { Another list item }" "@EndList" } @LI @Tab @Fmta { @Col @Code A ! @Col @Code B } vmargin { 0.5vx } { @Rowa A { "@TL" } B { "@TaggedList" } @Rowa A { "@WTL" } B { "@WideTaggedList" } @Rowa A { "@VWTL" } B { "@VeryWideTaggedList" } } @EndList @LP @Heading { 12. Footnotes, endnotes, margin notes } @LD @Tab @Fmta { @Col @Code A ! @Col @Code B } vmargin { 0.5vx } { @Rowa A { "@FootNote { ... }" } B { "@EndNote { ... }" } @Rowa A { "@LeftNote { ... }" } B { "@RightNote { ... }" } @Rowa A { "@OuterNote { ... }" } B { "@InnerNote { ... }" } } } B { @Heading { 13. Floating figures and tables } @LD @Tab @Fmta { @Col @Code A ! @Col ! @Col ! @Col @Code B } { @Rowa A { "@Figure" " @Caption { ... }" " @Tag { ... }" "@Begin" "..." "@End @Figure" } B { "@Table" " @Caption { ... }" " @Tag { ... }" "@Begin" "..." "@End @Table" } } @LP @Heading { 14. Tables } @LD @Code { "@SysInclude { tbl }" "@SysInclude { doc }" "..." "@Tbl" " aformat { @Cell A | @Cell B }" " marginvertical { 0.5vx }" "{" "@Rowa" " A { ... }" " B { ... }" "@Rowa" " ..." "}" } @LP @Heading { 15. Equations } @LD @Code { "@SysInclude { eq }" "@SysInclude { doc }" "..." "@Eq { sum from i=0 to n { r sup i over sqrt pi } }" } @LP @Heading { 16. Basic graphics } @LD @Code { "grey @Colour { ... }" "gray @Color { ... }" "@Box { ... }" "@CurveBox { ... }" "@ShadowBox { ... }" "60d @Rotate { ... }" "0.71 @Scale { ... }" "@QuotedDisplay @Scale { ... }" "@IncludeGraphic filename.eps" } @LP @Heading { 17. Miscellaneous } @LD lines @Break { @Code "@Underline { will be underlined }" @Code "@Date" @Code "@Time" @Code "German @Language { ... }" @Code "\# comment to end of line" @Code "\"#&/@^{}|~\"" (enclose these characters in quotes) } } } # end second table @End @Appendix lout-3.39/doc/user/all0000644000076400007640000000212211442245545013272 0ustar jeffjeff@SysInclude { xrgb } @SysInclude { tab } @SysInclude { tbl } @SysInclude { math } @SysInclude { graph } @SysInclude { pie } @SysInclude { pas } @SysInclude { diag } @SysInclude { cprint } @SysInclude { eiffel } @SysInclude { perl } @Include { mybook } # @Include { letterbook } # for testing Letter size formatting @SysDatabase @Reference { loutrefs } @Book @Title { A User's Guide to the Lout Document Formatting System } @Author { Jeffrey H. Kingston } @Edition { Version 3.39 September 2010 } @Publisher { Copyright @CopyRight 1991, 2008 Jeffrey H. Kingston, School of Information Technologies, The University of Sydney 2006, Australia. ISBN 0 86758 951 5. } @InitialLanguage { English } # @OptimizePages { Yes } // @Include { preface } @Include { bas } @Include { str } @Include { typ } @Include { fmt } @Include { ref } @Include { tbl } @Include { mat } @Include { bgr } @Include { dia } @Include { gra } @Include { pie } @Include { prg } @Include { pascal } @Include { ap_qck } @Include { ap_byp } @Include { ap_col } lout-3.39/doc/user/ref_crea0000644000076400007640000001533511363700677014306 0ustar jeffjeff@Section @Title { Creating your own entry types and formats } @Tag { refstyles } @Begin @PP Although the set of options to the @Code "@Reference" symbol ({@Code "@Tag"}, {@Code "@Type"}, {@Code "@Author"}, etc.) is fixed, you can add your own reference types and change the formatting of existing types. @PP To do this you must be using your own setup file, as explained in Section {@NumberOf setup}. At the end of the setup file you will find this line: references. @RawIndex { references } references.refstyle @SubIndex { @Code "@RefStyle" } refstyle.references @Index { @Code "@RefStyle" (references) } @ID @Code "@SysDatabase @RefStyle { refstyle }" This tells Lout to consult a database file of reference styles called {@Code "refstyle.ld"}. These are not references, they are formatting styles, one for each reference type. The @Code "Sys" in @Code "@SysDatabase" references. @RawIndex { references } references.sysdatabase @SubIndex { @Code "@SysDatabase" } sysdatabase.references @Index { @Code "@SysDatabase" } means that this file is stored in the @I { Lout system database directory }, system.database.dir @Index { system database directory } refstyle.ld.file @Index { @Code "refstyle.ld" file} which is where all the standard databases are kept. To change the formatting of a reference type, or to add your own types, you need to create your own reference styles database file by copying and modifying {@Code "refstyle.ld"}. @PP To find out the name of the Lout system database directory, type the Unix command @ID @Code "lout -V" Then, supposing that the Lout system database directory is {@Code "/usr/lout/data"}, type @ID @Code "cp /usr/lout/data/refstyle.ld mystyle.ld" to place a copy of the @Code "refstyle.ld" database file in your mystyle.ld.file @Index { @Code "mystyle.ld" file} directory, renaming it {@Code "mystyle.ld"}. Since @Code "refstyle.ld" is read-only, you may also need to change the mode of @Code "mystyle.ld" to be writable (by @Code "chmod +w mystyle.ld" in Unix). Now replace @ID @Code "@SysDatabase @RefStyle { refstyle }" at the end of your setup file by @ID @Code "@Database @RefStyle { mystyle }" and Lout will read its reference styles from @Code "mystyle.ld" instead of {@Code "refstyle.ld"}. Since the two are at present identical, this has changed nothing so far; but now any changes you make to @Code "mystyle.ld" will affect your document. Changing @Code "@SysDatabase" to @Code "@Database" makes Lout search your current directory for {@Code "mystyle.ld"}, whereas @Code "@SysDatabase" searches only the system directory. @PP In practice you will probably want to store your database of reference styles in some library directory, so that it can be used by many documents. A Unix pathname is appropriate for this: @ID @Code @Verbatim { @Database @RefStyle { "/usr/jeff/lib/mystyle" } } Quotes are needed because of the @Code "/" characters. @PP The database entries within @Code "refstyle.ld" and @Code "mystyle.ld" might look something like this: @ID @OneRow @Code @Verbatim { { Book @RefStyle @Style { @Reference&&reftag @Open { @Author. @I @Title. @Publisher, @Year. } } } } The meaning of the first two lines is beyond our scope, except that @Code "Book" on the first line means that this is the entry which defines how references of type @Code Book will be printed. Fortunately, apart from this one word these two lines are the same in every reference style entry so you don't need to understand them. The important part is in the middle: @ID @Code "@Author. @I @Title. @Publisher, @Year." The meaning should be clear: first print the author option and a full stop, then the title option and another full stop in italics, and so on. To change the formatting of books, change this object. To create a new reference type, copy the entire database entry, change @Code Book to a new name of your choice, and change the middle part. Don't forget to delete the index file @Code "mystyle.li" afterwards, if there is one, so that Lout knows to generate it afresh. @PP Although the entry shown above is perfectly viable, the real entry for @Code Book is much more complicated, in part because there are more options than those basic four, but mainly because the real entry goes to great lengths to do the right thing when options are omitted: @ID @Tab vmargin { 0.45vx } @Fmta { @Col @Code A ! @Col @Code B } { @Rowa A { "{ Book @RefStyle @Style" } @Rowa A { " { @Reference&&reftag @Open" } @Rowa A { " {" } @Rowa A { " { @Author. {}" } B { "} @If @Author" } @Rowa A { " { @I @Title" } B { "} @If @Title" } @Rowa A { " { @Word&¬itle" } B { "} @If @Not @Title" } @Rowa A { " { , @Pinpoint" } B { "} @If @Pinpoint" } @Rowa A { " { , @Word&&pages @NumSep @Pages" } B { "} @If @Pages" } @Rowa A { " { , @Word&&page @NumSep @Page" } B { "} @If @Page" } @Rowa A { " { . @TitleNote" } B { "} @If @TitleNote" } @Rowa A { " { . @HowPublished" } B { "} @If @HowPublished" } @Rowa A { " { . @Publisher" } B { "} @If @Publisher" } @Rowa A { " { . @Organization" } B { "} @If @Organization" } @Rowa A { " { . @Institution" } B { "} @If @Institution" } @Rowa A { " { , @Address" } B { "} @If @Address" } @Rowa A { " { . @Edition" } B { "} @If @Edition" } @Rowa A { " { , @Month @Year" } B { "} @If @Year @And @Month" } @Rowa A { " { , @Year " } B { "} @If @Year @And @Not @Month" } @Rowa A { " { ." } B { "} @If @True" } @Rowa A { " { {} URL @URL." } B { "} @If @URL" } @Rowa A { " { {} @Note" } B { "} @If @Note" } @Rowa A { " }" } @Rowa A { " }" } @Rowa A { "}" } } The meaning is that each object to the left of an @Code "@If" will be printed only if the condition to the right of the @Code "@If" is true. The condition may contain options, which are considered to be true if they are not omitted (non-empty), and it may contain {@Code "@And"}, {@Code "@Or"}, {@Code "@Not"}, and @Code "@True" with the usual precedence and meaning. Sub-conditions may be enclosed in braces if desired, although it is best to keep the conditions as simple as possible given the complexity of the whole setup. @PP The objects subject to @Code "@If" are printed with no space preceding them; any space in the final print will be the result of space within them, not between them. This is why @Code "@If @True" is not redundant. @PP The object @Code "@Word&¬itle" produces @Code "No title" in the current language; @Code "@Word&&pages" produces {@Code pages} in the current language, and so on. Consult database @Code "standard.ld" for standard.ld.file @Index { @Code "standard.ld" file } other standard words and phrases, and page {@PageOf numsep} for {@Code "@NumSep"}. @End @Section lout-3.39/doc/user/equ_math0000644000076400007640000001627611363700677014350 0ustar jeffjeff# Written by Ludovic Courtès , July 2007. # # Based on: # http://lists.planix.com/pipermail/lout-users/2007q2/004355.html . @Section @Title { The @Code { "@Math" } package } @Tag { math_package } @Begin equations.math @SubIndex { @Code "@Math" } @PP The @Code { "@Math" } package provides features similar to those found in @Code { "@Eq" } but with improved formula layout. For instance, the @Code { "@M" } symbol offers better rendering of equations within paragraphs than @Code { "@E" }. To that end, @Code { "@Math" } implements the four equation layout styles described by Donald E. Knuth in @I { The { @TeX }book } along with the corresponding transition rules @Cite { $knuth1984tex }. Namely, depending on its rendering context, a math formula may be in one of the following styles: @BulletList @LI { ``display'' style, for formulas displayed on lines by themselves; } @LI { ``text'' style, for formulas embedded in text; } @LI { ``script'' style, for formulas used in superscripts and subscripts; } @LI { ``subscript'' style, for second-order superscripts and subscripts. } @EndList In addition, formulas can be ``cramped'', meaning that exponents are lower than usual. @PP Fortunately, you usually don't need to be familiar with these display styles and corresponding layout algorithm to use @Code { "@Math" }. The sections below summarize the differences from @Code { "@Eq" } as well as the new features. @BeginSubSections @SubSection @Title { Differences from @Code { "@Eq" } } @Begin @PP First and foremost, the Lout definitions for the @Code "@Math" symbol are accessed via a setup file called {@Code "math"}, which you must include at the start of your document in the usual way: @ID @OneRow @Code { "@SysInclude { math }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } Note that it is possible to include both @Code "eq" and { @Code "math" }. Instead of typing formulas within { @Code "@Eq" } or { @Code "@E" }, they must be embedded in { @Code "@Math" } or { @Code "@M" }, respectively. @PP In @Code { "@Math" }, sums, products, integrations and similar large operations are laid out according to the current style. For instance, the limits of a sum are laid out differently depending on the context: @BeginAlignedDisplays @CAND { @Math { { sum from { i = 0 } to { n } { i sup 2 } } over { x + y } } } @CAND { @Math { sum from { i = 0 } to { n } } } @EndAlignedDisplays Similarly, the @Code { "big" } symbol that is used in @Code { "@Eq" } to display sums, integrations, etc. is usually not needed: the size of the ``sigma'' or other symbol automatically adapts to the context. @PP The @Code { "from" } and @Code { "to" } stand-alone symbols found in @Code { "@Eq" } are not available. Instead, symbols such as @Code { "sum" } that require them have @Code { "from" } and @Code { "to" } options instead. For example, instead of @ID { @Code { "@Eq { sum from i = 0 to n { i sup 2 } }" } } it is necessary to write @ID { @Code { "@Math { sum from { i = 0 } to { n } { i sup 2 } }" } } The braces are necessary now because @Code { "from" } and @Code { "to" } are options of @Code { "sum" }, and it is a general rule of Lout that the values of options have to be enclosed in braces. @PP Unlike those of @Code { "@Eq" }, mathematical operators obey standard precedence rules. Thus, to get @M { { n + 1 } over 2 }, one must write @Code { "@M { { n + 1 } over 2 }" } instead of just @Code { "@E { n+1 over 2 }" }. @PP @Code "@Math" generally produces better mathematical layout than @Code { "@Eq" }. Consider the following examples rendered with @Code "@Math" (on the left) and with @Code "@Eq" (on the right): @ID { @Math { 2 sup { 2 sup { 2 sup x } } } |8ct @Eq { 2 sup { 2 sup { 2 sup x } } } } // @RID { @Math { x supp { z supp d on c } on { y supp a on b } } |8ct @Eq { x supp { z supp d on c } on { y supp a on b } } } @ID { @Math { { { n + 1 } over 2 } over x } |8ct @Eq { { { n + 1 } over 2 } over x } } // @RID { @Math { a sub 0 + 1 over { a sub 1 + 1 over { a sub 2 + 1 over { a sub 3 + 1 over { a sub 4 } } } } } |8ct @Eq { a sub 0 + 1 over { a sub 1 + 1 over { a sub 2 + 1 over { a sub 3 + 1 over { a sub 4 } } } } } } @End @SubSection @SubSection @Title { New symbols and options } @Begin @LP The @Code { "@Math" } symbol has a few options not found in @Code { "@Eq" }. The @Code "symbolfont" and @Code "basefont" options denote, respectively, the font where symbols are searched for and the font where other characters are searched for. These fonts default to Symbol and Times, respectively. Note that @Code "@Math" is currently tailored to use these fonts so using other fonts may require manual adaptation of equation layout. @PP Besides, @Code "@Math" provides several new symbols. Symbols @Code "above" and @Code "below" behave similarly to @Code "from" and @Code "to" in @Code "@Eq", respectively. In other words, @Code "above" prints its left parameter on top of its right parameter, while @Code "below" does the opposite operation: @ID { @Code { "@M { { a above f } + { z below b } }" } |8ct @M { { a above f } + { z below b } } } @ID { { @Code { "@Math { sum from { { 1 <= i <= p } above" " { 1 <= j <= q } above" " { 1 <= k <= r } }" " { a sub { ij } b sub { jk } c sub { ki } } }" } |8ct @Math { sum from { { 1 <= i <= p } above { 1 <= j <= q } above { 1 <= k <= r } } { a sub { ij } b sub { jk } c sub { ki } } } } } @Code "@Math" produces spacing around operators that depends on the type of operator (see Section @NumberOf { "equ_spacing" }) and also on the current style. When defining new operators for @Code "@Math", it is usually desirable to make sure they use spacing consistent with other operators. To that end, @Code "@Math" provides spacing symbols similar to those found in @Code "@Eq", namely @Code { rel }, @Code { bin } and @Code { punct }. However, these symbols differ from their @Code "@Eq" counterpart in that they take three parameters: a left parameter, an @Code "op" option, and a right parameter. For example, @ID @Code "@Math { x bin op { ! } y }" produces @ID @Math { x bin op { ! } y } The left and right parameters are laid out around the operator specified by the @Code { op } option, including appropriate spacing. @PP Finally, @Code "@Math" offers additional symbols that allow users to explicitly specify the style under which part of a math formula is to be laid out. These low-level primitives may be useful in specific situations such as the one illustrated below: @ID { @Code { "@Math {" " lim above @SubScriptStyle { i --> infinity }" " f(x) = { g(x) } over { h(x) } }" } |8ct @Math { lim above @SubScriptStyle { i --> infinity } f(x) = { g(x) } over { h(x) } } } @Code "@SuperScriptStyle" and @Code "@SubScriptStyle" lay out their right parameter under the ``script'' or ``subscript'' style, respectively. @Code "@NumeratorStyle" and @Code "@DenominatorStyle" lay out their right parameter as if it where the numerator or denominator of a fraction, respectively. Likewise, @Code "@SquareRootStyle" lays out its right parameter as if it were below a square root. @End @SubSection @EndSubSections @End @Section lout-3.39/doc/user/str_indx0000644000076400007640000005373211363700677014375 0ustar jeffjeff@Section @Title { Indexes } @Tag { indexes } @Begin @PP Although Lout is not clever enough to guess what entries should go in indexes. @Index { indexes } your index, it will do almost everything else for you: sort the entries and attach the correct page numbers automatically. As for tables of contents, the default setting is to have an index in books but not in other types of documents. This and a few aspects of the appearance of the index can be changed by changing the setup file, as explained at the end of this section. @PP Now, suppose you are discussing Galileo and you want his name in your index. Let's be ambitious and say that you want the index to contain something like this: @ID @OneRow lines @Break { Galileo Galilei life of, 201 telescope, his use of, 201--203 trial of, 205--211, @I 242, 395 } These lines show off Lout's five tricks: the first is a @I { raw entry } (no page number attached); the second is a @I sub-entry (indented); the third has a @I { page number range } instead of a single page number; and the fourth has a @I { merged entry } (several page numbers or ranges within one entry) and a @I { special element } (the page number in italics). @PP We'll get to them in a moment, but first, let's see how to get a basic entry, like this one: @ID { Galileo Galilei, 201 } To get this into your index, type @ID @Code "galileo @Index { Galileo Galilei }" at the point where you mention Galileo. Nothing will be printed there, but the object following the @Code "@Index" symbol will be placed in index.sym @Index { @Code "@Index" symbol } the index, with a comma and the correct page number appended automatically. @PP The object preceding the @Code "@Index" symbol is a compulsory key which is used for sorting the index entries, @FootNote { The collating sequence used to decide what comes after what is either the collating sequence used by the @Code "memcmp()" library routine (just the underlying binary character codes), or else the one used by the @Code "strcoll()" collating sequence, which understands accented characters and whose effect depends on your locale. To find out whether @Code "strcoll()" is in use or not, type @Code "lout -V" which prints out several lines of this and similar information, including information about command line flags to switch between the two kinds of collation. @PP If the sorting you get turns out to be not what you expected, the first thing to try is the replacement of all accented letters in index keys by unaccented ones. Sorting is quite an intractable problem: even collation.order @Index { collation order } sorting.order @Index { sorting order } if @Code "strcoll()" gets the sorting right for one language, there still remains the problem of sorting multilingual indexes. } but which is not itself printed anywhere. It is best to construct these sorting keys from lower-case letters and the . character only, beginning with a letter, although multi-word keys are allowed. These sorting keys do not have to be distinct from the tags used in cross referencing; however, they do have to be distinct from each other, unless you want merged entries (see below). @PP Our first trick, raw entries (no page number attached), is very easy: just use @Code "@RawIndex" instead of {@Code "@Index"}. So the rawindex.sym @Index { @Code "@RawIndex" symbol } first line of our ambitious example is obtained by @ID @Code "galileo @RawIndex { Galileo Galilei }" This could go anywhere, since no page numbers are involved. @PP Our second trick, sub-entries, is also very easy, since a sub-entry differs from an ordinary entry only by having an indent. The symbol is {@Code "@SubIndex"}, so the second line of our ambitious example is subindex.sym @Index { @Code "@SubIndex" symbol } produced by @ID @Code "galileo.life @SubIndex { life of }" You should always give sub-entries the same sorting key as their corresponding main entries, plus a . and another word, because then you can be certain that the sorting will place sub-entries directly after their main entries. There is a @Code "@SubSubIndex" symbol that produces a double indent, and there are @Code "@RawSubIndex" and @Code "@RawSubSubIndex" symbols. @PP For our third trick, page number ranges, we use the @Code "to" option of the {@Code "@Index"}, {@Code "@SubIndex"}, and {@Code "@SubSubIndex"} symbols. For example, to produce the sub-entry @ID { telescope, his use of, 201--203 } put @ID @Code { "galileo.telescope @SubIndex to { gt.end } { telescope, his use of }" } at the beginning of the range, and @ID @Code "@PageMark { gt.end }" at the end. You can use any tag you like inside the @Code "to" option, as long as it differs from every other tag (notice that sorting keys do not have to differ from tags, but @Code "to" options do: this is because @Code "to" options go into @Code "@PageMark" like other tags do, and if two tags are the same we would have an ambiguous result of {@Code "@PageOf"}). If both ends of the range fall on the same page, the @Code "to" option is ignored: you will never get 201--201. @PP Our fourth trick is the merged entry: @ID { trial of, 205--211, 242, 395 } The main thing to grasp is that this merged entry was originally three separate entries (sub-entries in this case): @ID @OneRow lines @Break { trial of, 205--211 trial of, 242 trial of, 395 } We already know how to produce these three entries, using three @Code "@SubIndex" symbols, one with a @Code "to" option. Now we have discovered that Lout is able to merge several entries into one entry. This raises two questions: how does Lout know which entries to merge? and given those entries, what does the merging produce? @PP The answer to the first question is that Lout merges entries whose sorting keys are equal. The merged entry above is produced by these three entries, placed in the appropriate places: @ID @OneRow @Code { "galileo.trial @SubIndex to { gtrial.end } { trial of }" "galileo.trial @SubIndex { trial of }" "galileo.trial @SubIndex { trial of }" } The entries are merged because they have the same sorting key ({@Code "galileo.trial"}), not because they happen to have the same content ({@Code "trial of"}). In fact, once the page numbers are added the content is not the same at all. @PP Now, having decided that the three entries @ID @OneRow lines @Break { trial of, 205--211 trial of, 242 trial of, 395 } must be merged, what does Lout do? Without being too formal, it finds the shortest larger entry that contains everything in the given entries, more or less, preserving the order in which the entries' points of origin appear in the final printed document. @PP If the entries are not different at all, then the result will be the same as each of them. With this in mind, let us return to our initial, ambitious example: @ID @OneRow lines @Break { Galileo Galilei life of, 201 telescope, his use of, 201--203 trial of, 205--211, 242, 395 } We now know how to produce all four of these entries, but one problem of some practical importance remains. Suppose we delete the section on the life of Galileo. If we had put the entry that produces `Galileo Galilei' in that section, we might inadvertently delete it, and the other two sub-entries will lose their main entry. Before deleting anything, we must hunt through it for index entries and ponder their significance, an error-prone and time-wasting thing to do. @PP The solution is as follows. When an index entry has sub-entries, make it raw, and repeat it just before each of its sub-entries: @ID @OneRow @Code { "galileo @RawIndex { Galileo Galilei }" "galileo.life @SubIndex { life of }" } at the first place, @ID @OneRow @Code { "galileo @RawIndex { Galileo Galilei }" "galileo.telescope @SubIndex { telescope, his use of }" } at the second, and so on. Now it is easy to verify that every sub-entry has a main entry; and when deleting a sub-entry we can and should delete the adjacent main entry. After sorting, our index entries will be @ID @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { galileo } B { Galileo Galilei } @Rowa A { galileo } B { Galileo Galilei } @Rowa A { galileo } B { Galileo Galilei } @Rowa A { galileo } B { Galileo Galilei } @Rowa A { galileo } B { Galileo Galilei } @Rowa A { galileo.life } B { {} life of, 201 } @Rowa A { galileo.telescope } B { {} telescope, his use of, 201--203 } @Rowa A { galileo.trial } B { {} trial of, 205--211 } @Rowa A { galileo.trial } B { {} trial of, 242 } @Rowa A { galileo.trial } B { {} trial of, 395 } } The first five entries have the same sorting key, and will be merged as required. @PP Each index entry symbol has a @Code { pnformat } option, which affects the way the page number of the entry is printed in the index. For example, @ID @Code "galileo.trial @SubIndex pnformat { Main } { trial of }" indicates that this is an entry of format {@Code Main}. By default the format is {@Code Ordinary}; it may be {@Code Main}, producing a bold page number in the index, or {@Code Special}, producing an italic page number. @PP As the name suggests, the @Code pnformat option is actually a format option, within which the @Code "@PageNum" symbol stands for the index page number, so you could even write @ID @Code "galileo.trial @SubIndex pnformat { @Underline @PageNum } { trial of }" to get an underlined page number. However, it is rarely a good idea to use the @Code { pnformat } option in this way. Better to decide once and for all what variants on the basic format you are going to have, call one variant {@Code Main} and the other {@Code Special}, use the setup file options described later in this section to redefine the appearance of page numbers for these two index entry formats, and explain in the @Code "@IndexText" what the formats mean. @PP When index entries with different formats are merged, naturally each page number preserves its own format. If there are two merged entries with the same page number but different formats, the result is plausible but indeterminate. A page number range is formatted according to the format of the index entry which is its starting point. To change the format of the @I stem of the index entry, just do the usual thing. For example, @ID @Code "galileo @Index @I { Galileo Galilei }" will cause the stem of the entry to appear in an italic font. @PP The language of the index entry will be the initial language of the document as a whole, which is not necessarily the language at the point where the index entry occurs. To get the correct language you will need a @Code "@Language" symbol following the @Code "@Index" symbol: @ID @Code "galileo. @Index Italian @Language { Galileo Galilei }" or whatever. If you don't do this your index entry might be hyphenated incorrectly. @PP Although the page numbers in index entries will be kept up to date automatically as the document changes, as all cross references are, it is best to refrain from inserting index entries until the document is complete and an overall plan of the structure of the index can be made. Place index entries for floating figures and tables within their captions. @PP Large indexes may benefit from {@I spacers} -- empty spaces or spacers. @Index { spacers in indexes } even headings between the parts for each letter of the alphabet. One simple way to get blank line spacers is with {@Code "@RawIndex"}, like this: @ID @OneRow @Code { "b @RawIndex {}" "c @RawIndex {}" "d @RawIndex {}" "..." "z @RawIndex {}" } These phantom entries will insert blank lines before the region of each English letter except `a'. In fact there is a symbol called @Code "@IndexBlanks" that makes indexblanks. @Index @Code "@IndexBlanks" exactly these 25 entries. Unfortunately, these blanks will occasionally appear at the top of a column, and if there are no tags beginning with x, for example, there will be two blank lines between the w and y entries. You can start off with @Code "@IndexBlanks" and replace it later by the appropriate subset, if necessary. @FootNote { For Lout to solve this problem automatically, it would need to be told which letter each index entry belongs under, perhaps by symbols {@Code "@AIndex"}, {@Code "@BIndex"}, etc. The author felt that this would have been too tedious. } @PP A more elaborate kind of spacer can be placed into the index with indexspacer. @Index @Code "@IndexSpacer" the @Code "@IndexSpacer" symbol, like this: @ID @Code "a @IndexSpacer A" This is roughly equivalent to @Code "a @RawIndex A" in that it puts the entry @Code A at sort position {@Code a}; but it also places extra space above and below it, and it includes a font change, so that the @Code A stands out like a heading (you can see the effect in the index of this document). @Code "@IndexSpacer" also includes a conditional new page effect, so that the spacer never appears alone at the bottom of a column. @PP You need to change things slightly for the first spacer: initialindexspacer. @Index @Code "@InitialIndexSpacer" @ID @Code "a @InitialIndexSpacer A" to tell Lout to omit the unwanted space above it. There is an @Code "@IndexLetters" symbol which places the 26 spacers indexletters. @Index @Code "@IndexLetters" @ID @OneRow @Code @Verbatim { a @InitialIndexSpacer A b @IndexSpacer B ... z @IndexSpacer Z } into your document for you in one go. Users of other alphabets are recommended to define a similar symbol of their own. @PP The remainder of this section describes how to change the appearance of the index by setting options in the setup file. For setup files and their options in general, consult Section {@NumberOf setup}. @PP There are several setup file options for the index. Here they are with their default values: @ID @OneRow @Code @Verbatim { @MakeIndex { No } @IndexText { @Null } @IndexFont { } @IndexBreak { oragged 1.2fx } @IndexFormat { @Body } @SubIndexFormat { {1f @Wide}@Body } @SubSubIndexFormat { {2f @Wide}@Body } @IndexTypeOrdinary { @PageNum } @IndexTypeMain { @B @PageNum } @IndexTypeSpecial { @I @PageNum } @IndexRangeFormat { @From--@To } @IndexColumnNumber { 2 } @IndexColumnGap { 1.00c } @IndexCtd { Yes } @IndexCtdWord { continued } @IndexCtdFormat { @Body @I (@CtdWord) } @IndexSpacerAbove { 2v } @IndexSpacerBelow { 1v } @IndexSpacerFont { +3p } @IndexSpacerFormat { @Body } } The @Code "@MakeIndex" option, which may be @Code Yes or {@Code No}, makeindex. @Index @Code "@MakeIndex" determines whether to produce an index or not. Although the default value is {@Code No}, any type of document may be given an index just by changing it to {@Code Yes}. This has already been done in the @Code book setup file, but not in the others. @PP @Code "@IndexText" is some text to put at the start of the index, after the heading but before any index entries. It will appear full width on the page. This option is also available as an option of the {@Code "@Document"}, {@Code "@Report"}, and {@Code "@Book"} symbols. @PP @Code "@IndexFont" determines the font and font size of index entries indexfont. @Index @Code "@IndexFont" (e.g. {@Code "Times Base 12p"}). Leaving it empty as above produces the same font as the rest of the document. @Code "@IndexBreak" is the indexbreak. @Index @Code "@IndexBreak" paragraph breaking style applied to index entries; @Code oragged is the traditional and best way. @PP @Code "@IndexFormat" allows a more radical control of the appearance indexformat. @Index @Code "@IndexFormat" of the index entry than just its font and break style. Within it, the @Code "@Body" symbol stands for the entry, not including any page numbers. The default value just leaves the index entry as is, but the corresponding options for formatting subindexes ({@Code "@SubIndexFormat"} and {@Code "@SubSubIndexFormat"}) are more interesting: @ID @Code "@SubIndexFormat { {1f @Wide}@Body }" causes subindexes to begin with an indent of width {@Code 1f}, immediately followed by the entry. For more information about lengths like {@Code 1f}, see Section {@NumberOf objects}. Another possible format is @ID @Code "@SubIndexFormat { -- @Body }" which causes the subindex to begin with an en-dash and two spaces instead of an indent. @PP {@Code "@IndexTypeOrdinary"}, {@Code "@IndexTypeMain"}, and {@Code "@IndexTypeSpecial"} give the page number format to use when the index entry type is {@Code Ordinary}, {@Code Main}, and {@Code Special} respectively. Within them the @Code "@PageNum" symbol stands for the page number or page number range being printed. The value of these options can be an arbitrary object. If the value of a @Code pnformat option is not {@Code Ordinary}, {@Code Main}, or {@Code Special}, then the @Code pnformat option itself is printed; it too may contain a @Code "@PageNum" symbol, as explained earlier. @PP {@Code "@IndexRangeFormat"} gives the format to use when a page number range, such as 5--8, is to be included in an index entry. Within it the symbols @Code "@From" and @Code "To" stand for the first and last page numbers respectively. These will always be different when {@Code "@IndexRangeFormat"} is used; Lout knows never to insert a range when the two end points are equal. The default value just separates the two numbers by an en-dash with no space. @PP @Code "@IndexColumnNumber" and @Code "@IndexColumnGap" determine the indexcolumnnumber. @Index @Code "@IndexColumnNumber" indexcolumngap. @Index @Code "@IndexColumnGap" number of index columns per page, and the gap between them, and are exactly analogous to the @Code "@ColumnNumber" and @Code "@ColumnGap" options described in Section {@NumberOf columns}. @PP The next three options work together to control the appearance of running headers @FootNote { Owing to problems behind the scenes, if more than three copies of the same running header appear on the same page, their horizontal positions will become confused, probably resulting in the apparent disappearance of all but the last three. Of course, this is highly unlikely to happen, since it means there must be a four-column index with a page on which all four columns have the same running header. } in the index: indexctd. @Index { @Code "@IndexCtd" } indexctdword. @Index { @Code "@IndexCtdWord" } indexctdformat. @Index { @Code "@IndexCtdFormat" } @ID @OneRow @Code @Verbatim { @IndexCtd { Yes } @IndexCtdWord { continued } @IndexCtdFormat { @Body @I (@CtdWord) } } If an @Code "@Index" entry has @Code "@SubIndex" entries that run over to the next column, Lout will print an unobtrusive running header at the top of that column, something like this in English: @ID { procrastination @I (ctd.) } It will print two running headers if a @Code "@SubIndex" entry has @Code "@SubSubIndex" entries that run over, one for the main entry and an indented one for the sub-entry. You can turn off these running headers by setting @Code "@IndexCtd" to {@Code No}. A particular word is associated with index running headers; by default it is @Code "ctd." in English and its equivalent in other languages. This is what the default value, {@Code "continued"}, of the @Code "@IndexCtdWord" option gives you; if you want some other word, change that option to the word you want. Finally, you can control the format of the running headers using {@Code "@IndexCtdFormat"}. Within this option, the symbol @Code "@Body" stands for the value of the index entry that is running over (as formatted by {@Code "@IndexFormat"}, {@Code "@SubIndexFormat"}, or {@Code "@SubSubIndexFormat"} but without any page numbers), and @Code "@CtdWord" stands for the word produced by the @Code "@IndexCtdWord" option. The default value of {@Code "@IndexCtdFormat"}, shown above, yields the index entry followed by @Code "@IndexCtdWord" in italics and parentheses. @PP Finally, we have four options to control the appearance of index spacers: indexspacerabove. @Index { @Code "@IndexSpacerAbove" } indexspacerbelow. @Index { @Code "@IndexSpacerBelow" } indexspacerfont. @Index { @Code "@IndexSpacerFont" } indexspacerformat. @Index { @Code "@IndexSpacerFormat" } @ID @OneRow @Code @Verbatim { @IndexSpacerAbove { 2v } @IndexSpacerBelow { 1v } @IndexSpacerFont { +3p } @IndexSpacerFormat { @Body } } @Code "@IndexSpacerAbove" and @Code "@IndexSpacerBelow" determine the amount of extra space to insert above and below index spacers (except that {@Code "@InitialIndexSpacer"} uses @Code {0v} for its above space). Any lengths from Section {@NumberOf objects} are acceptable here; the default lengths shown are two times and one times the current inter-line spacing. @Code "@IndexSpacerFont" may contain any font change acceptable to the {@Code "@Font"} symbol; the default increases the size by 3 points. For more radical changes to the spacer format, @Code "@IndexSpacerFormat" allows any symbols to be applied to the spacer object, which is represented by the symbol @Code "@Body" within this option. For example, @ID @Code "@IndexSpacerFormat { @Underline @Body }" will cause the spacer to be underlined. @PP The @Code "@IndexSpacer" symbol has {@Code above}, {@Code below}, {@Code font}, and {@Code format} options which override the four setup file options. For example, @Code "@InitialIndexSpacer" is equivalent to @ID @Code "@IndexSpacer above { 0v }" Whether you will ever need to vary the appearance of index spacers individually in this way is very doubtful, but the capacity is there. @PP Lout offers the possibility of having up to three independent indexes (useful for author indexes, etc.). The other two are called index A and index B, and they precede the main index in the output. Just replace @Code Index by @Code IndexA to refer to index A, and by @Code IndexB to refer to index B. For example, @ID @Code "smith.j @IndexA { Smith, John }" will insert an index entry to index A, and @Code "@IndexBBlanks" will insert the usual 25 blank entries into index B. There are setup file options to change the titles of indexes. @PP In large projects it might help to rename the @Code "@IndexA" symbol to something else, such as {@Code "@AuthorIndex"}. This can be done by placing @ID @Code { "import @DocumentSetup" "macro @AuthorIndex { @IndexA }" } in the @Code mydefs file. See Section {@NumberOf definitions} for an introduction to the @Code "mydefs" file; the word @Code macro is needed here instead of @Code "def" because we are introducing a new name for an existing symbol, not defining a new symbol. @End @Section lout-3.39/doc/user/vbas0000755000076400007640000000027311363700677013471 0ustar jeffjeffvi bas bas_star bas_objs bas_spac bas_char bas_empt bas_font bas_head \ bas_par1 bas_par2 bas_line bas_hyph bas_unde bas_date bas_lang \ bas_supe bas_verb bas_drop bas_conv lout-3.39/doc/user/typ_repo0000644000076400007640000003734211363700677014403 0ustar jeffjeff@Section @Title { Technical reports } @Tag { reports } @Begin @PP To make a technical report, start off with the @Code "report" setup reports. @Index { reports } technical.reports. @Index { technical reports } report. @Index @Code "@Report" file and the @Code "@Report" symbol: @ID @OneRow -1px @Break @Code { "@SysInclude { report }" "@Report" " @Title {}" " @Author {}" " @Institution {}" " @DateLine { No }" " @AtEnd {}" " @CoverSheet { Yes }" " @ContentsSeparate { No }" " @InitialFont { Times Base 12p }" " @InitialBreak { hyphen adjust 1.2fx }" " @InitialSpace { lout }" " @InitialLanguage { English }" " @PageOrientation { Portrait }" " @PageHeaders { Simple }" " @ColumnNumber { 1 }" " @FirstPageNumber { 1 }" " @OptimizePages { No }" " @AbstractDisplay { Yes }" " @AbstractTitle { Abstract }" " @Abstract {}" " @GlossaryText { @Null }" " @IndexText { @Null }" " @IndexAText { @Null }" " @IndexBText { @Null }" "//" } This shows all the options of {@Code "@Report"} @FootNote { Before Version 3.13, @Code "@Abstract" followed "//" rather than preceded it, and had some options that are now withdrawn. Old documents may therefore need some superficial rearrangement. } with their default values. As usual with options, they may be given in any order, and only the ones whose values need to be changed need be given at all. The meaning of the @Code "//" symbol is beyond our scope, but disaster will ensue if it is forgotten. @PP The @Code "@Title" option holds the title of the report. It will be printed using the @Code clines paragraph breaking style (Section {@NumberOf paras}), which centres each line, so it makes sense to have multi-line titles: @ID @OneRow @Code { "@Report" " @Title {" "The solution of real instances of" "the timetabling problem" "}" " ..." } With a multi-line title, each line after the first should begin at the left margin, not indented. It doesn't matter where the first line begins, because space following an open brace is ignored. @PP The @Code "@Author" and @Code "@Institution" options hold the author's name and institution or address, and will also be printed using the @Code clines style. If there are several authors but only one institution, list all the authors in the @Code "@Author" option: @ID @Code "@Author { Tim B. Cooper and Jeffrey H. Kingston }" With more authors, or with more than one institution, it is best to ignore the @Code "@Institution" option and place all the information within the @Code "@Author" option, enclosing institution information in @Code "@I" symbols. In extreme cases, a table with columns of authors might be necessary (Chapter {@NumberOf tables}). @PP @Code "@DateLine" may be set to {@Code No}, meaning no dateline, {@Code Yes}, meaning print the current date, or anything else, which is taken to be a date and printed: @ID @Code "@DateLine { 4 July, 1776 }" A good plan is to use @Code "@DateLine { Yes }" until the report is finalized. @PP The {@Code "@AtEnd"} option will come out on a single unnumbered page with no page headers or footers, and using the same margins as for even pages, after the very last page of the report; even after the index if there is one. It is intended to make it possible to include a back cover, so @Code "@PageOf last.page" does not take account of any @Code "@AtEnd" page. @PP The remaining options (except {@Code "@Abstract"}) are setup file options (Section {@NumberOf setup}) that frequently need to be changed. If your changes to the overall formatting are confined to these options, you can change them here and avoid having your own setup file. If you already have your own setup file, change them in either place and omit them in the other. @PP If @Code "@CoverSheet" is {@Code Yes}, an unnumbered cover cover.sheet. @Index @Code "@CoverSheet" sheet will be produced containing the title, author, institution, abstract, and dateline. Otherwise they will appear on the first page. The `cover sheet' is in reality a sequence of Intro pages (Section {@NumberOf headers}), numbered by default with Roman numerals on pages after the first. @PP In order to get a table of contents, it is necessary to use your own setup file (Section {@NumberOf setup} explains how to do this) and to set the @Code "@MakeContents" option within it to {@Code Yes}. The table of contents will ordinarily appear beginning on the first page, but if the @Code "@ContentsSeparate" option of @Code "@Report" is contents.separate @Index @Code "@ContentsSeparate" set to @Code "Yes" it will appear on separate pages. @PP @Code "@InitialFont" is the font of the bulk of the report, and should contain a family, a face, and a size. The default value selects the Times family, the Base face, and the 12 point size. @PP @Code "@InitialBreak" controls the behaviour of paragraph breaking in the bulk of the report. It should have three parts: a paragraph breaking style ({@Code adjust}, {@Code ragged}, etc.), an inter-line spacing ({@Code "1.2fx"} for single spacing, {@Code "2.4fx"} for double spacing, and so on), and either @Code "hyphen" or @Code "nohyphen" for turning hyphenation on or off. It may also have @Code "nobreakfirst" or @Code "nobreaklast" (or both), meaning to disallow a page break after the first line of a paragraph, or before the last, respectively. @PP @Code "@InitialSpace" determines how Lout treats white space between two objects, as described in Section {@NumberOf white}. @Code "@InitialLanguage" determines the language of the bulk of the report. @PP @Code "@PageOrientation" determines the orientation of the page. Its value may be {@Code Portrait} (the default), {@Code Landscape}, {@Code ReversePortrait}, or {@Code ReverseLandscape}. See Section {@NumberOf pagesize} for further details. @PP @Code "@PageHeaders" determines the appearance of page headers and footers. Its value may be {@Code None}, {@Code Simple}, {@Code Titles}, or {@Code NoTitles}. Section {@NumberOf headers} has the details, but just briefly, {@Code None} produces no page headers, {@Code Simple} produces a centred page number between hyphens on every page except the cover sheet and the first page, @Code Titles produces full running titles as in the present document, and @Code "NoTitles" is like @Code "Titles" with the running titles omitted, leaving just the page numbers. @PP @Code "@ColumnNumber" is the number of columns per page in the bulk of the report, and may be anything from {@Code 1} (the default value) to {@Code 10}. However, there is nothing analogous to the @Code "@FullWidth" symbol of ordinary documents. Instead, the cover sheet, title material, and all figures and tables will be printed full width, and the rest will be set in columns. There is a separate @Code "@IndexColumnNumber" option in the setup file which determines the number of columns in the index (Section {@NumberOf indexes}). @PP @Code "@FirstPageNumber" is the page number given to the first page. @PP Lout ordinarily places lines onto a page until space runs out, then moves to the next page and so on. This often produces ugly empty spaces at the bottoms of pages preceding large unbreakable displays. Setting the @Code "@OptimizePages" option to {@Code "Yes"} causes Lout to examine the overall situation and try to minimize the ugliness, using the @TeX optimal paragraph breaking algorithm. It takes two runs to do this, with intermediate results stored in Lout's cross reference database (Section {@NumberOf cross}); so deleting file {@Code lout.li} will reset it, which might be wise after major changes. It is possible for the optimizer to cycle, never settling on a single final best version; this is usually caused by footnotes or floating figures inserted at points which end up near page boundaries. @PP Finally we have three options that control the abstract. @Code "@AbstractDisplay" may be @Code { Yes } or {@Code No}; it determines whether the abstract is displayed (occupying the full page width except for an indent at each side like a quoted display) or inline (occupying the column width). There is a more general option, {@Code "@AbstractFormat"}, in the setup file that offers more formatting choices. @Code "@AbstractTitle" is the title of the abstract; its default value is @Code Abstract or its equivalent in the current language. Finally, @Code "@Abstract" contains the abstract. @Index @Code "@Abstract" abstract itself; it may be empty or absent, in which case there will be no abstract. The abstract may contain footnotes in the usual way. @PP The {@Code "@GlossaryText"}, {@Code "@IndexText"}, {@Code "@IndexAText"}, and {@Code "@IndexBText"} symbols allow you to insert some arbitrary text after the title of the glossary, index, etc., and before the entries. @PP After the compulsory {@Code "//"} comes the report body in the form of a sequence of sections: section.reports @SubIndex { in reports } @ID @OneRow @Code { "@Section" " @Title { Introduction }" "@Begin" "@PP" "..." "@End @Section" } No @Code "@BeginSections" or @Code "@EndSections" symbols are needed. The beginsections.reports @SubIndex { in reports } endsections.reports @SubIndex { in reports } general rule is that you need these bracketing symbols only when you are inside something else. Sections lie inside @Code "@Text" in ordinary documents, but they don't lie inside anything else in technical reports. @PP A section may have subsections, between subsection.reports @SubIndex { in reports } beginsubsections.reports @SubIndex { in reports } endsubsections.reports @SubIndex { in reports } @Code "@BeginSubSections" and {@Code "@EndSubSections"}: @ID @OneRow @Code { "preceding text" "@BeginSubSections" "@SubSection ... @End @SubSection" "@SubSection ... @End @SubSection" "..." "@SubSection ... @End @SubSection" "@EndSubSections" } Within each subsection there may be sub-subsections, each introduced by {@Code "@SubSubSection"}, with the whole sequence bracketed by subsubsection.reports @SubIndex { in reports } beginsubsubsections.reports @SubIndex { in reports } endsubsubsections.reports @SubIndex { in reports } @Code "@BeginSubSubSections" and {@Code "@EndSubSubSections"}: @ID @OneRow @Code { "preceding text" "@BeginSubSubSections" "@SubSubSection ... @End @SubSubSection" "@SubSubSection ... @End @SubSubSection" "..." "@SubSubSection ... @End @SubSubSection" "@EndSubSubSections" } There are no sub-sub-subsections. @PP After the sections comes an optional sequence of appendices: appendix.reports @SubIndex { in technical reports } @ID @OneRow @Code { "@Appendix" " @Title { Derivation of the renewal formula }" "@Begin" "@PP" "..." "@End @Appendix" } No @Code "@BeginAppendices" or @Code "@EndAppendices" symbols are needed, beginappendices.reports @SubIndex { in reports } endappendices.reports @SubIndex { in reports } because (like the sections above) these appendices do not lie inside any other large-scale structure symbol. The appendices are numbered A, B, C, etc., as is conventional for them. Within each appendix there may be a sequence of subappendices, obtained with the @Code "@SubAppendix" symbol and bracketed by @Code "@BeginSubAppendices" subappendix.reports @SubIndex { in reports } beginsubappendices.reports @SubIndex { in reports } endsubappendices.reports @SubIndex { in reports } and {@Code "@EndSubAppendices"}: @ID @OneRow @Code { "preceding text" "@BeginSubAppendices" "@SubAppendix ... @End @SubAppendix" "@SubAppendix ... @End @SubAppendix" "..." "@SubAppendix ... @End @SubAppendix" "@EndSubAppendices" } There are sub-subappendices following the same pattern, but no subsubappendix.reports @SubIndex { in reports } beginsubsubappendices.reports @SubIndex { in reports } endsubsubappendices.reports @SubIndex { in reports } sub-sub-subappendices. @PP The report ends with the last section or appendix; any reference list or index will be appended automatically. Although we have described how to create reports as though everything was in one large file, in practice it is much better to divide the report into multiple files, following the method given in Section {@NumberOf organizing}. @PP In addition to the {@Code "@Title"} option, each large-scale structure symbol ({@Code "@Section"}, {@Code "@SubSection"}, {@Code "@SubSubSection"}, {@Code "@Appendix"}, {@Code "@SubAppendix"}, and {@Code "@SubSubAppendix"}) has a @Code "@Tag" option for cross referencing (Section {@NumberOf cross}), an @Code "@InitialLanguage" option for changing the language of that part of the document, and a @Code "@RunningTitle" option which will be used in place of @Code "@Title" in running headers if given. @Code "@RunningTitle" is useful when the full title is rather long. @PP The features described in other chapters are all available within technical reports. To get a table of contents, change the @Code "@MakeContents" option in the setup file to {@Code Yes}; the rest is automatic, and you don't need the @Code "@ContentsGoesHere" symbol from ordinary documents. To get an index, again you need only change the @Code "@MakeIndex" setup file option to {@Code Yes}. Endnotes and references appear at the end of the report. Figures and tables are numbered 1, 2, 3, etc. @PP Within the @Code "report" setup file there is a @Code "@ReportSetup" symbol whose options control the appearance of features specific to report.setup @Index @Code "@ReportSetup" reports (in other words, the features described in this section). Section {@NumberOf setup} explains setup files and their options in general; here is a representative sample of these options, showing their default values: @ID @OneRow @Code { "@Use { @ReportSetup" " # @CoverSheet { Yes }" " # @DateLine { No }" " # @ReferencesBeforeAppendices { No }" " # @AbstractWord { abstract }" " # @ContentsWord { contents }" " # @SectionNumbers { Arabic }" " # @SectionHeadingFont { Bold }" " # @SectionGap { 2.00v }" " # @SectionInContents { Yes }" " # @SectionContentsIndent { 0f }" "}" } @Code "@CoverSheet" and @Code "@DateLine" are as for {@Code "@Report"}; you can set them in either place as you prefer. @Code "@ReferencesBeforeAppendices" determines whether the reference list is printed out before or after any appendices. @Code "@AbstractWord" determines the value of the title of the abstract if none is given there; its default value, {@Code abstract}, produces `Abstract' in the current language. @Code "@ContentsWord" is similar; its default value produces `Contents' in the current language. The other four options control the appearance of sections, and there are similar options for controlling the other large-scale structure symbols. @PP @Code "@SectionNumbers" determines how sections will be numbered, and may be @Code { None }, @Code { Arabic }, @Code { Roman }, @Code { UCRoman }, @Code { Alpha }, or @Code { UCAlpha }. The default value is @Code Arabic for sections, and also for all large-scale structure symbols except appendices, for which it is {@Code UCAlpha}. This produces the appendices numbered in upper-case letters (A, B, C, etc.) that were mentioned earlier. @PP @Code "@SectionHeadingFont" is the font used for section headings. The default value shown above produces the bold face from the family of the initial font. A family name and size is acceptable here as well: @ID @Code "@SectionHeadingFont { Helvetica Base +2p }" produces section headings in the Helvetica font, two points larger than the initial font size. @PP @Code "@SectionGap" determines how much space is left blank before each section title; the default value shown above is twice the current inter-line spacing. The special value @Code "2b" may be used to get a page break rather than a space. @Code "@SectionInContents" determines whether or not an entry is made in the table of contents for each section; it may be @Code Yes or {@Code No}. @Code "@SectionContentsIndent" determines how far the contents entry is indented from the left margin if printed at all. There are similar options for other large-scale structure symbols. @End @Section lout-3.39/doc/user/pie_labe0000644000076400007640000003161411363700677014276 0ustar jeffjeff@Section @Title { Labels } @Tag { pie_labe } @Begin @PP labels. @RawIndex { labels } labels.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.labels @SubIndex { labels } Labels are short messages printed inside the slices, identifying them. We've already seen the @Code label option, in which we place the label, which can be an arbitrary Lout object. In this section we'll show how to change the format and position of these labels. @PP For changing the format of a label there are four options: @ID -1px @Break @OneRow @Code @Verbatim { @Slice labelfont { -2p } labelbreak { clines } labelmargin { 0.2f } labelformat { @Body } } This shows the default values of these options. @PP The @Code labelfont option determines the font in which the labelfont. @RawIndex { @Code "labelfont" options } labelfont.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.labelfont @SubIndex { @Code "labelfont" option } label will be printed. The default value shown above calls for the current font to be used, two points smaller than it otherwise would have been. Any value acceptable to the @Code "@Font" symbol from Section {@NumberOf fonts} is acceptable here, including changing the family and face. @PP The @Code labelbreak option determines how paragraph breaking labelbreak. @RawIndex { @Code "labelbreak" options } labelbreak.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.labelbreak @SubIndex { @Code "labelbreak" option } within the label will be carried out. Any value acceptable to the @Code "@Break" symbol from Section {@NumberOf paras} is acceptable here. The default value shown above causes each line of the label to be one line of the result, with each line centred with respect to the longest line. @PP The @Code labelmargin option places a margin around the labelmargin. @RawIndex { @Code "labelmargin" options } labelmargin.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.labelmargin @SubIndex { @Code "labelmargin" option } label. The default value shown makes a margin of width 0.2 times the current font size. This margin has no effect on the appearance or position of the label (in particular, it is drawn outside @Code "labelformat" below, not inside). It is only needed for adjusting the appearance of fingers, as described as the end of this section. @PP The @Code labelformat option allows more radical changes labelformat. @RawIndex { @Code "labelformat" options } labelformat.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.labelformat @SubIndex { @Code "labelformat" option } to the label format. Its value may be an arbitrary object. Within it, the symbol @Code "@Body" stands for the value of the @Code "label" option: @ID -1px @Break @OneRow @Code @Verbatim { @Slice labelformat { @ShadowBox @Body } } will cause the text of the label to appear within a shadow box. Of course, we could get this effect by placing these symbols in the label itself, like this: @ID -1px @Break @OneRow @Code @Verbatim { @Slice label { @ShadowBox { Admin (20%) } } } However, like all @Code "@Slice" options, @Code labelformat may be given to @Code "@Pie" as well, like this: @ID -1px @Break @OneRow @Code @Verbatim { @Pie labelformat { @ShadowBox @Body } } and there it affects every label in the pie graph: @CD @Pie labelformat { @ShadowBox @Body } { @Slice weight { 20 } label { Admin (20%) } @Slice weight { 40 } label { Research (40%) } @Slice weight { 40 } label { Teaching (40%) } } When the labels all have the same format, this is much faster and less error-prone than formatting each label independently, especially when experimenting with different formats. @PP Two options are available for changing the positions of labels: @ID -1px @Break @OneRow @Code @Verbatim { @Slice labelradius { internal } labeladjust { 0c 0c } } Each label occupies a rectangular area, and these options determine the position of the centre of the rectangle. @PP The @Code labelradius option determines how far the labelradius.pie @Index { @Code "labelradius" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.labelradius @SubIndex { @Code "labelradius" option } centre of the label is from the point of the slice (usually the same as the centre of the pie graph, but not when the slice is detached). The default value of {@Code labelradius} shown above, {@Code internal}, is a synonym for 0.6, so it causes the centre of the label to appear 60% of the way from the point of the slice to its outside boundary. The angular position of the label centre will be halfway around the arc of the slice. No attempt is made to fit the label into the interior of the slice; it lands where these rules say irrespective of what might be overstruck when it does. It is printed after its slice's outline and paint, so it can't be hidden by them; but if it strays into the next slice it will be buried under any paint in that slice. @PP For fine adjustments, the @Code labeladjust option labeladjust. @RawIndex { @Code "labeladjust" options } labeladjust.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.labeladjust @SubIndex { @Code "labeladjust" option } may be used to move the label centre any distance in the x and y directions. For example, @ID -1px @Break @OneRow @Code @Verbatim { @Slice labeladjust { 0.2c -0.1c } } will move the label centre 0.2 centimetres further to the right and 0.1 centimetres down from where it would otherwise have appeared. @PP The recommended procedure for getting internal labels to look good is to first try them without any adjustment. Next, consider rearranging the label layout. Our running example has poorly positioned labels, but they can be improved just by breaking each label over two lines: @CD @Pie # abovecaption { Ideal breakdown of academic workload } aboveextra { 1f } { @Slice detach { yes } weight { 20 } label { Admin @LLP (20%) } @Slice weight { 40 } paint { green } label { Research @LLP (40%) } @Slice weight { 40 } paint { lightred } label { Teaching @LLP (40%) } } Finally, the @Code labeladjust option is there as a last resort. @PP To get a label outside its slice, use externallabels.pie @Index { external labels in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.externallabels @SubIndex { external labels } @ID -1px @Break @OneRow @Code @Verbatim { @Slice labelradius { external } } Again, @Code external is just a synonym for the number 1.4, meaning that the label centre is to be placed 140% of the pie chart's radius away from the point of the slice. It can be replaced by any number. @PP Two issues arise when labels are placed externally. The first issue is that Lout does not know where these labels are being printed and so cannot leave space for them. Section {@NumberOf pie_over} has already explained how to handle this problem using the {@Code leftextra}, {@Code rightextra}, {@Code aboveextra}, and {@Code belowextra} options of {@Code "@Pie"}. Our running example, converted to external labels, might be entered like this: @ID -1px @Break @OneRow @Code @Verbatim { @Pie abovecaption { Ideal breakdown of academic workload } labelradius { external } aboveextra { 0.7c } belowextra { 1.3c } { @Slice detach { yes } weight { 20 } label { Admin @LLP (20%) } @Slice weight { 40 } paint { green } label { Research @LLP (40%) } @Slice weight { 40 } paint { lightred } label { Teaching @LLP (40%) } } } which produces this: @CD @Pie abovecaption { Ideal breakdown of academic workload } labelradius { external } aboveextra { 0.7c } belowextra { 1.3c } { @Slice detach { yes } weight { 20 } label { Admin @LLP (20%) } @Slice weight { 40 } paint { green } label { Research @LLP (40%) } @Slice weight { 40 } paint { lightred } label { Teaching @LLP (40%) } } The amount of extra space to add has to be worked out by experiment. It can help to temporarily remove all captions and enclose the @Code "@Pie" symbol in a box with zero margin: @ID -1px @Break @Code @Verbatim { @Box margin { 0i } @Pie ... } to show clearly how much space the @Code extra options are covering. @PP The second issue raised by external labels is how to visually connect each label with its slice, when this fingers.pie @Index { fingers in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.fingers @SubIndex { fingers } seems necessary. @Code "@Pie" can do this with short line segments that we will call {@I fingers}: @CD @Pie abovecaption { Ideal breakdown of academic workload } labelradius { external } aboveextra { 1.3f } belowextra { 3f } finger { yes } { @Slice detach { yes } weight { 20 } label { Admin @LLP (20%) } @Slice weight { 40 } paint { green } label { Research @LLP (40%) } @Slice weight { 40 } paint { lightred } label { Teaching @LLP (40%) } } These were made by adding @Code "finger { yes }" as another option to the @Code "@Pie" symbol. @PP Each slice has several options which control the appearance of its own finger. Here is the full set, showing their default values: @ID -1px @Break @OneRow @Code @Verbatim { @Slice finger { no } fingerstyle { solid } fingerdashlength { 0.2f } fingerwidth { thin } fingerradius { 0.7 } fingeradjust { 0c 0c } } The @Code "finger" option may be @Code "no" or @Code "yes" finger.pie @Index { @Code "finger" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.finger @SubIndex { @Code "finger" option } and determines whether a finger will be drawn or not. @PP The {@Code fingerstyle}, {@Code fingerdashlength}, and {@Code fingerwidth} options are exactly analogous to fingerstyle.pie @Index { @Code "fingerstyle" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.fingerstyle @SubIndex { @Code "fingerstyle" option } fingerdashlength.pie @Index { @Code "fingerdashlength" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.fingerdashlength @SubIndex { @Code "fingerdashlength" option } fingerwidth.pie @Index { @Code "fingerwidth" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.fingerwidth @SubIndex { @Code "fingerwidth" option } the {@Code outlinestyle}, {@Code outlinedashlength}, and {@Code outlinewidth} options. They take the same range of values, and determine the style of the line segment drawn to make the finger (solid, dashed, etc.). @PP The {@Code fingerradius} and {@Code fingeradjust} options are exactly analogous to the {@Code labelradius} and {@Code labeladjust} options, except that instead of determining the position of the centre of the label they determine the position of the inner endpoint of the finger. The default values place it 70% of the way from the point of the slice to its outer edge. The @I outer endpoint of the finger always terminates on the bounding box of the label, with the line pointing through the centre of the label, and this cannot be changed, although the @Code labelmargin option (see the start of this section) may be used to decrease or increase the margin around the label, thus causing the finger to terminate closer to the label or further away. @PP Fingers may have arrowheads on their inner ends: @ID @OneRow @Code @Verbatim { @Pie labelradius { 1.6 } aboveextra { 2f } belowextra { 4f } finger { yes } fingerarrow { yes } fingerradius { 1 } { @Slice detach { yes } weight { 20 } label { Admin @LLP (20%) } @Slice weight { 40 } paint { green } label { Research @LLP (40%) } @Slice weight { 40 } paint { lightred } label { Teaching @LLP (40%) } } } produces @CD @Pie labelradius { 1.6 } aboveextra { 2f } belowextra { 4f } finger { yes } fingerarrow { yes } fingerradius { 1 } { @Slice detach { yes } weight { 20 } label { Admin @LLP (20%) } @Slice weight { 40 } paint { green } label { Research @LLP (40%) } @Slice weight { 40 } paint { lightred } label { Teaching @LLP (40%) } } The point of the arrowhead coincides with the inner endpoint of the finger, so @Code "fingerradius" would usually be set to @Code 1 when arrowheads are used. @PP Although @Code "@Pie" does not offer the elegant selection of arrowhead styles of {@Code "@Diag"}, it is possible to change the length and width of the arrowheads with these options: @ID @OneRow @Code @Verbatim { @Slice fingerarrowlength { 0.6f } fingerarrowwidth { 0.45f } } This example shows the default values of these options. These options may of course be given to @Code "@Pie" and also in the setup file as usual. @End @Section lout-3.39/doc/user/mat_disp0000644000076400007640000001350411363700677014334 0ustar jeffjeff@Section @Title { Displaying equations } @Tag { mathdisplays } @Begin @PP The result of the @Code "@Math" symbol is an object which, according to the displayed.mathematics @Index { displayed mathematics } golden rule (Section {@NumberOf objects}), may appear anywhere: inside a paragraph, inside a table, and so on. In particular, equations are often displayed using the @Code "@CentredDisplay" or @Code "@IndentedDisplay" symbols from Section {@NumberOf displays}: @ID @Code "@IndentedDisplay @Math { ... }" Now displayed equations are often numbered, and often aligned with one another on their equals signs. For this there are special display symbols which are the the subject of this section. These symbols can align and number any display at all, but since in practice they seem to be used only with equations, we discuss them here rather than in Section {@NumberOf displays} where they really belong. @PP Let's begin by looking at a first example of a numbered display: aligned.displays @Index { aligned displays } aligned.equations @Index { aligned mathematics } numbered.displays @Index { numbered displays } numbered.equations @Index { numbered mathematics } @BeginAlignedDisplays @CentredAlignedNumberedDisplay @Tag { fibeq } @Math { F sub n ^= F sub {n-1} + F sub {n-2} } After the display we might have some more text for a while, and then we might want a second display, aligned on its equals sign with the first, and also numbered in sequence with it: @CentredAlignedNumberedDisplay @Math { F sub n - F sub {n-1} ^= F sub {n-2} } @EndAlignedDisplays Notice that the two displays are centred as a block as well as aligned. Altogether there are four ways in which displays vary: @BL @LI { A display can be raw or not raw (see below); } @LI { It can be a {@Code "@Display"}, {@Code "@LeftDisplay"}, {@Code "@IndentedDisplay"}, {@Code "@QuotedDisplay"}, {@Code "@CentredDisplay"}, {@Code "@CenteredDisplay"}, or {@Code "@RightDisplay"}; } @LI { It can be aligned or not aligned; } @LI { It can be numbered or not numbered. } @EL All possible combinations are allowed. The display that has everything is called @ID @Code "@RawCentredAlignedNumberedDisplay" By leaving out some or all of {@Code Raw}, {@Code Aligned}, and {@Code Numbered}, and by changing or leaving out {@Code Centred}, we get all these combinations. The two displays numbereddisplay. @Index @Code "@NumberedDisplay" aligneddisplay. @Index @Code "@AlignedDisplay" given earlier were made like this: @ID @OneRow @Code @Verbatim { ... a first example of a numbered display: @BeginAlignedDisplays @CentredAlignedNumberedDisplay @Tag { fibeq } @Math { F sub n ^= F sub {n-1} + F sub {n-2} } After the display we might ... numbered in sequence with it: @CentredAlignedNumberedDisplay @Math { F sub n - F sub {n-1} ^= F sub {n-2} } @EndAlignedDisplays Notice that the two displays are centred ... } All numbered displays have an optional @Code "@Tag" option which is used for cross referencing (see Section {@NumberOf cross}). Alignment and numbering work quite independently; they don't have to start or end together, and there can be non-aligned and non-numbered displays among the others. @PP When aligned displays are used, it is necessary to indicate where the aligned group begins and ends, by placing @Code "@BeginAlignedDisplays" beginaligneddisplays @Index @Code "@BeginAlignedDisplays" endaligneddisplays @Index @Code "@EndAlignedDisplays" just before the first, and @Code "@EndAlignedDisplays" just after the last. The alignment points are indicated by preceding them by the symbol {@Code "^"}, so you aren't restricted to aligning at equals signs. @Code "@BeginAlignedDisplays" and @Code "@EndAlignedDisplays" cannot span across several sections or subsections: the equations aligned by them must lie within a single large-scale structure symbol. @PP In our example of aligned and numbered displays, the two displays were separated by some ordinary text. Very often, though, aligned displays follow directly after each other. This is a problem, because if you have one display directly following another there will be too much vertical space between them. This problem was mentioned in Section {@NumberOf displays}, and the recommended solution was to use a list. However, there are no aligned or numbered (in this sense) lists. @PP Fortunately, each display symbol has a `raw' version, which means that no space is inserted above or below the display. Instead, raw.displays @Index { raw displays } you must insert it yourself using paragraph symbols: @ID @OneRow @Code @Verbatim { preceding text @DP @RawAlignedDisplay @Math { ... } @DP @RawAlignedNumberedDisplay @Math { ... } @DP following text } # You get the right spacing by placing {@Code "@DP"} symbols before, # between, and after each display; and you get to use the specialized # displays that you need. Raw and non-raw displays may be numbered and aligned together. @PP Numbered displays are numbered automatically. Depending on where in the document they appear, the number might include a chapter number or section number, etc. This is controlled by options in the setup file; for example, setting @Code "@ChapterNumInDisplays" to @Code Yes ensures that numbered displays will be numbered afresh at the beginning of each chapter, and that the number will include a chapter number. There is also a @Code "@DisplayNumStyle" option which controls the style of displays; the default value, {@Code "(num)"}, encloses the number in parentheses as usual for equations. @PP Every display symbol has an abbreviated form consisting of @Code "@" followed by its capital letters only. For example, @Code "@BeginAlignedDisplays" may be abbreviated to {@Code "@BAD"}, and the display that has everything to {@Code "@RCAND"}. Owing to an unfortunate clash between the initial letters of `raw' and `right', @Code "@RightDisplay" and the other right displays have no abbreviations. @End @Section lout-3.39/doc/user/prg_opti0000644000076400007640000001603011363700677014354 0ustar jeffjeff@Section @Title { Changing the appearance of a program } @Tag { prg_opti } @Begin @PP The {@Code "@CP"}, {@Code "@Eiffel"} etc. symbols have a number of options for changing the appearance of the printed program. These options are the same for all symbols, although their default values may vary. The @Code "style" option changes the printing style; its programs. @RawIndex { programs } programs.style @SubIndex { @Code "style" option } style. @RawIndex { @Code "style" option } style.in.programs @SubIndex { in programs } programs. @RawIndex { programs } programs.fixed @SubIndex { @Code "fixed" style } fixed.programs @Index { @Code "fixed" style (programs) } value may be {@Code "fixed"} (fixed-width font), {@Code "varying"} programs. @RawIndex { programs } programs.varying @SubIndex { @Code "varying" style } varying.programs @Index { @Code "varying" style (programs) } programs. @RawIndex { programs } programs.symbol @SubIndex { @Code "symbol" style } symbol.programs @Index { @Code "symbol" style (programs) } (varying-width font), or {@Code "symbol"} (varying-width font with mathematical symbols used for some operators). Its default value depends on the language, and may be found in the fourth column of the table at the start of this chapter. The example in the previous section was in @Code fixed style; we can switch styles like this: @ID @OneRow @Code @Verbatim { @CP style { varying } { #include treeprint(struct tnode *p) /* print tree p recursively */ { if (p != NULL) { treeprint(p->left); printf(\%4d %s\\n\, p->count, p->word); treeprint(p->right); } } } } The result in this case will be @ID @OneRow @CP style { varying } { #include treeprint(struct tnode *p) /* print tree p recursively */ { if (p != NULL) { treeprint(p->left); printf("%4d %s\n", p->count, p->word); treeprint(p->right); } } } If we use @Code "style { symbol }" we get this: @ID @OneRow @CP style { symbol } { #include treeprint(struct tnode *p) /* print tree p recursively */ { if (p != NULL) { treeprint(p->left); printf("%4d %s\n", p->count, p->word); treeprint(p->right); } } } with mathematical symbols replacing some of the operators. @PP The {@Code "@CP"}, {@Code "@Eiffel"} etc. symbols have additional options which allow a finer control over the style. Here they all are, with their default values: @ID @OneRow @Code @Verbatim { @CP [ or @Eiffel, @Blue, etc. ] pipe {} numbered { No } blanknumbered { Yes } style { fixed } font { Courier } size { -1.0p } line { 1.0vx } blanklinescale { 1.0 } space { lout } tabin { 8 } tabout { 8s } identifiers { Base } keywords { Base } operators { Base } numbers { Base } strings { Base } comments { Base } { ... } } Apart from {@Code "pipe"}, {@Code "numbered"} and {@Code "blanknumbered"}, the default values shown are for @Code "style { fixed }" only; the other styles have other defaults (Section {@NumberOf cpsetup}). For the {@Code "pipe"} option, see Section {@NumberOf pipes}. @PP The value of {@Code "numbered"} may be {@Code "No"} (the default), {@Code "Yes"}, or a number, and it determines whether or not programs. @RawIndex { programs } programs.numbered @SubIndex { @Code "numbered" option } numbered.programs @Index { @Code "numbered" option (programs) } line numbers are to be added, and if so the value of the first one. If @Code "numbered" is {@Code "Yes"}, then the {@Code "blanknumbered"} option becomes relevant, and it determines whether blank lines are to programs. @RawIndex { programs } programs.blanknumbered @SubIndex { @Code "blanknumbered" option } blanknumbered.programs @Index { @Code "blanknumbered" option (programs) } receive line numbers or not. It has three acceptable values: {@Code "Yes"}, the default value, meaning that blank lines are printed with line numbers, just like other lines; {@Code No}, meaning that blank lines are not assigned line numbers; and {@Code NoPrint}, meaning that blank lines are assigned line numbers but these are not printed, so that the line numbers printed before and after a blank line will differ by 2. @PP The {@Code "style"} option is already familiar. Next comes {@Code "font"}, which determines the font family to use, {@Code "size"}, programs. @RawIndex { programs } programs.font @SubIndex { @Code "font" option } font.option. @RawIndex { @Code "font" option } font.option.in.programs @SubIndex { in program formatting } programs. @RawIndex { programs } programs.size @SubIndex { @Code "size" option } size.programs @Index { @Code "size" option (programs) } programs. @RawIndex { programs } programs.line @SubIndex { @Code "line" option } line.programs @Index { @Code "line" option (programs) } the font size to use, {@Code "line"}, the inter-line spacing, {@Code "blanklinescale"}, a scale factor by which the usual programs. @RawIndex { programs } programs.blanklinescale @SubIndex { @Code "blanklinescale" option } blanklinescale.programs @Index { @Code "blanklinescale" option (programs) } height of blank lines without printed line numbers is reduced (as in the option to the @Code "@Break" symbol of the same name), and {@Code "space"}, the spacing mode (as for the @Code "@Space" symbol of Section {@NumberOf white}). programs. @RawIndex { programs } programs.space @SubIndex { @Code "space" option } space.programs @Index { @Code "space" option (programs) } The default value of @Code "size" asks for one point smaller than in the surrounding document; this was done to compensate for Courier's relatively large appearance compared to other fonts of the same nominal size. @PP The @Code "tabin" and @Code "tabout" options are the subject of Section {@NumberOf tabs}. After them come six options giving the particular font faces in which to print identifiers, keywords, operators, programs. @RawIndex { programs } programs.identifiers @SubIndex { @Code "identifiers" option } identifiers.programs @Index { @Code "identifiers" option (programs) } programs. @RawIndex { programs } programs.keywords @SubIndex { @Code "keywords" option } keywords.programs @Index { @Code "keywords" option (programs) } programs. @RawIndex { programs } programs.operators @SubIndex { @Code "operators" option } operators.programs @Index { @Code "operators" option (programs) } programs. @RawIndex { programs } programs.numbers @SubIndex { @Code "numbers" option } numbers.programs @Index { @Code "numbers" option (programs) } programs. @RawIndex { programs } programs.strings @SubIndex { @Code "strings" option } strings.programs @Index { @Code "strings" option (programs) } programs. @RawIndex { programs } programs.comments @SubIndex { @Code "comments" option } comments.programs @Index { @Code "comments" option (programs) } numbers, strings, and comments. {@Code "Base"} means the basic face; other commonly available choices are {@Code "Slope"} and {@Code "Bold"}. These options may all be set to different faces if desired. @End @Section lout-3.39/doc/user/bas_conv0000644000076400007640000000622411363700677014327 0ustar jeffjeff@Section @Title { Alternative conventions for white space } @Tag { white } @Begin @PP As Section {@NumberOf spaces} explains, when two objects are separated by one or more white space characters (spaces, tabs, and newlines), this same amount of white space will separate the two objects in the output. @PP Two other conventions for interpreting these white spaces have been used in other document formatting systems. Roughly, they are: @ID @Tab @Fmta { @Col A ! @Col B } { @Rowa A { troff } B { Like Lout, except that at every point where a sentence ends at the end of an input line, add one extra space in the output. } @Rowa A { @TeX } B { Replace all sequences of two or more white spaces by one. Then, at every point where a sentence ends, whether or not it is at the end of a line, add one extra space in the output. } } Lout offers these two alternative conventions by means of the initialspace. @Index { @Code "@InitialSpace" option } @Code "@InitialSpace" option. This is similar to the @Code "@InitialFont" option described at the end of Section {@NumberOf fonts}, in that you can set it at the beginning of your document, like this: @ID @OneRow @Code { "@SysInclude { doc }" "@Document" " @InitialSpace { lout }" "//" "@Text @Begin" "..." "@End @Text" } or you can set it in the setup file. The above example shows the default value, {@Code lout}, which produces Lout's usual spacing; lout.space @Index { @Code lout spacing } troff.space @Index { @Code troff spacing } tex.space @Index { @Code tex (@LaTeX) spacing } the alternative values are @Code "troff" and {@Code "tex"}. @PP How to tell whether a sentence has ended is a vexed question. For the @Code "troff" method, Lout looks for a word at the end of a line ending in one of `.', `:', `?', or `!' optionally followed by either a right quote character or a right parenthesis. Actually, this depends on the current language (Section {@NumberOf languages}); the rule just given is for English, and other languages may differ. @PP The @Code "tex" rule for where a sentence ends is slightly more complicated. Lout looks for a word, not necessarily at the end of an input line, which ends as described for @Code "troff" but in addition has a lower-case letter preceding that. @PP In all cases you must use a paragraph symbol, such as @Code "@PP" or {@Code "@LP"}, to separate your paragraphs. The common convention of other systems, that a blank line marks a paragraph, is never true of Lout. @PP Whatever rule is adopted, there are occasional exceptions where you will have to indicate explicitly whether you want an ordinary space or a between-sentences space. For this there are two symbols, @Code "~" (ordinary space) and {@Code "~~"} (between-sentences space). For example, @ID @Code "Dr.~Kingston" will produce an ordinary space between the two words, even with @Code "tex" which would otherwise consider that spot to be the end of a sentence. Spaces adjacent to these two symbols have no effect on the result. Please note however that @Code "~" produces an unbreakable space (that is, one that will never be replaced by the end of a line) in contrast to just leaving a space, which is breakable. @End @Section lout-3.39/doc/user/bas_objs0000644000076400007640000001427711363700677014326 0ustar jeffjeff@Section @Title { Objects, symbols, options, and lengths } @Tag { objects } @Begin @PP Lout is not concerned with the exact shapes of individual characters, only with the rectangular areas they occupy: @ID { @Box margin { 0c } B & @Box margin { 0c } i & @Box margin { 0c } o & @Box margin { 0c } l & @Box margin { 0c } o & @Box margin { 0c } g & @Box margin { 0c } y } When letters join together into a word, the result is a larger rectangle enclosing them all: @ID @Box margin { 0c } Biology When words join into lines we get even larger rectangles: @ID @Box margin { 0c } { Biology is the study of living things. } and so on up through paragraphs and columns to the largest rectangles, which are pages. We call any such rectangle, whether made up of one character, one word, one line, one paragraph, one page, or anything object. @Index { object } else, an @I { object }. @PP We also often say, for example, `the object {@Code "@I { Hello world }"},' referring to a piece of Lout's input as an object. This makes sense because we are anticipating the result produced, in this case the object @I { Hello world }. It's true that if a line break happens to fall between @I Hello and @I { world }, the result of @Code "@I { Hello world }" is not a single rectangle. We answer this by thinking of objects as existing before paragraph breaking rearranges them. @PP Not everything is an object, however. @Code "@I" alone is not an object, merely a symbol with the potential of producing an object when given an object to work on. To understand this, ask yourself what rectangle @Code "@I" alone could possibly represent: there is no such rectangle. @PP It helps to imagine the assembly of objects taking place before your eyes. Look at @Code Hello and imagine the objects H, e, l, l, o being assembled into the larger object Hello; look at @Code "Hello world" and imagine Hello and world being assembled into Hello world. When looking at @ID @Code "@I { Hello world }" you need to imagine the @Code "@I" symbol consuming the following object, Hello world, and replacing it with the object @I { Hello world }. Here is another example: @ID @Code "@CurveBox { Hello world }" The @Code "@CurveBox" symbol (Section {@NumberOf boxes}) consumes Hello world and replaces it with the object @ID @CurveBox { Hello world } This brings us to a basic principle of Lout: @I { Where you can put one object, you can put any object }. A few examples will show the vast range of possibilities opened up by this: @ID @Code "@CurveBox { @I Hello world }" produces @ID @CurveBox { @I Hello world } It doesn't bother @Code "@CurveBox" if one of the words inside it is in italics. Next: @ID @Code "@I @CurveBox { Hello world }" produces @ID @I @CurveBox { Hello world } The object following @Code "@I" cannot be just @Code {"@CurveBox"}, since that is not an object by itself (it needs to be applied to some object first). So the object following @Code "@I" is @Code {"@CurveBox { Hello world }"}, and it is this that is consumed by @Code "@I" and modified. The @Code "@I" symbol is happy to hunt through the object looking for words to italicize. We could go on indefinitely in this way, producing @ID @CurveBox { @CurveBox Hello @CurveBox world } for example by {@Code "@CurveBox { @CurveBox Hello @CurveBox world }"}. @PP Symbols like @Code "@CurveBox" often have @I { options }, which are option. @Index { option } subsidiary symbols that modify the result. For example, @Code "@CurveBox" has @Code "margin" and @Code "paint" options: @ID @OneRow @Code { "@CurveBox" " margin { 0.5c }" " paint { lightgrey }" "{ Hello world }" } Options come immediately after the main symbol, before any following object. Each consists of the option name followed by the value we want the option to have, always enclosed in braces. Setting out options on separate lines as we have done above makes them easy to see but is not compulsory (end of line and space are the same to Lout). The result, naturally enough, is a curved box with a 0.5 centimetre margin around its contents, painted light grey: @ID @CurveBox margin { 0.5c } paint { lightgrey } { Hello world } Options are optional: if you leave out an option, Lout supplies a sensible @I default value for it. Options may be given in any order. They are a very useful way of adding flexibility to symbols without cluttering things up when they aren't needed. They also help with learning: you can learn the basic symbol first and worry about the options later. @PP Whenever a length is required, as in the @Code margin option above, it length. @Index { length } centimetres. @Index { centimetres } inches. @Index { inches } point.unit @Index { point (unit of measurement) } em.unit @Index { em (unit of measurement) } f.unit @Index { @Code f unit of measurement } s.unit @Index { @Code s unit of measurement } v.unit @Index { @Code v unit of measurement } units.of @Index { units of measurement } may be given using any one of the following seven units of measurement: @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col B } vmargin { 0.5vx } { @Rowa A { c } B { Centimetres } @Rowa A { i } B { Inches ({@Code "1i"} = {@Code "2.54c"}) } @Rowa A { p } B { Points ({@Code "72p"} = {@Code "1i"}) } @Rowa A { m } B { Ems ({@Code "12m"} = {@Code "1i"}) } @Rowa A { f } B { @Code "1f" is the current font size } @Rowa A { s } B { @Code "1s" is the current width of a space character } @Rowa A { v } B { @Code "1v" is the current inter-line spacing } } The first four all define absolute distances and are strictly interchangeable. It is traditional to measure font sizes in points; typical sizes are @Code "12p" and {@Code "10p"}, but fractional sizes are allowed. @PP If you use the @Code "f" unit, the length will depend on the current font size. This can be very useful. For example, the default value of the @Code "margin" option of @Code "@CurveBox" is @Code "0.3f" (0.3 times the current font size). If you use a large font, for example in an overhead transparency, you get a correspondingly large margin without having to ask for it. @PP The @Code "s" and @Code "v" units are less useful. The @Code "v" unit is used within paragraph symbols (Section {@NumberOf paragraphs}) to ensure that the space between paragraphs widens with the inter-line spacing. @End @Section lout-3.39/doc/user/str_theo0000644000076400007640000001135211363700677014362 0ustar jeffjeff@Section @Title { Theorems, lemmas, corollaries, definitions, propositions, examples, and claims } @RunningTitle { Theorems, lemmas, etc. } @Tag { theorems } @Begin @PP theorem. @Index @Code "@Theorem" A theorem is created like this: @ID @OneRow @Code @Verbatim { @LD @Theorem @Title { Fermat's Last Theorem } { @M { a sup n + b sup n != c sup n } for all positive integers @M { a }, @M { b }, @M { c } and @M { n } when @M { n > 2 }. @LP @Proof I have a proof of this theorem, but the margin is too small to contain it. @EndProof } } where we have used the @Code "@LD" `left display' symbol from Section {@NumberOf displays} to get a left-justified display, and the @Code "@M" symbol from Chapter {@NumberOf mathematics} for the equations. The result is @ID @Theorem @Title { Fermat's Last Theorem } { @M { a sup n + b sup n != c sup n } for all positive integers @M { a }, @M { b }, @M { c } and @M { n } when @M { n > 2 }. @LP @Proof I have a proof of this theorem, but the margin is too small to contain it. @EndProof } The @Code "@Theorem" symbol produces an object with no adjacent vertical space, hence it needs to be used in conjuction with display or paragraph symbols. The theorem is numbered automatically, with the title and number inserted at the start of the first paragraph. @Code "@Title" may be omitted. @PP @Code "@Proof" produces @Proof @Null proof. @Index @Code "@Proof" with the appropriate following space, and @Code "@EndProof" produces endproof. @Index @Code "@EndProof" a box at the end of the line. They may be used anywhere, not just within theorems. @FootNote { Occasionally @Code "@EndProof" does not appear as far to the right as it should. This problem can be fixed by using {@Code "@LD @HExpand @Theorem"}, which instructs Lout to make sure that as much horizontal space as possible is allocated to the theorem. } @PP There are seven symbols that produce independently numbered sequences in this way. They are {@Code "@Theorem"}, {@Code "@Definition"}, definition. @Index @Code "@Definition" claim. @Index @Code "@Claim" proposition. @Index @Code "@Proposition" lemma. @Index @Code "@Lemma" corollary. @Index @Code "@Corollary" example. @Index @Code "@Example" {@Code "@Claim"}, {@Code "@Proposition"}, {@Code "@Lemma"}, {@Code "@Corollary"}, and {@Code "@Example"}. @PP The setup file contains options which determine whether the theorem numbers include a chapter number ({@Code "@ChapterNumInTheorems"}), or a section number ({@Code "@SectionNumInTheorems"}), and so on. A section number automatically includes a chapter number, etc. There are also options to change the word printed. For example, if you need a sequence of conjectures, change the @Code "@ClaimWord" setup file option to @ID @Code "@ClaimWord { Conjecture }" and use the @Code "@Claim" symbol for your conjectures. You can even put @ID @Code { "import @DocumentSetup" "macro @Conjecture { @Claim }" } into your @Code mydefs file (Section {@NumberOf definitions}) if you wish, so that you can write @Code "@Conjecture" in your documents instead of {@Code "@Claim"}. @PP The setup file also contains two options which control the format of the theorem (claims and so on have corresponding options). Here they are with their default values: @ID @Code { "@TheoremTitleFormat { (title) }" "@TheoremFormat { { @B { word @NumSep number title: } &2s } @Insert body }" } The first option is used only when a @Code "@Title" is given to the theorem, and it determines how the title is formatted: the @Code title symbol within the option stands for the @Code "@Title" option. The default value shown places parentheses around the title. The second option determines the format of the entire theorem. Within it, @Code word stands for the value of {@Code "@TheoremWord"}; @Code "number" is the number of the theorem; @Code "title" is the title of the theorem after formatting by {@Code "@TheoremFormat"} (if there is a title; otherwise @Code title is {@Code "@Null"}, which prints as nothing and even deletes the preceding space as required); and @Code body is the body of the theorem. The default value prints the word, number and title with a colon in bold, and inserts them and two spaces into the first paragraph of the body; another value might be @ID @Code { "@TheoremFormat { @B { word @NumSep number title } @LP body }" } which places the header in bold on a line by itself, separated from the body by a paragraph break. For @Code "@NumSep" see page {@PageOf numsep}. @PP Owing to problems behind the scenes, the @Code "@Theorem" symbol and its companions have a potential efficiency problem: although all numbers are finalized on the second run, it takes Lout time proportional to the square of the highest theorem number to do this. So large numbers of theorems numbered together might be slow. @End @Section lout-3.39/doc/user/bas_spac0000644000076400007640000001102311363700677014301 0ustar jeffjeff@Section @Title { Spaces and braces } @Tag { spaces } @Begin @PP Every symbol in Lout either consists entirely of letters ({@Code "@"} symbols. @Index { symbols, makeup of } is considered to be a letter) or entirely of punctuation characters. Here are some examples of each type: @ID @OneRow @Tab @Fmta { @Col @I @CC A ! @Col @I @CC B } @Fmtb { @Col @Code @CC A ! @Col @Code @CC B } { @Rowa A { From letters } B { From punctuation } @Rowb A { "@PP" } B { "{" } @Rowb A { "margin" } B { "}" } } Now if two symbols made from letters are run together like this: @ID { @Code "@CurveBox@I Hello" &8ct @I (wrong!) } Lout will take this to mean one word or symbol called {@Code "@CurveBox@I"}, which is wrong. In the same way, a letter-type symbol cannot be run together with a word. However, punctuation-type symbols can be run together with anything. For example, in @ID @Code "@CurveBox{ Hello @I { world }}." Lout understands that @Code "@CurveBox" and @Code "{" # } are separate, and it also sorts out # {{ @Code "}}." into two right brace symbols and a full stop. It might seem strange to treat punctuation and letters so differently, but computer programming languages have done it like this for many years, and it works well. This is the first use for spaces. @Index { spaces, significance of } spaces: to separate letter-type symbols from each other and from words. @PP To see the second use for spaces, consider two words side by side: @ID @Code "Hello world" We want this to produce Hello world, so a space between two words in the input must mean a space between them in the result. Apply the golden rule (where you can put one object, you can put any object) and you get this: @I { a space between two objects in the input produces a space between them in the result }. For example, @ID @Code "@CurveBox Hello @CurveBox world" produces @ID { @CurveBox Hello @CurveBox world } The space between the two objects @Code "@CurveBox Hello" and @Code "@CurveBox world" appears between them in the result; the other two spaces do not separate objects so do not appear in the result. @PP Two objects may be separated by a number of spaces other than one. If they are separated by no spaces, they will appear immediately adjacent in the result; if separated by two spaces, they will appear two spaces apart; and so on. In English it is correct to leave two spaces between the end of one sentence and the beginning of the next, for example. See Section {@NumberOf white} for two alternative ways to interpret white space in Lout. @PP Occasionally the two uses for spaces conflict. For example, to produce @ID { { @CurveBox Hello }{ @CurveBox world } } we need to have no spaces between the two objects, but then @Code "Hello" and the following @Code "@CurveBox" would be run together, which will not work. The solution is to use braces: @ID @Code "{ @CurveBox Hello }{ @CurveBox world }" None of the six spaces in this example lie between two objects. @PP However, the main use of braces is to inform Lout that the object within them is to be kept together, so that any nearby symbols are to apply to all of it. For example, leaving the braces out of @Code "@I { Hello world }" would mean that @Code "@I" applies only to {@Code "Hello"}. @PP When an object-consuming symbol like @Code "@I" is followed by an braces. @RawIndex { braces } braces.in.lout @SubIndex { in Lout text } object enclosed in braces, that is the object consumed. For example, @ID @Code "This is @I { absolutely necessary }, since otherwise ..." produces @ID { This is @I { absolutely necessary }, since otherwise ... } with the object @Code "absolutely necessary" italicized, but not the following comma. If there are no braces, the object consumed is everything up to the next object-separating space: @ID @Code "This is @I necessary, since otherwise ..." produces @ID { This is @I necessary, since otherwise ... } with an undesirable italic comma. In practice, this means you can avoid braces only when italicizing a single word with no punctuation attached. @PP One common pitfall is to use unnecessary braces, like this: @ID { @Code "@I { @CurveBox { Hello world } }" &8ct @I (bad!) } Another is to think that all spaces produce space in the result, and so write @ID { @Code "@I{@CurveBox{Hello world}}" &8ct @I (worse!) } Use braces only when necessary, and add extra spaces where they do not separate objects, and your documents will be far easier to read while you are working on them. Don't be fooled by the argument that says it doesn't matter because it doesn't affect the final printed result. @End @Section lout-3.39/doc/user/str_defs0000644000076400007640000001316711363700677014352 0ustar jeffjeff@Section @Title { Defining new symbols } @Tag { definitions } @Begin @PP Whenever you find yourself typing the same thing repeatedly, you can definitions. @Index definitions save a lot of time by defining your own personal symbol to stand for that thing. For example, suppose you type your company's name, @Batlow, frequently. You can define your own symbol, {@Code "@Batlow"} say, so that @ID @Code { "Concerning your crate supply contract with @Batlow, @Batlow wishes to ..." } produces @ID { Concerning your crate supply contract with @Batlow, @Batlow wishes to ... } You will never have to type @Batlow again. @PP The method is to create a file called @Code "mydefs" in your current mydefs.file @Index { @Code mydefs file } directory, containing definitions like this: @ID @OneRow @Code { "import @BasicSetup" "def @Batlow { Batlow Food Distributors Pty. Ltd. }" } The meaning of the first line, {@Code "import @BasicSetup"}, will be explained shortly. After that comes @Code "def" for `define,' then the name of the symbol being defined, then its value between braces. So this example defines a symbol called @Code "@Batlow" to stand for the object following it between braces. Lout will read this file during its setup phase (Section {@NumberOf setup}). Alternatively, you can place definitions directly into your document files, following your @Code "@SysInclude" lines and before {@Code "@Doc"}, {@Code "@Report"}, or whatever symbol your document proper starts with. @PP Your symbols may have any names you wish made from letters and {@Code "@"}. However, it is good practice to have exactly one {@Code "@"}, at the start, and to choose distinctive names that have no chance of being the same as the name of any existing symbol. @Code "@Batlow" is a good choice, for example. @PP The object between braces is quite arbitrary; in particular, it may contain symbols. For example, suppose you frequently need a small grey box: @ID @OneRow @Code { "import @BasicSetup" "def @GreyBox { @Box paint { lightgrey } {} }" } This defines a @Code "@GreyBox" symbol that produces {@GreyBox}. Most of the symbols in this guide are from the @I {BasicSetup package}, import. @Index @Code import which is why @Code "import @BasicSetup" is required: it makes these symbols available to the definition, and can actually be omitted before definitions like the one for @Code "@Batlow" which do not use any symbols. However it does no harm, so we place it in front of every definition as a matter of course. @FootNote { Later chapters of this guide introduce specialized symbols for producing tables, equations, diagrams, graphs, and computer programs. You need a different @Code "import" clause when using those symbols within a definition, because they are not from the BasicSetup package. Examples may be found in the chapters concerned. } @PP Now suppose you frequently need a grey box, but enclosing different things: @GreyBox ENTRY one moment, @GreyBox EXIT the next. You could try omitting the @Code "{}" from the definition above, but that does not work, because Lout notices the missing object while reading the definition, and inserts an empty object in the usual way (Section {@NumberOf empty}). @PP However, there is a way to define a @Code "@GreyBox" symbol so that @Code "@GreyBox ENTRY" produces {@GreyBox ENTRY}, @Code "@GreyBox EXIT" produces {@GreyBox EXIT}, and so on: @ID @OneRow @Code { "import @BasicSetup" "def @GreyBox right x { @Box paint { lightgrey } x }" } The addition of @Code "right x" immediately after the symbol's name places @Code "@GreyBox" into that class of symbols, like {@Code "@I"} and @Code {"@Box"}, which consume and transform the object to their right. The @Code "x" in @Code "right x" means that the object to the right will be referred to as @Code "x" within the definition. So in @ID @Code "@GreyBox { Hello world }" @Code "@GreyBox" consumes the following object, which becomes {@Code "x"}, so that the value is @ID @Code "@Box paint { lightgrey } { Hello world }" which produces @GreyBox { Hello world }. @PP It is a good principle to choose symbol names that refer to what the symbol is for, rather than how it does what it does. Here is a good example: @ID @OneRow @Code { "import @BasicSetup" "def @Poetry right x { lines @Break @I x }" } This kind of name is very pleasant to use, since it allows you to forget about what is going on behind the scenes: @ID @OneRow @Code { "@IndentedDisplay @Poetry {" "Teach me to hear Mermaides singing," "Or to keep off envies stinging," " And finde" " What winde" "Serves to'advance an honest minde." "}" } Most of Lout's symbols follow this principle. @PP You can define symbols that consume the object to their left as well as the object to their right, as the {@Code "@Font"}, {@Code "@Break"}, and {@Code "@Colour"} symbols do: @ID @OneRow @Code { "import @BasicSetup" "def @HeadingBox left x right y" "{ @Box { @CentredDisplay @Heading x y }" "}" } This definition occupies several lines only because it is long; as usual, end of line is the same as one space. Now @ID @OneRow @Code { "Cheating @HeadingBox {" "The Department uses assignments ... of that student alone." "}" } is much easier to type than the equivalent example in Section {@NumberOf boxes}. The result is the same: @QD Cheating @HeadingBox { The Department uses assignments both as a teaching device and as a major component of its assessment of each student. It therefore requires that all programs, exercises etc. handed in bearing an individual student's name be the work of that student alone. } Do not use a paragraph, display, or list symbol at the beginning or end of a definition, since the result is not what people who do it are hoping for. @End @Section lout-3.39/doc/user/ref_chan0000644000076400007640000002617611363700677014312 0ustar jeffjeff@Section @Title { Changing the appearance of citations and the reference list } @Tag { changeref } @Begin @PP By default, citations appear like this @Cite { $kingston1995lout.expert }, and the reference list appears like the one at the end of this document, with the entries numbered, and sorted by their @Code "@Tag" options. This section explains how to change all this, by setting options in the setup file. @PP For a general introduction to setup files and their options, see Section {@NumberOf setup}. Here we just describe the setup file options that relate to references. Here they are, with their default values: @ID @OneRow @Code @Verbatim { @MakeReferences { Yes } @RefCiteStyle { [cite] } @RefCiteLabels { @RefNum } @RefNumbers { Arabic } @RefListFormat { Labels } @RefListLabels { [@RefNum] } @RefListTitle { references } @ChapRefListTitle { references } @RefListIndent { 0c } @RefListRightIndent { 0c } @RefListGap { 1.00v } @RefListFont { } @RefListBreak { } @RefListLabelWidth { 2.00f } @RefListSortKey { @Tag } } references. @RawIndex { references } references.makereferences @SubIndex { @Code "@MakeReferences" } makereferences.references @Index { @Code "@MakeReferences" (references) } Setting @Code "@MakeReferences" to @Code "No" will cause Lout to ignore all citation symbols and omit all reference lists. @PP @Code "@RefCiteStyle" and @Code "@RefCiteLabels" combine to references. @RawIndex { references } references.refcitestyle @SubIndex { @Code "@RefCiteStyle" } refcitestyle.references @Index { @Code "@RefCiteStyle" (references) } determine the appearance of citations. The result of each @Code "@Cite" symbol is the value of @Code "@RefCiteStyle" with the @Code "cite" symbol replaced by the object following the @Code "@Cite" symbol. For example, the default value shown above encloses each citation in brackets. The @Code "cite" symbol must appear exactly once within {@Code "@RefCiteStyle"}. @PP @Code "@RefCiteLabels" determines the appearance of each label within references. @RawIndex { references } references.refcitelabels @SubIndex { @Code "@RefCiteLabels" } refcitelabels.references @Index { @Code "@RefCiteLabels" (references) } the citation. Within it, the @Code "@RefNum" symbol will produce the number of the reference, and you may also use any of the options of the @Code "@Reference" symbol listed at the beginning of Section {@NumberOf entries}: @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { "@RefCiteLabels { @RefNum }" } B { [3] } @Rowa A { "@RefCiteLabels { @Label }" } B { [Kin93] } @Rowa A { "@RefCiteLabels { @Author, @Year }" } B { [Jeffrey H. Kingston, 1993] } } The value of @Code "@RefCiteLabels" may be any object. The @Code "@Label" symbol will produce the @Code "label" option of @Code "$" or @Code "@Ref" if there is one, rather than the @Code "@Label" option of the reference; this @Code "label" option is explained in Section {@NumberOf labelled}. @PP @Code "@RefNumbers" determines the kind of numbering produced by the references. @RawIndex { references } references.refnumbers @SubIndex { @Code "@RefNumbers" } refnumbers.references @Index { @Code "@RefNumbers" (references) } @Code "@RefNum" symbol used within @Code "@RefCiteLabels" above and @Code "@RefListLabels" below. Its value may be {@Code Arabic}, {@Code Roman}, {@Code UCRoman}, {@Code Alpha}, or {@Code UCAlpha}, as usual for numbering in Lout. If you don't use {@Code "@RefNum"}, @Code "@RefNumbers" has no effect. @PP The remaining eleven setup file options are all concerned with the appearance of the reference list. The first, {@Code "@RefListFormat"}, references. @RawIndex { references } references.reflistformat @SubIndex { @Code "@RefListFormat" } reflistformat.references @Index { @Code "@RefListFormat" (references) } determines the overall format of the list. Here is what its four @NoCite { $strunk1979style } possible values do: @ID @Tab @Fmta { @Col @Code A ! @Col @OneCol B } vmargin { 0.3v } { @Rowa A { "@RefListFormat { NoLabels }" } B { @RefPrint strunk1979style } @Rowa @Rowa A { "@RefListFormat { Labels }" } B { 2f @Wide {{@NumberOf strunk1979style}.} | @RefPrint strunk1979style } @Rowa @Rowa A { "@RefListFormat { DropLabels }" } B { {@NumberOf strunk1979style}. //1vx 2f @Wide {} | @RefPrint strunk1979style } @Rowa @Rowa A { "@RefListFormat { InLabels }" } B { {@NumberOf strunk1979style}. &2s @RefPrint strunk1979style } } @Code "@RefListFormat" is not concerned with the appearance of the labels and references, only with where they appear. @PP @Code "@RefListLabels" determines the appearance of the labels in the references. @RawIndex { references } references.reflistlabels @SubIndex { @Code "@RefListLabels" } reflistlabels.references @Index { @Code "@RefListLabels" (references) } reference list (and so has no effect if @Code "@RefListFormat" is {@Code "NoLabels"}). It is a combination of @Code "@RefCiteStyle" and {@Code "@RefCiteLabels"}; you can use @Code "@RefNum" and all the options of @Code "@Reference" within it. The default value, @ID @Code "@RefListLabels { @RefNum. }" produces a numbered reference list in the style of {@Code "@NumberedList"}. Another useful value is @ID @Code "@RefListLabels { [@Label] }" which produces the @Code "@Label" option of the reference, or the @Code "label" option of the citation if there is one, enclosed in brackets. If you do switch to non-numeric labels you will need to either use @Code "DropLabels" or else increase the @Code "@RefListLabelWidth" option described below. @PP @Code "@RefListTitle" determines the heading placed just before the references. @RawIndex { references } references.reflisttitle @SubIndex { @Code "@RefListTitle" } reflisttitle.references @Index { @Code "@RefListTitle" (references) } reference list at the end of the document: @ID @Code "@RefListTitle { Further Reading }" Two special values, @Code "references" and {@Code "bibliography"}, produce References and Bibliography in English and their equivalents in other languages. @Code "@ChapRefListTitle" is the same as references. @RawIndex { references } references.chapreflisttitle @SubIndex { @Code "@ChapRefListTitle" } chapreflisttitle.references @Index { @Code "@ChapRefListTitle" (references) } {@Code "@RefListTitle"}, but applied to the reference list at the end of each chapter of a book when @Code "@ChapCite" is used. @PP {@Code "@RefListIndent"}, {@Code "@RefListRightIndent"}, and references. @RawIndex { references } references.reflistindent @SubIndex { @Code "@RefListIndent" } reflistindent.references @Index { @Code "@RefListIndent" (references) } references. @RawIndex { references } references.reflistrightindent @SubIndex { @Code "@RefListRightIndent" } reflistrightindent.references @Index { @Code "@RefListRightIndent" (references) } {@Code "@RefListGap"} determine the left indent, right indent, and gap references. @RawIndex { references } references.reflistgap @SubIndex { @Code "@RefListGap" } reflistgap.references @Index { @Code "@RefListGap" (references) } between reference list items, analogously to the {@Code "indent"}, {@Code "rightindent"}, and {@Code "gap"} options of the @Code "@List" symbol (Section {@NumberOf lists}). @Code "@RefListFont" and references. @RawIndex { references } references.reflistfont @SubIndex { @Code "@RefListFont" } reflistfont.references @Index { @Code "@RefListFont" (references) } references. @RawIndex { references } references.reflistbreak @SubIndex { @Code "@RefListBreak" } reflistbreak.references @Index { @Code "@RefListBreak" (references) } @Code "@RefListBreak" determine the font and paragraph breaking style of the reference list. For example, @ID @OneRow @Code @Verbatim { @RefListFont { -2p } @RefListBreak { 1.2fx outdent } } switches to a smaller size with outdented paragraphs (these work well with {@Code NoLabels}). The empty default values produce the same font and break style as in the document as a whole. @PP @Code "@RefListLabelWidth" determines the distance from the left references. @RawIndex { references } references.reflistlabelwidth @SubIndex { @Code "@RefListLabelWidth" } reflistlabelwidth.references @Index { @Code "@RefListLabelWidth" (references) } edge of the labels to the left edge of the references, when @Code "@RefListFormat" is @Code Labels or {@Code DropLabels} (it has no effect when @Code "@RefListFormat" is @Code NoLabels or {@Code "InLabels"}). This is different to {@Code "@RefListIndent"}, which determines the distance from the edge of the column to the left edge of the item. @PP Particular care is needed when @Code "@RefListFormat" is @Code Labels and the labels are non-numeric, for then if the labels are too wide they will overstrike the references. The default value, {@Code 2.00f}, is twice the current font size. It may be changed to any length (Section {@NumberOf objects}). Regrettably, Lout is not clever enough to choose a good value by itself. @PP Finally, @Code "@RefListSortKey" determines the sorting key used when references. @RawIndex { references } references.reflistsortkey @SubIndex { @Code "@RefListSortKey" } reflistsortkey.references @Index { @Code "@RefListSortKey" (references) } sort.ref @Index { sorting of reference lists } ordering the reference list. The default value, @ID @Code "@RefListSortKey { @Tag }" sorts by tag. Another possibility is to sort by the @Code "@Label" option: @ID @Code "@RefListSortKey { @Label }" As usual @Code "@Label" will use the value of a @Code "label" option to the citation if there is one. To sort by order of first citation, use @ID @Code "@RefListSortKey { @CiteOrder }" @Code "@CiteOrder" is implemented in a quick and dirty way, and there are a couple of problems to watch out for if you use it. First, when you cite references more than once you get some strange intermediate error messages and results. All such problems will be gone by the end of the fifth run. Second, if you insert more citations later on, you will need to restart the whole process, by deleting the cross reference index file {@I lout.li}, since any late insertions get erroneously stuck on the end instead of inserted in the correct order. If things go haywire, delete {@I lout.li} then do five runs and they should be right again. @PP @Code "@RefListSortKey" may be any sequence of words and options from the @Code "@Reference" symbol, but not @Code "@RefNum" for obvious reasons. A possible more elaborate sorting key is @ID @Code "@RefListSortKey { @Author:@Year:@Tag }" sorting first by author, then by year within each author, and finally by tag. However you are supposed to choose tags which have this effect, and that is more reliable since the modern practice is to put the authors' surnames after their given names. There seems to be little practical use for sorting keys other than {@Code "@Tag"}, {@Code "@Label"}, and {@Code "@CiteOrder"}. @PP A colon within the @Code "@RefListSortKey" option is converted by Lout into a character smaller than any printable character, which ensures that the sorting is carried out separately on the three fields. It is essential that the sort key uniquely identify the reference, because if two sort keys are equal only one of the references will be printed. The easiest way to ensure this is to always include @Code "@Tag" in the sort key. @End @Section lout-3.39/doc/user/vequ0000755000076400007640000000017111363700677013513 0ustar jeffjeffgvim equ gvim equ_intr gvim equ_symb gvim equ_vert gvim equ_spac gvim equ_disp gvim equ_defs gvim equ_summ gvim equ_tequ lout-3.39/doc/user/letterbook0000644000076400007640000005016111363700677014706 0ustar jeffjeff############################################################################### # # # Lout setup file for books # # # # Jeffrey H. Kingston # # 5 February 1999 # # # ############################################################################### ############################################################################### # # # @SysInclude commands for standard packages. # # # ############################################################################### @SysInclude { langdefs } # language definitions @SysInclude { bsf } # BasicSetup package @SysInclude { dsf } # DocumentSetup package @SysInclude { bookf } # BookSetup extension ############################################################################### # # # @Include command for reading personal definitions from current directory. # # # ############################################################################### @Include { mydefs } ############################################################################### # # # The @BasicSetup @Use clause - basics, lists, paragraphs, displays. # # # # To change the default value of any option, delete the # at the start of # # its line and change the value between braces. # # # ############################################################################### @Use { @BasicSetup # @InitialFont { Times Base 12p } # initial font # @InitialBreak {{adjust 1.2fx hyphen} @OrIfPlain {ragged 1fx nohyphen}} # @InitialSpace { lout } # initial space style # @InitialLanguage { English } # initial language # @InitialColour { black } # initial colour # @OptimizePages { No } # optimize page breaks? # @HeadingFont { Bold } # font for @Heading # @ParaGap { 1.3vx @OrIfPlain 1f } # gap between paragraphs # @ParaIndent { 2.00f @OrIfPlain 5s } # first-line indent for @PP # @DisplayGap { 1.00v @OrIfPlain 1f } # gap above, below displays # @DisplayIndent { 2.00f @OrIfPlain 5s } # @IndentedDisplay indent # @DefaultIndent { 0.5rt } # @Display indent # @DisplayNumStyle { (num) } # style of display numbers # @WideIndent { 4.00f @OrIfPlain 10s } # @WideTaggedList indent # @VeryWideIndent { 8.00f @OrIfPlain 20s } # @VeryWideTaggedList indent # @ListGap { 1.00v @OrIfPlain 1f } # gap between list items # @ListIndent { 0s } # indent of list items # @ListRightIndent { 0s } # right indent of list items # @ListLabelWidth { 2.00f @OrIfPlain 5s } # width allowed for list tags # @NumberSeparator { . } # separates nums like 2.3.7 } ############################################################################### # # # The @DocumentSetup @Use clause - page layout plus figures, tables, etc. # # # # To change the default value of any option, delete the # at the start of # # its line and change the value between braces. # # # ############################################################################### @Use { @DocumentSetup @PageType { Letter @OrIfPlain Other} # page type (width, height) # @PageWidth { 80s } # page width if type Other # @PageHeight { 66f } # page height if type Other # @PageOrientation { Portrait } # Portrait, Landscape, etc. # @PageBackground { } # background of each page # @TopMargin { 2.5c @OrIfPlain 6f } # top margin of all pages # @FootMargin { 2.5c @OrIfPlain 6f } # bottom margin of all pages # @OddLeftMargin { 2.5c @OrIfPlain 10s } # left margin of odd pages # @OddRightMargin { 2.5c @OrIfPlain 10s } # right margin of odd pages # @EvenLeftMargin { 2.5c @OrIfPlain 10s } # left margin of even pages # @EvenRightMargin { 2.5c @OrIfPlain 10s } # right margin of even pages # @PageBoxType { None } # None Box CurveBox ShadowBox # @PageBoxMargin { 1.00c } # page box margin # @PageBoxLineWidth { } # page box line thickness # @PageBoxPaint { none } # page box paint # @PageBoxShadow { 0.60c } # shadow margin if ShadowBox # @ColumnNumber { 1 } # number of columns (1 to 10) # @ColumnGap { 1.00c @OrIfPlain 6s } # column gap # @FigureLocation { PageTop } # default figure location # @TableLocation { PageTop } # default table location # @FigureFormat { @CC @Body } # default figure format # @TableFormat { @CC @Body } # default table format # @FigureWord { figure } # "Figure" word else anything # @TableWord { table } # "Table" word else anything # @FigureNumbers { Arabic } # method of numbering figures # @TableNumbers { Arabic } # method of numbering tables # @FigureCaptionPos { Below } # Above or Below # @TableCaptionPos { Below } # Above or Below # @CaptionFont { } # figure, table caption font # @CaptionBreak { } # figure, table caption break # @CaptionFormat { @B { number @DotSep @OneCol } } # figure, table caption format # @MakeFigureContents { No } # list of figures at start # @MakeTableContents { No } # list of tables at start # @MakeContents { No } # make contents? Yes or No @MakeContents { Yes } # make contents? Yes or No # @ContentsGap { 0.20v @OrIfPlain 0f } # extra gap above minor entry # @ContentsGapAbove { 0.80v @OrIfPlain 1f } # extra gap above major entry # @ContentsGapBelow { 0.00v @OrIfPlain 0f } # extra gap below major entry # @ContentsPartGapAbove { 1.00v @OrIfPlain 1f } # extra gap above `part' entry # @ContentsPartGapBelow { 0.00v @OrIfPlain 0f } # extra gap below `part' entry # @ContentsFormat { number @DotSep title } # contents entry format # @ContentsLeader { .. } # leader symbol in contents # @ContentsLeaderGap { 4s @OrIfPlain 2s } # gap between leaders # @ContentsRightWidth { 3f @OrIfPlain 6s } # page numbers column width # @MakeReferences { Yes } # make references? Yes or No # @RefCiteStyle { [cite] } # citation style # @RefCiteLabels { @RefNum } # citation items # @RefNumbers { Arabic } # reference numbers # @RefListFormat { Labels } # NoLabels, Labels, etc. # @RefListLabels { [@RefNum] } # ref list label format # @RefListTitle { references } # title of reference list # @ChapRefListTitle { references } # title of chapter ref list # @RefListIndent { 0s } # indent to left of labels # @RefListRightIndent { 0s } # indent to right of items # @RefListGap { @ListGap } # gap between ref list items # @RefListFont { } # font used in reference list # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key # @MakeIndex { No } # make index? Yes or No @MakeIndex { Yes } # make index? Yes or No # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @MakeIndexA { No } # make index A? Yes or No # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @MakeIndexB { No } # make index B? Yes or No # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers # @FootNoteThrough { No } # numbered through chapter? # @FootNoteLocation { ColFoot } # where the footnote appears # @FootNoteFont { 0.80f } # font for footnotes # @FootNoteBreak { 1.2fx @OrIfPlain 1fx } # break for footnotes # @FootLen { 2.00c @OrIfPlain 10s } # length of footnote line # @FootAboveGap { @DisplayGap } # gap above footnote line # @FootGap { 0.20c @OrIfPlain 1fx } # gap between footnotes # @MarginNoteFont { 0.80f } # font of margin notes # @MarginNoteBreak { ragged 1.10fx } # break style of margin notes # @MarginNoteHGap { 0.5c } # horizontal gap to notes # @MarginNoteVGap { @DisplayGap } # min vertical gap between # @MarginNoteWidth { 1.50c } # width of margin notes # @EndNoteNumbers { Arabic } # endnote numbers # @EndNoteFont { 0.80f } # font of endnotes # @EndNoteBreak { 1.2fx @OrIfPlain 1fx } # break for endnotes # @EndNoteGap { 0.20c @OrIfPlain 1f } # gap between endnotes # @TheoremWord { theorem } # "Theorem" word, etc. # @DefinitionWord { definition } # "Definition" word, etc. # @ClaimWord { claim } # "Claim" word, etc. # @PropositionWord { proposition } # "Proposition" word, etc. # @LemmaWord { lemma } # "Lemma" word, etc. # @CorollaryWord { corollary } # "Corollary" word, etc. # @ExampleWord { example } # "Example" word, etc. # @ProofWord { proof } # "Proof" word, etc. # @PageHeaders { Simple } # None Simple Titles NoTitles @PageHeaders { Titles } # None Simple Titles NoTitles # @PageNumbers { Arabic } # page numbers # @FirstPageNumber { 1 } # number of first page # @IntroPageNumbers { Roman } # intro page numbers # @IntroFirstPageNumber{ 1 } # number of first intro page # @StructPageNums { No } # make structured page numbers # @OddTop { @Centre{- @PageNum -} } # Simple page headers # @OddFoot { @Null } # @EvenTop { @Centre{- @PageNum -} } # @EvenFoot { @Null } # @StartOddTop { @Null } # @StartOddFoot { @Null } # @StartEvenTop { @Null } # @StartEvenFoot { @Null } # @IntroOddTop { @Null } # @IntroOddFoot { @Centre @PageNum } # @IntroEvenTop { @Null } # @IntroEvenFoot { @Centre @PageNum } # @IntroStartOddTop { @Null } # @IntroStartOddFoot { @Null } # @IntroStartEvenTop { @Null } # @IntroStartEvenFoot { @Null } # Titles, NoTitles headers # @RunningOddTop { @I {@MinorNum @DotSep @MinorTitle} @Right @B @PageNum } # @RunningOddFoot { @Null } # @RunningEvenTop { @B @PageNum @Right @I {@MajorNum @DotSep @MajorTitle} } # @RunningEvenFoot { @Null } # @RunningStartOddTop { @Null } # @RunningStartOddFoot { @Centre { Bold 0.8f } @Font @PageNum } # @RunningStartEvenTop { @Null } # @RunningStartEvenFoot { @Centre { Bold 0.8f } @Font @PageNum } # @RunningIntroOddTop { @Null } # @RunningIntroOddFoot { @Right @PageNum } # @RunningIntroEvenTop { @Null } # @RunningIntroEvenFoot { @PageNum } # @RunningIntroStartOddTop { @Null } # @RunningIntroStartOddFoot { @Null } # @RunningIntroStartEvenTop { @Null } # @RunningIntroStartEvenFoot { @Null } } ############################################################################### # # # The @BookSetup @Use clause - options specific to books. # # # ############################################################################### @Use { @BookSetup # @TitlePageFont { Helvetica Base} # title page font (not size) # @SeparateIntroNumbering { Yes } # separate intro page numbers # @PrefaceAfterContents { No } # Yes or No # @ChapterStartPages { Any } # Any, Odd, or Even # @ReferencesBeforeAppendices { No } # references before appendices # @PrefaceWord { preface } # word for "Preface" # @ContentsWord { contents } # word for "Contents" # @FigureListWord { figurelist } # word for "List of Figures" # @TableListWord { tablelist } # word for "List of Tables" # @IntroductionWord { introduction } # word for "Introduction" # @ChapterWord { chapter } # word for "Chapter" # @AppendixWord { appendix } # word for "Appendix" # @IndexWord { index } # word for "Index" # @IndexAWord { index } # word for "Index" (A) # @IndexBWord { index } # word for "Index" (B) # @ChapterNumbers { Arabic } # kind of chapter numbers # @FirstChapterNumber { 1 } # first chapter number (Arabic) # @SectionNumbers { Arabic } # kind of section numbers # @FirstSectionNumber { 1 } # first section number (Arabic) # @SubSectionNumbers { Arabic } # kind of subsection numbers # @FirstSubSectionNumber { 1 } # first subsect number (Arabic) # @SubSubSectionNumbers { Arabic } # kind of sub-subs. numbers # @FirstSubSubSectionNumber { 1 } # first sub-sub number (Arabic) # @AppendixNumbers { UCAlpha } # kind of appendix numbers # @FirstAppendixNumber { 1 } # first appendix num (Arabic) # @SubAppendixNumbers { Arabic } # kind of subappendix numbers # @FirstSubAppendixNumber { 1 } # first sub-app num (Arabic) # @SubSubAppendixNumbers { Arabic } # kind of sub-subapp. numbers # @FirstSubSubAppendixNumber { 1 } # first sub-sub num (Arabic) # @PartHeadingFont { Helvetica Base 2.50f } # part head font # @PartHeadingBreak { clines 1.2fx nohyphen } # part head break # @PartHeadingFormat { @CD number @DP @CD title } # part head format # @ChapterHeadingFont { Bold 2.00f } # chapter head font # @ChapterHeadingBreak { ragged 1.2fx nohyphen } # chapter head break # @ChapterHeadingFormat { number @DotSep title } # format of chap. head # @SectionHeadingFont { Bold } # section head font # @SectionHeadingBreak { ragged 1.2fx nohyphen } # section head break # @SectionHeadingFormat { number @DotSep title } # section head fmt # @SubSectionHeadingFont { Bold } # subs. head font # @SubSectionHeadingBreak { ragged 1.2fx nohyphen } # subs. head break # @SubSectionHeadingFormat { number @DotSep title } # subs. head fmt # @SubSubSectionHeadingFont { Slope } # sub-subs. head font # @SubSubSectionHeadingBreak { ragged 1.2fx nohyphen } # sub-subs. head break # @SubSubSectionHeadingFormat { number @DotSep title } # sub-subs. head fmt # @AppendixHeadingFont { Bold 2.00f } # appendix head font # @AppendixHeadingBreak { ragged 1.2fx nohyphen } # appendix head break # @AppendixHeadingFormat { number @DotSep title } # appendix head fmt # @SubAppendixHeadingFont { Bold } # subapp. head font # @SubAppendixHeadingBreak { ragged 1.2fx nohyphen } # subapp. head break # @SubAppendixHeadingFormat { number @DotSep title } # subapp. head fmt # @SubSubAppendixHeadingFont { Slope } # sub-suba. head font # @SubSubAppendixHeadingBreak { ragged 1.2fx nohyphen } # sub-suba. head break # @SubSubAppendixHeadingFormat{ number @DotSep title } # sub-suba. head fmt # @AbovePartGap { 4.00f } # gap above part title # @AboveChapterGap { 3.00f } # above major titles # @SectionGap { 2.0v @OrIfPlain 3f } # between sections # @SubSectionGap { 1.5v @OrIfPlain 2f } # between subsects # @SubSubSectionGap { 1.5v @OrIfPlain 2f } # between sub-subs. # @SubAppendixGap { 2.0v @OrIfPlain 3f } # between subappendices # @SubSubAppendixGap { 1.5v @OrIfPlain 2f } # between sub-subapps # @IntroductionInContents { Yes } # add introduction to contents # @PartInContents { Yes } # add parts to contents # @ChapterInContents { Yes } # add chapters to contents # @SectionInContents { Yes } # add sections to contents # @SubSectionInContents { Yes } # add subsections to contents # @SubSubSectionInContents { No } # add sub-subsects to contents # @AppendixInContents { Yes } # add appendices to contents # @SubAppendixInContents { Yes } # add subappendices to contents # @SubSubAppendixInContents { No } # add sub-subapps to contents # @ReferencesInContents { Yes } # add ref. section to contents # @IndexInContents { Yes } # add index to contents # @IndexAInContents { Yes } # add index A to contents # @IndexBInContents { Yes } # add index B to contents # @PartContentsIndent { 0.5rt } # indent of part contents entry # @ChapterNumInTheorems { Yes } # theorem num has chapter num # @SectionNumInTheorems { No } # theorem num has section num # @SubSectionNumInTheorems { No } # theorem num has subsect num # @SubSubSectionNumInTheorems { No } # theorem num has sub-ss. num # @AppendixNumInTheorems { Yes } # theorem num has appendix num # @SubAppendixNumInTheorems { No } # theorem num has sub-app num # @SubSubAppendixNumInTheorems{ No } # theorem num has sub-sa. num # @ChapterNumInDisplays { Yes } # display num has chapter num # @SectionNumInDisplays { Yes } # display num has section num # @SubSectionNumInDisplays { No } # display num has subsect num # @SubSubSectionNumInDisplays { No } # display num has sub-ss. num # @AppendixNumInDisplays { Yes } # display num has appendix num # @SubAppendixNumInDisplays { Yes } # display num has sub-app num # @SubSubAppendixNumInDisplays{ No } # display num has sub-sa. num # @ChapterNumInFigures { Yes } # figure num has chapter num # @SectionNumInFigures { No } # figure num has section num # @SubSectionNumInFigures { No } # figure num has subsect num # @SubSubSectionNumInFigures { No } # figure num has sub-ss. num # @AppendixNumInFigures { Yes } # figure num has appendix num # @SubAppendixNumInFigures { No } # figure num has sub-app num # @SubSubAppendixNumInFigures { No } # figure num has sub-sa. num # @ChapterNumInTables { Yes } # table num has chapter num # @SectionNumInTables { No } # table num has section num # @SubSectionNumInTables { No } # table num has subsect num # @SubSubSectionNumInTables { No } # table num has sub-ss. num # @AppendixNumInTables { Yes } # table num has appendix num # @SubAppendixNumInTables { No } # table num has sub-app num # @SubSubAppendixNumInTables { No } # table num has sub-sa. num # @SectionNumInRunners { Yes } # runners have section num # @SubSectionNumInRunners { No } # runners have subsect num # @SubSubSectionNumInRunners { No } # runners have sub-ss. num # @SubAppendixNumInRunners { Yes } # runners have sub-app num # @SubSubAppendixNumInRunners { No } # runners have sub-sa. num # @PrefacePrefix { } # for structured page nums # @ContentsPrefix { } # for structured page nums # @FigureContentsPrefix { } # for structured page nums # @TableContentsPrefix { } # for structured page nums # @IntroductionPrefix { } # for structured page nums # @ChapterPrefix { } # for structured page nums # @AppendixPrefix { } # for structured page nums # @ReferencesPrefix { } # for structured page nums # @IndexPrefix { } # for structured page nums # @IndexAPrefix { } # for structured page nums # @IndexBPrefix { } # for structured page nums } ############################################################################### # # # @Database (and @SysDatabase) clauses go here. # # # ############################################################################### @SysDatabase @FontDef { fontdefs } # fond definitions @SysDatabase @RefStyle { refstyle } # reference printing styles lout-3.39/doc/user/pie_slic0000644000076400007640000001543211363700677014325 0ustar jeffjeff@Section @Title { Changing the appearance of slices } @Tag { pie_slic } @Begin @PP The @Code "@Slice" symbol has options for controlling the slice. @Index { @Code "@Slice" symbol (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.slice @SubIndex { @Code "@Slice" symbol } appearance of the slice it makes: @ID -1px @Break @OneRow @Code @Verbatim { @Slice weight { 10 } paint { none } texture { solid } outlinestyle { solid } outlinedashlength { 0.2f } outlinewidth { thin } detach { no } } This example shows the default values of the options. @PP The @Code weight option is the weight (angular extent) of weight.pie @Index { @Code "weight" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.weight @SubIndex { @Code "weight" option } the slice. By default, the total weight of the complete pie graph is 100, so a slice of weight 10, say, would occupy 10% of the pie area, or in other words an angular extent of (10"/"100) @Multiply 360 degrees. You can change the @I total weight by setting an option to the @Code "@Pie" symbol: totalweight.pie @Index { @Code "totalweight" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.totalweight @SubIndex { @Code "totalweight" option } @ID -1px @Break @OneRow @Code @Verbatim { @Pie totalweight { 360 } } The value 360 would be useful if you wanted your weights to correspond with degrees. It would be good to get @Code "@Pie" to add up all the weights of its constituent slices and use that for the total weight, but problems behind the scenes prevent this. As it is, if the total weight of all slices is less than {@Code totalweight}, the leftover angular extent will be blank; and if it exceeds {@Code totalweight}, later slices will overstrike earlier ones. @PP The @Code paint option defines the colour of the interior paint. @RawIndex { @Code "paint" option } paint.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.paint @SubIndex { @Code "paint" option } of the slice. Any colour acceptable to the {@Code "@Colour"} symbol (Section {@NumberOf colour}) is allowed, plus the default value {@Code none}, meaning no paint. As always, alongside the @Code "paint" option there is a @Code "texture" texture.option. @RawIndex { @Code "texture" option } texture.option.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.texture @SubIndex { @Code "texture" option } option: @ID -1px @Break @OneRow @Code @Verbatim { @Pie paint { grey } { @Slice weight { 20 } texture { striped } label { Admin (20%) } @Slice weight { 40 } texture { striped angle { 45d } } label { Research (40%) } @Slice weight { 40 } texture { striped angle { 90d } } label { Teaching (40%) } } } produces @CD @Pie paint { grey } { @Slice weight { 20 } texture { striped } label { Admin (20%) } @Slice weight { 40 } texture { striped angle { 45d } } label { Research (40%) } @Slice weight { 40 } texture { striped angle { 90d } } label { Teaching (40%) } } Textures might work better in black and white prints. @PP The next three options affect the outline drawn around each slice. The @Code outlinestyle option outlinestyle. @RawIndex { @Code "outlinestyle" option } outlinestyle.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.outlinestyle @SubIndex { @Code "outlinestyle" option } may be {@Code solid} (the default) which draws a solid line, {@Code dashed} which draws a dashed line, {@Code cdashed} which draws a dashed line with half-size dashes at the ends (this often looks better than {@Code dashed}), @Code "dotted" which draws a dotted line, and @Code noline which draws no outline at all. The @Code outlinedashlength option determines the dash length outlinedashlength. @RawIndex { @Code "outlinedashlength" option } outlinedashlength.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.outlinedashlength @SubIndex { @Code "outlinedashlength" option } if @Code outlinestyle is @Code dashed or {@Code cdashed}, and the distance between dots if @Code outlinestyle is {@Code dotted}. The length will be varied a little to ensure that the dashes or dots fit evenly on each segment of the outline. The @Code "outlinewidth" option determines the width outlinewidth. @RawIndex { @Code "outlinewidth" option } outlinewidth.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.outlinewidth @SubIndex { @Code "outlinewidth" option } of the outline, or the diameter of the dots if @Code outlinestyle is {@Code dotted}. @PP You can give three values to {@Code outlinestyle}, like this: @ID -1px @Break @OneRow @Code @Verbatim { @Pie { red @Colour @Slice weight { 75 } outlinestyle { dashed cdashed dotted } label { Bad debts } } } and the first will apply to the first straight segment, the second to the curved segment, and the third to the second straight segment: @CD @Pie { red @Colour @Slice weight { 75 } outlinestyle { dashed cdashed dotted } label { Bad debts } } There is no option to change the colour of the outline, but you can change the colour of the whole slice using the {@Code "@Colour"} symbol from Section {@NumberOf colour} as shown. It colours the label as well, but you can fix that by enclosing the contents of your label in another {@Code "@Colour"} symbol if you need to. @PP The @Code detach option pulls its slice radially out of the detach.pie @Index { @Code "detach" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.detach @SubIndex { @Code "detach" option } pie, without affecting any other slice: @CD @Pie # abovecaption { Ideal breakdown of academic workload } aboveextra { 0.7c } { @Slice detach { yes } weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } is produced by @ID -1px @Break @OneRow @Code @Verbatim { @Pie aboveextra { 0.7c } { @Slice detach { yes } weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } } We've used the @Code aboveextra option (Section {@NumberOf pie_over}) to compensate for Lout's ignorance of where the slice actually ended up. The value of @Code detach may be {@Code no} (the default), {@Code yes}, or any number, which defines the fraction of the pie radius that the slice is pulled out by. For example, @Code yes is just another name for {@Code 0.5}. @End @Section lout-3.39/doc/user/bas_line0000644000076400007640000000411311363700677014304 0ustar jeffjeff@Section @Title { Line spacing } @Tag { linespace } @Begin @PP The @Code "@Break" symbol also controls the amount of space placed line.spacing @Index { line spacing } between the lines of paragraphs. This distance is best given using the @Code "v" unit of measurement: @Code "1v" is the current line separation (see Section {@NumberOf objects} for a description of lengths in general). For example, @ID @Code "2vx @Break ..." produces double spacing in the paragraphs of the following object, and double.spacing @Index { double spacing } @ID @Code "0.9vx @Break ..." produces cramped spacing, which can be useful in large tables that don't quite fit on one page. The @Code "x" following the @Code "v" is required, but its meaning is beyond our scope @Cite { $kingston1995lout.expert }. @PP To set the entire document in a different line spacing from the initialbreak @Index @Code "@InitialBreak" default, you need to change the @Code "@InitialBreak" option. If you are using your own setup file (Section {@NumberOf setup}), change it there. If not, you can change it at the beginning of your document, as described in Section {@NumberOf ordinary}. @PP The default value of the @Code "@InitialBreak" option produces the @Code "adjust" paragraph breaking style with a line spacing of 1.20 times the current (that is, the initial) font size, and hyphenation on: @ID @Code "@InitialBreak { adjust 1.20fx hyphen }" To get double spacing, change it to @ID @Code "@InitialBreak { adjust 2.40fx hyphen }" To get ragged paragraphs with hyphenation off, change it to @ID @Code "@InitialBreak { ragged 1.20fx nohyphen }" and so on. It is a good idea to define the initial line spacing using the @Code "f" unit, since then if you change the initial font size the line spacing will change with it. However, any length (Section {@NumberOf objects}) with an @Code "x" appended will do: @Code "14px" for 14 point, @Code "0.5cx" for 0.5 centimetres, etc. Don't use the @Code "v" unit though, because it refers to some @I previous line spacing, whereas here we are defining the line spacing for the first time. @End @Section lout-3.39/doc/user/tbl_intr0000644000076400007640000001172111363700677014350 0ustar jeffjeff@Section @Title { Getting started } @Tag { tbl_intr } @Begin @PP The Lout definitions for table formatting @FootNote { The @Code "tbl" package described here replaces the @Code "tab" package of Version 3.12 and earlier. For backward compatibility the @Code "tab" package is still available and still works as described in older versions of this documentation. Users of @Code "tab" will find simple uses of @Code "tbl" to be very similar, replacing @Code "@Tab" by {@Code "@Tbl"}, @Code "@Fmta" by {@Code "aformat"}, @Code "@Col" by {@Code "@Cell"}, and @Code "!" by {@Code "|"}. } are kept in a file called {@Code "tbl"}, which you must include at the start of your document if tbl.file @Index { @Code "tbl" file } you want tables, like this: @ID @OneRow @Code { "@SysInclude { tbl }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } Specialized setup files, like {@Code "tbl"}, are included before the main setup file (@Code "doc" in this case). Alternatively, if you are using your own setup file, you may place the include commands within it, near the start. @PP To begin with a very simple example, the table tables. @RawIndex { tables } tables.tbl @SubIndex { @Code "@Tbl" } tbl.tables @Index { @Code "@Tbl" (tables) } @CD @Tbl aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { Austen } B { Chaucer } C { Donne } @Rowa A { Balzac } B { Darwin } C { Goethe } @Rowa A { Byron } B { Dickens } C { Homer } } is produced by the following input: @ID @OneRow @Code @Verbatim { @Tbl aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { Austen } B { Chaucer } C { Donne } @Rowa A { Balzac } B { Darwin } C { Goethe } @Rowa A { Byron } B { Dickens } C { Homer } } } Immediately after the @Code "@Tbl" symbol, which introduces the table, comes a @I { format option }, {@Code "aformat"}, describing the format of tables. @RawIndex { tables } tables.aformat @SubIndex { @Code "aformat" option } aformat.tables @Index { @Code "aformat" option (tables) } tables. @RawIndex { tables } tables.format @SubIndex { format of } format.tables @Index { format of tables } each row. It says that each row contains three cells: {@Code "@Cell A"}, tables. @RawIndex { tables } tables.cell @SubIndex { @Code "@Cell" } cell.tables @Index { @Code "@Cell" (tables) } {@Code "@Cell B"}, and {@Code "@Cell C"}. The format option may have up to 26 cells, with names chosen freely from the upper-case letters from @Code A to {@Code Z}. The symbol @Code "|" separates each cell from the next. @PP After the format option comes the body of the table, enclosed in braces. It consists entirely of a sequence of rows, each introduced by a @Code "@Rowa" symbol and containing one entry for each cell of the tables. @RawIndex { tables } tables.rowa @SubIndex { @Code "@Rowa" } rowa.tables @Index { @Code "@Rowa" (tables) } format option, as shown (the row may occupy any number of lines of the input file). The entries may be arbitrary Lout objects, such as words, paragraphs, equations, figures, and so on without restriction. An entry may be omitted altogether if it is empty. Lout will choose suitable widths for the cells, and break paragraphs in the entries to the right widths. @PP The result of the @Code "@Tbl" symbol is an object. As usual with Lout, this object may appear at any point in the document, @FootNote { In rare cases, when the table occupies an entire paragraph but is not displayed, a bug in Basser Lout causes the second column to appear much too far to the right. If this occurs, replace the very first row symbol ({@Code "@Row"}, {@Code "@Rowa"}, {@Code "@Rowb"}, etc.) by {@Code "@FirstRow"}, {@Code "@FirstRowa"}, {@Code "@FirstRowb"}, etc. There are also {@Code "@HeaderFirstRow"}, {@Code "@HeaderFirstRowa"}, {@Code "@HeaderFirstRowb"} etc. symbols for replacing {@Code "@HeaderRow"}, {@Code "@HeaderRowa"}, {@Code "@HeaderRowb"}, etc., if required. # That should work, but if it doesn't, replacing # @Code "@Tbl" by @Code "@OneCol @Tbl" certainly will, although it also # prevents the table from breaking across page boundaries. } even within a paragraph or another table. Most commonly, though, tables are displayed using the @Code "@IndentedDisplay" and @Code "@CentredDisplay" symbols (Section {@NumberOf displays}): @ID @Code "@CentredDisplay @Tbl ..." or else they go into the @Code "@Table" symbol (Section {@NumberOf figures}): @ID @OneRow @Code { "@Table" " @Caption { ... }" "@Tbl ..." } which centres them at the top of the following page and adds a caption. Note the difference between {@Code "@Tbl"}, which builds a table, and {@Code "@Table"}, which places an arbitrary object in an appropriate place. It's important to remember that the result is an object like any other, because from time to time one wants such things as rotated tables whose entire contents are to be italicised: @ID @Code "90d @Rotate @I @Tbl ..." and it helps to remember that the full power of Lout can be brought to bear on the @I entire table. @End @Section lout-3.39/doc/user/gra_func0000644000076400007640000001406211363700677014320 0ustar jeffjeff@Section @Title { Mathematical functions, loops, and tests } @Tag { functions } @Begin @PP @Code "@Graph" offers quite a large selection of mathematical functions, graphs. @RawIndex { graphs (statistical) } graphs.mathematical @SubIndex { mathematical functions } mathematical.functions @Index { mathematical functions in graphs } available everywhere that x and y coordinates are required: within the @Code xticks and @Code yticks options, within the points within the @Code "objects" option, and within the right parameter of the @Code "@Data" symbol. For example, @ID @OneRow @Code @Verbatim { @Data pairs { solid } { 0 0 pi sin { pi/2 } } } draws a solid line from @M {(0, 0)} to @M {(pi, sin(pi "/" 2))}. Section {@NumberOf grsummary} lists all the functions; they include the four arithmetical operators @M { non + }, @M { non - }, @M { non * }, and @M { "/" }, as well as {@Code "sin"}, {@Code "cos"}, {@Code "sqrt"}, and many others. Braces are used for grouping, never parentheses. @PP For plotting functions there are three looping symbols, {@Code "xloop"}, {@Code "yloop"}, and {@Code "zloop"}. For example, the following plots the two functions @M { y = 2 } and @M { y = sqrt { pi x "/" 4 } + 1 } for @M { x } from 10 to 500: @ID -1px @Break @OneRow @Code @Verbatim { -2p @Font @Graph style { axes } xorigin { 0 } yorigin { 0 } width { 8c } xticks { 10@ 50@ 100@ 200@ 500@ } objects { @NE at { 300 2 } @I { Exponential } @SE at { 300 sqrt { pi*300/4 } + 1 } @I { Uniform } } belowcaption { @I n } belowgap { 0c } leftcaption { Right shell nodes } { @Data points { filledcircle } { 10 1.97 50 2.01 100 2.00 200 2.0 500 2.00 } @Data points { filledcircle } { 10 3.53 50 7.45 100 9.32 200 13.41 500 21.63 } @Data pairs { dashed } { 10 2 500 2 } @Data pairs { dashed } { xloop from { 10 } to { 500 } by { 20 } do { x sqrt { pi*x / 4 } + 1 } } } } The @Code "do" option of @Code xloop is replicated repeatedly with each occurrence of @Code x replaced by 10, 30, 50, ... up to 490. The result is @FootNote { Source: Jeffrey H. Kingston, Analysis of tree algorithms for the simulation event list. @I { Acta Informatica } {@B 22}, pp. 15--33 (1985). } @CD -2p @Font @Graph style { axes } xorigin { 0 } yorigin { 0 } width { 8c } xticks { 10@ 50@ 100@ 200@ 500@ } objects { @NE at { 300 2 } @I { Exponential } @SE at { 300 sqrt { pi*300/4 } + 1 } @I { Uniform } } belowcaption { @I n } belowgap { 0c } leftcaption { Right shell nodes } { @Data points { filledcircle } { 10 1.97 50 2.01 100 2.00 200 2.0 500 2.00 } @Data points { filledcircle } { 10 3.53 50 7.45 100 9.32 200 13.41 500 21.63 } @Data pairs { dashed } { 10 2 500 2 } @Data pairs { dashed } { xloop from { 10 } to { 500 } by { 20 } do { x sqrt { pi*x / 4 } + 1 } } } The points are connected by straight line segments as usual, but a smallish @Code "by" option of about one-twentieth of the range creates the illusion of a smooth curve quite well. @PP There is also an @Code "if" symbol which produces alternative results, depending on whether a condition evaluates to @Code "true" or {@Code"false"}: @ID @OneRow @Code @Verbatim { xloop from { -5 } to { +5 } by { 0.2 } do { if cond { abs { x } > 0.1 } then { x 1/x } else {} } } This plots the function @M { y = 1 "/" x }, skipping points near zero. Actually the @Code "else" part could be omitted since its default value is empty. @PP Adventurous users might enjoy nesting a @Code "yloop" or @Code "zloop" within an {@Code "xloop"}, or using loops to generate ticks, like this: @ID @OneRow @Code @Verbatim { xticks { xloop from { 0 } to { 20 } do { x if cond { x mod 5 = 0 } then { @ } } } } The missing @Code "by" option defaults to 1, so this produces x ticks at 0, 1, 2, ..., 20, with labels at 0, 5, 10, 15, and 20. It is quite all right to mix @Code "@" and even labels in with numbers, as long as the final result obeys the rules of Section {@NumberOf ticks}. @PP You can define your own functions using Lout definitions, placed in your @Code "mydefs" file as explained in Section {@NumberOf definitions}. Here is an example of a function definition: @ID @OneRow @Code @Verbatim { import @Graph @Data def @Tan precedence 40 right x { sin x / cos x } } This defines a function called @Code "@Tan" which implements the trigonometric tangent function. It may then be used in expressions just like any other function: @ID @OneRow @Code @Verbatim { @Data { yloop from { 0 } to { 0.95 } by { 0.05 } do { y @Tan { y / pi } } } } Following is a detailed explanation. @PP The first line, {@Code "import @Graph @Data"}, is the import clause. Its function is to grant the definition access to the three previously defined functions (symbols) that it uses, namely {@Code "sin"}, {@Code "cos"}, and {@Code "/"}. These are found within the @Code "@Data" symbol within {@Code "@Graph"}. @PP After the import clause comes the @Code "def" keyword, meaning `define,' and then the name of the symbol being defined, in this case @Code "@Tan". We have chosen @Code "@Tan" rather than @Code "tan" because symbols defined by the user in this way are visible throughout the document, and we do not want the literal word @Code "tan" to be taken as a symbol. @PP Next comes the symbol's precedence, in this case the same as @Code "sin" and @Code "cos" (see Section {@NumberOf dia_summ} for the precedence of each symbol). Next is a list of the formal parameters, in this case just one, called {@Code "x"}, that is to be passed on the right. @PP Finally comes the body of the definition enclosed in braces. When @Code "@Tan" is invoked, its value will be this body with each occurrence of the formal parameter @Code "x" replaced by the object following the @Code "@Tan" symbol. For example, the @Code "do" option of the @Code "yloop" above becomes @ID @Code "y sin { y / pi } / cos { y / pi }" as you would expect. @End @Section lout-3.39/doc/user/mat0000644000076400007640000000251111363700677013311 0ustar jeffjeff@Chapter @Title { Mathematics } @Tag { mathematics } @Begin @LP This chapter explains how to produce mathematics in Lout, equations. @RawIndex { equations @I see mathematics } mathematics. @Index mathematics mathematics.math @SubIndex { @Code "@Math" } math. @Index { @Code "@Math" (mathematics) } using the @Code "@Math" symbol @FootNote { @Code "@Math" follows the equation formatting rules of D. E. Knuth's knuth @Index { Knuth, D. E. } tex. @Index { @TeX } @TeX system. Prior to Version 3.37 of Lout, this chapter described a symbol called eq. @Index @Code "@Eq" {@Code "@Eq"} which was similar to {@Code "@Math"} but less faithful to those rules. For backward compatibility the @Code "@Eq" symbol is still available and still works exactly as described in the old documentation, but there is no reason to use it in new documents. } like this: @ID @Code @Verbatim { @Math { int from { 0 } to { 1 } dx over sqrt {1 - x sup 2} = pi over 2 } } This example produces @ID @Math { int from { 0 } to { 1 } dx over sqrt {1 - x sup 2} = pi over 2 } The @Code "@Math" symbol looks after all the details of spacing for you, and it provides several hundred mathematical symbols. @BeginSections @Include { mat_intr } @Include { mat_comm } @Include { mat_matr } @Include { mat_disp } @Include { mat_defs } @Include { mat_summ } @EndSections @End @Chapter lout-3.39/doc/user/gra_erro0000644000076400007640000000411711363700677014334 0ustar jeffjeff@Section @Title { Errors } @Tag { grerrors } @Begin @PP Lout normally produces output that will print without mishap on graphs. @RawIndex { graphs (statistical) } graphs.errors @SubIndex { errors } errors. @RawIndex { errors } errors.in.graphs @SubIndex { in graphs } any PostScript device. However, some of the options of @Code "@Graph" and all of the data and labels are passed through Lout without checking. Any errors in this material will not be detected until the file is printed. @PP The most likely errors are @I { rangecheck errors}, for example if an attempt is made to divide by zero or take the square root of a negative number, and @I { undefined errors }, arising from symbols misspelt, use of @Code "x" outside an {@Code "xloop"}, etc. Less commonly, everything may be correct but the graph is too large in some way: too much data, expression too deeply nested, and so on. @PP When an error is detected, @Code "@Graph" arranges for the offending page to be printed up to the point where the error occurred, with a message nearby describing the error. Printing of the document is then aborted. The problem is usually easy to locate since it lies in whatever should have been printed next. @PP If you see @Code VMerror in an error message, it means that the printer has run out of memory. All the data is stored in the printer while the graph is being printed, and it remains there until the end of the current page, when it is discarded and all memory consumed by the graph is reclaimed. If you do run out of memory, one option is to try graphs. @RawIndex { graphs (statistical) } graphs.save @SubIndex { @Code save option } save. @RawIndex { @Code "save" option } save.in.graphs @SubIndex { in graphs } @ID @OneRow @Code @Verbatim { @Graph save { yes } ... } This causes the memory used by the graph to be reclaimed as soon as the graph is printed, which might well solve your problem if you have several graphs on one page. However, if the graph is nested inside some other major Lout package, notably {@Code "@Diag"}, this option could cause PostScript errors in that package. @End @Section lout-3.39/doc/user/tbl_plai0000644000076400007640000001001311363700677014312 0ustar jeffjeff@Section @Title { Plain text tables } @Tag { tbl_plai } @Begin @PP Tables work well with plain text output (Section {@NumberOf plain}): tables. @RawIndex { tables } tables.plaintext @SubIndex { plain text output } plain.text.tables @Index { plain text tables } @CD @OneRow 0.9 @Scale 1.0fx @Break @F @Verbatim { ................................................... . . . . Johnson . Johnson suddenly uttered, in . . suddenly . a strong determined tone, an . . uttered, . apophegm, at which many will . . in a strong . start: `Patriotism is the . . determined . last refuge of a scoundrel.' . . tone, an . . . apophegm, at . . . which many .................................. . will start: . . . . `Patriotism . Johnson . Johnson . . is the last . suddenly . suddenly . . refuge of a . uttered, . uttered, . . scoundrel.' . in a strong . in a strong . . . determined . determined . . . tone, an . tone, an . . . apophegm, at . apophegm, at . . . which many . which many . . . will start: . will start: . . . `Patriotism . `Patriotism . . . is the last . is the last . . . refuge of a . refuge of a . . . scoundrel.' . scoundrel.' . . . . . . . . . .................................. . . . . . Johnson suddenly uttered, in . . . a strong determined tone, an . . . apophegm, at which many will . . . start: `Patriotism is the . . . last refuge of a scoundrel.' . . . . . . . . ................................................... } This table was produced by a separate run of Lout and pasted into this document. @PP @Code "@Tbl" changes the default values of several options when used in a plain text document: @ID @OneRow @Code @Verbatim { @Tbl marginvertical { 2f } marginhorizontal { 2s } rulehorizontalwidth { 1f } ruleverticalwidth { 1s } rulehorizontalgap { 0f } ruleverticalgap { 0s } } When using plain text it is advisable to make vertical distances whole multiples of {@Code "1f"}, and horizontal distances whole multiples of {@Code "1s"}, since this avoids fractional spacing which cannot be successful in plain text files and produces quite messy results. There is also a @Code ruleplainchar option for changing the character used to tables. @RawIndex { tables } tables.ruleplainchar @SubIndex { @Code "ruleplainchar" option } ruleplainchar.tables @Index { @Code "ruleplainchar" option (tables) } draw rules. For example, @ID @Code @Verbatim { @Tbl ruleplainchar { - } } would be a good choice if you plan to draw only horizontal rules. This option can be set anywhere as usual. @PP If you do use rules it is worth pondering the implications of the last part of Section {@NumberOf tbl_rule}. Right and below rules are drawn outside the boundary of the cell, which is unimportant in ordinary output, but means that they will appear one space to the right and one line below the cell in plain text output. This explains the slight asymmetry in the example above; you can correct it with @ID @Code @Verbatim { @Tbl marginright { 1s } marginbelow { 1f } } but you still have to worry about rules at the extreme right of the page going off the edge, and rules below the last line bumping into whatever follows the table. The first can be fixed by not using full width tables with right rules; the second by inserting an extra @Code "@DP" after a table that ends with a below rule. @End @Section lout-3.39/doc/user/mat_matr0000644000076400007640000002056111363700677014341 0ustar jeffjeff@Section @Title { Matrices } @Tag { matrices } @Begin @PP The @Code matrix symbol {@PageMark matrix} builds an array of objects: mathematics.matrix @SubIndex { @Code "matrix" symbol } matrix.mathematics @Index { @Code "matrix" symbol (mathematics) } @ID { @Code @Verbatim { matrix atleft { blpar } atright { brpar } { row col x sup 2 col y sup 2 col z sup 2 row col x col y col z row col 1 col 1 col 1 } } ||9ct @Math { matrix atleft { blpar } atright { brpar } { row col x sup 2 col y sup 2 col z sup 2 row col x col y col z row col 1 col 1 col 1 } } } The @Code atleft and @Code atright options place vertically scaled versions of their values at each side; if either is omitted the value is taken to be an empty object of zero width. Although @Code blpar and @Code brpar are used here, since the options are vertically scaled it would also be reasonable to use just @ID @OneRow @Code @Verbatim { matrix atleft { ( } atright { ) } } The right parameter of @Code matrix is the array itself. It must be enclosed in braces. It is a sequence of rows introduced by @Code row symbols; each row is a sequence of objects introduced by @Code col symbols. The @Code row and @Code col symbols have low precedence (Section {@NumberOf mat_summ}), but not as low as white space between objects, so it is safest to enclose the entries in braces, except in simple cases. @PP Entries built with the @Code col symbol have their objects centred in the column. Also available are @Code lcol for left-justified entries, @Code ccol meaning the same as {@Code col}, @Code rcol for right-justified entries, and @Code mcol for alignment along column marks. Each column may contain entries of different kinds, except that @Code mcol does not work well with any other sort. @PP When several matrices appear side by side, slight differences in height can cause an unsightly appearance: @ID @Math { matrix atleft { ( } atright { ) } { row col a sub 11 col a sub 12 row col a sub 21 col a sub 22 } matrix atleft { ( } atright { ) } { row col b sub 11 col b sub 12 row col b sub 21 col b sub 22 } = matrix atleft { ( } atright { ) } { row col c sub 11 col c sub 12 row col c sub 21 col c sub 22 } } To assist in resolving this problem, the @Code "matrix" symbol has a @Code "strut" option, which causes a strut to be inserted into every row, guaranteeing that every row has height at least equal to the height of the strut. By using @ID @Code { "matrix" " strut { Yes }" "..." } in each of the three matrices above, the result is improved to @ID @Math { matrix atleft { ( } atright { ) } strut { Yes } { row col a sub 11 col a sub 12 row col a sub 21 col a sub 22 } matrix atleft { ( } atright { ) } strut { Yes } { row col b sub 11 col b sub 12 row col b sub 21 col b sub 22 } = matrix atleft { ( } atright { ) } strut { Yes } { row col c sub 11 col c sub 12 row col c sub 21 col c sub 22 } } By default, the strut has height @Code "0.5f" (half the current font size) both above and below the axis of the row. This can be changed by giving any length as the value of the @Code "strut" option: @Code "strut { 2.0c }" for two centimetres above and below the axis, and so on. @PP Some symbols are defined which produce `matrices' with commonly needed @Code atleft and @Code atright options already set for you: @ID { @Code { "fmatrix { {n+1} over 2 }" } |7ct @Math { fmatrix { {n+1} over 2 } } } As this example shows, these symbols are very useful for getting large scaled delimiters around things that aren't necessarily matrices at all. Section {@NumberOf mat_summ} has the full list of these symbols. @PP Every fragment of mathematics has an @I axis running through it which is used to position it vertically mathematics.axis @SubIndex { axis of } axis @Index { axis (in mathematics) } with respect to nearby objects. In the Expert's Guide to Lout @Cite { $kingston1995lout.expert } this is called a @I { row mark }, but we'll stick with axis. Here are some examples with the axis shown as a dashed line: @ID { @ShowHMark @Math { x sup 2 } ||2c @ShowHMark @Math { non + } ||2c @ShowHMark @Math { @ExA } } When these objects are placed adjacent to one another, their axes are merged: @ID @ShowHMark @Math { x sup 2 + @ExA } Most of the time you do not need to think about vertical positioning, because for most objects there is just one sensible place for the axis to go, and Lout puts it there. @PP Matrices and the delimiters that enclose them are the two exceptions. Lout makes the axis of a matrix pass through its exact centre, and it shifts the axes of delimiters so that they exactly enclose the thing delimited. These choices are never disastrous, but there are other possibilities that might be better sometimes. @PP The axis of a matrix could reasonably be set to the axis of any of its rows: @ID { @ShowHMark @Math { matrix userow { yes } { axisrow col { x sup 3 } col { y sup 3 } col { z sup 3 } row col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } ||2c @ShowHMark @Math { matrix userow { yes } { row col { x sup 3 } col { y sup 3 } col { z sup 3 } axisrow col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } ||2c @ShowHMark @Math { matrix userow { yes } { row col { x sup 3 } col { y sup 3 } col { z sup 3 } row col { x sup 2 } col { y sup 2 } col { z sup 2 } axisrow col { x } col { y } col { z } } } } Alternatively, it could be set to where Lout usually places it, through the exact centre: @ID { @ShowHMark @Math { matrix { row col { x sup 3 } col { y sup 3 } col { z sup 3 } row col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } } Delimiters could reasonably keep the axes that they naturally have (approximately through their centres, but not exactly): @ID { @ShowHMark @Math { pmatrix userow { yes } shiftdelim { no } { @ExA } } } or they could have their axes moved in the way that Lout usually does, to the point which allows them to evenly cover the thing delimited: @ID { @ShowHMark @Math { pmatrix userow { yes } { @ExA } } } Altogether then there are four possibilities when these two alternatives interact: @CD lines @Break @Tbl aformat { @Cell 0.5w @VShift A | @Cell | @Cell B | @Cell | @Cell C } { @Rowa A { } B { Matrix axis uses row axis } C { Matrix axis passes through centre } @Rowa A { Delimiter keeps its axis } B { @ShowHMark @Math { pmatrix userow {yes} shiftdelim {no } { @ExA } } } C { @ShowHMark @Math { pmatrix userow {no } shiftdelim {no } { @ExA } } } @Rowa A { Delimiter axis shifted } B { @ShowHMark @Math { pmatrix userow {yes} shiftdelim {yes} { @ExA } } } C { @ShowHMark @Math { pmatrix userow {no } shiftdelim {yes} { @ExA } } } } To supply these possibilities, the @Code "matrix" symbol and all its variants (@Code "fmatrix" etc.) have two options whose values may be {@Code "yes"} or {@Code "no"}: @ID @Code @Verbatim { matrix userow { no } shiftdelim { yes } { ... } } The @Code "userow" option determines whether the axis of the matrix will use a row axis; the default is not to, i.e. to centre the axis. The @Code "shiftdelim" option determines whether the axis of the delimiter will be shifted so that the delimiter evenly covers the thing delimited; the default is to do this. @PP If @Code "userow" is {@Code "yes"}, the next question is which row's axis to use to make the overall axis. If you do nothing, the first (or only) row's axis becomes the overall axis. To select some other row instead, replace the @Code "row" symbol that precedes the row by {@Code "axisrow"}: @ID @Code @Tbl mv { 0.5vx } mh { 1s } aformat { @Cell A | @Cell | @Cell B | @Cell | @Cell C | @Cell | @Cell D } bformat { @Cell A | @Cell " col" | @Cell B | @Cell " col" | @Cell C | @Cell " col" | @Cell D } { @Rowa A { "matrix userow { yes } {" &0io } @Rowb A { " row" } B { "x sup 3" } C { "y sup 3" } D { "z sup 3" } @Rowb A { " axisrow" } B { "x sup 2" } C { "y sup 2" } D { "z sup 2" } @Rowb A { " row" } B { "x" } C { "y" } D { "z" } @Rowa A { "}" } } The result of this is @ID @ShowHMark @Math { matrix userow { yes } { row col { x sup 3 } col { y sup 3 } col { z sup 3 } axisrow col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } with the axis through the second row as desired. @End @Section lout-3.39/doc/user/pie_over0000644000076400007640000000777711363700677014363 0ustar jeffjeff@Section @Title { Changing the overall appearance of the pie graph } @Tag { pie_over } @Begin @PP We've already seen that all @Code "@Slice" options may be given piegraphs. @RawIndex { pie graphs } piegraphs.overall @SubIndex { overall appearance } to @Code "@Pie" as well. In addition to those, @Code "@Pie" has its own options that affect the overall appearance of the pie graph: @ID -1px @Break @OneRow @Code @Verbatim { @Pie radius { 2.5c } initialangle { 0d } leftextra { 0c } rightextra { 0c } aboveextra { 0c } belowextra { 0c } } This example shows these options with their default values. @PP The @Code radius option determines the radius of the pie radius. @RawIndex { @Code "radius" option } radius.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.radius @SubIndex { @Code "radius" option } graph. As shown, the default radius is 2.5 centimetres, giving a diameter of 5 centimetres. @PP The @Code initialangle option determines the angle that the first initialangle.pie @Index { @Code "initialangle" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.initialangle @SubIndex { @Code "initialangle" option } slice begins at. Following mathematical convention, the default angle @Code 0d is directly to the right of the centre of the pie graph, and as the value of @Code initialangle is increased the initial angle moves anticlockwise. The slices are placed in anticlockwise order immediately adjacent to each other. If you need a gap between two slices, use a slice with no outline, no paint, and no label. @PP Lout thinks that the whole pie graph occupies a square space tightly fitting around the given radius, as we can verify by drawing a box with zero margin around an example pie graph: @CD @Box margin { 0i } @Pie { @Slice weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } Detached slices (Section {@NumberOf pie_slic}) and external labels (Section {@NumberOf pie_labe}) can be printed outside this square region without Lout's knowledge, and this is likely to spoil the layout: @CD @Box margin { 0i } @Pie { @Slice detach { yes } weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } The {@Code leftextra}, {@Code rightextra}, {@Code aboveextra}, and leftextra.pie @Index { @Code "leftextra" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.leftextra @SubIndex { @Code "leftextra" option } rightextra.pie @Index { @Code "rightextra" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.rightextra @SubIndex { @Code "rightextra" option } aboveextra.pie @Index { @Code "aboveextra" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.aboveextra @SubIndex { @Code "aboveextra" option } belowextra.pie @Index { @Code "belowextra" option (pie graphs) } piegraphs. @RawIndex { pie graphs } piegraphs.belowextra @SubIndex { @Code "belowextra" option } {@Code belowextra} options are used to tell Lout to leave extra space to the left, right, above, and below, so as to correct these problems: @ID -1px @Break @OneRow @Code @Verbatim { @Pie aboveextra { 0.7c } } We have not added extra space at the right as well, since we prefer to centre the pie graph horizontally without regard to detached slices. The result occupies 0.7 cm extra at the top: @CD @Box margin { 0i } @Pie aboveextra { 0.7c } { @Slice detach { yes } weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } We'll see these options again when we come to external labels in Section {@NumberOf pie_labe}. @End @Section lout-3.39/doc/user/dia_intr0000644000076400007640000000563111363700677014327 0ustar jeffjeff@Section @Tag { dia_intr } @Title { Introduction } @Begin @PP To use the @@Diag symbol you first need to include its setup file. For example, suppose you have an ordinary document with tables: @ID @OneRow @Code { "@SysInclude { tbl }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } Change this to @ID @OneRow @Code { "@SysInclude { tbl }" "@SysInclude { diag }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } This provides everything you need for making diagrams. @PP The result of the @@Diag symbol is an object in the usual way. A diagram is commonly made into a centred display, like this: @ID @OneRow @Code { "@CentredDisplay @Diag { ... }" } or into a floating figure, like this: @ID @OneRow @Code { "@Figure" " @Caption { ... }" "@Diag {" " ..." "}" } but it could be an entry in a table, a word in a paragraph, or anything else. @PP Most uses of @@Diag contain a @I { nodes part } and a @I { links part }: @ID @OneRow lines @Break { @Code "@Diag {" @I { nodes part } @Code "//" @I { links part } @Code "}" } This reflects @@Diag's view of the world as consisting of {@I nodes} diagrams. @RawIndex { diagrams } diagrams.nodespart @SubIndex { nodes part } nodespart.diagrams @Index { nodes part in diagrams } diagrams. @RawIndex { diagrams } diagrams.linkspart @SubIndex { links part } linkspart.diagrams @Index { links part in diagrams } (circles, squares, and so on), which have to be put in their right places and then joined with @I links (lines, arrows). The technical meaning of the {@Code "//"} symbol does not concern us here; it simply serves to divide the two parts. @PP For example, here is a nodes part containing two nodes separated by a @Code "@DP" symbol that (as usual) leaves some vertical space between them: @ID @OneRow @Tab @Fmta { @Col 7c @Wide A ! @Col B } { @Rowa A { @Code { "@Ellipse { Hello, world }" "@DP" "@Square @I x" } } B { @Diag { @Ellipse { Hello, world } @DP @Square @I x } } } Node symbols like @Code "@Ellipse" and @Code "@Square" follow a familiar pattern: they consume the following object, which may be arbitrary, draw a shape around it, and give back the resulting object. To insert links, the nodes must first be given names, called {@I tags}, using the @Code "::" symbol: diagrams. @RawIndex { diagrams } diagrams.tags @SubIndex { tags ({@Code "::"}) } tags.diagrams @Index { tags ({@Code "::"}) in diagrams } @ID @OneRow @Code { "A:: @Ellipse { Hello, world }" "@DP" "B:: @Square @I x" } Then a link from @Code A to @Code B may be added to the links part: @ID @OneRow @Tab @Fmta { @Col 7c @Wide A ! @Col B } { @Rowa A { @Code @Verbatim { @Diag { A:: @Ellipse { Hello, world } @DP B:: @Square @I x // @Link from { A } to { B } } } } B { @Diag { A:: @Ellipse { Hello, world } @DP B:: @Square @I x // @Link from { A } to { B } } } } Subsequent examples will often omit the enclosing {@Code "@Diag { }"}. @End @Section lout-3.39/doc/user/tbl_marg0000644000076400007640000000460111363700677014321 0ustar jeffjeff@Section @Title { Margins } @Tag { tbl_marg } @Begin @PP The @Code "@Cell" symbol offers a @Code margin option for changing the tables. @RawIndex { tables } tables.margin @SubIndex { @Code "margin" options } margin.options @RawIndex { margin options } margin.options.in.tables @SubIndex { in tables } amount of margin left between the entry and the boundary of the cell: @ID @Code "@Cell margin { 0.3f }" The default values are different for horizontal and vertical margins, which brings us to the @Code marginhorizontal and @Code marginvertical options: @ID @OneRow @Code @Verbatim { @Cell marginhorizontal { 0.6f } marginvertical { 0.3f } } These are the default values, 0.6 and 0.3 times the current font size respectively. Another useful value is {@Code "marginvertical { 0.5vx }"}, which asks for a vertical margin of half the current line separation, but measured from baseline to baseline (this is what the @Code "x" means). This produces a separation equal to the separation of the surrounding lines: @CD @Tbl marginvertical { 0.5vx } aformat { @Cell A | @Cell B | @Cell C } { @Rowa A { Austen } B { Chaucer } C { Donne } @Rowa A { Balzac } B { Darwin } C { Goethe } @Rowa A { Byron } B { Dickens } C { Homer } } This margin does not work so well when the cells contain paragraphs, diagrams or other things that could not be described as single lines. @PP There are {@Code "marginabove"}, {@Code "marginbelow"}, {@Code "marginleft"}, and {@Code "marginright"} options for setting margins individually. For example, sometimes you don't want the extreme left and right margins in a table, and they can be got rid of like this: @ID @OneRow @Code @Verbatim { @Tbl paint { lightgrey } aformat { @Cell ml { 0i } A | @Cell B | @Cell mr { 0i } C } { @Rowa A { Column A } B { Column B } C { Column C } } } We've used abbreviated versions of the options' names: @Code "ml" for {@Code marginleft}, and @Code "mr" for {@Code marginright}. Every option has such an abbreviated name, made from the first letters of the parts of its full name (Section {@NumberOf tbl_summ} lists all these names). The result is @DP @RCD @Tbl paint { lightgrey } aformat { @Cell ml { 0i } A | @Cell B | @Cell mr { 0i } C } { @Rowa A { Column A } B { Column B } C { Column C } } # with the painting showing the reduced margins. @End @Section lout-3.39/doc/user/equ_vert0000644000076400007640000001253011363700677014364 0ustar jeffjeff@Section @Tag { vpos } @Title { Vertical positioning } @Begin @PP Every equation and every object within every equation has an @I axis running through it which is used to position it vertically equations. @RawIndex { equations } equations.axis @SubIndex { axis of } axis @Index { axis of equation } with respect to nearby objects. In the Expert's Guide to Lout @Cite { $kingston1995lout.expert } this is called a @I { row mark }, but we'll stick with axis. Here are some examples with the axis shown as a dashed line: @ID { @ShowHMark @Eq { x sup 2 } ||2c @ShowHMark @Eq { non + } ||2c @ShowHMark @Eq { @ExA } } When these objects are placed adjacent to one another, their axes are merged, giving the correct vertical positioning: @ID @ShowHMark @Eq { x sup 2 + @ExA } Most of the time you do not need to think about vertical positioning, because for most objects there is just one sensible place for the axis to go, and Lout puts it there. @PP Matrices and the delimiters that enclose them are the two exceptions. Lout makes the axis of a matrix pass through its exact centre, and it shifts the axes of delimiters so that they exactly enclose the thing delimited. These choices are never disastrous, but there are other possibilities that might be better sometimes. @PP The axis of a matrix could reasonably be set to the axis of any of its rows: @ID { @ShowHMark @Eq { matrix userow { yes } { axisrow col { x sup 3 } col { y sup 3 } col { z sup 3 } row col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } ||2c @ShowHMark @Eq { matrix userow { yes } { row col { x sup 3 } col { y sup 3 } col { z sup 3 } axisrow col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } ||2c @ShowHMark @Eq { matrix userow { yes } { row col { x sup 3 } col { y sup 3 } col { z sup 3 } row col { x sup 2 } col { y sup 2 } col { z sup 2 } axisrow col { x } col { y } col { z } } } } Alternatively, it could be set to where Lout usually places it, through the exact centre: @ID { @ShowHMark @Eq { matrix { row col { x sup 3 } col { y sup 3 } col { z sup 3 } row col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } } Delimiters could reasonably keep the axes that they naturally have (approximately through their centres, but not exactly): @ID { @ShowHMark @Eq { pmatrix userow { yes } shiftdelim { no } { @ExA } } } or they could have their axes moved in the way that Lout usually does, to the point which allows them to evenly cover the thing delimited: @ID { @ShowHMark @Eq { pmatrix userow { yes } { @ExA } } } Altogether then there are four possibilities when these two alternatives interact: @CD lines @Break @Tab @Fmta { @Col 0.5w @VShift A ! @Col ! @Col B ! @Col ! @Col C } { @Rowa A { } B { Matrix axis uses row axis } C { Matrix axis passes through centre } @Rowa @Rowa A { Delimiter keeps its axis } B { @ShowHMark @Eq { pmatrix userow {yes} shiftdelim {no } { @ExA } } } C { @ShowHMark @Eq { pmatrix userow {no } shiftdelim {no } { @ExA } } } @Rowa @Rowa A { Delimiter axis shifted } B { @ShowHMark @Eq { pmatrix userow {yes} shiftdelim {yes} { @ExA } } } C { @ShowHMark @Eq { pmatrix userow {no } shiftdelim {yes} { @ExA } } } } To supply these possibilities, the @Code "matrix" symbol and all its variants (@Code "pmatrix" etc.) have two options whose equations. @RawIndex { equations } equations.userow @SubIndex { @Code "userow" option } userow.equations @Index { @Code "userow" option (equations) } equations. @RawIndex { equations } equations.shiftdelim @SubIndex { @Code "shiftdelim" option } shiftdelim.equations @Index { @Code "shiftdelim" option (equations) } values may be {@Code "yes"} or {@Code "no"}: @ID @Code @Verbatim { matrix userow { no } shiftdelim { yes } { ... } } The @Code "userow" option determines whether the axis of the matrix will use a row axis; the default is not to, i.e. to centre the axis instead. The @Code "shiftdelim" option determines whether the axis of the delimiter will be shifted so that the delimiter evenly covers the thing delimited; the default is to do this. @PP If @Code "userow" is {@Code "yes"}, the next question is which row's axis to use to make the overall axis. If you do nothing, the first (or only) row's axis becomes the overall axis. To select some other row instead, replace the @Code "row" symbol that precedes the row by {@Code "axisrow"}: equations. @RawIndex { equations } equations.axisrow @SubIndex { @Code "axisrow" symbol } axisrow.equations @Index { @Code "axisrow" symbol (equations) } @ID @Code @Tab vmargin { 0.5vx } hmargin { 1s } @Fmta { @Col A ! @Col ! @Col B ! @Col ! @Col C ! @Col ! @Col D ! @Col } @Fmtb { @Col A ! @Col " col {" ! @Col B ! @Col "} col {" ! @Col C ! @Col "} col {" ! @Col D ! @Col "}" } { @Rowa A { "matrix userow { yes } {" &0io } @Rowb A { " row" } B { "x sup 3" } C { "y sup 3" } D { "z sup 3" } @Rowb A { " axisrow" } B { "x sup 2" } C { "y sup 2" } D { "z sup 2" } @Rowb A { " row" } B { "x" } C { "y" } D { "z" } @Rowa A { "}" } } The result of this is @ID @ShowHMark @Eq { matrix userow { yes } { row col { x sup 3 } col { y sup 3 } col { z sup 3 } axisrow col { x sup 2 } col { y sup 2 } col { z sup 2 } row col { x } col { y } col { z } } } with the axis through the second row as desired. @End @Section lout-3.39/doc/user/dia_summ0000644000076400007640000013407511363700677014341 0ustar jeffjeff@Section @Tag { dia_summ } @Title { Summary } @Begin @PP Here is the complete list of standard node outlines that may be given diagrams. @RawIndex { diagrams } diagrams.summary @SubIndex { summary of all options } summary.diagrams @Index { summary of all options for diagrams } to the @Code "@Node" symbol. Each shows the outline name, any extra options relevant to this outline, base (shown as a grey box), segments (shown using {@Code "outlinestyle { solid dashed }"}), tags, and directions (shown as a thick arrowhead wherever defined): @IndentedList gap { 3v } @LI { @Code { "@Node" " outline { box }" } ||7ct @Diag { //0.5f @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { box } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { curvebox }" } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { curvebox } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { shadowbox }" " shadow { 0.4f }" } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { shadowbox } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { square }" } ||7ct @Diag { //1.5f @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { square } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { diamond }" } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { diamond } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { polygon }" " sides { 3 }" " angle { 180d / sides }" } ||7ct @Diag { //0.5f @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { polygon } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } &0.5c ... &0.5c @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { polygon } sides { 10 } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } &0.5c ... } } @LI { @Code { "@Node" " outline { isosceles }" } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { isosceles } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { ellipse }" } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { ellipse } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @LI { @Code { "@Node" " outline { circle }" } ||7ct @Diag { @Box paint { lightgrey } outlinestyle { noline } margin { 0c } @ShowTags @ShowDirections @Node outline { circle } outlinestyle { solid dashed } outlinewidth { 0.03f } vsize { 1.0c } hsize { 2.0c } } } @EndList @DP Here are the abbreviations for the standard shapes: @ID @Tab vmargin { 0.5vx } @Fmta { @Col @Code { outline "{" A "}" } ! @Col @Code { "@"B } } { @Rowa A { box } B { Box } @Rowa A { curvebox } B { CurveBox } @Rowa A { shadowbox } B { ShadowBox } @Rowa A { square } B { Square } @Rowa A { diamond } B { Diamond } @Rowa A { polygon } B { Polygon } @Rowa A { isosceles } B { Isosceles } @Rowa A { ellipse } B { Ellipse } @Rowa A { circle } B { Circle } } Here are all the options to the @Code "@Node" symbol, their default values, and their ranges of allowed values. Definitions of {@I number}, {@I length}, {@I angle}, and {@I point} appear later in this summary. The options related to {@Code alabel}, {@Code blabel}, {@Code clabel}, and {@Code dlabel} have mostly been omitted since they are the same as the {@Code nodelabel} options except for {@Code nodelabelpos}. @DP 1fx @Break @Tab hmargin { 1s } # vmargin { 0.6vx } @Fmth { @Col @Code A ! @Col @Code " " ! @Col @Code B ! @Col @Code " " ! @Col 1.0c @Wide ! @Col C } @Fmta { @Col @Code A ! @Col @Code "{" ! @Col @Code B ! @Col @Code "}" ! @Col 1.0c @Wide ! @Col C } { @FirstRowh A { "@Node" } @Rowa A { " outline" } B { box } C { {@Code box}, {@Code curvebox}, {@Code shadowbox}, {@Code square}, {@Code diamond}, {@Code polygon}, {@Code ellipse}, {@Code circle}, or any outline } @Rowa A { " margin" } B { 0.6f } C { any length from Section {@NumberOf objects} } @Rowa A { " shadow" } B { 0.4f } C { any @I length } @Rowa A { " sides" } B { 3 } C { any @I number (it will be rounded to the nearest integer) } @Rowa A { " angle" } B { 180d "/" sides } C { any @I angle } @Rowa A { " translate" } B { } C { empty, or @I point @Code to @I point } @Rowa A { " outlinestyle" } B { solid } C { {@Code solid}, {@Code dashed}, {@Code cdashed}, {@Code dotted}, {@Code dotdashed}, {@Code dotcdashed}, {@Code dotdotdashed}, {@Code dotdotcdashed}, {@Code dotdotdotdashed}, {@Code dotdotdotcdashed}, {@Code noline}, or any sequence of one or more of these values } @Rowa A { " outlinedashlength"} B { 0.2f } C { any @I length } @Rowa A { " outlinewidth" } B { thin } C { {@Code thin}, {@Code medium}, {@Code thick}, or any @I length } @Rowa A { " paint" } B { none } C { @Code none or any colour from Section {@NumberOf colour} } @Rowa A { " texture" } B { solid } C { Any texture from Section {@NumberOf textures} } @Rowa A { " font" } B { } C { any value suitable for the @Code "@Font" symbol } @Rowa A { " break" } B { } C { any value suitable for the @Code "@Break" symbol } @Rowa A { " format" } B { "@Body" } C { any object, usually containing {@Code "@Body"} } @Rowa A { " valign"} B { ctr } C { {@Code "top"}, {@Code "ctr"}, {@Code "foot"}, or any length from Section {@NumberOf objects} } @Rowa A { " vsize"} B { } C { empty, or any length from Section {@NumberOf objects} } @Rowa A { " vindent"} B { ctr } C { {@Code "top"}, {@Code "ctr"}, {@Code "mctr"}, {@Code "foot"}, or any length from Section {@NumberOf objects} } @Rowa A { " vstrut"} B { no } C { {@Code no}, {@Code yes}, or any length from Section {@NumberOf objects} } @Rowa A { " vmargin" } B { margin } C { any length from Section {@NumberOf objects} } @Rowa A { " topmargin" } B { vmargin } C { any length from Section {@NumberOf objects} } @Rowa A { " footmargin" } B { vmargin } C { any length from Section {@NumberOf objects} } @Rowa A { " halign"} B { ctr } C { {@Code "left"}, {@Code "ctr"}, {@Code "right"}, or any length from Section {@NumberOf objects} } @Rowa A { " hsize"} B { } C { empty, or any length from Section {@NumberOf objects} } @Rowa A { " hindent"} B { ctr } C { {@Code "left"}, {@Code "ctr"}, {@Code "mctr"}, {@Code "right"}, or any length from Section {@NumberOf objects} } @Rowa A { " hstrut"} B { no } C { {@Code no}, {@Code yes}, or any length from Section {@NumberOf objects} } @Rowa A { " hmargin" } B { margin } C { any length from Section {@NumberOf objects} } @Rowa A { " leftmargin" } B { hmargin } C { any length from Section {@NumberOf objects} } @Rowa A { " rightmargin" } B { hmargin } C { any length from Section {@NumberOf objects} } @Rowa A { " nodelabel"} B { } C { any object } @Rowa A { " nodelabelmargin"} B { 0.2f } C { any length from Section {@NumberOf objects} } @Rowa A { " nodelabelfont"} B { -2p } C { any value suitable for the @Code "@Font" symbol } @Rowa A { " nodelabelbreak"} B { ragged nohyphen } C { any value suitable for the @Code "@Break" symbol } @Rowa A { " nodelabelformat"} B { "@Body" } C { any object, usually containing @Code "@Body" } @Rowa A { " nodelabelpos"} B { } C { any @I point } @Rowa A { " nodelabelangle"} B { horizontal } C { {@Code horizontal}, {@Code aligned}, or {@Code perpendicular}; {@Code parallel}, {@Code antiparallel}, or any @I angle } @Rowa A { " nodelabelprox"} B { outside } C { {@Code above}, {@Code below}, {@Code left}, {@Code right}, {@Code inside}, or {@Code outside}; {@Code CTR}, {@Code N}, {@Code S}, {@Code E}, {@Code W}, {@Code NE}, {@Code NW}, {@Code SW}, {@Code SE}, {@Code NNW}, {@Code NNE}, {@Code SSW}, or {@Code SSE} } @Rowa A { " nodelabelctr"} B { no } C { @Code yes or @Code no } @Rowa A { " nodelabeladjust"} B { 0 0 } C { any @I point } @Rowa A { " alabelpos"} B { NE } C { any @I point } @Rowa A { " blabelpos"} B { NW } C { any @I point } @Rowa A { " clabelpos"} B { SW } C { any @I point } @Rowa A { " dlabelpos"} B { SE } C { any @I point } } @DP Here is the complete list of standard link paths that may be given to the @Code "@Link" symbol. Each entry shows the link path name, any extra options relevant to this path, segments (shown using {@Code "outlinestyle { solid dashed }"}, and tags. All tags have directions pointing along the link from @Code FROM to {@Code TO}; these have been omitted for clarity. The @Code frompt and @Code topt options of @Code bezier are compulsory and denote the two control points (Section {@NumberOf dia_defi}). @IndentedList gap { 2v } @LI { @Code { "@Link" " path { line }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { line } from { A } to { B } } &2.5c #@Diag { #|1.5c B:: @Circle /0.8c A:: @Circle #// #@ShowTags @Link # pathstyle { solid dashed } # path { line } from { A } to { B } #} } @LI { @Code { "@Link" " path { doubleline }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { doubleline } from { A } to { B } } &2.5c #@Diag { #|1.5c B:: @Circle /0.8c A:: @Circle #// #@ShowTags @Link # pathstyle { solid dashed } # path { line } from { A } to { B } #} } @LI { @Code { "@Link" " path { curve }" " bias { 2.0f }" } ||6ct @Diag { A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { curve } from { A } to { B } } &2.5c @Diag { |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { curve } from { A } to { B } } } @LI { @Code { "@Link" " path { ccurve }" " bias { 2.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { ccurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { ccurve } from { A } to { B } } } @LI { @Code { "@Link" " path { bezier }" " frompt { A@CTR ++ { 3f 0 } }" " topt { B@CTR ++ { 3f 0 } }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { bezier } from { A } to { B } frompt { A@CTR ++ { 3f 0 } } topt { B@CTR ++ { 3f 0 } } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { bezier } from { A } to { B } frompt { A@CTR ++ { 3f 0 } } topt { B@CTR ++ { 3f 0 } } } } @LI { @Code { "@Link" " path { vhline }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhline } from { A } to { B } } } @LI { @Code { "@Link" " path { hvline }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvline } from { A } to { B } } } @LII { In the following links, the @Code radius option determines the radius of the curved corners of the link. } @LI { @Code { "@Link" " path { vhcurve }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhcurve } from { A } to { B } } } @LI { @Code { "@Link" " path { hvcurve }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvcurve } from { A } to { B } } } @LII { In the following links, the @Code bias option determines how far the link extends to the left of the leftmost node, or to the right of the rightmost node. } @LI { @Code { "@Link" " path { lvrline }" " bias { 2.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { lvrline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { lvrline } from { A } to { B } } } @LI { @Code { "@Link" " path { rvlline }" " bias { 2.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { rvlline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { rvlline } from { A } to { B } } } @LI { @Code { "@Link" " path { lvrcurve }" " bias { 2.0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { lvrcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { lvrcurve } from { A } to { B } } } @LI { @Code { "@Link" " path { rvlcurve }" " bias { 2.0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { rvlcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { rvlcurve } from { A } to { B } } } @LI { @Code { "@Link" " path { dhuline }" " bias { 2.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dhuline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dhuline } from { A } to { B } } } @LI { @Code { "@Link" " path { uhdline }" " bias { 2.0f }" } ||6ct @Diag { //2.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uhdline } from { A } to { B } } &2.5c @Diag { //2.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uhdline } from { A } to { B } } } @LI { @Code { "@Link" " path { dhucurve }" " bias { 2.0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dhucurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dhucurve } from { A } to { B } } } @LI { @Code { "@Link" " path { uhdcurve }" " bias { 2.0f }" " radius { 1.0f }" } ||6ct @Diag { //2.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uhdcurve } from { A } to { B } } &2.5c @Diag { //2.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uhdcurve } from { A } to { B } } } @LII { In the following links, the @Code "hfrac" and @Code "hbias" options determine how far across from @Code "FROM" to @Code "TO" the path turns vertical: a fraction @Code "hfrac" of the way across, plus a distance {@Code "hbias"}. The default settings shown make this point halfway; by changing @Code "hfrac" to 0 and giving a length to {@Code "hbias"}, one can select a particular distance, rather than a fraction of the total distance. } @LI { @Code { "@Link" " path { hvhline }" " hfrac { 0.5 }" " hbias { 0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvhline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvhline } from { A } to { B } } } @LI { @Code { "@Link" " path { hvhcurve }" " hfrac { 0.5 }" " hbias { 0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvhcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { hvhcurve } from { A } to { B } } } @LI { @Code { "@Link" " path { vhvline }" " hfrac { 0.5 }" " hbias { 0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /1.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhvline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /1.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhvline } from { A } to { B } } } @LI { @Code { "@Link" " path { vhvcurve }" " hfrac { 0.5 }" " hbias { 0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /1.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhvcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /1.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { vhvcurve } from { A } to { B } } } @LII { In the following links, the @Code "fbias" option determines how far the curve extends away from the FROM node; the @Code "tbias" option determines how far it extends away from the TO node; and the @Code "bias" option determines how far it extends above the higher or below the lower node. } @LI { @Code { "@Link" " path { dwrapline }" " tbias { 2.0f }" " bias { 2.0f }" " fbias { 2.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dwrapline } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dwrapline } from { A } to { B } } } @LI { @Code { "@Link" " path { uwrapline }" " tbias { 2.0f }" " bias { 2.0f }" " fbias { 2.0f }" } ||6ct @Diag { //0.5f /2f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uwrapline } from { A } to { B } } &2.5c @Diag { //0.5f /2f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uwrapline } from { A } to { B } } } @LI { @Code { "@Link" " path { dwrapcurve }" " tbias { 2.0f }" " bias { 2.0f }" " fbias { 2.0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f A:: @Circle /0.8c |1.5c B:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dwrapcurve } from { A } to { B } } &2.5c @Diag { //0.5f |1.5c B:: @Circle /0.8c A:: @Circle /2f // @ShowTags @Link pathstyle { solid dashed } path { dwrapcurve } from { A } to { B } } } @LI { @Code { "@Link" " path { uwrapcurve }" " tbias { 2.0f }" " bias { 2.0f }" " fbias { 2.0f }" " radius { 1.0f }" } ||6ct @Diag { //0.5f /2f A:: @Circle /0.8c |1.5c B:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uwrapcurve } from { A } to { B } } &2.5c @Diag { //0.5f /2f |1.5c B:: @Circle /0.8c A:: @Circle // @ShowTags @Link pathstyle { solid dashed } path { uwrapcurve } from { A } to { B } } } @EndList Here is the list of abbreviations for the standard paths (note that @Code curve and @Code acurve are the same). Each path also has an abbreviation which adds a forward arrow: @DP @Tab @Fmta { @Col { @DisplayIndent @Wide & @Code { path "{" A "}" } } ! @Col @Code "@"B ! @Col @Code "@"C } { @FirstRowa A { line } B { Line } C { Arrow } @Rowa A { doubleline } B { DoubleLine } C { DoubleArrow } @Rowa A { curve } B { Curve } C { CurveArrow } @Rowa A { acurve } B { ACurve } C { ACurveArrow } @Rowa A { ccurve } B { CCurve } C { CCurveArrow } @Rowa A { bezier } B { Bezier } C { BezierArrow } @Rowa A { hvline } B { HVLine } C { HVArrow } @Rowa A { vhline } B { VHLine } C { VHArrow } @Rowa A { hvcurve } B { HVCurve } C { HVCurveArrow } @Rowa A { vhcurve } B { VHCurve } C { VHCurveArrow } @Rowa A { lvrline } B { LVRLine } C { LVRArrow } @Rowa A { rvlline } B { RVLLine } C { RVLArrow } @Rowa A { lvrcurve } B { LVRCurve } C { LVRCurveArrow } @Rowa A { rvlcurve } B { RVLCurve } C { RVLCurveArrow } @Rowa A { dhuline } B { DHULine } C { DHUArrow } @Rowa A { uhdline } B { UHDLine } C { UHDArrow } @Rowa A { dhucurve } B { DHUCurve } C { DHUCurveArrow } @Rowa A { uhdcurve } B { RVLCurve } C { RVLCurveArrow } @Rowa A { hvhline } B { HVHLine } C { HVHArrow } @Rowa A { vhvline } B { VHVLine } C { VHVArrow } @Rowa A { hvhcurve } B { HVHCurve } C { HVHCurveArrow } @Rowa A { vhvcurve } B { VHVCurve } C { VHVCurveArrow } @Rowa A { dwrapline } B { DWrapLine } C { DWrapArrow } @Rowa A { uwrapline } B { UWrapLine } C { UWrapArrow } @Rowa A { dwrapcurve } B { DWrapCurve } C { DWrapCurveArrow } @Rowa A { uwrapcurve } B { UWrapCurve } C { UWrapCurveArrow } } @DP Here is the complete list of options to the @Code "@Link" symbol. The options related to {@Code xlabel}, {@Code ylabel}, and {@Code zlabel} have been omitted where they are the same as the {@Code linklabel} options. @DP 1fx @Break @Tab hmargin { 1s } # vmargin { 0.6vx } @Fmth { @Col @Code A ! @Col @Code " " ! @Col @Code B ! @Col @Code " " ! @Col 1.0c @Wide ! @Col C } @Fmta { @Col @Code A ! @Col @Code "{" ! @Col @Code B ! @Col @Code "}" ! @Col 1.0c @Wide ! @Col C } { @Rowh A { "@Link" } @Rowa A { " path" } B { line } C { {@Code "line"}, {@Code "doubleline"}, {@Code "curve"}, {@Code "acurve"}, {@Code "ccurve"}, {@Code "bezier"}, {@Code "vhline"}, {@Code "hvline"}, {@Code "vhcurve"}, {@Code "hvcurve"}, {@Code "lvrline"}, {@Code "rvlline"}, {@Code "lvrcurve"}, {@Code "rvlcurve"}, {@Code "dhuline"}, {@Code "uhdline"}, {@Code "dhucurve"}, {@Code "uhdcurve"}, {@Code "hvhline"}, {@Code "vhvline"}, {@Code "hvhcurve"}, {@Code "vhvcurve"}, {@Code "dwrapline"}, {@Code "uwrapline"}, {@Code "dwrapcurve"}, {@Code "uwrapcurve"}, or any path } @Rowa A { " from"} B { 0,0 } C { any @I point or node label } @Rowa A { " to"} B { 1,1 } C { any @I point or node label } @Rowa A { " bias"} B { 2.0f } C { any @I length } @Rowa A { " fbias"} B { 2.0f } C { any @I length } @Rowa A { " tbias"} B { 2.0f } C { any @I length } @Rowa A { " hfrac"} B { 0.5 } C { any fractional @I number } @Rowa A { " hbias"} B { 0.0f } C { any @I length } @Rowa A { " radius"} B { 1.0f } C { any @I length } @Rowa A { " xindent"} B { 0.8f } C { any @I length } @Rowa A { " zindent"} B { 0.8f } C { any @I length } @Rowa A { " frompt"} B { 0 0 } C { any @I point } @Rowa A { " topt"} B { 0 0 } C { any @I point } @Rowa A { " pathstyle" } B { solid } C { {@Code solid}, {@Code dashed}, {@Code cdashed}, {@Code dotted}, {@Code dotdashed}, {@Code dotcdashed}, {@Code dotdotdashed}, {@Code dotdotcdashed}, {@Code dotdotdotdashed}, {@Code dotdotdotcdashed}, {@Code noline}, or any sequence of one or more of these values } @Rowa A { " pathdashlength"} B { 0.2f } C { any @I length } @Rowa A { " pathwidth" } B { thin } C { {@Code thin}, {@Code medium}, {@Code thick}, or any @I length } @Rowa A { " pathgap" } B { thin } C { {@Code thin}, {@Code medium}, {@Code thick}, or any @I length } @Rowa A { " arrow"} B { no } C { {@Code no}, {@Code yes}, {@Code forward}, {@Code back}, or {@Code both} } @Rowa A { " arrowstyle"} B { solid } C { {@Code solid}, {@Code solidwithbar}, {@Code halfopen}, {@Code open}, {@Code curvedsolid}, {@Code curvedhalfopen}, {@Code curvedopen}, {@Code circle}, {@Code box}, or {@Code many} } @Rowa A { " arrowwidth"} B { 0.3f } C { any @I length } @Rowa A { " arrowlength"} B { 0.5f } C { any @I length } @Rowa A { " backarrowstyle"} B { solid } C { {@Code solid}, {@Code solidwithbar}, {@Code halfopen}, {@Code open}, {@Code curvedsolid}, {@Code curvedhalfopen}, {@Code curvedopen}, {@Code circle}, {@Code box}, or {@Code many} } @Rowa A { " backarrowwidth"} B { 0.3f } C { any @I length } @Rowa A { " backarrowlength"} B { 0.5f } C { any @I length } @Rowa A { " linklabel"} B { } C { any object } @Rowa A { " linklabelmargin"} B { 0.2f } C { any length from Section {@NumberOf objects} } @Rowa A { " linklabelfont"} B { -2p } C { any value suitable for the @Code "@Font" symbol } @Rowa A { " linklabelbreak"} B { ragged nohyphen } C { any value suitable for the @Code "@Break" symbol } @Rowa A { " linklabelformat"} B { "@Body" } C { any object, usually containing @Code "@Body" } @Rowa A { " linklabelpos"} B { } C { any @I point } @Rowa A { " linklabelangle"} B { horizontal } C { {@Code horizontal}, {@Code aligned}, or {@Code perpendicular}; {@Code parallel}, {@Code antiparallel}, or any @I angle } @Rowa A { " linklabelprox"} B { above } C { {@Code above}, {@Code below}, {@Code left}, {@Code right}, {@Code inside}, or {@Code outside}; {@Code CTR}, {@Code N}, {@Code S}, {@Code E}, {@Code W}, {@Code NE}, {@Code NW}, {@Code SW}, {@Code SE}, {@Code NNW}, {@Code NNE}, {@Code SSW}, or {@Code SSE} } @Rowa A { " linklabelctr"} B { no } C { @Code yes or @Code no } @Rowa A { " linklabeladjust"} B { 0 0 } C { any @I point } @Rowa A { " xlabelpos"} B { LFROM } C { any @I point } @Rowa A { " ylabelpos"} B { LMID } C { any @I point } @Rowa A { " ylabelctr"} B { yes } C { @Code yes or @Code no } @Rowa A { " zlabelpos"} B { LTO } C { any @I point } @Rowa A { " fromlabel"} B { } C { any object } @Rowa A { " fromlabelmargin"} B { 0f } C { any length from Section {@NumberOf objects} } @Rowa A { " fromlabelfont"} B { "-2p" } C { Any value suitable for the @Code "@Font" symbol } @Rowa A { " fromlabelbreak"} B { ragged nohyphen } C { Any value suitable for the @Code "@Break" symbol } @Rowa A { " fromlabelformat"} B { "@Body" } C { any object, usually containing @Code "@Body" } @Rowa A { " fromlabelpos"} B { FROM } C { any @I point } @Rowa A { " fromlabelangle"} B { antiparallel } C { {@Code horizontal}, {@Code aligned}, or {@Code perpendicular}; {@Code parallel}, {@Code antiparallel}, or any @I angle } @Rowa A { " fromlabelprox"} B { W } C { {@Code above}, {@Code below}, {@Code left}, {@Code right}, {@Code inside}, or {@Code outside}; {@Code CTR}, {@Code N}, {@Code S}, {@Code E}, {@Code W}, {@Code NE}, {@Code NW}, {@Code SW}, {@Code SE}, {@Code NNW}, {@Code NNE}, {@Code SSW}, or {@Code SSE} } @Rowa A { " fromlabelctr"} B { no } C { @Code yes or @Code no } @Rowa A { " fromlabeladjust"} B { 0 0 } C { any @I point } @Rowa A { " tolabel"} B { } C { any object } @Rowa A { " tolabelmargin"} B { 0f } C { any length from Section {@NumberOf objects} } @Rowa A { " tolabelfont"} B { "-2p" } C { Any value suitable for the @Code "@Font" symbol } @Rowa A { " tolabelbreak"} B { ragged nohyphen } C { Any value suitable for the @Code "@Break" symbol } @Rowa A { " tolabelformat"} B { "@Body" } C { any object, usually containing @Code "@Body" } @Rowa A { " tolabelpos"} B { TO } C { any @I point } @Rowa A { " tolabelangle"} B { parallel } C { {@Code horizontal}, {@Code aligned}, or {@Code perpendicular}; {@Code parallel}, {@Code antiparallel}, or any @I angle } @Rowa A { " tolabelprox"} B { W } C { {@Code above}, {@Code below}, {@Code left}, {@Code right}, {@Code inside}, or {@Code outside}; {@Code CTR}, {@Code N}, {@Code S}, {@Code E}, {@Code W}, {@Code NE}, {@Code NW}, {@Code SW}, {@Code SE}, {@Code NNW}, {@Code NNE}, {@Code SSW}, or {@Code SSE} } @Rowa A { " tolabelctr"} B { no } C { @Code yes or @Code no } @Rowa A { " tolabeladjust"} B { 0 0 } C { any @I point } } @DP Here is the complete list of options to the @Code "@Tree" symbol: @DP @OneRow 1fx @Break @Tab hmargin { 1s } # vmargin { 0.6vx } @Fmth { @Col @Code A ! @Col @Code " " ! @Col @Code B ! @Col @Code " " ! @Col 1.0c @Wide ! @Col C } @Fmta { @Col @Code A ! @Col @Code "{" ! @Col @Code B ! @Col @Code "}" ! @Col 1.0c @Wide ! @Col C } { @Rowh A { "@Tree" } @Rowa A { " treehindent" } B { ctr } C { {@Code left}, {@Code ctr}, {@Code right}, or any length from Section {@NumberOf objects} } } @DP The @Code "@HTree" option has a similar @Code "treevindent" option, which may be {@Code "top"}, {@Code ctr}, {@Code foot}, or any length from Section {@NumberOf objects}. @PP Here are all the syntax diagrams symbols, used within {@Code "@SyntaxDiag"} usually but also available within {@Code "@Diag"}. To begin with we have the six starter symbols: @CD @SyntaxDiag { @Tbl aformat { @Cell @Code A | @Cell B | @Cell | @Cell @Code C | @Cell D | @Cell | @Cell @Code E | @Cell F } { @Rowa A { "@StartRight ..." } B { @StartRight @ACell "..." } C { "@StartUp ..." } D { @StartUp @ACell "..." } E { "@StartRightRight" "A { ... }" "B { ... }" } F { @StartRightRight A { @ACell A } B { @ACell B } } @Rowa A { "@StartLeft ..." } B { @StartLeft @ACell "..." } C { "@StartDown ..." } D { @StartDown @ACell "..." } E { "@StartRightDown" "A { ... }" "B { ... }" } F { @StartRightDown A { @ACell A } B { @ACell B } } } } And here are all the syntax diagram types, shown in all four directions (right, up, left, and down). @Code "@Sequence" and @Code "@Select" may have up to twelve options, {@Code "A"} to {@Code "L"}. @IndentedList @LI @SyntaxDiag { @Four code { "@ACell ..." } @ACell "..." } @LI @SyntaxDiag { @Four code { "@BCell ..." } @BCell "..." } @LI @SyntaxDiag { @Four code { "@CCell ..." } @CCell "..." } @LI @SyntaxDiag { @Four code { "@Skip" } @Skip } @LI @SyntaxDiag { @Four code { "@Sequence" "A { ... }" "B { ... }" "C { ... }" } @Sequence A { @ACell A } B { @ACell B } C { @ACell C } } @LI @SyntaxDiag { @Four code { "@Select" "A { ... }" "B { ... }" "C { ... }" } @Select A { @ACell A } B { @ACell B } C { @ACell C } } @LI @SyntaxDiag { @Four code { "@Optional ..." } @Optional @ACell "..." } @LI @SyntaxDiag { @Four code { "@OptionalDiverted ..." } @OptionalDiverted @ACell "..." } @LI @SyntaxDiag { @Four code { "@Diverted ..." } @Diverted @ACell "..." } @LI @SyntaxDiag { @Four code { "@OneOrBoth" "A { ... }" "B { ... }" } @OneOrBoth A { @ACell A } B { @ACell B } } @LI @SyntaxDiag { @Four code { "@Loop" "A { ... }" "B { ... }" } @Loop A { @ACell A } B { @ACell B } } @LI @SyntaxDiag { @Four code { "@Repeat ..." } @Repeat @ACell "..." } @LI @SyntaxDiag { @Four code { "@LoopOpposite" "A { ... }" "B { ... }" } @LoopOpposite A { @ACell A } B { @ACell B } } @LI @SyntaxDiag { @Four code { "@RepeatOpposite ..." } @RepeatOpposite @ACell "..." } @LI @SyntaxDiag { @Four code { "@RepeatDiverted ..." } @RepeatDiverted @ACell "..." } @EndList The @Code "@Diag" symbol and to the {@Code "@DiagSetup"} setup file symbol have all of the options of {@Code "@Node"}, {@Code "@Link"}, {@Code "@Tree"}, and {@Code "@HTree"}. They also have the following options: @DP 1fx @Break @Tab hmargin { 1s } # vmargin { 0.6vx } @Fmth { @Col @Code A ! @Col @Code " " ! @Col @Code B ! @Col @Code " " ! @Col 1.0c @Wide ! @Col C } @Fmta { @Col @Code A ! @Col @Code "{" ! @Col @Code B ! @Col @Code "}" ! @Col 1.0c @Wide ! @Col C } { @Rowh A { "@Diag" } @Rowa A { " maxlabels" } B { 200 } C { any whole number } @Rowa A { " save" } B { no } C { @Code no or @Code yes } @Rowa A { " treehsep" } B { 0.5f } C { any length from Section {@NumberOf objects} } @Rowa A { " syntaxgap" } B { 0.35f } C { any length from Section {@NumberOf objects} } @Rowa A { " syntaxbias" } B { 1.0f } C { any length from Section {@NumberOf objects} } @Rowa A { " syntaxradius" } B { 0.3f } C { any length from Section {@NumberOf objects} } } @DP The following lists define all the ways to specify numbers, lengths, angles, points, and booleans. Brief explanations appear to the right, with the symbols' precedences in parentheses. @DP 1fx @Break @Tab # vmargin { 0.6vx } @Fmth { @Col { &@DisplayIndent A } ! @Col } @Fmta { @Col { &@DisplayIndent &2s A } ! @Col B } { @Rowh A { @I number } vmargin { 0.2vx } @Rowh @Rowa A { {@Sym minus}27.56 } B { or any literal number } @Rowa A { @Code sqrt @I number } B { square root (99) } @Rowa A { @Code abs @I number } B { absolute value (99) } @Rowa A { @Code ceiling @I number } B { least integer greater than or equal to (99) } @Rowa A { @Code floor @I number } B { greatest integer less than or equal to (99) } @Rowa A { @Code truncate @I number } B { delete fractional part (99) } @Rowa A { @Code round @I number } B { round to nearest integer (99) } @Rowa A { @Code sin @I angle } B { sine of angle measured in degrees (99) } @Rowa A { @Code cos @I angle } B { cosine of angle measured in degrees (99) } @Rowa A { @I number @Code atan @I number } B { arc tangent of first over second (98) } @Rowa A { @I number @Code exp @I number } B { first number raised to second number (98) } @Rowa A { @I number @Code log @I number } B { logarithm of second number to base first (98) } @Rowa A { @I number @Code rand @I number } B { random real number in this range inclusive (98) } @Rowa A { @I number @Code max @I number } B { the larger of two numbers (98) } @Rowa A { @I number @Code min @I number } B { the smaller of two numbers (98) } @Rowa A { @I number @Code "*" @I number } B { the product of two numbers (97) } @Rowa A { @I number @Code "/" @I number } B { real-valued division (96, left associative) } @Rowa A { @I length @Code "/" @I length } B { the ratio of two lengths (96, left associative) } @Rowa A { @I angle @Code "/" @I angle } B { the ratio of two angles (96, left associative) } @Rowa A { @I number @Code idiv @I number } B { integer division of two numbers (96, left associative) } @Rowa A { @I number @Code mod @I number } B { integer remainder when first divided by second (96) } @Rowa A { @I number @Code "+" @I number } B { sum of two numbers (96, left associative) } @Rowa A { @Code "+" @I number } B { identity operation (96) } @Rowa A { @I number @Sym minus @I number } B { difference of two numbers (96, left associative) } @Rowa A { @Sym minus @I number } B { negation (96) } @Rowa A { @Code sides } B { ({@Code outline} only) value of the node's @Code sides option } @Rowh @Rowh @Rowh @Rowh @Rowh A { @I length } vmargin { 0.2vx } @Rowh @Rowa A { 0 } B { zero } @Rowa A { @Code xsize } B { ({@Code outline} only) distance to right boundary } @Rowa A { @Code ysize } B { ({@Code outline} only) distance to top boundary } @Rowa A { @Code xmark } B { ({@Code outline} only) distance to column mark } @Rowa A { @Code ymark } B { ({@Code outline} only) distance to row mark } @Rowa A { @Code margin } B { ({@Code outline} only) value of the node's @Code margin option } @Rowa A { @Code shadow } B { ({@Code outline} only) value of the node's @Code shadow option } @Rowa A { @I number @Code i } B { @I number inches (100) } @Rowa A { @I number @Code c } B { @I number centimetres (100) } @Rowa A { @I number @Code p } B { @I number points (100) } @Rowa A { @I number @Code m } B { @I number ems (100) } @Rowa A { @I number @Code s } B { @Code 1s is the current width of a space (100) } @Rowa A { @I number @Code v } B { @Code 1v is the current inter-line space (100) } @Rowa A { @I number @Code f } B { @Code 1f is the size of the current font (100) } @Rowa A { @Code "xcoord" @I point } B { the @I x coordinate of the point (99) } @Rowa A { @Code "ycoord" @I point } B { the @I y coordinate of the point (99) } @Rowa A { @Code abs @I length } B { absolute value (99) } @Rowa A { @I length @Code rand @I length } B { random real length in this range inclusive (98) } @Rowa A { @I length @Code max @I length } B { the larger of two lengths (98) } @Rowa A { @I length @Code min @I length } B { the smaller of two lengths (98) } @Rowa A { @I point @Code "distance" @I point } B { (non-negative) distance between two points (98) } @Rowa A { @I length @Code "*" @I number } B { length multiplied by number (97) } @Rowa A { @I number @Code "*" @I length } B { length multiplied by number (97) } @Rowa A { @I length @Code "/" @I number } B { length divided by number (96, left associative) } @Rowa A { @I length @Code "+" @I length } B { sum of two lengths (96, left associative) } @Rowa A { @Code "+" @I length } B { identity operation (96) } @Rowa A { @I length @Sym minus @I length } B { difference of two lengths (96, left associative) } @Rowa A { @Sym minus @I length } B { negation (96) } @Rowh @Rowh @Rowh @Rowh @Rowh A { @I angle } vmargin { 0.2vx } @Rowh @Rowa A { @I number @Code d } B { @I number degrees (100) } @Rowa A { @I number } B { @I number degrees (@Code d is optional) (100) } @Rowa A { @Code parallel } B { ({@Code labelangle} options only) angle parallel to curve at label point } @Rowa A { @Code antiparallel } B { ({@Code labelangle} options only) angle antiparallel to curve at label point } @Rowa A { @Code perpendicular } B { ({@Code labelangle} options only) angle perpendicular to curve at label point } @Rowa A { @Code antiperpendicular } B { ({@Code labelangle} options only) angle antiperpendicular to curve at label point } @Rowa A { {@I label}{@Code "??ANGLE"} } B { angle parallel to curve at {@I label} if known, else @Code "0d" (99) } @Rowa A { @Code anglefix @I angle } B { @I angle normalized to between @Code 0d inclusive and @Code 360d exclusive (99) } @Rowa A { @Code abs @I angle } B { absolute value (99) } @Rowa A { @I length @Code atan @I length } B { arc tangent of first over second (98) } @Rowa A { @I point @Code "angleto" @I point } B { angle from first point to second (98) } @Rowa A { @I angle @Code rand @I angle } B { random angle in this range inclusive (98) } @Rowa A { @I angle @Code max @I angle } B { the larger of two angles (98) } @Rowa A { @I angle @Code min @I angle } B { the smaller of two angles (98) } @Rowa A { @I angle @Code "*" @I number } B { angle multiplied by number (97) } @Rowa A { @I number @Code "*" @I angle } B { angle multiplied by number (97) } @Rowa A { @I angle @Code "/" @I number } B { division of angle by number (96, left associative) } @Rowa A { @I angle @Code "+" @I angle } B { sum of two angles (96, left associative) } @Rowa A { @Code "+" @I angle } B { identity operation (96) } @Rowa A { @I angle @Sym minus @I angle } B { difference of two angles (96, left associative) } @Rowa A { @Sym minus @I angle } B { negation (96) } @Rowa A { @Code angle } B { ({@Code outline} only) value of the node's @Code angle option } @Rowh @Rowh @Rowh @Rowh @Rowh A { @I point } vmargin { 0.2vx } @Rowh @Rowa A { @I label } B { a previously defined label } @Rowa A { {@I any}{@Code "??"}{@I label} } B { {@I any}{@Code "@"}{@I label} if sensible, else {@I any} (99) } @Rowa A { @Code "prev" } B { the previous point in a shape } @Rowa A { @I length @Code "atangle" @I angle } B { point at distance and angle from origin (89) } @Rowa A { @I "point/tag" @Code "boundaryatangle" @I angle } B { @I {point}, or point on boundary of @I tag at @I angle (89) } @Rowa A { @I point @Code "**" @I number } B { multiplication of point by number (88) } @Rowa A { @I point @Code "++" @I point } B { vector sum of two points (87) } @Rowa A { @I point {@Sym minus}{@Sym minus} @I point } B { vector difference of two points (87) } @Rowa A { @I {number, number} } B { @I x and @I y coordinates with respect to base (70) } @Rowa A { @I {length length} } B { @I x and @I y distance from origin (5) } @Rowa A { @Code from } B { ({@Code path} only) the value of the link's @Code from option } @Rowa A { @Code to } B { ({@Code path} only) the value of the link's @Code to option } @Rowh @Rowh @Rowh @Rowh @Rowh A { @I boolean } vmargin { 0.2vx } @Rowh @Rowa A { @I number @Code "=" @I number } B { @M { non = }; also between lengths (79) } @Rowa A { @I number @Code "!=" @I number } B { @M { non != }; also between lengths (79) } @Rowa A { @I number @Code "==" @I number } B { @M { non = } between angles (79) } @Rowa A { @I number @Code "!==" @I number } B { @M { non != } between angles (79) } @Rowa A { @I number @Code "<=" @I number } B { @M { non <= }; also between lengths (79) } @Rowa A { @I number @Code "<" @I number } B { @M { non < }; also between lengths (79) } @Rowa A { @I number @Code ">=" @I number } B { @M { non >= }; also between lengths (79) } @Rowa A { @I number @Code ">" @I number } B { @M { non > }; also between lengths (79) } @Rowa A { @Code "not" @I boolean } B { Logical not (78) } @Rowa A { @I boolean @Code "and" @I boolean } B { Logical and (77) } @Rowa A { @I boolean @Code "or" @I boolean } B { Logical or (76) } @Rowa A { @I boolean @Code "xor" @I boolean } B { Logical exclusive or (76) } } @DP A length is represented in PostScript by a single number on the operand stack; so is an angle. Therefore all number operations can be applied to lengths and angles as well, but the results will not always be useful. For example, rounding a length to the nearest integer is not a useful thing to do because the result depends on the basic unit (what does 1 equal as a length?) which is implementation-dependent and genuinely subject to change. Rounding the @I ratio of two lengths does make sense. The above is an attempt to list only the useful operations; but if you really need the logarithm of an angle, you can have it. @PP Angles are a little more amenable to this kind of thing because they are always measured in degrees. However, angles suffer from the problem that {@Code 0d} is really the same angle as {@Code 360d}. For this reason, separate equality and inequality operators for angles are provided which ignore multiples of {@Code 360d}, and less than and similar relations are not defined for angles, because they inherently are not well defined. See also the @Code anglefix symbol above. @PP A point is represented by two lengths (which are numbers) on the stack. Those familiar with PostScript and willing to sacrifice portability and increase their risk of error can therefore write, for example, @OneCol { @I point @Code "exch" } to obtain the reflection of a point about the main diagonal, and so on. @PP The following may have a result of any type, depending on their options. The options and result may be a sequence of things as required in shapes, including @Code "[]" and so forth. @IndentedList @LI @OneRow lines @Break { @Code if @Code "cond {" @I boolean @Code "}" @Code "then {" @I anything @Code "}" @Code "else {" @I anything @Code "}" } @LI @OneRow lines @Break { @I angle @Code quadcase @Code "0 {" @I anything @Code "}" @Code "0-90 {" @I anything @Code "}" @Code "90 {" @I anything @Code "}" @Code "90-180 {" @I anything @Code "}" @Code "180 {" @I anything @Code "}" @Code "180-270 {" @I anything @Code "}" @Code "270 {" @I anything @Code "}" @Code "270-360 {" @I anything @Code "}" } @LI @OneRow lines @Break { @I number @Code signcase @Code "neg {" @I anything @Code "}" @Code "zero {" @I anything @Code "}" @Code "pos {" @I anything @Code "}" } @LI @OneRow lines @Break { @Code "xloop from {" @I number "} to {" @I number "} by {" @I number "} do {" @I anything @Code "}" } @LI @OneRow lines @Break { @Code "yloop from {" @I number "} to {" @I number "} by {" @I number "} do {" @I anything @Code "}" } @LI @OneRow lines @Break { @Code "zloop from {" @I number "} to {" @I number "} by {" @I number "} do {" @I anything @Code "}" } @EndList The @Code "if" symbol returns @Code "then" or @Code "else" depending on the value of {@Code "cond"}, and @Code "signcase" returns {@Code "neg"}, {@Code zero}, or {@Code pos} depending on whether @I number (which may also be an angle or a length) is negative, zero, or positive. The @Code "quadcase" symbol decides whether the given angle points in one of the four horizontal or vertical directions, or into the quadrants between them, and returns the appropriate option. Don't be misled by the unorthodox option names; it is not possible to give your own ranges, only these ones. @PP The loops return a sequence of repetitions of {@I anything}; any occurrences of {@Code x} in {@Code xloop} will be replaced by the current value of the loop counter, and similarly for the other loops. @PP Symbols not covered in this summary are the retagging symbol @Code "::" (Section {@NumberOf dia_tags}); the symbols available within the {@Code "@Tree"} symbol (Section {@NumberOf dia_posi}); and {@Code ":<"}, {@Code ":="}, {@Code "@ShowPoints"}, {@Code "@ShowTags"}, and {@Code "@ShowDirections"} from Section {@NumberOf dia_defi}. @End @Section lout-3.39/doc/user/README0000644000076400007640000000400311446017427013457 0ustar jeffjeffDirectory lout/doc/user This directory contains the Lout source files for the User's Guide to the Lout Document Formatting System. To produce the Guide, type the command lout -r6 all > user.ps in this directory. The -r6 flag causes Lout to run over the document six times. This is needed to completely resolve all cross references, although a readable PostScript file would be produced after one run if -r was omitted. Auxiliary files with .li and .ld suffixes will be created in this directory. Six runs is an unusually large number; it is owing to some unfortunate page breaks in the early runs that so many runs are needed. The first run will produce a large number of error messages, nearly all beginning with "unresolved cross reference". These should gradually go away on later runs. The following shows the error message output on the last run for A4 size printing: lout: : lout -r beginning run 6: lout file "gra_tick" (from "gra" line 38, from "all" line 46): 234,1: 23.7c object too high for 23.7c space; @Scale inserted lout file "gra_summ" (from "gra" line 44, from "all" line 46): 10,1: 25.7c object too high for 23.6c space; @Scale inserted lout file "prg_tabs" (from "prg" line 139, from "all" line 48): 66,23: prg2lout 2,1: program text ended within comment 68,35: prg2lout 2,1: program text ended within comment The first two warnings are about large tables that had to be scaled down slightly to fit on the page. The last two warnings point to two places where a C program text ended inside a comment, which in these cases was deliberate. If you set the document in Letter size paper, you will get a somewhat different set of warning messages. Optimal page breaking has been turned off for this document owing to repeated failure to converge, caused by footnotes and floating figures close to large unbreakable displays. A copy of the final PostScript output file (A4 paper size) is stored at "ftp://ftp.it.usyd.edu.au/jeff/lout/lout-3.39.user.ps.gz". Jeffrey H. Kingston 21 September 2010 lout-3.39/doc/user/vtyp0000755000076400007640000000013211363700677013532 0ustar jeffjeffgvim typ typ_ordi typ_repo typ_book typ_over typ_illu typ_plai \ typ_apdf typ_orga lout-3.39/doc/user/str_foot0000644000076400007640000001472011363700677014374 0ustar jeffjeff@Section @Title { Footnotes and endnotes } @Tag { footnotes } @Begin @PP A footnote is created by typing footnote. @Index @Code "@FootNote" @ID @Code "@FootNote { Like this. }" after the word that the footnote refers to. It will be numbered automatically and placed at the foot of the page or column; @FootNote { Like this. } or, if space there is insufficient, it may start on or run onto the following page or column. The footnote must be enclosed in braces. @PP The @Code "@FootNote" symbol has a @Code "@Location" option which determines where it goes: @ID @Code { "@FootNote" " @Location { ColFoot }" "{ ... }" } places the footnote at the bottom of the column, and @ID @Code { "@FootNote" " @Location { PageFoot }" "{ ... }" } places it at the bottom of the current page, occupying the full page width even in a multi-column document (this is occasionally useful for footnotes to headings). Of course, in a single-column document there is no difference anyway. The default value of the @Code "@Location" option is {@Code "ColFoot"}. @PP Endnotes work in exactly the same way as footnotes, except that the endnote. @Index @Code "@EndNote" symbol to use is @Code "@EndNote" and they appear either at the end of the document or at the end of some major part of it, depending on the type of document (Chapter {@NumberOf types}). Endnotes are always column width and so have no @Code "@Location" option. @PP Footnotes are usually labelled with consecutive Arabic numberals, but you can tell Lout to label a footnote (not an endnote) with something else, like this: @ID @OneRow @Code @Verbatim { @FootNote @Label { @Dagger } { This footnote will be labelled with a dagger, not a number. } } whose result should appear at the bottom of this page. @FootNote @Label { @Dagger } { This footnote will be labelled with a dagger, not a number. } Symbols commonly used for footnote labels include @Code "@Dagger" (@Dagger), @Code "@DaggerDbl" (@DaggerDbl), @Code "@Star" (@Star), @Code "@SectSym" (@SectSym), and @Code "@ParSym" (@ParSym), but you can use any object. If you want no label at all, use an empty object like this: @ID @OneRow @Code @Verbatim { @FootNote @Label {} } Footnotes with a @Code "@Label" option are excluded from the automatic numbering that applies to other footnotes. @PP The language of a footnote or endnote will be the language of the document as a whole. This is not necessarily the same as the current language at the point where the footnote or endnote occurs, or even the language of the enclosing large-scale structure symbol. It may be necessary to enclose the body of the footnote in a language symbol, like this: @ID @Code "@FootNote { French @Language { ... } }" Doing it the other way ({@Code "French @Language @FootNote ..."}) is not effective. @PP A footnote attached to the very last line of a chapter or appendix of a book occasionally runs onto the first page of the following chapter or appendix, and this looks very poor. If this happens, the solution is to place an @Code "@LP" after the last line (including the footnote). @PP In the rare case where more than one footnote is attached to one word, use @Code "@AnotherFootNote" for the second and subsequent footnotes: anotherfootnote. @Index @Code "@AnotherFootNote" @ID @Code { "something or other." "@FootNote { The first footnote. }" "@AnotherFootNote { The second footnote. }" } This ensures that the superscripts will be separated by commas, as convention demands. @PP The setup file contains a number of options for controlling the appearance of footnotes. (See Section @NumberOf setup for a general introduction to setup files and their options.) Here are all the options, with their default values: @ID @OneRow @Code { "@FootNoteThrough { No }" "@FootNoteLocation { ColFoot }" "@FootNoteNumbers { Arabic }" "@FootNoteFont { 0.80f }" "@FootNoteBreak { 1.20fx }" "@FootNoteFormat { { number &0.05f } @Insert body }" "@FootLen { 2.00c }" "@FootAboveGap { 1.00v }" "@FootGap { 0.20c }" } There are also setup file options for controlling endnotes. Since they are quite similar to the ones for footnotes, we won't say any more about them here. @PP @Code "@FootNoteThrough" may be @Code "Yes" or @Code { "No" }; footnotethrough. @Index @Code "@FootNoteThrough" @Code "Yes" means that the footnotes are numbered continuously through the document (or through each chapter in the case of books); @Code "No" means that the numbering begins afresh on each page. @Code "@FootNoteLocation" determines the default value of footnotelocatin. @Index @Code "@FootNoteLocation" the @Code "@Location" option mentioned above; it may be either @Code "ColFoot" or {@Code "PageFoot"}. @PP @Code "@FootNoteNumbers" determines how the footnotes are numbered; footnotenumbers. @Index @Code "@FootNoteNumbers" it may be {@Code Arabic}, {@Code Roman}, {@Code UCRoman}, {@Code Alpha}, or {@Code UCAlpha}, which give the obvious results. It may also be {@Code Bullets}, which uses sequences of bullets to mark the footnotes, following a style proposed by typographer Jan Tschichold, and it may be {@Code Symbols}, which produces the traditional sequence of daggers and similar symbols. @PP @Code "@FootNoteFont" and @Code "@FootNoteBreak" determine the footnotefont. @Index @Code "@FootNoteFont" footnotebreak. @Index @Code "@FootNoteBreak" font and paragraph breaking style of footnotes. The default value of @Code "@FootNoteFont" produces the same font family and face as the bulk of the document, but reduced to 0.8 times the original size. @PP @Code "@FootNoteFormat" determines the format of the footnote. The @Code number symbol within it must appear exactly once, and is replaced by the number of the footnote (if numbered). The @Code body symbol is replaced by the body (that is, the content) of the footnote. The default value shown uses symbols from raw Lout to add a small space at the right of the number, then insert it at the beginning of the first paragraph of the body. Another suitable value might be @ID @Code "@FootNoteFormat { number |1fx body }" which places the body in a separate column to the number, one font width to the right of the left edge of the number. @PP @Code "@FootLen" determines the length of the small horizontal line footlen. @Index @Code "@FootLen" drawn above the footnotes; @Code "@FootAboveGap" determines the minimum space to be left clear footabovegap. @Index @Code "@FootAboveGap" above this line; and @Code "@FootGap" determines the footgap. @Index @Code "@FootGap" vertical separation between footnotes. All three may be any length. @End @Section lout-3.39/doc/user/typ_over0000644000076400007640000003203511363700677014403 0ustar jeffjeff@Section @Title { Overhead transparencies } @Tag { overheads } @Begin @PP To produce overhead transparencies @FootNote { In Version 3.15 overhead transparencies were updated and brought into line with the other document types. Although existing source files do not need to be modified, their printed appearance may change (spacing, running headers). There are some new setup file options, and some changes to existing setup file options. } (hereafter called overheads), start off overheads. @Index { overhead transparencies } slides. @RawIndex { slides @I see overhead transparencies } with the @Code slides setup file and the @Code "@OverheadTransparencies" overhead.transparencies. @Index @Code "@OverheadTransparencies" symbol: @ID @OneRow @Code { "@SysInclude { slides }" "@OverheadTransparencies" " @Title {}" " @RunningTitle {}" " @Author {}" " @Institution {}" " @DateLine { No }" " @InitialFont { Times Base 20p }" " @InitialBreak { ragged 1.2fx nohyphen }" " @InitialSpace { lout }" " @InitialLanguage { English }" " @PageOrientation { Portrait }" " @PageHeaders { Titles }" " @FirstPageNumber { 1 }" " @FirstOverheadNumber { 1 }" " @FirstLectureNumber { 1 }" " @OptimizePages { No }" "//" } This shows all the options of @Code "@OverheadTransparencies" with their default values. As usual with options, they may be given in any order, and only the ones whose values need to be changed need be given at all. The meaning of the @Code "//" symbol after the last option is beyond our scope, but disaster will ensue if it is forgotten. @PP If @Code "@Title" is not empty, an initial overhead will be produced containing the {@Code "@Title"}, {@Code "@Author"}, {@Code "@Institution"}, and {@Code "@DateLine"} options. @Code "@DateLine" may be set to {@Code "No"}, meaning no dateline, {@Code "Yes"}, meaning print the current date, or anything else, which is taken to be a date and printed. @PP Each overhead has a running header printed in small type at the top left. The @Code "@RunningTitle" option goes into this header, or, if there is no @Code "@RunningTitle" option, @Code "@Title" is used instead. @PP The remaining options are a selection of setup file options (Section {@NumberOf setup}) that frequently need to be changed. If your changes to the overall formatting are confined to these options, you can change them here and avoid having your own setup file. If you already have your own setup file, change them in either place and omit them in the other. @PP @Code "@InitialFont" is the font in which the overheads will be set, and should contain a family, a face, and a size. A good font size for overheads is 20 points, so that is the default size. @PP @Code "@InitialBreak" controls the behaviour of paragraph breaking in the overheads. It should have three parts: a paragraph breaking style ({@Code adjust}, {@Code ragged}, etc.), an inter-line spacing ({@Code "1.2fx"} for single spacing, {@Code "2.4fx"} for double spacing, and so on), and either @Code "hyphen" or @Code "nohyphen" for turning hyphenation on or off. Adjusted lines and hyphenated words are difficult to read from overheads, so the default is not to have them. @Code "@InitialSpace" determines how Lout treats white space between objects (Section {@NumberOf white}). @Code "@InitialLanguage" determines the language of the overheads. @PP @Code "@PageOrientation" determines the orientation of the page. Its value may be {@Code Portrait} (the default), {@Code Landscape}, {@Code ReversePortrait}, or {@Code ReverseLandscape}. See Section {@NumberOf pagesize} for further details. @PP @Code "@PageHeaders" determines the appearance of page headers and footers. Its value may be {@Code None}, {@Code Simple}, {@Code Titles}, or {@Code NoTitles}. Section {@NumberOf headers} has the details, but just briefly, {@Code None} produces no page headers, {@Code Simple} produces page numbers only, @Code Titles produces full running titles, and @Code "NoTitles" is similar to @Code "Simple" in this context. @PP @Code "@FirstPageNumber" is the number given to the first page, @Code "@FirstOverheadNumber" is the number given to the first overhead, and @Code "@FirstLectureNumber" is the number given to the first lecture, of which more below. See preceding sections for {@Code "@OptimizePages"}. @PP After the compulsory {@Code "//"} come the overheads themselves. There are two alternatives: a series of overheads, corresponding to a single lecture, or a series of series of overheads, corresponding to a series of lectures. If the first is wanted, use this arrangement: overhead. @Index @Code "@Overhead" @ID @OneRow @Code { "@SysInclude { slides }" "@OverheadTransparencies" " @Title { ... }" " @Author { ... }" " @DateLine { ... }" " ..." "//" "@Overhead ... @End @Overhead" "@Overhead ... @End @Overhead" "..." "@Overhead ... @End @Overhead" } @Code "@Overhead" is a large-scale structure symbol, similar to {@Code "@Section"}, with the usual options: @ID @OneRow @Code { "@Overhead" " @Title { Trends in investment since 1980 }" " @RunningTitle { Investment }" " @Tag { investment }" " @InitialLanguage { English }" "@Begin" "..." "@End @Overhead" } If @Code "@Title" is given it will appear as a centred, bold display at the beginning of the overhead. As usual, these options may be given in any order or omitted altogether. @PP The body of the overhead is quite arbitrary. Typically one tends to use lists and displays more than paragraphs, but all the usual features are available. Each overhead begins on a fresh page, but it may occupy more than one page. @PP @Code "@Overhead" also has a @Code "@Format" option which allows you to specify an arbitrary format for the body of the overhead (that is, everything except its title). For example, @ID @Code "@Format { @CurveBox @HExpand @VExpand @Body }" encloses the body in a curvebox, with the box expanded to the full available width and height. Unlike the similar option for figures and tables, however, this @Code "@Format" option unfortunately has not been set up to work with multi-page overheads, so if you use the format just given you have to make sure your overheads all fit on one page. To draw boxes around the @I entire page, use the @Code "@PageBox" setup file options. @PP Lout does not provide any special support for overlays. A good way to make them is to first produce one overhead containing all the layers simultaneously. Once this is correct, enclose the entire body of the overhead in {@Code "white @Colour"}, make one copy of the text of the overhead for each layer, separating the copies with @Code "@NP" (new page) symbols, and, in each copy, enclose the parts that are to appear in that layer in {@Code "black @Colour"} (or any other colour). This works because @Code "white @Colour" makes an object invisible without altering its size. @PP We turn now to the second major alternative, which is a series of lectures, like this: lecture. @Index @Code "@Lecture" @ID @OneRow @Code { "@SysInclude { slides }" "@OverheadTransparencies" " @Title { ... }" " @Author { ... }" " @DateLine { ... }" " ..." "//" "@Lecture ... @End @Lecture" "@Lecture ... @End @Lecture" "..." "@Lecture ... @End @Lecture" } @Code "@Lecture" is a large-scale structure symbol, again with the usual options: @ID @OneRow @Code { "@Lecture" " @Title { Macro-Economic Policies for the Nineties }" " @RunningTitle { Macro-economic policies }" " @Tag { macro-economics }" " @InitialLanguage { English }" "@Begin" "..." "@End @Lecture" } If @Code "@Title" is non-empty the series of overheads will begin with an overhead containing the title alone, centred on the page using the @Code "clines" paragraph breaking style. This means that it makes sense to have a multi-line title. Any text following the @Code "@Begin" will appear under the lecture title as you would expect. Within the body of {@Code "@Lecture"}, place a series of overheads bracketed by @Code "@BeginOverheads" and {@Code "@EndOverheads"}: beginoverheads. @Index @Code "@BeginOverheads" endoverheads. @Index @Code "@EndOverheads" @ID @OneRow @Code { "@BeginOverheads" "@Overhead ... @End @Overhead" "..." "@EndOverheads" } The @Code "@Overhead" symbol is exactly as described earlier. @PP The features described in other chapters are available with overheads. Endnotes and references appear automatically at the end of the overheads. You can have a table of contents, by setting the @Code "@MakeContents" option of the setup file to {@Code Yes}. It will appear automatically after any title overhead. The setup file options have been set on the assumption that you want your lectures to appear in the table of contents, but not individual overheads. It is not possible to have an index, and it is not possible to have multiple columns. @PP Within the @Code slides setup file there is an @Code "@OverheadSetup" symbol whose options control the appearance of features specific to overhead.setup. @Index @Code "@OverheadSetup" overheads (in other words, the features described in this section). Here are some of these options and their default values: @ID @OneRow @Code @Verbatim { @Use { @OverheadSetup # @DateLine { No } # @FirstOverheadNumber { 1 } # @FirstLectureNumber { 1 } # @ContentsWord { contents } # @LectureNumbers { Arabic } # @OverheadNumbers { Arabic } # @TitlePageFont { Helvetica Base } # @TitleFormat { @Center clines @Break title } # @AuthorFormat { @Center clines @Break author } # @InstitutionFormat { @Center clines @Break @I institution } # @DateLineFormat { @Center date } # @AboveTitleGap { 0.5i } # @AboveAuthorGap { 1.0i } # @AboveInstitutionGap { 0.5i } # @AboveDateLineGap { 0.5i } # @LectureHeadingFont { Bold 1.20f } # @LectureHeadingFormat { @Centre number @DP @Centre title @DP } # @OverheadHeadingFormat { @Centre title @DP } # @OverheadHeadingFont { Bold } # @LectureInContents { Yes } # @OverheadInContents { No } # @ReferencesInContents { Yes } } } For an introduction to setup files and their options, consult Section {@NumberOf setup}. The first four options are as for @Code "@OverheadTransparencies" as described above. @Code "@ContentsWord" determines the table of contents heading; its default value, {@Code contents}, produces `Contents' in the current language. @Code "@LectureNumbers" and @Code "@OverheadNumbers" determine the style of numbering of lectures and overheads, and may be {@Code None}, {@Code Arabic}, {@Code Roman}, {@Code UCRoman}, {@Code Alpha}, or {@Code UCAlpha} as usual. Next come options for setting the font of the overall title page, the format of the title, author, institution, and dateline parts of it, the gap above the title, author, institution, and dateline that appear on that page; then options controlling the appearance of the headings at the start of each lecture and overhead, and finally options which determine which entries are made in any table of contents. @PP The @Code "@LectureHeadingFormat" option determines the format of the heading of each lecture. Within it, the symbol @Code "number" stands for the number of the lecture, including the `Lecture' word if there is one, and @Code "title" stands for the title of the lecture. The default value centres the number and title, with display gaps below each one. @Code "@OverheadHeadingFormat" is similar; it has the same symbols but the default value chooses not to use {@Code "number"}. @PP Other setup file options exist which permit you to have a box drawn around each overhead, and to change the page size, margins, and orientation. These are described in Chapter {@NumberOf changes}. @PP Section {@NumberOf headers} describes the setup file options that control the appearance of page headers and footers. With overheads, the values given to the {@Code "@MajorTitle"}, {@Code "@MinorTitle"}, {@Code "@MajorNum"}, and {@Code "@MinorNum"} symbols within those options are as follows. If @Code "@Lecture" is being used: @ID @Tab @Fmta { @Col A ! @Col B } { @Rowa A { @Code "@MajorTitle" } B { The @Code "@RunningTitle" option of {@Code "@OverheadTransparencies"}, or its @Code "@Title" option if @Code "@RunningTitle" is absent; } @Rowa A { @Code "@MinorTitle" } B { The @Code "@RunningTitle" option of the current {@Code "@Lecture"}, or else its @Code "@Title" option if @Code "@RunningTitle" is absent; } @Rowa A { @Code "@MajorNum" } B { The number of the current {@Code "@Lecture"}; } @Rowa A { @Code "@MinorNum" } B { A two-part number, for example 5.2, containing the number of the current @Code "@Lecture" and the number within that lecture of the current overhead. } } If @Code "@Lecture" is not being used: @ID @Tab @Fmta { @Col A ! @Col B } { @Rowa A { @Code "@MajorTitle" } B { The @Code "@RunningTitle" option of {@Code "@OverheadTransparencies"}, or its @Code "@Title" option if @Code "@RunningTitle" is absent; } @Rowa A { @Code "@MinorTitle" } B { Empty; } @Rowa A { @Code "@MajorNum" } B { Empty; } @Rowa A { @Code "@MinorNum" } B { The number of the current overhead. } } The first page occupied by any overhead is a @Code Start page; subsequent pages are @Code NonStart pages. There are no @Code Intro pages. @End @Section lout-3.39/doc/user/su_crest.eps0000644000076400007640000007642711363700677015166 0ustar jeffjeff%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 0 0 60 53 %%Pages: 1 %%Title: Crest for The University of Sydney %%Creator: jaa@cs.su.oz.au encapsulated by rex@cs.su.oz.au %%+ Converted for colour and bug fixes by Rex. %%CreationDate: Wed May 13 18:02:34 EST 1992 %%+ Converted for colour: Tue Jul 7 20:06:30 EST 1992 %%DocumentNeededResources: font Times-Bold %%EndComments %%BeginProlog %%EndProlog %%BeginSetup %%EndSetup % PMS colours % red - 185 % blue - 286 % gold - 871 gsave .01 dup scale -1988 -1050 translate /colour 1 def % set to one if colour /pathtextdict 27 dict def /pathtext { pathtextdict begin /spacing exch def /offset exch def /str exch def /pathdist 0 def /offset offset str 0 1 getinterval stringwidth pop 2 div add def /setdist offset def /charcount 0 def gsave flattenpath {movetoproc} {linetoproc} {} {closepathproc} pathforall grestore newpath end } def pathtextdict begin /movetoproc { /newy exch def /newx exch def /firstx newx def /firsty newy def /ovr setdist pathdist sub def newx newy transform /cpy exch def /cpx exch def } def /linetoproc { /oldx newx def /oldy newy def /newy exch def /newx exch def /dx newx oldx sub def /dy newy oldy sub def /dist dx dup mul dy dup mul add sqrt def dist 0 ne { /dsx dx dist div ovr mul def /dsy dy dist div ovr mul def oldx dsx add oldy dsy add transform /cpy exch def /cpx exch def /pathdist pathdist dist add def { setdist pathdist le { charcount str length lt {setchar} {exit} ifelse } { /ovr setdist pathdist sub def exit } ifelse } loop } if } def /closepathproc { firstx firsty linetoproc firstx firsty movetoproc } def /setchar { /char str charcount 1 getinterval def /charcount charcount 1 add def /charwidth char stringwidth pop def gsave cpx cpy itransform translate dy dx atan rotate charwidth -2 div 0 moveto char show /charwidth str length charcount gt { str charcount 1 getinterval stringwidth pop } { 0 } ifelse charwidth add 2 div def charwidth 0 moveto currentpoint transform /cpy exch def /cpx exch def grestore /setdist setdist charwidth spacing add add def } def end /gold_colour { colour 0 ne { 0.9453 0.6206 0.004 setrgbcolor } { 1 setgray } ifelse } def /blue_colour { colour 0 ne % { 0.0 0.0 0.0 setrgbcolor } % { 1.0 1.0 1.0 setrgbcolor } { 0.0599 0.0526 0.5493 setrgbcolor } { 1 setgray } ifelse } def /red_colour { colour 0 ne { 0.9375 0.0 0.0 setrgbcolor } { 1 setgray } ifelse } def /c { curveto } def /m { moveto } def /l { lineto } def /sym1 { 5000 1939 m 4974 2006 4971 2065 4924 2119 c 4909 2137 4893 2152 4870 2153 c 4845 2154 4824 2141 4811 2120 c 4791 2089 4771 2068 4740 2047 c 4722 2079 4713 2105 4706 2141 c 4659 2111 4624 2091 4580 2057 c 4555 2116 4561 2178 4597 2232 c 4570 2236 4551 2242 4525 2242 c 4543 2280 4564 2305 4598 2329 c 4572 2345 4553 2358 4528 2375 c 4432 2284 4332 2235 4201 2226 c 3989 2210 3846 2323 3636 2356 c 3596 2363 3565 2353 3525 2362 c 3478 2372 3444 2415 3441 2463 c 3358 2444 3304 2395 3250 2329 c 3222 2365 3205 2402 3211 2447 c 3179 2445 3148 2437 3135 2408 c 3122 2378 3135 2351 3144 2320 c 3092 2351 3046 2396 3050 2457 c 3053 2509 3097 2544 3146 2563 c 3104 2574 3073 2584 3030 2587 c 3053 2628 3079 2655 3119 2679 c 3070 2703 3031 2726 3003 2773 c 3033 2798 3059 2811 3095 2827 c 3062 2842 3035 2852 2999 2850 c 2961 2846 2934 2826 2909 2798 c 2897 2844 2904 2890 2936 2925 c 2999 2992 3096 2968 3185 2949 c 3143 3062 3116 3145 3080 3260 c 3056 3248 3037 3240 3012 3228 c 3009 3255 3008 3275 3004 3303 c 2954 3263 2914 3228 2851 3218 c 2792 3210 2733 3215 2694 3260 c 2657 3302 2652 3361 2676 3411 c 2698 3457 2745 3480 2796 3479 c 2848 3478 2888 3433 2900 3382 c 2976 3532 2884 3672 2865 3839 c 2853 3951 2882 4059 2972 4127 c 3035 4175 3120 4184 3186 4141 c 3233 4110 3249 4047 3232 3993 c 3306 4030 3338 4126 3312 4204 c 3286 4278 3221 4333 3143 4334 c 3082 4335 3030 4290 3012 4231 c 2987 4270 2970 4307 2979 4352 c 2991 4411 3040 4445 3096 4466 c 3052 4496 3012 4518 2959 4515 c 2915 4512 2887 4486 2857 4455 c 2857 4526 2870 4594 2928 4636 c } def /sym2 { 3004 4693 3106 4680 3188 4630 c 3195 4668 3210 4699 3241 4721 c 3280 4749 3325 4751 3370 4734 c 3324 4681 3347 4603 3386 4544 c 3428 4480 3447 4422 3454 4346 c 3491 4560 3479 4786 3309 4922 c 3309 4871 3298 4821 3255 4794 c 3200 4760 3143 4771 3080 4784 c 2987 4804 2933 4885 2837 4880 c 2806 4878 2771 4868 2762 4837 c 2750 4800 2777 4768 2801 4737 c 2736 4747 2662 4782 2659 4848 c 2657 4904 2696 4947 2744 4976 c 2706 4986 2676 4992 2637 4986 c 2650 5022 2666 5051 2700 5067 c 2751 5090 2798 5075 2851 5060 c 2854 5126 2881 5190 2942 5213 c 2997 5235 3049 5211 3099 5180 c 3043 5175 2983 5150 2972 5095 c 2960 5029 2985 4969 3033 4922 c 3045 4972 3068 5004 3102 5043 c 3175 5126 3245 5203 3235 5313 c 3228 5402 3182 5463 3122 5528 c 3096 5557 3073 5580 3067 5618 c 3059 5671 3076 5722 3118 5756 c 3174 5801 3245 5811 3313 5787 c 3350 5775 3378 5745 3382 5707 c 3387 5660 3355 5625 3320 5594 c 3378 5596 3424 5615 3465 5657 c 3488 5680 3500 5709 3492 5741 c 3479 5789 3422 5808 3372 5807 c 3398 5849 3436 5877 3485 5879 c 3540 5881 3582 5851 3621 5812 c 3626 5868 3617 5910 3633 5965 c 3647 6015 3678 6046 3720 6077 c 3728 6032 3736 5996 3761 5957 c 3793 6007 3828 6041 3883 6062 c 3939 6083 3991 6081 4047 6060 c 3996 6024 3964 5988 3935 5934 c 3967 5942 3991 5948 4021 5962 c 4016 5935 4014 5915 4008 5889 c 4103 5911 4184 5919 4273 5880 c 4323 5858 4354 5820 4374 5768 c 4396 5801 4407 5829 4419 5867 c 4426 5890 4435 5908 4453 5924 c 4487 5953 4511 5975 4544 6004 c 4556 5978 4563 5960 4575 5935 c 4629 5971 4670 5993 4721 6033 c 4730 5997 4739 5972 4751 5937 c 4775 5951 4795 5964 4806 5990 c 4816 6013 4815 6039 4797 6057 c 4771 6083 4733 6075 4696 6068 c 4704 6112 4719 6149 4757 6172 c 4799 6198 4847 6189 4892 6169 c 4896 6198 4905 6220 4923 6243 c 4942 6267 4969 6275 5000 6276 c closepath 0 setgray fill } def /sym3 { 5000 6214 m 4943 6214 4937 6122 4950 6067 c 4900 6113 4830 6146 4770 6114 c 4809 6102 4847 6083 4855 6044 c 4876 5953 4780 5890 4699 5844 c 4690 5859 4685 5870 4676 5885 c 4687 5894 4695 5900 4705 5908 c 4700 5925 4697 5938 4692 5955 c 4663 5938 4642 5927 4615 5910 c 4588 5893 4579 5868 4565 5840 c 4549 5838 4538 5837 4522 5836 c 4531 5867 4536 5892 4530 5924 c 4495 5894 4471 5865 4457 5821 c 4444 5776 4425 5744 4391 5712 c 4388 5697 4383 5687 4376 5673 c 4469 5733 4547 5769 4656 5786 c 4818 5811 4930 5924 5000 6072 c closepath gold_colour fill 5000 2189 m 4938 2287 4857 2343 4746 2376 c 4678 2396 4629 2419 4570 2459 c 4567 2441 4563 2427 4557 2410 c 4614 2373 4657 2348 4717 2315 c 4676 2303 4642 2301 4606 2277 c 4637 2276 4659 2271 4688 2262 c 4643 2233 4615 2195 4602 2143 c 4652 2176 4692 2196 4748 2215 c 4749 2183 4753 2160 4763 2130 c 4787 2168 4816 2203 4861 2204 c 4925 2205 4976 2156 5000 2096 c closepath gold_colour fill 4392 2432 m 4408 2444 4419 2476 4402 2484 c 4390 2489 4373 2482 4371 2469 c 4368 2450 4354 2439 4337 2430 c 4322 2422 4305 2425 4292 2436 c 4269 2456 4267 2491 4281 2518 c 4302 2562 4346 2582 4395 2588 c 4443 2593 4494 2578 4515 2534 c 4533 2497 4520 2455 4494 2422 c 4429 2336 4347 2292 4241 2272 c 4078 2243 3955 2308 3798 2362 c 3712 2391 3644 2402 3552 2403 c 3526 2403 3502 2415 3489 2438 c } def /sym4 { 3478 2458 3480 2484 3496 2500 c 3511 2515 3533 2519 3552 2510 c 3577 2498 3586 2477 3603 2454 c 3616 2466 3627 2472 3641 2482 c 3611 2524 3575 2566 3524 2561 c 3489 2558 3459 2538 3448 2505 c 3371 2498 3317 2460 3262 2407 c 3251 2431 3260 2453 3265 2479 c 3203 2492 3143 2480 3097 2436 c 3096 2455 3095 2471 3107 2487 c 3142 2535 3198 2539 3256 2554 c 3211 2591 3168 2607 3111 2619 c 3127 2634 3139 2645 3158 2654 c 3250 2647 3315 2628 3406 2609 c 3408 2621 3408 2631 3410 2643 c 3340 2669 3285 2680 3211 2689 c 3152 2696 3112 2723 3063 2756 c 3103 2781 3140 2795 3187 2788 c 3134 2861 3054 2899 2965 2890 c 3045 2966 3170 2921 3265 2864 c 3251 2897 3248 2926 3254 2962 c 3340 2893 3343 2793 3410 2707 c 3422 2716 3431 2723 3443 2732 c 3372 2844 3351 2965 3233 3026 c 3227 3016 3223 3008 3218 2997 c 3175 3107 3141 3187 3116 3302 c 3124 3313 3128 3322 3135 3333 c 3160 3280 3179 3241 3192 3184 c 3252 3221 3277 3279 3291 3349 c 3355 3062 3431 2842 3621 2618 c 3809 2396 4163 2253 4392 2432 c closepath gold_colour fill 3039 4863 m 2983 4908 2943 4954 2927 5024 c 2915 5080 2929 5128 2960 5175 c 2899 5138 2888 5055 2909 4986 c 2847 5018 2791 5045 2724 5028 c 2766 5018 2795 4995 2820 4959 c 2781 4942 2744 4934 2720 4898 c 2705 4875 2705 4845 2720 4822 c 2727 4875 2775 4915 2829 4920 c 2912 4928 2966 4873 3045 4844 c 3043 4851 3042 4856 3039 4863 c closepath gold_colour } def /sym5 { 3771 5716 m 3765 5719 3760 5721 3754 5724 c 3770 5759 3789 5787 3823 5803 c 3878 5829 3926 5846 3959 5896 c 3928 5887 3906 5879 3877 5866 c 3878 5934 3908 5984 3952 6036 c 3868 6021 3814 5962 3770 5888 c 3735 5918 3714 5947 3698 5990 c 3657 5925 3671 5860 3657 5785 c 3646 5724 3605 5682 3549 5656 c 3576 5689 3603 5723 3592 5765 c 3578 5817 3517 5835 3463 5835 c 3513 5807 3554 5753 3539 5697 c 3504 5571 3311 5510 3202 5581 c 3175 5599 3155 5628 3162 5659 c 3170 5697 3216 5709 3255 5709 c 3264 5709 3272 5699 3272 5690 c 3272 5682 3266 5673 3258 5672 c 3242 5672 3219 5667 3219 5650 c 3219 5634 3234 5620 3250 5619 c 3283 5618 3311 5638 3327 5667 c 3340 5692 3331 5728 3306 5741 c 3261 5764 3210 5761 3167 5733 c 3130 5710 3107 5670 3114 5627 c 3125 5558 3186 5514 3254 5498 c 3369 5471 3464 5510 3568 5565 c 3734 5651 3855 5715 4032 5775 c 4106 5801 4192 5825 4246 5767 c 4264 5748 4269 5713 4249 5695 c 4238 5684 4222 5684 4207 5688 c 4197 5690 4189 5710 4198 5714 c 4205 5717 4213 5722 4212 5729 c 4210 5738 4203 5742 4196 5747 c 4180 5756 4160 5757 4145 5747 c 4128 5736 4119 5718 4119 5698 c 4119 5657 4151 5616 4192 5612 c 4242 5608 4293 5626 4316 5670 c 4339 5715 4335 5769 4301 5806 c 4259 5852 4200 5860 4138 5854 c 4067 5848 4018 5824 3948 5818 c 3890 5771 3825 5768 3771 5716 c closepath gold_colour fill 3351 3504 m 3316 3561 3252 3571 3187 3584 c 3110 3600 3060 3641 3004 3697 c 3016 3707 3025 3713 3037 3724 c 3101 3660 3167 3625 3257 3613 c 3312 3606 3361 3640 3388 3688 c 3411 3731 3408 3781 3382 3822 c 3364 3849 3334 3858 3302 3859 c 3271 3861 3242 3842 3231 3813 c 3222 3791 3221 3763 3240 3749 c 3253 3739 3284 3740 3285 3757 c 3286 3768 3301 3773 3312 3771 c 3322 3769 3329 3757 3326 3747 c 3322 3727 3305 3714 3284 3708 c 3256 3700 3230 3704 3203 3718 c 3115 3764 3064 3837 3037 3933 c 3113 3879 3205 3865 3289 3905 c 3595 4053 3667 4488 3532 4801 c 3477 4929 3390 5011 3265 5073 c 3297 5102 3328 5121 3371 5123 c } def /sym6 { 3413 5125 3443 5105 3479 5084 c 3476 5132 3466 5167 3451 5214 c 3527 5188 3578 5153 3638 5100 c 3632 5179 3602 5235 3556 5299 c 3590 5327 3613 5351 3634 5389 c 3530 5370 3412 5363 3351 5450 c 3310 5451 3280 5452 3240 5461 c 3287 5354 3297 5242 3236 5142 c 3194 5074 3147 5036 3101 4970 c 3075 4931 3081 4876 3115 4844 c 3144 4817 3187 4810 3223 4827 c 3260 4844 3270 4889 3265 4928 c 3262 4944 3246 4954 3230 4952 c 3215 4951 3195 4943 3196 4927 c 3198 4910 3191 4886 3174 4887 c 3140 4888 3147 4960 3174 4980 c 3197 4996 3221 5002 3248 4995 c 3457 4941 3527 4682 3509 4467 c 3501 4375 3484 4302 3429 4228 c 3414 4238 3403 4244 3389 4254 c 3422 4339 3411 4425 3360 4500 c 3318 4562 3278 4620 3293 4695 c 3239 4664 3226 4599 3234 4538 c 3175 4590 3117 4626 3039 4626 c 2987 4625 2949 4593 2920 4550 c 3017 4578 3119 4523 3169 4436 c 3099 4425 3027 4388 3017 4318 c 3072 4363 3134 4389 3203 4373 c 3269 4357 3316 4315 3344 4253 c 3384 4164 3381 4054 3308 3990 c 3269 3956 3220 3939 3171 3956 c 3138 3948 3102 3956 3083 3984 c 3070 4003 3072 4027 3084 4047 c 3094 4064 3113 4077 3132 4073 c 3145 4070 3154 4057 3153 4044 c 3152 4035 3146 4027 3137 4025 c 3130 4024 3125 4024 3119 4026 c 3114 4015 3122 4001 3134 3997 c 3152 3992 3170 4004 3181 4019 c 3192 4037 3190 4058 3182 4078 c 3173 4098 3158 4113 3137 4118 c 3063 4138 2984 4100 2947 4034 c 2887 3928 2905 3819 2938 3702 c 2978 3561 2993 3351 2852 3312 c 2826 3305 2798 3300 2778 3318 c 2760 3335 2756 3368 2774 3386 c 2782 3395 2797 3400 2806 3392 c 2813 3385 2815 3372 2808 3364 c 2804 3358 2809 3347 2816 3347 c 2833 3346 2851 3352 2857 3367 c 2865 3390 2850 3414 2830 3427 c 2803 3444 2768 3445 2742 3426 c 2715 3406 2703 3372 2710 3338 c 2719 3293 2759 3258 2805 3257 c 2904 3254 2972 3321 3034 3397 c 3040 3365 3047 3342 3053 3310 c 3088 3343 3108 3375 3125 3420 c 3173 3371 3193 3321 3214 3256 c 3249 3322 3255 3386 3240 3459 c 3283 3440 3321 3428 3368 3437 c 3376 3438 3379 3449 3376 3457 c 3370 3475 3361 3487 3351 3504 c closepath gold_colour fill } def /sym7 { %main interior 5000 2313 m 4955 2385 4880 2430 4730 2470 c 4670 2490 4630 2538 4621 2553 c 4641 2530 4630 2538 4621 2553 c 4585 2613 4538 2650 4472 2670 c 4397 2694 4326 2682 4259 2639 c 4193 2598 4169 2523 4172 2445 c 3789 2440 3543 2822 3392 3344 c 3431 3350 3458 3359 3495 3371 c 3490 3425 3475 3465 3415 3578 c 3530 3685 3540 3805 3441 3896 c 3632 4058 3686 4286 3678 4536 c 3673 4730 3650 4830 3573 4935 c 3573 5041 l 3596 5023 3630 4992 3667 4942 c 3740 5075 3732 5205 3670 5295 c 3713 5352 3745 5410 3780 5495 c 3692 5468 3608 5445 3533 5440 c 4026 5680 l 4040 5593 4125 5530 4250 5530 c 4310 5530 4415 5580 4453 5616 c 4514 5658 4607 5693 4661 5699 c 4823 5717 4930 5780 5000 5890 c closepath 1 setgray fill } def /sym8 { % Banner outside 5000 1556 m 4862 1556 4759 1613 4651 1699 c 4509 1814 4423 1918 4279 2033 c 4149 2137 4015 2173 3848 2182 c 3697 2189 3587 2175 3436 2165 c 3273 2154 3136 2138 2993 2218 c 2923 2257 2875 2297 2823 2359 c 2818 2365 2826 2373 2832 2378 c 2864 2398 2887 2412 2919 2433 c 2954 2455 2947 2512 2922 2545 c 2881 2600 2850 2641 2823 2703 c 2793 2771 2795 2830 2758 2894 c 2745 2916 2720 2935 2696 2927 c 2647 2911 2610 2902 2561 2886 c 2557 2885 2552 2889 2550 2894 c 2530 2941 2515 2976 2502 3027 c 2500 3032 2505 3038 2510 3040 c 2546 3054 2573 3062 2609 3075 c 2626 3081 2638 3091 2645 3108 c 2652 3125 2651 3142 2643 3159 c 2619 3213 2586 3244 2561 3297 c 2538 3350 2530 3393 2511 3448 c 2500 3481 2452 3494 2421 3478 c 2291 3413 2194 3370 2064 3305 c 2034 3289 2015 3267 2004 3236 c 1988 3194 2014 3153 2048 3124 c 2053 3119 2059 3111 2065 3115 c 2075 3120 2082 3124 2092 3130 c 2102 3135 2116 3133 2121 3123 c 2134 3092 2150 3073 2169 3046 c 2174 3040 2177 3030 2171 3026 c 2144 3007 2124 2995 2097 2977 c 2081 2966 2072 2948 2074 2928 c 2078 2872 2082 2830 2101 2778 c 2125 2717 2157 2677 2203 2631 c 2210 2624 2219 2620 2228 2623 c 2254 2631 2274 2637 2300 2646 c 2307 2648 2315 2644 2318 2638 c 2330 2616 2332 2597 2339 2574 c 2340 2568 2336 2562 2330 2558 c 2303 2539 2280 2531 2251 2515 c 2240 2509 2234 2497 2237 2484 c 2293 2264 2369 2102 2522 1934 c 2640 1804 2769 1740 2940 1699 c 3122 1655 3264 1689 3451 1705 c 3631 1720 3776 1743 3942 1673 c 4083 1613 4148 1508 4263 1408 c 4485 1215 4706 1090 5000 1090 c closepath 0 setgray fill } def /sym9 { 5000 1502 m 4722 1503 4558 1710 4353 1898 c 4199 2039 4042 2129 3833 2132 c 3632 2136 3486 2109 3286 2101 c 3149 2096 3040 2122 2923 2194 c 2745 2303 2674 2468 2599 2664 c 2500 2600 2426 2557 2324 2497 c 2385 2294 2456 2143 2606 1994 c 2761 1838 2945 1768 3165 1777 c 3357 1784 3497 1797 3689 1807 c 3873 1817 4023 1758 4161 1638 c 4301 1516 4393 1411 4554 1319 c 4703 1234 4828 1178 5000 1177 c closepath 1 setgray fill 2660 2661 m 2695 2563 2727 2492 2784 2405 c 2798 2413 2808 2420 2822 2430 c 2771 2508 2758 2578 2721 2663 c 2712 2683 2692 2706 2671 2697 c 2658 2692 2655 2674 2660 2661 c closepath 1 setgray fill 2608 2857 m 2597 2853 2589 2851 2577 2847 c 2586 2839 2592 2833 2602 2826 c 2606 2837 2606 2846 2608 2857 c closepath 1 setgray fill 2390 2680 m 2403 2655 2407 2634 2412 2607 c 2482 2651 2535 2679 2607 2721 c 2633 2736 2659 2747 2688 2739 c 2726 2728 2751 2702 2766 2665 c 2795 2595 2806 2539 2845 2474 c 2853 2460 2869 2447 2883 2454 c 2901 2463 2894 2490 2885 2508 c 2851 2572 2813 2612 2784 2679 c 2758 2740 2752 2789 2729 2851 c 2722 2870 2709 2890 2689 2888 c 2670 2887 2663 2864 2662 2845 c 2660 2803 2625 2773 2586 2757 c 2514 2728 2462 2707 2390 2680 c closepath 1 setgray fill 2481 3136 m 2479 3113 2479 3094 2486 3072 c 2500 3078 2510 3082 2524 3088 c 2512 3108 2500 3121 2481 3136 c closepath 1 setgray fill } def /syma { 2429 3113 m 2333 3058 2261 3021 2166 2965 c 2173 2856 2202 2775 2261 2684 c 2368 2725 2447 2754 2553 2799 c 2482 2901 2455 2992 2429 3113 c closepath 1 setgray fill 2472 3422 m 2469 3434 2457 3445 2445 3441 c 2434 3436 2427 3423 2430 3411 c 2438 3381 2452 3362 2471 3338 c 2373 3280 2300 3241 2200 3186 c 2219 3144 2234 3114 2259 3077 c 2326 3114 2374 3141 2441 3178 c 2466 3191 2497 3200 2518 3182 c 2549 3156 2567 3134 2593 3105 c 2600 3136 2599 3166 2579 3190 c 2552 3224 2532 3250 2514 3289 c 2493 3336 2484 3372 2472 3422 c closepath 1 setgray fill 2380 3392 m 2379 3400 2368 3406 2361 3402 c 2269 3354 2202 3321 2112 3270 c 2093 3260 2096 3233 2102 3212 c 2103 3210 2105 3206 2107 3208 c 2210 3264 2288 3301 2391 3358 c 2386 3370 2383 3380 2380 3392 c closepath 1 setgray fill } def /symb_colour { % cross in 'azure' blue blue_colour 5000 2313 m 4955 2385 4880 2430 4730 2470 c 4670 2490 l 4670 3220 l 3430 3220 l 3392 3344 l 3431 3350 3458 3359 3495 3371 c 3490 3425 3475 3465 3415 3578 c 3530 3685 3500 3805 3490 3813 c 4670 3813 l 4670 4582 l 5000 4582 l closepath fill % Chief Gules red_colour 5000 4582 m 3675 4582 l 3673 4730 3650 4830 3573 4935 c 3573 5041 l 3596 5023 3630 4992 3667 4942 c 3740 5075 3732 5205 3670 5295 c 3713 5352 3745 5410 3780 5495 c 3692 5468 3608 5445 3533 5440 c 4026 5680 l 4040 5593 4125 5530 4250 5530 c 4310 5530 4415 5580 4453 5616 c 4514 5658 4607 5693 4661 5699 c 4823 5717 4930 5780 5000 5890 c closepath fill % and now some lines around the cross, and at the base of the lion field 0 setgray 16 setlinewidth 3675 4582 m 5000 4582 l stroke 3490 3813 m 4670 3813 l 4670 4582 l stroke 3430 3220 m 4670 3220 l 4670 2490 l stroke } def /book_clasp { 2 copy gold_colour m 50 0 rlineto 0 50 rlineto -50 0 rlineto closepath fill 2 copy 0 setgray m 50 0 rlineto stroke m 0 50 rmoveto 50 0 rlineto stroke } def /sym_book { % Book outline % First fill the outline 1 setgray 5000 3742 m 4856 3798 4755 3804 4671 3700 c 4671 3325 l 5329 3325 l 5329 3700 l 5245 3804 5144 3798 5000 3742 c closepath fill % along the base of the book colour it gold gold_colour 5329 3315 m 5227 3420 5114 3413 5000 3363 c 4886 3413 4773 3420 4671 3315 c closepath fill % Clasps for the book % Firstly colour the clasps gold gold_colour 8 setlinewidth 4671 3355 m 4611 3355 l 4611 3700 l 4671 3700 l closepath gsave fill grestore 0 setgray stroke % and strokes on the clasp holder 3412 58 3644 { dup 4611 exch m 4671 exch l stroke } for 4671 3300 m 4671 3700 l stroke % Now do the three book clasps 5329 3400 book_clasp 5329 3500 book_clasp 5329 3600 book_clasp % then actually draw the book in black 16 setlinewidth 0 setgray 5000 3742 m 5000 3363 l 4886 3413 4773 3420 4671 3315 c 4671 3700 l 4755 3804 4856 3798 5000 3742 c closepath stroke 5329 3700 m 5245 3804 5144 3798 5000 3742 c 5000 3363 l 5114 3413 5227 3420 5329 3315 c 5329 3700 l closepath stroke 5337 3300 m 4663 3300 l stroke % Stroke along the spine of the book 5000 3300 m 5000 3742 l stroke % Line to the sides of the book 22 setlinewidth 4716 3360 m 4716 3750 l stroke 5284 3360 m 5284 3750 l stroke 0 setgray % finally some fine text lines on the book 4 setlinewidth 3470 60 3710 { dup dup dup dup dup dup dup 4766 exch m 4840 exch l stroke 5234 exch m 5160 exch l stroke 4877 exch m 4953 exch l stroke 5123 exch m 5047 exch l stroke } for } def /symb_mono { 0 setgray 30 setlinewidth % bottom most horizontal stroke 4860 2400 m 5000 2400 l stroke % Horizontal strokes to base of book 2500 100 3200 { dup 4670 exch m 5000 exch l stroke } for % strokes to the sides of the book 3300 100 3700 { dup 3400 exch m 5000 exch l stroke } for % horiz strokes above the book 3800 100 4500 { dup 4670 exch m 5000 exch l stroke } for % Vertical strokes to the top of the figure 3614 5450 m 3614 5520 l stroke 5060 5580 5620 5680 5720 5590 5570 5580 5620 5690 5720 5740 5770 5860 5950 5000 -99 3614 { dup 4620 m exch l stroke } for % bottom dark horizontal line for cross 84 setlinewidth 3400 3220 m 4696 3220 l stroke % Top dark horizontal line for cross 56 setlinewidth 3460 3813 m 4696 3813 l stroke % Bottom dark line for vertical strokes 92 setlinewidth 3650 4582 m 5000 4582 l stroke } def /sym { sym1 sym2 sym3 sym4 sym5 sym6 sym7 sym8 sym9 syma colour 0 ne { symb_colour } { symb_mono } ifelse } def % Draw the main body of the crest.. 0 setlinecap 5000 0 translate -1 1 scale -5000 0 translate sym 5000 0 translate -1 1 scale -5000 0 translate sym sym_book colour 0 eq { % draw the dark & light edges for the cross 30 setlinewidth 4681 3813 m 4681 4582 l stroke 4681 3220 m 4681 2400 l stroke 84 setlinewidth 5346 3813 m 5346 4582 l stroke 5346 3220 m 5346 2400 l stroke } if /star { -41 -82 rlineto -112 42 rlineto 39 -90 rlineto -85 -52 rlineto 87 -48 rlineto -28 -86 rlineto 93 33 rlineto 45 -89 rlineto 44 83 rlineto 90 -28 rlineto -27 106 rlineto 75 45 rlineto -77 42 rlineto 28 82 rlineto -90 -24 rlineto -41 66 rlineto closepath } def % Draw the lion in black 0 setlinewidth 5863 4715 m 5825 4660 5740 4655 5695 4700 c 5660 4670 5608 4670 5582 4700 c 5553 4730 5555 4780 5588 4800 c 5554 4852 5576 4902 5655 4895 c 5668 4893 5678 4900 5678 4910 c 5678 4970 l 5607 4971 5546 4980 5481 5020 c 5481 4875 l 5363 4930 5323 4890 5364 4810 c 5267 4842 5240 4830 5245 4735 c 5174 4810 5112 4773 5146 4703 c 5115 4655 5055 4640 5021 4678 c 4972 4677 4934 4694 4923 4723 c 4910 4757 4917 4798 4955 4822 c 4932 4850 4952 4875 4983 4896 c 5012 4918 5050 4911 5077 4892 c 5190 4970 l 5127 5061 l 5010 4973 4928 4950 4870 4962 c 4845 4910 4795 4875 4733 4858 c 4659 4942 4610 4932 4602 4804 c 4520 4855 4483 4842 4460 4757 c 4422 4782 4393 4781 4367 4760 c 4378 4710 4357 4672 4326 4659 c 4285 4648 4240 4655 4223 4697 c 4167 4693 4137 4720 4115 4752 c 4112 4790 4130 4828 4183 4840 c 4183 4875 4192 4901 4222 4920 c 4248 4939 4272 4930 4313 4904 c 4315 4980 4272 5010 4225 4994 c 4233 5040 4231 5070 4195 5080 c 4149 5060 4095 5062 4075 5090 c 4050 5112 4045 5159 4074 5193 c 4047 5238 4050 5270 4075 5301 c 4108 5338 4162 5330 4196 5298 c 4232 5320 4262 5315 4287 5285 c 4304 5262 4312 5220 4275 5181 c 4387 5072 l 4430 5095 l 4408 5132 4395 5145 4395 5175 c 4375 5193 4355 5219 4347 5251 c 4302 5293 4300 5330 4335 5367 c 4283 5422 4314 5485 4393 5483 c 4407 5531 4465 5552 4506 5530 c 4545 5561 4615 5562 4655 5530 c 4716 5543 4762 5522 4770 5472 c 4835 5490 4855 5422 4813 5372 c 4844 5313 l 4960 5313 l 4865 5422 4870 5514 5015 5575 c 5035 5631 5067 5658 5114 5700 c 5128 5713 5153 5702 5151 5672 c 5150 5617 l 5195 5656 5240 5660 5258 5628 c 5267 5611 5259 5586 5204 5530 c 5220 5511 5227 5470 5207 5423 c 5255 5442 5300 5467 5334 5485 c 5473 5565 5652 5553 5728 5450 c 5771 5382 5770 5338 5708 5272 c 5673 5245 5674 5200 5702 5173 c 5745 5131 5802 5110 5865 5093 c 5810 5033 5813 5010 5866 4968 c 5795 4925 5795 4898 5863 4850 c 5786 4791 5783 4760 5863 4715 c 5539 5324 m 5565 5327 5589 5328 5607 5348 c 5620 5363 5615 5388 5601 5403 c 5586 5421 5562 5419 5539 5418 c 5470 5406 5386 5372 5332 5324 c 5539 5324 l closepath 0 setgray fill % We firstly fix problems, % The hole in the tail red_colour 5091 5462 m 5083 5471 5073 5475 5062 5475 c 5050 5475 5040 5471 5032 5462 c 5023 5454 5019 5444 5019 5433 c 5019 5421 5023 5411 5032 5403 c 5040 5394 5050 5390 5062 5390 c 5073 5390 5083 5394 5091 5403 c 5100 5411 5104 5421 5104 5433 c 5104 5444 5100 5454 5091 5462 c closepath fill % Inside of right fore paw 4294 5212 m 4287 5200 4282 5191 4274 5180 c 4280 5173 4287 5171 4294 5164 c 4294 5182 4295 5195 4294 5212 c closepath fill % Rest of the right fore paw 4328 5261 m 4328 5212 4328 5176 4328 5127 c 4347 5110 4360 5098 4379 5080 c 4386 5074 4401 5084 4400 5094 c 4400 5120 4396 5138 4396 5164 c 4395 5179 4386 5190 4375 5200 c 4354 5219 4354 5250 4328 5261 c closepath fill % and now in the rest in gold gold_colour % crotch 5300 5162 m 5326 5166 5354 5166 5371 5145 c 5344 5139 5321 5146 5300 5162 c % Right hind leg closepath fill 5316 4855 m 5271 4863 5221 4835 5211 4791 c 5188 4803 5166 4806 5141 4798 c 5107 4787 5107 4741 5109 4704 c 5096 4692 5085 4679 5067 4680 c 5044 4682 5030 4709 5033 4731 c 5034 4740 5010 4743 5009 4734 c 5007 4723 4998 4712 4987 4713 c 4962 4716 4939 4737 4939 4762 c 4939 4784 4964 4797 4986 4797 c 4995 4797 5003 4816 4995 4821 c 4979 4831 4973 4859 4987 4872 c 5010 4893 5051 4883 5071 4860 c 5123 4892 5160 4917 5211 4950 c 5221 4956 5224 4970 5218 4979 c 5200 5007 5187 5027 5171 5056 c 5162 5072 5157 5096 5173 5104 c 5207 5121 5231 5135 5264 5152 c 5299 5125 5338 5112 5382 5120 c 5405 5088 5425 5067 5451 5037 c 5450 4993 5449 4961 5449 4916 c 5416 4926 5386 4940 5356 4924 c 5330 4910 5318 4884 5316 4855 c closepath fill % Chest 4631 5190 m 4627 5148 4616 5095 4575 5091 c 4535 5087 4514 5140 4511 5180 c 4491 5152 4467 5122 4481 5091 c 4494 5062 4515 5048 4537 5025 c 4580 5046 4612 5060 4653 5085 c 4673 5097 4681 5120 4680 5144 c 4679 5168 4651 5175 4631 5190 c closepath fill % Main Body 4306 4871 m 4291 4896 4249 4908 4229 4888 c 4212 4871 4212 4841 4227 4824 c 4224 4819 4220 4817 4217 4812 c 4195 4813 4169 4805 4166 4784 c 4163 4765 4171 4745 4188 4737 c 4207 4728 4229 4738 4243 4753 c 4249 4748 4255 4746 4261 4742 c 4255 4722 4259 4695 4278 4688 c 4297 4682 4319 4681 4332 4696 c 4346 4713 4336 4734 4330 4755 c 4328 4762 4327 4769 4332 4775 c 4358 4805 4401 4817 4438 4801 c 4464 4849 4526 4868 4577 4851 c 4579 4891 4612 4926 4652 4932 c 4687 4936 4722 4923 4740 4892 c 4781 4908 4812 4928 4835 4965 c 4843 4977 4841 4989 4839 5002 c 4835 5027 4826 5043 4815 5065 c 4810 5074 4836 5085 4841 5076 c 4856 5048 4864 5026 4873 4996 c 4939 4998 4995 5004 5047 5045 c 5138 5116 5212 5185 5328 5191 c 5357 5192 5384 5181 5399 5156 c 5462 5050 5572 5010 5694 4995 c 5703 4994 5707 4984 5707 4975 c 5707 4912 5707 4866 5707 4802 c 5697 4802 5689 4802 5678 4801 c 5677 4822 5674 4837 5672 4858 c 5669 4883 5613 4876 5605 4853 c 5597 4833 5615 4813 5633 4800 c 5631 4793 5628 4787 5626 4780 c 5610 4780 5592 4778 5587 4764 c 5581 4748 5584 4729 5598 4719 c 5613 4708 5630 4703 5649 4709 c 5668 4714 5679 4728 5690 4745 c 5698 4744 5703 4743 5711 4742 c 5718 4710 5767 4698 5797 4712 c 5769 4752 5770 4807 5801 4845 c 5773 4874 5770 4922 5794 4954 c 5772 4992 5773 5033 5791 5072 c 5745 5094 5709 5112 5675 5150 c 5643 5186 5635 5231 5647 5277 c 5688 5310 5718 5357 5707 5410 c 5691 5483 5604 5514 5529 5511 c 5385 5505 5298 5418 5159 5379 c 5109 5365 5062 5347 5019 5374 c 4997 5388 4981 5409 4982 5436 c 4983 5465 5003 5488 5030 5500 c 5052 5510 5077 5511 5097 5497 c 5118 5482 5125 5460 5127 5435 c 5128 5423 5147 5413 5157 5419 c 5175 5430 5187 5447 5185 5468 c 5182 5495 5172 5513 5161 5537 c 5187 5554 5199 5574 5217 5599 c 5222 5606 5204 5619 5198 5613 c 5175 5593 5153 5586 5128 5568 c 5122 5563 5107 5568 5107 5576 c 5110 5608 5110 5631 5109 5663 c 5072 5629 5045 5590 5050 5541 c 4992 5542 4922 5509 4919 5451 c 4916 5384 4969 5341 5021 5300 c 4954 5296 4904 5297 4836 5293 c 4833 5276 4821 5264 4806 5256 c 4798 5223 4777 5202 4749 5185 c 4742 5157 4725 5138 4701 5122 c 4694 5093 4682 5069 4657 5054 c 4531 4981 4435 4936 4306 4871 c 5207 5299 l 5319 5353 5395 5408 5515 5439 c 5555 5450 5594 5453 5625 5426 c 5643 5411 5654 5391 5650 5368 c 5645 5330 5611 5298 5573 5297 c 5207 5299 l closepath fill % Mane below Left Ear 4774 5350 m 4765 5338 4761 5328 4755 5315 c 4770 5303 4780 5293 4793 5279 c 4800 5284 4804 5289 4810 5295 c 4805 5296 4802 5296 4798 5296 c 4798 5307 4798 5315 4797 5325 c 4796 5338 4783 5342 4774 5350 c closepath fill % Mane below Right Ear 4378 5312 m 4368 5324 4365 5337 4362 5352 c 4344 5342 4322 5328 4326 5308 c 4328 5296 4333 5287 4342 5278 c 4354 5292 4362 5302 4378 5312 c closepath fill % Mane below left Eye 4690 5230 m 4683 5217 4674 5209 4661 5200 c 4677 5187 4687 5177 4700 5161 c 4713 5173 4735 5196 4720 5207 c 4709 5216 4701 5222 4690 5230 c closepath fill % Mane below right Eye 4483 5195 m 4466 5201 4452 5207 4443 5221 c 4420 5208 4398 5174 4416 5155 c 4425 5145 4432 5139 4442 5131 c 4454 5156 4465 5173 4483 5195 c closepath fill % Face 4426 5435 m 4418 5454 4400 5481 4417 5491 c 4440 5505 4461 5512 4487 5509 c 4496 5508 4505 5506 4510 5498 c 4521 5479 4526 5464 4536 5444 c 4545 5445 4552 5447 4561 5447 c 4556 5473 4519 5512 4545 5518 c 4571 5524 4606 5536 4619 5512 c 4632 5489 4639 5471 4645 5445 c 4655 5447 4662 5447 4673 5448 c 4669 5471 4658 5508 4681 5511 c 4701 5514 4721 5508 4733 5493 c 4744 5479 4724 5463 4711 5452 c 4717 5445 4722 5440 4729 5433 c 4752 5447 4788 5465 4803 5441 c 4818 5417 4783 5392 4758 5378 c 4754 5375 4750 5372 4747 5367 c 4739 5350 4733 5338 4724 5321 c 4721 5315 4723 5307 4729 5303 c 4747 5289 4758 5276 4777 5262 c 4769 5246 4759 5235 4743 5228 c 4725 5241 4711 5250 4693 5263 c 4693 5269 4694 5273 4694 5278 c 4685 5278 4679 5279 4670 5278 c 4671 5247 4642 5218 4610 5218 c 4597 5218 4585 5226 4581 5239 c 4575 5260 4600 5274 4620 5283 c 4632 5288 4643 5297 4643 5310 c 4643 5325 4644 5336 4643 5350 c 4643 5357 4648 5363 4654 5366 c 4668 5373 4678 5377 4692 5384 c 4690 5393 4689 5400 4687 5410 c 4665 5402 4650 5396 4629 5387 c 4622 5385 4616 5379 4616 5371 c 4615 5351 4611 5336 4612 5315 c 4613 5307 4605 5300 4597 5300 c 4575 5299 4560 5301 4539 5301 c 4529 5301 4524 5312 4523 5322 c 4521 5339 4520 5351 4519 5369 c 4518 5376 4516 5384 4509 5386 c 4486 5397 4470 5405 4446 5414 c 4443 5405 4440 5399 4437 5390 c 4458 5382 4472 5371 4492 5361 c 4494 5340 4494 5325 4496 5304 c 4498 5288 4516 5279 4533 5278 c 4545 5277 4551 5262 4551 5249 c 4551 5235 4541 5217 4526 5218 c 4509 5220 4496 5219 4478 5222 c 4456 5227 4461 5258 4459 5281 c 4450 5281 4443 5281 4434 5281 c 4435 5257 4423 5236 4402 5223 c 4388 5214 4371 5235 4366 5251 c 4360 5273 4387 5291 4409 5295 c 4410 5301 4411 5305 4412 5311 c 4394 5328 4388 5350 4388 5375 c 4361 5387 4321 5414 4338 5437 c 4355 5460 4391 5441 4414 5425 c 4418 5428 4421 5432 4426 5435 c closepath fill % Tongue 4564 5204 m 4556 5198 4549 5194 4540 5192 c 4543 5167 4546 5129 4571 5130 c 4597 5130 4596 5170 4595 5195 c 4583 5197 4574 5198 4564 5204 c closepath fill % Right Fore Paw 4458 5072 m 4429 5058 4408 5049 4379 5036 c 4324 5086 4286 5124 4232 5174 c 4255 5202 4277 5248 4249 5271 c 4228 5288 4201 5264 4179 5248 c 4158 5270 4127 5298 4103 5280 c 4075 5260 4096 5216 4115 5188 c 4094 5177 4077 5154 4084 5131 c 4093 5101 4137 5086 4166 5100 c 4186 5110 4208 5111 4227 5099 c 4248 5084 4250 5059 4253 5034 c 4304 5041 4346 4983 4351 4931 c 4408 4961 4450 4983 4506 5014 c 4487 5034 4471 5048 4458 5072 c closepath fill % Draw the stars (outline in black) 0 setgray 60 setlinewidth 3943 3714 m star stroke 6077 3714 m star stroke 5010 2943 m star stroke 5010 4379 m star stroke % and fill in gold gold_colour 3928 3725 m star fill 6062 3725 m star fill 4995 2958 m star fill 4995 4394 m star fill 0 setgray %%IncludeResource: font Times-Bold /Times-Bold findfont [ 342 0 0 250 0 0 ] makefont setfont newpath 2430 2395 m 2460 2278 2514 2220 2555 2180 c 2576 2140 2613 2090 2662 2053 c 2730 1993 2812 1925 2910 1893 c 2987 1870 3115 1851 3207 1855 c 3290 1860 3400 1860 3495 1870 c 3760 1890 3990 1834 4135 1732 c 4195 1690 4273 1615 4320 1565 c 4368 1513 4517 1435 4547 1390 c 4666 1320 4847 1250 5000 1250 c 5153 1250 5334 1320 5453 1390 c 5483 1435 5632 1513 5680 1565 c 5727 1615 5805 1690 5865 1732 c 6010 1834 6240 1890 6505 1870 c 6600 1860 6710 1860 6793 1855 c 6885 1851 7013 1870 7090 1893 c 7188 1925 7270 1993 7338 2053 c 7387 2090 7424 2140 7445 2180 c 7486 2220 7540 2278 7570 2395 c (SIDERE\264MENS\264EADEM\264MUTATO) 0 30 pathtext grestore showpage %%Trailer lout-3.39/doc/user/tbl_rows0000644000076400007640000000331611363700677014367 0ustar jeffjeff@Section @Title { Changing the appearance of rows } @Tag { tbl_rows } @Begin @PP We've seen that the @Code aformat option of @Code "@Tbl" determines the format of the rows introduced by the @Code "@Rowa" symbol. There are eight row format options: {@Code aformat}, tables. @RawIndex { tables } tables.row.formats @SubIndex { row formats } row.formats @Index { row formats in tables } {@Code bformat}, and so on up to {@Code hformat}, and for each there is a corresponding {@Code "@Row"} symbol: {@Code "@Rowa"}, {@Code "@Rowb"}, and so on: @ID @OneRow @Code @Verbatim { @Tbl aformat { @Cell @I A | @Cell @I B } bformat { @Cell A | @Cell B } { @Rowa A { Name } B { Nationality } @Rowb A { Austen } B { English } @Rowb A { Balzac } B { French } } } The result of this is @CD @OneRow @Tbl aformat { @Cell @I A | @Cell @I B } bformat { @Cell A | @Cell B } { @Rowa A { Name } B { Nationality } @Rowb A { Austen } B { English } @Rowb A { Balzac } B { French } } The first row, being a {@Code "@Rowa"}, is formatted using {@Code aformat}; the others, being {@Code "@Rowb"} symbols, are formatted using {@Code bformat}. @PP In addition to the eight @Code format options of {@Code "@Tbl"}, it is possible to specify the format of a row at the row itself, using the tables. @RawIndex { tables } tables.format.option @SubIndex { @Code "format" option } format.tables @Index { @Code "format" option (tables) } @Code "@Row" symbol like this: @ID @OneRow @Code @Verbatim { @Row format { @Cell @B A | @Cell paint { lightgrey } B } A { ... } B { ... } } All formats must contain the same number of cells, otherwise the table will not be rectangular. @End @Section lout-3.39/doc/user/johnson0000644000076400007640000000066311363700677014214 0ustar jeffjeff@SysInclude { fig } @SysInclude { diag } @SysInclude { eq } @SysInclude { tbl } @SysInclude { doc } @Doc @Text @Begin @QD @Tbl rule { yes } { @Row format { @StartVSpan @Cell A | @StartHSpan @Cell B | @HSpan } A { @SomeText } B { @SomeText } @Row format { @VSpan | @Cell B | @StartVSpan @Cell C } B { @SomeText } C { @SomeText } @Row format { @StartHSpan @Cell A | @HSpan | @VSpan } A { @SomeText } } @End @Text lout-3.39/doc/user/draft.eps0000644000076400007640000003011411363700677014416 0ustar jeffjeff%!PS-Adobe-3.0 %%Creator: Basser Lout Version 3.00 (July 1994) %%CreationDate: Fri Sep 9 10:46:13 1994 %%DocumentData: Binary %%DocumentNeededResources: (atend) %%DocumentSuppliedResources: (atend) %%Pages: (atend) %%BoundingBox: 0 0 595 842 %%EndComments %%BeginProlog %%BeginResource: procset LoutStartUp /m { 3 1 roll moveto show } bind def /s { exch currentpoint exch pop moveto show } bind def /k { exch neg 0 rmoveto show } bind def /in { 1440 mul } def /cm { 567 mul } def /pt { 20 mul } def /em { 120 mul } def /sp { louts mul } def /vs { loutv mul } def /ft { loutf mul } def /dg { } def /LoutGraphic { /louts exch def /loutv exch def /loutf exch def /ymark exch def /xmark exch def /ysize exch def /xsize exch def } def /LoutFont { findfont exch scalefont setfont } bind def /LoutRecode { { findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding exch def currentdict end definefont pop } stopped {} } bind def /BeginEPSF { /LoutEPSFState save def /dict_count countdictstack def /op_count count 1 sub def userdict begin /showpage { } def 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit [] 0 setdash newpath /languagelevel where { pop languagelevel 1 ne { false setstrokeadjust false setoverprint } if } if } bind def /EndEPSF { count op_count sub { pop } repeat countdictstack dict_count sub { end } repeat LoutEPSFState restore } bind def %%EndResource %%BeginResource encoding vec1 /vec1 [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi /fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource %%EndProlog %%BeginSetup %%IncludeResource: font Times-Roman /Times-Romanfnt86 vec1 /Times-Roman LoutRecode /fnt86 { /Times-Romanfnt86 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt88 vec1 /Times-Bold LoutRecode /fnt88 { /Times-Boldfnt88 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt87 vec1 /Times-Italic LoutRecode /fnt87 { /Times-Italicfnt87 LoutFont } def /LoutExtColour [ currentrgbcolor ] cvx def %%EndSetup %%Page: ? 1 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 16840 translate 0.0000 rotate gsave 3087 -14622 translate 17.7734 17.7734 scale gsave 0 0 translate 62.0000 rotate 240 fnt86 0.8 0.8 0.8 setrgbcolor 0 -54(DRAFT)m grestore grestore grestore gsave 0 16840 translate 0.0000 rotate 240 fnt88 LoutExtColour setrgbcolor 5143 -3022(A)m 5376(T)s 22(est)k 5852(Example)s 240 fnt87 5029 -3520(J)m 6(ef)k 4(fr)k 8(e)k 7(y)k 5713(H.)s 6006(Kingston)s 240 fnt86 3998 -4021(Basser)m 4695(Department)s 5883(of)s 6142(Computer)s 7159(Science)s 4446 -4309(The)m 4878(Uni)s 6(v)k 3(ersity)k 5938(of)s 6197(Sydne)s 3(y)k 6973(2006)s 5512 -4597(Australia)m 5053 -5050(9)m 5233(September)s 9(,)k 6366(1994)s 240 fnt88 3097 -5692(Abstract)m 240 fnt86 1897 -6123(This)m 2403(is)s 2643(the)s 3016(abstract.)s 3959(It')s 13(s)k 4344(v)s 3(ery)k 4847(short,)s 5466(as)s 1417 -6411(be\207ts)m 2036(a)s 2243(tin)s 3(y)k 2713(test)s 3145(document.)s 4310(Ho)s 6(we)k 6(v)k 3(er)k 5273(it)s 5506(is)s 1417 -6699(long)m 1892(enough)s 2647(to)s 2882(check)s 3489(that)s 3896(things)s 4530(are)s 4870(w)s 2(orking)k 1417 -6987(as)m 1676(e)s 3(xpected.)k 240 fnt88 1417 -7780(1.)m 1717(The)s 2176(\207rst)s 2647(section)s 240 fnt86 1897 -8211(This)m 2408(is)s 2653(the)s 3031(\207rst)s 3488(section.)s 4371(It)s 4602(too)s 4994(is)s 5239(v)s 3(ery)k 1417 -8499(short,)m 2045(just)s 2480(a)s 2676(test)s 3097(section,)s 3924(nothing)s 4746(more)s 5327([)s 5406(1)s 5526(])s 5605(.)s 1417 -8787(This)m 1912(is)s 2141(the)s 2503(\207rst)s 2944(section.)s 3811(It)s 4026(too)s 4402(is)s 4631(v)s 3(ery)k 5123(short,)s 1417 -9075(just)m 1885(a)s 2114(test)s 2568(section,)s 3428(nothing)s 4283(more.)s 4957(This)s 5505(is)s 1417 -9363(the)m 1794(\207rst)s 2250(section.)s 3132(It)s 3362(too)s 3753(is)s 3997(v)s 3(ery)k 4504(short,)s 5127(just)s 5557(a)s 1417 -9651(test)m 1841(section,)s 2671(nothing)s 3496(more.)s 4140(This)s 4658(is)s 4910(the)s 5295(\207rst)s 1417 -9939(section.)m 2255(It)s 2441(too)s 2788(is)s 2988(v)s 3(ery)k 3451(short,)s 4030(just)s 4416(a)s 4563(test)s 4935(section,)s 1417 -10227(nothing)m 2254(more.)s 153 fnt86 2805 -10121(i)m 240 fnt86 2952 -10227(This)m 3482(is)s 3746(the)s 4143(\207rst)s 4619(section.)s 5521(It)s 1417 -10515(too)m 1794(is)s 2024(v)s 3(ery)k 2517(short,)s 3126(just)s 3542(a)s 3719(test)s 4121(section,)s 4929(nothing)s 1417 -10803(more.)m 2037(This)s 2531(is)s 2759(the)s 3120(\207rst)s 3560(section.)s 4426(It)s 4640(too)s 5015(is)s 5243(v)s 3(ery)k 1417 -11091(short,)m 2024(just)s 2438(a)s 2613(test)s 3013(section,)s 3819(nothing)s 4620(more.)s 5240(This)s 1417 -11379(is)m 1655(the)s 2026(\207rst)s 2476(section.)s 3352(It)s 3576(too)s 3961(is)s 4199(v)s 3(ery)k 4700(short,)s 5317(just)s 1417 -11667(a)m 1591(test)s 1990(section,)s 2795(nothing)s 3595(more.)s 4214(This)s 4707(is)s 4934(the)s 5294(\207rst)s 1417 -11955(section.)m 2255(It)s 2441(too)s 2788(is)s 2988(v)s 3(ery)k 3451(short,)s 4030(just)s 4416(a)s 4563(test)s 4935(section,)s 1417 -12243(nothing)m 2260(more.)s 2922(This)s 3458(is)s 3728(the)s 4131(\207rst)s 4613(section.)s 5521(It)s 1417 -12531(too)m 1794(is)s 2024(v)s 3(ery)k 2517(short,)s 3126(just)s 3542(a)s 3719(test)s 4121(section,)s 4929(nothing)s 1417 -12819(more.)m 2037(This)s 2531(is)s 2759(the)s 3120(\207rst)s 3560(section.)s 4426(It)s 4640(too)s 5015(is)s 5243(v)s 3(ery)k 1417 -13107(short,)m 2024(just)s 2438(a)s 2613(test)s 3013(section,)s 3819(nothing)s 4620(more.)s 5240(This)s 1417 -13395(is)m 1655(the)s 2026(\207rst)s 2476(section.)s 3352(It)s 3576(too)s 3961(is)s 4199(v)s 3(ery)k 4700(short,)s 5317(just)s 1417 -13683(a)m 1591(test)s 1990(section,)s 2795(nothing)s 3595(more.)s 4214(This)s 4707(is)s 4934(the)s 5294(\207rst)s 1417 -13971(section.)m 2255(It)s 2441(too)s 2788(is)s 2988(v)s 3(ery)k 3451(short,)s 4030(just)s 4416(a)s 4563(test)s 4935(section,)s 1417 -14259(nothing)m 2260(more.)s 2922(This)s 3458(is)s 3728(the)s 4131(\207rst)s 4613(section.)s 5521(It)s 1417 -14547(too)m 1794(is)s 2024(v)s 3(ery)k 2517(short,)s 3126(just)s 3542(a)s 3719(test)s 4121(section,)s 4929(nothing)s 1417 -14835(more.)m 2037(This)s 2531(is)s 2759(the)s 3120(\207rst)s 3560(section.)s 4426(It)s 4640(too)s 5015(is)s 5243(v)s 3(ery)k 1417 -15123(short,)m 2024(just)s 2438(a)s 2613(test)s 3013(section,)s 3819(nothing)s 4620(more.)s 5240(This)s 6233 -5690(is)m 6471(the)s 6842(\207rst)s 7292(section.)s 8168(It)s 8392(too)s 8777(is)s 9015(v)s 3(ery)k 9516(short,)s 10133(just)s 6233 -5978(a)m 6407(test)s 6806(section,)s 7611(nothing)s 8411(more.)s 9030(This)s 9523(is)s 9750(the)s 10110(\207rst)s 6233 -6266(section.)m 7071(It)s 7257(too)s 7604(is)s 7804(v)s 3(ery)k 8267(short,)s 8846(just)s 9232(a)s 9379(test)s 9751(section,)s 6233 -6554(nothing)m 7076(more.)s 7738(This)s 8274(is)s 8544(the)s 8947(\207rst)s 9429(section.)s 10337(It)s 6233 -6842(too)m 6610(is)s 6840(v)s 3(ery)k 7333(short,)s 7942(just)s 8358(a)s 8535(test)s 8937(section,)s 9745(nothing)s 6233 -7130(more.)m 6853(This)s 7347(is)s 7575(the)s 7936(\207rst)s 8376(section.)s 9242(It)s 9456(too)s 9831(is)s 10059(v)s 3(ery)k 6233 -7418(short,)m 6829(just)s 7232(a)s 7396(test)s 7785(section,)s 8580(nothing)s 9370(more.)s 153 fnt86 9921 -7312(ii)m 240 fnt86 10063 -7418(This)m 6233 -7706(is)m 6471(the)s 6842(\207rst)s 7292(section.)s 8168(It)s 8392(too)s 8777(is)s 9015(v)s 3(ery)k 9516(short,)s 10133(just)s 6233 -7994(a)m 6407(test)s 6806(section,)s 7611(nothing)s 8411(more.)s 9030(This)s 9523(is)s 9750(the)s 10110(\207rst)s 6233 -8282(section.)m 7071(It)s 7257(too)s 7604(is)s 7804(v)s 3(ery)k 8267(short,)s 8846(just)s 9232(a)s 9379(test)s 9751(section,)s 6233 -8570(nothing)m 7066(more.)s 153 fnt86 7617 -8464(a)m 240 fnt86 7785 -8570(This)m 8311(is)s 8571(the)s 8964(\207rst)s 9436(section.)s 10334(It)s 6233 -8858(too)m 6610(is)s 6840(v)s 3(ery)k 7333(short,)s 7942(just)s 8358(a)s 8535(test)s 8937(section,)s 9745(nothing)s 6233 -9146(more.)m 6853(This)s 7347(is)s 7575(the)s 7936(\207rst)s 8376(section.)s 9242(It)s 9456(too)s 9831(is)s 10059(v)s 3(ery)k 6233 -9434(short,)m 6840(just)s 7254(a)s 7429(test)s 7829(section,)s 8635(nothing)s 9436(more.)s 10056(This)s 6233 -9722(is)m 6471(the)s 6842(\207rst)s 7292(section.)s 8168(It)s 8392(too)s 8777(is)s 9015(v)s 3(ery)k 9516(short,)s 10133(just)s 6233 -10010(a)m 6407(test)s 6806(section,)s 7611(nothing)s 8411(more.)s 9030(This)s 9523(is)s 9750(the)s 10110(\207rst)s 6233 -10298(section.)m 7071(It)s 7257(too)s 7604(is)s 7804(v)s 3(ery)k 8267(short,)s 8846(just)s 9232(a)s 9379(test)s 9751(section,)s 6233 -10586(nothing)m 7076(more.)s 7738(This)s 8274(is)s 8544(the)s 8947(\207rst)s 9429(section.)s 10337(It)s 6233 -10874(too)m 6610(is)s 6840(v)s 3(ery)k 7333(short,)s 7942(just)s 8358(a)s 8535(test)s 8937(section,)s 9745(nothing)s 6233 -11162(more.)m 240 fnt88 6233 -11761(1.1)m 6533(.)s 6713(The)s 7172(\207rst)s 7643(subsection)s 240 fnt86 6713 -12192(This)m 7244(is)s 7509(the)s 7907(\207rst)s 8384(subsection,)s 9560(and)s 10012(what)s 6233 -12480(is)m 6518(more)s 7135(it)s 7393(has)s 7838(sub-subsections)s 9479(which)s 10190(are)s 6233 -12768(starting)m 7009(no)s 6(w)k 15(.)k 240 fnt87 6233 -13415(The)m 6652(\207r)s 2(st)k 7082(sub-subsection)s 240 fnt86 6713 -13893(This)m 7222(is)s 7465(the)s 7841(\207rst)s 8296(sub-subsection.)s 9922(There)s 6233 -14181(will)m 6664(be)s 6950(a)s 7116(second)s 7841(one)s 8247(in)s 8493(a)s 8659(minute.)s gsave 6233 -14668 translate 240 fnt86 LoutExtColour setrgbcolor 1134 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore 122 fnt86 LoutExtColour setrgbcolor 6233 -14836(a)m 192 fnt86 6287 -14921(This)m 6687(is)s 6874(the)s 7168(\207rst)s 7524(footnote,)s 8270(anchored)s 9032(to)s 4(w)k 1(ards)k 9692(the)s 9986(end)s 10323(of)s 6233 -15151(the)m 6530(\207rst)s 6889(section.)s 7590(It)s 7769(should)s 8343(appear)s 8916(at)s 9117(the)s 9414(bottom)s 10020(of)s 10242(the)s 6233 -15381(page.)m 6739(Let')s 10(s)k 7169(hope)s 7590(it)s 7744(comes)s 8281(out)s 8574(right.)s grestore pgsave restore showpage %%Trailer %%DocumentNeededResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%DocumentSuppliedResources: procset LoutStartUp %%+ encoding vec1 %%Pages: 1 %%EOF lout-3.39/doc/user/vstr0000755000076400007640000000017411363700677013534 0ustar jeffjeffvi str str_disp str_list str_foot str_marg str_theo str_figs str_larg \ str_cros str_cont str_indx str_colu str_defs lout-3.39/doc/user/fmt1.awk0000644000076400007640000000104111363700677014155 0ustar jeffjeffBEGIN { print "@Tbl" print " mv { 0.5vx }" print " aformat { @Cell ml { 0i } indent { right } @Code A | @Cell B | @Cell |" print " @Cell indent { right } @Code C | @Cell D | @Cell |" print " @Cell indent { right } @Code E | @Cell mr { 0i } F }" print "{" } NR % 3 == 1 { printf "@Rowa\n A { \"%s\" } B { @Math { %s } }\n", $1, $1 } NR % 3 == 2 { printf " C { \"%s\" } D { @Math { %s } }\n", $1, $1 } NR % 3 == 0 { printf " E { \"%s\" } F { @Math { %s } }\n", $1, $1 } END { print "}" } lout-3.39/doc/user/str_colu0000644000076400007640000000321011363700677014357 0ustar jeffjeff@Section @Title { Multiple columns } @Tag { columns } @Begin @PP You can change the number of columns of text per page, and the width of columns. @Index columns multiple.columns @Index { multiple columns } the gap between the columns, by changing these two setup file options: columnnumber. @Index @Code "@ColumnNumber" columngap. @Index @Code "@ColumnGap" @ID @OneRow @Code { "@ColumnNumber { 1 }" "@ColumnGap { 1.00c }" } If you are using your own setup file (Section {@NumberOf setup}), you can find and change them there. If not, @Code "@ColumnNumber" may be changed at the beginning of your document (Section {@NumberOf ordinary}). @PP @Code "@ColumnNumber" may be any number between 1 and 10, with default value 1 as shown, and @Code "@ColumnGap" may be any length (Section {@NumberOf objects}). The column width is derived from these options column.width @RawIndex { column width } column.width.in.pages @SubIndex { in pages } using the obvious formula @ID @Math { columnwidth = { pagewidth - margins - ({@Code "@ColumnNumber"} - 1) times {@Code "@ColumnGap"} } over @Code "@ColumnNumber" } You must ensure that this comes to something reasonable. @PP These two options do not apply to pages containing an index. For them there are similar setup file options called @Code "@IndexColumnNumber" and @Code "@IndexColumnGap" (Section {@NumberOf indexes}). @PP Most document types permit you to have multiple columns, but certain things will be kept full width regardless of the @Code "@ColumnNumber" option: figures and tables, chapter headings, and so on. The details vary with the document type, so are deferred to Chapter {@NumberOf types}. @End @Section lout-3.39/doc/user/mydefs0000644000076400007640000001601311363700677014021 0ustar jeffjeff ################################################### # # # Lout keywords and @Code symbol. # # # ################################################### def @Code right x { { Helvetica Base -1p } @Font lines @Break x } def @@BackEnd { @Code "@BackEnd" } def @@Begin { @Code "@Begin" } def @@Break { @Code "@Break" } def @@Case { @Code "@Case" } def @@Database { @Code "@Database" } def @@End { @Code "@End" } def @@Font { @Code "@Font" } def @@Char { @Code "@Char" } def @@Galley { @Code "@Galley" } def @@Graphic { @Code "@Graphic" } def @@HAdjust { @Code "@HAdjust" } def @@HContract { @Code "@HContract" } def @@HCover { @Code "@HCover" } def @@HExpand { @Code "@HExpand" } def @@HScale { @Code "@HScale" } def @@High { @Code "@High" } def @@HShift { @Code "@HShift" } def @@Include { @Code "@Include" } def @@Insert { @Code "@Insert " } def @@IncludeGraphic { @Code "@IncludeGraphic" } def @@Key { @Code "@Key" } def @@LClos { @Code "@LClos" } def @@LEnv { @Code "@LEnv" } def @@LInput { @Code "@LInput" } def @@LVis { @Code "@LVis" } def @@Moment { @Code "@Moment" } def @@Next { @Code "@Next" } def @@Null { @Code "@Null" } def @@OneCol { @Code "@OneCol" } def @@OneRow { @Code "@OneRow" } def @@Open { @Code "@Open" } def @@Outline { @Code "@Outline" } def @@PAdjust { @Code "@PAdjust" } def @@PrependGraphic { @Code "@PrependGraphic" } def @@Rotate { @Code "@Rotate" } def @@Scale { @Code "@Scale" } def @@SetColor { @Code "@SetColor" } def @@SetColour { @Code "@SetColour" } def @@Language { @Code "@Language" } def @@CurrLang { @Code "@CurrLang" } def @@Space { @Code "@Space" } def @@SysDatabase { @Code "@SysDatabase" } def @@SysInclude { @Code "@SysInclude" } def @@SysIncludeGraphic { @Code "@SysIncludeGraphic" } def @@SysPrependGraphic { @Code "@SysPrependGraphic" } def @@Tag { @Code "@Tag" } def @@Tagged { @Code "@Tagged" } def @@Use { @Code "@Use" } def @@VAdjust { @Code "@VAdjust" } def @@VContract { @Code "@VContract" } def @@VCover { @Code "@VCover" } def @@VExpand { @Code "@VExpand" } def @@VScale { @Code "@VScale" } def @@VShift { @Code "@VShift" } def @@Wide { @Code "@Wide" } def @@Yield { @Code "@Yield" } ################################################### # # # Miscellaneous symbols used in the guide. # # # ################################################### def @TeX { @OneCol { T &0.4fo {-0.2f @VShift E} &0.45fo X } } def @LaTeX { @OneCol { L &0.3fo { +0.1f @VShift 0.8f @Font A } &0.4fo @TeX } } import @BasicSetup def @Batlow { Batlow Food Distributors Pty. Ltd. } import @BasicSetup def @GreyBox right x { @Box paint { lightgrey } x } import @BasicSetup def @HeadingBox left x right y { @Box { @CentredDisplay @Heading x y } } def @FilledBox { @BackEnd @Case { PostScript @Yield { { "0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto" "closepath fill" } @Graphic { 0.6f @High ^/ 0.4f @High 4f @Wide } } PDF @Yield { { "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h f" } @Graphic { 0.6f @High ^/ 0.4f @High 4f @Wide } } } } import @Math def epi { p sub i ` log sub 2 ` p sub i } import @Math def ep right x { p sub x ` log sub 2 ` p sub x } # def @Dbl left x right y # { 1.95i @Wide # { 1.25i @Wide { |1rt @Code x } |0.2i @Eq {non y} } # } def @LCodeWidth { 3.5c } def @CodeWidth { 4.0c } def @ResultWidth { 1.6c } import @Math def @ExA { 1 over sqrt { 1 - 4 x sup 2 } } def @@Diag { @Code "@Diag" } extend @DiagSetup @Diag macro @MyNode { @Node outline { LR:: { xsize 0 } LR:< 0d UL:: { 0 ysize } UL:< 270d 0 0 LR UL 0 0 } } extend @DiagSetup @Diag macro @MyLink { @Link path { FROM:: from TO:: to FROM TO } } def @ShowHMark right x { { "-0.3 cm ymark moveto xsize 0.3 cm add ymark lineto" "[ 0.1 cm ] 0 setdash stroke" } @Graphic x } def @ZeroWidth right x { @OneCol { |0io x |0io } } def @SomeText { Johnson suddenly uttered, in a strong determined tone, an apophegm, at which many will start: `Patriotism is the last refuge of a scoundrel.' } import @DiagSetup def @OpenCircle { @Diag { @Circle margin { 0.2f } } } import @DiagSetup def @ClosedCircle { @Diag { @Circle paint { black } margin { 0.2f } } } import @TblSetup @BasicSetup def @AmberLight { @OneRow @Tbl aformat { @Cell indentvertical { align } A } marginhorizontal { 0i } marginvertical { 0i } strut { no } rule { no } paint { no } { @Rowa A { @OpenCircle } @MarkRowa A { @ClosedCircle } @Rowa A { @OpenCircle } } } import @DiagSetup @Diag def @Four named code { } right x { 3.8c @Wide @Code code ||0.3c 2.7c @Wide @StartRight x ||0.3c 2.7c @Wide @StartUp x ||0.3c 2.7c @Wide @StartLeft x ||0.3c 2.2c @Wide @StartDown x } import @BasicSetup def @TextureSample right x { @Box margin { 0i } x @Texture @Box margin { 2.0f } paint { black } {} } import @BasicSetup def @XRGBTest right col { def @Thing { @HContract @VContract { 0.9c @Wide 0.5f @High ^/ 0.5f @High } } @HContract { @Box paint { @Xrgb col } margin { 0i } @Thing &0.2c 2.8c @Wide downifneeded @Scale @Code col } } def @XRGBNoTest { @HContract { 0.9c @Wide &0.2c 2.8c @Wide {} } } lout-3.39/doc/user/dia_cons0000644000076400007640000000020211363700677014302 0ustar jeffjeff@Section @Tag { dia_cons } @Title { Consistency within and between diagrams } @Begin @PP @I { still to do } @End @Section lout-3.39/doc/user/pie_capt0000644000076400007640000001034511363700677014320 0ustar jeffjeff@Section @Title { Captions } @Tag { pie_capt } @Begin @PP There are options for placing captions left, right, above, and below captions. @RawIndex { captions } captions.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.captions @SubIndex { captions } leftcaption. @RawIndex { @Code "leftcaption" option } leftcaption.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.leftcaption @SubIndex { @Code "leftcaption" option } rightcaption. @RawIndex { @Code "rightcaption" option } rightcaption.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.rightcaption @SubIndex { @Code "rightcaption" option } abovecaption. @RawIndex { @Code "abovecaption" option } abovecaption.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.abovecaption @SubIndex { @Code "abovecaption" option } belowcaption. @RawIndex { @Code "belowcaption" option } belowcaption.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.belowcaption @SubIndex { @Code "belowcaption" option } the pie graph, following the pattern of the captions in {@Code "@Graph"}: @ID @OneRow @Code @Verbatim { @Pie leftcaption { At left } rightcaption { At right } abovecaption { This appears above } belowcaption { This appears below } } produces @CD @Pie leftcaption { At left } rightcaption { At right } abovecaption { This appears above } belowcaption { This appears below } { @Slice weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } The captions may be arbitrary Lout objects, so may include equations, {@Code "@Rotate"}, and so on. Each caption except @Code rightcaption is printed in the @Code "clines @Break" style, which means that multiple lines in one caption will be centred beneath each other. The @Code rightcaption option uses the @Code "lines @Break" style, in which the lines are left justified beneath each other. @PP There are options for controlling the amount of space between each caption and the pie graph. Here they are with their default values: leftgap. @RawIndex { @Code "leftgap" option } leftgap.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.leftgap @SubIndex { @Code "leftgap" option } rightgap. @RawIndex { @Code "rightgap" option } rightgap.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.rightgap @SubIndex { @Code "rightgap" option } abovegap. @RawIndex { @Code "abovegap" option } abovegap.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.abovegap @SubIndex { @Code "abovegap" option } belowgap. @RawIndex { @Code "belowgap" option } belowgap.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.belowgap @SubIndex { @Code "belowgap" option } @ID @OneRow @Code @Verbatim { @Pie leftgap { 0.5c } rightgap { 0.5c } abovegap { 0.5c } belowgap { 0.5c } } These gaps are inserted only if the corresponding caption is non-empty. Lout knows exactly where captions are, and leaves space for them and their gaps, so it would be wrong to attempt to use the {@Code leftextra}, {@Code rightextra}, {@Code aboveextra}, and {@Code belowextra} options from Section {@NumberOf pie_over} to allow for the space occupied by captions. @PP When a pie graph is to be presented as a centred display, it is usually best if the centring is done with respect to the pie alone, not the captions and labels. The @Code "hidecaptions" option does this by hidecaptions. @RawIndex { @Code "hidecaptions" option } hidecaptions.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.hidecaptions @SubIndex { @Code "hidecaptions" option } making the left and right captions and gaps seem to Lout to have zero width: @ID @OneRow @Code @Verbatim { @Pie hidecaptions { yes } } Actually @Code "yes" has been made the default value, since the vast majority of pie graphs are centred displays. In the rare cases where this feature is not wanted (for example, if a pie graph appears as an entry in a table), use {@Code "hidecaptions { no }"}. @End @Section lout-3.39/doc/user/pie_intr0000644000076400007640000000454111363700677014346 0ustar jeffjeff@Section @Title { Introduction } @Tag { pie_intr } @Begin @PP The Lout definitions for pie graph formatting are kept in a file called {@Code "pie"}, which you must include at the start of your document if pie.file @Index { @Code "pie" setup file } you want pie graphs, like this: @ID -1px @Break @OneRow @Code { "@SysInclude { pie }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } Setup files for specialized packages, such as {@Code "pie"}, should be included before the main setup file. Once this is done, the @Code "@Pie" symbol used below will then be available for use anywhere within your document. As usual in Lout, the @Code "@Pie" symbol produces an object which may appear anywhere at all -- in a centred display, for example, or in a figure, or as an entry in a table. @PP A pie graph is made by a @Code "@Pie" symbol enclosing a sequence of @Code "@Slice" symbols. These @Code "@Slice" symbols and their options are the only things that may appear inside the @Code "@Pie" symbol. @PP Every option of @Code "@Slice" is also an option of {@Code "@Pie"}. Giving a value to such an option at @Code "@Pie" will make that the default value for very {@Code "@Slice"}. For example, you can write @ID -1px @Break @OneRow @Code @Verbatim { @Pie weight { 20 } { ... } } to give every slice a weight (angular extent) of 20. If all but a few slices have the same weight, you can still do this, just giving a @Code weight option to the exceptional slices. @PP Furthermore, every option of @Code "@Pie" appears in the setup file, and giving a value to an option there makes that value the default value for every @Code "@Pie" in your document. For example, if you want every slice of every pie to be light red, you can set the @Code paint option in the setup file to {@Code lightred}, and all your slices will be painted this colour unless you override the setup file value by giving @Code paint options to some pies or slices. @PP See Section @NumberOf setup to find out how to make your own copy of the setup file, perhaps calling it {@Code mypie}, and change some options within it. Your document would then typically start like this: @ID -1px @Break @OneRow @Code { "@Include { mypie }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } and by changing options within file @Code "mypie" you can affect every pie graph in your document. @End @Section lout-3.39/doc/user/equ_tequ0000644000076400007640000000400111363700677014354 0ustar jeffjeff@Section @Title { An alternative version that uses @TeX's fonts } @Tag { teq } @Begin @PP There is an alternative version of the @Code "@Eq" symbol that tex. @RawIndex { @TeX } tex.mathfonts @SubIndex { mathematical fonts } uses fonts taken from the @TeX document formatting system. These fonts are said to produce better-looking mathematics than the Adobe Systems Symbol font used by the standard @Code "@Eq" symbol. @PP The fonts were converted from @TeX form to PostScript form by Basil K. Malyshev, who has attached a license to them permitting malyshev @Index { Malyshev, Basil K. } non-commercial use only. This is a much more stringent license than the one attached to Lout itself. For this reason, the files needed to use these @TeX fonts are distributed separately from the rest of Lout, although you can get them from the same place (see the preface of this guide). @PP Once these files are installed, you change from the standard @Code "@Eq" symbol to the @TeX version by changing the initial @Code "@SysInclude { eq }" to {@Code "@SysInclude { teq }"}. Do absolutely nothing else. @PP Unfortunately, the @TeX fonts are not usually resident on PostScript printing devices, which means that Lout is obliged to include them in its PostScript output file. You don't have to do anything to make this happen, but the cost is fairly large: changing to @Code "@SysInclude { teq }" increases the size of the PostScript output file by 252 kilobytes. @PP It is possible to gain access to characters in the @TeX fonts that are not accessible directly from {@Code "@Eq"}, mainly script capitals and bold-italic Greek letters. For example, you can use @Code "{cmsy Base} @Font @Char \"A\"" to get a script A, and @Code "{cmmi Bold} @Font @Char \"pi\"" to get a bold-italic {@Sym pi}. For the full story, consult file @Code "teq" in the Lout system include directory for the names of these fonts, and then look in Lout's font directory for their font metrics files, which show the names and encodings of all the characters. @End @Section lout-3.39/doc/user/dia_tags0000644000076400007640000001220411363700677014303 0ustar jeffjeff@Section @Tag { dia_tags } @Title { Tags } @Begin @PP In addition to drawing the outline, each of the standard node types also attaches names, called {@I tags}, to certain points. For diagrams. @RawIndex { diagrams } diagrams.tags @SubIndex { tags ({@Code "::"}) } tags.diagrams @Index { tags ({@Code "::"}) in diagrams } example, the @Code "@Ellipse" symbol creates nine tags: @ID { @Code { "@Ellipse" } ||7ct @Diag { //1.0f @ShowTags @Ellipse vsize { 1.5c } hsize { 3.0c } } } The standard link symbols also create tags: @ID { @Code { "@Link" } ||7ct @Diag { 2.5c @High 2c @Wide // @ShowTags @Arrow from { 0,0.8 } to { 1,0 } } } The names and positions of all standard tags may be found in the summary (Section {@NumberOf dia_summ}) at the end of this chapter. Each tag stands for a point, and may be used wherever a point is required: @ID { @Code @Verbatim { @Ellipse { Hello, world } // @Link from { SW } to { SE } } ||7ct @Diag { @Ellipse { Hello, world } // @Link from { SW } to { SE } } } A tag may only be used later in the text of the diagram than the place where it is defined. @PP Standard tags like @Code N and @Code S are not much use as they are, since in general there will be many nodes and hence many @Code N and @Code S tags. The retagging symbol, {@Code "::"}, solves this problem: @ID { @Code { "A:: @Ellipse" } ||7ct @Diag { //1.5f @ShowTags { A:: @Ellipse vsize { 1.5c } hsize { 3.0c } } } } Within the following object, the points have their original tags, but afterwards the names are changed by prefixing the word preceding {@Code "::"}, plus a @Code "@" character, to each one. These longer tags may be used exactly like the others: @ID { @Code @Verbatim { A:: @Ellipse { Hello, world } // @Link from { A@SW } to { A@SE } } ||7ct @Diag { A:: @Ellipse { Hello, world } // @Link from { A@SW } to { A@SE } } } The retagging symbol may be applied to links, and indeed to arbitrary objects; it will retag every tag within the following object, even tags that have already been retagged: @ID { @Code @Verbatim { A:: { 1:: @Ellipse vsize { 1.0c } hsize { 2.5c } @DP @DP 2:: @Ellipse vsize { 1.0c } hsize { 2.5c } } } ||7ct @Diag { //1.0f @ShowTags { A:: { 1:: @Ellipse vsize { 1.0c } hsize { 2.5c } @DP @DP 2:: @Ellipse vsize { 1.0c } hsize { 2.5c } } } } } In practice one usually only retags individual nodes. It is best to use only upper-case letters in tags, because Lout and PostScript have tags of their own containing lower-case letters, and any mixup causes total disaster. Although the above example uses digits, these can cause problems since a tag like {@Code "A@1@S"} will be interpreted by Lout as @Code "A@1" followed by the @Code "@S" small capitals symbol. (This problem can itself be avoided by enclosing the entire tag in quotes, as in {@Code "\"A@1@S\""}; this works because tags are just words to Lout, although they are symbols to PostScript. But better to avoid the whole problem by not using digits.) @PP When a tag lies within the object following some node, it is automatically retagged in this way with tag {@Code IN}. For example, in @ID @Code @Verbatim { @Square @Circle Hello } the circle lies within the square, and what you get in effect is @ID @Code @Verbatim { @Square IN:: @Circle Hello } This prevents confusion between the tags of the inner and outer nodes. This retagging cannot be left to the user's discretion, owing to unexpected effects on the positioning of labels of the outer node if inner tags are not retagged. @PP Although @Code from and @Code to are just two of several options within @Code "@Diag" where a point is expected, and hence where a tag may be given, they have a special virtue not shared by any other options. It is possible to give the name of an entire node, not just a tag denoting one point, to them: @ID { @Code @Verbatim { A:: @Circle @DP B:: @Ellipse { Hello, world } // @Link from { A } to { B } } ||7ct @Diag { A:: @Circle @DP B:: @Ellipse { Hello, world } // @Link from { A } to { B } } } This will select a point on the outline of the named node, appropriate to the type of link being drawn. It is extremely useful, of course, but potentially confusing: @Code A and @Code B do not denote points and are not tags, strictly speaking, at all. @PP The @Code "::" symbol has a @Code restrict option which can be diagrams. @RawIndex { diagrams } diagrams.restrict @SubIndex { @Code "restrict" option } restrict.diagrams @Index { @Code "restrict" option (diagrams) } used to save printer memory in deeply nested structures (such as the syntax diagrams of Section {@NumberOf dia_synt}) by restricting the tags promoted by @Code "::" to a limited set and discarding the rest: @ID { @Code { "A:: restrict { (E) (W) } @Ellipse" } ||7ct @Diag { @ShowTags { A:: restrict { (E) (W) } @Ellipse vsize { 1.5c } hsize { 3.0c } } } } The tags to be preserved appear within the @Code restrict option, each enclosed in parentheses. Care is needed with this option: all of the listed tags must actually exist in the following object. If not, the result will be a PostScript error mentioning the @Code get command. @End @Section lout-3.39/doc/user/bas_char0000644000076400007640000004654311363700677014307 0ustar jeffjeff@Section @Title { Characters } @Tag { characters } @Begin @PP The usual way to get characters into a document is simply to type them as characters. @Index characters we have been doing all along. However, for some characters this is not possible, either because they have some special meaning, as @Code "{" and @Code "}" do, or because the keyboard has no button for them. This section explains how to get every possible character: every printable character in the ISO-LATIN-1 character set, every character in the Adobe Systems Symbol font, plus the characters {@Char quotesinglbase}, {@Char quotedblbase}, {@Char ellipsis}, {@Char OE}, {@Char oe}, {@Char quotedblleft}, {@Char quotedblright}, {@Char fi}, {@Char fl}, {@Char endash}, {@Char emdash}, {@Char bullet}, {@Char dagger}, {@Char daggerdbl}, {@Char florin}, {@Char fraction}, and @Euro. If it exists at all, you will find it here. ISO-LATIN-2 and Russian characters are available separately. In principle, there is no limit to the characters available, but to go beyond those given in this section requires expertise in defining encoding vectors and fonts @Cite { $kingston1995lout.expert}. @PP First up we have the characters that you get simply by typing them. The characters themselves are shown at the left, and what you type to get them at the right: @ID @OneRow @Tab vmargin { 0.5vx } @Fmta { @Col @CC A ! @Col @Code A ! @Col ! @Col @CC B ! @Col @Code B ! @Col ! @Col @CC C ! @Col @Code C ! @Col ! @Col @CC D ! @Col @Code D ! @Col ! @Col @CC E ! @Col @Code E ! @Col ! @Col @CC F ! @Col @Code F } { @Rowa A { ! } B { $ } C { % } D { ' } E { ( } F { ) } @Rowa A { * } B { + } C { , } D { - } E { 0 } F { 1 } @Rowa A { 2 } B { 3 } C { 4 } D { 5 } E { 6 } F { 7 } @Rowa A { 8 } B { 9 } C { : } D { ; } E { < } F { = } @Rowa A { > } B { ? } C { A } D { B } E { C } F { D } @Rowa A { E } B { F } C { G } D { H } E { I } F { J } @Rowa A { K } B { L } C { M } D { N } E { O } F { P } @Rowa A { Q } B { R } C { S } D { T } E { U } F { V } @Rowa A { W } B { X } C { Y } D { Z } E { [ } F { ] } @Rowa A { _ } B { ` } C { a } D { b } E { c } F { d } @Rowa A { e } B { f } C { g } D { h } E { i } F { j } @Rowa A { k } B { l } C { m } D { n } E { o } F { p } @Rowa A { q } B { r } C { s } D { t } E { u } F { v } @Rowa A { w } B { x } C { y } D { z } E { } F { } } Next come characters that have buttons but have a special meaning if they are typed directly, and consequently have to be enclosed in double quotes to turn off this meaning: quote.chars @Index { quote characters } @ID @OneRow @Tab @Fmta { @Col @CC A ! @Col @Code B ! @Col ! @Col @CC C ! @Col @Code D ! @Col ! @Col @CC E ! @Col @Code F ! @Col ! @Col @CC G ! @Col @Code H ! @Col I } { @Rowa A { "\"" } B { "\"\\\"\"" } C { "#" } D { "\"#\"" } E { "&" } F { "\"&\"" } G { "/" } H { "\"/\"" } @Rowa A { "@" } B { "\"@\"" } C { "\\" } D { "\"\\\\\"" } E { "^" } F { "\"^\"" } G { "{" } H { "\"{\"" } @Rowa A { "|" } B { "\"|\"" } C { "}" } D { "\"}\"" } E { "~" } F { "\"~\"" } G { } H { "\" \"" } I { (space character) } } If you think you want {@Code "\""}, you probably really want `` and '', for which see below. You can place whole sequences of characters, special or not, inside one pair of double quotes: @ID @OneRow @Tab @Fmta { @Col A ! @Col ! @Col @Code B } { @Rowa A { "jeff/includes/su_crest.eps" } B { "\"jeff/includes/su_crest.eps\"" } @Rowa A { "\"@PP\"" } B { "\"\\\"@PP\\\"\"" } } The following characters have been deemed important enough to deserve their own symbols: @ID @OneRow @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col @Code B ! @Col ! @Col C ! @Col @Code D ! @Col ! @Col E ! @Col @Code F } { @Rowa A { `` } B { "``" } C { ,, } D { ",," } E { -- } F { "--" } @Rowa A { '' } B { "''" } C { ... } D { "..." } E { --- } F { "---" } @Rowa A { @Bullet bullet @Index @Code "@Bullet" } B { "@Bullet" } C { @Star star @Index @Code "@Star" } D { "@Star" } E { @ParSym parsym @Index @Code "@ParSym" } F { "@ParSym" } @Rowa A { @SectSym sectsym @Index @Code "@SectSym" } B { "@SectSym" } C { @Dagger dagger @Index @Code "@Dagger" } D { "@Dagger" } E { @DaggerDbl daggerdbl @Index @Code "@DaggerDbl" } F { "@DaggerDbl"} @Rowa A { @CDot cdot @Index @Code "@CDot" } B { "@CDot" } C { @Sterling sterling @Index @Code "@Sterling" } D { "@Sterling" } E { @Yen yen @Index @Code "@Yen" } F { "@Yen" } @Rowa A { @Florin florin @Index @Code "@Florin" } B { "@Florin" } C { @Degree degree @Index @Code "@Degree" } D { "@Degree" } E { @Minute minute @Index @Code "@Minute" } F { "@Minute" } @Rowa A { @Second second @Index @Code "@Second" } B { "@Second" } C { @Lozenge lozenge @Index @Code "@Lozenge" } D { "@Lozenge" } E { @Multiply multiply @Index @Code "@Multiply"} F { "@Multiply" } @Rowa A { @Divide divide @Index @Code "@Divide" } B { "@Divide" } C { @CopyRight copyright @Index @Code "@CopyRight" } D { "@CopyRight"} E { @Register register @Index @Code "@Register" } F { "@Register" } @Rowa A { @TradeMark trademark @Index @Code "@TradeMark" } B { "@TradeMark"} C { @Euro euro @Index @Code "@Euro" } D { "@Euro"} } Next we have the complete ISO-LATIN-1 character set, whose members you iso.latin.1 @Index { ISO-LATIN-1 character set } char. @Index { @Code "@Char" symbol } get with the @Code "@Char" symbol followed by the name of the character you want: @ID @OneRow -3p @Font @Tab hmargin { 0.1c } vmargin { 0.4vo } @Fmta { @Col @CC @Char A ! @Col @Code { "@Char" A } ! @Col ! @Col @CC @Char B ! @Col @Code { "@Char" B } ! @Col ! @Col @CC @Char C ! @Col @Code { "@Char" C } ! @Col ! @Col @CC @Char D ! @Col @Code { "@Char" D } } @Fmtb { @Col @CC @Char A ! @Col @Code { "@Char" A } ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col } { @Rowa A { space } B { exclam } C { quotedbl } D { numbersign } @Rowa A { dollar } B { percent } C { ampersand } D { quoteright } @Rowa A { parenleft } B { parenright } C { asterisk } D { plus } @Rowa A { comma } B { hyphen } C { period } D { slash } @Rowa A { zero } B { one } C { two } D { three } @Rowa A { four } B { five } C { six } D { seven } @Rowa A { eight } B { nine } C { colon } D { semicolon } @Rowa A { less } B { equal } C { greater } D { question } @Rowa A { at } B { A } C { B } D { C } @Rowa A { D } B { E } C { F } D { G } @Rowa A { H } B { I } C { J } D { K } @Rowa A { L } B { M } C { N } D { O } @Rowa A { P } B { Q } C { R } D { S } @Rowa A { T } B { U } C { V } D { W } @Rowa A { X } B { Y } C { Z } D { bracketleft } @Rowa A { backslash } B { bracketright } C { asciicircum } D { underscore } @Rowa A { quoteleft } B { a } C { b } D { c } @Rowa A { d } B { e } C { f } D { g } @Rowa A { h } B { i } C { j } D { k } @Rowa A { l } B { m } C { n } D { o } @Rowa A { p } B { q } C { r } D { s } @Rowa A { t } B { u } C { v } D { w } @Rowa A { x } B { y } C { z } D { braceleft } @Rowa A { bar } B { braceright } C { asciitilde } D { dotlessi } @Rowa A { grave } B { acute } C { circumflex } D { tilde } @Rowa A { macron } B { breve } C { dotaccent } D { dieresis } @Rowa A { ring } B { cedilla } C { hungarumlaut } D { ogonek } @Rowa A { caron } B { space } C { exclamdown } D { cent } @Rowa A { sterling } B { currency } C { yen } D { brokenbar } @Rowa A { section } B { dieresis } C { copyright } D { ordfeminine } @Rowa A { guillemotleft } B { logicalnot } C { hyphen } D { registered } @Rowa A { macron } B { degree } C { plusminus } D { twosuperior } @Rowa A { threesuperior } B { acute } C { mu } D { paragraph } @Rowa A { periodcentered } B { cedilla } C { onesuperior } D { ordmasculine } @Rowa A { guillemotright } B { onequarter } C { onehalf } D { threequarters } @Rowa A { questiondown } B { Agrave } C { Aacute } D { Acircumflex } @Rowa A { Atilde } B { Adieresis } C { Aring } D { AE } @Rowa A { Ccedilla } B { Egrave } C { Eacute } D { Ecircumflex } @Rowa A { Edieresis } B { Igrave } C { Iacute } D { Icircumflex } @Rowa A { Idieresis } B { Eth } C { Ntilde } D { Ograve } @Rowa A { Oacute } B { Ocircumflex } C { Otilde } D { Odieresis } @Rowa A { multiply } B { Oslash } C { Ugrave } D { Uacute } @Rowa A { Ucircumflex } B { Udieresis } C { Yacute } D { Thorn } @Rowa A { germandbls } B { agrave } C { aacute } D { acircumflex } @Rowa A { atilde } B { adieresis } C { aring } D { ae } @Rowa A { ccedilla } B { egrave } C { eacute } D { ecircumflex } @Rowa A { edieresis } B { igrave } C { iacute } D { icircumflex } @Rowa A { idieresis } B { eth } C { ntilde } D { ograve } @Rowa A { oacute } B { ocircumflex } C { otilde } D { odieresis } @Rowa A { divide } B { oslash } C { ugrave } D { uacute } @Rowa A { ucircumflex } B { udieresis } C { yacute } D { thorn } @Rowb A { ydieresis } } Of course, many of these characters can also be typed directly, or with the aid of double quotes, as we have seen. If your keyboard has accented accented @Index { accented characters } characters on it, you can type them directly too; if not, you need to use the @Code "@Char" symbol, in which case you will probably need braces as well: @ID @Code "gar{@Char ccedilla}on" to distinguish the @Code "@Char" symbol and the character name from adjacent letters. @PP Next we have the Adobe Systems Symbol font, a treasure trove of symbol. @Index { Symbol font } sym. @Index { @Code "@Sym" symbol } exotic characters obtained with the @Code "@Sym" symbol: @ID @OneRow -3p @Font @Tab hmargin { 0.1c } vmargin { 0.4vo } @Fmta { @Col @CC @Sym A ! @Col @Code { "@Sym" A } ! @Col ! @Col @CC @Sym B ! @Col @Code { "@Sym" B } ! @Col ! @Col @CC @Sym C ! @Col @Code { "@Sym" C } ! @Col ! @Col @CC @Sym D ! @Col @Code { "@Sym" D } } { @Rowa A { space } B { exclam } C { universal } D { numbersign } @Rowa A { existential } B { percent } C { ampersand } D { suchthat } @Rowa A { parenleft } B { parenright } C { asteriskmath } D { plus } @Rowa A { comma } B { minus } C { period } D { slash } @Rowa A { zero } B { one } C { two } D { three } @Rowa A { four } B { five } C { six } D { seven } @Rowa A { eight } B { nine } C { colon } D { semicolon } @Rowa A { less } B { equal } C { greater } D { question } @Rowa A { congruent } B { Alpha } C { Beta } D { Chi } @Rowa A { Delta } B { Epsilon } C { Phi } D { Gamma } @Rowa A { Eta } B { Iota } C { theta1 } D { Kappa } @Rowa A { Lambda } B { Mu } C { Nu } D { Omicron } @Rowa A { Pi } B { Theta } C { Rho } D { Sigma } @Rowa A { Tau } B { Upsilon } C { sigma1 } D { Omega } @Rowa A { Xi } B { Psi } C { Zeta } D { bracketleft } @Rowa A { therefore } B { bracketright } C { perpendicular } D { underscore } @Rowa A { radicalex } B { alpha } C { beta } D { chi } @Rowa A { delta } B { epsilon } C { phi } D { gamma } @Rowa A { eta } B { iota } C { phi1 } D { kappa } @Rowa A { lambda } B { mu } C { nu } D { omicron } @Rowa A { pi } B { theta } C { rho } D { sigma } @Rowa A { tau } B { upsilon } C { omega1 } D { omega } @Rowa A { xi } B { psi } C { zeta } D { braceleft } @Rowa A { bar } B { braceright } C { similar } D { Upsilon1 } @Rowa A { minute } B { lessequal } C { fraction } D { infinity } @Rowa A { florin } B { club } C { diamond } D { heart } @Rowa A { spade } B { arrowboth } C { arrowleft } D { arrowup } @Rowa A { arrowright } B { arrowdown } C { degree } D { plusminus } @Rowa A { second } B { greaterequal } C { multiply } D { proportional } @Rowa A { partialdiff } B { bullet } C { divide } D { notequal } @Rowa A { equivalence } B { approxequal } C { ellipsis } D { arrowvertex } @Rowa A { arrowhorizex } B { carriagereturn } C { aleph } D { Ifraktur } @Rowa A { Rfraktur } B { weierstrass } C { circlemultiply } D { circleplus } @Rowa A { emptyset } B { intersection } C { union } D { propersuperset } @Rowa A { reflexsuperset } B { notsubset } C {propersubset} D {reflexsubset} @Rowa A { element } B { notelement } C { angle } D { gradient } @Rowa A { registerserif } B { copyrightserif } C {trademarkserif} D {product} @Rowa A { radical } B { dotmath } C { logicalnot } D { logicaland } @Rowa A { logicalor } B { arrowdblboth } C { arrowdblleft } D { arrowdblup } @Rowa A { arrowdblright } B { arrowdbldown } C { lozenge } D { angleleft } @Rowa A { registersans } B { copyrightsans } C {trademarksans} D {summation} @Rowa A { parenlefttp } B { parenleftex } C { parenleftbt } D {bracketlefttp} vmargin { 0.5vx } @Rowa A { bracketleftex } B { bracketleftbt } C {bracelefttp} D {braceleftmid} vmargin { 0.5vx } @Rowa A { braceleftbt } B { braceex } C { angleright } D { integral } vmargin { 0.5vx } @Rowa A { integraltp } B { integralex } C { integralbt } D { parenrighttp } vmargin { 0.5vx } @Rowa A {parenrightex} B {parenrightbt} C {bracketrighttp} D {bracketrightex} vmargin { 0.5vx } @Rowa A { bracketrightbt } B {bracerighttp} C {bracerightmid} D {bracerightbt} vmargin { 0.5vx } } There is only one Symbol font; it does not come in bold or italic faces like the other fonts. Typing @Code "@B @Sym alpha" is therefore useless, and anyway there is no bold @Sym alpha character in any font distributed with Lout. # (except see Section {@NumberOf teq}). @PP Next there are the dingbats. Here they are with their dingbats. @Index { dingbats characters } (regrettably meaningless) names: @FootNote { If you see only conventional characters in this table, the problem is that your viewer does not have access to the Dingbats font. The author's viewer has this problem, for example, but his printer doesn't. } @CD @Tbl indent { ctr } iv { ctr } rule { yes } font { -1p } width { 1.0c } margin { 0.2f } aiv { top } afont { Helvetica Base -2p } aformat { @Cell paint { @Xrgb grey95 } -90d @Rotate B | @Cell ruleright { double } -90d @Rotate C | @Cell paint { @Xrgb grey95 } -90d @Rotate D | @Cell ruleright { double } -90d @Rotate E | @Cell paint { @Xrgb grey95 } -90d @Rotate F | @Cell ruleright { double } -90d @Rotate G | @Cell paint { @Xrgb grey95 } -90d @Rotate H | @Cell ruleright { double } -90d @Rotate I | @Cell paint { @Xrgb grey95 } -90d @Rotate J | @Cell ruleright { double } -90d @Rotate K | @Cell paint { @Xrgb grey95 } -90d @Rotate L | @Cell -90d @Rotate M | } bformat { @Cell paint { @Xrgb grey95 } indent { right } B | @Cell ruleright { double } font { Dingbats Base -1p } @Char C | @Cell paint { @Xrgb grey95 } indent { right } D | @Cell ruleright { double } font { Dingbats Base -1p } @Char E | @Cell paint { @Xrgb grey95 } indent { right } F | @Cell ruleright { double } font { Dingbats Base -1p } @Char G | @Cell paint { @Xrgb grey95 } indent { right } H | @Cell ruleright { double } font { Dingbats Base -1p } @Char I | @Cell paint { @Xrgb grey95 } indent { right } J | @Cell ruleright { double } font { Dingbats Base -1p } @Char K | @Cell paint { @Xrgb grey95 } indent { right } L | @Cell font { Dingbats Base -1p } @Char M | } { @Rowa B { "@"Ding } C{ Dingbat } D { "@"Ding } E{ Dingbat } F { "@"Ding } G{ Dingbat } H { "@"Ding } I{ Dingbat } J { "@"Ding } K{ Dingbat } L { "@"Ding } M{ Dingbat } @Rowb B{a1} C{a1} D{a2} E{a2} F{a202} G{a202} H{a3} I{a3} J{a4} K{a4} L{a5} M{a5} @Rowb B{a119} C{a119} D{a118} E{a118} F{a117} G{a117} H{a11} I{a11} J{a12} K{a12} L{a13} M{a13} @Rowb B{a14} C{a14} D{a15} E{a15} F{a16} G{a16} H{a105}I{a105} J{a17} K{a17} L{a18} M{a18} @Rowb B{a19} C{a19} D{a20} E{a20} F{a21} G{a21} H{a22} I{a22} J{a23} K{a23} L{a24} M{a24} @Rowb B{a25} C{a25} D{a26} E{a26} F{a27} G{a27} H{a28}I{a28} J{a6} K{a6} L{a7} M{a7} @Rowb B{a8} C{a8} D{a9} E{a9} F{a10} G{a10} H{a29} I{a29} J{a30} K{a30} L{a31} M{a31} @Rowb B{a32} C{a32} D{a33} E{a33} F{a34} G{a34} H{a35} I{a35} J{a36} K{a36} L{a37} M{a37} @Rowb B{a38} C{a38} D{a39} E{a39} F{a40} G{a40} H{a41} I{a41} J{a42} K{a42} L{a43} M{a43} @Rowb B{a44} C{a44} D{a45} E{a45} F{a46} G{a46} H{a47} I{a47} J{a48} K{a48} L{a49} M{a49} @Rowb B{a50} C{a50} D{a51} E{a51} F{a52} G{a52} H{a54} I{a54} J{a55} K{a55} L{a56} M{a56} @Rowb B{a57} C{a57} D{a58} E{a58} F{a59} G{a59} H{a60} I{a60} J{a61} K{a61} L{a62} M{a62} @Rowb B{a63} C{a63} D{a64} E{a64} F{a65} G{a65} H{a66} I{a66} J{a67} K{a67} L{a68} M{a68} @Rowb B{a69} C{a69} D{a70} E{a70} F{a71} G{a71} H{a72} I{a72} J{a73} K{a73} L{a74} M{a74} @Rowb B{a203} C{a203} D{a75} E{a75} F{a204} G{a204} H{a76} I{a76} J{a77} K{a77} L{a78} M{a78} @Rowb B{a79} C{a79} D{a81} E{a81} F{a82} G{a82} H{a83} I{a83} J{a84} K{a84} L{a97} M{a97} @Rowb B{a98} C{a98} D{a99} E{a99} F{a100} G{a100} H{a101} I{a101} J{a102} K{a102} L{a103} M{a103} @Rowb B{a104} C{a104} D{a106} E{a106} F{a107} G{a107} H{a108} I{a108} J{a112} K{a112} L{a111} M{a111} @Rowb B{a110} C{a110} D{a109} E{a109} F{a120} G{a120} H{a121} I{a121} J{a122} K{a122} L{a123} M{a123} @Rowb B{a124} C{a124} D{a125} E{a125} F{a126} G{a126} H{a127} I{a127} J{a128} K{a128} L{a129} M{a129} @Rowb B{a130} C{a130} D{a131} E{a131} F{a132} G{a132} H{a133} I{a133} J{a134} K{a134} L{a135} M{a135} @Rowb B{a136} C{a136} D{a137} E{a137} F{a138} G{a138} H{a139} I{a139} J{a140} K{a140} L{a141} M{a141} @Rowb B{a142} C{a142} D{a143} E{a143} F{a144} G{a144} H{a145} I{a145} J{a146} K{a146} L{a147} M{a147} @Rowb B{a148} C{a148} D{a149} E{a149} F{a150} G{a150} H{a151} I{a151} J{a152} K{a152} L{a153} M{a153} @Rowb B{a154} C{a154} D{a155} E{a155} F{a156} G{a156} H{a157} I{a157} J{a158} K{a158} L{a159} M{a159} @Rowb B{a160} C{a160} D{a161} E{a161} F{a163} G{a163} H{a164} I{a164} J{a196} K{a196} L{a165} M{a165} @Rowb B{a192} C{a192} D{a166} E{a166} F{a167} G{a167} H{a168} I{a168} J{a169} K{a169} L{a170} M{a170} @Rowb B{a171} C{a171} D{a172} E{a172} F{a173} G{a173} H{a162} I{a162} J{a174} K{a174} L{a175} M{a175} @Rowb B{a176} C{a176} D{a177} E{a177} F{a178} G{a178} H{a179} I{a179} J{a193} K{a193} L{a180} M{a180} @Rowb B{a199} C{a199} D{a181} E{a181} F{a200} G{a200} H{a182} I{a182} J{a201} K{a201} L{a183} M{a183} @Rowb B{a184} C{a184} D{a197} E{a197} F{a185} G{a185} H{a194} I{a194} J{a198} K{a198} L{a186} M{a186} @Rowb B{a195} C{a195} D{a187} E{a187} F{a188} G{a188} H{a189} I{a189} J{a190} K{a190} L{a191} M{a191} } The easiest way to get a dingbat is to write, for example, @ID @Code "@Ding a123" which produces the dingbat with the given name from the table above. This is just a shorthand for @ID @Code @Verbatim { { Dingbats Base } @Font { @Char a123 } } In other words, dingbats are just another font. @PP Finally we have a few more characters that you get with the @Code "@Char" symbol, although they aren't ISO-LATIN-1 characters. @ID @OneRow -3p @Font @Tab hmargin { 0.1c } vmargin { 0.4vo } @Fmta { @Col @CC @Char A ! @Col @Code { "@Char" A } ! @Col ! @Col @CC @Char B ! @Col @Code { "@Char" B } ! @Col ! @Col @CC @Char C ! @Col @Code { "@Char" C } ! @Col ! @Col @CC @Char D ! @Col @Code { "@Char" D } } @Fmtb { @Col @CC @Char A ! @Col @Code { "@Char" A } ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col } { @Rowa A { quotesinglbase } B { quotedblbase } C { ellipsis } D { OE } @Rowa A { oe } B { quotedblleft } C { quotedblright } D { fi } @Rowa A { fl } B { endash } C { emdash } D { bullet } @Rowa A { dagger } B { daggerdbl } C { florin } D { fraction } } Most of these characters are also in the list of `characters important enough to deserve their own symbols' given above. @End @Section lout-3.39/doc/user/typ0000644000076400007640000000151711363700677013351 0ustar jeffjeff@Chapter @Title { Types of Documents } @Tag { types } @Begin @LP Particular types of documents have specialized formatting requirements: title pages in books, abstracts in technical reports, and so on. Lout provides a range of @I { document types } with the appropriate specialized features for document.types @Index { document types } each type. @PP There are five types: ordinary documents, technical reports, books, overhead transparencies, and stand-alone illustrations. The features of all other chapters are available within each document type, but the features of one type are not available within other types. @BeginSections @Include { typ_ordi } @Include { typ_repo } @Include { typ_book } @Include { typ_over } @Include { typ_illu } @Include { typ_plai } @Include { typ_apdf } @Include { typ_orga } @EndSections @End @Chapter lout-3.39/doc/user/tbl0000644000076400007640000000344411363700677013317 0ustar jeffjeff@Chapter @Title { Tables } @Tag { tables } @Begin @LP This chapter explains how to produce tables like this one: tables. @Index { tables } @CD @Tbl aindent { ctr } arulebelow { double } aformat { @StartHSpan @Cell @B X | | @HSpan } bindent { align } bformat { @Cell rr { no } @I A | @Cell rl { no } B | @Cell C } rule { yes } { @Rowa X { Value of mathematical formulae (millions of dollars) } @Rowb A { Quadratic formula } B { @M { x ^= { minus b +- sqrt { b sup 2 - 4ac } } over 2a } } C { 3^.5 } @Rowb A { Binomial theorem } B { @M { ( a + b ) sup n ^= sum from { k=0 } to { infty } pmatrix { row ccol n row ccol k } a sup k b sup n-k } } C { 12^ } } As the example shows, the tables may contain spanning columns, aligned columns, and rules, and the cells may contain arbitrary objects. @FootNote { There has been a slight change to {@Code "@Tbl"}, starting with Version 3.18: if you want columns whose entries are aligned (on decimal points, equals signs, etc.), or the analogous thing with rows, you have to ask for it now, whereas before it happened automatically. See Section {@NumberOf tbl_alig} for the details. } @BeginSections @Include { tbl_intr } # introduction @Include { tbl_cell } # cell formatting: font, break, width, paint @Include { tbl_rows } # row formats and the @Row symbol @Include { tbl_rule } # rules @Include { tbl_marg } # margins @Include { tbl_widt } # width and height @Include { tbl_inde } # indenting and struts @Include { tbl_alig } # aligned columns and headings over them @Include { tbl_span } # spanning columns and rows @Include { tbl_mark } # @MarkRow @Include { tbl_mult } # multi-page tables @Include { tbl_plai } # plain text tables @Include { tbl_setu } # setup file options @Include { tbl_summ } # summary @EndSections @End @Chapter lout-3.39/doc/user/str_cros0000644000076400007640000002636111363700677014377 0ustar jeffjeff@Section @Title { Cross references and links } @Tag { cross } @Begin @PP Cross references are a useful feature of documents, but they are a cross.ref @Index { cross references } problem for authors. Suppose that at one point of your document you have @ID @OneRow @Code { "We hold these truths to be self-evident, that all men are created equal," "that they are endowed by their Creator with certain inalienable Rights," "that among these are Life, Liberty, and the pursuit of Happiness..." } and that at some other point, earlier or later, you have @ID @OneRow @Code { "The anti-slavery cause, founded as it was on the Declaration" "of Independence (page 181), could appeal to patriotic as" "well as moral sentiments..." } This is a @I { cross reference }, and the problem is that as the document is revised, the Declaration of Independence might move to page 185, and the cross reference must be found and changed. @PP Lout has a simple solution to this problem. Instead of writing the pageof. @Index @Code "@PageOf" page number, write @ID @OneRow @Code { "The anti-slavery cause, founded as it was on the Declaration" "of Independence (page @PageOf { decl.of.ind }), could appeal to" "patriotic as well as moral sentiments..." } instead, and at the point referred to, write pagemark. @Index @Code "@PageMark" @ID @OneRow @Code { "We @PageMark decl.of.ind hold these truths to be self-evident, that..." } Inserting @Code "@PageMark decl.of.ind" will not affect the result, but Lout makes a note of the number of the page on which the word preceding it appears, and inserts that number in place of {@Code "@PageOf decl.of.ind"}. The tag, {@Code "decl.of.ind"}, may be any simple word (actually Lout will accept a multi-word tag, but they are very inconvenient and better avoided). The braces are there, as usual, to control grouping: we don't want the following punctuation characters in the tag. @PP One tag called @Code "last.page" is created automatically "last.page.tag" @Index { @Code "last.page" tag } for you. @Code "@PageOf last.page" gives the number of the last page of the document. For example, the result for this document is {@PageOf last.page}. @PP Cross referencing also applies to large-scale structure symbols such as @Code "@Chapter" and @Code "@Section" (any symbol with a @Code "@Title" option), as well as @Code { "@FootNote" }, @Code { "@EndNote" }, @Code { "@Figure" }, @Code { "@Table" }, @Code { "@Floater" }, the numbered display symbols, and @Code "@ListItem" and @Code "@DropListItem" (but not @Code "@TagItem" and {@Code "@DropTagItem"}). Each of these symbols has a @Code "@Tag" option: tag.option. @Index { @Code "@Tag" option } @ID @OneRow @Code { "@Section" " @Title { Cross references }" " @Tag { cross }" "@Begin" "@PP" "Cross references are a useful ..." } Now you can use the @Code "@PageOf" symbol to find the number of the page on which the symbol's result begins, and the @Code "@NumberOf" symbol to find its number: numberof. @Index @Code "@NumberOf" @ID @OneRow @Code { "For further information on this point, please consult" "Section @NumberOf cross (page @PageOf { cross })." } produces @QD { For further information on this point, please consult Section @NumberOf cross (page @PageOf { cross }). } For symbols with a @Code "@Title" option (chapters, sections, etc.) or a @Code "@Caption" option (@Code { "@Figure" }, @Code { "@Table" }, and @Code { "@Floater" }) there is also the @Code "@TitleOf" symbol, titleof. @Index @Code "@TitleOf" which returns the value of the @Code "@Title" or @Code "@Caption" option: @ID @OneRow @Code { "For further information on this point, please consult" "the @TitleOf { cross } section." } produces @QD { For further information on this point, please consult the @TitleOf { cross } section. } But this symbol won't work for footnotes, list items, and other things without a title or caption. @PP For those with more expertise in using Lout, there is a pageparityof. @Index @Code "@PageParityOf" @Code "@PageParityOf" symbol which is very similar to @Code "@PageOf" except that it returns one of the two words @Code "Odd" and @Code "Even" instead of a page number, indicating whether the object it references is printed on an odd or even page. For example, @Code "@PageParityOf cross" produces @Code {@PageParityOf cross}. @PP Like all tags, the value of the @Code "@Tag" option should be a simple word (although Lout does accept multi-word tags). Cross referencing of list items yields just the number of the item, in Arabic, Roman, or whatever; it does not include the surrounding parentheses or other decorations introducted by the list's @Code "style" option. @PP To work cross references out, Lout has to process your document more multiple.runs @Index { multiple runs, why needed } than once, storing information between runs in special files it creates whose names end in @Code ".li" and {@Code ".ld"}. A complex document like this Guide requires five runs, but since every run produces a perfectly good PostScript file suitable for proof reading, in fact you need two runs to start with and one run per cycle of revision thereafter, only one more than would have been necessary in any case. @PP The cross referencing system assumes that each Unix directory contains directories @Index { directories, Lout files and } only one Lout document (possibly spread over many files). If you keep several documents in one directory you can turn off the cross referencing with the @Code "-s" flag: @ID @Code "lout -s simple > simple.ps" Since this will cause question marks to replace footnote and section numbers, and other products of cross referencing, it is only feasible for simple documents. Alternatively, you can reset cross referencing when switching from one document to another, by removing file lout.li @Index { @Code lout.li file } {@Code "lout.li"}. You should also remove this file if your document changes radically -- from a report to a book, say. @FootNote { An unfortunate and long-standing bug causes Lout to crash occasionally when reading from a cross-reference database file that it wrote on the preceding run. The problem has to do with mistakenly taking a literal word, or part of such a word, as an invocation of a symbol. The crash will occur on the @I second run (because the database file is written, not read, on the first run), and might be accompanied by an error message mentioning routine @I { AttachEnv } or @I { SetTarget }. You can make it happen, for example, by including @ID @Code "pnformat @Index { watch me crash! }" in your document -- the @Code pnformat tag, a literal word, will be mistaken for the @Code pnformat option of @Code "@Index" by the database reader. If this problem appears, try enclosing tags that you entered recently in double quotes. Enclosing @Code pnformat above in double quotes fixes the example problem. } @PP PDF viewers and recent versions of PostScript viewers offer a high-tech version of cross references called {@I links}, which allow the user to click on, say, the entry for a section in a table of contents and be immediately transported to the page on which that section begins. In principle, anything could happen when a link is clicked on, but Lout only offers two kinds of links: @I { internal links } that transport the user to some page in the current document, and @I { external links } that transports the user to a URL location on the World Wide Web. @PP Lout automatically makes an internal link out of every page number it prints in the table of contents and in the index, and every reference citation. You can also insert your own links, using the @Code "@CrossLink" symbol like this: @ID @Code "See cross @CrossLink { Section @NumberOf cross }" The @Code "@CrossLink" symbol consumes two objects, one to its left and the other to its right, and we'll explain each of these now. @PP The object on the right (@Code "Section @NumberOf cross" in our example) can be an arbitrary Lout object: you don't have to have @Code "@NumberOf" or @Code "@PageOf" inside it, although in practice you often will, since it makes sense to put a low-tech link wherever you have a high-tech one, for the benefit of readers of paper versions. This object on the right is what is printed, so the overall result in this example is @ID { See cross @CrossLink { Section @NumberOf cross } } But, beyond this, clicking anywhere on this object on the screen will invoke the link, transporting the user to some other page. @PP The object on the left (@Code cross in our example) must be a tag that is acceptable to the @Code "@PageOf" symbol described earlier in this section. The link will transport the user who clicks on it to the page that @Code "@PageOf" would point to if given that tag. You can ensure that your tag is acceptable in the usual ways: by using {@Code "@PageMark"}, or by giving the tag as the @Code "@Tag" option of a chapter, section, etc. as described earlier in this section. @PP A moment ago we said that the object to the right of @Code "@CrossLink" is what is printed by the @Code "@CrossLink" symbol. This is true by default, but there is a @Code "@CrossLinkFormat" option in the setup files which allows you to change the appearance of this printed object. (See Section {@NumberOf setup} for a general description of setup files and their options.) The default value of @Code "@CrossLinkFormat" is @ID @Code "@CrossLinkFormat { @Body }" Within the @Code "@CrossLinkFormat" option, the @Code "@Body" symbol stands for the object to the right of {@Code "@CrossLink"}. It is actually the value of @Code "@CrossLinkFormat" that is printed, so, for example, changing it to @ID @Code "@CrossLinkFormat { blue @Colour @Underline @Body }" causes all link objects to be printed in blue and underlined. If you want a special format just for one link, there is a @Code "@Format" option to @Code "@CrossLink" that overrides {@Code "@CrossLinkFormat"}: @ID @Code "cross @CrossLink @Format { @CurveBox @Body } { Section @NumberOf cross }" You can also give the formatting you want directly, since the object to the right of @Code "@CrossLink" can be an arbitrary Lout object: @ID @Code "cross @CrossLink @CurveBox { Section @NumberOf cross }" However, in this form the @Code "@CrossLinkFormat" setup file option is still applied. @PP External links are obtained in much the same way as internal ones, except that the symbol to use is @Code "@ExternalLink" and instead of supplying a tag, you need to supply a URL: @ID @Code { "\"http://lout.wiki.sourceforge.net/\" @ExternalLink { Lout Home Page }" } Once again the result is the object to the right, modified by any @Code "@Format" option; and there is an {@Code "@ExternalLinkFormat"} setup file option that works in the same way as {@Code "@CrossLinkFormat"}. This time, though, the effect is to jump right out of your document to the given place on the World Wide Web, assuming that the software you are using to display your document is capable of such a thing. @PP At present, the @Code "@CrossLink" and @Code "@ExternalLink" symbols behave as though a @Code "@OneCol" symbol encloses the object to their right. This means that that object is kept together on one line of any enclosing paragraph, and inter-word spaces within it are not adjusted along with the inter-word spaces of any enclosing paragraph. This deficiency might be corrected in the future, but meanwhile it means that it is best to keep your objects on the right short. @End @Section lout-3.39/doc/user/fmt2.awk0000644000076400007640000000140211363700677014157 0ustar jeffjeffBEGIN { print "@Tbl" print " mv { 0.5vx }" print " aformat { @Cell ml { 0i } indent { right } @Code A | @Cell B | @Cell |" print " @Cell indent { right } @Code C | @Cell D | @Cell |" print " @Cell indent { right } @Code E | @Cell mr { 0i } F }" print "{" } NR % 3 == 1 { printf "@Rowa\n" printf " A { \"%s from { a } to { b }\" }\n", $1 printf " B { @Math { %s from { a } to { b } } }\n", $1 } NR % 3 == 2 { printf " C { \"%s from { a } to { b }\" }\n", $1 printf " D { @Math { %s from { a } to { b } } }\n", $1 } NR % 3 == 0 { printf " E { \"%s from { a } to { b }\" }\n", $1 printf " F { @Math { %s from { a } to { b } } }\n", $1 } END { print "}" } lout-3.39/doc/user/fmt_setu0000644000076400007640000002212111363700677014355 0ustar jeffjeff@Section @Title { Setup files } @Tag { setup } @Begin @PP As mentioned briefly in Section {@NumberOf start}, each Lout document begins with an instruction to include (i.e. to read) a @I { setup file }: setup.files. @Index { setup files } sysinclude. @Index @Code "@SysInclude" system.include @Index { system include directory } doc.file @Index { @Code "doc" file } @ID @Code "@SysInclude { doc }" The setup file's name in this example is @Code { doc }, and the @Code Sys in @Code "@SysInclude" means that @Code doc is stored in the @I { Lout system include directory }, which is where all the standard setup files are kept. Each document type (Chapter {@NumberOf types}) has its own setup file, and each specialized package (for equations, tables, and so on) has a setup file too. @PP To change the overall format of a document, you need to create your own setup file by copying and modifying one of the standard ones. We will assume that you are making an ordinary document, with the @Code doc setup file, but a similar procedure works for any setup file. @PP You first need to find out the name of the Lout system include directory, by typing @ID @Code "lout -V" in Unix. This causes Lout to print out various facts about itself. Then, supposing that this tells you that the Lout system include directory is @Code { "/usr/lout/include" }, type the Unix command @ID @Code "cp /usr/lout/include/doc mydoc" to place a copy of the @Code doc setup file in your directory, mydoc.file @Index { @Code "mydoc" file } renaming it @Code {mydoc}. Since @Code "doc" is read-only, you may also need to change the mode of @Code mydoc to be writable (by @Code "chmod +w mydoc" in Unix). Now replace @ID @Code "@SysInclude { doc }" at the beginning of your document by @ID @Code "@Include { mydoc }" and Lout will read @Code mydoc as the setup file instead of @Code { doc }. Since the two files are at present identical, this has changed nothing so far; but now any changes you make to @Code mydoc will affect your document. Notice the use of @Code "@Include" rather than @Code { "@SysInclude" }; @Code "@Include" will search your current directory for @Code { mydoc }, whereas @Code "@SysInclude" searches only the system directory. @PP The remainder of this section is a tour through @Code {doc}, explaining the various parts and how to modify them. The first lines that actually do anything are these: @ID @OneRow @Code { "@SysInclude { langdefs }" "@SysInclude { bsf }" "@SysInclude { dsf }" "@SysInclude { docf }" } We already know that @Code "@SysInclude" causes Lout to read a file from the Lout system include directory. File @Code langdefs langdefs.file @Index { @Code "langdefs" file } tells Lout what languages there are, and files @Code "bsf" and @Code "dsf" contain bsf.file @Index { @Code "bsf" file } dsf.file @Index { @Code "dsf" file } the definitions of the BasicSetup and DocumentSetup packages, in which all the symbols of the first two chapters of this guide are defined. File @Code "docf" contains extra definitions specific to docf.file @Index { @Code "docf" file } ordinary documents (as distinct from technical reports, books, or the other document types of Chapter {@NumberOf types}). So this line will be different in the setup files for those other types. @PP The next line is @ID @Code { "@Include { mydefs }" } This searches your current directory for a file called @Code { mydefs }, which (as Section {@NumberOf definitions} explains) is intended to hold your own personal set of definitions of new symbols. It does no harm if there is no @Code "mydefs" file in your current directory, because @Code "@Include" then searches the Lout system include directory for it, and there is an empty @Code mydefs file there. When using your own setup file, you might prefer to delete @Code "@Include { mydefs }" and put your definitions in its place, so that you have one file of setup material rather than two. @PP Next we come to the BasicSetup @Code "@Use" clause. It looks like this: use. @Index @Code "@Use" @ID @OneRow @Code @Verbatim { @Use { @BasicSetup # @InitialFont { Times Base 12p } # @InitialBreak { {adjust 1.20fx hyphen} @OrIfPlain {ragged 1fx nohyphen} } # @InitialSpace { lout } # @InitialLanguage { English } # @InitialColour { black } # @InitialBackgroundColour { white } # @OptimizePages { No } # @HeadingFont { Bold } # @ParaGap { 1.3vx @OrIfPlain 1f } # @ParaIndent { 2.00f @OrIfPlain 5s } } } @Code "@BasicSetup" is a symbol, and @Code { "@InitialFont" }, basic.layout @Index @Code "@BasicSetup" @Code { "@InitialBreak" }, etc. are its options. There are more options than we've shown; the display above just shows the first few. You change the overall format of your document by changing these options. @PP A @Code "#" causes Lout to ignore that character and the rest of the line (such ignored parts are called {@I comments} and @Code "#" is the @I { comment character }). As it stands, then, the options are all hidden within comments, so their default values (shown within braces in the comments) are in force. To change an option, delete the @Code "#" and change the value between braces. For example, to set the document in Helvetica 10 point font, change the @Code { "@InitialFont" } line to @ID @Code "@InitialFont { Helvetica Base 10p }" We won't go through all the options now, since they are the subject of following sections. @PP The @Code "@OrIfPlain" symbol that appears within some setup file options is used to set the value of the option differently when plain text output (Section {@NumberOf plain}) is being produced. For example, the default value of @Code "@InitialBreak" is usually {@Code "adjust 1.20fx hyphen"}, but when plain text is being produced it switches to {@Code "ragged 1fx nohyphen"}. When changing such options you can leave the @Code "@OrIfPlain" symbol there and change one or both of the alternative values as you wish. @PP Next comes a similar @Code "@Use" clause, for the DocumentSetup package: @ID @OneRow @Code @Verbatim { @Use { @DocumentSetup # @PageType { A4 @OrIfPlain Other } # @PageWidth { 80s } # @PageHeight { 66f } # @PageOrientation { Portrait } # @PageBackground {} # @TopMargin { 2.5c @OrIfPlain 6f } } } This one has many options, starting with options for page layout as shown, then going on to figures and tables, tables of contents, etc. @PP The standard setup files are all much the same up to this point; the main variation is that in some files, some options are already set. The @Code "slides" setup file, for example, contains @ID @Code "@InitialFont { Times Base 20p }" so that overhead transparencies will have a large font size. However, now comes a third @Code "@Use" clause whose symbol and options depend on the document type. For ordinary documents (i.e. in the @Code "doc" setup file) this clause is (once again we show just some of the options): @ID @OneRow @Code @Verbatim { @Use { @OrdinarySetup # @IndexWord { index } # @AppendixWord { appendix } # @SectionNumbers { Arabic } # @AppendixNumbers { UCAlpha } # @SectionHeadingFont { Bold } } } In the @Code slides setup file for overhead transparencies, we find this: @ID @OneRow @Code @Verbatim { @Use { @OverheadSetup # @DateLine { No } # @ContentsWord { contents } # @FirstOverheadNumber { 1 } # @OverheadNumbers { Arabic } # @TitlePageFont { Helvetica Base 1.5f } # @OverheadHeadingFont { Bold } # @OverheadInContents { No } } } In general this third @Code "@Use" clause assigns values to options specific to the document type we are using, whereas the first and second @Code "@Use" clauses assign values to options that are relevant to many or all document types. @PP The setup file ends with a comment identifying a spot where database declarations may database.dec @Index { database declarations, where to put } be put, and two such declarations, one for fonts and the other for reference printing styles. @PP The setup files used with other packages, such as C and C++ program printing, diagrams, and graphs, are similar to the @Code { doc } setup file we have just gone through. They contain a @@SysInclude line analogous to @Code "@SysInclude { dsf }" for reading the package's definition, followed by a @@Use clause for setting the package's options. The same procedure is followed for changing these options. For example, to change the options of the @Code "diag" package, copy file @Code "diag" from the Lout system include directory to your directory, replace the @ID @Code "@SysInclude { diag }" line at the top of your document by {@Code "@Include { mydiag }"}, then edit @Code "mydiag" and change the options as you wish. @PP If you are using several packages and you would like a single setup file, that is quite easy to arrange. For example, suppose you have @ID @Code { "@Include { mydoc }" "@Include { mydiag }" "@Include { mycprint }" } To create a single setup file, just concatenate these three files into one file (call it @Code { mysetup }, say), and replace the three lines by @ID @Code { "@Include { mysetup }" } As explained earlier, you can even replace the @Code "@Include { mydefs }" line within the setup file by the actual definitions, giving just one file of setup material for the entire document. @End @Section lout-3.39/doc/user/bgr_boxs0000644000076400007640000002161011363700677014336 0ustar jeffjeff@Section @Title { Boxes and rules } @Tag { boxes } @Begin @PP The @Code "@Box" symbol causes the following object to be enclosed in a box. @Index @Code "@Box" box: @ID @OneRow @Code { "@QuotedDisplay @Box {" "@CentredDisplay @Heading Cheating" "The Department uses assignments ... of that student alone." "}" } The result of this is @QuotedDisplay @Box { @CentredDisplay @Heading Cheating The Department uses assignments both as a teaching device and as a major component of its assessment of each student. It therefore requires that all programs, exercises etc. handed in bearing an individual student's name be the work of that student alone. } showing that a box may enclose an arbitrarily complicated object. @PP The @Code "@Box" symbol has a @Code margin option which determines the box. @RawIndex @Code "@Box" box.margin @SubIndex { @Code "margin" option } margin between the box and what it encloses. For example, @ID @OneRow @Code { "@Box" " margin { 0.1c }" "{}" } requests a box with a 0.1 centimetre margin enclosing an empty object, so the result is a square whose width and height are 0.2 centimetres: @ID @Box margin { 0.1c } {} If the @Code "margin" option is omitted, it is assigned the default value {@Code "0.3f"}, which means 0.3 times the current font size. It is very useful to tie the margin to the font size in this way, because large headings (in overhead transparencies, say) need large margins. @PP There is a @Code "linewidth" option which determines the width box.linewidth @SubIndex { @Code "linewidth" option } (thickness) of the line drawn around the boundary of the box: @ID @OneRow @Code { "@Box" " linewidth { 0.1c }" "{ Hello world }" } produces @ID @Code { @Box linewidth { 0.1c } { Hello world } } Lout does not take the line width into account when working out how large everything is: as far as Lout is concerned, the line always has width zero. If you draw really thick lines you might need a larger margin and more space near the box. The default value of @Code linewidth is empty, which means to use whatever width the PostScript interpreter in your output device thinks is a good default value. The special value @Code "none" for @Code "linewidth" ensures that no line is drawn around the box at all. @PP There is also a @Code "paint" option which paints a background of the box.paint @SubIndex { @Code "paint" option } nominated colour: @ID @Code "@Box paint { grey } WARNING!" has result @ID @Box paint { grey } WARNING! This is quite different from {@Code "grey @Colour @Box WARNING!"}, which produces @ID grey @Colour @Box WARNING! The @Code "paint" option may be given any colour from the list in Section {@NumberOf colour}; its default value is {@Code "none"}, which is a special value (not a colour) which means no painting. White paint comes into its own inside painted boxes: @ID @Code "@Box paint { nochange } white @Colour { Hello world }" produces a box painted in whatever colour we happen to be using at the moment, with white text inside: @ID @Box paint { nochange } white @Colour { Hello world } This works because the box is painted before the object it encloses is drawn on the page. @PP Wherever there is a @Code paint option in Lout for painting the background of something, there is always an accompanying @Code texture option for box.texture @SubIndex { @Code "texture" option } applying that paint with the textures described in Section {@NumberOf textures}. For example, @ID @Code "@Box paint { black } texture { brickwork } 50p @Font WARNING!" produces @FootNote { As explained in Section {@NumberOf textures}, if you can't see any textures the problem is probably with your PostScript viewer. } @ID @Box paint { black } texture { brickwork } 50p @Font WARNING! If @Code paint is absent or @Code none then @Code texture will have no effect. Since textures are naturally lighter than solid colour, you will usually need darker paint when using textures than when not. @PP To set options on a texture within a @Code "texture" option, you can write @ID @Code "texture { striped @Texture angle { 45d } scale { 2 } }" mimicking the @Code "@Texture" symbol from Section {@NumberOf textures}, but without any following object. However, it's clunky to have to type both @Code texture and {@Code "@Texture"}, so by special arrangement you can omit the @Code "@Texture" symbol within the @Code "texture" option: @ID @Code "texture { striped angle { 45d } scale { 2 } }" The value of the @Code "texture" option may also be an expert's texture as required by {@Code "@SetTexture"}. Incidentally, there is no significance in our laying out all the options along one line. As always in Lout, the end of a line and a space mean the same. We've done it this way because we think it's the clearest way to lay out the @Code texture option. @PP Let's just summarize the painting and texturing possibilities for boxes. A box has three components: its outline, its background, and its content (what appears inside). You can actually set the colour and texture of all three components independently of each other, with a little trouble: @ID @OneRow @Code @Verbatim { black @Colour striped @Texture angle { 45d } @Box paint { lightgrey } linewidth { 2p } texture { striped angle { 90d } } darkgrey @Colour striped @Texture scale { 2 } 50p @Font ABC } produces @CD { black @Colour striped @Texture angle { 45d } @Box paint { lightgrey } linewidth { 2p } texture { striped angle { 90d } } darkgrey @Colour striped @Texture scale { 2 } 50p @Font ABC } The outline colour and texture are the colour and texture from outside the box; the background colour and texture are always determined by the @Code paint and @Code texture options; and the colour and texture of the contents are inherited from outside the box, but can be changed as shown if desired. Notice what happens when two textures overstrike: the lower one shows through the unpainted parts of the upper one. @PP There are @Code "@CurveBox" and @Code "@ShadowBox" symbols that curvebox. @Index @Code "@CurveBox" shadowbox. @Index @Code "@ShadowBox" produce other kinds of boxes: @CD @Tab @Fmta { @Col A ! @Col ! @Col B } { @Rowa A { @CurveBox { A curve box } } B { @ShadowBox { A shadow box } } } These also have {@Code "margin"}, {@Code "linewidth"}, {@Code "paint"}, and @Code "texture" options, and @Code "@ShadowBox" has a @Code "shadow" option which determines the thickness of the shadow (its default value is {@Code "0.2f"}). There is no option to change the colour of the shadow, but it is quite easy to combine two boxes to get that effect: @ID @OneRow @Code @Verbatim { lightgrey @Colour @ShadowBox margin { 0c } black @Colour @Box { A shadow box } } produces @CD lightgrey @Colour @ShadowBox margin { 0c } black @Colour @Box { A shadow box } in which the shadow, and only the shadow, is coloured light grey. @PP Boxes are quite at home inside paragraphs, as @Box { a box }, @CurveBox { a curve box }, and @ShadowBox { a shadow box } show. Simply proceed as usual: @ID @Code "... paragraphs, as @Box { a box }, @CurveBox { a curve box }, ..." Boxes within paragraphs are never broken across two lines. @PP There are two symbols for producing horizontal rules. @Code "@FullWidthRule" fullwidthrule. @Index @Code "@FullWidthRule" rules. @Index rules produces a rule which occupies the full page (or column) width: @DP @FullWidthRule @DP More precisely, the rule occupies as much horizontal space as it legally can. @Code "@FullWidthRule" produces an object in the usual way, so you will need paragraph or display symbols to separate it from preceding and following things. @PP A variant called @Code "@LocalWidthRule" is more timid about zooming localwidthrule. @Index @Code "@LocalWidthRule" across the whole page: @ID @Code { "@OddPageTop { { My lovely document @LP @LocalWidthRule } @Right @PageNum }" } will draw a rule under just the three words. Of course, underlining using the @Code "@Underline" symbol might be a better way to do this. @PP These two rule symbols are handled behind the scenes like the outlines of boxes. Both symbols have a @Code "linewidth" option which works like the one for boxes described above. In particular, Lout leaves zero space for the line, no matter how wide you make it. And to change the colour or texture of a rule, it must be enclosed in @Code "@Colour" and @Code "@Texture" symbols: @ID @Code "chessboard @Texture scale { 2 } @FullWidthRule linewidth { 8p }" produces @DP chessboard @Texture scale { 2 } @FullWidthRule linewidth { 8p } @DP Notice how we have made sure that the rule is wide enough to accommodate two rows of the chessboard texture. The author's printer places a thin row of solid colour along the top of this pattern. Logically it should not be there; it can be got rid of by reducing the line width: @ID @Code "chessboard @Texture scale { 2 } @FullWidthRule linewidth { 7.5p }" produces @DP chessboard @Texture scale { 2 } @FullWidthRule linewidth { 7.5p } @DP We can only guess that the problem might be roundoff error. @End @Section lout-3.39/doc/user/bas_drop0000644000076400007640000000274611363700677014333 0ustar jeffjeff@Section @Title { Drop capitals } @Tag { dropcaps } @Begin @PP There are two symbols for producing drop capitals, {@Code "@DropCapTwo"} drop.cap.two.sym @Index @Code "@DropCapTwo" drop.cap.three.sym @Index @Code "@DropCapThree" and {@Code "@DropCapThree"}. Place the capital to be dropped just before the symbol, and the rest of the paragraph after it: @ID @OneRow @Code { "I @DropCapTwo {" "t is a truth universally acknowledged, that a single man" "in possession of a good fortune, must be in want of a wife." "}" } produces the object @ID 3i @Wide { I @DropCapTwo { t is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife. } } @Code "@DropCapThree" is the same except that the capital is larger and spreads over three lines. @PP Because Lout occasionally gets the height of the enlarged capital slightly wrong, there is a @Code "height" option which allows you to change the height if you need to: @ID @OneRow @Code { "H @DropCapTwo height { 1.5v }" "{" " ..." "}" } This shows the default value for the height of the capital in {@Code "@DropCapTwo"}: 1.5 times the current inter-line spacing. The default height in @Code "@DropCapThree" is {@Code "2.5v"}. @PP These symbols produce an object which may appear anywhere in the usual way. A paragraph symbol will be needed after the paragraph. The paragraph breaking style of the body of the paragraph will be {@Code "adjust nohyphen"}; this cannot be changed at present. @End @Section lout-3.39/doc/user/pie0000644000076400007640000000221211363700677013303 0ustar jeffjeff@Chapter @Title { Pie Graphs } @Tag { pie } @Begin @LP This chapter describes how to draw pie graphs, using the @Code "@Pie" piegraphs. @Index { pie graphs } pie. @Index { @Code "@Pie" symbol } symbol. For example, @ID @OneRow -1px @Break @Code @Verbatim { @Pie { @Slice weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } } produces the pie graph @CD @Pie { @Slice weight { 20 } label { Admin (20%) } @Slice weight { 40 } paint { green } label { Research (40%) } @Slice weight { 40 } paint { lightred } label { Teaching (40%) } } This example shows off most of what @Code "@Pie" can do. # there are many options, but for the most part they offer # detailed adjustments, not additional features. @BeginSections @Include { pie_intr } @Include { pie_slic } @Include { pie_over } @Include { pie_capt } @Include { pie_labe } @Include { pie_erro } @Include { pie_summ } @EndSections @End @Chapter lout-3.39/doc/user/tbl_cell0000644000076400007640000001317611363700677014321 0ustar jeffjeff@Section @Title { Changing the appearance of cells } @Tag { tbl_cell } @Begin @PP The @Code "@Cell" symbol offers a few options for changing the appearance tables. @RawIndex { tables } tables.paint @SubIndex { @Code "paint" option } paint. @RawIndex { @Code "paint" option } paint.in.tables @SubIndex { in tables } tables. @RawIndex { tables } tables.font @SubIndex { @Code "font" option } font.option. @RawIndex { @Code "font" option } font.option.in.tables @SubIndex { in tables } tables. @RawIndex { tables } tables.break @SubIndex { @Code "break" option } break. @RawIndex { @Code "break" option } break.tables @SubIndex { in tables } of entries placed in it. Like all options, these appear immediately after the @Code "@Cell" symbol, with their values in braces: @ID @OneRow @Code @Verbatim { @Tbl aformat { @Cell paint { lightgrey } font { Italic } break { clines } A } { @Rowa A { IMPORTANT Do not throw stones at this notice } } } The result here is @CD @Tbl aformat { @Cell paint { lightgrey } font { Italic } break { clines } A | @Cell B } { @Rowa A { IMPORTANT Do not throw stones at this notice } } with a light grey background, Italic font, and @Code "clines" paragraph breaking style. The paint colour may be any colour from Section {@NumberOf colour}. @PP Wherever there is a @Code paint option in the standard packages, there is a neighbouring @Code texture option, which causes the paint to be tables. @RawIndex { tables } tables.texture @SubIndex { @Code "texture" option } texture.option. @RawIndex { @Code "texture" option } texture.option.in.tables @SubIndex { in tables } applied according to a given texture. For a list of available textures, consult Section {@NumberOf textures}; for how the @Code texture option works, consult the description of the @Code texture option to the @Code "@Box" symbol in Section {@NumberOf boxes} (all @Code texture options work in the same way). Here's an example: @ID @OneRow @Code @Verbatim { @Tbl width { 2f } height { 2f } aformat { @Cell paint { black } texture { brickwork } A | @Cell B | @Cell paint { black } texture { brickwork } C | @Cell D } bformat { @Cell A | @Cell paint { black } texture { brickwork } B | @Cell C | @Cell paint { black } texture { brickwork } D } { @Rowa @Rowb @Rowa @Rowb } } produces @FootNote { If you can't see any textures here, the fault is probably with your PostScript viewer. See Section {@NumberOf textures}. } @CD @OneRow @Tbl width { 2f } height { 2f } aformat { @Cell paint { black } texture { brickwork } A | @Cell B | @Cell paint { black } texture { brickwork } C | @Cell D } bformat { @Cell A | @Cell paint { black } texture { brickwork } B | @Cell C | @Cell paint { black } texture { brickwork } D } { @Rowa @Rowb @Rowa @Rowb } Another option, {@Code background}, allows an arbitrary object to be tables. @RawIndex { tables } tables.background @SubIndex { @Code "background" option } background.tables @Index { @Code "background" option (tables) } placed in the background of the cell, in front of any paint but behind the entry. @PP Later sections introduce other @Code "@Cell" options, for fixed-width columns, indented entries, margins, and rules. It is also possible to combine other symbols from Lout with cell formatting, by placing them between the @Code "@Cell" symbol and its following letter, rotated.entries @Index { rotated entries in tables } like this: @ID @OneRow @Code @Verbatim { @Tbl aformat { @Cell 90d @Rotate @S A | @Cell @B grey @Colour B } { @Rowa A { Col A } B { Col B } } } Think of the @Code "A" as standing for the value of the @Code "A" option of the @Code "@Rowa" symbol (which it does), and you'll see that this is just Lout's usual rule of symbols applying to the object that follows them. The result here is @CD @Tbl aformat { @Cell 90d @Rotate @S A | @Cell @B grey @Colour B } { @Rowa A { Col A } B { Col B } } In simple cases @Code "@B" is easier than {@Code "font { Bold }"}; the latter is useful as a default value, as we will see in a moment. Note the difference between a coloured background, obtained with {@Code "paint"}, and a coloured entry, obtained using the @Code "@Colour" symbol. @PP When an entry in a table consists of several paragraphs, it will usually be best to enclose it in {@Code "@OneRow"}, since otherwise @Code "@Tbl" is likely to take each paragraph as a separate row, leading to incorrect vertical spacing. A convenient way to do this is @ID @Code "aformat { @Cell @OneRow A | @Cell @OneRow B }" and so on. @PP @Code "@Tbl" offers many places where you can set cell options. The meaning of the option is the same wherever you set it; what changes is the extent of its application. Taking the @Code "paint" option as a representative example, the most specific place to set it is at a @Code "@Cell" symbol as above; then it affects only that cell in rows formatted using that format. Alternatively, @ID @OneRow @Code @Verbatim { @Tbl apaint { lightgrey } aformat { @Cell A | @Cell B } } will paint every cell in the {@Code "aformat"}. And @ID @OneRow @Code @Verbatim { @Rowa paint { lightgrey } A { ... } } will paint every cell in a particular row. To paint the entire table, use @ID @OneRow @Code @Verbatim { @Tbl paint { lightgrey } } And finally, there is a @Code "paint" option in the setup file (Section {@NumberOf tbl_setu}), which if set will paint every table in the document. When a more general setting of an option is contradicted by a more specific setting (e.g. when @Code "@Tbl" has @Code "paint { lightgrey }" but some cell or row has {@Code "paint { none }"}), the more specific setting applies. For a precise description, see Section {@NumberOf tbl_summ}. @End @Section lout-3.39/doc/user/mat_defs0000644000076400007640000000341011363700677014311 0ustar jeffjeff@Section @Title { Defining new mathematical symbols } @Begin @PP Whenever you type a particular piece of mathematics repeatedly, you can save time by using definitions. Definitions are the subject of Section {@NumberOf definitions}, so here we will just give a few examples mathematics.definitions @SubIndex { definitions, use with } definitions. @RawIndex { definitions } definitions.use.with.mathematics @SubIndex { use with mathematics } of their use in formatting mathematics. @PP Suppose for example that @OneCol @Math { p sub i ` log sub 2 ` p sub i } occurs frequently in your document. Then @ID @Code "def epi { p sub i ` log sub 2 ` p sub i }" makes the symbol @Code "epi" stand for the object between the braces: @ID { @Code @Verbatim { sum from { i=1 } to { n } ` epi } |7ct @Math { sum from { i=1 } to { n } ` epi } } Parameters are very useful when parts of the symbol vary: @ID @OneRow @Code @Verbatim { def ep right x { p sub x ` log sub 2 ` p sub x } } The parameter @Code x will be replaced by the object just to the right of {@Code "ep"}: @ID { @Code { "sum from { i=1 } to { k } ` ep i +" "sum from { j=k+1 } to { n } ep j" } ||7ct @Math { sum from { i=1 } to { k } ` ep i + sum from { j=k+1 } to { n } ep j } } The precedence of the symbols you define will be 100 by default. To make the symbols of @Code "@Math" available within such definitions, each must be preceded by {@Code "import @Math"}. As explained in Section {@NumberOf definitions}, the definitions go into a file called {@Code "mydefs"}, which might look like this: @ID @OneRow @Code @Verbatim { import @Math def epi { p sub i ` log sub 2 ` p sub i } import @Math def ep right x { p sub x ` log sub 2 ` p sub x } } Use of @Code "epi" and @Code "ep" outside @Code "@Math" will cause an error. @End @Section lout-3.39/doc/user/str_disp0000644000076400007640000001001511363700677014355 0ustar jeffjeff@Section @Title { Displays } @Tag { displays } @Begin @PP The @Code "@Display" symbol displays the following object in the centre displays. @Index displays display. @Index @Code "@Display" of the page or column: @ID @Code "@Display @I { Invitation to Afternoon Tea }" has result @Display @I { Invitation to Afternoon Tea } Space is inserted automatically above and below the display; no paragraph symbols are needed. @PP To make the display appear at the left margin instead of centred, use leftdisplay. @Index @Code "@LeftDisplay" {@Code "@LeftDisplay"} instead of {@Code "@Display"}. To make an indented display, use {@Code "@IndentedDisplay"} or {@Code "@QuotedDisplay"}; indenteddisplay. @Index @Code "@IndentedDisplay" quoteddisplay. @Index @Code "@QuotedDisplay" the latter indents at the right margin as well as at the left. There are also @Code "@CentredDisplay" and @Code "@CenteredDisplay" symbols which centreddisplay. @Index @Code "@CentredDisplay" centereddisplay. @Index @Code "@CenteredDisplay" centre the display just like {@Code "@Display"} does, and rightdisplay. @Index @Code "@RightDisplay" @Code "@RightDisplay" which right-justifies the display. @PP If you use displays frequently you might prefer abbreviated forms of their names. These are made from @Code "@" and the capital letters of d. @Index @Code "@D" ld. @Index @Code "@LD" id. @Index @Code "@ID" qd. @Index @Code "@QD" cd. @Index @Code "@CD" the full name: {@Code "@D"}, {@Code "@LD"}, {@Code "@ID"}, {@Code "@QD"}, and {@Code "@CD"}. Owing to a clash with the name of another symbol, {@Code "@RightDisplay"} has no abbreviation. @PP Displays often need to be set using a different font, paragraph breaking style, and so on to the surrounding text. It's best to set out such displays like this: @ID @OneRow @Code { "@CentredDisplay @I clines @Break {" "Invitation to Afternoon Tea" "with" "Mr. and Mrs. Gilbert Newington-Smith" "}" } You can have as many of these symbols as you like, including specialized ones like {@Code "@CurveBox"} and {@Code "@Tbl"}. The only rule is that the display symbol must come first: @Code "@I @Display ..." is wrong. @PP It's not a good idea to have one display immediately followed by another one, because there will be too much vertical space between them. Use a list instead (Section {@NumberOf lists}). Displays at the ends of paragraphs look awkward and are best avoided. @PP A display may come out partly on one page or column and partly on the next, if it has places where it obviously can be broken in two. For example, a display which is an ordinary paragraph of text might be broken in two between any two lines. To force a display to keep together on one page or column, use the @Code "@OneRow" symbol like this: @Code "@Display @OneRow { ... }". @PP Other display symbols produce aligned and numbered displays, and raw displays (i.e. without vertical space). Although these can display any object as usual, in practice they are used for mathematics, so they are described in Section {@NumberOf mathdisplays}. @PP Three setup file options control the appearance of displays. (For a general introduction to setup files and their options, consult Section {@NumberOf setup}.) Here they are with their default values: @ID @OneRow @Code { "@DisplayGap { 1.00v }" "@DefaultIndent { 0.5rt }" "@DisplayIndent { 2.00f }" } @Code "@DisplayGap" is the amount of vertical space inserted before and display.gap. @Index @Code "@DisplayGap" after displays, and may be any length (Section {@NumberOf objects}). The default value, @Code {"1.00v"}, is equal to the current inter-line spacing. @PP @Code "@DefaultIndent" is the indent produced by default.indent @Index @Code "@DefaultIndent" {@Code "@Display"}; {@Code "0.5rt"} produces centring, although why it does so is beyond our scope @Cite { $kingston1995lout.expert }. @Code "@DisplayIndent" is the display.indent. @Index @Code "@DisplayIndent" indent for {@Code "@IndentedDisplay"}, and used at both margins by {@Code "@QuotedDisplay"}. Its default value, {@Code "2.00f"}, is twice the current font size. @End @Section lout-3.39/doc/user/dia_link0000644000076400007640000003163311363700677014311 0ustar jeffjeff@Section @Tag { dia_link } @Title { Links } @Begin @PP @Code "@Diag" has one basic symbol for creating links, called diagrams. @RawIndex { diagrams } diagrams.link @SubIndex { @Code "@Link" symbol } link.diagrams @Index { @Code "@Link" symbol (diagrams) } {@Code "@Link"}. It draws a link between two points or nodes given by {@Code from} and {@Code to} options, along a path diagrams. @RawIndex { diagrams } diagrams.from @SubIndex { @Code "from" option } from.diagrams @Index { @Code "from" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.to @SubIndex { @Code "to" option } to.diagrams @Index { @Code "to" option (diagrams) } given by a {@Code path} option: diagrams. @RawIndex { diagrams } diagrams.path @SubIndex { @Code "path" option } path.diagrams @Index { @Code "path" option (diagrams) } @ID @Code @Verbatim { @Link path { ... } from { ... } to { ... } } Unlike {@Code "@Node"}, {@Code "@Link"} has no following object. @PP The @Code "path" option may be used to produce a link of any shape, as Section {@NumberOf dia_defi} explains. There are also values that produce standard paths. These are listed in full in the summary (Section {@NumberOf dia_summ}); here is a sample: @ID @Tab @Fmta { @Col @Code { path "{" A "}" } ! @Col ! @Col B } { @Rowa A { line } B { @Diag { A:: @Circle //1c ||2c B:: @Circle // @Link from { A } to { B } path { line } arrow { yes } } } @Rowa A { acurve } B { @Diag { A:: @Circle //1c ||2c B:: @Circle // @Link from { A } to { B } path { acurve } arrow { yes } } } @Rowa A { ccurve } B { @Diag { A:: @Circle //1c ||2c B:: @Circle // @Link from { A } to { B } path { ccurve } arrow { yes } } } @Rowa A { rvlcurve } B { @Diag { A:: @Circle //1c ||2c B:: @Circle // @Link from { A } to { B } path { rvlcurve } arrow { yes } } } } The name of the last one is a reminder that it goes right, then vertically, then left, with curved corners. The @Code acurve and @Code ccurve values produce circular arcs, anticlockwise and clockwise respectively, lying on the circle passing through the endpoints, or through the centres of the endpoints when they are tags denoting nodes. There is also @Code "curve" which is an abbreviation for {@Code "acurve"}. All these standard paths are defined in a way that makes sense no matter where the two nodes are relative to each other, except that no promise of a sensible result is made for two nodes very close together. @PP @Code "@Link" has two options, @Code bias and {@Code radius}, that may be diagrams. @RawIndex { diagrams } diagrams.bias @SubIndex { @Code "bias" option } bias.diagrams @Index { @Code "bias" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.radius @SubIndex { @Code "radius" option } radius. @RawIndex { @Code "radius" option } radius.in.diagrams @SubIndex { in diagrams } used to fine-tune the path. The @Code "bias" option determines the maximum distance that a curve is permitted to stray: @CD @Tab @Fmta { @Col A ! @Col ! @Col B } { @Rowa A { @Diag vstrut { no } margin { 0.5c } { A:: @Circle //1.5c ||2c B:: @Circle // LA:: @Line pathstyle { cdashed } from { A } to { B } LB:: @Curve from { A } to { B } @Line arrow { both } from { LA@LMID } to { LB@LMID } ylabel { @I bias } # ylabeladjust { 0.15c 0 } } } B { @Diag vstrut { no } margin { 0.5c } { A:: @Circle //1.5c ||2c B:: @Circle // LA:: @RVLCurve from { A } to { B } LB:: @Line pathstyle { cdashed } from { B@E } to { B@E ++ {0 2.5c} } @Line arrow { both } from { LB@LMID } to { LA@LMID } ylabel { @I bias } ylabeladjust { 0 0.05c } } } } The @Code radius option does @I not apply to @Code acurve and {@Code ccurve}; rather, it determines the radius of the arcs at the corners of @Code rvlcurve and its kin. A very large radius will be reduced to the largest reasonable value, which provides a way to get a semicircle at the right in an {@Code rvlcurve}. @PP Lout has no idea where the path is wandering, and cannot take it into account when placing a diagram on the page: @ID { @Code @Verbatim { @Link path { ccurve } bias { 2c } } ||7ct @Diag vstrut { no } { A:: @Circle &3c B:: @Circle // @Link path { ccurve } bias { 2c } from { A } to { B } } } In such cases you have to arrange for the extra space yourself, by adding an extra paragraph symbol, blank row or column in a table, or whatever. @PP As with the options of {@Code "@Node"}, the options of {@Code "@Link"} may all be given to {@Code "@Diag"} as well, where they apply to every link in the diagram, unless overridden in the usual way. They also appear in the setup file, where they apply to every link in every diagram of the document, unless overridden. @PP There are {@Code pathstyle}, {@Code pathdashlength} and {@Code pathwidth} diagrams. @RawIndex { diagrams } diagrams.pathstyle @SubIndex { @Code "pathstyle" option } pathstyle.diagrams @Index { @Code "pathstyle" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.pathdashlength @SubIndex { @Code "pathdashlength" option } pathdashlength.diagrams @Index { @Code "pathdashlength" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.pathwidth @SubIndex { @Code "pathwidth" option } pathwidth.diagrams @Index { @Code "pathwidth" option (diagrams) } options which affect the appearance of the path in the same way as the {@Code outlinestyle}, {@Code outlinedashlength} and {@Code outlinewidth} options of {@Code "@Node"} affect the outline. When {@Code pathstyle} contains just one value (as opposed to a sequence of values) @Code "@Diag" tries to divide the path into fewer segments than it would otherwise, to make dashed and dotted paths look as good as possible. There is also a {@Code pathgap} option which affects only @Code doubleline paths; it diagrams. @RawIndex { diagrams } diagrams.pathgap @SubIndex { @Code "pathgap" option } pathgap.diagrams @Index { @Code "pathgap" option (diagrams) } determines the gap between the centres of the two lines. @PP The @Code "@Link" symbol has an @Code arrow option, which adds an diagrams. @RawIndex { diagrams } diagrams.arrow.opt @SubIndex { @Code "arrow" option } arrow.opt.diagrams @Index { @Code "arrow" option (diagrams) } arrowhead to the end of the link: @ID { @Code @Verbatim { @Link arrow { yes } } ||7ct @Diag { 1c @High 3c @Wide // @Link from { 0,0 } to { 1,1 } arrow { yes } } } Its value may be {@Code no} (the default), {@Code yes}, {@Code forward} (which is the same as {@Code yes}), {@Code back}, or {@Code both}: @ID { @Code @Verbatim { @Link arrow { both } } ||7ct @Diag { 1c @High 3c @Wide // @Link from { 0,0 } to { 1,1 } arrow { both } } } @Code "@Link" has three options for controlling the appearance of arrowheads: {@Code arrowstyle}, {@Code arrowwidth}, and {@Code arrowlength}. Although every link symbol has these options, for diagrams. @RawIndex { diagrams } diagrams.arrowstyle @SubIndex { @Code "arrowstyle" option } arrowstyle.diagrams @Index { @Code "arrowstyle" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.arrowwidth @SubIndex { @Code "arrowwidth" option } arrowwidth.diagrams @Index { @Code "arrowwidth" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.arrowlength @SubIndex { @Code "arrowlength" option } arrowlength.diagrams @Index { @Code "arrowlength" option (diagrams) } consistency it is almost always better to set the corresponding options to the @Code "@Diag" symbol, which applies them to every arrow in the diagram: @ID @Code @Verbatim { @Diag arrowstyle { solid } arrowwidth { 0.3f } arrowlength { 0.5f } { ... } } This shows the default values: a solid arrowhead like the ones above, @Code "0.3f" wide (across) and @Code "0.5f" long. The @Code "arrowwidth" and @Code "arrowlength" options may be any length; it may be necessary to decrease @Code "arrowwidth" when many arrows enter one node. The full list of possible values for @Code "arrowstyle" is @ID @Tab @Fmta { @Col @Code { "arrowstyle {" A "}" } ! @Col B } vmargin { 1.0vx } { @Rowa A { solid } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { solid } } } @Rowa A { solidwithbar } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { solidwithbar } } } @Rowa A { halfopen } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { halfopen } } } @Rowa A { open } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { open } } } @Rowa A { curvedsolid } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { curvedsolid } } } @Rowa A { curvedhalfopen } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { curvedhalfopen } } } @Rowa A { curvedopen } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { curvedopen } } } @Rowa A { circle } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { circle } } } @Rowa A { box } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Circle // @Link from { A } to { B } arrow { yes } arrowstyle { box } } } @Rowa A { many } B { @Diag vstrut { no } { A:: @Circle |2c B:: @Box // @Link from { A } to { B } arrow { yes } arrowstyle { many } } } } The reader is invited to admire the beautifully sharp points on these arrowheads. @FootNote { The outlines of all nodes and arrowheads are drawn on the inside of the geometrical curve defining them, not centred over the curve as is common in PostScript documents. Hence, the arrowheads and node outlines intersect at a true geometrical point; they do not overlap by one line width. Furthermore, the standard link paths terminate at the base of the arrowhead, not at the point; the arrowhead itself is responsible for continuing the link path, at the appropriate width (although never dashed or dotted), from its base to its point, and hence can and does ensure that the link path does not overstrike and thicken the point of the arrow. } The arrow with style @Code solidwithbar has a bar at the tip of the arrowhead, whose length equals the width of the arrow and whose width is {@Code pathwidth}, like this: @ID @Diag { A:: @Box margin { 0i } outlinestyle { noline } 3c @Wide // @Link from { A@W } to { A@CTR } arrow { forward } arrowstyle { solidwithbar } @Link from { A@CTR } to { A@E } arrow { back } backarrowstyle { solidwithbar } } This example shows that half of the bar extends beyond the area allocated to the arrow, so that if two of these arrows meet from opposite directions, their bars will exactly overstrike. @PP Corresponding with {@Code arrowstyle}, {@Code arrowwidth}, and {@Code arrowlength}, there are {@Code backarrowstyle}, {@Code backarrowwidth}, and {@Code backarrowlength} options which diagrams. @RawIndex { diagrams } diagrams.backarrowstyle @SubIndex { @Code "backarrowstyle" option } backarrowstyle.diagrams @Index { @Code "backarrowstyle" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.backarrowwidth @SubIndex { @Code "backarrowwidth" option } backarrowwidth.diagrams @Index { @Code "backarrowwidth" option (diagrams) } diagrams. @RawIndex { diagrams } diagrams.backarrowlength @SubIndex { @Code "backarrowlength" option } backarrowlength.diagrams @Index { @Code "backarrowlength" option (diagrams) } determine the style and size of the back arrow; it doesn't have to be the same style or size as the forward arrow: @ID { @Code @Verbatim { @Link arrow { both } backarrowstyle { circle } } ||7ct @Diag { 1c @High 3c @Wide // @Link from { 0,0 } to { 1,1 } arrow { both } backarrowstyle { circle } } } It is also possible to place an arbitrary object at the beginning or end of a link, using the @Code "fromlabel" and @Code "tolabel" options of Section {@NumberOf dia_labe}. @PP To save time in common cases, @Code "@Diag" provides link symbols, each of which is just @Code "@Link" with one of the standard paths already set: {@Code "@Line"}, {@Code "@Curve"}, {@Code "@CCurve"}, diagrams. @RawIndex { diagrams } diagrams.line @SubIndex { @Code "@Line" symbol } line.diagrams @Index { @Code "@Line" symbol (diagrams) } diagrams. @RawIndex { diagrams } diagrams.curve @SubIndex { @Code "@Curve" symbol } curve.diagrams @Index { @Code "@Curve" symbol (diagrams) } {@Code "@RVLCurve"}, and so on. There are also symbols in which the @Code "arrow" option is set to @Code yes in addition: {@Code "@Arrow"}, diagrams. @RawIndex { diagrams } diagrams.arrow.sym @SubIndex { @Code "@Arrow" symbol } arrow.sym.diagrams @Index { @Code "@Arrow" symbol (diagrams) } {@Code "@CurveArrow"}, {@Code "@CCurveArrow"}, {@Code "@RVLCurveArrow"}, and so on. See the summary (Section {@NumberOf dia_summ}) for the full list of these symbols. You will still need the @Code "arrow" option to get backward arrows and double-ended arrows. @End @Section lout-3.39/doc/user/bas_star0000644000076400007640000001520111363700677014326 0ustar jeffjeff@Section @Title { Getting started } @Tag { start } @Begin @PP Suppose you want to produce the following little document: @CD @Box margin { 1.3c } 7.0c @Wide 9c @High { @Display @Heading { Introduction by W. J. Harvey } harvey.w.j @Index { Harvey, W. J. } For Virginia Woolf, @I Middlemarch was `the magnificent book which for all its imperfections is one of the few English novels written for grown-up people.' @PP She was, no doubt, thinking of George Eliot's unblinking but eliot.g @Index { Eliot, George } compassionate delineation of her characters, of the subtlety of psychological analysis and the maturity of moral comment which underlie this complex and varied novel of English provincial life in the early nineteenth century. } Unlike word processing and desktop publishing systems, with Lout you cannot see and edit your document on the screen in this finished form. Instead, you edit an ordinary text file, in which your text is augmented with symbols that mark out the headings, paragraphs, and so on. Although it would be nice to be able to see and edit the finished form, working with a text file and symbols does have some compensating advantages. @PP The first step in producing your introduction to @I Middlemarch is to use the text editor of your choice to construct this text file: @ID @OneRow @Code { "@SysInclude { doc }" "@Doc @Text @Begin" "@Display @Heading { Introduction by W. J. Harvey }" "For Virginia Woolf, @I Middlemarch was `the magnificent book which for all its" "imperfections is one of the few English novels written for grown-up people.'" "@PP" "She was, no doubt, thinking of George Eliot's unblinking but compassionate" "delineation of her characters, of the subtlety of psychological analysis and" "the maturity of moral comment which underlie this complex and varied novel" "of English provincial life in the early nineteenth century." "@End @Text" } Comparing this with the finished form, it's easy to guess that @Code "@I" is a symbol that causes the following thing to be printed in italics, and that @Code "@PP" starts a new paragraph. The other symbols are not much harder. @PP @Code "@SysInclude { doc }" instructs Lout to read a @I { setup file } called {@Code "doc"}, in which the symbols are defined. Setup files are the subject of Chapter {@NumberOf changes}, but you can go a long way without worrying about them. @Code "@Doc @Text @Begin" and @Code "@End @Text" have no visible effect, but they must bracket the document as a whole. Again, you don't have to know what they are for. @PP That explains everything except the part that produces the heading. It's an interesting glimpse of the way that Lout's symbols cooperate with each other: @ID @Code "@Display @Heading { Introduction by W. J. Harvey }" The @Code "@Display" symbol does the centring and leaves space above and below, while @Code "@Heading" switches to a bold font. The braces group the words of the heading together so that these symbols apply to all of it; without them they would apply to just the first word. All this is explained in detail in Sections {@NumberOf objects} and {@NumberOf spaces}. @PP Once the file is ready, the next step is to get it processed by the Basser Lout interpreter. If the file's name is {@Code "intro"}, the command for this on the Unix @FootNote { Unix is a trademark. } operating system is @ID @Code "lout intro > intro.ps" The output is the PostScript @FootNote { PostScript is a trademark of Adobe Systems, Inc. } file {@Code "intro.ps"}, which is suitable for printing on many laser printers and other devices. There are programs that show you the result on your screen as well, although you won't be able to edit it there. You can also get plain text output (Section {@NumberOf plain}) and PDF output. @PP There are a few points that often confuse people as they begin, so we'll treat them briefly now with pointers to later sections where they are done properly. @PP Some characters are symbols that produce special effects -- for example, @Code "{" and @Code "}" produce grouping -- and to turn off these effects the characters must be enclosed in double quotes: @Code "\"{\"" produces "{". The complete set of these special characters is @ID @Code "/ | & { } # @ ^ ~ \\ \"" Section {@NumberOf characters} treats unusual characters in full detail. @PP Symbols like @Code "@Doc" and @Code "@Text" must be separated from each other by one or more spaces, otherwise Lout will think they are part of one symbol. See Section {@NumberOf spaces} for the details. @PP People familiar with other systems might expect that leaving a blank line would cause Lout to start a new paragraph; but this is not so, you must use a paragraph symbol. Lout will ordinarily take notice of how many spaces you type between words (Section {@NumberOf spaces}), but it will mimic the spacing rules of two other systems, troff and @TeX, if you prefer (Section {@NumberOf white}). @PP When Lout runs, you might see some error messages containing the words errors. @Index { errors } `unresolved cross reference' and `no destination point' -- not on file @Code "intro" above, but on more complicated ones (anything with a footnote, for example). These just mean that you have to run the @Code "lout" command again to finish off the complicated things (Section {@NumberOf cross}), and they will gradually go away. Of course, if you see error messages about missing braces, unknown symbols, and so on, you need to revise your file. Lout will tell you the line number of the problem, and how far along the line it is. @PP @BI { WARNING: } Lout allows documents to cause arbitrary system commands to be executed. These typically do useful things such as format computer programs and uncompress graphics files, but it is possible for a malicious person to send you a document which includes a command to delete all your files, send abusive mail to the President of the United States in your name, etc. You can protect yourself against this possibility by using the `safe execution' flag: @ID @Code "lout -S suspect.document > out.ps" Then no system commands will be executed; instead, Lout will print them so that you can confirm for yourself that they are safe before running again without the flag. These system commands are Lout's only potentially unsafe features, but you also need to worry about whether the resulting PostScript file contains malicious code, since the document may direct Lout to include arbitrary PostScript code in the output. The safe execution of PostScript programs is a matter for PostScript interpreters, not for Lout. For example, the popular Ghostview program has a @Code "-safer" command line option, which is rumoured to disable unsafe PostScript features. @End @Section lout-3.39/doc/user/gra_plac0000644000076400007640000000511311363700677014301 0ustar jeffjeff@Section @Title { Placing arbitrary objects on the graph } @Tag { arbobj } @Begin @PP As we have just seen, the repertoire of symbols that @Code "@Data" is able to place on the graph is quite limited. However, there is a way to place any number of arbitrary Lout objects anywhere on the graph, using the @Code objects option to the @Code "@Graph" symbol: graphs. @RawIndex { graphs (statistical) } graphs.objects @SubIndex { @Code objects option } objects.graph @Index { @Code "objects" option (graphs) } @ID @OneRow @Code @Verbatim { @Graph objects { @CTR at {2.5 6.0} @Math { y = x sup 2 } @CTR at {4.5 7.0} @Math { y = x sup 3 } } } where we have used the @Code "@Math" symbol from Chapter {@NumberOf mathematics} to place two equations onto the graph at the points {@Code "2.5 6.0"} and {@Code "4.5 7.0"} respectively. An example result appears in the next section. @PP In addition to {@Code "@CTR"}, there are eight other symbols which may be used within the @Code "objects" option in the same way: {@Code "@NW"}, {@Code "@SW"}, {@Code "@SE"}, {@Code "@NE"}, {@Code "@N"}, {@Code "@W"}, {@Code "@S"}, and {@Code "@E"}. These place the object just to the northwest of the point, to the southwest, and so on instead of centring it over the point. By `to the northwest' we mean that the object's bottom right corner coincides with the point, and similarly for the other symbols. @PP Each of these symbols has a @Code "margin" option which enlarges the object by adding a margin: @ID @Code "@NW at {2.5 6.0} margin { 0.3f } @Eq { y = x sup 2 }" shows the default value, 0.3 times the current font size. As the margin is increased, the object moves further away from the point. @PP The major advantage of the @Code "objects" option over the @Code "@Data" symbol is that arbitrary Lout objects may be used. The @Code "@Data" symbol however is able to place many copies of its symbols onto the graph, and also allow for them when connecting points together with lines. Also, the points within the @Code "objects" option are not taken into account when deciding on the permissible range of x and y values, whereas the points within the @Code "@Data" symbol are. Altogether it seems best to use the @Code "@Data" symbol for the bulk of the data points, and to use the @Code "objects" option for adding a small number of labels or other decorations. @PP The @Code "objects" option may contain @Code "@Graph" symbols, but in that case, owing to a deficiency in the implementation, those symbols must have their @Code save options (Section {@NumberOf grerrors}) set to {@Code yes}. @End @Section lout-3.39/doc/user/prg_tabs0000644000076400007640000000671411363700677014342 0ustar jeffjeff@Section @Title { Dealing with tab characters in programs } @Tag { tabs } @Begin @PP Tab characters provide a convenient way to indent and align parts of programs. @RawIndex { programs } programs.tab.characters @SubIndex { tab characters } tab.characters.programs @Index { tab characters in programs } computer programs. With care, this alignment can be preserved in the final print even with varying-width fonts. @PP The distance between two tab stops in the program text is by default taken to be 8 characters, which is standard for Unix. This can be changed with programs. @RawIndex { programs } programs.tabin @SubIndex { @Code "tabin" option } tabin.programs @Index { @Code "tabin" option (programs) } the @Code "tabin" option. For example, @ID @Code "@CP tabin { 4 }" informs Lout that tab stops occur every 4 characters in the program text. All the symbols ({@Code "@CP"}, {@Code "@Eiffel"}, etc.) and their setup files have this option and the next; but to save repetition we will stick with C for the rest of this section. @PP The distance between two tab stops on the printed page is quite a different thing, and it is determined by the value of the @Code "tabout" option, which programs. @RawIndex { programs } programs.tabout @SubIndex { @Code "tabout" option } tabout.programs @Index { @Code "tabout" option (programs) } must be a Lout length. For example, @ID @Code "@CP tabout { 0.5i }" requests that tab stops be placed at half-inch intervals. In other words, a distance of one tab stop in the program text will be equivalent to a distance of half an inch on the printed page. For example, @ID @Code "@CP style { varying } tabout { 3f } numbered { Yes }" might produce the following, where tab characters in the program text have been used for indenting and also to align the comments: @ID @OneRow @CP style { varying } tabout { 3f } numbered { Yes } { struct tnode { /* the basic node */ char *word; /* points to the text */ int count; /* number of occurrences */ struct tnode *left; /* left child */ struct tnode *right; /* right child */ }; } We've used @Code "numbered { Yes }" to demonstrate that the features for dealing with tabs work even with line numbers. The value {@Code "3f"} means three times the current font size, and it is the default value of @Code "tabout" for the @Code { varying } and @Code { symbol } styles (Section {@NumberOf cpsetup}). In a 12 point font this is 36 points, or half an inch. @PP If @Code "tabout" is too small, there is a danger that the alignment might fail. For example, @ID @Code "@CP style { varying } tabout { 0.2i }" produces @ID @OneRow @CP style { varying } tabout { 0.2i } { struct tnode { /* the basic node */ char *word; /* points to the text */ int count; /* number of occurrences */ struct tnode *left; /* left child */ struct tnode *right; /* right child */ }; } given the same C text as the previous example. The problem here is that we are asking for @CP { /* } to appear four tab stops or 0.8 inches from the left edge, and yet the material to its left on the line is wider than this. This causes @CP { /* } to be shifted further to the right than expected, and the alignment is lost. The only solution is to increase {@Code "tabout"}. @PP When typesetting computer program texts independently of any document, there are @Code "-t" and @Code "-T" options to the @Code "prg2lout" program equivalent to @Code "tabin" and @Code "tabout" respectively. For example, @Code "-T0.5i" produces a half-inch tab width. @End @Section lout-3.39/doc/user/prg_comm0000644000076400007640000000630611363700677014341 0ustar jeffjeff@Section @Title { Embedding Lout commands within program comments } @Tag { cpcomm } @Begin @PP It is possible to embed Lout text inside program comments. How this programs. @RawIndex { programs } programs.loutcode @SubIndex { Lout code embedded in } loutcode.programs @Index { Lout code embedded in programs } is done could in principle vary from language to language, but in every language supported so far it is done by starting off the comment with an @Code "@" character. If the language has several ways to get a comment, this will work every way. The entire comment after the @Code "@" character should then be Lout text. For example, to force Lout to start a new page at some point within a C program, place @ID @Code "/*@ @NP */" at that point. (In this case you can also simply include a formfeed character without any comment; see Section {@NumberOf formfeed} for more on this.) Or, to make a heading in an Eiffel program, do this: @ID @Code "--@ @Display @Heading { treeprint }" (Eiffel comments begin with @Code "--" and end at the end of the line.) Other possible uses for this feature include index entries and margin notes. Incredible as it may seem, you can even write @ID @Code "/*@ @CD @Heading { Function @CP { treeprint() } } */" with @Code "@CP" and C code inside the Lout code inside the C code. You probably can't go further, however, at least not in C, since that would require a C comment inside a C comment. @PP It's possible to get quite long Lout insertions, with a bit of care. For example, here's how to get a filled paragraph of text into a computer program: @ID @OneRow @Code @Verbatim { @Eiffel { --@@ID ragged @Break { --@This program is free software; you can redistribute --@it and"/"or modify it under the terms of the --@@B { GNU General Public License } as published by --@the Free Software Foundation; either Version 2, or --@(at your option) any later version. --@} launch(x: APPLICATION) is -- launch the application deferred } } produces @ID @OneRow @Eiffel { --@@ID ragged @Break { --@This program is free software; you can redistribute --@it and"/"or modify it under the terms of the --@@B { GNU General Public License } as published by --@the Free Software Foundation; either Version 2, or --@(at your option) any later version. --@} launch(x: APPLICATION) is -- launch the application deferred } This example relies on the fact that @Code prg2lout passes escape comments like these through to Lout absolutely untouched. Notice the use of both a display symbol ({@Code "@ID"}) and a change to the break style ({@Code "ragged @Break"}). If the change of break style had been omitted, the break style of the surrounding program, {@Code "lines @Break"}, would have been applied to the displayed paragraph. The display symbol is needed because without it the paragraph would be an integral part of the surrounding program (which is actually considered by Lout to be one paragraph), making the @Code "ragged @Break" ineffective since you can't change the paragraph style in the middle of a paragraph. @PP Clearly, use of such escape comments in conjunction with line numbers is going to be problematic. No promise is made that the result of doing that will make sense. @End @Section lout-3.39/doc/user/gra_summ0000644000076400007640000002753311363700677014355 0ustar jeffjeff@Section @Title { Summary } @Tag { grsummary } @Begin @PP The options to the @Code "@Graph" symbol, their default values, and graphs. @RawIndex { graphs (statistical) } graphs.summary @SubIndex { summary of all options } their possible values are: @ID -2.5px @Break -1p @Font @Tab hmargin { 0.15c } @Fmta { @Col @Code { " "A } ! @Col @Code "{" ! @Col @Code B ! @Col @Code "}" ! @Col ! @Col ! @Col C } @Fmtb { @Col @Code A ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col } { @Rowb A { "@Graph" } @Rowa A { style } B { frame } C { {@Code frame}, {@Code grid}, {@Code axes}, or {@Code none} } @Rowa A { width } B { 6.0c } C { any @I distance } @Rowa A { height } B { 4.0c } C { any @I distance } @Rowa A { xextra } B { 0.5c } C { any @I distance ({@Code axes} and {@Code none} default is {@Code "0c"}) } @Rowa A { yextra } B { 0.5c } C { any @I distance ({@Code axes} and {@Code none} default is {@Code "0c"}) } @Rowa A { xdecreasing } B { no } C { @Code yes or @Code no } @Rowa A { ydecreasing } B { no } C { @Code yes or @Code no } @Rowa A { leftcaption } B { } C { any Lout object } @Rowa A { rightcaption } B { } C { any Lout object } @Rowa A { abovecaption } B { } C { any Lout object } @Rowa A { belowcaption } B { } C { any Lout object } @Rowa A { leftgap } B { 1.5c } C { any @I distance } @Rowa A { rightgap } B { 0.5c } C { any @I distance } @Rowa A { abovegap } B { 0.5c } C { any @I distance } @Rowa A { belowgap } B { 0.5c } C { any @I distance } @Rowa A { hidecaptions } B { yes } C { @Code yes or @Code no } @Rowa A { xorigin } B { none } C { {@Code none} or any @I number } @Rowa A { yorigin } B { none } C { {@Code none} or any @I number } @Rowa A { xlog } B { none } C { {@Code none} or any @I number greater than 1 } @Rowa A { ylog } B { none } C { {@Code none} or any @I number greater than 1 } @Rowa A { xmin } B { none } C { @Code none or any {@I number} } @Rowa A { xmax } B { none } C { @Code none or any {@I number} } @Rowa A { ymin } B { none } C { @Code none or any {@I number} } @Rowa A { ymax } B { none } C { @Code none or any {@I number} } @Rowa A { xticksep } B { none } C { {@Code none} or any @I number greater than 0 } @Rowa A { yticksep } B { none } C { {@Code none} or any @I number greater than 0 } @Rowa A { rticksep } B { none } C { {@Code none} or any @I number greater than 0 } @Rowa A { xticks } B { auto } C { @I sequence (of numbers and strings), or @Code auto meaning automatic } @Rowa A { yticks } B { auto } C { @I sequence (of numbers and strings), or @Code auto meaning automatic } @Rowa A { rticks } B { } C { @I sequence (of numbers and strings), or @Code auto meaning automatic } @Rowa A { xticklength } B { 0.5f } C { any @I distance } @Rowa A { yticklength } B { 0.5f } C { any @I distance } @Rowa A { rticklength } B { 0.5f } C { any @I distance } @Rowa A { objects } B { } C { sequence of {@Code "@CTR"}, {@Code "@NW"}, {@Code "@SW"}, {@Code "@SE"}, {@Code "@NE"}, {@Code "@N"}, {@Code "@W"}, {@Code "@S"}, {@Code "@E"} symbols } @Rowa A { points } B { none } C { {@Code none}, {@Code plus}, {@Code cross}, {@Code square}, {@Code filledsquare}, {@Code diamond}, {@Code filleddiamond}, {@Code circle}, {@Code filledcircle}, {@Code triangle}, {@Code filledtriangle} } @Rowa A { pairs } B { none } C { {@Code none}, {@Code solid}, {@Code dashed}, {@Code dotted}, {@Code dotdashed}, {@Code dotdotdashed}, {@Code dotdotdotdashed}, {@Code yhisto}, {@Code xhisto}, {@Code filledyhisto}, {@Code filledxhisto}, {@Code surfaceyhisto}, {@Code surfacexhisto} } @Rowa A { "colour/color" } B { none } C { {@Code none} or any colour from Section {@NumberOf colour}} @Rowa A { paint } B { no } C { {@Code no} or {@Code yes} } @Rowa A { texture } B { solid } C { any texture from Section {@NumberOf textures} } @Rowa A { dataformat } B { xandy } C { {@Code xandy}, {@Code yonly}, {@Code xonly}, {@Code swapxandy} } @Rowa A { dashlength } B { 0.2f } C { any @I distance } @Rowa A { linewidth } B { 0.5p } C { any @I distance } @Rowa A { symbolsize } B { 0.15f } C { any @I distance } @Rowa A { symbollinewidth } B { 0.5p } C { any @I distance } } @I Number means an ordinary decimal number; @I distance means a number with a unit of measurement (Section {@NumberOf objects}), such as @Code { 5c } or {@Code 0.5f}. In general, numbers denote x or y values while distances denote lengths on the printed result. @PP The minimum plottable x value is the minimum of all the x data, {@Code xticks}, {@Code xorigin}, {@Code xmin}, and {@Code xmax} whenever these are not {@Code none}. If @Code xticks is {@Code none}, this minimum may be reduced further to a `round' number. The maximum plottable x value is the maximum of the same values, and it may be increased further if {@Code xticks} is {@Code none}. Similar remarks apply to y values. @PP The value of the @Code "objects" option is a sequence of zero or more of the following: @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col { @Code "at {" @I expression @I expression @Code "}" } ! @Col @I object } { @Rowa A { @Code "@CTR" } @Rowa A { @Code "@NW" } @Rowa A { @Code "@SW" } @Rowa A { @Code "@SE" } @Rowa A { @Code "@NE" } @Rowa A { @Code "@N" } @Rowa A { @Code "@W" } @Rowa A { @Code "@S" } @Rowa A { @Code "@E" } } where @I object is an arbitrary Lout object. Each of these nine symbols also has a @Code "margin" option whose value may be any non-negative distance, with default value {@Code "0.3f"}. @PP The options to the @Code "@Data" symbol, their default values, and their possible values are: @ID 0.85vx @Break @Tab hmargin { 0.15c } @Fmta { @Col @Code { " "A } ! @Col @Code "{" ! @Col @I inherited ! @Col @Code "}" ! @Col ! @Col ! @Col C } @Fmtb { @Col A ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col } { @Rowb A { @Code "@Data" } @Rowa A { points } C { {@Code none}, {@Code plus}, {@Code cross}, {@Code square}, {@Code filledsquare}, {@Code diamond}, {@Code filleddiamond}, {@Code circle}, {@Code filledcircle}, {@Code triangle}, {@Code filledtriangle} } @Rowa A { pairs } C { {@Code none}, {@Code solid}, {@Code dashed}, {@Code dotted}, {@Code dotdashed}, {@Code dotdotdashed}, {@Code dotdotdotdashed}, {@Code yhisto}, {@Code xhisto}, {@Code filledyhisto}, {@Code filledxhisto}, {@Code surfaceyhisto}, {@Code surfacexhisto} } @Rowa A { "colour/color" } C { {@Code none}, or any colour name from Section {@NumberOf colour} } @Rowa A { paint } C { {@Code no} or {@Code yes} } @Rowa A { texture } C { Any texture from Section {@NumberOf textures} } @Rowa A { dataformat } C { {@Code xandy}, {@Code yonly}, {@Code xonly} } @Rowa A { dashlength } C { any @I distance } @Rowa A { linewidth } C { any @I distance } @Rowa A { symbolsize } C { any @I distance } @Rowa A { symbollinewidth } C { any @I distance } @Rowb A { @Code "{" @I sequence @Code "}" } C { any @I sequence } } @I Inherited means that the default value is taken from the @Code "@Graph" option with the same name. @PP The right parameter of @Code "@Data" contains a @I sequence of zero or more {@I expressions}. The {@Code xticks}, {@Code yticks}, and {@Code rticks} options also are sequences, which may contain @Code "@" and labels as well as expressions. An @I expression is any of the following (operators are shown in decreasing precedence order, with the precedence, if relevant, at right): @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col ! @Col B } { @Rowa A { @I number } @Rowa A { @Code x (within @Code xloop only) } @Rowa A { @Code y (within @Code yloop only) } @Rowa A { @Code z (within @Code zloop only) } @Rowa A { @Code pi } @Rowa A { @Code e } @Rowa A { @Code "{" @I expression @Code "}" } @Rowa A { @Code "sqrt" @I expression } B { 40 } @Rowa A { @Code "abs" @I expression } B { 40 } @Rowa A { @Code "ceiling" @I expression } B { 40 } @Rowa A { @Code "floor" @I expression } B { 40 } @Rowa A { @Code "truncate" @I expression } B { 40 } @Rowa A { @Code "round" @I expression } B { 40 } @Rowa A { @Code "cos" @I expression } B { 40 } @Rowa A { @Code "sin" @I expression } B { 40 } @Rowa A { @I expression @Code "atan" @I expression } B { 39 } @Rowa A { @I expression @Code "exp" @I expression } B { 38 } @Rowa A { @I expression @Code "log" @I expression } B { 37 } @Rowa A { @I expression @Code "rand" @I expression } B { 36 } @Rowa A { @I expression @M { non * } @I expression } B { 35 } @Rowa A { @I expression @Code "/" @I expression } B { 34 } @Rowa A { @I expression @Code "idiv" @I expression } B { 34 } @Rowa A { @I expression @Code "mod" @I expression } B { 34 } @Rowa A { @I expression @M { non - } @I expression } B { 33 } @Rowa A { @M { non - } @I expression } B { 33 } @Rowa A { @I expression @Code "+" @I expression } B { 32 } @Rowa A { @Code "+" @I expression } B { 32 } @Rowa A { @Code "if cond {" @I boolean @Code "} then {" @I expression @Code "} else {" @I expression @Code "}" } } A @M { non - } immediately followed by a digit or decimal point is always taken to be a minus sign, never a subtraction. The left parameter of @Code "exp" and @Code "log" is the base of the exponentiation and logarithm respectively; @Code "idiv" is integer division; and @Code "rand" returns a uniform random integer lying between its two parameters (inclusive). Now a @I sequence is zero or more of the following: @ID @Tab vmargin { 0.5vx } @Fmta { @Col A } { @Rowa A { 2c @Wide "@" (within {@Code xticks}, {@Code yticks}, and {@Code rticks} only) } @Rowa A { 2c @Wide { ({@I label}) } (within {@Code xticks}, {@Code yticks}, and {@Code rticks} only) } @Rowa A { @I expression } @Rowa A { @Code "xloop from {" @I expression @Code "} to {" @I expression @Code "} by {" @I expression @Code "} do {" @I sequence @Code "}" } @Rowa A { @Code "yloop from {" @I expression @Code "} to {" @I expression @Code "} by {" @I expression @Code "} do {" @I sequence @Code "}" } @Rowa A { @Code "zloop from {" @I expression @Code "} to {" @I expression @Code "} by {" @I expression @Code "} do {" @I sequence @Code "}" } @Rowa A { @Code "if cond {" @I boolean @Code "} then {" @I sequence @Code "} else {" @I sequence @Code "}" } } The @Code "by" part of the loop symbols is optional with default value 1; the @Code "else" part of @Code "if" is optional with default value equal to the empty sequence. A @I boolean is any one of the following things, again shown in decreasing precedence order, with the precedence at right: @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col ! @Col B } { @Rowa A { @Code true } @Rowa A { @Code false } @Rowa A { @Code "{" @I boolean @Code "}" } @Rowa A { @I expression @Code = @I expression } B { 30 } @Rowa A { @I expression @Code != @I expression } B { 30 } @Rowa A { @I expression @Code < @I expression } B { 30 } @Rowa A { @I expression @Code <= @I expression } B { 30 } @Rowa A { @I expression @Code > @I expression } B { 30 } @Rowa A { @I expression @Code >= @I expression } B { 30 } @Rowa A { @Code not @I boolean } B { 25 } @Rowa A { @I boolean @Code and @I boolean } B { 24 } @Rowa A { @I boolean @Code xor @I boolean } B { 23 } @Rowa A { @I boolean @Code or @I boolean } B { 22 } @Rowa A { @Code "if cond {" @I boolean @Code "} then {" @I boolean @Code "} else {" @I boolean @Code "}" } } @End @Section lout-3.39/doc/user/str0000644000076400007640000000063411363700677013344 0ustar jeffjeff@Chapter @Title { Adding Structure to Documents } @Tag { structure } @Begin @BeginSections @Include { str_disp } @Include { str_list } @Include { str_foot } @Include { str_marg } @Include { str_theo } @Include { str_figs } @Include { str_larg } @Include { str_cros } @Include { str_cont } @Include { str_glos } @Include { str_indx } @Include { str_colu } @Include { str_defs } @EndSections @End @Chapter lout-3.39/doc/user/tbl_setu0000644000076400007640000000555211363700677014361 0ustar jeffjeff@Section @Title { Changing the overall format } @Tag { tbl_setu } @Begin @PP All of the options apart from the @Code format options can be changed tables. @RawIndex { tables } tables.setup @SubIndex { setup file } setup.files. @RawIndex { setup files } setup.files.for.tables @SubIndex { for tables } in the @Code { tbl } setup file, in which case the new values become the default values for every table in the document. This section explains how to do it. Changing options in the setup file can save a lot of time, but its more important purposes are to promote consistency and to allow document-wide formatting changes to be carried out easily. @PP The first step is to obtain your own copy of the setup file, @Code { tbl }, from the Lout system include directory. You can find out where that is by typing @ID @Code { lout -V } This prints out various things about Lout. Supposing that it says that the Lout system include directory is @Code { "/usr/lout/include" }, for example, you can copy the setup file into your current directory, renaming it @Code { mytbl }, with the Unix command @ID @Code "cp /usr/lout/include/tbl mytbl" or its equivalent on your system. You will also need to make @Code { mytbl } writable. @PP The next step is to replace the @Code "@SysInclude { tbl }" line at the start of your document with @Code { "@Include { mytbl }" }. This causes Lout to read your copy of the setup file, not the one in the system include directory. Since the two files are currently identical, this has changed nothing so far, but now you can change the options within @Code mytbl and the changes will affect your document. @PP Your copy of the setup file has some lines beginning with @Code "#" that are ignored by Lout, and then it has @Code { "@SysInclude { tblf }" }. This line tells Lout to read file @Code tblf which contains the definition of the @Code tbl package, so it should not be changed. After it comes the @Code "@TblSetup" @Code "@Use" clause, which looks like this: @ID @OneRow @Code @Verbatim { @Use { @TblSetup # paint { none } # font { } # break { } } } Only a few of the options are shown here. To change a setup file option, delete the @Code "#" in front of it and change the value. For example, suppose you want all table entries two points smaller than the surrounding text: @ID @OneRow @Code @Verbatim { @Use { @TblSetup # paint { none } font { -2p } # break { } } } This relative specification of font size is available anywhere, not just in setup files (Section {@NumberOf fonts}). @PP Some setup file options contain values which use the @Code "@OrIfPlain" symbol: @ID @Code "marginvertical { 0.3f @OrIfPlain 1f }" This means that the value of @Code marginvertical is to be @Code "0.3f" usually, but @Code 1f in plain text documents. Feel free to leave these symbols there when you change a value, or delete them if you prefer. @End @Section lout-3.39/doc/user/prg_form0000644000076400007640000000475511363700677014357 0ustar jeffjeff@Section @Title { Dealing with formfeed characters in programs } @Tag { formfeed } @Begin @PP The formfeed (Control-L) character is traditionally taken to be a programs. @RawIndex { programs } programs.formfeeds @SubIndex { formfeed characters in } formfeeds.programs @Index { formfeed characters in programs } request to start a new page. This is explicitly recognized by the formal definition of the C language and many others, which treat this character as white space from a language point of view, with the understanding that it will cause a page break when printed. @PP There are no @Code { prg2lout } options for dealing with formfeed characters. They will be converted into @Code "@NP" (new page) symbols, causing a new page or column to be begun in the printing. @PP Whether formfeed characters end their line or not is a problem. Consider this example, where @Code "^L" stands for one formfeed character: @ID @Code @Verbatim { abc def^Lghi jhk } How many lines does this example contain? Your text editor would probably say `three', but when you print it you will see four. It is not desirable to have printed programs (especially those with line numbers attached) disagreeing with text editors about line numbers. The solution adopted by @Code { prg2lout } to this problem is to treat the formfeed character as including a newline, but to assign the same line number to both parts of the original line (the parts before and after the formfeed). If the part after the formfeed is empty (that is, if the formfeed character is immediately followed by a newline or another formfeed), and if the formfeed is not inside any lexical unit, then the empty line after the formfeed will not be printed at all. @PP The most common case is that of a formfeed character, outside any lexical unit, on a line by itself. Let's see what this rule produces in the following example of this case: @ID @Code @Verbatim { abc def ^L ghi } There will be one blank line numbered 3 at the end of the first page, and a line numbered 4 and containing @Code ghi at the start of the next page. The blank line is a necessity, at least when lines are being numbered, because we want the last line in the example to be numbered 4 to agree with text editors, but we don't want the line numbers on our print to skip from 2 on the first page to 4 on the second, because that would make readers anxious about the apparently missing line 3. If you don't want that empty line, move the formfeed character to the end of the preceding line. @End @Section lout-3.39/doc/user/bgr_scal0000644000076400007640000000523611363700677014313 0ustar jeffjeff@Section @Title { Scaling } @Tag { scaling } @Begin @PP The @Code "@Scale" symbol performs a geometrical scaling of the scale. @Index @Code "@Scale" following object: @ID @Code { "0.5 @Scale @Box WARNING!" } produces @ID { 0.5 @Scale @Box WARNING! } A scale factor of 0.5 means half the original size, 2.0 means double size, and so on. No unit of measurement appears in the scale factor, because it makes no sense to have one. As usual, the object to be scaled may be arbitrary. @PP It is also possible to supply two scale factors, in which case the first is applied horizontally and the second vertically: @ID @Code "{0.5 2.0} @Scale @Box WARNING!" has result @ID {0.5 2.0} @Scale @Box WARNING! Practical uses for this kind of scaling are rare. @PP If an empty object is given instead of a scale factor, like this: @ID @Code "{} @Scale @Box WARNING!" the @Code "@Scale" symbol will choose the largest scale factor that does not overrun the available horizontal space. It is often possible to omit the {@Code "{}"}, since Lout inserts an empty object automatically whenever an object is clearly missing (see Section {@NumberOf objects}). For example, @ID @Code "@QuotedDisplay @Scale @Box WARNING!" produces @QuotedDisplay @Scale @Box WARNING! @Code "@QuotedDisplay" and @Code "@LeftDisplay" go well with this form of {@Code "@Scale"}. However, some care is needed because Lout foolishly takes no account of the available @I vertical space when choosing the scale factor. The chosen scale factor could enlarge the vertical size so much that the object no longer fits on the page, with disastrous results. @PP By using the @Code "@Wide" symbol from Section {@NumberOf precise} to restrict the available horizontal space, this form of scaling can also be used to scale to a nominated width. For example, wide. @RawIndex { @Code "@Wide" } wide.scale @SubIndex { with @Code "@Scale" } @ID @Code "5c @Wide @Scale @Box WARNING!" produces @ID { 5c @Wide @Scale @Box WARNING! } which is 5 centimetres wide. @PP The @Code "@Scale" symbol will scale either up or down, whichever is required to fit the available space. There is also a way to make it scale down if necessary but never scale up, by giving the @Code "downifneeded" keyword instead of an empty object: @ID @Code "5c @Wide downifneeded @Scale @Box WARNING!" produces no scaling: @ID 5c @Wide downifneeded @Scale @Box WARNING! but @ID @Code "1c @Wide downifneeded @Scale @Box WARNING!" does produce scaling: @ID 1c @Wide downifneeded @Scale @Box WARNING! This is a good option if scaling is being used when a display is around the same width as the page; it scales only if this is needed to fit the display into the column, not otherwise. @End @Section lout-3.39/doc/user/bas_par10000644000076400007640000001163211363700677014224 0ustar jeffjeff@Section @Title { Starting a new line, paragraph, or page } @Tag { paragraphs } @Begin @PP The usual way to start a new paragraph is with the @Code "@PP" `plain pp. @Index @Code "@PP" paragraphs. @Index { paragraph symbols } paragraph' symbol. It produces a small vertical space and indents the first line of the new paragraph. Some document formatting systems interpret a blank line as a request to start a new paragraph. This is not the case with Lout: a blank line is two line-endings, equivalent to two spaces. @PP The @Code "@LP" `left paragraph' symbol produces the same lp. @Index @Code "@LP" vertical space as {@Code "@PP"}, but omits the indent. The @Code "@LLP" `left line paragraph' symbol starts a new paragraph using llp. @Index @Code "@LLP" the usual inter-line spacing and no indent, or in other words it starts a new line. If you are using it to create single lines, you need the @Code "lines" paragraph breaking style instead (Section {@NumberOf paras}). @PP The @Code "@DP" `display paragraph' symbol produces a somewhat larger dp. @Index @Code "@DP" vertical space, equal to the amount used before and after displays (Section {@NumberOf displays}), with no indent. To get even more space, use @Code "@DP" repeatedly. Another symbol, {@Code "@LOP"}, leaves a paragraph break the size of the gap left lop. @Index @Code "@LOP" outside (that is, before and after) lists (Section {@NumberOf lists}). This is usually equal to {@Code "@DP"}. @PP The {@Code "@NP"} `new page' symbol causes the following paragraph to page. @Index { page, skipping to next } new.page @Index { new page } np. @Index { @Code "@NP" (new page) } begin on a new page or column. Of course, Lout starts a new page or column automatically when the old one is full, so @Code "@NP" is needed only rarely. @PP To make each section begin on a new page you must set the @Code "@SectionGap" sectiongap. @Index @Code "@SectionGap" setup file option (Section {@NumberOf largescale}). To make one particular section start on a new page or column, place @Code "@NP" within the previous section, at the end. Placing @Code "@NP" between sections will not work. @PP Occasionally Lout will start a new page or column directly after a heading, which looks very poor. The obvious answer is to place an @Code "@NP" just before the heading, but when the document is later revised and the heading no longer falls near the page or column ending, this @Code "@NP" will have to be taken away again. A better answer is to precede the heading with a @Code "@CNP" `conditional cnp. @Index @Code "@CNP" new page' symbol, which checks whether enough space remains in the page or column for a heading and at least two lines of text. If so, @Code "@CNP" does nothing; if not, @Code "@CNP" causes a new page or column to be begun, like {@Code "@NP"}. The recommended arrangement is @ID @OneRow @Code { # "end of previous part." "@DP" "@CNP" "@Heading { A Heading }" "@PP" "First paragraph of next part ..." } The @Code "@CNP" symbol should be preceded by either @Code "@DP" or @Code "@LP", preferably {@Code "@DP"}, and this determines the amount of space when the @Code "@NP" action does not occur. @PP The ultimate answer to the conditional new page problem is to recognise that the heading is the beginning of a new section of the document, and to use a large-scale structure symbol like @Code "@Section" (Section {@NumberOf largescale}). Conditional new page is just one of many services provided automatically by these symbols. @PP Some people do not like to see the first line of a paragraph alone at the bottom of a page, or the last line of a paragraph alone at the top (these blemishes are sometimes called widows and orphans). You can instruct Lout not to allow these; see the next section for details. @PP You can modify the effect of the paragraph symbols by changing options in the setup file. For general information about setup files and their options, consult Section {@NumberOf setup}; here we just explain how the relevant options work. The options and their default values are paragap @Index @Code "@ParaGap" paraindent @Index @Code "@ParaIndent" displaygap @Index @Code "@DisplayGap" @ID @OneRow @Code { "@ParaGap { 1.30vx }" "@ParaIndent { 2.00f }" "@DisplayGap { 1.00v }" } The values are lengths (Section {@NumberOf objects}), except that for reasons beyond our scope @Code "@ParaGap" must be a length with an @Code "x" appended, as shown. The @Code "@ParaGap" option determines how much vertical space will be inserted by @Code "@PP" and {@Code "@LP"}. The default value, {@Code "1.30vx"}, is 30% more than the normal inter-line spacing; to get no extra spacing, change it to {@Code "1.00vx"}. The @Code "@ParaIndent" option determines the width of the indent produced by {@Code "@PP"}, and its default value is twice the current font size. The @Code "@DisplayGap" option determines the amount of vertical space inserted by {@Code "@DP"}, as well as the vertical space before and after displays. @End @Section lout-3.39/doc/user/typ_ordi0000644000076400007640000003303711363700677014370 0ustar jeffjeff@Section @Title { Ordinary documents } @Tag { ordinary } @Begin @PP Ordinary documents are the simplest kind, consisting of a plain sequence ordinary. @Index { ordinary documents } of numbered pages. To produce an ordinary document, use the @Code doc setup file and the @Code "@Doc" symbol: doc. @Index @Code "@Doc" @ID @OneRow @Code { "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } where @Code ... stands for the body of your document. This is the arrangement from Section {@NumberOf start} for getting started. Alternatively, you can begin with @Code "@Document" instead of {@Code "@Doc"}: document. @Index @Code "@Document" @ID @OneRow @Code { "@SysInclude { doc }" "@Document" " @InitialFont { Times Base 12p }" " @InitialBreak { adjust 1.2fx hyphen }" " @InitialSpace { lout }" " @InitialLanguage { English }" " @PageOrientation { Portrait }" " @PageHeaders { Simple }" " @FirstPageNumber { 1 }" " @ColumnNumber { 1 }" " @OptimizePages { No }" " @Unpaginated { No }" "//" "@Text @Begin" "..." "@End @Text" } This shows all the options of {@Code "@Document"}, with their default values. As usual with options, the options of {@Code "@Document"} may be given in any order, and only the ones that need to be changed need be given at all. Notice the @Code "//" after the last option. Its meaning is beyond our scope, but total disaster will ensue if it is forgotten. The @Code "@Doc" symbol is an abbreviation for {@Code "@Document //"}, which is why you don't need @Code "//" with {@Code "@Doc"}. @PP The eight options are a selection of setup file options (Section {@NumberOf setup}) that frequently need to be changed. If your changes to the overall formatting are confined to these options, you can change them here and avoid having your own setup file. If you already have your own setup file, change them in either place and omit them in the other. @PP @Code "@InitialFont" is the font of the bulk of the document, and should contain a family, a face, and a size. The default value selects the Times family, the Base face, and the 12 point size. @PP @Code "@InitialBreak" controls the behaviour of paragraph breaking in the bulk of the document. It should have three parts: a paragraph breaking style ({@Code adjust}, {@Code ragged}, etc.), an inter-line spacing ({@Code "1.2fx"} for single spacing, {@Code "2.4fx"} for double spacing, and so on), and either @Code "hyphen" or @Code "nohyphen" for turning hyphenation on or off. It may also have @Code "nobreakfirst" or @Code "nobreaklast" (or both), meaning to disallow a page break after the first line of a paragraph, or before the last, respectively. @PP @Code "@InitialSpace" determines how Lout treats white space between two objects, as described in Section {@NumberOf white}. @Code "@InitialLanguage" determines the language of the bulk of the document. @PP @Code "@PageOrientation" determines the orientation of the page. Its value may be {@Code Portrait} (the default), {@Code Landscape}, {@Code ReversePortrait}, or {@Code ReverseLandscape}. See Section {@NumberOf pagesize} for further details. @PP @Code "@PageHeaders" determines the appearance of page headers and footers throughout the document, and may be {@Code None}, {@Code Simple}, {@Code Titles}, or {@Code NoTitles}. Section {@NumberOf headers} has the details, but just briefly, {@Code None} means no page headers at all, {@Code Simple} means a page number between hyphens at the top of each page except the first, @Code Titles produces full running titles as in this guide, and @Code "NoTitles" is like @Code "Titles" with the running titles omitted, leaving just the page numbers. @PP @Code "@FirstPageNumber" is the page number given to the first page. @PP @Code "@ColumnNumber" is the number of columns per page in the bulk of the document, and may be anything from {@Code 1} (the default value) to {@Code 10}. It is possible to produce full-width ordinary text in a multi-column document, using the @Code "@FullWidth" full.width. @Index @Code "@FullWidth" symbol: @ID @OneRow @Code { "@SysInclude { doc }" "@Document" " @ColumnNumber { 2 }" "//" "@Text @Begin" "@FullWidth {" "@CentredDisplay @Heading { NOTICE TO TRESPASSERS }" "}Trespassers are hereby notified that, ..." "@End @Text" } This produces a full-width heading above a two-column body. The word @Code Trespassers has been placed immediately after the closing brace of @Code "@FullWidth" because (regrettably) any space here will appear before @Code Trespassers in the output. Alternatively you could use a paragraph symbol: @ID @OneRow @Code { "@FullWidth {" "@CentredDisplay @Heading { NOTICE TO TRESPASSERS }" "}" "@PP" "Trespassers are hereby notified that, ..." } You can have several @Code "@FullWidth" symbols, producing full-width text wherever you want. Just be aware that @Code "@FullWidth" always causes a fresh page to be begun, it will never appear on the same page as a figure or table, and it is not able to hold a table of contents, a section, or an appendix. @PP Lout ordinarily places lines onto a page until space runs out, then moves to the next page and so on. This often produces ugly empty spaces at the bottoms of pages preceding large unbreakable displays. Setting the @Code "@OptimizePages" option to {@Code "Yes"} causes Lout to examine the overall situation and try to minimize the ugliness, using the @TeX tex.page @SubIndex { page optimization } optimal paragraph breaking algorithm. It takes two runs to do this, with intermediate results stored in Lout's cross reference database (Section {@NumberOf cross}); so deleting file {@Code lout.li} will reset it, which might be wise after major changes. It is possible for the optimizer to cycle, never settling on a single final best version; this is usually caused by footnotes or floating figures inserted at points that end up near page boundaries. @PP The @Code "@Unpaginated" option, whose value is ignored unless plain text output is in effect, produces unpaginated output when changed to {@Code Yes} (see Section {@NumberOf plain}). @PP Within the @Code "@Text" symbol, it is possible to have a sequence of sections: section. @RawIndex @Code "@Section" section.ordinary @SubIndex { in ordinary documents } beginsections. @RawIndex @Code "@BeginSections" beginsections.ordinary @SubIndex { in ordinary documents } endsections. @RawIndex @Code "@EndSections" endsections.ordinary @SubIndex { in ordinary documents } @ID @OneRow @Code { "preceding text" "@BeginSections" "@Section ... @End @Section" "@Section ... @End @Section" "..." "@Section ... @End @Section" "@EndSections" } as described in Section {@NumberOf largescale}. Within any section, a similar arrangement produces subsections: subsection. @RawIndex @Code "@SubSection" subsection.ordinary @SubIndex { in ordinary documents } beginsubsections. @RawIndex @Code "@BeginSubSections" beginsubsections.ordinary @SubIndex { in ordinary documents } endsubsections. @RawIndex @Code "@EndSubSections" endsubsections.ordinary @SubIndex { in ordinary documents } @ID @OneRow @Code { "preceding text" "@BeginSubSections" "@SubSection ... @End @SubSection" "@SubSection ... @End @SubSection" "..." "@SubSection ... @End @SubSection" "@EndSubSections" } Within any subsection, there may be sub-subsections, obtained using {@Code "@BeginSubSubSections"}, {@Code "@SubSubSection"}, subsubsection. @RawIndex @Code "@SubSubSection" subsubsection.ordinary @SubIndex { in ordinary documents } beginsubsubsections. @RawIndex @Code "@BeginSubSubSections" beginsubsubsections.ordinary @SubIndex { in ordinary documents } endsubsubsections. @RawIndex @Code "@EndSubSubSections" endsubsubsections.ordinary @SubIndex { in ordinary documents } and {@Code "@EndSubSubSections"}. There are no sub-sub-subsections. @PP Also within the @Code "@Text" symbol only, there may be a sequence of appendices: appendix. @RawIndex @Code "@Appendix" appendix.ordinary @SubIndex { in ordinary documents } beginappendices. @RawIndex @Code "@BeginAppendices" beginappendices.ordinary @SubIndex { in ordinary documents } endappendices. @RawIndex @Code "@EndAppendices" endappendices.ordinary @SubIndex { in ordinary documents } @ID @OneRow @Code { "preceding text" "@BeginAppendices" "@Appendix ... @End @Appendix" "@Appendix ... @End @Appendix" "..." "@Appendix ... @End @Appendix" "@EndAppendices" } These will be `numbered' A, B, C etc. as is conventional. Within any appendix there may be a sequence of subappendices, obtained in the usual way using {@Code "@BeginSubAppendices"}, {@Code "@SubAppendix"}, subappendix. @RawIndex @Code "@SubAppendix" subappendix.ordinary @SubIndex { in ordinary documents } beginsubappendices. @RawIndex @Code "@BeginSubAppendices" beginsubappendices.ordinary @SubIndex { in ordinary documents } endsubappendices. @RawIndex @Code "@EndSubAppendices" endsubappendices.ordinary @SubIndex { in ordinary documents } and {@Code "@EndSubAppendices"}. There are sub-subappendices as well, following the same pattern, but no sub-sub-subappendices. subsubappendix. @RawIndex @Code "@SubSubAppendix" subsubappendix.ordinary @SubIndex { in ordinary documents } beginsubsubappendices. @RawIndex @Code "@BeginSubSubAppendices" beginsubsubappendices.ordinary @SubIndex { in ordinary documents } endsubsubappendices. @RawIndex @Code "@EndSubSubAppendices" endsubsubappendices.ordinary @SubIndex { in ordinary documents } @PP In addition to the {@Code "@Title"} option, each large-scale structure symbol ({@Code "@Section"}, {@Code "@SubSection"}, {@Code "@SubSubSection"}, {@Code "@Appendix"}, {@Code "@SubAppendix"}, and {@Code "@SubSubAppendix"}) has a @Code "@Tag" option for cross referencing (Section {@NumberOf cross}), an @Code "@InitialLanguage" option for changing the language of that part of the document, and a @Code "@RunningTitle" option which will be used in place of @Code "@Title" in running headers if given. @Code "@RunningTitle" is useful when the full title is rather long. @PP The features described in other chapters are all available within ordinary documents. Endnotes and references appear automatically at the end of the document. Figures are labelled Figure 1, Figure 2, etc., and tables are labelled Table 1, Table 2, etc. @PP To get a table of contents, set the @Code "@MakeContents" option in the setup file to {@Code Yes}, and insert the symbol @Code "@ContentsGoesHere" at the point where you would like the contents.goes.here. @Index @Code "@ContentsGoesHere" table of contents to appear, anywhere before the first section: @ID @OneRow @Code { "@SysInclude { doc }" "@Text @Begin" "@CentredDisplay @Heading { Safety Procedures }" "@Heading { Contents }" "@DP" "@ContentsGoesHere" "@DP" "..." "@End @Text" } You must supply your own heading, as well as paragraph symbols before and after. Regrettably, @Code "@ContentsGoesHere" may not be placed inside a display, nor inside {@Code "@FullWidth"}. @PP To get an index, set the @Code "@MakeIndex" option in the setup file to {@Code Yes}, and follow the instructions in Section {@NumberOf indexes}. The index will appear automatically at the end of your document. @PP Within the @Code doc setup file there is an @Code "@OrdinarySetup" symbol whose options control the appearance of features specific to ordinary documents (in other words, the features described in this section). Here is a representative sample of these options, showing their default values: ordinary.setup @Index @Code "@OrdinarySetup" @ID @OneRow @Code { "@Use { @OrdinarySetup" " # @IndexWord { index }" " # @AppendixWord { appendix }" " # @SectionNumbers { Arabic }" " # @SectionHeadingFont { Bold }" " # @SectionGap { 2.00v }" " # @SectionInContents { Yes }" " # @SectionContentsIndent { 0f }" "}" } Section {@NumberOf setup} explains how to make your own setup file and change its options. @PP The @Code "@IndexWord" option determines what the index is called, if there is one. The default value, {@Code "index"}, produces the word `Index' in the current language. Any other value produces itself. The @Code "@AppendixWord" option is similar; its default value is `Appendix' in the current language. @PP @Code "@SectionNumbers" determines how sections will be numbered, and may be @Code { None }, @Code { Arabic }, @Code { Roman }, @Code { UCRoman }, @Code { Alpha }, or @Code { UCAlpha }. The default value is @Code Arabic for sections and also all other large-scale structure symbols except appendices, for which it is {@Code UCAlpha}. This produces the appendices numbered in upper-case letters (A, B, C, etc.) that were mentioned earlier. @PP @Code "@SectionHeadingFont" is the font used for section headings. The default value produces the bold face from the family of the initial font. A family name or size is also acceptable: @ID @Code "@SectionHeadingFont { Helvetica Base +2p }" makes the section heading appear in the Helvetica font, two points larger than the initial size. @PP @Code "@SectionGap" determines how much space is left blank before each section title; the default value shown above is twice the current inter-line spacing. The special value @Code "2b" may be used to get a page break rather than a space. There are similar options for other large-scale structure symbols, which determine how much space is left before each one. @PP @Code "@SectionInContents" determines whether or not an entry is made in the table of contents for each section; it may be @Code Yes or {@Code No}, but would always be {@Code Yes}. The default value of the corresponding options for sub-subsections and sub-subappendices, however, is {@Code No}. @Code "@SectionContentsIndent" determines the indent of the contents entry if printed at all; the default value shown above, @Code {0f}, asks for zero indenting, so the entry will appear at the left margin. @End @Section lout-3.39/doc/user/typ_plai0000644000076400007640000001011011363700677014343 0ustar jeffjeff@Section @Title { Plain text documents } @Tag { plain } @Begin @PP Occasionally you may need to produce an output file containing plain text plain.text. @Index { plain text documents } rather than PostScript, for example for an online manual entry or to send as electronic mail. Any document that can be produced by Lout in PostScript can be produced in plain text as well, by adding a @Code "-p" flag to the Unix command line: @ID @Code "lout -p simple" No other changes are required. Here we are sending the output directly to the screen, but it can be redirected to a file, or piped through the @Code more command for viewing one page at a time, etc. @PP Of course, plain text is an extremely limited medium of communication compared with PostScript, and this forces Lout to make some rather drastic compromises: @BulletList gap { @ParaGap } @LI { Symbols like {@Code "@Bullet"}, which stand for unusual characters, produce printable characters which approximate the PostScript ones. For example, {@Code "@Bullet"} produces {@Code "o"}. However, the @Code "@Char" and @Code "@Sym" symbols often produce unprintable characters, and are best avoided; } @LI { All font and size changes are ignored, since plain text has only one font and size. Every character is taken to be @M { 1 frac 10 } inch wide and @M { 1 frac 6 } inch high; } @LI { No underlines are printed; } @LI { No margin notes are printed; } @LI { Scaled objects are not printed unless the scale factor happens to be 1; } @LI { Rotated objects are not printed unless the angle happens to be zero degrees. This means that page orientations (Section {@NumberOf pagesize}) other than @Code Portrait do not work; } @LI { Ruled lines are not printed, and paint and colour options are ignored. This spoils the graphics and graphs of Chapters {@NumberOf graphics}, {@NumberOf diagrams}, and {@NumberOf graphs}. } @EndList Despite the problems, many things work surprisingly well. Tables, for example, look very good. It does no harm to try things and see if they work out. @PP The worst problem with plain text is that characters cannot be placed at arbitrary points on the page. A superscript, for example, is impossible to place correctly, so Lout uses a different layout for footnote labels (and makes a mess of equations, which are best avoided). Because of this problem it's best to make all horizontal lengths multiples of @M {1 frac 10} inch (conveniently expressed as {@Code 1s}), and all vertical lengths multiples of @M { 1 frac 6 } inch (conveniently expressed as {@Code 1f}). To help you do this, the setup files contain many entries that look like this example: @ID @Code "# @InitialBreak { {adjust 1.2fx hyphen} @OrIfPlain {ragged 1fx nohyphen} }" The meaning is that the value of @Code "@InitialBreak" will be @Code "adjust 1.2fx hyphen" usually, but will switch to {@Code "ragged 1fx nohyphen"}, which is better suited to plain text, if the @Code "-p" command line flag is used. These setup file values allow you to switch from PostScript to plain text and back again without changing anything at all except the @Code "-p" command line flag. @PP If you use @Code "lout -P" instead of {@Code "lout -p"}, the plain text output will contain a form-feed character (control-L) after each page form.feed @Index { form-feed in plain text } except the last. This character causes most printing devices to start a new page, which is very useful when your page height is not exactly right. @PP The @Code "@Document" symbol (Section {@NumberOf ordinary}) has an unpaginated. @Index @Code "@Unpaginated" @Code "@Unpaginated" option which, when set to {@Code "Yes"}, causes the plain text output to appear unpaginated, that is, in one long continous stream with no page breaks. Its value is ignored if plain text output is not in effect, so it can be safely set to @Code "Yes" in documents intended for formatting both ways. The usual margins apply; footnotes appear at the end; floating figures and tables do not work. Lout stupidly reads the entire document before producing any output when this option is used, so if the document is long you might run out of memory. @End @Section lout-3.39/doc/user/bas_date0000644000076400007640000000500311363700677014271 0ustar jeffjeff@Section @Title { The current date and time } @Tag { date } @Begin @PP The @Code "@Date" and @Code "@Time" symbols produce the current date date. @Index @Code "@Date" time. @Index @Code "@Time" and time: @ID @Code "It is now @Time on @Date." produces something like @ID { It is now @Time on @Date. } The result depends on the current language. @PP Both symbols have a @Code "@Format" option that changes the format of the result: @ID @Code "@Date @Format { @DayNum\"/\"@MonthNum\"/\"@ShortYear }" The result is the @Code "@Format" option with the symbols replaced by the appropriate values: @ID { @Date @Format { @DayNum"/"@MonthNum"/"@ShortYear } } The @Code "/" characters have been enclosed in double quotes for the usual reason (Section {@NumberOf characters}). @PP Here is the full list of symbols that you can use within both @Code "@Format" options: @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col B } vmargin { 0.5vx } { @Rowa A { "@Year" } B { The year, e.g. @Code "1994" } @Rowa A { "@ShortYear" } B { The last two digits of the year, e.g. @Code "94" } @Rowa A { "@Month" } B { The month, e.g. @Code "December" } @Rowa A { "@ShortMonth" } B { The month abbreviated, e.g. @Code "Dec" } @Rowa A { "@MonthNum" } B { The number of the month, between @Code "1" and @Code "12" } @Rowa A { "@Day" } B { The day of the week, e.g. @Code "Saturday" } @Rowa A { "@ShortDay" } B { The day abbreviated, e.g. @Code "Sat" } @Rowa A { "@DayNum" } B { The day of the month, between @Code "1" and @Code "31" } @Rowa A { "@MeriDiem" } B { @Code "a.m." or @Code "p.m." } @Rowa A { "@ShortMeriDiem" } B { @Code "am" or @Code "pm" } @Rowa A { "@Hour" } B { The hour, between @Code "00" and @Code "23" } @Rowa A { "@ShortHour" } B { The hour, between @Code "0" and @Code "23" } @Rowa A { "@TwelveHour" } B { The hour, between @Code "1" and @Code "12" } @Rowa A { "@Minute" } B { The minute, between @Code "00" and @Code "59" } @Rowa A { "@Second" } B { The second, almost always between @Code "00" and @Code "59" } } The default format for @Code "@Date" in English is @ID @Code "@Date @Format { @DayNum @Month, @Year }" and the default format for @Code "@Time" in English is @ID @Code "@Time @Format { @TwelveHour.@Minute @MeriDiem }" Both default formats depend on the current language, and so do {@Code "@Month"}, {@Code "@ShortMonth"}, {@Code "@Day"}, and {@Code "@ShortDay"},{@Code "@MeriDiem" } and {@Code "@ShortMeriDiem" }. @End @Section lout-3.39/doc/user/typ_book0000644000076400007640000005564011363700677014371 0ustar jeffjeff@Section @Title { Books } @Tag { books } @Begin @PP To produce a book, start off with the @Code book setup file and the books. @Index { books } book. @Index @Code "@Book" @Code "@Book" symbol: @ID @OneRow -1px @Break @Code { "@SysInclude { book }" "@Book" " @Title {}" " @Author {}" " @Edition {}" " @Publisher {}" " @BeforeTitlePage {}" " @OnTitlePage {}" " @AfterTitlePage {}" " @AtEnd {}" " @InitialFont { Times Base 12p }" " @InitialBreak { adjust 1.2fx hyphen }" " @InitialSpace { lout }" " @InitialLanguage { English }" " @PageOrientation { Portrait }" " @PageHeaders { Titles }" " @ColumnNumber { 1 }" " @FirstPageNumber { 1 }" " @IntroFirstPageNumber { 1 }" " @OptimizePages { No }" " @GlossaryText { @Null }" " @IndexText { @Null }" " @IndexAText { @Null }" " @IndexBText { @Null }" "//" } This shows all the options of @Code "@Book" with their default values. As usual, these options may be given in any order, and only those to be changed need be given at all. The meaning of the @Code "//" symbol after the last option is beyond our scope, but total disaster will ensue if it is forgotten. @PP The {@Code "@Title"}, {@Code "@Author"}, and {@Code "@Edition"} options will appear on the title page, in the @Code "clines" paragraph breaking style which centres each line (Section {@NumberOf paras}). The @Code "@Publisher" option will appear at the foot of the title page. @PP The {@Code "@BeforeTitlePage"} option will come out on the page (or pages) preceding the title page. This is where publishers advertise other books of a similar kind, perhaps from a series. @PP If {@Code "@OnTitlePage"} is given it will replace the title page that usually appears, superseding the {@Code "@Title"}, {@Code "@Author"}, {@Code "@Edition"}, and @Code "@Publisher" options in the process. @PP The {@Code "@AfterTitlePage"} option will come out on the page (or pages) following the title page. This is where publishers traditionally put copyright notices, information about production, and cataloguing-in-publication data. If this option is empty or omitted, there will be no such pages. @PP The {@Code "@AtEnd"} option will come out on a single unnumbered page with no page headers or footers, and using the same margins as for even pages, after the very last page of the book; even after the index if there is one. It is intended to make it possible to include a back cover, so @Code "@PageOf last.page" (Section {@NumberOf cross}) does not take account of any @Code "@AtEnd" page. (To make a colophon, which occupies any number of numbered pages after the index, consult the @Code "@Colophon" symbol below.) @PP The remaining options are a selection of setup file options (Section {@NumberOf setup}) that frequently need to be changed. If your changes to the overall formatting are confined to these options, you can change them here and avoid having your own setup file. If you already have your own setup file, change them in either place and omit them in the other. @PP @Code "@InitialFont" is the font of the bulk of the book, and should contain a family, a face, and a size. The default value selects the Times family, the Base face, and the 12 point size. @PP @Code "@InitialBreak" controls the behaviour of paragraph breaking in the bulk of the book. It should have three parts: a paragraph breaking style ({@Code adjust}, {@Code ragged}, etc.), an inter-line spacing ({@Code "1.2fx"} for single spacing, {@Code "2.4fx"} for double spacing, and so on), and either @Code "hyphen" or @Code "nohyphen" for turning hyphenation on or off. It may also have @Code "nobreakfirst" or @Code "nobreaklast" (or both), meaning to disallow a page break after the first line of a paragraph, or before the last, respectively. @PP @Code "@InitialSpace" determines how Lout treats white space between two objects, as described in Section {@NumberOf white}. @Code "@InitialLanguage" determines the language of the bulk of the book. @PP @Code "@PageOrientation" determines the orientation of the page. Its value may be {@Code Portrait} (the default), {@Code Landscape}, {@Code ReversePortrait}, or {@Code ReverseLandscape}. See Section {@NumberOf pagesize} for further details. @PP @Code "@PageHeaders" determines the appearance of page headers and footers. Its value may be {@Code None}, {@Code Simple}, {@Code Titles}, or {@Code NoTitles}. Section {@NumberOf headers} has the details, but just briefly, {@Code None} and {@Code Simple} are not really suitable for books, @Code Titles produces full running titles as in the present document, and @Code "NoTitles" is like @Code "Titles" with the running titles omitted, leaving just the page numbers. @PP @Code "@ColumnNumber" is the number of columns per page in the bulk of the book, and may be anything from {@Code 1} (the default value) to {@Code 10}. Irrespective of its value, all prefatory material, all chapter and appendix headings, and all figures and tables will be printed full width. There is a separate @Code "@IndexColumnNumber" option in the setup file which determines the number of columns in the index (Section {@NumberOf indexes}). @PP @Code "@FirstPageNumber" is the page number to be given to the first non-introductory page. @Code "@IntroFirstPageNumber" is the page number of the first introductory page; it will usually appear in Roman but must be given in Arabic. @PP Lout ordinarily places lines onto a page until space runs out, then moves to the next page and so on. This often produces ugly empty spaces at the bottoms of pages preceding large unbreakable displays. Setting the @Code "@OptimizePages" option to {@Code "Yes"} causes Lout to examine the overall situation and try to minimize the ugliness, using the @TeX optimal paragraph breaking algorithm. It takes two runs to do this, with intermediate results stored in Lout's cross reference database (Section {@NumberOf cross}); so deleting file {@Code lout.li} will reset it, which might be wise after major changes. It is possible for the optimizer to cycle, never settling on a single final best version; this is usually caused by footnotes or floating figures inserted at points which end up near page boundaries. @PP The {@Code "@GlossaryText"}, {@Code "@IndexText"}, {@Code "@IndexAText"}, and {@Code "@IndexBText"} symbols allow you to insert some arbitrary text after the title of the glossary, index, etc., and before the entries. @PP After the compulsory @Code "//" comes an optional preface: preface. @Index @Code "@Preface" @ID @OneRow @Code { "@Preface" " @Title { About this book }" "@Begin" "@PP" "..." "@End @Preface" } Since the title of most prefaces is simply Preface, that is the default value in English of the @Code "@Title" option. Within the preface, just before {@Code "@End @Preface"}, there may optionally be a sequence of sub-prefaces enclosed in @Code "@BeginSubPrefaces" and {@Code "@EndSubPrefaces"}, like this: @ID @OneRow @Code @Verbatim { @BeginSubPrefaces @SubPreface ... @End @SubPreface @SubPreface ... @End @SubPreface @EndSubPrefaces } After the preface there will automatically appear a table of contents listing the introduction, chapters, sections, subsections, appendices, sub-appendices, bibliography, and index as appropriate. @PP The pages up to this point will be numbered in lower case Roman numerals; subsequent pages will be numbered in Arabic starting from the @Code "@FirstPageNumber" option of {@Code "@Book"}. There is a setup file option for changing this to a single numbering sequence (see below). @PP Next comes an optional abbreviations sections, exactly like the preface except that its name is @Code "@Abbreviations" and the abbreviations. @Index @Code "@Abbreviations" default title in English is Abbreviation. There are no sub-abbreviations, and no support for what goes inside; you need to use a list or table to lay out the abbreviations, in the usual way. @PP Next comes an optional introduction, exactly like the preface except that its name is @Code "@Introduction" and the default title in English is introduction. @Index @Code "@Introduction" Introduction: @ID @OneRow @Code { "@Introduction" "@Begin" "@PP" "..." "@End @Introduction" } It may have sub-introductions, exactly like sub-prefaces: @ID @OneRow @Code @Verbatim { @BeginSubIntroductions @SubIntroduction ... @End @SubIntroduction @SubIntroduction ... @End @SubIntroduction @EndSubIntroductions } After the introduction comes a sequence of chapters in the usual style: chapter. @Index @Code "@Chapter" @ID @OneRow @Code { "@Chapter" " @Title { Australian Native Plants }" "@Begin" "@PP" "..." "@End @Chapter" } No @Code "@BeginChapters" or @Code "@EndChapters" symbols are beginchapters. @Index @Code "@BeginChapters" endchapters. @Index @Code "@EndChapters" needed, because these chapters are not inside any other large-scale structure symbol. @PP In addition to all the usual options for large-scale structure symbols, @Code "@Chapter" offers {@Code "@BypassWord"}, which may be used to replace the `Chapter' word for this chapter only. For example, @ID @OneRow @Code { "@Chapter" " @BypassWord { Appendix }" "..." } could be used to place (what appears to the reader to be) an Appendix at the end of a part, or indeed anywhere at all. The chapter numbers are not affected. To change this word in all chapters, the @Code "@ChapterWord" setup file option is preferred. @PP Within a chapter, there may be a sequence of sections, each introduced by {@Code "@Section"}, all bracketed section.books @SubIndex { in books } by @Code "@BeginSections" and {@Code "@EndSections"}: beginsections.books @SubIndex { in books } endsections.books @SubIndex { in books } @ID @OneRow @Code { "preceding text" "@BeginSections" "@Section ... @End @Section" "@Section ... @End @Section" "..." "@Section ... @End @Section" "@EndSections" } Within each section there may be subsections, each introduced by {@Code "@SubSection"}, and the sequence as a whole bracketed by @Code "@BeginSubSections" and {@Code "@EndSubSections"}: subsection.books @SubIndex { in books } beginsubsections.books @SubIndex { in books } endsubsections.books @SubIndex { in books } @ID @OneRow @Code { "preceding text" "@BeginSubSections" "@SubSection ... @End @SubSection" "@SubSection ... @End @SubSection" "..." "@SubSection ... @End @SubSection" "@EndSubSections" } The subsections may contain sub-subsections, but subsubsection.books @SubIndex { in books } beginsubsubsections.books @SubIndex { in books } endsubsubsections.books @SubIndex { in books } there are no sub-sub-subsections. @PP After the chapters comes an optional sequence of appendices. Each is introduced by @Code "@Appendix" in the usual way: appendix.books @SubIndex { in books } @ID @OneRow @Code { "@Appendix" " @Title { Climatic Regions of Australia }" "@Begin" "@PP" "..." "@End @Appendix" } No @Code "@BeginAppendices" or @Code "@EndAppendices" symbols are beginappendices.books @SubIndex { in books } endappendices.books @SubIndex { in books } needed, because (like chapters) these appendices do not lie inside any other large-scale structure symbol. The appendices are numbered A, B, C, etc., as is conventional for them. Within each appendix there may be a sequence of subappendices, obtained with the @Code "@SubAppendix" symbol and bracketed by subappendix.books @SubIndex { in books } @Code "@BeginSubAppendices" and {@Code "@EndSubAppendices"}: beginsubappendices.books @SubIndex { in books } endsubappendices.books @SubIndex { in books } @ID @OneRow @Code { "preceding text" "@BeginSubAppendices" "@SubAppendix ... @End @SubAppendix" "@SubAppendix ... @End @SubAppendix" "..." "@SubAppendix ... @End @SubAppendix" "@EndSubAppendices" } There are sub-subappendices following the same pattern, but no subsubappendix.books @SubIndex { in books } beginsubsubappendices.books @SubIndex { in books } endsubsubappendices.books @SubIndex { in books } sub-sub-subappendices. @PP Apart from any colophon, described below, the book ends with the last chapter or appendix; any reference list or index will be appended automatically. Although we have described how to create books as though everything was in one large file, in practice it is much better to divide the book into multiple files, following the method given in Section {@NumberOf organizing}. @PP In addition to the {@Code "@Title"} option, each large-scale structure symbol (i.e. {@Code "@Preface"}, {@Code "@Introduction"}, {@Code "@Chapter"}, {@Code "@Section"}, {@Code "@SubSection"}, {@Code "@SubSubSection"}, {@Code "@Appendix"}, {@Code "@SubAppendix"}, and {@Code "@SubSubAppendix"}) has a @Code "@Tag" option for cross referencing (Section {@NumberOf cross}), an @Code "@InitialLanguage" option for changing the language of that part of the document, and a @Code "@RunningTitle" option which will be used in place of @Code "@Title" in running headers if given. This last is useful when the full title is rather long. @PP The @Code "@Chapter" symbol has three additional options for dividing parts. @Index { parts of books } the book into parts: part.number @Index @Code "@PartNumber" part.title @Index @Code "@PartTitle" part.text @Index @Code "@PartText" @ID @OneRow @Code { "@Chapter" " @PartNumber { Part A }" " @PartTitle { The Ancient World }" " @PartText { ... }" } Any chapter with a non-empty @Code "@PartNumber" or @Code "@PartTitle" option will become the first chapter of a part. It will be preceded by two pages containing the part number, title, and text, and there will also be an entry made in the table of contents. Parts are @I not numbered automatically: you have to supply your own numbers or letters as shown above. @PP After the last chapter or appendix, an optional colophon may be given: @ID @OneRow @Code @Verbatim { @Colophon @Begin This document was typeset using the Lout document formatting system. The resulting PostScript file was converted to PDF using GNU @I { ps2pdf }. @End @Colophon } For this to work, however, the @Code "@MakeColophon" option of the setup file must be changed to @Code Yes (see next paragraph). A colophon appears at the very end of the book, after the index. It may occupy several pages, and these will be numbered as usual. See also the @Code "@AtEnd" option above, which is intended to hold a one-page unnumbered back cover. As the example suggests, colophons these days are generally used for notes concerning how a book was produced. They are an old form that has been revived; previously, according to my dictionary, they contained information now printed on the title page. @PP A colophon is like a preface except that it appears at the end, and should logically be implemented like the {@Code "@Preface"} symbol. Unfortunately, owing to problems behind the scenes it has instead been implemented like glossaries and indexes: you have to set a @Code "@MakeColophon" option in the setup file to {@Code Yes}. There are setup file options for setting the font and break style, column number and column gap, and heading ({@Code "@ColophonFont"}, {@Code "@ColophonBreak"}, {@Code "@ColophonColumnNumber"}, {@Code "@ColophonColumnGap"}, and {@Code "@ColophonWord"}). There are also {@Code "@ColophonInContents"} and {@Code "@ColophonPrefix"} options for determining whether the colophon appears in the table of contents, and its prefix when structured page numbers are used. @PP The features described in other chapters are all available within books. A table of contents and index will appear automatically, and you will need to change the setup file to avoid them. Endnotes will appear at the end of the enclosing preface, introduction, chapter, or appendix. The numbering of figures and tables includes a chapter or appendix number: the first figure of Appendix C will be Figure C.1, and so on. Figures and tables within the preface or introduction are numbered 1, 2, 3, etc. A figure or table will never appear on the same page as the beginning of a chapter or appendix. References work as described in Chapter {@NumberOf biblio}. As explained there, it is possible to have a list of references at the end of each chapter as well as at the end of the book. @PP Within the @Code "book" setup file there is a @Code "@BookSetup" booksetup. @Index @Code "@BookSetup" symbol whose options control the appearance of features specific to books (in other words, the features described in this section): @ID @OneRow @Code { "@Use { @BookSetup" " # @TitlePageFont { Helvetica Base }" " # @SeparateIntroNumbering { Yes }" " # @PrefaceAfterContents { No }" " # @ReferencesBeforeAppendices { No }" " # @ChapterStartPages { Any }" " # @ChapterWord { chapter }" " # @ChapterNumbers { Arabic }" " # @ChapterHeadingFont { Bold 2.00f }" " # @ChapterHeadingBreak { ragged 1.2fx nohyphen }" " # @ChapterHeadingFormat { number @DotSep title }" " # @AboveChapterGap { 3.00f }" " # @ChapterInContents { Yes }" " # @ChapterContentsIndent { 0f }" "}" } This is just a representative sample of these options. Section {@NumberOf setup} explains how to make your own setup file and change its options; here we just explain what the options do. @PP @Code "@TitlePageFont" is the font used on the title title.page.font. @Index @Code "@TitlePageFont" page of the book, not including a size. @PP @Code "@ChapterStartPages" determines what kinds of pages chapters and chapter.start.pages @Index @Code "@ChapterStartPages" other major components of the book may begin on, and may be {@Code Any}, {@Code Odd}, or {@Code Even}, meaning any page, odd-numbered pages only, or even-numbered pages only. It may also be {@Code SamePage}, which means that chapters and appendices will continue directly after the previous chapter or appendix, on the same page (other major components such as the table of contents and index will start on a fresh page as usual). If you switch to {@Code SamePage}, you will probably need to adjust {@Code "@ChapterHeadingFont"} and {@Code "@AboveChapterGap"}, described below, since their default values are intended for use with chapters and appendices that start on a fresh page; and you will also need to begin the body of your chapter with a paragraph symbol such as @Code "@LP" or {@Code "@PP"}, since otherwise there will be no vertical space between the chapter heading and body. @PP @Code "@SeparateIntroNumbering" separate.intro.numbering @Index @Code "@SeparateIntroNumbering" determines whether the introductory part of the book is to have a separate numbering sequence or not. @Code "@ReferencesBeforeAppendices" references. @RawIndex references references.references.before.appendices @SubIndex @Code "@ReferencesBeforeAppendices" determines whether any final list of references appears before or after any appendices. @Code "@ChapterWord" determines the word used in chapter titles; its default value, {@Code "chapter"}, produces `Chapter' in the current language. The other six options control the appearance of chapters, and there are similar options for controlling the other large-scale structure symbols. @PP @Code "@ChapterNumbers" determines how chapters will be numbered, and may be @Code { None }, @Code { Arabic }, @Code { Roman }, @Code { UCRoman }, @Code { Alpha }, or @Code { UCAlpha }. The default value is @Code Arabic for chapters and also for all large-scale structure symbols except appendices, for which it is {@Code UCAlpha}. This produces the appendices numbered in upper-case letters (A, B, C, etc.) that were mentioned earlier. @PP @Code "@ChapterHeadingFont" is the font used for chapter headings. The default value shown above produces the bold face of the initial font family, at twice the initial size. A family name is acceptable here as well. @Code "@ChapterHeadingBreak" is the break style for chapter headings. @PP @Code "@ChapterHeadingFormat" allows you to change the format of the heading. The symbol @Code "number" within it will be replaced by the number of the chapter (actually including the word Chapter as well in the current language, e.g. {@Code "Chapter 12"}); the symbol @Code "title" within it will be replaced by the title. So you could write, say, @ID @Code "@ChapterHeadingFormat { @Box paint { lightgrey } { number @DP title } }" to get the title below the number, both enclosed in a box. The default value uses the @Code "@DotSep" symbol from Section {@NumberOf headers} to show the number and title separated by a dot and two spaces, like @ID @Code "@ChapterHeadingFormat { number. title }" except when there is no number. This option is applied to other major headings, in the preface, introduction, table of contents, appendices, reference list, and index. In all these other cases, @Code "number" is an empty object, except for appendices, when it contains @Code "Appendix A" or whatever. @PP There is a @Code "@PartHeadingFormat" option for determining the format of part headings. It works in the same way as {@Code "@ChapterHeadingFormat"}, with @Code "number" and @Code "title" symbols standing for the relevant @Code "@PartNumber" and @Code "@PartTitle" options. The default value is @ID @Code "@PartHeadingFormat { @CD number @DP @CD title }" which centres the number and title. The default paragraph breaking style is {@Code "clines"}, but you may place a @Code "@Break" symbol within @Code "@PartHeadingFormat" to change this. @PP The example of boxed titles for chapters given above suffers from two practical deficiencies. First, the box won't extend right across the page, and second, when there is no @Code "number" we don't want @Code "@DP" either. Here is a value for @Code "@ChapterHeadingFormat" that solves both problems: @ID @OneCol @Code @Verbatim { @ChapterHeadingFormat { number @Case { {} @Yield @Box paint { lightgrey } @HExpand { title } else @Yield @Box paint { lightgrey } @HExpand { number @DP title } } } } The @Code "@Case" symbol (Expert's Guide @Cite { $kingston1995lout.expert }) distinguishes between the cases where @Code "number" is empty and non-empty; the @Code "@HExpand" symbol expands the horizontal space occupied by the heading to the maximum possible, so that when the box is drawn around it it will occupy the full page width. The format can be as complicated as you like, and there is no need to squeeze it all onto one line; as always, the end of a line is the same as one space. @PP Every chapter and appendix begins on a new page. @Code "@AboveChapterGap" determines how much space is left blank above the chapter title; the default value is three times the initial font size. There are similar options for other large-scale structure symbols, which determine how much space is left before each one. @PP @Code "@ChapterInContents" determines whether or not an entry is made in the table of contents for each chapter; it may be @Code Yes or {@Code No}, but would always be {@Code Yes}. The default value of the corresponding options for sub-subsections and sub-subappendices, however, is {@Code No}. @Code "@ChapterContentsIndent" determines how far from the left margin the contents entry is indented if it is printed at all. The default value shown above causes no indenting; but the default values for the corresponding @Code "@SectionrContentsIndent" and @Code "@SubSectionrContentsIndent" symbols are @Code 3f and @Code 6f respectively, producing the familiar indenting structure. @End @Section lout-3.39/doc/user/preface0000644000076400007640000000646311442521367014142 0ustar jeffjeff@Preface @Begin @LP This User's Guide brings together in one document everything needed for the day-to-day use of Version 3 of the Lout document formatting system. @IndexLetters @PP There are three other documents describing Lout: the Expert's Guide @Cite { $kingston1995lout.expert }, which you need if you want to add new features to Lout; a journal paper on the design and implementation of Lout @Cite { $kingston1993lout.design }; and a set of overhead transparencies @Cite { $kingston1994lout.overheads } that cover much the same ground as this Guide. These documents are all distributed with the software. @PP Lout is distributed free of charge under the GNU Public License. The gnu. @Index { GNU Public License } primary source is directory @ID @Code "ftp://ftp.it.usyd.edu.au/jeff/lout" containing a gzipped tar file of the current version (currently {@Code "lout-3.39.tar.gz"}), and various other things including a PostScript version of this guide. The distribution contains source code, libraries, documentation, license, and installation instructions. @PP A mailing list has been set up for discussion of all topics related to Lout. To subscribe (or unsubscribe), visit @ID @Code "http://lists.nongnu.org/mailman/listinfo/lout-users" After subscribing, to post an item send email to {@Code "lout-users@nongnu.org"}; it will be forwarded to all subscribers via email. There is also a Lout web site at {@Code "http://lout.wiki.sourceforge.net/"}. @PP Lout began in 1984 as a research project into the design of a high-level language for document formatting. At that time my name for the subject was `document layout,' and this terminology survives in the name `Lout'. The initial design was strongly influenced by Brian W. Kernighan and Lorinda L. Cherry's eqn kernighan @Index { Kernighan, Brian W. } cherry.l @Index { Cherry, Lorinda L.} eqn. @Index { @Code eqn equation formatter } equation formatter @Cite { $kernighan1975eqn }, and also by Brian K. Reid's Scribe system @Cite { $reid1980scribe }. That scribe. @RawIndex { Scribe } scribe.influence @SubIndex { influence on Lout } reid.b @Index { Reid, Brian K. } research phase ended in October 1991 with the first public release of Lout. @PP Since then the system has been steadily improved and extended. Optimal paragraph breaking and automatic hyphenation were copied from Donald knuth @Index { Knuth, D. E. } tex. @Index { @TeX } E. Knuth's @TeX system @Cite { $knuth1984tex }, and the optimal paragraph breaking algorithm was applied to the problem of producing optimal page breaks. The first implementations of horizontal galleys and optimal page breaking were by my student Gabor Inokai. Vincent Tan contributed the PDF back end. Ludovic Court{@Char egrave}s contributed the @Code "@Math" package and set up the current mailing list. Valeriy E. Ushakov smoothed the path for many people, by his contributions to improving Lout's robustness, and his tireless management of and responses to the Lout mailing list. The number of other people who have offered comments and suggestions to me is so great that it is quite out of my power to acknowledge them individually. I hope that seeing their ideas adopted will be thanks enough. @DP @RLD lines @Break { Jeffrey H. Kingston School of Information Technologies The University of Sydney 2006, Australia @Code "jeff@it.usyd.edu.au" } @End @Preface lout-3.39/doc/user/gra_over0000644000076400007640000001667511363700677014354 0ustar jeffjeff@Section @Title { Changing the overall appearance of the graph } @Tag { overall } @Begin @PP The overall appearance of the graph is controlled by options to the @Code "@Graph" symbol. As usual, these options follow the @Code "@Graph" symbol, with their values enclosed in braces; they may appear in any order, and if omitted are assigned some sensible default value. @PP There is a @Code "style" option for controlling the overall style of the graphs. @RawIndex { graphs (statistical) } graphs.style @SubIndex { @Code style option } style. @RawIndex { @Code "style" option } style.in.graphs @SubIndex { in graphs } axes. @Index { axes in graphs } graph, whose value may be either {@Code "frame"}, {@Code "grid"}, {@Code "none"}, or {@Code "axes"}. The default value is {@Code "frame"}, and it produces a frame around the graph with ticks and labels along its left and bottom edges, as in previous examples. Value @Code "grid" is similar except that the ticks are converted into grid lines crossing the entire frame. The {@Code "none"} style prints nothing (no frame, no ticks, no labels), which is useful for producing graphs that don't look like graphs, as it were. @PP If {@Code "axes"} is chosen, two other options called {@Code xorigin} and {@Code yorigin} become compulsory: graphs. @RawIndex { graphs (statistical) } graphs.xorigin @SubIndex { @Code xorigin option } xorigin.graph @Index { @Code "xorigin" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.yorigin @SubIndex { @Code yorigin option } yorigin.graph @Index { @Code "yorigin" option (graphs) } @ID @OneRow @Code @Verbatim { -2p @Font @Graph style { axes } xorigin { 0 } yorigin { 0 } width { 12c } height { 7c } leftcaption { 90d @Rotate { counts (%) } } leftgap { 1.0c } belowcaption { time (min) } belowgap { 0c } { @Data points { filledsquare } pairs { solid } { 0 0.0 1 4.8 2 7.0 3 15.2 4 19.8 5 20.0 6 21.0 7 25.0 10 29.5 15 31.2 20 35.0 30 40.0 60 50.8 } @Data points { square } pairs { solid } { 0 0.0 1 3.7 1.5 43.1 2 99.1 3 85.6 4 69.1 5 47.0 6 44.1 7 40.8 10 35.0 15 29.4 20 25.0 30 21.1 60 15.5 } } } We have requested a smaller font size for this graph as a whole by preceding it with {@Code "-2p @Font"}, meaning two points smaller, and we have used some other options which will be explained shortly. The resulting graph has an x axis and a y axis instead of a frame, like this: @CD -2p @Font @Graph style { axes } xorigin { 0 } yorigin { 0 } width { 12c } height { 7c } leftcaption { 90d @Rotate { counts (%) } } leftgap { 1.0c } belowcaption { time (min) } belowgap { 0c } { @Data points { filledsquare } pairs { solid } { 0 0.0 1 9.5 2 15.0 3 18.2 4 20.1 5 22.1 7 25.0 10 28.3 15 31.2 20 35.0 30 40.0 60 50.8 } @Data points { square } pairs { solid } { 0 0.0 1 3.7 1.5 43.1 2 99.1 3 85.6 4 69.1 5 47.0 6 44.1 7 40.8 10 35.0 15 29.4 20 25.0 30 21.1 60 15.5 } } The point where the axes cross is ({@Code xorigin}, {@Code yorigin}). @PP Although @Code "@Graph" does not provide explicit support for multiple axes, you can simulate them by overstriking two separate graphs of equal size. There is an @Code "@OverStrike" overstrike. @Index @Code "@OverStrike" symbol which overstrikes two objects, so @ID @Code "@Graph { ... } @OverStrike @Graph { ... }" will do the job. Typically one of the graphs would have y ticks, and the other would have r ticks (adjacent to the right-hand side of the frame). @PP There are @Code "xlog" and @Code "ylog" options which produce graphs. @RawIndex { graphs (statistical) } graphs.xlog @SubIndex { @Code xlog option } xlog.graph @Index { @Code "xlog" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.ylog @SubIndex { @Code ylog option } ylog.graph @Index { @Code "ylog" option (graphs) } logarithmic.axes @Index { logarithmic axes in graphs } logarithmic x and y axes: @ID @OneRow @Code @Verbatim { @Graph xlog { 10 } ylog { 10 } { ... } } The value is the base of the logarithm, usually 10 or 2, or {@Code none} (the default) meaning not logarithmic. Logarithms to different bases differ only by a constant factor, so the main effect of different bases is on the choice of ticks and labels. An @Code "xlog" option will be ignored if there are any negative or zero x data points, x ticks, or {@Code "xorigin"} or {@Code "xmin"} options; and similarly for {@Code "ylog"}. @PP There are @Code "width" and @Code "height" options for setting the size graphs. @RawIndex { graphs (statistical) } graphs.width @SubIndex { @Code width option } width. @RawIndex { @Code "width" option } width.in.graphs @SubIndex { in graphs } graphs. @RawIndex { graphs (statistical) } graphs.height @SubIndex { @Code height option } height. @RawIndex { @Code "height" option } height.in.graphs @SubIndex { in graphs } of the total area enclosed: @ID @OneRow @Code @Verbatim { @Graph width { 6.0c } height { 4.0c } { ... } } This shows the default width and height, six centimetres and four centimetres. These lengths and others discussed below can be specified using a variety of units of measurement (see Section {@NumberOf grsummary} for the details). @PP Within the frame or axes, a small margin is kept free of data points. The size of this margin is controlled by @Code "xextra" and @Code "yextra" graphs. @RawIndex { graphs (statistical) } graphs.xextra @SubIndex { @Code xextra option } xextra.graph @Index { @Code "xextra" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.yextra @SubIndex { @Code yextra option } yextra.graph @Index { @Code "yextra" option (graphs) } options: @ID @OneRow @Code @Verbatim { @Graph xextra { 0.5c } yextra { 0.5c } { ... } } Setting @Code "xextra" to @Code "0.5c" (the default value if the @Code style option is {@Code frame}) means that the smallest x value will be placed 0.5 centimetres to the right of the left boundary, and the largest will be placed 0.5 centimetres to the left of the right boundary. It is quite safe to set @Code "xextra" to @Code "0c" if desired, and indeed this is the default value when @Code style is {@Code axes} or {@Code none}. The @Code "yextra" option works in exactly the same way for y values. @PP The @Code "xdecreasing" option plots the x values in decreasing order graphs. @RawIndex { graphs (statistical) } graphs.xdecreasing @SubIndex { @Code xdecreasing option } xdecreasing.graph @Index { @Code "xdecreasing" option (graphs) } instead of increasing: @ID @Code @Verbatim { @Graph xdecreasing { yes } abovecaption { New South Wales road deaths, 1960--1990 (fatalities per 100 million vehicle km) } { @Data points { plus } pairs { dashed } { 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 } } } produces @CD @Graph xdecreasing { yes } abovecaption { New South Wales road deaths, 1960--1990 (fatalities per 100 million vehicle km) } { @Data points { plus } pairs { dashed } { 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 } } The value of @Code "xdecreasing" should be either @Code "no" (the default value) or {@Code "yes"}. A similar @Code "ydecreasing" option does the same graphs. @RawIndex { graphs (statistical) } graphs.ydecreasing @SubIndex { @Code ydecreasing option } ydecreasing.graph @Index { @Code "ydecreasing" option (graphs) } thing to the y axis. @End @Section lout-3.39/doc/user/vprg0000755000076400007640000000015711363700677013515 0ustar jeffjeffgvt prg prg_lone prg_embe prg_opti prg_chan prg_tabs prg_form \ prg_comm prg_prog prg_pipe prg_erro prg_perl lout-3.39/doc/user/bas_supe0000644000076400007640000000111511363700677014330 0ustar jeffjeff@Section @Title { Superscripts and subscripts } @Tag { super } @Begin @PP There are @Code "@Sup" and @Code "@Sub" symbols for producing superscripts and subscripts: @ID @Code "2 @Sup nd" produces @ID { 2 @Sup nd } and the @Code "@Sub" symbol works in a similar way. These symbols are probably never required in English language text, since the only uses for them are in footnotes, which produce the superscript automatically, and equations, which have their own versions of these symbols. Both symbols have a @Code "gap" option which determines the vertical spacing. @End @Section lout-3.39/doc/user/bas_empt0000644000076400007640000000156011363700677014325 0ustar jeffjeff@Section @Title { The empty object } @Tag { empty } @Begin @PP It is possible to produce examples in which an object is clearly empty. @Index { empty object } missing: @ID @Code "{ @I }" The @Code "@I" symbol is supposed to italicize the following object, but in this example there isn't one. A more plausible example is @ID @OneRow @Code { "@PP" "@PP" } There are supposed to be paragraph objects between paragraph symbols, but here there aren't. @PP Wherever an object is clearly missing, Lout inserts an @I { empty object }, which is a rectangle of size zero by zero that prints as nothing. Here are two other ways to get an empty object: @ID @Code "{} \"\"" Braces always enclose an object, so Lout is obliged to insert an empty object between them; the two double quotes make a word with no characters in it, which is taken to be an empty object. @End @Section lout-3.39/doc/user/bas_head0000644000076400007640000000201111363700677014251 0ustar jeffjeff@Section @Title { Headings } @Tag { headings } @Begin @PP The @Code "@Heading" symbol makes the following object into a heading. @Index @Code "@Heading" heading. Actually, all it does is change the font, so if you want a centred heading you have to display it as well: @ID @OneRow @Code { "@Display @Heading { A Centred Heading }" "Following text" } If you want a left-justified heading, use @Code "@LeftDisplay" instead of @Code {"@Display"}. Alternatively, you can use no display symbol at all, but then you will need paragraph symbols before and after: @ID @OneRow @Code { "@DP" "@Heading { A Left-Justified Heading }" "@PP" "Following text" } The font used is @Code Bold in the current family, although you can change this by changing the @Code "@HeadingFont" option in the setup headingfont. @Index @Code "@HeadingFont" file (Section {@NumberOf setup}). @PP In complex documents, large-scale structure symbols (Section {@NumberOf largescale}) are usually more appropriate than the @Code "@Heading" symbol. @End @Section lout-3.39/doc/user/ref_labe0000644000076400007640000000553011363700677014273 0ustar jeffjeff@Section @Title { Labelled (as opposed to numbered) references } @RunningTitle { Labelled references } @Tag { labelled } @Begin @PP Lout ordinarily assigns a number to each reference, and prints this references. @RawIndex { references } references.labelled @SubIndex { labelled } labelled.references @Index { labelled references } number beside the reference in the reference list and at the point(s) of citation. There is a way to make Lout use a label of your choice instead of a number for each reference. First change the following setup file options to the values shown (these options are explained in Section {@NumberOf changeref}): @ID @OneRow @Code @Verbatim { @RefCiteLabels { @Label } @RefListLabels { @Label. } @RefListLabelWidth { 4.00f } @RefListSortKey { @Label } } Then make sure that every reference you cite has a {@Code "@Label"} option: references. @RawIndex { references } references.label @SubIndex { @Code "@Label" } label.references @Index { @Code "@Label" (references) } @ID @OneRow @Code @Verbatim { { @Reference @Tag { kingston1995lout.expert } @Type { TechReport } @Label { Kin94 } ... } } @Code "@Label" may contain several words, and even font changes, but not an arbitrary object. @PP The effect of these changes is that your references will now be labelled with their @Code "@Label" options instead of with numbers, and they will be sorted by label instead of by tag. However, tags are still used when citing. @PP The big problem with labels is that they vary from document to document, either because of a change of style or because the usual first few letters of the authors' names plus year has to be augmented with {@Code a}, {@Code b}, {@Code c} etc. to distinguish publications by the same authors in the same year. To help you overcome these problems, the @Code "$" symbol has a @Code "label" option: @ID @Code { "@Cite { $ label { Kin94a } kingston1995lout.expert, ... }" } The @Code "@Ref" and @Code "@ChapRef" symbols also have a @Code label option. If you use this option, it will be used to label the reference instead of the @Code "@Label" option from the @Code "@Reference" symbol (indeed, the @Code "@Reference" symbol need have no @Code "@Label" option in this case). But note that using @Code "label" does not itself give you labelled references; you get them with the setup file options as explained above. @PP If your labels turn out to be too wide for the space allowed for them in the reference list, you have two alternatives. One is to increase the @Code "@RefListLabelWidth" setup file option shown above, since it determines this space. The other is to change the @Code "@RefListFormat" setup file option to {@Code "DropLabels"}, which produces drop items: @ID @OneRow { @RawTaggedList @DTI { Kin94a. } @RefPrint kingston1995lout.expert @RawEndList } Then it won't matter how wide your labels are. @End @Section lout-3.39/doc/user/pie_erro0000644000076400007640000000237011363700677014337 0ustar jeffjeff@Section @Title { Errors } @Tag { pie_erro } @Begin @PP Lout normally produces output that will print without mishap on errors. @RawIndex { errors } errors.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.errors @SubIndex { errors } any PostScript device. However, some of the options of @Code "@Pie" and @Code "@Slice" are passed through Lout without checking. Any errors in this material will not be detected until the file is printed. @PP When an error is detected, the offending page is printed up to the point where the error occurred, with a message nearby describing the error. Printing of the document is then aborted. The problem is usually easy to locate since it lies in whatever should have been printed next. @PP Like {@Code "@Diag"} and {@Code "@Graph"}, @Code "@Pie" has a @Code "save" option which causes the memory used by the pie graph save. @RawIndex { @Code "save" option } save.in.pie @SubIndex { in pie graphs } piegraphs. @RawIndex { pie graphs } piegraphs.save @SubIndex { @Code "save" option } to be reclaimed as soon as it is printed: @ID @OneRow @Code @Verbatim { @Pie save { yes } ... } However @Code "@Pie" uses very little memory and so this option is probably not going to be needed. @End @Section lout-3.39/doc/user/vpie0000755000076400007640000000024311363700677013476 0ustar jeffjeffgvim pie sleep 2 gvim pie_intr sleep 2 gvim pie_slic sleep 2 gvim pie_over sleep 2 gvim pie_capt sleep 2 gvim pie_labe sleep 2 gvim pie_erro sleep 2 gvim pie_summ lout-3.39/doc/user/bgr_rota0000644000076400007640000000227311363700677014334 0ustar jeffjeff@Section @Title { Rotation } @Tag { rotation } @Begin @PP The @Code "@Rotate" symbol rotates the following object by any positive rotate. @Index @Code "@Rotate" or negative angle, measured in degrees: @ID @Code "45d @Rotate @Box WARNING!" has result @ID { 45d @Rotate @Box WARNING! } As usual, the object to be rotated may be arbitrary. However, it is difficult for Lout to choose appropriate column widths for paragraphs inside rotated objects, so if a rotated object contains paragraphs that should be broken it is best to define the object's width explicitly, using the @Code "@Wide" symbol from Section {@NumberOf precise}: wide. @RawIndex { @Code "@Wide" } wide.rotate @SubIndex { with @Code "@Rotate" } @ID @OneRow @Code @Verbatim { -90d @Rotate 4.5c @Wide { Papal initiatives and influence from the crowning of Charlemagne to the First Crusade } } The result here is @ID { -90d @Rotate 4.5c @Wide { Papal initiatives and influence from the crowning of Charlemagne to the First Crusade } } The @Code "@Wide" symbol fixes the width of the following object, in this example to the length 4.5 centimetres, which is all Lout needs to decide the column widths of any paragraphs within it. @End @Section lout-3.39/doc/user/tbl_span0000644000076400007640000001342611363700677014341 0ustar jeffjeff@Section @Title { Spanning columns and rows } @Tag { tbl_span } @Begin @PP To make a cell span across several columns, precede the @Code "@Cell" tables. @RawIndex { tables } tables.span @SubIndex { spanning columns and rows } spanning.columns @Index { spanning columns and rows in tables } symbol with @Code "@StartHSpan" and replace each spanned cell's tables. @RawIndex { tables } tables.starthspan @SubIndex { @Code "@StartHSpan" option } starthspan.tables @Index { @Code "@StartHSpan" option (tables) } @Code "@Cell" symbol with {@Code "@HSpan"}, like this: tables. @RawIndex { tables } tables.hspan @SubIndex { @Code "@HSpan" option } hspan.tables @Index { @Code "@HSpan" option (tables) } @ID @OneRow -1px @Break @Code @Verbatim { @Tbl rule { yes } aformat { @StartHSpan @Cell indent { ctr } @B A | @HSpan | @HSpan } bformat { @Cell A | @Cell B | @Cell C } { @Rowa A { Some famous authors } @Rowb A { Austen } B { Chaucer } C { Donne } @Rowb A { Balzac } B { Darwin } C { Goethe } } } The result of this is @CD @OneRow @Tbl rule { yes } aformat { @StartHSpan @Cell indent { ctr } @B A | @HSpan | @HSpan } bformat { @Cell A | @Cell B | @Cell C } { @Rowa A { Some famous authors } @Rowb A { Austen } B { Chaucer } C { Donne } @Rowb A { Balzac } B { Darwin } C { Goethe } } We've used a sample of options to show how naturally these go with spanning cells: they apply to the whole cell as usual, whatever its extent. It is quite acceptable to span just some of the columns, not all of them; indeed, there may be no @Code "@HSpan" symbols at all, and then the cell just spans its own column, which sounds redundant but actually has a use (Section {@NumberOf tbl_alig}). @PP Spanning rows work in the same way; the spanning cell is preceded by {@Code "@StartVSpan"}, and the spanned cells are replaced by tables. @RawIndex { tables } tables.startvspan @SubIndex { @Code "@StartVSpan" option } startvspan.tables @Index { @Code "@StartVSpan" option (tables) } tables. @RawIndex { tables } tables.vspan @SubIndex { @Code "@VSpan" option } vspan.tables @Index { @Code "@VSpan" option (tables) } {@Code "@VSpan"}: @ID @OneRow -1px @Break @Code @Verbatim { @Tbl rule { yes } aformat { @StartVSpan @Cell @I A | @Cell B | @Cell C } bformat { @VSpan | @Cell B | @Cell C } { @Rowa A { Mathematics } B { MATH 1001 } C { Differential Calculus } @Rowb B { MATH 1002 } C { Linear Algebra } @Rowa A { Computer Science } B { COMP 1001 } C { Introductory Programming } @Rowb B { COMP 1002 } C { Introductory Computer Science } } } The result of this is @CD @OneRow @Tbl rule { yes } aformat { @StartVSpan @Cell @I A | @Cell B | @Cell C } bformat { @VSpan | @Cell B | @Cell C } { @Rowa A { Mathematics } B { MATH 1001 } C { Differential Calculus } @Rowb B { MATH 1002 } C { Linear Algebra } @Rowa A { Computer Science } B { COMP 1001 } C { Introductory Programming } @Rowb B { COMP 1002 } C { Introductory Computer Science } } Here is a notorious larger example, the `spiral': @ID @OneRow -1px @Break @Code @Verbatim { @QuotedDisplay @Tbl rule { yes } { @Row format { @StartVSpan @Cell A | @StartHSpan @Cell B | @HSpan } A { @SomeText } B { @SomeText } @Row format { @VSpan | @Cell B | @StartVSpan @Cell C } B { @SomeText } C { @SomeText } @Row format { @StartHSpan @Cell A | @HSpan | @VSpan } A { @SomeText } } } The @Code "@SomeText" symbol produces a short paragraph of text. The result is @QD @Tbl rule { yes } { @Row format { @StartVSpan @Cell A | @StartHSpan @Cell B | @HSpan } A { @SomeText } B { @SomeText } @Row format { @VSpan | @Cell B | @StartVSpan @Cell C } B { @SomeText } C { @SomeText } @Row format { @StartHSpan @Cell A | @HSpan | @VSpan } A { @SomeText } } It is important when constructing mind-boggling tables like this one to ensure that every format has exactly the same number of @Code "|" symbols. Otherwise the number of columns will differ from row to row. The names given to the entries ({@Code "A"}, {@Code "B"}, {@Code "C"}, etc.) are quite irrelevant: having a @Code "@Cell D" in one row and a @Code "@Cell D" in another does not mean that the cells will appear in the same column. @PP There is a @Code "@StartHVSpan" symbol which combines the effects tables. @RawIndex { tables } tables.starthvspan @SubIndex { @Code "@StartHVSpan" option } starthvspan.tables @Index { @Code "@StartHVSpan" option (tables) } of @Code "@StartHSpan" and {@Code "@StartVSpan"}. You need to use it in this arrangement: @ID @OneRow @Tbl mv { 0.5vx } aformat { @Cell @Code A | @Cell @Code B | @Cell @Code C } { @Rowa A { "@StartHVSpan" } B { "@HSpan" } C { "@HSpan" } @Rowa A { "@VSpan" } @Rowa A { "@VSpan" } } The blank positions should be left empty. For example: @ID @OneRow @Code @Verbatim { @Tbl rule { yes } aformat { @Cell A | @Cell B | @Cell C | @Cell D } bformat { @Cell A | @StartHVSpan @Cell i { ctr } iv { ctr } B | @HSpan | @Cell D } cformat { @Cell A | @VSpan | | @Cell D } { @Rowa @Rowb B { CPU } @Rowc @Rowa } } produces @CD @OneRow @Tbl rule { yes } strut { no } aformat { @Cell A | @Cell B | @Cell C | @Cell D } bformat { @Cell A | @StartHVSpan @Cell i { ctr } iv { ctr } B | @HSpan | @Cell D } cformat { @Cell A | @VSpan | | @Cell D } { @Rowa @Rowb B { CPU } @Rowc @Rowa } This example illustrates how Lout apportions space in the presence of spanning columns. If the spanning cell is naturally narrower than the cells it spans, it is widened to their size. If it is wider (as in the example above), then the last spanned cell is widened to take up the slack. This is why the third cell is wider than the second in the first row of this example. @End @Section lout-3.39/doc/user/gra_tick0000644000076400007640000002137611363700677014325 0ustar jeffjeff@Section @Title { Ticks and labels } @Tag { ticks } @Begin @PP @I Ticks are the short lines that mark off intervals along the axes, and graphs. @RawIndex { graphs (statistical) } graphs.ticks @SubIndex { ticks } ticks.graph @Index { ticks in graphs } graphs. @RawIndex { graphs (statistical) } graphs.labels @SubIndex { labels } labels. @RawIndex { labels } labels.in.graphs @SubIndex { in graphs } @I labels are the numbers appearing near the ticks (not to be confused with captions). {@Code "@Graph"} produces ticks and labels automatically with some care, so it is probably best not to worry about them unless the result is not pleasing, in which case there are options for controlling them. @PP One simple way to control the production of x ticks is with the {@Code xmin}, {@Code xmax}, and {@Code xticksep} options to @Code graphs. @RawIndex { graphs (statistical) } graphs.xmin @SubIndex { @Code xmin option } xmin.graph @Index { @Code "xmin" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.xmax @SubIndex { @Code xmax option } xmax.graph @Index { @Code "xmax" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.xticksep @SubIndex { @Code xticksep option } xticksep.graph @Index { @Code "xticksep" option (graphs) } "@Graph". For example, @ID @OneRow @Code { "@Graph" " xmin { 0 }" " xmax { 5 }" " xticksep { 0.5 }" } specifies that x values in the range 0 to 5 are to be expected, and that a tick and label is to appear every 0.5 units along the x axis. One or both of @Code "xmin" and @Code "xmax" may be omitted, in which case suitable values will be inferred from the data as usual. @PP Alternatively, complete control over the appearance of x ticks and labels is provided by the @Code "xticks" option. For example, graphs. @RawIndex { graphs (statistical) } graphs.xticks @SubIndex { @Code xticks option } xticks.graph @Index { @Code "xticks" option (graphs) } @ID @OneRow @Code { "@Graph" " xticks { 0@ 5 10@ 15 20@ }" } specifies that x ticks are to be drawn at 0, 5, 10, 15, and 20. An @Code "@" following a number indicates that a label is to be printed as well, so the above example will produce labels at 0, 10, and 20. For even finer control, @Code "@" may be replaced by a label enclosed in parentheses: @ID @OneRow @Code { "@Graph" " xticks { 1 (Democrat) 2 (Republican) 3 (Other) }" } As this example shows, a label does not have to be a number; it can be any string of characters, including spaces and balanced parentheses; but it may not be an arbitrary Lout object. @PP The character @Code "^" in a label indicates that the remainder is to be treated as an exponent: @ID @OneRow @Code { "@Graph" " xlog { 10 }" " xticks { 1 (1) 10 (10) 100 (10^2) 1000 (10^3) 10000 (10^4) 100000 (10^5) }" "{" " @Data points { plus }" " { 1 2.1 10 3.4 100 4.9 1000 6.1 10000 7.2 100000 7.6 }" "}" } In fact, the labels inserted automatically when @Code xticks is omitted have exponents when the axis is logarithmic, so @Code xticks is hardly necessary in this example. Anyway the result is @CD @Graph height { 3c } xlog { 10 } xticks { 1 (1) 10 (10) 100 (10^2) 1000 (10^3) 10000 (10^4) 100000 (10^5) } { @Data points { plus } { 1 2.1 10 3.4 100 4.9 1000 6.1 10000 7.2 100000 7.6 } } Setting @Code "xticks" to empty produces no x ticks (this is not the same as omitting {@Code xticks}). @PP Similar options control ticks and labels on the y axis: {@Code "ymin"}, {@Code "ymax"}, {@Code "yticksep"}, and {@Code "yticks"}. There are graphs. @RawIndex { graphs (statistical) } graphs.ymin @SubIndex { @Code ymin option } ymin.graph @Index { @Code "ymin" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.ymax @SubIndex { @Code ymax option } ymax.graph @Index { @Code "ymax" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.yticksep @SubIndex { @Code yticksep option } yticksep.graph @Index { @Code "yticksep" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.yticks @SubIndex { @Code yticks option } yticks.graph @Index { @Code "yticks" option (graphs) } also @Code "xticklength" and @Code "yticklength" options which set the length of ticks: graphs. @RawIndex { graphs (statistical) } graphs.xticklength @SubIndex { @Code xticklength option } xticklength.graph @Index { @Code "xticklength" option (graphs) } graphs. @RawIndex { graphs (statistical) } graphs.yticklength @SubIndex { @Code yticklength option } yticklength.graph @Index { @Code "yticklength" option (graphs) } @ID @OneRow @Code { "@Graph" " xticklength { 0.5f }" " yticklength { 0.5f }" } shows the default values, half the current font size in both cases. @PP There is also an {@Code "rticks"} option which is similar to graphs. @RawIndex { graphs (statistical) } graphs.rticks @SubIndex { @Code rticks option } rticks.graph @Index { @Code "rticks" option (graphs) } {@Code "yticks"} except that the ticks it controls appear on the right-hand side of the frame (this option is relevant only when the @Code style option is {@Code frame}). Unlike @Code "xticks" and {@Code "yticks"}, {@Code "rticks"} has empty default value, which is why you don't usually see r ticks. They are most useful when overstriking two graphs using @Code "@OverStrike" as explained earlier; one graph will have y ticks in the usual way, the other will have r ticks and empty y ticks: @CD { @Graph style { frame } width { 6c } height { 6c } xextra { 0c } yextra { 0c } rightcaption { -90d @Rotate { Precipitation mm } } rightgap { 3.0f } hidecaptions { no } xmin { 0 } xmax { 12 } ymin { 0 } ymax { 450 } xticks { } xticklength { 0c } rticks { 0@ 50@ 100@ 150@ 200@ 250@ 300@ 350@ 400@ 450@ } yticks {} { @Data pairs { filledyhisto } colour { blue } linewidth { 1p } { 0 340 1 410 2 430 3 340 4 290 5 175 6 140 7 125 8 110 9 100 10 85 11 175 12 0 } } @OverStrike @Graph style { frame } width { 6c } height { 6c } xextra { 0c } yextra { 0c } leftcaption { 90d @Rotate { Temperature {@Degree}C } } leftgap { 2.5f } hidecaptions { no } xmin { 0 } xmax { 12 } ymin { -30 } ymax { 50 } xticks { 0.5 (J) 1.5 (F) 2.5 (M) 3.5 (A) 4.5 (M) 5.5 (J) 6.5 (J) 7.5 (A) 8.5 (S) 9.5 (O) 10.5 (N) 11.5 (D) } xticklength { 0c } yticks { -30@ -20@ -10@ 0@ 10@ 20@ 30@ 40@ } { @Data pairs { solid } colour { red } linewidth { 1p } { 0.0 24 1.0 24 2.0 25 3.0 26 4.0 26 5.0 26 6.0 26 7.0 27 8.0 26 9.0 27 10.0 28 11.0 28 12.0 26 } } } Here the first graph has @ID @Code { "rticks { 0@ 50@ 100@ 150@ 200@ 250@ 300@ 350@ 400@ 450@ }" "yticks {}" } for its ticks. This graph uses other features that we have not come to yet, but anyway its source is: @ID 0.95 @Scale -1px @Break @OneRow @Code @Verbatim { @Graph style { frame } width { 6c } height { 6c } xextra { 0c } yextra { 0c } rightcaption { -90d @Rotate { Precipitation mm } } rightgap { 3.0f } hidecaptions { no } xmin { 0 } xmax { 12 } ymin { 0 } ymax { 450 } xticks { } xticklength { 0c } rticks { 0@ 50@ 100@ 150@ 200@ 250@ 300@ 350@ 400@ 450@ } yticks {} { @Data pairs { filledyhisto } colour { blue } linewidth { 1p } { 0 340 1 410 2 430 3 340 4 290 5 175 6 140 7 125 8 110 9 100 10 85 11 175 12 0 } } @OverStrike @Graph style { frame } width { 6c } height { 6c } xextra { 0c } yextra { 0c } leftcaption { 90d @Rotate { Temperature {@Degree}C } } leftgap { 2.5f } hidecaptions { no } xmin { 0 } xmax { 12 } ymin { -30 } ymax { 50 } xticks { 0.5 (J) 1.5 (F) 2.5 (M) 3.5 (A) 4.5 (M) 5.5 (J) 6.5 (J) 7.5 (A) 8.5 (S) 9.5 (O) 10.5 (N) 11.5 (D) } xticklength { 0c } yticks { -30@ -20@ -10@ 0@ 10@ 20@ 30@ 40@ } { @Data pairs { solid } colour { red } linewidth { 1p } { 0.0 24 1.0 24 2.0 25 3.0 26 4.0 26 5.0 26 6.0 26 7.0 27 8.0 26 9.0 27 10.0 28 11.0 28 12.0 26 } } } Lout has only a hazy idea of how much space is occupied by ticks and labels. Unless @Code "xticks" is empty, Lout allows 1.7 times the current font size below the graph for x ticks and labels, which is usually about right; but it does not allow any space for y and r ticks and labels since it has no idea how wide the labels will be. The discussion of captions in Section {@NumberOf captions} explains how to use the @Code "leftgap" and @Code "rightgap" options to work around this deficiency. @End @Section lout-3.39/doc/user/equ_intr0000644000076400007640000000442211363700677014361 0ustar jeffjeff@Section @Title { Introduction } @Begin @PP The Lout definitions for the @Code "@Eq" symbol are accessed via a setup file called {@Code "eq"}, which you must include at the start of your document if eq.file @Index { @Code "eq" file } you want equations, like this: @ID @OneRow @Code { "@SysInclude { tbl }" "@SysInclude { eq }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } This shows what to do if you want both tables and equations, but you may leave out the line for tables if you don't want them. Setup files for specialized packages, such as {@Code "tab"} and {@Code "eq"}, are best included before the main setup file, but may be included in any order. @PP With the @Code "eq" file included, you may write @ID @Code "@Eq { ... }" at any point in your document, and the symbols of @Code "@Eq" will be available between the braces. Any symbols available outside continue to be available inside, which means that equations may be freely mixed with other symbols, without restriction. @PP Equations may appear within a paragraph of text, or they may be displayed. {@Code "@Eq"}'s job is to produce an object containing the equation; it neither knows nor cares where this equation goes. @PP To display an equation, use a display symbol like @Code "@IndentedDisplay" or @Code "@CentredDisplay" (Section {@NumberOf displays}). For example, @ID @Code "@CentredDisplay @Eq { int supp pi on 0 sin ` x = 0 }" produces @CentredDisplay @Eq { int supp pi on 0 sin ` x = 0 } There are also symbols for aligned and numbered displays, which are very commonly used with equations. These symbols are the subject of Section {@NumberOf mathdisplays}. @PP To get an equation within a paragraph, it is best to use a variant of @Code "@Eq" called {@Code "@E"}. An equation within @Code "@E { ... }" will be prevented from breaking across two lines, and its superscripts will appear slightly lower, which is desirable within paragraphs. equations. @RawIndex { equations } equations.e @SubIndex { @Code "@E" } eaaa.equations @Index { @Code "@E" (equations) } @PP In this chapter we show the Lout input at the left, and its result at the right: @ID { @Code "@Eq { {x sup 2 + y sup 2} over 2 }" |7ct @Eq { {x sup 2 + y sup 2} over 2 } } Subsequent examples will omit the enclosing {@Code "@Eq { ... }"}. @End @Section lout-3.39/doc/user/str_marg0000644000076400007640000001350011363700677014346 0ustar jeffjeff@Section @Title { Margin notes and arbitrary placement } @Tag { marginnotes } @Begin @PP A note can be placed in the left margin by typing leftnote. @Index @Code "@LeftNote" marginnote. @Index { margin notes } @ID { @Code "@LeftNote { A left note. }" @LeftNote { A left note. } } after the word that the note refers to. The note will appear in the margin at the same height on the page as that word, unless that would cause it to overlap a previous margin note, in which case it will be shifted downwards (but never onto the next page). The note may be an arbitrary Lout object; for example, you might type @ID { @Code "@LeftNote @I { A left note. }" @LeftNote @I { A left note. } } to make your note come out in italics. @PP You can get a note in the right margin by using @Code "@RightNote" @RightNote { A right note. } rightnote. @Index @Code "@RightNote" instead of {@Code "@LeftNote"}. To get a note in the outer margin (left on even pages, right on odd pages), use {@Code "@OuterNote"}; @OuterNote { An outer note. } outernote. @Index @Code "@OuterNote" and for the opposite, use {@Code "@InnerNote"}. @InnerNote { An inner note. } @PP By default, Lout produces margins that are 2.5 centimetres wide, which is not really enough to accommodate reasonable margin notes. To change these margins, you need to change options in the setup file, as explained in Section {@NumberOf margins}. @PP The appearance of the margin notes themselves is also determined by options in the setup file (for a general introduction to setup files and their options, consult Section {@NumberOf setup}). Here are the options and their default values: @ID @OneRow @Code { "@MarginNoteFont { 0.80f }" "@MarginNoteBreak { ragged 1.10fx }" "@MarginNoteHGap { 0.5c }" "@MarginNoteVGap { 1.00v }" "@MarginNoteWidth { 1.50c }" } @Code "@MarginNoteFont" determines the font; the default value produces the current font scaled to 0.8 times the current size. @Code "Slope 0.80f" would yield italic notes, and so on. @Code "@MarginNoteBreak" is the paragraph breaking style, similar to the @Code "@InitialBreak" setup file option. @PP @Code "@MarginNoteHGap" determines how far away from the adjacent text column the margin note will appear; the default value is 0.5 centimetres. Notice that, by this definition, margin notes will appear in the page body margin (Section {@NumberOf margins}) if there is one. @Code "@MarginNoteVGap" is the minimum vertical separation between margin notes (i.e. it determines how far downwards a note will be shifted to avoid the previous one). @Code "@MarginNoteWidth" determines the width of the column in which margin notes (both left and right) are set; the default value of 1.5 centimetres is suited to the 2.5 centimetre page margins that are the default, but if you widen the page or page body margins you will be able to increase @Code "@MarginNoteWidth" too. @PP Left notes extend into the left margin (including the left page body margin) a total distance of @Code "@MarginNoteHGap" plus {@Code "@MarginNoteWidth"}, and it is up to you to make sure that this does not put them off the page. Similar remarks apply to right notes. And since notes are never shifted to the next page, only downwards, there is also a risk that a note will be shifted off the bottom of the page, if it is very long or if preceding notes obstruct it. Again, it is up to you to avoid this problem by keeping your notes small and not too close together. @PP Margin notes inside footnotes, figures and tables work well. Margin notes in multi-column documents are disastrous unless used very sparingly. Margin notes do not appear in plain text output (Section {@NumberOf plain}). @PP A more radical way to place objects at arbitrary points on the current place. @Index @Code "@Place" page is provided by the @Code "@Place" symbol: @ID @OneRow @Code { "@Place" " x { right - 1c - xsize }" " y { { foot + top } / 2 }" "{" " @Box { Hello }" "}" } The placed object may be any object. This particular example produces a box whose @I x (horizontal) position is such that its right edge is one centimetre from the right edge of the page, and whose @I y (vertical) position is halfway up & @Place x { right - 1c - xsize } y { { foot + top } / 2 } { @Box { Hello } } the page. @PP In addition to numbers, with or without units of measurement (Section {@NumberOf objects}), the following symbols may be used inside the @Code "x" and @Code "y" options: @ID @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { left } B { The left edge of the page } @Rowa A { right } B { The right edge of the page } @Rowa A { foot } B { The foot edge of the page } @Rowa A { top } B { The top edge of the page } @Rowa A { "+" } B { Addition (positive is to the right and up) } @Rowa A { "-" } B { Subtraction (negative is to the left and down) } @Rowa A { "*" } B { Multiplication } @Rowa A { "/" } B { Division } @Rowa A { "xsize" } B { The width of the object being placed } @Rowa A { "xmark" } B { The column mark of the object being placed (for expert users) } @Rowa A { "ysize" } B { The height of the object being placed } @Rowa A { "ymark" } B { The row mark of the object being placed (for expert users) } } Negative numbers have to be enclosed in double quotes to avoid the initial @Code "-" being mistaken for subtraction. The usual precedences and associativities apply to the mathematical operators; braces (not parentheses) may be used for grouping. It is best to give values to @Code "x" and @Code y that do not depend on any assumptions about where the coordinate system's origin is; this is true of the examples above. At the point where @Code "@Place" occurs, the result is an empty object. As with margin notes, Lout does not know what is happening and will not lay out the rest of the page around the placed object. @End @Section lout-3.39/doc/user/ref0000644000076400007640000000214611363700677013310 0ustar jeffjeff@Chapter @Title { References } @Tag { biblio } @Begin @LP The simple way to make a list of references is to put them in a numbered references. @Index { references } or tagged list at the end of your document. If you use references only rarely, that is probably the best way, but if you use them frequently this chapter will save you hours of work in the long run. @PP Some good general principles and many examples have been given by van Leunen van.leunen. @Index { van Leunen, Mary-Claire } @Cite { $vanleunen1992handbook }. Broadly speaking Lout follows her recommendations, with some unification and scaling back as is inevitable with software. Scribe @Cite { $reid1980scribe } latex. @Index @LaTeX scribe. @RawIndex Scribe scribe.reference @SubIndex { reference formatting } and @LaTeX @Cite { $lamport1986latex } followed the first edition of the same source, so translation from Scribe and @LaTeX references is fairly straightforward. @BeginSections @Include { ref_sett } @Include { ref_cite } @Include { ref_labe } @Include { ref_entr } @Include { ref_chan } @Include { ref_crea } @EndSections @End @Chapter lout-3.39/doc/user/gra_intr0000644000076400007640000000336311363700677014343 0ustar jeffjeff@Section @Title { Introduction } @Tag { grintro } @Begin @PP The Lout definitions for graph formatting are kept in a file called {@Code "graph"}, which you must include at the start of your document if graph.file @Index { @Code "graph" file } you want graphs, like this: @ID @OneRow @Code { "@SysInclude { graph }" "@SysInclude { doc }" "@Doc @Text @Begin" "..." "@End @Text" } Setup files for specialized packages, such as {@Code "graph"}, should be included before the main setup file. Once this is done, the @Code "@Graph" symbol used below will then be available for use anywhere within your document. @PP @Code "@Graph" distinguishes between the overall graph, produced by the @Code "@Graph" symbol itself, and the data sets to be placed within it, each of which is enclosed by a @Code "@Data" symbol: @ID @OneRow @Code { "@CentredDisplay @Graph" "{" " @Data points { plus }" " { 1 1.10 2 1.21 3 1.33 4 1.46 5 1.61 6 1.77 7 1.95 8 2.14 }" "" " @Data points { circle }" " { 1 1.20 2 1.44 3 1.73 4 2.07 5 2.45 6 2.99 7 3.58 8 4.30 }" "}" } Although it is good practice to lay the input data out neatly, layout has no effect on the result. It is not necessary to have one data point per line, for example. The result of this example is @CentredDisplay @Graph { @Data points { plus } { 1 1.10 2 1.21 3 1.33 4 1.46 5 1.61 6 1.77 7 1.95 8 2.14 } @Data points { circle } { 1 1.20 2 1.44 3 1.73 4 2.07 5 2.45 6 2.99 7 3.58 8 4.30 } } We have used the @Code "@CentredDisplay" symbol from Section {@NumberOf displays} to produce a centred display, but the @Code "@Graph" symbol produces an object which may appear anywhere at all -- in a figure, for example, or as an entry in a table. @End @Section lout-3.39/doc/user/prg_pipe0000644000076400007640000000554211363700677014344 0ustar jeffjeff@Section @Title { Reading and selecting program text from separate files } @Tag { pipes } @Begin @PP We have said that program text within @Code "@CP { ... }" and the other programs. @RawIndex { programs } programs.include @SubIndex { @Code "@Include" within } include.programs @Index { @Code "@Include" within programs } symbols is passed directly to @Code prg2lout for analysis. However, there is an exception. The program text may contain an @Code "@Include" or @Code "@SysInclude" command, which, as for the @Code "@Verbatim" symbol (Section {@NumberOf verbatim}), causes Lout to take the program text from a file: @ID @OneRow @Code { "@Eiffel" "{" " @Include { \"/usr/staff/jeff/Eiffel/hash.e\" }" "}" } The included file is not examined for balanced braces or @Code "@End" or {@Code "@Include"}; it is treated entirely verbatim and passed straight on to {@Code prg2lout}. There may be several @Code "@Include" commands, and any amount of program text as well, within @Code "@CP { ... }" and the rest. @PP When including files in this way it often happens that only part of an actual program file is wanted for display. Rather than placing the wanted part in a separate file, which is error-prone and tedious when the program is changing, Unix users can use the @Code "pipe" option programs. @RawIndex { programs } programs.pipe @SubIndex { @Code "pipe" option } pipe.programs @Index { @Code "pipe" option (programs) } to pipe the entire file through an arbitrary sequence of Unix commands, which may be used to make the wanted selection before the program text is passed to {@Code prg2lout}. @PP For example, suppose that all your Eiffel routines begin with the routine name one tab stop from the left margin and end at the first following @Eiffel { end } indented two tab stops. Then @ID @OneRow @Code { "@Eiffel" " pipe { \"sed -n /^.insert/,/^..end/p\" }" "{" " @Include { \"/usr/staff/jeff/Eiffel/hash.e\" }" "}" } will select just the @Eiffel { insert } routine from the @Code { hash.e } file. Assuming that your program text has been laid out in a disciplined manner, every line of the selection will begin with a tab character that is not wanted in this display, so an even better pipe is @ID @OneRow @Code { "@Eiffel" " pipe { \"sed -n /^.insert/,/^..end/p | cut -c2-\" }" "{" " @Include { \"/usr/staff/jeff/Eiffel/hash.e\" }" "}" } since it cuts away the unwanted tab characters. Unfortunately, we can't show the result of this on an actual example, since that would prevent this manual from being formatted on a non-Unix system. @PP When using @Code "pipe" it is also possible to omit {@Code "@Include"} and use the pipe to get the file as well as select from it: @ID @OneRow @Code { "@Eiffel pipe { \"cat /usr/staff/jeff/Eiffel/hash.e | sed -n /^.insert/,/^..end/p | cut -c2-\" } {}" } This pipes nothing into the {@Code cat} command, which does no harm. @End @Section lout-3.39/doc/user/bas_marg0000644000076400007640000000225511363700677014310 0ustar jeffjeff@Section @Title { Margin kerning } @Tag { mkern } @Begin @PP The @Code "@Break" symbol offers a variant of ordinary paragraph breaking called @I { margin kerning }, in which small characters margin.kerning. @Index { margin kerning } that happen to end up at the start or end of a line protrude slightly into the margin. This is said to make documents look better, particularly in narrow columns. For example, @ID @Code @Verbatim { 2i @Wide marginkerning @Break { This is a test, just a little test, of margin kerning. It should kern small characters at the margins. } } produces @ID 2i @Wide marginkerning @Break { This is a test, just a little test, of margin kerning. It should kern small characters at the margins. } in which the comma at the end of the first line protrudes. (For the @Code "@Wide" symbol, which produces a two-inch column here, see Section {@NumberOf precise}.) @PP As with most @Code "@Break" options, you probably want this in your @Code "@InitialBreak" option, described in Section {@NumberOf paras}, if you use it at all. By default there is no margin kerning. To turn it off in a context where it is on, use @Code {"nomarginkerning @Break"}. @End @Section lout-3.39/doc/user/prg0000644000076400007640000001010311363700677013314 0ustar jeffjeff@Chapter @Title { Computer Programs } @Tag { cprint } @Begin @LP This chapter describes how to typeset computer program text using Lout programs. @Index { programs } computer.programs. @RawIndex { computer programs @I see programs } along with the @Code prg2lout prg2lout. @Index { @Code prg2lout filter program } filter program, which is always installed wherever Lout is. The available languages are: blue. @Index { Blue program printing } c. @Index { C and C++ program printing } eiffel. @Index { Eiffel program printing } haskell. @Index { Haskell program printing } java. @Index { Java program printing } nonpareil. @Index { Nonpareil program printing } perl. @Index { Perl program printing } pod. @Index { Pod (for Perl) printing } python. @Index { Python program printing } rsl. @Index { RSL program printing } ruby. @Index { Ruby program printing } @CD @Tbl mv { 0.5vx } af { Italic } aformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E } bformat { @Cell A | @Cell @Code B | @Cell @Code C | @Cell @Code D | @Cell E } { @Rowa rb { yes } A { Language name } B { Setup file name } C { Lout symbol } D { Default style } E { ` ' escapes } @Rowb A { Blue } B { blue } C { "@Blue" } D { varying } E { Yes } @Rowb A { C, C++ } B { cprint } C { "@CP" } D { fixed } E { No } @Rowb A { Eiffel } B { eiffel } C { "@Eiffel" } D { varying } E { Yes } @Rowb A { Haskell } B { haskell } C { "@Haskell" } D { symbol } E { Yes } @Rowb A { Java } B { java } C { "@Java" } D { fixed } E { No } @Rowb A { Nonpareil } B { np } C { "@Nonpareil" } D { symbol } E { Yes } @Rowb A { Perl } B { perl } C { "@Perl" } D { fixed } E { No } @Rowb A { Pod } B { pod } C { "@Pod" } D { varying } E { No } @Rowb A { Python } B { python } C { "@Python" } D { varying } E { No } @Rowb A { RSL } B { rsl } C { "@RSL" } D { symbol } E { Yes } @Rowb A { Ruby } B { ruby } C { "@Ruby" } D { fixed } E { No } rb { yes } } C and C++ are handled together since, for formatting purposes, they differ only in that C++ has some additional keywords plus an extra way to make comments. Whenever we mention C from now on, we mean both C and C++. See Section {@NumberOf prg_perl} for more on Perl and its handmaiden Pod. The second to fifth columns of this table will be explained at various points later in this chapter. # @FootNote { # Prior to Version 3.18 of Lout, this chapter described how to typeset # programs written in the C programming language using the # @Code c2lout filter, and Eiffel programs using the @Code eif2lout # filter. These have now been withdrawn and replaced by {@Code prg2lout}, # which handles multiple languages. Ordinary Lout documents require no # modifications as a result of this change. # } @PP It is possible to simply print out one or more program files independently of any document. Alternatively, the program text may be printed as part of a larger Lout document. Either way, Lout does not lay out the programs in the sense of choosing line breaks and indenting; it uses whatever line breaks and indenting you give to the program. What Lout does do is cope with characters in the program text that it would ordinarily either reject or interpret in some way (braces and so on), ensuring that you can include program texts with absolutely no modifications; plus, if you wish, Lout will print keywords in bold, identifiers in italics, add line numbers, etc. @PP It is relatively easy to add new languages, since you don't have to write executable code, just declare a lot of records describing your language. Consult the instructions at the top of file {@I prg2lout.c} if you want to try it yourself. @BeginSections @Include { prg_lone } @Include { prg_embe } @Include { prg_opti } @Include { prg_chan } @Include { prg_tabs } @Include { prg_form } @Include { prg_comm } @Include { prg_prog } @Include { prg_pipe } @Include { prg_erro } @Include { prg_perl } @EndSections @End @Chapter lout-3.39/doc/user/mybook0000644000076400007640000007543111363700677014043 0ustar jeffjeff############################################################################### # # # Lout setup file for books # # # # Jeffrey H. Kingston # # # ############################################################################### ############################################################################### # # # @SysInclude commands for standard packages. # # # ############################################################################### @SysInclude { langdefs } # language definitions @SysInclude { bsf } # BasicSetup package @SysInclude { dsf } # DocumentSetup package @SysInclude { bookf } # BookSetup extension ############################################################################### # # # @Include command for reading personal definitions from current directory. # # # ############################################################################### @Include { mydefs } ############################################################################### # # # The @BasicSetup @Use clause - basics, lists, paragraphs, displays. # # # # To change the default value of any option, delete the # at the start of # # its line and change the value between braces. # # # ############################################################################### @Use { @BasicSetup # @InitialFont { Times Base 12p } # initial font # @InitialBreak {{adjust 1.2fx hyphen} @OrIfPlain {ragged 1fx nohyphen}} # @InitialOutdent { 2f @OrIfPlain 4s } # initial outdent # @InitialSpace { lout } # initial space style # @InitialLanguage { English } # initial language # @InitialColour { black } # initial colour # @InitialBackgroundColour { white } # initial background colour # @OptimizePages { No } # optimize page breaks? # @HeadingFont { Bold } # font for @Heading # @FixedWidthFont { Courier Base -1p } # font for @F # @ParaGap { 1.3vx @OrIfPlain 1f } # gap between paragraphs # @ParaIndent { 2.00f @OrIfPlain 5s } # first-line indent for @PP # @DisplayGap { 1.00v @OrIfPlain 1f } # gap above, below displays # @DisplayIndent { 2.00f @OrIfPlain 5s } # @IndentedDisplay indent # @DefaultIndent { 0.5rt } # @Display indent # @DisplayNumStyle { (num) } # style of display numbers # @WideIndent { 4.00f @OrIfPlain 10s } # @WideTaggedList indent # @VeryWideIndent { 8.00f @OrIfPlain 20s } # @VeryWideTaggedList indent # @ListOuterGap { 1.00v @OrIfPlain 1f } # gap before, after lists # @ListGap { 1.00v @OrIfPlain 1f } # gap between list items # @ListIndent { 0s } # indent of list items # @ListRightIndent { 0s } # right indent of list items # @ListLabelWidth { 2.00f @OrIfPlain 5s } # width allowed for list tags # @ListLabelRight { No } # right-adjust list labels # @ListLabelRightGap { 2s } # gap when right-adjusting # @ListFont { } # font of list items # @ListBreak { } # break style of list items # @NumberSeparator { . } # separates nums like 2.3.7 # @CrossLinkFormat { @Body } # format of cross links # @ExternalLinkFormat { @Body } # format of external links } ############################################################################### # # # The @DocumentSetup @Use clause - page layout plus figures, tables, etc. # # # # To change the default value of any option, delete the # at the start of # # its line and change the value between braces. # # # ############################################################################### @Use { @DocumentSetup # @PageType { A4 @OrIfPlain Other} # page type (width, height) # @PageWidth { 80s } # page width if type Other # @PageHeight { 66f } # page height if type Other # @PageOrientation { Portrait } # Portrait, Landscape, etc. # @PageBackground { } # background of each page # @TopMargin { 2.5c @OrIfPlain 6f } # top margin of all pages # @FootMargin { 2.5c @OrIfPlain 6f } # bottom margin of all pages # @OddLeftMargin { 2.5c @OrIfPlain 10s } # left margin of odd pages # @OddRightMargin { 2.5c @OrIfPlain 10s } # right margin of odd pages # @EvenLeftMargin { 2.5c @OrIfPlain 10s } # left margin of even pages # @EvenRightMargin { 2.5c @OrIfPlain 10s } # right margin of even pages # @OddLeftBodyMargin { 0c } # extra margin for page body # @OddRightBodyMargin { 0c } # extra margin for page body # @EvenLeftBodyMargin { 0c } # extra margin for page body # @EvenRightBodyMargin{ 0c } # extra margin for page body # @PageBoxType { None } # None Box CurveBox ShadowBox # @PageBoxMargin { 1.00c } # page box margin # @PageBoxLineWidth { } # page box line thickness # @PageBoxPaint { none } # page box paint # @PageBoxShadow { 0.60c } # shadow margin if ShadowBox # @PageEnclose { @Body } # enclose every page in this # @ColumnNumber { 1 } # number of columns (1 to 10) # @ColumnGap { 1.00c @OrIfPlain 6s } # column gap # @FigureLocation { PageTop } # default figure location # @FigureFormat { @CC @Body } # default figure format # @FigureWord { figure } # "Figure" word else anything # @FigureNumbers { Arabic } # method of numbering figures # @FigureCaptionPos { Below } # Above or Below # @FigureCaptionFont { -2p } # figure caption font # @FigureCaptionBreak { adjust hyphen 1.2fx } # figure caption break # @FigureCaptionFormat{ {@B { word @NumSep number. &2s }} @Insert caption } # @MakeFigureContents { No } # list of figures at start # @TableLocation { PageTop } # default table location # @TableFormat { @CC @Body } # default table format # @TableWord { table } # "Table" word else anything # @TableNumbers { Arabic } # method of numbering tables # @TableCaptionPos { Below } # Above or Below # @TableCaptionFont { -2p } # table caption font # @TableCaptionBreak { adjust hyphen 1.2fx } # table caption break # @TableCaptionFormat { {@B { word @NumSep number. &2s }} @Insert caption } # @MakeTableContents { No } # list of tables at start # @FloaterLocation { PageTop } # default floater location # @FloaterFormat { @CC @Body } # default floater format # @FloaterWord { floater } # "Floater" word else anything # @FloaterNumbers { Arabic } # method of numbering floaters # @FloaterCaptionPos { Below } # Above or Below # @FloaterCaptionFont { -2p } # floater caption font # @FloaterCaptionBreak{ adjust hyphen 1.2fx } # floater caption break # @FloaterCaptionFormat{ {@B { word @NumSep number. &2s }} @Insert caption } # @MakeFloaterContents{ No } # list of floaters at start # @MakeContents { No } # make contents? Yes or No @MakeContents { Yes } # make contents? Yes or No # @ContentsGap { 0.20v @OrIfPlain 0f } # extra gap above minor entry # @ContentsGapAbove { 0.80v @OrIfPlain 1f } # extra gap above major entry # @ContentsGapBelow { 0.00v @OrIfPlain 0f } # extra gap below major entry # @ContentsFont { Bold } # font for major entry # @ContentsPartGapAbove { 1.00v @OrIfPlain 1f } # extra gap above `part' entry # @ContentsPartGapBelow { 0.00v @OrIfPlain 0f } # extra gap below `part' entry # @ContentsFormat { number @DotSep title } # contents entry format # @ContentsLeader { .. } # leader symbol in contents # @ContentsLeaderGap { 4s @OrIfPlain 2s } # gap between leaders # @ContentsRightWidth { 3f @OrIfPlain 6s } # page numbers column width # @MakeReferences { Yes } # make references? Yes or No # @RefCiteStyle { [cite] } # citation style # @RefCiteLabels { @RefNum } # citation items # @RefNumbers { Arabic } # reference numbers # @RefListFormat { Labels } # NoLabels, Labels, etc. # @RefListLabels { [@RefNum] } # ref list label format # @RefListTitle { references } # title of reference list # @ChapRefListTitle { references } # title of chapter ref list # @RefListIndent { 0s } # indent to left of labels # @RefListRightIndent { 0s } # indent to right of items # @RefListGap { @ListGap } # gap between ref list items # @RefListFont { } # font used in reference list # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key # @MakeGlossary { No } # make glossary? Yes or No # @GlossaryText { @Null } # glossary initial text # @GlossaryFont { } # glossary entries font # @GlossaryBreak { } # glossary entries break # @GlossaryFormat { +3p @Font @S @Name # glossary entries format # @Right @I { @Word&&page @PageNum } # @DP @RawIndentedDisplay @Body } # @GlossaryGap { @DisplayGap } # gap between glossary entries # @GlossaryColumnNumber{ 2 } # glossary columns (1 to 10) # @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap # @InGlossaryFont { smallcaps } # font for @InGlossary # @InGlossaryFormat { @Body } # format for @InGlossary # @MakeIndex { No } # make index? Yes or No # @MakeIndex { No } # make index? Yes or No @MakeIndex { Yes } # make index? Yes or No # @IndexText { @Null } # index initial text # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break # @IndexFormat { @Body } # @Index format # @SubIndexFormat { {1f @Wide}@Body } # @SubIndex format # @SubSubIndexFormat { {2f @Wide}@Body } # @SubSubIndex format # @IndexTypeOrdinary { @PageNum } # Ordinary pagenum format # @IndexTypeMain { @B @PageNum } # Main pagenum format # @IndexTypeSpecial { @I @PageNum } # Special pagenum format # @IndexRangeFormat { @From--@To } # index page range format # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @IndexCtd { Yes } # include (ctd.) lines # @IndexCtdWord { continued } # "ctd." in current lang. # @IndexCtdFormat { @Body @I (@CtdWord) } # format of ctd. # @IndexSpacerAbove { 2v } # space above index spacer # @IndexSpacerBelow { 1v } # space below index spacer # @IndexSpacerFont { +3p } # font of index spacer # @IndexSpacerFormat { @Body } # format of index spacer # @MakeIndexA { No } # make index A? Yes or No # @IndexAText { @Null } # index A initial text # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break # @IndexAFormat { @Body } # @IndexA format # @SubIndexAFormat { {1f @Wide}@Body } # @SubIndexA format # @SubSubIndexAFormat { {2f @Wide}@Body } # @SubSubIndexA format # @IndexATypeOrdinary { @PageNum } # Ordinary pagenum format # @IndexATypeMain { @B @PageNum } # Main pagenum format # @IndexATypeSpecial { @I @PageNum } # Special pagenum format # @IndexARangeFormat { @From--@To } # index page range format # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @IndexACtd { Yes } # include (ctd.) lines # @IndexACtdWord { continued } # "ctd." in current lang. # @IndexACtdFormat { @Body @I (@CtdWord) } # format of ctd. # @IndexASpacerAbove { 2v } # space above index A spacer # @IndexASpacerBelow { 1v } # space below index A spacer # @IndexASpacerFont { +3p } # font of index A spacer # @IndexASpacerFormat { @Body } # format of index A spacer # @MakeIndexB { No } # make index B? Yes or No # @IndexBText { @Null } # index B initial text # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break # @IndexBFormat { @Body } # @IndexB format # @SubIndexBFormat { {1f @Wide}@Body } # @SubIndexB format # @SubSubIndexBFormat { {2f @Wide}@Body } # @SubSubIndexB format # @IndexBTypeOrdinary { @PageNum } # Ordinary pagenum format # @IndexBTypeMain { @B @PageNum } # Main pagenum format # @IndexBTypeSpecial { @I @PageNum } # Special pagenum format # @IndexBRangeFormat { @From--@To } # index page range format # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @IndexBCtd { Yes } # include (ctd.) lines # @IndexBCtdWord { continued } # "ctd." in current lang. # @IndexBCtdFormat { @Body @I (@CtdWord) } # format of ctd. # @IndexBSpacerAbove { 2v } # space above index B spacer # @IndexBSpacerBelow { 1v } # space below index B spacer # @IndexBSpacerFont { +3p } # font of index B spacer # @IndexBSpacerFormat { @Body } # format of index B spacer # @MakeColophon { No } # make colophon? Yes or No # @ColophonFont { } # font for colophon # @ColophonBreak { } # break style for colophon # @ColophonColumnNumber { 1 } # colophon columns (1 to 10) # @ColophonColumnGap { 1.00c @OrIfPlain 6s } # colophon column gap # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers # @FootNoteThrough { No } # numbered through chapter? # @FootNoteLocation { ColFoot } # where the footnote appears # @FootNoteFont { 0.80f } # font for footnotes # @FootNoteBreak { 1.2fx @OrIfPlain 1fx } # break for footnotes # @FootNoteFormat { { number &0.05f } @Insert body } # footnote format # @FootLen { 2.00c @OrIfPlain 10s } # length of footnote line # @FootAboveGap { @DisplayGap } # gap above footnote line # @FootGap { 0.20c @OrIfPlain 1fx } # gap between footnotes # @MarginNoteFont { 0.80f } # font of margin notes # @MarginNoteBreak { ragged 1.10fx } # break style of margin notes # @MarginNoteHGap { 0.5c } # horizontal gap to notes # @MarginNoteVGap { @DisplayGap } # min vertical gap between # @MarginNoteWidth { 1.50c } # width of margin notes # @EndNoteNumbers { Arabic } # endnote numbers # @EndNoteFont { 0.80f } # font of endnotes # @EndNoteBreak { 1.2fx @OrIfPlain 1fx } # break for endnotes # @EndNoteFormat { { number &0.05f } @Insert body } # endnote format # @EndNoteGap { 0.20c @OrIfPlain 1f } # gap between endnotes # @TheoremWord { theorem } # "Theorem" word, etc. # @TheoremTitleFormat { (title) } # only if title present # @TheoremFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @DefinitionWord { definition } # "Definition" word, etc. # @DefinitionTitleFormat { (title) } # only if title present # @DefinitionFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @ClaimWord { claim } # "Claim" word, etc. # @ClaimTitleFormat { (title) } # only if title present # @ClaimFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @PropositionWord { proposition } # "Proposition" word, etc. # @PropositionTitleFormat { (title) } # only if title present # @PropositionFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @LemmaWord { lemma } # "Lemma" word, etc. # @LemmaTitleFormat { (title) } # only if title present # @LemmaFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @CorollaryWord { corollary } # "Corollary" word, etc. # @CorollaryTitleFormat { (title) } # only if title present # @CorollaryFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @ExampleWord { example } # "Example" word, etc. # @ExampleTitleFormat { (title) } # only if title present # @ExampleFormat { {@B { word @NumSep number title: } &2s} @Insert body } # @ProofWord { proof } # "Proof" word, etc. # @PageHeaders { Simple } # None Simple Titles NoTitles @PageHeaders { Titles } # None Simple Titles NoTitles # @PageNumbers { Arabic } # page numbers # @FirstPageNumber { 1 } # number of first page # @IntroPageNumbers { Roman } # intro page numbers # @IntroFirstPageNumber{ 1 } # number of first intro page # @StructPageNums { No } # make structured page numbers # @PageNumberFormat { number } # format of all page numbers # @OddTop { @Centre{- @PageNum -} } # Simple page headers # @OddFoot { @Null } # @EvenTop { @Centre{- @PageNum -} } # @EvenFoot { @Null } # @StartOddTop { @Null } # @StartOddFoot { @Null } # @StartEvenTop { @Null } # @StartEvenFoot { @Null } # @IntroOddTop { @Null } # @IntroOddFoot { @Centre @PageNum } # @IntroEvenTop { @Null } # @IntroEvenFoot { @Centre @PageNum } # @IntroStartOddTop { @Null } # @IntroStartOddFoot { @Null } # @IntroStartEvenTop { @Null } # @IntroStartEvenFoot { @Null } # Titles, NoTitles headers # @RunningOddTop { @I {@MinorNum @DotSep @MinorTitle} @Right @B @PageNum } # @RunningOddFoot { @Null } # @RunningEvenTop { @B @PageNum @Right @I {@MajorNum @DotSep @MajorTitle} } # @RunningEvenFoot { @Null } # @RunningStartOddTop { @Null } # @RunningStartOddFoot { @Centre { Bold 0.8f } @Font @PageNum } # @RunningStartEvenTop { @Null } # @RunningStartEvenFoot { @Centre { Bold 0.8f } @Font @PageNum } # @RunningIntroOddTop { @Null } # @RunningIntroOddFoot { @Right @PageNum } # @RunningIntroEvenTop { @Null } # @RunningIntroEvenFoot { @PageNum } # @RunningIntroStartOddTop { @Null } # @RunningIntroStartOddFoot { @Null } # @RunningIntroStartEvenTop { @Null } # @RunningIntroStartEvenFoot { @Null } } ############################################################################### # # # The @BookSetup @Use clause - options specific to books. # # # ############################################################################### @Use { @BookSetup # @TitlePageFont { Helvetica Base} # title page font (not size) # @SeparateIntroNumbering { Yes } # separate intro page numbers # @PrefaceAfterContents { No } # Yes or No # @ChapterStartPages { Any } # Any, Odd, Even, SamePage # @ReferencesBeforeAppendices { No } # references before appendices # @PrefaceWord { preface } # word for "Preface" # @ContentsWord { contents } # word for "Contents" # @FigureListWord { figurelist } # word for "List of Figures" # @TableListWord { tablelist } # word for "List of Tables" # @FloaterListWord { floaterlist } # word for "List of Floaters" # @IntroductionWord { introduction } # word for "Introduction" # @AbbreviationsWord { abbreviations } # word for "Abbreviations" # @ChapterWord { chapter } # word for "Chapter" # @AppendixWord { appendix } # word for "Appendix" # @GlossaryWord { glossary } # word for "Glossary" # @IndexWord { index } # word for "Index" # @IndexAWord { index } # word for "Index" (A) # @IndexBWord { index } # word for "Index" (B) # @ColophonWord { colophon } # word for "Colophon" # @SubPrefaceNumbers { None } # kind of sub-preface numbers # @FirstSubPrefaceNumber { 1 } # first sub-preface number (Arabic) # @SubIntroductionNumbers { None } # kind of sub-introduction numbers # @FirstSubIntroductionNumber { 1 } # first sub-introduction number # @ChapterNumbers { Arabic } # kind of chapter numbers # @FirstChapterNumber { 1 } # first chapter number (Arabic) # @SectionNumbers { Arabic } # kind of section numbers # @FirstSectionNumber { 1 } # first section number (Arabic) # @SubSectionNumbers { Arabic } # kind of subsection numbers # @FirstSubSectionNumber { 1 } # first subsect number (Arabic) # @SubSubSectionNumbers { Arabic } # kind of sub-subs. numbers # @FirstSubSubSectionNumber { 1 } # first sub-sub number (Arabic) # @AppendixNumbers { UCAlpha } # kind of appendix numbers # @FirstAppendixNumber { 1 } # first appendix num (Arabic) # @SubAppendixNumbers { Arabic } # kind of subappendix numbers # @FirstSubAppendixNumber { 1 } # first sub-app num (Arabic) # @SubSubAppendixNumbers { Arabic } # kind of sub-subapp. numbers # @FirstSubSubAppendixNumber { 1 } # first sub-sub num (Arabic) # @PartHeadingFont { Helvetica Base 2.50f } # part head font # @PartHeadingBreak { clines 1.2fx nohyphen } # part head break # @PartHeadingFormat { @CD number @DP @CD title } # part head format # @ChapterHeadingFont { Bold 2.00f } # chapter head font # @ChapterHeadingBreak { ragged 1.2fx nohyphen } # chapter head break # @ChapterHeadingFormat { number @DotSep title } # format of chap. head # @SubPrefaceHeadingFont { Bold } # sub-preface head font # @SubPrefaceHeadingBreak { ragged 1.2fx nohyphen } # sub-preface head break # @SubPrefaceHeadingFormat { number @DotSep title } # format of s.-p. head # @SubIntroductionHeadingFont { Bold } # sub-intro head font # @SubIntroductionHeadingBreak { ragged 1.2fx nohyphen} # sub-intro head break # @SubIntroductionHeadingFormat { number @DotSep title} # format of sub-intro. hd # @SectionHeadingFont { Bold } # section head font # @SectionHeadingBreak { ragged 1.2fx nohyphen } # section head break # @SectionHeadingFormat { number @DotSep title } # section head fmt # @SubSectionHeadingFont { Bold } # subs. head font # @SubSectionHeadingBreak { ragged 1.2fx nohyphen } # subs. head break # @SubSectionHeadingFormat { number @DotSep title } # subs. head fmt # @SubSubSectionHeadingFont { Slope } # sub-subs. head font # @SubSubSectionHeadingBreak { ragged 1.2fx nohyphen } # sub-subs. head break # @SubSubSectionHeadingFormat { number @DotSep title } # sub-subs. head fmt # @AppendixHeadingFont { Bold 2.00f } # appendix head font # @AppendixHeadingBreak { ragged 1.2fx nohyphen } # appendix head break # @AppendixHeadingFormat { number @DotSep title } # appendix head fmt # @SubAppendixHeadingFont { Bold } # subapp. head font # @SubAppendixHeadingBreak { ragged 1.2fx nohyphen } # subapp. head break # @SubAppendixHeadingFormat { number @DotSep title } # subapp. head fmt # @SubSubAppendixHeadingFont { Slope } # sub-suba. head font # @SubSubAppendixHeadingBreak { ragged 1.2fx nohyphen } # sub-suba. head break # @SubSubAppendixHeadingFormat{ number @DotSep title } # sub-suba. head fmt # @AbovePartGap { 4.00f } # gap above part title # @AboveChapterGap { 3.00f } # above major titles # @SubPrefaceGap { 2.0v @OrIfPlain 3f } # between sub-prefaces # @SubIntroductionGap { 2.0v @OrIfPlain 3f } # between sub-intros # @SectionGap { 2.0v @OrIfPlain 3f } # between sections # @SubSectionGap { 1.5v @OrIfPlain 2f } # between subsects # @SubSubSectionGap { 1.5v @OrIfPlain 2f } # between sub-subs. # @SubAppendixGap { 2.0v @OrIfPlain 3f } # between subappendices # @SubSubAppendixGap { 1.5v @OrIfPlain 2f } # between sub-subapps # @PrefaceInContents { Yes } # add preface to contents # @SubPrefaceInContents { No } # add sub-preface to contents # @AbbreviationsInContents { Yes } # add abbreviations to contents # @IntroductionInContents { Yes } # add introduction to contents # @SubIntroductionInContents { No } # add sub-intro to contents # @PartInContents { Yes } # add parts to contents # @ChapterInContents { Yes } # add chapters to contents # @SectionInContents { Yes } # add sections to contents @SubSectionInContents { No } # add subsections to contents # @SubSubSectionInContents { No } # add sub-subsects to contents # @AppendixInContents { Yes } # add appendices to contents # @SubAppendixInContents { Yes } # add subappendices to contents # @SubSubAppendixInContents { No } # add sub-subapps to contents # @ReferencesInContents { Yes } # add ref. section to contents # @GlossaryInContents { Yes } # add glossary to contents # @IndexInContents { Yes } # add index to contents # @IndexAInContents { Yes } # add index A to contents # @IndexBInContents { Yes } # add index B to contents # @ColophonInContents { Yes } # add colophon to contents # @PrefaceContentsIndent { 0f } # indent in contents of preface # @SubPrefaceContentsIndent { 3f } # indent in contents of sub-preface # @AbbreviationsContentsIndent{ 0f } # indent in contents of abbreviations # @IntroductionContentsIndent { 0f } # indent in contents of introduction # @SubIntroductionContentsIndent { 3f } # indent in contents of sub-intro # @PartContentsIndent { 0.5rt } # indent in contents of part (dft is ctr) # @ChapterContentsIndent { 0f } # indent in contents of chapter # @SectionContentsIndent { 3f } # indent in contents of section # @SubSectionContentsIndent { 6f } # indent in contents of subsection # @SubSubSectionContentsIndent{ 9f } # indent in contents of sub-subsection # @AppendixContentsIndent { 0f } # indent in contents of appendix # @SubAppendixContentsIndent { 3f } # indent in contents of sub-appendix # @SubSubAppendixContentsIndent { 6f } # indent in contents of sub-subappendix # @ReferencesContentsIndent { 0f } # indent in contents of references # @GlossaryContentsIndent { 0f } # indent in contents of gloassary # @IndexContentsIndent { 0f } # indent in contents of index # @IndexAContentsIndent { 0f } # indent in contents of index A # @IndexBContentsIndent { 0f } # indent in contents of index B # @ColophonContentsIndent { 0f } # indent in contents of colophon # @SubPrefaceNumInTheorems { No } # theorem num has sub-preface num # @SubIntroductionNumInTheorems { No } # theorem num has sub-intro num # @ChapterNumInTheorems { Yes } # theorem num has chapter num # @SectionNumInTheorems { No } # theorem num has section num # @SubSectionNumInTheorems { No } # theorem num has subsect num # @SubSubSectionNumInTheorems { No } # theorem num has sub-ss. num # @AppendixNumInTheorems { Yes } # theorem num has appendix num # @SubAppendixNumInTheorems { No } # theorem num has sub-app num # @SubSubAppendixNumInTheorems{ No } # theorem num has sub-sa. num # @SubPrefaceNumInDisplays { No } # display num has sub-preface num # @SubIntroductionNumInDisplays { No } # display num has sub-intro num # @ChapterNumInDisplays { Yes } # display num has chapter num # @SectionNumInDisplays { Yes } # display num has section num # @SubSectionNumInDisplays { No } # display num has subsect num # @SubSubSectionNumInDisplays { No } # display num has sub-ss. num # @AppendixNumInDisplays { Yes } # display num has appendix num # @SubAppendixNumInDisplays { Yes } # display num has sub-app num # @SubSubAppendixNumInDisplays{ No } # display num has sub-sa. num # @SubPrefaceNumInFigures { No } # figure num has sub-preface num # @SubIntroductionumInFigures { No } # figure num has sub-intro num # @ChapterNumInFigures { Yes } # figure num has chapter num # @SectionNumInFigures { No } # figure num has section num # @SubSectionNumInFigures { No } # figure num has subsect num # @SubSubSectionNumInFigures { No } # figure num has sub-ss. num # @AppendixNumInFigures { Yes } # figure num has appendix num # @SubAppendixNumInFigures { No } # figure num has sub-app num # @SubSubAppendixNumInFigures { No } # figure num has sub-sa. num # @SubPrefaceNumInTables { No } # table num has sub-preface num # @SubIntroductionumInTables { No } # table num has sub-intro num # @ChapterNumInTables { Yes } # table num has chapter num # @SectionNumInTables { No } # table num has section num # @SubSectionNumInTables { No } # table num has subsect num # @SubSubSectionNumInTables { No } # table num has sub-ss. num # @AppendixNumInTables { Yes } # table num has appendix num # @SubAppendixNumInTables { No } # table num has sub-app num # @SubSubAppendixNumInTables { No } # table num has sub-sa. num # @SubPrefaceNumInFloaters { No } # floater num has sub-preface num # @SubIntroductionumInFloaters{ No } # floater num has sub-intro num # @ChapterNumInFloaters { Yes } # floater num has chapter num # @SectionNumInFloaters { No } # floater num has section num # @SubSectionNumInFloaters { No } # floater num has subsect num # @SubSubSectionNumInFloaters { No } # floater num has sub-ss. num # @AppendixNumInFloaters { Yes } # floater num has appendix num # @SubAppendixNumInFloaters { No } # floater num has sub-app num # @SubSubAppendixNumInFloaters{ No } # floater num has sub-sa. num # @SubPrefaceNumInRunners { No } # runners have sub-preface num # @SubIntroductionNumInRunners { No } # runners have sub-intro num # @SectionNumInRunners { Yes } # runners have section num # @SubSectionNumInRunners { No } # runners have subsect num # @SubSubSectionNumInRunners { No } # runners have sub-ss. num # @SubAppendixNumInRunners { Yes } # runners have sub-app num # @SubSubAppendixNumInRunners { No } # runners have sub-sa. num # @PrefacePrefix { } # for structured page nums # @ContentsPrefix { } # for structured page nums # @FigureContentsPrefix { } # for structured page nums # @TableContentsPrefix { } # for structured page nums # @FloaterContentsPrefix { } # for structured page nums # @AbbreviationsPrefix { } # for structured page nums # @IntroductionPrefix { } # for structured page nums # @ChapterPrefix { } # for structured page nums # @AppendixPrefix { } # for structured page nums # @ReferencesPrefix { } # for structured page nums # @GlossaryPrefix { } # for structured page nums # @IndexPrefix { } # for structured page nums # @IndexAPrefix { } # for structured page nums # @IndexBPrefix { } # for structured page nums # @ColophonPrefix { } # for structured page nums } ############################################################################### # # # @Database (and @SysDatabase) clauses go here. # # # ############################################################################### @SysDatabase @FontDef { fontdefs } # font definitions @SysDatabase @RefStyle { refstyle } # reference printing styles lout-3.39/doc/user/gra0000644000076400007640000000224611363700677013306 0ustar jeffjeff@Chapter @Title { Graphs } @Tag { graphs } @Begin @LP This chapter describes how to draw graphs, using the @Code "@Graph" graphs. @Index { graphs (statistical) } graph. @Index @Code "@Graph" symbol. For example, @ID @OneRow @Code { "@Graph" " abovecaption { New South Wales road deaths, 1960--1990" "(fatalities per 100 million vehicle km) }" "{" " @Data points { plus } pairs { dashed }" " { 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 }" "}" } produces the graph @CD @Graph abovecaption { New South Wales road deaths, 1960--1990 (fatalities per 100 million vehicle km) } { @Data points { plus } pairs { dashed } { 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 } } The features of @Code "@Graph" include captions, automatic and manual ticks and labels, logarithmic axes, histograms, and plotting of mathematical functions. @BeginSections @Include { gra_intr } @Include { gra_over } @Include { gra_capt } @Include { gra_tick } @Include { gra_data } @Include { gra_plac } @Include { gra_func } @Include { gra_keys } @Include { gra_erro } @Include { gra_summ } @EndSections @End @Chapter lout-3.39/doc/user/mat_comm0000644000076400007640000001062711363700677014333 0ustar jeffjeff@Section @Title { Commonly used symbols } @Tag { mat_comm } @Begin @PP @Code "@Math" prints characters in the fonts appropriate for mathematics: @ID { @Code "x - 2" |7ct @Math { x-2 } } Here @Math { x } is in Italic, @Math { 2 } is in Roman, and @Math { minus } is from the Symbol font. The character @Code "-" is a @I symbol which stands for @Math {minus}, and @Code "2" is also a symbol, standing for @Math { 2 }. @Code "@Math" offers a vast array of symbols: @ID { @Code "Omega delta integral partial club" |7ct @Math { Omega delta integral partial club } } This section introduces the most commonly used ones; Section {@NumberOf mat_summ} has the full list. @PP Symbols whose names are made from letters should be separated from each other by at least one space or end of line, as was done above, or else @Code "@Math" will become confused: @ID { @Code "Omegadelta" |7ct @Math { Omegadelta } } Symbols whose names are made from digits and punctuation characters can, however, be run together with each other and with symbols made from letters: @ID { @Code "Omega-delta<=2" |7ct @Math { Omega-delta<=2 } } This rule applies throughout Lout (Section {@NumberOf spaces}). @PP Some symbols join objects together in mathematical ways: @ID { @Code "x sub 2" |7ct @Math { x sub 2 } } Here the @Code "sub" symbol has taken the object just to its left, and mathematics.sub. @SubIndex { @Code "sub" symbol } sub. @Index { @Code "sub" symbol (mathematics) } the object just to its right, and joined them into one object in the form of a subscript. The two objects are called the left and right parameters of {@Code "sub"}, and they may be arbitrary Lout objects. @PP Similar symbols include {@Code "sup"} for mathematics.sup. @SubIndex { @Code "sup" symbol } sup. @Index { @Code "sup" symbol (mathematics) } superscripting, @Code "over" for built-up fractions, mathematics.over. @SubIndex { @Code "over" symbol } over. @Index { @Code "over" symbol (mathematics) } and @Code sqrt for square roots. mathematics.sqrt. @SubIndex { @Code "sqrt" symbol } sqrt. @Index { @Code "sqrt" symbol (mathematics) } The @Code "-" symbol used earlier is an example of a @I { binary operator } symbol, and @Code "<=" is mathematics.binary.operators. @SubIndex { binary operators } binary.operators. @Index { binary operators (mathematics) } a @I { relation } symbol. These take the objects mathematics.relation. @SubIndex { relation symbols } relation.symbols. @Index { relation symbols (mathematics) } to their left and right and display them as shown; it's hard to see, but there is slightly more space around relations than around binary operators. There are also @I { large operator } mathematics.large.operators. @SubIndex { large operators } large.operators. @Index { large operators (mathematics) } symbols which take @Code { from } and @Code { to } options and set them as limits: @ID { @Code @Verbatim { sum from { i=0 } to { n } i } |7ct @Math { sum from { i=0 } to { n } i } } As usual in Lout, options are optional, but when given, their values must be enclosed in braces as shown. Section {@NumberOf mat_summ} has the full list of large operator symbols. @PP All these symbols may be used together to produce complicated mathematics very easily: @ID { @Code @Verbatim { sqrt { x sup 2 + y sup 2 } over 2 } |7ct @Math { sqrt { x sup 2 + y sup 2 } over 2 } } Braces are used in the usual way for grouping. Leaving them out creates ambiguities: @ID @Code "a sup b over c" There are two possible interpretations for this: @IndentedList @LI { @Code "{a sup b} over c" |7ct @ZeroHeight @Math { {a sup b} over c } } @LI { @Code "a sup {b over c}" |7ct @Math { a sup {b over c} } } @EndList @Code "@Math" chooses between them in the following way. Every symbol that takes a parameter also has a {@I precedence}, which is a number defined in Section {@NumberOf mat_summ}. mathematics.precedence @SubIndex { precedence of symbols } precedence.mathematics @Index { precedence of symbols (mathematics) } The symbol with the higher precedence wins the object lying between them. White space between two objects is considered to be a symbol whose precedence is lower than that of any @Code "@Math" symbol. If two symbols of equal precedence compete for an object, the association is towards the left. @PP In the above case the first interpretation is chosen, because @Code "sup" has higher precedence than {@Code "over"}. When in doubt, use braces to make the grouping clear. @End @Section lout-3.39/doc/user/fmt0000644000076400007640000000073311363700677013322 0ustar jeffjeff@Chapter @Title { Changing the Overall Format } @Tag { changes } @Begin @LP The symbols of Lout make many decisions behind the scenes. Even the humble @Code "@PP" symbol has to decide how much vertical space to leave, and how far to indent the first line of the paragraph. How to change these decisions is the subject of this chapter. @BeginSections @Include { fmt_setu } @Include { fmt_size } @Include { fmt_marg } @Include { fmt_head } @EndSections @End @Chapter lout-3.39/doc/user/prg_perl0000644000076400007640000001377211363700677014355 0ustar jeffjeff@Section @Title { Notes on Perl and Pod } @Tag { prg_perl } @Begin @PP The Perl programming language programs. @RawIndex { programs } programs.perl @SubIndex { Perl problems } perl.programs @Index { Perl problems (programs) } @FootNote { My thanks to Mark Summerfield for help with Perl and Pod. } is quite a difficult one for the @Code { prg2lout } program to deal with, and our boast that programs can be included with `absolutely no modifications' is not quite true for Perl. @PP Here is the complete list of problem areas. In most cases their effect is to get the formatting wrong over a short region, which is not perhaps so disastrous; and it should be easy to modify your Perl program without changing its meaning, to work around these problems. After all, in Perl there is always more than one way to do it. @NumberedList @LI { @I Here-documents such as @ID @Verbatim { <<"EOF" These lines will be read as though enclosed in double quotes EOF } will be handled correctly only if the string appearing immediately after the @Perl { << } operator (that is, the string used to terminate the here-document) is one of @Perl { EOF }, @Perl { EOT }, @Perl { END }, and the empty string, all optionally enclosed in quotes of any of the three kinds. If this condition is not met, then the here-document will be treated as Perl program text. If the condition is met, there is still another problem: the @Perl { << } symbol and everything after it on the same line will be treated (incorrectly) as a string. The worst consequence of this is that stacked here-documents will not be printed properly. } @LI { When @Code { prg2lout } is scanning the program text looking for the beginning of a lexical unit, it may come upon a @Code "/" character, and this @I initial @Code "/" (not subsequent ones in the same lexical unit) it finds difficult to interpret, since it may be the beginning of a regular expression, to be formatted like a string, or it may be a complete lexical unit denoting division. The program chooses the regular expression (or equivalently, string) interpretation if the @Code "/" character is immediately preceded by @Code { "q" }, @Code { "qq" }, @Code { "qx" }, @Code { "qw" }, @Code { "qr" }, @Code { "m" }, @Code { "s" }, @Code { "y" }, or @Code { "tr" }. It also chooses the regular expression interpretation if the @Code "/" character appears at the start of a line, or if it is immediately preceded by zero, one, or two space or tab characters, which are themselves immediately preceded by a complete lexical unit which is one of @Code { "(" }, @Code { "=" }, @Code { "=~" }, @Code { "!~" }, @Code { "split" }, @Code { "if" }, @Code { "and" }, @Code { "&&" }, @Code { "or" }, @Code { "||" }, @Code { "not" }, @Code { "!" }, @Code { "unless" }, @Code { "for" }, @Code { "foreach" }, and @Code { "while" }. Otherwise it chooses the division interpretation. In the rare cases where this rule fails, you can force @Code { prg2lout } to choose the regular expression interpretation by placing an @Code { m } in front of the initial @Code "/" (this does not change the meaning of the program), and you can force the division interpretation by placing at least three spaces before the @Code "/" character. } @LI { Substitution expressions, even such lexically complex ones as @Perl { s{{@D}}[{@I}] }, are handled correctly. However, @Code { prg2lout } does not understand that the letters @Code "gimosx" in any combination appearing immediately after a substitution expression are part of it; it treats them as the start of a new lexical unit. This new unit will usually be taken to be an identifier, which is harmless enough, but occasionally it is taken to be something else. For example, in @ID @Code @Verbatim { s///s; } the trailing @Code "s" will be mistaken for the start of a new substitution expression, with @Code ";" delimiting the first pattern. This particular example can be fixed by inserting a space before the semicolon. } @EndList Further work may eliminate some of these problems. @PP The Pod language is used by Perl programmers for creating documentation, programs. @RawIndex { programs } programs.pod @SubIndex { Pod problems } pod.programs @Index { Pod problems (programs) } and may be found within Perl programs or standing alone. Lout supports both arrangements without any special action by the user. At the beginning of the @Code perl setup line, the following line has been placed: @ID @Code "@SysInclude { pod }" Thus, asking for Perl always gives you Pod as well. If you are using your own setup files for both languages, it is probably better to break this connection by deleting this line from your copy of the @Code perl setup file and placing @ID @OneRow @Code { "@Include { mypod }" "@Include { myperl }" } at the start of your document in the usual way. @PP Because Pod is a documentation language rather than a programming language, the setup file options listed in Section {@NumberOf cpsetup} do not really apply. So for Pod only these have been discarded and replaced by a completely different set of options, controlling such things as the size of headings and the gaps between list items, which you can find documented in the @Code { pod } setup file. @PP If you ask for line numbers on a Pod program, or on a Perl program that contains Pod, any text blocks in the Pod that would otherwise have appeared as filled paragraphs will come out with the line breaks in the source respected, and lines numbered accordingly. Because @Code "prg2lout" attaches line numbers before Lout breaks paragraphs, it is not possible to number the lines after paragraph breaking. @PP Owing to problems behind the scenes, if a Pod inclusion in a Perl program has unbalanced braces, @Code "prg2lout" is forced to insert braces into the Pod text to make them balance. It will insert a left brace directly before any unbalanced right brace, and it will insert right braces at the end of the Pod inclusion to balance any preceding unbalanced left braces. It will tell you if it has to do this. This problem does not afflict Pod when used as a separate language. @End @Section lout-3.39/doc/user/vdia0000755000076400007640000000026111363700677013456 0ustar jeffjeffgvim dia gvim dia_intr gvim dia_node gvim dia_link gvim dia_tags gvim dia_labe gvim dia_posi gvim dia_tree gvim dia_synt gvim dia_erro gvim dia_defi gvim dia_geom gvim dia_summ lout-3.39/doc/user/vmat0000755000076400007640000000007611363700677013506 0ustar jeffjeffgvt mat mat_intr mat_comm mat_matr mat_disp mat_defs mat_summ lout-3.39/doc/user/fmt_marg0000644000076400007640000001266211363700677014334 0ustar jeffjeff@Section @Title { Page margins, page boxes, and page backgrounds } @Tag { margins } @Begin @PP There are six options for setting the top and bottom margins on each margin.options @RawIndex { margin options } margin.options.in.pages @SubIndex { in pages } top.margin @Index @Code "@TopMargin" foot.margin @Index @Code "@FootMargin" odd.left.margin @Index @Code "@OddLeftMargin" odd.right.margin @Index @Code "@OddRightMargin" even.left.margin @Index @Code "@EvenLeftMargin" even.right.margin @Index @Code "@EvenRightMargin" page, and the left and right margins on odd and even pages. Here they are with their default values: @ID @OneRow @Code @Verbatim { @TopMargin { 2.50c } @FootMargin { 2.50c } @OddLeftMargin { 2.50c } @OddRightMargin { 2.50c } @EvenLeftMargin { 2.50c } @EvenRightMargin { 2.50c } } When setting these options you must ensure that @ID @Math { @Code "@OddLeftMargin" + @Code "@OddRightMargin" = @Code "@EvenLeftMargin" + @Code "@EvenRightMargin" } In other words, the total margin on odd pages must be the same as on even pages. @PP In addition, four options are provided which add extra left and right margins to the page @I body (that is, everything but the running headers and footers): @ID @OneRow @Code @Verbatim { @OddLeftBodyMargin { 0c } @OddRightBodyMargin { 0c } @EvenLeftBodyMargin { 0c } @EvenRightBodyMargin { 0c } } The default is to add no page body margins, as shown. Most people who use page body margins would change only @Code "@OddRightBodyMargin" and {@Code "@EvenLeftBodyMargin"}, since those are the outside margins. As for ordinary margins, the total (left plus right) page body margin must be the same on odd and even pages. Margin notes (Section {@NumberOf marginnotes}) occupy body margin space. @PP You can have a box drawn around each page if you wish. Here are the relevant options and their default values: @ID @OneRow @Code @Verbatim { @PageBoxType { None } @PageBoxMargin { 1.00c } @PageBoxLineWidth {} @PageBoxPaint { None } @PageBoxShadow { 0.06c } } You get boxes by changing the @Code "@PageBoxType" option: page.box.type @Index @Code "@PageBoxType" @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col @CC B } { @Rowa A { "@PageBoxType { None }" } B { (no box) } @Rowa @Rowa A { "@PageBoxType { Box }" } B { @Box 1.0c @Wide 1.4c @High } @Rowa @Rowa A { "@PageBoxType { CurveBox }" } B { @CurveBox 1.0c @Wide 1.4c @High } @Rowa @Rowa A { "@PageBoxType { ShadowBox }" } B { @ShadowBox 1.0c @Wide 1.4c @High } } Page boxes reduce the amount of space available to the page contents, so your columns will become somewhat narrower and shorter when you introduce them. @PP The {@Code "@PageBoxMargin"}, {@Code "@PageBoxLineWidth"}, {@Code "@PageBoxPaint"}, and {@Code "@PageBoxShadow"} options affect the page box exactly as the {@Code margin}, {@Code linewidth}, {@Code paint}, and {@Code shadow} options described for other boxes in Section {@NumberOf boxes} do. For example, @ID @OneRow @Code @Verbatim { @PageBoxType { CurveBox } @PageBoxMargin { 1.0c } @PageBoxPaint { grey } } draws a curved box, painted grey, around each page, with a one centimetre margin between its boundary and the page contents. If the left margin is 2.5 centimetres, say, this gives a total left margin from the page edge to the page contents of 3.5 centimetres. @PP More generally, you can enclose each page in any object at all, by means of the @Code "@PageEnclose" option: @ID @Code { "@PageEnclose { @Body }" } Within this option, @Code "@Body" stands for the page, and it must occur exactly once. You could place a curved box around each page, for example, by writing @ID @Code { "@PageEnclose { @CurveBox @Body }" } This is of course also available from the @Code "@PageBox" symbols, but with @Code "@PageEnclose" there are infinitely many other possibilities. @PP Finally, it is possible to have something other than the usual white background on the page, using the @Code "@PageBackground" option: page.background @Index @Code "@PageBackground" @ID @Code { "@PageBackground { @Scale 60d @Rotate lightgrey @Colour DRAFT }" } The value of the option is an object which is drawn on each page, within the margins, before the page contents are drawn. This example draws a large word DRAFT in light grey diagonally across each page: @ID @Box margin { 0c } 0.2 @Scale @IncludeGraphic draft.eps You have to find a suitable angle by experiment. As Section {@NumberOf scaling} explains, @Code "@Scale" with no scale factor only takes account of the available horizontal space, not the available vertical space, so if your angle is too steep the result will be too tall for the page and you will get a regrettably obscure warning message about a `broken size constraint.' The solution is to try a smaller angle. @PP Another useful page background draws marks to show where the margins boundarymarks @Index @Code "@BoundaryMarks" cut.marks @Index { cut marks } lie: @ID @Code "@PageBackground { @BoundaryMarks }" produces something like this around each page: @DP @DP @ID { |@DisplayIndent 3c @High 2c @Wide @HExpand @VExpand @BoundaryMarks } @DP @DP The @Code "@BoundaryMarks" symbol has options for controlling the line width (thickness), the line length, and the gap between the ends of the lines and the corner of the text area: @ID @OneRow @Code @Verbatim { @PageBackground { @BoundaryMarks linewidth { 0.2p } length { 0.5c } gap { 0.5c } } } This shows the default values: 0.2 points for line width, 0.5 centimetres for the others. @End @Section lout-3.39/doc/user/ref_sett0000644000076400007640000001241011363700677014342 0ustar jeffjeff@Section @Title { Setting up a bibliographic database } @Tag { databases } @Begin @PP The basic idea is to store your references in a separate references. @RawIndex { references } references.database.files @SubIndex { database.files } database.files.references @Index { database files of references } @I { database file }, in a form which does not include formatting details such as font changes. This makes it easy to use the same references in many documents, and it leaves the formatting to Lout. Here is an example of a reference as it would appear in a database file: @ID @OneRow @Code @Verbatim { { @Reference @Tag { vanleunen1992 } @Type { Book } @Author { Mary-Claire van Leunen } @Title { A Handbook for Scholars } @Publisher { Oxford } @Edition { Revised Edition } @Year { 1992 } } } references. @RawIndex { references } references.reference @SubIndex { @Code "@Reference" } reference.references @Index { @Code "@Reference" (references) } @Code "@Reference" is a symbol, and {@Code "@Tag"}, {@Code "@Type"}, {@Code "@Author"}, and so on are its options. The database file as a whole consists of a sequence of references, each enclosed in braces as shown. @PP The @Code "@Tag" option is compulsory: since you cite a reference by references. @RawIndex { references } references.tag @SubIndex { @Code "@Tag" } tag.option. @RawIndex { @Code "@Tag" option } tag.option.in.references @SubIndex { in references } giving its tag, there must be one. The @Code "@Type" option is also references. @RawIndex { references } references.type @SubIndex { @Code "@Type" option } type.references @Index { @Code "@Type" (references) } compulsory, since it says whether the reference is to a book, a journal article, or whatever, and this determines what other options are required. Section {@NumberOf entries} describes all the types provided by Lout, and Section {@NumberOf refstyles} explains how to add your own. @PP Lout database file names must end in {@Code ".ld"}, so now suppose that you have made one called ld.file @Index { @Code ".ld" file } refs.ld.file @Index { @Code "refs.ld" file } @Code "refs.ld" and put it in the same directory as your document. Next, place @ID @Code "@Database @Reference { refs }" references. @RawIndex { references } references.database @SubIndex { @Code "@Database" } database.references @Index { @Code "@Database" (references) } at the start of your document, just before {@Code "@Doc"}, {@Code "@Document"}, {@Code "@Report"}, or whatever. Alternatively, you may place it at the end of your setup file. It informs Lout that you might be referring to @Code "@Reference" symbols in database @Code "refs" (that is, in file {@Code "refs.ld"}). @PP If you want to maintain a central database, used by many documents, you won't want it in the same directory as any one of them. A Unix pathname will be more appropriate: @ID @Code "@Database @Reference { \"/usr/jeff/lib/refs\" }" or whatever. Quotes are needed because of the @Code "/" characters. A separate directory is probably safest anyway, since Lout creates files ending in @Code ".ld" in the document directory when sorting out cross references (Section {@NumberOf cross}), and clearing these out using the Unix command @ID @Code "rm lout.li *.ld" will destroy your valuable database file if it is kept in the same directory. @PP With the database file created and the @Code "@Database" line in place, you are ready to start citing references. The first time that the references. @RawIndex { references } references.database.index.file @SubIndex { database index file } database.index.file @Index { database index file } index.file @Index { index file } database is used, Lout will create an @I { index file } whose purpose is to speed up the retrieval of your references. Thanks to this file you can have hundreds or even thousands of references in your database, without slowing Lout down very much. However, whenever you change your database file @I { you must remove its corresponding index file }, so that Lout knows to create it afresh. @FootNote { Depending on how it was installed on your system, Lout may be able to use the time of last modification of the database file and its index file to determine automatically whether the index file needs to be created afresh, thus saving you the trouble of removing it. You can find out whether this is true of your system by typing the command {@Code "lout -V"}. } The index file is stored in the same directory as the database file, and it has the same name except that it ends in @Code ".li" rather than @Code ".ld" (e.g. li.file @Index { @Code ".li" file } {@Code "refs.li"}). @PP If a separate database file is not convenient for some reason, perhaps because you need a self-contained document in a single file, the @Code "@Reference" symbols may be incorporated into the document itself, anywhere that ordinary text may appear. Nothing will appear where they are typed in, but Lout will notice them and treat them as if they had come from a database file. In this case no @Code "@Database" symbol is needed unless you are referring to a database as well. @PP You may have multiple databases, like this: @ID @OneRow @Code { "@Database @Reference { myrefs }" "@Database @Reference { \"/usr/pub/refs/theoryrefs\" }" } Lout will search the databases in the order you list them. @End @Section lout-3.39/doc/user/pie_summ0000644000076400007640000000762011363700677014354 0ustar jeffjeff@Section @Title { Summary } @Tag { pie_summ } @Begin @PP Here are the options of the @Code "@Pie" symbol, piegraphs. @RawIndex { pie graphs } piegraphs.summary @SubIndex { summary } with their default values and allowed values: @ID @Tab hmargin { 0.15c } vmargin { 0.47vx } @Fmta { @Col @Code { " "A } ! @Col @Code "{" ! @Col @Code B ! @Col @Code "}" ! @Col ! @Col ! @Col C } @Fmtb { @Col @Code A ! @Col ! @Col ! @Col ! @Col ! @Col ! @Col } { @Rowb A { "@Pie" } @Rowa A { save } B { no } C { {@Code no} or {@Code yes} } @Rowa A { totalweight } B { 100 } C { any positive number } @Rowa A { radius } B { 2.5c } C { any length } @Rowa A { initialangle } B { 0d } C { any angle (@Code {90d} etc.) } @Rowa A { leftextra } B { 0c } C { any length } @Rowa A { rightextra } B { 0c } C { any length } @Rowa A { aboveextra } B { 0c } C { any length } @Rowa A { belowextra } B { 0c } C { any length } @Rowa A { leftcaption } B { } C { any Lout object } @Rowa A { rightcaption } B { } C { any Lout object } @Rowa A { abovecaption } B { } C { any Lout object } @Rowa A { belowcaption } B { } C { any Lout object } @Rowa A { leftgap } B { 0.5c } C { any length } @Rowa A { rightgap } B { 0.5c } C { any length } @Rowa A { abovegap } B { 0.5c } C { any length } @Rowa A { belowgap } B { 0.5c } C { any length } @Rowa A { hidecaptions } B { yes } C { @Code no or @Code yes } @Rowa A { weight } B { 10 } C { Any positive number } @Rowa A { paint } B { none } C { @Code none or any colour (Section @NumberOf { colour }) } @Rowa A { texture } B { solid } C { Any texture (Section @NumberOf { textures }) } @Rowa A { outlinestyle } B { solid } C { {@Code solid}, @Code {dashed}, @Code {cdashed}, @Code { dotted }, or @Code { noline } } @Rowa A { outlinedashlength } B { 0.2f } C { any length } @Rowa A { outlinewidth } B { thin } C { @Code { thin }, @Code { medium }, @Code { thick }, or any length } @Rowa A { detach } B { no } C { {@Code no}, {@Code yes}, or any non-negative number } @Rowa A { label } B { } C { any Lout object } @Rowa A { labelfont } B { -2p } C { any font as given to @Code "@Font" } @Rowa A { labelbreak } B { clines } C { any break style as given to @Code "@Break" } @Rowa A { labelmargin } B { 0.2f } C { any length } @Rowa A { labelformat } B { "@Body" } C { any Lout object, usually including @Code "@Body" } @Rowa A { labelradius } B { internal } C { {@Code internal}, {@Code external}, or any positive number } @Rowa A { labeladjust } B { 0c 0c } C { any point (pair of lengths) } @Rowa A { finger } B { no } C { @Code no or @Code yes } @Rowa A { fingerstyle } B { solid } C { {@Code solid}, @Code {dashed}, @Code {cdashed}, @Code { dotted }, or @Code { noline } } @Rowa A { fingerdashlength } B { 0.2f } C { any length } @Rowa A { fingerwidth } B { thin } C { @Code { thin }, @Code { medium }, @Code { thick }, or any length } @Rowa A { fingerradius } B { 0.7 } C { any positive number } @Rowa A { fingeradjust } B { 0c 0c } C { a point (pair of lengths) } @Rowa A { fingerarrow } B { no } C { @Code no or @Code yes } @Rowa A { fingerarrowlength } B { 0.6f } C { any length } @Rowa A { fingerarrowwidth } B { 0.45f } C { any length } } The options from @Code "weight" downwards are also the complete set of options of the @Code "@Slice" symbol. The value of an option is the value given at the @Code "@Slice" symbol, if any; otherwise, the value at the enclosing @Code "@Pie" is used if any; if it is not given there, the setup file value is used. @End @Section lout-3.39/doc/user/bgr_text0000644000076400007640000001763311363700677014361 0ustar jeffjeff@Section @Title { Textures } @Tag { textures } @Begin @PP The @Code "@Texture" symbol works in the same kind of way as @Code "@Font" texture.sym @Index { @Code "@Texture" symbol } and @Code "@Colour" do. It causes the object to its right to be printed in a texture specified by the object to its left: @ID @Code "striped @Texture 40p @Font ABC" produces @FootNote { If you can't see the result here, or if you can see it but without texture, then the fault is probably in your PostScript viewer. The PostScript viewer used by the author (a 1997 version of @I { gv }) shows a blank space here and throughout this section wherever a texture is supposed to appear, but when printed on his printer the textures appear correctly. Some viewers may fail altogether when given a PostScript file with textures. In that case, run your document again using @OneCol @I { lout -t } instead of @I { lout }. This will cause Lout to ignore all textures and print everything in solid colour. } @CD striped @Texture 40p @Font ABC The object to the right of @Code "@Texture" may be arbitrary as usual. @PP # Textures are harder to specify than colours, and only a few # texture names are widely used. Only a handful of textures are offered by the @Code "@Texture" symbol; but, as some compensation, there are options which allow any texture to be scaled, printed at any angle, texture.sym @RawIndex { @Code "@Texture" symbol } texture.sym.scale @SubIndex { @Code "scale" option } texture.sym.angle @SubIndex { @Code "angle" option } texture.sym.hshift @SubIndex { @Code "hshift" option } texture.sym.vshift @SubIndex { @Code "vshift" option } and shifted: @ID @OneRow @Code @Verbatim { striped @Texture scale { 2 } angle { 45d } hshift { 1p } vshift { 3p } 40p @Font ABC } produces @CD striped @Texture scale { 2 } angle { 45d } hshift { 1p } vshift { 3p } 40p @Font ABC with the texture scaled by a factor of 2, printed at an angle of 45 degrees, and shifted one point horizontally and three points vertically. The @Code scale option causes equal scaling in the horizontal and vertical directions; there is also {@Code hscale} which scales horizontally only, and @Code vscale which scales vertically only. As you would expect, the default values of these options are @Code 1 for the scaling options, {@Code 0d} for {@Code angle}, and {@Code 0p} for {@Code hshift} and {@Code vshift}. # @PP # Stripes would rarely need to be shifted in practice, but some of the other # textures described below can benefit from shifting. @PP Here is the list of all textures offered by the @Code "@Texture" symbol, with the options specific to each kind of texture, their default values, and sample default output. Remember, all textures take the {@Code angle}, {@Code scale}, {@Code hscale}, {@Code vscale}, {@Code hshift}, and {@Code vshift} options as well. @ID @OneRow @Tbl mv { 0.5v } aformat { @Cell ml { 0i } A | @Cell @Code B | @Cell mr { 0i } @I lines @Break C } { @Rowa ma { 0i } A { @TextureSample solid } B { "solid @Texture" solid."texture" @Index { @Code "solid" "texture" } } @Rowa A { @TextureSample striped } B { "striped @Texture" " width { 1p }" " gap { 1p }" } C { "" The width of each stripe The width of each gap between stripes striped."texture" @Index { @Code "striped" "texture" } } @Rowa A { @TextureSample grid } B { "grid @Texture" " width { 1p }" " gap { 1p }" } C { "" The width of each stripe grid."texture" @Index { @Code "grid" "texture" } The width of each gap between stripes } @Rowa A { @TextureSample dotted } B { "dotted @Texture" " radius { 0.5p }" " gap { 2p }" } C { "" The radius of each dot (filled circle) dotted."texture" @Index { @Code "dotted" "texture" } The gap between the centres of adjacent dots } @Rowa A { @TextureSample chessboard } B { "chessboard @Texture" " width { 2p }" } C { "" The width of each square chessboard."texture" @Index { @Code "chessboard" "texture" } } @Rowa A { @TextureSample brickwork } B { "brickwork @Texture" " width { 6p }" " height { 2p }" " linewidth { 0.5p }" } C { "" The width of each brick The height of each brick brickwork."texture" @Index { @Code "brickwork" "texture" } The width of the brickwork lines } @Rowa A { @TextureSample honeycomb } B { "honeycomb @Texture" " radius { 2p }" " linewidth { 0.5p }" } C { "" The radius of each hexagon honeycomb."texture" @Index { @Code "honeycomb" "texture" } The width of the lines } @Rowa A { @TextureSample triangular } B { "triangular @Texture" " radius { 4p }" " linewidth { 0.5p }" } C { "" The side length of each triangle triangular."texture" @Index { @Code "triangular" "texture" } The width of the lines } @Rowa mb { 0i } A { @TextureSample string } B { "string @Texture" " width { 12p }" " height { 12p }" " font { Times-Roman }" " size { 10p }" " value { \"*\" }" } C { "" The width at which the string repeats The height at which the string repeats The font used to display the string (see below) The font size used to display the string string."texture" @Index { @Code "string" "texture" } The characters to be displayed } } This last example seems like a good one for experimenting with the {@Code hshift} and {@Code vshift} options, so here goes: texture.sym.hshift @SubIndex { @Code "hshift" option } texture.sym.vshift @SubIndex { @Code "vshift" option } @ID @OneRow @Tbl mv { 0.5v } aformat { @Cell ml { 0i } A | @Cell @Code B | @Cell mr { 0i } @I lines @Break C } { @Rowa mb { 0i } A { @Box margin { 0i } string @Texture hshift { 4p } vshift { 4p } @Box margin { 2.0f } paint { black } {} } B { "string @Texture" " hshift { 4p }" " vshift { 4p }" } } You have to find the right amount of shift by experiment, especially when combined with rotation and scaling. We recommend sticking to the {@Code p} (points), {@Code m} (ems), {@Code c} (centimetres), and {@Code i} (inches) units of measurement when giving length options to {@Code "@Texture"} symbols. @PP Care is needed when using the @Code font and @Code value options of {@Code "string @Texture"}, since these options are passed straight through to the PostScript output without checking. The @Code "font" option takes a PostScript name for a font, not a Lout name. Typical PostScript font names, virtually certain to work, are {@Code Times-Roman} and {@Code Helvetica}. Since Lout takes no special steps to make sure that the font you ask for is available, you should restrict your font choices to fonts known to be in use elsewhere on the same page, or known to be always loaded in your viewing device. The @Code "value" option must be a sequence of characters from the nominated font. Although the value does not have to be quoted as shown, we recommend it as a reminder of how limited the choices are here. Also, spaces in your value will work better between quotes, and to make parentheses -- @Code "(" and @Code ")" -- come out correctly they must be enclosed in quotes and preceded by a backslash character, which you get as usual by writing @I two backslash characters. For example, {@Code "\"\\\\(\""} will produce one left parenthesis. @PP Notice that {@Code "solid @Texture"} produces solid colour, or in other words no texture: @ID @Code @Verbatim { striped @Texture angle { 45d } @Box linewidth { 2p } solid @Texture 50p @Font WARNING! } produces @CD { striped @Texture angle { 45d } @Box linewidth { 2p } solid @Texture 50p @Font WARNING! } As shown, {@Code "solid @Texture"} is useful for switching back to normal printing within a textured region. In this example, without it the letters would have been striped as well. @PP Expert users can also make the object to the left of @Code "@Texture" be anything that is acceptable to the left of the expert's symbol {@Code "@SetTexture"}, allowing people who want to do some serious work in PostScript to get arbitrary textures. Consult the Expert's Guide for more about this. @End @Section lout-3.39/doc/user/dia_synt0000644000076400007640000004155611363700677014356 0ustar jeffjeff@Section @Tag { dia_synt } @Title { Syntax diagrams } @Begin @PP A variant of the @@Diag symbol, called {@Code "@SyntaxDiag"}, diagrams. @RawIndex { diagrams } diagrams.syntax @SubIndex { syntax diagrams } syntax.diagrams @Index { syntax diagrams } railroad.diagrams @Index { railroad diagrams } produces syntax diagrams (sometimes called railroad diagrams): @CD @SyntaxDiag title { call-chain } { @StartRight @Sequence A { @Optional @Sequence A { @BCell "super" } B { @CCell "!" } } B { @Loop A { @Sequence A { @ACell identifier } B { @Optional @Sequence A { @CCell "(" } B { @Loop A { @ACell expression } B { @CCell "," } } C { @CCell ")" } } } B { @CCell "." } } } These are used to define the syntax of computer programming languages, although they could be put to other uses. We'll explain how to get syntax diagrams first. At the end of this section is an explanation of how to change the formats of things, which people who use these diagrams for other purposes will probably need to do. @PP A syntax diagram can be @I { right-moving }, which means it starts at the left and heads right (like the example above), or it can be @I { down-moving }, starting at the top and heading downwards. The @Code "@StartRight" and @Code "@StartDown" symbols are used at the start of the diagram to say which of these directions is wanted: @ID @OneRow @Code @Verbatim { @SyntaxDiag title { call-chain } { @StartRight ... } } where @Code { ... } stands for the rest of the diagram, as we are about to describe. For completeness there are also @Code "@StartLeft" and @Code "@StartUp" symbols, but diagrams never start off in these directions. @PP If you accidentally omit the starting symbol ({@Code "@StartRight"} or whatever), you will get several error messages, the first of which should mention @Code { diag_dirn }; it is trying to tell you, in a cryptic way, that it doesn't know which direction you want to go in. @PP The @Code title option is optional; if given, the effect is as shown (this option is also available with {@Code "@Diag"}). Subsequent examples will omit the enclosing {@Code "@SyntaxDiag { ... }"}. @PP The basic components of syntax diagrams are @I { category cells }, shown as boxes in the example above and obtained with the @Code "@ACell" symbol; @I { keyword cells }, shown as curved boxes and obtained with {@Code "@BCell"}; and @I { punctuation cells }, containing punctuation symbols small enough to be enclosed in circles, and obtained with {@Code "@CCell"}. After each symbol, place whatever has to go inside the cell: @ID @OneRow { @Code @Verbatim { @StartRight @BCell loop } |7ct @SyntaxDiag { @StartRight @BCell loop } } Lout will insert the appropriate arrows, taking account of which direction (right, up, left, or down) the diagram is currently moving. This is true for all the syntax diagram symbols; we won't mention it again. # @FootNote { # This wonderfully useful effect is achieved by a dirty trick, one # of whose consequences is that if you see an error message # similar to `@Code { replacing unknown "@Case" option 0p by 1p }' # it means you've forgotten the initial @Code "@StartRight" or # whatever. # } @PP Occasionally, instead of a cell one wants the horizontal or vertical line to continue uninterrupted. For this there is the @Code "@Skip" symbol: @ID @OneRow { @Code @Verbatim { @StartDown @Skip } |7ct @SyntaxDiag { @StartDown @Skip } } Some examples of its use in practice appear below. @PP There are three main ways to build up larger syntax diagrams out of smaller ones: @I { sequencing }, @I { selection }, and @I { looping }. For sequencing there is the @Code "@Sequence" symbol: @ID @OneRow { @Code @Verbatim { @StartRight @Sequence A { @BCell loop } B { @ACell statements } C { @BCell end } } ||7ct @SyntaxDiag { @StartRight @Sequence A { @BCell loop } B { @ACell statements } C { @BCell end } } } This is what the sequence looks like in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartUp A | @Cell @StartLeft A | @Cell mr { 0i } @StartDown A } { @Rowa A { @Sequence A { @BCell loop } B { @ACell statements } C { @BCell end } } } } Whatever the direction, the arrows go from option @Code A to option @Code B to option @Code C and so on. You can have up to twelve items in the sequence, in options @Code A to {@Code L}; if more than twelve are needed, just place another sequence inside any one of these options: where one syntax diagram is allowed, any syntax diagram is allowed, provided there is enough space on the page (Lout makes a total mess of any diagram that is too wide to fit on the page). @PP After sequencing comes selection, which is obtained with the @Code "@Select" symbol: @ID @OneRow { @Code @Verbatim { @StartRight @Select A { @ACell asst } B { @ACell call-chain } C { @Sequence A { @BCell assert } B { @ACell condition } } } ||7ct @SyntaxDiag { @StartRight @Select A { @ACell asst } B { @ACell call-chain } C { @Sequence A { @BCell assert } B { @ACell condition } } } } This example shows right-moving selection of three alternatives, the third being a sequence of things. Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartUp A | @Cell @StartLeft A | @Cell mr { 0i } @StartDown A } { @Rowa A { @Select A { @ACell asst } B { @ACell call-chain } C { @Sequence A { @BCell assert } B { @ACell condition } } } } } When building up complex diagrams like this, it pays to keep the indenting perfect in the source document. As with sequences, there can be up to twelve alternatives, in options from @Code A to {@Code L}. @PP To say that something is @I optional is to select either that thing or nothing: @ID @OneRow { @Code @Verbatim { @StartRight @Select A { @Skip } B { @ACell parameters } } ||7ct @SyntaxDiag { @StartRight @Select A { @Skip } B { @ACell parameters } } } Since this case is so common, there is an @Code "@Optional" symbol for it: @ID @OneRow { @Code @Verbatim { @StartRight @Optional @ACell parameters } ||7ct @SyntaxDiag { @StartRight @Optional @ACell parameters } } @Code "@Optional" is exactly like @Code "@Select" with option @Code A set to @Code "@Skip" and option @Code B set to the syntax diagram following the @Code "@Optional" symbol. Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartUp A | @Cell @StartLeft A | @Cell mr { 0i } @StartDown A } { @Rowa A { @Optional @ACell parameters } } } There is another kind of `optional' layout, {@Code "@OptionalDiverted"}: @ID @OneRow { @Code @Verbatim { @StartDown @OptionalDiverted @Sequence A { @BCell creation } B { @ACell parameters } } ||7ct @SyntaxDiag { @StartDown @OptionalDiverted @Sequence A { @BCell creation } B { @ACell parameters } } } Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartRight A | @Cell @StartUp A | @Cell mr { 0i } @StartLeft A } { @Rowa A { @OptionalDiverted @Sequence A { @BCell creation } B { @ACell parameters } } } } The optional material goes in a direction perpendicular to what it would have otherwise: right-moving if previously up or down, and down-moving if previously left or right. @PP Another, related symbol is {@Code "@Diverted"}; it is similar to @Code "@OptionalDiverted" but without the path which produces nothing: @ID @OneRow { @Code @Verbatim { @StartDown @Diverted @Sequence A { @BCell creation } B { @ACell parameters } } ||7ct @SyntaxDiag { @StartDown @Diverted @Sequence A { @BCell creation } B { @ACell parameters } } } Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartRight A | @Cell @StartUp A | @Cell mr { 0i } @StartLeft A } { @Rowa A { @Diverted @Sequence A { @BCell creation } B { @ACell parameters } } } } This symbol is a great aid to packing a big syntax diagram into a compact shape. @PP A variant of the basic selection idea is when you want one thing or another, or alternatively both in a particular order. You can get this with the @Code "@OneOrBoth" symbol, which takes exactly two options, @Code "A" and {@Code "B"}: @ID @OneRow { @Code @Verbatim { @StartRight @OneOrBoth A { @ACell type } B { @ACell body } } ||7ct @SyntaxDiag { @StartRight @OneOrBoth A { @ACell type } B { @ACell body } } } Although the concept extends to more than two options, the symbol doesn't. The summary at the end of this chapter shows the other three directions. @PP That covers sequencing and selection; now for looping. The @Code "@Loop" symbol produces a loop, with option @Code A going forwards and option @Code B centred and going backwards: @ID @OneRow { @Code @Verbatim { @StartRight @Loop A { @Sequence A { @ACell identifier } B { @CCell : } C { @ACell type } } B { @CCell , } } ||7ct @SyntaxDiag { @StartRight @Loop A { @Sequence A { @ACell identifier } B { @CCell : } C { @ACell type } } B { @CCell , } } } Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartUp A | @Cell @StartLeft A | @Cell mr { 0i } @StartDown A } { @Rowa A { @Loop A { @Sequence A { @ACell identifier } B { @CCell : } C { @ACell type } } B { @CCell , } } } } One common case of looping is to have nothing on the way back. We could get this by placing @Code "@Skip" in option {@Code B} of {@Code "@Loop"}, but there is an even easier way, the {@Code "@Repeat"} symbol: @ID @OneRow { @Code @Verbatim { @StartRight @Repeat @ACell statement } ||7ct @SyntaxDiag { @StartRight @Repeat @ACell statement } } Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartUp A | @Cell @StartLeft A | @Cell mr { 0i } @StartDown A } { @Rowa A { @Repeat @ACell statement } } } Occasionally it looks better to have the empty returning arrow go on the opposite side of the forward part; for that, there are @Code "@LoopOpposite" and @Code "@RepeatOpposite" symbols: @ID @OneRow { @Code @Verbatim { @StartRight @LoopOpposite A { @Sequence A { @ACell identifier } B { @CCell : } C { @ACell type } } B { @CCell , } } ||7ct @SyntaxDiag { @StartRight @LoopOpposite A { @Sequence A { @ACell identifier } B { @CCell : } C { @ACell type } } B { @CCell , } } } Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartUp A | @Cell @StartLeft A | @Cell mr { 0i } @StartDown A } { @Rowa A { @LoopOpposite A { @Sequence A { @ACell identifier } B { @CCell : } C { @ACell type } } B { @CCell , } } } } @Code "@RepeatOpposite" is particularly useful around a large {@Code "@Select"}: @ID @OneRow { @Code @Verbatim { @StartRight @RepeatOpposite @Select A { @ACell asst } B { @ACell call-chain } C { @BCell return } D { @Sequence A { @BCell assert } B { @ACell condition } } E { @ACell conditional } F { @ACell selection } G { @ACell loop } } ||7ct @SyntaxDiag { @StartRight @RepeatOpposite @Select A { @ACell asst } B { @ACell call-chain } C { @BCell return } D { @Sequence A { @BCell assert } B { @ACell condition } } E { @ACell conditional } F { @ACell selection } G { @ACell loop } } } since it clearly distinguishes the loop from the selection. @PP Finally, the @Code "@RepeatDiverted" symbol combines the two ideas of repetition and diversion: @ID @OneRow { @Code @Verbatim { @StartDown @RepeatDiverted @ACell statement } ||7ct @SyntaxDiag { @StartDown @RepeatDiverted @ACell statement } } Here is the same example in the other three directions: @CD @OneRow @SyntaxDiag { @Tbl mh { 1f } mv { 0i } iv { top } aformat { @Cell ml { 0i } @StartRight A | @Cell @StartUp A | @Cell mr { 0i } @StartLeft A } { @Rowa A { @RepeatDiverted @ACell statement } } } There is no {@Code "@LoopDiverted"} symbol, for good reason. @PP Every syntax diagram, from the simplest to the most complex, has one arrow going into it, and one coming out. There are no exceptions to this rule. In most syntax diagrams, these two arrows lie on the same (invisible) line and point in the same direction, and this is the direction that we say the diagram is moving. There are two symbols that produce syntax diagrams that lack this second property. Because of this lack, these symbols cannot be used at arbitrary places in a complex diagram; they can only be used instead of the @Code "@StartRight" or @Code "@StartDown" symbols at the beginning of a diagram. The first symbol, {@Code "@StartRightDown"}, prints its option @Code A right-moving and its option @Code B down-moving like this: @ID @OneRow { @Code @Verbatim { @StartRightDown A { @ACell A } B { @ACell B } } ||7ct @SyntaxDiag { @StartRightDown A { @ACell A } B { @ACell B } } } The second symbol, {@Code "@StartRightRight"}, prints both options right-moving like this: @ID @OneRow { @Code @Verbatim { @StartRightRight A { @ACell A } B { @ACell B } } ||7ct @SyntaxDiag { @StartRightRight A { @ACell A } B { @ACell B } } } As usual, the options to these symbols may contain arbitrarily complex syntax diagrams. @PP Finally, a few words about changing things. The @Code "@SyntaxDiag" symbol used the {@Code "@ANode"}, {@Code "@BNode"}, and {@Code "@CNode"} symbols of @@Diag to construct its three types of cells. In fact, the @Code "@SyntaxDiag" symbol is nothing more than this: @ID @OneRow @Code @Verbatim { @Diag avalign { mark } avstrut { yes } amargin { 0.2f } aoutline { box } afont { Italic } bvalign { mark } bvstrut { yes } bmargin { 0.2f } boutline { curvebox } bfont { Bold } cvalign { mark } cvstrut { yes } cmargin { 0.2f } coutline { circle } chsize { 1f } arrowlength { 0.4f } } So any of the other @Code "@Diag" options can be used freely with {@Code "@SyntaxDiag"}; and the format of the three cell types can be changed by using @Code "@Diag" instead of {@Code "@SyntaxDiag"}, and choosing new values for these (and other) options. For example, if you need four or five types of cell, just set some @Code { d } and @Code { e } options and use @Code "@DCell" and @Code "@ECell" in addition to {@Code "@ACell"}, {@Code "@BCell"}, and {@Code "@CCell"}. @PP If there are more than five cell types, it is necessary to fall back on the {@Code "@XCell"} symbol, which produces a cell without nominating any particular cell type. After @Code "@XCell" there must be a regular @Code "@Diag" node, like this: @ID @OneRow { @Code @Verbatim { @StartRight @XCell @Ellipse INIT } |7ct @SyntaxDiag { @StartRight @XCell @Ellipse INIT } } This way there is no limit to the number of different kinds of cells. Also, since (for example) @Code "@ACell" is merely an abbreviation for @ID @OneRow @Code @Verbatim { @XCell @ANode } any node options may follow {@Code "@ACell"}, {@Code "@BCell"}, {@Code "@CCell"}, {@Code "@DCell"}, and {@Code "@ECell"}. The appearance of the arrows can be changed in the usual way, by setting options as has been done above for {@Code "arrowlength"}. @PP There are three options specifically related to syntax diagrams: @ID @OneRow @Code @Verbatim { @SyntaxDiag syntaxgap { 0.35f } syntaxbias { 1.0f } syntaxradius { 0.3f } } The @Code syntaxgap option determines the spacing between the various elements; changing it causes the syntax diagrams to be set tighter or looser in a consistent way. The default value shown is 0.35 times the current font size. The @Code syntaxbias and @Code syntaxradius options affect the appearance of curved lines, as in @Code "@RVLCurve" and its relatives. These options are also available with {@Code "@Diag"}, and in the setup file. Note however that these options cannot be given to individual elements in a syntax diagram, only to the diagram as a whole. @End @Section lout-3.39/doc/user/johnson.out0000644000076400007640000000461211363700677015020 0ustar jeffjeff ................................................... . . . . Johnson . Johnson suddenly uttered, in . . suddenly . a strong determined tone, an . . uttered, . apophegm, at which many will . . in a strong . start: `Patriotism is the . . determined . last refuge of a scoundrel.' . . tone, an . . . apophegm, at . . . which many .................................. . will start: . . . . `Patriotism . Johnson . Johnson . . is the last . suddenly . suddenly . . refuge of a . uttered, . uttered, . . scoundrel.' . in a strong . in a strong . . . determined . determined . . . tone, an . tone, an . . . apophegm, at . apophegm, at . . . which many . which many . . . will start: . will start: . . . `Patriotism . `Patriotism . . . is the last . is the last . . . refuge of a . refuge of a . . . scoundrel.' . scoundrel.' . . . . . . . . . .................................. . . . . . Johnson suddenly uttered, in . . . a strong determined tone, an . . . apophegm, at which many will . . . start: `Patriotism is the . . . last refuge of a scoundrel.' . . . . . . . . ................................................... lout-3.39/doc/slides/0000700000076400007640000000000011446022324013065 5ustar jeffjefflout-3.39/doc/slides/all0000644000076400007640000003037411363700677013615 0ustar jeffjeff@SysInclude { eq } @SysInclude { tab } @SysInclude { fig } @SysInclude { pas } @SysInclude { graph } @SysInclude { cprint } @SysInclude { slides } @SysDatabase @Reference { loutrefs } @OverheadTransparencies @Title { A Practical Introduction to the Lout Document Formatting System } @RunningTitle { lout } @Author { Jeffrey H. Kingston } @Institution { Basser Dept. of Computer Science The University of Sydney } @InitialLanguage { English } // @Overhead @Title { A simple input file } @Begin @ID @Code { "@SysInclude { doc }" "@Doc @Text @Begin" "Hello, world" "@End @Text" } @LP @LP @Heading { How to format it } @ID @Code { "lout filename > out.ps" "ghostview out.ps" "mpr out.ps" } @End @Overhead @Overhead @Begin @ShowPage { Hello, world } @End @Overhead @Overhead @Title { Headings and paragraphs } @Begin @ID @Code { "@SysInclude { doc }" "@Doc @Text @Begin" "@Heading { Introduction }" "@PP" "The design of the Lout formatting" "system was undertaken with the" "needs of the @I { ordinary user }" "very much in mind." "@End @Text" } @End @Overhead @Overhead @Begin @ShowPage { @Heading { Introduction } @PP The design of the Lout formatting system was undertaken with the needs of the @I { ordinary user } very much in mind. } @End @Overhead @Overhead @Title { Displays } @Begin @ID @Code { "You certainly don't want to return to" "his office and report:" "@IndentedDisplay @I {" "`I can't find an efficient algorithm, I" "guess I'm just too dumb.'" "}" "To avoid serious damage to your" "position in the company, it would" "be better if ..." } @End @Overhead @Overhead @Begin @ShowPage { You certainly don't want to return to his office and report: @IndentedDisplay @I { `I can't find an efficient algorithm, I guess I'm just too dumb.' } To avoid serious damage to your position in the company, it would be better if ... } @End @Overhead @Overhead @Title { Paragraph breaking styles } @Begin @ID @Code { "You certainly don't want to return to" "his office and report:" "@ID { ragged nohyphen } @Break @I {" "`I can't find an efficient algorithm, I" "guess I'm just too dumb.'" "}" "To avoid serious damage to your" "position in the company, it would" "be better if ..." } @End @Overhead @Overhead @Begin @ShowPage { You certainly don't want to return to his office and report: @ID { ragged nohyphen } @Break @I { `I can't find an efficient algorithm, I guess I'm just too dumb.' } To avoid serious damage to your position in the company, it would be better if ... } @End @Overhead @Overhead @Title { Lists } @Begin @ID @Code { "@Heading { Operating Instructions }" "@NumberedList" "@ListItem { Press small green lever. }" "@ListItem { Wait approximately 10 seconds" "until red light flashes. }" "@ListItem { If smoke emerges from rear of unit," "call Service Department. }" "@EndList" } @End @Overhead @Overhead @Begin @ShowPage { @Heading { Operating Instructions } @NumberedList @ListItem { Press small green lever. } @ListItem { Wait approximately 10 seconds until red light flashes. } @ListItem { If smoke emerges from rear of unit, call Service Department. } @EndList } @End @Overhead @Overhead @Title { Technical reports } @Begin @ID @Code { "@SysInclude { report }" "@Report" " @Title { ... }" " @Author { ... }" " @Institution { ... }" " @DateLine { ... }" "//" "@Abstract { ... }" "@Section { ... }" "@Section { ... }" "@Section { ... }" "@Appendix { ... }" "@Appendix { ... }" } @End @Overhead @Overhead @Title { Sections } @Begin @ID @Code { "@Section" " @Tag { dfs }" " @Title { Depth-first search }" "@Begin" "@PP" "We turn now to our first algorithm" "on general graphs ..." "@End @Section" } @End @Overhead @Overhead @Begin @ShowPage { @Heading { 10.6. Depth-first search } @PP We turn now to our first algorithm on general graphs ... } @End @Overhead @Overhead @Title { Cross references } @Begin @ID @Code { "For further information, consult" "Section @NumberOf dfs on page" "@PageOf { dfs }." } @End @Overhead @Overhead @Begin @ShowPage { For further information, consult Section 10.6 on page 245. } @End @Overhead @Overhead @Title { References } @Begin @ID @Code { "@Database @Reference { myrefs }" "..." "For the details, consult the User's" "Guide @Cite { $kingston1995lout.user }." } @End @Overhead @Overhead @Begin @ShowPage { For the details, consult the User's Guide [1]. @LP ... @LP @Heading { References } @NumberedList @LI @RefPrint kingston1995lout.user @LI ... @EndList } @End @Overhead @Overhead @Title { Database file myrefs.ld } @Begin @ID @Code { "{ @Reference" " @Tag { kingston1995lout.user }" " @Type { Book }" " @Author { Jeffrey H. Kingston }" " @Title { A User's Guide to the Lout" "Document Formatting System (Version 3) }" " @Institution { Basser Department of" "Computer Science }" " @Address { University of Sydney" "2006, Australia }" " @Year { 1994 }" "}" } @End @Overhead @Overhead @Title { Books (and theses) } @Begin @BulletList @LI { Title page, preface, introduction } @LI { Automatic table of contents } @LI { Prefatory pages numbered in Roman numerals } @LI { Chapters, sections, subsections, appendices } @LI { References at end of chapters or book } @LI { Running page headers } @LI { Odd-even page formats } @LI { Sorted index } @EndList @End @Overhead @Overhead @Title { Making a sorted index } @Begin @ID @Code { "@PP" "There are several possible ways to implement the" "@I Partition procedure," "partition @Index { @I Partition (in {@I Quicksort}) }" "but the following seems to be the best. Starting ..." } @End @Overhead @Overhead @Begin @ShowPage { @Heading { Index } @LD lines @Break { ... partial order, 227 @I Partition (in {@I Quicksort}), 189 postorder traversal of binary tree, 19 topological ordering, 229 ... } } @End @Overhead @Overhead @Title { Equation formatting } @Begin @ID @Code { "@SysInclude { eq }" "..." "Since @Eq { T(n-i) = T(0) = 0 } we have" "@IndentedDisplay @Eq {" "T(n) = big sum from i=0 to n-1 2 sup i = 2 sup n - 1" "}" "for the number of disk moves made by the Towers" "of Hanoi algorithm, given @Eq { n } disks." } @End @Overhead @Overhead @Begin @ShowPage { Since @Eq { T(n-i) = T(0) = 0 } we have @IndentedDisplay @Eq { T(n) = big sum from i=0 to n-1 2 sup i = 2 sup n - 1 } for the number of disk moves made by the Towers of Hanoi algorithm, given @Eq { n } disks. } @End @Overhead @Overhead @Title { Another equation } @Begin @ID @Code { "@CenteredDisplay @Eq {" "big int supp 1 on 0 `" "dx over sqrt { 1 - x sup 2 }" "= pi over 2" "}" } @End @Overhead @Overhead @Begin @ShowPage { @CenteredDisplay @Eq { big int supp 1 on 0 ` dx over sqrt { 1 - x sup 2 } = pi over 2 } } @End @Overhead @Overhead @Title { Tables } @Begin @ID @Code { "@SysInclude { tab }" "..." "@Tab" " @Fmta { @Col @I A ! @Col B }" "{" "@Rowa" " A { Fortran }" " B { The first ... language }" "@Rowa" " A { Algol-60 }" " B { Said to be ... successors }" "@Rowa" " A { Pascal }" " B { The famous ... successors }" "}" } @End @Overhead @Overhead @Begin @ShowPage { @Tab vmargin { 0.4v } @Fmta { @Col @I A ! @Col B } { @Rowa A { Fortran } B { The first high-level programming language } @Rowa A { Algol-60 } B { Said to be a better language than most of its successors } @Rowa A { Pascal } B { The most famous of Algol-60's successors } } } @End @Overhead @Overhead @Title { Another table } @Begin @RID @Code { "@Tab" " hmargin { 0.4c }" " vmargin { 0.3v }" " side { single }" " @Fmta { @Col @B @CC X @Over A,B,C }" " @Fmtb { @Col @I A ! @Col B !! @Col C }" "{" "" "@Rowa above { single }" " X { Value of mathematical ... dollars) }" "" "@Rowb above { double }" " A { Quadratic formula }" " B { @Eq { x ^= { ... } over 2a } }" " C { 3^.5 }" "" "@Rowb below { single }" " A { Binomial theorem }" " B { @Eq { ( a + b ) sup n ^= ... b sup n-k } }" " C { 12^ }" "}" } @End @Overhead @Overhead @Begin @ShowPage { 0.6 @Scale @Tab hmargin { 0.4c } vmargin { 0.3v } side { single } @Fmta { @Col @B @CC X @Over A,B,C } @Fmtb { @Col @I A ! @Col B !! @Col C } { @Rowa above { single } X { Value of mathematical formulae (millions of dollars) } @Rowb above { double } A { Quadratic formula } B { @Eq { x ^= { minus b +- sqrt { b sup 2 - 4ac } } over 2a } } C { 3^.5 } @Rowb below { single } A { Binomial theorem } B { @Eq { ( a + b ) sup n ^= big sum from k=0 to infty matrix atleft { ( } atright { ) } { n above k } a sup k b sup n-k } } C { 12^ } } } @End @Overhead @Overhead @Title { Pascal programs } @Begin @ID @Code { "@SysInclude { pas }" "..." "@ID @Pas {" "procedure DoPriAbstract(root: PriEntry);" "begin" " if root^.leftchild <> nil then begin" " DoPriAbstract(root^.leftchild);" " write(', ');" " end;" " PriKeyAbstract(root^.key);" " write(':');" " PriValueAbstract(root^.value);" " if root^.rightchild <> nil then begin" " write(', ');" " DoPriAbstract(root^.rightchild);" " end;" "end;" "}" } @End @Overhead @Overhead @Begin @ShowPage { @Pas { procedure DoPriAbstract(root: PriEntry); begin if root^.leftchild <> nil then begin DoPriAbstract(root^.leftchild); write(', '); end; PriKeyAbstract(root^.key); write(':'); PriValueAbstract(root^.value); if root^.rightchild <> nil then begin write(', '); DoPriAbstract(root^.rightchild); end; end; } |0io } @End @Overhead @Overhead @Title { Basic graphics } @Begin @ID @Code { "45d @Rotate 1.5 @Scale @Box {" " Hello, world" "}" } @End @Overhead @Overhead @Begin @ShowPage { @ID @Code { 45d @Rotate 1.5 @Scale @Box { Hello, world } } } @End @Overhead @Overhead @Title { Advanced graphics } @Begin @ID @Code { "@SysInclude { fig }" "..." "@Fig {" "@Box" " margin { 0c }" " paint { black }" "@Ellipse" " linestyle { noline }" " paint { white }" "{ Hello, world }" "}" } @End @Overhead @Overhead @Begin @ShowPage { @Fig { @Box margin { 0c } paint { black } @Ellipse linestyle { noline } paint { white } { Hello, world } } } @End @Overhead @Overhead @Title { Point labelling } @Begin @ID @Code { "@Fig {" "A::" "{" " 1:: @Ellipse { 3c @Wide 2c @High }" " //3c" " 2:: @Box { 3c @Wide 2c @High }" "}" "@ShowLabels" "}" } @End @Overhead @Overhead @Begin @ShowPage { @Fig { A:: { 1:: @Ellipse { 3c @Wide 2c @High } //3c 2:: @Box { 3c @Wide 2c @High } } @ShowLabels } } @End @Overhead @Overhead @Title { Graphs } @Begin @LP @ID -1p @Font @Code { "@Graph" " abovecaption { New South Wales road deaths" "(per 100 million vehicle km) }" "{" " @Data points { plus } pairs { dashed }" " { 1963 5.6 1971 4.3 1976 3.7 1979 3.4" " 1982 2.9 1985 2.3 1988 2.0 }" "}" } @End @Overhead @Overhead @Begin @ShowPage @Graph width { 9 cm } height { 6 cm } abovecaption { New South Wales road deaths (per 100 million vehicle km) } { @Data points { plus } pairs { dashed } { 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 } } @End @Overhead @Overhead @Begin @RID @Code { "-2p @Font @Graph" " style { axes }" " xorigin { 0 } yorigin { 0 }" " xticks { 10@ 50@ 100@ 200@ 500@ }" " objects { @NE at { 300 2 } @I { Exponential }" " @SE at { ... } @I { Uniform } }" " belowcaption { @I n }" "{" " @Data points { filledcircle } { ... }" " @Data points { filledcircle } { ... }" "" " @Data pairs { dashed }" " { 10 2 500 2 }" "" " @Data pairs { dashed }" " {" " xloop from { 10 } to { 500 } by { 20 } do" " {" " x sqrt { pi*x / 4 } + 1" " }" " }" "}" } @End @Overhead @Overhead @Begin @ShowPage -2p @Font @Graph style { axes } xorigin { 0 } yorigin { 0 } width { 10 cm } height { 7 cm } xticks { 10@ 50@ 100@ 200@ 500@ } objects { @NE at { 300 2 } @I { Exponential } @SE at { 300 sqrt { pi*300/4 } + 1 } @I { Uniform } } belowcaption { @I n } belowgap { 0 cm } { @Data points { filledcircle } { 10 1.97 50 2.01 100 2.00 200 2.0 500 2.00 } @Data points { filledcircle } { 10 3.53 50 7.45 100 9.32 200 13.41 500 21.63 } @Data pairs { dashed } { 10 2 500 2 } @Data pairs { dashed } { xloop from { 10 } to { 500 } by { 20 } do { x sqrt { pi*x / 4 } + 1 } } } @End @Overhead lout-3.39/doc/slides/README0000644000076400007640000000077711446017317014000 0ustar jeffjeffDirectory lout/doc/slides This directory contains the Lout source of a set of overhead transparencies entitled `A Practical Introduction to the Lout Document Formatting System.' To format the transparencies, type lout -r2 all > outfile.ps in this directory. The -r2 flag causes Lout to run twice over the document, which is needed to resolve all cross references. There should be no error messages at all after the second run. A copy of the final outfile.ps is included. Jeff Kingston 21 September 2010 lout-3.39/doc/slides/outfile.ps0000644000076400007640000045440111446022220015115 0ustar jeffjeff%!PS-Adobe-3.0 %%Creator: Basser Lout Version 3.39 (September 2010) %%CreationDate: Tue Sep 21 13:20:48 2010 %%DocumentData: Binary %%DocumentNeededResources: (atend) %%DocumentSuppliedResources: (atend) %%DocumentMedia: A4 595 842 0 white () %%PageOrder: Ascend %%LanguageLevel: 2 %%Pages: (atend) %%BoundingBox: 0 0 595 842 %%EndComments %%BeginProlog %%BeginResource: procset LoutStartUp /cp_x 0 def /cp_y 0 def /louts 0 def /loutv 0 def /loutf 0 def /ymark 0 def /xmark 0 def /ysize 0 def /xsize 0 def /save_cp { currentpoint /cp_y exch def /cp_x exch def } bind def /restore_cp { cp_x cp_y moveto } bind def /outline { gsave 1 1 1 setrgbcolor dup show save_cp grestore true charpath stroke restore_cp } bind def /m { 3 1 roll moveto show } bind def /mo { 3 1 roll moveto outline } bind def /s { exch currentpoint exch pop moveto show } bind def /so { exch currentpoint exch pop moveto outline } bind def /k { exch neg 0 rmoveto show } bind def /ko { exch neg 0 rmoveto outline } bind def /r { exch 0 rmoveto show } bind def /ro { exch 0 rmoveto outline } bind def /c { gsave 3 1 roll rmoveto show grestore } bind def /co { gsave 3 1 roll rmoveto outline grestore } bind def /ul { gsave setlinewidth dup 3 1 roll moveto lineto stroke grestore } bind def /in { 1440 mul } bind def /cm { 567 mul } bind def /pt { 20 mul } bind def /em { 120 mul } bind def /sp { louts mul } def /vs { loutv mul } def /ft { loutf mul } def /dg { } def /LoutGraphic { /louts exch def /loutv exch def /loutf exch def /ymark exch def /xmark exch def /ysize exch def /xsize exch def } def /LoutGr2 { gsave translate LoutGraphic gsave } def /LoutFont { findfont exch scalefont setfont } bind def /LoutRecode { { findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding exch def currentdict end definefont pop } stopped pop } bind def /PreEPSF_state 0 def /dict_stack 0 def /ops_count 0 def /LoutStartEPSF { % prepare for EPSF inclusion /PreEPSF_state save def /dict_stack countdictstack def /ops_count count 1 sub def 20 dict begin /showpage {} def 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit [] 0 setdash newpath /languagelevel where { pop languagelevel 1 ne { false setstrokeadjust false setoverprint } if } if } bind def /LoutEPSFCleanUp { % clean up after EPSF inclusion count ops_count sub { pop } repeat countdictstack dict_stack sub { end } repeat PreEPSF_state restore } bind def % Find current texture (may be null) % - LoutCurrentP p /LoutCurrentP { currentcolorspace 0 get /Pattern eq { [ currentcolor ] dup length 1 sub get } { null } ifelse } def % Find current color and color space % - LoutCurrentCCS c cs /LoutCurrentCCS { LoutCurrentP dup null eq { pop [ currentcolor ] currentcolorspace } { dup /UnderlyingColor get exch /UnderlyingColorSpace get } ifelse } def % Install c, cs, and (a copy of) p into graphics state % c cs p LoutSetCCSP - /LoutSetCCSP { dup null eq { pop setcolorspace aload pop setcolor } { % copy pattern dictionary 12 dict copy % record cs and c in p dup /UnderlyingColorSpace 3 index put dup /UnderlyingColor 4 index put % do setcolorspace and setcolor dup /PaintType get 1 eq { [ /Pattern ] setcolorspace setcolor pop pop } { [ /Pattern 4 -1 roll ] setcolorspace exch aload length 1 add -1 roll setcolor } ifelse } ifelse } bind def % num LoutSetGray - /LoutSetGray { [ 2 1 roll ] [ /DeviceGray ] LoutCurrentP LoutSetCCSP } bind def % r g b LoutSetRGBColor - /LoutSetRGBColor { [ 4 1 roll ] [ /DeviceRGB ] LoutCurrentP LoutSetCCSP } bind def % h s b LoutSetHSBColor - /LoutSetHSBColor { gsave sethsbcolor currentrgbcolor grestore LoutSetRGBColor } bind def % c m y k LoutSetRGBColor - /LoutSetCMYKColor { [ 5 1 roll ] [ /DeviceCMYK ] LoutCurrentP LoutSetCCSP } bind def % p LoutSetTexture - /LoutSetTexture { LoutCurrentCCS 3 -1 roll LoutSetCCSP } bind def % % LoutMakeTexture p /LoutMakeTexture { 12 dict begin /PaintProc exch def /YStep exch def /XStep exch def /BBox exch def /PaintType exch def /PatternType 1 def /TilingType 1 def currentdict end 7 1 roll matrix translate 5 1 roll matrix rotate 4 1 roll matrix scale exch dup matrix scale matrix concatmatrix matrix concatmatrix matrix concatmatrix /makepattern where { pop makepattern } { pop pop null } ifelse } bind def /LoutTextureSolid { null LoutSetTexture } bind def %%EndResource %%BeginResource: procset LoutTabPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/tabf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Tab % % % % This file has been placed in the public domain % % by its author, Jeffrey H. Kingston % % % % To assist in avoiding name clashes, the names % % of all these symbols begin with "ltab". % % % % Jeffrey H. Kingston % % 24 September 1991 % % 22 December 1992 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % linewidth ltabhs - % horizontal single line /ltabhs { 0 0 moveto xsize 0 lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhsp - % horizontal single line with projecting ends /ltabhsp { 0 0 moveto xsize 0 lineto setlinewidth 2 setlinecap stroke } def % linewidth ltabhd - % horizontal double line /ltabhd { dup dup 0 0 moveto xsize 0 lineto 0 exch 3 mul moveto xsize exch 3 mul lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhdb - % horizontal double line below mark /ltabhdb { dup dup 0 0 moveto xsize 0 lineto 0 exch -3 mul moveto xsize exch -3 mul lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhdnw - % horizontal double line with northwest corner /ltabhdnw { dup dup dup dup 0 0 moveto xsize 0 lineto xsize exch 3 mul moveto -3 mul exch 3 mul lineto -3 mul 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdne - % horizontal double line with northeast corner /ltabhdne { dup dup dup dup 0 0 moveto xsize 0 lineto 0 exch 3 mul moveto 3 mul xsize add exch 3 mul lineto 3 mul xsize add 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdsw - % horizontal double line with southwest corner /ltabhdsw { dup dup dup dup 0 0 moveto xsize 0 lineto xsize exch -3 mul moveto -3 mul exch -3 mul lineto -3 mul 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdse - % horizontal double line with southeast corner /ltabhdse { dup dup dup dup 0 0 moveto xsize 0 lineto 0 exch -3 mul moveto 3 mul xsize add exch -3 mul lineto 3 mul xsize add 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabvs - % vertical single line /ltabvs { 0 0 moveto 0 ysize lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabvd - % vertical double line /ltabvd { dup dup 0 0 moveto 0 ysize lineto -3 mul 0 moveto -3 mul ysize lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabvdr - % vertical double line to right of mark /ltabvdr { dup dup 0 0 moveto 0 ysize lineto 3 mul 0 moveto 3 mul ysize lineto setlinewidth 0 setlinecap stroke } def %%EndResource %%BeginResource: procset LoutFigPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/figf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Fig Jeffrey H. Kingston % % Version 2.0 (includes CIRCUM label) January 1992 % % % % This file has been placed in the public domain by its author, % % Jeffrey H. Kingston % % % % Although Fig is now obsolete I have updated it 20 October 2002 % % to work with textures, i.e. replacing setrgbcolor with % % LoutSetRGBColor. % % % % To assist in avoiding name clashes, the names of all symbols % % defined here begin with "lfig". However, this is not feasible % % with user-defined labels and some labels used by users. % % % % is two numbers, a point. % % is one number, a length % % is one number, an angle in degrees % % is one number, the preferred length of a dash % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% errordict begin /handleerror { { /Times-Roman findfont 8 pt scalefont setfont 0 setgray 4 pt 4 pt moveto $error /errorname get dup lfigdict exch known { lfigdict exch get } { 30 string cvs } ifelse show ( Command: ) show $error /command get 30 string cvs show } stopped {} if showpage stop } def end % concat strings: lfigconcat % must be defined outside lfigdict since used in lfigpromotelabels /lfigconcat { 2 copy length exch length add string dup 0 4 index putinterval dup 3 index length 3 index putinterval 3 1 roll pop pop } def % lfigdebugprint - % must be defined outside lfigdict since used in arbitrary places % /lfigdebugprint % { print % (; operand stack:\n) print % count copy % count 2 idiv % { == % (\n) print % } repeat % (\n) print % } def /lfigdict 120 dict def lfigdict begin % error messages /dictfull (dictfull error: too many labels?) def /dictstackoverflow (dictstackoverflow error: labels nested too deeply?) def /execstackoverflow (execstackoverflow error: figure nested too deeply?) def /limitcheck (limitcheck error: figure nested too deeply or too large?) def /syntaxerror (syntaxerror error: syntax error in text of figure?) def /typecheck (typecheck error: syntax error in text of figure?) def /undefined (undefined error: unknown or misspelt label?) def /VMError (VMError error: run out of memory?) def % push pi onto stack: - lfigpi /lfigpi 3.14159 def % arc directions /clockwise false def /anticlockwise true def % maximum of two numbers: lfigmax /lfigmax { 2 copy gt { pop } { exch pop } ifelse } def % minimum of two numbers: lfigmin /lfigmin { 2 copy lt { pop } { exch pop } ifelse } def % add two points: lfigpadd /lfigpadd { exch 3 1 roll add 3 1 roll add exch } def % subtract first point from second: lfigpsub /lfigpsub { 3 2 roll sub 3 1 roll exch sub exch } def % max two points: lfigpmax /lfigpmax { exch 3 1 roll lfigmax 3 1 roll lfigmax exch } def % min two points: lfigpmin /lfigpmin { exch 3 1 roll lfigmin 3 1 roll lfigmin exch } def % scalar multiplication: lfigpmul /lfigpmul { dup 3 1 roll mul 3 1 roll mul exch } def % point at angle and distance: lfigatangle /lfigatangle { 2 copy cos mul 3 1 roll sin mul lfigpadd } def % angle from one point to another: lfigangle /lfigangle { lfigpsub 2 copy 0 eq exch 0 eq and {pop} {exch atan} ifelse } def % distance between two points: lfigdistance /lfigdistance { lfigpsub dup mul exch dup mul add sqrt } def % difference in x coords: lfigxdistance /lfigxdistance { pop 3 1 roll pop sub } def %difference in y coords: lfigydistance /lfigydistance { 3 1 roll pop sub exch pop } def % stroke a solid line: lfigsolid - /lfigsolid { pop pop [] 0 setdash stroke } def % stroke a lfigdashed line: lfigdashed - /lfigdashed { 2 copy div 2 le 1 index 0 le or { exch pop 1 pt lfigmax [ exch dup ] 0 setdash } { dup [ exch 4 2 roll 2 copy div 1 sub 2 div ceiling dup 4 1 roll 1 add mul sub exch div ] 0 setdash } ifelse stroke } def % stroke a lfigcdashed line: lfigcdashed - /lfigcdashed { 2 copy le 1 index 0 le or { exch pop 1 pt lfigmax [ exch dup ] dup 0 get 2 div setdash } { dup [ 4 2 roll exch 2 copy exch div 2 div ceiling div 1 index sub ] exch 2 div setdash } ifelse stroke } def % stroke a dotted line: lfigdotted - /lfigdotted { 2 copy le 1 index 0 le or { exch pop 1 pt lfigmax [ exch 0 exch ] 0 setdash } { 1 index exch div ceiling div [ 0 3 2 roll ] 0 setdash } ifelse stroke } def % stroke a noline line: lfignoline - /lfignoline { pop pop } def % painting (i.e. filling): - lfigwhite - (etc.) /lfignopaint { } def /lfignochange { fill } def /lfigdarkblue { 0.0 0.0 0.5 LoutSetRGBColor fill } def /lfigblue { 0.0 0.0 1.0 LoutSetRGBColor fill } def /lfiglightblue { 0.5 0.5 1.0 LoutSetRGBColor fill } def /lfigdarkgreen { 0.0 0.5 0.0 LoutSetRGBColor fill } def /lfiggreen { 0.0 1.0 0.0 LoutSetRGBColor fill } def /lfiglightgreen { 0.5 1.0 0.5 LoutSetRGBColor fill } def /lfigdarkred { 0.5 0.0 0.0 LoutSetRGBColor fill } def /lfigred { 1.0 0.0 0.0 LoutSetRGBColor fill } def /lfiglightred { 1.0 0.5 0.5 LoutSetRGBColor fill } def /lfigdarkcyan { 0.0 0.5 0.5 LoutSetRGBColor fill } def /lfigcyan { 0.0 1.0 1.0 LoutSetRGBColor fill } def /lfiglightcyan { 0.5 1.0 1.0 LoutSetRGBColor fill } def /lfigdarkmagenta { 0.5 0.0 0.5 LoutSetRGBColor fill } def /lfigmagenta { 1.0 0.0 1.0 LoutSetRGBColor fill } def /lfiglightmagenta { 1.0 0.5 1.0 LoutSetRGBColor fill } def /lfigdarkyellow { 0.5 0.5 0.0 LoutSetRGBColor fill } def /lfigyellow { 1.0 1.0 0.0 LoutSetRGBColor fill } def /lfiglightyellow { 1.0 1.0 0.5 LoutSetRGBColor fill } def /lfigdarkgray { 0.2 0.2 0.2 LoutSetRGBColor fill } def /lfiggray { 0.5 0.5 0.5 LoutSetRGBColor fill } def /lfiglightgray { 0.8 0.8 0.8 LoutSetRGBColor fill } def /lfigdarkgrey { 0.2 0.2 0.2 LoutSetRGBColor fill } def /lfiggrey { 0.5 0.5 0.5 LoutSetRGBColor fill } def /lfiglightgrey { 0.8 0.8 0.8 LoutSetRGBColor fill } def /lfigblack { 0.0 0.0 0.0 LoutSetRGBColor fill } def /lfigwhite { 1.0 1.0 1.0 LoutSetRGBColor fill } def % line caps (and joins, not currently used) /lfigbutt 0 def /lfiground 1 def /lfigprojecting 2 def /lfigmiter 0 def /lfigbevel 2 def % shape and labels of the @Box symbol /lfigbox { 0 0 /SW lfigpointdef xsize 0 /SE lfigpointdef xsize ysize /NE lfigpointdef 0 ysize /NW lfigpointdef SE 0.5 lfigpmul /S lfigpointdef NW 0.5 lfigpmul /W lfigpointdef W SE lfigpadd /E lfigpointdef S NW lfigpadd /N lfigpointdef NE 0.5 lfigpmul /CTR lfigpointdef [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef SW SE NE NW SW } def % shape and labels of the @CurveBox symbol /lfigcurvebox { xsize 0.5 mul ysize 0.5 mul /CTR lfigpointdef xsize 0.5 mul 0 /S lfigpointdef xsize ysize 0.5 mul /E lfigpointdef xsize 0.5 mul ysize /N lfigpointdef 0 ysize 0.5 mul /W lfigpointdef xmark 0.293 mul xmark 0.293 mul /SW lfigpointdef xsize xmark 0.293 mul sub xmark 0.293 mul /SE lfigpointdef xsize xmark 0.293 mul sub ysize xmark 0.293 mul sub /NE lfigpointdef xmark 0.293 mul ysize xmark 0.293 mul sub /NW lfigpointdef [ xsize ysize 0.5 lfigpmul xmark /lfigcurveboxcircum cvx ] lfigcircumdef xmark 0 xsize xmark sub 0 [ xsize xmark sub xmark ] xsize xmark xsize ysize xmark sub [ xsize xmark sub ysize xmark sub ] xsize xmark sub ysize xmark ysize [ xmark ysize xmark sub ] 0 ysize xmark sub 0 xmark [ xmark xmark ] xmark 0 } def % shadow of the @ShadowBox symbol % its shape and labels are done, somewhat inaccurately, with lfigbox /lfigshadow { xmark 2 mul 0 moveto xsize 0 lineto xsize ysize xmark 2 mul sub lineto xsize xmark sub ysize xmark 2 mul sub lineto xsize xmark sub xmark lineto xmark 2 mul xmark lineto closepath fill } def % shape and labels of the @Square symbol /lfigsquare { xsize ysize 0.5 lfigpmul /CTR lfigpointdef CTR xsize xsize ysize ysize lfigpmax 0.5 lfigpmul lfigpadd /NE lfigpointdef CTR 0 0 CTR NE lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef CTR 0 0 CTR NE lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef CTR 0 0 CTR NE lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef SW 0.5 lfigpmul SE 0.5 lfigpmul lfigpadd /S lfigpointdef NW 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /N lfigpointdef SW 0.5 lfigpmul NW 0.5 lfigpmul lfigpadd /W lfigpointdef SE 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /E lfigpointdef [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef SW SE NE NW SW } def % shape and labels of the @Diamond symbol /lfigdiamond { xsize 0 0.5 lfigpmul /S lfigpointdef 0 ysize 0.5 lfigpmul /W lfigpointdef S W lfigpadd /CTR lfigpointdef CTR W lfigpadd /N lfigpointdef CTR S lfigpadd /E lfigpointdef [ xsize ysize 0.5 lfigpmul /lfigdiamondcircum cvx ] lfigcircumdef S E N W S } def % shape and labels of the @Ellipse symbol /lfigellipse { xsize 0 0.5 lfigpmul /S lfigpointdef 0 ysize 0.5 lfigpmul /W lfigpointdef S W lfigpadd /CTR lfigpointdef CTR W lfigpadd /N lfigpointdef CTR S lfigpadd /E lfigpointdef CTR xsize 0 0.3536 lfigpmul lfigpadd 0 ysize 0.3536 lfigpmul lfigpadd /NE lfigpointdef 0 ysize 0.3536 lfigpmul CTR xsize 0 0.3536 lfigpmul lfigpadd lfigpsub /SE lfigpointdef xsize 0 0.3536 lfigpmul CTR lfigpsub 0 ysize 0.3536 lfigpmul lfigpadd /NW lfigpointdef 0 ysize 0.3536 lfigpmul xsize 0 0.3536 lfigpmul CTR lfigpsub lfigpsub /SW lfigpointdef [ xsize ysize 0.5 lfigpmul /lfigellipsecircum cvx ] lfigcircumdef S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S } def % shape and labels of the @Circle symbol /lfigcircle { xsize ysize 0.5 lfigpmul /CTR lfigpointdef CTR xsize 0 ysize 0 lfigpmax 0.5 lfigpmul lfigpadd /E lfigpointdef CTR 0 0 CTR E lfigdistance 45 lfigatangle lfigpadd /NE lfigpointdef CTR 0 0 CTR E lfigdistance 90 lfigatangle lfigpadd /N lfigpointdef CTR 0 0 CTR E lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef CTR 0 0 CTR E lfigdistance 180 lfigatangle lfigpadd /W lfigpointdef CTR 0 0 CTR E lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef CTR 0 0 CTR E lfigdistance 270 lfigatangle lfigpadd /S lfigpointdef CTR 0 0 CTR E lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef [ S E lfigpsub /lfigellipsecircum cvx ] lfigcircumdef S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S } def % shape and labels of the @HLine and @HArrow symbols /lfighline { 0 ymark lfigprevious /FROM lfigpointdef xsize ymark lfigprevious /TO lfigpointdef } def % shape and labels of the @VLine and @VArrow symbols /lfigvline { xmark ysize lfigprevious /FROM lfigpointdef xmark 0 lfigprevious /TO lfigpointdef } def % points of a polygon around base with given no of sides, vert init angle: % figpolygon ... /lfigpolygon { xsize ysize 0.5 lfigpmul /CTR lfigpointdef 90 sub CTR 2 copy lfigmax 5 3 roll [ 4 copy pop /lfigpolycircum cvx ] lfigcircumdef exch dup 360 exch div exch 1 1 3 2 roll { 4 string cvs (P) exch lfigconcat cvn 6 copy pop pop lfigatangle 2 copy 10 2 roll 3 2 roll lfigpointdef dup 3 1 roll add exch } for pop lfigatangle } def % next array element: lfiggetnext true % or false /lfiggetnext { 2 copy exch length ge { false } { 2 copy get exch 1 add exch true } ifelse } def % check whether thing is number: lfigisnumbertype /lfigisnumbertype { dup type dup /integertype eq exch /realtype eq or } def % check whether thing is an array: lfigisarraytype /lfigisarraytype { dup type /arraytype eq } def % get next item: lfiggetnextitem 0 % or 1 % or 2 /lfiggetnextitem { lfiggetnext { lfigisarraytype { 1 } { lfigisnumbertype { 3 1 roll lfiggetnext { lfigisnumbertype { 4 3 roll exch 2 } { pop 3 2 roll pop 0 } ifelse } { 3 2 roll pop 0 } ifelse } { pop 0 } ifelse } ifelse } { 0 } ifelse } def % set arc path: bool x1 y1 x2 y2 x0 y0 lfigsetarc % the path goes from x1 y1 to x2 y2 about centre x0 y0, % anticlockwise if bool is true else clockwise. % The orientations of backwards pointing and forwards pointing % arrowheads are returned in the two angles, and % the length of the arc is returned in . /lfigsetarc { 20 dict begin matrix currentmatrix 8 1 roll 2 copy translate 2 copy 8 2 roll 4 2 roll lfigpsub 6 2 roll lfigpsub dup /y1 exch def dup mul /y1s exch def dup /x1 exch def dup mul /x1s exch def dup /y2 exch def dup mul /y2s exch def dup /x2 exch def dup mul /x2s exch def y1s y2s eq { -1 } { y1s x2s mul y2s x1s mul sub y1s y2s sub div } ifelse /da exch def x1s x2s eq { -1 } { x1s y2s mul x2s y1s mul sub x1s x2s sub div } ifelse /db exch def da 0 gt db 0 gt and { /LMax da sqrt db sqrt lfigmax def /scalex da sqrt LMax div def /scaley db sqrt LMax div def scalex scaley scale 0 0 LMax 0 0 x1 scalex mul y1 scaley mul lfigangle 0 0 x2 scalex mul y2 scaley mul lfigangle 2 copy eq { 360 add } if 2 copy 8 2 roll 5 index { arc } { arcn } ifelse 2 index 1 index { 90 sub } { 90 add } ifelse dup sin scaley mul exch cos scalex mul atan 2 index 2 index { 90 add } { 90 sub } ifelse dup sin scaley mul exch cos scalex mul atan 5 2 roll % res1 res2 ang1 ang2 anticlockwise { exch sub } { sub } ifelse dup 0 le { 360 add } if lfigpi mul LMax mul 180 div } { 0 0 x1 y1 lfigdistance 0 0 x2 y2 lfigdistance eq 0 0 x1 y1 lfigdistance 0 gt and { 0 0 0 0 x1 y1 lfigdistance 0 0 x1 y1 lfigangle 0 0 x2 y2 lfigangle 2 copy eq { 360 add } if 2 copy 8 2 roll 5 index { arc } { arcn } ifelse 2 index 1 index { 90 sub } { 90 add } ifelse 2 index 2 index { 90 add } { 90 sub } ifelse 5 2 roll % res1 res2 ang1 ang2 clockwise { exch sub } { sub } ifelse dup 0 le { 360 add } if lfigpi mul 0 0 x1 y1 lfigdistance mul 180 div } { x2 y2 lineto pop x2 y2 x1 y1 lfigangle x1 y1 x2 y2 lfigangle x1 y1 x2 y2 lfigdistance } ifelse } ifelse 4 -1 roll setmatrix end } def % lfigsetcurve: set up a Bezier curve from x0 y0 to x3 y3 % and return arrowhead angles and length of curve (actually 0) % x0 y0 x1 y1 x2 y2 x3 y3 lfigsetcurve /lfigsetcurve { 8 copy curveto pop pop lfigangle 5 1 roll 4 2 roll lfigangle exch 0 } def % lfigpaintpath: paint a path of the given shape % /paint [ shape ] lfigpaintpath - /lfigpaintpath { 10 dict begin 0 newpath /prevseen false def /curveseen false def { lfiggetnextitem dup 0 eq { pop exit } { 1 eq { /curveseen true def /curve exch def curve length 0 eq { /curveseen false def } if } { /ycurr exch def /xcurr exch def prevseen { curveseen { curve length 4 eq { xprev yprev curve 0 get curve 1 get curve 2 get curve 3 get xcurr ycurr lfigsetcurve pop pop pop } { xprev yprev xcurr ycurr curve length 1 ge { curve 0 get } { 0 } ifelse curve length 2 ge { curve 1 get } { 0 } ifelse curve length 3 ge { curve 2 get } { true } ifelse 7 1 roll lfigsetarc pop pop pop } ifelse } { xcurr ycurr lineto } ifelse } { xcurr ycurr moveto } ifelse /xprev xcurr def /yprev ycurr def /prevseen true def /curveseen false def } ifelse } ifelse } loop pop pop cvx exec end } def % stroke a path of the given shape in the given linestyle and dash length. % Return the origin and angle of the backward and forward arrow heads. % dashlength /linestyle [shape] lfigdopath [ ] [ ] /lfigdopath { 10 dict begin 0 /prevseen false def /curveseen false def /backarrow [] def /fwdarrow [] def { lfiggetnextitem dup 0 eq { pop exit } { 1 eq { /curveseen true def /curve exch def curve length 0 eq { /prevseen false def } if } { /ycurr exch def /xcurr exch def prevseen { newpath xprev yprev moveto curveseen { curve length 4 eq { xprev yprev curve 0 get curve 1 get curve 2 get curve 3 get xcurr ycurr lfigsetcurve } { xprev yprev xcurr ycurr curve length 1 ge { curve 0 get } { 0 } ifelse curve length 2 ge { curve 1 get } { 0 } ifelse curve length 3 ge { curve 2 get } { true } ifelse 7 1 roll lfigsetarc } ifelse } { xcurr ycurr lineto xcurr ycurr xprev yprev lfigangle dup 180 sub xprev yprev xcurr ycurr lfigdistance } ifelse 6 index 6 index cvx exec [ xprev yprev 5 -1 roll ] backarrow length 0 eq { /backarrow exch def } { pop } ifelse [ xcurr ycurr 4 -1 roll ] /fwdarrow exch def } if /xprev xcurr def /yprev ycurr def /prevseen true def /curveseen false def } ifelse } ifelse } loop pop pop pop pop backarrow length 0 eq { [ 0 0 0 ] } { backarrow } ifelse fwdarrow length 0 eq { [ 0 0 0 ] } { fwdarrow } ifelse end } def % lfigdoarrow: draw an arrow head of given form % dashlength /lstyle /pstyle hfrac height width [ ] lfigdoarrow - /lfigdoarrow { matrix currentmatrix 8 1 roll dup 0 get 1 index 1 get translate 2 get rotate [ 2 index neg 2 index 0 0 3 index 3 index neg 1 index 10 index mul 0 7 index 7 index ] 4 1 roll pop pop pop dup 3 1 roll gsave lfigpaintpath grestore lfigdopath pop pop setmatrix } def % arrow head styles /lfigopen 0.0 def /lfighalfopen 0.5 def /lfigclosed 1.0 def % stroke no arrows, forward, back, and both /lfignoarrow { pop pop pop pop pop pop pop pop } def /lfigforward { 7 -1 roll lfigdoarrow pop } def /lfigback { 8 -2 roll pop lfigdoarrow } def /lfigboth { 8 -1 roll 7 copy lfigdoarrow pop 7 -1 roll lfigdoarrow } def % lfigprevious: return previous point on path /lfigprevious { lfigisnumbertype { 2 copy } { lfigisarraytype { 2 index 2 index } { 0 0 } ifelse } ifelse } def % label a point in 2nd top dictionary: /name lfigpointdef - /lfigpointdef { % (Entering lfigpointdef) lfigdebugprint [ 4 2 roll transform /itransform cvx ] cvx currentdict end 3 1 roll % currentdict length currentdict maxlength lt % { def } % { exec moveto (too many labels) show stop } % ifelse def begin % (Leaving lfigpointdef) lfigdebugprint } def % promote labels from second top to third top dictionary % lfigpromotelabels - /lfigpromotelabels { % (Entering lfigpromotelabels) lfigdebugprint currentdict end exch currentdict end { exch 20 string cvs 2 index (@) lfigconcat exch lfigconcat cvn exch def } forall pop begin % (Leaving lfigpromotelabels) lfigdebugprint } def % show labels (except CIRCUM): - lfigshowlabels - /lfigshowlabels { % (Entering lfigshowlabels) lfigdebugprint currentdict end currentdict { 1 index 20 string cvs (CIRCUM) search % if CIRCUM in key { pop pop pop pop pop } { pop cvx exec 2 copy newpath 1.5 pt 0 360 arc 0 setgray fill /Times-Roman findfont 8 pt scalefont setfont moveto 0.2 cm 0.1 cm rmoveto 20 string cvs show } ifelse } forall begin % (Leaving lfigshowlabels) lfigdebugprint } def % fix an angle to 0 <= res < 360: lfigfixangle /lfigfixangle { % (Entering lfigfixangle) lfigdebugprint { dup 0 ge { exit } if 360 add } loop { dup 360 lt { exit } if 360 sub } loop % (Leaving lfigfixangle) lfigdebugprint } def % find point on circumference of box: alpha a b lfigboxcircum x y /lfigboxcircum { % (Entering lfigboxcircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def 0 0 a b lfigangle /theta exch def % if alpha <= theta, return (a, a*tan(alpha)) alpha theta le { a a alpha sin mul alpha cos div } { % else if alpha <= 180 - theta, return (b*cot(alpha), b) alpha 180 theta sub le { b alpha cos mul alpha sin div b } { % else if alpha <= 180 + theta, return (-a, -a*tan(alpha)) alpha 180 theta add le { a neg a neg alpha sin mul alpha cos div } { % else if alpha <= 360 - theta, return (-b*cot(alpha), -b) alpha 360 theta sub le { b neg alpha cos mul alpha sin div b neg } { % else 360 - theta <= alpha, return (a, a*tan(alpha)) a a alpha sin mul alpha cos div } ifelse } ifelse } ifelse } ifelse end % (Leaving lfigboxcircum) lfigdebugprint } def % find quadratic roots (assume a != 0): a b c lfigqroots x1 x2 2 % or x2 1 % or 0 /lfigqroots { 4 dict begin /c exch def /b exch def /a exch def /disc b b mul 4 a c mul mul sub def disc 0 lt { 0 } { disc 0 eq { b neg 2 a mul div 1 } { b neg disc sqrt add 2 a mul div b neg disc sqrt sub 2 a mul div 2 } ifelse } ifelse end } def % work our which quadrant: lfigquadrant <0-3> /lfigquadrant { dup 90 lt { pop 0 } { dup 180 lt { pop 1 } { 270 lt { 2 } { 3 } ifelse } ifelse } ifelse } def % find curvebox circum, assuming upper right quadrant: alpha a b xmk lfigcb x y /lfigcb { 6 dict begin /xmk exch def /b exch def /a exch def /alpha exch def /theta1 0 0 a b xmk sub lfigangle def /theta2 0 0 a xmk sub b lfigangle def alpha theta1 le { % if alpha <= theta1, return (a, a*tan(alpha)) a a alpha sin mul alpha cos div } { alpha theta2 ge { % else if alpha > theta2, return (b*cot(alpha), b) b alpha cos mul alpha sin div b } { % else, return the intersection of line and circle a xmk sub b xmk sub xmk 0 0 alpha lfigcircleintersect dup 0 eq { % should never happen, just return any reasonable point pop a b 0.5 lfigpmul } { 1 eq { % should never happen, just return the point on top of stack } { % the usual case, two points on stack, return the larger lfigpmax } ifelse } ifelse } ifelse } ifelse end } def % find point on circumference of curvebox: alpha a b xmk lfigcurveboxcircum x y /lfigcurveboxcircum { % (Entering lfigcurveboxcircum) lfigdebugprint 5 dict begin /xmk exch def /b exch def /a exch def lfigfixangle /alpha exch def % work out which quadrant we are in, and reflect accordingly /quad alpha lfigquadrant def quad 0 eq { alpha a b xmk lfigcb } { quad 1 eq { 180 alpha sub a b xmk lfigcb exch neg exch } { quad 2 eq { alpha 180 sub a b xmk lfigcb neg exch neg exch } { 360 alpha sub a b xmk lfigcb neg } ifelse } ifelse } ifelse end % (Leaving lfigcurveboxcircum) lfigdebugprint } def % find point on circumference of diamond: alpha a b lfigdiamondcircum x y /lfigdiamondcircum { % (Entering lfigdiamondcircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def b alpha cos abs mul a alpha sin abs mul add /denom exch def a b mul alpha cos mul denom div a b mul alpha sin mul denom div end % (Leaving lfigdiamondcircum) lfigdebugprint } def % find point on circumference of ellipse: alpha a b lfigellipsecircum x y /lfigellipsecircum { % (Entering lfigellipsecircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def b alpha cos mul dup mul a alpha sin mul dup mul add sqrt /denom exch def a b mul alpha cos mul denom div a b mul alpha sin mul denom div end % (Leaving lfigellipsecircum) lfigdebugprint } def % find point of intersection of two lines each defined by two points % x1 y1 x2 y2 x3 y3 x4 y4 lfiglineintersect x y /lfiglineintersect { % (Entering lfiglineintersect) lfigdebugprint 13 dict begin /y4 exch def /x4 exch def /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def /x1 exch def x2 x1 sub /x21 exch def x4 x3 sub /x43 exch def y2 y1 sub /y21 exch def y4 y3 sub /y43 exch def y21 x43 mul y43 x21 mul sub /det exch def % calculate x y21 x43 mul x1 mul y43 x21 mul x3 mul sub y3 y1 sub x21 mul x43 mul add det div % calculate y x21 y43 mul y1 mul x43 y21 mul y3 mul sub x3 x1 sub y21 mul y43 mul add det neg div end % (Leaving lfiglineintersect) lfigdebugprint } def % find point on circumference of polygon % alpha radius num theta lfigpolycircum x y /lfigpolycircum { % (Entering lfigpolycircum) lfigdebugprint 13 dict begin /theta exch def /num exch def /radius exch def /alpha exch def % calculate delta, the angle from theta to alpha alpha theta sub lfigfixangle % calculate the angle which is the multiple of 360/num closest to delta 360 num div div truncate 360 num div mul theta add /anglea exch def % calculate the next multiple of 360/num after anglea anglea 360 num div add /angleb exch def % intersect the line through these two points with the alpha line anglea cos anglea sin angleb cos angleb sin 0 0 alpha cos 2 mul alpha sin 2 mul lfiglineintersect radius lfigpmul end % (Leaving lfigpolycircum) lfigdebugprint } def % find point of intersection of a point and a circle % x0 y0 r x1 y1 theta lfigcircleintersect xa ya xb yb 2 % or xb yb 1 % or 0 /lfigcircleintersect { % (Entering lfigcircleintersect) lfigdebugprint 15 dict begin /theta exch def /y1 exch def /x1 exch def /r exch def /y0 exch def /x0 exch def % if sin(theta) = 0 then line is horizontal and y must be y1 theta sin abs 0.00001 lt { /a 1 def /b -2 x0 mul def /c x0 dup mul y1 y0 sub dup mul add r dup mul sub def a b c lfigqroots dup 0 eq { pop 0 } { 1 eq { y1 1 } { y1 exch y1 2 } ifelse } ifelse } { /ct theta cos theta sin div def /a ct ct mul 1 add def /b ct x1 x0 sub mul y1 add y0 sub 2 mul def /c x1 x0 sub dup mul y1 y0 sub dup mul add r dup mul sub def a b c lfigqroots dup 0 eq { pop 0 } { 1 eq { y1 add /yb exch def yb y1 sub ct mul x1 add /xb exch def xb yb 1 } { y1 add /ya exch def ya y1 sub ct mul x1 add /xa exch def y1 add /yb exch def yb y1 sub ct mul x1 add /xb exch def xa ya xb yb 2 } ifelse } ifelse } ifelse end % (Leaving lfigcircleintersect) lfigdebugprint } def % add CIRCUM operator with this body: lfigcircumdef - /lfigcircumdef { % (Entering lfigcircumdef) lfigdebugprint /CIRCUM exch cvx currentdict end 3 1 roll % currentdict length currentdict maxlength lt % { def } % { exec moveto (too many labels) show stop } % ifelse def begin % (Leaving lfigcircumdef) lfigdebugprint } def end %%EndResource %%BeginResource: procset LoutGraphPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/graphf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Graph (Version 1.0) % % % % Version 1.0 by Jeffrey H. Kingston, December 1993. % % swapxandy added September 2001 by JHK. % % % % This file has been placed in the public domain by its author, % % Jeffrey H. Kingston % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% errordict begin /handleerror { { /Times-Roman findfont 8 pt scalefont setfont 0 setgray 4 pt 4 pt moveto $error /errorname get dup lgraphdict exch known { lgraphdict exch get } { 30 string cvs } ifelse show ( Command: ) show $error /command get 30 string cvs show } stopped {} if showpage stop } def end /lgraphdebugposy 432 def /lgraphdebugposx 72 def % - lgraphdebugnextline - /lgraphdebugnextline { lgraphdebugposy 72 lt { /lgraphdebugposx lgraphdebugposx 144 add store /lgraphdebugposy 432 store } { /lgraphdebugposy lgraphdebugposy 12 sub store } ifelse lgraphdebugposx lgraphdebugposy moveto } def % - lgraphdebugbeginindent - /lgraphdebugbeginindent { /lgraphdebugposx lgraphdebugposx 12 add store } def % - lgraphdebugendindent - /lgraphdebugendindent { /lgraphdebugposx lgraphdebugposx 12 sub store } def % lgraphdebugprint - % must be defined outside lgraphdict since used in arbitrary places % print plus count or stack entries, whichever is the smaller /lgraphdebugprint { exch gsave initgraphics lgraphdebugnextline /Times-Roman findfont 10 scalefont setfont 0 setgray show lgraphdebugbeginindent count 1 sub 2 copy lt { pop } { exch pop } ifelse 1 sub 0 exch 1 exch { lgraphdebugnextline index dup type (dicttype) eq { (begin dict) show lgraphdebugbeginindent { lgraphdebugnextline pop 100 string cvs show } forall lgraphdebugendindent lgraphdebugnextline (end dict) show } { dup type (arraytype) eq { (begin array) show lgraphdebugbeginindent { lgraphdebugnextline 100 string cvs show } forall lgraphdebugendindent lgraphdebugnextline (end array) show } { 100 string cvs show } ifelse } ifelse } for lgraphdebugendindent grestore } def /lgraphdict 200 dict def lgraphdict begin % error messages /dictfull (dictfull error) def /dictstackoverflow (dictstackoverflow error) def /execstackoverflow (execstackoverflow error: expression too complex?) def /limitcheck (limitcheck error: graph too complex or too large?) def /syntaxerror (syntaxerror error: syntax error in text of graph?) def /typecheck (typecheck error: syntax error in text of graph?) def /undefined (undefined error: unknown or misspelt symbol?) def /rangecheck (rangecheck error: undefined expression (e.g. divide by zero)?) def /VMError (VMError error: run out of memory?) def % random number between x and y inclusive: x y dorand num /dorand { 1 index sub 1 add rand exch mod add } def % log to given base: base num dolog num /dolog { ln exch ln div } def % maximum of two numbers: max /max { 2 copy gt { pop } { exch pop } ifelse } def % add two points: padd /padd { exch 3 1 roll add 3 1 roll add exch } def % subtract first point from second: psub /psub { 3 2 roll sub 3 1 roll exch sub exch } def % distance between two points: distance /distance { psub dup mul exch dup mul add sqrt } def % point at angle and distance: atangle /atangle { 2 copy cos mul 3 1 roll sin mul padd } def % angle from one point to another: angle /angle { psub 2 copy 0 eq exch 0 eq and {pop} {exch atan} ifelse } def % set up for line % - linesetup /linesetup { newpath xcurr ycurr trpoint xprev yprev trpoint 4 copy moveto lineto distance dashlength } def % set up for icon-avoiding line % - ilinesetup /ilinesetup { newpath xprev yprev trpoint xcurr ycurr trpoint 4 copy 4 copy angle symbolsize 1.5 mul exch 4 2 roll pop pop atangle 6 2 roll 4 2 roll 4 copy angle symbolsize 1.5 mul exch 4 2 roll pop pop atangle 4 copy moveto lineto distance dashlength } def % stroke a solid line: solid - /solid { pop pop [] 0 setdash linewidth setlinewidth stroke } def % stroke a dashed line: dashed - /dashed { 2 copy 2 mul le 1 index 0 le or { exch pop 1 pt max [ exch dup ] 0 setdash } { dup [ exch 4 2 roll 2 copy div 1 sub 2 div ceiling dup 4 1 roll 1 add mul sub exch div ] 0 setdash } ifelse linewidth setlinewidth stroke } def % stroke a cdashed line: cdashed - /cdashed { 2 copy le 1 index 0 le or { exch pop 1 pt max [ exch dup ] dup 0 get 2 div setdash } { dup [ 4 2 roll exch 2 copy exch div 2 div ceiling div 1 index sub ] exch 2 div setdash } ifelse linewidth setlinewidth stroke } def % stroke a dotted line: dotted - /dotted { 2 copy le 1 index 0 le or { exch pop 1 pt max [ exch 0 exch ] 0 setdash } { 1 index exch div ceiling div 0.99999 mul [ 0 3 2 roll ] 0 setdash } ifelse gsave 1 setlinecap linewidth setlinewidth stroke grestore newpath } def % stroke a noline line: noline - /noline { pop pop } def % scale array elements by factor: scalearray /scalearray { [ exch 3 2 roll { exch dup 3 1 roll mul exch } forall pop ] } def % sum array elements: sumarray /sumarray { 0 exch { add } forall } def % begin a more complex line: linebegin - /linebegin { % (Entering linebegin) 2 debugprint 20 dict begin /dashlen exch 1 pt max def /len exch def /gap dashlen def /halfgap dashlen 2 div def /dash dashlen def /halfdash dashlen 2 div def /dot 0 def % (Leaving linebegin) 0 debugprint } def % end a more complex line: lineend - /lineend { % (Entering lineend) 3 debugprint /stoppos exch def /startpos exch def /cycle exch def /linecap exch def /stopposlen stoppos sumarray def /startposlen startpos sumarray def /cyclelen cycle sumarray def /effectivelen len startposlen add stopposlen sub def effectivelen 0 gt cyclelen 0 gt and { /repeats effectivelen cyclelen div ceiling def /factor len repeats cyclelen mul startposlen sub stopposlen add div def cycle factor scalearray startposlen factor mul setdash linecap setlinecap stroke } if end % (Leaving lineend) 0 debugprint } def % stroke a dotdashed line: dotdashed - /dotdashed { linebegin 1 [dash gap dot gap] [] [dash] lineend } def % stroke a dotcdashed line: dotcdashed - /dotcdashed { linebegin 1 [dash gap dot gap] [halfdash] [halfdash] lineend } def % stroke a dotdotdashed line: dotdotdashed - /dotdotdashed { linebegin 1 [dash gap dot gap dot gap] [] [dash] lineend } def % stroke a dotdotcdashed line: dotdotcdashed - /dotdotcdashed { linebegin 1 [dash gap dot gap dot gap] [halfdash] [halfdash] lineend } def % stroke a dotdotdotdashed line: dotdotdotdashed - /dotdotdotdashed { linebegin 1 [dash gap dot gap dot gap dot gap] [] [dash] lineend } def % stroke a dotdotdotcdashed line: dotdotdotcdashed - /dotdotdotcdashed { linebegin 1 [dash gap dot gap dot gap dot gap] [halfdash] [halfdash] lineend } def % stroke a y histogram: - yhisto - /yhisto { xprev yleft trpoint yextra sub moveto xprev yprev trpoint lineto xcurr yprev trpoint lineto xcurr yleft trpoint yextra sub lineto linewidth setlinewidth stroke } def % stroke an x histogram: - xhisto - /xhisto { xleft yprev trpoint exch xextra sub exch moveto xcurr yprev trpoint lineto xcurr ycurr trpoint lineto xleft ycurr trpoint exch xextra sub exch lineto linewidth setlinewidth stroke } def % stroke a surface y histogram: - surfaceyhisto - /surfaceyhisto { firstpair { xprev yleft trpoint yextra sub moveto xprev yprev trpoint lineto } { xprev yprev trpoint moveto } ifelse xcurr yprev trpoint lineto lastpair { xcurr yleft trpoint yextra sub lineto } { xcurr ycurr trpoint lineto } ifelse linewidth setlinewidth stroke } def % stroke a surface x histogram: - surfacexhisto - /surfacexhisto { firstpair { xleft yprev trpoint exch xextra sub exch moveto } { xprev yprev trpoint moveto } ifelse xcurr yprev trpoint lineto xcurr ycurr trpoint lineto lastpair { xleft ycurr trpoint exch xextra sub exch lineto } if linewidth setlinewidth stroke } def % % pre-texture versions % % stroke a filled y histogram: - filledyhisto - % /filledyhisto % { % linewidth setlinewidth % xprev yleft trpoint exch currentlinewidth 2 div add exch yextra sub moveto % xprev yprev trpoint exch currentlinewidth 2 div add exch lineto % xcurr yprev trpoint exch currentlinewidth 2 div sub exch lineto % xcurr yleft trpoint exch currentlinewidth 2 div sub exch yextra sub lineto % closepath fill % } def % % stroke a filled x histogram: - filledxhisto - % /filledxhisto % { % linewidth setlinewidth % xleft yprev trpoint currentlinewidth 2 div add exch xextra sub exch moveto % xcurr yprev trpoint currentlinewidth 2 div add lineto % xcurr ycurr trpoint currentlinewidth 2 div sub lineto % xleft ycurr trpoint currentlinewidth 2 div sub exch xextra sub exch lineto % closepath fill % } def % stroke a filled y histogram: - filledyhisto - /filledyhisto { linewidth setlinewidth xprev yleft trpoint exch currentlinewidth 1.3 mul add exch yextra sub moveto xprev yprev trpoint exch currentlinewidth 1.3 mul add exch lineto xcurr yprev trpoint exch currentlinewidth 1.3 mul sub exch lineto xcurr yleft trpoint exch currentlinewidth 1.3 mul sub exch yextra sub lineto gsave texture fill grestore stroke } def % stroke a filled x histogram: - filledxhisto - /filledxhisto { linewidth setlinewidth xleft yprev trpoint currentlinewidth 1.3 mul add exch xextra sub exch moveto xcurr yprev trpoint currentlinewidth 1.3 mul add lineto xcurr ycurr trpoint currentlinewidth 1.3 mul sub lineto xleft ycurr trpoint currentlinewidth 1.3 mul sub exch xextra sub exch lineto gsave texture fill grestore stroke } def % docross: show a cross with a given symbolsize and symbollinewidth % docross - /docross { setlinewidth /ss exch def newpath moveto ss neg ss neg rmoveto ss 2 mul ss 2 mul rlineto 0 ss -2 mul rmoveto ss -2 mul ss 2 mul rlineto [] 0 setdash 0 setlinecap stroke } def % cross: show a cross % - cross - /cross { xcurr ycurr trpoint symbolsize symbollinewidth docross } def % doplus: show a plus with a given symbolsize and symbollinewidth % doplus - /doplus { setlinewidth /ss exch def newpath moveto ss neg 0 rmoveto ss 2 mul 0 rlineto ss neg ss neg rmoveto 0 ss 2 mul rlineto [] 0 setdash 0 setlinecap stroke } def % plus: show a plus % - plus - /plus { xcurr ycurr trpoint symbolsize symbollinewidth doplus } def % dosquare: show an open square with a given symbolsize and symbollinewidth % NB symbolsize is reduced by half the line width to get size exactly right % dosquare - /dosquare { dup setlinewidth 0.5 mul sub 0 max /ss exch def newpath moveto ss neg ss neg rmoveto ss 2 mul 0 rlineto 0 ss 2 mul rlineto ss -2 mul 0 rlineto closepath [] 0 setdash stroke } def % square: show an open square % - square - /square { xcurr ycurr trpoint symbolsize symbollinewidth dosquare } def % dofilledsquare: show filled square with given symbolsize and symbollinewidth % NB symbollinewidth is not used % dofilledsquare - /dofilledsquare { pop /ss exch def newpath moveto ss neg ss neg rmoveto ss 2 mul 0 rlineto 0 ss 2 mul rlineto ss -2 mul 0 rlineto closepath fill } def % filledsquare: show a filled square % - filledsquare - /filledsquare { xcurr ycurr trpoint symbolsize symbollinewidth dofilledsquare } def % dodiamond: show an open diamond with a given symbolsize and symbollinewidth % NB symbolsize is reduced by half the line width to get size exactly right % dodiamond - /dodiamond { dup setlinewidth 0.5 mul sub 0 max /ss exch def newpath moveto ss neg 0 rmoveto ss ss neg rlineto ss ss rlineto ss neg ss rlineto closepath [] 0 setdash stroke } def % diamond: show an open diamond % - diamond - /diamond { xcurr ycurr trpoint symbolsize symbollinewidth dodiamond } def % dofilleddiamond: show filled diamond with given symbolsize and symbollinewidth % NB symbollinewidth is not used % dofilleddiamond - /dofilleddiamond { pop /ss exch def newpath moveto ss neg 0 rmoveto ss ss neg rlineto ss ss rlineto ss neg ss rlineto closepath fill } def % filleddiamond: show a filled diamond % - filleddiamond - /filleddiamond { xcurr ycurr trpoint symbolsize symbollinewidth dofilleddiamond } def % docircle: show an open circle with a given symbolsize and symbollinewidth % NB symbolsize is reduced by half the line width to get size exactly right % docircle - /docircle { dup setlinewidth 0.5 mul sub 0 max /ss exch def newpath ss 0 360 arc [] 0 setdash stroke } def % circle: show an open circle % - circle - /circle { xcurr ycurr trpoint symbolsize symbollinewidth docircle } def % dofilledcircle: show filled circle with given symbolsize and symbollinewidth % NB symbollinewidth is not used % dofilledcircle - /dofilledcircle { pop /ss exch def newpath ss 0 360 arc fill } def % filledcircle: show a filled circle % - filledcircle - /filledcircle { xcurr ycurr trpoint symbolsize symbollinewidth dofilledcircle } def % dotriangle: show an open triangle with a given symbolsize and symbollinewidth % NB symbolsize is reduced by half the line width to get size exactly right % dotriangle - /dotriangle { dup setlinewidth 0.5 mul sub 0 max /ss exch def newpath moveto 0 ss 1.5 mul rmoveto ss neg ss -2.5 mul rlineto ss 2 mul 0 rlineto closepath [] 0 setdash stroke } def % triangle: show an open triangle % - triangle - /triangle { xcurr ycurr trpoint symbolsize symbollinewidth dotriangle } def % dofilledtriangle: show filled triangle with symbolsize and symbollinewidth % NB symbollinewidth is not used % dofilledtriangle - /dofilledtriangle { pop /ss exch def newpath moveto 0 ss 1.5 mul rmoveto ss neg ss -2.5 mul rlineto ss 2 mul 0 rlineto closepath fill } def % filledtriangle: show a filled triangle % - filledtriangle - /filledtriangle { symbolsize symbollinewidth dofilledtriangle } def %plog: like log only with a base, and protected from failing if <= 0 % base x plog res /plog { dup 0 le { pop pop 0 } { ln exch ln div } ifelse } def % xtr: transform one x value logarithmically if xlog > 1 % xtr /xtr { xlog 1 gt { xlog exch plog } if } def % ytr: transform one y value logarithmically if ylog > 1 % ytr /ytr { ylog 1 gt { ylog exch plog } if } def % trpoint: transform (x, y) in graph space into (x', y') in print space % x y trpoint x' y' /trpoint { exch xtr xdecr { trxmax exch sub } { trxmin sub } ifelse trxmax trxmin sub div xwidth mul xextra add exch ytr ydecr { trymax exch sub } { trymin sub } ifelse trymax trymin sub div ywidth mul yextra add } def % yonly: interpolate x values 1, 2, ... into data % [ data ] yonly [ newdata ] /yonly { dup /tmp exch def length [ exch 1 exch 1 exch { dup tmp exch 1 sub get } for ] } def % xonly: interpolate y values 1, 2, ... into data % [ data ] yonly [ newdata ] /xonly { dup /tmp exch def length [ exch 1 exch 1 exch { dup tmp exch 1 sub get exch } for ] } def % xandy: no interpolation of x or y values % [ data ] xandy [ data ] /xandy {} def % swapxandy: swap x and y values % [ data ] swapxandy [ data ] /swapxandy { dup /tmp exch def length [ exch 2 exch 2 exch { dup tmp exch 1 sub get exch 2 sub tmp exch get } for ] } def % expstringwidth: calculate width of string containing optional exponent % expstringwidth /expstringwidth { (^) search { exch pop stringwidth pop exch stringwidth pop 0.7 mul add } { stringwidth pop } ifelse } def % expstringshow: show string containing optional exponent % expstringshow - /expstringshow { (^) search { exch pop show 0 0.5 ft rmoveto gsave currentfont 0.7 scalefont setfont show grestore } { show } ifelse } def % concatenate two strings: strconcat /strconcat { 2 copy length exch length add string dup 0 4 index putinterval dup 3 index length 3 index putinterval 3 1 roll pop pop } def % lgen: generate one label automatically % num lgen num string /lgen { dup 20 string cvs } def % loglgen: generate one logarithmic label (with exponent) % loglgen /loglgen { 20 string cvs exch 20 string cvs (^) strconcat exch strconcat } def % printxtick: print one x tick % xpos printxtick - /printxtick { newpath yleft trpoint moveto 0 yextra neg rmoveto 0 xticklength neg rlineto [] 0 setdash stroke } def % printxgrid: print one x grid line % xpos printxgrid - /printxgrid { dup newpath yleft trpoint moveto 0 yextra neg rmoveto yright trpoint lineto 0 yextra rlineto [] 0 setdash stroke } def % printxlabel: print one x label % (xlabel) xpos printxlabel - /printxlabel { yleft trpoint moveto 0 yextra neg rmoveto 0 xticklength neg rmoveto 0 0.9 ft neg rmoveto xlog 1 gt { 0 0.3 ft neg rmoveto } if dup expstringwidth -2 div 0 rmoveto expstringshow } def % printytick: print one y tick % ypos printytick - /printytick { newpath xleft exch trpoint moveto xextra neg 0 rmoveto yticklength neg 0 rlineto [] 0 setdash stroke } def % printygrid: print one y grid line % ypos printygrid - /printygrid { dup newpath xleft exch trpoint moveto xextra neg 0 rmoveto xright exch trpoint lineto xextra 0 rlineto [] 0 setdash stroke } def % printylabel: print one y label % (ylabel) ypos printylabel - /printylabel { xleft exch trpoint moveto xextra neg 0 rmoveto yticklength neg 0 rmoveto -0.3 ft -0.3 ft rmoveto dup expstringwidth neg 0 rmoveto expstringshow } def % printrtick: print one r tick % ypos printrtick - /printrtick { newpath xright exch trpoint moveto xextra 0 rmoveto rticklength 0 rlineto [] 0 setdash stroke } def % printrlabel: print one r label % (rlabel) ypos printrlabel - /printrlabel { xright exch trpoint moveto xextra 0 rmoveto rticklength 0 rmoveto 0.3 ft -0.3 ft rmoveto expstringshow } def % printticks: print ticks and labels % /tickproc /labelproc [ tickandlabeldata ] min printticks - /printticks { /prev exch def { dup type dup dup /integertype eq exch /realtype eq or { pop dup /prev exch def 2 index cvx exec } { /stringtype eq { prev 2 index cvx exec } { pop } ifelse } ifelse } forall pop pop } def % printxaxistick: print one x axis tick % xpos printxaxistick - /printxaxistick { newpath yaxis trpoint moveto 0 xticklength -2 div rmoveto 0 xticklength rlineto [] 0 setdash stroke } def % printxaxislabel: print one x axis label % (xlabel) xpos printxaxislabel - /printxaxislabel { yaxis trpoint moveto 0 xticklength -2 div rmoveto 0 0.9 ft neg rmoveto xlog 1 gt { 0 0.3 ft neg rmoveto } if dup expstringwidth -2 div 0 rmoveto expstringshow } def % printyaxistick: print one y axis tick % ypos printyaxistick - /printyaxistick { newpath xaxis exch trpoint moveto yticklength -2 div 0 rmoveto yticklength 0 rlineto [] 0 setdash stroke } def % printyaxislabel: print one y axis label % (ylabel) ypos printyaxislabel - /printyaxislabel { xaxis exch trpoint moveto yticklength -2 div 0 rmoveto -0.3 ft -0.3 ft rmoveto dup expstringwidth neg 0 rmoveto expstringshow } def % minmax - % perform minv := min(minv, val); maxv := max(maxv, val) % allowing for the possibility of minv, maxv, val being false (undefined) /minmax { dup false eq { pop } { minv false eq { dup /minv exch def /maxv exch def } { dup minv lt { /minv exch def } { dup maxv gt { /maxv exch def } { pop } ifelse } ifelse } ifelse } ifelse } def % ticksundef % returns true iff the ticks array is undefined (one false entry) /ticksundef { dup length 1 eq { dup 0 get false eq } { false } ifelse } def % integral % true if the number has an integral value /integral { dup round eq } def % ticksep ticks xory alldata minval maxval axis base ticksandlimits ticks min max base % ticksandlimits: sort out value of x or y ticks and limits and log base /ticksandlimits { /base exch def /minv false def /maxv false def % min and max of user-supplied minval, maxval, and axis minmax minmax minmax % min and max of data points { 0 get dup dup length 1 sub 3 index exch 2 exch { get minmax dup } for pop pop } forall pop dup % min and max of tick values { dup type /stringtype eq { pop } { minmax } ifelse } forall % fix minv and maxv if undefined (false) or equal minv false eq { /minv -1 def /maxv 1 def } { minv maxv eq { minv 0 lt { /minv 2 minv mul def /maxv 0 def } { minv 0 eq { /minv -1 def /maxv 1 def } { /minv 0 def /maxv 2 maxv mul def } ifelse } ifelse } if } ifelse % invent ticks if undefined ticksundef { pop /ticksep exch def % if base is reasonable and minv is positive, logarithmic ticks base 1 gt minv 0 gt and { % get integral log of minv and maxv /logminv base minv plog floor cvi def /logmaxv base maxv plog ceiling cvi def % if minv close to base, make it 1; reset minv and maxv logminv 1 eq logmaxv 4 ge and { /logminv 0 def } if /minv base logminv exp def /maxv base logmaxv exp def % ticks := [ base**logminv, ... , base**logmaxv ] [ logminv 1 logmaxv { dup base exch exp exch base exch loglgen } for ] } { % non-logarithmic ticks { % fix tick separation if undefined (0) or too small /base 0 def /delta maxv minv sub def ticksep delta 30 div le { /ticksep 10 delta log 1 sub ceiling exp def ticksep delta 2 div ge { /ticksep ticksep 2 div def } { ticksep delta 5 div lt { /ticksep 2 ticksep mul def } if } ifelse } if % adjust minv and maxv to be multiples of ticksep /minv minv ticksep div floor ticksep mul def /maxv maxv ticksep div ceiling ticksep mul def /delta maxv minv sub def % if minv or maxv near zero, move to zero and redo minv ticksep eq { /minv 0 def } { maxv ticksep neg eq { /maxv 0 def } { exit } ifelse } ifelse } loop % if minv, maxv, and ticksep are all integral, set "makeint" to true /makeint minv integral maxv integral ticksep integral and and def % ticks := [ minv, minv+ticksep, ... , maxv ] [ 0 1 delta ticksep div round { ticksep mul minv add makeint { cvi } if lgen } for ] } ifelse } { exch pop } ifelse minv maxv base } def % xset: set up all data for x axis, including limits and ticks % xticksep xticks 0 alldata xmin xmax xlog xextra xdecr xaxis xticklength xset - /xset { /xticklength exch def /xaxis exch def /xdecr exch def /xextra exch def xaxis exch ticksandlimits /xlog exch def /xmax exch def /xmin exch def /xticks exch def /xleft xdecr { xmax } { xmin } ifelse def /xright xdecr { xmin } { xmax } ifelse def /xwidth xsize xextra 2 mul sub def /trxmin xmin xtr def /trxmax xmax xtr def } def % yset: set up all data for y axis, including limits and yticks % yticksep yticks 0 alldata ymin ymax ylog yextra ydecr yaxis yticklength yset - /yset { /yticklength exch def /yaxis exch def /ydecr exch def /yextra exch def yaxis exch ticksandlimits /ylog exch def /ymax exch def /ymin exch def /yticks exch def /yleft ydecr { ymax } { ymin } ifelse def /yright ydecr { ymin } { ymax } ifelse def /ywidth ysize yextra 2 mul sub def /trymin ymin ytr def /trymax ymax ytr def } def % rset: set up all data for y axis (again), but including limits and rticks % rticksep rticks 0 alldata ymin ymax ylog yextra ydecr yaxis rticklength rset - /rset { /rticklength exch def /yaxis exch def /ydecr exch def /yextra exch def yaxis exch ticksandlimits /ylog exch def /ymax exch def /ymin exch def /rticks exch def /yleft ydecr { ymax } { ymin } ifelse def /yright ydecr { ymin } { ymax } ifelse def /ywidth ysize yextra 2 mul sub def /trymin ymin ytr def /trymax ymax ytr def } def % norset: set up data for no rticks % - norset - /norset { /rticklength 0 def /rticks [] def } def % framestyle: print a frame around the graph /framestyle { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke /printxtick /printxlabel xticks xleft printticks /printytick /printylabel yticks ymin printticks /printrtick /printrlabel rticks ymin printticks } def % gridstyle: print a frame around the graph, plus a grid /gridstyle { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke /printxgrid /printxlabel xticks xleft printticks /printygrid /printylabel yticks ymin printticks /printrtick /printrlabel rticks ymin printticks } def % nonestyle: print nothing around the graph /nonestyle { } def % axesstyle: print axes for the graph (unless axis values missing) /axesstyle { xaxis false eq yaxis false eq or { framestyle } { xaxis yaxis trpoint dup 0 exch moveto xsize exch lineto dup 0 moveto ysize lineto stroke /printxaxistick /printxaxislabel xticks xleft printticks /printyaxistick /printyaxislabel yticks ymin printticks } ifelse } def % rundata: run all data sets /rundata { alldata { gsave dup dup dup dup dup 5 get /texture exch def 4 get /dopaint exch def 3 get /initrun exch def 2 get /pairs exch def 1 get /points exch def 0 get /data exch def dopaint { data length 4 ge { gsave initrun newpath data 0 get ymin trpoint yextra sub moveto 0 2 data length 2 sub { dup 1 add data exch get /ycurr exch def data exch get /xcurr exch def xcurr ycurr trpoint lineto } for data dup length 2 sub get ymin trpoint yextra sub lineto closepath texture fill grestore } if } if initrun data length 2 ge { /xcurr data 0 get def /ycurr data 1 get def points data length 4 ge { 2 2 data length 2 sub { /xprev xcurr def /yprev ycurr def dup dup 2 eq /firstpair exch def data length 2 sub eq /lastpair exch def dup 1 add data exch get /ycurr exch def data exch get /xcurr exch def pairs points } for } if } if grestore } forall } def end %%EndResource %%BeginResource: procset LoutBasicSetup % @PrependGraphic file /home/jeff/lout.lib/include/bsf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @BasicSetup % % % % This file has been placed in the public domain by its author, % % Jeffrey H. Kingston % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % width height linethickness louteuro - % draw a Euro symbol of this width and height with this line thickness /louteuro { 20 dict begin /eurothick exch def /euroheight exch def /eurowidth exch def /eurostrokewidth euroheight 0.8 mul def /eurostep eurothick 60 cos mul 60 sin div def /eurotheta 40 def % llx lly width thickness louteurobox - % draw angled box starting at (llx, lly) with given width and thickness /louteurobox { /euroboxthick exch def /euroboxwidth exch def newpath moveto euroboxwidth 0 rlineto eurostep euroboxthick rlineto euroboxwidth neg 0 rlineto closepath fill } def % lower cross stroke 0 euroheight 2 div eurothick 1.5 mul sub eurostrokewidth eurothick louteurobox % upper cross stroke 0 euroheight 2 div eurothick 0.5 mul add eurostrokewidth eurostep 2 mul add eurothick louteurobox % circular part /eurohctr eurowidth euroheight 2 div eurotheta cos mul sub def /eurovctr euroheight 2 div def newpath eurohctr eurovctr eurovctr eurotheta 350 eurotheta sub arc eurohctr eurovctr eurovctr eurothick sub 365 eurotheta sub eurotheta arcn closepath fill end } def % path for @FullWidthRule symbol /LoutRule { 0 0 moveto xsize 0 lineto } def % path for @Box symbol /LoutBox { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath } def % path for @CurveBox symbol /LoutCurveBox { xmark 0 moveto xsize xmark sub xmark xmark 270 360 arc xsize xmark sub ysize xmark sub xmark 0 90 arc xmark ysize xmark sub xmark 90 180 arc xmark xmark xmark 180 270 arc closepath } def % path for @ShadowBox symbol /LoutShadowBox { xmark 2 mul 0 moveto xsize 0 lineto xsize ysize xmark 2 mul sub lineto xsize xmark sub ysize xmark 2 mul sub lineto xsize xmark sub xmark lineto xmark 2 mul xmark lineto closepath } def % set up dictionary containing margin note data: parity LoutMargSet - /LoutMargSet { /LoutMargDict 12 dict def LoutMargDict begin /parity exch def /matr matrix currentmatrix def /rightx xsize def /lefty ysize def % highest allowable point for top of next left note /righty ysize def % highest allowable point for top of next right note /max { 2 copy gt { pop } { exch pop } ifelse } def /min { 2 copy lt { pop } { exch pop } ifelse } def end } def %translate coordinate system for marginal notes: type LoutMargShift - % where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner /LoutMargShift { LoutMargDict begin % y coordinate of top of note, in margin coords, before vertical adjust 0 ysize transform matr itransform exch pop % decide whether left or right margin based on type and parity exch [ 0 1 parity 1 parity sub ] exch get 0 eq { % left margin: adjust top of note downwards if overlaps previous note lefty min % bottom of note is new lefty position and also translate position ysize sub dup /lefty exch def % want right edge of note at coordinate zero xsize neg exch } { % right margin: adjust top of note downwards if overlaps previous note righty min % bottom of note is new righty position and also translate position ysize sub dup /righty exch def % want left edge of note at coordinate rightx rightx exch } ifelse % stack now contains coord of bottom left corner in margin coordinates matr setmatrix translate end } def % create LoutPageDict with left, right, foot, top for @Place symbol users /LoutPageSet { /LoutPageDict 5 dict def LoutPageDict begin /matr matrix currentmatrix def /left 0 def /right xsize def /foot 0 def /top ysize def end } def %%EndResource %%EndProlog %%BeginSetup %%BeginResource: encoding vec2 /vec2 [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /quotesinglbase /quotedblbase /ellipsis /OE /oe /quotedblleft /quotedblright /fi /fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse %%EndSetup %%Page: 1 1 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Helvetica-Oblique /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Helvetica-Oblique /Helvetica-Obliquefnt3 vec2 /Helvetica-Oblique LoutRecode /fnt3 { /Helvetica-Obliquefnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -1417 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10419(1)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 600 fnt2 691 10903(A)m 1250(Pr)s 6(actical)k 3667(Introduction)s 6922(to)s 7566(the)s 3956 9463(Lout)m 616 8023(Document)m 3500(F)s 18(or)k -15(matting)k 6490(System)s 400 fnt2 2882 6161(Jeffre)m 8(y)k 4180(H.)s 4656(Kingston)s 400 fnt3 1395 5059(Basser)m 2794(Dept.)s 3834(of)s 4333(Computer)s 6242(Science)s 2251 4579(The)m 3058(Univ)s 10(ersity)k 4951(of)s 5450(Sydne)s 8(y)k grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 2 2 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10407(2)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 2988 11377(A)m 3363(simple)s 4565(input)s 5575(\207le)s [ /Dest /LOUT26_260_all_1 /DEST pdfmark 360 fnt2 800 9646(@SysInclude { doc })m 800 9166(@Doc @T)m 43(e)k 10(xt @Begin)k 800 8686(Hello)m 14(, w)k 3(or)k -5(ld)k 800 8206(@End @T)m 43(e)k 10(xt)k 400 fnt4 0 6379(Ho)m 4(w)k 889(to)s 1313(f)s 10(ormat)k 2579(it)s 360 fnt2 800 5633(lout \207lename > out.ps)m 800 5153(ghostvie)m 7(w out.ps)k 800 4673(mpr out.ps)m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 3 3 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10414(3)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore [ /Dest /LOUT26_260_all_2 /DEST pdfmark 8640 10080 1440 8457 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 1440 8367(Hello,)m 2505(w)s 4(orld)k grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 4 4 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10407(4)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 2339 11377(Headings)m 4026(and)s 4762(paragraphs)s [ /Dest /LOUT26_260_all_3 /DEST pdfmark 360 fnt2 800 9646(@SysInclude { doc })m 800 9166(@Doc @T)m 43(e)k 10(xt @Begin)k 800 8686(@Heading { Introduction })m 800 8206(@PP)m 800 7726(The design of the Lout f)m 10(or)k -9(matting)k 800 7246(system w)m 5(as under)k -14(tak)k 7(en with the)k 800 6766(needs of the @I { ordinar)m -10(y user })k 800 6286(v)m 9(er)k -10(y m)k 3(uch in mind.)k 800 5806(@End @T)m 43(e)k 10(xt)k grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 5 5 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1527(lout)m 10412(5)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore [ /Dest /LOUT26_260_all_4 /DEST pdfmark 8640 10080 1440 8456 400 480 100 0 666 LoutGr2 LoutBox stroke grestore 400 fnt4 1440 8364(Intr)m 7(oduction)k 400 fnt1 2240 7742(The)m 2953(design)s 4090(of)s 4543(the)s 5123(Lout)s 1440 7262(formatting)m 3215(system)s 4423(w)s 4(as)k 5123(undertak)s 4(en)k 1440 6782(with)m 2245(the)s 2825(needs)s 3818(of)s 4271(the)s 400 fnt5 4851 6784(or)m 14(dinary)k 6328(user)s 400 fnt1 1440 6302(v)m 6(ery)k 2234(much)s 3217(in)s 3622(mind.)s grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 6 6 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10408(6)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 3817 11376(Displays)m [ /Dest /LOUT26_260_all_5 /DEST pdfmark 360 fnt2 800 9652(Y)m 50(ou cer)k -14(tainly don't w)k 5(ant to retur)k -9(n to)k 800 9172(his of\207ce and repor)m -14(t:)k 800 8692(@IndentedDispla)m 10(y @I {)k 800 8212(`I can't \207nd an ef\207cient algor)m -5(ithm, I)k 800 7732(guess I'm just too dumb)m 14(.)k 36(')k 800 7252(})m 800 6772(T)m 43(o a)k 7(v)k 9(oid ser)k -5(ious damage to y)k 7(our)k 800 6292(position in the compan)m 5(y)k 36(, it w)k 3(ould)k 800 5812(be better if ...)m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 7 7 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10411(7)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore [ /Dest /LOUT26_260_all_6 /DEST pdfmark 8640 10080 1440 8457 400 480 100 0 668 LoutGr2 LoutBox stroke grestore 1440 8367(Y)m 44(ou)k 2173(certainly)s 3657(don')s 7(t)k 4591(w)s 4(ant)k 5460(to)s 5856(return)s 6901(to)s 1440 7887(his)m 1990(of\207ce)s 2991(and)s 3665(report:)s 400 fnt5 2240 7048(`I)m 2626(can')s 12(t)k 3542(\207nd)s 4252(an)s 4742(ef\207cient)s 2240 6568(algorithm,)m 3970(I)s 4223(guess)s 5201(I'm)s 5848(just)s 6532(too)s 2240 6088(dumb)m 16(.)k 56(')k 400 fnt1 1440 5330(T)m 32(o)k 1940(a)s 8(v)k 8(oid)k 2909(serious)s 4124(damage)s 5458(to)s 5857(your)s 1440 4850(position)m 2822(in)s 3227(the)s 3807(compan)s 6(y)k 26(,)k 5418(it)s 5740(w)s 4(ould)k 6831(be)s 1440 4370(better)m 2449(if)s 2813(\202)s grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 8 8 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10411(8)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 2299 11376(P)m 4(aragraph)k 4229(br)s 7(eaking)k 5847(styles)s [ /Dest /LOUT26_260_all_7 /DEST pdfmark 360 fnt2 800 9652(Y)m 50(ou cer)k -14(tainly don't w)k 5(ant to retur)k -9(n to)k 800 9172(his of\207ce and repor)m -14(t:)k 800 8692(@ID { r)m 3(agged noh)k 10(yphen } @Break @I {)k 800 8212(`I can't \207nd an ef\207cient algor)m -5(ithm, I)k 800 7732(guess I'm just too dumb)m 14(.)k 36(')k 800 7252(})m 800 6772(T)m 43(o a)k 7(v)k 9(oid ser)k -5(ious damage to y)k 7(our)k 800 6292(position in the compan)m 5(y)k 36(, it w)k 3(ould)k 800 5812(be better if ...)m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 9 9 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10409(9)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore [ /Dest /LOUT26_260_all_8 /DEST pdfmark 8640 10080 1440 8457 400 480 100 0 666 LoutGr2 LoutBox stroke grestore 1440 8367(Y)m 44(ou)k 2173(certainly)s 3657(don')s 7(t)k 4591(w)s 4(ant)k 5460(to)s 5856(return)s 6901(to)s 1440 7887(his)m 1990(of\207ce)s 2991(and)s 3665(report:)s 400 fnt5 2240 7048(`I)m 2626(can')s 12(t)k 3542(\207nd)s 4252(an)s 4742(ef\207cient)s 2240 6568(algorithm,)m 3970(I)s 4223(guess)s 5201(I'm)s 5848(just)s 6532(too)s 2240 6088(dumb)m 16(.)k 56(')k 400 fnt1 1440 5330(T)m 32(o)k 1940(a)s 8(v)k 8(oid)k 2909(serious)s 4124(damage)s 5458(to)s 5857(your)s 1440 4850(position)m 2822(in)s 3227(the)s 3807(compan)s 6(y)k 26(,)k 5418(it)s 5740(w)s 4(ould)k 6831(be)s 1440 4370(better)m 2449(if)s 2813(\202)s grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 10 10 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10326(10)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 4128 11376(Lists)m [ /Dest /LOUT26_260_all_9 /DEST pdfmark 360 fnt2 800 9722(@Heading { Oper)m 3(ating Instr)k -5(uctions })k 800 9242(@NumberedList)m 800 8762(@ListItem { Press small g)m 3(reen le)k 10(v)k 9(er)k 18(.)k 21( })k 800 8282(@ListItem { )m 14(W)k 14(ait appro)k 10(ximately 10 seconds)k 800 7802(until red light \210ashes)m 5(.)k 21( })k 800 7322(@ListItem { If smok)m 7(e emerges from rear of unit,)k 800 6842(call Ser)m -10(vice Depar)k -14(tment.)k 21( })k 800 6362(@EndList)m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 11 11 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10339(11)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore [ /Dest /LOUT26_260_all_10 /DEST pdfmark 8640 10080 1440 8456 400 480 100 0 668 LoutGr2 LoutBox stroke grestore 400 fnt4 1440 8364(Operating)m 3287(Instructions)s 400 fnt1 1440 7529(1.)m 2240(Press)s 3166(small)s 4123(green)s 5104(le)s 10(v)k 6(er)k 22(.)k [ /Dest /LOUT22_1748_all_1 /DEST pdfmark 1440 6689(2.)m 2240(W)s 32(ait)k 3077(approximately)s 5468(10)s 5952(seconds)s 2240 6209(until)m 3065(red)s 3672(light)s 4505(\210ashes.)s [ /Dest /LOUT22_1748_all_2 /DEST pdfmark 1440 5369(3.)m 2240(If)s 2626(smok)s 4(e)k 3757(emer)s 7(ges)k 5164(from)s 6040(rear)s 6760(of)s 2240 4889(unit,)m 3040(call)s 3708(Service)s 4997(Department.)s [ /Dest /LOUT22_1748_all_3 /DEST pdfmark grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 12 12 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(12)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 3062 11377(T)m 36(echnical)k 4780(r)s 7(eports)k [ /Dest /LOUT26_260_all_11 /DEST pdfmark 360 fnt2 800 9646(@SysInclude { repor)m -14(t })k 800 9166(@Repor)m -14(t)k 800 8686( @Title { ...)m 21( })k 800 8206( @A)m 10(uthor { ...)k 21( })k 800 7726( @Institution { ...)m 21( })k 800 7246( @DateLine { ...)m 21( })k 800 6766(//)m 800 6286(@Abstr)m 3(act { ...)k 21( })k 800 5806(@Section { ...)m 21( })k 800 5326(@Section { ...)m 21( })k 800 4846(@Section { ...)m 21( })k 800 4366(@Appendix { ...)m 21( })k 800 3886(@Appendix { ...)m 21( })k grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 13 13 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10334(13)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3840 11376(Sections)m [ /Dest /LOUT26_260_all_12 /DEST pdfmark 360 fnt2 800 9720(@Section)m 800 9240( @T)m 43(ag { dfs })k 800 8760( @Title { Depth-\207rst search })m 800 8280(@Begin)m 800 7800(@PP)m 800 7320(W)m 10(e tur)k -9(n no)k 5(w to our \207rst algor)k -5(ithm)k 800 6840(on gener)m 3(al g)k 3(r)k 3(aphs ...)k 800 6360(@End @Section)m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 14 14 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(14)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_13 /DEST pdfmark 8640 10080 1440 8456 400 480 100 0 668 LoutGr2 LoutBox stroke grestore 400 fnt4 1440 8364(10.6.)m 2424(Depth-\207rst)s 4386(sear)s 7(ch)k 400 fnt1 2240 7742(W)m 32(e)k 2854(turn)s 3592(no)s 10(w)k 4359(to)s 4758(our)s 5391(\207rst)s 1440 7262(algorithm)m 3093(on)s 3587(general)s 4854(graphs)s 6003(\202)s grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 15 15 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1527(lout)m 10332(15)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3142 11375(Cr)m 7(oss)k 4199(r)s 7(efer)k 7(ences)k [ /Dest /LOUT26_260_all_14 /DEST pdfmark 360 fnt2 800 9722(F)m 10(or fur)k -14(ther inf)k 10(or)k -9(mation, consult)k 800 9242(Section @NumberOf dfs on page)m 800 8762(@P)m 14(ageOf { dfs }.)k grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 16 16 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10328(16)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_15 /DEST pdfmark 8640 10080 1440 8457 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 1440 8367(F)m 6(or)k 2089(further)s 3276(information,)s 5341(consult)s 1440 7887(Section)m 2732(10.6)s 3520(on)s 4014(page)s 4860(245.)s grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 17 17 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10331(17)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3612 11377(Refer)m 7(ences)k [ /Dest /LOUT26_260_all_16 /DEST pdfmark 360 fnt2 800 9723(@Database @Ref)m 10(erence { m)k 5(yrefs })k 800 9243(...)m 800 8763(F)m 10(or the details)k 5(, consult the User')k 18(s)k 800 8283(Guide @Cite { $kingston1995lout.user }.)m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 18 18 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10331(18)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_17 /DEST pdfmark 8640 10080 1440 8457 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 1440 8367(F)m 6(or)k 2089(the)s 2669(details,)s 3889(consult)s 5143(the)s 5723(User')s 22(s)k 1440 7887(Guide)m 2508([1].)s 1440 7263(\202)m 400 fnt4 1440 6637(Refer)m 7(ences)k 400 fnt1 1440 5879(1.)m 2240(Jef)s 10(fre)k 6(y)k 3422(H.)s 3883(Kingston.)s 400 fnt5 5621 5881(A)m 5947(User')s 16(s)k 2240 5401(Guide)m 3304(to)s 3703(the)s 4279(Lout)s 5119(Document)s 2240 4921(F)m 42(ormatting)k 4107(System)s 5308(\(V)s 44(er)k 4(sion)k 2240 4441(3\))m 400 fnt1 2556 4439(.)m 2829(Basser)s 3992(Department)s 5977(of)s 2240 3959(Computer)m 3938(Science)s 5171(,)s 5349(Uni)s 10(v)k 6(ersity)k 2240 3479(of)m 2693(Sydne)s 6(y)k 3876(,)s 4054(1995)s 4830(.)s [ /Dest /LOUT22_1748_all_4 /DEST pdfmark 1440 2642(2.)m 2240(\202)s [ /Dest /LOUT22_1748_all_5 /DEST pdfmark grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 19 19 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10329(19)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 2601 11375(Database)m 4269(\207le)s 4872(myr)s 7(efs.ld)k [ /Dest /LOUT26_260_all_18 /DEST pdfmark 360 fnt2 800 9644({ @Ref)m 10(erence)k 800 9164( @T)m 43(ag { kingston1995lout.user })k 800 8684( @T)m 43(ype { Book })k 800 8204( @A)m 10(uthor { Jeffre)k 7(y H.)k 21( Kingston })k 800 7724( @Title { A User')m 18(s Guide to the Lout)k 800 7244(Document F)m 10(or)k -9(matting System \(V)k 28(ersion 3\) })k 800 6764( @Institution { Basser Depar)m -14(tment of)k 800 6284(Computer Science })m 800 5804( @Address { Univ)m 9(ersity of Sydne)k 7(y)k 800 5324(2006, A)m 10(ustr)k 3(alia })k 800 4844( @Y)m 50(ear { 1994 })k 800 4364(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 20 20 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10326(20)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore 400 fnt4 2965 11375(Books)m 4097(\(and)s 4966(theses\))s [ /Dest /LOUT26_260_all_19 /DEST pdfmark 400 fnt1 0 9650(\213)m 800(T)s 14(itle)k 1632(page,)s 2564(pref)s 4(ace,)k 3912(introduction)s [ /Dest /LOUT22_1748_all_6 /DEST pdfmark 0 8810(\213)m 800(Automatic)s 2574(table)s 3442(of)s 3895(contents)s [ /Dest /LOUT22_1748_all_7 /DEST pdfmark 0 8053(\213)m 800(Pref)s 4(atory)k 2372(pages)s 3365(numbered)s 5060(in)s 5465(Roman)s 6713(numerals)s [ /Dest /LOUT22_1748_all_8 /DEST pdfmark 0 7213(\213)m 800(Chapters,)s 2397(sections,)s 3861(subsections,)s 5880(appendices)s [ /Dest /LOUT22_1748_all_9 /DEST pdfmark 0 6374(\213)m 800(References)s 2656(at)s 3044(end)s 3718(of)s 4171(chapters)s 5585(or)s 6018(book)s [ /Dest /LOUT22_1748_all_10 /DEST pdfmark 0 5535(\213)m 800(Running)s 2265(page)s 3111(headers)s [ /Dest /LOUT22_1748_all_11 /DEST pdfmark 0 4695(\213)m 800(Odd-e)s 10(v)k 6(en)k 2453(page)s 3299(formats)s [ /Dest /LOUT22_1748_all_12 /DEST pdfmark 0 3855(\213)m 800(Sorted)s 1940(inde)s 6(x)k [ /Dest /LOUT22_1748_all_13 /DEST pdfmark grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 21 21 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10339(21)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 2631 11377(Making)m 4057(a)s 4353(sorted)s 5509(index)s [ /Dest /LOUT26_260_all_20 /DEST pdfmark 360 fnt2 800 9646(@PP)m 800 9166(There are se)m 10(v)k 9(er)k 3(al possib)k 7(le w)k 5(a)k 10(ys to implement the)k 800 8686(@I P)m 14(ar)k -14(tition procedure)k 5(,)k 800 8206(par)m -14(tition @Inde)k 10(x { @I P)k 14(ar)k -14(tition \(in {@I Quic)k 7(ksor)k -14(t}\) })k 800 7726(b)m 7(ut the f)k 10(ollo)k 5(wing seems to be the best.)k 21( Star)k -14(ting ...)k grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 22 22 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(22)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_21 /DEST pdfmark 8640 10080 1440 8462 400 480 100 0 668 LoutGr2 LoutBox stroke grestore 400 fnt4 1440 8370(Index)m 400 fnt1 1440 7795(\202)m 1440 7315(partial)m 2552(order)s 16(,)k 3557(227)s 400 fnt5 1440 6837(P)m 32(artition)k 400 fnt1 2941 6835(\(in)m 400 fnt5 3479 6837(Quic)m 8(ksort)k 400 fnt1 5052 6835(\),)m 5363(189)s 1440 6355(postorder)m 3049(tra)s 8(v)k 6(ersal)k 1840 5875(of)m 2293(binary)s 3404(tree,)s 4180(19)s 1840 5395(topological)m 3730(ordering,)s 5262(229)s 1440 4915(\202)m grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 23 23 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10334(23)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 2785 11376(Equation)m 4455(f)s 10(ormatting)k [ /Dest /LOUT26_260_all_22 /DEST pdfmark 360 fnt2 800 9645(@SysInclude { eq })m 800 9165(...)m 800 8685(Since @Eq { )m 18(T\(n-i\) = )k 18(T\(0\) = 0 } w)k 3(e ha)k 7(v)k 9(e)k 800 8205(@IndentedDispla)m 10(y @Eq {)k 800 7725(T\(n\) = big sum from i=0 to n-1 2 sup i = 2 sup n - 1)m 800 7245(})m 800 6765(f)m 10(or the n)k 3(umber of disk mo)k 5(v)k 9(es made b)k 7(y the )k 18(T)k 43(o)k 5(w)k 3(ers)k 800 6285(of Hanoi algor)m -5(ithm, giv)k 9(en @Eq { n } disks)k 5(.)k grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 24 24 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def %%IncludeResource: font Symbol /fnt6 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(24)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_23 /DEST pdfmark 8640 10080 1440 8457 400 480 100 0 668 LoutGr2 LoutBox stroke grestore 1440 8367(Since)m 400 fnt5 2419 8369(T)m 400 fnt6 2691 8357(\()m 400 fnt5 2831 8369(n)m 400 fnt6 3141 8357(-)m 400 fnt5 3475 8369(i)m 400 fnt6 3601 8357(\))m 3852(=)s 400 fnt5 4207 8369(T)m 400 fnt6 4479 8357(\()m 4619(0)s 4828(\))s 5079(=)s 5434(0)s 400 fnt1 5723 8367(we)m 6280(ha)s 8(v)k 6(e)k 400 fnt5 2240 7204(T)m 400 fnt6 2512 7192(\()m 400 fnt5 2652 7204(n)m 400 fnt6 2862 7192(\))m 3113(=)s 280 fnt5 3468 7622(n)m 280 fnt6 3640 7613(-)m 3829(1)s 520 fnt6 3522 7162(\345)m 280 fnt5 3483 6864(i)m 280 fnt6 3599 6855(=)m 3791(0)s 280 fnt5 4149 7367(i)m 400 fnt6 3959 7192(2)m 4363(=)s 280 fnt5 4908 7400(n)m 400 fnt6 4718 7192(2)m 5161(-)s 5495(1)s 400 fnt1 1440 6098(for)m 2006(the)s 2586(number)s 3907(of)s 4360(disk)s 5128(mo)s 6(v)k 6(es)k 6243(made)s 1440 5618(by)m 1930(the)s 2510(T)s 32(o)k 10(wers)k 3749(of)s 4202(Hanoi)s 5268(algorithm,)s 1440 5138(gi)m 10(v)k 6(en)k 400 fnt5 2406 5140(n)m 400 fnt1 2696 5138(disks.)m grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 25 25 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1527(lout)m 10332(25)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3035 11375(Another)m 4550(equation)s [ /Dest /LOUT26_260_all_24 /DEST pdfmark 360 fnt2 800 9644(@CenteredDispla)m 10(y @Eq {)k 800 9164(big int supp 1 on 0 )m 21(`)k 800 8684(dx o)m 5(v)k 9(er sqr)k -14(t { 1 - x sup 2 })k 800 8204(= pi o)m 5(v)k 9(er 2)k 800 7724(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 26 26 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Symbol %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Symbol /fnt6 { /Symbol LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10328(26)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_25 /DEST pdfmark 8640 10080 1440 8640 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 676 fnt6 3159 7423(\362)m 280 fnt6 3355 7972(1)m 3355 7281(0)m 400 fnt5 3991 7782(dx)m 1187 0 0 0 400 480 20 3587 7697 LoutGr2 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore gsave 0 7292 translate 1.0000 1.2231 scale 400 fnt6 3587 -100(\326)m grestore 981 0 0 0 400 480 20 3793 7617 LoutGr2 0 0 moveto xsize 0 lineto 0.03 ft setlinewidth 2 setlinecap stroke grestore grestore 400 fnt6 3853 7251(1)m 4129(-)s 280 fnt6 4641 7365(2)m 400 fnt5 4463 7263(x)m 400 fnt6 4914 7597(=)m 5269 7784(p)m gsave 5269 7697 translate 400 fnt5 212 0 0 0 400 480 20 LoutGraphic gsave 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 5280 7317(2)m grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 27 27 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10331(27)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3991 11383(T)m 36(ables)k [ /Dest /LOUT26_260_all_26 /DEST pdfmark 360 fnt2 800 9729(@SysInclude { tab })m 800 9249(...)m 800 8769(@T)m 43(ab)k 800 8289( @Fmta { @Col @I A ! @Col B })m 800 7809({)m 800 7329(@Ro)m 5(w)k 5(a)k 800 6849( A { F)m 10(or)k -14(tr)k 3(an })k 800 6369( B { )m 18(The \207rst ...)k 21( language })k 800 5889(@Ro)m 5(w)k 5(a)k 800 5409( A { Algol-60 })m 800 4929( B { Said to be ...)m 21( successors })k 800 4449(@Ro)m 5(w)k 5(a)k 800 3969( A { P)m 14(ascal })k 800 3489( B { )m 18(The f)k 10(amous ...)k 21( successors })k 800 3009(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 28 28 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10331(28)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_27 /DEST pdfmark 8640 10080 1440 8640 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 400 fnt5 1440 8177(F)m 42(ortr)k 6(an)k 400 fnt1 3178 8175(The)m 3891(\207rst)s 4612(high-le)s 10(v)k 6(el)k 3178 7695(programming)m 5442(language)s 400 fnt5 1440 6950(Algol-60)m 400 fnt1 3178 6948(Said)m 3985(to)s 4384(be)s 4853(a)s 5130(better)s 3178 6468(language)m 4712(than)s 5494(most)s 6371(of)s 6824(its)s 3178 5988(successors)m 400 fnt5 1440 5327(P)m 32(ascal)k 400 fnt1 3178 5325(The)m 3891(most)s 4768(f)s 4(amous)k 6024(of)s 3178 4845(Algol-60')m 22(s)k 4971(successors)s grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 29 29 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10329(29)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3357 11375(Another)m 4872(table)s [ /Dest /LOUT26_260_all_28 /DEST pdfmark 360 fnt2 800 10201(@T)m 43(ab)k 800 9721( hmargin { 0.4c })m 800 9241( vmargin { 0.3v })m 800 8761( side { single })m 800 8281( @Fmta { @Col @B @CC X @Ov)m 9(er A,B)k 7(,C })k 800 7801( @Fmtb { @Col @I A ! @Col B !! @Col C })m 800 7321({)m 800 6361(@Ro)m 5(w)k 5(a abo)k 5(v)k 9(e { single })k 800 5881( X { )m 18(V)k 25(alue of mathematical ...)k 21( dollars\) })k 800 4921(@Ro)m 5(wb abo)k 5(v)k 9(e { doub)k 7(le })k 800 4441( A { Quadr)m 3(atic f)k 10(or)k -9(m)k 3(ula })k 800 3961( B { @Eq { x ^= { ...)m 21( } o)k 5(v)k 9(er 2a } })k 800 3481( C { 3^.5 })m 800 2521(@Ro)m 5(wb belo)k 5(w { single })k 800 2041( A { Binomial theorem })m 800 1561( B { @Eq { \( a + b \) sup n ^= ...)m 21( b sup n-k } })k 800 1081( C { 12^ })m 800 601(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 30 30 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def %%IncludeResource: font Symbol /fnt6 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10326(30)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_29 /DEST pdfmark 8640 10080 1440 8640 400 480 100 0 667 LoutGr2 LoutBox stroke grestore gsave 1440 8640 translate 0.5977 0.5977 scale 0 144 0 144 400 480 100 0 -144 LoutGr2 0.5 pt ltabvs grestore grestore 226 0 0 0 400 480 100 0 0 LoutGr2 0.5 pt ltabhsp grestore grestore 0 344 0 159 400 480 100 0 -488 LoutGr2 0.5 pt ltabvs grestore grestore 0 144 0 0 400 480 100 0 -632 LoutGr2 0.5 pt ltabvs grestore grestore 8889 0 0 0 400 480 100 226 0 LoutGr2 0.5 pt ltabhs grestore grestore 400 fnt4 226 -421(V)m 36(alue)k 1281(of)s 1736(mathematical)s 4157(f)s 10(ormulae)k 5793(\(millions)s 7369(of)s 7824(dollars\))s gsave 9115 0 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhsp grestore grestore gsave 9341 -144 translate 400 fnt1 296 144 0 144 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 9341 -488 translate 400 fnt1 296 344 0 159 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 9341 -632 translate 400 fnt1 296 144 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 0 -776 translate 400 fnt1 0 144 0 144 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 0 -632 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore gsave 0 -1867 translate 400 fnt1 0 1091 0 480 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 0 -2011 translate 400 fnt1 0 144 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 226 -632 translate 400 fnt1 2985 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore 400 fnt5 226 -1475(Quadr)m 6(atic)k 1955(formula)s gsave 3211 -632 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore gsave 3437 -632 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore gsave 3663 -632 translate 400 fnt1 4255 0 1260 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore 4725(x)s 400 fnt6 5063 -1487(=)m 5418 -1207(-)m 400 fnt5 5652 -1195(b)m 400 fnt6 5962 -1207(\261)m gsave 0 -1146 translate 1.0000 1.3937 scale 6297 -100(\326)m grestore gsave 6503 -776 translate 400 fnt5 1415 0 0 0 400 480 20 LoutGraphic gsave 0 0 moveto xsize 0 lineto 0.03 ft setlinewidth 2 setlinecap stroke grestore grestore 280 fnt6 6753 -1028(2)m 400 fnt5 6563 -1195(b)m 400 fnt6 7006 -1207(-)m 7340(4)s 400 fnt5 7548 -1195(ac)m 2500 0 0 0 400 480 20 5418 -1387 LoutGr2 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 400 fnt6 6467 -1767(2)m 400 fnt5 6677 -1755(a)m gsave 7918 -632 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore gsave 8144 -776 translate 400 fnt1 0 144 0 144 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 8144 -632 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore gsave 8144 -1867 translate 400 fnt1 0 1091 0 480 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 8144 -2011 translate 400 fnt1 0 144 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 8370 -632 translate 400 fnt1 745 0 390 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhd grestore grestore 400 fnt1 8587 -1477(3)m 8760(.5)s 226 0 0 0 400 480 100 9115 -632 LoutGr2 0.5 pt ltabhd grestore grestore 296 144 0 144 400 480 100 9341 -776 LoutGr2 0.5 pt ltabvs grestore grestore 296 1091 0 480 400 480 100 9341 -1867 LoutGr2 0.5 pt ltabvs grestore grestore 296 144 0 0 400 480 100 9341 -2011 LoutGr2 0.5 pt ltabvs grestore grestore 0 144 0 144 400 480 100 0 -2155 LoutGr2 0.5 pt ltabvs grestore grestore 0 863 0 449 400 480 100 0 -3018 LoutGr2 0.5 pt ltabvs grestore grestore 0 144 0 0 400 480 100 0 -3162 LoutGr2 0.5 pt ltabvs grestore grestore 226 0 0 0 400 480 100 0 -3162 LoutGr2 0.5 pt ltabhsp grestore grestore 400 fnt5 226 -2657(Binomial)m 1791(theor)s 14(em)k gsave 226 -3162 translate 400 fnt1 2985 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 3211 -3162 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 3437 -3162 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhs grestore grestore 400 fnt6 3663 -2669(\()m 400 fnt5 3803 -2657(a)m 400 fnt6 4114 -2669(+)m 400 fnt5 4449 -2657(b)m 280 fnt5 4770 -2463(n)m 400 fnt6 4659 -2669(\))m 5063(=)s 336 fnt6 5549 -2290(\245)m 520 fnt6 5484 -2699(\345)m 280 fnt5 5418 -3005(k)m 280 fnt6 5588 -3014(=)m 5780(0)s gsave 0 -2560 translate 1.0000 2.3652 scale 400 fnt6 5932 -100(\()m grestore 400 fnt5 6112 -2417(n)m 6115 -2893(k)m gsave 0 -2560 translate 1.0000 2.3652 scale 400 fnt6 6362 -100(\))m grestore 280 fnt5 6684 -2501(k)m 400 fnt5 6493 -2657(a)m 280 fnt5 7022 -2488(n)m 280 fnt6 7194 -2497(-)m 280 fnt5 7383 -2488(k)m 400 fnt5 6832 -2657(b)m gsave 3663 -3162 translate 400 fnt1 4255 0 1260 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 7918 -3162 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 8144 -2155 translate 400 fnt1 0 144 0 144 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 8144 -3018 translate 400 fnt1 0 863 0 449 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 8144 -3162 translate 400 fnt1 0 144 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabvs grestore grestore gsave 8144 -3162 translate 400 fnt1 226 0 0 0 400 480 100 LoutGraphic gsave 0.5 pt ltabhs grestore grestore 400 fnt1 8370 -2659(12)m 745 0 390 0 400 480 100 8370 -3162 LoutGr2 0.5 pt ltabhs grestore grestore 226 0 0 0 400 480 100 9115 -3162 LoutGr2 0.5 pt ltabhsp grestore grestore 296 144 0 144 400 480 100 9341 -2155 LoutGr2 0.5 pt ltabvs grestore grestore 296 863 0 449 400 480 100 9341 -3018 LoutGr2 0.5 pt ltabvs grestore grestore 296 144 0 0 400 480 100 9341 -3162 LoutGr2 0.5 pt ltabvs grestore grestore grestore grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 31 31 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10339(31)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3123 11382(P)m 4(ascal)k 4297(pr)s 7(ograms)k [ /Dest /LOUT26_260_all_30 /DEST pdfmark 360 fnt2 800 9651(@SysInclude { pas })m 800 9171(...)m 800 8691(@ID @P)m 14(as {)k 800 8211(procedure DoPr)m -5(iAbstr)k 3(act\(root:)k 18( Pr)k -5(iEntr)k -10(y\);)k 800 7731(begin)m 800 7251( if root^.leftchild <> nil then begin)m 800 6771( DoPr)m -5(iAbstr)k 3(act\(root^.leftchild\);)k 800 6291( wr)m -5(ite\(', '\);)k 800 5811( end;)m 800 5331( Pr)m -5(iK)k 14(e)k 7(yAbstr)k 3(act\(root^.k)k 7(e)k 7(y\);)k 800 4851( wr)m -5(ite\(':'\);)k 800 4371( Pr)m -5(iV)k 25(alueAbstr)k 3(act\(root^.v)k 9(alue\);)k 800 3891( if root^.r)m -5(ightchild <> nil then begin)k 800 3411( wr)m -5(ite\(', '\);)k 800 2931( DoPr)m -5(iAbstr)k 3(act\(root^.r)k -5(ightchild\);)k 800 2451( end;)m 800 1971(end;)m 800 1491(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 32 32 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def %%IncludeResource: font Symbol /fnt6 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(32)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_31 /DEST pdfmark 8640 10080 1440 8455 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 400 fnt4 1440 8363(pr)m 7(ocedur)k 7(e)k 400 fnt5 3270 8367(DoPriAbstr)m 6(act)k 400 fnt1 5622 8365(\()m 400 fnt5 5744 8367(r)m 18(oot)k 400 fnt1 6399 8365(:)m 400 fnt5 6576 8367(PriEntry)m 400 fnt1 7966 8365(\);)m 400 fnt4 1440 7883(begin)m 1840 7403(if)m 400 fnt5 2206 7407(r)m 18(oot)k 320 fnt6 2861 7415(\255)m 400 fnt1 3043 7405(.)m 400 fnt5 3116 7407(leftc)m 6(hild)k 400 fnt6 4529 7395(\271)m 400 fnt4 4845 7403(nil)m 5380(then)s 6228(begin)s 400 fnt5 2240 6927(DoPriAbstr)m 6(act)k 400 fnt1 4592 6925(\()m 400 fnt5 4714 6927(r)m 18(oot)k 320 fnt6 5369 6935(\255)m 400 fnt1 5551 6925(.)m 400 fnt5 5624 6927(leftc)m 6(hild)k 400 fnt1 6937 6925(\);)m 400 fnt5 2240 6447(write)m 400 fnt1 3048 6445(\(',)m 3492('\);)s 400 fnt4 1840 5963(end)m 400 fnt1 2453 5965(;)m 400 fnt5 1840 5487(PriK)m 14(e)k 12(yAbstr)k 6(act)k 400 fnt1 4298 5485(\()m 400 fnt5 4420 5487(r)m 18(oot)k 320 fnt6 5075 5495(\255)m 400 fnt1 5257 5485(.)m 400 fnt5 5330 5487(k)m 4(e)k 12(y)k 400 fnt1 5838 5485(\);)m 400 fnt5 1840 5007(write)m 400 fnt1 2648 5005(\(':'\);)m 400 fnt5 1840 4527(PriV)m 44(alueAbstr)k 6(act)k 400 fnt1 4592 4525(\()m 400 fnt5 4714 4527(r)m 18(oot)k 320 fnt6 5369 4535(\255)m 400 fnt1 5551 4525(.)m 400 fnt5 5624 4527(value)m 400 fnt1 6477 4525(\);)m 400 fnt4 1840 4043(if)m 400 fnt5 2206 4047(r)m 18(oot)k 320 fnt6 2861 4055(\255)m 400 fnt1 3043 4045(.)m 400 fnt5 3116 4047(rightc)m 6(hild)k 400 fnt6 4796 4035(\271)m 400 fnt4 5112 4043(nil)m 5647(then)s 6495(begin)s 400 fnt5 2240 3567(write)m 400 fnt1 3048 3565(\(',)m 3492('\);)s 400 fnt5 2240 3087(DoPriAbstr)m 6(act)k 400 fnt1 4592 3085(\()m 400 fnt5 4714 3087(r)m 18(oot)k 320 fnt6 5369 3095(\255)m 400 fnt1 5551 3085(.)m 400 fnt5 5624 3087(rightc)m 6(hild)k 400 fnt1 7204 3085(\);)m 400 fnt4 1840 2603(end)m 400 fnt1 2453 2605(;)m 400 fnt4 1440 2123(end)m 400 fnt1 2053 2125(;)m grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 33 33 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10334(33)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3304 11376(Basic)m 4308(graphics)s [ /Dest /LOUT26_260_all_32 /DEST pdfmark 360 fnt2 800 9645(45d @Rotate 1.5 @Scale @Bo)m 10(x {)k 800 9165( Hello)m 14(, w)k 3(or)k -5(ld)k 800 8685(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 34 34 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(34)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_33 /DEST pdfmark 8640 10080 1440 8640 400 480 100 0 667 LoutGr2 LoutBox stroke grestore gsave 2528 5722 translate 45.0000 rotate gsave 0 0 translate 1.5000 1.5000 scale gsave 0 -254 translate 360 fnt2 2027 526 108 254 360 480 100 LoutGraphic gsave LoutBox stroke grestore 108 161(Hello)m 14(,)k 1080(w)s 3(or)k -5(ld)k grestore grestore grestore grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 35 35 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1527(lout)m 10332(35)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 2908 11375(Adv)m 4(anced)k 4704(graphics)s [ /Dest /LOUT26_260_all_34 /DEST pdfmark 360 fnt2 800 9644(@SysInclude { \207g })m 800 9164(...)m 800 8684(@Fig {)m 800 8204(@Bo)m 10(x)k 800 7724( margin { 0c })m 800 7244( paint { b)m 7(lac)k 7(k })k 800 6764(@Ellipse)m 800 6284( linestyle { noline })m 800 5804( paint { white })m 800 5324({ Hello)m 14(, w)k 3(or)k -5(ld })k 800 4844(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 36 36 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10328(36)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_35 /DEST pdfmark 8640 10080 1440 8231 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 5760 781 226 372 400 480 100 1440 7859 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 2442 781 226 372 400 480 100 0 0 LoutGr2 /lfigblack [ lfigbox ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 2442 781 226 372 400 480 100 0 0 LoutGr2 /lfigwhite [ lfigellipse ] gsave lfigpaintpath grestore 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfignoline [ lfigellipse ] lfigdopath pop pop grestore 226 282(Hello,)m 1291(w)s 4(orld)k grestore grestore end end restore grestore grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 37 37 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10331(37)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3302 11376(P)m 8(oint)k 4304(labelling)s [ /Dest /LOUT26_260_all_36 /DEST pdfmark 360 fnt2 800 9645(@Fig {)m 800 9165(A::)m 800 8685({)m 800 8205( 1::)m 18( @Ellipse { 3c @Wide 2c @High })k 800 7725( //3c)m 800 7245( 2::)m 18( @Bo)k 10(x { 3c @Wide 2c @High })k 800 6765(})m 800 6285(@Sho)m 5(wLabels)k 800 5805(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 38 38 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10331(38)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_37 /DEST pdfmark 8640 10080 1440 8414 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 5760 4873 0 4647 400 480 100 1440 3767 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 2153 4873 0 4647 400 480 100 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 2153 1586 226 1360 400 480 100 0 3287 LoutGr2 currentdict end 200 dict begin begin grestore 2153 1586 226 1360 400 480 100 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigellipse ] lfigdopath pop pop grestore grestore (1) lfigpromotelabels grestore 2153 1586 226 1360 400 480 100 0 0 LoutGr2 currentdict end 200 dict begin begin grestore 2153 1586 226 1360 400 480 100 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore (2) lfigpromotelabels grestore (A) lfigpromotelabels grestore 3507 4873 0 4647 400 480 100 2253 0 LoutGr2 lfigshowlabels grestore grestore end end restore grestore grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 39 39 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt4 vec2 /Times-Bold LoutRecode /fnt4 { /Times-Boldfnt4 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10329(39)s gsave 1417 -14005 translate 400 fnt1 9066 12051 0 12051 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore 400 fnt4 3895 11375(Graphs)m [ /Dest /LOUT26_260_all_38 /DEST pdfmark 340 fnt2 800 9035(@Gr)m 3(aph)k 800 8555( abo)m 5(v)k 8(ecaption { Ne)k 6(w South )k 13(W)k 13(ales road deaths)k 800 8075(\(per 100 million v)m 8(ehicle km\) })k 800 7595({)m 800 7115( @Data points { plus } pairs { dashed })m 800 6635( { 1963 5.6 1971 4.3 1976 3.7 1979 3.4)m 800 6155( 1982 2.9 1985 2.3 1988 2.0 })m 800 5675(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 40 40 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10326(40)s gsave 1417 -14005 translate 400 fnt1 9066 12052 0 12052 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_39 /DEST pdfmark 8640 10080 1440 8640 400 480 100 0 667 LoutGr2 LoutBox stroke grestore 1631 8367(Ne)m 10(w)k 2463(South)s 3491(W)s 32(ales)k 4540(road)s 5347(deaths)s 1717 7887(\(per)m 2460(100)s 3151(million)s 4400(v)s 6(ehicle)k 5639(km\))s 5103 3402 0 3402 400 480 100 1440 4116 LoutGr2 grestore gsave xsize ysize lgraphdict begin /ysize exch def /xsize exch def /alldata [ [ [ 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 ] xandy { plus } { ilinesetup dashed } { /dashlength 0.2 ft def /linewidth currentlinewidth def /symbolsize 0.15 ft def /symbollinewidth currentlinewidth def } { false } { null LoutSetTexture } ] ] def 0 [ false ] 0 alldata false false 0 0.5 cm false false 0.5 ft xset 0 [ false ] 1 alldata false false 0 0.5 cm false false 0.5 ft yset norset rundata framestyle grestore end grestore grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 41 41 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10339(41)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore [ /Dest /LOUT26_260_all_40 /DEST pdfmark 360 fnt2 800 10484(-2p @F)m 10(ont @Gr)k 3(aph)k 800 10004( style { ax)m 10(es })k 800 9524( xor)m -5(igin { 0 } y)k 7(or)k -5(igin { 0 })k 800 9044( xtic)m 7(ks { 10@ 50@ 100@ 200@ 500@ })k 800 8564( objects { @NE at { 300 2 } @I { Exponential })m 800 8084( @SE at { ...)m 21( } @I { Unif)k 10(or)k -9(m } })k 800 7604( belo)m 5(wcaption { @I n })k 800 7124({)m 800 6644( @Data points { \207lledcircle } { ...)m 21( })k 800 6164( @Data points { \207lledcircle } { ...)m 21( })k 800 5204( @Data pairs { dashed })m 800 4724( { 10 2 500 2 })m 800 3764( @Data pairs { dashed })m 800 3284( {)m 800 2804( xloop from { 10 } to { 500 } b)m 7(y { 20 } do)k 800 2324( {)m 800 1844( x sqr)m -14(t { pi*x / 4 } + 1)k 800 1364( })m 800 884( })m 800 404(})m grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 42 42 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt5 vec2 /Times-Italic LoutRecode /fnt5 { /Times-Italicfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 400 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 400 480 100 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 160 fnt1 0.0 0.0 0.0 LoutSetRGBColor 1417 -1526(lout)m 10327(42)s gsave 1417 -14005 translate 400 fnt1 9066 12053 0 12053 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore [ /Dest /LOUT26_260_all_41 /DEST pdfmark 8640 10080 1440 8640 400 480 100 0 668 LoutGr2 LoutBox stroke grestore gsave 1440 4671 translate 360 fnt1 5670 3969 0 3969 360 480 90 LoutGraphic gsave grestore gsave xsize ysize lgraphdict begin /ysize exch def /xsize exch def /alldata [ [ [ 10 1.97 50 2.01 100 2.00 200 2.0 500 2.00 ] xandy { filledcircle } { } { /dashlength 0.2 ft def /linewidth currentlinewidth def /symbolsize 0.15 ft def /symbollinewidth currentlinewidth def } { false } { null LoutSetTexture } ] [ [ 10 3.53 50 7.45 100 9.32 200 13.41 500 21.63 ] xandy { filledcircle } { } { /dashlength 0.2 ft def /linewidth currentlinewidth def /symbolsize 0.15 ft def /symbollinewidth currentlinewidth def } { false } { null LoutSetTexture } ] [ [ 10 2 500 2 ] xandy { } { linesetup cdashed } { /dashlength 0.2 ft def /linewidth currentlinewidth def /symbolsize 0.15 ft def /symbollinewidth currentlinewidth def } { false } { null LoutSetTexture } ] [ [ 10 20 500 { /xval exch def xval 3.14159 xval mul 4 div sqrt 1 add } for ] xandy { } { linesetup cdashed } { /dashlength 0.2 ft def /linewidth currentlinewidth def /symbolsize 0.15 ft def /symbollinewidth currentlinewidth def } { false } { null LoutSetTexture } ] ] def 0 [ 10 lgen 50 lgen 100 lgen 200 lgen 500 lgen ] 0 alldata false false 0 0 false 0 0.5 ft xset 0 [ false ] 1 alldata false false 0 0 false 0 0.5 ft yset norset rundata axesstyle grestore 1953 535 0 535 360 480 90 0 -535 LoutGr2 300 2 trpoint translate 0 ysize translate gsave grestore 360 fnt5 108 182(Exponential)m grestore grestore 1428 533 0 533 360 480 90 0 -533 LoutGr2 300 3.14159 300 4 div mul sqrt 1 add trpoint translate 0 0 translate gsave grestore 360 fnt5 108 182(Uniform)m grestore grestore end grestore 360 fnt5 4189 3901(n)m grestore grestore gsave 1417 -14005 translate 400 fnt1 0 0 0 0 400 480 100 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Trailer %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica %%+ font Helvetica-Oblique %%+ font Symbol %%DocumentSuppliedResources: procset LoutStartUp %%+ procset LoutTabPrependGraphic %%+ procset LoutFigPrependGraphic %%+ procset LoutGraphPrependGraphic %%+ procset LoutBasicSetup %%+ encoding vec2 %%Pages: 42 %%EOF lout-3.39/doc/slides/mydefs0000644000076400007640000000024311363700677014324 0ustar jeffjeff def @Code right x { { Helvetica Base -2p } @Font lines @Break x } import @BasicSetup def @ShowPage right x { @Box margin { 1i } 4i @Wide 5i @High { x // } } lout-3.39/doc/README0000644000076400007640000000135311442262150012475 0ustar jeffjeffDirectory lout/doc This directory contains directories holding the four documents that describe the Lout document formatting system: design `The design and implementation of the Lout document formatting language,' Software--Practice and Experience, vol. 23, pp1001-1041 (September 1993) expert An Expert's Guide to the Lout Document Formatting System slides A Practical Introduction to the Lout Document Formatting System (overhead transparencies) user A User's Guide to the Lout Document Formatting System The author of these documents, Jeffrey H. Kingston, owns the copyright in them. He gives permission for them to be copied and modified freely, provided that his authorship is acknowledged in any documents derived from these ones. lout-3.39/doc/expert/0000700000076400007640000000000011446017270013115 5ustar jeffjefflout-3.39/doc/expert/det_filt0000644000076400007640000001014711363700677014657 0ustar jeffjeff@Section @Title { Filtered right and body parameters } @Tag { filters } @Begin @PP A right or body parameter may be filtered by some other computer program before being included by Lout. As an example of such a program we will use the Unix @Code sort command: @ID @Code "sort -o outfile infile" This causes file @Code outfile to contain a sorted copy of file {@Code infile}. We incorporate this into a Lout definition as follows: @ID @OneRow @Code { "def @Sort" " named @Options {}" " right x" "{" " def @Filter { sort @Options -o @FilterOut @FilterIn }" "" " lines @Break x" "}" } The presence within @Code "@Sort" of a definition of a symbol called @Code "@Filter" tells Lout that the right parameter of @Code "@Sort" is to be filtered before inclusion. When @Code "@Sort" is invoked, @Code "@Filter" is evaluated and its value executed as a system command. In addition to the symbols ordinarily available within the body of {@Code "@Filter"}, there are three others: @VeryWideTaggedList @TI { @Code "@FilterIn" } { the name of a file which will, at the time the system command is executed, contain the actual right or body parameter of the symbol, exactly as it appears in the input file; } @TI { @Code "@FilterOut" } { the name of a file of Lout text whose contents Lout will read after the system command has finished, as a replacement for what was put into file {@Code "@FilterIn"}; } @TI { @Code "@FilterErr" } { the name of a file that Lout will attempt to read after the system command has finished, containing error messages produced by the command that Lout will pass on to the user as non-fatal errors. Use of this file is optional. } @EndList It is a fatal error for the system command to return a non-zero status. @PP Now the @Code sort command has options @Code -u for deleting duplicate lines, and @Code -r for reversing the sorting order. So the result of @ID @OneRow @Code { "@Sort" " @Options { -r -u }" "{" "Austen, Jane" "Dickens, Charles" "Eliot, George" "Hardy, Thomas" "Bront{@Char edieresis}, Charlotte" "}" } is @ID @OneRow lines @Break { Hardy, Thomas Eliot, George Dickens, Charles Bront{@Char edieresis}, Charlotte Austen, Jane } Unlike all the other examples in this manual, this output is simulated. This was done so that the ability to format this manual is not dependent on the existence of the Unix {@Code "sort"} command, and it highlights the fact that filtered actual parameters are by their nature of uncertain portability. @PP There is no need for an actual filtered parameter to obey the lexical rules of Lout, since it is passed directly to the other program. However, Lout must be able to work out where the parameter ends, which gives rise to the following rules. As with a body parameter, a symbol @Code "@Sym" with a filtered parameter must be invoked in either the form @Code "@Sym { ... }" or the form {@Code "@Sym @Begin ... @End @Sym"}, plus options as usual. In the former case, braces within the actual parameter must match; in the latter case, the actual parameter may not contain {@Code "@End"}. @PP If an actual filtered parameter contains @@Include, this is taken to begin a Lout @@Include directive in the usual form (Section {@NumberOf include}): @ID @OneRow @Code { "@Sort {" "Austen, Jane" "@Include { authors }" "Hardy, Thomas" "}" } The included file becomes part of {@Code "@FilterIn"}, but any braces, @@Include, or @@End within it are not noticed by Lout. @PP The first character of file @Code "@FilterIn" will be the first non-white space character following the opening @Code "{" or @@Begin, or the first character of an included file if @@Include comes first. The second-last character of file @Code "@FilterIn" will be the last non-white space character preceding the closing @Code "}" or {@Code "@End @Sym"}, or the last character of an included file if @@Include comes last. One newline character is always appended and is the last character of file {@Code "@FilterIn"}. This effects a compromise between the Lout convention, that spaces following @Code "{" or preceding @Code "}" are not significant, with the Unix convention that all text files end with a newline character. @End @Section lout-3.39/doc/expert/exa0000644000076400007640000000126611363700677013644 0ustar jeffjeff@Chapter @Title { Examples } @Tag { examples } @Begin @LP This chapter presents some examples taken from the various packages available with Basser Lout. The reader who masters these examples will be well prepared to read the packages themselves. The examples have not been simplified in any way, since an important part of their purpose is to show Lout in actual practice. @PP Although all these examples have been taken from real code, they do not necessarily represent the current state of the Lout packages. @BeginSections @Include { exa_equa } @Include { exa_para } @Include { exa_page } @Include { exa_chap } @Include { exa_bibl } @Include { exa_inde } @EndSections @End @Chapter lout-3.39/doc/expert/pre_notr0000644000076400007640000000464311363700677014721 0ustar jeffjeff@Section @Title { "@NotRevealed" } @Tag { notrevealed } @Begin @PP The @@NotRevealed symbol notrevealed.sym @Index { @@NotRevealed symbol } exerts fine control over the process of expanding receptive symbols. It may appear only within the body of a definition, immediately following the name of a receptive symbol. For example: @ID @OneRow @Code { "def A { @Galley }" "" "def B { @Galley }" "" "def ABList" "{" " A" " // B @NotRevealed" " // ABList" "}" } The meaning is that the symbol immediately preceding @@NotRevealed, @Code B in this example, is not revealed to galleys which encounter @Code "ABList" while searching for targets; to such galleys it appears that @Code "ABList" contains @Code A only, not {@Code B}, hence only galleys targeted to @Code A will expand {@Code "ABList"}. However, after @Code "ABList" is expanded by such a galley, @Code B will be available as a target in the usual way. @PP Apart from this meaning, @@NotRevealed has no effect at all, and the body of the definition may be understood by deleting @@NotRevealed and any preceding space. Thus, the symbol preceding @@NotRevealed may have named and right parameters in the usual way; these would follow after the @@NotRevealed symbol. @PP This symbol was introduced to overcome a problem with floating figures treated as displays. It turned out to be essential to specify the layout of a column (in part) as @ID @OneRow @Code { "@BodyTextPlace" "// @FigurePlace" "// @BodyTextPlace" "// @FigurePlace" "// @BodyTextPlace" "..." } so that figures could alternate with body text down the column. However, some means was needed to ensure that in the absence of any figures there could only be one @Code "@BodyTextPlace" in the column, since otherwise various problems arose, for example the @Code "@NP" symbol merely causing a skip from one @Code "@BodyTextPlace" to the next in the same column, rather than to the first in the next column. Also, without this feature the optimal page breaker's attempts to end a column early would be frustrated by Lout then discovering that plenty of space existed at a following @Code "@BodyTextPlace" in the same column. The solution is based on @Code "ABList" above; each occurrence of @Code "@BodyTextPlace" after a @Code "@FigurePlace" is not revealed in the enclosing definition, and so cannot be found by body text galleys unless a figure has previously attached to the preceding {@Code "@FigurePlace"}. @End @Section lout-3.39/doc/expert/pre_hadj0000644000076400007640000000241311363700677014636 0ustar jeffjeff@Section @Title { "@HAdjust", "@VAdjust", and "@PAdjust" } @Tag { hadjust } @Begin @PP padjust. @Index { @@PAdjust symbol } hadjust. @Index { @@HAdjust symbol } vadjust. @Index { @@VAdjust symbol } adjustment @Index { Adjustment of object } These symbols spread their right parameter apart until it occupies all the space available to it; @@HAdjust adjusts @Code "|" sequences, @@VAdjust adjusts @Code "/" sequences, and @@PAdjust adjusts @Code "&" sequences. For example, @ID @Code { "4i @Wide @PAdjust { 1 2 3 4 5 6 7 8 }" } has result @ID { 4i @Wide @PAdjust { 1 2 3 4 5 6 7 8 } } More precisely, the widening is effected by enlarging the size of each component except the last by an equal fraction of the space that would otherwise be left over -- just the opposite of the usual procedure, which assigns all the leftover space to the last component (Section {@NumberOf size}). @PP @@PAdjust is used by the @Code adjust and @Code outdent options of the @@Break symbol (Section {@NumberOf break}). It has a slight peculiarity: it will not enlarge components when the immediately following gap has width 0. This is to prevent space from appearing (for example) between a word and an immediately following comma. The other two symbols will enlarge such components. @End @Section lout-3.39/doc/expert/pre_outl0000644000076400007640000000147411363700677014721 0ustar jeffjeff@Section @Title { "@Outline" } @Tag { outline } @Begin @PP The @@Outline symbol outline.sym @Index { @@Outline symbol } causes all the words in the right parameter (which may be an arbitrary object) to be printed in outline, rather than filled as is usual. For example, @ID @Code @Verbatim { @Outline @Box 24p @Font HELP } produces @ID @Outline @Box 24p @Font HELP Outlining is part of the style information, in the same way as colour, font, underlining, and so forth. Outlining can be applied to any font likely to be used in practice. At the time of writing, there is no way to control the thickness of the outline, and @@Outline has no effect in PDF output. The size of outlined words is taken by Lout to be the same as if they had not been outlined, even though they are in reality slightly larger. @End @Section lout-3.39/doc/expert/pre_conc0000644000076400007640000003312511363700677014656 0ustar jeffjeff@Section @Title { Concatenation symbols and paragraphs } @Tag { concatenation } @Begin @PP There are ten concatenation symbols, in three families: concatenation. @Index { Concatenation symbols } @ID @Tab vmargin { 0.5vx } @Fmta { @Col @Code A ! @Col @Code B ! @Col @Code C ! @Col @Code D ! @Col E } { @Rowa A { "/" } B { "^/" } C { "//" } D { "^//" } E { Vertical concatenation } @Rowa A { "|" } B { "^|" } C { "||" } D { "^||" } E { Horizontal concatenation } @Rowa A { "&" } B { "^&" } C { } D { } E {In-paragraph concatenation} } Each symbol produces an object which combines together the two parameters. The right parameter must be separated from the symbol by at least one white space character. @PP The vertical concatenation symbol @Code "/" places its left parameter vertical.concatenation @Index { Vertical concatenation } above its right parameter with their column marks aligned. If one parameter has more column marks than the other, empty columns are inserted at the right to equalize the numbers. The variant @Code "//" ignores column marks and left-justifies the objects. @PP The horizontal concatenation symbols @Code "|" and @Code "||" are horizontal horizontal.concatenation @Index { Horizontal concatenation } analogues of @Code "/" and {@Code "//"}: they place their two parameters side by side, with row mark alignment or top-justification respectively. The in.paragraph.concatenation @Index { In-paragraph concatenation } in-paragraph concatenation symbol @Code "&" produces horizontal concatenation within a paragraph; its special properties are treated in detail at the end of this section. @PP The concatenation symbols in any one family are @I { mutually associative }, which means that @ID { @Code "{" @I x {@Code "|"}{@I p} @I y @Code "}" {@Code "|"}{@I q} @I z } is always the same as @ID { @I x {@Code "|"}{@I p} @Code "{" @I y {@Code "|"}{@I q} @I z @Code "}" } for any objects {@I x}, {@I y}, and {@I z}, any gaps @I p and @I q (defined below), and any choice of {@Code "|"}, {@Code "^|"}, {@Code "||"}, and {@Code "^||"}. In practice we always omit such braces, since they are redundant and can be misleading. The result of the complete sequence of concatenations will be called the {@I{whole concatenation object}}, and the objects which make it up will be called the {@I components}. @PP One mark is designated as the @I { principal mark }, usually the mark of principal.mark @Index { Principal mark } the first component. A later mark can be chosen for this honour by attaching {@Code "^"} to the preceding concatenation symbol. See Section {@NumberOf onerow} for examples. @PP A {@I gap}, gap @Index Gap specifying the distance between the two parameters, may follow any concatenation symbol. There may be no spaces between a concatenation symbol and its gap. A missing gap is taken to be {@Code 0ie}. The gap is effectively a third parameter of the concatenation symbol, and it may be an arbitrary object provided that it evaluates to a juxtaposition of simple words. In general, the gap must be enclosed in braces, like this: @ID @Code { "//{ @Style&&mystyle @Open { @TopMargin } }" } but the braces may be omitted when the object is a juxtaposition of simple words or an invocation of a symbol without parameters, as in @Code "//0.3vx" and {@Code "||@Indent"}. @PP A gap consists of a length plus a gap mode plus an optional indication of unbreakability. A @I length length @Index { Length } is represented by an decimal number (which may not be negative) followed by a unit of measurement. For example, @Code "2.5c" represents the length 2.5 centimetres. Figure {@NumberOf units} gives the full selection of units of measurement. c.unit @Index { @Code c unit } p.unit @Index { @Code p unit } m.unit @Index { @Code m unit } f.unit @Index { @Code f unit } s.unit @Index { @Code s unit } v.unit @Index { @Code v unit } w.unit @Index { @Code w unit } b.unit @Index { @Code b unit } r.unit @Index { @Code r unit } d.unit @Index { @Code d unit } @Figure @Caption { The thirteen units of measurement provided by Lout. } @Tag { units } @Begin @Tab vmargin { 0.3v } side { yes } @Fmta { @Col @Code A ! @Col B } { @Rowa above { yes } A { c } B { Centimetres. } @Rowa A { i } B { Inches. } @Rowa A { p } B { Points ({@Code 72p} = {@Code 1i}). } @Rowa A { m } B { Ems ({@Code 12m} = {@Code 1i}). } @Rowa A { f } B { One @Code f equals the size of the current font, as specified by the @@Font symbol (Section {@NumberOf font}). This unit is appropriate for lengths that should change with the font size. } @Rowa A { s } B { One @Code s equals the preferred gap between two words in the current font, as specified in the definition of the font, or by the @@Space symbol (Section {@NumberOf break}). } @Rowa A { v } B { One @Code v equals the current gap between lines introduced during paragraph breaking, as specified by the @@Break symbol (Section {@NumberOf break}). This unit is appropriate for lengths, such as the spaces between paragraphs, which should change with the inter-line gap. } @Rowa A { w } B { One @Code w equals the width of the following component, or its height if the symbol is vertical concatenation. } @Rowa A { b } B { One @Code b equals the width of the whole concatenation object, or its height if the symbol is vertical concatenation. } @Rowa A { r } B { One @Code r equals one @Code b minus one {@Code w}. This unit is used for centring, and for left and right justification. } @Rowa A { d } B { Degrees. This unit may only be used with the @Code "@Rotate" symbol. } @Rowa A { y } B { One @Code y equals the current value set by the @Code "@YUnit" symbol (Section {@NumberOf yunit}). This unit is not used internally by Lout; it is included for the convenience of application packages. } @Rowa below { yes } A { z } B { One @Code z equals the current value set by the @Code "@ZUnit" symbol (Section {@NumberOf yunit}). This unit is not used internally by Lout; it is included for the convenience of application packages. } } @End @Figure @PP After the length comes an optional @I {gap mode}, gap.mode @Index { Gap mode } which is a single letter following the length, indicating how the length is to be measured. As shown in Figure {@NumberOf gapmodes}, @Figure @Tag { gapmodes } @Caption { The six gap modes provided by Lout. } @Begin @Fig { { /2.5vx Edge-to-edge |0.3i {@Code "|"} &1p {@I l} &1p {@Code e} /4vx Hyphenation |0.3i {@Code "|"} &1p {@I l} &1p {@Code h} /4vx Overstrike |0.3i {@Code "|"} &1p {@I l} &1p {@Code o} /4vx Mark-to-mark |0.3i {@Code "|"} &1p {@I l} &1p {@Code x} /4vx Kerning |0.3i {@Code "|"} &1p {@I l} &1p {@Code k} /4vx Tabulation |0.3i {@Code "|"} &1p {@I l} &1p {@Code t} } ||0.5i @Box margin { 0c } 6c @Wide 13.2c @High 9p @Font { @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 2.2c @Wide 1.4c @High } @Put { @DoubleArrow 1.8c } @At { 2.2c @Wide 1.6c @High } @Put { 1.8c @Wide { &0.5rt @I l } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 2.2c @Wide 1.4c @High } @Put { @DoubleArrow 1.8c } @At { 2.2c @Wide 1.6c @High } @Put { 1.8c @Wide { &0.5rt @I l } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 1.2c @Wide 1.5c @High } @Put { @DoubleArrow 3.3c } @At { 1.2c @Wide 1.7c @High } @Put { 3.3c @Wide { &0.5rt @I l } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 1.2c @Wide 1.5c @High } @Put { @DoubleArrow 3.3c } @At { 1.2c @Wide 1.7c @High } @Put 3.3c @Wide { |0.5rt { max( {@I {l, a+b+l"/10"}}) } } @At { 1.2c @Wide 0.4c @High } @Put { @DoubleArrow 1.0c } @At { 1.2c @Wide 0.2c @High } @Put { 1.0c @Wide { &0.5rt @I a } } @At { 4c @Wide 0.4c @High } @Put { @DoubleArrow 0.5c } @At { 4c @Wide 0.2c @High } @Put { 0.5c @Wide { &0.5rt @I b } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 1.2c @Wide 1.5c @High } @Put { @DoubleArrow 3.3c } @At { 1.2c @Wide 1.7c @High } @Put { 3.3c @Wide { |0.5rt max( {@I {l, a, b}})}} @At { 1.2c @Wide 0.4c @High } @Put { @DoubleArrow 1.0c } @At { 1.2c @Wide 0.2c @High } @Put { 1.0c @Wide { &0.5rt @I a } } @At { 4c @Wide 0.4c @High } @Put { @DoubleArrow 0.5c } @At { 4c @Wide 0.2c @High } @Put { 0.5c @Wide { &0.5rt @I b } } } //4vx @OneRow { @At { 1c @Wide 0.5c @High } @Put { @LBox 0.2co } @At { 4c @Wide 0.5c @High } @Put { @LBox 0.5co } @At { 0.0c @Wide 1.6c @High } @Put { @DoubleArrow 4.0c } @At { 2.8c @Wide 1.8c @High } @Put { @I l } } //5vx @DoubleArrow 6c //0.1c |0.5rt @I { current bound } } } @End @Figure with edge-to-edge gap mode edge.to.edge @Index { Edge-to-edge gap mode } e.gap.mode @Index { @Code e gap mode } the length @I l is measured from the trailing edge of the first object to the leading edge of the second. Edge-to-edge is the default mode: the @Code e may be omitted. Hyphenation gap mode is hyphenation.gap @Index { Hyphenation gap mode } h.gap.mode @Index { @Code h gap mode } similar, except as explained at the end of this section. @PP Mark-to-mark, mark.to.mark @Index { Mark-to-mark gap mode } x.gap.mode @Index { @Code x gap mode } overstrike, overstrike @Index { Overstrike gap mode } o.gap.mode @Index { @Code o gap mode } and kerning kerning.mode @Index { Kerning gap mode } k.gap.mode @Index { @Code k gap mode } measure the length from the last mark of the first object to the first mark of the second. In the case of mark-to-mark, if the length is too small to prevent the objects almost overlapping, it is widened until they no longer do. (The extra @I { "l/10" } is not applied when plain text output is in effect.) Kerning also widens, with the aim of preventing the mark of either object from overlapping the other object; this mode is used for subscripts and superscripts. @PP tabulation @Index { Tabulation gap mode } t.gap.mode @Index { @Code t gap mode } centring @Index { Centring } right.justif @Index { Right justification } Tabulation ignores the first object and places the leading edge of the second object at a distance @I l from the left edge of the whole concatenation object. It is the main user of the @Code b and @Code r units of measurement; for example, @Code "|1rt" will right-justify the following component, and @Code "|0.5rt" will centre it. @PP The value @Code "|0rt" separating the first and second items in a sequence of horizontally concatenated objects is somewhat special in that it denotes left justification of the object to its left in the available space. This is identical with @Code "|0ie" when the object to the left also has the principal mark; but when it does not, @Code "|0rt" will cause the object to the left to appear further to the left than it would otherwise have done, if space to do so is available. @PP A gap is optionally concluded with an indication of unbreakability, which is a letter @Code "u" appended to the gap. A paragraph will never be broken at an unbreakable gap, nor will a galley be broken across two targets at such a gap. Basser Lout's implementation is slightly defective in that it ignores any unbreakable indication in the gap separating the first component promoted into any target from the second. @PP When two objects are separated only by zero or more white space white.space.when @SubIndex { when significant } space.f.when @SubIndex { when significant } characters (spaces, tabs, newlines, and formfeeds), Lout inserts {@Code "&"}{@I k}{@Code "s"} between the two objects, where @I k is the number of spaces. Precisely, @I k is determined by discarding all space characters and tabs that precede newlines (these are invisible so are better ignored), then counting 1 for each newline, formfeed or space, and 8 for each tab character. The gap will be unbreakable if @I k is zero. @PP A sequence of two or more objects separated by @Code "&" symbols is a paragraph.breaking.in.detail @SubIndex { in detail } {@I paragraph}. Lout breaks paragraphs into lines automatically as required, by converting some of the @Code "&" symbols into {@Code "//1vx"}. Unbreakable gaps are not eligible for this conversion. `Optimal' line breaks are chosen, using a method adapted from @TeX @Cite { $knuth1984tex }. tex @RawIndex { @TeX } tex.optimal @SubIndex { optimal paragraph breaking } @PP If an @Code "&" symbol whose gap has hyphenation mode hyphenation @Index { Hyphenation gap mode } tex.hyphenation @SubIndex { hyphenation } is chosen for replacement by {@Code "//1vx"}, a hyphen will be appended to the preceding object, unless that object is a word which already ends with a hyphen or slash. For example, @ID @Code { Long words may be "hyph &0ih enat &0ih ed." } could have the following result, depending where the line breaks fall: @ID 2i @Wide { Long words may be hyph &0ih enat &0ih ed. } Basser Lout inserts hyphenation gaps automatically as required, again following the method of @TeX, which approximates the hyphenations in Webster's dictionary. However it does not insert hyphenation gaps in words on either side of a concatenation symbol which already has hyphenation mode. To prevent the hyphenation of a single word, enclose it in quotes. Further control over paragraph breaking and hyphenation is provided by the @@Break and @@Space symbols (Sections {@NumberOf break} and {@NumberOf space}). @End @Section lout-3.39/doc/expert/det_name0000644000076400007640000000562411363700677014645 0ustar jeffjeff@Section @Tag { named } @Title { Named parameters } @Begin @PP In addition to left and right (or body) parameters, a symbol may have any number of {@I {named parameters}}: parameter.named @SubIndex { @Code named parameter } named.par @Index { @Code named parameter } @ID @OneRow @Code { "def @Chapter" " named @Tag {}" " named @Title {}" " right x" "{" " ..." "}" } Their definitions appear in between those of any left and right parameters, and each is followed by a @I {default value} between default @Index { Default value of parameter } braces. When @Code "@Chapter" is invoked, its named parameters are given values in the following way: @ID @OneRow @Code { "@Chapter" " @Tag { intro }" " @Title { Introduction }" "{" " ..." "}" } That is, a list of named parameters appears immediately following the symbol, each with its value enclosed in braces. Any right parameter follows after them. They do not have to appear in the order they were defined, and they can even be omitted altogether, in which case the default value from the definition is used instead. @PP If the keyword @Code "compulsory" appears after @Code "named" and before the parameter's name, Lout will print a warning message whenever this parameter is missing. However it will still use the default value as just described. @PP A named @Code "@Tag" parameter tag.par @Index { @Code "@Tag" parameter, default value of } does not take its default value from the definition; instead, if a default value is needed, Lout invents a simple word which differs from every other tag. This is important, for example, in the production of numbered chapters and sections (Section {@NumberOf chapters}). The same thing occurs if there is a @Code "@Tag" parameter but its value is the empty object: the value will be replaced by an invented one. @PP Named parameters may have parameters, {@PageMark strange} as in the following definition: @ID @OneRow @Code { "def @Strange" " named @Format right @Val { [@Val] }" " right x" "{" " @Format x" "}" } The named parameter @Code "@Format" has right parameter {@Code "@Val"}, and the default value of @Code "@Format" is this parameter enclosed in brackets. When @Code "@Format" is invoked it must be supplied with a right parameter, which will replace {@Code "@Val"}. Thus, @ID @Code { "@Strange 27" } equals @Code "@Format 27" and so has result @ID { @Strange 27 } The @Code "@Format" symbol is like a definition with parameters whose body can be changed: @ID @OneRow @Code { "@Strange" " @Format { Slope @Font @Val. }" "27" } still equals {@Code "@Format 27"}, but this time the result is @ID { @Strange @Format { Slope @Font @Val. } 27 } In practice, examples of named parameters with parameters all have this flavour of format being separated from content; running headers (Section {@NumberOf pagelayout}) and printing styles for bibliographies (Section {@NumberOf biblio}) are two major ones. @End @Section lout-3.39/doc/expert/pre_hsca0000644000076400007640000000175111363700677014652 0ustar jeffjeff@Section @Title { "@HScale" and "@VScale" } @Tag { hscale } @Begin @PP hscale. @Index { @@HScale symbol } vscale. @Index { @@VScale symbol } scaling @Index { Scaling of object } @@HScale causes its right parameter to expand to fill the space available, by geometricallly scaling it: @ID @Code { "4i @Wide @HScale { 1 2 3 4 5 6 7 8 }" } has result @ID { 4i @Wide @HScale { 1 2 3 4 5 6 7 8 } } and @ID @Code { "0.5i @Wide @HScale { 1 2 3 4 5 6 7 8 }" } has result @ID { 0.5i @Wide @HScale { 1 2 3 4 5 6 7 8 } } @@HScale first applies @@HContract to its parameter, then horizontally scales it to the actual size. The principal mark of the right parameter has no effect on the result; the parameter is scaled to the actual size and positioned to fill the space available. (Taking account of alignment of the principal mark only causes trouble in practice.) @PP @@VScale is similar, but in a vertical direction. @@HScale and @@VScale each have both a @@OneCol and a @@OneRow effect. @End @Section lout-3.39/doc/expert/pre0000644000076400007640000000234711363700677013656 0ustar jeffjeff@Chapter @Title { Predefined symbols } @Tag { symbols } @Begin @BeginSections @Include { pre_begi } @Include { pre_conc } @Include { pre_font } @Include { pre_brea } @Include { pre_spac } @Include { pre_yuni } @Include { pre_cont } @Include { pre_colo } @Include { pre_ucol } @Include { pre_text } @Include { pre_outl } @Include { pre_lang } @Include { pre_oner } @Include { pre_wide } @Include { pre_hshi } @Include { pre_hexp } @Include { pre_hcon } @Include { pre_hlim } @Include { pre_hadj } @Include { pre_hsca } @Include { pre_hmir } @Include { pre_cove } @Include { pre_span } @Include { pre_scal } @Include { pre_rota } @Include { pre_back } @Include { pre_kshr } @Include { pre_rump } @Include { pre_inse } @Include { pre_oneo } @Include { pre_next } @Include { pre_case } @Include { pre_mome } @Include { pre_null } @Include { pre_gall } @Include { pre_head } @Include { pre_notr } @Include { pre_cros } @Include { pre_tagg } @Include { pre_open } @Include { pre_link } @Include { pre_data } @Include { pre_grap } @Include { pre_plai } @Include { pre_incg } @Include { pre_incr } @Include { pre_prep } @Include { pre_incl } @Include { pre_bend } @Include { pre_verb } @Include { pre_unde } @Include { pre_page } @EndSections @End @Chapter lout-3.39/doc/expert/det_lexi0000644000076400007640000001757111363700677014672 0ustar jeffjeff@Section @Tag { lexical } @Title { Lexical structure (words, spaces, symbols) and macros } @Begin @PP The input to Lout consists of a sequence of @I {textual units}, textual.unit @Index {Textual unit } which may be either {@I{white spaces}}, @I identifiers, @I delimiters, or @I {literal words}. Each is a sequence of @I characters chosen from: letter @Index { Letter character } other @Index { Other character } quote @Index { Quote character } escape @Index { Escape character } comment.char @Index { Comment character } underscore.char @Index { Underscore character } @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col B } { @Rowa A { letter } B { @Code "@ab-zAB-Z_" } @Rowa A { white space } B { @I { space formfeed tab newline } } @Rowa A { quote } B { @Code "\"" } @Rowa A { escape } B { @Code "\\" } @Rowa A { comment } B { @Code "#" } @Rowa A { other } B { @Code "!$%&'()*+,-./0123456789:;<=>?[]^`{|}~" } } Notice that @Code "@" and @Code "_" are classed as letters. Basser Lout accepts the accented letters of the ISO-LATIN-1 character set (depending on how it is installed), and these are also classed as letters. The ten digits are classed as `other' characters, and in fact the `other' class contains all 8-bit characters (except octal 0) not assigned to previous classes. @PP A @I {white space} is a sequence of one or more white space characters. white.space @Index { White space } formfeed @Index { Formfeed } space.f @Index { Space } Lout treats the formfeed character exactly like the space character; it is useful for getting page breaks when printing Lout source code. @PP A @I delimiter is a sequence of one or more `other' characters which delimiter @Index { Delimiter } is the name of a symbol. For example, @Code "{" and @Code "//" are delimiters. When defining a delimiter, the name must be enclosed in quotes: @ID @Code { "def \"^\" { {} ^& {} }" } but quotes are not used when the delimiter is invoked. A delimiter may have delimiters and any other characters adjacent, whereas identifiers may not be adjacent to letters or other identifiers. The complete list of predefined delimiters is @ID @OneRow @Code { { "/" @JL "//" @JL "^/" @JL "^//" } |2.2cx { "|" @JL "||" @JL "^|" @JL "^||" } |2.2cx { "&" @JL "^&" } |2.2cx { "&&" @JL "{" @JL "}" } } A longer delimiter like @Code "<=" will be recognised in preference to a shorter one like {@Code "<"}. @PP An @I identifier is a sequence of one or more letters which is the name of a identifier @Index { Identifier } symbol. It is conventional but not essential to begin identifiers with {@Code "@"}; Basser Lout will print a warning message if it finds an unquoted literal word (see below) beginning with {@Code "@"}, since such words are usually misspelt identifiers. The ten digits are not letters and may not appear in identifiers; and although the underscore character is a letter and may be used in identifiers, it is not conventional to do so. The complete list of predefined identifiers is @CD @OneRow @Code { { "@BackEnd" @JL "@Background" @JL "@Begin" @JL "@BeginHeaderComponent" @JL "@Break" @JL "@Case" @JL "@ClearHeaderComponent" @JL "@Common" @JL "@Char" @JL "@CurrFace" @JL "@CurrFamily" @JL "@CurrLang" @JL "@CurrYUnit" @JL "@CurrZUnit" @JL "@Database" @JL "@Enclose" @JL "@End" @JL "@EndHeaderComponent" @JL "@Filter" @JL "@FilterErr" @JL "@FilterIn" @JL "@FilterOut" @JL "@Font" @JL "@FontDef" @JL "@ForceGalley" @JL "@Galley" @JL "@GetContext" @JL "@Graphic" @JL "@HAdjust" @JL "@HContract" @JL "@HCover" @JL "@HExpand" @JL "@High" @JL "@HLimited" @JL "@HMirror" @JL "@HScale" @JL "@HShift" } |4.4cx { "@HSpan" @JL "@Include" @JL "@IncludeGraphic" @JL "@IncludeGraphicRepeated" @JL "@Insert" @JL "@KernShrink" @JL "@Key" @JL "@Language" @JL "@LClos" @JL "@LEnv" @JL "@LInput" @JL "@LUse" @JL "@LinkSource" @JL "@LinkDest" @JL "@Meld" @JL "@Merge" @JL "@Minus" @JL "@Moment" @JL "@Next" @JL "@NotRevealed" @JL "@Null" @JL "@OneCol" @JL "@OneOf" @JL "@OneRow" @JL "@Open" @JL "@Optimize" @JL "@Outline" @JL "@PAdjust" @JL "@PageLabel" @JL "@PlainGraphic" @JL "@Plus" @JL "@PrependGraphic" @JL "@RawVerbatim" @JL "@Rotate" @JL "@Rump" @JL "@Scale" @JL "@SetColor" } |4.4cx { "@SetColour" @JL "@SetContext" @JL "@SetHeaderComponent" @JL "@Space" @JL "@StartHSpan" @JL "@StartHVSpan" @JL "@StartVSpan" @JL "@SysDatabase" @JL "@SysInclude" @JL "@SysIncludeGraphic" @JL "@SysIncludeGraphicRepeated" @JL "@SysPrependGraphic" @JL "@Tag" @JL "@Tagged" @JL "@Target" @JL "@Texture" @JL "@SetTexture" @JL "@Underline" @JL "@SetUnderlineColor" @JL "@SetUnderlineColour" @JL "@Use" @JL "@URLLink" @JL "@VAdjust" @JL "@VContract" @JL "@VCover" @JL "@Verbatim" @JL "@VExpand" @JL "@VLimited" @JL "@VMirror" @JL "@VScale" @JL "@VShift" @JL "@VSpan" @JL "@Wide" @JL "@Yield" @JL "@YUnit" @JL "@ZUnit" } } plus the names of the parameters of @@Moment. The symbols @@LClos, @@LEnv, lclos @Index { @@LClos symbol } lenv @Index { @@LEnv symbol } linput @Index { @@LInput symbol } lvis @Index { @@LVis symbol } luse @Index { @@LUse symbol } @@LInput, @@LVis and @@LUse appear in cross reference databases generated by Lout and are not for use elsewhere. @PP A sequence of characters which is neither a white space, an identifier, nor a delimiter, is by default a @I {literal word}, which means that it will word @Index { Word } literal.word @Index { Literal word } quoted.word @Index { Quoted word } pass through Lout unchanged. An arbitrary sequence of characters enclosed in double quotes, for example @Code "\"{ }\"", is also a literal word. Space characters may be included, but not tabs or newlines. There are special character sequences, used only between quotes, for obtaining otherwise inaccessible characters: @ID @Tab vmargin { 0.5vx } @Fmta { @Col A ! @Col B } { @Rowa A { @Code "\\\"" } B { produces @Code "\"" } @Rowa A { @Code "\\\\" } B { "\\" } @Rowa A { @Code "\\ddd" } B { the character whose ASCII code is } @Rowa A { } B { the up to three digit octal number {@Code ddd} } } So, for example, @Code "\"\\\"@PP\\\"\"" produces {@Code "\"@PP\""}. @PP When the comment character comment @Index { Comment } @Code "#" is encountered, everything from that point to the end of the line is ignored. This is useful for including reminders to oneself, like this: @ID @OneRow @Code { "# Lout user manual" "# J. Kingston, June 1989" } for temporarily deleting parts of the document, and so on. @PP @I Macros macro @Index { Macro } provide a means of defining symbols which stand for a sequence of textual units rather than an object. For example, the macro definition @ID @Code { "macro @PP { //1.3vx 2.0f @Wide &0i }" } makes Lout replace the symbol @Code "@PP" by the given textual units before assembling its input into objects. A similar macro to this one is used to separate the paragraphs of the present document. The enclosing braces and any spaces adjacent to them are dropped, which can be a problem: @Code "@PP2i" has result {@Code "//1.3vx 2.0f @Wide &0i2i"} which is erroneous. @PP The meaning of symbols used within the body of a macro is determined by where the macro is defined, not by where it is used. Due to implementation problems, @@Open symbols will not work within macros. Named and body parameters will work if the symbol that they are parameters of is also present. There is no way to get a left or right brace into the body of a macro without the matching brace. @PP Macros may be nested within other definitions and exported, but they may not be parameters. They may not have parameters or nested definitions of their own, and consequently a preceding @Code export clause (Section {@NumberOf visibility}) would be pointless; however, an @Code import clause is permitted. @End @Section lout-3.39/doc/expert/pre_font0000644000076400007640000002316511363700677014705 0ustar jeffjeff@Section @Title { {"@Font"}, {"@Char"}, and "@FontDef" } @Tag { font } @Begin @PP A @I font font. @Index { Fonts } is a collection of characters which may be printed. Many fonts come in {@I families}, family @Index { Family of a font } face @Index { Face of a font } which are groups of fonts that have been designed to go together. For example, the Times family includes the following fonts: @ID { Times Base } @Font { Base @Font { Times Base } //1vx Slope @Font { Times Slope } //1vx Bold @Font { Times Bold } //1vx BoldSlope @Font { Times BoldSlope } } Thus, each font has two names: its @I { family name } (Times, Helvetica, etc.) and its @I { face name } (Base, Slope, etc.). Times Base is more commonly called Times Roman, and Times Slope is more commonly called Times Italic. Lout avoids these names in favour of generic names which can be applied to many font families. @PP Ligatures, ligatures @Index Ligatures kerning @Index Kerning such as fl for {@OneCol f}l and fi for {@OneCol f}i, are considered by Basser Lout to be an integral part of the font: if the font definition (see below) mentions them, they will be used. Similarly, kerning (fine adjustment of the space between adjacent characters to improve the appearance) is done whenever indicated in the font definition. Enclosing one of the letters in @@OneCol is one sure way to disable a ligature or kern. You can also turn off ligatures using @ID @Code "nolig @Font { ... }" and turn them on with @ID @Code "lig @Font { ... }" Since they are on initially this second option is rarely needed. @PP More generally, the @@Font symbol font.sym @Index { @@Font symbol } returns its right parameter in a font and size specified by its left: @ID { @Code "{ Times Base 12p } @Font" @I object } The family and face names must have appeared together in a {@Code "@FontDef"} (see below); the size is arbitrary and may be given in any one of the {@Code "c"}, {@Code "i"}, {@Code "p"}, {@Code "m"}, {@Code "f"}, {@Code "s"}, and {@Code "v"} units of measurement (Section {@NumberOf concatenation}), although @Code 10p and @Code 12p are the most common sizes for text. There may be empty objects and @@Null objects in the left parameter of @@Font; these are ignored. @PP When a @@Font symbol is nested inside the right parameter of another @@Font symbol, the inner one determines the font of its own right parameter. However, it may be abbreviated so as to inherit part of the outer symbol: @ID @Code { "{ Times Base 12p } @Font" "{ hello, Slope @Font hello, 15p @Font hello }" } has result @ID { { Times Base 12p } @Font { hello, Slope @Font hello, 15p @Font hello } } The first inner @@Font inherits the outer family and size, changing only the face; the second inherits the outer family and face. When a family name is given, it must be followed immediately by a face name. A size change may appear first or last. @PP Sizes of the form +{@I length} and --{@I length} may also be used, meaning that the font size is to be @I length larger or smaller than the inherited value. For example, --{@Code "2p"} is often used for superscripts and subscripts. These forms are highly recommended, since they don't need to be changed if a decision is made to alter the font size of the document as a whole. @PP The @@Font symbol also switches to and from small capitals: "smallcaps" @Index { small capitals } @ID @Code { "smallcaps @Font ..." "nosmallcaps @Font ..." } These may be nested, and they cooperate with other font changes. The precise effect depends on the font (see below). There is a default value (@Code {"nosmallcaps"}), so it is not necessary to mention this attribute when giving an initial font. @PP By default, the size of the small capitals is 0.7 times the size of full-size capitals. You can change this ratio, for example to 0.8, using @ID @Code "{ setsmallcaps 0.8 } @Font ..." This does not itself cause a change to small capitals, but wherever they are used in the right parameter of @Code "@Font" they will have size 0.8 times the size that ordinary capitals would have had at that point. Note that the number following @Code "setsmallcaps" is a ratio, not a length, so there is no unit of measurement. @PP The @@Font symbol also controls a feature added in Version 3.25 which determines where the row mark is placed in a word. Usually, as described elsewhere in this document, the row mark passes through the word at a height of half the height of the letter `x' above the baseline of the word. However this can be changed so that it passes through the baseline, or not, like this: @ID @Code { "baselinemark @Font ..." "xheight2mark @Font ..." } The default value is {@Code xheight2mark}; this was how Lout did it before this option was added, because it makes equation formatting easy. The other value, {@Code baselinemark}, is useful when words in different font sizes appear side by side on a line. @PP Finally, a feature added in Version 3.33 requests that the height and depth of every character be increased to the `bounding box' size of the font -- that is, to the height of the font's highest character and the depth of the font's deepest character. Ensuring in this way that every character has the same height and depth can make documents more uniform in layout. To get this feature, use @ID @Code { "strut @Font ..." } either alone or combined with other options to {@Code "@Font"}. It is called @Code strut because it is like inserting an invisible vertical strut into every non-empty word. By default struts are off; but anyway if you need to turn them off for some reason, use {@Code "nostrut @Font"}. Struts are always turned off in equations, for example, because they are not appropriate for equation formatting. @PP There are two predefined symbols, @@CurrFamily and @@CurrFace, which respectively return the family and face names of the current font. For example, right now @@CurrFamily is @CurrFamily and @@CurrFace is @CurrFace. @PP To inform Lout that certain fonts exist, it is necessary to create a database of @Code "@FontDef" symbols. (It is possible to have a @Code "@FontDef" symbol in an ordinary source file; it enters the cross-reference database in the usual way and is retrieved from there by the font machinery, but only from the second run, which is not convenient.) A typical entry in such a database looks like this: @ID @OneRow @Code @Verbatim { { @FontDef @Tag { Times-Base } @Family { Times } @Face { Base } @Name { Times-Roman } @Metrics { Ti-Rm } @Mapping { LtLatin1.LCM } } } This entry informs Lout of the existence of a font whose family name is the value of {@Code "@Family"} and whose face name is the value of {@Code "@Face"}. The @Code "@Tag" value must be exactly equal to {@Code "@Family"} followed by a hyphen followed by {@Code "@Face"}. There are a few fonts which are the only members of their families; even though these fonts do not need a face name, they must be given one, probably {@Code Base}, by their {@Code "@FontDef"}. @PP The other fields are implementation-dependent, but in Basser Lout Version 3 they are {@Code "@Name"}, a PostScript font name; {@Code "@Metrics"}, an adobe @Index { Adobe Systems, Inc. } Adobe font metrics (formerly AFM) file whose FontName entry must agree with the PostScript font name just mentioned; and {@Code "@Mapping"}, the name of a Lout Character Mapping (LCM) file. The files are searched for in standard places. Consult the PostScript Reference Manual @Cite { $adobe1990ps } for general information about fonts and encoding vectors; briefly, an 8-bit lcm. @Index { LCM file } character code @I c in Lout's input is mapped to the character in the Adobe font metrics file whose name appears on the line labelled @I c in the LCM file. The LCM file also defines various character-to-character mappings, such as upper-case to lower-case, which are used for such purposes as the production of small capitals. @PP The options shown above are all compulsory, but there are two other options which are optional. The @Code "@Recode" option, if given, must have value @Code "Yes" (the default, so rarely seen) or {@Code "No"}. If @Code "@Recode { No }" is given, Lout assumes that the given encoding vector is already associated with this font in the PostScript interpreter, and optimizes its output accordingly. @PP The other optional option, {@Code "@ExtraMetrics"}, has value equal to the name of a second font metrics file which, if given, is added to the main one defined by {@Code "@Metrics"}. This extra metrics file contains @Code "C" (define character) and @Code "CC" (define composite character) entries in the same format as in AFM files; Lout will build composite characters declared in this extra file from the given pieces, which it does not do for composite characters in the main AFM file. There are example extra metrics files in the current Lout distribution which show the precise format of these files. @PP It is not possible to have two @Code "@FontDef" database entries with the same family and face names, because then they must have the same {@Code "@Tag"}, which is not allowed. However, a PostScript font name and file may appear in two or more font definitions, allowing one PostScript font to have two or more equally valid Lout names. The LCM files may be equal or different as desired. @PP The @@Char symbol char @Index { @@Char symbol } allows a character to be specified by its name (its PostScript name in Basser Lout) rather than by its code: @ID @Code "@Char nine" is equivalent to @Code "9" in most fonts. This is useful as a documentation aid and to be sure of getting the right character even if the encoding vector of the font is changed. However @@Char will fail if the character named is not in the encoding vector of the current font. @End @Section lout-3.39/doc/expert/pre_incg0000644000076400007640000000336711363700677014661 0ustar jeffjeff@Section @Title { "@IncludeGraphic" and "@SysIncludeGraphic" } @Tag { includegraphic } @Begin @PP includegraphic.sym @Index { @@IncludeGraphic symbol } sysincludegraphic.sym @Index { @@SysIncludeGraphic symbol } postscript.includegraphic @SubIndex { used by @@IncludeGraphic } These symbols instruct Lout to incorporate a separately created illustration: @ID @Code "@IncludeGraphic \"myportrait.eps\"" The parameter is implementation-dependent; in Basser Lout it is an object whose value is a simple word denoting the name of a file. This file should ideally be a PostScript EPS Version 3.0 file @Cite { $adobe1990ps }, since then Lout will keep careful track of what resources are required for printing that file. However, any PostScript file containing the @Code "%%BoundingBox:" comment and not requiring unusual resources is likely to work. @PP The result of @@IncludeGraphic is an ordinary Lout object with marks through its centre. It may be rotated, scaled, and generally treated like any other object. Basser Lout determines its size by consulting the bounding box information in the file. If this cannot be found, a warning message is printed and the result object has zero size. @PP @@IncludeGraphic searches the same directories that @@Include does (Section {@NumberOf include}). @@SysIncludeGraphic is the same as @@IncludeGraphic, except that it searches only the directories searched by @@SysInclude. @PP If the file name ends in any of {@Code ".gz"}, {@Code "-gz"}, {@Code ".z"}, {@Code "-z"}, {@Code "_z"}, or {@Code ".Z"}, the file will first be uncompressed using the @Code "gunzip" command into a temporary file called @Code "lout.eps" in the current directory. This file is removed immediately after it is copied into the output file. @End @Section lout-3.39/doc/expert/pre_case0000644000076400007640000000376011363700677014651 0ustar jeffjeff@Section @Title { "@Case" } @Tag { case } @Begin @PP case.sym @Index { @@Case symbol } yield.sym @Index { @@Yield symbol } The @@Case symbol selects its result from a list of alternatives, depending on a tag: @ID @Code { "@Day @Case {" " { 1 21 31 } @Yield st" " { 2 22 } @Yield nd" " { 3 23 } @Yield rd" " else @Yield th" "}" } In this example the result will be st if @Code "@Day" is 1, 21, or 31, and nd if @Code "@Day" is 2 or 22, etc. The effect is similar to accessing a database, though in a more compact form. The right parameter is a sequence of @@Yield symbols, each with a left parameter whose value is a sequence of one or more juxtapositions of simple words, and a right parameter which may be any object. @PP We first describe the behaviour when the value of the left parameter of @@Case is a juxtaposition of one or more simple words. Then the result of the @@Case is the right parameter of the first @@Yield whose left parameter contains either the value of the left parameter of the @@Case, or the special value {@Code else}. If there is no such @@Yield it is an error. @PP When the left parameter of @@Case is not a juxtaposition of simple words, the result is the right parameter of the first @@Yield whose left parameter is {@Code else}, or an error otherwise. This permits examples like @ID @Code { "@RunningTitle @Case {" " dft @Yield @Title" " else @Yield @RunningTitle" "}" } where a running title is returned unless it has the value {@Code dft} (which presumably means that no running title was supplied), in which case an ordinary title is returned instead. @PP When a receptive symbol is placed within a @@Case, it should be included in each alternative, since otherwise Basser Lout may become confused when trying to predict whether the symbol will be a part of the result or not. Alternatively, if it can be guaranteed that the receptive symbol will never be searched for when the cases that it does not lie within are selected, that is all right too. @End @Section lout-3.39/doc/expert/pri_defi0000644000076400007640000002062211363700677014645 0ustar jeffjeff@Section @Title { Definitions } @Tag { definitions } @Begin @PP The features of Lout are very general. They do not assume that documents are composed of pages, nor that there are such things as margins and footnotes, for example. @I Definitions definitions. @Index { Definitions } bridge the gap between Lout's general features and the special features -- footnotes, equations, pages -- that particular documents require. They hold the instr&-uct&-ions for producing these special features, conveniently packaged ready for use. @PP For example, consider the challenge posed by `@TeX', which is the name of one of Lout's most illustrious rivals @Cite { $knuth1984tex }. Lout solves it easily enough, like this: @ID @Code { "T{ /0.2fo E }X" } but to type this every time @TeX is mentioned would be tedious and error-prone. So we place a definition at the beginning of the document: @ID @Code { "def @TeX { T{ /0.2fo E }X }" } Now @Code "@TeX" stands for the object following it between braces, and we may write @ID @Code { consider the challenge posed by "`@TeX'", ... } as the author did earlier in this paragraph. @PP A @I symbol symbol. @Index Symbol is a name, like {@Code "@TeX"}, which stands for something other than itself. The initial @Code "@" is not compulsory, but it does make the name stand out clearly. A @I definition of a symbol declares a name to be a symbol, and says what the symbol stands for. The @I body of a definition body.of @Index { Body of a definition } is the part following the name, between the braces. To @I invoke invocation @Index { Invocation of a symbol } a symbol is to make use of it. @PP Another expression ripe for packaging in a definition is @ID @Code { "@OneRow { | -2p @Font n ^/0.5fk 2 }" } which produces @OneRow { | -2p @Font n ^/0.5sk 2 } (see Chapter {@NumberOf details}). But this time we would like to be able to write @ID { @I object @Code "@Super" @I object } so that @Code { a "@Super" 2 } would come out as {a @Super 2}, and so on, for in this way the usefulness of the definition is greatly increased. Here is how it is done: @ID @OneRow @Code { "def @Super" " left x" " right y" "{ @OneRow { | -2p @Font y ^/0.5fk x }" "}" } This definition says that @Code "@Super" has two {@I parameters}, parameter @Index Parameter @Code x and {@Code y}. When @Code "@Super" is invoked, all occurrences of @Code x in the body will be replaced by the object just to the left of {@Code "@Super"}, and all occurrences of @Code y will be replaced by the object just to the right. So, for example, the expression @ID @Code { "2 @Super { Slope @Font n }" } is equal to @ID @Code { "@OneRow { | -2p @Font { Slope @Font n } ^/0.5fk 2 }" } and so comes out as {2 @Super {Slope @Font n}}. @PP Lout permits definitions to invoke themselves, a peculiarly circular thing to do which goes by the name of recursion @Index Recursion @I recursion. Here is an example of a recursive definition: @ID @Code { "def @Leaders { .. @Leaders }" } The usual rule is that the value of an invocation of a symbol is a copy of the body of the symbol's definition, so the value of @Code "@Leaders" must be @ID @Code { ".. @Leaders" } But now this rule applies to this new invocation of {@Code "@Leaders"}; substituting its body gives @ID @Code { ".. .. @Leaders" } and so on forever. In order to make this useful, an invocation of a recursive symbol is replaced by its body only if sufficient space is available. So, for example, @ID @Code { "4i @Wide { Chapter 7 @Leaders 62 }" } has for its result the object @ID { 4i @Wide { Chapter 7 @Leaders 62 } } with Lout checking before each replacement of @Code "@Leaders" by @OneCol @Code { ".." "@Leaders" } that the total length afterwards, including the other words, would not exceed four inches. @PP The remaining issue is what happens when Lout decides that it is time to stop. The obvious thing to do is to replace the last invocation by an empty object: @ID @Code { ".. .. .. .. .. .. .. .. {}" } As the example shows, this would leave a small trailing space, which is a major headache. Lout fixes this by replacing the last invocation with a different kind of empty object, called @@Null, whose effect is to make an adjacent concatenation symbol disappear, preferably one preceding the @@Null. Thus, when Lout replaces @Code "@Leaders" by @@Null in the expression @ID @Code { ".. .. .. .. .. .. .. .. @Leaders" } the trailing space, which is really a horizontal concatenation symbol, disappears as well. This is taken into account when deciding whether there is room to replace @Code "@Leaders" by its body. @PP The remainder of this section is devoted to showing how definitions may be used to specify the @I {page layout} page.layout @RawIndex { Page layout } page.layout.basic @SubIndex { principles of } of a document. To begin with, we can define a page like this: @ID @OneRow @Code { "def @Page" "{" " //1i ||1i" " 6i @Wide 9.5i @High" " { @TextPlace //1rt @FootSect }" " ||1i //1i" "}" } Now @Code "@Page" is an eight by eleven and a half inch object, with one inch margins, a place at the top for text, and a section at the bottom for footnotes (since @Code "//1rt" bottom-justifies the following object). It will be convenient for us to show the effect of invoking @Code "@Page" like this: @ID @Code { { //0.5ix 8p @Font "@Page" &2m => } &2m @LittlePage { "@TextPlace" //1rt "@FootSect" } } with the invoked symbol appearing to the left of the arrow, and its body to the right. @PP The definition of a vertical list of pages should come as no surprise: @ID @OneRow @Code { "def @PageList" "{" " @Page // @PageList" "}" } This allows invocations like the following: @ID @Code @HExpand @HScale { { //0.5ix 8p @Font "@PageList" } ||1m { //0.5ix => } ||1m { @LittlePage { "@TextPlace" //1rt "@FootSect" } //0.2c 8p @Font "@PageList" } ||1m { //0.5ix => } ||1m { @LittlePage { "@TextPlace" //1rt "@FootSect" } // @LittlePage { "@TextPlace" //1rt "@FootSect" } //0.2c 8p @Font "@PageList" } ||1m { //0.5ix => } ||1m { @LittlePage { "@TextPlace" //1rt "@FootSect" } // @LittlePage { "@TextPlace" //1rt "@FootSect" } } } setting @Code "@PageList" to @Code @@Null on the last step. Any number of pages can be generated. @PP A definition for @Code "@TextPlace" is beyond us at present, since @Code "@TextPlace" must be replaced by different parts of the text of the document on different pages. But we can define @Code "@FootSect" to be a small space followed by a horizontal line followed by a list of places where footnotes go: @ID @OneRow @Code { "def @FootList " "{ " " @FootPlace //0.3v @FootList" "} " " " "def @FootSect" "{ " " //0.3v 1i @Wide @HLine" " //0.3v @FootList " "} " } assuming that @Code "@HLine" will produce a horizontal line of the indicated width. With this definition we can generate pages like this: @ID @Code { @LittlePage { "@TextPlace" //1rt "@FootSect" } ||2m { //0.5ix => } ||2m @LittlePage { "@TextPlace" //1rt @OneRow { 1c @Wide @HLine //0.1c "@FootList" } } ||2m { //0.5ix => } ||2m @LittlePage { "@TextPlace" //1rt @OneRow { 1c @Wide @HLine //0.1c "@FootPlace" //0.1c "@FootList" } } } and so on for arbitrarily many footnotes. @PP We will see in the next section how invocations of @Code "@PageList", @Code "@FootSect" and @Code "@FootList" are replaced by their bodies only when the need to insert text and footnotes obliges Lout to do so; otherwise the invocations are replaced by @@Null. In this way, the right number of pages is made, the small line appears only on pages that have at least one footnote, and unnecessary concatenation symbols disappear. @PP This approach to page layout is the most original contribution Lout has made to document formatting. It is extraordinarily flexible. Two-column pages? Use @ID @Code { "{2.8i @Wide @TextPlace} ||0.4i {2.8i @Wide @TextPlace}" } instead of {@Code "@TextPlace"}. Footnotes in smaller type? Use @Code { -2p "@Font" "@FootPlace" } instead of {@Code "@FootPlace"}. And on and on. @End @Section lout-3.39/doc/expert/pre_grap0000644000076400007640000002107711363700677014670 0ustar jeffjeff@Section @Title { "@Graphic" } @Tag { graphic } @Begin @PP graphic.sym @Index { @@Graphic symbol } diagrams @Index { Diagrams } Lout does not provide the vast repertoire of graphical objects (lines, circles, boxes, etc.) required by diagrams. Instead, it provides an escape route to some other language that does have these features, via its @@Graphic symbol: postscript.graphic @SubIndex { used by @@Graphic } @ID @OneRow @OneRow @Code { "{ 0 0 moveto" " 0 ysize lineto" " xsize ysize lineto" " xsize 0 lineto" " closepath" " stroke" "}" "@Graphic" "{ //0.2c" " ||0.2c hello, world ||0.2c" " //0.2c" "}" } The result of the above invocation of the symbol @@Graphic is @ID @OneRow @OneRow { @BackEnd @Case { PostScript @Yield { { 0 0 moveto 0 ysize lineto xsize ysize lineto xsize 0 lineto closepath stroke } @Graphic { //0.2c ||0.2c hello, world ||0.2c //0.2c } } PDF @Yield { { 0 0 m 0 __ysize l __xsize __ysize l __xsize 0 l s } @Graphic { //0.2c ||0.2c hello, world ||0.2c //0.2c } } } } @PP The right parameter always appears as part of the result, and indeed the result is always an object whose size is identical to the size of the right parameter with @@OneCol and @@OneRow applied to it. From now on we refer to this part of the result as the {@I base}. @PP The left parameter is implementation-dependent: that is, its meaning is not defined by Lout, and different implementations could require different values for it. The following description applies to Basser Lout, which uses the PostScript page description language @Cite { $adobe1990ps }. Similar but more restricted possibilities exist with the PDF back end (see a separate document distributed with Lout); to include both, use the @@BackEnd symbol like this: @ID @OneRow @Code { "{ @BackEnd @Case {" " PostScript @Yield" " {" " ..." " }" " PDF @Yield" " {" " ..." " }" " }" " @Graphic" " {" " ..." " }" "}" } Returning to PostScript, the left parameter refers to a coordinate system whose origin is the bottom left-hand corner of the base. It may use the symbols @Code xsize and @Code ysize to denote the horizontal and vertical size of the base; similarly, @Code xmark and @Code ymark denote the positions of the base's column and row marks: @ID @OneRow 9p @Font @Fig { { &1rt @I ysize /0ik &1rt @I ymark /0ik &1rt 0 } |0.4c { / |0ik @ShowMarks { 1c @High 1.5c @Wide ^| 3c @Wide ^/ 2c @High } |0ik / } /0.2c | 0 | @I xmark | @I xsize } In addition to these four symbols and 0, lengths may be denoted in centimetres, inches, points, ems, f's, v's and s's using the notation @ID @OneRow @Tab vmargin { 0.5vx } hmargin { 1m } @Fmta { @Col {@I l @Code A} ! @Col {instead of Lout's} ! @Col {{@I l}B} } { @Rowa A { cm } B { c } @Rowa A { in } B { i } @Rowa A { pt } B { p } @Rowa A { em } B { m } @Rowa A { ft } B { f } @Rowa A { vs } B { v } @Rowa A { sp } B { s } } Note that there must be a space between the number and its unit, unlike Lout proper. @PP A point within the base (and, with care, a point outside it) may be denoted by a pair of lengths. For example, @ID @OneRow @Code { "xmark ymark" } is the point where the marks cross, and @ID @OneRow @Code { "0 2 cm" } is a point on the left edge, two centimetres above the bottom left-hand corner. These two numbers are called the @I {x coordinate} and the @I {y coordinate} of the point. @PP The first step in specifying a graphic object is to define a {@I path}. A path can be thought of as the track of a pen moving over the page. The pen may be up (not drawing) or down (drawing a line or curve) as it moves. The entire path is a sequence of the following items: @LP 2i @Wide { |1rt @I {x y} @Code moveto } |2m Lift the pen and move it to the indicated point. @JP 2i @Wide { |1rt @I {x y} @Code lineto } |2m Put the pen down and draw a straight line to the indicated point. @JP 2i @Wide { |1rt @I {x y r angle1 angle2} @Code arc } |2m Put the pen down and draw a circular arc whose centre has coordinates @I x and @I y and whose radius is {@I r}. The arc begins at the angle @I angle1 measuring counterclockwise from the point directly to the right of the centre, and proceeds counterclockwise to {@I angle2}. If the arc is not the first thing on the path, a straight line will be drawn connecting the current point to the start of the arc. @JP 2i @Wide { |1rt @I {x y r angle1 angle2} @Code arcn } |2m As for arc, but the arc goes clockwise from @I angle1 to {@I angle2 }. @JP 2i @Wide @Code { |1rt closepath } |2m Draw a straight line back to the point most recently moved to. @LP The first item should always be a {@Code moveto}, {@Code arc}, or {@Code arcn}. It should be clear from this that the path given earlier: @ID @OneRow @Code { "0 0 moveto" "0 ysize lineto" "xsize ysize lineto" "xsize 0 lineto" "closepath" } traces around the boundary of the base with the pen down. @PP Once a path is set up, we are ready to @I paint it onto the page. There are two choices: we can either @I stroke it, which means to display it as described; or we can @I fill it, which means to paint everything inside it grey or black. For stroking the two main options are @IL @LI { 2i @Wide { |1rt @I length @Code setlinewidth } |2m The pen will draw lines of the given width. } @LI { 2i @Wide { |1rt @Code "[" @I length @Code {"]" 0 setdash} } |2m The pen will draw dashed lines when it is down, with the dashes each of the given length. } @EL These options are followed by the word {@Code "stroke"}. So, for example, @ID @OneRow @Code { "{ 0 0 moveto xsize 0 lineto" " 2 pt setlinewidth [ 5 pt ] 0 setdash stroke" "}" "@Graphic { 3i @Wide }" } has result @ID @OneRow { @BackEnd @Case { PostScript @Yield { { 0 0 moveto xsize 0 lineto 2 pt setlinewidth [ 5 pt ] 0 setdash stroke } @Graphic { 3i @Wide } } PDF @Yield { { [ __mul(5, __pt) ] 0 d __mul(2, __pt) w 0 0 m __xsize 0 l S } @Graphic { 3i @Wide } } } } @PP When filling in the region enclosed by a path, the main option is {@Code setgray}, which determines the shade of grey to use, on a scale from 0 (black) to 1 (white). So, for example, @ID @OneRow @Code { "{ 0 0 moveto xsize 0 lineto 0 ysize lineto closepath" " 0.8 setgray fill" "}" "@Graphic" "{ 2c @Wide 2c @High }" } has result @ID @OneRow { @BackEnd @Case { PostScript @Yield { { 0 0 moveto xsize 0 lineto 0 ysize lineto closepath 0.8 setgray fill } @Graphic { 2c @Wide 2c @High } } PDF @Yield { { 0 0 m __xsize 0 l 0 __ysize l h 0.8 g f } @Graphic { 2c @Wide 2c @High } } } } @PP There are many other options. The value of the left parameter of @@Graphic may be any fragment of the PostScript page description language @Cite { $adobe1990ps }. Here are two other examples: @ID @OneRow @Code { xsize 2 div } denoting a length equal to half the horizontal size of the base, and @ID @OneRow @Code { gsave fill grestore stroke } which both fills and strokes the path. Since Basser Lout does not check that the left parameter is valid PostScript, it is possible to cause mysterious errors in the printing device, resulting in no output, if an incorrect value is given. It is a good idea to encapsulate graphics objects in carefully tested definitions, like those of the Diag figure drawing package @Cite { $kingston1995lout.user, Chapter 9 }, diag @Index { Diag diagram-drawing package } to be sure of avoiding these errors. @PP PostScript experts may find the following information helpful when designing advanced graphics features. The left parameter of @@Graphic may have two parts, separated by {@Code "//"}: @ID @OneRow { @Code "{" @I {first part} @Code "//" @I {second part} @Code "} @Graphic" @I object } If there is no {@Code "//"}, the second part is taken to be empty. The PostScript output has the form @ID @OneRow lines @Break { @Code gsave @I x @I y @Code translate @I {Code which defines {@Code xsize}, {@Code ysize}, {@Code xmark}, {@Code ymark}, {@Code ft}, {@Code vs}, and {@Code sp} } @Code gsave @I {first part} @Code grestore @I {Code which renders the right parameter in translated coordinates} @I {second part} @Code grestore } where @Eq {x, y} is the position of the lower left corner of the base. Having two parts permits bracketing operations, like @Code save and @Code restore or @Code begin and {@Code end}, to enclose an object. See the source file of the Diag package for examples. @End @Section lout-3.39/doc/expert/pre_rota0000644000076400007640000000302011363700677014670 0ustar jeffjeff@Section @Title { "@Rotate" } @Tag { rotate } @Begin @PP rotate.sym @Index { @@Rotate symbol } rotation @Index { Rotation of object } The @@Rotate symbol will rotate its right parameter counterclockwise an amount given in degrees (positive or negative) by its left parameter. For example, @ID @Code { "30d @Rotate { hello, world }" } has result @ID { 30d @Rotate { hello, world } } Before rotating the object, @@OneCol and @@OneRow are applied to it. The result is a rectangle whose marks pass through the point where the original marks crossed: @ID { @ShowMarks { 0.6c @Wide 0.3c @High ^| 2.2c @Wide ^/ 0.2c @High } &4m => &4m @ShowMarks { 30d @Rotate { @ShowMarks { 0.6c @Wide 0.3c @High ^| 2.2c @Wide ^/ 0.2c @High } } } } As this example shows, rotation by an angle other than a multiple of ninety degrees introduces quite a lot of white space. So, for example, the result of @ID { @Code { "-30d" "@Rotate" 30d "@Rotate" } @I object } is a much larger object than {@I object}, despite the fact that one rotation cancels the other. @PP Rotation of objects containing receptive and recursive symbols is permitted, but for angles other than multiples of ninety degrees it is best to make the size of the rotated object clear with @@Wide and @@High symbols: @ID @Code { "30d @Rotate 5i @Wide 4i @High" "{ //1i @TextPlace" " //1i" "}" } This is because for angles other than multiples of ninety degrees the space available for @Code "@TextPlace" to occupy is indeterminate, and the result is poor. @End @Section lout-3.39/doc/expert/pre_gall0000644000076400007640000000104611363700677014650 0ustar jeffjeff@Section @Title { "@Galley" and "@ForceGalley" } @Tag { galley } @Begin @PP These symbols galley.sym @Index { @@Galley symbol } forcegalley.sym @Index { @@ForceGalley symbol } both act as a placeholder for a galley. That is, they may be replaced by components of a galley. In the case of @@ForceGalley the galley will then have a forcing galley effect at this point although it need not be declared using {@Code "force into"}. See Section {@NumberOf targets} for a detailed discussion of galleys, forcing galleys, and targets. @End @Section lout-3.39/doc/expert/pre_incr0000644000076400007640000000461311363700677014667 0ustar jeffjeff@Section @Title { "@IncludeGraphicRepeated" and "@SysIncludeGraphicRepeated" } @Tag { includegraphicrepeated } @Begin @PP includegraphicrepeated.sym @Index { @@IncludeGraphicRepeated symbol } sysincludegraphicrepeated.sym @Index { @@SysIncludeGraphicRepeated symbol } postscript.includegraphicrepeated @SubIndex { used by @@IncludeGraphicRepeated } These symbols, which are allowed only at the start of a document, tell Lout that the EPS file named is likely to be included repeatedly: @ID @Code "@IncludeGraphicRepeated { myportrait.eps }" To actually see the graphic you use @@IncludeGraphic as usual. The purpose of @@IncludeGraphicRepeated is not to display the graphic but rather to instruct Lout to include its EPS file in the output file just once, at the start, rather than over and over again for every time it appears in an @@IncludeGraphic, as would otherwise occur. @PP Any number of @@IncludeGraphicRepeated and @@SysIncludeGraphicRepeated directives may appear at the start of the document. The files involved may be compressed as for @@IncludeGraphic. The file names given within @@IncludeGraphicRepeated must be identical to the name used within the corresponding @@IncludeGraphic symbols, or else the @@IncludeGraphicRepeated will be ineffective. If @@SysIncludeGraphicRepeated is used (as opposed to @@IncludeGraphicRepeated) then all corresponding includes must use @@SysIncludeGraphic rather than @@IncludeGraphic. @PP Use of @@IncludeGraphicRepeated does not change the appearance of the output at all, but, if the EPS file would otherwise be included many times over, the result will be a much shorter PostScript file which will usually print significantly faster as well. However, Lout uses Level 2 PostScript features to implement @@IncludeGraphicRepeated, which may not be available in some old printers, and the contents of the EPS file have to be stored in the printer for the entire duration of the print job, so there is a risk that memory will run out if @@IncludeGraphicRepeated is used. @PP The implementation of @@IncludeGraphicRepeated uses code given by the authors of PostScript which employs PostScript forms to save the EPS files @Cite { $adobe1996epsforms }. Lout's version of this code is somewhat modified, partly for simplicity and partly to correct a possible bug caused by their use of a single filter to read all the EPS files, rather than a separate filter for each one. @End @Section lout-3.39/doc/expert/exa_page0000644000076400007640000002231011363700677014631 0ustar jeffjeff@Section @Title { Page layout } @Tag { pagelayout } @Begin @PP The page layout page.layout.inpractice @SubIndex { in practice } document.layout.page.layout. @SubIndex { page layout } definitions given in Section {@NumberOf definitions}, although correct, are very basic. In this section we present the definitions used by the DocumentLayout package for laying out the pages of books, including running page headers and footers, different formats for odd and even pages, and so on. The present document is produced with these definitions. @PP We begin with a few definitions which permit the user to create cross references of the `see page 27' variety which will be kept up to date automatically. The user marks the target page by placing @Code {"@PageMark intro"}, for example, at the point of interest, and refers to the marked page as @Code "@PageOf intro" elsewhere: pageof.example @Index { @Code "@PageOf" example } @IndentedList @LI @Code { "export @Tag" "def @PageMarker right @Tag { @Null }" } @LI @Code { "def @PageMark right x" "{" " @PageMarker&&preceding @Tagged x" "}" } @LI @Code { "def @PageOf right x" "{" " @PageMarker&&x @Open { @Tag }" "}" } @EndList We will see below that an invocation of @Code "@PageMarker" appears before each page, with @Code "@Tag" parameter equal to the page number. Suppose that {@Code "@PageMark intro"}, which expands to @ID @Code "@PageMarker&&preceding @Tagged intro" happens to fall on page 27 of the final printed document (of course, its value is @@Null which makes it invisible). Then the effect of @@Tagged is to attach @Code "intro" as an extra tag to the first invocation of {@Code "@PageMarker"} preceding that final point, and this must be {@Code "@PageMarker 27"}. Therefore the expression @ID @Code "@PageMarker&&intro @Open { @Tag }" will open the invocation {@Code "@PageMarker 27"} and yield the value of its @Code "@Tag" parameter, 27. Thus, {@Code "@PageOf intro"} appearing anywhere in the document yields 27. @PP Next we have some little definitions for various parts of the page. {@Code "@FullPlace"} will be the target of full-width body text: @ID @Code { "def @FullPlace { @Galley }" } {@Code "@ColPlace"} will be the target of body text within one column: @ID @Code { "def @ColPlace { @Galley }" } {@Code "@TopList"} will be the target of figures and tables: @ID @Code { "export @Tag" "def @TopList right @Tag" "{" " @Galley" " //@TopGap @TopList @Next @Tag" "}" } We have taken a shortcut here, avoiding an unnecessary @Code "@TopPlace" symbol. @Code "@FootList" and {@Code "@FootSect"} define a sequence of full-width targets at the foot of the page for footnotes, preceded by a short horizontal line: footsect.example @Index { @Code "@FootSect" example } @IndentedList @LI @Code { "export @Tag" "def @FootList right @Tag" "{" " @Galley" " //@FootGap @FootList @Next @Tag" "}" } @LI @Code { "def @FootSect" "{" " @FootLen @Wide @HLine" " //@FootGap @FootList 1 ||@FootLen" "}" } @EndList Similarly, @Code "@ColFootList" and @Code "@ColFootSect" provide a sequence of targets for footnotes within one column: @ID @Code { "export @Tag" "def @ColFootList right @Tag" "{" " @Galley" " //@FootGap @ColFootList @Next @Tag" "}" "" "def @ColFootSect" "{" " @ColFootLen @Wide @HLine" " //@FootGap @ColFootList 1 ||@ColFootLen" "}" } The next definition provides a horizontal sequence of one or more columns: collist.example @Index { @Code "@ColList" example } @ID @Code { "def @ColList right col" "{" " def @Column" " { @VExpand { @ColPlace //1rt @OneRow { //@MidGap @ColFootSect } } }" "" " col @Case {" " Single @Yield @Column" " Double @Yield { @DoubleColWidth @Wide @Column ||@ColGap @ColList col }" " Multi @Yield { @MultiColWidth @Wide @Column ||@ColGap @ColList col }" " }" "}" } Each column consists of a @Code "@ColPlace" at the top and a @Code "@FootSect" at the foot. The @@VExpand symbol ensures that whenever a column comes into existence, it will expand vertically so that the bottom-justification @Code "//1rt" has as much space as possible to work within. The @Code "col" parameter determines whether the result has a single column, double columns, or multiple columns. @PP The {@Code "@Page"} symbol places its parameter in a page of fixed width, height, and margins: page.example @Index { @Code "@Page" example } @ID @Code { "def @Page right x" "{" " @PageWidth @Wide @PageHeight @High {" " //@PageMargin ||@PageMargin" " @HExpand @VExpand x" " ||@PageMargin //@PageMargin" " }" "}" } @@HExpand and @@VExpand ensure that the right parameter occupies all the available space; this is important when the right parameter is unusually small. The @@High symbol gives the page a single row mark, ensuring that it will be printed on a single sheet of paper (page {@PageOf rootg}). @PP Next we have {@Code "@OnePage"}, defining a typical page of a book or other document: onepage.example @Index { @Code "@OnePage" example } @ID @Code { "def @OnePage" " named @Columns {}" " named @PageTop {}" " named @PageFoot {}" "{" " @Page {" " @PageTop" " //@MidGap @TopList" " //@MidGap @FullPlace" " //@MidGap @ColList @Columns" " // //1rt @OneRow { //@MidGap @FootSect //@MidGap @PageFoot }" " }" "}" } The page top and page foot, and the number of columns, are parameters that will be given later when @Code "@OnePage" is invoked. The body of the page is a straightforward combination of previous definitions. The @Code "//" symbol protects the following @Code "//1rt" from deletion in the unlikely event that all the preceding symbols are replaced by @@Null. The following object is enclosed in @@OneRow to ensure that all of it is bottom-justified, not just its first component. @PP Before presenting the definition of a sequence of pages, we must detour to describe how running page headers and footers (like those in the present document) are produced. These are based on the @Code "@Runner" symbol: runner.example @Index { @Code "@Runner" example } @ID @Code { "export @TopOdd @TopEven @FootOdd @FootEven" "def @Runner" " named @TopOdd right @PageNum { @Null }" " named @TopEven right @PageNum { @Null }" " named @FootOdd right @PageNum { @Null }" " named @FootEven right @PageNum { @Null }" " named @Tag {}" "{ @Null }" } The four parameters control the format of running headers and footers on odd and even pages respectively. Invocations of {@Code "@Runner"}, for example @ID @Code { "@Runner" " @TopEven { @B @PageNum |1rt @I { Chapter 4 } }" " @TopOdd { @I { Examples } |1rt @B @PageNum }" } will be embedded in the body text of the document, and, as we will see in a moment, are accessed by @Code "@Runner&&following" cross references on the pages. Notice how the @Code "@PageNum" parameter of each parameter allows the format of the running header to be specified while leaving the page number to be substituted later. @PP We may now define {@Code "@OddPageList"}, whose result is a sequence of pages beginning with an odd-numbered page: oddpagelist.example @Index { @Code "@OddPageList" example } @ID @Code { "def @OddPageList" " named @Columns {}" " right @PageNum" "{" " def @EvenPageList ..." "" " @PageMarker @PageNum" " // @Runner&&following @Open {" " @OnePage" " @Columns { @Columns }" " @PageTop { @TopOdd @PageNum }" " @PageFoot { @FootOdd @PageNum }" " }" " // @EvenPageList" " @Columns { @Columns }" " @Next @PageNum" "}" } Ignoring @Code "@EvenPageList" for the moment, notice first that the invocation of @Code "@OnePage" is enclosed in {@Code "@Runner&&following @Open"}. Since {@Code "@Runner&&following"} refers to the first invocation of @Code "@Runner" appearing after itself in the final printed document, the symbols @Code "@TopOdd" and @Code "@FootOdd" will take their value from the first invocation of @Code "@Runner" following the top of the page, even though @Code "@FootOdd" appears at the foot of the page. Their @Code "@PageNum" parameters are replaced by {@Code "@PageNum"}, the actual page number parameter of {@Code "@OddPageList"}. @PP After producing the odd-numbered page, @Code "@OddPageList" invokes {@Code "@EvenPageList"}: evenpagelist.example @Index { @Code "@EvenPageList" example } @ID @Code { "def @EvenPageList" " named @Columns {}" " right @PageNum" "{" " @PageMarker @PageNum" " // @Runner&&following @Open {" " @OnePage" " @Columns { @Columns }" " @PageTop { @TopEven @PageNum }" " @PageFoot { @FootEven @PageNum }" " }" " // @OddPageList" " @Columns { @Columns }" " @Next @PageNum" "}" } This produces an even-numbered page, then passes the ball back to @Code "@OddPageList" -- a delightful example of what computer scientists call mutual recursion. The two page types differ only in their running headers and footers, but other changes could easily be made. @PP It was foreshadowed earlier that an invocation of @Code "@PageMarker" would precede each page, and this has been done. Although this @Code "@PageMarker" is a component of the root galley, it will not cause a page to be printed, because Basser Lout skips components of height zero. @End @Section lout-3.39/doc/expert/det_size0000644000076400007640000001544311363700677014677 0ustar jeffjeff@Section @Title { The style and size of objects } @Tag { size } @Begin @PP This section explains how Lout determines the style and size of each object. Together, these attributes determine the object's final appearance in the output. style @Index { Style of an object } @PP The style of an object comprises the following: @BulletList @LI { Which font family, face and size to use (also defining the @Code f unit); } @LI { Whether small capitals are in effect or not, and also what fraction of the height of full capitals the small capitals are to have; } @LI { What gap to replace a single space between two objects by (also defining the @Code s unit); } @LI { The interpretation to place on white space separating two objects ({@Code lout}, {@Code compress}, {@Code separate}, {@Code troff}, or {@Code tex} as in Section {@NumberOf space}); } @LI { The current value of the @Code y and @Code z units of measurement (Section {@NumberOf yunit}); } @LI { The kind of paragraph breaking to employ ({@Code adjust}, {@Code ragged}, etc.) } @LI { What gap to insert between the lines of paragraphs (also defining the @Code v unit); } @LI { The size of the outdent to use in the @Code outdent paragraph breaking style; } @LI { Whether the @Code "unbreakablefirst" and @Code "unbreakablelast" paragraph breaking options are in effect; } @LI { Whether the row marks of words are to pass along the baseline or half the height of an `x' above the baseline; } @LI { Whether to permit hyphenation or not; } @LI { What colour the object is to appear in; } @LI { What colour underlines within the object are to appear in; } @LI { Whether @@Outline is in effect; } @LI { The language of the object; } @LI { Whether @@VAdjust, @@HAdjust and @@PAdjust are in effect. } @EndList The style of an object depends on where it appears in the final document. For example, the style of a parameter depends on where it is used; the style of a galley is the style of the first target that it attempts to attach itself to. Of course, the style of any object can be changed by using the @@Font, @@Break, @@Space, @@SetColour or @@SetColor, @@SetUnderlineColour or @@SetUnderlineColor, @@Outline, and @@Language symbols. @PP There are no standard default values for style, except that row marks of words initially pass half the height of an `x' above the baseline, small capitals are initially off and will be 0.7 times the size of full capitals, outlining is initially off, the interpretation of white space is initially {@Code lout}, and the values of the @Code y and @Code z units are zero. Therefore one must ensure that the root galley or each of its components is enclosed in @@Font, @@Break, @@SetColour or @@SetColor, and @@Language symbols. From there the style is passed to incoming galleys and the objects within them. Enclosure in @@Space is not required because the @Code "s" unit is also set by @@Font (Section {@NumberOf space}). @PP width. @Index { Width of an object } height. @Index { Height of an object } size. @Index { Size of an object } The remainder of this section explains how the size of each object (its width and height on the printed page) is determined. We will treat width only, since height is determined in exactly the same way, except that the complications introduced by paragraph breaking are absent. @PP With three exceptions (see below), the width of an object is as large as it possibly could be without violating a @@Wide symbol or intruding into the space occupied by neighbouring gaps or objects. As an aid to investigating this rule, we will use the definition @ID @OneRow @Code { "def @TightBox right x" "{" " \"0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke\"" " @Graphic x" "}" } which draws a box around the boundary of its right parameter (Section {@NumberOf graphic}) with no margin. The result of @ID @Code { "5c @Wide @TightBox metempsychosis" } is @ID { 5c @Wide @TightBox metempsychosis } The widest that @Code "@TightBox metempsychosis" could possibly be is five centimetres, and accordingly that is its width. The same applies to {@Code metempsychosis}, which is five centimetres wide as well. Note carefully that there is no object in this example whose width is equal to the sum of the widths of the letters of {@Code metempsychosis}. @PP The first of the three exceptions to the `as wide as possible' rule is the @@HContract symbol, which causes the width of its right parameter to be reduced to a reasonable minimum (a formal definition will not be attempted): @ID @OneRow @Code { "5c @Wide @HContract @TightBox metempsychosis" } produces @ID { 5c @Wide @HContract @TightBox metempsychosis } The object @Code "@HContract @TightBox metempsychosis" is still five centimetres wide, but the object @Code "@TightBox metempsychosis" has been reduced. @PP The second of the three exceptions is the horizontal concatenation symbol @Code "|" (and also {@Code "&"}). Consider this example: @ID @OneRow @Code { "5c @Wide @TightBox { A |1c B |1c C }" } As usual, the right parameter of @@Wide is five centimetres wide, and the result looks like this: @ID { 5c @Wide @TightBox { A |1c B |1c C } } Lout has to apportion the size minus inter-column gaps among the three columns. @PP If the columns are wide enough to require paragraph breaking, Lout will assign sizes to the columns in such a way as to leave narrow columns unbroken and break wider columns to equal width, occupying the full size. Otherwise, paragraph breaking is not required, and each column will be assigned a reasonable minimum size in the manner of @@HContract, except that the last column receives all the leftover width. For example, @ID @OneRow @Code { "5c @Wide { @TightBox A |1c @TightBox B |1c @TightBox C }" } has result @ID { 5c @Wide { @TightBox A |1c @TightBox B |1c @TightBox C } } If it is desired that the leftover width remain unused, rather than going into the last column, an empty column can be appended, or the last column can be enclosed in @@HContract. Two other ways to apportion the leftover width are provided by the @@HExpand and @@HAdjust symbols (Sections {@NumberOf hexpand} and {@NumberOf hadjust}). @PP The third and final exception to the `as wide as possible' rule concerns the components of the root galley. Each is considered to be enclosed root.galley.size @SubIndex { size of components of } in @@HContract and @@VContract symbols. @PP Up to this point we have treated width as a single quantity, but of course it has two parts: width to left and right of the mark. The `as wide as possible' rule applies to both directions: @ID @Code { "@HContract { @TightBox 953^.05 /0.5c @TightBox 2^.8286 }" } has result @ID { @HContract { @TightBox 953^.05 /0.5c @TightBox 2^.8286 } } Leftover width usually goes to the right, as we have seen, but here some width was available only to the left of {@Code "2.8286"} owing to the column mark alignment. @End @Section lout-3.39/doc/expert/exa_para0000644000076400007640000002056411363700677014651 0ustar jeffjeff@Section @Title { Paragraphs, displays, and lists } @Tag { paras } @Begin @PP The remaining sections of this chapter are all based on Version 2 of the DocumentLayout package. Version 3, which is similar but more elaborate, is described from the user's perspective in the document.layout @Index { DocumentLayout package } User's Guide @Cite { $kingston1995lout.user }. In 26 pages of Lout, the DocumentLaytout package defines many features required in the formatting of simple documents, technical reports, and books, including displays, lists, page layout, cross references, tables of contents, footnotes, figures, tables, references, chapters, sections, and sorted indexes. @PP The symbols used for separating paragraphs and producing displays and document.layout.paras @SubIndex { paragraphs } lists may lack the excitement of more exotic features, but they can teach some important lessons about robust design. The following macro for separating paragraphs produces a 0.3 cm vertical space and a 1 cm indent on the following line, and is clearly on the right track: @ID @Code "macro @PP { //0.3c &1c }" Nevertheless it has several major problems. @PP The @Code "&" symbol is subject to widening during line adjustment, so it should be replaced by {@Code "1c @Wide {}"}. But then white space following the symbol will affect the result, so an extra @Code "&0i" must be added. If the document is printed double spaced, this paragraph gap will fail to widen: it should be expressed in terms of the @Code "v" unit, with mark-to-mark spacing mode. Similarly, the paragraph indent should probably be made proportional to the font size. @PP `Magic numbers' like @Code "0.3c" should not be buried in definitions where they cannot be changed easily, or kept consistent with similar definitions during tuning. They are much better placed as symbols, possibly parameters of the enclosing package: @ID @Code { "def @DocumentLayout" pp.example @Index { @Code "@PP" example } " named @ParaGap { 1.3vx }" " named @ParaIndent { 2f }" " ..." "@Begin" "" " macro @PP { //@ParaGap @ParaIndent @Wide &0i }" " macro @LP { //@ParaGap }" " ..." "@End @DocumentLayout" } and we have arrived at the definition of @Code "@PP" as it appears in the DocumentLayout package. @PP A display is a table in which the first column is blank: document.layout.displays @SubIndex { displays } @ID lines @Break { @I { preceding text } @Code "//@DispGap |@DispIndent" @I display @Code "//@DispGap" @I { following text } } Edge-to-edge is the appropriate spacing mode before and after displays, since the display could be a table or figure whose mark does not correspond to a baseline. Thus, @Code "1v" is a reasonable value for {@Code "@DispGap"}. @PP The ordinary user cannot be expected to type the Lout source shown above; a more appropriate syntax is indented.display.example @Index { @Code "@IndentedDisplay" example } @ID lines @Break { @I { preceding text } @Code "@IndentedDisplay {" @I display @Code "}" @I { following text } } This presents a problem: if @Code "@IndentedDisplay" is made a definition with a right parameter, its result will be an object separated from the surrounding text only by white space, hence part of the paragraph; while if it is a macro, the final @Code "//@DispGap" cannot be included in it. The solution adopted in the DocumentLayout package uses a galley and a macro: @ID @Code { " def @DispPlace { @Galley }" " def @Disp into { @DispPlace&&preceding }" " right x" " {" " @OneRow x" " }" "" " macro @IndentedDisplay" " {" " //@DispGap |@DispIndent @DispPlace |" " //@DispGap // @Disp" " }" } @Code "@DispPlace" and @Code "@Disp" are not exported, so there is no danger of a name clash with some other symbol. The ordinary user's syntax expands to @ID lines @Break { @I { preceding text } @Code "//@DispGap |@DispIndent @DispPlace |" @Code "//@DispGap // @Disp {" @I display @Code "}" @I { following text } } and the @Code "@Disp" galley appears at the preceding {@Code "@DispPlace"}, being itself replaced by @@Null. The @Code "//" symbol protects the preceding @Code "//@DispGap" from being deleted by this @@Null when there is no following text. @PP An automatically numbered list document.layout.lists @SubIndex { lists } numbered @Index { Numbered list } could have an arbitrarily large number of items, so, by analogy with sequences of pages, we see immmediately that recursion must be involved: @ID @Code { "def @List right num" "{" " @DispIndent @Wide num. | @ItemPlace" " //@DispGap @List @Next num" "}" } Notice how the @@Next symbol works in conjunction with the recursion to produce an ascending sequence of numbers; the result of @Code "@List 1" will be @ID @Code { "1. @ItemPlace" "2. @ItemPlace" "3. @ItemPlace" "..." } We can follow this with items which are galleys targeted to {@Code "@ItemPlace&&preceding"}, and @Code "@List" will expand just enough to accommodate them. @PP The usual problem with recursive-receptive symbols now arises: there is always one unexpanded {@Code "@List"}, and until it can be removed the galley containing it will appear to be incomplete and will be prevented at that point from flushing into its parent (see page {@PageOf forcing}). We adopt the usual solution: a forcing galley into a later target will replace the last @Code "@List" by @@Null. This brings us to the definitions as they appear in DocumentLayout: indented.list.example @Index { @Code "@IndentedList" example } @IndentedList @LI @Code { "def @ItemPlace { @Galley }" "def @ListItem into { @ItemPlace&&preceding }" " right x" "{ x }" } @LI @Code { "def @EndListPlace { @Galley }" "def @EndList force into { @EndListPlace&&preceding }" "{}" } @LI @Code { "def @RawIndentedList" " named style right tag {}" " named indent { @DispIndent }" " named gap { @DispGap }" " named start { 1 }" "{" " def @IList right num" " {" " indent @Wide {style num} | @ItemPlace" " //gap @IList @Next num" " }" "" " @IList start // @EndListPlace" "}" } @EndList Now given the input @ID @Code { "@RawIndentedList" "@ListItem { first item }" "@ListItem { second item }" "..." "@ListItem { last item }" "@EndList" } @Code "@RawIndentedList" will expand to receive the items, and will be closed off by {@Code "@EndList"}. @PP The {@Code indent}, {@Code gap}, and {@Code start} parameters are straightforward (note that the burden of typing @Code 1 has been lifted from the ordinary user), but the @Code style parameter has a parameter of its own (see page {@PageOf strange}). It is used like this: @ID @Code { "def @RawNumberedList { @RawIndentedList style { tag. } }" "def @RawParenNumberedList { @RawIndentedList style { (tag) } }" } In {@Code "@RawNumberedList"}, @Code "style" is given the value {@Code "tag."}, where @Code tag is its own right parameter, so the value of @Code "{style num}" within @Code "@IList" is {@Code "num."}; while in {@Code "@RawParenNumberedList"}, @Code "{style num}" is {@Code "(num)"}. In this way we achieve an unlimited variety of numbering formats without having to rewrite @Code "@RawIndentedList" over and over. @PP These list symbols are objects without surrounding space, so macros similar to those used for displays are needed: @ID @Code { "macro @NumberedList { //@DispGap @RawNumberedList //@DispGap }" "macro @ParenNumberedList { //@DispGap @RawParenNumberedList //@DispGap }" } and so on. @PP Lists numbered by Roman numerals roman @Index { Roman numerals } present a problem, because @@Next will not increment Roman numerals. Instead, they must be stored in a database: @ID @Code { "def @Roman" " left @Tag" " right @Val" "{ @Val }" "" "@SysDatabase @Roman { standard }" } @Code "@SysDatabase" is preferred over @Code "@Database" here because this database should be kept in a standard place and shared by everyone. The database itself, a file called @Code "standard.ld" in Basser Lout, contains invocations of {@Code "@Roman"}, each enclosed in braces: @ID @Code { "{ 1 @Roman i }" "{ 2 @Roman ii }" "..." "{ 100 @Roman c }" } Then @Code "@Roman&&12" for example has value {@Roman&&12}, and @ID @Code { "def @RawRomanList { @RawIndentedList style { {@Roman&&tag}. } }" } produces a list numbered by Roman numerals. The counting still proceeds in Arabic, but each Arabic numeral is converted to Roman by the cross reference. Since arbitrary objects may be stored in databases, arbitrary finite sequences of objects may be `counted' in this way. @End @Section lout-3.39/doc/expert/pre_inse0000644000076400007640000000126711363700677014674 0ustar jeffjeff@Section @Title { "@Insert" } @Tag { insert } @Begin @PP insert.sym @Index { @@Insert symbol } The @@Insert symbol inserts its left parameter at the beginning of the first paragraph of its right parameter: @ID @Code "X @Insert { A B // C // D }" is equivalent to @ID @Code "{ XA B // C // D }" Notice that a zero-width space separates @Code { X } from the first paragraph, so if some wider space is required it must be placed at the end of @Code { X }. The @Code "@Insert" operation is applied to the value of the right parameter after evaluation. @PP The only known use for this symbol is to attach something like @B { Figure 6 } to the front of a multi-paragraph caption. @End @Section lout-3.39/doc/expert/exa_chap0000644000076400007640000002465211363700677014643 0ustar jeffjeff@Section @Title { Chapters and sections } @Tag { chapters } @Begin @PP The definitions of chapters and sections from the DocumentSetup package chapters. @Index { Chapters and sections } of Version 2 (in Version 3, the BookSetup extension of DocumentSetup) form the subject of this section. They allow a chapter to be entered like this: document.layout.chapters @SubIndex { chapters and sections } @ID @Code { "@Chapter" " @Title { ... }" " @Tag { ... }" "@Begin" " ..." "@End @Chapter" } Within the chapter a sequence of sections may be included by writing @ID @Code { "@BeginSections" "@Section { ... }" "..." "@Section { ... }" "@EndSections" } These are numbered automatically, and an entry is made for each in a table of contents. @PP The user of the DocumentSetup package can find the number of the chapter or section with a given tag by writing @Code "@NumberOf tag" at any point in the document. This feature is based on the following definitions: numberof.example @Index { @Code "@NumberOf" example } @ID @Code { "export @Tag" "def @NumberMarker right @Tag { @Null }" "" "def @NumberOf right x" "{ @NumberMarker&&x @Open { @Tag } }" } Each chapter and section will contain one invocation of {@Code "@NumberMarker"}; a full explanation will be given later. @PP A sequence of places for receiving chapters is easily defined: @ID @Code { "export @Tag" "def @ChapterList right @Tag" "{" " @Galley" " //@ChapterGap @ChapterList @Next @Tag" "}" } @Code "@ChapterGap" will usually be {@Code "1.1b"}, ensuring that each chapter begins on a new page. The @Code "@Chapter" galley itself is defined as follows: chapter.example @Index { @Code "@Chapter" example } @IndentedList @LI @Code { "export @FootNote @BeginSections @EndSections @Section" "def @Chapter force into { @ChapterList&&preceding }" " named @Tag {}" " named @Title {}" " named @RunningTitle { dft }" " body @Body" "{" " def @FootNote right x { @ColFootNote x }" "" " def @BeginSections ..." " def @EndSections ..." " def @Section ..." } @LI @Code { " def @ChapterTitle" " {" " @ChapterNumbers @Case {" " {Yes yes} @Yield { Chapter {@NumberOf @Tag}. |2s @Title }" " else @Yield @Title" " }" " }" "" " def @ChapterNum" " {" " @ChapterNumbers @Case {" " {Yes yes} @Yield { Chapter {@NumberOf @Tag} }" " else @Yield @Null" " }" " }" } @LI @Code { " ragged @Break @BookTitleFormat @ChapterTitle" " // @NumberMarker {" " @ChapterList&&@Tag @Open { @Tag }" " }" " // @ChapterList&&preceding @Tagged @Tag" " // @NumberMarker&&preceding @Tagged @Tag" " // @PageMarker&&preceding @Tagged @Tag" " // { @ChapterTitle } @MajorContentsEntry {@PageOf @Tag}" " // @Runner" " @FootEven { |0.5rt 0.8f @Font @B @PageNum }" " @FootOdd { |0.5rt 0.8f @Font @B @PageNum }" " // @Body" " //@SectionGap @ChapRefSection" " // @Runner" " @TopEven { @B @PageNum |1rt @I @ChapterNum }" " @TopOdd { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }" "}" } @EndList We will see the symbols for sections shortly. Notice how their use has been restricted to within the right parameter of {@Code "@Chapter"}, by nesting them and using a body parameter. @PP The meaning of @Code "@FootNote" within @Code "@Chapter" has been set to {@Code "@ColFootNote"}, which produces a footnote targeted to {@Code "@ColFootList"} (see Section {@NumberOf pagelayout}). In other words, footnotes within chapters go at the foot of the column, not at the foot of the page. (Of course, in single-column books this distinction is insignificant.) @Code "@ChapterTitle" and @Code "@ChapterNum" are trivial definitions which vary depending on whether the user has requested numbered chapters or not. @PP Each invocation of @Code "@Chapter" has its own unique {@Code "@Tag"}, either supplied by the user or else inserted automatically by Lout. We now trace the cross referencing of chapter numbers on a hypothetical third chapter whose tag is {@Code "euclid"}. @PP @Code "@ChapterList&&preceding @Tagged euclid" attaches @Code "euclid" as an extra tag to the first invocation of @Code "@ChapterList" preceding itself in the final printed document. But this @Code "@ChapterList" must be the target of the chapter, and so @ID @Code "@ChapterList&&euclid @Open { @Tag }" is 3, the number of the chapter ({@Code "@Tag"} refers to the parameter of {@Code "@ChapterList"}, not the parameter of {@Code "@Chapter"}). Consequently the invocation of @Code "@NumberMarker" within the chapter is equal to {@Code "@NumberMarker 3"}. @PP @Code "@NumberMarker&&preceding @Tagged euclid" attaches @Code "euclid" to {@Code "@NumberMarker 3"} as an extra tag, and so {@Code "@NumberOf euclid"}, which expands to @ID @Code "@NumberMarker&&euclid @Open { @Tag }" must be equal to 3, as required. This scheme could be simplified by placing the invocation of @Code "@NumberMarker" within @Code "@ChapterList" rather than within {@Code "@Chapter"}, but it turns out that that scheme does not generalize well to sections and subsections. @PP There is a trap for the unwary in the use of @Code preceding and {@Code following}. Suppose that the invocation of @Code "@NumberMarker" within @Code "@Chapter" is replaced by the seemingly equivalent @ID @Code "@NumberMarker { @ChapterList&&preceding @Open { @Tag } }" Now suppose that @Code "@NumberOf euclid" appears somewhere within Chapter 7. It will expand to @ID @Code "@NumberMarker&&euclid @Open { @Tag }" which would now be equal to @ID @Code "@ChapterList&&preceding @Open { @Tag }" whose value, evaluated as it is within Chapter 7, is 7, not 3. Use of @Code preceding or @Code following within the parameter of a symbol, rather than within the body, is likely to be erroneous. @PP Much of the remainder of the definition of @Code "@Chapter" is fairly self-explanatory: there is a heading, a tag sent to mark the page on which the chapter begins, a @Code "@ContentsEntry" galley sent to the table of contents, galleys for the figures and tables of the chapter to collect in, @Code "@Body" where the body of the chapter goes, and @Code "@ChapRefSection" to hold a concluding list of references. This leaves only the two invocations of @Code "@Runner" to explain. @PP The first @Code "@Runner" is just below the heading. It will be the target of the @Code "@Runner&&following" cross reference at the beginning of the first page of the chapter (see Section {@NumberOf pagelayout}), which consequently will have null running headers and the given footers. @PP The second @Code "@Runner" appears at the very end of the chapter, hence on its last page. Since no invocations of @Code "@Runner" lie between it and the first {@Code "@Runner"}, it will be the target of @Code "@Runner&&following" on every page from the second page of the chapter to the last, inclusive, and will supply the format of their headers and footers. @PP The interested reader might care to predict the outcome in unusual cases, such as when the heading occupies two pages, or when a chapter occupies only one, or (assuming a change to the gap between chapters) when a chapter starts halfway down a page. Such predictions can be made with great confidence. @PP The expression @Code "@RunningTitle @OrElse @Title" appearing in the second @Code "@Runner" returns the value of the @Code "@RunningTitle" parameter of @Code "@Chapter" if this is not equal to the default value {@Code "dft"}, or @Code "@Title" otherwise: orelse.example @Index { @Code "@OrElse" example } @ID @Code { "def @OrElse" " left x" " right y" "{" " x @Case {" " dft @Yield y" " else @Yield x" " }" "}" } This produces the effect of @ID @Code { "named @RunningTitle { @Title }" } which unfortunately is not permissible as it stands, because @Code "@Title" is not visible within the default value of {@Code "@RunningTitle"}. @PP Finally, the definitions for sections omitted earlier are as follows: section.example @Index { @Code "@Section" example } @IndentedList @LI @Code { "def @EndSectionsPlace { @Galley }" "def @EndSections force into { @EndSectionsPlace&&preceding } {}" "macro @BeginSections { //@SectionGap @SectionList 1 // @EndSectionsPlace // }" } @LI @Code { "def @Section force into { @SectionList&&preceding }" " named @Tag {}" " named @Title {}" " named @RunningTitle { dft }" " body @Body" "{" " def @SectionTitle" " {" " @SectionNumbers @Case {" " {Yes yes} @Yield { {@NumberOf @Tag}. |2s @Title }" " else @Yield @Title" " }" " }" "" " @Heading @Protect @SectionTitle" " // @NumberMarker {" " {@ChapterList&&@Tag @Open { @Tag }}.{" " @SectionList&&@Tag @Open { @Tag }}" " }" " // @ChapterList&&preceding @Tagged @Tag" " // @SectionList&&preceding @Tagged @Tag" " // @NumberMarker&&preceding @Tagged @Tag" " // @PageMarker&&preceding @Tagged @Tag" " // { &3f @SectionTitle } @ContentsEntry {@PageOf @Tag}" " //0io @Body" "}" } @EndList The @Code "@BeginSections" macro invokes {@Code "@SectionList"}, preceded by the appropriate gap and followed by an @Code "@EndSectsPlace" for closing the list of sections when the @Code "@EndSections" symbol is found. @Code "@Section" itself is just a copy of @Code "@Chapter" with slight changes to the format. The parameter of @Code "@NumberMarker" is a simple generalization of the one within {@Code "@Chapter"}. Notice that we have taken care that the value of this parameter be a juxtaposition of simple words: although @ID @Code { "{@ChapterList&&@Tag @Open { @Tag }}. &" "{@SectionList&&@Tag @Open { @Tag }}" } is formally equivalent, @Code "&" was not permitted within a @Code "@Tag" parameter until recently. @PP The DocumentSetup package also contains definitions for subsections in the same style. They raise the question of whether Lout is capable of producing subsections should the user place {@Code "@BeginSections"}, {@Code "@Section"}, and {@Code "@EndSections"} within a {@I section}, and whether such nesting could proceed to arbitrary depth. Arbitrary nesting of sections within sections is available now, although the numbering would of course be wrong. The author has worked out definitions which provide correct numbering to arbitrary depth, with an arbitrary format for each level. These were not incorporated into DocumentSetup because the author considers sub-subsections to be poor style, and he prefers separate names for the symbols at each level. @End @Section lout-3.39/doc/expert/pre_bend0000644000076400007640000000567111363700677014651 0ustar jeffjeff@Section @Tag { backend } @Title { "@BackEnd" and the PlainText and PDF back ends } @Begin @PP backend.sym @Index { @@BackEnd symbol } The @@BackEnd symbol, which takes no parameters, has for its result a string naming the back end currently in use. Three back ends are available, PostScript, PDF and PlainText. The symbol is generally used like this: @ID @Code { "@BackEnd @Case {" " PlainText @Yield { ... }" " PostScript @Yield { ... }" " PDF @Yield { ... }" "}" } to obtain different objects depending on the back end. No @Code else is required since these are the only possible values. @PP When a @Code "@Case" symbol has @Code "@BackEnd" for its left parameter and the left parameter of each @Code "@Yield" symbol within it consists of a sequence of one or more literal words (including {@Code else}), Lout will optimize by evaluating the @Code "@Case" symbol at the time it is read. This optimization ensures that there is only a small once-only performance penalty for multiple back ends, and it permits these @Code "@Case" symbols (but no other symbols) to appear within the object following @Code "@Include" and @Code "@PrependGraphic" symbols. @PP The PlainText back end differs from the PostScript one in two main respects. First, there is effectively just one font: although all the font commands work exactly as usual, they don't actually change anything. Each character in this font is taken to be one tenth of one inch wide and 20 points high. Second, the output is an ordinary text file, not a PostScript file. @PP Clearly, with ordinary text output the possibility of advanced graphics features such as rotation and scaling is curtailed. Nevertheless, all symbols have well-defined (possibly null) effects in the PlainText back end, so there is no additional danger of crashing the system or obtaining grossly unreasonable output by a change to PlainText. @PP The PlainText back end is obtained by the @Code "-p" option to Basser Lout. The character size can be changed by adding two lengths to the @Code "-p" option, like this: @ID @Code "lout -p0.1i12p ..." which invokes the PlainText back end with each character being 0.1 inches wide and 12 points high. However, experience suggests that the best approach is to define all horizontal lengths as multiples of the @Code "s" unit (the width of a space, hence the width of all characters) and to define all vertical lengths as multiples of the @Code "f" unit (the font size, equal to the height of every character), and not to change the character size in the command line. @PP There is a @Code "-P" option which is identical with the @Code "-p" option except that it inserts a form-feed character between each two components of the output, but not before the first or after the last. @PP The PDF back end is obtained by typing {@Code "lout -Z"}. It is similar to PostScript but much more limited in functionality. Consult a separate document distributed with Lout for further information. @End @Section lout-3.39/doc/expert/all0000644000076400007640000000115411442245237013625 0ustar jeffjeff@SysInclude { eq } @SysInclude { tab } @SysInclude { tbl } @SysInclude { fig } @SysInclude { book } @SysDatabase @Reference { loutrefs } @Book @Title { An Expert's Guide to the Lout Document Formatting System } @Author { Jeffrey H. Kingston } @Edition { Version 3.39 September, 2010 } @Publisher { @I { @CopyRight Copyright 1991, 2008, Jeffrey H. Kingston, School of Information Technologies, The University of Sydney 2006, Australia.} } @InitialLanguage { English } @OptimizePages { No } // @Include { preface } @Include { pri } @Include { det } @Include { pre } @Include { exa } @Include { tex } lout-3.39/doc/expert/pre_cros0000644000076400007640000000334311363700677014701 0ustar jeffjeff@Section @Title { The cross reference symbols "&&" and "&&&" } @Tag { crossref } @Begin @PP The cross reference symbol @Code "&&" takes the name of a symbol (not an object) for its left parameter, and an object whose value must be a simple word, or several simple words, for its right parameter. The result is a cross reference, which may be thought of as an arrow pointing from the cross reference symbol to the beginning of an invocation of the named symbol. @PP The invocation pointed to, known as the @I target of the cross reference, is generally one whose @@Tag parameter has value equal to the right parameter of the cross reference symbol. Three special tags, {@Code preceding}, {@Code following}, and {@Code foll_or_prec}, point respectively to the first invocation preceding the cross reference in the final printed document, to the first invocation following it, and to the first following it if such exists else to the first preceding it. @PP A cross reference may be used in four ways: where an object is expected, in which case its value is a copy of the target; with the @@Open and @@Use symbols; with the @@Tagged symbol; and in the @Code into clause or @Code "@Target" symbol of a galley definition, in which case the value of the tag must be {@Code preceding}, {@Code following}, or {@Code foll_or_prec}. @PP Within an @Code "into" clause or @Code "@Target" symbol, the alternative form @Code "&&&" is acceptable and indicates a forcing galley (Section {@NumberOf targets}). @PP Except within an @Code into clause or @Code "@Target" symbol, the symbol referred to must have a @@Tag parameter. This is so even if the right parameter of the cross reference is {@Code preceding}, {@Code following}, or {@Code foll_or_prec}. @End @Section lout-3.39/doc/expert/pre_hcon0000644000076400007640000000120411363700677014654 0ustar jeffjeff@Section @Title { "@HContract" and "@VContract" } @Tag { hcontract } @Begin @PP hcontract. @Index { @@HContract symbol } vcontract. @Index { @@VContract symbol } contraction @Index { Contraction of object } The @@HContract symbol reduces the size of its right parameter to a reasonable minimum (after paragraph breaking). For example, @ID @Code "5i @Wide @HContract { A |1rt B }" has result @ID { 5i @Wide @HContract { A |1rt B } } in which the B is much closer to the A than it would otherwise have been. @@VContract is similar, but in a vertical direction. See Section {@NumberOf size} for a more extensive discussion. @End @Section lout-3.39/doc/expert/pri_cros0000644000076400007640000001155211363700677014706 0ustar jeffjeff@Section @Tag { cross } @Title { Cross references } @Begin @PP A cross reference cross.ref @Index { Cross reference } in common terminology is something like `see Table 6' or `see page 57' -- a reference within a document to some other part of it. Readers find them very useful, but they are a major problem for authors. As the document is revised, Table 6 becomes Table 7, the thing on page 57 moves to page 63, and all the cross references must be changed. @PP The Scribe scribe @Index { Scribe } document formatter, developed by Brian K. Reid @Cite { $reid1980scribe }, reid.brian @Index { Reid, Brian K. } introduced a scheme for keeping track of cross references. It allows you to give names to tables, figures, etc., and to refer to them by name. The formatter inserts the appropriate numbers in place of the names, so that as the document is revised, the cross references are kept up to date automatically. Lout has adopted and extended this scheme. @PP In Lout, automatic cross referencing works in the following way. First define a symbol with a parameter with the special name @Code "@Tag": @ID @OneRow @Code { "def @Table" " left @Tag" " right @Value" "{" " ||1i @Value" "}" } When this symbol is invoked, the value given to @Code "@Tag" should be a simple word like {@Code "cities"}, or several simple words juxtaposed like {@Code "cities compare"}; it serves to name the invocation: @ID @OneRow @Code { "{ cities compare } @Table" "{" " Washington |0.5i Canberra" "}" } We may now refer to this invocation elsewhere in the document, using the @I {cross reference} @Code "@Table&&{ cities compare }". Here @Code "&&" is the {@I {cross reference symbol}}; its left parameter is a symbol and its right parameter is the value of the @Code "@Tag" parameter of some invocation of that symbol. Of course it's simplest if you use just a one-word tag; then no braces are needed. @PP A cross reference is not an object; the reader should think of it as an arrow in the final printed document, beginning at the cross reference and ending at the top of the target target.cr @Index { Target of cross reference } #@ID 8p @Font { # { @LittlePage // @LittlePage } # ||0io ||0.7c # { //2c # { @Code "@Table&&cities" } # //0.1c # ||0.5c 90d @Rotate @Arrow 2.5c # //0.05c # @HContract @VContract # @Fig { @Box margin { 0c } paint { grey } { 1.5c @Wide 1c @High } } # } #} #@PP invocation. Three special values may be given to the right parameter of {@Code "&&"}: {@Code preceding}, {@Code following}, and preceding. @Index { @Code preceding } following. @Index { @Code following } foll_or_prec. @Index { @Code following } {@Code foll_or_prec}. The cross reference @Code "@Table&&preceding" points to some table appearing earlier in the final printed document than itself; that is, the arrow is guaranteed to point backwards through the document. Usually it points to the nearest preceding invocation. Similarly, @Code "@Table&&following" points forwards, usually to the nearest following invocation. @Code "@Table&&foll_or_prec" is the same as @Code "@Table&&following" if it exists, otherwise it is the same as {@Code "@Table&&preceding"}. @PP This section has been concerned with what a cross reference is -- an arrow from one point in a document to another -- but not with how it is used. One simple way to use a cross reference is to put it where an object is expected, like this: @ID @Code { "a | @Table&&cities | c" } In this case the cross reference will be replaced by a copy of the invocation it points to: in the example just given, a table will appear between @Code a and @Code c. Other applications of cross references may be found in Chapter {@NumberOf examples}, including finding the number of the page where something appears, producing running page headers and footers, and accessing databases of Roman numerals, references, etc. Cross references are also used by galleys, as will be explained in the next section. @PP The implementation of cross referencing copies every symbol invocation with a @Code "@Tag" parameter into the @I { cross-reference database }, a collection of files whose names end in {@Code ".ld"} indexed by one file whose name is {@Code "lout.li"}. It is generally the case that the bulk content of a symbol such as the table above is contained in its right or body parameter, and that this bulk content is not needed by cross references to the symbol. Hence, to save space in the database, Lout replaces the right parameter of each symbol it writes into it by the word "???" whenever the right parameter appears to be large. The table above would appear as "???" because of this optimization, and in general, the user must ensure that any content required by cross references is contained in parameters other than the right or body parameter. This optimization does not apply when the symbol being written into the cross-reference database is a galley. @End @Section lout-3.39/doc/expert/det_gall0000644000076400007640000003666511363700677014655 0ustar jeffjeff@Section @Title { Galleys and targets } @Tag { targets } @Begin @PP The behaviour of galleys and their targets, as described in Section galley.feature.in.detail @SubIndex { in detail } targets.in.detail @SubIndex { in detail } {@NumberOf galleys}, can be summarized in three laws: @DP {@I {First Law}}: The first target is the closest invocation of the target symbol, either preceding or following the invocation point of the galley as required, which has sufficient space to receive the first component; @DP {@I {Second Law}}: Each subsequent target is the closest invocation of the target symbol, following the previous target and lying within the same galley, which has sufficient space to receive the first remaining component; @DP {@I {Third Law}}: A receptive symbol that does not receive at least one component of any galley is replaced by @@Null. @DP The terms `closest,' `preceding,' and `following' refer to position in the final printed document. This section explains the operation of these laws in Basser Lout. @PP When a galley cannot be fitted into just one target, Lout must find points in the galley where it can be split in two. The object lying between two neighbouring potential split points is called a @I component component @Index { Components of a galley } of the galley. By definition, a component cannot be split. @PP To determine the components of a galley, expand all symbols other than recursive and receptive ones, discard all @@Font, @@Break, @@Space, @@SetColor, @@SetColour, and @@Language symbols, perform paragraph breaking as required, and discard all redundant braces. Then view the galley as a sequence of one or more objects separated by vertical concatenation symbols; these are the components and split points, except that concatenation symbols whose gaps are unbreakable (Section {@NumberOf concatenation}) are not eligible to be split points. For example, given the definition @ID @OneRow @Code { "def @Section into { @SectionPlace&&preceding }" " named @Title {}" " right @Body" "{" " 15p @Font { @Title //0.7f }" " //" " @Body" "}" } the galley @ID @OneRow @Code { "@Section" " @Title { Introduction }" "{ This is a subject that really" "needs no introduction. }" } becomes @ID @OneRow @Code { "Introduction" "//0.7f" "{}" "//" "This is a subject that really needs" "//1vx" "no introduction." } with four components. If @Code "@Body" had been preceded by @Code "|1.0c" in the definition, the result would have been @ID @OneRow @Code { "Introduction" "//0.7f" "{}" "//" "|1.0c { This is a subject that really needs //1vx no introduction. }" } with @Code "//1vx" buried within one component and hence not a potential split point. If @Code "0.7f" had been {@Code "0.7fu"}, the gap would have been unbreakable and @Code "//0.7fu" would not have been a potential split point. @PP Version 3.03 has liberalized this somewhat in the following way. When a component consists of a horizontal sequence of two or more objects @Eq { A sub 1 ,..., A sub n } separated by @Code "|" (not {@Code "||"}, not {@Code "&"}), Lout will investigate the component to see whether it can be broken up. It looks at each @Eq { A sub i } to see whether it is a vertical concatenation of objects @Eq { A sub i1 ,..., A sub im }; if two or more of the @Eq { A sub i } satisfy this condition, the component will not be broken up. So now suppose we have just one @Eq { A sub i } which is a vertical concatenation. Lout will break the component into one component for each of the @Eq { A sub i1 ,..., A sub im }, provided that they are separated by @Code "//" symbols (not {@Code "/"}), and provided this can be done without introducing any apparent change into the appearance of the component (this second rule will be satisfied if the other @Eq { A sub j } are not very large). The example above satisfies all these rules and will be broken up into two components, so the @Code "//1vx" becomes a potential split point after all. @PP The lines of a paragraph become separate components if the paragraph occupies an entire component before breaking; otherwise they are enclosed in a @@OneRow symbol within one component. The same is true of incoming components of other galleys. If a @@Galley symbol occupies an entire component by the rules above, then the incoming components that replace it become components of their new home: @ID @Tab @Fmta { @Col @Code A ! @Col lines @Break B ! @Col @Code C } { @Rowa A { "An example" "//0.5c" "@Galley" "//0.5c" "@SomethingList" } B { "" @Eq { ==> } } C { "An example" "//0.5c" "Incoming components" "//0.2c" "from some other galley" "//0.5c" "@SomethingList" } } Otherwise the incoming components are grouped within a @@OneRow symbol and lie within one component. @PP This distinction has a marked effect on the vertical concatenation b.unit.use @SubIndex { use in @Code "//1.1b" } symbol {@Code "//1.1b"}, which calls for more space than is available (Section {@NumberOf concatenation}). There is no room for this symbol within any component, so it will force a split and be discarded in that case. But it can be promoted to between two components. @PP Components may be separated by @Code "/" as well as by {@Code "//"}, giving rise to column mark alignment between adjacent components: @ID @ShowVMark { @HContract @GreyBox { 1c @Wide ^| 1c @Wide 0.6c @High } /0.3c @HContract @GreyBox { 2c @Wide 0.6c @High } /0.3c @HContract @GreyBox { 0.5c @Wide ^| 0.8c @Wide 0.6c @High } } When aligned components are promoted into different targets, the meaning of alignment becomes very doubtful. For example, what if the targets mark.alignment.in.detail @SubIndex { in detail } are in different columns of one page, or what if one lies within {@Code "90d @Rotate"}? @PP The truth is that @Code "/" causes all the objects that share a mark to have equal width: @ID @ShowVMark { @TightBox @HContract @GreyBox { 1c @Wide ^| 1c @Wide 0.6c @High } /0.3c @TightBox @HContract @GreyBox { 2c @Wide 0.6c @High } /0.3c @TightBox @HContract @GreyBox { 0.5c @Wide ^| 0.8c @Wide 0.6c @High } } This is a consequence of the `as wide as possible' rule (Section {@NumberOf size}). Mark alignment occurs {@I incidentally}, whenever the fragments are placed into similar contexts. @PP In this connection we must also consider the special case of a @@Galley symbol which shares its column mark with some other object: @ID @OneRow @Code { "@Galley" "/0.2c" "@SomethingList" } (The @@Galley may or may not occupy an entire component; that doesn't matter here.) If incoming components are separated by @Code "//" rather than by {@Code "/"}, the meaning is so doubtful that this is forbidden. In fact, a galley whose components replace such a @@Galley must have a single column mark running its full length; that is, its components must all share a single column mark. This mark will be merged with the column mark passing through each @@Galley that these components replace; all the objects on the resulting merged mark will have equal width. @PP The root galley, where everything collects immediately prior to output, root.galley.in.detail @SubIndex { in detail } is created automatically, not by a definition. Its target is the output file, and its object is the entire input, which typically looks like this: @ID @OneRow @Code { "@PageList" "//" "@Text {" " Body text of the document ..." "}" } where @Code "@PageList" expands to a sequence of pages containing @Code "@TextPlace" symbols (see Section {@NumberOf definitions}), and @Code "@Text" is a galley: @ID @OneRow @Code { "def @TextPlace { @Galley }" "" "def @Text into { @TextPlace&&preceding }" " right x" "{" " x" "}" } The spot vacated by a galley -- its invocation point -- becomes a @@Null object, so this root galley is effectively @Code "@PageList" alone, as required. The @Code "@Text" galley will find its first target preceding its invocation point, within {@Code "@PageList"}. @PP Printing {@PageMark rootg} the root galley on the output file is somewhat problematical, root.galley.printing @SubIndex { printing of } because Lout has no way of knowing how large the paper is. Basser Lout simply prints one root galley component per page (except it skips components of height zero), and the user is responsible for ensuring that each component is page-sized. Gaps between root galley components, even unbreakable ones, have no effect on the result. @PP Basser Lout will promote a component only after any receptive symbols components.promotion @SubIndex { promotion of } promotion @Index { Promotion of components } within it have been replaced, either by galleys or by @@Null, since until then the component is not complete. A component which shares a mark with following components is held up until they are all complete, since until then their width is uncertain. @PP Consider a page with @Code "@TextPlace" and @Code "@FootSect" receptive symbols. The rule just given will prevent the page from being printed until @Code "@TextPlace" is replaced by body text, quite rightly; but @Code "@FootSect" will also prevent its printing, even when there are no footnotes. @PP Basser Lout is keen to write out pages as soon as possible, to save memory, and it cannot afford to wait forever for non-existent footnotes. A variant of the galley concept, called a @I {forcing galley}, forcing.galley @Index { Forcing galley } {@PageMark forcing} is introduced to solve this problem. A forcing galley is defined like this: @ID @OneRow @Code { "def @Text force into { @TextPlace&&preceding }" " ..." } and so on. When such a galley replaces a @@Galley symbol, Lout replaces every receptive symbol preceding the @@Galley by @@Null, thus ensuring that as soon as text enters a page, for example, everything up to and including the preceding page can be printed. This does not take care of the very last page, but Basser Lout replaces all receptive symbols by @@Null when it realizes that its input has all been read, thus allowing the last page to print. @PP A forcing galley causes the Third Law to be applied earlier than expected, and this creates two problems. First, the replacement by @@Null may be premature: a galley may turn up later wanting one of the defunct targets. Such galleys (entries in tables of contents are typical examples) are copied into the cross reference database and read in during the next run just before their targets are closed, and so they find their targets in the end. Care must be taken to ensure that large galleys such as chapters and sections do not have defunct targets, since the cost of copying them to and from the database is unacceptably high. @PP It is actually an over-simplification to say that these replacements occur when the forcing galley replaces its @@Galley. What really happens is that from this moment on Lout understands that it has the right to make these replacements, and it will do each one at the first moment when not doing it would hold things up. So there is a short period of grace when galleys, such as the entries in tables of contents just alluded to, can sneak into these receptive symbols. @PP The @Code "into" and @Code "force into" forms are actually just abbreviations for the true way that galleys are defined, which is by giving the symbol that is to be a galley a parameter or nested target.sym @Index { @Code "@Target" symbol } definition with the special name {@Code "@Target"}: @ID @Code { "def @Text" " right x" "{" " def @Target { @TextPlace&&preceding }" "" " x" "}" } A forcing galley is obtained by using @Code "&&&" instead of {@Code "&&"}. @Code "@Target" may be an arbitrary object, provided that it yields such a cross reference when evaluated. In this way, different invocations may have different targets. @PP The forcing galley effect can be obtained in another way, by replacing the @Code "@Galley" symbol to which the galley is attached by {@Code "@ForceGalley"}. The advantage of this form is that the galley can then be forcing at some places and not at others, using the formula @ID @OneRow @Code { "def @SomePlace right x" "{" " x @Case {" " noforce @Yield @Galley" " force @Yield @ForceGalley" " }" "}" } Now a galley may have @Code "@SomePlace" for its target, and if it happens to attach to @ID @Code "@SomePlace force" it will have the effect of a forcing galley, while if it happens to attach to @ID @Code "@SomePlace noforce" it will not. @PP Although it doesn't matter whether a galley is declared as a forcing galley or merely arrives at a {@Code "@ForceGalley"} symbol from the point of view of the effect on nearby targets, there is one way in which Lout treats the two cases differently. If a forcing galley's first component does not fit into the available space, that component will be scaled vertically until it does. The rationale for this is that forcing galleys are meant to carry the bulk of the document and cannot afford to be held up because the user has inadvertently included an over-high component, which for all Lout knows to the contrary may not fit on any page. If this scaling is not wanted but forcing is, the galley may be declared not forcing but all its targets may be set to contain {@Code "@ForceGalley"}. @PP Within a galley, a symbol whose name is @@Enclose has a special enclose.sym @Index @@Enclose meaning: when components of the galley replace a @@Galley or @@ForceGalley symbol, that symbol is first replaced by @@Enclose @@Galley or @@Enclose @@ForceGalley. For example, @ID @Code @Verbatim { def @Figure into @FigurePlace&&following right @Body { def @Enclose right x { @Box x } @Body } } causes each @@Galley or @@ForceGalley symbol that receives components of galley @Code "@Figure" to be replaced by {@Code "@Box @Galley"} or {@Code "@Box @ForceGalley"}, assuming an appropriate definition of @Code "@Box". This is useful, for example, when producing multi-page boxed displays, figures, and tables. @PP An @@Enclose symbol may have only one parameter, which must be a right parameter. It would not make sense to allow more parameters, since there is no suitable value to assign to them. However, the @@Enclose symbol may contain inner definitions, and it may make use of any symbol that is available at that point, in the usual way. The @@Enclose symbol may be a named parameter (itself with a right parameter) of the galley symbol, rather than an inner definition as shown above, if desired. @PP It makes sense for sorted galleys containing a @Code "@Merge" symbol (Section {@NumberOf sorted}) to also have an @Code "@Enclose" symbol. The meaning is that after all merging is done, each resulting galley has an @Code "@Enclose" symbol which is applied in the usual way. The value of this @Code "@Enclose" symbol will be the value of an @Code "@Enclose" symbol from one of the contributing galleys, but exactly which one is not defined. So it is safest if all such @Code "@Enclose" symbols produce the same result. @PP A @Code "following" galley may fail to find a first target lying in a following component of the same galley as its invocation point. This is a deficiency of Basser Lout, which occurs if the target has not been read from input at the time the galley tries to find it. A workaround is to use a @Code "preceding" galley instead, defined like this: @ID @OneRow @Code { "def @AGalley into { @AGalleyPlace&&preceding }" " right @Body" "{" " //1.1b" " @Body" "}" } and invoked like this: @ID @OneRow @Code { "@AGalleyPlace | @AGalley { content of galley }" "//" "..." "@AGalleyPlace" } The first @Code "@AGalleyPlace" receives only the initial empty object, since the @Code "//1.1b" forces a split; and the Second Law puts Basser Lout on the right track thereafter. @End @Section lout-3.39/doc/expert/exa_bibl0000644000076400007640000002043411363700677014632 0ustar jeffjeff@Section @Title { Bibliographies } @Tag { biblio } @Begin @PP bibliographies @Index { Bibliographies } The first step in the production of a bibliography is to create a database of references based on the definition reference.example @Index { @Code "@Reference" example } @ID @Code { "export @Type @Author @Title @Institution @Number @Publisher" //1vx " @Year @Proceedings @Journal @Volume @Pages @Comment" //1vx "" //1vx "def @Reference" //1vx " named @Tag" |2f "{ TAG? }" /1vx " named @Type" | "{ TYPE? }" /1vx " named @Author" | "{ AUTHOR? }" /1vx " named @Title" | "{ TITLE? }" /1vx " named @Institution" | "{ INSTITUTION? }" /1vx " named @Number" | "{ NUMBER? }" /1vx " named @Publisher" | "{ PUBLISHER? }" /1vx " named @Year" | "{ YEAR? }" /1vx " named @Proceedings" | "{ PROCEEDINGS? }" /1vx " named @Journal" | "{ JOURNAL? }" /1vx " named @Volume" | "{ VOLUME? }" /1vx " named @Pages" | "{ PAGES? }" /1vx " named @Comment" | "{ @Null }" //1vx "{ @Null }" } For example, the database might contain @IL @LI @Code { "{ @Reference" " @Tag { strunk1979style }" " @Type { Book }" " @Author { Strunk, William and White, E. B. }" " @Title { The Elements of Style }" " @Publisher { MacMillan, third edition }" " @Year { 1979 }" "}" } @LI @Code { "{ @Reference" " @Tag { kingston92 }" " @Type { TechReport }" " @Author { Kingston, Jeffrey H. }" " @Title { Document Formatting with Lout (Second Edition) }" " @Number { 449 }" " @Institution { Basser Department of Computer" "Science F09, University of Sydney 2006, Australia }" " @Year { 1992 }" "}" } @EL Since named parameters are optional, we have one for every conceivable type of attribute, and simply leave out those that do not apply in any particular reference. We can print a reference by using the @@Open symbol to get at its attributes: @ID @Code { "@Reference&&strunk1979style @Open" "{ @Author, {Slope @Font @Title}. @Publisher, @Year. }" } The right parameter of @@Open may use the exported parameters of the left, and so the result is @ID { @Reference&&strunk1979style @Open { @Author, {Slope @Font @Title}. @Publisher, @Year. } |0io } Incidentally, we are not limited to just one database of references; several @@Database symbols can nominate the same symbol, and invocations of that symbol can appear in the document itself as well if we wish. @PP The second step is to create a database of print styles for the various types of reference (Book, TechReport, etc.), based on the following definition: @ID @Code { "export @Style" "def @RefStyle" " left @Tag" " named @Style right reftag {}" "{}" } Notice that the named parameter @Code "@Style" has a right parameter {@Code "reftag"}. The style database has one entry for each type of reference: @ID @Code { "{ Book @RefStyle @Style" " { @Reference&&reftag @Open" " { @Author, {Slope @Font @Title}. @Publisher, @Year. @Comment }" " }" "}" "" "{ TechReport @RefStyle @Style" " { @Reference&&reftag @Open" " { @Author, {Slope @Font @Title}. Tech. Rep. @Number (@Year)," "@Institution. @Comment }" " }" "}" } and so on. The following prints the reference whose tag is @Code strunk1979style in the Book style: @ID @Code { "@RefStyle&&Book @Open { @Style strunk1979style }" } It has result @ID { @RefStyle&&Book @Open { @Style strunk1979style } |0io } Notice how the @Code "@Style" parameter of @Code "@RefStyle" is given the parameter {@Code strunk1979style}, which it uses to open the appropriate reference. @PP We can consult the @Code "@Type" attribute of a reference to find out its style, which brings us to the following definition for printing out a reference in the style appropriate to it: @ID @Code { "def @RefPrint" " right reftag" "{ @RefStyle&&{ @Reference&&reftag @Open { @Type } }" " @Open { @Style reftag }" "}" } For example, to evaluate {@Code "@RefPrint strunk1979style"}, Lout first evaluates @ID @Code { "@Reference&&strunk1979style @Open { @Type }" } whose result is {@Code { @Reference&&strunk1979style @Open { @Type } }}, and then evaluates @ID @Code { "@RefStyle&&Book @Open { @Style strunk1979style }" } as before. Complicated as this is, with its two databases and clever passing about of tags, the advantages of separating references from printing styles are considerable: printing styles may be changed easily, and non-expert users need never see them. @PP Finally, we come to the problem of printing out a numbered list of references, and referring to them by number in the body of the document. The first step is to create a numbered list of places that galleys containing references may attach to: referencesection.example @Index { @Code "@ReferenceSection" example } @ID @Code { "def @ReferenceSection" " named @Tag {}" " named @Title { References }" " named @RunningTitle { dft }" " named style right tag { tag. }" " named headstyle right @Title { @Heading @Title }" " named indent { @DispIndent }" " named gap { @DispGap }" " named start { 1 }" "{" " def @RefList right num" " {" " @NumberMarker num & indent @Wide {style num} | @RefPlace" " //gap @RefList @Next num" " }" "" " @Protect headstyle @Title" " // @PageMarker&&preceding @Tagged @Tag" " // @Title @MajorContentsEntry {@PageOf @Tag}" " // @Runner" " @FootEven { |0.5rt 0.8f @Font @B @PageNum }" " @FootOdd { |0.5rt 0.8f @Font @B @PageNum }" " //@DispGap @RefList start" " // @Runner" " @TopEven { @B @PageNum }" " @TopOdd { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }" "}" } We place the expression @Code "@ReferenceSection" at the point where we want the list of references to appear; its value is something like @ID @Code { "1. @RefPlace" "2. @RefPlace" "3. @RefPlace" "..." } where @Code "@RefPlace" is @Code "@Galley" as usual. We can scatter multiple lists of references through the document if we wish (at the end of each chapter, for example), simply by placing @Code "@ReferenceSection" at each point. @PP Our task is completed by the following definition: ref.example @Index { @Code "@Ref" example } @ID @Code { "def @Ref right x" "{" " def sendref into { @RefPlace&&following }" " right @Key" " {" " @NumberMarker&&preceding @Tagged x &" " @PageMarker&&preceding @Tagged x &" " @RefPrint x" " }" "" " @NumberMarker&&x @Open { @Tag } sendref x" "}" } Given this definition, the invocation {@Code "@Ref strunk1979style"} has result @ID @Code "@NumberMarker&&strunk1979style @Open { @Tag }" plus the galley {@Code "sendref strunk1979style"}. We first follow what happens to the galley. @PP According to its @Code into clause, the galley will replace a @Code "@RefPlace" in the nearest following {@Code "@ReferenceSection"}. If every such galley is a sorted galley whose key is the reference's tag, as this one is, they will appear sorted by tag. The galley's object is @ID @Code { "@NumberMarker&&preceding @Tagged strunk1979style &" "@PageMarker&&preceding @Tagged strunk1979style &" "@RefPrint strunk1979style" } The result of the @@Tagged symbol is always @@Null, so this prints the @Code strunk1979style reference in the appropriate style at the {@Code "@RefPlace"}, as desired. @PP Now @Code "@NumberMarker&&preceding" is the nearest preceding invocation of @Code "@NumberMarker" in the final document. This must be the invocation of @Code "@NumberMarker" just before the @Code "@RefPlace" that received the galley, and so this invocation of @Code "@NumberMarker" is given @Code strunk1979style as an additional tag by the @@Tagged symbol. Its original tag was the number of the reference place, which means that @ID @Code { "@NumberMarker&&strunk1979style @Open { @Tag }" } has for its result the number of the reference place that received the @Code strunk1979style galley, and this is the desired result of {@Code "@Ref strunk1979style"}. @PP It might seem that if we refer to the @Code strunk1979style reference twice, two copies will be sent to the reference list and it will appear twice. However, when more than one sorted galley with the same key is sent to the same place, only one of them is printed (Section {@NumberOf galleys}); so provided that sorted galleys are used there is no problem. @End @Section lout-3.39/doc/expert/pri_gall0000644000076400007640000002215511363700677014660 0ustar jeffjeff@Section @Title { Galleys } @Tag { galleys } @Begin @PP It is time to pause and ask ourselves how close we are to achieving our aim of producing neatly formatted documents. We can certainly produce the pieces of a document: @ID { nohyphen @Break @LittlePageColumn { @DP |0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v} @DP In the world of music England is supposed to be a mere province. If she produces an indifferent composer or performer, that is regarded elsewhere as perfectly normal and natural; but if foreign students of musical history have to acknowledge a British musical genius, he is considered a freak. @PP Such a freak is Henry Purcell. Yet if we make a choice of fifteen of the world's musical classics, as here, we find that we cannot omit this English master. } ||1c @LittlePageColumn { { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944. } ||1c @Code { @LittlePage { "@TextPlace" //1rt "@FootSect" } // @LittlePage { "@TextPlace" //1rt "@FootSect" } // @LittlePage { "@TextPlace" //1rt "@FootSect" } //0.2c 8p @Font "@PageList" } } but when we try to merge them together, we encounter two obstacles. @PP First, when an object is entered at a certain place in the document, it appears at that place. But a footnote is naturally entered immediately after the point it refers to (`{-2p @Font PURCELL}' in this case), yet it appears somewhere else: at the bottom of a page. @PP Second, all our features build up larger objects out of smaller ones, but the -2p @Font PURCELL object, for example, must be broken down into page-sized pieces. This occurs when the available space at the `somewhere else' is insufficient to hold the entire object, so this second obstacle arises out of the first. @PP Lout's last major feature, which we introduce to overcome these obstacles, is the @I galley galley.feature @Index { Galleys } (the name is borrowed from the galleys used in manual typesetting). A galley is an object plus a cross reference which points to where the object is to appear. The example above has three galleys: @ID { { //0.1c nohyphen @Break @LittlePageColumn { @DP |0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v} @DP In the world of music England is supposed to be a mere province. If she produces an indifferent composer or performer, that is regarded elsewhere as perfectly normal and natural; but if foreign students of musical history have to acknowledge a British musical genius, he is considered a freak. @PP Such a freak is Henry Purcell. Yet if we make a choice of fifteen of the world's musical classics, as here, we find that we cannot omit this English master. } { //0.4c 180d @Rotate @Arrow 2.0c } } ||0io ||4.8c @Code { @LittlePage { "@TextPlace" //1rt "@FootSect" } // @LittlePage { "@TextPlace" //1rt "@FootSect" } // @LittlePage { "@TextPlace" //1rt "@FootSect" } //0.2c 8p @Font "@PageList" } 180d @Rotate @Arrow 1i @I -2p @Font {to printer} ||0io ||2.0c { //3.9c { @Arrow 1.7c } nohyphen @Break @LittlePageColumn { { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944. } } } A galley replaces the invocation pointed to by its cross reference. If space is not sufficient there to hold it all, the remainder of the galley is split off (the vertical concatenation symbol preceding it being discarded) and it replaces later invocations of the same symbol. This is exactly what is required to get text and footnotes onto pages. @PP To create a galley, first define a symbol with a special @Code into into @Index { @Code into clause } clause, like this: @ID @OneRow @Code { "def @FootNote into { @FootPlace&&following }" " right x" "{" " 8p @Font x" "}" } An invocation of such a symbol will then be a galley whose object is the result of the invocation, and whose cross reference is given by the @Code into clause. The right parameter of the cross reference must be one of {@Code preceding}, {@Code following}, and {@Code foll_or_prec}. @PP A symbol, like @Code "@FootPlace", which is the @I target of a galley, target.g @Index { Target of a galley } must contain the special symbol @@Galley exactly once in its body; often this is all that the body contains: @ID @Code { "def @FootPlace { @Galley }" } It is this special symbol that is replaced by the incoming galley, in fact, not the @Code "@FootPlace" symbol as a whole. @PP A symbol which contains @@Galley, either directly within its body or indirectly within the body of a symbol it invokes, is called a @I receptive receptive @Index { Receptive symbol } symbol, meaning receptive to galleys. @Code "@FootPlace" is receptive, which makes @Code "@FootList", @Code "@FootSect" and @Code "@PageList" receptive since they invoke @Code "@FootPlace". If no galley replaces any @@Galley within some invocation of a receptive symbol, that invocation is replaced by @@Null. The advantages of this rule for page layout were explained at the end of Section {@NumberOf definitions}. @PP Let us now follow through the construction of our example document. Initially there is just the one @I root root.galley @Index { Root galley } galley, containing an unexpanded invocation of @Code "@PageList": @ID { ||5c 10p @Font @Code "@PageList" 180d @Rotate @Arrow 1i @I -2p @Font {to printer} } Then the -2p @Font PURCELL galley appears, targeted to a @Code "@TextPlace". Lout knows that there is a @Code "@TextPlace" hidden inside @Code "@PageList", so it expands @Code "@PageList": @ID { { //0.1c nohyphen @Break @LittlePageColumn { @DP |0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v} @DP In the world of music England is supposed to be a mere province. If she produces an indifferent composer or performer, that is regarded elsewhere as perfectly normal and natural; but if foreign students of musical history have to acknowledge a British musical genius, he is considered a freak. @PP Such a freak is Henry Purcell. Yet if we make a choice of fifteen of the world's musical classics, as here, we find that we cannot omit this English master. } { //0.4c 180d @Rotate @Arrow 2.2c } } ||0io ||5c @Code { @LittlePage { "@TextPlace" //1rt "@FootSect" } //0.2c 8p @Font "@PageList" } 180d @Rotate @Arrow 1i @I -2p @Font {to printer} } After promoting the first line into @Code "@TextPlace", the footnote galley attached to it appears and demands an invocation of @Code "@FootPlace" following its attachment point (`{-2p @Font PURCELL}'). Such a @Code "@FootPlace" is found at the bottom of the first page, inside @Code "@FootSect", which is accordingly expanded, and the footnote is promoted onto the page: @ID { { //1.2c nohyphen @Break @LittlePageColumn { In the world of music England is supposed to be a mere province. If she produces an indifferent composer or performer, that is regarded elsewhere as perfectly normal and natural; but if foreign students of musical history have to acknowledge a British musical genius, he is considered a freak. @PP Such a freak is Henry Purcell. Yet if we make a choice of fifteen of the world's musical classics, as here, we find that we cannot omit this English master. } 180d @Rotate @Arrow 2.2c } ||0io ||5c { nohyphen @Break @LittleDocument // @LittleText { @DP |0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v} @LittleFootNote { { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944. //1vx @Code "@FootList" } //1vx @Code "@TextPlace" } // @LittleEndRun //0.2c 8p @Font @Code "@PageList" } 180d @Rotate @Arrow 1i -2p @Font @I {to printer} } Now the promotion of the -2p @Font PURCELL galley resumes. When the first page is filled, Lout searches forwards for another @Code "@TextPlace" to receive the remainder, once again expanding a @Code "@PageList": @ID { { //4.85c nohyphen @Break @LittlePageColumn { performer, that is regarded elsewhere as perfectly normal and natural; but if foreign students of musical history have to acknowledge a British musical genius, he is considered a freak. @PP Such a freak is Henry Purcell. Yet if we make a choice of fifteen of the world's musical classics, as here, we find that we cannot omit this English master. } 180d @Rotate @Arrow 2.2c } ||0io ||5c { nohyphen @Break @LittleDocument // @LittleText { @DP |0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v} @LittleFootNote { { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944. } @DP @HExpand {In the world of music} //1vx @HExpand {England is supposed to} //1vx @HExpand {be a mere province. If} //1vx @HExpand {she produces an indifferent composer or} } // @LittleEndRun // @LittlePage { @Code "@TextPlace" //1rt @Code "@FootSect" } //0.2c 8p @Font @Code "@PageList" } 180d @Rotate @Arrow 1i -2p @Font @I {to printer} } and so on. All these expansions and replacements are done with total integrity. For example, if Lout finds after expanding @Code "@FootSect" that the page is too full to accept even the first line of the footnote, @Code "@FootSect" is reset to unexpanded and the search for a target for the footnote moves on. And the cross reference direction, @Code preceding or @Code following, is always obeyed (although lack of space sometimes prevents Lout from choosing the nearest target). Only the root galley contains receptive symbols in our running example, but any galley may contain them. @End @Section lout-3.39/doc/expert/pre_span0000644000076400007640000000533511363700677014677 0ustar jeffjeff@Section @Title { "@StartHSpan","@StartVSpan", "@StartHVSpan", "@HSpan", and "@VSpan" } @Tag { hspan } @Begin @PP starthspan. @Index { @@StartHSpan symbol } startvspan. @Index { @@StartVSpan symbol } starthvspan. @Index { @@StartHVSpan symbol } hspan. @Index { @@HSpan symbol } vspan. @Index { @@VSpan symbol } These symbols work together to produce spanning columns and rows in a more flexible way than is possible in practice with @Code "//" and {@Code "||"}. An object @ID @Code "@StartHSpan object" causes @Code object to be printed, but occupying all the horizontal space to the right on the row mark on which it lies up to and including the rightmost @@HSpan symbol on that mark not preceded by @@StartHVSpan, @@StartHSpan, @@StartVSpan, or @@VSpan. The column mark of this spanning object is not constrained to align with any of the column marks of the columns it spans. @PP If there is no @@HSpan symbol anywhere to the right of @@StartHSpan, then the object spans only its own column. This means that it occupies that column as usual but its mark is not constrained to align with those of the other objects in the column. @PP Similarly, the @@StartVSpan symbol causes its object to occupy all the vertical space below it on the column mark on which it lies, down to and including the bottommost @@VSpan symbol on that mark not preceded by a @@StartHVSpan, @@StartHSpan, @@StartVSpan, or @@HSpan; and if there is no @@VSpan symbol anywhere below it on that mark, then the object spans only its own row, occupying its row but with its mark not constrained to align with the row mark. @PP The @@StartHVSpan symbol combines the effects of @@StartHSpan and @@StartVSpan, allowing an object to span both columns and rows simultaneously. For example, in @ID @Code { "@StartHVSpan x | | @HSpan" "/" "@VSpan | |" } the object @Code x will occupy a rectangular area spanning three columns, two rows, and the gaps between them. @PP The objects lying in the region spanned should all be empty, or the @@HSpan and @@VSpan symbols can be used to document the spanning that is occurring. At present there may be no galley targets or recursive symbols within the right parameter of @@StartHSpan, @@StartVSpan, or @@StartHVSpan. However, the right parameter may otherwise be an arbitrary object, including paragraphs of text that require breaking. @PP If the right parameter of @@StartHSpan, @@StartVSpan, or @@StartHVSpan occupies more horizontal or vertical space than all of the spanned columns or rows combined require, the extra space goes into the last spanned column or row. Overlapping spanning rows and columns are permitted. Gaps spanned by span objects are unbreakable (their @Code "u" indicator is set automatically and cannot be revoked). @End @Section lout-3.39/doc/expert/exa_inde0000644000076400007640000001706511363700677014647 0ustar jeffjeff@Section @Title { Merged index entries } @Tag { exa_inde } @Begin @PP Getting index entries to merge correctly has been quite a struggle. It is easy to specify what is wanted, but Lout lacks the lists and objects (in the object-oriented sense) that would make the implementation straightforward. The whole problem was reanalysed for Version 3.26, reimplemented, tested more carefully than is usually necessary in Lout, and proved correct as follows. @PP We ignore page number ranges in this proof. It is not hard to show that they will be handled correctly too, provided they do not overlap with other entries with the same key. The effect of such overlaps is undefined, leaving us nothing to prove. We also assume that every entry with a given key has the same label, including any format (that is, the same initial part before the page number). If labels differ the result is undefined and there is nothing to prove. @PP We will prove that raw entries always have the form @ID @Code "label &0.03fu {}" and that non-raw entries always have the form @ID @Code "label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2" where the pattern may repeat for any number of page numbers {@Code pn1}, {@Code pn2}, etc. In addition, the page numbers will be distinct, monotone increasing, and consist of exactly the numbers in the original unmerged entries. @PP These expressions are not the simplest that would give the correct appearance. Without @Code "&0.03fu {}" the code would not work correctly, as will be explained below. Without @@OneCol the commas would be subject to an optimization which can merge them into the previous word. It's too difficult to explain when this optimization will and will not be applied; suffice to say that it will sometimes not happen when melding, and this will cause @@Meld to get its equality testing wrong, so it must be prevented from happening at all. @PP Our proof is by induction on the number of entries merged together. First, we need to establish the base cases. If the index entry is raw, the following expression is used to define its value: @ID @Code "label &0.03fu {}" If the index entry is non-raw, the following expression is used to define its value: @ID @Code "label &"0.03fu" {}{@OneCol ,} pn" where @Code pn is the page number or page number range of the entry. In each case we clearly have an entry that satisfies all the requirements of the theorem. @PP Now consider what happens when we come to merge two entries. The code used to carry out this merge is @ID @OneRow @Code @Verbatim { def @Merge left x right y { { x @Rump { x @Meld y } } @Case { "" @Yield x else @Yield { { x{@OneCol ,} } @Meld y } } } } where @Code x is the first entry and {@Code y} is the second. @PP We call the expression @ID @Code "x @Rump { x @Meld y }" the {@I discriminant}, since it determines which case to apply. We will track this in detail below, but approximately, its function is to determine whether @Code y contains something that is different from anything in {@Code x}. If so, then @Code "x @Meld y" differs from @Code "x" and the discriminant is non-empty; if not, @Code "x @Meld y" is equal to @Code "x" and the discriminant is empty. @PP The first entry, @Code { x }, may be raw or non-raw, and the second, @Code { y }, may also be raw or non-raw, together giving four cases, which we take in turn. @PP If both entries are raw, then by assumption they have the same labels and so are identical. Thus, @Code "x @Meld y" equals @Code { x }, the discriminant is empty, and the result is @Code { x }, which is correct. @PP If @Code { x } is raw and @Code { y } is non-raw, then the discriminant is non-empty and the result is the meld of two objects, the first having the form @ID @Code "label &0.03fu {}{@OneCol ,}" being @Code "x" with a comma appended, and the second being some non-raw entry such as @ID @Code "label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2" where the pattern may repeat. We are assuming by induction that @Code y has this form. Clearly, this meld gives a value equal to @Code { y }, which is the correct result. @PP If @Code { x } is non-raw and @Code { y } is raw, the @@Meld in the discriminant melds two values typified by @ID @Code "label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2" and @ID @Code "label &0.03fu {}" The result of this is @Code { x } with an empty object added at the end. This empty object is the second element of @Code { y }, which is not equal to any element of @Code { x }: the second element of @Code x is not @Code "{}" but rather @Code { "{}{@OneCol ,}" }, because @@Meld treats immediately adjacent objects as single elements. The result of @@Rump is then this extra empty object, so the discriminant is the empty object and we return @Code { x }, correctly. It is this case that requires us to use {@Code "0.03fu"}; without it we would be melding @ID @Code "label{@OneCol ,} pn1{@OneCol ,} pn2" with @ID @Code "label" producing @ID @Code "label{@OneCol ,} pn1{@OneCol ,} pn2 label" leading to a non-empty discriminant and the wrong answer. @PP This leaves just the case where both @Code x and @Code y are non-raw. We will divide this last case into three sub-cases, but first we need some general observations. @PP Index entries are sorted for merging in the order in which their anchor points appear in the final printed document. This means that over the course of these entries the page numbers are non-decreasing. It is therefore clear that, although the order of merging is undefined (actually a balanced tree order is used), whenever two entries are presented for merging, all the page numbers in the first entry are no larger than all the page numbers in the second entry. We are also assuming inductively that the page numbers in each entry are distinct and monotone increasing. Thus, there can be at most one page number common to any two entries being merged, and if there is one in common it is the last page number of the first entry and the first of the second. @PP Our first sub-case is when the two entries have no page number in common. Since @Code { y } is non-raw, it has a page number not equal to any page number in @Code { x }. Therefore the discriminant is non-empty and the result is the meld of @Code "x{@OneCol ,}" with @Code { y }, which for example could be the meld of @ID @Code "label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2{@OneCol ,}" with @ID @Code "label &0.03fu {}{@OneCol ,} pn3{@OneCol ,} pn4" This will give the right answer, since @@Meld treats adjacent objects as single elements, and always incorporates elements from the first parameter first when it has a choice. @PP Our second sub-case is when the two entries have a page number in common and @Code { y } has two or more page numbers. The common page number must be the last of @Code x and the first of @Code { y }, so again @Code { y } has something (its last page number) distinct from @Code { x }, the discriminant is non-empty, and we end up for example melding @ID @Code "label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2{@OneCol ,}" with @ID @Code "label &0.03fu {}{@OneCol ,} pn2{@OneCol ,} pn3" Again it's clear that the meld will produce the right answer; in fact, this second sub-case could be unified with the first sub-case. @PP Our third sub-case is when the two entries have a page number in common and @Code { y } has only one page number. In this case, typified by @Code { x } with value @ID @Code "label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2" and @Code y with value @ID @Code "label &0.03fu {}{@OneCol ,} pn2" it is clear that @Code y offers nothing new, the discriminant is empty, and the result, quite correctly, is @Code { x }. This completes the proof. @End @Section lout-3.39/doc/expert/pre_brea0000644000076400007640000001546011363700677014647 0ustar jeffjeff@Section @Title { "@Break" } @Tag { break } @Begin @PP The @@Break symbol influences the appearance of paragraphs (Section {@NumberOf concatenation}), offering a fixed set of styles: @IL @LI { 2i @Wide { |1rt @Code adjust @@Break @I object } adjust.break @Index { @Code adjust @@Break } |2m Break the paragraphs of {@I object} into lines, and apply @@PAdjust (Section {@NumberOf hadjust}) to every line except the last in each paragraph; } @LI { 2i @Wide { |1rt @Code outdent @@Break @I object } outdent.break @Index { @Code outdent @@Break } |2m Like {@Code adjust}, except that @Code "2.0f @Wide {} &0i" is inserted at the beginning of every line except the first, creating an outdented paragraph (the outdent width may be changed -- see below); } @LI { 2i @Wide { |1rt @Code ragged @@Break @I object } ragged.break @Index { @Code ragged @@Break } |2m Break the paragraphs of {@I object} into lines, but do not adjust the lines (`ragged right'); } @LI { 2i @Wide { |1rt @Code cragged @@Break @I object } cragged.break @Index { @Code cragged @@Break } |2m Like {@Code ragged}, except that each line will be centred with respect to the others; } @LI { 2i @Wide { |1rt @Code rragged @@Break @I object } rragged.break @Index { @Code rragged @@Break } |2m Like {@Code ragged}, except that each line will be right-justified with respect to the others (`ragged left'); } @LI { 2i @Wide { |1rt @Code oragged @@Break @I object } oragged.break @Index { @Code oragged @@Break } |2m The obvious combination of {@Code ragged} and {@Code outdent}; } @LI { 2i @Wide { |1rt @Code lines @@Break @I object } lines.break @Index { @Code lines @@Break } |2m Break the paragraphs of {@I object} into lines at the same points that they are broken into lines in the input, and also at concatenation symbols of the form {@Code "&"}{@I k}{@Code "b"} for any {@I k} greater than 1. Do not adjust the lines. Any spaces at the start of a line other than the first line will appear in the output; } @LI { 2i @Wide { |1rt @Code clines @@Break @I object } clines.break @Index { @Code clines @@Break } |2m Break the paragraphs of {@I object} into lines as for @Code "lines" @@Break, then centre each line with respect to the others; } @LI { 2i @Wide { |1rt @Code rlines @@Break @I object } rlines.break @Index { @Code rlines @@Break } |2m Break the paragraphs of {@I object} into lines as for @Code "lines" @@Break, then right-justify each line with respect to the others. } @LI { 2i @Wide { |1rt @Code olines @@Break @I object } olines.break @Index { @Code olines @@Break } |2m Break the paragraphs of {@I object} into lines as for @Code "lines" @@Break, then as for outdenting. } @EL If the paragraph was an entire component of a galley, so will each of its lines be; otherwise the lines are enclosed in a {@Code "@OneRow"} symbol after breaking. @PP The length of the gap used to separate the lines produced by paragraph breaking is always {@Code 1v}, except when {@Code lines}, {@Code clines}, or {@Code rlines} encounter a completely blank line, for which see below. However, the @Code v unit itself and the v.unit.effect @SubIndex { effect on paragraph breaking } gap mode may be changed: @IL @LI { 2i @Wide { |1rt @I gap @Code "@Break" @I object } |2m Within {@I object}, take the value of the @Code "v" unit to be the length of {@I gap}; } @LI { 2i @Wide { |1rt + & @I gap @Code "@Break" @I object } |2m Within {@I object}, take the value of the @Code "v" unit to be larger by the length of @I gap than it would otherwise have been; } @LI { 2i @Wide { |1rt -- & @I gap @Code "@Break" @I object } |2m Within {@I object}, take the value of the @Code "v" unit to be smaller by the length of @I gap than it would otherwise have been. } @EL In each case, the mode of @I gap is adopted within {@I object}. @PP When {@Code lines}, {@Code clines}, or {@Code rlines} encounter one or more completely blank lines, a single vertical concatenation operator is inserted to implement these, ensuring that the entire set of lines will disappear if they happen to fall on a page or column break. The gap width of the concatenation operator is {@Code 1v} for the first newline as usual, plus {@Code 1v} multiplied by the @I { blank line scale factor }, an arbitrary decimal number with no units, for the remaining newlines. This scale factor is settable by @ID { @Code "{ blanklinescale" @I num @Code "} @Break" @I object } The default value is {@Code 1.0}, which gives blank lines their full height. However it often looks better if they are reduced somewhat. A value as small as {@Code 0.6} looks good; it gives width {@Code 1.6v} to the concatenation symbol inserted at a single blank line. The usual gap mode is of course appended. @PP The @@Break symbol also controls hyphenation: @IL @LI { 2i @Wide { |1rt @Code "hyphen @Break" @I object } hyphen.break @Index { @Code hyphen @@Break } |2m Permit hyphenation within the paragraphs of {@I object}; } @LI { 2i @Wide { |1rt @Code "nohyphen @Break" @I object } nohyphen.break @Index { @Code nohyphen @@Break } |2m Prohibit hyphenation within the paragraphs of {@I object}; all hyphenation gaps without exception revert to edge-to-edge mode. } @EL The @@Break also has options which control widow and orphan lines: @IL @LI { 2i @Wide { |1rt @Code "unbreakablefirst @Break" @I object } hyphen.break @Index { @Code hyphen @@Break } |2m Prevent column and page breaks (i.e. prevent a galley from splitting) between the first and second lines of the paragraphs of {@I object}; } @LI { 2i @Wide { |1rt @Code "unbreakablelast @Break" @I object } nohyphen.break @Index { @Code nohyphen @@Break } |2m Prevent column and page breaks between the last and second last lines of the paragraphs of {@I object}. } @EL These options work by adding the @Code "u" (unbreakable) suffix to the appropriate gaps during paragraph breaking, so their precise effect is as described for this suffix. These options may be countermanded by @Code "breakablefirst @Break" and @Code "breakablelast @Break". @PP The width of the outdenting used in the @Code "outdent" style may be changed like this: @IL @LI { 2i @Wide { |1rt @Code "{ setoutdent" @I width @Code "} @Break" @I object } |2m Within {@I object}, whenever outdenting is required, use @I width for the amount of outdenting. Note that this does not itself cause a switch to outdenting style. The width may be preceded by @Code "+" or @Code -- to indicate a change to the existing outdent value. } @EL Margin kerning, in which small (usually punctuation) characters protrude into the margin, may be obtained by @Code "marginkerning @Break" and turned off by @Code { "nomarginkerning @Break" }. @PP Several options may be given to the @@Break symbol simultaneously, in any order. For example, @ID @Code "{ adjust 1.2fx hyphen } @Break ..." is a typical initial value. There may be empty objects and @@Null objects in the left parameter of @@Break; these are ignored. @End @Section lout-3.39/doc/expert/pre_scal0000644000076400007640000000170711363700677014657 0ustar jeffjeff@Section @Title { "@Scale" } @Tag { scale } @Begin @PP scale. @Index { @@Scale symbol } This symbol geometrically scales its right parameter by the scale factor given in its left parameter: @ID @Code "1.0 @Scale Hello 2.0 @Scale Hello 0.5 @Scale Hello" has result @ID { 1.0 @Scale Hello 2.0 @Scale Hello 0.5 @Scale Hello } The left parameter can be two scale factors, in which case the first applies horizontally, and the second vertically: @ID @Code "{0.5 2.0} @Scale Hello" has result @ID { {0.5 2.0} @Scale Hello } The left parameter may be empty, in which case Lout will scale the object by a common factor horizontally and vertically so as to occupy all available horizontal space: @ID @Code "{} @Scale { Hello world }" has result @LD {} @Scale { Hello world } The right parameter may be any object. @@Scale has both a @@OneCol and a @@OneRow effect, and the marks of the result coincide with the principal marks of the right parameter. @End @Section lout-3.39/doc/expert/pre_prep0000644000076400007640000000255011363700677014700 0ustar jeffjeff@Section @Tag { prependgraphic } @Title { "@PrependGraphic and @SysPrependGraphic" } @Begin @PP prependgraphic.sym @Index { @@PrependGraphic symbol } sysprependgraphic.sym @Index { @@SysPrependGraphic symbol } postscript.prependgraphic @SubIndex { used by @@PrependGraphic } These symbols, which may appear anywhere that a definition or @@Use symbol may appear, tell Lout to include the contents of a file in the preamble of its output. For Basser Lout this means that the file must contain PostScript (and ideally it would begin and end with the @Code "%%BeginResource" and @Code "%%EndResource" comments of DSC 3.0). For example, @ID @Code { "@SysPrependGraphic { diagf.lpg }" } appears at the start of the Diag package; the file @Code diagf.lpg contains a number of PostScript definitions used by Diag for drawing diagrams. It saves a lot of space to include them just once at the start like this, rather than with every diagram. @@PrependGraphic and @@SysPrependGraphic search for the file in the same places as @@Include and @@SysInclude respectively. @PP If the same file name appears in two @@PrependGraphic or @@SysPrependGraphic symbols, the second occurrence is silently ignored. This allows several packages to share PostScript resources: each includes the appropriate prepend file, but in the end only one copy ot it is printed to Lout's output. @End @Section lout-3.39/doc/expert/pre_mome0000644000076400007640000000371111363700677014667 0ustar jeffjeff@Section @Title { "@Moment" } @Tag { moment } @Begin @PP The predefined symbol @@Moment moment.sym @Index { @@Moment symbol } has the following definition: @ID @OneRow @Code { "def @Moment" " named @Tag {}" " named @Second {}" " named @Minute {}" " named @Hour {}" " named @Day {}" " named @Month {}" " named @Year {}" " named @Century {}" " named @WeekDay {}" " named @YearDay {}" " named @DaylightSaving {}" "{}" } It may be used like any other symbol. Lout provides an invocation of @@Moment with tag {@Code now}, whose other parameters are numbers encoding the current date and time: @ID @OneRow @Tab @Fmta { @Col @Code A ! @Col B } { @Rowa A { "@Second" } B { the current second, usually between 00 and 59 } @Rowa A { "@Minute" } B { the current minute, between 00 and 59 } @Rowa A { "@Hour" } B { the current hour, between 00 and 23 } @Rowa A { "@Day" } B { the current day of the month, between 1 and 31 } @Rowa A { "@Month" } B { the current month, between 1 (January) and 12 (December) } @Rowa A { "@Year" } B { the current year of the century, between 00 and 99 } @Rowa A { "@Century" } B { the current century, e.g. 19 or 20 } @Rowa A { "@WeekDay" } B { the current day of the week, between 1 (Sunday) and 7 (Saturday) } @Rowa A { "@YearDay" } B { the current day of the year, between 0 and 365 } @Rowa A { "@DaylightSaving" } B { an implementation-dependent number that may encode the daylight saving currently in effect } } date @Index { Date, printing of current } Unix manual entries state that @Code "@Second" can be as high as 61, to allow for leap seconds. Judicious use of databases can convert these numbers into useful dates. For example, @ID @Code { "@Moment&&now @Open { @Day {@Months&&@Month}, @Century{@Year} }" } produces something like @Moment&&now @Open { @Day {@Months&&@Month}, @Century{@Year} } given a suitable database of months. @End @Section lout-3.39/doc/expert/exa_equa0000644000076400007640000001331711363700677014657 0ustar jeffjeff@Section @Title { An equation formatting package } @Tag { eq } @Begin @PP In this section we describe the design and implementation of the Eq eq. @Index { Eq equation formatting package } equation formatting package. Equation formatting makes a natural first example, partly because its requirements have strongly influenced the design of Lout, and partly because no cross references or galleys are required. @PP To the author's knowledge, Eq is the first equation formatter to be implemented as a collection of high-level definitions. This approach has significant advantages: the basics of language and layout are trivial, so the implementor can concentrate on fine-tuning; and the definitions, being readily available, can be improved, extended, or even replaced. @PP As described in the User's Guide @Cite { $kingston1995lout.user }, an equation is entered in a format based on the one introduced by the eqn language of Kernighan and Cherry @Cite { $kernighan1975eqn }: kernighan.b @Index { Kernighan, B. } cherry.l @Index { Cherry, L. } @ID @Code { "@Eq { { x sup 2 + y sup 2 } over 2 }" } The result is @ID @Eq { { x sup 2 + y sup 2 } over 2 } In outline, the definition of the @Code "@Eq" symbol is eq.example @Index { @Code "@Eq" example } @ID @Code { "export sup over \"+\" \"2\" \"<=\"" "def @Eq" " body @Body" "{" " def sup precedence 60 left x right y { ... }" " def over precedence 54 left x right y { ... }" " def \"2\" { Base @Font \"2\" }" " def \"+\" { {Symbol Base} @Font \"+\" }" " def \"<=\" { {Symbol Base} @Font \"\\243\" }" " ..." "" " Slope @Font 1.2f @Break 0c @Space @Body" "}" } A body parameter is used to restrict the visibility of the equation formatting symbols (there are hundreds of them). The equation as a whole is set in Slope (i.e. Italic) font, and symbols such as @Code "\"2\"" and @Code "\"+\"" are defined when other fonts are needed. Precedences are used to resolve ambiguities such as {@Code "a sup b over c"}. Eq takes all spacing decisions on itself, so to prevent white space typed by the user from interfering, the equation is enclosed in {@Code "0c @Space"}. We will discuss the {@Code "1.2f @Break"} later. @PP Thus have we disposed of the language design part of the equation formatting problem; it remains now to define the twenty or so symbols with parameters, and get the layout right. @PP Every equation has an {@I axis}: an imaginary horizontal line through the centre of variables, through the bar of built-up fractions, and so on. We can satisfy this requirement by ensuring that the result of each symbol has a single row mark, on the axis. For example, the superscripting symbol is defined as follows: sup.example @Index { @Code "sup" example } @ID @Code { "def sup" " precedence 60" " associativity left" " left x" " named gap { @SupGap }" " right y" "{" " @HContract @VContract {" " | @Smaller y" " ^/gap x" " }" "}" } The @Code "@VContract" and @Code "^/" symbols together ensure that the axis of the result is the axis of the left parameter. A @Code "gap" parameter has been provided for varying the height of the superscript, with default value @Code "@SupGap" defined elsewhere as {@Code "0.40fk"}. It is important that such gaps be expressed in units that vary with the font size, so that they remain correct when the size changes. Collecting the default values into symbols like @Code "@SupGap" ensures consistency and assists when tuning the values. Here is another characteristic definition: over.example @Index { @Code "over" example } @ID @Code { "def over" " precedence 54" " associativity left" " left x" " named gap { 0.2f }" " right y" "{" " @HContract @VContract {" " |0.5rt @OneCol x" " ^//gap @HLine" " //gap |0.5rt @OneCol y" " }" "}" } Both parameters are centred, since we do not know which will be the wider; we use @@OneCol to make sure that the entire parameter is centred, not just its first column, and @@HContract ensures that the fraction will never expand to fill all the available space, as Lout objects have a natural tendency to do (Section {@NumberOf size}). @Code "@HLine" is a horizontal line of the width of the column: hline.example @Index { @Code "@Hline" example } @ID @Code { "def @HLine" " named line { \"0.05 ft setlinewidth\" }" "{ " " { \"0 0 moveto xsize 0 lineto\" line \"stroke\" } @Graphic {}" "}" } Here we are relying on the expanding tendency just mentioned. @PP The remaining symbols are quite similar to these ones. We conclude with a few fine points of mathematical typesetting mentioned by a leading authority, D. E. Knuth @Cite { $knuth1984tex }. knuth.d @Index { Knuth, D. } @PP Some symbols, such as @Eq {lessequal} and @Eq { notequal }, should have a thick space on each side; others, such as @Eq {plus} and @Eq {minus}, have a medium space; others have a thin space on the right only. This would be easy to do except that these spaces are not wanted in superscripts and subscripts: @ID @Eq { r sup n+1 - 1 } In effect, the definition of such symbols changes depending on the context; but Lout does not permit such a change. Luckily, the so-called `style' information set by the @@Font, @@Break, and @@Space symbols can change in this way. Accordingly, Eq uses the @Code y unit, which is part of style, for these spaces: @ID @Code { "def @MedGap { 0.20y }" "" "def \"+\" { &@MedGap plus &@MedGap }" "" "def @HSqueeze right x { 0.2f @YUnit x }" } In the equation as a whole, the y unit is initially set to {@Code 1f}, and so @Code "@MedGap" ordinarily supplies 20% of this amount. But superscripts and subscripts are enclosed in the @Code "@HSqueeze" symbol, which, by changing the y unit, ensures that any @Code "@MedGap" within them is much smaller than usual. @End @Section lout-3.39/doc/expert/pri_obje0000644000076400007640000001532111363700677014655 0ustar jeffjeff@Section @Title { Objects } @Tag { objects } @Begin @PP Since our aim is to produce neatly formatted documents, we should begin by looking at a typical example of such a document: @ID { nohyphen @Break @LittleDocument // @LittleText { @DP |0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v} @LittleFootNote { { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944. } @DP In the world of music England is supposed to be a mere province. If she produces an indifferent composer or performer, that is regarded elsewhere as perfectly normal and natural; but if foreign students of musical history have to acknowledge a British musical genius, he is considered a freak. @PP Such a freak is Henry Purcell. Yet if we make a choice of fifteen of the world's musical classics, as here, we find that we cannot omit this English master. } // @LittleEndRun } It is a large rectangle made from three smaller rectangles -- its pages. Each page is made of lines; each line is made of words, although it makes sense for any rectangle (even a complete document) to be part of a line, provided it is not too large. @PP Lout deals with something a little more complicated than rectangles: @I objects. An object objec @Index { Object } is a rectangle with at least one @I {column mark} column.mark @Index { Column mark } mark.alignment @Index { Mark alignment } alignment @RawIndex { Alignment @I see mark alignment } protruding above and below it, and at least one @I {row mark} row.mark @Index { Row mark } protruding to the left and right. The simplest objects contain words like metempsychosis, and have one mark of each type: @ID { @ShowMarks metempsychosis } The rectangle exactly encloses the word; its column mark is at the left edge, and its row mark passes through the middle of the lower-case letters. The rectangle and marks do not appear on the printed page, but to understand what Lout is doing you have to imagine them. @PP To place two objects side by side, we separate them by the symbol @Code "|", which denotes the act of @I {horizontal concatenation}. So, if we write @ID { @Code "USA | Australia" } the result will be the object @ID { @ShowMarks USA | @ShowMarks Australia } Notice that this object has two column marks, but still only one row mark, because @Code "|" merges the two row marks together. This merging of row marks fixes the vertical position of each object with respect to the other, but it does not determine how far apart they are. This distance, or {@I gap}, may be given just after the symbol, as in @Code "|0.5i" for example, which specifies horizontal concatenation with a gap of half an inch. If no gap is given, it is assumed to be {@Code "0i"}. @PP @I {Vertical concatenation} & , denoted by {@Code "/"}, is the same apart from the change of direction: @ID { @Code "Australia /0.1i USA" } has result @ID { @ShowMarks Australia /0.1i @ShowMarks USA } The usual merging of marks occurs, and now the gap determines the vertical separation. Horizontal and vertical can be combined: @ID @Code { |1m USA |1m "|0.2i" |1m Australia /1vx "/0.1i" | Washington | "|" | Canberra } has result @ID { @BackEnd @Case { PostScript @Yield { @ShowMarks USA & { 0 ymark moveto xsize 10 pt add ymark lineto [ 3 pt ] 0 setdash stroke } @Graphic {1c @Wide } |0.2i @ShowMarks Australia /0.1i @ShowMarks Washington | @ShowMarks Canberra } PDF @Yield { @ShowMarks USA & { [ __mul(3, __pt) ] 0 d 0 __ymark m __add(__xsize, __mul(10, __pt)) __ymark l S } @Graphic {1c @Wide } |0.2i @ShowMarks Australia /0.1i @ShowMarks Washington | @ShowMarks Canberra } } } tables @Index { Tables } There are several things to note carefully here. White space (including tabs and newlines) adjacent to a concatenation symbol is ignored, so it may be used to lay out the expression clearly. The symbol @Code "|" takes precedence over {@Code "/"}, which means that the rows are formed first, then vertically concatenated. The symbol @Code "/" will merge two or more column marks, creating multiple columns (and @Code "|" will merge two or more row marks). This implies that the gap @Code "0.2i" used above is between columns, not individual items in columns; a gap in the second row would therefore be redundant, and so is omitted. @PP A variant of @Code "/" called @Code "//" left-justifies two objects instead of merging their marks. @PP By enclosing an object in braces, it is possible to override the braces @Index { Braces } set precedences. Here is another expression for the table above, in which the columns are formed first: @ID @Code { |1m "{ USA" |1m "/0.1i" |1m "Washington }" /1vx "|0.2i" | "{ Australia" | "/" | "Canberra }" } Braces have no effect other than to alter the grouping. @PP @I {Paragraph breaking} occurs when an object is too wide to fit paragraph.breaking @Index { Paragraph breaking } into the space available to it; by breaking its paragraphs into lines, its width is reduced to an acceptable amount. The available space is determined by the @@Wide symbol, whose form is @ID { @I length @@Wide @I object } and whose result is the given object modified to have exactly the given length. For example, @ID @OneRow @Code { "5i @Wide {" "Macbeth was very ambitious. This led him to wish to become king of" "Scotland. The witches told him that this wish of his would come true. The" "king of Scotland at this time was Duncan. Encouraged by his wife, Macbeth" "murdered Duncan. He was thus enabled to succeed Duncan as king. (51 words)" "|0.5i" "Encouraged by his wife, Macbeth achieved his ambition and realized the" "prediction of the witches by murdering Duncan and becoming king of Scotland" "in his place. (26 words)" "}" } has for its result the following five inch wide object @Cite { $strunk1979style }: @ID { 5i @Wide { Macbeth was very ambitious. This led him to wish to become king of Scotland. The witches told him that this wish of his would come true. The king of Scotland at this time was Duncan. Encouraged by his wife, Macbeth murdered Duncan. He was thus enabled to succeed Duncan as king. (51 words) |0.5i Encouraged by his wife, Macbeth achieved his ambition and realized the prediction of the witches by murdering Duncan and becoming king of Scotland in his place. (26 words) } } A paragraph of text can be included anywhere, and it will be broken automatically if necessary to fit the available space. The spaces between words are converted into concatenation symbols. @PP These are the most significant of Lout's object-building symbols. There are others, for changing fonts, controlling paragraph breaking, printing graphical objects like boxes and circles, and so on, but they do not add anything new in principle. @End @Section lout-3.39/doc/expert/pre_hlim0000644000076400007640000000127211363700677014663 0ustar jeffjeff@Section @Title { "@HLimited" and "@VLimited" } @Tag { hlimited } @Begin @PP hlimited. @Index { @@HLimited symbol } vlimited. @Index { @@VLimited symbol } The @@HLimited symbol limits the width available to recursive and receptive symbols within its right parameter to whatever is available without increasing the existing size of the @@HLimited object. So this symbol acts like @@Wide with respect to limiting the space occupied by recursive and receptive symbols, except that instead of enforcing a fixed constant limit, it enforces whatever size is already in place. @PP The @@VLimited symbol is exactly the same, except that it applies vertically rather than horizontally. @End @Section lout-3.39/doc/expert/pre_page0000644000076400007640000000151711363700677014650 0ustar jeffjeff@Section @Tag { pagelabel } @Title { "@PageLabel" } @Begin @PP pagelabel.sym @Index { @@PageLabel symbol } The @@PageLabel symbol associates a page label in the PostScript output file with the page within which (or just before which) the symbol occurs, so that PostScript viewers are able to index the page by this label. (The label is printed in the @Code "%%Page" comment preceding the page in the PostScript output file.) For example, @ID @Code "@PageLabel iv" associates the label @Code "iv" with the page. The label may be an arbitrary object; if its value is not a simple word, it will be replaced by {@Code "?"}. @PP @@PageLabel is unrelated to Lout's cross referencing mechanism; it is for communicating a label to the PostScript output file, not to other parts of Lout. The result of @@PageLabel is a null object. @End @Section lout-3.39/doc/expert/pre_kshr0000644000076400007640000000163011363700677014677 0ustar jeffjeff@Section @Title { "@KernShrink" } @Tag { kernshrink } @Begin @PP kernshrink. @Index { @@KernShrink symbol } This symbol returns its right parameter unchanged in appearance but occupying a slightly smaller bounding box. The reduction is by the amount of kerning that would be applied if the right parameter was immediately @I followed by the left parameter. For example, @ID @Code ". @KernShrink P" has result @ID @Box margin { 0c } { . @KernShrink P } where a box of size 0 has been drawn around the result to make its extent clear. Compare this with `P' alone: @ID @Box margin { 0c } { P } in which the bounding box exactly encloses the object, or at least is supposed to. The bounding box is smaller on the right by the amount of kerning that would be applied between `P' and `.'. @PP The only known use for this symbol is to produce tucked-in subscripts in the Eq equation formatting package. @End @Section lout-3.39/doc/expert/pre_begi0000644000076400007640000000157611363700677014647 0ustar jeffjeff@Section @Title { "@Begin" and "@End" } @Tag { begin } @Begin @PP The body of a symbol @Code "@Sym" may be enclosed in @@Begin and begin. @Index { @@Begin symbol } end. @Index { @@End symbol } @@End @Code "@Sym" instead of the more usual braces: @ID @Code { "def @Section" " named @Title {}" " right @Body" "@Begin" " @Title //2v @Body" "@End @Section" } They may also enclose the right or body parameter of a symbol invocation: @ID @Code { "@Chapter" " @Title { Introduction }" "@Begin" "This subject needs no introduction." "@End @Chapter" } Apart from their utility as documentation aids, these forms allow Basser Lout to pinpoint mismatched braces, which can otherwise create total havoc. For this reason, they should enclose the major parts of documents, such as chapters and sections. Note that braces cannot be replaced by @@Begin and @@End in general. @End @Section lout-3.39/doc/expert/README0000644000076400007640000000166611446017241014016 0ustar jeffjeffDirectory lout/doc/expert This directory contains the Lout source files for the Expert's Guide to the Lout Document Formatting System. To produce the Guide, type the command lout -r4 all > outfile.ps in this directory. The -r4 flag causes Lout to run over the document four times. This is necessary to completely resolve all cross references, although a readable PostScript file outfile.ps would be generated after a single run if -r4 was omitted. Auxiliary files with .li and .ld suffixes will be created in this directory. A copy of the final outfile.ps is included. There should be no warning messages on the fourth run, except this one: lout file "pre_conc" (from "pre" line 7, from "all" line 25): 162,1: 13.2c object too high for 8.7c space; will try elsewhere which just warns about a figure that is not able to be placed on the first possible page, and so has to appear on the next page. Jeffrey H. Kingston 21 September 2010 lout-3.39/doc/expert/pre_rump0000644000076400007640000001064711363700677014723 0ustar jeffjeff@Section @Title { {"@Common"}, {"@Rump"}, and "@Meld" } @Tag { rump } @Begin @PP common.sym @Index { @@Common symbol } rump.sym @Index { @@Rump symbol } meld.sym @Index { @@Meld symbol } The @@Common and @@Rump symbols compare two paragraph objects: @ID @Code "{ Aardvark, 29 } @Common { Aardvark, 359 }" If either parameter is not a paragraph object, it is converted into a single-object paragraph first. The result of @@Common is the common prefix of the two paragraphs; that is, those initial objects which are equal in the two paragraphs. In the example above, the result is {@Code "Aardvark,"}. The result of @@Rump is that part of the second object which is not included in @@Common; the result of @ID @Code "{ Aardvark, 29 } @Rump { Aardvark, 359 }" is {@Code "359"}. @PP If the two objects have nothing in common, the result of @@Common will be an empty object and the result of @@Rump will be the second object. If the two objects are identical, the result of @@Common will be the first object, and the result of @@Rump will be an empty object. @PP The only known use for @@Rump and @@Common is to implement merged index entries (Section {@NumberOf sorted}). @PP The @@Meld symbol returns the minimum meld of two paragraphs, that is, the shortest paragraph that contains the two original paragraphs as subsequences. For example, @ID @Code "{ Aardvark , 1 , 2 } @Meld { Aardvark , 2 , 3 }" produces @ID { Aardvark , 1 , 2 } @Meld { Aardvark , 2 , 3 } The result is related to the well-known longest common substring, in that the meld contains everything not in the lcs plus one copy of everything in the lcs. Where there are several minimum melds, @@Meld returns the one in which the components of the first parameter are as far left as possible. @PP Determining the values of all these symbols requires testing whether one component of the first paragraph is equal to one component of the second. Since Version 3.25, the objects involved may be arbitrary and Lout will perform the necessary detailed checking for equality; previously, only simple words were guaranteed to be tested correctly. Two words are equal if they contain the same sequence of characters, regardless of whether they are enclosed in quotes, and regardless of the current font or any other style information. Otherwise, objects are equal if they are of the same type and have the same parameters, including gaps in concatenation objects. The sole exception is @@LinkSource, whose left parameter is ignored during equality testing, since otherwise there would be problems in the appearance of melded clickable index entries. @PP Style changing operations (@@Font, @@SetColour etc.) are not considered in equality testing, since these have been processed and deleted by the time that the tests are done. Also, Lout tries hard to get rid of redundant braces around concatenation objects, which is why @ID @Code "{ a { b c } } @Meld { { a b } c }" produces @ID { { a { b c } } @Meld { { a b } c } } The two parameters are equal by the time they are compared by @@Meld. @PP One problematic area in the use of these operators is the definition of equality when objects are immediately adjacent. Lout contains an optimization which merges immediately adjacent words whenever they have the same style. For example, @ID @Code "{Hello}{world}" would be treated internally as one word, whereas @ID @Code "{Hello}{yellow @Colour world}" would be treated as two adjacent words. Thus, although @@Font, @@SetColour, and the other style operators are ignored in equality testing, they may affect the structure of the objects they lie within. @PP At present, @@Common and @@Rump treat all unmerged components of their paragraph as separate, even if one is immediately adjacent to another. @@Common and @@Rump would thus see one component in the first example and two in the second. @@Meld treats each group of immediately adjacent components as a single component, so it would see one component in both examples; but it would still not report them as equal, since one is a single word and the other is a pair of adjacent words. These confusing and inconsistent properties might be revised in the future. See Section {@NumberOf exa_inde} for an example of the practical use of these operators, in which very small unbreakable gaps are used to ensure that apparently adjacent components are separate, and @@OneCol is used to prevent the word merging optimization from taking effect when it would otherwise cause trouble. @End @Section lout-3.39/doc/expert/pre_spac0000644000076400007640000000506111363700677014660 0ustar jeffjeff@Section @Title { "@Space" } @Tag { space } @Begin @PP The @@Space symbol space.sym @Index { @@Space symbol } changes the value of the @Code s unit of measurement (Section s.unit.space @SubIndex { and @@Space symbol } {@NumberOf concatenation}) within its right parameter to the value given by the left parameter: @ID { @Code "1c @Space { a b c d }" } has result @ID { 1c @Space { a b c d } } As for the @@Break symbol, the left parameter of @@Space may be given relative to the enclosing @Code s unit, and it may include a gap mode. Note that the @@Font symbol also sets the @Code s unit. @PP The left parameter of the @@Space symbol may also hold any one of the five special values {@Code lout}, {@Code compress}, {@Code separate}, {@Code troff}, and {@Code tex}, which control the way in which Lout treats white space separating two objects. The names {@Code troff} and {@Code tex} indicate that the behaviour of these options is inspired by these other document formatting systems. @PP The default setting, {@Code lout}, produces as many spaces in the output as there are in the input. The {@Code compress} setting causes all sequences of two or more white space characters to be treated the same as one white space character. The {@Code separate} setting is like {@Code compress} but also causes zero white spaces between two objects (but not within one word) to be treated the same as one white space character. @PP The {@Code troff} setting is the same as {@Code lout} except that wherever a sentence ends at the end of a line, one extra space is added. Formally, when two objects are separated by white space characters which include at least one newline character, and the first object is a word ending in any one of a certain set of sequences of characters, the extra space is added. The set of sequences of characters depends on the current language and is defined in the @Code langdef for that language (see Section {@NumberOf language}). @PP The {@Code tex} option is the most complicated. First, the {@Code compress} option is applied. Then, at every sentence ending, whether or not at the end of a line, one extra space is added. A sentence ending is defined as for {@Code troff} except that, in addition to the preceding word having to end in one of a certain set of sequences of characters, the character preceding that sequence must exist and must be a lower-case letter. A character is a lower-case letter if, in the Lout Character Mapping file (Section {@NumberOf font}) associated with the current font, an upper-case equivalent of the character is defined. @End @Section lout-3.39/doc/expert/pre_head0000644000076400007640000001260011363700677014630 0ustar jeffjeff@Section @Title { "@BeginHeaderComponent", "@EndHeaderComponent", "@SetHeaderComponent", and "@ClearHeaderComponent" } @Tag { header_comp } @Begin @PP Informally, header components are running headers that appear at the header.component @Index { Header component of galley } top of the displayed segments of galleys. They are used, for example, by the @Code "@Tbl" table formatting package to place running headers at the top of each page of a multi-page table, after the first page. @PP Formally, a header component of a galley is an ordinary component of a galley (Section {@NumberOf targets}) together with an indication that the component is a header component. When printed, a header component looks exactly like it would have done as an ordinary component; the difference is in whether the component is printed at all, and if so where. @PP Every non-header component of every galley has associated with it a sequence of zero or more header components. Whenever a galley attaches to a target, and the target does not itself occupy an entire component of the enclosing galley, copies of the header components associated with the first ordinary component to be promoted into that target are promoted into it first. @PP The condition `and the target does not itself occupy an entire component of the enclosing galley' ensures that, for example, when part of a section has header components, these are not printed where the section is promoted into its chapter, but rather where the chapter is promoted onto pages. If the target occupies the whole component, then the incoming galley will not split at all, so headers would be of no interest there. @PP The one remaining question is `How is the sequence of header components of each ordinary component determined?' By default, the header components of one component are the same as those of the previous component. We can show this graphically as follows: @ID @OneRow lines @Break @Eq { C sub i : H sub 1 , H sub 2 ,..., H sub n "/" C sub i+1 : H sub 1 , H sub 2 ,..., H sub n } which may be read: `If ordinary component @E { C sub i } has header component sequence @E { H sub 1 , H sub 2 ,..., H sub n }, then its successor component @E { C sub i+1 } has header component sequence @E { H sub 1 , H sub 2 ,..., H sub n } also.' Using this notation, we may now define the four symbols that affect header component sequences: @ID @OneRow lines @Break @Eq { C sub i : H sub 1 , H sub 2 ,..., H sub n "/" gap `` @@BeginHeaderComponent `` H sub n+1 "/" C sub i+1 : H sub 1 , H sub 2 ,..., H sub n , H sub n+1 } That is, @@BeginHeaderComponent occupying an entire begin.header.component.sym @Index { @@BeginHeaderComponent symbol } component appends a header component to the sequence of the following ordinary components. When printed, this header component is separated by @E { gap } from the following component; if @E { gap } is empty it denotes @Code { 0ie } as usual with concatenation gaps. The appearance of the header component will be exactly as it would have been had it occurred alone at that point, rather than after @@BeginHeaderComponent. @PP Next comes @@EndHeaderComponent: @ID @OneRow lines @Break @Eq { C sub i : H sub 1 , H sub 2 ,..., H sub n , H sub n+1 "/" @@EndHeaderComponent "/" C sub i+1 : H sub 1 , H sub 2 ,..., H sub n } That is, @@EndHeaderComponent (which has no parameters) occupying an end.header.component.sym @Index { @@EndHeaderComponent symbol } entire component deletes the last header component. If the sequence is empty, a warning message is printed and it remains empty. @@BeginHeaderComponent and @@EndHeaderComponent are naturally used in matching (possibly nested) pairs, to introduce and subsequently retract a header component. @PP Next comes @@SetHeaderComponent: @ID @OneRow lines @Break @Eq { C sub i : H sub 1 , H sub 2 ,..., H sub n "/" gap `` @@SetHeaderComponent `` H sub n+1 "/" C sub i+1 : H sub n+1 } @@SetHeaderComponent clears any current header components set.header.component.sym @Index { @@SetHeaderComponent symbol } and replaces them by one of its own. Finally we have @@ClearHeaderComponent: @ID @OneRow lines @Break @Eq { C sub i : H sub 1 , H sub 2 ,..., H sub n "/" @@ClearHeaderComponent "/" C sub i+1 : } This symbol clears any header components, leaving the sequence empty. These clear.header.component.sym @Index { @@ClearHeaderComponent symbol } last two symbols combine less cleanly than the first two (either will wreck any enclosing @@BeginHeaderComponent -- @@EndHeaderComponent pair), but they are useful in situations where the range of one header is terminated by the start of the range of the next. @PP All four symbols yield the value @@Null where they appear. If they do not occupy entire components of their galley, they are silently ignored. @PP Owing to limitations in the way header components are implemented, the following object types are not allowed inside them, and Basser Lout will complain and quit if it finds any of them: galleys, receptive or recursive symbols, cross references, @@PageLabel, @@HExpand, @@VExpand, @@HCover, @@VCover, and @@Scale when it has an empty left parameter. In addition, if more than three copies of the same running header are printed on the same page, their horizontal positions will become confused, probably resulting in the apparent disappearance of all but the last three copies. (The magic number 3 can be increased by recompiling the Lout source with the @F MAX_HCOPIES constant increased.) @End @Section lout-3.39/doc/expert/pre_colo0000644000076400007640000000752311363700677014673 0ustar jeffjeff@Section @Title { "@SetColour" and "@SetColor" } @Tag { colour } @Begin @PP The @@SetColour and @@SetColor symbols, setcolour.sym @Index { @@SetColour symbol } setcolor.sym @Index { @@SetColor symbol } which have identical effect, return their right parameter in the colour specified by their left parameter. The form of the left parameter is implementation-dependent; in Basser Lout it must be an object whose value is a sequence of words comprising a PostScript command for setting colour. For example, @ID @Code "{ 1.0 0.0 0.0 setrgbcolor } @SetColour { hello, world }" produces the red result @ID { @BackEnd @Case { PostScript @Yield { { 1.0 0.0 0.0 setrgbcolor } @SetColour { hello, world } } PDF @Yield { { 1.0 0.0 0.0 rg 1.0 0.0 0.0 RG } @SetColour { hello, world } } } } Of course, a colour output device is needed to see the effect; on a monochrome device the result will be some shade of grey. @PP The @@SetColour command accepts the special value {@Code "nochange"} for the left parameter. This value causes the right parameter to have the colour it would have had without the @@SetColour command. An empty left parameter also has this effect. @PP There is no default colour, so the user must ensure that the root galley or each of its components is enclosed in a @@SetColour symbol whose left parameter is not {@Code "nochange"}. @PP In addition to setting the colour used in the following object, the @@SetColour command also sets the underline colour in that object, like @@SetUnderlineColour from Section {@NumberOf underline_colour}. While a case could be made for keeping these two attributes of style independent, most people want to underline in the same colour as the text most of the time, and this behaviour gives this without any need to use @@SetUnderlineColour explicitly. @PP Lout makes no attempt to understand colour, it simply prints the PostScript or PDF commands when appropriate. This has the advantage of permitting access to any of PostScript's colour models (some require initialization which can be supplied using @@PrependGraphic), but the disadvantage of offering no way to make relative changes (`as before only redder,' and so on). @PP For those who wish to obtain colour without working very hard, the @Code setrgbcolor command used above is available in every version of PostScript, requires no initialization, and is simple to use. The three numbers, which range from 0.0 to 1.0, determine the intensity of red, green, and blue respectively. Some useful values for the left parameter are @ID @Tab @Fmta { @Col @Code A ! @Col @I B } { @Rowa A { 1.0 0.0 0.0 setrgbcolor } B { red } @Rowa A { 0.0 1.0 0.0 setrgbcolor } B { green } @Rowa A { 0.0 0.0 1.0 setrgbcolor } B { blue } @Rowa A { 1.0 1.0 1.0 setrgbcolor } B { white } @Rowa A { 0.5 0.5 0.5 setrgbcolor } B { grey } @Rowa A { 0.0 0.0 0.0 setrgbcolor } B { black } } Colouring an object white is useful for producing an empty space whose size is that of some object. @PP Since the introduction of textures to Lout in Version 3.27, direct use of PostScript colour setting operations such as {@Code setrgbcolor} is deprecated. Instead, Lout offers its own versions of the standard PostScript colour setting operations: @ID @OneRow @Tbl aformat { @Cell A | @Cell B } bformat { @Cell @Code A | @Cell @Code B } { @Rowa A { If you want this } B { You should rather write this } f { Italic } rb { yes } @Rowb A { num setgray } B { num LoutSetGray } @Rowb A { num num num setrgbcolor } B { num num num LoutSetRGBColor } @Rowb A { num num num sethsbcolor } B { num num num LoutSetHSBColor } @Rowb A { num num num setcmykcolor } B { num num num LoutSetCMYKColor } rb { yes } } The Lout versions are equivalent to the PostScript ones but without the unwanted effect of causing the current texture to be forgotten. @End @Section lout-3.39/doc/expert/pre_text0000644000076400007640000001113311363700677014713 0ustar jeffjeff@Section @Title { "@SetTexture" } @Tag { texture } @Begin @PP The @@SetTexture symbol settexture.sym @Index { @@SetTexture symbol } returns its right parameter in the texture specified by its left parameter. A texture is a pattern used when filling areas to get a texture rather than solid color. @PP In the PostScript world, textures are called patterns, and the relevant PostScript commands use this terminology. The author has preferred the term `texture' because it is more precise: a pattern could be a pattern for anything. @PP The @@SetTexture command accepts the special value {@Code "nochange"} for the left parameter. This value causes the right parameter to have the texture it would have had without the @@SetTexture command. An empty left parameter also has this effect. @PP Another special value is {@Code "LoutTextureSolid"}, which means no texture at all, just solid colour. It would be useful to change back to solid colour within an enclosing textured region. It is also the initial texture; thus there is no need to ensure that the root galley or each of its components is enclosed in a @@SetTexture symbol. @PP The form of the left parameter is implementation-dependent; in Basser Lout it must be an object whose value is a sequence of words comprising PostScript for setting a texture, up to and including the PostScript @Code "setpattern" command (or equivalent) which installs the texture into the graphics state. Lout makes no attempt to understand textures, it simply prints the PostScript commands when appropriate. Consult @Cite { $adobe1990ps } for information about PostScript patterns. You'll need to do that in order to make sense of the rest of this section. @PP Since building even a simple texture takes a lot of PostScript and is quite error-prone, Lout defines two symbols in the PostScript prologue called @Code "LoutMakeTexture" and @Code "LoutSetTexture" that you can use to make and set a texture, like this: @ID @Code @Verbatim { { "1 1 1 0 dg 0 pt 0 pt" "2 [0 0 2 pt 3 pt] 2 pt 3 pt { ... }" "LoutMakeTexture LoutSetTexture" } @SetTexture ... } We'll explain both symbols in detail in a moment, but just briefly, @Code "LoutMakeTexture" makes a texture, leaving a pattern dictionary as returned by @Code "makepattern" on the execution stack, and @Code "LoutSetTexture" installs this texture into the current graphics state, like @Code "setpattern" but without any mention of colour. @PP @Code "LoutMakeTexture" is just a convenience definition that constructs a pattern matrix and dictionary, populating them with the stack elements to its left, then calls {@Code makepattern}. You don't have to use it if you don't want to. The above example of @Code "LoutMakeTexture" sets the pattern matrix and dictionary as follows. @PP The first number is a scale factor, and the second and third are horizontal and vertical scale factors. The fourth ({@Code "0 dg"}) is an angle of rotation. The fifth and sixth are horizontal and vertical shifts. These six numbers determine the pattern transformation matrix passed to {@Code makepattern}. @PP The remaining elements go into the pattern dictionary. @Code "PaintType" is set to the first of them, or the seventh item overall (2 in our example, denoting an uncoloured pattern, which will usually be the best choice; the pattern will be painted in the current colour), @Code "BBox" is set to the eighth item, here {@Code "[0 0 2 pt 3 pt]"}, @Code "XStep" is set to the ninth item, here {@Code "2 pt"}, @Code "YStep" is set to the tenth item, here {@Code "3 pt"}, and @Code "PaintProc" is set to the eleventh and last item, which should be an executable array as shown. All non-zero lengths must be in absolute units, that is, followed by {@Code in}, {@Code cm}, {@Code pt}, or {@Code em}, otherwise the results will be unpredictable. @PP @Code "LoutSetTexture" installs the given texture into the graphics state, preserving the current colour. You must use @Code "LoutSetTexture" and you must not use {@Code setcolorspace}, @Code {setcolor}, and {@Code setpattern}, because Lout considers colour and texture to be independent of each other, and these PostScript commands don't. @PP Another advantage of @Code "LoutMakeTexture" and @Code "LoutSetTexture" is that they behave sensibly on Level 1 PostScript interpreters, which do not have patterns. Rather than failing altogether, these commands will make sure everything appears in solid colour. Be aware, though, that interpreters exist (e.g @Code gv ca. 1997) which appear to be Level 2 but actually leave textured areas blank. @PP For information on how these symbols are implemented, consult Appendix {@NumberOf tex}. @End @Section lout-3.39/doc/expert/pre_open0000644000076400007640000000301011363700677014663 0ustar jeffjeff@Section @Title { "@Open and @Use" } @Tag { open } @Begin @PP The @@Open symbol open.sym @Index { @@Open symbol } takes a cross reference or symbol invocation for its left parameter, and an arbitrary object, which must be enclosed in braces, for its right parameter. The right parameter may refer to the exported parameters and nested definitions of the invocation denoted by the left parameter, and its value is the @@Open symbol's result. The target of the cross reference may lie in an external database (Section {@NumberOf database}). Any symbol available outside the @@Open which happens to have the same name as one of the symbols made available by the @@Open will be unavailable within the @@Open. @PP use.sym @Index { @@Use symbol } The @@Use symbol is an @@Open symbol in a different form. It may only appear among or after the definitions in Lout's input, and it is equivalent to enclosing the remainder of the input in an @@Open symbol. For example, @ID @OneRow { @I definitions //1vx @Code "@Use" @Code "{" @I x @Code "}" //1vx @Code "@Use" @Code "{" @I y @Code "}" //1vx @I { rest of input } } is equivalent to @ID @OneRow { @I definitions //1vx @I x @Code "@Open" //1vx @Code "{" &4mt @I y @Code "@Open" //1vx &4mt @Code "{" @I { rest of input } //1vx &4mt @Code "}" //1vx @Code "}" } The @@Use symbol allows a set of standard packages to be opened without the inconvenience of enclosing the entire document in @@Open symbols. Such enclosure could cause Basser Lout to run out of memory. @End @Section lout-3.39/doc/expert/pre_plai0000644000076400007640000000110511363700677014652 0ustar jeffjeff@Section @Title { "@PlainGraphic" } @Tag { plaingraphic } @Begin @PP plaingraphic.sym @Index { @@PlainGraphic symbol } The @@PlainGraphic symbol is avery rudimentary analogue for plain text output of the @@Graphic symbol for PostScript output. Its result is its right parameter printed on a background created by repeated printings of its left parameter, which must be a simple word. For example, @ID @Verbatim { "." @PlainGraphic 5s @Wide } would produce five dots. @@PlainGraphic is used in the @Code tbl table-drawing package to produce plain-text rules. @End @Section lout-3.39/doc/expert/det_sort0000644000076400007640000000762611363700677014720 0ustar jeffjeff@Section @Title { Sorted galleys } @Tag { sorted } @Begin @PP When footnotes are placed at the bottom of a page, they appear there in first come, first served order. To make galleys appear in sorted order, as sorted.galley @Index { Sorted galleys } is needed in bibliographies and indexes, a parameter or nested definition with the special name @@Key key. @Index { @@Key parameter } is added to the galley definition, like this: @ID @OneRow @Code { "def @IndexEntry into { @IndexPlace&&following }" " left @Key" " right x" "{ x }" } @@Key must be set to a simple word, or several words with nothing more complex than font changes within them, when the galley is invoked: @ID @Code { "{ cities compare } @IndexEntry { cities, comparison of, 27 }" } and this key is used to sort the galleys. @PP If several sorted galleys with the same key are sent to the same place, the default behaviour is to print only the first of them; the assumption is that the others are probably unwanted duplicates. This holds good for sorted reference lists, for example: we don't want two copies of a reference just because we happen to cite it twice. @PP The other common example of sorted galleys, index entries, requires something different from discarding duplicates: @I merged galleys. Suppose that at some point of the document we insert the index entry @ID @Code "aardvarks @IndexEntry { Aardvarks, 23 }" while at another point we insert @ID @Code "aardvarks @IndexEntry { Aardvarks, 359 }" How the page numbers are worked out is not relevant here. Clearly we would like to merge these two entries into one entry that comes out as @ID "Aardvarks, 23, 359" The following definition will merge two objects @Code x and @Code y in this way: @ID @OneRow @Code @Verbatim { def @Merge left x right y { { x @Rump { x @Meld y } } @Case { "" @Yield x else @Yield { { x{@OneCol ,} } @Meld y } } } } The @@Rump and @@Meld symbols are the subject of Section {@NumberOf rump}; and a detailed explanation of how this definition works is the subject of Section {@NumberOf exa_inde}. Our only problem is that this symbol has to be applied to two galleys from widely separated parts of the document. @PP Lout makes this possible by the following special rule: if a sorted galley contains a nested definition of a symbol whose name is @@Merge (@@Merge must have just two parameters, left and right), merge. @Index { @@Merge symbol } and if that sorted galley is preceded in the list of sorted galleys destined for some target by another sorted galley with the same key, then rather than being discarded, the second galley is merged into the first using the @@Merge symbol. @PP The natural thing to do when more than two galleys have the same key is to merge the first two, then merge the third with the result of that, then the fourth with the result of that, and so on. For efficiency reasons beyond our scope here, Lout does the merging in a different order: it merges @Eq { n } galleys by merging the first @Eq { lfloor n slash 2 rfloor } together, then the last @Eq { lceil n slash 2 rceil } together, then merging the result. Of course, if the @@Merge symbol is associative this has the same effect. The total time it takes to merge @Eq { n } galleys with equal keys is @Eq { O ( n sup 2 ) } or somewhat higher (but always polynomial in @Eq { n }) depending on how many times the parameters occur within the body of @@Merge; to do it in the natural linear order would take Lout exponential time. @PP For horrible reasons concerning making it possible to print reference lists sorted by point of first citation, the particular sort key {@Code "??"} is treated differently. If two galleys have this key, according to the rules above either the second would be discarded or else it would be merged with the first. However, for this particular key only, the two galleys will in fact be kept distinct, just as though their sort keys had been different. @End @Section lout-3.39/doc/expert/pre_back0000644000076400007640000000063311363700677014632 0ustar jeffjeff@Section @Title { "@Background" } @Tag { background } @Begin @PP background.sym @Index { @@Background symbol } The @@Background symbol will print its left parameter in the background of its right parameter. That is, the result has the size of the right parameter, but the left parameter will be printed first in the same space, with its marks aligned with the marks of the right parameter. @End @Section lout-3.39/doc/expert/outfile.ps0000644000076400007640000352074511363700677015172 0ustar jeffjeff%!PS-Adobe-3.0 %%Creator: Basser Lout Version 3.38 (September 2008) %%CreationDate: Tue Oct 14 07:50:16 2008 %%DocumentData: Binary %%DocumentNeededResources: (atend) %%DocumentSuppliedResources: (atend) %%DocumentMedia: A4 595 842 0 white () %%PageOrder: Ascend %%LanguageLevel: 2 %%Pages: (atend) %%BoundingBox: 0 0 595 842 %%EndComments %%BeginProlog %%BeginResource: procset LoutStartUp /cp_x 0 def /cp_y 0 def /louts 0 def /loutv 0 def /loutf 0 def /ymark 0 def /xmark 0 def /ysize 0 def /xsize 0 def /save_cp { currentpoint /cp_y exch def /cp_x exch def } bind def /restore_cp { cp_x cp_y moveto } bind def /outline { gsave 1 1 1 setrgbcolor dup show save_cp grestore true charpath stroke restore_cp } bind def /m { 3 1 roll moveto show } bind def /mo { 3 1 roll moveto outline } bind def /s { exch currentpoint exch pop moveto show } bind def /so { exch currentpoint exch pop moveto outline } bind def /k { exch neg 0 rmoveto show } bind def /ko { exch neg 0 rmoveto outline } bind def /r { exch 0 rmoveto show } bind def /ro { exch 0 rmoveto outline } bind def /c { gsave 3 1 roll rmoveto show grestore } bind def /co { gsave 3 1 roll rmoveto outline grestore } bind def /ul { gsave setlinewidth dup 3 1 roll moveto lineto stroke grestore } bind def /in { 1440 mul } bind def /cm { 567 mul } bind def /pt { 20 mul } bind def /em { 120 mul } bind def /sp { louts mul } def /vs { loutv mul } def /ft { loutf mul } def /dg { } def /LoutGraphic { /louts exch def /loutv exch def /loutf exch def /ymark exch def /xmark exch def /ysize exch def /xsize exch def } def /LoutGr2 { gsave translate LoutGraphic gsave } def /LoutFont { findfont exch scalefont setfont } bind def /LoutRecode { { findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding exch def currentdict end definefont pop } stopped pop } bind def /PreEPSF_state 0 def /dict_stack 0 def /ops_count 0 def /LoutStartEPSF { % prepare for EPSF inclusion /PreEPSF_state save def /dict_stack countdictstack def /ops_count count 1 sub def 20 dict begin /showpage {} def 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit [] 0 setdash newpath /languagelevel where { pop languagelevel 1 ne { false setstrokeadjust false setoverprint } if } if } bind def /LoutEPSFCleanUp { % clean up after EPSF inclusion count ops_count sub { pop } repeat countdictstack dict_stack sub { end } repeat PreEPSF_state restore } bind def % Find current texture (may be null) % - LoutCurrentP p /LoutCurrentP { currentcolorspace 0 get /Pattern eq { [ currentcolor ] dup length 1 sub get } { null } ifelse } def % Find current color and color space % - LoutCurrentCCS c cs /LoutCurrentCCS { LoutCurrentP dup null eq { pop [ currentcolor ] currentcolorspace } { dup /UnderlyingColor get exch /UnderlyingColorSpace get } ifelse } def % Install c, cs, and (a copy of) p into graphics state % c cs p LoutSetCCSP - /LoutSetCCSP { dup null eq { pop setcolorspace aload pop setcolor } { % copy pattern dictionary 12 dict copy % record cs and c in p dup /UnderlyingColorSpace 3 index put dup /UnderlyingColor 4 index put % do setcolorspace and setcolor dup /PaintType get 1 eq { [ /Pattern ] setcolorspace setcolor pop pop } { [ /Pattern 4 -1 roll ] setcolorspace exch aload length 1 add -1 roll setcolor } ifelse } ifelse } bind def % num LoutSetGray - /LoutSetGray { [ 2 1 roll ] [ /DeviceGray ] LoutCurrentP LoutSetCCSP } bind def % r g b LoutSetRGBColor - /LoutSetRGBColor { [ 4 1 roll ] [ /DeviceRGB ] LoutCurrentP LoutSetCCSP } bind def % h s b LoutSetHSBColor - /LoutSetHSBColor { gsave sethsbcolor currentrgbcolor grestore LoutSetRGBColor } bind def % c m y k LoutSetRGBColor - /LoutSetCMYKColor { [ 5 1 roll ] [ /DeviceCMYK ] LoutCurrentP LoutSetCCSP } bind def % p LoutSetTexture - /LoutSetTexture { LoutCurrentCCS 3 -1 roll LoutSetCCSP } bind def % % LoutMakeTexture p /LoutMakeTexture { 12 dict begin /PaintProc exch def /YStep exch def /XStep exch def /BBox exch def /PaintType exch def /PatternType 1 def /TilingType 1 def currentdict end 7 1 roll matrix translate 5 1 roll matrix rotate 4 1 roll matrix scale exch dup matrix scale matrix concatmatrix matrix concatmatrix matrix concatmatrix /makepattern where { pop makepattern } { pop pop null } ifelse } bind def /LoutTextureSolid { null LoutSetTexture } bind def %%EndResource %%BeginResource: procset LoutTabPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/tabf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Tab % % % % To assist in avoiding name clashes, the names % % of all these symbols begin with "ltab". % % % % Jeffrey H. Kingston % % 24 September 1991 % % 22 December 1992 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % linewidth ltabhs - % horizontal single line /ltabhs { 0 0 moveto xsize 0 lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhsp - % horizontal single line with projecting ends /ltabhsp { 0 0 moveto xsize 0 lineto setlinewidth 2 setlinecap stroke } def % linewidth ltabhd - % horizontal double line /ltabhd { dup dup 0 0 moveto xsize 0 lineto 0 exch 3 mul moveto xsize exch 3 mul lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhdb - % horizontal double line below mark /ltabhdb { dup dup 0 0 moveto xsize 0 lineto 0 exch -3 mul moveto xsize exch -3 mul lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabhdnw - % horizontal double line with northwest corner /ltabhdnw { dup dup dup dup 0 0 moveto xsize 0 lineto xsize exch 3 mul moveto -3 mul exch 3 mul lineto -3 mul 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdne - % horizontal double line with northeast corner /ltabhdne { dup dup dup dup 0 0 moveto xsize 0 lineto 0 exch 3 mul moveto 3 mul xsize add exch 3 mul lineto 3 mul xsize add 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdsw - % horizontal double line with southwest corner /ltabhdsw { dup dup dup dup 0 0 moveto xsize 0 lineto xsize exch -3 mul moveto -3 mul exch -3 mul lineto -3 mul 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabhdse - % horizontal double line with southeast corner /ltabhdse { dup dup dup dup 0 0 moveto xsize 0 lineto 0 exch -3 mul moveto 3 mul xsize add exch -3 mul lineto 3 mul xsize add 0 lineto setlinewidth 0 setlinejoin 2 setlinecap stroke } def % linewidth ltabvs - % vertical single line /ltabvs { 0 0 moveto 0 ysize lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabvd - % vertical double line /ltabvd { dup dup 0 0 moveto 0 ysize lineto -3 mul 0 moveto -3 mul ysize lineto setlinewidth 0 setlinecap stroke } def % linewidth ltabvdr - % vertical double line to right of mark /ltabvdr { dup dup 0 0 moveto 0 ysize lineto 3 mul 0 moveto 3 mul ysize lineto setlinewidth 0 setlinecap stroke } def %%EndResource %%BeginResource: procset LoutFigPrependGraphic % @PrependGraphic file /home/jeff/lout.lib/include/figf.lpg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % PostScript @SysPrependGraphic file for @Fig Jeffrey H. Kingston % % Version 2.0 (includes CIRCUM label) January 1992 % % % % Although Fig is now obsolete I have updated it 20 October 2002 % % to work with textures, i.e. replacing setrgbcolor with % % LoutSetRGBColor. % % % % To assist in avoiding name clashes, the names of all symbols % % defined here begin with "lfig". However, this is not feasible % % with user-defined labels and some labels used by users. % % % % is two numbers, a point. % % is one number, a length % % is one number, an angle in degrees % % is one number, the preferred length of a dash % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% errordict begin /handleerror { { /Times-Roman findfont 8 pt scalefont setfont 0 setgray 4 pt 4 pt moveto $error /errorname get dup lfigdict exch known { lfigdict exch get } { 30 string cvs } ifelse show ( Command: ) show $error /command get 30 string cvs show } stopped {} if showpage stop } def end % concat strings: lfigconcat % must be defined outside lfigdict since used in lfigpromotelabels /lfigconcat { 2 copy length exch length add string dup 0 4 index putinterval dup 3 index length 3 index putinterval 3 1 roll pop pop } def % lfigdebugprint - % must be defined outside lfigdict since used in arbitrary places % /lfigdebugprint % { print % (; operand stack:\n) print % count copy % count 2 idiv % { == % (\n) print % } repeat % (\n) print % } def /lfigdict 120 dict def lfigdict begin % error messages /dictfull (dictfull error: too many labels?) def /dictstackoverflow (dictstackoverflow error: labels nested too deeply?) def /execstackoverflow (execstackoverflow error: figure nested too deeply?) def /limitcheck (limitcheck error: figure nested too deeply or too large?) def /syntaxerror (syntaxerror error: syntax error in text of figure?) def /typecheck (typecheck error: syntax error in text of figure?) def /undefined (undefined error: unknown or misspelt label?) def /VMError (VMError error: run out of memory?) def % push pi onto stack: - lfigpi /lfigpi 3.14159 def % arc directions /clockwise false def /anticlockwise true def % maximum of two numbers: lfigmax /lfigmax { 2 copy gt { pop } { exch pop } ifelse } def % minimum of two numbers: lfigmin /lfigmin { 2 copy lt { pop } { exch pop } ifelse } def % add two points: lfigpadd /lfigpadd { exch 3 1 roll add 3 1 roll add exch } def % subtract first point from second: lfigpsub /lfigpsub { 3 2 roll sub 3 1 roll exch sub exch } def % max two points: lfigpmax /lfigpmax { exch 3 1 roll lfigmax 3 1 roll lfigmax exch } def % min two points: lfigpmin /lfigpmin { exch 3 1 roll lfigmin 3 1 roll lfigmin exch } def % scalar multiplication: lfigpmul /lfigpmul { dup 3 1 roll mul 3 1 roll mul exch } def % point at angle and distance: lfigatangle /lfigatangle { 2 copy cos mul 3 1 roll sin mul lfigpadd } def % angle from one point to another: lfigangle /lfigangle { lfigpsub 2 copy 0 eq exch 0 eq and {pop} {exch atan} ifelse } def % distance between two points: lfigdistance /lfigdistance { lfigpsub dup mul exch dup mul add sqrt } def % difference in x coords: lfigxdistance /lfigxdistance { pop 3 1 roll pop sub } def %difference in y coords: lfigydistance /lfigydistance { 3 1 roll pop sub exch pop } def % stroke a solid line: lfigsolid - /lfigsolid { pop pop [] 0 setdash stroke } def % stroke a lfigdashed line: lfigdashed - /lfigdashed { 2 copy div 2 le 1 index 0 le or { exch pop 1 pt lfigmax [ exch dup ] 0 setdash } { dup [ exch 4 2 roll 2 copy div 1 sub 2 div ceiling dup 4 1 roll 1 add mul sub exch div ] 0 setdash } ifelse stroke } def % stroke a lfigcdashed line: lfigcdashed - /lfigcdashed { 2 copy le 1 index 0 le or { exch pop 1 pt lfigmax [ exch dup ] dup 0 get 2 div setdash } { dup [ 4 2 roll exch 2 copy exch div 2 div ceiling div 1 index sub ] exch 2 div setdash } ifelse stroke } def % stroke a dotted line: lfigdotted - /lfigdotted { 2 copy le 1 index 0 le or { exch pop 1 pt lfigmax [ exch 0 exch ] 0 setdash } { 1 index exch div ceiling div [ 0 3 2 roll ] 0 setdash } ifelse stroke } def % stroke a noline line: lfignoline - /lfignoline { pop pop } def % painting (i.e. filling): - lfigwhite - (etc.) /lfignopaint { } def /lfignochange { fill } def /lfigdarkblue { 0.0 0.0 0.5 LoutSetRGBColor fill } def /lfigblue { 0.0 0.0 1.0 LoutSetRGBColor fill } def /lfiglightblue { 0.5 0.5 1.0 LoutSetRGBColor fill } def /lfigdarkgreen { 0.0 0.5 0.0 LoutSetRGBColor fill } def /lfiggreen { 0.0 1.0 0.0 LoutSetRGBColor fill } def /lfiglightgreen { 0.5 1.0 0.5 LoutSetRGBColor fill } def /lfigdarkred { 0.5 0.0 0.0 LoutSetRGBColor fill } def /lfigred { 1.0 0.0 0.0 LoutSetRGBColor fill } def /lfiglightred { 1.0 0.5 0.5 LoutSetRGBColor fill } def /lfigdarkcyan { 0.0 0.5 0.5 LoutSetRGBColor fill } def /lfigcyan { 0.0 1.0 1.0 LoutSetRGBColor fill } def /lfiglightcyan { 0.5 1.0 1.0 LoutSetRGBColor fill } def /lfigdarkmagenta { 0.5 0.0 0.5 LoutSetRGBColor fill } def /lfigmagenta { 1.0 0.0 1.0 LoutSetRGBColor fill } def /lfiglightmagenta { 1.0 0.5 1.0 LoutSetRGBColor fill } def /lfigdarkyellow { 0.5 0.5 0.0 LoutSetRGBColor fill } def /lfigyellow { 1.0 1.0 0.0 LoutSetRGBColor fill } def /lfiglightyellow { 1.0 1.0 0.5 LoutSetRGBColor fill } def /lfigdarkgray { 0.2 0.2 0.2 LoutSetRGBColor fill } def /lfiggray { 0.5 0.5 0.5 LoutSetRGBColor fill } def /lfiglightgray { 0.8 0.8 0.8 LoutSetRGBColor fill } def /lfigdarkgrey { 0.2 0.2 0.2 LoutSetRGBColor fill } def /lfiggrey { 0.5 0.5 0.5 LoutSetRGBColor fill } def /lfiglightgrey { 0.8 0.8 0.8 LoutSetRGBColor fill } def /lfigblack { 0.0 0.0 0.0 LoutSetRGBColor fill } def /lfigwhite { 1.0 1.0 1.0 LoutSetRGBColor fill } def % line caps (and joins, not currently used) /lfigbutt 0 def /lfiground 1 def /lfigprojecting 2 def /lfigmiter 0 def /lfigbevel 2 def % shape and labels of the @Box symbol /lfigbox { 0 0 /SW lfigpointdef xsize 0 /SE lfigpointdef xsize ysize /NE lfigpointdef 0 ysize /NW lfigpointdef SE 0.5 lfigpmul /S lfigpointdef NW 0.5 lfigpmul /W lfigpointdef W SE lfigpadd /E lfigpointdef S NW lfigpadd /N lfigpointdef NE 0.5 lfigpmul /CTR lfigpointdef [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef SW SE NE NW SW } def % shape and labels of the @CurveBox symbol /lfigcurvebox { xsize 0.5 mul ysize 0.5 mul /CTR lfigpointdef xsize 0.5 mul 0 /S lfigpointdef xsize ysize 0.5 mul /E lfigpointdef xsize 0.5 mul ysize /N lfigpointdef 0 ysize 0.5 mul /W lfigpointdef xmark 0.293 mul xmark 0.293 mul /SW lfigpointdef xsize xmark 0.293 mul sub xmark 0.293 mul /SE lfigpointdef xsize xmark 0.293 mul sub ysize xmark 0.293 mul sub /NE lfigpointdef xmark 0.293 mul ysize xmark 0.293 mul sub /NW lfigpointdef [ xsize ysize 0.5 lfigpmul xmark /lfigcurveboxcircum cvx ] lfigcircumdef xmark 0 xsize xmark sub 0 [ xsize xmark sub xmark ] xsize xmark xsize ysize xmark sub [ xsize xmark sub ysize xmark sub ] xsize xmark sub ysize xmark ysize [ xmark ysize xmark sub ] 0 ysize xmark sub 0 xmark [ xmark xmark ] xmark 0 } def % shadow of the @ShadowBox symbol % its shape and labels are done, somewhat inaccurately, with lfigbox /lfigshadow { xmark 2 mul 0 moveto xsize 0 lineto xsize ysize xmark 2 mul sub lineto xsize xmark sub ysize xmark 2 mul sub lineto xsize xmark sub xmark lineto xmark 2 mul xmark lineto closepath fill } def % shape and labels of the @Square symbol /lfigsquare { xsize ysize 0.5 lfigpmul /CTR lfigpointdef CTR xsize xsize ysize ysize lfigpmax 0.5 lfigpmul lfigpadd /NE lfigpointdef CTR 0 0 CTR NE lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef CTR 0 0 CTR NE lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef CTR 0 0 CTR NE lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef SW 0.5 lfigpmul SE 0.5 lfigpmul lfigpadd /S lfigpointdef NW 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /N lfigpointdef SW 0.5 lfigpmul NW 0.5 lfigpmul lfigpadd /W lfigpointdef SE 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /E lfigpointdef [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef SW SE NE NW SW } def % shape and labels of the @Diamond symbol /lfigdiamond { xsize 0 0.5 lfigpmul /S lfigpointdef 0 ysize 0.5 lfigpmul /W lfigpointdef S W lfigpadd /CTR lfigpointdef CTR W lfigpadd /N lfigpointdef CTR S lfigpadd /E lfigpointdef [ xsize ysize 0.5 lfigpmul /lfigdiamondcircum cvx ] lfigcircumdef S E N W S } def % shape and labels of the @Ellipse symbol /lfigellipse { xsize 0 0.5 lfigpmul /S lfigpointdef 0 ysize 0.5 lfigpmul /W lfigpointdef S W lfigpadd /CTR lfigpointdef CTR W lfigpadd /N lfigpointdef CTR S lfigpadd /E lfigpointdef CTR xsize 0 0.3536 lfigpmul lfigpadd 0 ysize 0.3536 lfigpmul lfigpadd /NE lfigpointdef 0 ysize 0.3536 lfigpmul CTR xsize 0 0.3536 lfigpmul lfigpadd lfigpsub /SE lfigpointdef xsize 0 0.3536 lfigpmul CTR lfigpsub 0 ysize 0.3536 lfigpmul lfigpadd /NW lfigpointdef 0 ysize 0.3536 lfigpmul xsize 0 0.3536 lfigpmul CTR lfigpsub lfigpsub /SW lfigpointdef [ xsize ysize 0.5 lfigpmul /lfigellipsecircum cvx ] lfigcircumdef S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S } def % shape and labels of the @Circle symbol /lfigcircle { xsize ysize 0.5 lfigpmul /CTR lfigpointdef CTR xsize 0 ysize 0 lfigpmax 0.5 lfigpmul lfigpadd /E lfigpointdef CTR 0 0 CTR E lfigdistance 45 lfigatangle lfigpadd /NE lfigpointdef CTR 0 0 CTR E lfigdistance 90 lfigatangle lfigpadd /N lfigpointdef CTR 0 0 CTR E lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef CTR 0 0 CTR E lfigdistance 180 lfigatangle lfigpadd /W lfigpointdef CTR 0 0 CTR E lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef CTR 0 0 CTR E lfigdistance 270 lfigatangle lfigpadd /S lfigpointdef CTR 0 0 CTR E lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef [ S E lfigpsub /lfigellipsecircum cvx ] lfigcircumdef S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S } def % shape and labels of the @HLine and @HArrow symbols /lfighline { 0 ymark lfigprevious /FROM lfigpointdef xsize ymark lfigprevious /TO lfigpointdef } def % shape and labels of the @VLine and @VArrow symbols /lfigvline { xmark ysize lfigprevious /FROM lfigpointdef xmark 0 lfigprevious /TO lfigpointdef } def % points of a polygon around base with given no of sides, vert init angle: % figpolygon ... /lfigpolygon { xsize ysize 0.5 lfigpmul /CTR lfigpointdef 90 sub CTR 2 copy lfigmax 5 3 roll [ 4 copy pop /lfigpolycircum cvx ] lfigcircumdef exch dup 360 exch div exch 1 1 3 2 roll { 4 string cvs (P) exch lfigconcat cvn 6 copy pop pop lfigatangle 2 copy 10 2 roll 3 2 roll lfigpointdef dup 3 1 roll add exch } for pop lfigatangle } def % next array element: lfiggetnext true % or false /lfiggetnext { 2 copy exch length ge { false } { 2 copy get exch 1 add exch true } ifelse } def % check whether thing is number: lfigisnumbertype /lfigisnumbertype { dup type dup /integertype eq exch /realtype eq or } def % check whether thing is an array: lfigisarraytype /lfigisarraytype { dup type /arraytype eq } def % get next item: lfiggetnextitem 0 % or 1 % or 2 /lfiggetnextitem { lfiggetnext { lfigisarraytype { 1 } { lfigisnumbertype { 3 1 roll lfiggetnext { lfigisnumbertype { 4 3 roll exch 2 } { pop 3 2 roll pop 0 } ifelse } { 3 2 roll pop 0 } ifelse } { pop 0 } ifelse } ifelse } { 0 } ifelse } def % set arc path: bool x1 y1 x2 y2 x0 y0 lfigsetarc % the path goes from x1 y1 to x2 y2 about centre x0 y0, % anticlockwise if bool is true else clockwise. % The orientations of backwards pointing and forwards pointing % arrowheads are returned in the two angles, and % the length of the arc is returned in . /lfigsetarc { 20 dict begin matrix currentmatrix 8 1 roll 2 copy translate 2 copy 8 2 roll 4 2 roll lfigpsub 6 2 roll lfigpsub dup /y1 exch def dup mul /y1s exch def dup /x1 exch def dup mul /x1s exch def dup /y2 exch def dup mul /y2s exch def dup /x2 exch def dup mul /x2s exch def y1s y2s eq { -1 } { y1s x2s mul y2s x1s mul sub y1s y2s sub div } ifelse /da exch def x1s x2s eq { -1 } { x1s y2s mul x2s y1s mul sub x1s x2s sub div } ifelse /db exch def da 0 gt db 0 gt and { /LMax da sqrt db sqrt lfigmax def /scalex da sqrt LMax div def /scaley db sqrt LMax div def scalex scaley scale 0 0 LMax 0 0 x1 scalex mul y1 scaley mul lfigangle 0 0 x2 scalex mul y2 scaley mul lfigangle 2 copy eq { 360 add } if 2 copy 8 2 roll 5 index { arc } { arcn } ifelse 2 index 1 index { 90 sub } { 90 add } ifelse dup sin scaley mul exch cos scalex mul atan 2 index 2 index { 90 add } { 90 sub } ifelse dup sin scaley mul exch cos scalex mul atan 5 2 roll % res1 res2 ang1 ang2 anticlockwise { exch sub } { sub } ifelse dup 0 le { 360 add } if lfigpi mul LMax mul 180 div } { 0 0 x1 y1 lfigdistance 0 0 x2 y2 lfigdistance eq 0 0 x1 y1 lfigdistance 0 gt and { 0 0 0 0 x1 y1 lfigdistance 0 0 x1 y1 lfigangle 0 0 x2 y2 lfigangle 2 copy eq { 360 add } if 2 copy 8 2 roll 5 index { arc } { arcn } ifelse 2 index 1 index { 90 sub } { 90 add } ifelse 2 index 2 index { 90 add } { 90 sub } ifelse 5 2 roll % res1 res2 ang1 ang2 clockwise { exch sub } { sub } ifelse dup 0 le { 360 add } if lfigpi mul 0 0 x1 y1 lfigdistance mul 180 div } { x2 y2 lineto pop x2 y2 x1 y1 lfigangle x1 y1 x2 y2 lfigangle x1 y1 x2 y2 lfigdistance } ifelse } ifelse 4 -1 roll setmatrix end } def % lfigsetcurve: set up a Bezier curve from x0 y0 to x3 y3 % and return arrowhead angles and length of curve (actually 0) % x0 y0 x1 y1 x2 y2 x3 y3 lfigsetcurve /lfigsetcurve { 8 copy curveto pop pop lfigangle 5 1 roll 4 2 roll lfigangle exch 0 } def % lfigpaintpath: paint a path of the given shape % /paint [ shape ] lfigpaintpath - /lfigpaintpath { 10 dict begin 0 newpath /prevseen false def /curveseen false def { lfiggetnextitem dup 0 eq { pop exit } { 1 eq { /curveseen true def /curve exch def curve length 0 eq { /curveseen false def } if } { /ycurr exch def /xcurr exch def prevseen { curveseen { curve length 4 eq { xprev yprev curve 0 get curve 1 get curve 2 get curve 3 get xcurr ycurr lfigsetcurve pop pop pop } { xprev yprev xcurr ycurr curve length 1 ge { curve 0 get } { 0 } ifelse curve length 2 ge { curve 1 get } { 0 } ifelse curve length 3 ge { curve 2 get } { true } ifelse 7 1 roll lfigsetarc pop pop pop } ifelse } { xcurr ycurr lineto } ifelse } { xcurr ycurr moveto } ifelse /xprev xcurr def /yprev ycurr def /prevseen true def /curveseen false def } ifelse } ifelse } loop pop pop cvx exec end } def % stroke a path of the given shape in the given linestyle and dash length. % Return the origin and angle of the backward and forward arrow heads. % dashlength /linestyle [shape] lfigdopath [ ] [ ] /lfigdopath { 10 dict begin 0 /prevseen false def /curveseen false def /backarrow [] def /fwdarrow [] def { lfiggetnextitem dup 0 eq { pop exit } { 1 eq { /curveseen true def /curve exch def curve length 0 eq { /prevseen false def } if } { /ycurr exch def /xcurr exch def prevseen { newpath xprev yprev moveto curveseen { curve length 4 eq { xprev yprev curve 0 get curve 1 get curve 2 get curve 3 get xcurr ycurr lfigsetcurve } { xprev yprev xcurr ycurr curve length 1 ge { curve 0 get } { 0 } ifelse curve length 2 ge { curve 1 get } { 0 } ifelse curve length 3 ge { curve 2 get } { true } ifelse 7 1 roll lfigsetarc } ifelse } { xcurr ycurr lineto xcurr ycurr xprev yprev lfigangle dup 180 sub xprev yprev xcurr ycurr lfigdistance } ifelse 6 index 6 index cvx exec [ xprev yprev 5 -1 roll ] backarrow length 0 eq { /backarrow exch def } { pop } ifelse [ xcurr ycurr 4 -1 roll ] /fwdarrow exch def } if /xprev xcurr def /yprev ycurr def /prevseen true def /curveseen false def } ifelse } ifelse } loop pop pop pop pop backarrow length 0 eq { [ 0 0 0 ] } { backarrow } ifelse fwdarrow length 0 eq { [ 0 0 0 ] } { fwdarrow } ifelse end } def % lfigdoarrow: draw an arrow head of given form % dashlength /lstyle /pstyle hfrac height width [ ] lfigdoarrow - /lfigdoarrow { matrix currentmatrix 8 1 roll dup 0 get 1 index 1 get translate 2 get rotate [ 2 index neg 2 index 0 0 3 index 3 index neg 1 index 10 index mul 0 7 index 7 index ] 4 1 roll pop pop pop dup 3 1 roll gsave lfigpaintpath grestore lfigdopath pop pop setmatrix } def % arrow head styles /lfigopen 0.0 def /lfighalfopen 0.5 def /lfigclosed 1.0 def % stroke no arrows, forward, back, and both /lfignoarrow { pop pop pop pop pop pop pop pop } def /lfigforward { 7 -1 roll lfigdoarrow pop } def /lfigback { 8 -2 roll pop lfigdoarrow } def /lfigboth { 8 -1 roll 7 copy lfigdoarrow pop 7 -1 roll lfigdoarrow } def % lfigprevious: return previous point on path /lfigprevious { lfigisnumbertype { 2 copy } { lfigisarraytype { 2 index 2 index } { 0 0 } ifelse } ifelse } def % label a point in 2nd top dictionary: /name lfigpointdef - /lfigpointdef { % (Entering lfigpointdef) lfigdebugprint [ 4 2 roll transform /itransform cvx ] cvx currentdict end 3 1 roll % currentdict length currentdict maxlength lt % { def } % { exec moveto (too many labels) show stop } % ifelse def begin % (Leaving lfigpointdef) lfigdebugprint } def % promote labels from second top to third top dictionary % lfigpromotelabels - /lfigpromotelabels { % (Entering lfigpromotelabels) lfigdebugprint currentdict end exch currentdict end { exch 20 string cvs 2 index (@) lfigconcat exch lfigconcat cvn exch def } forall pop begin % (Leaving lfigpromotelabels) lfigdebugprint } def % show labels (except CIRCUM): - lfigshowlabels - /lfigshowlabels { % (Entering lfigshowlabels) lfigdebugprint currentdict end currentdict { 1 index 20 string cvs (CIRCUM) search % if CIRCUM in key { pop pop pop pop pop } { pop cvx exec 2 copy newpath 1.5 pt 0 360 arc 0 setgray fill /Times-Roman findfont 8 pt scalefont setfont moveto 0.2 cm 0.1 cm rmoveto 20 string cvs show } ifelse } forall begin % (Leaving lfigshowlabels) lfigdebugprint } def % fix an angle to 0 <= res < 360: lfigfixangle /lfigfixangle { % (Entering lfigfixangle) lfigdebugprint { dup 0 ge { exit } if 360 add } loop { dup 360 lt { exit } if 360 sub } loop % (Leaving lfigfixangle) lfigdebugprint } def % find point on circumference of box: alpha a b lfigboxcircum x y /lfigboxcircum { % (Entering lfigboxcircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def 0 0 a b lfigangle /theta exch def % if alpha <= theta, return (a, a*tan(alpha)) alpha theta le { a a alpha sin mul alpha cos div } { % else if alpha <= 180 - theta, return (b*cot(alpha), b) alpha 180 theta sub le { b alpha cos mul alpha sin div b } { % else if alpha <= 180 + theta, return (-a, -a*tan(alpha)) alpha 180 theta add le { a neg a neg alpha sin mul alpha cos div } { % else if alpha <= 360 - theta, return (-b*cot(alpha), -b) alpha 360 theta sub le { b neg alpha cos mul alpha sin div b neg } { % else 360 - theta <= alpha, return (a, a*tan(alpha)) a a alpha sin mul alpha cos div } ifelse } ifelse } ifelse } ifelse end % (Leaving lfigboxcircum) lfigdebugprint } def % find quadratic roots (assume a != 0): a b c lfigqroots x1 x2 2 % or x2 1 % or 0 /lfigqroots { 4 dict begin /c exch def /b exch def /a exch def /disc b b mul 4 a c mul mul sub def disc 0 lt { 0 } { disc 0 eq { b neg 2 a mul div 1 } { b neg disc sqrt add 2 a mul div b neg disc sqrt sub 2 a mul div 2 } ifelse } ifelse end } def % work our which quadrant: lfigquadrant <0-3> /lfigquadrant { dup 90 lt { pop 0 } { dup 180 lt { pop 1 } { 270 lt { 2 } { 3 } ifelse } ifelse } ifelse } def % find curvebox circum, assuming upper right quadrant: alpha a b xmk lfigcb x y /lfigcb { 6 dict begin /xmk exch def /b exch def /a exch def /alpha exch def /theta1 0 0 a b xmk sub lfigangle def /theta2 0 0 a xmk sub b lfigangle def alpha theta1 le { % if alpha <= theta1, return (a, a*tan(alpha)) a a alpha sin mul alpha cos div } { alpha theta2 ge { % else if alpha > theta2, return (b*cot(alpha), b) b alpha cos mul alpha sin div b } { % else, return the intersection of line and circle a xmk sub b xmk sub xmk 0 0 alpha lfigcircleintersect dup 0 eq { % should never happen, just return any reasonable point pop a b 0.5 lfigpmul } { 1 eq { % should never happen, just return the point on top of stack } { % the usual case, two points on stack, return the larger lfigpmax } ifelse } ifelse } ifelse } ifelse end } def % find point on circumference of curvebox: alpha a b xmk lfigcurveboxcircum x y /lfigcurveboxcircum { % (Entering lfigcurveboxcircum) lfigdebugprint 5 dict begin /xmk exch def /b exch def /a exch def lfigfixangle /alpha exch def % work out which quadrant we are in, and reflect accordingly /quad alpha lfigquadrant def quad 0 eq { alpha a b xmk lfigcb } { quad 1 eq { 180 alpha sub a b xmk lfigcb exch neg exch } { quad 2 eq { alpha 180 sub a b xmk lfigcb neg exch neg exch } { 360 alpha sub a b xmk lfigcb neg } ifelse } ifelse } ifelse end % (Leaving lfigcurveboxcircum) lfigdebugprint } def % find point on circumference of diamond: alpha a b lfigdiamondcircum x y /lfigdiamondcircum { % (Entering lfigdiamondcircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def b alpha cos abs mul a alpha sin abs mul add /denom exch def a b mul alpha cos mul denom div a b mul alpha sin mul denom div end % (Leaving lfigdiamondcircum) lfigdebugprint } def % find point on circumference of ellipse: alpha a b lfigellipsecircum x y /lfigellipsecircum { % (Entering lfigellipsecircum) lfigdebugprint 4 dict begin /b exch def /a exch def lfigfixangle /alpha exch def b alpha cos mul dup mul a alpha sin mul dup mul add sqrt /denom exch def a b mul alpha cos mul denom div a b mul alpha sin mul denom div end % (Leaving lfigellipsecircum) lfigdebugprint } def % find point of intersection of two lines each defined by two points % x1 y1 x2 y2 x3 y3 x4 y4 lfiglineintersect x y /lfiglineintersect { % (Entering lfiglineintersect) lfigdebugprint 13 dict begin /y4 exch def /x4 exch def /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def /x1 exch def x2 x1 sub /x21 exch def x4 x3 sub /x43 exch def y2 y1 sub /y21 exch def y4 y3 sub /y43 exch def y21 x43 mul y43 x21 mul sub /det exch def % calculate x y21 x43 mul x1 mul y43 x21 mul x3 mul sub y3 y1 sub x21 mul x43 mul add det div % calculate y x21 y43 mul y1 mul x43 y21 mul y3 mul sub x3 x1 sub y21 mul y43 mul add det neg div end % (Leaving lfiglineintersect) lfigdebugprint } def % find point on circumference of polygon % alpha radius num theta lfigpolycircum x y /lfigpolycircum { % (Entering lfigpolycircum) lfigdebugprint 13 dict begin /theta exch def /num exch def /radius exch def /alpha exch def % calculate delta, the angle from theta to alpha alpha theta sub lfigfixangle % calculate the angle which is the multiple of 360/num closest to delta 360 num div div truncate 360 num div mul theta add /anglea exch def % calculate the next multiple of 360/num after anglea anglea 360 num div add /angleb exch def % intersect the line through these two points with the alpha line anglea cos anglea sin angleb cos angleb sin 0 0 alpha cos 2 mul alpha sin 2 mul lfiglineintersect radius lfigpmul end % (Leaving lfigpolycircum) lfigdebugprint } def % find point of intersection of a point and a circle % x0 y0 r x1 y1 theta lfigcircleintersect xa ya xb yb 2 % or xb yb 1 % or 0 /lfigcircleintersect { % (Entering lfigcircleintersect) lfigdebugprint 15 dict begin /theta exch def /y1 exch def /x1 exch def /r exch def /y0 exch def /x0 exch def % if sin(theta) = 0 then line is horizontal and y must be y1 theta sin abs 0.00001 lt { /a 1 def /b -2 x0 mul def /c x0 dup mul y1 y0 sub dup mul add r dup mul sub def a b c lfigqroots dup 0 eq { pop 0 } { 1 eq { y1 1 } { y1 exch y1 2 } ifelse } ifelse } { /ct theta cos theta sin div def /a ct ct mul 1 add def /b ct x1 x0 sub mul y1 add y0 sub 2 mul def /c x1 x0 sub dup mul y1 y0 sub dup mul add r dup mul sub def a b c lfigqroots dup 0 eq { pop 0 } { 1 eq { y1 add /yb exch def yb y1 sub ct mul x1 add /xb exch def xb yb 1 } { y1 add /ya exch def ya y1 sub ct mul x1 add /xa exch def y1 add /yb exch def yb y1 sub ct mul x1 add /xb exch def xa ya xb yb 2 } ifelse } ifelse } ifelse end % (Leaving lfigcircleintersect) lfigdebugprint } def % add CIRCUM operator with this body: lfigcircumdef - /lfigcircumdef { % (Entering lfigcircumdef) lfigdebugprint /CIRCUM exch cvx currentdict end 3 1 roll % currentdict length currentdict maxlength lt % { def } % { exec moveto (too many labels) show stop } % ifelse def begin % (Leaving lfigcircumdef) lfigdebugprint } def end %%EndResource %%BeginResource: procset LoutBasicSetup % @PrependGraphic file /home/jeff/lout.lib/include/bsf.lpg % width height linethickness louteuro - % draw a Euro symbol of this width and height with this line thickness /louteuro { 20 dict begin /eurothick exch def /euroheight exch def /eurowidth exch def /eurostrokewidth euroheight 0.8 mul def /eurostep eurothick 60 cos mul 60 sin div def /eurotheta 40 def % llx lly width thickness louteurobox - % draw angled box starting at (llx, lly) with given width and thickness /louteurobox { /euroboxthick exch def /euroboxwidth exch def newpath moveto euroboxwidth 0 rlineto eurostep euroboxthick rlineto euroboxwidth neg 0 rlineto closepath fill } def % lower cross stroke 0 euroheight 2 div eurothick 1.5 mul sub eurostrokewidth eurothick louteurobox % upper cross stroke 0 euroheight 2 div eurothick 0.5 mul add eurostrokewidth eurostep 2 mul add eurothick louteurobox % circular part /eurohctr eurowidth euroheight 2 div eurotheta cos mul sub def /eurovctr euroheight 2 div def newpath eurohctr eurovctr eurovctr eurotheta 350 eurotheta sub arc eurohctr eurovctr eurovctr eurothick sub 365 eurotheta sub eurotheta arcn closepath fill end } def % path for @FullWidthRule symbol /LoutRule { 0 0 moveto xsize 0 lineto } def % path for @Box symbol /LoutBox { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath } def % path for @CurveBox symbol /LoutCurveBox { xmark 0 moveto xsize xmark sub xmark xmark 270 360 arc xsize xmark sub ysize xmark sub xmark 0 90 arc xmark ysize xmark sub xmark 90 180 arc xmark xmark xmark 180 270 arc closepath } def % path for @ShadowBox symbol /LoutShadowBox { xmark 2 mul 0 moveto xsize 0 lineto xsize ysize xmark 2 mul sub lineto xsize xmark sub ysize xmark 2 mul sub lineto xsize xmark sub xmark lineto xmark 2 mul xmark lineto closepath } def % set up dictionary containing margin note data: parity LoutMargSet - /LoutMargSet { /LoutMargDict 12 dict def LoutMargDict begin /parity exch def /matr matrix currentmatrix def /rightx xsize def /lefty ysize def % highest allowable point for top of next left note /righty ysize def % highest allowable point for top of next right note /max { 2 copy gt { pop } { exch pop } ifelse } def /min { 2 copy lt { pop } { exch pop } ifelse } def end } def %translate coordinate system for marginal notes: type LoutMargShift - % where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner /LoutMargShift { LoutMargDict begin % y coordinate of top of note, in margin coords, before vertical adjust 0 ysize transform matr itransform exch pop % decide whether left or right margin based on type and parity exch [ 0 1 parity 1 parity sub ] exch get 0 eq { % left margin: adjust top of note downwards if overlaps previous note lefty min % bottom of note is new lefty position and also translate position ysize sub dup /lefty exch def % want right edge of note at coordinate zero xsize neg exch } { % right margin: adjust top of note downwards if overlaps previous note righty min % bottom of note is new righty position and also translate position ysize sub dup /righty exch def % want left edge of note at coordinate rightx rightx exch } ifelse % stack now contains coord of bottom left corner in margin coordinates matr setmatrix translate end } def % create LoutPageDict with left, right, foot, top for @Place symbol users /LoutPageSet { /LoutPageDict 5 dict def LoutPageDict begin /matr matrix currentmatrix def /left 0 def /right xsize def /foot 0 def /top ysize def end } def %%EndResource %%EndProlog %%BeginSetup %%BeginResource: encoding vec2 /vec2 [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /quotesinglbase /quotedblbase /ellipsis /OE /oe /quotedblleft /quotedblright /fi /fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse %%EndSetup %%Page: i 1 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Helvetica %%+ font Symbol %%+ font Helvetica-Oblique /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica-Oblique /Helvetica-Obliquefnt3 vec2 /Helvetica-Oblique LoutRecode /fnt3 { /Helvetica-Obliquefnt3 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 14006 0 14006 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 600 fnt2 1355 12125(An)m 2215(Exper)s -24(t')k 30(s)k 4518(Guide)s 6258(to)s 6902(the)s 3956 10685(Lout)m 616 9245(Document)m 3500(F)s 18(or)k -15(matting)k 6490(System)s 240 fnt2 3544 6059(Jeffre)m 4(y)k 4321(H.)s 4606(Kingston)s 3883 4395(V)m 19(ersion)k 4726(3.38)s 3796 4107(October)m 12(,)k 4746(2008)s 240 fnt4 0 342(\343)m 240 fnt3 241 340(Cop)m 7(yr)k -3(ight)k 1345(1991,)s 1991(2008,)s 2638(Jeffre)s 4(y)k 3438(H.)s 3726(Kingston,)s 4771(School)s 5587(of)s 5882(Inf)s 7(or)k -6(mation)k 7143(T)s 28(echnologies)k 3(,)k 8649(The)s 0 52(Univ)m 6(ersity)k 1134(of)s 1432(Sydne)s 4(y)k 2317(2006,)s 2966(A)s 7(ustr)k 2(alia.)k grestore gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: ii 2 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 14006 0 14006 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 fnt5 0 12955(Pr)m 8(eface)k [ /Dest /LOUTpreface /DEST pdfmark 240 fnt1 540 12095(This)m 1016(manual)s 1775(is)s 1984(addressed)s 2985(to)s 3224(those)s 3784(who)s 4250(wish)s 4759(to)s 4997(become)s 5797(e)s 3(xpert)k 6451(users)s 6992(of)s 7263(the)s 7611(Lout)s 8122(document)s 0 11807(formatting)m 1092(system.)s 1952(An)s 2334(e)s 3(xpert)k 3020(user)s 3510(is)s 3752(someone)s 4690(who)s 5188(understands)s 6414(the)s 6794(principles)s 7819(of)s 8122(document)s 0 11519(formatting)m 1083(that)s 1524(Lout)s 2059(embodies,)s 3105(and)s 3532(is)s 3765(able)s 4242(to)s 4503(apply)s 5112(them,)s 5720(for)s 6081(e)s 3(xample)k 6966(to)s 7228(design)s 7933(a)s 8122(document)s 0 11231(format)m 690(or)s 943(a)s 1103(special-purpose)s 2653(package.)s 3595(In)s 3845(contrast,)s 4701(a)s 4861(non-e)s 3(xpert)k 5948(user)s 6400(is)s 6604(someone)s 7505(who)s 7965(simply)s 8663(uses)s 0 10943(Lout)m 512(to)s 751(format)s 1447(documents.)s 480 10569(Chapter)m 1295(1)s 1447(e)s 3(xplains)k 2290(these)s 2834(principles,)s 3881(and)s 4282(it)s 4472(should)s 5166(be)s 5446(read)s 5912(carefully)s 6812(and)s 7213(in)s 7454(sequence.)s 8492(Chap-)s 0 10281(ters)m 412(2)s 604(and)s 1025(3)s 1207(are)s 1571(for)s 1927(reference;)s 2943(respecti)s 6(v)k 3(ely)k 15(,)k 4198(the)s 3(y)k 4678(contain)s 5457(descriptions)s 6680(of)s 6969(the)s 7334(detailed)s 8166(operation)s 0 9993(of)m 277(Lout')s 13(s)k 945(major)s 1568(components,)s 2838(and)s 3248(a)s 3420(complete)s 4359(description)s 5484(of)s 5761(each)s 6262(prede\207ned)s 7336(symbol.)s 8211(The)s 8646(\207nal)s 0 9705(chapter)m 763(presents)s 1597(a)s 1763(collection)s 2762(of)s 3033(adv)s 6(anced)k 3989(e)s 3(xamples.)k 480 9331(This)m 946(manual)s 1695(presents)s 2518(V)s 26(ersion)k 3296(3)s 3449(of)s 3710(Basser)s 4396(Lout,)s 4945(publicly)s 5773(released)s 6602(in)s 6835(September)s 7906(1994)s 8430([)s [ /Rect [8501 9331 8615 9493] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkingston1995lout_program /ANN pdfmark 8501(4)s 8615(])s 8722(and)s 0 9043(de)m 6(v)k 3(eloped)k 1042(continuously)s 2342(since)s 2899(then.)s 3484(This)s 3970(manual)s 4738(w)s 2(as)k 5168(rendered)s 6072(into)s 6506(PostScript)s [ /Dest /LOUT19_4605_preface_1 /DEST pdfmark 7558(by)s 7861(V)s 26(ersion)k 8659(3.38)s 0 8755(of)m 271(the)s 619(Basser)s 1316(Lout)s 1828(interpreter)s 9(,)k 2919(using)s 3491(the)s 3839(symbols)s 4688(described)s 5662(in)s 5905(the)s 6253(User')s 13(s)k 6914(Guide)s 7555([)s [ /Rect [7626 8752 7732 8920] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkingston1995lout_user /ANN pdfmark 7626(5)s 7732(].)s 240 fnt5 0 8250(Ackno)m 2(wledgment.)k 240 fnt1 1986 8251(V)m 26(ersion)k 2811(3)s 3012(has)s 3419(bene\207ted)s 4391(from)s 4953(hundreds)s 5919(of)s 6227(comments)s 7298(recei)s 6(v)k 3(ed)k 8193(since)s 8778(the)s 0 7963(release)m 726(of)s 1006(V)s 26(ersion)k 1803(1)s 1967(in)s 2219(October)s 3057(1991.)s 3710(Not)s 4138(e)s 6(v)k 3(ery)k 4723(suggestion)s 5813(could)s 6411(be)s 6702(follo)s 6(wed,)k 7662(b)s 4(ut)k 8033(man)s 3(y)k 8625(ha)s 4(v)k 3(e)k 0 7675(been,)m 559(and)s 963(the)s 1311(encouragement)s 2832(w)s 2(as)k 3253(greatly)s 3970(appreciated.)s grestore gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: iii 3 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 14006 0 14006 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 fnt5 0 12955(Contents)m [ /Dest /LOUT20_445_all_1 /DEST pdfmark [ /Rect [0 11893 8346 12147] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTpreface /ANN pdfmark 240 fnt5 0 11982(Pr)m 4(eface)k 240 fnt1 1018 11983(..)m 1362(..)s 1706(..)s 2050(..)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8940 11983 9066 12146] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTpreface /ANN pdfmark 8940(ii)s [ /Rect [0 11265 8346 11519] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTprinciples /ANN pdfmark 240 fnt5 0 11354(Chapter)m 908(1)s 240 fnt1 1015 11355(.)m 240 fnt5 1179 11354(Principles)m 240 fnt1 2738 11355(..)m 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8971 11355 9066 11517] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTprinciples /ANN pdfmark 8971(1)s [ /Rect [720 10920 8346 11173] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTobjects /ANN pdfmark 720 11010(1.1.)m 1184(Objects)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8971 11010 9066 11172] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTobjects /ANN pdfmark 8971(1)s [ /Rect [720 10575 8346 10828] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTdefinitions /ANN pdfmark 720 10665(1.2.)m 1184(De\207nitions)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8952 10665 9066 10827] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTdefinitions /ANN pdfmark 8952(4)s [ /Rect [720 10230 8346 10483] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcross /ANN pdfmark 720 10320(1.3.)m 1184(Cross)s 1780(references)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8959 10317 9066 10482] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcross /ANN pdfmark 8959(8)s [ /Rect [720 9885 8346 10138] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTgalleys /ANN pdfmark 720 9975(1.4.)m 1184(Galle)s 3(ys)k 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8955 9970 9066 10137] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTgalleys /ANN pdfmark 8955(9)s [ /Rect [0 9257 8346 9511] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTdetails /ANN pdfmark 240 fnt5 0 9346(Chapter)m 908(2)s 240 fnt1 1023 9347(.)m 240 fnt5 1187 9346(Details)m 240 fnt1 2394 9347(..)m 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 9347 9066 9509] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTdetails /ANN pdfmark 8832(14)s [ /Rect [720 8912 8346 9165] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTlexical /ANN pdfmark 720 9002(2.1.)m 1184(Le)s 3(xical)k 1952(structure)s 2843(\(w)s 2(ords,)k 3612(spaces,)s 4343(symbols\))s 5269(and)s 5673(macros)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 9002 9066 9164] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTlexical /ANN pdfmark 8832(14)s [ /Rect [720 8567 8346 8821] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnamed /ANN pdfmark 720 8657(2.2.)m 1184(Named)s 1933(parameters)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8833 8654 9066 8821] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnamed /ANN pdfmark 8833(16)s [ /Rect [720 8222 8346 8475] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTvisibility /ANN pdfmark 720 8312(2.3.)m 1184(Nested)s 1906(de\207nitions,)s 3023(body)s 3557(parameters,)s 4711(e)s 3(xtend,)k 5453(import,)s 6197(and)s 6601(e)s 3(xport)k 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 8309 9066 8474] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTvisibility /ANN pdfmark 8839(18)s [ /Rect [720 7877 8346 8130] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTfilters /ANN pdfmark 720 7967(2.4.)m 1184(Filtered)s 1984(right)s 2495(and)s 2899(body)s 3433(parameters)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 7967 9066 8129] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTfilters /ANN pdfmark 8851(21)s [ /Rect [720 7532 8346 7787] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTprecedence /ANN pdfmark 720 7622(2.5.)m 1184(Precedence)s 2328(and)s 2732(associati)s 6(vity)k 3974(of)s 4245(symbols)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 7619 9066 7784] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTprecedence /ANN pdfmark 8842(23)s [ /Rect [720 7187 8346 7441] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTsize /ANN pdfmark 720 7277(2.6.)m 1184(The)s 1612(style)s 2119(and)s 2523(size)s 2950(of)s 3221(objects)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 7277 9066 7439] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTsize /ANN pdfmark 8832(24)s [ /Rect [720 6842 8346 7095] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtargets /ANN pdfmark 720 6932(2.7.)m 1184(Galle)s 3(ys)k 1962(and)s 2366(tar)s 4(gets)k 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 6931 9066 7094] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtargets /ANN pdfmark 8838(27)s [ /Rect [720 6497 8346 6750] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTsorted /ANN pdfmark 720 6587(2.8.)m 1184(Sorted)s 1866(g)s 1(alle)k 3(ys)k 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 6584 9066 6749] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTsorted /ANN pdfmark 8842(33)s [ /Rect [720 6152 8346 6405] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThorizontal /ANN pdfmark 720 6242(2.9.)m 1184(Horizontal)s 2261(g)s 1(alle)k 3(ys)k 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 6239 9066 6404] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThorizontal /ANN pdfmark 8832(34)s [ /Rect [720 5807 8346 6061] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUToptimal /ANN pdfmark 720 5897(2.10.)m 1304(Optimal)s 2142(g)s 1(alle)k 3(y)k 2776(breaking)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8833 5894 9066 6061] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUToptimal /ANN pdfmark 8833(36)s [ /Rect [0 5179 8346 5433] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTsymbols /ANN pdfmark 240 fnt5 0 5268(Chapter)m 908(3)s 240 fnt1 1021 5269(.)m 240 fnt5 1185 5268(Pr)m 4(ede\207ned)k 2338(symbols)s 240 fnt1 3426 5269(..)m 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 5266 9066 5431] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTsymbols /ANN pdfmark 8838(37)s [ /Rect [720 4834 8346 5087] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbegin /ANN pdfmark 720 4924(3.1.)m 1184(@Be)s 3(gin)k 2031(and)s 2435(@End)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 4921 9066 5086] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbegin /ANN pdfmark 8838(37)s [ /Rect [720 4489 8346 4742] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTconcatenation /ANN pdfmark 720 4579(3.2.)m 1184(Concatenation)s 2623(symbols)s 3472(and)s 3876(paragraphs)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 4576 9066 4741] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTconcatenation /ANN pdfmark 8838(37)s [ /Rect [720 4144 8346 4397] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTfont /ANN pdfmark 720 4234(3.3.)m 1184(@F)s 3(ont,)k 1948(@Char)s 9(,)k 2732(and)s 3136(@F)s 3(ontDef)k 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 4234 9066 4396] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTfont /ANN pdfmark 8851(41)s [ /Rect [720 3799 8346 4052] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbreak /ANN pdfmark 720 3889(3.4.)m 1184(@Break)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 3889 9066 4051] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbreak /ANN pdfmark 8832(44)s [ /Rect [720 3454 8346 3709] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTspace /ANN pdfmark 720 3544(3.5.)m 1184(@Space)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8833 3541 9066 3708] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTspace /ANN pdfmark 8833(46)s [ /Rect [720 3109 8346 3363] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTyunit /ANN pdfmark 720 3199(3.6.)m 1184(@YUnit,)s 2110(@ZUnit,)s 3009(@CurrYUnit,)s 4373(and)s 4777(@CurrZUnit)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 3198 9066 3361] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTyunit /ANN pdfmark 8838(47)s [ /Rect [720 2764 8346 3017] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcont /ANN pdfmark 720 2854(3.7.)m 1184(@SetConte)s 3(xt)k 2525(and)s 2929(@GetConte)s 3(xt)k 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 2853 9066 3016] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcont /ANN pdfmark 8838(47)s [ /Rect [720 2419 8346 2672] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcolour /ANN pdfmark 720 2509(3.8.)m 1184(@SetColour)s 2435(and)s 2839(@SetColor)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 2506 9066 2671] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcolour /ANN pdfmark 8839(48)s [ /Rect [720 2074 8346 2327] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTunderline_colour /ANN pdfmark 720 2164(3.9.)m 1184(@SetUnderlineColour)s 3391(and)s 3795(@SetUnderlineColor)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 2159 9066 2326] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTunderline_colour /ANN pdfmark 8835(49)s [ /Rect [720 1729 8346 1984] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtexture /ANN pdfmark 720 1819(3.10.)m 1304(@SetT)s 16(e)k 3(xture)k 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8831 1816 9066 1984] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtexture /ANN pdfmark 8831(50)s [ /Rect [720 1384 8346 1639] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUToutline /ANN pdfmark 720 1474(3.11.)m 1304(@Outline)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 1471 9066 1639] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUToutline /ANN pdfmark 8851(51)s [ /Rect [720 1039 8346 1294] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTlanguage /ANN pdfmark 720 1129(3.12.)m 1304(@Language)s 2525(and)s 2929(@CurrLang)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 1126 9066 1294] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTlanguage /ANN pdfmark 8851(51)s [ /Rect [720 694 8346 949] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTonerow /ANN pdfmark 720 784(3.13.)m 1304(@OneCol)s 2325(and)s 2729(@OneRo)s 6(w)k 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 781 9066 949] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTonerow /ANN pdfmark 8832(52)s [ /Rect [720 349 8346 604] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTwide /ANN pdfmark 720 439(3.14.)m 1304(@W)s 9(ide)k 2090(and)s 2494(@High)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 436 9066 604] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTwide /ANN pdfmark 8842(53)s [ /Rect [720 4 8346 259] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThshift /ANN pdfmark 720 94(3.15.)m 1304(@HShift)s 2222(and)s 2626(@VShift)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 91 9066 259] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThshift /ANN pdfmark 8842(53)s grestore gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: iv 4 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14832 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13415 0 13415 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore [ /Rect [720 13127 8346 13382] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThexpand /ANN pdfmark 720 13217(3.16.)m 1304(@HExpand)s 2488(and)s 2892(@VExpand)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 13214 9066 13382] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThexpand /ANN pdfmark 8832(54)s [ /Rect [720 12782 8346 13037] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThcontract /ANN pdfmark 720 12872(3.17.)m 1304(@HContract)s 2581(and)s 2985(@VContract)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 12869 9066 13037] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThcontract /ANN pdfmark 8832(54)s [ /Rect [720 12437 8346 12692] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThlimited /ANN pdfmark 720 12527(3.18.)m 1304(@HLimited)s 2512(and)s 2916(@VLimited)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 12524 9066 12692] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThlimited /ANN pdfmark 8832(54)s [ /Rect [720 12092 8346 12347] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThadjust /ANN pdfmark 720 12182(3.19.)m 1304(@HAdjust,)s 2443(@V)s 32(Adjust,)k 3550(and)s 3954(@P)s 22(Adjust)k 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 12179 9066 12347] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThadjust /ANN pdfmark 8840(55)s [ /Rect [720 11747 8346 12002] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThscale /ANN pdfmark 720 11837(3.20.)m 1304(@HScale)s 2271(and)s 2675(@VScale)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 11834 9066 12002] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThscale /ANN pdfmark 8840(55)s [ /Rect [720 11402 8346 11657] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThmirror /ANN pdfmark 720 11492(3.21.)m 1304(@HMirror)s 2394(and)s 2798(@VMirror)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 11489 9066 11657] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThmirror /ANN pdfmark 8840(55)s [ /Rect [720 11057 8346 11312] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThcover /ANN pdfmark 720 11147(3.22.)m 1304(@HCo)s 3(v)k 3(er)k 2337(and)s 2741(@VCo)s 3(v)k 3(er)k 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8833 11144 9066 11312] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThcover /ANN pdfmark 8833(56)s [ /Rect [720 10712 8346 10967] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThspan /ANN pdfmark 720 10802(3.23.)m 1304(@StartHSpan,@StartVSpan,)s 4117(@StartHVSpan,)s 5720(@HSpan,)s 6700(and)s 7104(@VSpan)s 8242(..)s [ /Rect [8838 10799 9066 10967] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUThspan /ANN pdfmark 8838(57)s [ /Rect [720 10367 8346 10622] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTscale /ANN pdfmark 720 10457(3.24.)m 1304(@Scale)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 10454 9066 10622] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTscale /ANN pdfmark 8839(58)s [ /Rect [720 10022 8346 10277] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTrotate /ANN pdfmark 720 10112(3.25.)m 1304(@Rotate)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 10109 9066 10277] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTrotate /ANN pdfmark 8839(58)s [ /Rect [720 9677 8346 9932] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbackground /ANN pdfmark 720 9767(3.26.)m 1304(@Background)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 9762 9066 9932] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbackground /ANN pdfmark 8835(59)s [ /Rect [720 9332 8346 9587] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkernshrink /ANN pdfmark 720 9422(3.27.)m 1304(@K)s 6(ernShrink)k 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 9417 9066 9587] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkernshrink /ANN pdfmark 8835(59)s [ /Rect [720 8987 8346 9241] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTrump /ANN pdfmark 720 9077(3.28.)m 1304(@Common,)s 2524(@Rump,)s 3438(and)s 3842(@Meld)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8831 9074 9066 9241] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTrump /ANN pdfmark 8831(60)s [ /Rect [720 8642 8346 8896] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTinsert /ANN pdfmark 720 8732(3.29.)m 1304(@Insert)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 8729 9066 8896] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTinsert /ANN pdfmark 8851(61)s [ /Rect [720 8297 8346 8551] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUToneof /ANN pdfmark 720 8387(3.30.)m 1304(@OneOf)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 8384 9066 8551] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUToneof /ANN pdfmark 8832(62)s [ /Rect [720 7952 8346 8206] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnext /ANN pdfmark 720 8042(3.31.)m 1304(@Ne)s 3(xt)k 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 8039 9066 8206] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnext /ANN pdfmark 8842(63)s [ /Rect [720 7607 8346 7861] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcase /ANN pdfmark 720 7697(3.32.)m 1304(@Case)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 7694 9066 7861] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcase /ANN pdfmark 8842(63)s [ /Rect [720 7262 8346 7516] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTmoment /ANN pdfmark 720 7352(3.33.)m 1304(@Moment)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 7349 9066 7516] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTmoment /ANN pdfmark 8832(64)s [ /Rect [720 6917 8346 7172] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnull /ANN pdfmark 720 7007(3.34.)m 1304(@Null)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 7004 9066 7172] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnull /ANN pdfmark 8840(65)s [ /Rect [720 6572 8346 6827] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTgalley /ANN pdfmark 720 6662(3.35.)m 1304(@Galle)s 3(y)k 2213(and)s 2617(@F)s 3(orceGalle)k 3(y)k 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 6659 9066 6827] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTgalley /ANN pdfmark 8840(65)s [ /Rect [720 5939 8346 6481] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTheader_comp /ANN pdfmark 720 6317(3.36.)m 1304(@Be)s 3(ginHeaderComponent,)k 4041(@EndHeaderComponent,)s 6596(@SetHeaderCom-)s 1304 6029(ponent,)m 2063(and)s 2467(@ClearHeaderComponent)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 6026 9066 6194] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTheader_comp /ANN pdfmark 8840(65)s [ /Rect [720 5594 8346 5848] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnotrevealed /ANN pdfmark 720 5684(3.37.)m 1304(@NotRe)s 6(v)k 3(ealed)k 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 5681 9066 5848] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTnotrevealed /ANN pdfmark 8838(67)s [ /Rect [720 5249 8346 5503] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcrossref /ANN pdfmark 720 5339(3.38.)m 1304(The)s 1732(cross)s 2274(reference)s 3217(symbols)s 4066(&&)s 4492(and)s 4896(&&&)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 5336 9066 5503] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTcrossref /ANN pdfmark 8839(68)s [ /Rect [720 4904 8346 5158] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtagged /ANN pdfmark 720 4994(3.39.)m 1304(@T)s 19(agged)k 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 4991 9066 5158] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtagged /ANN pdfmark 8839(68)s [ /Rect [720 4559 8346 4813] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTopen /ANN pdfmark 720 4649(3.40.)m 1304(@Open and @Use)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 4644 9066 4813] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTopen /ANN pdfmark 8835(69)s [ /Rect [720 4214 8346 4468] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTlink_source /ANN pdfmark 720 4304(3.41.)m 1304(@LinkSource,)s 2748(@LinkDest,)s 3966(and)s 4370(@URLLink)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 4299 9066 4468] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTlink_source /ANN pdfmark 8835(69)s [ /Rect [720 3869 8346 4122] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTdatabase /ANN pdfmark 720 3959(3.42.)m 1304(@Database and @SysDatabase)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 3958 9066 4121] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTdatabase /ANN pdfmark 8851(71)s [ /Rect [720 3524 8346 3777] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTgraphic /ANN pdfmark 720 3614(3.43.)m 1304(@Graphic)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 3613 9066 3776] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTgraphic /ANN pdfmark 8851(71)s [ /Rect [720 3179 8346 3434] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTplaingraphic /ANN pdfmark 720 3269(3.44.)m 1304(@PlainGraphic)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 3266 9066 3434] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTplaingraphic /ANN pdfmark 8840(75)s [ /Rect [720 2834 8346 3089] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTincludegraphic /ANN pdfmark 720 2924(3.45.)m 1304(@IncludeGraphic)s 3065(and)s 3469(@SysIncludeGraphic)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8840 2921 9066 3089] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTincludegraphic /ANN pdfmark 8840(75)s [ /Rect [720 2489 8346 2743] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTincludegraphicrepeated /ANN pdfmark 720 2579(3.46.)m 1304(@IncludeGraphicRepeated)s 3960(and)s 4364(@SysIncludeGraphicRepeated)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8833 2576 9066 2743] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTincludegraphicrepeated /ANN pdfmark 8833(76)s [ /Rect [720 2144 8346 2398] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTprependgraphic /ANN pdfmark 720 2234(3.47.)m 1304(@PrependGraphic and @SysPrependGraphic)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8833 2231 9066 2398] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTprependgraphic /ANN pdfmark 8833(76)s [ /Rect [720 1799 8346 2052] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTinclude /ANN pdfmark 720 1889(3.48.)m 1304(@Include and @SysInclude)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 1888 9066 2047] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTinclude /ANN pdfmark 8838(77)s [ /Rect [720 1454 8346 1707] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbackend /ANN pdfmark 720 1544(3.49.)m 1304(@BackEnd)s 2461(and)s 2865(the)s 3213(PlainT)s 16(e)k 3(xt)k 4183(and)s 4587(PDF)s 5084(back)s 5597(ends)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 1543 9066 1702] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbackend /ANN pdfmark 8838(77)s [ /Rect [720 1109 8346 1364] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTverbatim /ANN pdfmark 720 1199(3.50.)m 1304(@V)s 26(erbatim and @Ra)k 3(wV)k 26(erbatim)k 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8839 1196 9066 1361] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTverbatim /ANN pdfmark 8839(78)s [ /Rect [720 764 8346 1019] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTunderline /ANN pdfmark 720 854(3.51.)m 1304(@Underline)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 849 9066 1016] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTunderline /ANN pdfmark 8835(79)s [ /Rect [720 419 8346 674] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTpagelabel /ANN pdfmark 720 509(3.52.)m 1304(@P)s 3(ageLabel)k 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8835 504 9066 671] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTpagelabel /ANN pdfmark 8835(79)s grestore gsave 1417 -14832 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore 0.0 0.0 0.0 LoutSetRGBColor 1417 -15420(i)m 6(v)k grestore grestore grestore pgsave restore showpage %%Page: v 5 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14887 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13470 0 13470 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore [ /Rect [0 13216 8346 13470] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTexamples /ANN pdfmark 240 fnt5 0 13305(Chapter)m 908(4)s 240 fnt1 1022 13306(.)m 240 fnt5 1186 13305(Examples)m 240 fnt1 2738 13306(..)m 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 13303 9066 13468] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTexamples /ANN pdfmark 8851(81)s [ /Rect [720 12871 8346 13124] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTeq /ANN pdfmark 720 12961(4.1.)m 1184(An)s 1534(equation)s 2415(formatting)s 3476(package)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8851 12958 9066 13123] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTeq /ANN pdfmark 8851(81)s [ /Rect [720 12526 8346 12779] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTparas /ANN pdfmark 720 12616(4.2.)m 1184(P)s 3(aragraphs,)k 2350(displays,)s 3241(and)s 3645(lists)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8842 12613 9066 12778] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTparas /ANN pdfmark 8842(83)s [ /Rect [720 12181 8346 12434] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTpagelayout /ANN pdfmark 720 12271(4.3.)m 1184(P)s 3(age)k 1702(layout)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 12268 9066 12433] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTpagelayout /ANN pdfmark 8838(87)s [ /Rect [720 11836 8346 12089] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTchapters /ANN pdfmark 720 11926(4.4.)m 1184(Chapters)s 2085(and)s 2489(sections)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8832 11921 9066 12088] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTchapters /ANN pdfmark 8832(92)s [ /Rect [720 11491 8346 11746] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbiblio /ANN pdfmark 720 11581(4.5.)m 1184(Bibliographies)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8838 11576 9066 11743] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTbiblio /ANN pdfmark 8838(97)s [ /Rect [720 11146 8346 11400] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTexa_inde /ANN pdfmark 720 11236(4.6.)m 1184(Mer)s 4(ged)k 1982(inde)s 3(x)k 2566(entries)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8731 11233 9066 11398] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTexa_inde /ANN pdfmark 8731(101)s [ /Rect [0 10517 8346 10772] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtex /ANN pdfmark 240 fnt5 0 10606(A)m 6(ppendix)k 1048(A)s 240 fnt1 1214 10607(.)m 240 fnt5 1378 10606(Implementation)m 3066(of)s 3338(T)s 22(extur)k 4(es)k 240 fnt1 4458 10607(..)m 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8720 10604 9066 10772] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTtex /ANN pdfmark 8720(105)s [ /Rect [0 9889 8346 10143] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT20_530_all_1 /ANN pdfmark 240 fnt5 0 9978(Refer)m 4(ences)k 240 fnt1 1362 9979(..)m 1706(..)s 2050(..)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8711 9976 9066 10141] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT20_530_all_1 /ANN pdfmark 8711(110)s [ /Rect [0 9263 8346 9515] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT20_587_all_1 /ANN pdfmark 240 fnt5 0 9352(Index)m 240 fnt1 1018 9353(..)m 1362(..)s 1706(..)s 2050(..)s 2394(..)s 2738(..)s 3082(..)s 3426(..)s 3770(..)s 4114(..)s 4458(..)s 4802(..)s 5146(..)s 5490(..)s 5834(..)s 6178(..)s 6522(..)s 6866(..)s 7210(..)s 7554(..)s 7898(..)s 8242(..)s [ /Rect [8731 9353 9066 9515] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT20_587_all_1 /ANN pdfmark 8731(111)s grestore gsave 1417 -14887 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore 0.0 0.0 0.0 LoutSetRGBColor 10368 -15420(v)m grestore grestore grestore pgsave restore showpage %%Page: vi 6 %%BeginPageSetup %%PageResources: font Times-Roman /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 14006 0 14006 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore gsave 1417 -15423 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 1 7 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -1417 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore gsave 1417 -14867 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13450 0 13450 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 fnt5 0 12399(Chapter)m 1819(1.)s 2400(Principles)s [ /Dest /LOUTprinciples /DEST pdfmark 240 fnt1 0 11448(The)m 414(Lout)s 911(document)s 1900(formatting)s 2946(language)s 3852(is)s 4047(based)s 4635(on)s 4917(just)s 5307(four)s 5751(k)s 2(e)k 3(y)k 6131(ideas:)s 6713(objects,)s 7482(de\207nitions,)s 8584(cross)s 0 11160(references,)m 1087(and)s 1491(g)s 1(alle)k 3(ys.)k 2328(This)s 2804(chapter)s 3567(concentrates)s 4812(on)s 5109(them,)s 5694(postponing)s 6812(the)s 7160(ine)s 6(vitable)k 8152(details.)s 240 fnt5 0 10367(1.1.)m 471(Objects)s [ /Dest /LOUTobjects /DEST pdfmark 240 fnt1 480 9891(Since)m 1075(our)s 1462(aim)s 1888(is)s 2106(to)s 2354(produce)s 3189(neatly)s 3835(formatted)s 4829(documents,)s 5981(we)s 6325(should)s 7030(be)s 3(gin)k 7624(by)s 7926(looking)s 8719(at)s 8960(a)s 0 9603(typical)m 705(e)s 3(xample)k 1568(of)s 1839(such)s 2335(a)s 2501(document:)s 1927 2494 0 2494 240 288 60 480 6769 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt5 560 1987(PURCELL)m 128 fnt1 1316 2059(1)m 160 fnt1 170 1695(In)m 395(the)s 681(w)s 1(orld)k 1145(of)s 1381(music)s 170 1515(England)m 882(is)s 1163(supposed)s 170 1335(to)m 376(be)s 611(a)s 768(mere)s 1171(pro)s 2(vince.)k 170 1155(If)m 465(she)s 856(produces)s 1608(an)s 170 975(indif)m 4(ferent)k 1136(composer)s 567 0 0 0 160 180 40 170 763 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 128 fnt1 170 624(1)m 160 fnt1 221 552(Blom,)m 703(Eric.)s 160 fnt6 1133 553(Some)m 170 373(Gr)m 5(eat)k 734(Composer)s 1(s.)k 160 fnt1 170 192(Oxford,)m 703(1944.)s grestore 1927 2494 0 2494 240 288 60 480 4275 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt1 170 2161(or)m 453(performer)s 6(,)k 1267(that)s 1657(is)s 170 1981(re)m 2(garded)k 862(else)s 4(where)k 1630(as)s 170 1801(perfectly)m 905(normal)s 1527(and)s 170 1621(natural;)m 762(b)s 3(ut)k 1078(if)s 1298(foreign)s 170 1441(students)m 905(of)s 1264(musical)s 170 1261(history)m 976(ha)s 3(v)k 2(e)k 1637(to)s 170 1081(ackno)m 4(wledge)k 1130(a)s 1326(British)s 170 901(musical)m 795(genius,)s 1376(he)s 1657(is)s 170 721(considered)m 901(a)s 1012(freak.)s 490 488(Such)m 957(a)s 1178(freak)s 1657(is)s 170 308(Henry)m 607(Purcell.)s 1170(Y)s 16(et)k 1426(if)s 1574(we)s grestore 1927 2494 0 2494 240 288 60 480 1781 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt1 170 2161(mak)m 1(e)k 565(a)s 690(choice)s 1157(of)s 1352(\207fteen)s 170 1981(of)m 407(the)s 695(w)s 1(orld')k 8(s)k 1264(musical)s 170 1801(classics,)m 740(as)s 918(here,)s 1276(we)s 1510(\207nd)s 170 1621(that)m 464(we)s 703(cannot)s 1185(omit)s 1533(this)s 170 1441(English)m 695(master)s 8(.)k grestore 0 1330(It)m 229(is)s 463(a)s 653(lar)s 4(ge)k 1206(rectangle)s 2161(made)s 2759(from)s 3307(three)s 3864(smaller)s 4651(rectangles)s 5694(\211)s 5898(its)s 6198(pages.)s 6931(Each)s 7490(page)s 8022(is)s 8256(made)s 8855(of)s 0 1042(lines;)m 578(each)s 1088(line)s 1517(is)s 1743(made)s 2332(of)s 2618(w)s 2(ords,)k 3324(although)s 4234(it)s 4441(mak)s 2(es)k 5117(sense)s 5706(for)s 6059(an)s 3(y)k 6472(rectangle)s 7418(\(e)s 6(v)k 3(en)k 8012(a)s 8194(complete)s 0 754(document\))m 1072(to)s 1311(be)s 1593(part)s 2024(of)s 2295(a)s 2461(line,)s 2926(pro)s 3(vided)k 3832(it)s 4024(is)s 4234(not)s 4600(too)s 4959(lar)s 4(ge.)k 480 380(Lout)m 995(deals)s 1541(with)s 2027(something)s 3081(a)s 3251(little)s 3747(more)s 4298(complicated)s 5528(than)s 6001(rectangles:)s 240 fnt6 7079 382(objects.)m 240 fnt1 7914 380(An)m 8268(object)s [ /Dest /LOUT19_4605_pri_obje_1 /DEST pdfmark 8916(is)s 0 92(a)m 176(rectangle)s 1118(with)s 1611(at)s 1854(least)s 2362(one)s 240 fnt6 2775 94(column)m 3545(mark)s [ /Dest /LOUT19_4605_pri_obje_2 /DEST pdfmark [ /Dest /LOUT19_4605_pri_obje_3 /DEST pdfmark 240 fnt1 4112 92(protruding)m 5186(abo)s 3(v)k 3(e)k 5819(and)s 6234(belo)s 6(w)k 6878(it,)s 7128(and)s 7543(at)s 7786(least)s 8294(one)s 240 fnt6 8707 94(r)m 10(ow)k grestore gsave 1417 -14867 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5907 -15423(1)m grestore grestore grestore pgsave restore showpage %%Page: 2 8 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(2)m 240 fnt6 8382 -1580(Chapter)m 9232(1.)s 9506(Principles)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13257 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 240 fnt6 0 13205(mark)m [ /Dest /LOUT19_4605_pri_obje_4 /DEST pdfmark 240 fnt1 557 13203(protruding)m 1621(to)s 1861(the)s 2211(left)s 2589(and)s 2994(right.)s 3611(The)s 4040(simplest)s 4897(objects)s 5627(contain)s 6389(w)s 2(ords)k 7024(lik)s 2(e)k 7438(metempsychosis,)s 0 12915(and)m 404(ha)s 4(v)k 3(e)k 905(one)s 1307(mark)s 1859(of)s 2130(each)s 2625(type:)s 1572 215 0 106 240 288 60 480 12360 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1572 215 0 106 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1572 215 0 106 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 52(metempsychosis)m grestore grestore end end restore grestore 0 11909(The)m 441(rectangle)s 1386(e)s 3(xactly)k 2141(encloses)s 3016(the)s 3377(w)s 2(ord;)k 3993(its)s 4283(column)s 5072(mark)s 5637(is)s 5861(at)s 6107(the)s 6469(left)s 6859(edge,)s 7432(and)s 7850(its)s 8140(ro)s 6(w)k 8574(mark)s 0 11621(passes)m 668(through)s 1477(the)s 1831(middle)s 2558(of)s 2835(the)s 3190(lo)s 6(wer)k 4(-case)k 4276(letters.)s 5029(The)s 5463(rectangle)s 6401(and)s 6811(marks)s 7453(do)s 7752(not)s 8125(appear)s 8829(on)s 0 11333(the)m 348(printed)s 1083(page,)s 1642(b)s 4(ut)k 2004(to)s 2243(understand)s 3351(what)s 3876(Lout)s 4388(is)s 4598(doing)s 5197(you)s 5612(ha)s 4(v)k 3(e)k 6113(to)s 6352(imagine)s 7178(them.)s 480 10959(T)m 19(o)k 782(place)s 1344(tw)s 2(o)k 1756(objects)s 2487(side)s 2930(by)s 3226(side,)s 3721(we)s 4058(separate)s 4898(them)s 5438(by)s 5735(the)s 6085(symbol)s 220 fnt2 6847 10956(|,)m 240 fnt1 7009 10959(which)m 7653(denotes)s 8437(the)s 8788(act)s 0 10671(of)m 240 fnt6 271 10673(horizontal)m 1315(concatenation)s 240 fnt1 2665 10671(.)m 2829(So,)s 3189(if)s 3406(we)s 3741(write)s 220 fnt2 480 10189(USA | A)m 6(ustr)k 2(alia)k 240 fnt1 0 9734(the)m 348(result)s 938(will)s 1364(be)s 1646(the)s 1994(object)s 476 165 0 57 240 288 60 480 9228 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 476 165 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 476 165 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(USA)m grestore grestore end end restore grestore 875 165 0 56 240 288 60 956 9229 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 875 165 0 56 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 875 165 0 56 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 2(Australia)m grestore grestore end end restore grestore 0 8777(Notice)m 718(that)s 1162(this)s 1583(object)s 2253(has)s 2648(tw)s 2(o)k 3084(column)s 3884(marks,)s 4601(b)s 4(ut)k 4988(still)s 5426(only)s 5931(one)s 6359(ro)s 6(w)k 6804(mark,)s 7428(because)s 220 fnt2 8266 8774(|)m 240 fnt1 8389 8777(mer)m 4(ges)k 0 8489(the)m 382(tw)s 2(o)k 827(ro)s 6(w)k 1282(marks)s 1952(together)s 13(.)k 2921(This)s 3431(mer)s 4(ging)k 4312(of)s 4618(ro)s 6(w)k 5073(marks)s 5743(\207x)s 3(es)k 6277(the)s 6660(v)s 3(ertical)k 7462(position)s 8325(of)s 8631(each)s 0 8201(object)m 647(with)s 1133(respect)s 1873(to)s 2115(the)s 2467(other)s 9(,)k 3060(b)s 4(ut)k 3425(it)s 3621(does)s 4115(not)s 4485(determine)s 5499(ho)s 6(w)k 5964(f)s 2(ar)k 6290(apart)s 6830(the)s 3(y)k 7297(are.)s 7756(This)s 8236(distance,)s 0 7913(or)m 240 fnt6 276 7915(gap)m 240 fnt1 629 7913(,)m 753(may)s 1236(be)s 1536(gi)s 6(v)k 3(en)k 2133(just)s 2555(after)s 3069(the)s 3434(symbol,)s 4263(as)s 4531(in)s 220 fnt2 4791 7910(|0.5i)m 240 fnt1 5264 7913(for)m 5620(e)s 3(xample,)k 6551(which)s 7210(speci\207es)s 8102(horizontal)s 0 7625(concatenation)m 1385(with)s 1867(a)s 2033(g)s 1(ap)k 2431(of)s 2702(half)s 3145(an)s 3428(inch.)s 4004(If)s 4234(no)s 4527(g)s 1(ap)k 4925(is)s 5135(gi)s 6(v)k 3(en,)k 5765(it)s 5957(is)s 6167(assumed)s 7049(to)s 7288(be)s 220 fnt2 7570 7622(0i)m 240 fnt1 7726 7625(.)m 240 fnt6 480 7253(V)m 26(ertical)k 1283(concatenation)s 240 fnt1 2633 7251(,)m 2740(denoted)s 3556(by)s 220 fnt2 3850 7248(/)m 240 fnt1 3914 7251(,)m 4021(is)s 4231(the)s 4579(same)s 5126(apart)s 5663(from)s 6187(the)s 6535(change)s 7269(of)s 7540(direction:)s 220 fnt2 480 6750(A)m 6(ustr)k 2(alia /0.1i USA)k 240 fnt1 0 6295(has)m 370(result)s 875 165 0 56 240 288 60 480 5840 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 875 165 0 56 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 875 165 0 56 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 2(Australia)m grestore grestore end end restore grestore 476 165 0 57 240 288 60 480 5531 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 476 165 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 476 165 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(USA)m grestore grestore end end restore grestore 0 5080(The)m 485(usual)s 1102(mer)s 4(ging)k 2005(of)s 2333(marks)s 3026(occurs,)s 3814(and)s 4275(no)s 6(w)k 4793(the)s 5199(g)s 1(ap)k 5654(determines)s 6810(the)s 7215(v)s 3(ertical)k 8040(separation.)s 0 4792(Horizontal)m 1077(and)s 1481(v)s 3(ertical)k 2248(can)s 2637(be)s 2919(combined:)s 220 fnt2 1000 4340(USA)m 2256(|0.2i)s 2772(A)s 6(ustr)k 2(alia)k 480 4052(/0.1i)m 1000(W)s 8(ashington)k 2256(|)s 2772(Canberr)s 2(a)k 240 fnt1 0 3553(has)m 370(result)s 476 165 0 57 240 288 60 480 3097 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 476 165 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 476 165 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(USA)m grestore grestore end end restore grestore 659 166 0 57 240 288 60 956 3097 LoutGr2 0 ymark moveto xsize 10 pt add ymark lineto [ 3 pt ] 0 setdash stroke grestore grestore 875 165 0 56 240 288 60 1903 3098 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 875 165 0 56 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 875 165 0 56 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 2(Australia)m grestore grestore end end restore grestore 1135 215 0 106 240 288 60 480 2738 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1135 215 0 106 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1135 215 0 106 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 52(W)m 19(ashington)k grestore grestore end end restore grestore 876 166 0 57 240 288 60 1903 2787 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 876 166 0 57 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 876 166 0 57 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 0 3(Canberra)m grestore grestore end end restore grestore [ /Dest /LOUT19_4605_pri_obje_5 /DEST pdfmark 0 2287(There)m 655(are)s 1044(se)s 6(v)k 3(eral)k 1808(things)s 2486(to)s 2768(note)s 3278(carefully)s 4222(here.)s 4839(White)s 5522(space)s 6151(\(including)s 7229(tabs)s 7707(and)s 8154(ne)s 6(wlines\))k 0 1999(adjacent)m 848(to)s 1078(a)s 1236(concatenation)s 2612(symbol)s 3364(is)s 3565(ignored,)s 4395(so)s 4652(it)s 4836(may)s 5293(be)s 5567(used)s 6055(to)s 6286(lay)s 6623(out)s 6981(the)s 7320(e)s 3(xpression)k 8388(clearly)s 15(.)k 0 1711(The)m 425(symbol)s 220 fnt2 1182 1708(|)m 240 fnt1 1275 1711(tak)m 2(es)k 1812(precedence)s 2940(o)s 3(v)k 3(er)k 220 fnt2 3415 1708(/)m 240 fnt1 3479 1711(,)m 3583(which)s 4221(means)s 4880(that)s 5295(the)s 5639(ro)s 6(ws)k 6146(are)s 6490(formed)s 7234(\207rst,)s 7709(then)s 8174(v)s 3(ertically)k 0 1423(concatenated.)m 1420(The)s 1856(symbol)s 220 fnt2 2625 1420(/)m 240 fnt1 2757 1423(will)m 3191(mer)s 4(ge)k 3849(tw)s 2(o)k 4267(or)s 4535(more)s 5090(column)s 5873(marks,)s 6573(creating)s 7403(multiple)s 8264(columns)s 0 1135(\(and)m 220 fnt2 484 1132(|)m 240 fnt1 583 1135(will)m 1011(mer)s 4(ge)k 1662(tw)s 2(o)k 2073(or)s 2334(more)s 2883(ro)s 6(w)k 3305(marks\).)s 4134(This)s 4611(implies)s 5367(that)s 5787(the)s 6137(g)s 1(ap)k 220 fnt2 6536 1132(0.2i)m 240 fnt1 6937 1135(used)m 7436(abo)s 3(v)k 3(e)k 8060(is)s 8272(between)s 0 847(columns,)m 910(not)s 1268(indi)s 6(vidual)k 2278(items)s 2838(in)s 3072(columns;)s 3987(a)s 4144(g)s 1(ap)k 4534(in)s 4768(the)s 5108(second)s 5822(ro)s 6(w)k 6234(w)s 2(ould)k 6880(therefore)s 7789(be)s 8062(redundant,)s 0 559(and)m 404(so)s 670(is)s 880(omitted.)s 480 185(A)m 710(v)s 6(ariant)k 1427(of)s 220 fnt2 1698 182(/)m 240 fnt1 1822 185(called)m 220 fnt2 2450 182(//)m 240 fnt1 2635 185(left-justi\207es)m 3825(tw)s 2(o)k 4235(objects)s 4963(instead)s 5698(of)s 5969(mer)s 4(ging)k 6815(their)s 7312(marks.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 3 9 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(1.1.)m 1871(Objects)s 240 fnt5 10370 -1583(3)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13205(By)m 840(enclosing)s 1836(an)s 2145(object)s 2815(in)s 3085(braces,)s 3828(it)s 4046(is)s 4282(possible)s 5148(to)s 5414(o)s 3(v)k 3(erride)k 6286(the)s [ /Dest /LOUT19_4605_pri_obje_6 /DEST pdfmark 6660(set)s 7011(precedences.)s 8369(Here)s 8916(is)s 0 12917(another)m 777(e)s 3(xpression)k 1854(for)s 2192(the)s 2540(table)s 3060(abo)s 3(v)k 3(e,)k 3733(in)s 3976(which)s 4618(the)s 4966(columns)s 5828(are)s 6175(formed)s 6923(\207rst:)s 220 fnt2 996 12416({ USA)m 2089(/0.1i)s 2609(W)s 8(ashington })k 480 12128(|0.2i)m 996({ A)s 6(ustr)k 2(alia)k 2089(/)s 2609(Canberr)s 2(a })k 240 fnt1 0 11634(Braces)m 701(ha)s 4(v)k 3(e)k 1202(no)s 1495(ef)s 6(fect)k 2091(other)s 2642(than)s 3111(to)s 3350(alter)s 3833(the)s 4181(grouping.)s 240 fnt6 480 11262(P)m 19(ar)k 3(a)k 2(gr)k 3(aph)k 1569(br)s 8(eaking)k 240 fnt1 2476 11260(occurs)m 3160(when)s 3746(an)s 4038(object)s 4692(is)s 4911(too)s 5280(wide)s 5810(to)s 6059(\207t)s [ /Dest /LOUT19_4605_pri_obje_7 /DEST pdfmark 6327(into)s 6762(the)s 7119(space)s 7716(a)s 4(v)k 6(ailable)k 8633(to)s 8882(it;)s 0 10972(by)m 286(breaking)s 1168(its)s 1436(paragraphs)s 2527(into)s 2944(lines,)s 3494(its)s 3762(width)s 4355(is)s 4557(reduced)s 5364(to)s 5595(an)s 5869(acceptable)s 6925(amount.)s 7799(The)s 8218(a)s 4(v)k 6(ailable)k 0 10684(space)m 587(is)s 797(determined)s 1930(by)s 2224(the)s 220 fnt2 2572 10681(@Wide)m 240 fnt1 3346 10684(symbol,)m 4158(whose)s 4826(form)s 5350(is)s 240 fnt6 480 10181(length)m 220 fnt2 1193 10176(@Wide)m 240 fnt6 2027 10181(object)m 240 fnt1 0 9680(and)m 404(whose)s 1072(result)s 1662(is)s 1872(the)s 2220(gi)s 6(v)k 3(en)k 2800(object)s 3444(modi\207ed)s 4353(to)s 4592(ha)s 4(v)k 3(e)k 5093(e)s 3(xactly)k 5834(the)s 6182(gi)s 6(v)k 3(en)k 6762(length.)s 7524(F)s 3(or)k 7913(e)s 3(xample,)k 220 fnt2 480 9179(5i @Wide {)m 480 8891(Macbeth w)m 3(as v)k 5(er)k -6(y ambitious)k 3(.)k 13( )k 11(This led him to wish to become king of)k 480 8603(Scotland.)m 13( )k 11(The witches told him that this wish of his w)k 2(ould come tr)k -3(ue)k 3(.)k 13( )k 11(The)k 480 8315(king of Scotland at this time w)m 3(as Duncan.)k 13( Encour)k 2(aged b)k 4(y his wif)k 6(e)k 3(, Macbeth)k 480 8027(m)m 2(urdered Duncan.)k 13( He w)k 3(as thus enab)k 4(led to succeed Duncan as king.)k 13( \(51 w)k 2(ords\))k 480 7739(|0.5i)m 480 7451(Encour)m 2(aged b)k 4(y his wif)k 6(e)k 3(, Macbeth achie)k 6(v)k 5(ed his ambition and realiz)k 3(ed the)k 480 7163(prediction of the witches b)m 4(y m)k 2(urder)k -3(ing Duncan and becoming king of Scotland)k 480 6875(in his place)m 3(.)k 13( \(26 w)k 2(ords\))k 480 6587(})m 240 fnt1 0 6093(has)m 370(for)s 708(its)s 984(result)s 1574(the)s 1922(follo)s 6(wing)k 2899(\207v)s 3(e)k 3311(inch)s 3780(wide)s 4301(object)s 4945([)s [ /Rect [5016 6090 5123 6255] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTstrunk1979style /ANN pdfmark 5016(8)s 5123(]:)s 480 5590(Macbeth)m 1356(w)s 2(as)k 1758(v)s 3(ery)k 2216(ambitious.)s 3304(This)s 480 5302(led)m 828(him)s 1257(to)s 1493(wish)s 2000(to)s 2236(become)s 3033(king)s 3509(of)s 480 5014(Scotland.)m 1538(The)s 2023(witches)s 2861(told)s 3348(him)s 480 4726(that)m 922(this)s 1343(wish)s 1876(of)s 2172(his)s 2526(w)s 2(ould)k 3206(come)s 480 4438(true.)m 1025(The)s 1464(king)s 1954(of)s 2235(Scotland)s 3141(at)s 3384(this)s 480 4150(time)m 959(w)s 2(as)k 1379(Duncan.)s 2287(Encouraged)s 3486(by)s 480 3862(his)m 817(wife,)s 1356(Macbeth)s 2257(murdered)s 3239(Dun-)s 480 3574(can.)m 994(He)s 1347(w)s 2(as)k 1787(thus)s 2255(enabled)s 3075(to)s 3333(suc-)s 480 3286(ceed)m 976(Duncan)s 1778(as)s 2028(king.)s 2618(\(51)s 2972(w)s 2(ords\))k 4440 5590(Encouraged)m 5653(by)s 5960(his)s 6302(wife,)s 6846(Macbeth)s 4440 5302(achie)m 6(v)k 3(ed)k 5407(his)s 5806(ambition)s 6782(and)s 7255(real-)s 4440 5014(ized)m 4910(the)s 5272(prediction)s 6312(of)s 6597(the)s 6959(witches)s 4440 4726(by)m 4731(murdering)s 5776(Duncan)s 6574(and)s 6974(becom-)s 4440 4438(ing)m 4818(king)s 5316(of)s 5606(Scotland)s 6520(in)s 6782(his)s 7132(place.)s 4440 4150(\(26)m 4812(w)s 2(ords\))k 0 2783(A)m 232(paragraph)s 1247(of)s 1520(te)s 3(xt)k 1937(can)s 2328(be)s 2612(included)s 3496(an)s 3(ywhere,)k 4533(and)s 4939(it)s 5133(will)s 5561(be)s 5845(brok)s 2(en)k 6567(automatically)s 7923(if)s 8143(necessary)s 0 2495(to)m 239(\207t)s 498(the)s 846(a)s 4(v)k 6(ailable)k 1754(space.)s 2449(The)s 2877(spaces)s 3552(between)s 4406(w)s 2(ords)k 5040(are)s 5387(con)s 9(v)k 3(erted)k 6376(into)s 6801(concatenation)s 8186(symbols.)s 480 2121(These)m 1136(are)s 1512(the)s 1889(most)s 2443(signi\207cant)s 3528(of)s 3828(Lout')s 13(s)k 4519(object-b)s 4(uilding)k 6058(symbols.)s 7049(There)s 7691(are)s 8067(others,)s 8788(for)s 0 1833(changing)m 924(fonts,)s 1501(controlling)s 2596(paragraph)s 3601(breaking,)s 4538(printing)s 5340(graphical)s 6277(objects)s 6997(lik)s 2(e)k 7402(box)s 3(es)k 8001(and)s 8397(circles,)s 0 1545(and)m 404(so)s 670(on,)s 1017(b)s 4(ut)k 1379(the)s 3(y)k 1842(do)s 2135(not)s 2501(add)s 2905(an)s 3(ything)k 3793(ne)s 6(w)k 4240(in)s 4483(principle.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 4 10 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(4)m 240 fnt6 8382 -1580(Chapter)m 9232(1.)s 9506(Principles)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 240 fnt5 0 13203(1.2.)m 471(De\207nitions)s [ /Dest /LOUTdefinitions /DEST pdfmark 240 fnt1 480 12772(The)m 897(features)s 1691(of)s 1950(Lout)s 2451(are)s 2786(v)s 3(ery)k 3250(general.)s 4105(The)s 3(y)k 4637(do)s 4918(not)s 5272(assume)s 6020(that)s 6427(documents)s 7503(are)s 7838(composed)s 8855(of)s 0 12484(pages,)m 637(nor)s 1001(that)s 1403(there)s 1921(are)s 2252(such)s 2733(things)s 3353(as)s 3588(mar)s 4(gins)k 4389(and)s 4778(footnotes,)s 5759(for)s 6082(e)s 3(xample.)k 240 fnt6 7037 12486(De\207nitions)m [ /Dest /LOUT19_4605_pri_defi_1 /DEST pdfmark 240 fnt1 8127 12484(bridge)m 8778(the)s 0 12196(g)m 1(ap)k 397(between)s 1249(Lout')s 13(s)k 1910(general)s 2666(features)s 3470(and)s 3873(the)s 4219(special)s 4935(features)s 5740(\211)s 5918(footnotes,)s 6913(equations,)s 7936(pages)s 8530(\211)s 8708(that)s 0 11908(particular)m 991(documents)s 2097(require.)s 2954(The)s 3(y)k 3515(hold)s 4017(the)s 4382(instr)s 4806(uct)s 5098(ions)s 5566(for)s 5922(producing)s 6963(these)s 7528(special)s 8264(features,)s 0 11620(con)m 9(v)k 3(eniently)k 1278(packaged)s 2240(ready)s 2825(for)s 3163(use.)s 480 11246(F)m 3(or)k 885(e)s 3(xample,)k 1815(consider)s 2701(the)s 3065(challenge)s 4054(posed)s 4687(by)s 4997(`)s 5058(T)s 5154 11198(E)m 5261 11246(X)m 5430(',)s 5632(which)s 6290(is)s 6517(the)s 6881(name)s 7471(of)s 7758(one)s 8176(of)s 8464(Lout')s 13(s)k 0 10958(most)m 525(illustrious)s 1531(ri)s 6(v)k 6(als)k 2100([)s [ /Rect [2171 10955 2284 11122] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTknuth1984tex /ANN pdfmark 2171(6)s 2284(].)s 2527(Lout)s 3039(solv)s 3(es)k 3685(it)s 3877(easily)s 4488(enough,)s 5301(lik)s 2(e)k 5713(this:)s 220 fnt2 480 10457(T{ /0.2f)m 6(o E }X)k 240 fnt1 0 9963(b)m 4(ut)k 373(to)s 624(type)s 1103(this)s 1511(e)s 6(v)k 3(ery)k 2099(time)s 2590(T)s 2686 9915(E)m 2793 9963(X)m 3034(is)s 3256(mentioned)s 4335(w)s 2(ould)k 5002(be)s 5296(tedious)s 6049(and)s 6465(error)s 4(-prone.)k 7724(So)s 8041(we)s 8388(place)s 8960(a)s 0 9675(de\207nition)m 974(at)s 1206(the)s 1554(be)s 3(ginning)k 2562(of)s 2833(the)s 3181(document:)s 220 fnt2 480 9174(def @T)m 26(eX { )k 11(T{ /0.2f)k 6(o E }X })k 240 fnt1 0 8680(No)m 6(w)k 220 fnt2 514 8677(@T)m 26(eX)k 240 fnt1 1169 8680(stands)m 1818(for)s 2156(the)s 2504(object)s 3148(follo)s 6(wing)k 4125(it)s 4317(between)s 5171(braces,)s 5888(and)s 6292(we)s 6627(may)s 7093(write)s 220 fnt2 480 8179(consider)m 1370(the)s 1728(challenge)s 2719(posed)s 3366(b)s 4(y)k 3653(`@T)s 26(eX',)k 4451(\202)s 240 fnt1 0 7680(as)m 250(the)s 598(author)s 1269(did)s 1633(earlier)s 2301(in)s 2544(this)s 2940(paragraph.)s 480 7306(A)m 240 fnt6 706 7308(symbol)m [ /Dest /LOUT19_4605_pri_defi_2 /DEST pdfmark 240 fnt1 1440 7306(is)m 1646(a)s 1808(name,)s 2429(lik)s 2(e)k 220 fnt2 2837 7303(@T)m 26(eX)k 240 fnt1 3432 7306(,)m 3535(which)s 4172(stands)s 4817(for)s 5151(something)s 6197(other)s 6744(than)s 7209(itself.)s 7845(The)s 8269(initial)s 220 fnt2 8875 7303(@)m 240 fnt1 0 7018(is)m 201(not)s 558(compulsory)s 15(,)k 1771(b)s 4(ut)k 2124(it)s 2307(does)s 2788(mak)s 2(e)k 3351(the)s 3690(name)s 4254(stand)s 4808(out)s 5165(clearly)s 15(.)k 5954(A)s 240 fnt6 6175 7020(de\207nition)m 240 fnt1 7124 7018(of)m 7386(a)s 7543(symbol)s 8293(declares)s 0 6730(a)m 164(name)s 736(to)s 973(be)s 1253(a)s 1417(symbol,)s 2227(and)s 2629(says)s 3090(what)s 3613(the)s 3959(symbol)s 4717(stands)s 5364(for)s 13(.)k 5791(The)s 240 fnt6 6217 6732(body)m 240 fnt1 6737 6730(of)m 7006(a)s 7170(de\207nition)s [ /Dest /LOUT19_4605_pri_defi_3 /DEST pdfmark 8142(is)s 8350(the)s 8695(part)s 0 6442(follo)m 6(wing)k 977(the)s 1325(name,)s 1950(between)s 2804(the)s 3152(braces.)s 3926(T)s 19(o)k 240 fnt6 4226 6444(in)m 9(vok)k 2(e)k [ /Dest /LOUT19_4605_pri_defi_4 /DEST pdfmark 240 fnt1 4892 6442(a)m 5058(symbol)s 5818(is)s 6028(to)s 6267(mak)s 2(e)k 6839(use)s 7214(of)s 7485(it.)s 480 6068(Another)m 1324(e)s 3(xpression)k 2401(ripe)s 2828(for)s 3166(packaging)s 4203(in)s 4446(a)s 4612(de\207nition)s 5586(is)s 220 fnt2 480 5567(@OneRo)m 3(w { | -2p @F)k 6(ont n ^/0.5fk 2 })k 240 fnt1 0 5025(which)m 642(produces)s 200 fnt1 1671 5142(n)m 240 fnt1 1557 5025(2)m 1828(\(see)s 2268(Chapter)s 3085(2\).)s 3448(But)s 3854(this)s 4250(time)s 4730(we)s 5065(w)s 2(ould)k 5720(lik)s 2(e)k 6132(to)s 6371(be)s 6653(able)s 7107(to)s 7346(write)s 240 fnt6 480 4522(object)m 220 fnt2 1188 4517(@Super)m 240 fnt6 2116 4522(object)m 240 fnt1 0 3920(so)m 296(that)s 220 fnt2 745 3917(a)m 953(@Super)s 1853(2)s 240 fnt1 2055 3920(w)m 2(ould)k 2741(come)s 3345(out)s 3742(as)s 200 fnt1 4128 4049(2)m 240 fnt1 4022 3920(a)m 4223(,)s 4361(and)s 4796(so)s 5092(on,)s 5470(for)s 5838(in)s 6112(this)s 6538(w)s 2(ay)k 7020(the)s 7398(usefulness)s 8476(of)s 8778(the)s 0 3632(de\207nition)m 974(is)s 1184(greatly)s 1901(increased.)s 2967(Here)s 3487(is)s 3697(ho)s 6(w)k 4158(it)s 4350(is)s 4560(done:)s 220 fnt2 480 3131(def @Super)m 480 2843( left x)m 480 2555( r)m -3(ight y)k 480 2267({ @OneRo)m 3(w { | -2p @F)k 6(ont y ^/0.5fk x })k 480 1979(})m 240 fnt1 0 1485(This)m 492(de\207nition)s 1483(says)s 1963(that)s 220 fnt2 2398 1482(@Super)m 240 fnt1 3283 1485(has)m 3669(tw)s 2(o)k 240 fnt6 4096 1487(par)m 3(ameter)k 2(s)k 240 fnt1 5176 1485(,)m [ /Dest /LOUT19_4605_pri_defi_5 /DEST pdfmark 220 fnt2 5300 1482(x)m 240 fnt1 5485 1485(and)m 220 fnt2 5906 1482(y)m 240 fnt1 6014 1485(.)m 6194(When)s 220 fnt2 6840 1482(@Super)m 240 fnt1 7725 1485(is)m 7952(in)s 9(v)k 4(ok)k 2(ed,)k 8833(all)s 0 1197(occurrences)m 1205(of)s 220 fnt2 1490 1194(x)m 240 fnt1 1671 1197(in)m 1928(the)s 2289(body)s 2837(will)s 3276(be)s 3572(replaced)s 4452(by)s 4760(the)s 5121(object)s 5779(just)s 6197(to)s 6450(the)s 6811(left)s 7202(of)s 220 fnt2 7486 1194(@Super)m 240 fnt1 8294 1197(,)m 8415(and)s 8833(all)s 0 909(occurrences)m 1192(of)s 220 fnt2 1462 906(y)m 240 fnt1 1630 909(will)m 2055(be)s 2337(replaced)s 3203(by)s 3496(the)s 3844(object)s 4487(just)s 4892(to)s 5130(the)s 5477(right.)s 6092(So,)s 6451(for)s 6789(e)s 3(xample,)k 7702(the)s 8049(e)s 3(xpression)k 220 fnt2 480 408(2 @Super { Slope @F)m 6(ont n })k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 5 11 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1579(1.2.)m 1871(De\207nitions)s 240 fnt5 10370 -1582(5)m gsave 1417 -15423 translate 240 fnt1 9066 13369 0 13260 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13206(is)m 210(equal)s 783(to)s 220 fnt2 480 12705(@OneRo)m 3(w { | -2p @F)k 6(ont { Slope @F)k 6(ont n } ^/0.5fk 2 })k 240 fnt1 0 12154(and)m 404(so)s 670(comes)s 1332(out)s 1698(as)s 200 fnt6 2062 12284(n)m 240 fnt1 1948 12154(2)m 2157(.)s 480 11780(Lout)m 994(permits)s 1764(de\207nitions)s 2828(to)s 3070(in)s 9(v)k 4(ok)k 2(e)k 3765(themselv)s 3(es,)k 4934(a)s 5103(peculiarly)s 6115(circular)s 6905(thing)s 7453(to)s 7695(do)s 7991(which)s 8636(goes)s 0 11492(by)m 294(the)s 642(name)s 1216(of)s [ /Dest /LOUT19_4605_pri_defi_6 /DEST pdfmark 240 fnt6 1487 11494(r)m 8(ecur)k 2(sion.)k 240 fnt1 2548 11492(Here)m 3068(is)s 3278(an)s 3561(e)s 3(xample)k 4424(of)s 4695(a)s 4861(recursi)s 6(v)k 3(e)k 5783(de\207nition:)s 220 fnt2 480 10991(def @Leaders { ..)m 13( @Leaders })k 240 fnt1 0 10497(The)m 418(usual)s 968(rule)s 1384(is)s 1584(that)s 1991(the)s 2329(v)s 6(alue)k 2886(of)s 3147(an)s 3420(in)s 9(v)k 4(ocation)k 4463(of)s 4724(a)s 4879(symbol)s 5629(is)s 5828(a)s 5984(cop)s 2(y)k 6492(of)s 6752(the)s 7090(body)s 7613(of)s 7874(the)s 8211(symbol')s 13(s)k 0 10209(de\207nition,)m 1024(so)s 1290(the)s 1638(v)s 6(alue)k 2206(of)s 220 fnt2 2477 10206(@Leaders)m 240 fnt1 3546 10209(must)m 4071(be)s 220 fnt2 480 9727(..)m 13( @Leaders)k 240 fnt1 0 9272(But)m 406(no)s 6(w)k 867(this)s 1263(rule)s 1690(applies)s 2418(to)s 2657(this)s 3053(ne)s 6(w)k 3500(in)s 9(v)k 4(ocation)k 4554(of)s 220 fnt2 4825 9269(@Leaders)m 240 fnt1 5834 9272(;)m 5946(substituting)s 7115(its)s 7391(body)s 7925(gi)s 6(v)k 3(es)k 220 fnt2 480 8771(..)m 13( ..)k 13( @Leaders)k 240 fnt1 0 8316(and)m 408(so)s 679(on)s 980(fore)s 6(v)k 3(er)k 13(.)k 1816(In)s 2076(order)s 2645(to)s 2888(mak)s 2(e)k 3465(this)s 3865(useful,)s 4561(an)s 4848(in)s 9(v)k 4(ocation)k 5907(of)s 6182(a)s 6353(recursi)s 6(v)k 3(e)k 7279(symbol)s 8044(is)s 8259(replaced)s 0 8028(by)m 294(its)s 570(body)s 1104(only)s 1584(if)s 1801(suf\207cient)s 2750(space)s 3337(is)s 3547(a)s 4(v)k 6(ailable.)k 4563(So,)s 4923(for)s 5261(e)s 3(xample,)k 220 fnt2 480 7527(4i @Wide { Chapter 7 @Leaders 62 })m 240 fnt1 0 7031(has)m 370(for)s 708(its)s 984(result)s 1574(the)s 1922(object)s 480 6527(Chapter)m 1297(7)s 1525(..)s 1809(..)s 2093(..)s 2377(..)s 2661(..)s 2945(..)s 3229(..)s 3513(..)s 3797(..)s 4081(..)s 4365(..)s 4649(..)s 4933(..)s 5217(..)s 5501(..)s 5785(62)s 0 6024(with)m 478(Lout)s 985(checking)s 1897(before)s 2558(each)s 3049(replacement)s 4271(of)s 220 fnt2 4537 6021(@Leaders)m 240 fnt1 5601 6024(by)m 220 fnt2 5891 6021(..)m 6177(@Leaders)s 240 fnt1 7241 6024(that)m 7654(the)s 7997(total)s 8471(length)s 0 5736(afterw)m 2(ards,)k 1112(including)s 2069(the)s 2417(other)s 2968(w)s 2(ords,)k 3658(w)s 2(ould)k 4313(not)s 4679(e)s 3(xceed)k 5398(four)s 5856(inches.)s 480 5362(The)m 902(remaining)s 1918(issue)s 2445(is)s 2649(what)s 3168(happens)s 3997(when)s 4567(Lout)s 5072(decides)s 5834(that)s 6246(it)s 6431(is)s 6635(time)s 7109(to)s 7341(stop.)s 7898(The)s 8319(ob)s 3(vious)k 0 5074(thing)m 545(to)s 784(do)s 1077(is)s 1287(to)s 1526(replace)s 2271(the)s 2619(last)s 3010(in)s 9(v)k 4(ocation)k 4064(by)s 4358(an)s 4641(empty)s 5293(object:)s 220 fnt2 480 4576(..)m 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( {})k 240 fnt1 0 4082(As)m 316(the)s 662(e)s 3(xample)k 1524(sho)s 6(ws,)k 2222(this)s 2617(w)s 2(ould)k 3270(lea)s 4(v)k 3(e)k 3822(a)s 3986(small)s 4556(trailing)s 5297(space,)s 5933(which)s 6574(is)s 6782(a)s 6947(major)s 7562(headache.)s 8614(Lout)s 0 3794(\207x)m 3(es)k 517(this)s 930(by)s 1242(replacing)s 2201(the)s 2566(last)s 2975(in)s 9(v)k 4(ocation)k 4046(with)s 4545(a)s 4729(dif)s 6(ferent)k 5621(kind)s 6122(of)s 6411(empty)s 7080(object,)s 7788(called)s 220 fnt2 8434 3791(@Null)m 240 fnt1 9019 3794(,)m 0 3506(whose)m 677(ef)s 6(fect)k 1282(is)s 1501(to)s 1749(mak)s 2(e)k 2330(an)s 2623(adjacent)s 3488(concatenation)s 4882(symbol)s 5651(disappear)s 9(,)k 6674(preferably)s 7718(one)s 8130(preceding)s 0 3218(the)m 220 fnt2 348 3215(@Null)m 240 fnt1 933 3218(.)m 1097(Thus,)s 1683(when)s 2259(Lout)s 2771(replaces)s 220 fnt2 3604 3215(@Leaders)m 240 fnt1 4673 3218(by)m 220 fnt2 4967 3215(@Null)m 240 fnt1 5612 3218(in)m 5855(the)s 6203(e)s 3(xpression)k 220 fnt2 480 2717(..)m 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( ..)k 13( @Leaders)k 240 fnt1 0 2262(the)m 348(trailing)s 1089(space,)s 1727(which)s 2368(is)s 2577(really)s 3174(a)s 3339(horizontal)s 4362(concatenation)s 5747(symbol,)s 6558(disappears)s 7617(as)s 7867(well.)s 8441(This)s 8916(is)s 0 1974(tak)m 2(en)k 573(into)s 998(account)s 1802(when)s 2378(deciding)s 3255(whether)s 4085(there)s 4618(is)s 4828(room)s 5393(to)s 5632(replace)s 220 fnt2 6377 1971(@Leaders)m 240 fnt1 7446 1974(by)m 7740(its)s 8016(body)s 15(.)k 480 1600(The)m 903(remainder)s 1926(of)s 2192(this)s 2583(section)s 3312(is)s 3517(de)s 6(v)k 4(oted)k 4318(to)s 4552(sho)s 6(wing)k 5406(ho)s 6(w)k 5862(de\207nitions)s 6918(may)s 7379(be)s 7656(used)s 8148(to)s 8382(specify)s 0 1312(the)m 240 fnt6 348 1314(pa)m 2(g)k 2(e)k 863(layout)s [ /Dest /LOUT19_4605_pri_defi_7 /DEST pdfmark 240 fnt1 1525 1312(of)m 1796(a)s 1962(document.)s 3070(T)s 19(o)k 3370(be)s 3(gin)k 3956(with,)s 4488(we)s 4823(can)s 5212(de\207ne)s 5853(a)s 6019(page)s 6527(lik)s 2(e)k 6939(this:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 6 12 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(6)m 240 fnt6 8382 -1580(Chapter)m 9232(1.)s 9506(Principles)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(def @P)m 8(age)k 480 12919({)m 480 12631( //1i ||1i)m 480 12343( 6i @Wide 9.5i @High)m 480 12055( { @T)m 26(e)k 6(xtPlace //1r)k -8(t @F)k 6(ootSect })k 480 11767( ||1i //1i)m 480 11479(})m 240 fnt1 0 10985(No)m 6(w)k 220 fnt2 520 10982(@P)m 8(age)k 240 fnt1 1306 10985(is)m 1523(an)s 1813(eight)s 2358(by)s 2659(ele)s 6(v)k 3(en)k 3338(and)s 3749(a)s 3922(half)s 4371(inch)s 4847(object,)s 5545(with)s 6034(one)s 6443(inch)s 6919(mar)s 4(gins,)k 7799(a)s 7972(place)s 8539(at)s 8778(the)s 0 10697(top)m 367(for)s 713(te)s 3(xt,)k 1183(and)s 1595(a)s 1769(section)s 2511(at)s 2751(the)s 3108(bottom)s 3854(for)s 4200(footnotes)s 5149(\(since)s 220 fnt2 5783 10694(//1r)m -8(t)k 240 fnt1 6233 10697(bottom-justi\207es)m 7792(the)s 8149(follo)s 6(wing)k 0 10409(object\).)m 827(It)s 1032(will)s 1458(be)s 1740(con)s 9(v)k 3(enient)k 2838(for)s 3176(us)s 3440(to)s 3679(sho)s 6(w)k 4233(the)s 4581(ef)s 6(fect)k 5177(of)s 5448(in)s 9(v)k 4(oking)k 220 fnt2 6340 10406(@P)m 8(age)k 240 fnt1 7119 10409(lik)m 2(e)k 7531(this:)s 160 fnt2 480 9308(@P)m 6(age)k 220 fnt4 1240 9294(\336)m gsave 1690 7575 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 240 fnt1 0 7124(with)m 482(the)s 830(in)s 9(v)k 4(ok)k 2(ed)k 1645(symbol)s 2405(appearing)s 3401(to)s 3640(the)s 3988(left)s 4365(of)s 4636(the)s 4984(arro)s 6(w)k 15(,)k 5627(and)s 6031(its)s 6307(body)s 6841(to)s 7080(the)s 7428(right.)s 480 6750(The)m 908(de\207nition)s 1882(of)s 2153(a)s 2319(v)s 3(ertical)k 3086(list)s 3437(of)s 3708(pages)s 4304(should)s 5001(come)s 5575(as)s 5825(no)s 6118(surprise:)s 220 fnt2 480 6249(def @P)m 8(ageList)k 480 5961({)m 480 5673( @P)m 8(age // @P)k 8(ageList)k 480 5385(})m 240 fnt1 0 4891(This)m 476(allo)s 6(ws)k 1145(in)s 9(v)k 4(ocations)k 2286(lik)s 2(e)k 2698(the)s 3046(follo)s 6(wing:)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 7 13 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1579(1.2.)m 1871(De\207nitions)s 240 fnt5 10368 -1582(7)m gsave 1417 -15423 translate 240 fnt1 9066 13369 0 13369 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore gsave 480 0 translate 1.0867 1.0000 scale 160 fnt2 0 12608(@P)m 6(ageList)k 220 fnt4 890 12594(\336)m gsave 1220 10875 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 160 fnt2 1220 10645(@P)m 6(ageList)k 220 fnt4 3267 12594(\336)m gsave 3597 10875 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore gsave 3597 8381 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 160 fnt2 3597 8151(@P)m 6(ageList)k 220 fnt4 5644 12594(\336)m gsave 5974 10875 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore gsave 5974 8381 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore grestore 0 7665(setting)m 220 fnt2 750 7662(@P)m 8(ageList)k 240 fnt1 1874 7665(to)m 200 fnt2 2113 7667(@Null)m 240 fnt1 2706 7665(on)m 3003(the)s 3351(last)s 3742(step.)s 4291(An)s 3(y)k 4755(number)s 5546(of)s 5817(pages)s 6413(can)s 6802(be)s 7084(generated.)s 480 7291(A)m 703(de\207nition)s 1669(for)s 220 fnt2 1999 7288(@T)m 26(e)k 6(xtPlace)k 240 fnt1 3209 7291(is)m 3411(be)s 3(yond)k 4164(us)s 4420(at)s 4644(present,)s 5433(since)s 220 fnt2 5972 7288(@T)m 26(e)k 6(xtPlace)k 240 fnt1 7182 7291(must)m 7699(be)s 7973(replaced)s 8832(by)s 0 7003(dif)m 6(ferent)k 877(parts)s 1394(of)s 1667(the)s 2018(te)s 3(xt)k 2435(of)s 2708(the)s 3059(document)s 4065(on)s 4364(dif)s 6(ferent)k 5242(pages.)s 5953(But)s 6361(we)s 6699(can)s 7090(de\207ne)s 220 fnt2 7733 7000(@F)m 6(ootSect)k 240 fnt1 8887 7003(to)m 0 6715(be)m 282(a)s 448(small)s 1020(space)s 1607(follo)s 6(wed)k 2509(by)s 2803(a)s 2969(horizontal)s 3993(line)s 4407(follo)s 6(wed)k 5309(by)s 5603(a)s 5769(list)s 6120(of)s 6391(places)s 7039(where)s 7679(footnotes)s 8620(go:)s 220 fnt2 480 6214(def @F)m 6(ootList )k 480 5926({ )m 480 5638( @F)m 6(ootPlace //0.3v @F)k 6(ootList)k 480 5350(} )m 480 5062( )m 480 4774(def @F)m 6(ootSect)k 480 4486({ )m 480 4198( //0.3v 1i @Wide @HLine)m 480 3910( //0.3v @F)m 6(ootList )k 480 3622(} )m 240 fnt1 0 3128(assuming)m 950(that)s 220 fnt2 1360 3125(@HLine)m 240 fnt1 2199 3128(will)m 2617(produce)s 3436(a)s 3594(horizontal)s 4610(line)s 5016(of)s 5279(the)s 5619(indicated)s 6545(width.)s 7246(W)s 9(ith)k 7764(this)s 8152(de\207nition)s 0 2840(we)m 335(can)s 724(generate)s 1589(pages)s 2185(lik)s 2(e)k 2597(this:)s gsave 480 6 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 220 fnt4 2647 1725(\336)m gsave 3097 6 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 567 0 0 0 160 180 44 170 346 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 170 173(@F)m 4(ootList)k grestore 5264(\336)s gsave 5714 6 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 567 0 0 0 160 180 44 170 522 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 170 349(@F)m 4(ootPlace)k 170 173(@F)m 4(ootList)k grestore grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 8 14 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(8)m 240 fnt6 8382 -1580(Chapter)m 9232(1.)s 9506(Principles)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(and)m 404(so)s 670(on)s 967(for)s 1305(arbitrarily)s 2312(man)s 3(y)k 2895(footnotes.)s 480 12831(W)m 19(e)k 852(will)s 1281(see)s 1646(in)s 1892(the)s 2244(ne)s 3(xt)k 2716(section)s 3454(ho)s 6(w)k 3918(in)s 9(v)k 4(ocations)k 5063(of)s 220 fnt2 5337 12828(@P)m 8(ageList,)k 6511(@F)s 6(ootSect)k 240 fnt1 7665 12831(and)m 220 fnt2 8073 12828(@F)m 6(ootList)k 240 fnt1 0 12543(are)m 356(replaced)s 1232(by)s 1535(their)s 2041(bodies)s 2726(only)s 3216(when)s 3801(the)s 4158(need)s 4677(to)s 4925(insert)s 5524(te)s 3(xt)k 5949(and)s 6362(footnotes)s 7312(obliges)s 8063(Lout)s 8584(to)s 8833(do)s 0 12255(so;)m 352(otherwise)s 1364(the)s 1740(in)s 9(v)k 4(ocations)k 2908(are)s 3283(replaced)s 4177(by)s 220 fnt2 4499 12252(@Null)m 240 fnt1 5084 12255(.)m 5275(In)s 5559(this)s 5982(w)s 2(ay)k 15(,)k 6499(the)s 6874(right)s 7413(number)s 8231(of)s 8530(pages)s 0 11967(is)m 223(made,)s 862(the)s 1224(small)s 1810(line)s 2238(appears)s 3033(only)s 3527(on)s 3838(pages)s 4447(that)s 4879(ha)s 4(v)k 3(e)k 5394(at)s 5640(least)s 6151(one)s 6567(footnote,)s 7485(and)s 7903(unnecessary)s 0 11679(concatenation)m 1385(symbols)s 2234(disappear)s 13(.)k 480 11305(This)m 958(approach)s 1894(to)s 2135(page)s 2645(layout)s 3305(is)s 3517(the)s 3867(most)s 4394(original)s 5194(contrib)s 4(ution)k 6418(Lout)s 6932(has)s 7304(made)s 7880(to)s 8122(document)s 0 11017(formatting.)m 1172(It)s 1377(is)s 1587(e)s 3(xtraordinarily)k 3057(\210e)s 3(xible.)k 3935(T)s 19(w)k 2(o-column)k 5207(pages?)s 5971(Use)s 220 fnt2 480 10516({2.8i @Wide @T)m 26(e)k 6(xtPlace} ||0.4i {2.8i @Wide @T)k 26(e)k 6(xtPlace})k 240 fnt1 0 10022(instead)m 768(of)s 220 fnt2 1072 10019(@T)m 26(e)k 6(xtPlace)k 240 fnt1 2230 10022(.)m 2427(F)s 3(ootnotes)k 3452(in)s 3728(smaller)s 4523(type?)s 5187(Use)s 220 fnt2 5648 10019(-2p)m 6051(@F)s 6(ont)k 6797(@F)s 6(ootPlace)k 240 fnt1 8086 10022(instead)m 8855(of)s 220 fnt2 0 9731(@F)m 6(ootPlace)k 240 fnt1 1196 9734(.)m 1360(And)s 1831(on)s 2128(and)s 2532(on.)s 240 fnt5 0 8986(1.3.)m 471(Cr)s 4(oss)k 1106(r)s 4(efer)k 4(ences)k [ /Dest /LOUTcross /DEST pdfmark 240 fnt1 480 8554(A)m 705(cross)s 1241(reference)s [ /Dest /LOUT19_4605_pri_cros_1 /DEST pdfmark 2178(in)s 2415(common)s 3304(terminology)s 4521(is)s 4725(something)s 5769(lik)s 2(e)k 6176(`see)s 6610(T)s 19(able)k 7185(6')s 7411(or)s 7664(`see)s 8098(page)s 8600(57')s 8946(\211)s 0 8266(a)m 168(reference)s 1114(within)s 1785(a)s 1954(document)s 2961(to)s 3202(some)s 3766(other)s 4320(part)s 4754(of)s 5028(it.)s 5327(Readers)s 6150(\207nd)s 6584(them)s 7125(v)s 3(ery)k 7604(useful,)s 8298(b)s 4(ut)k 8663(the)s 3(y)k 0 7978(are)m 343(a)s 504(major)s 1116(problem)s 1969(for)s 2302(authors.)s 3165(As)s 3478(the)s 3821(document)s 4820(is)s 5025(re)s 6(vised,)k 5812(T)s 19(able)k 6388(6)s 6556(becomes)s 7440(T)s 19(able)k 8016(7,)s 8238(the)s 8581(thing)s 0 7690(on)m 297(page)s 805(57)s 1093(mo)s 3(v)k 3(es)k 1763(to)s 2002(page)s 2510(63,)s 2857(and)s 3261(all)s 3554(the)s 3902(cross)s 4444(references)s 5475(must)s 6000(be)s 6282(changed.)s 480 7316(The)m 918(Scribe)s [ /Dest /LOUT19_4605_pri_cros_2 /DEST pdfmark 1595(document)s 2609(formatter)s 9(,)k 3605(de)s 6(v)k 3(eloped)k 4649(by)s 4953(Brian)s 5552(K.)s 5839(Reid)s 6360([)s [ /Rect [6431 7315 6539 7474] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTreid1980scribe /ANN pdfmark 6431(7)s 6539(],)s [ /Dest /LOUT19_4605_pri_cros_3 /DEST pdfmark 6736(introduced)s 7827(a)s 8004(scheme)s 8788(for)s 0 7028(k)m 2(eeping)k 804(track)s 1337(of)s 1603(cross)s 2140(references.)s 3279(It)s 3479(allo)s 6(ws)k 4143(you)s 4553(to)s 4787(gi)s 6(v)k 3(e)k 5241(names)s 5898(to)s 6132(tables,)s 6791(\207gures,)s 7544(etc.,)s 7984(and)s 8383(to)s 8617(refer)s 0 6740(to)m 233(them)s 764(by)s 1051(name.)s 1726(The)s 2147(formatter)s 3087(inserts)s 3754(the)s 4095(appropriate)s 5233(numbers)s 6101(in)s 6337(place)s 6890(of)s 7154(the)s 7495(names,)s 8206(so)s 8465(that)s 8876(as)s 0 6452(the)m 342(document)s 1339(is)s 1543(re)s 6(vised,)k 2327(the)s 2669(cross)s 3204(references)s 4229(are)s 4569(k)s 2(ept)k 5033(up)s 5319(to)s 5552(date)s 5999(automatically)s 15(.)k 7442(Lout)s 7947(has)s 8310(adopted)s 0 6164(and)m 404(e)s 3(xtended)k 1323(this)s 1719(scheme.)s 480 5790(In)m 726(Lout,)s 1275(automatic)s 2260(cross)s 2792(referencing)s 3922(w)s 2(orks)k 4546(in)s 4779(the)s 5117(follo)s 6(wing)k 6084(w)s 2(ay)k 15(.)k 6620(First)s 7107(de\207ne)s 7738(a)s 7894(symbol)s 8644(with)s 0 5502(a)m 166(parameter)s 1180(with)s 1662(the)s 2010(special)s 2728(name)s 220 fnt2 3302 5499(@T)m 26(ag:)k 480 5001(def @T)m 26(ab)k 4(le)k 480 4713( left @T)m 26(ag)k 480 4425( r)m -3(ight @V)k 15(alue)k 480 4137({)m 480 3849( ||1i @V)m 15(alue)k 480 3561(})m 240 fnt1 0 3067(When)m 643(this)s 1054(symbol)s 1829(is)s 2054(in)s 9(v)k 4(ok)k 2(ed,)k 2933(the)s 3296(v)s 6(alue)k 3879(gi)s 6(v)k 3(en)k 4474(to)s 220 fnt2 4727 3064(@T)m 26(ag)k 240 fnt1 5365 3067(should)m 6077(be)s 6374(a)s 6555(simple)s 7263(w)s 2(ord)k 7826(lik)s 2(e)k 220 fnt2 8253 3064(cities)m 240 fnt1 8745 3067(,)m 8867(or)s 0 2779(se)m 6(v)k 3(eral)k 722(simple)s 1415(w)s 2(ords)k 2049(juxtaposed)s 3144(lik)s 2(e)k 220 fnt2 3556 2776(cities compare)m 240 fnt1 4962 2779(;)m 5074(it)s 5266(serv)s 3(es)k 5911(to)s 6150(name)s 6724(the)s 7072(in)s 9(v)k 4(ocation:)k 220 fnt2 480 2278({ cities compare } @T)m 26(ab)k 4(le)k 480 1990({)m 480 1702( )m 8(W)k 8(ashington |0.5i Canberr)k 2(a)k 480 1414(})m 240 fnt1 0 920(W)m 19(e)k 410(may)s 917(no)s 6(w)k 1419(refer)s 1969(to)s 2249(this)s 2686(in)s 9(v)k 4(ocation)k 3782(else)s 6(where)k 4828(in)s 5112(the)s 5501(document,)s 6593(using)s 7206(the)s 240 fnt6 7595 922(cr)m 10(oss)k 8187(r)s 8(efer)k 8(ence)k 220 fnt2 0 629(@T)m 26(ab)k 4(le&&{ cities compare }.)k 240 fnt1 2918 632(Here)m 220 fnt2 3480 629(&&)m 240 fnt1 3870 632(is)m 4122(the)s 240 fnt6 4511 634(cr)m 10(oss)k 5103(r)s 8(efer)k 8(ence)k 6084(symbol)s 240 fnt1 6762 632(;)m 6916(its)s 7233(left)s 7652(parameter)s 8708(is)s 8960(a)s 0 344(symbol)m 772(and)s 1189(its)s 1478(right)s 2002(parameter)s 3028(is)s 3251(the)s 3612(v)s 6(alue)k 4193(of)s 4476(the)s 220 fnt2 4837 341(@T)m 26(ag)k 240 fnt1 5473 344(parameter)m 6500(of)s 6783(some)s 7357(in)s 9(v)k 4(ocation)k 8424(of)s 8708(that)s 0 56(symbol.)m 869(Of)s 1193(course)s 1873(it')s 13(s)k 2215(simplest)s 3071(if)s 3288(you)s 3703(use)s 4078(just)s 4483(a)s 4649(one-w)s 2(ord)k 5622(tag;)s 6026(then)s 6495(no)s 6788(braces)s 7449(are)s 7796(needed.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 9 15 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1578(1.3.)m 1871(Cr)s 10(oss)k 2475(r)s 8(efer)k 8(ences)k 240 fnt5 10369 -1581(9)m gsave 1417 -15423 translate 240 fnt1 9066 13370 0 13261 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13207(A)m 695(cross)s 1222(reference)s 2150(is)s 2345(not)s 2696(an)s 2964(object;)s 3645(the)s 3978(reader)s 4619(should)s 5301(think)s 5839(of)s 6095(it)s 6272(as)s 6507(an)s 6775(arro)s 6(w)k 7365(in)s 7593(the)s 7926(\207nal)s 8391(printed)s 0 12919(document,)m 1049(be)s 3(ginning)k 2054(at)s 2284(the)s 2629(cross)s 3169(reference)s 4109(and)s 4511(ending)s 5213(at)s 5443(the)s 5788(top)s 6145(of)s 6413(the)s 6759(tar)s 4(get)k [ /Dest /LOUT19_4605_pri_cros_4 /DEST pdfmark 7355(in)s 9(v)k 4(ocation.)k 8513(Three)s 0 12631(special)m 715(v)s 6(alues)k 1367(may)s 1830(be)s 2108(gi)s 6(v)k 3(en)k 2685(to)s 2920(the)s 3264(right)s 3772(parameter)s 4782(of)s 220 fnt2 5050 12628(&&)m 240 fnt1 5338 12631(:)m 220 fnt2 5500 12628(preceding)m 240 fnt1 6451 12631(,)m 220 fnt2 6555 12628(f)m 6(ollo)k 3(wing)k 240 fnt1 7385 12631(,)m 7488(and)s [ /Dest /LOUT19_4605_pri_cros_5 /DEST pdfmark [ /Dest /LOUT19_4605_pri_cros_6 /DEST pdfmark [ /Dest /LOUT19_4605_pri_cros_7 /DEST pdfmark 220 fnt2 7888 12628(f)m 6(oll_or_prec)k 240 fnt1 9022 12631(.)m 0 12343(The)m 467(cross)s 1049(reference)s 220 fnt2 2032 12340(@T)m 26(ab)k 4(le&&preceding)k 240 fnt1 4116 12343(points)m 4792(to)s 5071(some)s 5671(table)s 6231(appearing)s 7267(earlier)s 7975(in)s 8258(the)s 8646(\207nal)s 0 12055(printed)m 760(document)s 1790(than)s 2285(itself;)s 2899(that)s 3343(is,)s 3635(the)s 4009(arro)s 6(w)k 4640(is)s 4876(guaranteed)s 6009(to)s 6274(point)s 6852(backw)s 2(ards)k 7950(through)s 8778(the)s 0 11767(document.)m 1108(Usually)s 1907(it)s 2100(points)s 2737(to)s 2977(the)s 3326(nearest)s 4063(preceding)s 5060(in)s 9(v)k 4(ocation.)k 6222(Similarly)s 15(,)k 220 fnt2 7203 11764(@T)m 26(ab)k 4(le&&f)k 6(ollo)k 3(wing)k 240 fnt1 0 11479(points)m 636(forw)s 2(ards,)k 1590(usually)s 2335(to)s 2574(the)s 2922(nearest)s 3657(follo)s 6(wing)k 4634(in)s 9(v)k 4(ocation.)k 220 fnt2 5795 11476(@T)m 26(ab)k 4(le&&f)k 6(oll_or_prec)k 240 fnt1 8022 11479(is)m 8232(the)s 8579(same)s 0 11191(as)m 220 fnt2 250 11188(@T)m 26(ab)k 4(le&&f)k 6(ollo)k 3(wing)k 240 fnt1 2173 11191(if)m 2390(it)s 2582(e)s 3(xists,)k 3230(otherwise)s 4215(it)s 4407(is)s 4617(the)s 4965(same)s 5512(as)s 220 fnt2 5762 11188(@T)m 26(ab)k 4(le&&preceding)k 240 fnt1 7746 11191(.)m 480 10817(This)m 962(section)s 1702(has)s 2079(been)s 2594(concerned)s 3641(with)s 4130(what)s 4661(a)s 4834(cross)s 5382(reference)s 6331(is)s 6548(\211)s 6734(an)s 7023(arro)s 6(w)k 7635(from)s 8165(one)s 8574(point)s 0 10529(in)m 242(a)s 407(document)s 1410(to)s 1648(another)s 2424(\211)s 2603(b)s 4(ut)k 2963(not)s 3328(with)s 3809(ho)s 6(w)k 4269(it)s 4460(is)s 4669(used.)s 5271(One)s 5724(simple)s 6416(w)s 2(ay)k 6866(to)s 7104(use)s 7478(a)s 7643(cross)s 8183(reference)s 0 10241(is)m 210(to)s 449(put)s 815(it)s 1007(where)s 1647(an)s 1930(object)s 2574(is)s 2784(e)s 3(xpected,)k 3738(lik)s 2(e)k 4150(this:)s 220 fnt2 480 9740(a | @T)m 26(ab)k 4(le&&cities | c)k 240 fnt1 0 9285(In)m 265(this)s 670(case)s 1146(the)s 1504(cross)s 2055(reference)s 3007(will)s 3443(be)s 3734(replaced)s 4610(by)s 4914(a)s 5089(cop)s 2(y)k 5616(of)s 5897(the)s 6254(in)s 9(v)k 4(ocation)k 7317(it)s 7519(points)s 8164(to:)s 8525(in)s 8778(the)s 0 8997(e)m 3(xample)k 866(just)s 1275(gi)s 6(v)k 3(en,)k 1909(a)s 2079(table)s 2603(will)s 3033(appear)s 3734(between)s 220 fnt2 4591 8994(a)m 240 fnt1 4772 8997(and)m 220 fnt2 5180 8994(c.)m 240 fnt1 5456 8997(Other)m 6064(applications)s 7274(of)s 7549(cross)s 8095(references)s 0 8709(may)m 466(be)s 747(found)s 1364(in)s 1606(Chapter)s 2423(4,)s 2649(including)s 3606(\207nding)s 4337(the)s 4685(number)s 5475(of)s 5746(the)s 6093(page)s 6601(where)s 7240(something)s 8289(appears,)s 0 8421(producing)m 1018(running)s 1810(page)s 2312(headers)s 3086(and)s 3484(footers,)s 4248(and)s 4646(accessing)s 5608(databases)s 6569(of)s 6834(Roman)s 7577(numerals,)s 8553(refer)s 4(-)k 0 8133(ences,)m 638(etc.)s 1080(Cross)s 1676(references)s 2707(are)s 3054(also)s 3492(used)s 3989(by)s 4283(g)s 1(alle)k 3(ys,)k 5063(as)s 5313(will)s 5739(be)s 6021(e)s 3(xplained)k 7006(in)s 7249(the)s 7597(ne)s 3(xt)k 8066(section.)s 480 7759(The)m 943(implementation)s 2535(of)s 2841(cross)s 3418(referencing)s 4593(copies)s 5290(e)s 6(v)k 3(ery)k 5901(symbol)s 6696(in)s 9(v)k 4(ocation)k 7785(with)s 8302(a)s 220 fnt2 8503 7756(@T)m 26(ag)k 240 fnt1 0 7471(parameter)m 1008(into)s 1427(the)s 240 fnt6 1768 7473(cr)m 10(oss-r)k 8(efer)k 8(ence)k 3275(database)s 240 fnt1 4133 7471(,)m 4233(a)s 4393(collection)s 5385(of)s 5650(\207les)s 6093(whose)s 6754(names)s 7410(end)s 7807(in)s 220 fnt2 8044 7468(.ld)m 240 fnt1 8316 7471(inde)m 3(x)k 3(ed)k 0 7183(by)m 286(one)s 679(\207le)s 1032(whose)s 1691(name)s 2256(is)s 220 fnt2 2458 7180(lout.li)m 240 fnt1 2954 7183(.)m 3109(It)s 3306(is)s 3507(generally)s 4441(the)s 4781(case)s 5239(that)s 5649(the)s 5988(b)s 4(ulk)k 6462(content)s 7218(of)s 7480(a)s 7638(symbol)s 8389(such)s 8876(as)s 0 6895(the)m 337(table)s 845(abo)s 3(v)k 3(e)k 1455(is)s 1653(contained)s 2629(in)s 2860(its)s 3124(right)s 3623(or)s 3870(body)s 4393(parameter)s 9(,)k 5433(and)s 5825(that)s 6231(this)s 6615(b)s 4(ulk)k 7086(content)s 7838(is)s 8036(not)s 8390(needed)s 0 6607(by)m 297(cross)s 843(references)s 1878(to)s 2121(the)s 2472(symbol.)s 3345(Hence,)s 4067(to)s 4310(sa)s 4(v)k 3(e)k 4787(space)s 5378(in)s 5625(the)s 5977(database,)s 6910(Lout)s 7426(replaces)s 8263(the)s 8615(right)s 0 6319(parameter)m 1011(of)s 1279(each)s 1771(symbol)s 2527(it)s 2716(writes)s 3347(into)s 3768(it)s 3957(by)s 4248(the)s 4592(w)s 2(ord)k 5137(???)s 5505(whene)s 6(v)k 3(er)k 6482(the)s 6827(right)s 7335(parameter)s 8345(appears)s 0 6031(to)m 249(be)s 542(lar)s 4(ge.)k 1190(The)s 1629(table)s 2160(abo)s 3(v)k 3(e)k 2792(w)s 2(ould)k 3458(appear)s 4166(as)s 4427(???)s 4809(because)s 5632(of)s 5914(this)s 6321(optimization,)s 7647(and)s 8062(in)s 8316(general,)s 0 5743(the)m 367(user)s 845(must)s 1390(ensure)s 2089(that)s 2527(an)s 3(y)k 2944(content)s 3728(required)s 4601(by)s 4915(cross)s 5477(references)s 6527(is)s 6757(contained)s 7765(in)s 8028(parameters)s 0 5455(other)m 545(than)s 1007(the)s 1348(right)s 1852(or)s 2104(body)s 2631(parameter)s 13(.)k 3729(This)s 4199(optimization)s 5457(does)s 5940(not)s 6299(apply)s 6878(when)s 7447(the)s 7788(symbol)s 8541(being)s 0 5167(written)m 733(into)s 1158(the)s 1506(cross-reference)s 3019(database)s 3898(is)s 4108(a)s 4274(g)s 1(alle)k 3(y)k 15(.)k 240 fnt5 0 4374(1.4.)m 471(Galleys)s [ /Dest /LOUTgalleys /DEST pdfmark 240 fnt1 480 3897(It)m 695(is)s 915(time)s 1406(to)s 1655(pause)s 2267(and)s 2681(ask)s 3072(ourselv)s 3(es)k 4033(ho)s 6(w)k 4505(close)s 5062(we)s 5408(are)s 5765(to)s 6015(achie)s 6(ving)k 7002(our)s 7392(aim)s 7820(of)s 8102(producing)s 0 3609(neatly)m 638(formatted)s 1624(documents.)s 2825(W)s 19(e)k 3194(can)s 3583(certainly)s 4472(produce)s 5299(the)s 5647(pieces)s 6295(of)s 6566(a)s 6732(document:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 10 16 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(10)m 240 fnt6 8382 -1580(Chapter)m 9232(1.)s 9506(Principles)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 160 fnt5 870 13031(PURCELL)m 128 fnt1 1626 13103(1)m 160 fnt1 480 12739(In)m 705(the)s 991(w)s 1(orld)k 1455(of)s 1691(music)s 480 12559(England)m 1192(is)s 1473(supposed)s 480 12379(to)m 686(be)s 921(a)s 1078(mere)s 1481(pro)s 2(vince.)k 480 12199(If)m 775(she)s 1166(produces)s 1918(an)s 480 12019(indif)m 4(ferent)k 1446(composer)s 480 11839(or)m 763(performer)s 6(,)k 1577(that)s 1967(is)s 480 11659(re)m 2(garded)k 1172(else)s 4(where)k 1940(as)s 480 11479(perfectly)m 1215(normal)s 1837(and)s 480 11299(natural;)m 1072(b)s 3(ut)k 1388(if)s 1608(foreign)s 480 11119(students)m 1215(of)s 1574(musical)s 480 10939(history)m 1286(ha)s 3(v)k 2(e)k 1947(to)s 480 10759(ackno)m 4(wledge)k 1440(a)s 1636(British)s 480 10579(musical)m 1105(genius,)s 1686(he)s 1967(is)s 480 10399(considered)m 1211(a)s 1322(freak.)s 800 10166(Such)m 1267(a)s 1488(freak)s 1967(is)s 480 9986(Henry)m 917(Purcell.)s 1480(Y)s 16(et)k 1736(if)s 1884(we)s 480 9806(mak)m 1(e)k 875(a)s 1000(choice)s 1467(of)s 1662(\207fteen)s 480 9626(of)m 717(the)s 1005(w)s 1(orld')k 8(s)k 1574(musical)s 480 9446(classics,)m 1050(as)s 1228(here,)s 1586(we)s 1820(\207nd)s 480 9266(that)m 774(we)s 1013(cannot)s 1495(omit)s 1843(this)s 480 9086(English)m 1005(master)s 8(.)k 128 fnt1 2634 13283(1)m 160 fnt1 2685 13211(Blom,)m 3107(Eric.)s 160 fnt6 3476 13212(Some)m 3852(Gr)s 5(eat)k 2634 13032(Composer)m 1(s.)k 160 fnt1 3728 13031(Oxford,)m 2634 12851(1944.)m gsave 4788 10874 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore gsave 4788 8380 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore gsave 4788 5886 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 160 fnt2 4788 5656(@P)m 6(ageList)k 240 fnt1 0 5170(b)m 4(ut)k 362(when)s 938(we)s 1273(try)s 1592(to)s 1831(mer)s 4(ge)k 2480(them)s 3018(together)s 9(,)k 3899(we)s 4234(encounter)s 5237(tw)s 2(o)k 5647(obstacles.)s 480 4796(First,)m 1029(when)s 1610(an)s 1899(object)s 2548(is)s 2763(entered)s 3530(at)s 3767(a)s 3938(certain)s 4650(place)s 5215(in)s 5463(the)s 5817(document,)s 6873(it)s 7070(appears)s 7857(at)s 8094(that)s 8518(place.)s 0 4508(But)m 393(a)s 546(footnote)s 1385(is)s 1582(naturally)s 2472(entered)s 3219(immediately)s 4454(after)s 4936(the)s 5271(point)s 5810(it)s 5988(refers)s 6568(to)s 6794(\(`)s 200 fnt1 6934 4517(PURCELL)m 240 fnt1 7819 4508(')m 7917(in)s 8147(this)s 8529(case\),)s 0 4220(yet)m 352(it)s 544(appears)s 1325(some)s 6(where)k 2464(else:)s 2941(at)s 3173(the)s 3521(bottom)s 4259(of)s 4530(a)s 4696(page.)s 480 3846(Second,)m 1285(all)s 1570(our)s 1942(features)s 2740(b)s 4(uild)k 3278(up)s 3564(lar)s 4(ger)k 4168(objects)s 4889(out)s 5247(of)s 5510(smaller)s 6265(ones,)s 6803(b)s 4(ut)k 7158(the)s 200 fnt1 7498 3855(PURCELL)m 240 fnt1 8435 3846(object,)m 0 3558(for)m 333(e)s 3(xample,)k 1242(must)s 1762(be)s 2039(brok)s 2(en)k 2753(do)s 6(wn)k 3332(into)s 3752(page-sized)s 4827(pieces.)s 5583(This)s 6053(occurs)s 6723(when)s 7294(the)s 7637(a)s 4(v)k 6(ailable)k 8539(space)s 0 3270(at)m 230(the)s 575(`some)s 6(where)k 1790(else')s 2270(is)s 2477(insuf\207cient)s 3610(to)s 3846(hold)s 4327(the)s 4672(entire)s 5268(object,)s 5957(so)s 6220(this)s 6613(second)s 7333(obstacle)s 8169(arises)s 8760(out)s 0 2982(of)m 271(the)s 619(\207rst.)s 480 2608(Lout')m 13(s)k 1135(last)s 1518(major)s 2127(feature,)s 2888(which)s 3523(we)s 3850(introduce)s 4801(to)s 5032(o)s 3(v)k 3(ercome)k 6017(these)s 6557(obstacles,)s 7532(is)s 7734(the)s 240 fnt6 8074 2610(galle)m 7(y)k [ /Dest /LOUT19_4605_pri_gall_1 /DEST pdfmark 240 fnt1 8699 2608(\(the)m 0 2320(name)m 564(is)s 764(borro)s 6(wed)k 1723(from)s 2237(the)s 2575(g)s 1(alle)k 3(ys)k 3288(used)s 3775(in)s 4008(manual)s 4757(typesetting\).)s 6039(A)s 6259(g)s 1(alle)k 3(y)k 6882(is)s 7082(an)s 7355(object)s 7989(plus)s 8429(a)s 8584(cross)s 0 2032(reference)m 943(which)s 1585(points)s 2221(to)s 2460(where)s 3100(the)s 3448(object)s 4092(is)s 4302(to)s 4541(appear)s 13(.)k 5329(The)s 5757(e)s 3(xample)k 6620(abo)s 3(v)k 3(e)k 7242(has)s 7612(three)s 8145(g)s 1(alle)k 3(ys:)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 11 17 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(1.4.)m 1871(Galle)s 7(ys)k 240 fnt5 10256 -1583(11)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 160 fnt5 870 12975(PURCELL)m 128 fnt1 1626 13047(1)m 160 fnt1 480 12683(In)m 705(the)s 991(w)s 1(orld)k 1455(of)s 1691(music)s 480 12503(England)m 1192(is)s 1473(supposed)s 480 12323(to)m 686(be)s 921(a)s 1078(mere)s 1481(pro)s 2(vince.)k 480 12143(If)m 775(she)s 1166(produces)s 1918(an)s 480 11963(indif)m 4(ferent)k 1446(composer)s 480 11783(or)m 763(performer)s 6(,)k 1577(that)s 1967(is)s 480 11603(re)m 2(garded)k 1172(else)s 4(where)k 1940(as)s 480 11423(perfectly)m 1215(normal)s 1837(and)s 480 11243(natural;)m 1072(b)s 3(ut)k 1388(if)s 1608(foreign)s 480 11063(students)m 1215(of)s 1574(musical)s 480 10883(history)m 1286(ha)s 3(v)k 2(e)k 1947(to)s 480 10703(ackno)m 4(wledge)k 1440(a)s 1636(British)s 480 10523(musical)m 1105(genius,)s 1686(he)s 1967(is)s 480 10343(considered)m 1211(a)s 1322(freak.)s 800 10110(Such)m 1267(a)s 1488(freak)s 1967(is)s 480 9930(Henry)m 917(Purcell.)s 1480(Y)s 16(et)k 1736(if)s 1884(we)s 480 9750(mak)m 1(e)k 875(a)s 1000(choice)s 1467(of)s 1662(\207fteen)s 480 9570(of)m 717(the)s 1005(w)s 1(orld')k 8(s)k 1574(musical)s 480 9390(classics,)m 1050(as)s 1228(here,)s 1586(we)s 1820(\207nd)s 480 9210(that)m 774(we)s 1013(cannot)s 1495(omit)s 1843(this)s 480 9030(English)m 1005(master)s 8(.)k gsave 3321 13052 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1134 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 3201 10788 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore gsave 3201 8294 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore gsave 3201 5800 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 160 fnt2 3201 5570(@P)m 6(ageList)k gsave 6688 13282 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1440 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore 200 fnt6 6748 13238(to)m 6947(printer)s gsave 4335 11036 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 4335 11036 translate 240 fnt1 963 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 4335 11036 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 128 fnt1 5418 11072(1)m 160 fnt1 5469 11000(Blom,)m 5891(Eric.)s 160 fnt6 6260 11001(Some)m 6636(Gr)s 5(eat)k 5418 10821(Composer)m 1(s.)k 160 fnt1 6512 10820(Oxford,)m 5418 10640(1944.)m 240 fnt1 0 5084(A)m 229(g)s 1(alle)k 3(y)k 861(replaces)s 1693(the)s 2039(in)s 9(v)k 4(ocation)k 3091(pointed)s 3866(to)s 4103(by)s 4395(its)s 4670(cross)s 5210(reference.)s 6260(If)s 6488(space)s 7073(is)s 7282(not)s 7646(suf\207cient)s 8593(there)s 0 4796(to)m 232(hold)s 708(it)s 892(all,)s 1230(the)s 1570(remainder)s 2590(of)s 2854(the)s 3194(g)s 1(alle)k 3(y)k 3820(is)s 4023(split)s 4486(of)s 6(f)k 4822(\(the)s 5242(v)s 3(ertical)k 6001(concatenation)s 7378(symbol)s 8130(preceding)s 0 4508(it)m 199(being)s 791(discarded\))s 1842(and)s 2253(it)s 2452(replaces)s 3293(later)s 3783(in)s 9(v)k 4(ocations)k 4931(of)s 5209(the)s 5564(same)s 6119(symbol.)s 6935(This)s 7418(is)s 7635(e)s 3(xactly)k 8383(what)s 8916(is)s 0 4220(required)m 854(to)s 1093(get)s 1445(te)s 3(xt)k 1860(and)s 2264(footnotes)s 3205(onto)s 3684(pages.)s 480 3846(T)m 19(o)k 780(create)s 1405(a)s 1571(g)s 1(alle)k 3(y)k 15(,)k 2243(\207rst)s 2674(de\207ne)s 3315(a)s 3481(symbol)s 4241(with)s 4723(a)s 4889(special)s 220 fnt2 5607 3843(into)m [ /Dest /LOUT19_4605_pri_gall_2 /DEST pdfmark 240 fnt1 6013 3846(clause,)m 6717(lik)s 2(e)k 7129(this:)s 220 fnt2 480 3345(def @F)m 6(ootNote into { @F)k 6(ootPlace&&f)k 6(ollo)k 3(wing })k 480 3057( r)m -3(ight x)k 480 2769({)m 480 2481( 8p @F)m 6(ont x)k 480 2193(})m 240 fnt1 0 1699(An)m 343(in)s 9(v)k 4(ocation)k 1390(of)s 1654(such)s 2142(a)s 2301(symbol)s 3054(will)s 3473(then)s 3934(be)s 4209(a)s 4368(g)s 1(alle)k 3(y)k 4994(whose)s 5655(object)s 6292(is)s 6495(the)s 6835(result)s 7418(of)s 7682(the)s 8022(in)s 9(v)k 4(ocation,)k 0 1411(and)m 399(whose)s 1062(cross)s 1598(reference)s 2536(is)s 2740(gi)s 6(v)k 3(en)k 3315(by)s 3603(the)s 220 fnt2 3946 1408(into)m 240 fnt1 4347 1411(clause.)m 5102(The)s 5525(right)s 6030(parameter)s 7039(of)s 7304(the)s 7647(cross)s 8183(reference)s 0 1123(must)m 525(be)s 807(one)s 1209(of)s 220 fnt2 1480 1120(preceding)m 240 fnt1 2431 1123(,)m 220 fnt2 2538 1120(f)m 6(ollo)k 3(wing)k 240 fnt1 3368 1123(,)m 3475(and)s 220 fnt2 3879 1120(f)m 6(oll_or_prec)k 240 fnt1 5013 1123(.)m 480 749(A)m 700(symbol,)s 1502(lik)s 2(e)k 220 fnt2 1903 746(@F)m 6(ootPlace)k 3(,)k 240 fnt1 3196 749(which)m 3827(is)s 4027(the)s 240 fnt6 4364 751(tar)m 8(g)k 2(et)k 240 fnt1 4979 749(of)m 5239(a)s 5395(g)s 1(alle)k 3(y)k 15(,)k [ /Dest /LOUT19_4605_pri_gall_3 /DEST pdfmark 6056(must)s 6571(contain)s 7321(the)s 7659(special)s 8366(symbol)s 220 fnt2 0 458(@Galle)m 4(y)k 240 fnt1 898 461(e)m 3(xactly)k 1639(once)s 2147(in)s 2390(its)s 2666(body;)s 3258(often)s 3806(this)s 4202(is)s 4412(all)s 4705(that)s 5123(the)s 5471(body)s 6005(contains:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 12 18 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(12)m 240 fnt6 8382 -1580(Chapter)m 9232(1.)s 9506(Principles)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(def @F)m 6(ootPlace { @Galle)k 4(y })k 240 fnt1 0 12709(It)m 229(is)s 464(this)s 885(special)s 1628(symbol)s 2412(that)s 2855(is)s 3090(replaced)s 3982(by)s 4300(the)s 4673(incoming)s 5655(g)s 1(alle)k 3(y)k 15(,)k 6352(in)s 6619(f)s 2(act,)k 7106(not)s 7497(the)s 220 fnt2 7870 12706(@F)m 6(ootPlace)k 240 fnt1 0 12421(symbol)m 760(as)s 1010(a)s 1176(whole.)s 480 12047(A)m 718(symbol)s 1487(which)s 2138(contains)s 220 fnt2 2994 12044(@Galle)m 4(y)k 240 fnt1 3832 12047(,)m 3948(either)s 4560(directly)s 5351(within)s 6028(its)s 6313(body)s 6855(or)s 7123(indirectly)s 8101(within)s 8778(the)s 0 11759(body)m 533(of)s 802(a)s 966(symbol)s 1725(it)s 1915(in)s 9(v)k 4(ok)k 2(es,)k 2750(is)s 2959(called)s 3585(a)s 240 fnt6 3749 11761(r)m 8(eceptive)k [ /Dest /LOUT19_4605_pri_gall_4 /DEST pdfmark 240 fnt1 4668 11759(symbol,)m 5478(meaning)s 6353(recepti)s 6(v)k 3(e)k 7274(to)s 7511(g)s 1(alle)k 3(ys.)k 220 fnt2 8346 11756(@F)m 6(oot-)k 0 11468(Place)m 240 fnt1 630 11471(is)m 870(recepti)s 6(v)k 3(e,)k 1873(which)s 2545(mak)s 2(es)k 220 fnt2 3235 11468(@F)m 6(ootList,)k 4364(@F)s 6(ootSect)k 240 fnt1 5545 11471(and)m 220 fnt2 5979 11468(@P)m 8(ageList)k 240 fnt1 7133 11471(recepti)m 6(v)k 3(e)k 8085(since)s 8663(the)s 3(y)k 0 11183(in)m 9(v)k 4(ok)k 2(e)k 220 fnt2 704 11180(@F)m 6(ootPlace)k 3(.)k 240 fnt1 2078 11183(If)m 2319(no)s 2623(g)s 1(alle)k 3(y)k 3268(replaces)s 4112(an)s 3(y)k 220 fnt2 4520 11180(@Galle)m 4(y)k 240 fnt1 5429 11183(within)m 6108(some)s 6680(in)s 9(v)k 4(ocation)k 7745(of)s 8027(a)s 8204(recepti)s 6(v)k 3(e)k 0 10895(symbol,)m 816(that)s 1239(in)s 9(v)k 4(ocation)k 2297(is)s 2512(replaced)s 3383(by)s 220 fnt2 3682 10892(@Null)m 240 fnt1 4267 10895(.)m 4435(The)s 4868(adv)s 6(antages)k 5980(of)s 6256(this)s 6656(rule)s 7088(for)s 7430(page)s 7943(layout)s 8606(were)s 0 10607(e)m 3(xplained)k 985(at)s 1217(the)s 1565(end)s 1969(of)s 2240(Section)s 3014(1.2.)s 480 10233(Let)m 852(us)s 1109(no)s 6(w)k 1563(follo)s 6(w)k 2228(through)s 3023(the)s 3364(construction)s 4596(of)s 4861(our)s 5233(e)s 3(xample)k 6089(document.)s 7190(Initially)s 7992(there)s 8518(is)s 8721(just)s 0 9945(the)m 348(one)s 240 fnt6 750 9947(r)m 10(oot)k [ /Dest /LOUT19_4605_pri_gall_5 /DEST pdfmark 240 fnt1 1203 9945(g)m 1(alle)k 3(y)k 15(,)k 1875(containing)s 2938(an)s 3221(une)s 3(xpanded)k 4434(in)s 9(v)k 4(ocation)k 5488(of)s 220 fnt2 5759 9942(@P)m 8(ageList:)k 180 fnt2 3315 9473(@P)m 7(ageList)k gsave 5746 9519 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1440 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore 200 fnt6 5806 9475(to)m 6005(printer)s 240 fnt1 0 8982(Then)m 602(the)s 200 fnt1 1004 8991(PURCELL)m 240 fnt1 2002 8982(g)m 1(alle)k 3(y)k 2690(appears,)s 3580(tar)s 4(geted)k 4457(to)s 4750(a)s 220 fnt2 4969 8979(@T)m 26(e)k 6(xtPlace)k 3(.)k 240 fnt1 6348 8982(Lout)m 6913(kno)s 6(ws)k 7638(that)s 8109(there)s 8696(is)s 8960(a)s 220 fnt2 0 8691(@T)m 26(e)k 6(xtPlace)k 240 fnt1 1218 8694(hidden)m 1927(inside)s 220 fnt2 2554 8691(@P)m 8(ageList,)k 240 fnt1 3724 8694(so)m 3990(it)s 4182(e)s 3(xpands)k 220 fnt2 5015 8691(@P)m 8(ageList:)k 160 fnt5 870 7961(PURCELL)m 128 fnt1 1626 8033(1)m 160 fnt1 480 7669(In)m 705(the)s 991(w)s 1(orld)k 1455(of)s 1691(music)s 480 7489(England)m 1192(is)s 1473(supposed)s 480 7309(to)m 686(be)s 921(a)s 1078(mere)s 1481(pro)s 2(vince.)k 480 7129(If)m 775(she)s 1166(produces)s 1918(an)s 480 6949(indif)m 4(ferent)k 1446(composer)s 480 6769(or)m 763(performer)s 6(,)k 1577(that)s 1967(is)s 480 6589(re)m 2(garded)k 1172(else)s 4(where)k 1940(as)s 480 6409(perfectly)m 1215(normal)s 1837(and)s 480 6229(natural;)m 1072(b)s 3(ut)k 1388(if)s 1608(foreign)s 480 6049(students)m 1215(of)s 1574(musical)s 480 5869(history)m 1286(ha)s 3(v)k 2(e)k 1947(to)s 480 5689(ackno)m 4(wledge)k 1440(a)s 1636(British)s 480 5509(musical)m 1105(genius,)s 1686(he)s 1967(is)s 480 5329(considered)m 1211(a)s 1322(freak.)s 800 5096(Such)m 1267(a)s 1488(freak)s 1967(is)s 480 4916(Henry)m 917(Purcell.)s 1480(Y)s 16(et)k 1736(if)s 1884(we)s 480 4736(mak)m 1(e)k 875(a)s 1000(choice)s 1467(of)s 1662(\207fteen)s 480 4556(of)m 717(the)s 1005(w)s 1(orld')k 8(s)k 1574(musical)s 480 4376(classics,)m 1050(as)s 1228(here,)s 1586(we)s 1820(\207nd)s 480 4196(that)m 774(we)s 1013(cannot)s 1495(omit)s 1843(this)s 480 4016(English)m 1005(master)s 8(.)k gsave 3434 8038 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1247 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 3315 5774 translate 220 fnt2 1927 2494 0 2494 220 288 61 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt2 170 2207(@T)m 19(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 160 fnt2 3315 5544(@P)m 6(ageList)k gsave 6802 8268 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1440 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore 200 fnt6 6862 8224(to)m 7061(printer)s 240 fnt1 0 3531(After)m 586(promoting)s 1659(the)s 2030(\207rst)s 2484(line)s 2922(into)s 220 fnt2 3370 3528(@T)m 26(e)k 6(xtPlace)k 3(,)k 240 fnt1 4658 3531(the)m 5029(footnote)s 5905(g)s 1(alle)k 3(y)k 6563(attached)s 7440(to)s 7702(it)s 7917(appears)s 8722(and)s 0 3243(demands)m 938(an)s 1257(in)s 9(v)k 4(ocation)k 2347(of)s 220 fnt2 2654 3240(@F)m 6(ootPlace)k 240 fnt1 3946 3243(follo)m 6(wing)k 4960(its)s 5272(attachment)s 6416(point)s 7004(\(`)s 200 fnt1 7144 3252(PURCELL)m 240 fnt1 8029 3243('\).)m 8387(Such)s 8960(a)s 220 fnt2 0 2952(@F)m 6(ootPlace)k 240 fnt1 1274 2955(is)m 1502(found)s 2138(at)s 2388(the)s 2754(bottom)s 3511(of)s 3800(the)s 4166(\207rst)s 4616(page,)s 5193(inside)s 220 fnt2 5838 2952(@F)m 6(ootSect,)k 240 fnt1 7054 2955(which)m 7714(is)s 7943(accordingly)s 0 2667(e)m 3(xpanded,)k 1022(and)s 1426(the)s 1774(footnote)s 2627(is)s 2837(promoted)s 3812(onto)s 4291(the)s 4639(page:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 13 19 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(1.4.)m 1871(Galle)s 7(ys)k 240 fnt5 10250 -1583(13)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 160 fnt1 480 12579(In)m 705(the)s 991(w)s 1(orld)k 1455(of)s 1691(music)s 480 12399(England)m 1192(is)s 1473(supposed)s 480 12219(to)m 686(be)s 921(a)s 1078(mere)s 1481(pro)s 2(vince.)k 480 12039(If)m 775(she)s 1166(produces)s 1918(an)s 480 11859(indif)m 4(ferent)k 1446(composer)s 480 11679(or)m 763(performer)s 6(,)k 1577(that)s 1967(is)s 480 11499(re)m 2(garded)k 1172(else)s 4(where)k 1940(as)s 480 11319(perfectly)m 1215(normal)s 1837(and)s 480 11139(natural;)m 1072(b)s 3(ut)k 1388(if)s 1608(foreign)s 480 10959(students)m 1215(of)s 1574(musical)s 480 10779(history)m 1286(ha)s 3(v)k 2(e)k 1947(to)s 480 10599(ackno)m 4(wledge)k 1440(a)s 1636(British)s 480 10419(musical)m 1105(genius,)s 1686(he)s 1967(is)s 480 10239(considered)m 1211(a)s 1322(freak.)s 800 10006(Such)m 1267(a)s 1488(freak)s 1967(is)s 480 9826(Henry)m 917(Purcell.)s 1480(Y)s 16(et)k 1736(if)s 1884(we)s 480 9646(mak)m 1(e)k 875(a)s 1000(choice)s 1467(of)s 1662(\207fteen)s 480 9466(of)m 717(the)s 1005(w)s 1(orld')k 8(s)k 1574(musical)s 480 9286(classics,)m 1050(as)s 1228(here,)s 1586(we)s 1820(\207nd)s 480 9106(that)m 774(we)s 1013(cannot)s 1495(omit)s 1843(this)s 480 8926(English)m 1005(master)s 8(.)k gsave 3434 12615 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1247 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 3315 10788 translate 240 fnt1 1927 2494 0 2494 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt5 560 1987(PURCELL)m 128 fnt1 1316 2059(1)m 140 fnt2 170 1807(@T)m 16(e)k 4(xtPlace)k gsave 170 924 translate 160 fnt1 567 0 0 0 160 180 40 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore 128 fnt1 170 785(1)m 160 fnt1 221 713(Blom,)m 703(Eric.)s 160 fnt6 1133 714(Some)m 170 534(Gr)m 5(eat)k 734(Composer)s 1(s.)k 160 fnt1 170 353(Oxford,)m 703(1944.)s 140 fnt2 170 173(@F)m 4(ootList)k grestore 140 fnt2 3315 10573(@P)m 5(ageList)k gsave 6802 13282 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1440 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore 200 fnt6 6862 13238(to)m 7061(printer)s 240 fnt1 0 8441(No)m 6(w)k 512(the)s 858(promotion)s 1910(of)s 2179(the)s 200 fnt1 2525 8450(PURCELL)m 240 fnt1 3468 8441(g)m 1(alle)k 3(y)k 4100(resumes.)s 5045(When)s 5672(the)s 6018(\207rst)s 6447(page)s 6953(is)s 7161(\207lled,)s 7757(Lout)s 8266(searches)s 0 8153(forw)m 2(ards)k 898(for)s 1236(another)s 220 fnt2 2013 8150(@T)m 26(e)k 6(xtPlace)k 240 fnt1 3231 8153(to)m 3470(recei)s 6(v)k 3(e)k 4206(the)s 4554(remainder)s 9(,)k 5620(once)s 6128(ag)s 1(ain)k 6702(e)s 3(xpanding)k 7750(a)s 220 fnt2 7916 8150(@P)m 8(ageList:)k 160 fnt1 480 4955(performer)m 6(,)k 1436(that)s 1967(is)s 480 4775(re)m 2(garded)k 1172(else)s 4(where)k 1940(as)s 480 4595(perfectly)m 1215(normal)s 1837(and)s 480 4415(natural;)m 1072(b)s 3(ut)k 1388(if)s 1608(foreign)s 480 4235(students)m 1215(of)s 1574(musical)s 480 4055(history)m 1286(ha)s 3(v)k 2(e)k 1947(to)s 480 3875(ackno)m 4(wledge)k 1440(a)s 1636(British)s 480 3695(musical)m 1105(genius,)s 1686(he)s 1967(is)s 480 3515(considered)m 1211(a)s 1322(freak.)s 800 3282(Such)m 1267(a)s 1488(freak)s 1967(is)s 480 3102(Henry)m 917(Purcell.)s 1480(Y)s 16(et)k 1736(if)s 1884(we)s 480 2922(mak)m 1(e)k 875(a)s 1000(choice)s 1467(of)s 1662(\207fteen)s 480 2742(of)m 717(the)s 1005(w)s 1(orld')k 8(s)k 1574(musical)s 480 2562(classics,)m 1050(as)s 1228(here,)s 1586(we)s 1820(\207nd)s 480 2382(that)m 774(we)s 1013(cannot)s 1495(omit)s 1843(this)s 480 2202(English)m 1005(master)s 8(.)k gsave 3434 4991 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1247 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 3315 5233 translate 240 fnt1 1927 2494 0 2494 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 160 fnt5 560 1987(PURCELL)m 128 fnt1 1316 2059(1)m 160 fnt1 170 1695(In)m 341(the)s 573(w)s 1(orld)k 983(of)s 1164(music)s 170 1515(England)m 741(is)s 881(supposed)s 1515(to)s 170 1335(be)m 358(a)s 469(mere)s 825(pro)s 2(vince.)k 1491(If)s 170 1155(she)m 708(produces)s 1608(an)s 170 975(indif)m 4(ferent)k 879(composer)s 1540(or)s 567 0 0 0 160 180 40 170 763 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 128 fnt1 170 624(1)m 160 fnt1 221 552(Blom,)m 703(Eric.)s 160 fnt6 1133 553(Some)m 170 373(Gr)m 5(eat)k 734(Composer)s 1(s.)k 160 fnt1 170 192(Oxford,)m 703(1944.)s grestore gsave 3315 2739 translate 240 fnt1 1927 2494 0 2494 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 140 fnt2 170 2222(@T)m 16(e)k 4(xtPlace)k 170 173(@F)m 4(ootSect)k grestore 140 fnt2 3315 2524(@P)m 5(ageList)k gsave 6802 7727 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 240 fnt1 68 -1 0 -1 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 240 fnt1 1440 0 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 240 fnt1 68 -1 0 0 240 288 60 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore 200 fnt6 6862 7683(to)m 7061(printer)s 240 fnt1 0 1717(and)m 404(so)s 671(on.)s 1076(All)s 1437(these)s 1985(e)s 3(xpansions)k 3098(and)s 3503(replacements)s 4814(are)s 5162(done)s 5685(with)s 6168(total)s 6648(inte)s 3(grity)k 15(.)k 7604(F)s 3(or)k 7994(e)s 3(xample,)k 8909(if)s 0 1429(Lout)m 510(\207nds)s 1024(after)s 1517(e)s 3(xpanding)k 220 fnt2 2563 1426(@F)m 6(ootSect)k 240 fnt1 3711 1429(that)m 4126(the)s 4472(page)s 4977(is)s 5184(too)s 5541(full)s 5924(to)s 6160(accept)s 6828(e)s 6(v)k 3(en)k 7325(the)s 7670(\207rst)s 8099(line)s 8510(of)s 8778(the)s 0 1141(footnote,)m 220 fnt2 915 1138(@F)m 6(ootSect)k 240 fnt1 2077 1141(is)m 2298(reset)s 2819(to)s 3070(une)s 3(xpanded)k 4294(and)s 4709(the)s 5068(search)s 5746(for)s 6096(a)s 6273(tar)s 4(get)k 6883(for)s 7232(the)s 7591(footnote)s 8456(mo)s 3(v)k 3(es)k 0 853(on.)m 396(And)s 858(the)s 1197(cross)s 1730(reference)s 2664(direction,)s 220 fnt2 3611 850(preceding)m 240 fnt1 4613 853(or)m 220 fnt2 4864 850(f)m 6(ollo)k 3(wing,)k 240 fnt1 5799 853(is)m 6000(al)s 2(w)k 2(ays)k 6702(obe)s 3(yed)k 7440(\(although)s 8405(lack)s 8855(of)s 0 565(space)m 586(sometimes)s 1658(pre)s 6(v)k 3(ents)k 2509(Lout)s 3020(from)s 3543(choosing)s 4460(the)s 4807(nearest)s 5542(tar)s 4(get\).)k 6323(Only)s 6855(the)s 7202(root)s 7646(g)s 1(alle)k 3(y)k 8278(contains)s 0 277(recepti)m 6(v)k 3(e)k 922(symbols)s 1771(in)s 2014(our)s 2393(running)s 3191(e)s 3(xample,)k 4105(b)s 4(ut)k 4467(an)s 3(y)k 4864(g)s 1(alle)k 3(y)k 5498(may)s 5964(contain)s 6725(them.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 14 20 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14867 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13450 0 13450 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 fnt5 0 12399(Chapter)m 1819(2.)s 2400(Details)s [ /Dest /LOUTdetails /DEST pdfmark 240 fnt5 0 11134(2.1.)m 471(Lexical)s 1270(structur)s 4(e)k 2263(\(w)s 2(ords,)k 3079(spaces,)s 3844(symbols\))s 4796(and)s 5237(macr)s 4(os)k [ /Dest /LOUTlexical /DEST pdfmark 240 fnt1 480 10657(The)m 902(input)s 1447(to)s 1679(Lout)s 2184(consists)s 2985(of)s 3249(a)s 3408(sequence)s 4334(of)s 240 fnt6 4598 10659(te)m 4(xtual)k 5297(units)s 240 fnt1 5757 10657(,)m [ /Dest /LOUT19_4605_det_lexi_1 /DEST pdfmark 5857(which)s 6492(may)s 6951(be)s 7226(either)s 240 fnt6 7822 10659(white)m 8386(spaces)s 240 fnt1 9019 10657(,)m 240 fnt6 0 10371(identi\207er)m 2(s,)k 1047(delimiter)s 2(s,)k 240 fnt1 2093 10369(or)m 240 fnt6 2352 10371(liter)m 3(al)k 2992(wor)s 8(ds)k 240 fnt1 3565 10369(.)m 3729(Each)s 4264(is)s 4474(a)s 4640(sequence)s 5573(of)s 240 fnt6 5844 10371(c)m 3(har)k 3(acter)k 2(s)k 240 fnt1 6914 10369(chosen)m 7636(from:)s [ /Dest /LOUT19_4605_det_lexi_2 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_3 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_4 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_5 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_6 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_7 /DEST pdfmark 480 9831(letter)m 220 fnt2 1934 9828(@ab-zAB-Z_)m 240 fnt1 480 9543(white)m 1067(space)s 240 fnt6 1934 9545(space)m 2592(formfeed)s 3568(tab)s 3988(ne)s 3(wline)k 240 fnt1 480 9255(quote)m 220 fnt2 1934 9252(")m 240 fnt1 480 8967(escape)m 220 fnt2 1934 8964(\\)m 240 fnt1 480 8679(comment)m 220 fnt2 1934 8676(#)m 240 fnt1 480 8391(other)m 220 fnt2 1934 8388(!$%&'\(\)*+,-./0123456789:;<=>?[]^`{|}~)m 240 fnt1 0 7850(Notice)m 732(that)s 220 fnt2 1189 7847(@)m 240 fnt1 1480 7850(and)m 220 fnt2 1923 7847(_)m 240 fnt1 2144 7850(are)m 2531(classed)s 3318(as)s 3608(letters.)s 4393(Basser)s 5129(Lout)s 5681(accepts)s 6474(the)s 6861(accented)s 7795(letters)s 8467(of)s 8778(the)s 0 7562(ISO-LA)m 26(TIN-1)k 1421(character)s 2388(set)s 2746(\(depending)s 3909(on)s 4238(ho)s 6(w)k 4732(it)s 4957(is)s 5200(installed\),)s 6228(and)s 6664(these)s 7244(are)s 7624(also)s 8095(classed)s 8876(as)s 0 7274(letters.)m 756(The)s 1195(ten)s 1555(digits)s 2148(are)s 2505(classed)s 3264(as)s 3525(`other')s 4218(characters,)s 5302(and)s 5717(in)s 5971(f)s 2(act)k 6397(the)s 6755(`other')s 7448(class)s 7974(contains)s 8833(all)s 0 6986(8-bit)m 511(characters)s 1529(\(e)s 3(xcept)k 2289(octal)s 2808(0\))s 3056(not)s 3422(assigned)s 4304(to)s 4543(pre)s 6(vious)k 5412(classes.)s 480 6612(A)m 240 fnt6 698 6614(white)m 1256(space)s 240 fnt1 1841 6612(is)m 2038(a)s 2191(sequence)s 3111(of)s 3369(one)s 3758(or)s 4005(more)s 4539(white)s 5113(space)s 5687(characters.)s [ /Dest /LOUT19_4605_det_lexi_8 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_9 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_10 /DEST pdfmark 6805(Lout)s 7304(treats)s 7858(the)s 8193(formfeed)s 0 6324(character)m 931(e)s 3(xactly)k 1668(lik)s 2(e)k 2076(the)s 2420(space)s 3003(character;)s 3985(it)s 4173(is)s 4379(useful)s 5014(for)s 5348(getting)s 6061(page)s 6565(breaks)s 7236(when)s 7808(printing)s 8614(Lout)s 0 6036(source)m 680(code.)s 480 5662(A)m 240 fnt6 709 5664(delimiter)m 240 fnt1 1635 5662(is)m 1844(a)s 2009(sequence)s 2941(of)s 3211(one)s 3612(or)s 3870(more)s 4415(`other')s 5096(characters)s 6113(which)s [ /Dest /LOUT19_4605_det_lexi_11 /DEST pdfmark 6754(is)s 6963(the)s 7310(name)s 7883(of)s 8153(a)s 8317(symbol.)s 0 5374(F)m 3(or)k 417(e)s 3(xample,)k 220 fnt2 1360 5371({)m 240 fnt1 1512 5374(and)m 220 fnt2 1945 5371(//)m 240 fnt1 2159 5374(are)m 2534(delimiters.)s 3681(When)s 4338(de\207ning)s 5205(a)s 5400(delimiter)s 9(,)k 6387(the)s 6764(name)s 7366(must)s 7920(be)s 8231(enclosed)s 0 5086(in)m 243(quotes:)s 220 fnt2 480 4587(def "^" { {} ^& {} })m 240 fnt1 0 4093(b)m 4(ut)k 361(quotes)s 1036(are)s 1381(not)s 1746(used)s 2242(when)s 2816(the)s 3163(delimiter)s 4082(is)s 4291(in)s 9(v)k 4(ok)k 2(ed.)k 5211(A)s 5439(delimiter)s 6359(may)s 6824(ha)s 4(v)k 3(e)k 7323(delimiters)s 8327(and)s 8729(an)s 3(y)k 0 3805(other)m 558(characters)s 1584(adjacent,)s 2495(whereas)s 3337(identi\207ers)s 4351(may)s 4825(not)s 5199(be)s 5489(adjacent)s 6353(to)s 6600(letters)s 7241(or)s 7508(other)s 8067(identi\207ers.)s 0 3517(The)m 428(complete)s 1360(list)s 1711(of)s 1982(prede\207ned)s 3050(delimiters)s 4055(is)s 220 fnt2 480 3016(/)m 480 2728(//)m 480 2440(^/)m 480 2152(^//)m 1727 3016(|)m 1727 2728(||)m 1727 2440(^|)m 1727 2152(^||)m 2974 3016(&)m 2974 2728(^&)m 4221 3016(&&)m 4221 2728({)m 4221 2440(})m 240 fnt1 0 1697(A)m 230(longer)s 901(delimiter)s 1822(lik)s 2(e)k 220 fnt2 2234 1694(<=)m 240 fnt1 2542 1697(will)m 2968(be)s 3250(recognised)s 4344(in)s 4587(preference)s 5650(to)s 5889(a)s 6055(shorter)s 6778(one)s 7180(lik)s 2(e)k 220 fnt2 7592 1694(<)m 240 fnt1 7710 1697(.)m 480 1323(An)m 240 fnt6 855 1325(identi\207er)m 240 fnt1 1808 1323(is)m 2043(a)s 2234(sequence)s 3192(of)s 3488(one)s 3915(or)s 4199(more)s 4772(letters)s 5430(which)s 6097(is)s 6332(the)s 6705(name)s 7304(of)s 7600(a)s [ /Dest /LOUT19_4605_det_lexi_12 /DEST pdfmark 7791(symbol.)s 8685(It)s 8916(is)s 0 1035(con)m 9(v)k 3(entional)k 1308(b)s 4(ut)k 1700(not)s 2096(essential)s 3003(to)s 3272(be)s 3(gin)k 3888(identi\207ers)s 4924(with)s 220 fnt2 5436 1032(@)m 240 fnt1 5627 1035(;)m 5829(Basser)s 6556(Lout)s 7098(will)s 7554(print)s 8095(a)s 8291(w)s 2(arning)k 0 747(message)m 865(if)s 1081(it)s 1272(\207nds)s 1788(an)s 2070(unquoted)s 3019(literal)s 3628(w)s 2(ord)k 4175(\(see)s 4614(belo)s 6(w\))k 5320(be)s 3(ginning)k 6327(with)s 220 fnt2 6808 744(@)m 240 fnt1 6999 747(,)m 7105(since)s 7651(such)s 8146(w)s 2(ords)k 8779(are)s 0 459(usually)m 748(misspelt)s 1608(identi\207ers.)s 2730(The)s 3162(ten)s 3515(digits)s 4100(are)s 4451(not)s 4820(letters)s 5457(and)s 5865(may)s 6334(not)s 6704(appear)s 7404(in)s 7651(identi\207ers;)s 8722(and)s 0 171(although)m 890(the)s 1233(underscore)s 2333(character)s 3262(is)s 3467(a)s 3628(letter)s 4172(and)s 4570(may)s 5031(be)s 5308(used)s 5800(in)s 6038(identi\207ers,)s 7095(it)s 7282(is)s 7487(not)s 7847(con)s 9(v)k 3(entional)k grestore gsave 1417 -14867 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5856 -15423(14)m grestore grestore grestore pgsave restore showpage %%Page: 15 21 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.1.)m 1871(Le)s 4(xical)k 2630(structur)s 8(e)k 3538(\(wor)s 8(ds,)k 4288(spaces,)s 5019(symbols\))s 5919(and)s 6345(macr)s 10(os)k 240 fnt5 10250 -1583(15)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(to)m 239(do)s 532(so.)s 909(The)s 1337(complete)s 2269(list)s 2620(of)s 2891(prede\207ned)s 3959(identi\207ers)s 4965(is)s 220 fnt2 150 12704(@Bac)m 4(kEnd)k 150 12416(@Bac)m 4(kg)k 2(round)k 150 12128(@Begin)m 150 11840(@BeginHeaderComponent)m 150 11552(@Break)m 150 11264(@Case)m 150 10976(@ClearHeaderComponent)m 150 10688(@Common)m 150 10400(@Char)m 150 10112(@CurrF)m 11(ace)k 150 9824(@CurrF)m 11(amily)k 150 9536(@CurrLang)m 150 9248(@CurrYUnit)m 150 8960(@CurrZUnit)m 150 8672(@Database)m 150 8384(@Enclose)m 150 8096(@End)m 150 7808(@EndHeaderComponent)m 150 7520(@Filter)m 150 7232(@FilterErr)m 150 6944(@FilterIn)m 150 6656(@FilterOut)m 150 6368(@F)m 6(ont)k 150 6080(@F)m 6(ontDef)k 150 5792(@F)m 6(orceGalle)k 4(y)k 150 5504(@Galle)m 4(y)k 150 5216(@GetConte)m 6(xt)k 150 4928(@Gr)m 2(aphic)k 150 4640(@HAdjust)m 150 4352(@HContr)m 2(act)k 150 4064(@HCo)m 3(v)k 5(er)k 150 3776(@HExpand)m 150 3488(@High)m 150 3200(@HLimited)m 150 2912(@HMirror)m 150 2624(@HScale)m 150 2336(@HShift)m 3031 12704(@HSpan)m 3031 12416(@Include)m 3031 12128(@IncludeGr)m 2(aphic)k 3031 11840(@IncludeGr)m 2(aphicRepeated)k 3031 11552(@Inser)m -8(t)k 3031 11264(@K)m 8(er)k -5(nShr)k -3(ink)k 3031 10976(@K)m 8(e)k 4(y)k 3031 10688(@Language)m 3031 10400(@LClos)m 3031 10112(@LEn)m 4(v)k 3031 9824(@LInput)m 3031 9536(@LUse)m 3031 9248(@LinkSource)m 3031 8960(@LinkDest)m 3031 8672(@Meld)m 3031 8384(@Merge)m 3031 8096(@Min)m 2(us)k 3031 7808(@Moment)m 3031 7520(@Ne)m 6(xt)k 3031 7232(@NotRe)m 6(v)k 5(ealed)k 3031 6944(@Null)m 3031 6656(@OneCol)m 3031 6368(@OneOf)m 3031 6080(@OneRo)m 3(w)k 3031 5792(@Open)m 3031 5504(@Optimiz)m 3(e)k 3031 5216(@Outline)m 3031 4928(@P)m 26(Adjust)k 3031 4640(@P)m 8(ageLabel)k 3031 4352(@PlainGr)m 2(aphic)k 3031 4064(@Plus)m 3031 3776(@PrependGr)m 2(aphic)k 3031 3488(@Ra)m 4(wV)k 17(erbatim)k 3031 3200(@Rotate)m 3031 2912(@Rump)m 3031 2624(@Scale)m 3031 2336(@SetColor)m 5915 12704(@SetColour)m 5915 12416(@SetConte)m 6(xt)k 5915 12128(@SetHeaderComponent)m 5915 11840(@Space)m 5915 11552(@Star)m -8(tHSpan)k 5915 11264(@Star)m -8(tHVSpan)k 5915 10976(@Star)m -8(tVSpan)k 5915 10688(@SysDatabase)m 5915 10400(@SysInclude)m 5915 10112(@SysIncludeGr)m 2(aphic)k 5915 9824(@SysIncludeGr)m 2(aphicRepeated)k 5915 9536(@SysPrependGr)m 2(aphic)k 5915 9248(@T)m 26(ag)k 5915 8960(@T)m 26(agged)k 5915 8672(@T)m 26(arget)k 5915 8384(@T)m 26(e)k 6(xture)k 5915 8096(@SetT)m 26(e)k 6(xture)k 5915 7808(@Under)m -3(line)k 5915 7520(@SetUnder)m -3(lineColor)k 5915 7232(@SetUnder)m -3(lineColour)k 5915 6944(@Use)m 5915 6656(@URLLink)m 5915 6368(@V)m 17(Adjust)k 5915 6080(@VContr)m 2(act)k 5915 5792(@VCo)m 3(v)k 5(er)k 5915 5504(@V)m 17(erbatim)k 5915 5216(@VExpand)m 5915 4928(@VLimited)m 5915 4640(@VMirror)m 5915 4352(@VScale)m 5915 4064(@VShift)m 5915 3776(@VSpan)m 5915 3488(@Wide)m 5915 3200(@Y)m 4(ield)k 5915 2912(@YUnit)m 5915 2624(@ZUnit)m 240 fnt1 0 1881(plus)m 498(the)s 894(names)s 1605(of)s 1924(the)s 2321(parameters)s 3467(of)s 220 fnt2 3786 1878(@Moment)m 240 fnt1 4798 1881(.)m 5011(The)s 5487(symbols)s 220 fnt2 6385 1878(@LClos)m 240 fnt1 7161 1881(,)m 220 fnt2 7316 1878(@LEn)m 4(v)k 240 fnt1 8034 1881(,)m [ /Dest /LOUT19_4605_det_lexi_13 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_14 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_15 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_16 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_17 /DEST pdfmark 220 fnt2 8190 1878(@LInput)m 240 fnt1 9019 1881(,)m 220 fnt2 0 1590(@L)m 24(Vis)k 240 fnt1 722 1593(and)m 220 fnt2 1170 1590(@LUse)m 240 fnt1 2001 1593(appear)m 2742(in)s 3029(cross)s 3615(reference)s 4602(databases)s 5613(generated)s 6644(by)s 6982(Lout)s 7538(and)s 7986(are)s 8377(not)s 8788(for)s 0 1305(use)m 375(else)s 6(where.)k 480 931(A)m 728(sequence)s 1679(of)s 1968(characters)s 3004(which)s 3664(is)s 3892(neither)s 4633(a)s 4817(white)s 5422(space,)s 6078(an)s 6379(identi\207er)s 9(,)k 7357(nor)s 7754(a)s 7938(delimiter)s 9(,)k 8916(is)s 0 643(by)m 304(def)s 2(ault)k 1036(a)s 240 fnt6 1213 645(liter)m 3(al)k 1864(wor)s 8(d)k 240 fnt1 2355 643(,)m 2473(which)s 3126(means)s 3799(that)s 4227(it)s 4430(will)s [ /Dest /LOUT19_4605_det_lexi_18 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_19 /DEST pdfmark [ /Dest /LOUT19_4605_det_lexi_20 /DEST pdfmark 4867(pass)s 5341(through)s 6154(Lout)s 6677(unchanged.)s 7890(An)s 8251(arbitrary)s 0 355(sequence)m 926(of)s 1190(characters)s 2201(enclosed)s 3089(in)s 3325(double)s 4026(quotes,)s 4751(for)s 5082(e)s 3(xample)k 220 fnt2 5938 352("{ }",)m 240 fnt1 6457 355(is)m 6660(also)s 7091(a)s 7250(literal)s 7853(w)s 2(ord.)k 8499(Space)s 0 67(characters)m 1005(may)s 1458(be)s 1726(included,)s 2644(b)s 4(ut)k 2992(not)s 3345(tabs)s 3767(or)s 4013(ne)s 6(wlines.)k 5008(There)s 5607(are)s 5941(special)s 6645(character)s 7566(sequences,)s 8629(used)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 16 22 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(16)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(only)m 480(between)s 1334(quotes,)s 2066(for)s 2404(obtaining)s 3361(otherwise)s 4346(inaccessible)s 5556(characters:)s 220 fnt2 480 12664(\\")m 240 fnt1 1235 12667(produces)m 220 fnt2 2150 12664(")m 480 12376(\\\\)m 240 fnt1 1235 12379(\\)m 220 fnt2 480 12088(\\ddd)m 240 fnt1 1235 12091(the)m 1583(character)s 2517(whose)s 3185(ASCII)s 3865(code)s 4373(is)s 1235 11803(the)m 1583(up)s 1876(to)s 2115(three)s 2648(digit)s 3146(octal)s 3665(number)s 220 fnt2 4456 11800(ddd)m 240 fnt1 0 11262(So,)m 360(for)s 698(e)s 3(xample,)k 220 fnt2 1612 11259("\\"@PP\\"")m 240 fnt1 2606 11262(produces)m 220 fnt2 3521 11259("@PP")m 240 fnt1 4177 11262(.)m 480 10888(When)m 1106(the)s 1451(comment)s 2398(character)s [ /Dest /LOUT19_4605_det_lexi_21 /DEST pdfmark 220 fnt2 3328 10885(#)m 240 fnt1 3502 10888(is)m 3709(encountered,)s 4982(e)s 6(v)k 3(erything)k 6045(from)s 6566(that)s 6981(point)s 7530(to)s 7765(the)s 8110(end)s 8511(of)s 8778(the)s 0 10600(line)m 414(is)s 624(ignored.)s 1519(This)s 1995(is)s 2205(useful)s 2844(for)s 3182(including)s 4139(reminders)s 5145(to)s 5384(oneself,)s 6181(lik)s 2(e)k 6593(this:)s 220 fnt2 480 10103(# Lout user man)m 2(ual)k 480 9815(# J)m 6(.)k 13( Kingston, J)k 4(une 1989)k 240 fnt1 0 9316(for)m 338(temporarily)s 1506(deleting)s 2329(parts)s 2844(of)s 3115(the)s 3463(document,)s 4514(and)s 4918(so)s 5184(on.)s 240 fnt6 480 8944(Macr)m 10(os)k [ /Dest /LOUT19_4605_det_lexi_22 /DEST pdfmark 240 fnt1 1268 8942(pro)m 3(vide)k 2064(a)s 2242(means)s 2916(of)s 3199(de\207ning)s 4049(symbols)s 4910(which)s 5564(stand)s 6139(for)s 6489(a)s 6667(sequence)s 7612(of)s 7895(te)s 3(xtual)k 8610(units)s 0 8654(rather)m 616(than)s 1085(an)s 1368(object.)s 2116(F)s 3(or)k 2505(e)s 3(xample,)k 3419(the)s 3767(macro)s 4417(de\207nition)s 220 fnt2 480 8153(macro @PP { //1.3vx 2.0f @Wide &0i })m 240 fnt1 0 7659(mak)m 2(es)k 663(Lout)s 1178(replace)s 1926(the)s 2277(symbol)s 220 fnt2 3040 7656(@PP)m 240 fnt1 3609 7659(by)m 3906(the)s 4258(gi)s 6(v)k 3(en)k 4841(te)s 3(xtual)k 5546(units)s 6065(before)s 6734(assembling)s 7866(its)s 8145(input)s 8701(into)s 0 7371(objects.)m 841(A)s 1071(similar)s 1793(macro)s 2443(to)s 2682(this)s 3077(one)s 3479(is)s 3689(used)s 4186(to)s 4425(separate)s 5262(the)s 5610(paragraphs)s 6710(of)s 6981(the)s 7329(present)s 8078(document.)s 0 7083(The)m 450(enclosing)s 1442(braces)s 2126(and)s 2552(an)s 3(y)k 2972(spaces)s 3669(adjacent)s 4548(to)s 4809(them)s 5370(are)s 5739(dropped,)s 6654(which)s 7318(can)s 7730(be)s 8034(a)s 8223(problem:)s 220 fnt2 0 6792(@PP2i)m 240 fnt1 731 6795(has)m 1101(result)s 220 fnt2 1691 6792(//1.3vx 2.0f @Wide &0i2i)m 240 fnt1 4141 6795(which)m 4783(is)s 4993(erroneous.)s 480 6421(The)m 938(meaning)s 1846(of)s 2148(symbols)s 3028(used)s 3556(within)s 4254(the)s 4633(body)s 5198(of)s 5500(a)s 5697(macro)s 6377(is)s 6618(determined)s 7782(by)s 8107(where)s 8778(the)s 0 6133(macro)m 667(is)s 895(de\207ned,)s 1724(not)s 2108(by)s 2419(where)s 3077(it)s 3287(is)s 3514(used.)s 4135(Due)s 4607(to)s 4864(implementation)s 6438(problems,)s 220 fnt2 7453 6130(@Open)m 240 fnt1 8277 6133(symbols)m 0 5845(will)m 423(not)s 786(w)s 2(ork)k 1333(within)s 1998(macros.)s 2849(Named)s 3594(and)s 3995(body)s 4525(parameters)s 5620(will)s 6043(w)s 2(ork)k 6590(if)s 6804(the)s 7149(symbol)s 7905(that)s 8320(the)s 3(y)k 8779(are)s 0 5557(parameters)m 1090(of)s 1352(is)s 1553(also)s 1983(present.)s 2828(There)s 3432(is)s 3633(no)s 3918(w)s 2(ay)k 4360(to)s 4590(get)s 4934(a)s 5091(left)s 5459(or)s 5709(right)s 6212(brace)s 6776(into)s 7192(the)s 7532(body)s 8057(of)s 8319(a)s 8476(macro)s 0 5269(without)m 791(the)s 1139(matching)s 2082(brace.)s 480 4895(Macros)m 1252(may)s 1723(be)s 2010(nested)s 2683(within)s 3356(other)s 3912(de\207nitions)s 4978(and)s 5386(e)s 3(xported,)k 6332(b)s 4(ut)k 6699(the)s 3(y)k 7166(may)s 7637(not)s 8008(be)s 8295(parame-)s 0 4607(ters.)m 511(The)s 3(y)k 1058(may)s 1527(not)s 1897(ha)s 4(v)k 3(e)k 2401(parameters)s 3503(or)s 3765(nested)s 4438(de\207nitions)s 5502(of)s 5777(their)s 6277(o)s 6(wn,)k 6795(and)s 7202(consequently)s 8523(a)s 8693(pre-)s 0 4319(ceding)m 220 fnt2 691 4316(e)m 6(xpor)k -8(t)k 240 fnt1 1359 4319(clause)m 2012(\(Section)s 2865(2.3\))s 3293(w)s 2(ould)k 3948(be)s 4230(pointless;)s 5192(ho)s 6(we)k 6(v)k 3(er)k 9(,)k 6099(an)s 220 fnt2 6382 4316(impor)m -8(t)k 240 fnt1 7055 4319(clause)m 7708(is)s 7918(permitted.)s 240 fnt5 0 3527(2.2.)m 471(Named)s 1257(parameters)s [ /Dest /LOUTnamed /DEST pdfmark 240 fnt1 480 3050(In)m 728(addition)s 1560(to)s 1790(left)s 2159(and)s 2554(right)s 3056(\(or)s 3386(body\))s 3985(parameters,)s 5130(a)s 5288(symbol)s 6039(may)s 6496(ha)s 4(v)k 3(e)k 6989(an)s 3(y)k 7377(number)s 8159(of)s 240 fnt6 8421 3052(named)m 0 2764(par)m 3(ameter)k 2(s)k 240 fnt1 1080 2762(:)m [ /Dest /LOUT19_4605_det_name_1 /DEST pdfmark [ /Dest /LOUT19_4605_det_name_2 /DEST pdfmark 220 fnt2 480 2265(def @Chapter)m 480 1977( named @T)m 26(ag {})k 480 1689( named @Title {})m 480 1401( r)m -3(ight x)k 480 1113({)m 480 825( ...)m 480 537(})m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 17 23 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.2.)m 1871(Named)s 2616(par)s 3(ameter)k 2(s)k 240 fnt5 10248 -1583(17)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(Their)m 577(de\207nitions)s 1639(appear)s 2336(in)s 2580(between)s 3434(those)s 3996(of)s 4267(an)s 3(y)k 4665(left)s 5042(and)s 5447(right)s 5958(parameters,)s 7113(and)s 7517(each)s 8013(is)s 8224(follo)s 6(wed)k 0 12917(by)m 293(a)s 240 fnt6 457 12919(default)m 1183(value)s 240 fnt1 1753 12917(between)m [ /Dest /LOUT19_4605_det_name_3 /DEST pdfmark 2605(braces.)s 3377(When)s 220 fnt2 4004 12914(@Chapter)m 240 fnt1 5066 12917(is)m 5274(in)s 9(v)k 4(ok)k 2(ed,)k 6136(its)s 6411(named)s 7105(parameters)s 8201(are)s 8546(gi)s 6(v)k 3(en)k 0 12629(v)m 6(alues)k 656(in)s 899(the)s 1247(follo)s 6(wing)k 2224(w)s 2(ay:)k 220 fnt2 480 12128(@Chapter)m 480 11840( @T)m 26(ag { intro })k 480 11552( @Title { Introduction })m 480 11264({)m 480 10976( ...)m 480 10688(})m 240 fnt1 0 10194(That)m 485(is,)s 737(a)s 889(list)s 1226(of)s 1483(named)s 2166(parameters)s 3250(appears)s 4017(immediately)s 5251(follo)s 6(wing)k 6214(the)s 6549(symbol,)s 7347(each)s 7828(with)s 8296(its)s 8558(v)s 6(alue)k 0 9906(enclosed)m 900(in)s 1149(braces.)s 1929(An)s 3(y)k 2399(right)s 2916(parameter)s 3936(follo)s 6(ws)k 4704(after)s 5206(them.)s 5854(The)s 3(y)k 6403(do)s 6702(not)s 7074(ha)s 4(v)k 3(e)k 7581(to)s 7826(appear)s 8529(in)s 8778(the)s 0 9618(order)m 558(the)s 3(y)k 1015(were)s 1529(de\207ned,)s 2334(and)s 2732(the)s 3(y)k 3189(can)s 3571(e)s 6(v)k 3(en)k 4065(be)s 4341(omitted)s 5122(altogether)s 9(,)k 6169(in)s 6406(which)s 7041(case)s 7502(the)s 7844(def)s 2(ault)k 8558(v)s 6(alue)k 0 9330(from)m 524(the)s 872(de\207nition)s 1846(is)s 2056(used)s 2553(instead.)s 480 8956(If)m 699(the)s 1036(k)s 2(e)k 3(yw)k 2(ord)k 220 fnt2 1913 8953(compulsor)m -6(y)k 240 fnt1 3088 8956(appears)m 3858(after)s 220 fnt2 4342 8953(named)m 240 fnt1 5050 8956(and)m 5442(before)s 6097(the)s 6434(parameter')s 13(s)k 7586(name,)s 8200(Lout)s 8700(will)s 0 8668(print)m 501(a)s 657(w)s 2(arning)k 1481(message)s 2337(whene)s 6(v)k 3(er)k 3307(this)s 3693(parameter)s 4696(is)s 4896(missing.)s 5793(Ho)s 6(we)k 6(v)k 3(er)k 6705(it)s 6886(will)s 7302(still)s 7703(use)s 8068(the)s 8405(def)s 2(ault)k 0 8380(v)m 6(alue)k 568(as)s 818(just)s 1223(described.)s 480 8006(A)m 719(named)s 220 fnt2 1424 8003(@T)m 26(ag)k 240 fnt1 2057 8006(parameter)m [ /Dest /LOUT19_4605_det_name_4 /DEST pdfmark 3080(does)s 3580(not)s 3955(tak)s 2(e)k 4417(its)s 4702(def)s 2(ault)k 5433(v)s 6(alue)k 6010(from)s 6544(the)s 6901(de\207nition;)s 7940(instead,)s 8733(if)s 8960(a)s 0 7718(def)m 2(ault)k 726(v)s 6(alue)k 1300(is)s 1516(needed,)s 2306(Lout)s 2824(in)s 9(v)k 3(ents)k 3560(a)s 3731(simple)s 4430(w)s 2(ord)k 4984(which)s 5631(dif)s 6(fers)k 6304(from)s 6834(e)s 6(v)k 3(ery)k 7415(other)s 7972(tag.)s 8434(This)s 8916(is)s 0 7430(important,)m 1034(for)s 1370(e)s 3(xample,)k 2282(in)s 2523(the)s 2868(production)s 3960(of)s 4229(numbered)s 5242(chapters)s 6086(and)s 6488(sections)s 7307(\(Section)s 8158(4.4\).)s 8698(The)s 0 7142(same)m 551(thing)s 1101(occurs)s 1781(if)s 2003(there)s 2541(is)s 2756(a)s 220 fnt2 2927 7139(@T)m 26(ag)k 240 fnt1 3555 7142(parameter)m 4574(b)s 4(ut)k 4940(its)s 5221(v)s 6(alue)k 5794(is)s 6009(the)s 6362(empty)s 7019(object:)s 7774(the)s 8127(v)s 6(alue)k 8700(will)s 0 6854(be)m 282(replaced)s 1149(by)s 1443(an)s 1726(in)s 9(v)k 3(ented)k 2596(one.)s 480 6480(Named)m 1229(parameters)s 2327(may)s 2793(ha)s 4(v)k 3(e)k 3294(parameters,)s [ /Dest /LOUTstrange /DEST pdfmark 4448(as)s 4698(in)s 4941(the)s 5289(follo)s 6(wing)k 6266(de\207nition:)s 220 fnt2 480 5979(def @Str)m 2(ange)k 480 5691( named @F)m 6(or)k -5(mat r)k -3(ight @V)k 15(al { [@V)k 15(al] })k 480 5403( r)m -3(ight x)k 480 5115({)m 480 4827( @F)m 6(or)k -5(mat x)k 480 4539(})m 240 fnt1 0 4045(The)m 428(named)s 1125(parameter)s 220 fnt2 2139 4042(@F)m 6(or)k -5(mat)k 240 fnt1 3113 4045(has)m 3483(right)s 3995(parameter)s 220 fnt2 5010 4042(@V)m 15(al)k 240 fnt1 5520 4045(,)m 5627(and)s 6032(the)s 6380(def)s 2(ault)k 7102(v)s 6(alue)k 7670(of)s 220 fnt2 7942 4042(@F)m 6(or)k -5(mat)k 240 fnt1 8916 4045(is)m 0 3757(this)m 394(parameter)s 1406(enclosed)s 2299(in)s 2539(brack)s 2(ets.)k 3495(When)s 220 fnt2 4122 3754(@F)m 6(or)k -5(mat)k 240 fnt1 5093 3757(is)m 5300(in)s 9(v)k 4(ok)k 2(ed)k 6113(it)s 6303(must)s 6826(be)s 7105(supplied)s 7972(with)s 8452(a)s 8615(right)s 0 3469(parameter)m 9(,)k 1052(which)s 1694(will)s 2120(replace)s 220 fnt2 2865 3466(@V)m 15(al)k 240 fnt1 3375 3469(.)m 3539(Thus,)s 220 fnt2 480 2968(@Str)m 2(ange 27)k 240 fnt1 0 2469(equals)m 220 fnt2 662 2466(@F)m 6(or)k -5(mat 27)k 240 fnt1 1937 2469(and)m 2341(so)s 2607(has)s 2977(result)s 480 1967([27])m 0 1479(The)m 220 fnt2 428 1476(@F)m 6(or)k -5(mat)k 240 fnt1 1401 1479(symbol)m 2161(is)s 2371(lik)s 2(e)k 2783(a)s 2949(de\207nition)s 3923(with)s 4405(parameters)s 5503(whose)s 6171(body)s 6705(can)s 7094(be)s 7376(changed:)s 220 fnt2 480 978(@Str)m 2(ange)k 480 690( @F)m 6(or)k -5(mat { Slope @F)k 6(ont @V)k 15(al.)k 13( })k 480 402(27)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 18 24 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(18)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(still)m 412(equals)s 220 fnt2 1074 13202(@F)m 6(or)k -5(mat 27)k 240 fnt1 2289 13205(,)m 2396(b)s 4(ut)k 2758(this)s 3154(time)s 3634(the)s 3982(result)s 4572(is)s 240 fnt6 480 12704(27.)m 240 fnt1 0 12250(In)m 252(practice,)s 1110(e)s 3(xamples)k 2057(of)s 2323(named)s 3015(parameters)s 4109(with)s 4586(parameters)s 5680(all)s 5969(ha)s 4(v)k 3(e)k 6466(this)s 6857(\210a)s 4(v)k 4(our)k 7583(of)s 7850(format)s 8541(being)s 0 11962(separated)m 996(from)s 1556(content;)s 2409(running)s 3243(headers)s 4060(\(Section)s 4950(4.3\))s 5414(and)s 5854(printing)s 6701(styles)s 7332(for)s 7707(bibliographies)s 0 11674(\(Section)m 853(4.5\))s 1281(are)s 1628(tw)s 2(o)k 2038(major)s 2655(ones.)s 240 fnt5 0 10881(2.3.)m 471(Nested)s 1216(de\207nitions,)s 2392(body)s 2954(parameters,)s 4236(extend,)s 5027(import,)s 5844(and)s 6285(export)s [ /Dest /LOUTvisibility /DEST pdfmark 240 fnt1 480 10404(A)m 710(de\207nition)s 1684(may)s 2150(contain)s [ /Dest /LOUT19_4605_det_visi_1 /DEST pdfmark 2911(other)s 3462(de\207nitions)s 4523(at)s 4755(the)s 5103(be)s 3(ginning)k 6111(of)s 6382(its)s 6658(body:)s 220 fnt2 480 9903(def @NineSquare)m 480 9615( r)m -3(ight x)k 480 9327({)m 480 9039( def @Three { x |0.2i x |0.2i x })m 480 8463( @Three /0.2i @Three /0.2i @Three)m 480 8175(})m 240 fnt1 0 7681(A)m 227(parameter)s 1238(lik)s 2(e)k 220 fnt2 1646 7678(x)m 240 fnt1 1811 7681(may)m 2274(be)s 2552(in)s 9(v)k 4(ok)k 2(ed)k 3364(an)s 3(ywhere)k 4343(within)s 5008(the)s 5353(body)s 5883(of)s 6151(the)s 6495(symbol)s 7252(it)s 7441(is)s 7647(a)s 7810(parameter)s 8820(of,)s 0 7393(including)m 973(within)s 1657(nested)s 2342(de\207nitions.)s 3532(A)s 3778(nested)s 4463(symbol)s 5239(lik)s 2(e)k 220 fnt2 5667 7390(@Three)m 240 fnt1 6531 7393(may)m 7013(be)s 7311(in)s 9(v)k 4(ok)k 2(ed)k 8143(an)s 3(ywhere)k 0 7105(from)m 518(the)s 860(be)s 3(ginning)k 1862(of)s 2127(its)s 2397(o)s 6(wn)k 2855(body)s 3383(to)s 3616(the)s 3958(end)s 4355(of)s 4620(the)s 4962(body)s 5490(of)s 5755(the)s 6097(symbol)s 6851(it)s 7037(is)s 7241(de\207ned)s 7998(within.)s 8766(So,)s 0 6817(assuming)m 957(an)s 1240(appropriate)s 2384(de\207nition)s 3358(of)s 220 fnt2 3629 6814(@Bo)m 6(x)k 240 fnt1 4222 6817(,)m 220 fnt2 480 6316(@NineSquare @Bo)m 6(x)k 240 fnt1 0 5820(has)m 370(result)s 2796 2796 226 2570 240 288 60 480 2734 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 740 740 226 514 240 288 60 0 2056 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 1028 2056 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 2056 2056 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 0 1028 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 1028 1028 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 2056 1028 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 0 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 1028 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore 740 740 226 514 240 288 60 2056 0 LoutGr2 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore grestore end end restore grestore 0 2283(Nested)m 722(de\207nitions)s 1783(may)s 2249(themselv)s 3(es)k 3359(contain)s 4120(nested)s 4789(de\207nitions,)s 5906(to)s 6145(arbitrary)s 7020(depth.)s 480 1909(There)m 1100(are)s 1454(three)s 1994(special)s 2719(features)s 3532(which)s 4181(permit)s 4872(a)s 5045(nested)s 5721(symbol)s 6488(or)s 6754(parameter)s 7775(to)s 8021(be)s 8311(in)s 9(v)k 4(ok)k 2(ed)k 0 1621(outside)m 737(its)s 1003(normal)s 1725(range;)s 2358(that)s 2766(is,)s 3022(outside)s 3759(the)s 4096(body)s 4620(of)s 4881(the)s 5219(enclosing)s 6179(symbol.)s 7038(The)s 7456(\207rst)s 7877(and)s 8270(simplest)s 0 1333(of)m 267(these)s 810(features)s 1611(is)s 1817(the)s 240 fnt6 2161 1335(body)m 2678(par)s 3(ameter)k 240 fnt1 3677 1333(,)m [ /Dest /LOUT19_4605_det_visi_2 /DEST pdfmark [ /Dest /LOUT19_4605_det_visi_3 /DEST pdfmark 3780(an)s 4059(alternati)s 6(v)k 3(e)k 5108(form)s 5628(of)s 5895(right)s 6401(parameter)s 13(.)k 7502(The)s 7926(Eq)s 8245(equation)s 0 1045(formatting)m 1053(package)s 1885([)s [ /Rect [1956 1042 2062 1210] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkingston1995lout_user /ANN pdfmark 1956(5)s 2062(,)s 2161(Chapter)s 2970(7])s 3200(is)s 3401(a)s 3559(classic)s 4240(e)s 3(xample)k 5095(of)s 5358(the)s 5698(use)s 6064(of)s 6327(a)s 6485(body)s 7011(parameter)s 13(.)k 8108(In)s 8355(outline,)s 0 757(it)m 192(looks)s 762(lik)s 2(e)k 1174(this:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 19 25 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.3.)m 1871(Nested)s 2588(de\207nitions,)s 3678(body)s 4200(par)s 3(ameter)k 2(s,)k 5378(e)s 4(xtend,)k 6091(import,)s 6822(and)s 7248(e)s 4(xport)k 240 fnt5 10249 -1583(19)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13268 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13211(e)m 6(xpor)k -8(t "+" sup o)k 3(v)k 5(er)k 480 12635(def @Eq)m 480 12347( body x)m 480 12059({)m 480 11771( def "+" ...)m 480 11483( def sup ...)m 480 11195( def o)m 3(v)k 5(er ...)k 480 10907( ...)m 480 10331( Slope @F)m 6(ont x)k 480 10043(})m 240 fnt1 0 9549(First)m 518(we)s 874(list)s 1246(those)s 1828(nested)s 2518(symbols)s 3388(and)s 3813(parameters)s 4932(that)s 5371(we)s 5727(intend)s 6404(to)s 6664(refer)s 7194(to)s 7454(outside)s 8222(the)s 8592(body)s 0 9261(of)m 220 fnt2 274 9258(@Eq)m 240 fnt1 815 9261(in)m 1061(an)s 220 fnt2 1347 9258(e)m 6(xpor)k -8(t)k 240 fnt1 2018 9261(clause,)m [ /Dest /LOUT19_4605_det_visi_4 /DEST pdfmark 2725(preceding)s 3724(the)s 4075(de\207nition)s 5052(as)s 5305(sho)s 6(wn.)k 6092(Only)s 6628(e)s 3(xported)k 7523(symbols)s 8375(may)s 8844(be)s 0 8973(in)m 9(v)k 4(ok)k 2(ed)k 817(outside)s 1566(the)s 1916(body)s 2452(of)s 220 fnt2 2725 8970(@Eq)m 240 fnt1 3203 8973(.)m 3369(The)s 3799(body)s 4335(parameter)s 5351(is)s 5563(lik)s 2(e)k 5977(a)s 6145(right)s 6658(parameter)s 7674(e)s 3(xcept)k 8357(that)s 8778(the)s 0 8685(e)m 3(xported)k 892(symbols)s 1741(are)s 2088(visible)s 2781(within)s 3449(it:)s 220 fnt2 480 8184(@Eq { {x sup 2 + y sup 2} o)m 3(v)k 5(er 2 })k 240 fnt1 0 7686(calls)m 488(on)s 785(the)s 1133(nested)s 1802(de\207nitions)s 2863(of)s 220 fnt2 3134 7683(@Eq)m 240 fnt1 3672 7686(to)m 3911(produce)s 4738(the)s 5086(result)s 167 fnt4 586 7233(2)m 240 fnt6 480 7173(x)m 240 fnt4 737 7165(+)m 167 fnt4 1040 7233(2)m 240 fnt6 938 7173(y)m 639 0 0 0 240 288 12 480 7075 LoutGr2 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 240 fnt4 742 6847(2)m 240 fnt1 0 6336(The)m 416(body)s 937(parameter')s 13(s)k 2089(v)s 6(alue)k 2644(must)s 3156(be)s 3426(enclosed)s 4308(in)s 4539(braces.)s 5300(The)s 5715(term)s 6200(`body)s 6800(parameter')s 7854(is)s 8051(a)s 8204(reminder)s 0 6048(that)m 418(the)s 766(v)s 6(alue)k 1334(is)s 1544(interpreted)s 2636(as)s 2886(if)s 3103(it)s 3295(w)s 2(as)k 3716(within)s 4384(the)s 4732(body)s 5266(of)s 5537(the)s 5885(symbol.)s 480 5674(A)m 710(body)s 1244(parameter)s 2257(may)s 2723(not)s 3089(be)s 3370(e)s 3(xported,)k 4311(and)s 4714(in)s 4957(f)s 2(act)k 5372(a)s 5537(body)s 6071(parameter)s 7085(may)s 7550(be)s 7832(in)s 9(v)k 4(ok)k 2(ed)k 8646(only)s 0 5386(within)m 656(the)s 991(body)s 1512(of)s 1770(the)s 2105(enclosing)s 3063(symbol,)s 3862(not)s 4215(within)s 4870(an)s 3(y)k 5254(nested)s 5911(de\207nitions.)s 7072(F)s 3(or)k 7448(e)s 3(xample,)k 220 fnt2 8349 5383(x)m 240 fnt1 8504 5386(abo)m 3(v)k 3(e)k 0 5098(may)m 471(not)s 843(be)s 1131(in)s 9(v)k 4(ok)k 2(ed)k 1952(within)s 220 fnt2 2626 5095(sup)m 240 fnt1 2972 5098(.)m 3141(This)s 3623(restriction)s 4653(is)s 4869(needed)s 5611(to)s 5855(a)s 4(v)k 4(oid)k 6443(the)s 6797(possibility)s 7853(of)s 8130(recursion,)s 0 4810(when)m 585(the)s 943(actual)s 1577(body)s 2121(parameter)s 3145(in)s 9(v)k 4(ok)k 2(es)k 3935(an)s 4228(e)s 3(xported)k 5129(nested)s 5808(de\207nition)s 6792(which)s 7443(in)s 9(v)k 4(ok)k 2(es)k 8234(the)s 8592(body)s 0 4522(parameter)m 9(,)k 1052(etc.)s 480 4148(The)m 932(second)s 1679(place)s 2263(where)s 2928(e)s 3(xported)k 3844(symbols)s 4717(may)s 5207(be)s 5514(used)s 6035(is)s 6269(in)s 6536(the)s 6909(right)s 7444(parameter)s 8482(of)s 8778(the)s 220 fnt2 0 3857(@Open)m 240 fnt1 806 3860(symbol,)m 1618(and)s 2022(follo)s 6(wing)k 2999(its)s 3275(alternati)s 6(v)k 3(e)k 4329(form,)s 220 fnt2 4900 3857(@Use)m 240 fnt1 5565 3860(\(Section)m 6418(3.40\).)s 480 3486(Exported)m 1480(nested)s 2214(symbols)s 3128(and)s 3598(parameters)s 4761(may)s 5292(be)s 5639(made)s 6279(visible)s 7037(within)s 7770(a)s 8002(subsequent)s 0 3198(de\207nition)m 974(or)s 1233(macro)s 1883(by)s 2177(preceding)s 3173(it)s 3365(with)s 3847(an)s 220 fnt2 4130 3195(impor)m -8(t)k [ /Dest /LOUT19_4605_det_visi_5 /DEST pdfmark 240 fnt1 4803 3198(clause,)m 5507(lik)s 2(e)k 5919(this:)s 220 fnt2 480 2697(impor)m -8(t @Eq)k 480 2409(def p)m 6(ythag { sqr)k -8(t { x sup 2 + y sup 2 } })k 240 fnt1 0 1910(Note)m 548(ho)s 6(we)k 6(v)k 3(er)k 1444(that)s 220 fnt2 1889 1907(p)m 6(ythag)k 240 fnt1 2617 1910(can)m 3033(only)s 3540(be)s 3849(used)s 4374(with)s 4883(some)s 5471(in)s 9(v)k 4(ocation)k 6552(of)s 220 fnt2 6850 1907(@Eq)m 240 fnt1 7328 1910(:)m 7521(within)s 8216(the)s 8592(body)s 0 1622(parameter)m 1036(of)s 1329(an)s 1635(in)s 9(v)k 4(ocation)k 2711(of)s 220 fnt2 3005 1619(@Eq)m 240 fnt1 3483 1622(,)m 3612(within)s 4303(the)s 4673(right)s 5207(parameter)s 6243(of)s 6537(an)s 220 fnt2 6842 1619(@Eq&&tag @Open)m 240 fnt1 8737 1622(,)m 8867(or)s 0 1334(follo)m 6(wing)k 977(a)s 220 fnt2 1143 1331(@Use { @Eq ...)m 13( })k 240 fnt1 2798 1334(.)m 2962(There)s 3575(may)s 4041(be)s 4323(se)s 6(v)k 3(eral)k 5045(symbols)s 5894(in)s 6137(the)s 220 fnt2 6485 1331(impor)m -8(t)k 240 fnt1 7158 1334(clause.)m 480 960(In)m 760(a)s 951(similar)s 1698(w)s 2(ay)k 2174(to)s 220 fnt2 2438 957(impor)m -8(t)k 240 fnt1 3051 960(,)m 3183(a)s 3374(de\207nition)s 4373(may)s 4864(be)s 5171(preceded)s 6117(by)s 220 fnt2 6436 957(e)m 6(xtend)k 240 fnt1 7162 960(follo)m 6(wed)k 8089(by)s 8408(a)s 8599(sym-)s 0 672(bol)m 361(name:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 20 26 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(20)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(e)m 6(xtend @Eq)k 480 12919(def p)m 6(ythag { sqr)k -8(t { x sup 2 + y sup 2 } })k 240 fnt1 0 12420(The)m 418(ef)s 6(fect)k 1003(of)s 1264(this)s 1649(is)s 1849(just)s 2243(as)s 2483(though)s 3195(the)s 3533(de\207nition)s 4496(of)s 220 fnt2 4757 12417(p)m 6(ythag)k 240 fnt1 5447 12420(had)m 5841(occurred)s 6724(directly)s 7497(after)s 7982(the)s 8319(e)s 3(xisting)k 0 12132(de\207nitions)m 1058(within)s 220 fnt2 1722 12129(@Eq)m 240 fnt1 2200 12132(,)m 2303(with)s 220 fnt2 2782 12129(p)m 6(ythag)k 240 fnt1 3479 12132(added)m 4105(to)s 220 fnt2 4340 12129(@Eq)m 240 fnt1 4818 12132(')m 13(s)k 5025(e)s 3(xport)k 5689(list.)s 6140(This)s 6612(is)s 6819(useful)s 7454(for)s 7788(e)s 3(xtending)k 8778(the)s 0 11844(capabilities)m 1128(of)s 1389(a)s 1545(package)s 2375(of)s 2636(de\207nitions)s 3687(lik)s 2(e)k 220 fnt2 4088 11841(@Eq)m 240 fnt1 4616 11844(without)m 5397(modifying)s 6437(its)s 6703(source)s 7373(\207le.)s 7832(The)s 8249(essential)s 0 11556(dif)m 6(ferences)k 1106(to)s 220 fnt2 1346 11553(impor)m -8(t)k 240 fnt1 2020 11556(are)m 2368(that)s 2787(all)s 3081(the)s 3430(symbols)s 4280(of)s 220 fnt2 4552 11553(@Eq)m 240 fnt1 5091 11556(become)m 5892(visible)s 6586(within)s 220 fnt2 7255 11553(p)m 6(ythag)k 240 fnt1 7896 11556(,)m 8004(not)s 8371(just)s 8778(the)s 0 11268(e)m 3(xported)k 892(ones,)s 1438(and)s 1842(only)s 2322(one)s 2724(symbol)s 3484(may)s 3950(follo)s 6(w)k 4622(the)s 220 fnt2 4970 11265(e)m 6(xtend)k 240 fnt1 5671 11268(k)m 2(e)k 3(yw)k 2(ord.)k 480 10894(Actually)m 15(,)k 1399(more)s 1951(than)s 2424(one)s 2831(symbol)s 3595(may)s 4066(follo)s 6(w)k 220 fnt2 4743 10891(e)m 6(xtend)k 240 fnt1 5384 10894(,)m 5495(b)s 4(ut)k 5862(this)s 6262(usage)s 6868(indicates)s 7772(a)s 7943(`path)s 8496(name')s 0 10606(of)m 271(the)s 619(symbol.)s 1488(F)s 3(or)k 1877(e)s 3(xample,)k 220 fnt2 480 10105(e)m 6(xtend @DocumentLa)k 6(y)k 4(out @Repor)k -8(tLa)k 6(y)k 4(out)k 480 9817(def @K)m 8(e)k 4(yw)k 2(ords ...)k 240 fnt1 0 9319(causes)m 676(the)s 1026(de\207nition)s 2002(of)s 220 fnt2 2275 9316(@K)m 8(e)k 4(yw)k 2(ords)k 240 fnt1 3502 9319(to)m 3743(occur)s 4335(directly)s 5120(after)s 5618(the)s 5968(e)s 3(xisting)k 6777(de\207nitions)s 7840(of)s 220 fnt2 8113 9316(@Repor)m -8(t-)k 0 9028(La)m 6(y)k 4(out)k 240 fnt1 645 9031(,)m 752(which)s 1394(itself)s 1942(lies)s 2324(within)s 220 fnt2 2992 9028(@DocumentLa)m 6(y)k 4(out)k 240 fnt1 4860 9031(.)m 480 8657(A)m 702(named)s 1390(parameter)s 2395(may)s 2853(also)s 3283(be)s 3556(preceded)s 4469(by)s 4754(an)s 220 fnt2 5029 8654(impor)m -8(t)k 240 fnt1 5694 8657(clause.)m 6386(As)s 6695(usual,)s 7299(the)s 7638(meaning)s 8507(is)s 8708(that)s 0 8369(the)m 336(visible)s 1016(local)s 1522(de\207nitions)s 2570(of)s 2828(the)s 3163(import)s 3847(symbol\(s\))s 4839(are)s 5173(visible)s 5853(within)s 6508(the)s 6843(body)s 7364(\(the)s 7778(def)s 2(ault)k 8486(v)s 6(alue\))k 0 8081(of)m 281(the)s 640(named)s 1347(parameter)s 13(.)k 2463(But)s 2879(furthermore,)s 4137(those)s 4709(symbols)s 5569(will)s 6005(be)s 6298(visible)s 7002(within)s 7681(all)s 7985(in)s 9(v)k 4(ocations)k 0 7793(of)m 271(the)s 619(parameter)s 13(.)k 1724(F)s 3(or)k 2113(e)s 3(xample,)k 3027(suppose)s 3855(we)s 4190(de\207ne)s 220 fnt2 480 7292(def @Diag)m 480 7004( impor)m -8(t @Algebr)k 2(a named line)k 4(width { 1p })k 480 6716( impor)m -8(t @Algebr)k 2(a named dashlength { 2p })k 480 6428( ...)m 240 fnt1 0 5977(Then,)m 599(if)s 220 fnt2 816 5974(@Algebr)m 2(a)k 240 fnt1 1847 5977(e)m 3(xports)k 2599(symbols)s 220 fnt2 3448 5974(+)m 240 fnt1 3568 5977(,)m 220 fnt2 3675 5974(-)m 240 fnt1 3739 5977(,)m 3846(and)s 4250(so)s 4516(on,)s 4863(we)s 5198(may)s 5664(write)s 220 fnt2 480 5476(@Diag)m 480 5188( line)m 4(width { 1f - 2p })k 480 4900( dashlength { 1f + 2p })m 240 fnt1 0 4401(using)m 565(the)s 905(symbols)s 1747(from)s 220 fnt2 2263 4398(@Algebr)m 2(a)k 240 fnt1 3234 4401(.)m 3391(There)s 3996(may)s 4454(be)s 4729(se)s 6(v)k 3(eral)k 5443(symbols)s 6285(after)s 6773(the)s 220 fnt2 7114 4398(impor)m -8(t)k 240 fnt1 7779 4401(k)m 2(e)k 3(yw)k 2(ord.)k 8766(All)s 0 4113(these)m 558(symbols)s 1418(share)s 1990(an)s 2284(important)s 3285(restriction:)s 4429(the)s 3(y)k 4904(may)s 5381(not)s 5759(ha)s 4(v)k 3(e)k 6271(parameters.)s 7434(This)s 7921(is)s 8143(necessary)s 0 3825(because)m 841(Lout)s 1382(w)s 2(ould)k 2065(be)s 2376(unable)s 3098(to)s 3366(determine)s 4406(suitable)s 5233(v)s 6(alues)k 5918(for)s 6284(an)s 3(y)k 6710(such)s 7234(parameters,)s 8417(if)s 8663(the)s 3(y)k 0 3537(did)m 364(e)s 3(xist.)k 480 3163(As)m 814(an)s 1115(e)s 3(xception)k 2116(to)s 2373(the)s 2738(rule)s 3183(just)s 3605(gi)s 6(v)k 3(en,)k 4253(a)s 4436(named)s 5150(parameter)s 6181(may)s 6665(import)s 7379(the)s 7745(symbol)s 8522(it)s 8732(is)s 8960(a)s 0 2875(parameter)m 1014(of:)s 220 fnt2 480 2374(e)m 6(xpor)k -8(t @Cell)k 480 2086(def @Tb)m 4(l)k 480 1798( impor)m -8(t @Tb)k 4(l named @F)k 6(or)k -5(mat { ...)k 13( })k 240 fnt1 0 1302(In)m 274(this)s 688(e)s 3(xample)k 1569(the)s 1936(e)s 3(xported)k 2846(de\207nitions)s 3925(of)s 220 fnt2 4215 1299(@Tb)m 4(l)k 240 fnt1 4802 1302(\(i.e.)m 220 fnt2 5235 1299(@Cell)m 240 fnt1 5820 1302(\))m 5966(will)s 6411(be)s 6711(visible)s 7422(within)s 220 fnt2 8109 1299(@F)m 6(or)k -5(mat)k 240 fnt1 9022 1302(.)m 0 1014(Ho)m 6(we)k 6(v)k 3(er)k 9(,)k 984(the)s 3(y)k 1472(may)s 1963(only)s 2467(be)s 2774(used)s 3296(in)s 3563(actual)s 4213(parameters,)s 5392(not)s 5782(in)s 6050(the)s 6423(def)s 2(ault)k 7168(v)s 6(alue)k 7761(of)s 8057(the)s 8430(named)s 0 726(parameter)m 13(.)k 1098(This)s 1567(is)s 1769(o)s 6(wing)k 2408(to)s 2639(implementation)s 4189(problems:)s 5237(at)s 5462(the)s 5803(time)s 6275(the)s 6616(def)s 2(ault)k 7329(v)s 6(alue)k 7890(of)s 220 fnt2 8153 723(@F)m 6(or)k -5(mat)k 240 fnt1 0 438(is)m 210(read,)s 728(the)s 1076(e)s 3(xported)k 1968(symbols)s 2817(ha)s 4(v)k 3(e)k 3318(not)s 3684(been)s 4193(read)s 4662(and)s 5066(are)s 5413(consequently)s 6730(not)s 7096(kno)s 6(wn.)k 480 64(Since)m 220 fnt2 1064 61(@Cell)m 240 fnt1 1706 64(is)m 1913(nested)s 2579(within)s 220 fnt2 3244 61(@Tb)m 4(l)k 240 fnt1 3753 64(,)m 3857(the)s 4202(v)s 6(alue)k 4766(of)s 5034(an)s 5314(in)s 9(v)k 4(ocation)k 6365(of)s 220 fnt2 6633 61(@Cell)m 240 fnt1 7275 64(may)m 7738(depend)s 8485(on)s 8778(the)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 21 27 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.3.)m 1871(Nested)s 2588(de\207nitions,)s 3678(body)s 4200(par)s 3(ameter)k 2(s,)k 5378(e)s 4(xtend,)k 6091(import,)s 6822(and)s 7248(e)s 4(xport)k 240 fnt5 10256 -1583(21)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(v)m 6(alue)k 582(of)s 868(parameters)s 1980(of)s 220 fnt2 2266 13202(@Tb)m 4(l)k 240 fnt1 2775 13205(.)m 2953(If)s 220 fnt2 3198 13202(@Cell)m 240 fnt1 3857 13205(is)m 4082(used)s 4593(within)s 5276(an)s 5573(actual)s 220 fnt2 6213 13202(@F)m 6(or)k -5(mat)k 240 fnt1 7200 13205(parameter)m 9(,)k 8267(its)s 8558(v)s 6(alue)k 0 12917(depends)m 833(on)s 1126(the)s 1471(v)s 6(alue)k 2035(of)s 2303(parameters)s 3397(of)s 3665(the)s 4009(in)s 9(v)k 4(ocation)k 5060(of)s 220 fnt2 5327 12914(@Tb)m 4(l)k 240 fnt1 5893 12917(of)m 6160(which)s 6799(the)s 220 fnt2 7143 12914(@F)m 6(or)k -5(mat)k 240 fnt1 8112 12917(parameter)m 0 12629(is)m 210(a)s 376(part.)s 480 12255(A)m 710(de\207nition,)s 1734(macro,)s 2438(or)s 2697(named)s 3393(parameter)s 4407(may)s 4873(ha)s 4(v)k 3(e)k 5374(se)s 6(v)k 3(eral)k 6096(alternati)s 6(v)k 3(e)k 7150(names,)s 7868(lik)s 2(e)k 8280(this:)s 220 fnt2 480 11754(macro @CD @CentredDispla)m 6(y @CenteredDispla)k 6(y { ...)k 13( })k 240 fnt1 0 11256(This)m 489(is)s 713(useful)s 1366(for)s 1718(abbre)s 6(viated)k 2898(and)s 3316(alternati)s 6(v)k 3(e)k 4384(spellings,)s 5355(as)s 5618(sho)s 6(wn.)k 6416(The)s 6858(names)s 7534(appear)s 8245(together)s 9(,)k 0 10968(and)m 404(the)s 3(y)k 867(may)s 1333(subsequently)s 2637(be)s 2919(used)s 3416(interchangeably)s 15(.)k 480 10594(If)m 698(one)s 1088(name)s 1649(of)s 1908(a)s 2062(symbol)s 2809(appears)s 3578(in)s 3809(an)s 4079(e)s 3(xport)k 4735(or)s 4982(import)s 5666(list,)s 6052(its)s 6316(other)s 6854(names)s 7504(are)s 7838(automaticaly)s 0 10306(included)m 882(as)s 1132(well,)s 1650(and)s 2054(should)s 2751(not)s 3117(also)s 3555(appear)s 4252(in)s 4495(the)s 4843(list.)s 240 fnt5 0 9513(2.4.)m 471(Filter)s 4(ed)k 1330(right)s 1894(and)s 2335(body)s 2897(parameters)s [ /Dest /LOUTfilters /DEST pdfmark 240 fnt1 480 9036(A)m 719(right)s 1239(or)s 1507(body)s 2050(parameter)s 3073(may)s 3548(be)s 3839(\207ltered)s 4582(by)s 4885(some)s 5455(other)s 6015(computer)s 6987(program)s 7866(before)s 8541(being)s 0 8748(included)m 882(by)s 1176(Lout.)s 1792(As)s 2109(an)s 2392(e)s 3(xample)k 3255(of)s 3526(such)s 4022(a)s 4188(program)s 5058(we)s 5393(will)s 5819(use)s 6194(the)s 6542(Unix)s 220 fnt2 7076 8745(sor)m -8(t)k 240 fnt1 7506 8748(command:)m 220 fnt2 480 8249(sor)m -8(t -o out\207le in\207le)k 240 fnt1 0 7795(This)m 499(causes)s 1198(\207le)s 220 fnt2 1582 7792(out\207le)m 240 fnt1 2243 7795(to)m 2505(contain)s 3290(a)s 3480(sorted)s 4145(cop)s 2(y)k 4687(of)s 4981(\207le)s 220 fnt2 5366 7792(in\207le)m 240 fnt1 5808 7795(.)m 5996(W)s 19(e)k 6388(incorporate)s 7556(this)s 7975(into)s 8424(a)s 8614(Lout)s 0 7507(de\207nition)m 974(as)s 1224(follo)s 6(ws:)k 220 fnt2 480 7055(def @Sor)m -8(t)k 480 6767( named @Options {})m 480 6479( r)m -3(ight x)k 480 6191({)m 480 5903( def @Filter { sor)m -8(t @Options -o @FilterOut @FilterIn })k 480 5327( lines @Break x)m 480 5039(})m 240 fnt1 0 4545(The)m 440(presence)s 1345(within)s 220 fnt2 2026 4542(@Sor)m -8(t)k 240 fnt1 2728 4545(of)m 3012(a)s 3191(de\207nition)s 4178(of)s 4462(a)s 4641(symbol)s 5414(called)s 220 fnt2 6055 4542(@Filter)m 240 fnt1 6837 4545(tells)m 7298(Lout)s 7823(that)s 8254(the)s 8615(right)s 0 4257(parameter)m 1057(of)s 220 fnt2 1372 4254(@Sor)m -8(t)k 240 fnt1 2104 4257(is)m 2358(to)s 2640(be)s 2966(\207ltered)s 3743(before)s 4453(inclusion.)s 5537(When)s 220 fnt2 6210 4254(@Sor)m -8(t)k 240 fnt1 6942 4257(is)m 7196(in)s 9(v)k 4(ok)k 2(ed,)k 220 fnt2 8103 4254(@Filter)m 240 fnt1 8916 4257(is)m 0 3969(e)m 6(v)k 6(aluated)k 978(and)s 1399(its)s 1692(v)s 6(alue)k 2277(e)s 3(x)k 3(ecuted)k 3196(as)s 3463(a)s 3646(system)s 4387(command.)s 5512(In)s 5785(addition)s 6643(to)s 6899(the)s 7264(symbols)s 8130(ordinarily)s 0 3681(a)m 4(v)k 6(ailable)k 908(within)s 1576(the)s 1924(body)s 2458(of)s 220 fnt2 2729 3678(@Filter)m 240 fnt1 3438 3681(,)m 3545(there)s 4078(are)s 4425(three)s 4958(others:)s 220 fnt2 0 3175(@FilterIn)m 240 fnt1 1920 3178(the)m 2273(name)s 2852(of)s 3128(a)s 3299(\207le)s 3665(which)s 4312(will,)s 4795(at)s 5032(the)s 5385(time)s 5870(the)s 6223(system)s 6952(command)s 7959(is)s 8175(e)s 3(x)k 3(ecuted,)k 1920 2890(contain)m 2726(the)s 3119(actual)s 3789(right)s 4345(or)s 4649(body)s 5228(parameter)s 6287(of)s 6603(the)s 6996(symbol,)s 7853(e)s 3(xactly)k 8639(as)s 8934(it)s 1920 2602(appears)m 2701(in)s 2944(the)s 3292(input)s 3844(\207le;)s 220 fnt2 0 2096(@FilterOut)m 240 fnt1 1920 2099(the)m 2305(name)s 2916(of)s 3224(a)s 3427(\207le)s 3826(of)s 4134(Lout)s 4683(te)s 3(xt)k 5135(whose)s 5840(contents)s 6726(Lout)s 7275(will)s 7738(read)s 8244(after)s 8778(the)s 1920 1811(system)m 2657(command)s 3673(has)s 4057(\207nished,)s 4936(as)s 5200(a)s 5380(replacement)s 6620(for)s 6972(what)s 7511(w)s 2(as)k 7946(put)s 8326(into)s 8765(\207le)s 220 fnt2 1920 1520(@FilterIn)m 240 fnt1 2798 1523(;)m 220 fnt2 0 1036(@FilterErr)m 240 fnt1 1920 1039(the)m 2273(name)s 2852(of)s 3129(a)s 3300(\207le)s 3667(that)s 4090(Lout)s 4608(will)s 5039(attempt)s 5820(to)s 6065(read)s 6539(after)s 7041(the)s 7394(system)s 8124(command)s 1920 751(has)m 2281(\207nished,)s 3137(containing)s 4191(error)s 4705(messages)s 5649(produced)s 6589(by)s 6874(the)s 7213(command)s 8206(that)s 8614(Lout)s 1920 463(will)m 2346(pass)s 2809(on)s 3106(to)s 3345(the)s 3693(user)s 4151(as)s 4401(non-f)s 2(atal)k 5316(errors.)s 6036(Use)s 6464(of)s 6735(this)s 7131(\207le)s 7492(is)s 7702(optional.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 22 28 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(22)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(It)m 205(is)s 415(a)s 581(f)s 2(atal)k 1057(error)s 1580(for)s 1918(the)s 2266(system)s 2990(command)s 3992(to)s 4231(return)s 4858(a)s 5024(non-zero)s 5927(status.)s 480 12831(No)m 6(w)k 1001(the)s 220 fnt2 1356 12828(sor)m -8(t)k 240 fnt1 1793 12831(command)m 2802(has)s 3179(options)s 220 fnt2 3942 12828(-u)m 240 fnt1 4190 12831(for)m 4535(deleting)s 5365(duplicate)s 6304(lines,)s 6869(and)s 220 fnt2 7280 12828(-r)m 240 fnt1 7493 12831(for)m 7838(re)s 6(v)k 3(ersing)k 8778(the)s 0 12543(sorting)m 717(order)s 13(.)k 1372(So)s 1678(the)s 2026(result)s 2616(of)s 220 fnt2 480 12042(@Sor)m -8(t)k 480 11754( @Options { -r -u })m 480 11466({)m 480 11178(A)m 6(usten, J)k 4(ane)k 480 10890(Dic)m 4(k)k 4(ens)k 3(, Char)k -3(les)k 480 10602(Eliot, George)m 480 10314(Hardy)m 22(, )k 11(Thomas)k 480 10026(Bront{@Char edieresis}, Char)m -3(lotte)k 480 9738(})m 240 fnt1 0 9244(is)m 480 8791(Hardy)m 15(,)k 1170(Thomas)s 480 8503(Eliot,)m 1051(Geor)s 4(ge)k 480 8215(Dick)m 2(ens,)k 1369(Charles)s 480 7927(Bront\353,)m 1238(Charlotte)s 480 7639(Austen,)m 1265(Jane)s 0 7155(Unlik)m 2(e)k 705(all)s 998(the)s 1347(other)s 1898(e)s 3(xamples)k 2849(in)s 3093(this)s 3489(manual,)s 4300(this)s 4697(output)s 5369(is)s 5579(simulated.)s 6673(This)s 7149(w)s 2(as)k 7570(done)s 8093(so)s 8359(that)s 8778(the)s 0 6867(ability)m 661(to)s 896(format)s 1588(this)s 1980(manual)s 2735(is)s 2942(not)s 3304(dependent)s 4344(on)s 4637(the)s 4981(e)s 3(xistence)k 5919(of)s 6187(the)s 6531(Unix)s 220 fnt2 7061 6864(sor)m -8(t)k 240 fnt1 7487 6867(command,)m 8534(and)s 8934(it)s 0 6579(highlights)m 1008(the)s 1356(f)s 2(act)k 1771(that)s 2189(\207ltered)s 2923(actual)s 3548(parameters)s 4646(are)s 4993(by)s 5287(their)s 5784(nature)s 6437(of)s 6708(uncertain)s 7654(portability)s 15(.)k 480 6205(There)m 1114(is)s 1345(no)s 1660(need)s 2191(for)s 2550(an)s 2855(actual)s 3501(\207ltered)s 4257(parameter)s 5292(to)s 5552(obe)s 3(y)k 6091(the)s 6460(le)s 3(xical)k 7169(rules)s 7706(of)s 7998(Lout,)s 8579(since)s 0 5917(it)m 207(is)s 432(passed)s 1143(directly)s 1941(to)s 2195(the)s 2558(other)s 3124(program.)s 4113(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 5088(Lout)s 5615(must)s 6155(be)s 6452(able)s 6921(to)s 7175(w)s 2(ork)k 7741(out)s 8122(where)s 8778(the)s 0 5629(parameter)m 1034(ends,)s 1601(which)s 2263(gi)s 6(v)k 3(es)k 2831(rise)s 3251(to)s 3511(the)s 3879(follo)s 6(wing)k 4877(rules.)s 5525(As)s 5863(with)s 6365(a)s 6552(body)s 7106(parameter)s 9(,)k 8179(a)s 8366(symbol)s 220 fnt2 0 5338(@Sym)m 240 fnt1 730 5341(with)m 1235(a)s 1423(\207ltered)s 2180(parameter)s 3217(must)s 3764(be)s 4069(in)s 9(v)k 4(ok)k 2(ed)k 4906(in)s 5172(either)s 5798(the)s 6168(form)s 220 fnt2 6715 5338(@Sym { ...)m 13( })k 240 fnt1 7949 5341(or)m 8231(the)s 8602(form)s 220 fnt2 0 5050(@Sym @Begin ...)m 13( @End @Sym)k 240 fnt1 3120 5053(,)m 3251(plus)s 3725(options)s 4505(as)s 4779(usual.)s 5472(In)s 5753(the)s 6125(former)s 6858(case,)s 7400(braces)s 8085(within)s 8778(the)s 0 4765(actual)m 625(parameter)s 1639(must)s 2164(match;)s 2860(in)s 3103(the)s 3451(latter)s 4000(case,)s 4518(the)s 4866(actual)s 5491(parameter)s 6505(may)s 6971(not)s 7337(contain)s 220 fnt2 8098 4762(@End)m 240 fnt1 8699 4765(.)m 480 4391(If)m 725(an)s 1024(actual)s 1664(\207ltered)s 2414(parameter)s 3444(contains)s 220 fnt2 4307 4388(@Include)m 240 fnt1 5229 4391(,)m 5352(this)s 5764(is)s 5989(tak)s 2(en)k 6578(to)s 6833(be)s 3(gin)k 7434(a)s 7616(Lout)s 220 fnt2 8144 4388(@Include)m 240 fnt1 0 4103(directi)m 6(v)k 3(e)k 882(in)s 1125(the)s 1473(usual)s 2033(form)s 2557(\(Section)s 3410(3.48\):)s 220 fnt2 480 3612(@Sor)m -8(t {)k 480 3324(A)m 6(usten, J)k 4(ane)k 480 3036(@Include { authors })m 480 2748(Hardy)m 22(, )k 11(Thomas)k 480 2460(})m 240 fnt1 0 1966(The)m 421(included)s 1296(\207le)s 1649(becomes)s 2530(part)s 2954(of)s 220 fnt2 3217 1963(@FilterIn)m 240 fnt1 4095 1966(,)m 4195(b)s 4(ut)k 4549(an)s 3(y)k 4939(braces,)s 220 fnt2 5649 1963(@Include)m 240 fnt1 6571 1966(,)m 6670(or)s 220 fnt2 6922 1963(@End)m 240 fnt1 7576 1966(within)m 8236(it)s 8421(are)s 8760(not)s 0 1678(noticed)m 762(by)s 1056(Lout.)s 480 1304(The)m 928(\207rst)s 1380(character)s 2335(of)s 2627(\207le)s 220 fnt2 3009 1301(@FilterIn)m 240 fnt1 3968 1304(will)m 4415(be)s 4718(the)s 5087(\207rst)s 5539(non-white)s 6586(space)s 7194(character)s 8149(follo)s 6(wing)k 0 1016(the)m 353(opening)s 220 fnt2 1184 1013({)m 240 fnt1 1314 1016(or)m 220 fnt2 1579 1013(@Begin)m 240 fnt1 2348 1016(,)m 2461(or)s 2726(the)s 3080(\207rst)s 3517(character)s 4457(of)s 4734(an)s 5023(included)s 5911(\207le)s 6278(if)s 220 fnt2 6501 1013(@Include)m 240 fnt1 7489 1016(comes)m 8157(\207rst.)s 8698(The)s 0 728(second-last)m 1146(character)s 2091(of)s 2374(\207le)s 220 fnt2 2746 725(@FilterIn)m 240 fnt1 3696 728(will)m 4133(be)s 4427(the)s 4786(last)s 5189(non-white)s 6226(space)s 6825(character)s 7770(preceding)s 8778(the)s 0 440(closing)m 220 fnt2 745 437(})m 240 fnt1 871 440(or)m 220 fnt2 1132 437(@End @Sym)m 240 fnt1 2454 440(,)m 2563(or)s 2824(the)s 3174(last)s 3567(character)s 4503(of)s 4775(an)s 5060(included)s 5944(\207le)s 6307(if)s 220 fnt2 6526 437(@Include)m 240 fnt1 7510 440(comes)m 8174(last.)s 8671(One)s 0 152(ne)m 6(wline)k 833(character)s 1794(is)s 2030(al)s 2(w)k 2(ays)k 2768(appended)s 3770(and)s 4201(is)s 4437(the)s 4812(last)s 5229(character)s 6190(of)s 6487(\207le)s 220 fnt2 6875 149(@FilterIn)m 240 fnt1 7753 152(.)m 7943(This)s 8446(ef)s 6(fects)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 23 29 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.4.)m 1871(F)s 10(ilter)k 8(ed)k 2688(right)s 3217(and)s 3643(body)s 4165(par)s 3(ameter)k 2(s)k 240 fnt5 10250 -1583(23)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(a)m 206(compromise)s 1484(between)s 2378(the)s 2766(Lout)s 3319(con)s 9(v)k 3(ention,)k 4518(that)s 4976(spaces)s 5691(follo)s 6(wing)k 220 fnt2 6708 13202({)m 240 fnt1 6873 13205(or)m 7172(preceding)s 220 fnt2 8208 13202(})m 240 fnt1 8372 13205(are)m 8760(not)s 0 12917(signi\207cant,)m 1103(with)s 1585(the)s 1933(Unix)s 2467(con)s 9(v)k 3(ention)k 3576(that)s 3994(all)s 4287(te)s 3(xt)k 4702(\207les)s 5151(end)s 5555(with)s 6037(a)s 6203(ne)s 6(wline)k 7010(character)s 13(.)k 240 fnt5 0 12124(2.5.)m 471(Pr)s 4(ecedence)k 1677(and)s 2118(associati)s 2(vity)k 3420(of)s 3692(symbols)s [ /Dest /LOUTprecedence /DEST pdfmark 240 fnt1 480 11647(Ev)m 3(ery)k 1131(symbol)s 1920(in)s 2192(Lout)s 2733(has)s 3132(a)s 240 fnt6 3327 11649(pr)m 8(ecedence)k 240 fnt1 4401 11647(,)m [ /Dest /LOUT19_4605_det_prec_1 /DEST pdfmark 4538(which)s 5209(is)s 5448(a)s 5643(positi)s 6(v)k 3(e)k 6476(whole)s 7146(number)s 13(.)k 8057(When)s 8716(tw)s 2(o)k 0 11359(symbols)m 849(compete)s 1715(for)s 2053(an)s 2336(object,)s 3027(the)s 3375(one)s 3777(with)s 4259(the)s 4607(higher)s 5278(precedence)s 6409(wins)s 6912(it.)s 7208(F)s 3(or)k 7597(e)s 3(xample,)k 220 fnt2 480 10858(a | b / c)m 240 fnt1 0 10403(is)m 210(equi)s 6(v)k 6(alent)k 1253(to)s 220 fnt2 1491 10400({)m 1616(a)s 1794(|)s 1892(b)s 2067(})s 2192(/)s 2317(c)s 240 fnt1 2482 10403(rather)m 3097(than)s 220 fnt2 3565 10400(a)m 3743(|)s 3841({)s 3966(b)s 4141(/)s 4266(c)s 4432(})s 240 fnt1 4496 10403(,)m 4603(because)s 220 fnt2 5415 10400(|)m 240 fnt1 5511 10403(has)m 5881(higher)s 6551(precedence)s 7681(than)s 220 fnt2 8150 10400(/)m 240 fnt1 8273 10403(and)m 8676(thus)s 0 10115(wins)m 503(the)s 220 fnt2 851 10112(b)m 240 fnt1 965 10115(.)m 480 9741(When)m 1149(the)s 1538(tw)s 2(o)k 1988(competing)s 3092(symbols)s 3981(ha)s 4(v)k 3(e)k 4523(equal)s 5137(precedence,)s 6359(Lout)s 6912(applies)s 7680(a)s 7887(second)s 8651(rule.)s 0 9453(Each)m 545(symbol)s 1316(is)s 1537(either)s 240 fnt6 2151 9455(left-associative)m 240 fnt1 3659 9453(or)m [ /Dest /LOUT19_4605_det_prec_2 /DEST pdfmark 240 fnt6 3929 9455(right-associative)m 240 fnt1 5528 9453(.)m 5703(The)s 6142(v)s 6(alue)k 6720(of)s 220 fnt2 7002 9450(a)m 7180(op1)s 7564(b)s 7739(op2)s 8156(c)s 240 fnt1 8332 9453(is)m 8553(tak)s 2(en)k 0 9165(to)m 252(be)s 220 fnt2 547 9162({)m 672(a)s 850(op1)s 1234(b)s 1409(})s 1534(op2)s 1951(c)s 240 fnt1 2129 9165(if)m 2359(the)s 2720(symbols)s 3582(are)s 3942(both)s 4438(left-associati)s 6(v)k 3(e,)k 5993(and)s 220 fnt2 6410 9162(a op1 { b op2 c })m 240 fnt1 8072 9165(if)m 8302(the)s 3(y)k 8779(are)s 0 8877(right-associati)m 6(v)k 3(e.)k 1733(In)s 1989(cases)s 2544(not)s 2910(co)s 3(v)k 3(ered)k 3719(by)s 4013(these)s 4560(tw)s 2(o)k 4970(rules,)s 5541(use)s 5916(braces.)s 480 8503(It)m 672(sometimes)s 1732(happens)s 2554(that)s 2959(the)s 3294(result)s 3870(is)s 4067(the)s 4402(same)s 4935(re)s 3(g)k 1(ardless)k 5937(of)s 6195(ho)s 6(w)k 6642(the)s 6977(e)s 3(xpression)k 8041(is)s 8237(grouped.)s 0 8215(F)m 3(or)k 382(e)s 3(xample,)k 220 fnt2 1289 8212({)m 1414(a)s 1592(|)s 1690(b)s 1865(})s 1990(|)s 2088(c)s 240 fnt1 2246 8215(and)m 220 fnt2 2643 8212(a)m 2821(|)s 2919({)s 3044(b)s 3219(|)s 3317(c)s 3483(})s 240 fnt1 3599 8215(are)m 3939(al)s 2(w)k 2(ays)k 4643(the)s 4984(same,)s 5575(for)s 5905(an)s 3(y)k 6295(combination)s 7541(of)s 7805(objects,)s 8581(g)s 1(aps,)k 0 7927(and)m 416(v)s 6(ariants)k 1230(of)s 220 fnt2 1513 7924(|)m 240 fnt1 1550 7927(.)m 1727(In)s 1995(such)s 2504(cases)s 3071(the)s 3432(symbols)s 4293(are)s 4653(said)s 5108(to)s 5360(be)s 240 fnt6 5654 7929(associative)m 240 fnt1 6709 7927(,)m 6829(and)s 7245(we)s 7593(can)s 7995(con\207dently)s 0 7639(omit)m 498(the)s 846(braces.)s 480 7265(User)m 4(-de\207ned)k 1769(symbols)s 2618(may)s 3084(be)s 3366(gi)s 6(v)k 3(en)k 3946(a)s 4112(precedence)s 5243(and)s 5647(associati)s 6(vity:)k 220 fnt2 480 6764(def @Super)m 480 6476( precedence 50)m 480 6188( associativity r)m -3(ight)k 480 5900( left x)m 480 5612( r)m -3(ight y)k 480 5324({)m 480 5036( @OneRo)m 3(w { | -2p @F)k 6(ont y ^/0.5fk x })k 480 4748(})m 240 fnt1 0 4254(The)m 3(y)k 541(come)s 1113(just)s 1516(after)s 2010(an)s 3(y)k 220 fnt2 2405 4251(into)m 240 fnt1 2809 4254(clause)m 3460(and)s 3862(before)s 4526(an)s 3(y)k 4921(parameter)s 5933(de\207nitions.)s 7105(The)s 7531(precedence)s 8660(may)s 0 3966(be)m 280(an)s 3(y)k 674(whole)s 1313(number)s 2101(between)s 2952(10)s 3245(and)s 3646(100,)s 4110(and)s 4512(if)s 4726(omitted)s 5511(is)s 5719(assigned)s 6598(the)s 6943(v)s 6(alue)k 7509(100.)s 8030(The)s 8455(higher)s 0 3678(the)m 373(number)s 9(,)k 1227(the)s 1600(higher)s 2296(the)s 2669(precedence.)s 3933(The)s 4386(associati)s 6(vity)k 5654(may)s 6145(be)s 220 fnt2 6452 3675(left)m 240 fnt1 6825 3678(or)m 220 fnt2 7109 3675(r)m -3(ight)k 240 fnt1 7534 3678(,)m 7666(and)s 8095(if)s 8338(omitted)s 0 3390(def)m 2(aults)k 805(to)s 220 fnt2 1044 3387(r)m -3(ight)k 240 fnt1 1469 3390(.)m 480 3016(In)m 731(the)s 1074(e)s 3(xample)k 1932(abo)s 3(v)k 3(e,)k 2599(the)s 2942(precedence)s 4068(and)s 4466(associati)s 6(vity)k 5703(are)s 6045(both)s 6523(literal)s 7127(w)s 2(ords)k 7756(\()s 220 fnt2 7829 3013(50)m 240 fnt1 8120 3016(and)m 220 fnt2 8518 3013(r)m -3(ight)k 240 fnt1 8943 3016(\).)m 0 2728(It)m 203(is)s 410(also)s 846(possible)s 1683(to)s 1920(de\207ne)s 2558(a)s 2722(macro)s 3369(whose)s 4034(v)s 6(alue)k 4600(is)s 4807(a)s 4971(suitable)s 5767(literal)s 6375(w)s 2(ord,)k 6969(and)s 7371(in)s 9(v)k 4(ok)k 2(e)k 8061(that)s 8476(macro)s 0 2440(as)m 249(the)s 596(v)s 6(alue)k 1163(of)s 1433(a)s 1598(precedence)s 2728(or)s 2986(associati)s 6(vity)k 15(.)k 4262(But)s 4667(arbitrary)s 5541(e)s 3(xpressions,)k 6760(including)s 7716(in)s 9(v)k 4(ocations)k 8855(of)s 0 2152(symbols)m 849(other)s 1400(than)s 1869(macros,)s 2666(are)s 3013(not)s 3379(permitted.)s 480 1778(Lout')m 13(s)k 1142(symbols)s 1991(ha)s 4(v)k 3(e)k 2492(the)s 2840(follo)s 6(wing)k 3817(precedences)s 5036(and)s 5440(associati)s 6(vities:)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 24 30 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(24)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 13170(Precedence)m 1904(Associati)s 6(vity)k 3493(Symbols)s 969 12594(5)m 2011(associati)s 6(v)k 3(e)k 220 fnt2 3493 12591(/ ^/ // ^//)m 240 fnt1 965 12306(6)m 2011(associati)s 6(v)k 3(e)k 220 fnt2 3493 12303(| ^| || ^||)m 240 fnt1 968 12018(7)m 2011(associati)s 6(v)k 3(e)k 220 fnt2 3493 12015(& ^&)m 240 fnt1 968 11730(7)m 2011(associati)s 6(v)k 3(e)k 220 fnt2 3493 11727(&)m 240 fnt1 3695 11730(in)m 3938(the)s 4286(form)s 4810(of)s 5081(one)s 5483(or)s 5742(more)s 6289(white)s 6876(space)s 7463(characters)s 685 11442(10-100)m 220 fnt2 2012 11439(left)m 240 fnt1 2360 11442(or)m 220 fnt2 2619 11439(r)m -3(ight)k 240 fnt1 3493 11442(user)m 4(-de\207ned)k 4729(symbols)s 844 11154(100)m 220 fnt2 2316 11151(r)m -3(ight)k 3493(@Wide)s 240 fnt1 4207 11154(,)m 220 fnt2 4314 11151(@High)m 240 fnt1 4973 11154(,)m 220 fnt2 5080 11151(@Gr)m 2(aphic)k 240 fnt1 6064 11154(,)m 6171(etc.)s 854 10866(101)m 2494(-)s 220 fnt2 3493 10863(&&)m 240 fnt1 845 10578(102)m 2011(associati)s 6(v)k 3(e)k 220 fnt2 3493 10575(&)m 240 fnt1 3695 10578(in)m 3938(the)s 4286(form)s 4810(of)s 5081(0)s 5256(spaces)s 850 10290(103)m 2494(-)s 3493(Body)s 4067(parameters)s 5165(and)s 5569(right)s 6080(parameters)s 7178(of)s 220 fnt2 7449 10287(@Open)m 240 fnt1 0 9749(Actually)m 883(the)s 1238(precedence)s 2375(of)s 2653(juxtaposition)s 3965(\(tw)s 2(o)k 4461(objects)s 5195(separated)s 6162(by)s 6462(zero)s 6933(spaces\))s 7691(is)s 7908(a)s 8080(little)s 8579(more)s 0 9461(complicated.)m 1333(If)s 1565(either)s 2170(of)s 2443(the)s 2793(tw)s 2(o)k 3205(objects)s 3934(is)s 4146(enclosed)s 5043(in)s 5288(braces,)s 6007(the)s 6357(precedence)s 7489(is)s 7701(7)s 7871(as)s 8123(for)s 8463(one)s 8867(or)s 0 9173(more)m 541(spaces.)s 1322(If)s 1545(neither)s 2262(object)s 2899(is)s 3102(enclosed)s 3991(in)s 4227(braces,)s 4937(the)s 5279(precedence)s 6403(is)s 6606(102)s 7014(as)s 7257(sho)s 6(wn)k 7927(abo)s 3(v)k 3(e.)k 8650(This)s 0 8885(complicated)m 1216(rule)s 1633(seems)s 2258(to)s 2486(accord)s 3171(better)s 3764(with)s 4235(what)s 4750(people)s 5434(e)s 3(xpect)k 6104(and)s 6498(need)s 6998(in)s 7230(practice)s 8031(than)s 8490(a)s 8645(pure)s 0 8597(precedence)m 1131(rule)s 1558(can)s 1947(do.)s 240 fnt5 0 7804(2.6.)m 471(The)s 926(style)s 1446(and)s 1887(size)s 2314(of)s 2586(objects)s [ /Dest /LOUTsize /DEST pdfmark 240 fnt1 480 7327(This)m 944(section)s 1666(e)s 3(xplains)k 2499(ho)s 6(w)k 2948(Lout)s 3448(determines)s 4535(the)s 4870(style)s 5365(and)s 5757(size)s 6172(of)s 6431(each)s 6914(object.)s 7650(T)s 19(ogether)k 9(,)k 8579(these)s 0 7039(attrib)m 4(utes)k 935(determine)s 1946(the)s 2294(object')s 13(s)k 3088(\207nal)s 3568(appearance)s 4699(in)s 4942(the)s 5290(output.)s [ /Dest /LOUT19_4605_det_size_1 /DEST pdfmark 480 6665(The)m 908(style)s 1415(of)s 1686(an)s 1969(object)s 2613(comprises)s 3633(the)s 3981(follo)s 6(wing:)k 0 6162(\213)m 480(Which)s 1175(font)s 1620(f)s 2(amily)k 15(,)k 2333(f)s 2(ace)k 2784(and)s 3188(size)s 3615(to)s 3854(use)s 4229(\(also)s 4746(de\207ning)s 5584(the)s 220 fnt2 5932 6159(f)m 240 fnt1 6050 6162(unit\);)m [ /Dest /LOUT16_1731_det_size_1 /DEST pdfmark 0 5659(\213)m 480(Whether)s 1391(small)s 1991(capitals)s 2799(are)s 3175(in)s 3446(ef)s 6(fect)k 4070(or)s 4358(not,)s 4799(and)s 5231(also)s 5698(what)s 6251(fraction)s 7078(of)s 7378(the)s 7754(height)s 8440(of)s 8740(full)s 480 5371(capitals)m 1260(the)s 1608(small)s 2180(capitals)s 2960(are)s 3307(to)s 3546(ha)s 4(v)k 3(e;)k [ /Dest /LOUT16_1731_det_size_2 /DEST pdfmark 0 4868(\213)m 480(What)s 1058(g)s 1(ap)k 1456(to)s 1695(replace)s 2440(a)s 2606(single)s 3233(space)s 3820(between)s 4674(tw)s 2(o)k 5084(objects)s 5812(by)s 6106(\(also)s 6623(de\207ning)s 7461(the)s 220 fnt2 7809 4865(s)m 240 fnt1 7972 4868(unit\);)m [ /Dest /LOUT16_1731_det_size_3 /DEST pdfmark 0 4365(\213)m 480(The)s 900(interpretation)s 2235(to)s 2465(place)s 3017(on)s 3306(white)s 3884(space)s 4463(separating)s 5490(tw)s 2(o)k 5891(objects)s 6611(\()s 220 fnt2 6684 4362(lout)m 240 fnt1 7033 4365(,)m 220 fnt2 7132 4362(compress)m 240 fnt1 8077 4365(,)m 220 fnt2 8175 4362(separ)m 2(ate)k 240 fnt1 9019 4365(,)m 220 fnt2 480 4074(troff)m 240 fnt1 855 4077(,)m 962(or)s 220 fnt2 1221 4074(te)m 6(x)k 240 fnt1 1566 4077(as)m 1816(in)s 2059(Section)s 2833(3.5\);)s [ /Dest /LOUT16_1731_det_size_4 /DEST pdfmark 0 3583(\213)m 480(The)s 908(current)s 1644(v)s 6(alue)k 2212(of)s 2483(the)s 220 fnt2 2831 3580(y)m 240 fnt1 2999 3583(and)m 220 fnt2 3403 3580(z)m 240 fnt1 3567 3583(units)m 4083(of)s 4354(measurement)s 5688(\(Section)s 6541(3.6\);)s [ /Dest /LOUT16_1731_det_size_5 /DEST pdfmark 0 3082(\213)m 480(The)s 908(kind)s 1392(of)s 1663(paragraph)s 2676(breaking)s 3566(to)s 3805(emplo)s 2(y)k 4575(\()s 220 fnt2 4648 3079(adjust)m 240 fnt1 5229 3082(,)m 220 fnt2 5336 3079(r)m 2(agged)k 240 fnt1 6005 3082(,)m 6112(etc.\))s [ /Dest /LOUT16_1731_det_size_6 /DEST pdfmark 0 2579(\213)m 480(What)s 1058(g)s 1(ap)k 1456(to)s 1695(insert)s 2285(between)s 3139(the)s 3487(lines)s 3989(of)s 4260(paragraphs)s 5360(\(also)s 5877(de\207ning)s 6715(the)s 220 fnt2 7063 2576(v)m 240 fnt1 7232 2579(unit\);)m [ /Dest /LOUT16_1731_det_size_7 /DEST pdfmark 0 2076(\213)m 480(The)s 908(size)s 1335(of)s 1606(the)s 1954(outdent)s 2732(to)s 2971(use)s 3346(in)s 3589(the)s 220 fnt2 3937 2073(outdent)m 240 fnt1 4725 2076(paragraph)m 5738(breaking)s 6628(style;)s [ /Dest /LOUT16_1731_det_size_8 /DEST pdfmark 0 1573(\213)m 480(Whether)s 1462(the)s 220 fnt2 1909 1570(unbreakab)m 4(le\207rst)k 240 fnt1 3621 1573(and)m 220 fnt2 4124 1570(unbreakab)m 4(lelast)k 240 fnt1 5823 1573(paragraph)m 6935(breaking)s 7924(options)s 8779(are)s 480 1285(in)m 723(ef)s 6(fect;)k [ /Dest /LOUT16_1731_det_size_9 /DEST pdfmark 0 801(\213)m 480(Whether)s 1366(the)s 1717(ro)s 6(w)k 2141(marks)s 2779(of)s 3053(w)s 2(ords)k 3691(are)s 4041(to)s 4284(pass)s 4750(along)s 5338(the)s 5690(baseline)s 6532(or)s 6795(half)s 7241(the)s 7592(height)s 8254(of)s 8528(an)s 8815(`x')s 480 513(abo)m 3(v)k 3(e)k 1102(the)s 1450(baseline;)s [ /Dest /LOUT16_1731_det_size_10 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 25 31 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.6.)m 1871(The)s 2283(style)s 2773(and)s 3199(size)s 3610(of)s 3891(objects)s 240 fnt5 10250 -1583(25)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(\213)m 480(Whether)s 1363(to)s 1602(permit)s 2285(h)s 1(yphenation)k 3525(or)s 3784(not;)s [ /Dest /LOUT16_1731_det_size_11 /DEST pdfmark 0 12702(\213)m 480(What)s 1058(colour)s 1729(the)s 2077(object)s 2721(is)s 2931(to)s 3170(appear)s 3867(in;)s [ /Dest /LOUT16_1731_det_size_12 /DEST pdfmark 0 12199(\213)m 480(What)s 1058(colour)s 1729(underlines)s 2776(within)s 3444(the)s 3792(object)s 4436(are)s 4783(to)s 5022(appear)s 5719(in;)s [ /Dest /LOUT16_1731_det_size_13 /DEST pdfmark 0 11696(\213)m 480(Whether)s 220 fnt2 1363 11693(@Outline)m 240 fnt1 2332 11696(is)m 2542(in)s 2785(ef)s 6(fect;)k [ /Dest /LOUT16_1731_det_size_14 /DEST pdfmark 0 11212(\213)m 480(The)s 908(language)s 1828(of)s 2099(the)s 2447(object;)s [ /Dest /LOUT16_1731_det_size_15 /DEST pdfmark 0 10709(\213)m 480(Whether)s 220 fnt2 1363 10706(@V)m 17(Adjust)k 240 fnt1 2320 10709(,)m 220 fnt2 2427 10706(@HAdjust)m 240 fnt1 3473 10709(and)m 220 fnt2 3877 10706(@P)m 26(Adjust)k 240 fnt1 4885 10709(are)m 5232(in)s 5475(ef)s 6(fect.)k [ /Dest /LOUT16_1731_det_size_16 /DEST pdfmark 0 10209(The)m 423(style)s 925(of)s 1191(an)s 1468(object)s 2107(depends)s 2938(on)s 3229(where)s 3864(it)s 4051(appears)s 4827(in)s 5064(the)s 5407(\207nal)s 5882(document.)s 6984(F)s 3(or)k 7368(e)s 3(xample,)k 8277(the)s 8619(style)s 0 9921(of)m 258(a)s 410(parameter)s 1410(depends)s 2233(on)s 2516(where)s 3142(it)s 3321(is)s 3517(used;)s 4054(the)s 4389(style)s 4882(of)s 5139(a)s 5292(g)s 1(alle)k 3(y)k 5912(is)s 6108(the)s 6443(style)s 6936(of)s 7193(the)s 7528(\207rst)s 7945(tar)s 4(get)k 8530(that)s 8934(it)s 0 9633(attempts)m 848(to)s 1075(attach)s 1690(itself)s 2226(to.)s 2563(Of)s 2875(course,)s 3594(the)s 3930(style)s 4424(of)s 4683(an)s 3(y)k 5068(object)s 5700(can)s 6077(be)s 6346(changed)s 7190(by)s 7472(using)s 8032(the)s 220 fnt2 8367 9630(@F)m 6(ont)k 240 fnt1 9019 9633(,)m 220 fnt2 0 9342(@Break)m 240 fnt1 796 9345(,)m 220 fnt2 903 9342(@Space)m 240 fnt1 1740 9345(,)m 220 fnt2 1847 9342(@SetColour)m 240 fnt1 3105 9345(or)m 220 fnt2 3364 9342(@SetColor)m 240 fnt1 4439 9345(,)m 220 fnt2 4547 9342(@SetUnder)m -3(lineColour)k 240 fnt1 6744 9345(or)m 220 fnt2 7004 9342(@SetUnder)m -3(lineColor)k 240 fnt1 9019 9345(,)m 220 fnt2 0 9054(@Outline)m 240 fnt1 909 9057(,)m 1016(and)s 220 fnt2 1420 9054(@Language)m 240 fnt1 2671 9057(symbols.)m 480 8683(There)m 1089(are)s 1432(no)s 1720(standard)s 2584(def)s 2(ault)k 3300(v)s 6(alues)k 3952(for)s 4286(style,)s 4839(e)s 3(xcept)k 5516(that)s 5929(ro)s 6(w)k 6345(marks)s 6976(of)s 7242(w)s 2(ords)k 7872(initially)s 8663(pass)s 0 8395(half)m 447(the)s 800(height)s 1463(of)s 1738(an)s 2026(`x')s 2342(abo)s 3(v)k 3(e)k 2969(the)s 3321(baseline,)s 4216(small)s 4793(capitals)s 5577(are)s 5929(initially)s 6730(of)s 6(f)k 7079(and)s 7487(will)s 7918(be)s 8205(0.7)s 8558(times)s 0 8107(the)m 346(size)s 770(of)s 1039(full)s 1422(capitals,)s 2255(outlining)s 3170(is)s 3377(initially)s 4170(of)s 6(f,)k 4547(the)s 4892(interpretation)s 6233(of)s 6501(white)s 7085(space)s 7670(is)s 7877(initially)s 220 fnt2 8670 8104(lout)m 240 fnt1 9019 8107(,)m 0 7819(and)m 391(the)s 725(v)s 6(alues)k 1367(of)s 1624(the)s 220 fnt2 1958 7816(y)m 240 fnt1 2112 7819(and)m 220 fnt2 2502 7816(z)m 240 fnt1 2652 7819(units)m 3154(are)s 3487(zero.)s 4049(Therefore)s 5032(one)s 5420(must)s 5931(ensure)s 6597(that)s 7001(the)s 7335(root)s 7766(g)s 1(alle)k 3(y)k 8386(or)s 8631(each)s 0 7531(of)m 271(its)s 548(components)s 1757(is)s 1967(enclosed)s 2863(in)s 220 fnt2 3107 7528(@F)m 6(ont)k 240 fnt1 3759 7531(,)m 220 fnt2 3866 7528(@Break)m 240 fnt1 4662 7531(,)m 220 fnt2 4770 7528(@SetColour)m 240 fnt1 6028 7531(or)m 220 fnt2 6287 7528(@SetColor)m 240 fnt1 7362 7531(,)m 7470(and)s 220 fnt2 7875 7528(@Language)m 240 fnt1 0 7243(symbols.)m 1007(From)s 1631(there)s 2210(the)s 2604(style)s 3157(is)s 3413(passed)s 4155(to)s 4439(incoming)s 5442(g)s 1(alle)k 3(ys)k 6212(and)s 6662(the)s 7056(objects)s 7830(within)s 8544(them.)s 0 6955(Enclosure)m 1012(in)s 220 fnt2 1255 6952(@Space)m 240 fnt1 2152 6955(is)m 2362(not)s 2728(required)s 3582(because)s 4395(the)s 220 fnt2 4743 6952(s)m 240 fnt1 4906 6955(unit)m 5338(is)s 5548(also)s 5986(set)s 6311(by)s 220 fnt2 6605 6952(@F)m 6(ont)k 240 fnt1 7317 6955(\(Section)m 8170(3.5\).)s [ /Dest /LOUT19_4605_det_size_2 /DEST pdfmark [ /Dest /LOUT19_4605_det_size_3 /DEST pdfmark [ /Dest /LOUT19_4605_det_size_4 /DEST pdfmark 536 6581(The)m 959(remainder)s 1983(of)s 2249(this)s 2641(section)s 3370(e)s 3(xplains)k 4210(ho)s 6(w)k 4667(the)s 5010(size)s 5433(of)s 5699(each)s 6189(object)s 6829(\(its)s 7179(width)s 7777(and)s 8176(height)s 8829(on)s 0 6293(the)m 353(printed)s 1094(page\))s 1679(is)s 1895(determined.)s 3140(W)s 19(e)k 3514(will)s 3946(treat)s 4434(width)s 5042(only)s 15(,)k 5566(since)s 6118(height)s 6782(is)s 6997(determined)s 8136(in)s 8385(e)s 3(xactly)k 0 6005(the)m 348(same)s 895(w)s 2(ay)k 15(,)k 1384(e)s 3(xcept)k 2065(that)s 2483(the)s 2831(complications)s 4223(introduced)s 5304(by)s 5598(paragraph)s 6611(breaking)s 7501(are)s 7848(absent.)s 480 5631(W)m 9(ith)k 1006(three)s 1539(e)s 3(xceptions)k 2611(\(see)s 3051(belo)s 6(w\),)k 3817(the)s 4165(width)s 4768(of)s 5039(an)s 5323(object)s 5967(is)s 6178(as)s 6428(lar)s 4(ge)k 6958(as)s 7208(it)s 7401(possibly)s 8253(could)s 8844(be)s 0 5343(without)m 784(violating)s 1679(a)s 220 fnt2 1837 5340(@Wide)m 240 fnt1 2603 5343(symbol)m 3355(or)s 3606(intruding)s 4528(into)s 4945(the)s 5285(space)s 5864(occupied)s 6778(by)s 7064(neighbouring)s 8386(g)s 1(aps)k 8867(or)s 0 5055(objects.)m 841(As)s 1158(an)s 1441(aid)s 1791(to)s 2030(in)s 9(v)k 3(estig)k 1(ating)k 3305(this)s 3701(rule,)s 4179(we)s 4514(will)s 4940(use)s 5315(the)s 5663(de\207nition)s 220 fnt2 480 4554(def @TightBo)m 6(x r)k -3(ight x)k 480 4266({)m 480 3978( "0 0 mo)m 3(v)k 5(eto xsiz)k 3(e 0 lineto xsiz)k 3(e ysiz)k 3(e lineto 0 ysiz)k 3(e lineto closepath strok)k 4(e")k 480 3690( @Gr)m 2(aphic x)k 480 3402(})m 240 fnt1 0 2908(which)m 657(dra)s 3(ws)k 1291(a)s 1472(box)s 1903(around)s 2641(the)s 3004(boundary)s 3978(of)s 4265(its)s 4556(right)s 5082(parameter)s 6111(\(Section)s 6980(3.43\))s 7543(with)s 8040(no)s 8349(mar)s 4(gin.)k 0 2620(The)m 428(result)s 1018(of)s 220 fnt2 480 2169(5c @Wide @TightBo)m 6(x metempsychosis)k 240 fnt1 0 1670(is)m 2835 215 0 106 240 288 60 480 1165 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 52(metempsychosis)m grestore 0 714(The)m 431(widest)s 1119(that)s 220 fnt2 1541 711(@TightBo)m 6(x metempsychosis)k 240 fnt1 4376 714(could)m 4970(possibly)s 5826(be)s 6112(is)s 6326(\207v)s 3(e)k 6742(centimetres,)s 7953(and)s 8361(accord-)s 0 426(ingly)m 552(that)s 977(is)s 1194(its)s 1477(width.)s 2193(The)s 2628(same)s 3182(applies)s 3917(to)s 220 fnt2 4163 423(metempsychosis)m 240 fnt1 5791 426(,)m 5905(which)s 6554(is)s 6771(\207v)s 3(e)k 7190(centimetres)s 8348(wide)s 8876(as)s 0 138(well.)m 583(Note)s 1113(carefully)s 2024(that)s 2451(there)s 2992(is)s 3211(no)s 3513(object)s 4166(in)s 4418(this)s 4822(e)s 3(xample)k 5694(whose)s 6371(width)s 6982(is)s 7200(equal)s 7782(to)s 8030(the)s 8387(sum)s 8855(of)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 26 32 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(26)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(the)m 348(widths)s 1037(of)s 1308(the)s 1656(letters)s 2289(of)s 220 fnt2 2560 13202(metempsychosis)m 240 fnt1 4188 13205(.)m 480 12831(The)m 903(\207rst)s 1329(of)s 1595(the)s 1938(three)s 2466(e)s 3(xceptions)k 3532(to)s 3766(the)s 4109(`as)s 4433(wide)s 4949(as)s 5194(possible')s 6085(rule)s 6507(is)s 6712(the)s 220 fnt2 7055 12828(@HContr)m 2(act)k 240 fnt1 8314 12831(symbol,)m 0 12543(which)m 644(causes)s 1322(the)s 1672(width)s 2277(of)s 2551(its)s 2829(right)s 3343(parameter)s 4360(to)s 4601(be)s 4886(reduced)s 5703(to)s 5945(a)s 6114(reasonable)s 7194(minimum)s 8187(\(a)s 8435(formal)s 0 12255(de\207nition)m 974(will)s 1400(not)s 1766(be)s 2048(attempted\):)s 220 fnt2 480 11754(5c @Wide @HContr)m 2(act @TightBo)k 6(x metempsychosis)k 240 fnt1 0 11255(produces)m 1572 215 0 106 240 288 60 480 10700 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 52(metempsychosis)m grestore 0 10249(The)m 482(object)s 220 fnt2 1180 10246(@HContr)m 2(act @TightBo)k 6(x metempsychosis)k 240 fnt1 5334 10249(is)m 5598(still)s 6064(\207v)s 3(e)k 6530(centimetres)s 7735(wide,)s 8361(b)s 4(ut)k 8778(the)s 0 9961(object)m 220 fnt2 644 9958(@TightBo)m 6(x metempsychosis)k 240 fnt1 3475 9961(has)m 3845(been)s 4354(reduced.)s 480 9587(The)m 922(second)s 1659(of)s 1945(the)s 2307(three)s 2855(e)s 3(xceptions)k 3940(is)s 4165(the)s 4527(horizontal)s 5565(concatenation)s 6965(symbol)s 220 fnt2 7739 9584(|)m 240 fnt1 7851 9587(\(and)m 8348(also)s 220 fnt2 8801 9584(&)m 240 fnt1 8943 9587(\).)m 0 9299(Consider)m 924(this)s 1320(e)s 3(xample:)k 220 fnt2 480 8798(5c @Wide @TightBo)m 6(x { A |1c B |1c C })k 240 fnt1 0 8299(As)m 317(usual,)s 929(the)s 1277(right)s 1788(parameter)s 2802(of)s 220 fnt2 3073 8296(@Wide)m 240 fnt1 3847 8299(is)m 4057(\207v)s 3(e)k 4469(centimetres)s 5620(wide,)s 6192(and)s 6596(the)s 6944(result)s 7534(looks)s 8104(lik)s 2(e)k 8516(this:)s 2835 165 0 57 240 288 60 480 7794 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 3(A)m 737(B)s 1447(C)s grestore 0 7343(Lout)m 512(has)s 882(to)s 1121(apportion)s 2095(the)s 2443(size)s 2870(minus)s 3506(inter)s 4(-column)k 4793(g)s 1(aps)k 5282(among)s 5987(the)s 6335(three)s 6868(columns.)s 480 6969(If)m 707(the)s 1052(columns)s 1911(are)s 2255(wide)s 2772(enough)s 3532(to)s 3768(require)s 4497(paragraph)s 5507(breaking,)s 6447(Lout)s 6956(will)s 7379(assign)s 8031(sizes)s 8543(to)s 8778(the)s 0 6681(columns)m 864(in)s 1110(such)s 1609(a)s 1778(w)s 2(ay)k 2232(as)s 2484(to)s 2726(lea)s 4(v)k 3(e)k 3282(narro)s 6(w)k 4010(columns)s 4875(unbrok)s 2(en)k 5837(and)s 6244(break)s 6839(wider)s 7446(columns)s 8311(to)s 8553(equal)s 0 6393(width,)m 652(occup)s 2(ying)k 1702(the)s 2051(full)s 2438(size.)s 2974(Otherwise,)s 4064(paragraph)s 5077(breaking)s 5968(is)s 6179(not)s 6546(required,)s 7450(and)s 7855(each)s 8351(column)s 0 6105(will)m 431(be)s 719(assigned)s 1607(a)s 1779(reasonable)s 2863(minimum)s 3858(size)s 4291(in)s 4540(the)s 4894(manner)s 5677(of)s 220 fnt2 5953 6102(@HContr)m 2(act)k 240 fnt1 7157 6105(,)m 7270(e)s 3(xcept)k 7957(that)s 8381(the)s 8735(last)s 0 5817(column)m 775(recei)s 6(v)k 3(es)k 1599(all)s 1892(the)s 2240(lefto)s 3(v)k 3(er)k 3036(width.)s 3745(F)s 3(or)k 4134(e)s 3(xample,)k 220 fnt2 480 5316(5c @Wide { @TightBo)m 6(x A |1c @TightBo)k 6(x B |1c @TightBo)k 6(x C })k 240 fnt1 0 4817(has)m 370(result)s 170 165 0 57 240 288 60 480 4362 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 3(A)m grestore 143 165 0 57 240 288 60 1217 4362 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 3(B)m grestore 1388 165 0 57 240 288 60 1927 4362 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 3(C)m grestore 0 3911(If)m 237(it)s 436(is)s 653(desired)s 1408(that)s 1833(the)s 2188(lefto)s 3(v)k 3(er)k 2991(width)s 3600(remain)s 4327(unused,)s 5120(rather)s 5743(than)s 6219(going)s 6825(into)s 7257(the)s 7612(last)s 8010(column,)s 8843(an)s 0 3623(empty)m 654(column)s 1431(can)s 1822(be)s 2106(appended,)s 3133(or)s 3394(the)s 3744(last)s 4137(column)s 4914(can)s 5305(be)s 5589(enclosed)s 6486(in)s 220 fnt2 6731 3620(@HContr)m 2(act)k 240 fnt1 7935 3623(.)m 8101(T)s 19(w)k 2(o)k 8575(other)s 0 3335(w)m 2(ays)k 560(to)s 819(apportion)s 1813(the)s 2181(lefto)s 3(v)k 3(er)k 2997(width)s 3619(are)s 3986(pro)s 3(vided)k 4912(by)s 5226(the)s 220 fnt2 5594 3332(@HExpand)m 240 fnt1 6787 3335(and)m 220 fnt2 7211 3332(@HAdjust)m 240 fnt1 8277 3335(symbols)m 0 3047(\(Sections)m 940(3.16)s 1413(and)s 1817(3.19\).)s 480 2673(The)m 914(third)s 1430(and)s 1841(\207nal)s 2328(e)s 3(xception)k 3319(to)s 3565(the)s 3920(`as)s 4255(wide)s 4783(as)s 5040(possible')s 5943(rule)s 6377(concerns)s 7285(the)s 7640(components)s 8855(of)s 0 2385(the)m 348(root)s 793(g)s 1(alle)k 3(y)k 15(.)k 1522(Each)s 2057(is)s 2267(considered)s 3361(to)s 3600(be)s 3882(enclosed)s [ /Dest /LOUT19_4605_det_size_5 /DEST pdfmark 4777(in)s 220 fnt2 5020 2382(@HContr)m 2(act)k 240 fnt1 6284 2385(and)m 220 fnt2 6688 2382(@VContr)m 2(act)k 240 fnt1 7940 2385(symbols.)m 480 2011(Up)m 836(to)s 1086(this)s 1493(point)s 2056(we)s 2401(ha)s 4(v)k 3(e)k 2913(treated)s 3631(width)s 4244(as)s 4505(a)s 4681(single)s 5319(quantity)s 15(,)k 6206(b)s 4(ut)k 6579(of)s 6860(course)s 7551(it)s 7754(has)s 8135(tw)s 2(o)k 8556(parts:)s 0 1723(width)m 602(to)s 841(left)s 1218(and)s 1622(right)s 2133(of)s 2404(the)s 2752(mark.)s 3407(The)s 3835(`as)s 4164(wide)s 4685(as)s 4935(possible')s 5831(rule)s 6258(applies)s 6986(to)s 7225(both)s 7708(directions:)s 220 fnt2 480 1222(@HContr)m 2(act { @TightBo)k 6(x 953^.05 /0.5c @TightBo)k 6(x 2^.8286 })k 240 fnt1 0 723(has)m 370(result)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 27 33 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.6.)m 1871(The)s 2283(style)s 2773(and)s 3199(size)s 3610(of)s 3891(objects)s 240 fnt5 10248 -1583(27)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13257 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 877 170 344 59 240 288 60 480 13198 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 0 5(953)m 344(.05)s grestore 877 167 344 57 240 288 60 480 12748 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 230 3(2)m 344(.8286)s grestore 0 12297(Lefto)m 3(v)k 3(er)k 868(width)s 1461(usually)s 2197(goes)s 2678(to)s 2908(the)s 3247(right,)s 3796(as)s 4037(we)s 4364(ha)s 4(v)k 3(e)k 4856(seen,)s 5379(b)s 4(ut)k 5732(here)s 6190(some)s 6742(width)s 7335(w)s 2(as)k 7747(a)s 4(v)k 6(ailable)k 8646(only)s 0 12009(to)m 239(the)s 587(left)s 964(of)s 220 fnt2 1235 12006(2.8286)m 240 fnt1 1958 12009(o)m 6(wing)k 2604(to)s 2843(the)s 3191(column)s 3966(mark)s 4518(alignment.)s 240 fnt5 0 11216(2.7.)m 471(Galleys)s 1282(and)s 1723(tar)s 2(gets)k [ /Dest /LOUTtargets /DEST pdfmark 240 fnt1 480 10739(The)m 909(beha)s 4(viour)k 1924(of)s 2197(g)s 1(alle)k 3(ys)k 2923(and)s 3328(their)s 3827(tar)s 4(gets,)k 4568(as)s 4820(described)s 5796(in)s 6040(Section)s [ /Dest /LOUT19_4605_det_gall_1 /DEST pdfmark [ /Dest /LOUT19_4605_det_gall_2 /DEST pdfmark 6816(1.4,)s 7225(can)s 7616(be)s 7900(summarized)s 0 10451(in)m 243(three)s 776(la)s 3(ws:)k 240 fnt6 0 9999(F)m 10(ir)k 2(st)k 540(Law)s 240 fnt1 949 9997(:)m 1139(The)s 1592(\207rst)s 2047(tar)s 4(get)k 2671(is)s 2905(the)s 3278(closest)s 4012(in)s 9(v)k 4(ocation)k 5091(of)s 5386(the)s 5759(tar)s 4(get)k 6382(symbol,)s 7219(either)s 7846(preceding)s 8867(or)s 0 9709(follo)m 6(wing)k 972(the)s 1315(in)s 9(v)k 4(ocation)k 2363(point)s 2910(of)s 3175(the)s 3518(g)s 1(alle)k 3(y)k 4146(as)s 4391(required,)s 5288(which)s 5925(has)s 6289(suf\207cient)s 7233(space)s 7814(to)s 8048(recei)s 6(v)k 3(e)k 8778(the)s 0 9421(\207rst)m 431(component;)s 240 fnt6 0 8918(Second)m 773(Law)s 240 fnt1 1182 8916(:)m 1364(Each)s 1915(subsequent)s 3055(tar)s 4(get)k 3670(is)s 3896(the)s 4259(closest)s 4985(in)s 9(v)k 4(ocation)k 6055(of)s 6342(the)s 6706(tar)s 4(get)k 7321(symbol,)s 8149(follo)s 6(wing)k 0 8628(the)m 337(pre)s 6(vious)k 1195(tar)s 4(get)k 1783(and)s 2176(lying)s 2710(within)s 3367(the)s 3704(same)s 4240(g)s 1(alle)k 3(y)k 15(,)k 4901(which)s 5532(has)s 5891(suf\207cient)s 6829(space)s 7405(to)s 7633(recei)s 6(v)k 3(e)k 8358(the)s 8695(\207rst)s 0 8340(remaining)m 1022(component;)s 240 fnt6 0 7837(Thir)m 8(d)k 607(Law)s 240 fnt1 1016 7835(:)m 1199(A)s 1446(recepti)s 6(v)k 3(e)k 2385(symbol)s 3162(that)s 3597(does)s 4104(not)s 4487(recei)s 6(v)k 3(e)k 5240(at)s 5489(least)s 6003(one)s 6422(component)s 7563(of)s 7851(an)s 3(y)k 8265(g)s 1(alle)k 3(y)k 8916(is)s 0 7547(replaced)m 867(by)s 220 fnt2 1161 7544(@Null)m 240 fnt1 1746 7547(.)m 0 7044(The)m 436(terms)s 1025(`closest,)s 16(')k 1918(`preceding,)s 16(')k 3104(and)s 3516(`follo)s 6(wing')k 4639(refer)s 5156(to)s 5403(position)s 6239(in)s 6490(the)s 6846(\207nal)s 7334(printed)s 8078(document.)s 0 6756(This)m 476(section)s 1210(e)s 3(xplains)k 2055(the)s 2403(operation)s 3363(of)s 3634(these)s 4181(la)s 3(ws)k 4667(in)s 4910(Basser)s 5607(Lout.)s 480 6382(When)m 1100(a)s 1257(g)s 1(alle)k 3(y)k 1881(cannot)s 2570(be)s 2843(\207tted)s 3382(into)s 3798(just)s 4194(one)s 4586(tar)s 4(get,)k 5223(Lout)s 5726(must)s 6241(\207nd)s 6663(points)s 7290(in)s 7523(the)s 7862(g)s 1(alle)k 3(y)k 8486(where)s 0 6094(it)m 191(can)s 579(be)s 860(split)s 1330(in)s 1572(tw)s 2(o.)k 2091(The)s 2518(object)s 3161(lying)s 3705(between)s 4558(tw)s 2(o)k 4966(neighbouring)s 6295(potential)s 7185(split)s 7655(points)s 8290(is)s 8498(called)s 0 5806(a)m 240 fnt6 166 5808(component)m [ /Dest /LOUT19_4605_det_gall_3 /DEST pdfmark 240 fnt1 1281 5806(of)m 1552(the)s 1900(g)s 1(alle)k 3(y)k 15(.)k 2629(By)s 2963(de\207nition,)s 3987(a)s 4153(component)s 5277(cannot)s 5975(be)s 6257(split.)s 480 5432(T)m 19(o)k 813(determine)s 1857(the)s 2239(components)s 3480(of)s 3785(a)s 3984(g)s 1(alle)k 3(y)k 15(,)k 4690(e)s 3(xpand)k 5470(all)s 5797(symbols)s 6679(other)s 7264(than)s 7766(recursi)s 6(v)k 3(e)k 8722(and)s 0 5144(recepti)m 6(v)k 3(e)k 909(ones,)s 1442(discard)s 2177(all)s 220 fnt2 2457 5141(@F)m 6(ont)k 240 fnt1 3109 5144(,)m 220 fnt2 3203 5141(@Break)m 240 fnt1 3999 5144(,)m 220 fnt2 4093 5141(@Space)m 240 fnt1 4930 5144(,)m 220 fnt2 5024 5141(@SetColor)m 240 fnt1 6099 5144(,)m 220 fnt2 6193 5141(@SetColour)m 240 fnt1 7390 5144(,)m 7484(and)s 220 fnt2 7875 5141(@Language)m 240 fnt1 0 4856(symbols,)m 908(perform)s 1740(paragraph)s 2756(breaking)s 3649(as)s 3902(required,)s 4809(and)s 5216(discard)s 5967(all)s 6263(redundant)s 7283(braces.)s 8060(Then)s 8613(vie)s 6(w)k 0 4568(the)m 367(g)s 1(alle)k 3(y)k 1020(as)s 1290(a)s 1475(sequence)s 2428(of)s 2718(one)s 3140(or)s 3418(more)s 3984(objects)s 4732(separated)s 5711(by)s 6025(v)s 3(ertical)k 6811(concatenation)s 8216(symbols;)s 0 4280(these)m 567(are)s 935(the)s 1304(components)s 2533(and)s 2958(split)s 3450(points,)s 4163(e)s 3(xcept)k 4865(that)s 5304(concatenation)s 6710(symbols)s 7580(whose)s 8269(g)s 1(aps)k 8779(are)s 0 3992(unbreakable)m 1225(\(Section)s 2078(3.2\))s 2506(are)s 2853(not)s 3219(eligible)s 3991(to)s 4230(be)s 4512(split)s 4983(points.)s 5732(F)s 3(or)k 6121(e)s 3(xample,)k 7035(gi)s 6(v)k 3(en)k 7615(the)s 7963(de\207nition)s 220 fnt2 480 3491(def @Section into { @SectionPlace&&preceding })m 480 3203( named @Title {})m 480 2915( r)m -3(ight @Body)k 480 2627({)m 480 2339( 15p @F)m 6(ont { @Title //0.7f })k 480 2051( //)m 480 1763( @Body)m 480 1475(})m 240 fnt1 0 981(the)m 348(g)s 1(alle)k 3(y)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 28 34 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(28)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(@Section)m 480 12919( @Title { Introduction })m 480 12631({ )m 11(This is a subject that really)k 480 12343(needs no introduction.)m 13( })k 240 fnt1 0 11849(becomes)m 220 fnt2 480 11402(Introduction)m 480 11114(//0.7f)m 480 10826({})m 480 10538(//)m 480 10250(This is a subject that really needs)m 480 9962(//1vx)m 480 9674(no introduction.)m 240 fnt1 0 9220(with)m 482(four)s 939(components.)s 2260(If)s 220 fnt2 2489 9217(@Body)m 240 fnt1 3269 9220(had)m 3673(been)s 4181(preceded)s 5102(by)s 220 fnt2 5395 9217(|1.0c)m 240 fnt1 5921 9220(in)m 6164(the)s 6511(de\207nition,)s 7535(the)s 7882(result)s 8471(w)s 2(ould)k 0 8932(ha)m 4(v)k 3(e)k 501(been)s 220 fnt2 480 8484(Introduction)m 480 8196(//0.7f)m 480 7908({})m 480 7620(//)m 480 7332(|1.0c { )m 11(This is a subject that really needs //1vx no introduction.)k 13( })k 240 fnt1 0 6834(with)m 220 fnt2 524 6831(//1vx)m 240 fnt1 1089 6834(b)m 4(uried)k 1796(within)s 2507(one)s 2951(component)s 4118(and)s 4564(hence)s 5221(not)s 5629(a)s 5838(potential)s 6771(split)s 7285(point.)s 7983(If)s 220 fnt2 8256 6831(0.7f)m 240 fnt1 8722 6834(had)m 0 6546(been)m 220 fnt2 525 6543(0.7fu)m 240 fnt1 999 6546(,)m 1123(the)s 1488(g)s 1(ap)k 1903(w)s 2(ould)k 2575(ha)s 4(v)k 3(e)k 3092(been)s 3618(unbreakable)s 4860(and)s 220 fnt2 5281 6543(//0.7fu)m 240 fnt1 5954 6546(w)m 2(ould)k 6625(not)s 7008(ha)s 4(v)k 3(e)k 7526(been)s 8052(a)s 8235(potential)s 0 6258(split)m 471(point.)s 480 5884(V)m 26(ersion)k 1310(3.03)s 1816(has)s 2228(liberalized)s 3335(this)s 3773(some)s 6(what)k 4840(in)s 5125(the)s 5515(follo)s 6(wing)k 6534(w)s 2(ay)k 15(.)k 7122(When)s 7793(a)s 8002(component)s 0 5596(consists)m 808(of)s 1080(a)s 1247(horizontal)s 2271(sequence)s 3205(of)s 3477(tw)s 2(o)k 3888(or)s 4147(more)s 4695(objects)s 240 fnt6 5424 5598(A)m 167 fnt4 5559 5506(1)m 240 fnt4 5637 5590(,)m 5746(\274)s 6046(,)s 240 fnt6 6155 5598(A)m 167 fnt6 6290 5511(n)m 240 fnt1 6430 5596(separated)m 7391(by)s 220 fnt2 7686 5593(|)m 240 fnt1 7783 5596(\(not)m 220 fnt2 8229 5593(||)m 240 fnt1 8323 5596(,)m 8431(not)s 220 fnt2 8798 5593(&)m 240 fnt1 8940 5596(\),)m 0 5308(Lout)m 506(will)s 926(in)s 9(v)k 3(estig)k 1(ate)k 1998(the)s 2339(component)s 3457(to)s 3690(see)s 4044(whether)s 4868(it)s 5054(can)s 5436(be)s 5712(brok)s 2(en)k 6426(up.)s 6823(It)s 7022(looks)s 7586(at)s 7811(each)s 240 fnt6 8300 5310(A)m 167 fnt6 8435 5223(i)m 240 fnt1 8533 5308(to)m 8765(see)s 0 5020(whether)m 831(it)s 1024(is)s 1235(a)s 1402(v)s 3(ertical)k 2170(concatenation)s 3556(of)s 3828(objects)s 240 fnt6 4557 5022(A)m 167 fnt6 4692 4935(i)m 167 fnt4 4744 4930(1)m 240 fnt4 4822 5014(,)m 4932(\274)s 5233(,)s 240 fnt6 5343 5022(A)m 167 fnt6 5478 4935(im)m 240 fnt1 5641 5020(;)m 5754(if)s 5972(tw)s 2(o)k 6383(or)s 6643(more)s 7191(of)s 7463(the)s 240 fnt6 7812 5022(A)m 167 fnt6 7947 4935(i)m 240 fnt1 8052 5020(satisfy)m 8730(this)s 0 4732(condition,)m 1009(the)s 1354(component)s 2475(will)s 2898(not)s 3262(be)s 3541(brok)s 2(en)k 4258(up.)s 4659(So)s 4962(no)s 6(w)k 5421(suppose)s 6246(we)s 6578(ha)s 4(v)k 3(e)k 7076(just)s 7479(one)s 240 fnt6 7878 4734(A)m 167 fnt6 8013 4647(i)m 240 fnt1 8114 4732(which)m 8753(is)s 8960(a)s 0 4444(v)m 3(ertical)k 757(concatenation.)s 2239(Lout)s 2741(will)s 3156(break)s 3738(the)s 4076(component)s 5190(into)s 5604(one)s 5996(component)s 7110(for)s 7438(each)s 7922(of)s 8183(the)s 240 fnt6 8521 4446(A)m 167 fnt6 8656 4359(i)m 167 fnt4 8708 4354(1)m 240 fnt4 8775 4438(,)m 8851(\274)s 3 4150(,)m 240 fnt6 80 4158(A)m 167 fnt6 215 4071(im)m 240 fnt1 378 4156(,)m 476(pro)s 3(vided)k 1372(that)s 1780(the)s 3(y)k 2233(are)s 2571(separated)s 3521(by)s 220 fnt2 3805 4153(//)m 240 fnt1 3980 4156(symbols)m 4820(\(not)s 220 fnt2 5255 4153(/)m 240 fnt1 5319 4156(\),)m 5495(and)s 5889(pro)s 3(vided)k 6786(this)s 7172(can)s 7551(be)s 7823(done)s 8335(without)s 0 3868(introducing)m 1155(an)s 3(y)k 1550(apparent)s 2431(change)s 3164(into)s 3587(the)s 3933(appearance)s 5062(of)s 5332(the)s 5678(component)s 6800(\(this)s 7274(second)s 7995(rule)s 8420(will)s 8844(be)s 0 3580(satis\207ed)m 847(if)s 1071(the)s 1426(other)s 240 fnt6 1984 3582(A)m 167 fnt6 2119 3495(j)m 240 fnt1 2232 3580(are)m 2586(not)s 2959(v)s 3(ery)k 3442(lar)s 4(ge\).)k 4165(The)s 4600(e)s 3(xample)k 5470(abo)s 3(v)k 3(e)k 6099(satis\207es)s 6913(all)s 7213(these)s 7767(rules)s 8289(and)s 8700(will)s 0 3269(be)m 282(brok)s 2(en)k 1002(up)s 1295(into)s 1720(tw)s 2(o)k 2130(components,)s 3394(so)s 3660(the)s 220 fnt2 4008 3266(//1vx)m 240 fnt1 4530 3269(becomes)m 5418(a)s 5584(potential)s 6475(split)s 6946(point)s 7498(after)s 7994(all.)s 480 2895(The)m 913(lines)s 1421(of)s 1697(a)s 1869(paragraph)s 2887(become)s 3693(separate)s 4536(components)s 5750(if)s 5972(the)s 6326(paragraph)s 7344(occupies)s 8238(an)s 8527(entire)s 0 2607(component)m 1151(before)s 1844(breaking;)s 2820(otherwise)s 3833(the)s 3(y)k 4323(are)s 4697(enclosed)s 5619(in)s 5890(a)s 220 fnt2 6083 2604(@OneRo)m 3(w)k 240 fnt1 7241 2607(symbol)m 8028(within)s 8724(one)s 0 2319(component.)m 1237(The)s 1675(same)s 2232(is)s 2452(true)s 2888(of)s 3169(incoming)s 4136(components)s 5354(of)s 5635(other)s 6195(g)s 1(alle)k 3(ys.)k 7042(If)s 7282(a)s 220 fnt2 7458 2316(@Galle)m 4(y)k 240 fnt1 8366 2319(symbol)m 0 2031(occupies)m 892(an)s 1180(entire)s 1783(component)s 2912(by)s 3211(the)s 3563(rules)s 4083(abo)s 3(v)k 3(e,)k 4761(then)s 5234(the)s 5587(incoming)s 6549(components)s 7761(that)s 8184(replace)s 8934(it)s 0 1743(become)m 800(components)s 2008(of)s 2279(their)s 2776(ne)s 6(w)k 3223(home:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 29 35 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.7.)m 1871(Galle)s 7(ys)k 2649(and)s 3075(tar)s 8(g)k 2(ets)k 240 fnt5 10249 -1583(29)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13154(An e)m 6(xample)k 480 12866(//0.5c)m 480 12578(@Galle)m 4(y)k 480 12290(//0.5c)m 480 12002(@SomethingList)m 240 fnt4 2500 12863(\336)m 220 fnt2 3141 13154(An e)m 6(xample)k 3141 12866(//0.5c)m 3141 12578(Incoming components)m 3141 12290(//0.2c)m 3141 12002(from some other galle)m 4(y)k 3141 11714(//0.5c)m 3141 11426(@SomethingList)m 240 fnt1 0 10870(Otherwise)m 1062(the)s 1435(incoming)s 2416(components)s 3649(are)s 4020(grouped)s 4888(within)s 5580(a)s 220 fnt2 5771 10867(@OneRo)m 3(w)k 240 fnt1 6926 10870(symbol)m 7711(and)s 8139(lie)s 8458(within)s 0 10582(one)m 402(component.)s 480 10208(This)m 985(distinction)s 2080(has)s 2480(a)s 2675(mark)s 2(ed)k 3477(ef)s 6(fect)k 4103(on)s 4429(the)s 4806(v)s 3(ertical)k 5603(concatenation)s [ /Dest /LOUT19_4605_det_gall_4 /DEST pdfmark 7017(symbol)s 220 fnt2 7806 10205(//1.1b)m 240 fnt1 8347 10208(,)m 8484(which)s 0 9920(calls)m 509(for)s 868(more)s 1436(space)s 2045(than)s 2535(is)s 2766(a)s 4(v)k 6(ailable)k 3695(\(Section)s 4570(3.2\).)s 5134(There)s 5768(is)s 5999(no)s 6314(room)s 6900(for)s 7259(this)s 7676(symbol)s 8458(within)s 0 9632(an)m 3(y)k 402(component,)s 1579(so)s 1851(it)s 2049(will)s 2481(force)s 3033(a)s 3205(split)s 3682(and)s 4092(be)s 4379(discarded)s 5359(in)s 5608(that)s 6032(case.)s 6613(But)s 7025(it)s 7223(can)s 7618(be)s 7906(promoted)s 8887(to)s 0 9344(between)m 854(tw)s 2(o)k 1264(components.)s 480 8970(Components)m 1749(may)s 2223(be)s 2513(separated)s 3481(by)s 220 fnt2 3783 8967(/)m 240 fnt1 3914 8970(as)m 4172(well)s 4646(as)s 4904(by)s 220 fnt2 5206 8967(//)m 240 fnt1 5331 8970(,)m 5445(gi)s 6(ving)k 6112(rise)s 6520(to)s 6767(column)s 7550(mark)s 8110(alignment)s 0 8682(between)m 854(adjacent)s 1710(components:)s 1701 1360 567 1360 240 288 60 480 6982 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1701 1360 567 1360 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 1134 340 567 340 240 288 60 0 1020 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore 1134 340 0 340 240 288 60 567 510 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore 736 340 283 340 240 288 60 284 0 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore grestore end end restore grestore 0 6531(When)m 688(aligned)s 1509(components)s 2777(are)s 3183(promoted)s 4218(into)s 4702(dif)s 6(ferent)k 5637(tar)s 4(gets,)k 6435(the)s 6843(meaning)s 7779(of)s 8110(alignment)s 0 6243(becomes)m 882(v)s 3(ery)k 1351(doubtful.)s 2319(F)s 3(or)k 2702(e)s 3(xample,)k 3609(what)s 4127(if)s 4338(the)s 4679(tar)s 4(gets)k [ /Dest /LOUT19_4605_det_gall_5 /DEST pdfmark 5355(are)s 5696(in)s 5932(dif)s 6(ferent)k 6800(columns)s 7656(of)s 7920(one)s 8315(page,)s 8867(or)s 0 5955(what)m 525(if)s 742(one)s 1144(lies)s 1526(within)s 220 fnt2 2194 5952(90d @Rotate)m 240 fnt1 3482 5955(?)m 480 5581(The)m 908(truth)s 1416(is)s 1626(that)s 220 fnt2 2044 5578(/)m 240 fnt1 2168 5581(causes)m 2843(all)s 3136(the)s 3484(objects)s 4212(that)s 4630(share)s 5190(a)s 5356(mark)s 5908(to)s 6147(ha)s 4(v)k 3(e)k 6648(equal)s 7221(width:)s 1701 1360 567 1360 240 288 60 480 3881 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1701 1360 567 1360 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 1701 340 567 340 240 288 60 0 1020 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 1134 340 567 340 240 288 60 0 0 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore grestore 1701 340 567 340 240 288 60 0 510 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 1134 340 0 340 240 288 60 567 0 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore grestore 1701 340 567 340 240 288 60 0 0 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke grestore 736 340 283 340 240 288 60 284 0 LoutGr2 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore grestore grestore end end restore grestore 0 3429(This)m 495(is)s 724(a)s 909(consequence)s 2207(of)s 2497(the)s 2864(`as)s 3212(wide)s 3753(as)s 4022(possible')s 4937(rule)s 5383(\(Section)s 6255(2.6\).)s 6817(Mark)s 7415(alignment)s 8451(occurs)s 240 fnt6 0 3143(incidentally)m 240 fnt1 1124 3141(,)m 1231(whene)s 6(v)k 3(er)k 2212(the)s 2560(fragments)s 3566(are)s 3913(placed)s 4595(into)s 5020(similar)s 5742(conte)s 3(xts.)k 480 2767(In)m 723(this)s 1106(connection)s 2200(we)s 2521(must)s 3033(also)s 3458(consider)s 4315(the)s 4649(special)s 5354(case)s 5808(of)s 6066(a)s 220 fnt2 6218 2764(@Galle)m 4(y)k 240 fnt1 7103 2767(symbol)m 7850(which)s 8478(shares)s 0 2479(its)m 276(column)s 1051(mark)s 1603(with)s 2085(some)s 2646(other)s 3197(object:)s 220 fnt2 480 1978(@Galle)m 4(y)k 480 1690(/0.2c)m 480 1402(@SomethingList)m 240 fnt1 0 903(\(The)m 220 fnt2 501 900(@Galle)m 4(y)k 240 fnt1 1392 903(may)m 1851(or)s 2104(may)s 2563(not)s 2922(occup)s 2(y)k 3660(an)s 3936(entire)s 4528(component;)s 5698(that)s 6109(doesn')s 4(t)k 6862(matter)s 7525(here.\))s 8177(If)s 8400(incom-)s 0 615(ing)m 355(components)s 1559(are)s 1901(separated)s 2857(by)s 220 fnt2 3146 612(//)m 240 fnt1 3327 615(rather)m 3938(than)s 4403(by)s 220 fnt2 4692 612(/)m 240 fnt1 4756 615(,)m 4859(the)s 5203(meaning)s 6075(is)s 6281(so)s 6542(doubtful)s 7404(that)s 7817(this)s 8209(is)s 8414(forbid-)s 0 327(den.)m 496(In)s 738(f)s 2(act,)k 1186(a)s 1337(g)s 1(alle)k 3(y)k 1957(whose)s 2611(components)s 3804(replace)s 4535(such)s 5017(a)s 220 fnt2 5168 324(@Galle)m 4(y)k 240 fnt1 6052 327(must)m 6563(ha)s 4(v)k 3(e)k 7049(a)s 7201(single)s 7814(column)s 8574(mark)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 30 36 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(30)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(running)m 783(its)s 1043(full)s 1413(length;)s 2108(that)s 2510(is,)s 2760(its)s 3021(components)s 4213(must)s 4722(all)s 4999(share)s 5544(a)s 5694(single)s 6305(column)s 7065(mark.)s 7704(This)s 8164(mark)s 8700(will)s 0 12917(be)m 281(mer)s 4(ged)k 1050(with)s 1530(the)s 1876(column)s 2649(mark)s 3199(passing)s 3969(through)s 4769(each)s 220 fnt2 5262 12914(@Galle)m 4(y)k 240 fnt1 6158 12917(that)m 6574(these)s 7119(components)s 8325(replace;)s 0 12629(all)m 293(the)s 641(objects)s 1369(on)s 1666(the)s 2014(resulting)s 2903(mer)s 4(ged)k 3674(mark)s 4226(will)s 4652(ha)s 4(v)k 3(e)k 5153(equal)s 5726(width.)s 480 12255(The)m 905(root)s 1347(g)s 1(alle)k 3(y)k 15(,)k 2016(where)s 2653(e)s 6(v)k 3(erything)k 3717(collects)s 4494(immediately)s 5739(prior)s 6260(to)s 6496(output,)s [ /Dest /LOUT19_4605_det_gall_6 /DEST pdfmark 7212(is)s 7419(created)s 8162(automati-)s 0 11967(cally)m 15(,)k 555(not)s 920(by)s 1213(a)s 1378(de\207nition.)s 2457(Its)s 2745(tar)s 4(get)k 3343(is)s 3552(the)s 3899(output)s 4569(\207le,)s 4980(and)s 5383(its)s 5658(object)s 6301(is)s 6509(the)s 6856(entire)s 7454(input,)s 8052(which)s 8692(typ-)s 0 11679(ically)m 584(looks)s 1154(lik)s 2(e)k 1566(this:)s 220 fnt2 480 11178(@P)m 8(ageList)k 480 10890(//)m 480 10602(@T)m 26(e)k 6(xt {)k 480 10314( Body te)m 6(xt of the document ...)k 480 10026(})m 240 fnt1 0 9532(where)m 220 fnt2 639 9529(@P)m 8(ageList)k 240 fnt1 1761 9532(e)m 3(xpands)k 2592(to)s 2830(a)s 2994(sequence)s 3925(of)s 4195(pages)s 4789(containing)s 220 fnt2 5850 9529(@T)m 26(e)k 6(xtPlace)k 240 fnt1 7067 9532(symbols)m 7914(\(see)s 8352(Section)s 0 9244(1.2\),)m 486(and)s 220 fnt2 890 9241(@T)m 26(e)k 6(xt)k 240 fnt1 1564 9244(is)m 1774(a)s 1940(g)s 1(alle)k 3(y:)k 220 fnt2 480 8743(def @T)m 26(e)k 6(xtPlace { @Galle)k 4(y })k 480 8167(def @T)m 26(e)k 6(xt into { @T)k 26(e)k 6(xtPlace&&preceding })k 480 7879( r)m -3(ight x)k 480 7591({)m 480 7303( x)m 480 7015(})m 240 fnt1 0 6521(The)m 428(spot)s 886(v)s 6(acated)k 1668(by)s 1961(a)s 2127(g)s 1(alle)k 3(y)k 2760(\211)s 2940(its)s 3215(in)s 9(v)k 4(ocation)k 4268(point)s 4820(\211)s 4999(becomes)s 5887(a)s 220 fnt2 6052 6518(@Null)m 240 fnt1 6697 6521(object,)m 7387(so)s 7653(this)s 8048(root)s 8492(g)s 1(alle)k 3(y)k 0 6233(is)m 210(ef)s 6(fecti)k 6(v)k 3(ely)k 220 fnt2 1269 6230(@P)m 8(ageList)k 240 fnt1 2393 6233(alone,)m 3018(as)s 3269(required.)s 4229(The)s 220 fnt2 4657 6230(@T)m 26(e)k 6(xt)k 240 fnt1 5331 6233(g)m 1(alle)k 3(y)k 5965(will)s 6392(\207nd)s 6823(its)s 7099(\207rst)s 7530(tar)s 4(get)k 8130(preceding)s 0 5945(its)m 276(in)s 9(v)k 4(ocation)k 1330(point,)s 1929(within)s 220 fnt2 2597 5942(@P)m 8(ageList)k 240 fnt1 3661 5945(.)m 480 5571(Printing)m [ /Dest /LOUTrootg /DEST pdfmark 1308(the)s 1661(root)s 2112(g)s 1(alle)k 3(y)k 2751(on)s 3054(the)s 3407(output)s 4085(\207le)s 4451(is)s 4666(some)s 6(what)k 5696(problematical,)s [ /Dest /LOUT19_4605_det_gall_7 /DEST pdfmark 7121(because)s 7940(Lout)s 8457(has)s 8833(no)s 0 5283(w)m 2(ay)k 461(of)s 742(kno)s 6(wing)k 1638(ho)s 6(w)k 2109(lar)s 4(ge)k 2648(the)s 3006(paper)s 3607(is.)s 3941(Basser)s 4648(Lout)s 5170(simply)s 5885(prints)s 6490(one)s 6902(root)s 7357(g)s 1(alle)k 3(y)k 8002(component)s 0 4995(per)m 355(page)s 852(\(e)s 3(xcept)k 1601(it)s 1782(skips)s 2314(components)s 3511(of)s 3771(height)s 4418(zero\),)s 5005(and)s 5398(the)s 5735(user)s 6182(is)s 6381(responsible)s 7515(for)s 7842(ensuring)s 8708(that)s 0 4707(each)m 504(component)s 1637(is)s 1856(page-sized.)s 3051(Gaps)s 3603(between)s 4466(root)s 4920(g)s 1(alle)k 3(y)k 5563(components,)s 6836(e)s 6(v)k 3(en)k 7345(unbreakable)s 8580(ones,)s 0 4419(ha)m 4(v)k 3(e)k 501(no)s 794(ef)s 6(fect)k 1390(on)s 1687(the)s 2035(result.)s 480 4045(Basser)m 1204(Lout)s 1744(will)s 2198(promote)s 3079(a)s 3273(component)s 4425(only)s 4933(after)s 5457(an)s 3(y)k 5882(recepti)s 6(v)k 3(e)k 6832(symbols)s [ /Dest /LOUT19_4605_det_gall_8 /DEST pdfmark [ /Dest /LOUT19_4605_det_gall_9 /DEST pdfmark 7709(within)s 8405(it)s 8625(ha)s 4(v)k 3(e)k 0 3757(been)m 509(replaced,)s 1426(either)s 2029(by)s 2324(g)s 1(alle)k 3(ys)k 3048(or)s 3308(by)s 220 fnt2 3602 3754(@Null)m 240 fnt1 4187 3757(,)m 4295(since)s 4842(until)s 5336(then)s 5805(the)s 6154(component)s 7278(is)s 7489(not)s 7855(complete.)s 8896(A)s 0 3469(component)m 1109(which)s 1736(shares)s 2369(a)s 2520(mark)s 3057(with)s 3524(follo)s 6(wing)k 4486(components)s 5679(is)s 5874(held)s 6329(up)s 6607(until)s 7085(the)s 3(y)k 7533(are)s 7865(all)s 8143(complete,)s 0 3181(since)m 547(until)s 1040(then)s 1509(their)s 2006(width)s 2608(is)s 2818(uncertain.)s 480 2807(Consider)m 1409(a)s 1581(page)s 2095(with)s 220 fnt2 2583 2804(@T)m 26(e)k 6(xtPlace)k 240 fnt1 3806 2807(and)m 220 fnt2 4216 2804(@F)m 6(ootSect)k 240 fnt1 5373 2807(recepti)m 6(v)k 3(e)k 6301(symbols.)s 7268(The)s 7702(rule)s 8135(just)s 8546(gi)s 6(v)k 3(en)k 0 2519(will)m 418(pre)s 6(v)k 3(ent)k 1177(the)s 1517(page)s 2016(from)s 2531(being)s 3108(printed)s 3834(until)s 220 fnt2 4319 2516(@T)m 26(e)k 6(xtPlace)k 240 fnt1 5528 2519(is)m 5729(replaced)s 6588(by)s 6873(body)s 7399(te)s 3(xt,)k 7852(quite)s 8377(rightly;)s 0 2231(b)m 4(ut)k 220 fnt2 362 2228(@F)m 6(ootSect)k 240 fnt1 1513 2231(will)m 1939(also)s 2377(pre)s 6(v)k 3(ent)k 3145(its)s 3421(printing,)s 4285(e)s 6(v)k 3(en)k 4785(when)s 5361(there)s 5894(are)s 6241(no)s 6534(footnotes.)s 480 1857(Basser)m 1187(Lout)s 1709(is)s 1930(k)s 2(een)k 2447(to)s 2696(write)s 3253(out)s 3629(pages)s 4235(as)s 4496(soon)s 5016(as)s 5276(possible,)s 6178(to)s 6427(sa)s 4(v)k 3(e)k 6911(memory)s 15(,)k 7811(and)s 8225(it)s 8428(cannot)s 0 1569(af)m 6(ford)k 624(to)s 852(w)s 2(ait)k 1309(fore)s 6(v)k 3(er)k 2038(for)s 2365(non-e)s 3(xistent)k 3592(footnotes.)s 4635(A)s 4854(v)s 6(ariant)k 5559(of)s 5819(the)s 6156(g)s 1(alle)k 3(y)k 6778(concept,)s 7618(called)s 8235(a)s 240 fnt6 8389 1571(for)m 8(cing)k 0 1283(galle)m 7(y)k 240 fnt1 573 1281(,)m [ /Dest /LOUT19_4605_det_gall_10 /DEST pdfmark [ /Dest /LOUTforcing /DEST pdfmark 680(is)s 890(introduced)s 1971(to)s 2210(solv)s 3(e)k 2768(this)s 3164(problem.)s 4125(A)s 4355(forcing)s 5098(g)s 1(alle)k 3(y)k 5732(is)s 5942(de\207ned)s 6705(lik)s 2(e)k 7117(this:)s 220 fnt2 480 780(def @T)m 26(e)k 6(xt f)k 6(orce into { @T)k 26(e)k 6(xtPlace&&preceding })k 480 492( ...)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 31 37 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.7.)m 1871(Galle)s 7(ys)k 2649(and)s 3075(tar)s 8(g)k 2(ets)k 240 fnt5 10256 -1583(31)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(and)m 392(so)s 646(on.)s 1037(When)s 1654(such)s 2138(a)s 2291(g)s 1(alle)k 3(y)k 2913(replaces)s 3734(a)s 220 fnt2 3887 13202(@Galle)m 4(y)k 240 fnt1 4773 13205(symbol,)m 5573(Lout)s 6072(replaces)s 6893(e)s 6(v)k 3(ery)k 7457(recepti)s 6(v)k 3(e)k 8366(symbol)s 0 12917(preceding)m 1004(the)s 220 fnt2 1360 12914(@Galle)m 4(y)k 240 fnt1 2266 12917(by)m 220 fnt2 2568 12914(@Null)m 240 fnt1 3153 12917(,)m 3268(thus)s 3726(ensuring)s 4611(that)s 5038(as)s 5296(soon)s 5814(as)s 6072(te)s 3(xt)k 6495(enters)s 7124(a)s 7298(page,)s 7865(for)s 8212(e)s 3(xample,)k 0 12629(e)m 6(v)k 3(erything)k 1064(up)s 1354(to)s 1590(and)s 1991(including)s 2945(the)s 3289(preceding)s 4282(page)s 4787(can)s 5173(be)s 5452(printed.)s 6290(This)s 6762(does)s 7249(not)s 7612(tak)s 2(e)k 8061(care)s 8511(of)s 8778(the)s 0 12341(v)m 3(ery)k 479(last)s 873(page,)s 1435(b)s 4(ut)k 1801(Basser)s 2501(Lout)s 3016(replaces)s 3852(all)s 4149(recepti)s 6(v)k 3(e)k 5074(symbols)s 5926(by)s 220 fnt2 6223 12338(@Null)m 240 fnt1 6872 12341(when)m 7451(it)s 7646(realizes)s 8428(that)s 8850(its)s 0 12053(input)m 552(has)s 922(all)s 1215(been)s 1724(read,)s 2242(thus)s 2692(allo)s 6(wing)k 3576(the)s 3924(last)s 4315(page)s 4823(to)s 5062(print.)s 480 11679(A)m 714(forcing)s 1461(g)s 1(alle)k 3(y)k 2099(causes)s 2779(the)s 3131(Third)s 3724(La)s 3(w)k 4204(to)s 4448(be)s 4734(applied)s 5500(earlier)s 6172(than)s 6646(e)s 3(xpected,)k 7604(and)s 8012(this)s 8413(creates)s 0 11391(tw)m 2(o)k 425(problems.)s 1495(First,)s 2055(the)s 2419(replacement)s 3662(by)s 220 fnt2 3972 11388(@Null)m 240 fnt1 4633 11391(may)m 5114(be)s 5412(premature:)s 6562(a)s 6744(g)s 1(alle)k 3(y)k 7394(may)s 7876(turn)s 8334(up)s 8643(later)s 0 11103(w)m 2(anting)k 869(one)s 1318(of)s 1636(the)s 2032(defunct)s 2856(tar)s 4(gets.)k 3699(Such)s 4283(g)s 1(alle)k 3(ys)k 5054(\(entries)s 5867(in)s 6157(tables)s 6813(of)s 7131(contents)s 8026(are)s 8421(typical)s 0 10815(e)m 3(xamples\))k 1020(are)s 1358(copied)s 2045(into)s 2461(the)s 2801(cross)s 3334(reference)s 4268(database)s 5138(and)s 5534(read)s 5994(in)s 6228(during)s 6897(the)s 7237(ne)s 3(xt)k 7697(run)s 8064(just)s 8460(before)s 0 10527(their)m 488(tar)s 4(gets)k 1161(are)s 1498(closed,)s 2206(and)s 2600(so)s 2856(the)s 3(y)k 3309(\207nd)s 3730(their)s 4217(tar)s 4(gets)k 4891(in)s 5124(the)s 5462(end.)s 5962(Care)s 6459(must)s 6974(be)s 7246(tak)s 2(en)k 7809(to)s 8038(ensure)s 8708(that)s 0 10239(lar)m 4(ge)k 526(g)s 1(alle)k 3(ys)k 1247(such)s 1739(as)s 1986(chapters)s 2829(and)s 3230(sections)s 4047(do)s 4337(not)s 4700(ha)s 4(v)k 3(e)k 5197(defunct)s 5971(tar)s 4(gets,)k 6706(since)s 7250(the)s 7594(cost)s 8036(of)s 8303(cop)s 2(ying)k 0 9951(them)m 538(to)s 777(and)s 1181(from)s 1705(the)s 2053(database)s 2932(is)s 3142(unacceptably)s 4458(high.)s 480 9577(It)m 694(is)s 914(actually)s 1734(an)s 2027(o)s 3(v)k 3(er)k 4(-simpli\207cation)k 3901(to)s 4150(say)s 4533(that)s 4961(these)s 5517(replacements)s 6838(occur)s 7439(when)s 8025(the)s 8383(forcing)s 0 9289(g)m 1(alle)k 3(y)k 633(replaces)s 1464(its)s 220 fnt2 1738 9286(@Galle)m 4(y)k 240 fnt1 2576 9289(.)m 2738(What)s 3315(really)s 3910(happens)s 4744(is)s 4952(that)s 5368(from)s 5891(this)s 6285(moment)s 7127(on)s 7422(Lout)s 7932(understands)s 0 9001(that)m 414(it)s 602(has)s 968(the)s 1311(right)s 1818(to)s 2053(mak)s 2(e)k 2621(these)s 3163(replacements,)s 4526(and)s 4926(it)s 5114(will)s 5535(do)s 5824(each)s 6315(one)s 6713(at)s 6940(the)s 7284(\207rst)s 7711(moment)s 8550(when)s 0 8713(not)m 369(doing)s 972(it)s 1168(w)s 2(ould)k 1827(hold)s 2315(things)s 2955(up.)s 3363(So)s 3673(there)s 4210(is)s 4423(a)s 4593(short)s 5135(period)s 5808(of)s 6083(grace)s 6660(when)s 7240(g)s 1(alle)k 3(ys,)k 8024(such)s 8524(as)s 8778(the)s 0 8425(entries)m 687(in)s 930(tables)s 1538(of)s 1809(contents)s 2657(just)s 3062(alluded)s 3824(to,)s 4117(can)s 4506(sneak)s 5112(into)s 5537(these)s 6084(recepti)s 6(v)k 3(e)k 7006(symbols.)s 480 8051(The)m 220 fnt2 902 8048(into)m 240 fnt1 1302 8051(and)m 220 fnt2 1699 8048(f)m 6(orce into)k 240 fnt1 2642 8051(forms)m 3243(are)s 3584(actually)s 4387(just)s 4786(abbre)s 6(viations)k 6112(for)s 6444(the)s 6785(true)s 7206(w)s 2(ay)k 7650(that)s 8062(g)s 1(alle)k 3(ys)k 8779(are)s 0 7763(de\207ned,)m 806(which)s 1442(is)s 1646(by)s 1934(gi)s 6(ving)k 2586(the)s 2928(symbol)s 3682(that)s 4094(is)s 4297(to)s 4530(be)s 4806(a)s 4966(g)s 1(alle)k 3(y)k 5594(a)s 5753(parameter)s 6761(or)s 7014(nested)s [ /Dest /LOUT19_4605_det_gall_11 /DEST pdfmark 7677(de\207nition)s 8644(with)s 0 7475(the)m 348(special)s 1066(name)s 220 fnt2 1640 7472(@T)m 26(arget)k 240 fnt1 2467 7475(:)m 220 fnt2 480 6974(def @T)m 26(e)k 6(xt)k 480 6686( r)m -3(ight x)k 480 6398({)m 480 6110( def @T)m 26(arget { @T)k 26(e)k 6(xtPlace&&preceding })k 480 5534( x)m 480 5246(})m 240 fnt1 0 4752(A)m 237(forcing)s 988(g)s 1(alle)k 3(y)k 1630(is)s 1848(obtained)s 2738(by)s 3039(using)s 220 fnt2 3619 4749(&&&)m 240 fnt1 4121 4752(instead)m 4864(of)s 220 fnt2 5143 4749(&&)m 240 fnt1 5431 4752(.)m 220 fnt2 5602 4749(@T)m 26(arget)k 240 fnt1 6497 4752(may)m 6971(be)s 7261(an)s 7552(arbitrary)s 8435(object,)s 0 4464(pro)m 3(vided)k 908(that)s 1329(it)s 1524(yields)s 2149(such)s 2648(a)s 2817(cross)s 3362(reference)s 4307(when)s 4886(e)s 6(v)k 6(aluated.)k 5957(In)s 6216(this)s 6615(w)s 2(ay)k 15(,)k 7107(dif)s 6(ferent)k 7985(in)s 9(v)k 4(ocations)k 0 4176(may)m 466(ha)s 4(v)k 3(e)k 967(dif)s 6(ferent)k 1842(tar)s 4(gets.)k 480 3802(The)m 904(forcing)s 1643(g)s 1(alle)k 3(y)k 2273(ef)s 6(fect)k 2865(can)s 3249(be)s 3527(obtained)s 4405(in)s 4644(another)s 5417(w)s 2(ay)k 15(,)k 5901(by)s 6191(replacing)s 7129(the)s 220 fnt2 7473 3799(@Galle)m 4(y)k 240 fnt1 8366 3802(symbol)m 0 3514(to)m 245(which)s 893(the)s 1247(g)s 1(alle)k 3(y)k 1887(is)s 2103(attached)s 2964(by)s 220 fnt2 3264 3511(@F)m 6(orceGalle)k 4(y)k 240 fnt1 4657 3514(.)m 4827(The)s 5261(adv)s 6(antage)k 6287(of)s 6565(this)s 6967(form)s 7497(is)s 7713(that)s 8137(the)s 8492(g)s 1(alle)k 3(y)k 0 3226(can)m 389(then)s 858(be)s 1140(forcing)s 1883(at)s 2115(some)s 2676(places)s 3324(and)s 3728(not)s 4094(at)s 4326(others,)s 5017(using)s 5589(the)s 5937(formula)s 220 fnt2 480 2725(def @SomePlace r)m -3(ight x)k 480 2437({)m 480 2149( x @Case {)m 480 1861( nof)m 6(orce @Y)k 4(ield @Galle)k 4(y)k 480 1573( f)m 6(orce @Y)k 4(ield @F)k 6(orceGalle)k 4(y)k 480 1285( })m 480 997(})m 240 fnt1 0 503(No)m 6(w)k 514(a)s 680(g)s 1(alle)k 3(y)k 1314(may)s 1780(ha)s 4(v)k 3(e)k 220 fnt2 2281 500(@SomePlace)m 240 fnt1 3677 503(for)m 4015(its)s 4291(tar)s 4(get,)k 4937(and)s 5341(if)s 5558(it)s 5750(happens)s 6586(to)s 6825(attach)s 7452(to)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 32 38 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(32)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(@SomePlace f)m 6(orce)k 240 fnt1 0 12752(it)m 192(will)s 618(ha)s 4(v)k 3(e)k 1119(the)s 1467(ef)s 6(fect)k 2063(of)s 2334(a)s 2500(forcing)s 3243(g)s 1(alle)k 3(y)k 15(,)k 3915(while)s 4502(if)s 4719(it)s 4911(happens)s 5747(to)s 5986(attach)s 6613(to)s 220 fnt2 480 12251(@SomePlace nof)m 6(orce)k 240 fnt1 0 11796(it)m 192(will)s 618(not.)s 480 11422(Although)m 1436(it)s 1621(doesn')s 4(t)k 2374(matter)s 3036(whether)s 3859(a)s 4018(g)s 1(alle)k 3(y)k 4645(is)s 4848(declared)s 5708(as)s 5951(a)s 6110(forcing)s 6846(g)s 1(alle)k 3(y)k 7473(or)s 7725(merely)s 8435(arri)s 6(v)k 3(es)k 0 11134(at)m 244(a)s 220 fnt2 422 11131(@F)m 6(orceGalle)k 4(y)k 240 fnt1 1887 11134(symbol)m 2659(from)s 3195(the)s 3555(point)s 4119(of)s 4402(vie)s 6(w)k 4928(of)s 5211(the)s 5571(ef)s 6(fect)k 6179(on)s 6488(nearby)s 7205(tar)s 4(gets,)k 7956(there)s 8501(is)s 8724(one)s 0 10846(w)m 2(ay)k 446(in)s 683(which)s 1319(Lout)s 1825(treats)s 2387(the)s 2729(tw)s 2(o)k 3133(cases)s 3682(dif)s 6(ferently)k 15(.)k 4827(If)s 5051(a)s 5211(forcing)s 5948(g)s 1(alle)k 3(y')k 13(s)k 6733(\207rst)s 7158(component)s 8276(does)s 8760(not)s 0 10558(\207t)m 264(into)s 695(the)s 1048(a)s 4(v)k 6(ailable)k 1962(space,)s 2606(that)s 3029(component)s 4159(will)s 4590(be)s 4878(scaled)s 5539(v)s 3(ertically)k 6496(until)s 6995(it)s 7192(does.)s 7801(The)s 8235(rationale)s 0 10270(for)m 343(this)s 744(is)s 959(that)s 1382(forcing)s 2130(g)s 1(alle)k 3(ys)k 2860(are)s 3212(meant)s 3861(to)s 4105(carry)s 4654(the)s 5007(b)s 4(ulk)k 5496(of)s 5772(the)s 6125(document)s 7134(and)s 7543(cannot)s 8246(af)s 6(ford)k 8887(to)s 0 9982(be)m 295(held)s 779(up)s 1086(because)s 1913(the)s 2275(user)s 2747(has)s 3131(inadv)s 3(ertently)k 4456(included)s 5352(an)s 5649(o)s 3(v)k 3(er)k 4(-high)k 6640(component,)s 7825(which)s 8481(for)s 8833(all)s 0 9694(Lout)m 514(kno)s 6(ws)k 1188(to)s 1430(the)s 1781(contrary)s 2634(may)s 3103(not)s 3472(\207t)s 3734(on)s 4034(an)s 3(y)k 4433(page.)s 5052(If)s 5285(this)s 5684(scaling)s 6417(is)s 6630(not)s 6999(w)s 2(anted)k 7749(b)s 4(ut)k 8114(forcing)s 8860(is,)s 0 9406(the)m 348(g)s 1(alle)k 3(y)k 982(may)s 1448(be)s 1730(declared)s 2597(not)s 2963(forcing)s 3706(b)s 4(ut)k 4068(all)s 4361(its)s 4637(tar)s 4(gets)k 5320(may)s 5786(be)s 6068(set)s 6393(to)s 6632(contain)s 220 fnt2 7393 9403(@F)m 6(orceGalle)k 4(y)k 240 fnt1 8786 9406(.)m 480 9032(W)m 9(ithin)k 1196(a)s 1367(g)s 1(alle)k 3(y)k 15(,)k 2043(a)s 2214(symbol)s 2978(whose)s 3651(name)s 4229(is)s 220 fnt2 4444 9029(@Enclose)m 240 fnt1 5503 9032(has)m 5878(a)s 6048(special)s [ /Dest /LOUT19_4605_det_gall_12 /DEST pdfmark 6771(meaning:)s 7765(when)s 8346(compo-)s 0 8744(nents)m 556(of)s 827(the)s 1175(g)s 1(alle)k 3(y)k 1810(replace)s 2555(a)s 220 fnt2 2721 8741(@Galle)m 4(y)k 240 fnt1 3619 8744(or)m 220 fnt2 3879 8741(@F)m 6(orceGalle)k 4(y)k 240 fnt1 5332 8744(symbol,)m 6144(that)s 6562(symbol)s 7323(is)s 7533(\207rst)s 7964(replaced)s 8832(by)s 220 fnt2 0 8453(@Enclose)m 1055(@Galle)s 4(y)k 240 fnt1 1953 8456(or)m 220 fnt2 2212 8453(@Enclose)m 3267(@F)s 6(orceGalle)k 4(y)k 240 fnt1 4660 8456(.)m 4824(F)s 3(or)k 5213(e)s 3(xample,)k 220 fnt2 480 7955(def @Figure into @FigurePlace&&f)m 6(ollo)k 3(wing)k 480 7667( r)m -3(ight @Body)k 480 7379({)m 480 7091( def @Enclose)m 480 6803( r)m -3(ight x)k 480 6515( {)m 480 6227( @Bo)m 6(x x)k 480 5939( })m 480 5363( @Body)m 480 5075(})m 240 fnt1 0 4581(causes)m 705(each)s 220 fnt2 1230 4578(@Galle)m 4(y)k 240 fnt1 2159 4581(or)m 220 fnt2 2448 4578(@F)m 6(orceGalle)k 4(y)k 240 fnt1 3932 4581(symbol)m 4722(that)s 5171(recei)s 6(v)k 3(es)k 6025(components)s 7264(of)s 7565(g)s 1(alle)k 3(y)k 220 fnt2 8230 4578(@Figure)m 240 fnt1 0 4293(to)m 250(be)s 544(replaced)s 1423(by)s 220 fnt2 1728 4290(@Bo)m 6(x @Galle)k 4(y)k 240 fnt1 3294 4293(or)m 220 fnt2 3565 4290(@Bo)m 6(x @F)k 6(orceGalle)k 4(y)k 240 fnt1 5614 4293(,)m 5732(assuming)s 6701(an)s 6996(appropriate)s 8152(de\207nition)s 0 4005(of)m 220 fnt2 311 4002(@Bo)m 6(x.)k 240 fnt1 1109 4005(This)m 1626(is)s 1876(useful,)s 2608(for)s 2987(e)s 3(xample,)k 3941(when)s 4558(producing)s 5623(multi-page)s 6754(box)s 3(ed)k 7436(displays,)s 8368(\207gures,)s 0 3717(and)m 404(tables.)s 480 3343(An)m 220 fnt2 861 3340(@Enclose)m 240 fnt1 1947 3343(symbol)m 2739(may)s 3236(ha)s 4(v)k 3(e)k 3769(only)s 4280(one)s 4714(parameter)s 9(,)k 5797(which)s 6471(must)s 7027(be)s 7341(a)s 7538(right)s 8081(parameter)s 13(.)k 0 3055(It)m 213(w)s 2(ould)k 877(not)s 1252(mak)s 2(e)k 1833(sense)s 2416(to)s 2664(allo)s 6(w)k 3252(more)s 3808(parameters,)s 4971(since)s 5527(there)s 6069(is)s 6288(no)s 6590(suitable)s 7398(v)s 6(alue)k 7975(to)s 8223(assign)s 8887(to)s 0 2767(them.)m 628(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 1574(the)s 220 fnt2 1908 2764(@Enclose)m 240 fnt1 2949 2767(symbol)m 3695(may)s 4147(contain)s 4894(inner)s 5431(de\207nitions,)s 6534(and)s 6924(it)s 7102(may)s 7554(mak)s 2(e)k 8112(use)s 8473(of)s 8729(an)s 3(y)k 0 2479(symbol)m 761(that)s 1181(is)s 1393(a)s 4(v)k 6(ailable)k 2303(at)s 2537(that)s 2956(point,)s 3557(in)s 3802(the)s 4152(usual)s 4714(w)s 2(ay)k 15(.)k 5262(The)s 220 fnt2 5691 2476(@Enclose)m 240 fnt1 6748 2479(symbol)m 7510(may)s 7978(be)s 8262(a)s 8430(named)s 0 2191(parameter)m 1016(\(itself)s 1645(with)s 2130(a)s 2298(right)s 2812(parameter\))s 3896(of)s 4169(the)s 4520(g)s 1(alle)k 3(y)k 5156(symbol,)s 5971(rather)s 6589(than)s 7060(an)s 7346(inner)s 7899(de\207nition)s 8876(as)s 0 1903(sho)m 6(wn)k 677(abo)s 3(v)k 3(e,)k 1350(if)s 1567(desired.)s 480 1529(It)m 696(mak)s 2(es)k 1367(sense)s 1952(for)s 2302(sorted)s 2955(g)s 1(alle)k 3(ys)k 3690(containing)s 4765(a)s 220 fnt2 4942 1526(@Merge)m 240 fnt1 5850 1529(symbol)m 6621(\(Section)s 7486(2.8\))s 7925(to)s 8175(also)s 8625(ha)s 4(v)k 3(e)k 0 1241(an)m 220 fnt2 277 1238(@Enclose)m 240 fnt1 1326 1241(symbol.)m 2188(The)s 2610(meaning)s 3480(is)s 3684(that)s 4095(after)s 4585(all)s 4872(mer)s 4(ging)k 5711(is)s 5915(done,)s 6481(each)s 6970(resulting)s 7852(g)s 1(alle)k 3(y)k 8480(has)s 8843(an)s 220 fnt2 0 950(@Enclose)m 240 fnt1 1061 953(symbol)m 1827(which)s 2476(is)s 2692(applied)s 3461(in)s 3710(the)s 4064(usual)s 4631(w)s 2(ay)k 15(.)k 5183(The)s 5618(v)s 6(alue)k 6192(of)s 6469(this)s 220 fnt2 6872 950(@Enclose)m 240 fnt1 7933 953(symbol)m 8700(will)s 0 665(be)m 274(the)s 614(v)s 6(alue)k 1174(of)s 1437(an)s 220 fnt2 1712 662(@Enclose)m 240 fnt1 2758 665(symbol)m 3510(from)s 4026(one)s 4420(of)s 4683(the)s 5022(contrib)s 4(uting)k 6232(g)s 1(alle)k 3(ys,)k 7004(b)s 4(ut)k 7358(e)s 3(xactly)k 8091(which)s 8724(one)s 0 377(is)m 210(not)s 576(de\207ned.)s 1445(So)s 1751(it)s 1943(is)s 2153(safest)s 2756(if)s 2973(all)s 3266(such)s 220 fnt2 3762 374(@Enclose)m 240 fnt1 4817 377(symbols)m 5666(produce)s 6493(the)s 6841(same)s 7388(result.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 33 39 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.7.)m 1871(Galle)s 7(ys)k 2649(and)s 3075(tar)s 8(g)k 2(ets)k 240 fnt5 10250 -1583(33)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13205(A)m 220 fnt2 709 13202(f)m 6(ollo)k 3(wing)k 240 fnt1 1597 13205(g)m 1(alle)k 3(y)k 2229(may)s 2693(f)s 2(ail)k 3061(to)s 3299(\207nd)s 3728(a)s 3892(\207rst)s 4321(tar)s 4(get)k 4918(lying)s 5461(in)s 5703(a)s 5867(follo)s 6(wing)k 6842(component)s 7964(of)s 8233(the)s 8579(same)s 0 12917(g)m 1(alle)k 3(y)k 634(as)s 884(its)s 1159(in)s 9(v)k 4(ocation)k 2213(point.)s 2868(This)s 3344(is)s 3553(a)s 3719(de\207cienc)s 3(y)k 4752(of)s 5023(Basser)s 5719(Lout,)s 6278(which)s 6919(occurs)s 7594(if)s 7810(the)s 8158(tar)s 4(get)k 8756(has)s 0 12629(not)m 356(been)s 855(read)s 1313(from)s 1827(input)s 2369(at)s 2590(the)s 2928(time)s 3398(the)s 3735(g)s 1(alle)k 3(y)k 4359(tries)s 4810(to)s 5038(\207nd)s 5459(it.)s 5745(A)s 5964(w)s 2(orkaround)k 7167(is)s 7367(to)s 7595(use)s 7960(a)s 220 fnt2 8115 12626(preceding)m 240 fnt1 0 12341(g)m 1(alle)k 3(y)k 634(instead,)s 1418(de\207ned)s 2181(lik)s 2(e)k 2593(this:)s 220 fnt2 480 11840(def @A)m 6(Galle)k 4(y into { @A)k 6(Galle)k 4(yPlace&&preceding })k 480 11552( r)m -3(ight @Body)k 480 11264({)m 480 10976( //1.1b)m 480 10688( @Body)m 480 10400(})m 240 fnt1 0 9906(and)m 404(in)s 9(v)k 4(ok)k 2(ed)k 1219(lik)s 2(e)k 1631(this:)s 220 fnt2 480 9454(@A)m 6(Galle)k 4(yPlace | @A)k 6(Galle)k 4(y { content of galle)k 4(y })k 480 9166(//)m 480 8878(...)m 480 8590(@A)m 6(Galle)k 4(yPlace)k 240 fnt1 0 8092(The)m 419(\207rst)s 220 fnt2 841 8089(@A)m 6(Galle)k 4(yPlace)k 240 fnt1 2411 8092(recei)m 6(v)k 3(es)k 3226(only)s 3696(the)s 4035(initial)s 4636(empty)s 5279(object,)s 5960(since)s 6498(the)s 220 fnt2 6836 8089(//1.1b)m 240 fnt1 7428 8092(forces)m 8052(a)s 8209(split;)s 8722(and)s 0 7804(the)m 348(Second)s 1111(La)s 3(w)k 1587(puts)s 2037(Basser)s 2734(Lout)s 3246(on)s 3543(the)s 3891(right)s 4402(track)s 4940(thereafter)s 13(.)k 240 fnt5 0 7011(2.8.)m 471(Sorted)s 1203(galleys)s [ /Dest /LOUTsorted /DEST pdfmark 240 fnt1 480 6534(When)m 1128(footnotes)s 2088(are)s 2455(placed)s 3156(at)s 3407(the)s 3775(bottom)s 4532(of)s 4823(a)s 5008(page,)s 5586(the)s 3(y)k 6069(appear)s 6785(there)s 7337(in)s 7600(\207rst)s 8050(come,)s 8695(\207rst)s 0 6246(serv)m 3(ed)k 674(order)s 13(.)k 1324(T)s 19(o)k 1618(mak)s 2(e)k 2185(g)s 1(alle)k 3(ys)k 2903(appear)s 3595(in)s 3832(sorted)s 4469(order)s 9(,)k 5065(as)s [ /Dest /LOUT19_4605_det_sort_1 /DEST pdfmark 5310(is)s 5514(needed)s 6245(in)s 6482(bibliographies)s 7896(and)s 8294(inde)s 3(x)k 3(es,)k 0 5958(a)m 178(parameter)s 1205(or)s 1477(nested)s 2158(de\207nition)s 3145(with)s 3640(the)s 4000(special)s 4731(name)s 220 fnt2 5318 5955(@K)m 8(e)k 4(y)k [ /Dest /LOUT19_4605_det_sort_2 /DEST pdfmark 240 fnt1 5977 5958(is)m 6200(added)s 6843(to)s 7094(the)s 7455(g)s 1(alle)k 3(y)k 8102(de\207nition,)s 0 5670(lik)m 2(e)k 412(this:)s 220 fnt2 480 5219(def @Inde)m 6(xEntr)k -6(y into { @Inde)k 6(xPlace&&f)k 6(ollo)k 3(wing })k 480 4931( left @K)m 8(e)k 4(y)k 480 4643( r)m -3(ight x)k 480 4355({ x })m 0 3858(@K)m 8(e)k 4(y)k 240 fnt1 674 3861(must)m 1226(be)s 1535(set)s 1887(to)s 2153(a)s 2346(simple)s 3066(w)s 2(ord,)k 3690(or)s 3976(se)s 6(v)k 3(eral)k 4725(w)s 2(ords)k 5386(with)s 5895(nothing)s 6707(more)s 7281(comple)s 3(x)k 8184(than)s 8681(font)s 0 3573(changes)m 822(within)s 1490(them,)s 2075(when)s 2651(the)s 2999(g)s 1(alle)k 3(y)k 3633(is)s 3843(in)s 9(v)k 4(ok)k 2(ed:)k 220 fnt2 480 3072({ cities compare } @Inde)m 6(xEntr)k -6(y { cities)k 3(, compar)k -3(ison of)k 6(, 27 })k 240 fnt1 0 2574(and)m 404(this)s 800(k)s 2(e)k 3(y)k 1195(is)s 1405(used)s 1902(to)s 2141(sort)s 2559(the)s 2907(g)s 1(alle)k 3(ys.)k 480 2200(If)m 707(se)s 6(v)k 3(eral)k 1425(sorted)s 2063(g)s 1(alle)k 3(ys)k 2783(with)s 3261(the)s 3605(same)s 4148(k)s 2(e)k 3(y)k 4539(are)s 4882(sent)s 5323(to)s 5558(the)s 5902(same)s 6445(place,)s 7052(the)s 7396(def)s 2(ault)k 8113(beha)s 4(viour)k 0 1912(is)m 253(to)s 536(print)s 1091(only)s 1615(the)s 2007(\207rst)s 2481(of)s 2796(them;)s 3430(the)s 3822(assumption)s 5013(is)s 5266(that)s 5728(the)s 6120(others)s 6799(are)s 7190(probably)s 8139(unw)s 2(anted)k 0 1624(duplicates.)m 1128(This)s 1599(holds)s 2164(good)s 2697(for)s 3029(sorted)s 3666(reference)s 4604(lists,)s 5090(for)s 5423(e)s 3(xample:)k 6390(we)s 6720(don')s 4(t)k 7276(w)s 2(ant)k 7794(tw)s 2(o)k 8199(copies)s 8855(of)s 0 1336(a)m 166(reference)s 1109(just)s 1514(because)s 2327(we)s 2662(happen)s 3411(to)s 3650(cite)s 4050(it)s 4242(twice.)s 480 962(The)m 921(other)s 1485(common)s 2393(e)s 3(xample)k 3269(of)s 3553(sorted)s 4208(g)s 1(alle)k 3(ys,)k 5001(inde)s 3(x)k 5598(entries,)s 6354(requires)s 7187(something)s 8251(dif)s 6(ferent)k 0 674(from)m 540(discarding)s 1606(duplicates:)s 240 fnt6 2758 676(mer)m 8(g)k 2(ed)k 240 fnt1 3549 674(g)m 1(alle)k 3(ys.)k 4402(Suppose)s 5287(that)s 5722(at)s 5971(some)s 6548(point)s 7117(of)s 7405(the)s 7770(document)s 8791(we)s 0 386(insert)m 590(the)s 938(inde)s 3(x)k 1522(entry)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 34 40 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(34)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(aardv)m 5(ar)k -3(ks @Inde)k 6(xEntr)k -6(y { Aardv)k 5(ar)k -3(ks)k 3(, 23 })k 240 fnt1 0 12709(while)m 587(at)s 819(another)s 1596(point)s 2148(we)s 2483(insert)s 220 fnt2 480 12208(aardv)m 5(ar)k -3(ks @Inde)k 6(xEntr)k -6(y { Aardv)k 5(ar)k -3(ks)k 3(, 359 })k 240 fnt1 0 11710(Ho)m 6(w)k 505(the)s 843(page)s 1341(numbers)s 2206(are)s 2544(w)s 2(ork)k 2(ed)k 3306(out)s 3662(is)s 3862(not)s 4219(rele)s 6(v)k 6(ant)k 5026(here.)s 5591(Clearly)s 6338(we)s 6664(w)s 2(ould)k 7309(lik)s 2(e)k 7711(to)s 7940(mer)s 4(ge)k 8579(these)s 0 11422(tw)m 2(o)k 410(entries)s 1097(into)s 1522(one)s 1924(entry)s 2469(that)s 2887(comes)s 3549(out)s 3915(as)s 480 10917(Aardv)m 6(arks, 23, 359)k 0 10433(The)m 428(follo)s 6(wing)k 1405(de\207nition)s 2379(will)s 2805(mer)s 4(ge)k 3454(tw)s 2(o)k 3864(objects)s 220 fnt2 4592 10430(x)m 240 fnt1 4760 10433(and)m 220 fnt2 5164 10430(y)m 240 fnt1 5332 10433(in)m 5575(this)s 5971(w)s 2(ay:)k 220 fnt2 480 9932(def @Merge left x r)m -3(ight y)k 480 9644({)m 480 9356( { x @Rump { x @Meld y } } @Case)m 480 9068( {)m 480 8780( "" @Y)m 4(ield x)k 480 8492( else @Y)m 4(ield { { x{@OneCol ,} } @Meld y })k 480 8204( })m 480 7628(})m 240 fnt1 0 7134(The)m 220 fnt2 428 7131(@Rump)m 240 fnt1 1288 7134(and)m 220 fnt2 1693 7131(@Meld)m 240 fnt1 2439 7134(symbols)m 3288(are)s 3636(the)s 3984(subject)s 4721(of)s 4993(Section)s 5767(3.28;)s 6299(and)s 6704(a)s 6870(detailed)s 7684(e)s 3(xplanation)k 8855(of)s 0 6846(ho)m 6(w)k 458(this)s 850(de\207nition)s 1820(w)s 2(orks)k 2450(is)s 2656(the)s 3000(subject)s 3733(of)s 4000(Section)s 4771(4.6.)s 5231(Our)s 5659(only)s 6135(problem)s 6988(is)s 7194(that)s 7608(this)s 8000(symbol)s 8756(has)s 0 6558(to)m 239(be)s 521(applied)s 1283(to)s 1522(tw)s 2(o)k 1932(g)s 1(alle)k 3(ys)k 2656(from)s 3180(widely)s 3885(separated)s 4845(parts)s 5360(of)s 5631(the)s 5979(document.)s 480 6184(Lout)m 993(mak)s 2(es)k 1654(this)s 2052(possible)s 2893(by)s 3189(the)s 3538(follo)s 6(wing)k 4517(special)s 5236(rule:)s 5775(if)s 5993(a)s 6161(sorted)s 6804(g)s 1(alle)k 3(y)k 7440(contains)s 8289(a)s 8457(nested)s 0 5896(de\207nition)m 965(of)s 1227(a)s 1383(symbol)s 2134(whose)s 2793(name)s 3357(is)s 220 fnt2 3558 5893(@Merge)m 240 fnt1 4446 5896(\()m 220 fnt2 4519 5893(@Merge)m 240 fnt1 5406 5896(must)m 5922(ha)s 4(v)k 3(e)k 6414(just)s 6809(tw)s 2(o)k 7210(parameters,)s 8355(left)s 8722(and)s 0 5608(right\),)m [ /Dest /LOUT19_4605_det_sort_3 /DEST pdfmark 643(and)s 1054(if)s 1277(that)s 1702(sorted)s 2350(g)s 1(alle)k 3(y)k 2991(is)s 3207(preceded)s 4135(in)s 4384(the)s 4739(list)s 5096(of)s 5374(sorted)s 6022(g)s 1(alle)k 3(ys)k 6753(destined)s 7614(for)s 7959(some)s 8527(tar)s 4(get)k 0 5320(by)m 300(another)s 1084(sorted)s 1733(g)s 1(alle)k 3(y)k 2374(with)s 2863(the)s 3217(same)s 3771(k)s 2(e)k 3(y)k 15(,)k 4211(then)s 4687(rather)s 5310(than)s 5785(being)s 6377(discarded,)s 7407(the)s 7762(second)s 8492(g)s 1(alle)k 3(y)k 0 5032(is)m 210(mer)s 4(ged)k 981(into)s 1406(the)s 1754(\207rst)s 2185(using)s 2757(the)s 220 fnt2 3105 5029(@Merge)m 240 fnt1 4002 5032(symbol.)m 480 4658(The)m 909(natural)s 1629(thing)s 2175(to)s 2416(do)s 2711(when)s 3288(more)s 3837(than)s 4307(tw)s 2(o)k 4719(g)s 1(alle)k 3(ys)k 5445(ha)s 4(v)k 3(e)k 5947(the)s 6297(same)s 6845(k)s 2(e)k 3(y)k 7242(is)s 7454(to)s 7694(mer)s 4(ge)k 8345(the)s 8695(\207rst)s 0 4370(tw)m 2(o,)k 477(then)s 959(mer)s 4(ge)k 1621(the)s 1982(third)s 2504(with)s 2999(the)s 3360(result)s 3963(of)s 4247(that,)s 4725(then)s 5207(the)s 5568(fourth)s 6222(with)s 6717(the)s 7078(result)s 7681(of)s 7965(that,)s 8443(and)s 8860(so)s 0 4082(on.)m 403(F)s 3(or)k 790(ef\207cienc)s 3(y)k 1781(reasons)s 2547(be)s 3(yond)k 3306(our)s 3684(scope)s 4283(here,)s 4799(Lout)s 5309(does)s 5797(the)s 6144(mer)s 4(ging)k 6988(in)s 7229(a)s 7393(dif)s 6(ferent)k 8266(order:)s 8934(it)s 0 3794(mer)m 4(ges)k 240 fnt6 736 3796(n)m 240 fnt1 909 3794(g)m 1(alle)k 3(ys)k 1632(by)s 1925(mer)s 4(ging)k 2770(the)s 3116(\207rst)s 240 fnt4 3592 3752(\353)m 240 fnt6 3685 3796(n)m 240 fnt4 3809 3788(/)m 3881(2)s 4006 3752(\373)m 240 fnt1 4197 3794(together)m 9(,)k 5077(then)s 5545(the)s 5892(last)s 240 fnt4 6327 3764(\351)m 240 fnt6 6420 3796(n)m 240 fnt4 6545 3788(/)m 6617(2)s 6741 3764(\371)m 240 fnt1 6933 3794(together)m 9(,)k 7813(then)s 8280(mer)s 4(ging)k 0 3506(the)m 334(result.)s 1014(Of)s 1323(course,)s 2040(if)s 2242(the)s 220 fnt2 2576 3503(@Merge)m 240 fnt1 3458 3506(symbol)m 4204(is)s 4399(associati)s 6(v)k 3(e)k 5480(this)s 5861(has)s 6217(the)s 6550(same)s 7083(ef)s 6(fect.)k 7768(The)s 8182(total)s 8646(time)s 0 3218(it)m 192(tak)s 2(es)k 733(to)s 972(mer)s 4(ge)k 240 fnt6 1622 3220(n)m 240 fnt1 1797 3218(g)m 1(alle)k 3(ys)k 2521(with)s 3004(equal)s 3578(k)s 2(e)k 3(ys)k 4063(is)s 240 fnt6 4274 3220(O)m 240 fnt4 4454 3212(\()m 167 fnt4 4653 3312(2)m 240 fnt6 4539 3220(n)m 240 fnt4 4745 3212(\))m 240 fnt1 4871 3218(or)m 5131(some)s 6(what)k 6156(higher)s 6827(\(b)s 4(ut)k 7269(al)s 2(w)k 2(ays)k 7981(polynomial)s 0 2930(in)m 240 fnt6 238 2932(n)m 240 fnt1 352 2930(\))m 475(depending)s 1521(on)s 1813(ho)s 6(w)k 2269(man)s 3(y)k 2846(times)s 3409(the)s 3752(parameters)s 4845(occur)s 5431(within)s 6094(the)s 6436(body)s 6965(of)s 220 fnt2 7231 2927(@Merge)m 240 fnt1 8068 2930(;)m 8175(to)s 8409(do)s 8697(it)s 8883(in)s 0 2642(the)m 348(natural)s 1066(linear)s 1669(order)s 2233(w)s 2(ould)k 2888(tak)s 2(e)k 3340(Lout)s 3852(e)s 3(xponential)k 5020(time.)s 480 2268(F)m 3(or)k 879(horrible)s 1702(reasons)s 2481(concerning)s 3608(making)s 4390(it)s 4593(possible)s 5444(to)s 5694(print)s 6216(reference)s 7170(lists)s 7616(sorted)s 8269(by)s 8574(point)s 0 1980(of)m 296(\207rst)s 753(citation,)s 1602(the)s 1976(particular)s 2976(sort)s 3420(k)s 2(e)k 3(y)k 220 fnt2 3841 1977(??)m 240 fnt1 4157 1980(is)m 4393(treated)s 5126(dif)s 6(ferently)k 15(.)k 6302(If)s 6558(tw)s 2(o)k 6994(g)s 1(alle)k 3(ys)k 7744(ha)s 4(v)k 3(e)k 8271(this)s 8693(k)s 2(e)k 3(y)k 15(,)k 0 1692(according)m 1010(to)s 1264(the)s 1627(rules)s 2156(abo)s 3(v)k 3(e)k 2793(either)s 3411(the)s 3773(second)s 4511(w)s 2(ould)k 5181(be)s 5477(discarded)s 6466(or)s 6740(else)s 7181(it)s 7388(w)s 2(ould)k 8058(be)s 8355(mer)s 4(ged)k 0 1404(with)m 485(the)s 836(\207rst.)s 1374(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 2337(for)s 2678(this)s 3077(particular)s 4054(k)s 2(e)k 3(y)k 4452(only)s 15(,)k 4973(the)s 5324(tw)s 2(o)k 5737(g)s 1(alle)k 3(ys)k 6464(will)s 6893(in)s 7139(f)s 2(act)k 7557(be)s 7842(k)s 2(ept)k 8316(distinct,)s 0 1116(just)m 405(as)s 655(though)s 1378(their)s 1875(sort)s 2293(k)s 2(e)k 3(ys)k 2778(had)s 3182(been)s 3691(dif)s 6(ferent.)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 35 41 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(2.9.)m 1871(Horizontal)s 2968(galle)s 7(ys)k 240 fnt5 10250 -1583(35)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 240 fnt5 0 13203(2.9.)m 471(Horizontal)s 1628(galleys)s [ /Dest /LOUThorizontal /DEST pdfmark 240 fnt1 480 12726(All)m 846(the)s 1201(g)s 1(alle)k 3(ys)k 1932(so)s 2205(f)s 2(ar)k 2534(ha)s 4(v)k 3(e)k 3042(been)s 240 fnt6 3557 12728(vertical)m 4353(galle)s 7(ys)k 240 fnt1 5018 12726(:)m 5191(g)s 1(alle)k 3(ys)k 5922(whose)s 6597(components)s 7812(are)s 8166(separated)s 0 12438(by)m 320(v)s 3(ertical)k 1114(concatenation)s 2525(symbols.)s 3514(There)s 4154(are)s 4527(also)s 4992(horizontal)s 6043(g)s 1(alle)k 3(ys,)k 6849(whose)s 7544(components)s 8779(are)s 0 12150(separated)m 951(by)s 1235(the)s 1574(horizontal)s 2588(concatenation)s 3963(operator)s 220 fnt2 4810 12147(&)m 240 fnt1 5002 12150(\(or)m 5331(equi)s 6(v)k 6(alently)k 15(,)k 6583(by)s 6867(spaces\).)s 7725(These)s 8342(w)s 2(ork)k 8883(in)s 0 11862(the)m 346(same)s 891(w)s 2(ay)k 1340(as)s 1588(v)s 3(ertical)k 2353(g)s 1(alle)k 3(ys,)k 3131(e)s 3(xcept)k 3810(for)s 4146(the)s 4492(change)s 5224(of)s 5493(direction.)s 6504(F)s 3(or)k 6891(e)s 3(xample,)k 7803(the)s 8149(follo)s 6(wing)k 0 11574(de\207nes)m 730(the)s 1079(equi)s 6(v)k 6(alent)k 2124(of)s 2396(an)s 2681(ordinary)s 3546(outdented)s 4549(paragraph,)s 5613(e)s 3(xcept)k 6295(that)s 6715(an)s 6999(option)s 7669(is)s 7880(pro)s 3(vided)k 8788(for)s 0 11286(v)m 6(arying)k 778(the)s 1126(size)s 1553(of)s 1824(the)s 2172(outdent:)s 220 fnt2 480 10785(def @OutdentP)m 8(ar)k 480 10497( named outdent { 2f })m 480 10209( r)m -3(ight x)k 480 9921({)m 480 9633( def @P)m 8(arPlace { @Galle)k 4(y })k 480 9057( def @LineList)m 480 8769( {)m 480 8481( outdent @Wide {} | @P)m 26(Adjust @P)k 8(arPlace)k 480 8193( //1vx @LineList)m 480 7905( })m 480 7329( def @P)m 8(arGalle)k 4(y f)k 6(orce hor)k -3(iz)k 3(ontally into { @P)k 8(arPlace&&preceding })k 480 7041( r)m -3(ight x)k 480 6753( {)m 480 6465( x)m 480 6177( })m 480 5601( @P)m 26(Adjust @P)k 8(arPlace)k 480 5313( // @P)m 8(arGalle)k 4(y { x &1r)k -8(t })k 480 5025( //1vx @LineList)m 480 4737(})m 240 fnt1 0 4243(Notice)m 703(the)s 1061(use)s 1446(of)s 220 fnt2 1727 4240(&1r)m -8(t)k 240 fnt1 2203 4243(to)m 2452(cancel)s 3127(the)s 3485(ef)s 6(fect)k 4091(of)s 220 fnt2 4372 4240(@P)m 26(Adjust)k 240 fnt1 5390 4243(on)m 5697(the)s 6055(last)s 6456(line)s 6880(of)s 7161(the)s 7519(paragraph.)s 8650(This)s 0 3955(de\207nition)m 969(has)s 1334(a)s 1494(problem)s 2346(in)s 2584(that)s 2996(there)s 3524(will)s 3945(be)s 4221(a)s 4382(concluding)s 5494(une)s 3(xpanded)k 220 fnt2 6701 3952(@LineList)m 240 fnt1 7730 3955(symbol)m 8484(which)s 0 3667(will)m 431(hold)s 921(up)s 1219(promotion)s 2279(of)s 2555(the)s 2909(enclosing)s 3884(g)s 1(alle)k 3(y;)k 4582(this)s 4983(problem)s 5846(may)s 6317(be)s 6605(\207x)s 3(ed)k 7144(by)s 7444(the)s 7797(same)s 8350(method)s 0 3379(used)m 497(to)s 736(end)s 1140(a)s 1306(list.)s 480 3005(In)m 735(an)s 1016(ideal)s 1533(w)s 2(orld,)k 2194(there)s 2725(w)s 2(ould)k 3378(be)s 3658(nothing)s 4442(further)s 5149(to)s 5386(say)s 5757(about)s 6347(horizontal)s 7369(g)s 1(alle)k 3(ys.)k 8204(Ho)s 6(we)k 6(v)k 3(er)k 0 2717(there)m 558(are)s 931(a)s 1123(fe)s 6(w)k 1555(dif)s 6(ferences)k 2686(which)s 3354(arise)s 3886(from)s 4436(v)s 6(arious)k 5211(practical)s 6113(considerations)s 7571(and)s 8001(limitations.)s 0 2429(Perhaps)m 808(some)s 1369(day)s 1769(a)s 1935(more)s 2482(perfect)s 3204(symmetry)s 4214(will)s 4640(be)s 4922(implemented.)s 480 2055(Each)m 1021(v)s 3(ertical)k 1795(g)s 1(alle)k 3(y)k 2436(has)s 2812(a)s 2985(\207x)s 3(ed)k 3526(\207nite)s 4080(width,)s 4738(and)s 5149(e)s 6(v)k 3(ery)k 5732(component)s 6863(is)s 7079(brok)s 2(en)k 7806(to)s 8052(that)s 8477(width.)s 0 1767(This)m 517(is)s 769(needed)s 1546(basically)s 2491(to)s 2772(trigger)s 3509(paragraph)s 4564(breaking.)s 5606(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 6608(there)s 7183(is)s 7434(no)s 7769(equi)s 6(v)k 6(alent)k 8855(of)s 0 1479(paragraph)m 1001(breaking)s 1879(in)s 2110(the)s 2446(v)s 3(ertical)k 3201(direction,)s 4145(so)s 4398(horizontal)s 5410(g)s 1(alle)k 3(ys)k 6122(do)s 6403(not)s 6757(ha)s 4(v)k 3(e)k 7246(an)s 3(y)k 7631(particular)s 8592(\207x)s 3(ed)k 0 1191(height.)m 762(Instead,)s 1559(each)s 2054(component)s 3178(has)s 3548(its)s 3824(o)s 6(wn)k 4288(indi)s 6(vidual)k 5307(height.)s 480 817(When)m 1096(tw)s 2(o)k 1492(objects)s 2206(are)s 2539(separated)s 3485(by)s 220 fnt2 3766 814(/)m 240 fnt1 3830 817(,)m 3923(the)s 3(y)k 4372(are)s 4705(assigned)s 5573(the)s 5908(same)s 6441(width)s 7029(\(Section)s 7868(2.7\),)s 8340(and)s 8730(this)s 0 529(holds)m 581(true)s 1020(e)s 6(v)k 3(en)k 1531(if)s 1760(the)s 2119(tw)s 2(o)k 2541(objects)s 3280(are)s 3639(subsequently)s 4954(separated)s 5926(by)s 6231(being)s 6828(promoted)s 7814(into)s 8251(dif)s 6(ferent)k 0 241(tar)m 4(gets.)k 788(F)s 3(or)k 1169(e)s 3(xample,)k 2074(tw)s 2(o)k 2476(aligned)s 3229(equations)s 4189(will)s 4606(ha)s 4(v)k 3(e)k 5099(the)s 5439(same)s 5977(width,)s 6621(and)s 7016(hence)s 7622(their)s 8110(alignment)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 36 42 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(36)m 240 fnt6 8674 -1580(Chapter)m 9524(2.)s 9798(Details)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(will)m 437(be)s 731(preserv)s 3(ed,)k 1776(e)s 6(v)k 3(en)k 2287(if)s 2516(the)s 3(y)k 2991(appear)s 3699(in)s 3954(dif)s 6(ferent)k 4841(columns)s 5714(or)s 5985(pages.)s 6706(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 7677(e)s 6(v)k 3(en)k 8189(though)s 220 fnt2 8924 13202(&)m 240 fnt1 0 12917(aligns)m 635(the)s 996(marks)s 1644(of)s 1928(its)s 2217(tw)s 2(o)k 2640(parameters,)s 3807(it)s 4012(does)s 4515(not)s 4894(assign)s 5562(them)s 6113(a)s 6292(common)s 7200(height.)s 7975(This)s 8464(means)s 0 12629(that)m 416(the)s 762(height)s 1417(of)s 1686(an)s 3(y)k 2081(component)s 3202(of)s 3471(a)s 3634(horizontal)s 4656(g)s 1(alle)k 3(y)k 5288(promoted)s 6260(into)s 6683(one)s 7083(tar)s 4(get)k 7679(does)s 8167(not)s 8530(af)s 6(fect)k 0 12341(the)m 362(height)s 1034(consumed)s 2078(by)s 2386(the)s 2748(components)s 3971(promoted)s 4960(into)s 5400(an)s 3(y)k 5811(other)s 6376(tar)s 4(get.)k 7094(The)s 7536(other)s 8102(horizontal)s 0 12053(concatenation)m 1392(operator)s 9(,)k 220 fnt2 2293 12050(|)m 240 fnt1 2330 12053(,)m 2444(does)s 2941(assign)s 3604(a)s 3777(common)s 4679(height)s 5344(to)s 5590(its)s 5874(tw)s 2(o)k 6291(parameters;)s 7457(b)s 4(ut)k 7826(sequences)s 8855(of)s 0 11765(objects)m 728(separated)s 1688(by)s 1982(this)s 2378(operator)s 3234(cannot)s 3932(be)s 4214(the)s 4562(components)s 5770(of)s 6041(a)s 6207(horizontal)s 7231(g)s 1(alle)k 3(y)k 15(.)k 480 11391(Lout)m 984(is)s 1186(able)s 1632(to)s 1862(read)s 2323(v)s 3(ertical)k 3082(g)s 1(alle)k 3(ys)k 3798(one)s 4191(paragraph)s 5196(at)s 5420(a)s 5577(time;)s 6105(in)s 6340(this)s 6728(w)s 2(ay)k 7170(it)s 7354(processes)s 8313(the)s 8652(doc-)s 0 11103(ument)m 660(in)s 906(small)s 1481(chunks,)s 2270(ne)s 6(v)k 3(er)k 2855(holding)s 3642(more)s 4192(than)s 4664(a)s 4833(fe)s 6(w)k 5242(pages)s 5840(in)s 6086(memory)s 6940(at)s 7175(an)s 3(y)k 7575(time.)s 8166(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 0 10815(horizontal)m 1024(g)s 1(alle)k 3(ys)k 1748(are)s 2095(al)s 2(w)k 2(ays)k 2806(read)s 3275(in)s 3518(completely)s 15(,)k 4672(so)s 4938(the)s 3(y)k 5401(should)s 6098(not)s 6464(be)s 6746(e)s 3(xtremely)k 7752(long.)s 480 10441(In)m 744(principle)s 1658(Lout)s 2178(should)s 2884(be)s 3174(able)s 3637(to)s 3884(h)s 1(yphenate)k 4932(the)s 5288(components)s 6505(of)s 6784(horizontal)s 7817(g)s 1(alle)k 3(ys)k 8550(when)s 0 10153(the)m 3(y)k 463(are)s 810(simple)s 1503(w)s 2(ords,)k 2193(b)s 4(ut)k 2555(this)s 2951(is)s 3161(not)s 3527(implemented)s 4833(at)s 5065(present.)s 480 9779(In)m 738(an)s 1023(ideal)s 1544(w)s 2(orld,)k 2209(e)s 6(v)k 3(ery)k 2787(paragraph)s 3802(w)s 2(ould)k 4459(be)s 4743(treated)s 5452(as)s 5704(a)s 5872(horizontal)s 6898(g)s 1(alle)k 3(y)k 15(.)k 7629(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 8591(to)s 8833(do)s 0 9491(so)m 256(in)s 488(practice)s 1288(w)s 2(ould)k 1932(be)s 2203(too)s 2551(slo)s 6(w)k 3040(and)s 3433(w)s 2(ould)k 4077(lead)s 4522(to)s 4750(e)s 3(xcessi)k 6(v)k 3(e)k 5699(clumsiness)s 6788(in)s 7020(notation,)s 7900(so)s 8155(at)s 8376(present)s 0 9203(Lout)m 509(has)s 876(tw)s 2(o)k 1282(competing)s 2342(mechanisms)s 3572(in)s 3811(this)s 4204(area:)s 4764(the)s 5108(b)s 4(uilt-in)k 5861(paragraph)s 6871(break)s 2(er)k 7641(with)s 8120(its)s 8392(limited)s 0 8915(set)m 314(of)s 573(options)s 1318(as)s 1556(gi)s 6(v)k 3(en)k 2124(under)s 2718(the)s 220 fnt2 3054 8912(@Break)m 240 fnt1 3899 8915(operator)m 9(,)k 4781(and)s 5173(horizontal)s 6186(g)s 1(alle)k 3(ys.)k 7011(As)s 7317(the)s 7653(e)s 3(xample)k 8504(abo)s 3(v)k 3(e)k 0 8627(sho)m 6(ws,)k 700(horizontal)s 1725(g)s 1(alle)k 3(ys)k 2449(are)s 2797(in)s 3040(principle)s 3946(capable)s 4733(of)s 5004(implementing)s 6386(man)s 3(y)k 6969(more)s 7517(paragraph)s 8531(styles)s 0 8339(than)m 470(the)s 820(b)s 4(uilt-in)k 1578(paragraph)s 2593(break)s 2(er)k 3369(could)s 3961(e)s 6(v)k 3(er)k 4425(hope)s 4949(to)s 5190(do.)s 5596(The)s 6026(recommended)s 7441(practical)s 8319(strate)s 3(gy)k 0 8051(is)m 221(to)s 472(use)s 858(the)s 1218(b)s 4(uilt-in)k 1985(paragraph)s 3010(break)s 2(er)k 3795(most)s 4332(of)s 4614(the)s 4974(time,)s 5516(and)s 5932(switch)s 6624(to)s 6875(horizontal)s 7910(g)s 1(alle)k 3(ys)k 8646(only)s 0 7763(for)m 338(occasional)s 1402(tricks,)s 2039(such)s 2535(as)s 2785(paragraphs)s 3885(with)s 4367(drop)s 4859(capitals,)s 5695(circular)s 6483(outlines,)s 7347(etc.)s 240 fnt5 0 6970(2.10.)m 591(Optimal)s 1495(galley)s 2149(br)s 4(eaking)k [ /Dest /LOUToptimal /DEST pdfmark 240 fnt1 480 6493(As)m 814(e)s 3(xplained)k 1817(in)s 2077(Section)s 2869(2.7,)s 3294(the)s 3659(components)s 4885(of)s 5174(a)s 5357(g)s 1(alle)k 3(y)k [ /Dest /LOUT19_4605_det_opti_1 /DEST pdfmark 6009(are)s 6373(promoted)s 7366(one)s 7786(by)s 8097(one)s 8517(into)s 8960(a)s 0 6205(tar)m 4(get.)k 703(When)s 1332(space)s 1919(runs)s 2382(out)s 2748(there,)s 3332(the)s 3680(g)s 1(alle)k 3(y)k 4314(searches)s 5174(for)s 5512(a)s 5678(ne)s 6(w)k 6125(tar)s 4(get)k 6724(and)s 7128(promotion)s 8182(resumes.)s 480 5831(This)m 977(process)s 1766(is)s 1997(e)s 3(xactly)k 2759(analogous)s 3802(to)s 4062(placing)s 4840(w)s 2(ords)k 5495(onto)s 5995(a)s 6182(line)s 6617(until)s 7131(space)s 7739(runs)s 8223(out,)s 8657(then)s 0 5543(mo)m 3(ving)k 776(to)s 1008(another)s 1778(line.)s 2293(But,)s 2740(as)s 2983(we)s 3311(kno)s 6(w)k 15(,)k 3923(that)s 4335(simple)s 5021(method)s 5790(is)s 5993(inferior)s 6762(to)s 6994(the)s 7335(optimal)s 8113(paragraph)s 0 5255(breaking)m 893(used)s 1393(by)s 1691(Lout)s 2206(\(copied)s 2984(from)s 3512(the)s 3863(T)s 3959 5207(E)m 4066 5255(X)m 4298(system\),)s 5152(which)s 5797(e)s 3(xamines)k 6751(the)s 7103(entire)s 7705(paragraph)s 8722(and)s 0 4967(determines)m 1099(the)s 1447(most)s 1972(e)s 6(v)k 3(en)k 2472(assignment)s 3608(of)s 3879(w)s 2(ords)k 4513(to)s 4752(lines.)s 480 4593(Lout)m 1050(of)s 6(fers)k 240 fnt6 1709 4595(optimal)m 2559(galle)s 7(y)k 3250(br)s 8(eaking)k 240 fnt1 4087 4593(,)m 4252(the)s 4659(equi)s 6(v)k 6(alent)k 5761(for)s 6157(g)s 1(alle)k 3(ys)k 6940(of)s 7269(optimal)s 8113(paragraph)s 0 4305(breaking.)m 1020(Optimal)s 1878(g)s 1(alle)k 3(y)k 2532(breaking)s 3442(can)s 3851(reduce)s 4564(the)s 4932(size)s 5378(of)s 5669(ugly)s 6169(blank)s 6782(spaces)s 7477(at)s 7729(the)s 8097(bottom)s 8855(of)s 0 4017(pages)m 596(preceding)s 1592(lar)s 4(ge)k 2121(unbreakable)s 3346(displays,)s 4237(sometimes)s 5310(quite)s 5844(dramatically)s 15(.)k 480 3643(Optimal)m 1337(g)s 1(alle)k 3(y)k 1990(breaking)s 2900(is)s 3129(applied)s 3910(to)s 4169(each)s 4683(g)s 1(alle)k 3(y)k 15(,)k 5375(horizontal)s 6418(or)s 6696(v)s 3(ertical,)k 7535(that)s 7972(possesses)s 8960(a)s 0 3355(parameter)m 1036(or)s 1317(nested)s 2008(symbol)s 2790(called)s 220 fnt2 3440 3352(@Optimiz)m 3(e)k 240 fnt1 4599 3355(whose)m 5290(v)s 6(alue)k 5880(is)s 220 fnt2 6112 3352(Y)m 30(es)k 240 fnt1 6453 3355(.)m 6639(Lik)s 2(e)k 7153(cross)s 7717(referencing,)s [ /Dest /LOUT19_4605_det_opti_2 /DEST pdfmark 8934(it)s 0 3067(tak)m 2(es)k 539(tw)s 2(o)k 947(runs)s 1409(to)s 1646(ha)s 4(v)k 3(e)k 2145(ef)s 6(fect.)k 2844(On)s 3192(the)s 3538(\207rst)s 3968(run,)s 4392(Lout)s 4902(records)s 5655(the)s 6001(sizes)s 6514(of)s 6784(the)s 7130(g)s 1(alle)k 3(y')k 13(s)k 7918(components)s 0 2779(and)m 393(g)s 1(aps,)k 927(and)s 1319(also)s 1746(the)s 2083(space)s 2658(a)s 4(v)k 6(ailable)k 3555(at)s 3776(each)s 4259(of)s 4519(its)s 4783(tar)s 4(gets.)k 5568(At)s 5856(end)s 6248(of)s 6508(run)s 6873(this)s 7257(information)s 8431(is)s 8629(used)s 0 2491(to)m 232(\207nd)s 656(an)s 932(optimal)s 1709(break,)s 2340(which)s 2975(is)s 3177(written)s 3903(to)s 4135(the)s 4475(cross-reference)s 5981(database.)s 6961(On)s 7303(the)s 7644(second)s 8360(run,)s 8778(the)s 0 2203(optimal)m 785(break)s 1377(is)s 1587(retrie)s 6(v)k 3(ed)k 2484(and)s 2888(used.)s 480 1829(Considering)m 1727(that)s 2170(this)s 2590(process)s 3383(must)s 3932(cope)s 4465(with)s 4971(\210oating)s 5780(\207gures,)s 6562(ne)s 6(w)k 7034(page)s 7566(and)s 7995(conditional)s 0 1541(ne)m 6(w)k 460(page)s 982(symbols,)s 1901(breaks)s 2589(for)s 2941(ne)s 6(w)k 3402(chapters,)s 4318(and)s 4736(e)s 6(v)k 4(olving)k 5631(documents,)s 6788(it)s 6994(is)s 7218(surprisingly)s 8428(rob)s 4(ust.)k 0 1253(If)m 250(it)s 463(does)s 974(go)s 1287(badly)s 1894(wrong,)s 2634(remo)s 3(ving)k 3621(\207le)s 220 fnt2 4003 1250(lout.li)m 240 fnt1 4580 1253(then)m 5069(running)s 5888(Lout)s 6421(twice)s 7014(without)s 7826(changing)s 8778(the)s 0 965(document)m 1036(may)s 1534(solv)s 3(e)k 2125(the)s 2505(problem.)s 3498(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 4491(cases)s 5078(are)s 5457(kno)s 6(wn)k 6194(where)s 6866(the)s 7246(optimization)s 8544(ne)s 6(v)k 3(er)k 0 677(con)m 9(v)k 3(er)k 4(ges.)k 1151(These)s 1812(are)s 2193(usually)s 2972(related)s 3713(to)s 3986(\207gures)s 4721(and)s 5159(footnotes)s 6134(whose)s 6836(anchor)s 7581(points)s 8251(f)s 2(all)k 8655(near)s 0 389(page)m 508(boundaries.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 37 43 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13448 0 13448 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 fnt5 0 12397(Chapter)m 1819(3.)s 2400(Pr)s 8(ede\207ned)k 4711(symbols)s [ /Dest /LOUTsymbols /DEST pdfmark 240 fnt5 0 11133(3.1.)m 471(@Begin)s 1335(and)s 1776(@End)s [ /Dest /LOUTbegin /DEST pdfmark 240 fnt1 480 10656(The)m 905(body)s 1435(of)s 1702(a)s 1864(symbol)s 220 fnt2 2620 10653(@Sym)m 240 fnt1 3324 10656(may)m 3786(be)s 4064(enclosed)s 4955(in)s 220 fnt2 5194 10653(@Begin)m 240 fnt1 6019 10656(and)m [ /Dest /LOUT19_4605_pre_begi_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_begi_2 /DEST pdfmark 220 fnt2 6419 10653(@End)m 7076(@Sym)s 240 fnt1 7780 10656(instead)m 8511(of)s 8778(the)s 0 10368(more)m 547(usual)s 1107(braces:)s 220 fnt2 480 9917(def @Section)m 480 9629( named @Title {})m 480 9341( r)m -3(ight @Body)k 480 9053(@Begin)m 480 8765( @Title //2v @Body)m 480 8477(@End @Section)m 240 fnt1 0 8022(The)m 3(y)k 543(may)s 1009(also)s 1447(enclose)s 2220(the)s 2568(right)s 3079(or)s 3338(body)s 3872(parameter)s 4886(of)s 5157(a)s 5323(symbol)s 6083(in)s 9(v)k 4(ocation:)k 220 fnt2 480 7521(@Chapter)m 480 7233( @Title { Introduction })m 480 6945(@Begin)m 480 6657(This subject needs no introduction.)m 480 6369(@End @Chapter)m 240 fnt1 0 5873(Apart)m 651(from)s 1222(their)s 1767(utility)s 2438(as)s 2735(documentation)s 4262(aids,)s 4801(these)s 5396(forms)s 6051(allo)s 6(w)k 6677(Basser)s 7422(Lout)s 7981(to)s 8268(pinpoint)s 0 5585(mismatched)m 1206(braces,)s 1915(which)s 2549(can)s 2930(otherwise)s 3908(create)s 4525(total)s 4996(ha)s 4(v)k 4(oc.)k 5716(F)s 3(or)k 6098(this)s 6486(reason,)s 7209(the)s 3(y)k 7664(should)s 8353(enclose)s 0 5297(the)m 339(major)s 946(parts)s 1451(of)s 1712(documents,)s 2846(such)s 3333(as)s 3573(chapters)s 4410(and)s 4804(sections.)s 5728(Note)s 6240(that)s 6648(braces)s 7299(cannot)s 7987(be)s 8259(replaced)s 0 5009(by)m 220 fnt2 294 5006(@Begin)m 240 fnt1 1123 5009(and)m 220 fnt2 1527 5006(@End)m 240 fnt1 2188 5009(in)m 2431(general.)s 240 fnt5 0 4216(3.2.)m 471(Concatenation)s 2015(symbols)s 2893(and)s 3334(paragraphs)s [ /Dest /LOUTconcatenation /DEST pdfmark 240 fnt1 480 3739(There)m 1093(are)s 1440(ten)s 1789(concatenation)s 3174(symbols,)s 4079(in)s 4322(three)s 4855(f)s 2(amilies:)k [ /Dest /LOUT19_4605_pre_conc_1 /DEST pdfmark 220 fnt2 480 3198(/)m 962(^/)s 1547(//)s 2012(^//)s 240 fnt1 2580 3201(V)m 26(ertical)k 3377(concatenation)s 220 fnt2 480 2910(|)m 962(^|)s 1547(||)s 2012(^||)s 240 fnt1 2580 2913(Horizontal)m 3657(concatenation)s 220 fnt2 480 2622(&)m 962(^&)s 240 fnt1 2580 2625(In-paragraph)m 3871(concatenation)s 0 2084(Each)m 587(symbol)s 1399(produces)s 2367(an)s 2702(object)s 3398(which)s 4093(combines)s 5113(together)s 6008(the)s 6409(tw)s 2(o)k 6871(parameters.)s 8134(The)s 8615(right)s 0 1796(parameter)m 1014(must)s 1539(be)s 1821(separated)s 2781(from)s 3305(the)s 3653(symbol)s 4413(by)s 4707(at)s 4939(least)s 5436(one)s 5838(white)s 6425(space)s 7012(character)s 13(.)k 480 1422(The)m 906(v)s 3(ertical)k 1670(concatenation)s 3052(symbol)s 220 fnt2 3809 1419(/)m 240 fnt1 3930 1422(places)m 4575(its)s 4848(left)s 5222(parameter)s [ /Dest /LOUT19_4605_pre_conc_2 /DEST pdfmark 6233(abo)s 3(v)k 3(e)k 6852(its)s 7125(right)s 7633(parameter)s 8644(with)s 0 1134(their)m 519(column)s 1317(marks)s 1975(aligned.)s 2866(If)s 3119(one)s 3544(parameter)s 4581(has)s 4973(more)s 5543(column)s 6341(marks)s 6999(than)s 7491(the)s 7862(other)s 9(,)k 8474(empty)s 0 846(columns)m 868(are)s 1221(inserted)s 2041(at)s 2279(the)s 2633(right)s 3150(to)s 3395(equalize)s 4253(the)s 4607(numbers.)s 5601(The)s 6035(v)s 6(ariant)k 220 fnt2 6758 843(//)m 240 fnt1 6949 846(ignores)m 7710(column)s 8491(marks)s 0 558(and)m 404(left-justi\207es)s 1594(the)s 1942(objects.)s 480 184(The)m 896(horizontal)s 1908(concatenation)s 3280(symbols)s 220 fnt2 4117 181(|)m 240 fnt1 4201 184(and)m 220 fnt2 4593 181(||)m 240 fnt1 4734 184(are)m 5069(horizontal)s [ /Dest /LOUT19_4605_pre_conc_3 /DEST pdfmark 6080(analogues)s 7076(of)s 220 fnt2 7334 181(/)m 240 fnt1 7446 184(and)m 220 fnt2 7837 181(//)m 240 fnt1 7962 184(:)m 8116(the)s 3(y)k 8566(place)s grestore gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5856 -15421(37)m grestore grestore grestore pgsave restore showpage %%Page: 38 44 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(38)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(their)m 488(tw)s 2(o)k 888(parameters)s 1976(side)s 2407(by)s 2692(side,)s 3174(with)s 3646(ro)s 6(w)k 4056(mark)s 4599(alignment)s 5605(or)s 5854(top-justi\207cation)s 7414(respecti)s 6(v)k 3(ely)k 15(.)k 8698(The)s [ /Dest /LOUT19_4605_pre_conc_4 /DEST pdfmark 0 12917(in-paragraph)m 1278(concatenation)s 2663(symbol)s 220 fnt2 3423 12914(&)m 240 fnt1 3625 12917(produces)m 4540(horizontal)s 5564(concatenation)s 6949(within)s 7617(a)s 7783(paragraph;)s 8850(its)s 0 12629(special)m 718(properties)s 1724(are)s 2071(treated)s 2778(in)s 3021(detail)s 3606(at)s 3838(the)s 4186(end)s 4590(of)s 4861(this)s 5257(section.)s 480 12255(The)m 908(concatenation)s 2293(symbols)s 3142(in)s 3385(an)s 3(y)k 3782(one)s 4184(f)s 2(amily)k 4859(are)s 240 fnt6 5206 12257(mutually)m 6099(associative)s 240 fnt1 7154 12255(,)m 7261(which)s 7903(means)s 8565(that)s 220 fnt2 480 11754({)m 240 fnt6 664 11759(x)m 220 fnt2 890 11754(|)m 240 fnt6 927 11759(p)m 1160(y)s 220 fnt2 1382 11754(})m 1566(|)s 240 fnt6 1603 11759(q)m 1839(z)s 240 fnt1 0 11258(is)m 210(al)s 2(w)k 2(ays)k 921(the)s 1269(same)s 1816(as)s 240 fnt6 480 10762(x)m 220 fnt2 706 10757(|)m 240 fnt6 743 10762(p)m 220 fnt2 976 10757({)m 240 fnt6 1160 10762(y)m 220 fnt2 1382 10757(|)m 240 fnt6 1419 10762(q)m 1655(z)s 220 fnt2 1866 10757(})m 240 fnt1 0 10261(for)m 339(an)s 3(y)k 737(objects)s 240 fnt6 1466 10263(x)m 240 fnt1 1572 10261(,)m 240 fnt6 1680 10263(y)m 240 fnt1 1782 10261(,)m 1891(and)s 240 fnt6 2296 10263(z)m 240 fnt1 2387 10261(,)m 2495(an)s 3(y)k 2893(g)s 1(aps)k 240 fnt6 3383 10263(p)m 240 fnt1 3558 10261(and)m 240 fnt6 3963 10263(q)m 240 fnt1 4140 10261(\(de\207ned)m 4983(belo)s 6(w\),)k 5750(and)s 6155(an)s 3(y)k 6553(choice)s 7234(of)s 220 fnt2 7506 10258(|)m 240 fnt1 7543 10261(,)m 220 fnt2 7652 10258(^|)m 240 fnt1 7792 10261(,)m 220 fnt2 7900 10258(||)m 240 fnt1 7994 10261(,)m 8102(and)s 220 fnt2 8507 10258(^||)m 240 fnt1 8704 10261(.)m 8870(In)s 0 9973(practice)m 803(we)s 1130(al)s 2(w)k 2(ays)k 1833(omit)s 2323(such)s 2811(braces,)s 3520(since)s 4059(the)s 3(y)k 4513(are)s 4852(redundant)s 5861(and)s 6257(can)s 6638(be)s 6912(misleading.)s 8117(The)s 8536(result)s 0 9685(of)m 277(the)s 631(complete)s 1569(sequence)s 2508(of)s 2786(concatenations)s 4264(will)s 4696(be)s 4984(called)s 5619(the)s 240 fnt6 5973 9687(whole)m 6604(concatenation)s 8020(object)s 240 fnt1 8608 9685(,)m 8722(and)s 0 9397(the)m 348(objects)s 1076(which)s 1718(mak)s 2(e)k 2290(it)s 2482(up)s 2775(will)s 3201(be)s 3483(called)s 4111(the)s 240 fnt6 4459 9399(components)m 240 fnt1 5598 9397(.)m 480 9023(One)m 938(mark)s 1494(is)s 1708(designated)s 2793(as)s 3047(the)s 240 fnt6 3398 9025(principal)m 4339(mark)s 240 fnt1 4835 9023(,)m 4946(usually)s 5695(the)s 6047(mark)s 6602(of)s [ /Dest /LOUT19_4605_pre_conc_5 /DEST pdfmark 6877(the)s 7229(\207rst)s 7664(component.)s 8896(A)s 0 8735(later)m 486(mark)s 1042(can)s 1435(be)s 1721(chosen)s 2447(for)s 2789(this)s 3189(honour)s 3932(by)s 4230(attaching)s 220 fnt2 5163 8732(^)m 240 fnt1 5333 8735(to)m 5576(the)s 5928(preceding)s 6928(concatenation)s 8317(symbol.)s 0 8447(See)m 401(Section)s 1175(3.13)s 1639(for)s 1977(e)s 3(xamples.)k 480 8073(A)m 240 fnt6 712 8075(gap)m 240 fnt1 1065 8073(,)m [ /Dest /LOUT19_4605_pre_conc_6 /DEST pdfmark 1175(specifying)s 2227(the)s 2578(distance)s 3420(between)s 4277(the)s 4627(tw)s 2(o)k 5040(parameters,)s 6197(may)s 6666(follo)s 6(w)k 7341(an)s 3(y)k 7741(concatenation)s 0 7785(symbol.)m 866(There)s 1475(may)s 1937(be)s 2215(no)s 2504(spaces)s 3176(between)s 4026(a)s 4188(concatenation)s 5569(symbol)s 6325(and)s 6726(its)s 6998(g)s 1(ap.)k 7503(A)s 7729(missing)s 8522(g)s 1(ap)k 8916(is)s 0 7497(tak)m 2(en)k 569(to)s 803(be)s 220 fnt2 1081 7494(0ie)m 240 fnt1 1365 7497(.)m 1524(The)s 1948(g)s 1(ap)k 2341(is)s 2546(ef)s 6(fecti)k 6(v)k 3(ely)k 3601(a)s 3762(third)s 4267(parameter)s 5276(of)s 5542(the)s 5886(concatenation)s 7266(symbol,)s 8074(and)s 8473(it)s 8660(may)s 0 7209(be)m 289(an)s 579(arbitrary)s 1462(object)s 2113(pro)s 3(vided)k 3026(that)s 3452(it)s 3651(e)s 6(v)k 6(aluates)k 4586(to)s 4833(a)s 5006(juxtaposition)s 6319(of)s 6598(simple)s 7298(w)s 2(ords.)k 8052(In)s 8316(general,)s 0 6921(the)m 348(g)s 1(ap)k 746(must)s 1271(be)s 1553(enclosed)s 2448(in)s 2691(braces,)s 3408(lik)s 2(e)k 3820(this:)s 220 fnt2 480 6420(//{ @Style&&m)m 3(ystyle @Open { @T)k 26(opMargin } })k 240 fnt1 0 5921(b)m 4(ut)k 349(the)s 684(braces)s 1332(may)s 1785(be)s 2053(omitted)s 2828(when)s 3391(the)s 3726(object)s 4356(is)s 4553(a)s 4706(juxtaposition)s 5999(of)s 6256(simple)s 6936(w)s 2(ords)k 7557(or)s 7803(an)s 8072(in)s 9(v)k 4(ocation)k 0 5633(of)m 271(a)s 437(symbol)s 1197(without)s 1988(parameters,)s 3142(as)s 3392(in)s 220 fnt2 3635 5630(//0.3vx)m 240 fnt1 4340 5633(and)m 220 fnt2 4744 5630(||@Indent)m 240 fnt1 5687 5633(.)m 480 5259(A)m 704(g)s 1(ap)k 1096(consists)s 1898(of)s 2162(a)s 2322(length)s 2971(plus)s 3415(a)s 3574(g)s 1(ap)k 3966(mode)s 4548(plus)s 4992(an)s 5268(optional)s 6101(indication)s 7108(of)s 7373(unbreakability)s 15(.)k 8896(A)s 240 fnt6 0 4973(length)m [ /Dest /LOUT19_4605_pre_conc_7 /DEST pdfmark 240 fnt1 659 4971(is)m 875(represented)s 2040(by)s 2341(an)s 2630(decimal)s 3447(number)s 4244(\(which)s 4972(may)s 5444(not)s 5816(be)s 6104(ne)s 3(g)k 1(ati)k 6(v)k 3(e\))k 7036(follo)s 6(wed)k 7944(by)s 8244(a)s 8416(unit)s 8855(of)s 0 4683(measurement.)m 1437(F)s 3(or)k 1825(e)s 3(xample,)k 220 fnt2 2738 4680(2.5c)m 240 fnt1 3207 4683(represents)m 4225(the)s 4572(length)s 5226(2.5)s 5571(centimetres.)s 6834(Figure)s 7513(3.1)s 7847(gi)s 6(v)k 3(es)k 8393(the)s 8740(full)s 0 4395(selection)m 906(of)s 1177(units)s 1693(of)s 1964(measurement.)s [ /Dest /LOUT19_4605_pre_conc_8 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_9 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_10 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_11 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_12 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_13 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_14 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_15 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_16 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_17 /DEST pdfmark 480 4021(After)m 1045(the)s 1396(length)s 2054(comes)s 2718(an)s 3004(optional)s 240 fnt6 3846 4023(gap)m 4261(mode)s 240 fnt1 4773 4021(,)m [ /Dest /LOUT19_4605_pre_conc_18 /DEST pdfmark 4883(which)s 5528(is)s 5740(a)s 5909(single)s 6539(letter)s 7090(follo)s 6(wing)k 8070(the)s 8421(length,)s 0 3733(indicating)m 1031(ho)s 6(w)k 1514(the)s 1884(length)s 2562(is)s 2794(to)s 3055(be)s 3359(measured.)s 4462(As)s 4801(sho)s 6(wn)k 5500(in)s 5765(Figure)s 6468(3.2,)s 6897(with)s 7401(edge-to-edge)s 8728(g)s 1(ap)k 0 3445(mode)m [ /Dest /LOUT19_4605_pre_conc_19 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_20 /DEST pdfmark 603(the)s 967(length)s 240 fnt6 1638 3447(l)m 240 fnt1 1780 3445(is)m 2006(measured)s 2996(from)s 3536(the)s 3900(trailing)s 4658(edge)s 5181(of)s 5468(the)s 5832(\207rst)s 6279(object)s 6939(to)s 7194(the)s 7558(leading)s 8331(edge)s 8855(of)s 0 3157(the)m 347(second.)s 1174(Edge-to-edge)s 2516(is)s 2725(the)s 3071(def)s 2(ault)k 3790(mode:)s 4486(the)s 220 fnt2 4833 3154(e)m 240 fnt1 5005 3157(may)m 5469(be)s 5749(omitted.)s 6642(Hyphenation)s 7934(g)s 1(ap)k 8330(mode)s 8916(is)s [ /Dest /LOUT19_4605_pre_conc_21 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_22 /DEST pdfmark 0 2869(similar)m 9(,)k 760(e)s 3(xcept)k 1441(as)s 1691(e)s 3(xplained)k 2676(at)s 2908(the)s 3256(end)s 3660(of)s 3931(this)s 4327(section.)s 480 2495(Mark-to-mark,)m [ /Dest /LOUT19_4605_pre_conc_23 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_24 /DEST pdfmark 1957(o)s 3(v)k 3(erstrik)k 2(e,)k [ /Dest /LOUT19_4605_pre_conc_25 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_26 /DEST pdfmark 3028(and)s 3450(k)s 2(erning)k [ /Dest /LOUT19_4605_pre_conc_27 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_28 /DEST pdfmark 4249(measure)s 5118(the)s 5484(length)s 6156(from)s 6698(the)s 7063(last)s 7471(mark)s 8041(of)s 8329(the)s 8695(\207rst)s 0 2207(object)m 648(to)s 892(the)s 1245(\207rst)s 1680(mark)s 2237(of)s 2513(the)s 2865(second.)s 3699(In)s 3960(the)s 4312(case)s 4784(of)s 5060(mark-to-mark,)s 6497(if)s 6719(the)s 7072(length)s 7731(is)s 7946(too)s 8310(small)s 8887(to)s 0 1919(pre)m 6(v)k 3(ent)k 771(the)s 1123(objects)s 1855(almost)s 2556(o)s 3(v)k 3(erlapping,)k 3804(it)s 4000(is)s 4214(widened)s 5087(until)s 5584(the)s 3(y)k 6051(no)s 6348(longer)s 7023(do.)s 7431(\(The)s 7942(e)s 3(xtra)k 240 fnt6 8480 1921(l/10)m 240 fnt1 8916 1919(is)m 0 1631(not)m 362(applied)s 1119(when)s 1690(plain)s 2220(te)s 3(xt)k 2630(output)s 3298(is)s 3503(in)s 3741(ef)s 6(fect.\))k 4520(K)s 6(erning)k 5346(also)s 5780(widens,)s 6560(with)s 7037(the)s 7380(aim)s 7793(of)s 8059(pre)s 6(v)k 3(enting)k 0 1343(the)m 372(mark)s 948(of)s 1243(either)s 1870(object)s 2539(from)s 3087(o)s 3(v)k 3(erlapping)k 4301(the)s 4673(other)s 5248(object;)s 5969(this)s 6389(mode)s 7001(is)s 7235(used)s 7756(for)s 8119(subscripts)s 0 1055(and)m 404(superscripts.)s [ /Dest /LOUT19_4605_pre_conc_29 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_30 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_31 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_32 /DEST pdfmark 558 681(T)m 19(ab)k 4(ulation)k 1646(ignores)s 2419(the)s 2785(\207rst)s 3234(object)s 3896(and)s 4318(places)s 4984(the)s 5350(leading)s 6125(edge)s 6651(of)s 6940(the)s 7306(second)s 8047(object)s 8709(at)s 8960(a)s 0 393(distance)m 240 fnt6 842 395(l)m 240 fnt1 971 393(from)m 1498(the)s 1849(left)s 2229(edge)s 2740(of)s 3014(the)s 3365(whole)s 4009(concatenation)s 5397(object.)s 6148(It)s 6356(is)s 6569(the)s 6920(main)s 7458(user)s 7919(of)s 8193(the)s 220 fnt2 8544 390(b)m 240 fnt1 8722 393(and)m 220 fnt2 0 102(r)m 240 fnt1 141 105(units)m 666(of)s 945(measurement;)s 2340(for)s 2686(e)s 3(xample,)k 220 fnt2 3609 102(|1r)m -8(t)k 240 fnt1 3994 105(will)m 4429(right-justify)s 5631(the)s 5988(follo)s 6(wing)k 6973(component,)s 8153(and)s 220 fnt2 8566 102(|0.5r)m -8(t)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 39 45 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.2.)m 1871(Concatenation)s 3335(symbols)s 4161(and)s 4587(par)s 3(a)k 2(gr)k 3(aphs)k 240 fnt5 10249 -1583(39)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 86 0 86 240 288 60 0 13282 LoutGr2 0.5 pt ltabvs grestore grestore 170 0 0 0 240 288 60 0 13368 LoutGr2 0.5 pt ltabhsp grestore grestore 0 169 0 60 240 288 60 0 13113 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 13027 LoutGr2 0.5 pt ltabvs grestore grestore 169 0 0 0 240 288 60 170 13368 LoutGr2 0.5 pt ltabhs grestore grestore 220 fnt2 170 13116(c)m gsave 339 13368 translate 240 fnt1 170 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 509 13368 translate 240 fnt1 170 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 679 13368 translate 240 fnt1 8217 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt ltabhs grestore grestore 240 fnt1 679 13119(Centimetres.)m 170 0 0 0 240 288 60 8896 13368 LoutGr2 0.5 pt ltabhsp grestore grestore 0 86 0 86 240 288 60 9066 13282 LoutGr2 0.5 pt ltabvs grestore grestore 0 169 0 60 240 288 60 9066 13113 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 13027 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 12941 LoutGr2 0.5 pt ltabvs grestore grestore 0 166 0 57 240 288 60 0 12775 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 12689 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 12775(i)m 240 fnt1 679 12778(Inches.)m 0 86 0 86 240 288 60 9066 12941 LoutGr2 0.5 pt ltabvs grestore grestore 0 166 0 57 240 288 60 9066 12775 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 12689 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 12603 LoutGr2 0.5 pt ltabvs grestore grestore 0 211 0 102 240 288 60 0 12392 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 12306 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 12437(p)m 240 fnt1 679 12440(Points)m 1328(\()s 220 fnt2 1401 12437(72p)m 240 fnt1 1819 12440(=)m 220 fnt2 2007 12437(1i)m 240 fnt1 2163 12440(\).)m 0 86 0 86 240 288 60 9066 12603 LoutGr2 0.5 pt ltabvs grestore grestore 0 211 0 102 240 288 60 9066 12392 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 12306 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 12220 LoutGr2 0.5 pt ltabvs grestore grestore 0 204 0 96 240 288 60 0 12016 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 11930 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 12055(m)m 240 fnt1 679 12058(Ems)m 1155(\()s 220 fnt2 1228 12055(12m)m 240 fnt1 1701 12058(=)m 220 fnt2 1889 12055(1i)m 240 fnt1 2045 12058(\).)m 0 86 0 86 240 288 60 9066 12220 LoutGr2 0.5 pt ltabvs grestore grestore 0 204 0 96 240 288 60 9066 12016 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 11930 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 11844 LoutGr2 0.5 pt ltabvs grestore grestore 0 503 0 394 240 288 60 0 11341 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 11255 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 11678(f)m 240 fnt1 679 11681(One)m 220 fnt2 1123 11678(f)m 240 fnt1 1229 11681(equals)m 1879(the)s 2215(size)s 2631(of)s 2890(the)s 3226(current)s 3950(font,)s 4431(as)s 4669(speci\207ed)s 5565(by)s 5847(the)s 220 fnt2 6184 11678(@F)m 6(ont)k 240 fnt1 6884 11681(symbol)m 7632(\(Section)s 8473(3.3\).)s 679 11393(This)m 1155(unit)s 1587(is)s 1797(appropriate)s 2941(for)s 3279(lengths)s 4021(that)s 4439(should)s 5136(change)s 5870(with)s 6352(the)s 6700(font)s 7145(size.)s 0 86 0 86 240 288 60 9066 11844 LoutGr2 0.5 pt ltabvs grestore grestore 0 503 0 394 240 288 60 9066 11341 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 11255 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 11169 LoutGr2 0.5 pt ltabvs grestore grestore 0 503 0 394 240 288 60 0 10666 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 10580 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 11003(s)m 240 fnt1 679 11006(One)m 220 fnt2 1125 11003(s)m 240 fnt1 1279 11006(equals)m 1932(the)s 2271(preferred)s 3194(g)s 1(ap)k 3582(between)s 4427(tw)s 2(o)k 4828(w)s 2(ords)k 5453(in)s 5687(the)s 6025(current)s 6752(font,)s 7235(as)s 7476(speci\207ed)s 8375(in)s 8608(the)s 679 10718(de\207nition)m 1653(of)s 1924(the)s 2272(font,)s 2764(or)s 3023(by)s 3317(the)s 220 fnt2 3665 10715(@Space)m 240 fnt1 4562 10718(symbol)m 5322(\(Section)s 6175(3.4\).)s 0 86 0 86 240 288 60 9066 11169 LoutGr2 0.5 pt ltabvs grestore grestore 0 503 0 394 240 288 60 9066 10666 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 10580 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 10494 LoutGr2 0.5 pt ltabvs grestore grestore 0 791 0 682 240 288 60 0 9703 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 9617 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 10328(v)m 240 fnt1 679 10331(One)m 220 fnt2 1149 10328(v)m 240 fnt1 1334 10331(equals)m 2011(the)s 2375(current)s 3126(g)s 1(ap)k 3540(between)s 4410(lines)s 4927(introduced)s 6024(during)s 6717(paragraph)s 7746(breaking,)s 8706(as)s 679 10043(speci\207ed)m 1574(by)s 1854(the)s 220 fnt2 2188 10040(@Break)m 240 fnt1 3030 10043(symbol)m 3777(\(Section)s 4616(3.4\).)s 5145(This)s 5607(unit)s 6026(is)s 6222(appropriate)s 7352(for)s 7676(lengths,)s 8460(such)s 679 9755(as)m 929(the)s 1277(spaces)s 1952(between)s 2806(paragraphs,)s 3962(which)s 4604(should)s 5301(change)s 6035(with)s 6517(the)s 6865(inter)s 4(-line)k 7791(g)s 1(ap.)k 0 86 0 86 240 288 60 9066 10494 LoutGr2 0.5 pt ltabvs grestore grestore 0 791 0 682 240 288 60 9066 9703 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 9617 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 9531 LoutGr2 0.5 pt ltabvs grestore grestore 0 454 0 345 240 288 60 0 9077 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 8991 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 9365(w)m 240 fnt1 679 9368(One)m 220 fnt2 1167 9365(w)m 240 fnt1 1416 9368(equals)m 2111(the)s 2493(width)s 3128(of)s 3432(the)s 3813(follo)s 6(wing)k 4824(component,)s 6028(or)s 6320(its)s 6629(height)s 7321(if)s 7571(the)s 7952(symbol)s 8746(is)s 679 9080(v)m 3(ertical)k 1446(concatenation.)s 0 86 0 86 240 288 60 9066 9531 LoutGr2 0.5 pt ltabvs grestore grestore 0 454 0 345 240 288 60 9066 9077 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 8991 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 8905 LoutGr2 0.5 pt ltabvs grestore grestore 0 454 0 345 240 288 60 0 8451 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 8365 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 8739(b)m 240 fnt1 679 8742(One)m 220 fnt2 1133 8739(b)m 240 fnt1 1305 8742(equals)m 1965(the)s 2311(width)s 2912(of)s 3181(the)s 3527(whole)s 4166(concatenation)s 5550(object,)s 6239(or)s 6496(its)s 6770(height)s 7427(if)s 7642(the)s 7988(symbol)s 8746(is)s 679 8454(v)m 3(ertical)k 1446(concatenation.)s 0 86 0 86 240 288 60 9066 8905 LoutGr2 0.5 pt ltabvs grestore grestore 0 454 0 345 240 288 60 9066 8451 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 8365 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 8279 LoutGr2 0.5 pt ltabvs grestore grestore 0 503 0 394 240 288 60 0 7776 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 7690 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 8113(r)m 240 fnt1 679 8116(One)m 220 fnt2 1176 8113(r)m 240 fnt1 1352 8116(equals)m 2057(one)s 220 fnt2 2502 8113(b)m 240 fnt1 2718 8116(minus)m 3397(one)s 220 fnt2 3842 8113(w)m 240 fnt1 3998 8116(.)m 4205(This)s 4723(unit)s 5198(is)s 5451(used)s 5991(for)s 6371(centring,)s 7304(and)s 7751(for)s 8132(left)s 8552(and)s 679 7828(right)m 1190(justi\207cation.)s 0 86 0 86 240 288 60 9066 8279 LoutGr2 0.5 pt ltabvs grestore grestore 0 503 0 394 240 288 60 9066 7776 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 7690 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 7604 LoutGr2 0.5 pt ltabvs grestore grestore 0 215 0 106 240 288 60 0 7389 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 7303 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 7438(d)m 240 fnt1 679 7441(De)m 3(grees.)k 1623(This)s 2099(unit)s 2531(may)s 2997(only)s 3477(be)s 3759(used)s 4256(with)s 4738(the)s 220 fnt2 5086 7438(@Rotate)m 240 fnt1 6007 7441(symbol.)m 0 86 0 86 240 288 60 9066 7604 LoutGr2 0.5 pt ltabvs grestore grestore 0 215 0 106 240 288 60 9066 7389 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 7303 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 7217 LoutGr2 0.5 pt ltabvs grestore grestore 0 504 0 394 240 288 60 0 6713 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 6627 LoutGr2 0.5 pt ltabvs grestore grestore 220 fnt2 170 7050(y)m 240 fnt1 679 7053(One)m 220 fnt2 1129 7050(y)m 240 fnt1 1292 7053(equals)m 1949(the)s 2292(current)s 3023(v)s 6(alue)k 3586(set)s 3906(by)s 4195(the)s 220 fnt2 4538 7050(@YUnit)m 240 fnt1 5347 7053(symbol)m 6102(\(Section)s 6950(3.6\).)s 7488(This)s 7959(unit)s 8386(is)s 8590(not)s 679 6765(used)m 1176(internally)s 2145(by)s 2439(Lout;)s 3003(it)s 3195(is)s 3405(included)s 4287(for)s 4625(the)s 4973(con)s 9(v)k 3(enience)k 6213(of)s 6484(application)s 7603(packages.)s 0 86 0 86 240 288 60 9066 7217 LoutGr2 0.5 pt ltabvs grestore grestore 0 504 0 394 240 288 60 9066 6713 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 6627 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 86 240 288 60 0 6541 LoutGr2 0.5 pt ltabvs grestore grestore 0 504 0 394 240 288 60 0 6037 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 0 5951 LoutGr2 0.5 pt ltabvs grestore grestore 170 0 0 0 240 288 60 0 5951 LoutGr2 0.5 pt ltabhsp grestore grestore 220 fnt2 170 6374(z)m gsave 170 5951 translate 240 fnt1 169 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 339 5951 translate 240 fnt1 170 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt ltabhs grestore grestore gsave 509 5951 translate 240 fnt1 170 0 0 0 240 288 60 LoutGraphic gsave 0.5 pt ltabhs grestore grestore 240 fnt1 679 6377(One)m 220 fnt2 1130 6374(z)m 240 fnt1 1290 6377(equals)m 1948(the)s 2292(current)s 3024(v)s 6(alue)k 3588(set)s 3909(by)s 4199(the)s 220 fnt2 4543 6374(@ZUnit)m 240 fnt1 5341 6377(symbol)m 6097(\(Section)s 6946(3.6\).)s 7485(This)s 7957(unit)s 8385(is)s 8590(not)s 679 6089(used)m 1176(internally)s 2145(by)s 2439(Lout;)s 3003(it)s 3195(is)s 3405(included)s 4287(for)s 4625(the)s 4973(con)s 9(v)k 3(enience)k 6213(of)s 6484(application)s 7603(packages.)s 8217 0 0 0 240 288 60 679 5951 LoutGr2 0.5 pt ltabhs grestore grestore 170 0 0 0 240 288 60 8896 5951 LoutGr2 0.5 pt ltabhsp grestore grestore 0 86 0 86 240 288 60 9066 6541 LoutGr2 0.5 pt ltabvs grestore grestore 0 504 0 394 240 288 60 9066 6037 LoutGr2 0.5 pt ltabvs grestore grestore 0 86 0 0 240 288 60 9066 5951 LoutGr2 0.5 pt ltabvs grestore grestore [ /Dest /LOUTunits /DEST pdfmark 200 fnt5 1938 5388(Figur)m 3(e)k 2546(3.1.)s 200 fnt1 2938 5389(The)m 3294(thirteen)s 3948(units)s 4377(of)s 4603(measurement)s 5713(pro)s 3(vided)k 6468(by)s 6713(Lout.)s 240 fnt1 0 4758(will)m 426(centre)s 1065(it.)s 480 4384(The)m 914(v)s 6(alue)k 220 fnt2 1488 4381(|0r)m -8(t)k 240 fnt1 1871 4384(separating)m 2912(the)s 3266(\207rst)s 3703(and)s 4113(second)s 4842(items)s 5416(in)s 5665(a)s 5837(sequence)s 6776(of)s 7053(horizontally)s 8268(concate-)s 0 4096(nated)m 572(objects)s 1296(is)s 1502(some)s 6(what)k 2522(special)s 3236(in)s 3475(that)s 3889(it)s 4077(denotes)s 4855(left)s 5228(justi\207cation)s 6409(of)s 6676(the)s 7020(object)s 7660(to)s 7895(its)s 8167(left)s 8540(in)s 8778(the)s 0 3808(a)m 4(v)k 6(ailable)k 902(space.)s 1590(This)s 2059(is)s 2262(identical)s 3132(with)s 220 fnt2 3607 3805(|0ie)m 240 fnt1 4001 3808(when)m 4570(the)s 4911(object)s 5548(to)s 5780(the)s 6121(left)s 6491(also)s 6922(has)s 7285(the)s 7626(principal)s 8523(mark;)s 0 3520(b)m 4(ut)k 354(when)s 922(it)s 1105(does)s 1587(not,)s 220 fnt2 1991 3517(|0r)m -8(t)k 240 fnt1 2360 3520(will)m 2777(cause)s 3356(the)s 3695(object)s 4331(to)s 4561(the)s 4901(left)s 5269(to)s 5500(appear)s 6188(further)s 6889(to)s 7119(the)s 7459(left)s 7827(than)s 8288(it)s 8471(w)s 2(ould)k 0 3232(otherwise)m 985(ha)s 4(v)k 3(e)k 1486(done,)s 2059(if)s 2276(space)s 2863(to)s 3102(do)s 3395(so)s 3661(is)s 3871(a)s 4(v)k 6(ailable.)k 480 2858(A)m 744(g)s 1(ap)k 1177(is)s 1421(optionally)s 2480(concluded)s 3557(with)s 4073(an)s 4391(indication)s 5439(of)s 5744(unbreakability)s 15(,)k 7252(which)s 7929(is)s 8173(a)s 8374(letter)s 220 fnt2 8958 2855(u)m 240 fnt1 0 2570(appended)m 976(to)s 1215(the)s 1563(g)s 1(ap.)k 2072(A)s 2303(paragraph)s 3316(will)s 3742(ne)s 6(v)k 3(er)k 4324(be)s 4607(brok)s 2(en)k 5327(at)s 5559(an)s 5842(unbreakable)s 7068(g)s 1(ap,)k 7520(nor)s 7899(will)s 8325(a)s 8492(g)s 1(alle)k 3(y)k 0 2282(be)m 293(brok)s 2(en)k 1025(across)s 1684(tw)s 2(o)k 2106(tar)s 4(gets)k 2800(at)s 3044(such)s 3551(a)s 3729(g)s 1(ap.)k 4249(Basser)s 4958(Lout')s 13(s)k 5631(implementation)s 7200(is)s 7421(slightly)s 8204(defecti)s 6(v)k 3(e)k 0 1994(in)m 242(that)s 659(it)s 849(ignores)s 1603(an)s 3(y)k 1999(unbreakable)s 3222(indication)s 4234(in)s 4476(the)s 4822(g)s 1(ap)k 5219(separating)s 6253(the)s 6599(\207rst)s 7029(component)s 8151(promoted)s 0 1706(into)m 425(an)s 3(y)k 822(tar)s 4(get)k 1421(from)s 1945(the)s 2293(second.)s 480 1332(When)m 1111(tw)s 2(o)k 1523(objects)s 2254(are)s 2603(separated)s 3566(only)s 4048(by)s 4345(zero)s 4811(or)s 5072(more)s 5622(white)s 6211(space)s [ /Dest /LOUT19_4605_pre_conc_33 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_34 /DEST pdfmark 6801(characters)s 7821(\(spaces,)s 8634(tabs,)s 0 1044(ne)m 6(wlines,)k 983(and)s 1420(formfeeds\),)s 2607(Lout)s 3152(inserts)s 220 fnt2 3859 1041(&)m 240 fnt6 4001 1046(k)m 220 fnt2 4111 1041(s)m 240 fnt1 4307 1044(between)m 5194(the)s 5575(tw)s 2(o)k 6018(objects,)s 6835(where)s 240 fnt6 7508 1046(k)m 240 fnt1 7711 1044(is)m 7954(the)s 8335(number)s 0 756(of)m 291(spaces.)s 1100(Precisely)s 15(,)k 240 fnt6 2087 758(k)m 240 fnt1 2278 756(is)m 2509(determined)s 3662(by)s 3977(discarding)s 5047(all)s 5360(space)s 5968(characters)s 7007(and)s 7431(tabs)s 7888(that)s 8327(precede)s 0 468(ne)m 6(wlines)k 903(\(these)s 1537(are)s 1892(in)s 9(visible)k 2771(so)s 3045(are)s 3400(better)s 4012(ignored\),)s 4937(then)s 5414(counting)s 6313(1)s 6477(for)s 6823(each)s 7326(ne)s 6(wline,)k 8193(formfeed)s 0 180(or)m 259(space,)s 897(and)s 1301(8)s 1468(for)s 1806(each)s 2301(tab)s 2646(character)s 13(.)k 3671(The)s 4099(g)s 1(ap)k 4497(will)s 4923(be)s 5205(unbreakable)s 6430(if)s 240 fnt6 6647 182(k)m 240 fnt1 6817 180(is)m 7027(zero.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 40 46 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(40)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 6166 7484 0 7484 240 288 60 1450 5884 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 0 6710(Edge-to-edge)m 220 fnt2 1786 6707(|)m 240 fnt6 1843 6712(l)m 220 fnt2 1929 6707(e)m 240 fnt1 0 5558(Hyphenation)m 220 fnt2 1786 5555(|)m 240 fnt6 1843 5560(l)m 220 fnt2 1929 5555(h)m 240 fnt1 0 4406(Ov)m 3(erstrik)k 2(e)k 220 fnt2 1786 4403(|)m 240 fnt6 1843 4408(l)m 220 fnt2 1929 4403(o)m 240 fnt1 0 3254(Mark-to-mark)m 220 fnt2 1786 3251(|)m 240 fnt6 1843 3256(l)m 220 fnt2 1929 3251(x)m 240 fnt1 0 2102(K)m 6(erning)k 220 fnt2 1786 2099(|)m 240 fnt6 1843 2104(l)m 220 fnt2 1929 2099(k)m 240 fnt1 0 950(T)m 19(ab)k 4(ulation)k 220 fnt2 1786 947(|)m 240 fnt6 1843 952(l)m 220 fnt2 1929 947(t)m gsave 2764 0 translate 240 fnt1 3402 7484 0 7484 240 288 60 LoutGraphic gsave 0.5 pt setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore gsave 567 6748 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 6634 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 6748 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 6634 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2267 6657 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 1247 6657 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 1247 6657 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 1247 6657 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt6 1732 6455(l)m gsave 567 5596 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 5482 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 5596 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 5482 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2267 5505 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 1247 5505 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 1247 5505 translate 180 fnt1 1020 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 1247 5505 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1732 5303(l)m gsave 567 4444 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 4330 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 4444 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 4330 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2551 4296 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 4296 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 4296 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 4296 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1590 4095(l)m gsave 567 3242 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 3128 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 3242 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 3128 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2551 3094 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 3094 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 3094 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 3094 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt1 975 2892(max\()m 180 fnt6 1383 2893(l,)m 1503(a+b+l/10)s 180 fnt1 2205 2892(\))m gsave 1247 3718 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate 68 -1 0 -1 180 288 45 0 1 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 567 0 0 0 180 288 45 0 0 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate 68 -1 0 0 180 288 45 0 0 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 3718 translate 30.0000 rotate 68 -1 0 -1 180 288 45 0 1 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 567 0 0 0 180 288 45 680 3718 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 3718 translate -30.0000 rotate 68 -1 0 0 180 288 45 0 0 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt6 920 3787(a)m gsave 2551 3718 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 2268 3718 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 2268 3718 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 2268 3718 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 2366 3743(b)m gsave 567 2090 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 1976 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 2090 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 1976 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2551 1942 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 1942 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 680 1942 translate 180 fnt1 1871 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 1942 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt1 1203 1740(max\()m 180 fnt6 1611 1741(l,)m 1731(a,)s 1891(b)s 180 fnt1 1977 1740(\))m gsave 1247 2566 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate 68 -1 0 -1 180 288 45 0 1 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 567 0 0 0 180 288 45 0 0 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate 68 -1 0 0 180 288 45 0 0 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 680 2566 translate 30.0000 rotate 68 -1 0 -1 180 288 45 0 1 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 567 0 0 0 180 288 45 680 2566 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 680 2566 translate -30.0000 rotate 68 -1 0 0 180 288 45 0 0 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 180 fnt6 920 2635(a)m gsave 2551 2566 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 2268 2566 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 2268 2566 translate 180 fnt1 283 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 2268 2566 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 2366 2591(b)m gsave 567 938 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 680 824 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 938 translate 180 fnt1 680 340 0 340 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke grestore grestore gsave 2551 824 translate 180 fnt1 0 567 0 567 180 288 45 LoutGraphic gsave 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke grestore grestore gsave 2268 733 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 2268 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 0 733 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 733 translate 180 fnt1 2268 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 733 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1587 532(l)m gsave 3402 234 translate 180.0000 rotate gsave 0 0 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 0 translate 180 fnt1 3402 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 0 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore grestore gsave 0 234 translate 30.0000 rotate gsave 0 1 translate 180 fnt1 68 -1 0 -1 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore gsave 0 234 translate 180 fnt1 3402 0 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore gsave 0 234 translate -30.0000 rotate gsave 0 0 translate 180 fnt1 68 -1 0 0 180 288 45 LoutGraphic gsave 0 0 moveto xsize 0 lineto stroke grestore grestore grestore 1189 22(curr)m 6(ent)k 1759(bound)s grestore end end restore grestore [ /Dest /LOUTgapmodes /DEST pdfmark 200 fnt5 2562 5321(Figur)m 3(e)k 3170(3.2.)s 200 fnt1 3562 5322(The)m 3918(six)s 4196(g)s 1(ap)k 4527(modes)s 5089(pro)s 3(vided)k 5844(by)s 6089(Lout.)s 240 fnt1 480 4689(A)m 724(sequence)s 1672(of)s 1958(tw)s 2(o)k 2383(or)s 2657(more)s 3219(objects)s 3962(separated)s 4936(by)s 220 fnt2 5245 4686(&)m 240 fnt1 5462 4689(symbols)m 6326(is)s 6551(a)s [ /Dest /LOUT19_4605_pre_conc_35 /DEST pdfmark 240 fnt6 6732 4691(par)m 3(a)k 2(gr)k 3(aph)k 240 fnt1 7745 4689(.)m 7924(Lout)s 8451(breaks)s 0 4401(paragraphs)m 1100(into)s 1526(lines)s 2029(automatically)s 3384(as)s 3635(required,)s 4539(by)s 4834(con)s 9(v)k 3(erting)k 5898(some)s 6460(of)s 6732(the)s 220 fnt2 7081 4398(&)m 240 fnt1 7284 4401(symbols)m 8134(into)s 220 fnt2 8560 4398(//1vx)m 240 fnt1 9022 4401(.)m 0 4113(Unbreakable)m 1279(g)s 1(aps)k 1769(are)s 2117(not)s 2485(eligible)s 3258(for)s 3597(this)s 3995(con)s 9(v)k 3(ersion.)k 5198(`Optimal')s 6173(line)s 6588(breaks)s 7265(are)s 7613(chosen,)s 8386(using)s 8960(a)s 0 3825(method)m 776(adapted)s 1578(from)s 2102(T)s 2198 3777(E)m 2305 3825(X)m 2534([)s [ /Rect [2605 3822 2718 3989] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTknuth1984tex /ANN pdfmark 2605(6)s 2718(].)s [ /Dest /LOUT19_4605_pre_conc_36 /DEST pdfmark 480 3451(If)m 735(an)s 220 fnt2 1043 3448(&)m 240 fnt1 1271 3451(symbol)m 2056(whose)s 2750(g)s 1(ap)k 3173(has)s 3568(h)s 1(yphenation)k 4834(mode)s [ /Dest /LOUT19_4605_pre_conc_37 /DEST pdfmark [ /Dest /LOUT19_4605_pre_conc_38 /DEST pdfmark 5447(is)s 5683(chosen)s 6430(for)s 6793(replacement)s 8046(by)s 220 fnt2 8365 3448(//1vx)m 240 fnt1 8827 3451(,)m 8960(a)s 0 3163(h)m 1(yphen)k 755(will)s 1174(be)s 1448(appended)s 2417(to)s 2649(the)s 2989(preceding)s 3978(object,)s 4661(unless)s 5303(that)s 5714(object)s 6350(is)s 6553(a)s 6712(w)s 2(ord)k 7252(which)s 7887(already)s 8636(ends)s 0 2875(with)m 482(a)s 648(h)s 1(yphen)k 1410(or)s 1669(slash.)s 2311(F)s 3(or)k 2700(e)s 3(xample,)k 220 fnt2 480 2378(Long)m 1017(w)s 2(ords)k 1654(ma)s 6(y)k 2122(be)s 2419(h)s 6(yph &0ih enat &0ih ed.)k 240 fnt1 0 1879(could)m 590(ha)s 4(v)k 3(e)k 1091(the)s 1439(follo)s 6(wing)k 2416(result,)s 3053(depending)s 4104(where)s 4744(the)s 5092(line)s 5506(breaks)s 6181(f)s 2(all:)k 480 1376(Long)m 1038(w)s 2(ords)k 1670(may)s 2135(be)s 2415(h)s 1(yphenat-)k 480 1088(ed.)m 0 635(Basser)m 727(Lout)s 1269(inserts)s 1973(h)s 1(yphenation)k 3243(g)s 1(aps)k 3762(automatically)s 5147(as)s 5427(required,)s 6360(ag)s 1(ain)k 6964(follo)s 6(wing)k 7971(the)s 8350(method)s 0 347(of)m 304(T)s 400 299(E)m 507 347(X)m 676(,)s 817(which)s 1492(approximates)s 2865(the)s 3246(h)s 1(yphenations)k 4607(in)s 4883(W)s 19(ebster')k 13(s)k 5904(dictionary)s 15(.)k 7055(Ho)s 6(we)k 6(v)k 3(er)k 8011(it)s 8236(does)s 8760(not)s 0 59(insert)m 607(h)s 1(yphenation)k 1864(g)s 1(aps)k 2370(in)s 2630(w)s 2(ords)k 3281(on)s 3595(either)s 4215(side)s 4673(of)s 4961(a)s 5144(concatenation)s 6546(symbol)s 7323(which)s 7982(already)s 8756(has)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 41 47 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Times-BoldItalic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Times-BoldItalic /Times-BoldItalicfnt7 vec2 /Times-BoldItalic LoutRecode /fnt7 { /Times-BoldItalicfnt7 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.2.)m 1871(Concatenation)s 3335(symbols)s 4161(and)s 4587(par)s 3(a)k 2(gr)k 3(aphs)k 240 fnt5 10256 -1583(41)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(h)m 1(yphenation)k 1248(mode.)s 1952(T)s 19(o)k 2260(pre)s 6(v)k 3(ent)k 3036(the)s 3392(h)s 1(yphenation)k 4640(of)s 4919(a)s 5093(single)s 5728(w)s 2(ord,)k 6333(enclose)s 7114(it)s 7314(in)s 7565(quotes.)s 8363(Further)s 0 12917(control)m 769(o)s 3(v)k 3(er)k 1286(paragraph)s 2337(breaking)s 3265(and)s 3706(h)s 1(yphenation)k 4984(is)s 5232(pro)s 3(vided)k 6176(by)s 6507(the)s 220 fnt2 6893 12914(@Break)m 240 fnt1 7787 12917(and)m 220 fnt2 8229 12914(@Space)m 240 fnt1 0 12629(symbols)m 849(\(Sections)s 1789(3.4)s 2143(and)s 2547(3.5\).)s 240 fnt5 0 11836(3.3.)m 471(@F)s 6(ont,)k 1280(@Char)s 22(,)k 2127(and)s 2568(@F)s 6(ontDef)k [ /Dest /LOUTfont /DEST pdfmark 240 fnt1 480 11365(A)m 240 fnt6 728 11367(font)m [ /Dest /LOUT19_4605_pre_font_1 /DEST pdfmark 240 fnt1 1182 11365(is)m 1410(a)s 1594(collection)s 2611(of)s 2900(characters)s 3936(which)s 4596(may)s 5080(be)s 5380(printed.)s 6239(Man)s 3(y)k 6867(fonts)s 7414(come)s 8006(in)s 240 fnt6 8268 11367(families)m 240 fnt1 9019 11365(,)m [ /Dest /LOUT19_4605_pre_font_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_font_3 /DEST pdfmark 0 11077(which)m 634(are)s 973(groups)s 1667(of)s 1930(fonts)s 2450(that)s 2860(ha)s 4(v)k 3(e)k 3352(been)s 3853(designed)s 4754(to)s 4984(go)s 5269(together)s 13(.)k 6194(F)s 3(or)k 6575(e)s 3(xample,)k 7480(the)s 7820(T)s 8(imes)k 8451(f)s 2(amily)k 0 10789(includes)m 848(the)s 1196(follo)s 6(wing)k 2173(fonts:)s 480 10286(T)m 8(imes)k 1120(Base)s 240 fnt6 480 10000(T)m 13(imes)k 1093(Slope)s 240 fnt5 480 9709(T)m 4(imes)k 1154(Bold)s 240 fnt7 480 9421(T)m 8(imes)k 1116(BoldSlope)s 240 fnt1 0 8919(Thus,)m 586(each)s 1080(font)s 1524(has)s 1893(tw)s 2(o)k 2303(names:)s 3019(its)s 240 fnt6 3294 8921(family)m 3946(name)s 240 fnt1 4518 8919(\(T)m 8(imes,)k 5292(Helv)s 3(etica,)k 6310(etc.\))s 6775(and)s 7179(its)s 240 fnt6 7454 8921(face)m 7904(name)s 240 fnt1 8475 8919(\(Base,)m 0 8631(Slope,)m 682(etc.\).)s 1294(T)s 8(imes)k 1964(Base)s 2516(is)s 2756(more)s 3334(commonly)s 4443(called)s 5101(T)s 8(imes)k 5772(Roman,)s 6601(and)s 7036(T)s 8(imes)k 7706(Slope)s 8338(is)s 8579(more)s 0 8343(commonly)m 1085(called)s 1720(T)s 8(imes)k 2367(Italic.)s 3027(Lout)s 3547(a)s 4(v)k 4(oids)k 4222(these)s 4776(names)s 5445(in)s 5695(f)s 2(a)k 4(v)k 4(our)k 6377(of)s 6655(generic)s 7418(names)s 8087(which)s 8737(can)s 0 8055(be)m 282(applied)s 1044(to)s 1283(man)s 3(y)k 1866(font)s 2311(f)s 2(amilies.)k 480 7681(Lig)m 1(atures,)k [ /Dest /LOUT19_4605_pre_font_4 /DEST pdfmark [ /Dest /LOUT19_4605_pre_font_5 /DEST pdfmark 1488(such)s 1984(as)s 2234(\210)s 2420(for)s 2758(f)s 2849(l)s 2970(and)s 3375(\207)s 3560(for)s 3898(f)s 3989(i,)s 4163(are)s 4510(considered)s 5604(by)s 5899(Basser)s 6596(Lout)s 7108(to)s 7348(be)s 7630(an)s 7913(inte)s 3(gral)k 8695(part)s 0 7393(of)m 257(the)s 591(font:)s 1128(if)s 1331(the)s 1665(font)s 2096(de\207nition)s 3056(\(see)s 3482(belo)s 6(w\))k 4175(mentions)s 5089(them,)s 5660(the)s 3(y)k 6109(will)s 6521(be)s 6789(used.)s 7378(Similarly)s 15(,)k 8344(k)s 2(erning)k 0 7105(\(\207ne)m 510(adjustment)s 1636(of)s 1924(the)s 2289(space)s 2893(between)s 3764(adjacent)s 4637(characters)s 5672(to)s 5928(impro)s 3(v)k 3(e)k 6792(the)s 7157(appearance\))s 8377(is)s 8604(done)s 0 6817(whene)m 6(v)k 3(er)k 988(indicated)s 1929(in)s 2179(the)s 2535(font)s 2987(de\207nition.)s 4075(Enclosing)s 5092(one)s 5502(of)s 5780(the)s 6135(letters)s 6775(in)s 220 fnt2 7026 6814(@OneCol)m 240 fnt1 8045 6817(is)m 8262(one)s 8672(sure)s 0 6529(w)m 2(ay)k 451(to)s 690(disable)s 1423(a)s 1589(lig)s 1(ature)k 2373(or)s 2632(k)s 2(ern.)k 3159(Y)s 26(ou)k 3601(can)s 3990(also)s 4428(turn)s 4870(of)s 6(f)k 5214(lig)s 1(atures)k 6086(using)s 220 fnt2 480 6028(nolig @F)m 6(ont { ...)k 13( })k 240 fnt1 0 5529(and)m 404(turn)s 846(them)s 1384(on)s 1681(with)s 220 fnt2 480 5077(lig @F)m 6(ont { ...)k 13( })k 240 fnt1 0 4578(Since)m 587(the)s 3(y)k 1050(are)s 1397(on)s 1694(initially)s 2490(this)s 2886(second)s 3609(option)s 4278(is)s 4488(rarely)s 5098(needed.)s 480 4204(More)m 1046(generally)s 15(,)k 2018(the)s 220 fnt2 2357 4201(@F)m 6(ont)k 240 fnt1 3061 4204(symbol)m [ /Dest /LOUT19_4605_pre_font_6 /DEST pdfmark 3812(returns)s 4517(its)s 4784(right)s 5287(parameter)s 6292(in)s 6526(a)s 6683(font)s 7120(and)s 7515(size)s 7933(speci\207ed)s 8832(by)s 0 3916(its)m 276(left:)s 220 fnt2 480 3458({ )m 11(Times Base 12p } @F)k 6(ont)k 240 fnt6 3155 3463(object)m 240 fnt1 0 2962(The)m 431(f)s 2(amily)k 1110(and)s 1517(f)s 2(ace)k 1972(names)s 2638(must)s 3166(ha)s 4(v)k 3(e)k 3671(appeared)s 4596(together)s 5442(in)s 5689(a)s 220 fnt2 5858 2959(@F)m 6(ontDef)k 240 fnt1 6916 2962(\(see)m 7360(belo)s 6(w\);)k 8133(the)s 8485(size)s 8916(is)s 0 2674(arbitrary)m 879(and)s 1287(may)s 1757(be)s 2043(gi)s 6(v)k 3(en)k 2627(in)s 2874(an)s 3(y)k 3275(one)s 3681(of)s 3956(the)s 220 fnt2 4308 2671(c)m 240 fnt1 4413 2674(,)m 220 fnt2 4525 2671(i)m 240 fnt1 4559 2674(,)m 220 fnt2 4670 2671(p)m 240 fnt1 4784 2674(,)m 220 fnt2 4895 2671(m)m 240 fnt1 5064 2674(,)m 220 fnt2 5175 2671(f)m 240 fnt1 5233 2674(,)m 220 fnt2 5344 2671(s)m 240 fnt1 5447 2674(,)m 5558(and)s 220 fnt2 5966 2671(v)m 240 fnt1 6139 2674(units)m 6659(of)s 6934(measurement)s 8273(\(Section)s 0 2386(3.2\),)m 479(although)s 220 fnt2 1367 2383(10p)m 240 fnt1 1777 2386(and)m 220 fnt2 2174 2383(12p)m 240 fnt1 2584 2386(are)m 2924(the)s 3264(most)s 3782(common)s 4669(sizes)s 5177(for)s 5507(te)s 3(xt.)k 6019(There)s 6624(may)s 7083(be)s 7357(empty)s 8002(objects)s 8722(and)s 220 fnt2 0 2095(@Null)m 240 fnt1 645 2098(objects)m 1373(in)s 1616(the)s 1964(left)s 2341(parameter)s 3355(of)s 220 fnt2 3626 2095(@F)m 6(ont)k 240 fnt1 4278 2098(;)m 4390(these)s 4937(are)s 5284(ignored.)s 480 1724(When)m 1114(a)s 220 fnt2 1286 1721(@F)m 6(ont)k 240 fnt1 2004 1724(symbol)m 2769(is)s 2985(nested)s 3660(inside)s 4293(the)s 4646(right)s 5163(parameter)s 6183(of)s 6459(another)s 220 fnt2 7242 1721(@F)m 6(ont)k 240 fnt1 7960 1724(symbol,)m 8778(the)s 0 1436(inner)m 555(one)s 961(determines)s 2065(the)s 2417(font)s 2867(of)s 3142(its)s 3423(o)s 6(wn)k 3891(right)s 4406(parameter)s 13(.)k 5516(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 6480(it)s 6677(may)s 7147(be)s 7434(abbre)s 6(viated)k 8605(so)s 8876(as)s 0 1148(to)m 239(inherit)s 922(part)s 1353(of)s 1624(the)s 1972(outer)s 2523(symbol:)s 220 fnt2 480 647({ )m 11(Times Base 12p } @F)k 6(ont)k 480 359({ hello)m 8(, Slope @F)k 6(ont hello)k 8(, 15p @F)k 6(ont hello })k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 42 48 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(42)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(has)m 370(result)s 480 12724(hello,)m 240 fnt6 1065 12726(hello,)m 300 fnt1 1636 12711(hello)m 240 fnt1 0 12240(The)m 457(\207rst)s 918(inner)s 220 fnt2 1498 12237(@F)m 6(ont)k 240 fnt1 2240 12240(inherits)m 3037(the)s 3414(outer)s 3995(f)s 2(amily)k 4699(and)s 5133(size,)s 5641(changing)s 6601(only)s 7111(the)s 7488(f)s 2(ace;)k 8025(the)s 8403(second)s 0 11952(inherits)m 754(the)s 1089(outer)s 1627(f)s 2(amily)k 2289(and)s 2680(f)s 2(ace.)k 3225(When)s 3841(a)s 3994(f)s 2(amily)k 4656(name)s 5217(is)s 5413(gi)s 6(v)k 3(en,)k 6030(it)s 6209(must)s 6721(be)s 6990(follo)s 6(wed)k 7878(immediately)s 0 11664(by)m 294(a)s 460(f)s 2(ace)k 911(name.)s 1593(A)s 1823(size)s 2250(change)s 2984(may)s 3450(appear)s 4147(\207rst)s 4578(or)s 4837(last.)s 480 11290(Sizes)m 1035(of)s 1307(the)s 1656(form)s 2180(+)s 240 fnt6 2308 11292(length)m 240 fnt1 2962 11290(and)m 3367(\211)s 240 fnt6 3487 11292(length)m 240 fnt1 4140 11290(may)m 4607(also)s 5046(be)s 5328(used,)s 5875(meaning)s 6753(that)s 7171(the)s 7520(font)s 7966(size)s 8393(is)s 8604(to)s 8844(be)s 240 fnt6 0 11004(length)m 240 fnt1 649 11002(lar)m 4(ger)k 1257(or)s 1512(smaller)s 2269(than)s 2734(the)s 3078(inherited)s 3981(v)s 6(alue.)k 4652(F)s 3(or)k 5037(e)s 3(xample,)k 5947(\211)s 220 fnt2 6067 10999(2p)m 240 fnt1 6359 11002(is)m 6564(often)s 7108(used)s 7601(for)s 7934(superscripts)s 0 10714(and)m 407(subscripts.)s 1530(These)s 2161(forms)s 2772(are)s 3123(highly)s 3792(recommended,)s 5257(since)s 5808(the)s 3(y)k 6274(don')s 4(t)k 6839(need)s 7352(to)s 7594(be)s 7880(changed)s 8739(if)s 8960(a)s 0 10426(decision)m 854(is)s 1064(made)s 1638(to)s 1877(alter)s 2360(the)s 2708(font)s 3153(size)s 3580(of)s 3851(the)s 4199(document)s 5203(as)s 5453(a)s 5619(whole.)s 480 10052(The)m 220 fnt2 908 10049(@F)m 6(ont)k 240 fnt1 1620 10052(symbol)m 2380(also)s 2818(switches)s 3692(to)s 3931(and)s 4335(from)s 4859(small)s 5431(capitals:)s [ /Dest /LOUT19_4605_pre_font_7 /DEST pdfmark 220 fnt2 480 9551(smallcaps @F)m 6(ont ...)k 480 9263(nosmallcaps @F)m 6(ont ...)k 240 fnt1 0 8767(These)m 639(may)s 1118(be)s 1412(nested,)s 2143(and)s 2559(the)s 3(y)k 3035(cooperate)s 4033(with)s 4527(other)s 5091(font)s 5548(changes.)s 6496(The)s 6936(precise)s 7681(ef)s 6(fect)k 8290(depends)s 0 8479(on)m 293(the)s 637(font)s 1078(\(see)s 1514(belo)s 6(w\).)k 2331(There)s 2940(is)s 3146(a)s 3308(def)s 2(ault)k 4024(v)s 6(alue)k 4588(\()s 220 fnt2 4661 8476(nosmallcaps)m 240 fnt1 5873 8479(\),)m 6055(so)s 6317(it)s 6504(is)s 6710(not)s 7072(necessary)s 8051(to)s 8285(mention)s 0 8191(this)m 396(attrib)s 4(ute)k 1243(when)s 1819(gi)s 6(ving)k 2478(an)s 2761(initial)s 3372(font.)s 480 7817(By)m 817(def)s 2(ault,)k 1589(the)s 1941(size)s 2372(of)s 2647(the)s 2998(small)s 3574(capitals)s 4358(is)s 4572(0.7)s 4924(times)s 5496(the)s 5847(size)s 6278(of)s 6553(full-size)s 7394(capitals.)s 8291(Y)s 26(ou)k 8737(can)s 0 7529(change)m 734(this)s 1130(ratio,)s 1674(for)s 2012(e)s 3(xample)k 2875(to)s 3114(0.8,)s 3521(using)s 220 fnt2 480 7028({ setsmallcaps 0.8 } @F)m 6(ont ...)k 240 fnt1 0 6532(This)m 499(does)s 1013(not)s 1402(itself)s 1974(cause)s 2584(a)s 2774(change)s 3532(to)s 3794(small)s 4390(capitals,)s 5249(b)s 4(ut)k 5635(where)s 6(v)k 3(er)k 6599(the)s 3(y)k 7085(are)s 7456(used)s 7976(in)s 8243(the)s 8615(right)s 0 6244(parameter)m 1014(of)s 220 fnt2 1285 6241(@F)m 6(ont)k 240 fnt1 1997 6244(the)m 3(y)k 2460(will)s 2886(ha)s 4(v)k 3(e)k 3387(size)s 3814(0.8)s 4161(times)s 4729(the)s 5077(size)s 5504(that)s 5922(ordinary)s 6786(capitals)s 7566(w)s 2(ould)k 8221(ha)s 4(v)k 3(e)k 8722(had)s 0 5956(at)m 232(that)s 649(point.)s 1304(Note)s 1824(that)s 2241(the)s 2588(number)s 3379(follo)s 6(wing)k 220 fnt2 4355 5953(setsmallcaps)m 240 fnt1 5675 5956(is)m 5884(a)s 6049(ratio,)s 6592(not)s 6958(a)s 7123(length,)s 7827(so)s 8092(there)s 8624(is)s 8833(no)s 0 5668(unit)m 432(of)s 703(measurement.)s 480 5294(The)m 220 fnt2 915 5291(@F)m 6(ont)k 240 fnt1 1634 5294(symbol)m 2401(also)s 2847(controls)s 3675(a)s 3848(feature)s 4574(added)s 5211(in)s 5461(V)s 26(ersion)k 6257(3.25)s 6730(which)s 7379(determines)s 8486(where)s 0 5006(the)m 335(ro)s 6(w)k 742(mark)s 1281(is)s 1478(placed)s 2147(in)s 2376(a)s 2529(w)s 2(ord.)k 3170(Usually)s 15(,)k 3993(as)s 4230(described)s 5191(else)s 6(where)k 6182(in)s 6412(this)s 6795(document,)s 7833(the)s 8168(ro)s 6(w)k 8574(mark)s 0 4718(passes)m 666(through)s 1472(the)s 1825(w)s 2(ord)k 2377(at)s 2613(a)s 2784(height)s 3446(of)s 3721(half)s 4169(the)s 4521(height)s 5184(of)s 5459(the)s 5811(letter)s 6365(`x')s 6680(abo)s 3(v)k 3(e)k 7306(the)s 7659(baseline)s 8502(of)s 8778(the)s 0 4430(w)m 2(ord.)k 654(Ho)s 6(we)k 6(v)k 3(er)k 1576(this)s 1972(can)s 2361(be)s 2643(changed)s 3499(so)s 3765(that)s 4183(it)s 4375(passes)s 5037(through)s 5839(the)s 6187(baseline,)s 7077(or)s 7336(not,)s 7749(lik)s 2(e)k 8161(this:)s 220 fnt2 480 3929(baselinemar)m -3(k @F)k 6(ont ...)k 480 3641(xheight2mar)m -3(k @F)k 6(ont ...)k 240 fnt1 0 3142(The)m 415(def)s 2(ault)k 1122(v)s 6(alue)k 1676(is)s 220 fnt2 1872 3139(xheight2mar)m -3(k)k 240 fnt1 3192 3142(;)m 3290(this)s 3672(w)s 2(as)k 4079(ho)s 6(w)k 4526(Lout)s 5024(did)s 5374(it)s 5552(before)s 6204(this)s 6586(option)s 7241(w)s 2(as)k 7648(added,)s 8313(because)s 0 2854(it)m 226(mak)s 2(es)k 920(equation)s 1835(formatting)s 2930(easy)s 15(.)k 3538(The)s 4000(other)s 4586(v)s 6(alue,)k 220 fnt2 5239 2851(baselinemar)m -3(k)k 240 fnt1 6546 2854(,)m 6687(is)s 6931(useful)s 7604(when)s 8214(w)s 2(ords)k 8883(in)s 0 2566(dif)m 6(ferent)k 875(font)s 1320(sizes)s 1835(appear)s 2532(side)s 2973(by)s 3267(side)s 3708(on)s 4005(a)s 4171(line.)s 480 2192(Finally)m 15(,)k 1304(a)s 1525(feature)s 2298(added)s 2983(in)s 3281(V)s 26(ersion)k 4124(3.33)s 4643(requests)s 5532(that)s 6005(the)s 6408(height)s 7121(and)s 7580(depth)s 8224(of)s 8550(e)s 6(v)k 3(ery)k 0 1904(character)m 936(be)s 1220(increased)s 2182(to)s 2423(the)s 2773(`bounding)s 3813(box')s 4287(size)s 4716(of)s 4989(the)s 5339(font)s 5786(\211)s 5968(that)s 6388(is,)s 6656(to)s 6897(the)s 7247(height)s 7907(of)s 8180(the)s 8531(font')s 13(s)k 0 1616(highest)m 756(character)s 1696(and)s 2105(the)s 2459(depth)s 3053(of)s 3330(the)s 3683(font')s 13(s)k 4284(deepest)s 5066(character)s 13(.)k 6097(Ensuring)s 7019(in)s 7268(this)s 7669(w)s 2(ay)k 8126(that)s 8550(e)s 6(v)k 3(ery)k 0 1328(character)m 946(has)s 1329(the)s 1690(same)s 2250(height)s 2921(and)s 3338(depth)s 3940(can)s 4341(mak)s 2(e)k 4926(documents)s 6027(more)s 6587(uniform)s 7430(in)s 7686(layout.)s 8461(T)s 19(o)k 8774(get)s 0 1040(this)m 396(feature,)s 1165(use)s 220 fnt2 480 558(str)m -3(ut @F)k 6(ont ...)k 240 fnt1 0 103(either)m 592(alone)s 1154(or)s 1401(combined)s 2391(with)s 2861(other)s 3401(options)s 4145(to)s 220 fnt2 4372 100(@F)m 6(ont)k 240 fnt1 5024 103(.)m 5176(It)s 5369(is)s 5567(called)s 220 fnt2 6184 100(str)m -3(ut)k 240 fnt1 6658 103(because)m 7459(it)s 7639(is)s 7837(lik)s 2(e)k 8237(inserting)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 43 49 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.3.)m 1871(@F)s 25(ont,)k 2611(@Char)s 26(,)k 3391(and)s 3817(@F)s 25(ontDef)k 240 fnt5 10250 -1583(43)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(an)m 299(in)s 9(visible)k 1186(v)s 3(ertical)k 1969(strut)s 2470(into)s 2912(e)s 6(v)k 3(ery)k 3504(non-empty)s 4612(w)s 2(ord.)k 5282(By)s 5633(def)s 2(ault)k 6371(struts)s 6955(are)s 7319(of)s 6(f;)k 7719(b)s 4(ut)k 8098(an)s 3(yw)k 2(ay)k 8909(if)s 0 12917(you)m 425(need)s 945(to)s 1194(turn)s 1646(them)s 2194(of)s 6(f)k 2548(for)s 2896(some)s 3467(reason,)s 4208(use)s 220 fnt2 4593 12914(nostr)m -3(ut @F)k 6(ont)k 240 fnt1 5980 12917(.)m 6154(Struts)s 6772(are)s 7129(al)s 2(w)k 2(ays)k 7850(turned)s 8529(of)s 6(f)k 8883(in)s 0 12629(equations,)m 1024(for)s 1362(e)s 3(xample,)k 2276(because)s 3089(the)s 3(y)k 3552(are)s 3899(not)s 4265(appropriate)s 5409(for)s 5747(equation)s 6628(formatting.)s 480 12255(There)m 1080(are)s 1413(tw)s 2(o)k 1810(prede\207ned)s 2864(symbols,)s 220 fnt2 3756 12252(@CurrF)m 11(amily)k 240 fnt1 5083 12255(and)m 220 fnt2 5474 12252(@CurrF)m 11(ace)k 240 fnt1 6592 12255(,)m 6685(which)s 7314(respecti)s 6(v)k 3(ely)k 8499(return)s 0 11967(the)m 337(f)s 2(amily)k 1000(and)s 1392(f)s 2(ace)k 1831(names)s 2482(of)s 2741(the)s 3077(current)s 3801(font.)s 4339(F)s 3(or)k 4716(e)s 3(xample,)k 5618(right)s 6117(no)s 6(w)k 220 fnt2 6567 11964(@CurrF)m 11(amily)k 240 fnt1 7896 11967(is)m 8094(T)s 8(imes)k 8722(and)s 220 fnt2 0 11676(@CurrF)m 11(ace)k 240 fnt1 1178 11679(is)m 1388(Base.)s 480 11305(T)m 19(o)k 799(inform)s 1529(Lout)s 2061(that)s 2499(certain)s 3225(fonts)s 3773(e)s 3(xist,)k 4348(it)s 4560(is)s 4790(necessary)s 5793(to)s 6051(create)s 6696(a)s 6882(database)s 7781(of)s 220 fnt2 8072 11302(@F)m 6(ontDef)k 240 fnt1 0 11017(symbols.)m 990(\(It)s 1303(is)s 1542(possible)s 2411(to)s 2679(ha)s 4(v)k 3(e)k 3209(a)s 220 fnt2 3404 11014(@F)m 6(ontDef)k 240 fnt1 4487 11017(symbol)m 5275(in)s 5547(an)s 5859(ordinary)s 6752(source)s 7461(\207le;)s 7907(it)s 8128(enters)s 8778(the)s 0 10729(cross-reference)m 1513(database)s 2393(in)s 2637(the)s 2986(usual)s 3547(w)s 2(ay)k 3999(and)s 4404(is)s 4615(retrie)s 6(v)k 3(ed)k 5513(from)s 6038(there)s 6572(by)s 6867(the)s 7216(font)s 7662(machinery)s 15(,)k 8764(b)s 4(ut)k 0 10441(only)m 497(from)s 1039(the)s 1405(second)s 2146(run,)s 2590(which)s 3250(is)s 3478(not)s 3862(con)s 9(v)k 3(enient.\))k 5166(A)s 5414(typical)s 6137(entry)s 6700(in)s 6961(such)s 7475(a)s 7659(database)s 8556(looks)s 0 10153(lik)m 2(e)k 412(this:)s 220 fnt2 480 9702({ @F)m 6(ontDef)k 480 9414( @T)m 26(ag { )k 11(Times-Base })k 480 9126( @F)m 11(amily { )k 11(Times })k 480 8838( @F)m 11(ace { Base })k 480 8550( @Name { )m 11(Times-Roman })k 480 8262( @Metr)m -3(ics { )k 11(Ti-Rm })k 480 7974( @Mapping { LtLatin1.LCM })m 480 7686(})m 240 fnt1 0 7192(This)m 483(entry)s 1035(informs)s 1837(Lout)s 2356(of)s 2635(the)s 2990(e)s 3(xistence)k 3940(of)s 4218(a)s 4392(font)s 4844(whose)s 5520(f)s 2(amily)k 6202(name)s 6784(is)s 7001(the)s 7357(v)s 6(alue)k 7932(of)s 220 fnt2 8211 7189(@F)m 11(amily)k 240 fnt1 0 6904(and)m 398(whose)s 1059(f)s 2(ace)k 1503(name)s 2070(is)s 2273(the)s 2614(v)s 6(alue)k 3175(of)s 220 fnt2 3439 6901(@F)m 11(ace)k 240 fnt1 4131 6904(.)m 4288(The)s 220 fnt2 4709 6901(@T)m 26(ag)k 240 fnt1 5325 6904(v)m 6(alue)k 5886(must)s 6404(be)s 6679(e)s 3(xactly)k 7413(equal)s 7979(to)s 220 fnt2 8211 6901(@F)m 11(amily)k 240 fnt1 0 6616(follo)m 6(wed)k 895(by)s 1182(a)s 1340(h)s 1(yphen)k 2095(follo)s 6(wed)k 2989(by)s 220 fnt2 3276 6613(@F)m 11(ace)k 240 fnt1 3968 6616(.)m 4125(There)s 4730(are)s 5070(a)s 5228(fe)s 6(w)k 5627(fonts)s 6149(which)s 6783(are)s 7123(the)s 7463(only)s 7936(members)s 8855(of)s 0 6328(their)m 488(f)s 2(amilies;)k 1356(e)s 6(v)k 3(en)k 1846(though)s 2559(these)s 3096(fonts)s 3616(do)s 3899(not)s 4255(need)s 4755(a)s 4911(f)s 2(ace)k 5352(name,)s 5968(the)s 3(y)k 6421(must)s 6936(be)s 7208(gi)s 6(v)k 3(en)k 7778(one,)s 8221(probably)s 220 fnt2 0 6037(Base)m 240 fnt1 492 6040(,)m 599(by)s 893(their)s 220 fnt2 1390 6037(@F)m 6(ontDef)k 240 fnt1 2384 6040(.)m 480 5666(The)m 950(other)s 1543(\207elds)s 2154(are)s 2543(implementation-dependent,)s 5255(b)s 4(ut)k 5659(in)s 5944(Basser)s 6683(Lout)s 7237(V)s 26(ersion)k 8067(3)s 8273(the)s 3(y)k 8779(are)s 220 fnt2 0 5375(@Name)m 240 fnt1 800 5378(,)m 908(a)s 1076(PostScript)s 2120(font)s 2567(name;)s 220 fnt2 3198 5375(@Metr)m -3(ics)k 240 fnt1 4124 5378(,)m 4293(an)s [ /Dest /LOUT19_4605_pre_font_8 /DEST pdfmark 4578(Adobe)s 5275(font)s 5721(metrics)s 6476(\(formerly)s 7446(AFM\))s 8095(\207le)s 8458(whose)s 0 5090(F)m 3(ontName)k 1070(entry)s 1622(must)s 2154(agree)s 2734(with)s 3223(the)s 3578(PostScript)s 4627(font)s 5079(name)s 5660(just)s 6072(mentioned;)s 7201(and)s 220 fnt2 7612 5087(@Mapping)m 240 fnt1 8664 5090(,)m 8778(the)s 0 4802(name)m 589(of)s 876(a)s 1057(Lout)s 1585(Character)s 2589(Mapping)s 3522(\(LCM\))s 4264(\207le.)s 4748(The)s 5192(\207les)s 5657(are)s 6019(searched)s 6929(for)s 7282(in)s 7541(standard)s 8425(places.)s 0 4514(Consult)m 813(the)s 1169(PostScript)s 2220(Reference)s 3252(Manual)s 4046([)s [ /Rect [4117 4514 4212 4676] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTadobe1990ps /ANN pdfmark 4117(1)s 4212(])s 4339(for)s 4685(general)s 5451(information)s 6645(about)s 7245(fonts)s 7782(and)s 8195(encoding)s 0 4226(v)m 3(ectors;)k 795(brie\210y)s 15(,)k 1506(an)s 1785(8-bit)s [ /Dest /LOUT19_4605_pre_font_9 /DEST pdfmark 2291(character)s 3221(code)s 240 fnt6 3724 4228(c)m 240 fnt1 3882 4226(in)m 4120(Lout')s 13(s)k 4778(input)s 5325(is)s 5531(mapped)s 6342(to)s 6577(the)s 6920(character)s 7850(in)s 8088(the)s 8431(Adobe)s 0 3938(font)m 449(metrics)s 1206(\207le)s 1571(whose)s 2243(name)s 2822(appears)s 3607(on)s 3908(the)s 4260(line)s 4679(labelled)s 240 fnt6 5497 3940(c)m 240 fnt1 5663 3938(in)m 5910(the)s 6262(LCM)s 6840(\207le.)s 7313(The)s 7745(LCM)s 8322(\207le)s 8688(also)s 0 3650(de\207nes)m 756(v)s 6(arious)k 1532(character)s 4(-to-character)k 3707(mappings,)s 4772(such)s 5295(as)s 5572(upper)s 4(-case)k 6686(to)s 6952(lo)s 6(wer)k 4(-case,)k 8110(which)s 8779(are)s 0 3362(used)m 497(for)s 835(such)s 1331(purposes)s 2233(as)s 2483(the)s 2831(production)s 3925(of)s 4196(small)s 4768(capitals.)s 480 2988(The)m 933(options)s 1714(sho)s 6(wn)k 2416(abo)s 3(v)k 3(e)k 3063(are)s 3436(all)s 3754(compulsory)s 15(,)k 5001(b)s 4(ut)k 5388(there)s 5946(are)s 6319(tw)s 2(o)k 6754(other)s 7330(options)s 8111(which)s 8779(are)s 0 2700(optional.)m 942(The)s 220 fnt2 1364 2697(@Recode)m 240 fnt1 2388 2700(option,)m 3101(if)s 3312(gi)s 6(v)k 3(en,)k 3935(must)s 4454(ha)s 4(v)k 3(e)k 4948(v)s 6(alue)k 220 fnt2 5510 2697(Y)m 30(es)k 240 fnt1 5905 2700(\(the)m 6325(def)s 2(ault,)k 7087(so)s 7347(rarely)s 7950(seen\))s 8497(or)s 220 fnt2 8749 2697(No)m 240 fnt1 9022 2700(.)m 0 2412(If)m 220 fnt2 239 2409(@Recode { No })m 240 fnt1 1887 2412(is)m 2106(gi)s 6(v)k 3(en,)k 2745(Lout)s 3266(assumes)s 4123(that)s 4551(the)s 4908(gi)s 6(v)k 3(en)k 5497(encoding)s 6437(v)s 3(ector)k 7100(is)s 7319(already)s 8086(associated)s 0 2124(with)m 482(this)s 878(font)s 1323(in)s 1566(the)s 1914(PostScript)s 2956(interpreter)s 9(,)k 4047(and)s 4451(optimizes)s 5431(its)s 5707(output)s 6379(accordingly)s 15(.)k 480 1750(The)m 928(other)s 1500(optional)s 2359(option,)s 220 fnt2 3099 1747(@Extr)m 2(aMetr)k -3(ics)k 240 fnt1 4535 1750(,)m 4663(has)s 5053(v)s 6(alue)k 5642(equal)s 6236(to)s 6495(the)s 6864(name)s 7459(of)s 7750(a)s 7937(second)s 8681(font)s 0 1462(metrics)m 765(\207le)s 1138(which,)s 1843(if)s 2072(gi)s 6(v)k 3(en,)k 2715(is)s 2937(added)s 3580(to)s 3831(the)s 4191(main)s 4739(one)s 5153(de\207ned)s 5929(by)s 220 fnt2 6235 1459(@Metr)m -3(ics)k 240 fnt1 7161 1462(.)m 7338(This)s 7826(e)s 3(xtra)k 8373(metrics)s 0 1174(\207le)m 357(contains)s 220 fnt2 1200 1171(C)m 240 fnt1 1404 1174(\(de\207ne)m 2119(character\))s 3117(and)s 220 fnt2 3516 1171(CC)m 240 fnt1 3878 1174(\(de\207ne)m 4593(composite)s 5627(character\))s 6625(entries)s 7307(in)s 7545(the)s 7888(same)s 8430(format)s 0 886(as)m 259(in)s 512(AFM)s 1095(\207les;)s 1615(Lout)s 2136(will)s 2572(b)s 4(uild)k 3128(composite)s 4177(characters)s 5204(declared)s 6081(in)s 6334(this)s 6740(e)s 3(xtra)k 7283(\207le)s 7654(from)s 8188(the)s 8546(gi)s 6(v)k 3(en)k 0 598(pieces,)m 707(which)s 1352(it)s 1547(does)s 2041(not)s 2410(do)s 2706(for)s 3048(composite)s 4090(characters)s 5111(in)s 5358(the)s 5709(main)s 6247(AFM)s 6824(\207le.)s 7296(There)s 7912(are)s 8263(e)s 3(xample)k 0 310(e)m 3(xtra)k 534(metrics)s 1287(\207les)s 1736(in)s 1979(the)s 2327(current)s 3063(Lout)s 3575(distrib)s 4(ution)k 4730(which)s 5372(sho)s 6(w)k 5926(the)s 6274(precise)s 7006(format)s 7702(of)s 7973(these)s 8520(\207les.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 44 50 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(44)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 13205(It)m 708(is)s 941(not)s 1330(possible)s 2193(to)s 2456(ha)s 4(v)k 3(e)k 2980(tw)s 2(o)k 220 fnt2 3413 13202(@F)m 6(ontDef)k 240 fnt1 4490 13205(database)m 5392(entries)s 6103(with)s 6608(the)s 6979(same)s 7549(f)s 2(amily)k 8247(and)s 8675(f)s 2(ace)k 0 12917(names,)m 703(because)s 1501(then)s 1955(the)s 3(y)k 2402(must)s 2912(ha)s 4(v)k 3(e)k 3398(the)s 3731(same)s 220 fnt2 4262 12914(@T)m 26(ag)k 240 fnt1 4825 12917(,)m 4917(which)s 5544(is)s 5739(not)s 6089(allo)s 6(wed.)k 6989(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 7934(a)s 8084(PostScript)s 0 12629(font)m 470(name)s 1070(and)s 1500(\207le)s 1886(may)s 2378(appear)s 3101(in)s 3369(tw)s 2(o)k 3805(or)s 4090(more)s 4662(font)s 5133(de\207nitions,)s 6276(allo)s 6(wing)k 7185(one)s 7613(PostScript)s 8681(font)s 0 12341(to)m 264(ha)s 4(v)k 3(e)k 791(tw)s 2(o)k 1227(or)s 1512(more)s 2085(equally)s 2869(v)s 6(alid)k 3425(Lout)s 3963(names.)s 4763(The)s 5217(LCM)s 5816(\207les)s 6291(may)s 6783(be)s 7091(equal)s 7690(or)s 7975(dif)s 6(ferent)k 8876(as)s 0 12053(desired.)m 480 11679(The)m 220 fnt2 917 11676(@Char)m 240 fnt1 1685 11679(symbol)m [ /Dest /LOUT19_4605_pre_font_10 /DEST pdfmark 2454(allo)s 6(ws)k 3133(a)s 3309(character)s 4252(to)s 4501(be)s 4792(speci\207ed)s 5710(by)s 6014(its)s 6299(name)s 6883(\(its)s 7247(PostScript)s 8299(name)s 8883(in)s 0 11391(Basser)m 697(Lout\))s 1277(rather)s 1893(than)s 2362(by)s 2656(its)s 2932(code:)s 220 fnt2 480 10890(@Char nine)m 240 fnt1 0 10435(is)m 215(equi)s 6(v)k 6(alent)k 1265(to)s 220 fnt2 1510 10432(9)m 240 fnt1 1689 10435(in)m 1938(most)s 2469(fonts.)s 3117(This)s 3599(is)s 3815(useful)s 4460(as)s 4716(a)s 4888(documentation)s 6373(aid)s 6729(and)s 7139(to)s 7384(be)s 7672(sure)s 8132(of)s 8409(getting)s 0 10147(the)m 347(right)s 856(character)s 1788(e)s 6(v)k 3(en)k 2286(if)s 2501(the)s 2848(encoding)s 3777(v)s 3(ector)k 4429(of)s 4698(the)s 5044(font)s 5488(is)s 5696(changed.)s 6656(Ho)s 6(we)k 6(v)k 3(er)k 220 fnt2 7576 10144(@Char)m 240 fnt1 8332 10147(will)m 8756(f)s 2(ail)k 0 9859(if)m 217(the)s 565(character)s 1499(named)s 2195(is)s 2405(not)s 2771(in)s 3014(the)s 3362(encoding)s 4293(v)s 3(ector)k 4947(of)s 5218(the)s 5566(current)s 6302(font.)s 240 fnt5 0 9066(3.4.)m 471(@Br)s 4(eak)k [ /Dest /LOUTbreak /DEST pdfmark 240 fnt1 480 8634(The)m 220 fnt2 898 8631(@Break)m 240 fnt1 1744 8634(symbol)m 2493(in\210uences)s 3504(the)s 3842(appearance)s 4962(of)s 5223(paragraphs)s 6313(\(Section)s 7155(3.2\),)s 7631(of)s 6(fering)k 8437(a)s 8592(\207x)s 3(ed)k 0 8346(set)m 325(of)s 596(styles:)s 220 fnt2 1275 7838(adjust)m 1916(@Break)s 240 fnt6 2772 7843(object)m [ /Dest /LOUT19_4605_pre_brea_1 /DEST pdfmark 240 fnt1 3600 7841(Break)m 4301(the)s 4718(paragraphs)s 5887(of)s 240 fnt6 6228 7843(object)m 240 fnt1 6945 7841(into)m 7439(lines,)s 8066(and)s 8540(apply)s 220 fnt2 3600 7550(@P)m 26(Adjust)k 240 fnt1 4633 7553(\(Section)m 5511(3.19\))s 6084(to)s 6348(e)s 6(v)k 3(ery)k 6949(line)s 7388(e)s 3(xcept)k 8094(the)s 8467(last)s 8883(in)s 3600 7265(each)m 4095(paragraph;)s [ /Dest /LOUT16_1731_pre_brea_1 /DEST pdfmark 220 fnt2 1128 6757(outdent)m 1916(@Break)s 240 fnt6 2772 6762(object)m [ /Dest /LOUT19_4605_pre_brea_2 /DEST pdfmark 240 fnt1 3600 6760(Lik)m 2(e)k 220 fnt2 4122 6757(adjust)m 240 fnt1 4703 6760(,)m 4840(e)s 3(xcept)k 5551(that)s 220 fnt2 6000 6757(2.0f @Wide {} &0i)m 240 fnt1 7809 6760(is)m 8049(inserted)s 8894(at)s 3600 6472(the)m 3981(be)s 3(ginning)k 5022(of)s 5326(e)s 6(v)k 3(ery)k 5935(line)s 6382(e)s 3(xcept)k 7096(the)s 7477(\207rst,)s 7988(creating)s 8843(an)s 3600 6184(outdented)m 4592(paragraph)s 5595(\(the)s 6012(outdent)s 6780(width)s 7372(may)s 7828(be)s 8100(changed)s 8946(\211)s 3600 5896(see)m 3961(belo)s 6(w\);)k [ /Dest /LOUT16_1731_pre_brea_2 /DEST pdfmark 220 fnt2 1187 5398(r)m 2(agged)k 1916(@Break)s 240 fnt6 2772 5403(object)m [ /Dest /LOUT19_4605_pre_brea_3 /DEST pdfmark 240 fnt1 3600 5401(Break)m 4222(the)s 4559(paragraphs)s 5648(of)s 240 fnt6 5908 5403(object)m 240 fnt1 6545 5401(into)m 6960(lines,)s 7507(b)s 4(ut)k 7858(do)s 8140(not)s 8495(adjust)s 3600 5113(the)m 3948(lines)s 4450(\(`ragged)s 5317(right'\);)s [ /Dest /LOUT16_1731_pre_brea_3 /DEST pdfmark 220 fnt2 1077 4605(cr)m 2(agged)k 1916(@Break)s 240 fnt6 2772 4610(object)m [ /Dest /LOUT19_4605_pre_brea_4 /DEST pdfmark 240 fnt1 3600 4608(Lik)m 2(e)k 220 fnt2 4125 4605(r)m 2(agged)k 240 fnt1 4794 4608(,)m 4934(e)s 3(xcept)k 5648(that)s 6099(each)s 6628(line)s 7075(will)s 7534(be)s 7849(centred)s 8644(with)s 3600 4320(respect)m 4336(to)s 4575(the)s 4923(others;)s [ /Dest /LOUT16_1731_pre_brea_4 /DEST pdfmark 220 fnt2 1114 3812(rr)m 2(agged)k 1916(@Break)s 240 fnt6 2772 3817(object)m [ /Dest /LOUT19_4605_pre_brea_5 /DEST pdfmark 240 fnt1 3600 3815(Lik)m 2(e)k 220 fnt2 4115 3812(r)m 2(agged)k 240 fnt1 4784 3815(,)m 4914(e)s 3(xcept)k 5618(that)s 6059(each)s 6577(line)s 7014(will)s 7463(be)s 7768(right-justi\207ed)s 3600 3527(with)m 4082(respect)s 4818(to)s 5057(the)s 5405(others)s 6040(\(`ragged)s 6907(left'\);)s [ /Dest /LOUT16_1731_pre_brea_5 /DEST pdfmark 220 fnt2 1065 3019(or)m 2(agged)k 1916(@Break)s 240 fnt6 2772 3024(object)m [ /Dest /LOUT19_4605_pre_brea_6 /DEST pdfmark 240 fnt1 3600 3022(The)m 4028(ob)s 3(vious)k 4835(combination)s 6088(of)s 220 fnt2 6359 3019(r)m 2(agged)k 240 fnt1 7088 3022(and)m 220 fnt2 7492 3019(outdent)m 240 fnt1 8220 3022(;)m [ /Dest /LOUT16_1731_pre_brea_6 /DEST pdfmark 220 fnt2 1413 2515(lines)m 1916(@Break)s 240 fnt6 2772 2520(object)m [ /Dest /LOUT19_4605_pre_brea_7 /DEST pdfmark 240 fnt1 3600 2518(Break)m 4284(the)s 4685(paragraphs)s 5837(of)s 240 fnt6 6161 2520(object)m 240 fnt1 6861 2518(into)m 7339(lines)s 7893(at)s 8178(the)s 8579(same)s 3600 2230(points)m 4235(that)s 4651(the)s 3(y)k 5113(are)s 5458(brok)s 2(en)k 6177(into)s 6600(lines)s 7101(in)s 7342(the)s 7689(input,)s 8286(and)s 8688(also)s 3600 1942(at)m 3819(concatenation)s 5190(symbols)s 6026(of)s 6283(the)s 6617(form)s 220 fnt2 7128 1939(&)m 240 fnt6 7270 1944(k)m 220 fnt2 7380 1939(b)m 240 fnt1 7540 1942(for)m 7865(an)s 3(y)k 240 fnt6 8248 1944(k)m 240 fnt1 8404 1942(greater)m 3600 1654(than)m 4069(1.)s 4354(Do)s 4700(not)s 5067(adjust)s 5698(the)s 6047(lines.)s 6663(An)s 3(y)k 7127(spaces)s 7803(at)s 8035(the)s 8384(start)s 8855(of)s 3600 1366(a)m 3766(line)s 4180(other)s 4731(than)s 5200(the)s 5548(\207rst)s 5979(line)s 6393(will)s 6819(appear)s 7516(in)s 7759(the)s 8107(output;)s [ /Dest /LOUT16_1731_pre_brea_7 /DEST pdfmark 220 fnt2 1303 858(clines)m 1916(@Break)s 240 fnt6 2772 863(object)m [ /Dest /LOUT19_4605_pre_brea_8 /DEST pdfmark 240 fnt1 3600 861(Break)m 4288(the)s 4693(paragraphs)s 5849(of)s 240 fnt6 6177 863(object)m 240 fnt1 6881 861(into)m 7363(lines)s 7921(as)s 8228(for)s 220 fnt2 8623 858(lines)m 3600 570(@Break)m 240 fnt1 4396 573(,)m 4503(then)s 4972(centre)s 5611(each)s 6106(line)s 6520(with)s 7002(respect)s 7738(to)s 7977(the)s 8325(others;)s [ /Dest /LOUT16_1731_pre_brea_8 /DEST pdfmark 220 fnt2 1337 65(r)m -3(lines)k 1916(@Break)s 240 fnt6 2772 70(object)m [ /Dest /LOUT19_4605_pre_brea_9 /DEST pdfmark 240 fnt1 3600 68(Break)m 4288(the)s 4693(paragraphs)s 5849(of)s 240 fnt6 6177 70(object)m 240 fnt1 6881 68(into)m 7363(lines)s 7921(as)s 8228(for)s 220 fnt2 8623 65(lines)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 45 51 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.4.)m 1871(@Br)s 8(eak)k 240 fnt5 10250 -1583(45)m gsave 1417 -15423 translate 240 fnt1 9066 13413 0 13304 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 3600 13247(@Break)m 240 fnt1 4396 13250(,)m 4535(then)s 5036(right-)s 5555(justify)s 6251(each)s 6778(line)s 7224(with)s 7738(respect)s 8506(to)s 8778(the)s 3600 12962(others.)m [ /Dest /LOUT16_1731_pre_brea_9 /DEST pdfmark 220 fnt2 1291 12504(olines)m 1916(@Break)s 240 fnt6 2772 12509(object)m [ /Dest /LOUT19_4605_pre_brea_10 /DEST pdfmark 240 fnt1 3600 12507(Break)m 4288(the)s 4693(paragraphs)s 5849(of)s 240 fnt6 6177 12509(object)m 240 fnt1 6881 12507(into)m 7363(lines)s 7921(as)s 8228(for)s 220 fnt2 8623 12504(lines)m 3600 12216(@Break)m 240 fnt1 4396 12219(,)m 4503(then)s 4972(as)s 5222(for)s 5560(outdenting.)s [ /Dest /LOUT16_1731_pre_brea_10 /DEST pdfmark 0 11716(If)m 235(the)s 588(paragraph)s 1606(w)s 2(as)k 2032(an)s 2320(entire)s 2924(component)s 4053(of)s 4329(a)s 4501(g)s 1(alle)k 3(y)k 15(,)k 5178(so)s 5449(will)s 5880(each)s 6380(of)s 6656(its)s 6937(lines)s 7444(be;)s 7787(otherwise)s 8778(the)s 0 11428(lines)m 502(are)s 849(enclosed)s 1744(in)s 1987(a)s 220 fnt2 2153 11425(@OneRo)m 3(w)k 240 fnt1 3284 11428(symbol)m 4044(after)s 4540(breaking.)s 480 11054(The)m 911(length)s 1570(of)s 1845(the)s 2196(g)s 1(ap)k 2598(used)s 3099(to)s 3341(separate)s 4183(the)s 4535(lines)s 5040(produced)s 5993(by)s 6291(paragraph)s 7307(breaking)s 8201(is)s 8415(al)s 2(w)k 2(ays)k 220 fnt2 0 10763(1v)m 240 fnt1 231 10766(,)m 346(e)s 3(xcept)k 1036(when)s 220 fnt2 1621 10763(lines)m 240 fnt1 2064 10766(,)m 220 fnt2 2179 10763(clines)m 240 fnt1 2732 10766(,)m 2848(or)s 220 fnt2 3116 10763(r)m -3(lines)k 240 fnt1 3704 10766(encounter)m 4715(a)s 4890(completely)s 6015(blank)s 6617(line,)s 7090(for)s 7437(which)s 8088(see)s 8458(belo)s 6(w)k 15(.)k 0 10478(Ho)m 6(we)k 6(v)k 3(er)k 9(,)k 960(the)s 220 fnt2 1308 10475(v)m 240 fnt1 1477 10478(unit)m 1909(itself)s 2457(and)s 2861(the)s [ /Dest /LOUT19_4605_pre_brea_11 /DEST pdfmark 3209(g)s 1(ap)k 3607(mode)s 4195(may)s 4661(be)s 4943(changed:)s 240 fnt6 1503 9975(gap)m 220 fnt2 1916 9970(@Break)m 240 fnt6 2772 9975(object)m 240 fnt1 3600 9973(W)m 9(ithin)k 240 fnt6 4312 9975(object)m 240 fnt1 4900 9973(,)m 5008(tak)s 2(e)k 5460(the)s 5809(v)s 6(alue)k 6377(of)s 6649(the)s 220 fnt2 6998 9970(v)m 240 fnt1 7167 9973(unit)m 7600(to)s 7839(be)s 8122(the)s 8471(length)s 3600 9685(of)m 240 fnt6 3871 9687(gap)m 240 fnt1 4224 9685(;)m [ /Dest /LOUT16_1731_pre_brea_11 /DEST pdfmark 1375 9184(+)m 240 fnt6 1503 9186(gap)m 220 fnt2 1916 9181(@Break)m 240 fnt6 2772 9186(object)m 240 fnt1 3600 9184(W)m 9(ithin)k 240 fnt6 4320 9186(object)m 240 fnt1 4908 9184(,)m 5024(tak)s 2(e)k 5485(the)s 5841(v)s 6(alue)k 6418(of)s 6698(the)s 220 fnt2 7054 9181(v)m 240 fnt1 7232 9184(unit)m 7673(to)s 7920(be)s 8211(lar)s 4(ger)k 8832(by)s 3600 8896(the)m 3948(length)s 4603(of)s 240 fnt6 4874 8898(gap)m 240 fnt1 5287 8896(than)m 5756(it)s 5948(w)s 2(ould)k 6603(otherwise)s 7588(ha)s 4(v)k 3(e)k 8089(been;)s [ /Dest /LOUT16_1731_pre_brea_12 /DEST pdfmark 1383 8391(\211)m 240 fnt6 1503 8393(gap)m 220 fnt2 1916 8388(@Break)m 240 fnt6 2772 8393(object)m 240 fnt1 3600 8391(W)m 9(ithin)k 240 fnt6 4309 8393(object)m 240 fnt1 4897 8391(,)m 5000(tak)s 2(e)k 5448(the)s 5792(v)s 6(alue)k 6356(of)s 6623(the)s 220 fnt2 6968 8388(v)m 240 fnt1 7133 8391(unit)m 7561(to)s 7796(be)s 8074(smaller)s 8832(by)s 3600 8103(the)m 3948(length)s 4603(of)s 240 fnt6 4874 8105(gap)m 240 fnt1 5287 8103(than)m 5756(it)s 5948(w)s 2(ould)k 6603(otherwise)s 7588(ha)s 4(v)k 3(e)k 8089(been.)s [ /Dest /LOUT16_1731_pre_brea_13 /DEST pdfmark 0 7598(In)m 256(each)s 751(case,)s 1269(the)s 1617(mode)s 2205(of)s 240 fnt6 2476 7600(gap)m 240 fnt1 2889 7598(is)m 3099(adopted)s 3915(within)s 240 fnt6 4583 7600(object)m 240 fnt1 5171 7598(.)m 480 7224(When)m 220 fnt2 1105 7221(lines)m 240 fnt1 1548 7224(,)m 220 fnt2 1650 7221(clines)m 240 fnt1 2203 7224(,)m 2305(or)s 220 fnt2 2559 7221(r)m -3(lines)k 240 fnt1 3133 7224(encounter)m 4131(one)s 4528(or)s 4782(more)s 5324(completely)s 6435(blank)s 7023(lines,)s 7576(a)s 7737(single)s 8359(v)s 3(ertical)k 0 6936(concatenation)m 1397(operator)s 2266(is)s 2488(inserted)s 3315(to)s 3566(implement)s 4661(these,)s 5272(ensuring)s 6161(that)s 6592(the)s 6952(entire)s 7564(set)s 7901(of)s 8185(lines)s 8700(will)s 0 6648(disappear)m 975(if)s 1191(the)s 3(y)k 1653(happen)s 2401(to)s 2639(f)s 2(all)k 3007(on)s 3303(a)s 3468(page)s 3975(or)s 4233(column)s 5007(break.)s 5700(The)s 6127(g)s 1(ap)k 6524(width)s 7125(of)s 7395(the)s 7741(concatenation)s 0 6360(operator)m 875(is)s 220 fnt2 1104 6357(1v)m 240 fnt1 1414 6360(for)m 1771(the)s 2138(\207rst)s 2589(ne)s 6(wline)k 3415(as)s 3684(usual,)s 4315(plus)s 220 fnt2 4784 6357(1v)m 240 fnt1 5094 6360(multiplied)m 6154(by)s 6467(the)s 240 fnt6 6834 6362(blank)m 7449(line)s 7879(scale)s 8443(factor)s 240 fnt1 9019 6360(,)m 0 6072(an)m 316(arbitrary)s 1225(decimal)s 2069(number)s 2894(with)s 3409(no)s 3736(units,)s 4342(for)s 4713(the)s 5095(remaining)s 6150(ne)s 6(wlines.)k 7192(This)s 7701(scale)s 8268(f)s 2(actor)k 8916(is)s 0 5784(settable)m 785(by)s 220 fnt2 480 5276({ b)m 4(lanklinescale)k 240 fnt6 2038 5281(num)m 220 fnt2 2507 5276(} @Break)m 240 fnt6 3497 5281(object)m 240 fnt1 0 4780(The)m 429(def)s 2(ault)k 1152(v)s 6(alue)k 1722(is)s 220 fnt2 1934 4777(1.0)m 240 fnt1 2231 4780(,)m 2340(which)s 2984(gi)s 6(v)k 3(es)k 3533(blank)s 4128(lines)s 4632(their)s 5131(full)s 5519(height.)s 6283(Ho)s 6(we)k 6(v)k 3(er)k 7207(it)s 7401(often)s 7951(looks)s 8523(better)s 0 4492(if)m 215(the)s 3(y)k 675(are)s 1020(reduced)s 1832(some)s 6(what.)k 2898(A)s 3125(v)s 6(alue)k 3690(as)s 3938(small)s 4507(as)s 220 fnt2 4755 4489(0.6)m 240 fnt1 5109 4492(looks)m 5677(good;)s 6266(it)s 6455(gi)s 6(v)k 3(es)k 7000(width)s 220 fnt2 7599 4489(1.6v)m 240 fnt1 8071 4492(to)m 8307(the)s 8652(con-)s 0 4204(catenation)m 1039(symbol)s 1799(inserted)s 2613(at)s 2845(a)s 3011(single)s 3638(blank)s 4231(line.)s 4753(The)s 5181(usual)s 5741(g)s 1(ap)k 6139(mode)s 6727(is)s 6937(of)s 7208(course)s 7888(appended.)s 480 3830(The)m 220 fnt2 908 3827(@Break)m 240 fnt1 1764 3830(symbol)m 2524(also)s 2962(controls)s 3783(h)s 1(yphenation:)k 220 fnt2 1141 3322(h)m 6(yphen @Break)k 240 fnt6 2772 3327(object)m [ /Dest /LOUT19_4605_pre_brea_12 /DEST pdfmark 240 fnt1 3600 3325(Permit)m 4296(h)s 1(yphenation)k 5536(within)s 6204(the)s 6552(paragraphs)s 7652(of)s 240 fnt6 7923 3327(object)m 240 fnt1 8511 3325(;)m [ /Dest /LOUT16_1731_pre_brea_14 /DEST pdfmark 220 fnt2 897 2817(noh)m 6(yphen @Break)k 240 fnt6 2772 2822(object)m [ /Dest /LOUT19_4605_pre_brea_13 /DEST pdfmark 240 fnt1 3600 2820(Prohibit)m 4440(h)s 1(yphenation)k 5691(within)s 6370(the)s 6729(paragraphs)s 7840(of)s 240 fnt6 8122 2822(object)m 240 fnt1 8710 2820(;)m 8833(all)s 3600 2532(h)m 1(yphenation)k 4897(g)s 1(aps)k 5443(without)s 6291(e)s 3(xception)k 7332(re)s 6(v)k 3(ert)k 7996(to)s 8292(edge-)s 8812(to-)s 3600 2244(edge)m 4108(mode.)s [ /Dest /LOUT16_1731_pre_brea_15 /DEST pdfmark 0 1741(The)m 220 fnt2 428 1738(@Break)m 240 fnt1 1284 1741(also)m 1722(has)s 2092(options)s 2848(which)s 3490(control)s 4222(wido)s 6(w)k 4922(and)s 5326(orphan)s 6048(lines:)s 220 fnt2 480 1233(unbreakab)m 4(le\207rst @Break)k 240 fnt6 3053 1238(ob-)m 480 950(ject)m [ /Dest /LOUT19_4605_pre_brea_14 /DEST pdfmark 240 fnt1 3600 1236(Pre)m 6(v)k 3(ent)k 4431(column)s 5256(and)s 5710(page)s 6268(breaks)s 6993(\(i.e.)s 7458(pre)s 6(v)k 3(ent)k 8276(a)s 8492(g)s 1(alle)k 3(y)k 3600 948(from)m 4147(splitting\))s 5081(between)s 5959(the)s 6330(\207rst)s 6784(and)s 7212(second)s 7958(lines)s 8483(of)s 8778(the)s 3600 660(paragraphs)m 4700(of)s 240 fnt6 4971 662(object)m 240 fnt1 5559 660(;)m [ /Dest /LOUT16_1731_pre_brea_16 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 46 52 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(46)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13257 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13200(unbreakab)m 4(lelast @Break)k 240 fnt6 3053 13205(ob-)m 480 12917(ject)m [ /Dest /LOUT19_4605_pre_brea_15 /DEST pdfmark 240 fnt1 3600 13203(Pre)m 6(v)k 3(ent)k 4429(column)s 5252(and)s 5704(page)s 6261(breaks)s 6984(between)s 7886(the)s 8282(last)s 8722(and)s 3600 12915(second)m 4323(last)s 4714(lines)s 5216(of)s 5487(the)s 5835(paragraphs)s 6935(of)s 240 fnt6 7206 12917(object)m 240 fnt1 7794 12915(.)m [ /Dest /LOUT16_1731_pre_brea_17 /DEST pdfmark 0 12412(These)m 688(options)s 1506(w)s 2(ork)k 2119(by)s 2475(adding)s 3241(the)s 220 fnt2 3651 12409(u)m 240 fnt1 3881 12412(\(unbreakable\))m 5319(suf\207x)s 5980(to)s 6281(the)s 6691(appropriate)s 7897(g)s 1(aps)k 8448(during)s 0 12124(paragraph)m 1017(breaking,)s 1966(so)s 2237(their)s 2738(precise)s 3475(ef)s 6(fect)k 4076(is)s 4290(as)s 4545(described)s 5524(for)s 5866(this)s 6267(suf\207x.)s 6981(These)s 7612(options)s 8373(may)s 8844(be)s 0 11836(countermanded)m 1533(by)s 220 fnt2 1827 11833(breakab)m 4(le\207rst @Break)k 240 fnt1 4057 11836(and)m 220 fnt2 4461 11833(breakab)m 4(lelast @Break.)k 240 fnt1 480 11462(The)m 908(width)s 1510(of)s 1781(the)s 2129(outdenting)s 3206(used)s 3703(in)s 3946(the)s 220 fnt2 4294 11459(outdent)m 240 fnt1 5082 11462(style)m 5589(may)s 6055(be)s 6337(changed)s 7193(lik)s 2(e)k 7605(this:)s 220 fnt2 480 10954({ setoutdent)m 240 fnt6 1769 10959(width)m 220 fnt2 2430 10954(} @Break)m 240 fnt6 480 10671(object)m 240 fnt1 3600 10957(W)m 9(ithin)k 240 fnt6 4310 10959(object)m 240 fnt1 4898 10957(,)m 5003(whene)s 6(v)k 3(er)k 5982(outdenting)s 7057(is)s 7265(required,)s 8166(use)s 240 fnt6 8539 10959(width)m 240 fnt1 3600 10669(for)m 3983(the)s 4377(amount)s 5201(of)s 5518(outdenting.)s 6751(Note)s 7318(that)s 7782(this)s 8224(does)s 8760(not)s 3600 10381(itself)m 4161(cause)s 4761(a)s 4940(switch)s 5634(to)s 5886(outdenting)s 6976(style.)s 7604(The)s 8045(width)s 8660(may)s 3600 10093(be)m 3887(preceded)s 4813(by)s 220 fnt2 5112 10090(+)m 240 fnt1 5298 10093(or)m 220 fnt2 5562 10090(\211)m 240 fnt1 5749 10093(to)m 5993(indicate)s 6811(a)s 6982(change)s 7721(to)s 7965(the)s 8319(e)s 3(xisting)k 3600 9805(outdent)m 4378(v)s 6(alue.)k [ /Dest /LOUT16_1731_pre_brea_18 /DEST pdfmark 0 9351(Mar)m 4(gin)k 764(k)s 2(erning,)k 1608(in)s 1858(which)s 2508(small)s 3087(\(usually)s 3919(punctuation\))s 5185(characters)s 6210(protrude)s 7084(into)s 7516(the)s 7872(mar)s 4(gin,)k 8660(may)s 0 9063(be)m 282(obtained)s 1164(by)s 220 fnt2 1458 9060(margink)m 4(er)k -5(ning @Break)k 240 fnt1 3765 9063(and)m 4169(turned)s 4838(of)s 6(f)k 5182(by)s 220 fnt2 5476 9060(nomargink)m 4(er)k -5(ning @Break)k 240 fnt1 7967 9063(.)m 480 8689(Se)m 6(v)k 3(eral)k 1310(options)s 2135(may)s 2669(be)s 3020(gi)s 6(v)k 3(en)k 3668(to)s 3976(the)s 220 fnt2 4392 8686(@Break)m 240 fnt1 5317 8689(symbol)m 6145(simultaneously)s 15(,)k 7754(in)s 8065(an)s 3(y)k 8531(order)s 13(.)k 0 8401(F)m 3(or)k 389(e)s 3(xample,)k 220 fnt2 480 7900({ adjust 1.2fx h)m 6(yphen } @Break ...)k 240 fnt1 0 7402(is)m 210(a)s 375(typical)s 1079(initial)s 1689(v)s 6(alue.)k 2365(There)s 2977(may)s 3442(be)s 3723(empty)s 4375(objects)s 5102(and)s 220 fnt2 5505 7399(@Null)m 240 fnt1 6149 7402(objects)m 6877(in)s 7119(the)s 7466(left)s 7842(parameter)s 8855(of)s 220 fnt2 0 7111(@Break)m 240 fnt1 796 7114(;)m 908(these)s 1455(are)s 1802(ignored.)s 240 fnt5 0 6321(3.5.)m 471(@Space)s [ /Dest /LOUTspace /DEST pdfmark 240 fnt1 480 5844(The)m 220 fnt2 911 5841(@Space)m 240 fnt1 1812 5844(symbol)m [ /Dest /LOUT19_4605_pre_spac_1 /DEST pdfmark 2576(changes)s 3402(the)s 3754(v)s 6(alue)k 4326(of)s 4601(the)s 220 fnt2 4953 5841(s)m 240 fnt1 5120 5844(unit)m 5556(of)s 5831(measurement)s 7169(\(Section)s [ /Dest /LOUT19_4605_pre_spac_2 /DEST pdfmark 8026(3.2\))s 8458(within)s 0 5556(its)m 276(right)s 787(parameter)s 1801(to)s 2040(the)s 2388(v)s 6(alue)k 2956(gi)s 6(v)k 3(en)k 3536(by)s 3830(the)s 4178(left)s 4555(parameter:)s 220 fnt2 480 5055(1c @Space { a b c d })m 240 fnt1 0 4559(has)m 370(result)s 480 4106(a)m 1153(b)s 1833(c)s 2499(d)s 0 3653(As)m 311(for)s 643(the)s 220 fnt2 985 3650(@Break)m 240 fnt1 1835 3653(symbol,)m 2641(the)s 2982(left)s 3353(parameter)s 4361(of)s 220 fnt2 4626 3650(@Space)m 240 fnt1 5517 3653(may)m 5976(be)s 6252(gi)s 6(v)k 3(en)k 6826(relati)s 6(v)k 3(e)k 7582(to)s 7815(the)s 8156(enclosing)s 220 fnt2 0 3362(s)m 240 fnt1 163 3365(unit,)m 642(and)s 1046(it)s 1238(may)s 1704(include)s 2464(a)s 2630(g)s 1(ap)k 3028(mode.)s 3724(Note)s 4245(that)s 4663(the)s 220 fnt2 5011 3362(@F)m 6(ont)k 240 fnt1 5723 3365(symbol)m 6483(also)s 6921(sets)s 7330(the)s 220 fnt2 7678 3362(s)m 240 fnt1 7841 3365(unit.)m 480 2991(The)m 906(left)s 1280(parameter)s 2292(of)s 2560(the)s 220 fnt2 2906 2988(@Space)m 240 fnt1 3800 2991(symbol)m 4558(may)s 5021(also)s 5456(hold)s 5938(an)s 3(y)k 6332(one)s 6732(of)s 7000(the)s 7346(\207v)s 3(e)k 7755(special)s 8470(v)s 6(alues)k 220 fnt2 0 2700(lout)m 240 fnt1 349 2703(,)m 220 fnt2 461 2700(compress)m 240 fnt1 1406 2703(,)m 220 fnt2 1518 2700(separ)m 2(ate)k 240 fnt1 2362 2703(,)m 220 fnt2 2474 2700(troff)m 240 fnt1 2849 2703(,)m 2961(and)s 220 fnt2 3371 2700(te)m 6(x)k 240 fnt1 3656 2703(,)m 3768(which)s 4415(control)s 5152(the)s 5505(w)s 2(ay)k 5962(in)s 6210(which)s 6857(Lout)s 7374(treats)s 7946(white)s 8539(space)s 0 2415(separating)m 1047(tw)s 2(o)k 1470(objects.)s 2324(The)s 2764(names)s 220 fnt2 3439 2412(troff)m 240 fnt1 3887 2415(and)m 220 fnt2 4304 2412(te)m 6(x)k 240 fnt1 4661 2415(indicate)m 5486(that)s 5917(the)s 6278(beha)s 4(viour)k 7303(of)s 7587(these)s 8147(options)s 8916(is)s 0 2127(inspired)m 828(by)s 1122(these)s 1669(other)s 2220(document)s 3224(formatting)s 4285(systems.)s 480 1753(The)m 897(def)s 2(ault)k 1607(setting,)s 220 fnt2 2339 1750(lout)m 240 fnt1 2688 1753(,)m 2784(produces)s 3687(as)s 3926(man)s 3(y)k 4498(spaces)s 5161(in)s 5393(the)s 5729(output)s 6390(as)s 6629(there)s 7150(are)s 7486(in)s 7717(the)s 8054(input.)s 8698(The)s 220 fnt2 0 1462(compress)m 240 fnt1 1017 1465(setting)m 1719(causes)s 2407(all)s 2712(sequences)s 3746(of)s 4029(tw)s 2(o)k 4452(or)s 4723(more)s 5283(white)s 5882(space)s 6482(characters)s 7512(to)s 7764(be)s 8058(treated)s 8778(the)s 0 1177(same)m 556(as)s 815(one)s 1227(white)s 1823(space)s 2419(character)s 13(.)k 3454(The)s 220 fnt2 3891 1174(separ)m 2(ate)k 240 fnt1 4804 1177(setting)m 5504(is)s 5723(lik)s 2(e)k 220 fnt2 6144 1174(compress)m 240 fnt1 7159 1177(b)m 4(ut)k 7530(also)s 7977(causes)s 8662(zero)s 0 889(white)m 587(spaces)s 1263(between)s 2118(tw)s 2(o)k 2529(objects)s 3258(\(b)s 4(ut)k 3700(not)s 4067(within)s 4736(one)s 5138(w)s 2(ord\))k 5757(to)s 5997(be)s 6280(treated)s 6988(the)s 7337(same)s 7885(as)s 8136(one)s 8539(white)s 0 601(space)m 587(character)s 13(.)k 480 227(The)m 220 fnt2 902 224(troff)m 240 fnt1 1330 227(setting)m 2013(is)s 2216(the)s 2557(same)s 3097(as)s 220 fnt2 3340 224(lout)m 240 fnt1 3742 227(e)m 3(xcept)k 4416(that)s 4828(where)s 6(v)k 3(er)k 5761(a)s 5920(sentence)s 6792(ends)s 7275(at)s 7500(the)s 7841(end)s 8238(of)s 8502(a)s 8661(line,)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 47 53 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1578(3.5.)m 1871(@Space)s 240 fnt5 10248 -1581(47)m gsave 1417 -15423 translate 240 fnt1 9066 13370 0 13261 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13207(one)m 415(e)s 3(xtra)k 962(space)s 1562(is)s 1785(added.)s 2535(F)s 3(ormally)k 15(,)k 3513(when)s 4102(tw)s 2(o)k 4525(objects)s 5266(are)s 5627(separated)s 6600(by)s 6907(white)s 7507(space)s 8108(characters)s 0 12919(which)m 660(include)s 1439(at)s 1689(least)s 2205(one)s 2625(ne)s 6(wline)k 3451(character)s 9(,)k 4442(and)s 4864(the)s 5231(\207rst)s 5680(object)s 6343(is)s 6572(a)s 6756(w)s 2(ord)k 7323(ending)s 8046(in)s 8308(an)s 3(y)k 8724(one)s 0 12631(of)m 288(a)s 471(certain)s 1194(set)s 1536(of)s 1824(sequences)s 2862(of)s 3150(characters,)s 4241(the)s 4606(e)s 3(xtra)k 5157(space)s 5761(is)s 5988(added.)s 6741(The)s 7186(set)s 7528(of)s 7816(sequences)s 8855(of)s 0 12343(characters)m 1025(depends)s 1868(on)s 2173(the)s 2528(current)s 3272(language)s 4199(and)s 4610(is)s 4828(de\207ned)s 5598(in)s 5849(the)s 220 fnt2 6204 12340(langdef)m 240 fnt1 6987 12343(for)m 7333(that)s 7758(language)s 8686(\(see)s 0 12055(Section)m 774(3.12\).)s 480 11681(The)m 220 fnt2 930 11678(te)m 6(x)k 240 fnt1 1297 11681(option)m 1989(is)s 2221(the)s 2592(most)s 3139(complicated.)s 4494(First,)s 5060(the)s 220 fnt2 5430 11678(compress)m 240 fnt1 6458 11681(option)m 7149(is)s 7382(applied.)s 8272(Then,)s 8894(at)s 0 11393(e)m 6(v)k 3(ery)k 576(sentence)s 1455(ending,)s 2213(whether)s 3043(or)s 3302(not)s 3667(at)s 3899(the)s 4246(end)s 4650(of)s 4921(a)s 5086(line,)s 5551(one)s 5952(e)s 3(xtra)k 6486(space)s 7073(is)s 7282(added.)s 8018(A)s 8247(sentence)s 0 11105(ending)m 709(is)s 923(de\207ned)s 1690(as)s 1944(for)s 220 fnt2 2286 11102(troff)m 240 fnt1 2726 11105(e)m 3(xcept)k 3411(that,)s 3880(in)s 4127(addition)s 4972(to)s 5215(the)s 5568(preceding)s 6568(w)s 2(ord)k 7120(ha)s 4(ving)k 7825(to)s 8068(end)s 8476(in)s 8724(one)s 0 10817(of)m 268(a)s 431(certain)s 1134(set)s 1456(of)s 1724(sequences)s 2742(of)s 3010(characters,)s 4081(the)s 4426(character)s 5357(preceding)s 6350(that)s 6765(sequence)s 7695(must)s 8217(e)s 3(xist)k 8722(and)s 0 10529(must)m 525(be)s 807(a)s 973(lo)s 6(wer)k 4(-case)k 2053(letter)s 13(.)k 2693(A)s 2924(character)s 3858(is)s 4068(a)s 4234(lo)s 6(wer)k 4(-case)k 5314(letter)s 5864(if,)s 6116(in)s 6359(the)s 6707(Lout)s 7219(Character)s 8208(Mapping)s 0 10241(\207le)m 393(\(Section)s 1278(3.3\))s 1738(associated)s 2810(with)s 3325(the)s 3705(current)s 4473(font,)s 4997(an)s 5313(upper)s 4(-case)k 6432(equi)s 6(v)k 6(alent)k 7508(of)s 7811(the)s 8192(character)s 0 9953(is)m 210(de\207ned.)s 240 fnt5 0 9210(3.6.)m 471(@YUnit,)s 1432(@ZUnit,)s 2380(@CurrYUnit,)s 3859(and)s 4300(@CurrZUnit)s [ /Dest /LOUTyunit /DEST pdfmark 240 fnt1 480 8739(The)m 220 fnt2 917 8736(@YUnit)m 240 fnt1 1741 8739(symbol)m [ /Dest /LOUT19_4605_pre_yuni_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_yuni_2 /DEST pdfmark 2510(changes)s 3342(the)s 3699(v)s 6(alue)k 4277(of)s 4557(the)s 220 fnt2 4915 8736(y)m 240 fnt1 5092 8739(unit)m 5534(of)s 5814(measurement)s 7158(\(Section)s 8020(3.2\))s 8458(within)s 0 8451(its)m 276(right)s 787(parameter)s 1801(to)s 2040(the)s 2388(v)s 6(alue)k 2956(gi)s 6(v)k 3(en)k 3536(by)s 3830(the)s 4178(left)s 4555(parameter:)s 220 fnt2 480 7950(1c @YUnit { ...)m 13( })k 240 fnt1 0 7456(ensures)m 760(that)s 1170(the)s 1510(v)s 6(alue)k 2070(of)s 220 fnt2 2333 7453(1y)m 240 fnt1 2615 7456(within)m 3275(the)s 3615(right)s 4118(parameter)s 5124(will)s 5542(be)s 220 fnt2 5816 7453(1c)m 240 fnt1 6043 7456(.)m 6199(The)s 220 fnt2 6619 7453(@ZUnit)m 240 fnt1 7413 7456(symbol)m 8165(is)s 8366(similar)s 9(,)k 0 7168(setting)m 688(the)s 1034(v)s 6(alue)k 1600(of)s 1869(the)s 220 fnt2 2215 7165(z)m 240 fnt1 2376 7168(unit)m 2806(in)s 3047(its)s 3321(right)s 3830(parameter)s 13(.)k 4933(Both)s 5453(units)s 5967(ha)s 4(v)k 3(e)k 6466(def)s 2(ault)k 7185(v)s 6(alue)k 7751(zero.)s 8324(The)s 8749(left)s 0 6880(parameter)m 1011(may)s 1473(not)s 1836(include)s 2592(a)s 2755(g)s 1(ap)k 3149(mode,)s 3784(nor)s 4160(may)s 4622(it)s 4811(use)s 5182(the)s 220 fnt2 5526 6877(w)m 240 fnt1 5682 6880(,)m 220 fnt2 5786 6877(b)m 240 fnt1 5900 6880(,)m 220 fnt2 6003 6877(r)m 240 fnt1 6076 6880(,)m 6180(or)s 6435(of)s 6702(course)s 220 fnt2 7379 6877(d)m 240 fnt1 7545 6880(units,)m 8114(b)s 4(ut)k 8472(it)s 8660(may)s 0 6592(be)m 3(gin)k 577(with)s 220 fnt2 1050 6589(+)m 240 fnt1 1220 6592(or)m 220 fnt2 1470 6589(-)m 240 fnt1 1584 6592(to)m 1814(indicate)s 2616(that)s 3025(v)s 6(alue)k 3583(is)s 3784(to)s 4014(be)s 4286(added)s 4907(to)s 5136(or)s 5386(subtracted)s 6416(from)s 6931(the)s 7269(current)s 7996(v)s 6(alue.)k 8662(An)s 3(y)k 0 6304(ne)m 3(g)k 1(ati)k 6(v)k 3(e)k 853(result)s 1443(of)s 1714(using)s 220 fnt2 2286 6301(-)m 240 fnt1 2410 6304(will)m 2836(be)s 3118(silently)s 3875(replaced)s 4742(by)s 5036(zero.)s 480 5930(The)m 220 fnt2 913 5927(@CurrYUnit)m 240 fnt1 2159 5930(and)m 220 fnt2 2569 5927(@CurrZUnit)m 240 fnt1 3803 5930(symbols)m 4658(report)s 5294(the)s 5648(v)s 6(alue)k 6222(of)s 6499(the)s 220 fnt2 6853 5927(y)m 240 fnt1 7027 5930(and)m 220 fnt2 7437 5927(z)m 240 fnt1 7607 5930(units,)m 8185(in)s 8434(points,)s 0 5642(truncated)m 947(to)s 1186(the)s 1534(nearest)s 2270(inte)s 3(ger)k 13(.)k 3081(F)s 3(or)k 3470(e)s 3(xample,)k 220 fnt2 480 5141(1i @YUnit { )m 11(The current v)k 5(alue of the y unit is @CurrYUnit })k 240 fnt1 0 4643(produces)m 480 4140(The)m 908(current)s 1644(v)s 6(alue)k 2212(of)s 2483(the)s 2831(y)s 3005(unit)s 3437(is)s 3647(72p)s 0 3637(since)m 547(there)s 1080(are)s 1427(72)s 1721(points)s 2357(in)s 2600(one)s 3002(inch)s 3471(\(at)s 3782(least,)s 4326(Lout)s 4838(thinks)s 5474(there)s 6007(are\).)s 480 3263(These)m 1123(units)s 1655(are)s 2018(not)s 2401(used)s 2914(internally)s 3899(by)s 4209(Lout.)s 4842(The)s 3(y)k 5401(are)s 5764(supplied)s 6649(as)s 6916(part)s 7363(of)s 7650(the)s 8014(style)s 8538(infor)s 4(-)k 0 2975(mation)m 731(for)s 1080(the)s 1439(con)s 9(v)k 3(enience)k 2690(of)s 2972(application)s 4102(packages.)s 5154(F)s 3(or)k 5554(e)s 3(xample,)k 6479(the)s 6838(Eq)s 7173(equation)s 8065(formatting)s 0 2687(package)m 840(uses)s 1303(them)s 1841(to)s 2080(\207ne-)s 2507(tune)s 2975(the)s 3323(appearance)s 4454(of)s 4725(equations.)s 240 fnt5 0 1894(3.7.)m 471(@SetContext)s 1882(and)s 2323(@GetContext)s [ /Dest /LOUTcont /DEST pdfmark 240 fnt1 480 1462(As)m 833(earlier)s 1538(sections)s 2395(sho)s 6(wed,)k 3265(the)s 3649(style)s 4193(information)s 5414(contains)s 6299(man)s 3(y)k 6918(attrib)s 4(utes:)k 8005(the)s 8390(current)s 0 1174(font,)m 509(break)s 1119(style,)s 1695(colour)s 2384(and)s 2806(te)s 3(xture,)k 3591(and)s 4013(so)s 4297(on.)s 4718(It)s 4941(is)s 5169(also)s 5625(possible)s 153 fnt1 6405 1263(1)m 240 fnt1 6543 1174(to)m 6800(add)s 7222(arbitrary)s 8115(additional)s 0 886(information)m 1213(to)s 1480(the)s 1856(style,)s 2442(using)s 3042(the)s 220 fnt2 3418 883(@SetConte)m 6(xt)k 240 fnt1 4804 886(symbol,)m 5644(and)s 6076(retrie)s 6(v)k 3(e)k 6879(it)s 7099(using)s 220 fnt2 7699 883(@GetConte)m 6(xt)k 240 fnt1 9022 886(.)m 1134 0 0 0 240 288 60 0 267 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 122 fnt1 0 72(1)m 192 fnt1 58 2(From)m 520(V)s 21(ersion)k 1150(3.34)s 1529(of)s 1745(Basser)s 2302(Lout.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 48 54 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(48)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(F)m 3(or)k 389(e)s 3(xample,)k 220 fnt2 480 12704({dir)m -5(n @Y)k 4(ield up} @SetConte)k 6(xt {)k 480 12416(The current direction is {@GetConte)m 6(xt dir)k -5(n}.)k 480 12128(})m 240 fnt1 0 11634(produces)m 480 11131(The)m 908(current)s 1644(direction)s 2550(is)s 2760(up.)s 0 10626(The)m 435(object)s 1086(to)s 1333(the)s 1688(left)s 2072(of)s 220 fnt2 2351 10623(@SetConte)m 6(xt)k 240 fnt1 3716 10626(must)m 4249(be)s 4538(a)s 220 fnt2 4711 10623(@Y)m 4(ield)k 240 fnt1 5472 10626(symbol)m 6239(whose)s 6914(left)s 7299(parameter)s 9(,)k 8358(the)s 240 fnt6 8714 10628(k)m 2(e)k 7(y)k 240 fnt1 9019 10626(,)m 0 10338(e)m 6(v)k 6(aluates)k 948(to)s 1208(a)s 1394(simple)s 2108(w)s 2(ord,)k 2725(and)s 3150(whose)s 3838(right)s 4370(parameter)s 9(,)k 5442(the)s 240 fnt6 5811 10340(value)m 240 fnt1 6322 10338(,)m 6449(may)s 6936(be)s 7238(an)s 7542(arbitrary)s 8438(object.)s 0 10050(Since)m 220 fnt2 601 10047(@Y)m 4(ield)k 240 fnt1 1369 10050(has)m 1754(high)s 2251(precedence)s 3397(it)s 3604(will)s 4045(usually)s 4804(be)s 5101(necessary)s 6099(to)s 6352(enclose)s 7140(non-tri)s 6(vial)k 8212(v)s 6(alues)k 8883(in)s 0 9762(braces.)m 783(The)s 1220(ef)s 6(fect)k 1826(is)s 2045(to)s 2294(associate)s 3221(the)s 3579(v)s 6(alue)k 4156(with)s 4648(the)s 5005(k)s 2(e)k 3(y)k 5410(in)s 5662(a)s 5838(symbol)s 6607(table)s 7137(throughout)s 8257(the)s 8615(right)s 0 9474(parameter)m 1048(of)s 1353(the)s 220 fnt2 1735 9471(@SetConte)m 6(xt)k 240 fnt1 3128 9474(symbol,)m 3974(as)s 4258(part)s 4724(of)s 5029(the)s 5411(style)s 5952(information.)s 7279(The)s 7741(v)s 6(alue)k 8343(may)s 8844(be)s 0 9186(retrie)m 6(v)k 3(ed)k 897(an)s 3(ywhere)k 1880(in)s 2123(this)s 2519(re)s 3(gion)k 3184(by)s 3478(in)s 9(v)k 4(oking)k 220 fnt2 4370 9183(@GetConte)m 6(xt)k 240 fnt1 5753 9186(with)m 6235(the)s 6583(k)s 2(e)k 3(y)k 6978(as)s 7228(its)s 7504(right)s 8015(parameter)s 13(.)k 480 8812(The)m 901(v)s 6(alue)k 1461(is)s 1663(e)s 6(v)k 6(aluated)k 2617(using)s 3181(the)s 3521(style)s 4020(and)s 4416(en)s 9(vironment)k 5668(where)s 6300(it)s 6484(occurs,)s 7207(not)s 7565(where)s 8197(it)s 8381(is)s 8583(used.)s 0 8524(In)m 264(an)s 3(y)k 669(case)s 1145(in)s 1396(most)s 1930(applications)s 3144(the)s 3500(v)s 6(alue)k 4077(will)s 4511(be)s 4802(a)s 4976(simple)s 5677(w)s 2(ord,)k 6283(independent)s 7521(of)s 7801(an)s 3(y)k 8206(style)s 8722(and)s 0 8236(en)m 9(vironment,)k 1307(used)s 1804(to)s 2043(select)s 2646(a)s 2812(branch)s 3520(in)s 3763(a)s 3929(case)s 4396(e)s 3(xpression,)k 5523(lik)s 2(e)k 5935(this:)s 220 fnt2 480 7735({@GetConte)m 6(xt dir)k -5(n} @Case {)k 480 7447( up @Y)m 4(ield ...)k 480 7159( do)m 3(wn @Y)k 4(ield ...)k 480 6871(})m 0 6374(@GetConte)m 6(xt)k 240 fnt1 1383 6377(reports)m 2097(an)s 2380(error)s 2903(if)s 3120(there)s 3653(is)s 3863(no)s 4156(v)s 6(alue)k 4724(associated)s 5764(with)s 6246(its)s 6522(k)s 2(e)k 3(y)k 6917(in)s 7160(the)s 7508(current)s 8244(style.)s 240 fnt5 0 5584(3.8.)m 471(@SetColour)s 1788(and)s 2229(@SetColor)s [ /Dest /LOUTcolour /DEST pdfmark 240 fnt1 480 5152(The)m 220 fnt2 927 5149(@SetColour)m 240 fnt1 2204 5152(and)m 220 fnt2 2628 5149(@SetColor)m 240 fnt1 3783 5152(symbols,)m [ /Dest /LOUT19_4605_pre_colo_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_colo_2 /DEST pdfmark 4708(which)s 5370(ha)s 4(v)k 3(e)k 5891(identical)s 6788(ef)s 6(fect,)k 7451(return)s 8098(their)s 8615(right)s 0 4864(parameter)m 1047(in)s 1323(the)s 1704(colour)s 2408(speci\207ed)s 3349(by)s 3676(their)s 4206(left)s 4617(parameter)s 13(.)k 5755(The)s 6216(form)s 6773(of)s 7077(the)s 7458(left)s 7868(parameter)s 8916(is)s 0 4576(implementation-dependent;)m 2693(in)s 2954(Basser)s 3670(Lout)s 4200(it)s 4410(must)s 4954(be)s 5254(an)s 5555(object)s 6218(whose)s 6904(v)s 6(alue)k 7490(is)s 7719(a)s 7903(sequence)s 8855(of)s 0 4288(w)m 2(ords)k 634(comprising)s 1763(a)s 1929(PostScript)s 2971(command)s 3973(for)s 4311(setting)s 5001(colour)s 13(.)k 5763(F)s 3(or)k 6152(e)s 3(xample,)k 220 fnt2 480 3787({ 1.0 0.0 0.0 setrgbcolor } @SetColour { hello)m 8(, w)k 2(or)k -3(ld })k 240 fnt1 0 3288(produces)m 915(the)s 1263(red)s 1626(result)s 1.0 0.0 0.0 setrgbcolor 480 2785(hello,)m 1065(w)s 2(orld)k 0.0 0.0 0.0 LoutSetRGBColor 0 2301(Of)m 322(course,)s 1050(a)s 1213(colour)s 1881(output)s 2550(de)s 6(vice)k 3222(is)s 3429(needed)s 4162(to)s 4398(see)s 4756(the)s 5101(ef)s 6(fect;)k 5747(on)s 6041(a)s 6204(monochrome)s 7520(de)s 6(vice)k 8191(the)s 8536(result)s 0 2013(will)m 426(be)s 708(some)s 1269(shade)s 1870(of)s 2141(gre)s 3(y)k 15(.)k 480 1639(The)m 220 fnt2 901 1636(@SetColour)m 240 fnt1 2151 1639(command)m 3145(accepts)s 3892(the)s 4232(special)s 4943(v)s 6(alue)k 220 fnt2 5504 1636(nochange)m 240 fnt1 6512 1639(for)m 6843(the)s 7183(left)s 7553(parameter)s 13(.)k 8650(This)s 0 1351(v)m 6(alue)k 574(causes)s 1256(the)s 1611(right)s 2129(parameter)s 3150(to)s 3396(ha)s 4(v)k 3(e)k 3904(the)s 4258(colour)s 4936(it)s 5135(w)s 2(ould)k 5797(ha)s 4(v)k 3(e)k 6305(had)s 6716(without)s 7514(the)s 220 fnt2 7869 1348(@SetColour)m 240 fnt1 0 1063(command.)m 1108(An)s 1458(empty)s 2110(left)s 2487(parameter)s 3501(also)s 3939(has)s 4309(this)s 4705(ef)s 6(fect.)k 480 689(There)m 1132(is)s 1382(no)s 1715(def)s 2(ault)k 2476(colour)s 9(,)k 3225(so)s 3530(the)s 3918(user)s 4416(must)s 4981(ensure)s 5701(that)s 6159(the)s 6546(root)s 7031(g)s 1(alle)k 3(y)k 7705(or)s 8004(each)s 8539(of)s 8850(its)s 0 401(components)m 1208(is)s 1418(enclosed)s 2313(in)s 2556(a)s 220 fnt2 2722 398(@SetColour)m 240 fnt1 3979 401(symbol)m 4739(whose)s 5407(left)s 5784(parameter)s 6798(is)s 7008(not)s 220 fnt2 7374 398(nochange)m 240 fnt1 8330 401(.)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 49 55 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt8 vec2 /Times-Italic LoutRecode /fnt8 { /Times-Italicfnt8 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.8.)m 1871(@SetColour)s 3127(and)s 3553(@SetColor)s 240 fnt5 10249 -1583(49)m gsave 1417 -15423 translate 240 fnt1 9066 13412 0 13303 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13249(In)m 754(addition)s 1613(to)s 1870(setting)s 2579(the)s 2945(colour)s 3634(used)s 4150(in)s 4411(the)s 4777(follo)s 6(wing)k 5773(object,)s 6482(the)s 220 fnt2 6848 13246(@SetColour)m 240 fnt1 8124 13249(command)m 0 12961(also)m 438(sets)s 847(the)s 1195(underline)s 2154(colour)s 2825(in)s 3068(that)s 3485(object,)s 4176(lik)s 2(e)k 220 fnt2 4588 12958(@SetUnder)m -3(lineColour)k 240 fnt1 6785 12961(from)m 7309(Section)s 8083(3.9.)s 8486(While)s 0 12673(a)m 165(case)s 630(could)s 1218(be)s 1498(made)s 2071(for)s 2407(k)s 2(eeping)k 3214(these)s 3759(tw)s 2(o)k 4168(attrib)s 4(utes)k 5101(of)s 5370(style)s 5875(independent,)s 7151(most)s 7674(people)s 8366(w)s 2(ant)k 8887(to)s 0 12385(underline)m 966(in)s 1216(the)s 1571(same)s 2125(colour)s 2804(as)s 3061(the)s 3416(te)s 3(xt)k 3838(most)s 4371(of)s 4649(the)s 5004(time,)s 5542(and)s 5954(this)s 6357(beha)s 4(viour)k 7377(gi)s 6(v)k 3(es)k 7931(this)s 8335(without)s 0 12097(an)m 3(y)k 397(need)s 907(to)s 1146(use)s 220 fnt2 1521 12094(@SetUnder)m -3(lineColour)k 240 fnt1 3718 12097(e)m 3(xplicitly)k 15(.)k 480 11723(Lout)m 1046(mak)s 2(es)k 1761(no)s 2109(attempt)s 2939(to)s 3233(understand)s 4396(colour)s 9(,)k 5159(it)s 5406(simply)s 6166(prints)s 6815(the)s 7218(PostScript)s 8315(or)s 8629(PDF)s 0 11435(commands)m 1082(when)s 1652(appropriate.)s 2897(This)s 3367(has)s 3731(the)s 4072(adv)s 6(antage)k 5086(of)s 5350(permitting)s 6392(access)s 7047(to)s 7279(an)s 3(y)k 7670(of)s 7934(PostScript')s 13(s)k 0 11147(colour)m 703(models)s 1478(\(some)s 2150(require)s 2915(initialization)s 4210(which)s 4885(can)s 5306(be)s 5621(supplied)s 6522(using)s 220 fnt2 7127 11144(@PrependGr)m 2(aphic)k 240 fnt1 8940 11147(\),)m 0 10859(b)m 4(ut)k 373(the)s 733(disadv)s 6(antage)k 2044(of)s 2326(of)s 6(fering)k 3154(no)s 3459(w)s 2(ay)k 3922(to)s 4172(mak)s 2(e)k 4756(relati)s 6(v)k 3(e)k 5530(changes)s 6364(\(`as)s 6783(before)s 7461(only)s 7953(redder)s 9(,)k 16(')k 8722(and)s 0 10571(so)m 266(on\).)s 480 10197(F)m 3(or)k 870(those)s 1432(who)s 1899(wish)s 2409(to)s 2649(obtain)s 3305(colour)s 3977(without)s 4769(w)s 2(orking)k 5619(v)s 3(ery)k 6096(hard,)s 6629(the)s 220 fnt2 6978 10194(setrgbcolor)m 240 fnt1 8124 10197(command)m 0 9909(used)m 496(abo)s 3(v)k 3(e)k 1117(is)s 1325(a)s 4(v)k 6(ailable)k 2232(in)s 2474(e)s 6(v)k 3(ery)k 3048(v)s 3(ersion)k 3805(of)s 4075(PostScript,)s 5162(requires)s 5981(no)s 6273(initialization,)s 7584(and)s 7987(is)s 8196(simple)s 8887(to)s 0 9621(use.)m 485(The)s 915(three)s 1450(numbers,)s 2384(which)s 3028(range)s 3617(from)s 4143(0.0)s 4501(to)s 4742(1.0,)s 5151(determine)s 6164(the)s 6515(intensity)s 7394(of)s 7667(red,)s 8081(green,)s 8722(and)s 0 9333(blue)m 468(respecti)s 6(v)k 3(ely)k 15(.)k 1762(Some)s 2363(useful)s 3002(v)s 6(alues)k 3658(for)s 3996(the)s 4344(left)s 4721(parameter)s 5735(are)s 220 fnt2 480 8768(1.0)m 838(0.0)s 1196(0.0)s 1554(setrgbcolor)s 240 fnt6 2979 8773(r)m 8(ed)k 220 fnt2 480 8449(0.0)m 838(1.0)s 1196(0.0)s 1554(setrgbcolor)s 240 fnt6 2979 8454(gr)m 8(een)k 220 fnt2 480 8119(0.0)m 838(0.0)s 1196(1.0)s 1554(setrgbcolor)s 240 fnt6 2979 8124(blue)m 220 fnt2 480 7789(1.0)m 838(1.0)s 1196(1.0)s 1554(setrgbcolor)s 240 fnt6 2979 7794(white)m 220 fnt2 480 7470(0.5)m 837(0.5)s 1194(0.5)s 1551(setrgbcolor)s 240 fnt6 2979 7475(gr)m 8(e)k 7(y)k 220 fnt2 480 7140(0.0)m 838(0.0)s 1196(0.0)s 1554(setrgbcolor)s 240 fnt6 2979 7145(blac)m 4(k)k 240 fnt1 0 6584(Colouring)m 1042(an)s 1344(object)s 2007(white)s 2613(is)s 2841(useful)s 3499(for)s 3856(producing)s 4899(an)s 5200(empty)s 5871(space)s 6477(whose)s 7164(size)s 7609(is)s 7838(that)s 8275(of)s 8565(some)s 0 6296(object.)m 480 5922(Since)m 1076(the)s 1434(introduction)s 2670(of)s 2951(te)s 3(xtures)k 3765(to)s 4014(Lout)s 4536(in)s 4789(V)s 26(ersion)k 5587(3.27,)s 6124(direct)s 6737(use)s 7122(of)s 7403(PostScript)s 8455(colour)s 0 5634(setting)m 689(operations)s 1734(such)s 2228(as)s 220 fnt2 2476 5631(setrgbcolor)m 240 fnt1 3620 5634(is)m 3828(deprecated.)s 5025(Instead,)s 5820(Lout)s 6330(of)s 6(fers)k 6930(its)s 7204(o)s 6(wn)k 7666(v)s 3(ersions)k 8509(of)s 8778(the)s 0 5346(standard)m 868(PostScript)s 1910(colour)s 2581(setting)s 3271(operations:)s 2982 12 0 12 240 288 60 480 4610 LoutGr2 LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 240 fnt8 624 4762(If)m 864(you)s 1264(want)s 1794(this)s gsave 3462 4610 translate 240 fnt1 3616 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 3606(Y)s 22(ou)k 4011(should)s 4716(r)s 3(ather)k 5376(write)s 5920(this)s 220 fnt2 624 4373(n)m 2(um)k 1096(setg)s 2(r)k 2(a)k 6(y)k 3606(n)s 2(um)k 4078(LoutSetGr)s 2(a)k 6(y)k 624 3989(n)m 2(um)k 1096(n)s 2(um)k 1568(n)s 2(um)k 2040(setrgbcolor)s 3606(n)s 2(um)k 4078(n)s 2(um)k 4550(n)s 2(um)k 5022(LoutSetRGBColor)s 624 3605(n)m 2(um)k 1096(n)s 2(um)k 1568(n)s 2(um)k 2040(sethsbcolor)s 3606(n)s 2(um)k 4078(n)s 2(um)k 4550(n)s 2(um)k 5022(LoutSetHSBColor)s gsave 480 3074 translate 240 fnt1 2982 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 624 3221(n)m 2(um)k 1096(n)s 2(um)k 1568(n)s 2(um)k 2040(setcm)s 3(ykcolor)k gsave 3462 3074 translate 240 fnt1 3616 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 3606(n)s 2(um)k 4078(n)s 2(um)k 4550(n)s 2(um)k 5022(LoutSetCMYKColor)s 240 fnt1 0 2635(The)m 462(Lout)s 1008(v)s 3(ersions)k 1887(are)s 2268(equi)s 6(v)k 6(alent)k 3346(to)s 3619(the)s 4001(PostScript)s 5077(ones)s 5601(b)s 4(ut)k 5997(without)s 6822(the)s 7204(unw)s 2(anted)k 8225(ef)s 6(fect)k 8855(of)s 0 2347(causing)m 784(the)s 1132(current)s 1868(te)s 3(xture)k 2584(to)s 2823(be)s 3105(for)s 4(gotten.)k 240 fnt5 0 1554(3.9.)m 471(@SetUnderlineColour)s 2810(and)s 3251(@SetUnderlineColor)s [ /Dest /LOUTunderline_colour /DEST pdfmark 240 fnt1 480 1122(The)m 220 fnt2 905 1119(@SetUnder)m -3(lineColour)k 240 fnt1 3099 1122(and)m 220 fnt2 3500 1119(@SetUnder)m -3(lineColor)k 240 fnt1 5571 1122(symbols,)m [ /Dest /LOUT19_4605_pre_ucol_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_ucol_2 /DEST pdfmark 6473(which)s 7112(ha)s 4(v)k 3(e)k 7610(identical)s 8483(ef)s 6(fect,)k 0 834(ensure)m 698(that)s 1134(an)s 3(y)k 1549(underlining)s 2723(in)s 2984(the)s 3350(right)s 3879(parameter)s 4911(is)s 5139(done)s 5679(in)s 5940(the)s 6306(colour)s 6995(speci\207ed)s 7921(by)s 8233(their)s 8749(left)s 0 546(parameter)m 13(.)k 1105(The)s 1533(left)s 1910(parameter)s 2924(is)s 3134(a)s 3300(colour)s 3971(as)s 4221(for)s 220 fnt2 4559 543(@SetColour)m 240 fnt1 5816 546(in)m 6059(Section)s 6833(3.8.)s 480 172(T)m 19(o)k 780(actually)s 1590(get)s 1942(underlining,)s 3152(you)s 3567(ha)s 4(v)k 3(e)k 4068(to)s 4307(use)s 4682(the)s 220 fnt2 5030 169(@Under)m -3(line)k 240 fnt1 6245 172(symbol)m 7005(\(Section)s 7858(3.51\).)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 50 56 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(50)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 13205(Note)m 1002(that)s 1422(the)s 220 fnt2 1771 13202(@SetColour)m 240 fnt1 3030 13205(symbol)m 3791(from)s 4317(Section)s 5092(3.8)s 5441(includes)s 6290(the)s 6640(ef)s 6(fect)k 7237(of)s 220 fnt2 7510 13202(@SetUnder)m -3(line-)k 0 12914(Colour)m 240 fnt1 645 12917(,)m 747(so)s 1007(in)s 1244(the)s 1586(usual)s 2140(case)s 2601(where)s 3235(underlining)s 4385(is)s 4589(to)s 4822(be)s 5098(in)s 5335(the)s 5677(same)s 6218(colour)s 6883(as)s 7127(the)s 7469(te)s 3(xt)k 7878(being)s 8457(under)s 4(-)k 0 12629(lined,)m 585(there)s 1118(is)s 1328(no)s 1621(need)s 2131(to)s 2370(use)s 220 fnt2 2745 12626(@SetUnder)m -3(lineColour)k 240 fnt1 4882 12629(.)m 240 fnt5 0 11855(3.10.)m 591(@SetT)s 22(extur)k 4(e)k [ /Dest /LOUTtexture /DEST pdfmark 240 fnt1 480 11423(The)m 220 fnt2 943 11420(@SetT)m 26(e)k 6(xture)k 240 fnt1 2295 11423(symbol)m [ /Dest /LOUT19_4605_pre_text_1 /DEST pdfmark 3091(returns)s 3841(its)s 4152(right)s 4699(parameter)s 5749(in)s 6028(the)s 6411(te)s 3(xture)k 7163(speci\207ed)s 8107(by)s 8437(its)s 8749(left)s 0 11135(parameter)m 13(.)k 1105(A)s 1335(te)s 3(xture)k 2051(is)s 2261(a)s 2427(pattern)s 3147(used)s 3644(when)s 4220(\207lling)s 4844(areas)s 5385(to)s 5624(get)s 5976(a)s 6142(te)s 3(xture)k 6858(rather)s 7474(than)s 7943(solid)s 8466(color)s 13(.)k 480 10761(In)m 736(the)s 1084(PostScript)s 2125(w)s 2(orld,)k 2788(te)s 3(xtures)k 3592(are)s 3938(called)s 4566(patterns,)s 5429(and)s 5832(the)s 6180(rele)s 6(v)k 6(ant)k 6997(PostScript)s 8038(commands)s 0 10473(use)m 390(this)s 801(terminology)s 15(.)k 2135(The)s 2578(author)s 3264(has)s 3650(preferred)s 4597(the)s 4960(term)s 5473(`te)s 3(xture')k 6339(because)s 7167(it)s 7375(is)s 7600(more)s 8162(precise:)s 8960(a)s 0 10185(pattern)m 720(could)s 1310(be)s 1592(a)s 1758(pattern)s 2478(for)s 2816(an)s 3(ything.)k 480 9811(The)m 220 fnt2 896 9808(@SetT)m 26(e)k 6(xture)k 240 fnt1 2200 9811(command)m 3189(accepts)s 3931(the)s 4267(special)s 4972(v)s 6(alue)k 220 fnt2 5528 9808(nochange)m 240 fnt1 6532 9811(for)m 6857(the)s 7193(left)s 7558(parameter)s 13(.)k 8650(This)s 0 9523(v)m 6(alue)k 568(causes)s 1243(the)s 1591(right)s 2102(parameter)s 3116(to)s 3355(ha)s 4(v)k 3(e)k 3856(the)s 4204(te)s 3(xture)k 4920(it)s 5112(w)s 2(ould)k 5767(ha)s 4(v)k 3(e)k 6268(had)s 6672(without)s 7463(the)s 220 fnt2 7810 9520(@SetT)m 26(e)k 6(xture)k 240 fnt1 0 9235(command.)m 1108(An)s 1458(empty)s 2110(left)s 2487(parameter)s 3501(also)s 3939(has)s 4309(this)s 4705(ef)s 6(fect.)k 480 8861(Another)m 1329(special)s 2052(v)s 6(alue)k 2625(is)s 220 fnt2 2840 8858(LoutT)m 26(e)k 6(xtureSolid)k 240 fnt1 4453 8861(,)m 4565(which)s 5212(means)s 5879(no)s 6177(te)s 3(xture)k 6898(at)s 7135(all,)s 7485(just)s 7895(solid)s 8424(colour)s 13(.)k 0 8573(It)m 207(w)s 2(ould)k 864(be)s 1149(useful)s 1790(to)s 2032(change)s 2768(back)s 3284(to)s 3525(solid)s 4051(colour)s 4724(within)s 5395(an)s 5680(enclosing)s 6653(te)s 3(xtured)k 7493(re)s 3(gion.)k 8268(It)s 8475(is)s 8688(also)s 0 8285(the)m 355(initial)s 973(te)s 3(xture;)k 1752(thus)s 2209(there)s 2749(is)s 2966(no)s 3266(need)s 3783(to)s 4029(ensure)s 4716(that)s 5141(the)s 5496(root)s 5948(g)s 1(alle)k 3(y)k 6589(or)s 6855(each)s 7357(of)s 7635(its)s 7918(components)s 0 7997(is)m 210(enclosed)s 1105(in)s 1348(a)s 220 fnt2 1514 7994(@SetT)m 26(e)k 6(xture)k 240 fnt1 2830 7997(symbol.)m 480 7623(The)m 934(form)s 1485(of)s 1783(the)s 2158(left)s 2561(parameter)s 3602(is)s 3839(implementation-dependent;)s 6541(in)s 6810(Basser)s 7534(Lout)s 8073(it)s 8292(must)s 8844(be)s 0 7335(an)m 288(object)s 937(whose)s 1610(v)s 6(alue)k 2184(is)s 2399(a)s 2570(sequence)s 3509(of)s 3785(w)s 2(ords)k 4424(comprising)s 5559(PostScript)s 6606(for)s 6949(setting)s 7645(a)s 7816(te)s 3(xture,)k 8588(up)s 8887(to)s 0 7047(and)m 407(including)s 1367(the)s 1718(PostScript)s 220 fnt2 2763 7044(setpatter)m -5(n)k 240 fnt1 3793 7047(command)m 4799(\(or)s 5140(equi)s 6(v)k 6(alent\))k 6255(which)s 6900(installs)s 7630(the)s 7981(te)s 3(xture)k 8701(into)s 0 6759(the)m 347(graphics)s 1207(state.)s 1807(Lout)s 2318(mak)s 2(es)k 2977(no)s 3269(attempt)s 4044(to)s 4282(understand)s 5389(te)s 3(xtures,)k 6248(it)s 6439(simply)s 7143(prints)s 7737(the)s 8084(PostScript)s 0 6471(commands)m 1083(when)s 1654(appropriate.)s 2901(Consult)s 3701([)s [ /Rect [3772 6471 3867 6633] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTadobe1990ps /ANN pdfmark 3772(1)s 3867(])s 3980(for)s 4312(information)s 5492(about)s 6079(PostScript)s 7116(patterns.)s 7971(Y)s 26(ou')k 2(ll)k 8616(need)s 0 6183(to)m 239(do)s 532(that)s 950(in)s 1193(order)s 1757(to)s 1996(mak)s 2(e)k 2568(sense)s 3142(of)s 3413(the)s 3761(rest)s 4165(of)s 4436(this)s 4832(section.)s 480 5809(Since)m 1065(b)s 4(uilding)k 1909(e)s 6(v)k 3(en)k 2406(a)s 2569(simple)s 3259(te)s 3(xture)k 3972(tak)s 2(es)k 4509(a)s 4672(lot)s 4981(of)s 5249(PostScript)s 6288(and)s 6689(is)s 6896(quite)s 7427(error)s 4(-prone,)k 8614(Lout)s 0 5521(de\207nes)m 721(tw)s 2(o)k 1122(symbols)s 1962(in)s 2197(the)s 2536(PostScript)s 3569(prologue)s 4467(called)s 220 fnt2 5087 5518(LoutMak)m 4(eT)k 26(e)k 6(xture)k 240 fnt1 6802 5521(and)m 220 fnt2 7197 5518(LoutSetT)m 26(e)k 6(xture)k 240 fnt1 8708 5521(that)m 0 5233(you)m 415(can)s 804(use)s 1179(to)s 1418(mak)s 2(e)k 1990(and)s 2394(set)s 2719(a)s 2885(te)s 3(xture,)k 3652(lik)s 2(e)k 4064(this:)s 220 fnt2 480 4735({ "1 1 1 0 dg 0 pt 0 pt")m 480 4447( "2 [0 0 2 pt 3 pt] 2 pt 3 pt { ...)m 13( }")k 480 4159( "LoutMak)m 4(eT)k 26(e)k 6(xture LoutSetT)k 26(e)k 6(xture")k 480 3871(} @SetT)m 26(e)k 6(xture ...)k 240 fnt1 0 3377(W)m 19(e')k 2(ll)k 598(e)s 3(xplain)k 1377(both)s 1881(symbols)s 2752(in)s 3016(detail)s 3622(in)s 3887(a)s 4074(moment,)s 4986(b)s 4(ut)k 5369(just)s 5796(brie\210y)s 15(,)k 220 fnt2 6533 3374(LoutMak)m 4(eT)k 26(e)k 6(xture)k 240 fnt1 8278 3377(mak)m 2(es)k 8960(a)s 0 3089(te)m 3(xture,)k 798(lea)s 4(ving)k 1582(a)s 1779(pattern)s 2530(dictionary)s 3584(as)s 3865(returned)s 4750(by)s 220 fnt2 5075 3086(mak)m 4(epatter)k -5(n)k 240 fnt1 6373 3089(on)m 6701(the)s 7080(e)s 3(x)k 3(ecution)k 8092(stack,)s 8722(and)s 220 fnt2 0 2798(LoutSetT)m 26(e)k 6(xture)k 240 fnt1 1510 2801(installs)m 2227(this)s 2612(te)s 3(xture)k 3318(into)s 3732(the)s 4070(current)s 4795(graphics)s 5646(state,)s 6179(lik)s 2(e)k 220 fnt2 6581 2798(setpatter)m -5(n)k 240 fnt1 7597 2801(b)m 4(ut)k 7949(without)s 8729(an)s 3(y)k 0 2513(mention)m 841(of)s 1112(colour)s 13(.)k 220 fnt2 480 2136(LoutMak)m 4(eT)k 26(e)k 6(xture)k 240 fnt1 2251 2139(is)m 2508(just)s 2961(a)s 3174(con)s 9(v)k 3(enience)k 4461(de\207nition)s 5483(that)s 5948(constructs)s 7015(a)s 7229(pattern)s 7996(matrix)s 8722(and)s 0 1851(dictionary)m 15(,)k 1054(populating)s 2124(them)s 2655(with)s 3129(the)s 3470(stack)s 4015(elements)s 4907(to)s 5139(its)s 5408(left,)s 5825(then)s 6286(calls)s 220 fnt2 6767 1848(mak)m 4(epatter)k -5(n)k 240 fnt1 7974 1851(.)m 8131(Y)s 26(ou)k 8565(don')s 4(t)k 0 1563(ha)m 4(v)k 3(e)k 524(to)s 786(use)s 1184(it)s 1399(if)s 1639(you)s 2077(don')s 4(t)k 2661(w)s 2(ant)k 3207(to.)s 3580(The)s 4031(abo)s 3(v)k 3(e)k 4676(e)s 3(xample)k 5562(of)s 220 fnt2 5856 1560(LoutMak)m 4(eT)k 26(e)k 6(xture)k 240 fnt1 7603 1563(sets)m 8035(the)s 8406(pattern)s 0 1275(matrix)m 678(and)s 1082(dictionary)s 2105(as)s 2355(follo)s 6(ws.)k 480 901(The)m 907(\207rst)s 1336(number)s 2125(is)s 2333(a)s 2498(scale)s 3029(f)s 2(actor)k 9(,)k 3679(and)s 4081(the)s 4428(second)s 5149(and)s 5551(third)s 6058(are)s 6404(horizontal)s 7426(and)s 7828(v)s 3(ertical)k 8593(scale)s 0 613(f)m 2(actors.)k 813(The)s 1243(fourth)s 1886(\()s 220 fnt2 1959 610(0 dg)m 240 fnt1 2374 613(\))m 2504(is)s 2716(an)s 3001(angle)s 3577(of)s 3851(rotation.)s 4760(The)s 5190(\207fth)s 5647(and)s 6053(sixth)s 6577(are)s 6926(horizontal)s 7952(and)s 8359(v)s 3(ertical)k 0 325(shifts.)m 681(These)s 1308(six)s 1642(numbers)s 2517(determine)s 3528(the)s 3876(pattern)s 4596(transformation)s 6059(matrix)s 6737(passed)s 7433(to)s 220 fnt2 7672 322(mak)m 4(epatter)k -5(n)k 240 fnt1 8879 325(.)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 51 57 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1578(3.10.)m 1991(@SetT)s 22(e)k 4(xtur)k 8(e)k 240 fnt5 10256 -1581(51)m gsave 1417 -15423 translate 240 fnt1 9066 13415 0 13306 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13252(The)m 907(remaining)s 1928(elements)s 2826(go)s 3118(into)s 3541(the)s 3888(pattern)s 4606(dictionary)s 15(.)k 220 fnt2 5723 13249(P)m 8(aintT)k 26(ype)k 240 fnt1 6726 13252(is)m 6935(set)s 7258(to)s 7496(the)s 7842(\207rst)s 8272(of)s 8541(them,)s 0 12964(or)m 250(the)s 589(se)s 6(v)k 3(enth)k 1359(item)s 1834(o)s 3(v)k 3(erall)k 2537(\(2)s 2781(in)s 3015(our)s 3384(e)s 3(xample,)k 4289(denoting)s 5171(an)s 5445(uncoloured)s 6571(pattern,)s 7332(which)s 7965(will)s 8381(usually)s 0 12676(be)m 298(the)s 663(best)s 1125(choice;)s 1877(the)s 2242(pattern)s 2979(will)s 3421(be)s 3720(painted)s 4499(in)s 4758(the)s 5123(current)s 5876(colour\),)s 220 fnt2 6689 12673(BBo)m 6(x)k 240 fnt1 7282 12676(is)m 7509(set)s 7850(to)s 8106(the)s 8471(eighth)s 0 12388(item,)m 538(here)s 220 fnt2 1012 12385([0 0 2 pt 3 pt])m 240 fnt1 2280 12388(,)m 220 fnt2 2394 12385(XStep)m 240 fnt1 3050 12388(is)m 3267(set)s 3600(to)s 3846(the)s 4201(ninth)s 4757(item,)s 5295(here)s 220 fnt2 5769 12385(2 pt)m 240 fnt1 6131 12388(,)m 220 fnt2 6246 12385(YStep)m 240 fnt1 6902 12388(is)m 7119(set)s 7451(to)s 7697(the)s 8052(tenth)s 8595(item,)s 0 12100(here)m 220 fnt2 465 12097(3 pt)m 240 fnt1 827 12100(,)m 932(and)s 220 fnt2 1334 12097(P)m 8(aintProc)k 240 fnt1 2329 12100(is)m 2537(set)s 2859(to)s 3096(the)s 3442(ele)s 6(v)k 3(enth)k 4298(and)s 4700(last)s 5089(item,)s 5617(which)s 6257(should)s 6952(be)s 7232(an)s 7513(e)s 3(x)k 3(ecutable)k 8582(array)s 0 11812(as)m 257(sho)s 6(wn.)k 1049(All)s 1417(non-zero)s 2328(lengths)s 3077(must)s 3610(be)s 3900(in)s 4151(absolute)s 5012(units,)s 5591(that)s 6017(is,)s 6291(follo)s 6(wed)k 7201(by)s 220 fnt2 7502 11809(in)m 240 fnt1 7658 11812(,)m 220 fnt2 7773 11809(cm)m 240 fnt1 8052 11812(,)m 220 fnt2 8167 11809(pt)m 240 fnt1 8346 11812(,)m 8461(or)s 220 fnt2 8728 11809(em)m 240 fnt1 9019 11812(,)m 0 11524(otherwise)m 985(the)s 1333(results)s 2007(will)s 2433(be)s 2715(unpredictable.)s 220 fnt2 480 11147(LoutSetT)m 26(e)k 6(xture)k 240 fnt1 2039 11150(installs)m 2805(the)s 3192(gi)s 6(v)k 3(en)k 3811(te)s 3(xture)k 4566(into)s 5031(the)s 5418(graphics)s 6318(state,)s 6901(preserving)s 8002(the)s 8390(current)s 0 10862(colour)m 13(.)k 819(Y)s 26(ou)k 1318(must)s 1900(use)s 220 fnt2 2332 10859(LoutSetT)m 26(e)k 6(xture)k 240 fnt1 3909 10862(and)m 4370(you)s 4842(must)s 5424(not)s 5847(use)s 220 fnt2 6279 10859(setcolorspace)m 240 fnt1 7625 10862(,)m 220 fnt2 7789 10859(setcolor)m 240 fnt1 8557 10862(,)m 8722(and)s 220 fnt2 0 10571(setpatter)m -5(n)k 240 fnt1 967 10574(,)m 1069(because)s 1877(Lout)s 2383(considers)s 3332(colour)s 3998(and)s 4396(te)s 3(xture)k 5107(to)s 5341(be)s 5617(independent)s 6842(of)s 7108(each)s 7597(other)s 9(,)k 8181(and)s 8579(these)s 0 10286(PostScript)m 1042(commands)s 2130(don')s 4(t.)k 480 9912(Another)m 1316(adv)s 6(antage)k 2328(of)s 220 fnt2 2591 9909(LoutMak)m 4(eT)k 26(e)k 6(xture)k 240 fnt1 4307 9912(and)m 220 fnt2 4703 9909(LoutSetT)m 26(e)k 6(xture)k 240 fnt1 6214 9912(is)m 6416(that)s 6826(the)s 3(y)k 7281(beha)s 4(v)k 3(e)k 8000(sensibly)s 8829(on)s 0 9624(Le)m 6(v)k 3(el)k 589(1)s 743(PostScript)s 1784(interpreters,)s 2976(which)s 3616(do)s 3908(not)s 4273(ha)s 4(v)k 3(e)k 4773(patterns.)s 5691(Rather)s 6387(than)s 6855(f)s 2(ailing)k 7528(altogether)s 9(,)k 8579(these)s 0 9336(commands)m 1080(will)s 1497(mak)s 2(e)k 2061(sure)s 2506(e)s 6(v)k 3(erything)k 3564(appears)s 4337(in)s 4571(solid)s 5086(colour)s 13(.)k 5839(Be)s 6152(a)s 3(w)k 2(are,)k 6816(though,)s 7580(that)s 7989(interpreters)s 0 9048(e)m 3(xist)k 508(\(e.g)s 220 fnt2 926 9045(gv)m 240 fnt1 1217 9048(ca.)m 1533(1997\))s 2141(which)s 2783(appear)s 3480(to)s 3719(be)s 4001(Le)s 6(v)k 3(el)k 4591(2)s 4765(b)s 4(ut)k 5127(actually)s 5937(lea)s 4(v)k 3(e)k 6490(te)s 3(xtured)k 7328(areas)s 7869(blank.)s 480 8674(F)m 3(or)k 869(information)s 2054(on)s 2351(ho)s 6(w)k 2812(these)s 3359(symbols)s 4208(are)s 4555(implemented,)s 5910(consult)s 6661(Appendix)s 7661(A.)s 240 fnt5 0 7881(3.11.)m 591(@Outline)s [ /Dest /LOUToutline /DEST pdfmark 240 fnt1 480 7449(The)m 220 fnt2 895 7446(@Outline)m 240 fnt1 1850 7449(symbol)m [ /Dest /LOUT19_4605_pre_outl_1 /DEST pdfmark 2597(causes)s 3258(all)s 3537(the)s 3872(w)s 2(ords)k 4492(in)s 4722(the)s 5056(right)s 5553(parameter)s 6554(\(which)s 7261(may)s 7714(be)s 7982(an)s 8251(arbitrary)s 0 7161(object\))m 712(to)s 951(be)s 1233(printed)s 1968(in)s 2211(outline,)s 2982(rather)s 3598(than)s 4067(\207lled)s 4616(as)s 4866(is)s 5076(usual.)s 5745(F)s 3(or)k 6134(e)s 3(xample,)k 220 fnt2 480 6660(@Outline @Bo)m 6(x 24p @F)k 6(ont HELP)k 240 fnt1 0 6164(produces)m 1336 461 72 180 240 288 60 480 5363 LoutGr2 LoutBox stroke grestore 480 fnt1 72 72(HELP)mo grestore 0 4912(Outlining)m 984(is)s 1209(part)s 1654(of)s 1940(the)s 2303(style)s 2824(information,)s 4074(in)s 4332(the)s 4694(same)s 5256(w)s 2(ay)k 5721(as)s 5986(colour)s 9(,)k 6710(font,)s 7216(underlining,)s 8441(and)s 8860(so)s 0 4624(forth.)m 630(Outlining)s 1602(can)s 1994(be)s 2278(applied)s 3042(to)s 3284(an)s 3(y)k 3683(font)s 4131(lik)s 2(ely)k 4729(to)s 4970(be)s 5255(used)s 5754(in)s 6000(practice.)s 6921(At)s 7222(the)s 7573(time)s 8055(of)s 8329(writing,)s 0 4336(there)m 528(is)s 732(no)s 1020(w)s 2(ay)k 1465(to)s 1699(control)s 2425(the)s 2768(thickness)s 3703(of)s 3969(the)s 4311(outline,)s 5077(and)s 220 fnt2 5475 4333(@Outline)m 240 fnt1 6439 4336(has)m 6803(no)s 7091(ef)s 6(fect)k 7681(in)s 7919(PDF)s 8410(output.)s 0 4048(The)m 424(size)s 847(of)s 1114(outlined)s 1952(w)s 2(ords)k 2582(is)s 2788(tak)s 2(en)k 3357(by)s 3647(Lout)s 4155(to)s 4390(be)s 4668(the)s 5012(same)s 5555(as)s 5801(if)s 6014(the)s 3(y)k 6473(had)s 6873(not)s 7235(been)s 7740(outlined,)s 8626(e)s 6(v)k 3(en)k 0 3760(though)m 723(the)s 3(y)k 1186(are)s 1533(in)s 1776(reality)s 2439(slightly)s 3210(lar)s 4(ger)k 13(.)k 240 fnt5 0 2967(3.12.)m 591(@Language)s 1882(and)s 2323(@CurrLang)s [ /Dest /LOUTlanguage /DEST pdfmark 240 fnt1 480 2490(The)m 220 fnt2 905 2487(@Language)m 240 fnt1 2153 2490(symbol)m 2910(informs)s 3701(Lout)s 4210(that)s 4625(its)s 4898(right)s 5406(parameter)s 6417(is)s 6624(written)s [ /Dest /LOUT19_4605_pre_lang_1 /DEST pdfmark 7354(in)s 7594(the)s 7939(language)s 8855(of)s 0 2202(its)m 276(left)s 653(parameter:)s 220 fnt2 480 1701(Danish @Language { ...)m 13( })k 240 fnt1 0 1202(Basser)m 706(Lout)s 1228(V)s 26(ersion)k 2025(3)s 2199(uses)s 2671(this)s 3077(information)s 4271(in)s 4524(tw)s 2(o)k 4943(w)s 2(ays:)k 5609(to)s 5857(h)s 1(yphenate)k 6906(w)s 2(ords)k 7549(appropriately)s 8887(to)s 0 914(that)m 418(language,)s 1389(and)s 1793(to)s 2032(change)s 2766(the)s 3114(v)s 6(alue)k 3682(of)s 3953(the)s 220 fnt2 4301 911(@CurrLang)m 240 fnt1 5486 914(symbol)m 6246(\(see)s 6686(belo)s 6(w\).)k 7508(Other)s 8112(uses,)s 8630(such)s 0 626(as)m 250(right-to-left)s 1422(formatting)s 2483(of)s 2754(certain)s 3460(languages,)s 4524(may)s 4990(be)s 5272(added)s 5902(in)s 6145(the)s 6493(future.)s 480 252(The)m 953(left)s 1375(parameter)s 2434(must)s 3004(either)s 3652(be)s 3979(empty)s 4676(\(which)s 5442(means)s 6149(to)s 6433(lea)s 4(v)k 3(e)k 7031(the)s 7424(current)s 8206(language)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 52 58 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(52)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(unchanged\))m 1167(or)s 1428(else)s 1857(it)s 2051(must)s 2578(ha)s 4(v)k 3(e)k 3080(been)s 3591(gi)s 6(v)k 3(en)k 4173(in)s 4418(a)s 220 fnt2 4586 13202(langdef)m [ /Dest /LOUT19_4605_pre_lang_2 /DEST pdfmark 240 fnt1 5363 13205(language)m 6285(de\207nition)s 7261(at)s 7495(the)s 7845(be)s 3(ginning)k 8855(of)s 0 12917(the)m 348(input:)s 220 fnt2 480 12409(langdef Danish Dansk {)m 240 fnt6 2993 12414(implementation-dependent)m 220 fnt2 5608 12409(})m 240 fnt1 0 11910(After)m 220 fnt2 571 11907(langdef)m 240 fnt1 1355 11910(comes)m 2025(a)s 2199(sequence)s 3140(of)s 3419(one)s 3829(or)s 4096(more)s 4651(simple)s 5352(w)s 2(ords,)k 6050(which)s 6700(are)s 7055(alternati)s 6(v)k 3(e)k 8117(names)s 8788(for)s 0 11622(the)m 347(language)s 1265(being)s 1849(de\207ned.)s 2716(F)s 3(ollo)k 6(wing)k 3743(them)s 4279(comes)s 4940(an)s 5221(implementation-dependent)s 7843(part)s 8272(between)s 0 11334(braces.)m 760(In)s 1001(Basser)s 1684(Lout)s 2181(V)s 26(ersion)k 2955(3)s 3104(this)s 3486(part)s 3902(contains)s 4736(the)s 5069(name)s 5629(of)s 5885(the)s 6219(Lout)s 6716(h)s 1(yphenation)k 7941(information)s 0 11046(\207le)m 383(\(minus)s 1121(its)s 1419(.lh)s 1745(suf\207x\))s 2441(to)s 2702(be)s 3007(used)s 3527(when)s 4125(h)s 1(yphenating)k 5384(w)s 2(ords)k 6040(in)s 6306(this)s 6725(language,)s 7718(follo)s 6(wed)k 8643(by)s 8960(a)s 0 10758(sequence)m 933(of)s 1204(w)s 2(ords)k 1838(which)s 2480(de\207ne)s 3121(the)s 3469(ends)s 3959(of)s 4230(sentences.)s 5310(F)s 3(or)k 5699(e)s 3(xample:)k 220 fnt2 480 10258(langdef English { english .)m 13( :)k 11( ? ! .\) ?\) !\) })k 240 fnt1 0 9759(de\207nes)m 748(a)s 934(language)s 1874(called)s 2522(English)s 3329(with)s 3831(h)s 1(yphenation)k 5091(patterns)s 5918(\207le)s 220 fnt2 6298 9756(english.lh)m 240 fnt1 7289 9759(and)m 7713(se)s 6(v)k 3(en)k 8326(w)s 2(ays)k 8887(to)s 0 9471(end)m 424(a)s 610(sentence.)s 1617(The)s 2065(use)s 2460(of)s 2751(these)s 3318(sentence)s 4217(endings)s 5034(is)s 5264(described)s 6258(in)s 6521(Section)s 7315(3.5.)s 7799(If)s 8049(there)s 8602(is)s 8833(no)s 0 9183(h)m 1(yphenation)k 1236(\207le)s 1592(a)s 4(v)k 6(ailable,)k 2546(this)s 2937(is)s 3143(indicated)s 4072(by)s 4361(writing)s 220 fnt2 5099 9180(-)m 240 fnt1 5219 9183(for)m 5552(the)s 5895(\207le)s 6251(name;)s 6877(if)s 7089(there)s 7617(are)s 7959(no)s 8247(sentence)s 0 8895(ends,)m 546(the)s 3(y)k 1009(are)s 1356(simply)s 2061(omitted.)s 480 8521(The)m 220 fnt2 913 8518(@CurrLang)m 240 fnt1 2103 8521(symbol,)m 2920(which)s 3567(has)s 3942(no)s 4240(parameters,)s 5399(e)s 6(v)k 6(aluates)k 6332(to)s 6576(the)s 6929(\207rst)s [ /Dest /LOUT19_4605_pre_lang_3 /DEST pdfmark 7365(name)s 7944(gi)s 6(v)k 3(en)k 8529(in)s 8778(the)s 220 fnt2 0 8230(langdef)m 240 fnt1 776 8233(of)m 1047(the)s 1395(language)s 2315(in)s 2558(force)s 3104(at)s 3336(the)s 3684(point)s 4236(where)s 4876(it)s 5068(is)s 5278(in)s 9(v)k 4(ok)k 2(ed:)k 220 fnt2 480 7732(Dansk @Language { )m 11(This is @CurrLang.)k 13( })k 240 fnt1 0 7233(has)m 370(result)s 480 6780(This)m 956(is)s 1166(Danish.)s 0 6327(It)m 205(is)s 415(typically)s 1305(used)s 1802(with)s 2284(the)s 220 fnt2 2632 6324(@Case)m 240 fnt1 3419 6327(symbol)m 4179(lik)s 2(e)k 4591(this:)s 220 fnt2 480 5826(@CurrLang @Case {)m 480 5538( Danish @Y)m 4(ield tirsdag)k 480 5250( English @Y)m 4(ield )k 11(T)k 26(uesda)k 6(y)k 480 4962( F)m 9(rench @Y)k 4(ield Mardi)k 480 4674(})m 240 fnt1 0 4180(This)m 476(e)s 3(xample)k 1339(e)s 6(v)k 6(aluates)k 2267(to)s 2506(the)s 2854(name)s 3428(of)s 3699(the)s 4047(third)s 4556(day)s 4956(of)s 5227(the)s 5575(week)s 6141(in)s 6384(the)s 6732(current)s 7468(language.)s 480 3806(The)m 908(current)s 1644(language)s 2563(is)s 2773(part)s 3204(of)s 3474(the)s 3822(style)s 4329(of)s 4599(an)s 4882(object,)s 5573(lik)s 2(e)k 5984(its)s 6260(font.)s 6809(As)s 7125(e)s 3(xplained)k 8110(in)s 8352(Section)s 0 3518(2.6,)m 419(style)s 939(is)s 1162(inherited)s 2081(through)s 2896(the)s 3257(point)s 3822(of)s 4105(appearance,)s 5300(which)s 5955(for)s 6305(language)s 7238(can)s 7640(be)s 7935(une)s 3(xpected.)k 0 3230(F)m 3(or)k 380(e)s 3(xample,)k 1284(an)s 1557(inde)s 3(x)k 2131(entry)s 2666(which)s 3298(originates)s 4281(in)s 4514(a)s 4671(French)s 5382(chapter)s 6135(b)s 4(ut)k 6487(appears)s 7258(in)s 7491(an)s 7764(English)s 8542(inde)s 3(x)k 0 2942(will)m 426(ha)s 4(v)k 3(e)k 927(English)s 1715(for)s 2053(its)s 2329(language,)s 3300(so)s 3566(must)s 4091(be)s 4373(e)s 3(xplicitly)k 5326(set)s 5651(to)s 5890(French)s 6611(using)s 220 fnt2 7183 2939(@Language)m 240 fnt1 8374 2942(.)m 240 fnt5 0 2149(3.13.)m 591(@OneCol)s 1653(and)s 2094(@OneRo)s 2(w)k [ /Dest /LOUTonerow /DEST pdfmark 240 fnt1 480 1717(The)m 220 fnt2 913 1714(@OneRo)m 3(w)k 240 fnt1 2049 1717(symbol)m [ /Dest /LOUT19_4605_pre_oner_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_oner_2 /DEST pdfmark 2814(returns)s 3533(its)s 3814(right)s 4330(parameter)s 5350(modi\207ed)s 6264(so)s 6535(that)s 6958(only)s 7443(the)s 7796(principal)s 8706(ro)s 6(w)k 0 1429(mark)m 540(protrudes.)s 1595(This)s 2059(is)s 2257(normally)s 3162(the)s 3498(\207rst)s 3917(ro)s 6(w)k 4324(mark,)s 4910(b)s 4(ut)k 5260(another)s 6025(one)s 6415(may)s 6869(be)s 7139(chosen)s 7849(by)s 8130(preceding)s 0 1141(it)m 192(with)s 220 fnt2 674 1138(^/)m 240 fnt1 901 1141(or)m 220 fnt2 1160 1138(^//)m 240 fnt1 1388 1141(.)m 1552(F)s 3(or)k 1941(e)s 3(xample,)k 220 fnt2 480 640(@OneRo)m 3(w { |0.5r)k -8(t Slope @F)k 6(ont x + 2 ^//1p @HLine //1p |0.5r)k -8(t 5 })k 240 fnt1 0 144(has)m 370(result)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 53 59 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.13.)m 1991(@OneCol)s 3016(and)s 3442(@OneRow)s 240 fnt5 10250 -1583(53)m gsave 1417 -15423 translate 240 fnt1 9066 13412 0 13412 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 468 371 0 188 240 288 60 480 12753 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 468 371 0 188 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 468 371 0 188 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 240 fnt6 0 211(x)m 240 fnt1 166 209(+)m 354(2)s 468 0 0 0 240 288 60 0 188 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 181 3(5)m grestore grestore end end restore grestore 0 12037(with)m 482(one)s 884(ro)s 6(w)k 1304(mark)s 1856(protruding)s 2919(from)s 3443(the)s 3791(bar)s 4156(as)s 4406(sho)s 6(wn.)k 5190(Compare)s 6123(this)s 6519(with)s 220 fnt2 480 11536(@OneRo)m 3(w { |0.5r)k -8(t Slope @F)k 6(ont x + 2 //1p @HLine //1p |0.5r)k -8(t 5 })k 240 fnt1 0 11040(where)m 640(the)s 988(mark)s 1540(protrudes)s 2494(from)s 3018(the)s 3366(numerator:)s 468 371 0 263 240 288 60 480 10061 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 468 371 0 263 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 468 371 0 263 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore 240 fnt6 0 211(x)m 240 fnt1 166 209(+)m 354(2)s 468 0 0 0 240 288 60 0 188 LoutGr2 0 0 moveto xsize 0 lineto stroke grestore grestore 181 3(5)m grestore grestore end end restore grestore [ /Dest /LOUT19_4605_pre_oner_3 /DEST pdfmark 220 fnt2 0 9607(@OneCol)m 240 fnt1 1016 9610(has)m 1391(the)s 1744(same)s 2296(ef)s 6(fect)k 2897(on)s 3198(columns)s 4065(as)s 220 fnt2 4320 9607(@OneRo)m 3(w)k 240 fnt1 5456 9610(does)m 5951(on)s 6252(ro)s 6(ws,)k 6823(with)s 7310(the)s 7663(symbols)s 220 fnt2 8517 9607(^|)m 240 fnt1 8722 9610(and)m 220 fnt2 0 9319(^||)m 240 fnt1 257 9322(\(or)m 220 fnt2 595 9319(^&)m 240 fnt1 840 9322(\))m 968(determining)s 2176(which)s 2818(mark)s 3370(is)s 3580(chosen.)s 240 fnt5 0 8529(3.14.)m 591(@W)s 4(ide)k 1411(and)s 1852(@High)s [ /Dest /LOUTwide /DEST pdfmark 240 fnt1 480 8052(The)m 220 fnt2 910 8049(@Wide)m 240 fnt1 1687 8052(symbol)m [ /Dest /LOUT19_4605_pre_wide_1 /DEST pdfmark 2450(returns)s 3167(its)s 3446(right)s 3960(parameter)s 4977(modi\207ed)s 5888(to)s 6130(ha)s 4(v)k 3(e)k 6634(the)s 6985(width)s 7590(gi)s 6(v)k 3(en)k 8173(by)s 8470(its)s 8749(left)s 0 7764(parameter)m 9(,)k 1058(which)s 1707(must)s 2238(be)s 2527(a)s 2699(length)s 3361(\(Section)s 4220(3.2\))s 4655(whose)s 5329(unit)s 5768(of)s 6045(measurement)s 7386(is)s 220 fnt2 7602 7761(c)m 240 fnt1 7707 7764(,)m 220 fnt2 7821 7761(i)m 240 fnt1 7855 7764(,)m 220 fnt2 7968 7761(p)m 240 fnt1 8082 7764(,)m 220 fnt2 8196 7761(m)m 240 fnt1 8365 7764(,)m 220 fnt2 8478 7761(f)m 240 fnt1 8536 7764(,)m 220 fnt2 8650 7761(s)m 240 fnt1 8753 7764(,)m 8867(or)s 220 fnt2 0 7473(v)m 240 fnt1 109 7476(.)m 278(If)s 513(the)s 867(right)s 1383(parameter)s 2403(is)s 2618(not)s 2990(as)s 3245(wide)s 3772(as)s 4027(required,)s 4936(white)s 5528(space)s 6121(is)s 6336(added)s 6972(at)s 7209(the)s 7563(right;)s 8131(if)s 8354(it)s 8551(is)s 8767(too)s 0 7188(wide,)m 585(its)s 875(paragraphs)s 1988(are)s 2349(brok)s 2(en)k 3083(\(Section)s 3949(3.4\))s 4391(so)s 4670(that)s 5102(it)s 5308(\207ts.)s 5777(A)s 220 fnt2 6021 7185(@OneCol)m 240 fnt1 7046 7188(operation)m 8020(is)s 8244(included)s 0 6900(in)m 257(the)s 620(ef)s 6(fect)k 1231(of)s 220 fnt2 1517 6897(@Wide)m 240 fnt1 2231 6900(,)m 2353(since)s 2915(it)s 3122(does)s 3627(not)s 4008(mak)s 2(e)k 4595(sense)s 5184(for)s 5537(an)s 5835(object)s 6494(of)s 6780(\207x)s 3(ed)k 7329(width)s 7946(to)s 8200(ha)s 4(v)k 3(e)k 8716(tw)s 2(o)k 0 6612(column)m 775(marks.)s [ /Dest /LOUT19_4605_pre_wide_2 /DEST pdfmark 552 6238(The)m 220 fnt2 993 6235(@High)m 240 fnt1 1725 6238(symbol)m 2498(similarly)s 3413(ensures)s 4194(that)s 4625(its)s 4914(result)s 5517(is)s 5740(of)s 6024(a)s 6203(gi)s 6(v)k 3(en)k 6796(height,)s 7514(by)s 7821(adding)s 8539(white)s 0 5950(space)m 573(at)s 790(the)s 1123(bottom.)s 1950(In)s 2191(this)s 2572(case)s 3024(it)s 3201(is)s 3396(an)s 3664(error)s 4172(for)s 4495(the)s 4828(right)s 5324(parameter)s 6323(to)s 6547(be)s 6814(too)s 7158(lar)s 4(ge.)k 7780(A)s 220 fnt2 7995 5947(@OneRo)m 3(w)k 240 fnt1 0 5662(operation)m 960(is)s 1170(included.)s 240 fnt5 0 4869(3.15.)m 591(@HShift)s 1550(and)s 1991(@VShift)s [ /Dest /LOUThshift /DEST pdfmark 240 fnt1 480 4437(The)m 220 fnt2 917 4434(@HShift)m 240 fnt1 1802 4437(symbol)m [ /Dest /LOUT19_4605_pre_hshi_1 /DEST pdfmark 2572(returns)s 3296(its)s 3582(right)s 4103(parameter)s 5127(with)s 5619(principal)s 6533(mark)s 7095(shifted)s 7813(as)s 8073(prescribed)s 0 4149(by)m 294(its)s 570(left)s 947(parameter:)s 220 fnt2 1124 3641(+)m 240 fnt6 1244 3646(length)m 220 fnt2 1897 3641(@HShift)m 240 fnt6 2772 3646(object)m 240 fnt1 3600 3644(Principal)m 4517(mark)s 5069(shifted)s 5777(to)s 6016(the)s 6364(right)s 6875(by)s 240 fnt6 7169 3646(length)m 240 fnt1 7762 3644(;)m [ /Dest /LOUT16_1731_pre_hshi_1 /DEST pdfmark 220 fnt2 1180 3136(-)m 240 fnt6 1244 3141(length)m 220 fnt2 1897 3136(@HShift)m 240 fnt6 2772 3141(object)m 240 fnt1 3600 3139(Principal)m 4517(mark)s 5069(shifted)s 5777(to)s 6016(the)s 6364(left)s 6741(by)s 240 fnt6 7035 3141(length)m 240 fnt1 7628 3139(;)m [ /Dest /LOUT16_1731_pre_hshi_2 /DEST pdfmark 240 fnt6 1244 2636(length)m 220 fnt2 1897 2631(@HShift)m 240 fnt6 2772 2636(object)m 240 fnt1 3600 2634(Principal)m 4512(mark)s 5058(shifted)s 5760(so)s 6020(as)s 6264(to)s 6497(lie)s 240 fnt6 6786 2636(length)m 240 fnt1 7433 2634(to)m 7666(the)s 8008(right)s 8513(of)s 8778(the)s 3600 2346(left)m 3977(edge)s 4485(of)s 240 fnt6 4756 2348(object)m 240 fnt1 5344 2346(;)m [ /Dest /LOUT16_1731_pre_hshi_3 /DEST pdfmark 0 1843(In)m 256(each)s 751(chase)s 220 fnt2 1338 1840(@HShift)m 240 fnt1 2213 1843(includes)m 3061(a)s 220 fnt2 3227 1840(@OneCol)m 240 fnt1 4239 1843(ef)m 6(fect.)k 480 1469(The)m 916(units)s 1440(of)s 1720(measurement)s 3062(of)s 240 fnt6 3342 1471(length)m 240 fnt1 4003 1469(may)m 4478(be)s 220 fnt2 4768 1466(c)m 240 fnt1 4873 1469(,)m 220 fnt2 4989 1466(i)m 240 fnt1 5023 1469(,)m 220 fnt2 5138 1466(p)m 240 fnt1 5252 1469(,)m 220 fnt2 5368 1466(m)m 240 fnt1 5537 1469(,)m 220 fnt2 5652 1466(f)m 240 fnt1 5710 1469(,)m 220 fnt2 5825 1466(s)m 240 fnt1 5928 1469(,)m 220 fnt2 6044 1466(v)m 240 fnt1 6153 1469(,)m 6268(or)s 220 fnt2 6536 1466(w)m 240 fnt1 6692 1469(.)m 6864(In)s 7129(the)s 7485(latter)s 8043(case,)s 220 fnt2 8569 1466(1w)m 240 fnt1 8916 1469(is)m 0 1181(tak)m 2(en)k 579(to)s 825(be)s 1113(the)s 1468(width)s 2076(of)s 2354(the)s 2708(right)s 3226(parameter)s 9(,)k 4285(so)s 4557(that,)s 5029(for)s 5373(e)s 3(xample,)k 220 fnt2 6294 1178(0.5w @HShift)m 240 fnt1 7699 1181(will)m 8132(centre)s 8778(the)s 0 893(principal)m 904(column)s 1679(mark)s 2231(within)s 2899(the)s 3247(right)s 3758(parameter)s 13(.)k [ /Dest /LOUT19_4605_pre_hshi_2 /DEST pdfmark 548 519(The)m 220 fnt2 984 516(@VShift)m 240 fnt1 1855 519(symbol)m 2624(is)s 2842(similar)s 3572(e)s 3(xcept)k 4261(that)s 4688(it)s 4888(applies)s 5624(v)s 3(ertically)k 6584(to)s 6832(the)s 7188(principal)s 8100(ro)s 6(w)k 8529(mark:)s 220 fnt2 0 228(+)m 240 fnt6 120 233(length)m 240 fnt1 771 231(shifts)m 1337(it)s 1527(do)s 6(wn,)k 220 fnt2 2159 228(-)m 240 fnt6 2223 233(length)m 240 fnt1 2874 231(shifts)m 3440(it)s 3629(up,)s 3974(and)s 240 fnt6 4376 233(length)m 240 fnt1 5027 231(shifts)m 5593(it)s 5783(to)s 240 fnt6 6019 233(length)m 240 fnt1 6670 231(belo)m 6(w)k 7301(the)s 7647(top)s 8004(edge)s 8510(of)s 8778(the)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 54 60 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(54)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(object.)m 748(W)s 9(ith)k 220 fnt2 1274 13202(@VShift)m 240 fnt1 2077 13205(,)m 220 fnt2 2184 13202(1w)m 240 fnt1 2522 13205(is)m 2732(tak)s 2(en)k 3305(to)s 3544(be)s 3826(the)s 4174(height)s 4832(of)s 5103(the)s 5451(right)s 5962(parameter)s 13(.)k 240 fnt5 0 12412(3.16.)m 591(@HExpand)s 1854(and)s 2295(@VExpand)s [ /Dest /LOUThexpand /DEST pdfmark [ /Dest /LOUT19_4605_pre_hexp_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hexp_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hexp_3 /DEST pdfmark 240 fnt1 558 11935(The)m 220 fnt2 1004 11932(@HExpand)m 240 fnt1 2195 11935(symbol)m 2973(causes)s 3666(its)s 3961(right)s 4490(parameter)s 5522(to)s 5779(be)s 6079(as)s 6348(wide)s 6887(as)s 7155(it)s 7365(possibly)s 8235(could)s 8844(be)s 0 11647(without)m 784(violating)s 1679(a)s 220 fnt2 1837 11644(@Wide)m 240 fnt1 2603 11647(symbol)m 3355(or)s 3606(intruding)s 4528(into)s 4945(the)s 5285(space)s 5864(occupied)s 6778(by)s 7064(neighbouring)s 8386(g)s 1(aps)k 8867(or)s 0 11359(objects.)m 841(The)s 220 fnt2 1269 11356(@VExpand)m 240 fnt1 2430 11359(symbol)m 3190(is)s 3400(similar)s 9(,)k 4160(b)s 4(ut)k 4522(it)s 4714(af)s 6(fects)k 5394(height.)s 6156(F)s 3(or)k 6545(e)s 3(xample,)k 7459(in)s 7702(the)s 8050(object)s 220 fnt2 480 10858(8i @Wide 11i @High {)m 480 10570( //1i ||1i @HExpand @VExpand x ||1i)m 480 10282( //1i)m 480 9994(})m 240 fnt1 0 9500(object)m 220 fnt2 655 9497(x)m 240 fnt1 834 9500(could)m 1435(ha)s 4(v)k 3(e)k 1947(an)s 3(y)k 2356(size)s 2794(up)s 3098(to)s 3348(six)s 3694(inches)s 4367(wide)s 4899(by)s 5204(nine)s 5683(inches)s 6357(high,)s 6901(so)s 7178(the)s 220 fnt2 7537 9497(@HExpand)m 240 fnt1 8722 9500(and)m 220 fnt2 0 9209(@VExpand)m 240 fnt1 1166 9212(symbols)m 2021(cause)s 2614(it)s 2812(to)s 3056(ha)s 4(v)k 3(e)k 3563(e)s 3(xactly)k 4310(this)s 4712(size.)s 5252(This)s 5734(is)s 5950(important,)s 6992(for)s 7335(e)s 3(xample,)k 8255(if)s 220 fnt2 8478 9209(x)m 240 fnt1 8652 9212(con-)m 0 8924(tains)m 220 fnt2 502 8921(|1r)m -8(t)k 240 fnt1 879 8924(or)m 220 fnt2 1138 8921(/1r)m -8(t)k 240 fnt1 1459 8924(;)m 1571(without)s 2362(the)s 2710(e)s 3(xpansion)k 3735(these)s 4282(might)s 4900(not)s 5266(mo)s 3(v)k 3(e)k 5848(as)s 6098(f)s 2(ar)k 6420(across)s 7068(or)s 7327(do)s 6(wn)k 7911(as)s 8161(e)s 3(xpected.)k 480 8550(As)m 809(Section)s 1595(2.6)s 1961(e)s 3(xplains)k 2818(in)s 3074(detail,)s 3723(most)s 4260(objects)s 5001(are)s 5360(already)s 6130(as)s 6392(lar)s 4(ge)k 6933(as)s 7196(the)s 3(y)k 7671(possibly)s 8536(could)s 0 8262(be.)m 379(Consequently)s 1738(these)s 2273(symbols)s 3110(are)s 3446(needed)s 4170(only)s 4638(rarely)s 15(.)k 220 fnt2 5331 8259(@HExpand)m 240 fnt1 6493 8262(includes)m 7329(a)s 220 fnt2 7483 8259(@OneCol)m 240 fnt1 8483 8262(ef)m 6(fect,)k 0 7974(and)m 220 fnt2 404 7971(@VExpand)m 240 fnt1 1565 7974(includes)m 2413(a)s 220 fnt2 2579 7971(@OneRo)m 3(w)k 240 fnt1 3710 7974(ef)m 6(fect.)k 240 fnt5 0 7185(3.17.)m 591(@HContract)s 1976(and)s 2417(@VContract)s [ /Dest /LOUThcontract /DEST pdfmark [ /Dest /LOUT19_4605_pre_hcon_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hcon_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hcon_3 /DEST pdfmark 240 fnt1 542 6753(The)m 220 fnt2 972 6750(@HContr)m 2(act)k 240 fnt1 2239 6753(symbol)m 3001(reduces)s 3784(the)s 4135(size)s 4564(of)s 4837(its)s 5116(right)s 5629(parameter)s 6645(to)s 6887(a)s 7055(reasonable)s 8136(minimum)s 0 6465(\(after)m 575(paragraph)s 1588(breaking\).)s 2668(F)s 3(or)k 3057(e)s 3(xample,)k 220 fnt2 480 5964(5i @Wide @HContr)m 2(act { A |1r)k -8(t B })k 240 fnt1 0 5470(has)m 370(result)s 480 5019(A)m 650(B)s 0 4568(in)m 233(which)s 864(the)s 1201(B)s 1393(is)s 1592(much)s 2170(closer)s 2789(to)s 3017(the)s 3354(A)s 3574(than)s 4032(it)s 4213(w)s 2(ould)k 4857(otherwise)s 5831(ha)s 4(v)k 3(e)k 6321(been.)s 220 fnt2 6926 4565(@VContr)m 2(act)k 240 fnt1 8167 4568(is)m 8366(similar)s 9(,)k 0 4280(b)m 4(ut)k 362(in)s 605(a)s 771(v)s 3(ertical)k 1538(direction.)s 2551(See)s 2952(Section)s 3726(2.6)s 4079(for)s 4417(a)s 4583(more)s 5130(e)s 3(xtensi)k 6(v)k 3(e)k 6077(discussion.)s 240 fnt5 0 3536(3.18.)m 591(@HLimited)s 1864(and)s 2305(@VLimited)s [ /Dest /LOUThlimited /DEST pdfmark [ /Dest /LOUT19_4605_pre_hlim_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hlim_2 /DEST pdfmark 240 fnt1 579 3104(The)m 220 fnt2 1047 3101(@HLimited)m 240 fnt1 2221 3104(symbol)m 3021(limits)s 3654(the)s 4042(width)s 4684(a)s 4(v)k 6(ailable)k 5631(to)s 5910(recursi)s 6(v)k 3(e)k 6871(and)s 7315(recepti)s 6(v)k 3(e)k 8277(symbols)s 0 2816(within)m 692(its)s 993(right)s 1529(parameter)s 2567(to)s 2831(whate)s 6(v)k 3(er)k 3783(is)s 4018(a)s 4(v)k 6(ailable)k 4950(without)s 5766(increasing)s 6826(the)s 7198(e)s 3(xisting)k 8030(size)s 8482(of)s 8778(the)s 220 fnt2 0 2525(@HLimited)m 240 fnt1 1138 2528(object.)m 1890(So)s 2199(this)s 2599(symbol)s 3362(acts)s 3788(lik)s 2(e)k 220 fnt2 4204 2525(@Wide)m 240 fnt1 4981 2528(with)m 5467(respect)s 6206(to)s 6449(limiting)s 7261(the)s 7613(space)s 8204(occupied)s 0 2240(by)m 315(recursi)s 6(v)k 3(e)k 1258(and)s 1684(recepti)s 6(v)k 3(e)k 2627(symbols,)s 3553(e)s 3(xcept)k 4256(that)s 4695(instead)s 5451(of)s 5744(enforcing)s 6734(a)s 6921(\207x)s 3(ed)k 7477(constant)s 8355(limit,)s 8934(it)s 0 1952(enforces)m 860(whate)s 6(v)k 3(er)k 1787(size)s 2214(is)s 2424(already)s 3181(in)s 3424(place.)s 480 1578(The)m 220 fnt2 904 1575(@VLimited)m 240 fnt1 2023 1578(symbol)m 2778(is)s 2984(e)s 3(xactly)k 3721(the)s 4064(same,)s 4658(e)s 3(xcept)k 5335(that)s 5748(it)s 5936(applies)s 6660(v)s 3(ertically)k 7607(rather)s 8219(than)s 8683(hor)s 4(-)k 0 1290(izontally)m 15(.)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 55 61 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.19.)m 1991(@HAdjust,)s 3088(@V)s 14(Adjust,)k 4144(and)s 4570(@P)s 21(Adjust)k 240 fnt5 10250 -1583(55)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 240 fnt5 0 13203(3.19.)m 591(@HAdjust,)s 1804(@V)s 32(Adjust,)k 2972(and)s 3413(@P)s 17(Adjust)k [ /Dest /LOUThadjust /DEST pdfmark [ /Dest /LOUT19_4605_pre_hadj_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hadj_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hadj_3 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hadj_4 /DEST pdfmark 240 fnt1 551 12727(These)m 1189(symbols)s 2050(spread)s 2743(their)s 3252(right)s 3774(parameter)s 4800(apart)s 5348(until)s 5852(it)s 6056(occupies)s 6955(all)s 7260(the)s 7619(space)s 8218(a)s 4(v)k 6(ailable)k 0 12439(to)m 268(it;)s 220 fnt2 602 12436(@HAdjust)m 240 fnt1 1678 12439(adjusts)m 220 fnt2 2422 12436(|)m 240 fnt1 2549 12439(sequences,)m 220 fnt2 3656 12436(@V)m 17(Adjust)k 240 fnt1 4702 12439(adjusts)m 220 fnt2 5447 12436(/)m 240 fnt1 5601 12439(sequences,)m 6707(and)s 220 fnt2 7141 12436(@P)m 26(Adjust)k 240 fnt1 8179 12439(adjusts)m 220 fnt2 8924 12436(&)m 240 fnt1 0 12151(sequences.)m 1134(F)s 3(or)k 1523(e)s 3(xample,)k 220 fnt2 480 11650(4i @Wide @P)m 26(Adjust { 1 2 3 4 5 6 7 8 })k 240 fnt1 0 11153(has)m 370(result)s 480 10698(1)m 1274(2)s 2088(3)s 2892(4)s 3706(5)s 4512(6)s 5325(7)s 6133(8)s 0 10244(More)m 571(precisely)s 15(,)k 1521(the)s 1865(widening)s 2806(is)s 3012(ef)s 6(fected)k 3828(by)s 4119(enlar)s 4(ging)k 5067(the)s 5411(size)s 5835(of)s 6102(each)s 6593(component)s 7714(e)s 3(xcept)k 8391(the)s 8735(last)s 0 9956(by)m 284(an)s 556(equal)s 1118(fraction)s 1907(of)s 2167(the)s 2504(space)s 3080(that)s 3488(w)s 2(ould)k 4132(otherwise)s 5106(be)s 5377(left)s 5744(o)s 3(v)k 3(er)k 6212(\211)s 6381(just)s 6775(the)s 7113(opposite)s 7969(of)s 8229(the)s 8566(usual)s 0 9668(procedure,)m 1063(which)s 1705(assigns)s 2447(all)s 2740(the)s 3088(lefto)s 3(v)k 3(er)k 3884(space)s 4471(to)s 4710(the)s 5058(last)s 5449(component)s 6573(\(Section)s 7426(2.6\).)s 220 fnt2 480 9291(@P)m 26(Adjust)k 240 fnt1 1497 9294(is)m 1716(used)s 2222(by)s 2525(the)s 220 fnt2 2883 9291(adjust)m 240 fnt1 3533 9294(and)m 220 fnt2 3946 9291(outdent)m 240 fnt1 4743 9294(options)m 5508(of)s 5789(the)s 220 fnt2 6146 9291(@Break)m 240 fnt1 7011 9294(symbol)m 7780(\(Section)s 8643(3.4\).)s 0 9006(It)m 213(has)s 591(a)s 765(slight)s 1364(peculiarity:)s 2559(it)s 2759(will)s 3193(not)s 3567(enlar)s 4(ge)k 4330(components)s 5546(when)s 6130(the)s 6486(immediately)s 7742(follo)s 6(wing)k 8728(g)s 1(ap)k 0 8718(has)m 398(width)s 1029(0.)s 1342(This)s 1847(is)s 2086(to)s 2354(pre)s 6(v)k 3(ent)k 3151(space)s 3767(from)s 4320(appearing)s 5345(\(for)s 5791(e)s 3(xample\))k 6755(between)s 7638(a)s 7833(w)s 2(ord)k 8410(and)s 8843(an)s 0 8430(immediately)m 1248(follo)s 6(wing)k 2225(comma.)s 3093(The)s 3521(other)s 4072(tw)s 2(o)k 4482(symbols)s 5331(will)s 5757(enlar)s 4(ge)k 6512(such)s 7008(components.)s 240 fnt5 0 7637(3.20.)m 591(@HScale)s 1587(and)s 2028(@VScale)s [ /Dest /LOUThscale /DEST pdfmark [ /Dest /LOUT19_4605_pre_hsca_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hsca_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hsca_3 /DEST pdfmark 220 fnt2 538 7202(@HScale)m 240 fnt1 1516 7205(causes)m 2189(its)s 2462(right)s 2970(parameter)s 3982(to)s 4218(e)s 3(xpand)k 4962(to)s 5199(\207ll)s 5516(the)s 5861(space)s 6446(a)s 4(v)k 6(ailable,)k 7402(by)s 7693(geometricallly)s 0 6917(scaling)m 730(it:)s 220 fnt2 480 6416(4i @Wide @HScale { 1 2 3 4 5 6 7 8 })m 240 fnt1 0 5922(has)m 370(result)s gsave 480 0 translate 4.4965 1.0000 scale 0 5467(1)m 155(2)s 329(3)s 493(4)s 667(5)s 833(6)s 1006(7)s 1174(8)s grestore 0 5013(and)m 220 fnt2 480 4562(0.5i @Wide @HScale { 1 2 3 4 5 6 7 8 })m 240 fnt1 0 4068(has)m 370(result)s gsave 480 0 translate 0.5621 1.0000 scale 0 3613(1)m 155(2)s 329(3)s 493(4)s 667(5)s 833(6)s 1006(7)s 1174(8)s grestore 220 fnt2 0 3156(@HScale)m 240 fnt1 980 3159(\207rst)m 1409(applies)s 220 fnt2 2136 3156(@HContr)m 2(act)k 240 fnt1 3398 3159(to)m 3635(its)s 3910(parameter)s 9(,)k 4960(then)s 5427(horizontally)s 6635(scales)s 7254(it)s 7444(to)s 7682(the)s 8028(actual)s 8651(size.)s 0 2871(The)m 433(principal)s 1342(mark)s 1899(of)s 2175(the)s 2528(right)s 3044(parameter)s 4063(has)s 4438(no)s 4736(ef)s 6(fect)k 5337(on)s 5639(the)s 5992(result;)s 6639(the)s 6992(parameter)s 8011(is)s 8226(scaled)s 8887(to)s 0 2583(the)m 365(actual)s 1007(size)s 1451(and)s 1872(positioned)s 2944(to)s 3200(\207ll)s 3537(the)s 3902(space)s 4506(a)s 4(v)k 6(ailable.)k 5539(\(T)s 19(aking)k 6347(account)s 7168(of)s 7456(alignment)s 8489(of)s 8778(the)s 0 2295(principal)m 904(mark)s 1456(only)s 1936(causes)s 2611(trouble)s 3344(in)s 3587(practice.\))s 220 fnt2 480 1918(@VScale)m 240 fnt1 1460 1921(is)m 1681(similar)s 9(,)k 2452(b)s 4(ut)k 2825(in)s 3080(a)s 3257(v)s 3(ertical)k 4035(direction.)s 220 fnt2 5059 1918(@HScale)m 240 fnt1 6051 1921(and)m 220 fnt2 6467 1918(@VScale)m 240 fnt1 7447 1921(each)m 7953(ha)s 4(v)k 3(e)k 8465(both)s 8960(a)s 220 fnt2 0 1630(@OneCol)m 240 fnt1 1012 1633(and)m 1416(a)s 220 fnt2 1582 1630(@OneRo)m 3(w)k 240 fnt1 2713 1633(ef)m 6(fect.)k 240 fnt5 0 885(3.21.)m 591(@HMirr)s 4(or)k 1784(and)s 2225(@VMirr)s 4(or)k [ /Dest /LOUThmirror /DEST pdfmark [ /Dest /LOUT19_4605_pre_hmir_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hmir_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hmir_3 /DEST pdfmark [ /Dest /LOUT19_4605_pre_hmir_4 /DEST pdfmark 220 fnt2 542 450(@HMirror)m 240 fnt1 1558 453(and)m 220 fnt2 1965 450(@VMirror)m 240 fnt1 2969 453(cause)m 3559(their)s 4059(right)s 4573(parameter)s 5590(to)s 5832(be)s 6117(re\210ected,)s 7049(either)s 7655(horizontally)s 8867(or)s 0 165(v)m 3(ertically)k 15(.)k 1047(F)s 3(or)k 1436(e)s 3(xample,)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 56 62 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(56)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(@HMirror AMB)m 2(ULANCE)k 240 fnt1 0 12752(has)m 370(result)s gsave 1992 12354 translate [-1 0 0 1 0 0] concat 0 -54(AMB)m 2(ULANCE)k grestore 0 11846(and)m 220 fnt2 480 11395(@VMirror AMB)m 2(ULANCE)k 240 fnt1 0 10940(has)m 370(result)s gsave 0 10593 translate [1 0 0 -1 0 0] concat 480 -54(AMB)m 2(ULANCE)k grestore 0 10034(The)m 419(parameters)s 1507(of)s 1768(these)s 2306(symbols)s 3145(may)s 3601(be)s 3874(arbitrary)s 4739(Lout)s 5241(objects)s 5960(as)s 6200(usual.)s 6799(Both)s 7313(symbols)s 8152(ha)s 4(v)k 3(e)k 8643(both)s 0 9746(a)m 220 fnt2 166 9743(@OneCol)m 240 fnt1 1178 9746(and)m 1582(a)s 220 fnt2 1748 9743(@OneRo)m 3(w)k 240 fnt1 2879 9746(ef)m 6(fect.)k 480 9372(In)m 733(each)s 1224(case)s 1687(the)s 2031(re\210ection)s 2987(is)s 3193(about)s 3781(the)s 4125(mark)s 4674(of)s 4941(the)s 5285(object)s 5925(\(that)s 6419(is,)s 6681(the)s 7025(re\210ected)s 7901(objects)s 8625(ha)s 4(v)k 3(e)k 0 9084(the)m 346(same)s 891(marks)s 1524(as)s 1772(the)s 2118(originals\),)s 3138(so)s 3402(that,)s 3865(for)s 4201(e)s 3(xample,)k 5113(when)s 5687(used)s 6182(within)s 6848(a)s 7012(line)s 7424(of)s 7693(te)s 3(xt)k 8106(the)s 8452(results)s 0 8796(are)m gsave 1859 8850 translate [-1 0 0 1 0 0] concat 0 -54(AMB)m 2(ULANCE)k grestore 1919(and)s gsave 0 8850 translate [1 0 0 -1 0 0] concat 2323 -54(AMB)m 2(ULANCE)k grestore 3895(respecti)s 6(v)k 3(ely)k 15(.)k 240 fnt5 0 8001(3.22.)m 591(@HCo)s 2(v)k 2(er)k 1679(and)s 2120(@VCo)s 2(v)k 2(er)k [ /Dest /LOUThcover /DEST pdfmark [ /Dest /LOUT19_4605_pre_cove_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_cove_2 /DEST pdfmark 240 fnt1 529 7569(The)m 220 fnt2 946 7566(@VCo)m 3(v)k 5(er)k 240 fnt1 1941 7569(symbol)m 2690(v)s 3(ertically)k 3631(scales)s 4241(its)s 4506(right)s 5006(parameter)s 6009(so)s 6264(that)s 6671(it)s 6852(co)s 3(v)k 3(ers)k 7510(e)s 6(v)k 3(ery)k 8075(object)s 8708(that)s 0 7281(shares)m 648(its)s 924(ro)s 6(w)k 1344(mark.)s 1999(F)s 3(or)k 2388(e)s 3(xample,)k 220 fnt2 480 6780(@VCo)m 3(v)k 5(er \( 45d @Rotate Hello @VCo)k 3(v)k 5(er \))k 240 fnt1 0 6284(produces)m 748 844 0 397 240 288 60 480 5100 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 748 844 0 397 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd ] lfigdopath pop pop grestore gsave 0 397 translate 1.0000 4.1367 scale 0 -54(\()m grestore gsave 210 397 translate 45.0000 rotate gsave 0 0 translate 0.9961 1.0000 scale 0 -54(Hello)m grestore grestore gsave 680 397 translate 1.0000 4.1367 scale 0 -54(\))m grestore grestore end end restore grestore 0 4649(The)m 428(ro)s 6(w)k 848(mark)s 1400(has)s 1770(been)s 2279(added)s 2909(to)s 3148(sho)s 6(w)k 3702(clearly)s 4405(where)s 5045(it)s 5237(lies.)s 5732(This)s 6208(should)s 6905(be)s 7187(compared)s 8188(with)s 220 fnt2 480 4148(@VScale \( 45d @Rotate Hello @VScale \))m 240 fnt1 0 3652(which)m 642(produces)s 748 486 0 39 240 288 60 480 2826 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 748 486 0 39 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd ] lfigdopath pop pop grestore gsave 0 229 translate 1.0000 2.3824 scale 0 -54(\()m grestore gsave 210 39 translate 45.0000 rotate gsave 0 0 translate 0.9961 1.0000 scale 0 -54(Hello)m grestore grestore gsave 0 229 translate 1.0000 2.3824 scale 680 -54(\))m grestore grestore end end restore grestore 0 2375(Scaling)m 786(abandons)s 1759(mark)s 2328(alignment)s 3361(and)s 3782(so)s 4065(is)s 4292(able)s 4763(to)s 5018(e)s 3(xactly)k 5776(co)s 3(v)k 3(er)k 6378(the)s 6743(rest)s 7164(of)s 7452(the)s 7817(ro)s 6(w)k 15(,)k 8292(whereas)s 0 2087(co)m 3(v)k 3(ering)k 896(preserv)s 3(es)k 1859(mark)s 2424(alignment)s 3453(and)s 3869(so)s 4148(is)s 4371(obliged)s 5160(in)s 5415(general)s 6186(to)s 6438(more)s 6998(than)s 7479(co)s 3(v)k 3(er)k 8077(the)s 8438(rest)s 8855(of)s 0 1799(the)m 348(ro)s 6(w)k 15(.)k 480 1425(If)m 700(the)s 1038(parameter)s 2042(of)s 220 fnt2 2303 1422(@VCo)m 3(v)k 5(er)k 240 fnt1 3299 1425(has)m 3658(zero)s 4112(v)s 3(ertical)k 4869(size,)s 5337(this)s 5723(is)s 5923(tak)s 2(en)k 6485(to)s 6714(mean)s 7279(that)s 7687(co)s 3(v)k 3(ering)k 8561(is)s 8760(not)s 0 1137(required)m 863(after)s 1368(all)s 1670(and)s 2083(the)s 220 fnt2 2441 1134(@VCo)m 3(v)k 5(er)k 240 fnt1 3456 1137(is)m 3675(silently)s 4441(ignored.)s 5345(If)s 5585(ho)s 6(we)k 6(v)k 3(er)k 6463(the)s 6820(parameter)s 7843(has)s 8223(non-zero)s 0 849(size)m 434(abo)s 3(v)k 3(e)k 1064(the)s 1420(mark)s 1980(b)s 4(ut)k 2350(zero)s 2822(size)s 3256(belo)s 6(w)k 15(,)k 3935(or)s 4202(vice)s 4664(v)s 3(ersa,)k 5280(this)s 5684(is)s 5901(tak)s 2(en)k 6482(to)s 6729(be)s 7019(an)s 7310(error)s 7841(since)s 8396(scaling)s 0 561(cannot)m 698(mak)s 2(e)k 1270(the)s 1618(parameter)s 2632(co)s 3(v)k 3(er)k 3217(the)s 3565(rest)s 3969(of)s 4240(the)s 4588(ro)s 6(w)k 15(.)k 220 fnt2 480 184(@HCo)m 3(v)k 5(er)k 240 fnt1 1505 187(is)m 1722(similar)s 9(,)k 2489(horizontally)s 3705(co)s 3(v)k 3(ering)k 4596(all)s 4896(objects)s 5631(that)s 6056(share)s 6623(its)s 6906(column)s 7688(mark.)s 8350(Neither)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 57 63 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.22.)m 1991(@HCo)s 2(ver)k 3032(and)s 3458(@VCo)s 2(ver)k 240 fnt5 10248 -1583(57)m gsave 1417 -15423 translate 240 fnt1 9066 13413 0 13304 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13250(symbol)m 753(w)s 2(orks)k 1379(well)s 1837(near)s 2300(g)s 1(alle)k 3(y)k 2926(tar)s 4(gets,)k 3658(because)s 4463(the)s 4803(scale)s 5328(f)s 2(actor)k 5934(to)s 6166(apply)s 6744(is)s 6946(determined)s 8071(before)s 8729(an)s 3(y)k 0 12962(g)m 1(alle)k 3(y)k 634(\210ushing)s 1459(tak)s 2(es)k 1999(place.)s 240 fnt5 0 12169(3.23.)m 591(@StartHSpan,@StartVSpan,)s 3642(@StartHVSpan,)s 5374(@HSpan,)s 6416(and)s 6857(@VSpan)s [ /Dest /LOUThspan /DEST pdfmark [ /Dest /LOUT19_4605_pre_span_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_span_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_span_3 /DEST pdfmark [ /Dest /LOUT19_4605_pre_span_4 /DEST pdfmark [ /Dest /LOUT19_4605_pre_span_5 /DEST pdfmark 240 fnt1 556 11692(These)m 1199(symbols)s 2065(w)s 2(ork)k 2632(together)s 3492(to)s 3747(produce)s 4591(spanning)s 5525(columns)s 6403(and)s 6824(ro)s 6(ws)k 7350(in)s 7610(a)s 7792(more)s 8356(\210e)s 3(xible)k 0 11404(w)m 2(ay)k 451(than)s 920(is)s 1130(possible)s 1970(in)s 2213(practice)s 3024(with)s 220 fnt2 3506 11401(//)m 240 fnt1 3691 11404(and)m 220 fnt2 4095 11401(||)m 240 fnt1 4189 11404(.)m 4353(An)s 4703(object)s 220 fnt2 480 10903(@Star)m -8(tHSpan object)k 240 fnt1 0 10406(causes)m 220 fnt2 682 10403(object)m 240 fnt1 1330 10406(to)m 1577(be)s 1866(printed,)s 2658(b)s 4(ut)k 3027(occup)s 2(ying)k 4084(all)s 4384(the)s 4740(horizontal)s 5771(space)s 6366(to)s 6612(the)s 6968(right)s 7486(on)s 7791(the)s 8146(ro)s 6(w)k 8574(mark)s 0 10118(on)m 289(which)s 922(it)s 1105(lies)s 1478(up)s 1762(to)s 1992(and)s 2387(including)s 3335(the)s 3675(rightmost)s 220 fnt2 4642 10115(@HSpan)m 240 fnt1 5572 10118(symbol)m 6323(on)s 6611(that)s 7020(mark)s 7563(not)s 7920(preceded)s 8832(by)s 220 fnt2 0 9827(@Star)m -8(tHVSpan)k 240 fnt1 1496 9830(,)m 220 fnt2 1603 9827(@Star)m -8(tHSpan)k 240 fnt1 2953 9830(,)m 220 fnt2 3059 9827(@Star)m -8(tVSpan)k 240 fnt1 4397 9830(,)m 4503(or)s 220 fnt2 4761 9827(@VSpan)m 240 fnt1 5628 9830(.)m 5791(The)s 6218(column)s 6992(mark)s 7543(of)s 7813(this)s 8208(spanning)s 0 9542(object)m 644(is)s 854(not)s 1220(constrained)s 2380(to)s 2619(align)s 3154(with)s 3636(an)s 3(y)k 4033(of)s 4304(the)s 4652(column)s 5427(marks)s 6062(of)s 6333(the)s 6681(columns)s 7543(it)s 7735(spans.)s 480 9168(If)m 739(there)s 1301(is)s 1541(no)s 220 fnt2 1863 9165(@HSpan)m 240 fnt1 2831 9168(symbol)m 3621(an)s 3(ywhere)k 4633(to)s 4901(the)s 5279(right)s 5819(of)s 220 fnt2 6119 9165(@Star)m -8(tHSpan)k 240 fnt1 7469 9168(,)m 7606(then)s 8104(the)s 8482(object)s 0 8880(spans)m 585(only)s 1067(its)s 1345(o)s 6(wn)k 1811(column.)s 2695(This)s 3173(means)s 3837(that)s 4257(it)s 4451(occupies)s 5341(that)s 5761(column)s 6538(as)s 6790(usual)s 7352(b)s 4(ut)k 7716(its)s 7994(mark)s 8548(is)s 8760(not)s 0 8592(constrained)m 1160(to)s 1399(align)s 1934(with)s 2416(those)s 2977(of)s 3248(the)s 3596(other)s 4147(objects)s 4875(in)s 5118(the)s 5466(column.)s 480 8218(Similarly)m 15(,)k 1457(the)s 220 fnt2 1801 8215(@Star)m -8(tVSpan)k 240 fnt1 3196 8218(symbol)m 3952(causes)s 4624(its)s 4896(object)s 5537(to)s 5772(occup)s 2(y)k 6513(all)s 6802(the)s 7147(v)s 3(ertical)k 7910(space)s 8493(belo)s 6(w)k 0 7930(it)m 191(on)s 486(the)s 832(column)s 1605(mark)s 2155(on)s 2451(which)s 3091(it)s 3281(lies,)s 3717(do)s 6(wn)k 4299(to)s 4537(and)s 4939(including)s 5894(the)s 6240(bottommost)s 220 fnt2 7441 7927(@VSpan)m 240 fnt1 8366 7930(symbol)m 0 7642(on)m 294(that)s 708(mark)s 1256(not)s 1618(preceded)s 2535(by)s 2825(a)s 220 fnt2 2987 7639(@Star)m -8(tHVSpan)k 240 fnt1 4483 7642(,)m 220 fnt2 4586 7639(@Star)m -8(tHSpan)k 240 fnt1 5936 7642(,)m 220 fnt2 6039 7639(@Star)m -8(tVSpan)k 240 fnt1 7377 7642(,)m 7480(or)s 220 fnt2 7735 7639(@HSpan)m 240 fnt1 8614 7642(;)m 8722(and)s 0 7354(if)m 206(there)s 728(is)s 927(no)s 220 fnt2 1209 7351(@VSpan)m 240 fnt1 2125 7354(symbol)m 2874(an)s 3(ywhere)k 3846(belo)s 6(w)k 4468(it)s 4649(on)s 4935(that)s 5342(mark,)s 5929(then)s 6387(the)s 6724(object)s 7357(spans)s 7929(only)s 8398(its)s 8662(o)s 6(wn)k 0 7066(ro)m 6(w)k 15(,)k 458(occup)s 2(ying)k 1507(its)s 1783(ro)s 6(w)k 2203(b)s 4(ut)k 2565(with)s 3047(its)s 3323(mark)s 3875(not)s 4241(constrained)s 5401(to)s 5640(align)s 6175(with)s 6657(the)s 7005(ro)s 6(w)k 7425(mark.)s 480 6692(The)m 220 fnt2 949 6689(@Star)m -8(tHVSpan)k 240 fnt1 2547 6692(symbol)m 3349(combines)s 4359(the)s 4748(ef)s 6(fects)k 5470(of)s 220 fnt2 5783 6689(@Star)m -8(tHSpan)k 240 fnt1 7235 6692(and)m 220 fnt2 7681 6689(@Star)m -8(tVSpan)k 240 fnt1 9019 6692(,)m 0 6404(allo)m 6(wing)k 884(an)s 1167(object)s 1811(to)s 2050(span)s 2546(both)s 3029(columns)s 3891(and)s 4295(ro)s 6(ws)k 4805(simultaneously)s 15(.)k 6402(F)s 3(or)k 6791(e)s 3(xample,)k 7705(in)s 220 fnt2 480 5903(@Star)m -8(tHVSpan x | | @HSpan)k 480 5615(/)m 480 5327(@VSpan | |)m 240 fnt1 0 4831(the)m 378(object)s 220 fnt2 1052 4828(x)m 240 fnt1 1250 4831(will)m 1706(occup)s 2(y)k 2481(a)s 2677(rectangular)s 3841(area)s 4328(spanning)s 5276(three)s 5840(columns,)s 6788(tw)s 2(o)k 7228(ro)s 6(ws,)k 7824(and)s 8258(the)s 8637(g)s 1(aps)k 0 4543(between)m 854(them.)s 480 4169(The)m 908(objects)s 1636(lying)s 2182(in)s 2425(the)s 2774(re)s 3(gion)k 3439(spanned)s 4283(should)s 4980(all)s 5274(be)s 5556(empty)s 15(,)k 6247(or)s 6506(the)s 220 fnt2 6855 4166(@HSpan)m 240 fnt1 7794 4169(and)m 220 fnt2 8199 4166(@VSpan)m 240 fnt1 0 3881(symbols)m 865(can)s 1271(be)s 1570(used)s 2084(to)s 2340(document)s 3360(the)s 3725(spanning)s 4660(that)s 5095(is)s 5322(occurring.)s 6418(At)s 6734(present)s 7501(there)s 8051(may)s 8534(be)s 8833(no)s 0 3593(g)m 1(alle)k 3(y)k 639(tar)s 4(gets)k 1328(or)s 1593(recursi)s 6(v)k 3(e)k 2521(symbols)s 3376(within)s 4050(the)s 4404(right)s 4921(parameter)s 5941(of)s 220 fnt2 6218 3590(@Star)m -8(tHSpan)k 240 fnt1 7568 3593(,)m 220 fnt2 7681 3590(@Star)m -8(tVSpan)k 240 fnt1 9019 3593(,)m 0 3305(or)m 220 fnt2 246 3302(@Star)m -8(tHVSpan)k 240 fnt1 1742 3305(.)m 1892(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 2838(the)s 3172(right)s 3670(parameter)s 4670(may)s 5122(otherwise)s 6093(be)s 6362(an)s 6631(arbitrary)s 7492(object,)s 8169(including)s 0 3017(paragraphs)m 1100(of)s 1371(te)s 3(xt)k 1786(that)s 2204(require)s 2936(breaking.)s 480 2643(If)m 722(the)s 1082(right)s 1605(parameter)s 2631(of)s 220 fnt2 2914 2640(@Star)m -8(tHSpan)k 240 fnt1 4264 2643(,)m 220 fnt2 4383 2640(@Star)m -8(tVSpan)k 240 fnt1 5721 2643(,)m 5840(or)s 220 fnt2 6111 2640(@Star)m -8(tHVSpan)k 240 fnt1 7679 2643(occupies)m 8579(more)s 0 2355(horizontal)m 1022(or)s 1279(v)s 3(ertical)k 2044(space)s 2629(than)s 3095(all)s 3386(of)s 3655(the)s 4001(spanned)s 4842(columns)s 5701(or)s 5958(ro)s 6(ws)k 6466(combined)s 7466(require,)s 8247(the)s 8592(e)s 3(xtra)k 0 2067(space)m 601(goes)s 1106(into)s 1546(the)s 1908(last)s 2314(spanned)s 3172(column)s 3962(or)s 4235(ro)s 6(w)k 15(.)k 4765(Ov)s 3(erlapping)k 6026(spanning)s 6958(ro)s 6(ws)k 7483(and)s 7902(columns)s 8779(are)s 0 1779(permitted.)m 1081(Gaps)s 1626(spanned)s 2471(by)s 2767(span)s 3266(objects)s 3996(are)s 4345(unbreakable)s 5572(\(their)s 220 fnt2 6151 1776(u)m 240 fnt1 6321 1779(indicator)m 7232(is)s 7444(set)s 7772(automatically)s 0 1491(and)m 404(cannot)s 1102(be)s 1384(re)s 6(v)k 4(ok)k 2(ed\).)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 58 64 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(58)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 240 fnt5 0 13203(3.24.)m 591(@Scale)s [ /Dest /LOUTscale /DEST pdfmark [ /Dest /LOUT19_4605_pre_scal_1 /DEST pdfmark 240 fnt1 588 12771(This)m 1112(symbol)s 1920(geometrically)s 3335(scales)s 4004(its)s 4328(right)s 4887(parameter)s 5949(by)s 6291(the)s 6687(scale)s 7268(f)s 2(actor)k 7930(gi)s 6(v)k 3(en)k 8558(in)s 8850(its)s 0 12483(left)m 377(parameter:)s 220 fnt2 480 11982(1.0 @Scale Hello 2.0 @Scale Hello 0.5 @Scale Hello)m 240 fnt1 0 11527(has)m 370(result)s gsave 480 11019 translate 1.0000 1.0000 scale 0 -54(Hello)m grestore gsave 1124 11019 translate 2.0000 2.0000 scale 0 -54(Hello)m grestore gsave 2292 11019 translate 0.5000 0.5000 scale 0 -54(Hello)m grestore 0 10456(The)m 433(left)s 815(parameter)s 1834(can)s 2228(be)s 2515(tw)s 2(o)k 2930(scale)s 3468(f)s 2(actors,)k 4227(in)s 4475(which)s 5122(case)s 5594(the)s 5947(\207rst)s 6383(applies)s 7116(horizontally)s 15(,)k 8368(and)s 8778(the)s 0 10168(second)m 723(v)s 3(ertically:)k 220 fnt2 480 9667({0.5 2.0} @Scale Hello)m 240 fnt1 0 9173(has)m 370(result)s gsave 480 8665 translate 0.5000 2.0000 scale 0 -54(Hello)m grestore 0 8102(The)m 433(left)s 815(parameter)s 1834(may)s 2305(be)s 2592(empty)s 15(,)k 3287(in)s 3535(which)s 4182(case)s 4654(Lout)s 5171(will)s 5602(scale)s 6140(the)s 6493(object)s 7142(by)s 7441(a)s 7612(common)s 8512(f)s 2(actor)k 0 7814(horizontally)m 1209(and)s 1613(v)s 3(ertically)k 2565(so)s 2831(as)s 3081(to)s 3320(occup)s 2(y)k 4064(all)s 4357(a)s 4(v)k 6(ailable)k 5265(horizontal)s 6289(space:)s 220 fnt2 480 7313({} @Scale { Hello w)m 2(or)k -3(ld })k 240 fnt1 0 6819(has)m 370(result)s gsave 0 5661 translate 7.9648 7.9648 scale 0 -54(Hello)m 583(w)s 2(orld)k grestore 0 4757(The)m 433(right)s 949(parameter)s 1969(may)s 2440(be)s 2728(an)s 3(y)k 3130(object.)s 220 fnt2 3884 4754(@Scale)m 240 fnt1 4712 4757(has)m 5088(both)s 5576(a)s 220 fnt2 5748 4754(@OneCol)m 240 fnt1 6765 4757(and)m 7175(a)s 220 fnt2 7346 4754(@OneRo)m 3(w)k 240 fnt1 8483 4757(ef)m 6(fect,)k 0 4469(and)m 404(the)s 752(marks)s 1387(of)s 1658(the)s 2006(result)s 2596(coincide)s 3462(with)s 3944(the)s 4292(principal)s 5196(marks)s 5831(of)s 6102(the)s 6450(right)s 6961(parameter)s 13(.)k 240 fnt5 0 3676(3.25.)m 591(@Rotate)s [ /Dest /LOUTrotate /DEST pdfmark [ /Dest /LOUT19_4605_pre_rota_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_rota_2 /DEST pdfmark 240 fnt1 542 3244(The)m 220 fnt2 973 3241(@Rotate)m 240 fnt1 1897 3244(symbol)m 2660(will)s 3089(rotate)s 3691(its)s 3970(right)s 4484(parameter)s 5501(counterclockwise)s 7233(an)s 7519(amount)s 8300(gi)s 6(v)k 3(en)k 8883(in)s 0 2956(de)m 3(grees)k 778(\(positi)s 6(v)k 3(e)k 1661(or)s 1920(ne)s 3(g)k 1(ati)k 6(v)k 3(e\))k 2845(by)s 3139(its)s 3415(left)s 3792(parameter)s 13(.)k 4897(F)s 3(or)k 5286(e)s 3(xample,)k 220 fnt2 480 2455(30d @Rotate { hello)m 8(, w)k 2(or)k -3(ld })k 240 fnt1 0 1961(has)m 370(result)s gsave 534 1008 translate 30.0000 rotate 0 -54(hello,)m 583(w)s 2(orld)k grestore 0 482(Before)m 710(rotating)s 1511(the)s 1863(object,)s 220 fnt2 2559 479(@OneCol)m 240 fnt1 3576 482(and)m 220 fnt2 3984 479(@OneRo)m 3(w)k 240 fnt1 5120 482(are)m 5471(applied)s 6238(to)s 6482(it.)s 6782(The)s 7215(result)s 7809(is)s 8024(a)s 8195(rectangle)s 0 194(whose)m 668(marks)s 1303(pass)s 1766(through)s 2568(the)s 2916(point)s 3468(where)s 4108(the)s 4456(original)s 5254(marks)s 5889(crossed:)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 59 65 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Symbol %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1578(3.25.)m 1991(@Rotate)s 240 fnt5 10249 -1581(59)m gsave 1417 -15423 translate 240 fnt1 9066 13414 0 12644 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 1587 283 340 113 240 288 60 480 12531 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1587 283 340 113 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1587 283 340 113 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore grestore grestore end end restore grestore 240 fnt4 2547 12584(\336)m gsave 3256 12377 translate 240 fnt1 1515 1037 379 267 240 288 60 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 1515 1037 379 267 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1515 1037 379 267 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore gsave 379 267 translate 30.0000 rotate 1587 283 340 113 240 288 60 -340 -113 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 1587 283 340 113 240 288 60 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 1587 283 340 113 240 288 60 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore grestore grestore end end restore grestore grestore grestore grestore end end restore grestore 240 fnt1 0 11926(As)m 324(this)s 728(e)s 3(xample)k 1598(sho)s 6(ws,)k 2306(rotation)s 3113(by)s 3415(an)s 3705(angle)s 4287(other)s 4845(than)s 5322(a)s 5495(multiple)s 6355(of)s 6633(ninety)s 7293(de)s 3(grees)k 8079(introduces)s 0 11638(quite)m 534(a)s 700(lot)s 1012(of)s 1283(white)s 1870(space.)s 2565(So,)s 2925(for)s 3263(e)s 3(xample,)k 4177(the)s 4525(result)s 5115(of)s 220 fnt2 480 11130(-30d)m 968(@Rotate)s 1890(30d)s 2305(@Rotate)s 240 fnt6 3286 11135(object)m 240 fnt1 0 10632(is)m 210(a)s 376(much)s 965(lar)s 4(ger)k 1577(object)s 2221(than)s 240 fnt6 2690 10634(object)m 240 fnt1 3278 10632(,)m 3385(despite)s 4118(the)s 4466(f)s 2(act)k 4881(that)s 5299(one)s 5701(rotation)s 6501(cancels)s 7255(the)s 7603(other)s 13(.)k 480 10258(Rotation)m 1362(of)s 1634(objects)s 2363(containing)s 3427(recepti)s 6(v)k 3(e)k 4350(and)s 4755(recursi)s 6(v)k 3(e)k 5678(symbols)s 6528(is)s 6739(permitted,)s 7762(b)s 4(ut)k 8125(for)s 8464(angles)s 0 9970(other)m 553(than)s 1024(multiples)s 1967(of)s 2240(ninety)s 2894(de)s 3(grees)k 3675(it)s 3869(is)s 4082(best)s 4529(to)s 4770(mak)s 2(e)k 5345(the)s 5695(size)s 6125(of)s 6398(the)s 6748(rotated)s 7472(object)s 8118(clear)s 8644(with)s 220 fnt2 0 9679(@Wide)m 240 fnt1 774 9682(and)m 220 fnt2 1178 9679(@High)m 240 fnt1 1897 9682(symbols:)m 220 fnt2 480 9181(30d @Rotate 5i @Wide 4i @High)m 480 8893({ //1i @T)m 26(e)k 6(xtPlace)k 480 8605( //1i)m 480 8317(})m 240 fnt1 0 7823(This)m 532(is)s 798(because)s 1667(for)s 2061(angles)s 2779(other)s 3386(than)s 3911(multiples)s 4907(of)s 5234(ninety)s 5942(de)s 3(grees)k 6776(the)s 7180(space)s 7823(a)s 4(v)k 6(ailable)k 8788(for)s 220 fnt2 0 7532(@T)m 26(e)k 6(xtPlace)k 240 fnt1 1218 7535(to)m 1457(occup)s 2(y)k 2201(is)s 2411(indeterminate,)s 3831(and)s 4235(the)s 4583(result)s 5173(is)s 5383(poor)s 13(.)k 240 fnt5 0 6742(3.26.)m 591(@Backgr)s 4(ound)k [ /Dest /LOUTbackground /DEST pdfmark [ /Dest /LOUT19_4605_pre_back_1 /DEST pdfmark 240 fnt1 577 6265(The)m 220 fnt2 1042 6262(@Bac)m 4(kg)k 2(round)k 240 fnt1 2515 6265(symbol)m 3312(will)s 3775(print)s 4323(its)s 4637(left)s 5051(parameter)s 6102(in)s 6382(the)s 6767(background)s 7993(of)s 8301(its)s 8615(right)s 0 5977(parameter)m 13(.)k 1115(That)s 1624(is,)s 1901(the)s 2260(result)s 2860(has)s 3241(the)s 3600(size)s 4038(of)s 4319(the)s 4678(right)s 5200(parameter)s 9(,)k 6263(b)s 4(ut)k 6635(the)s 6994(left)s 7382(parameter)s 8407(will)s 8844(be)s 0 5689(printed)m 735(\207rst)s 1166(in)s 1409(the)s 1757(same)s 2304(space,)s 2942(with)s 3424(its)s 3700(marks)s 4335(aligned)s 5097(with)s 5579(the)s 5927(marks)s 6562(of)s 6833(the)s 7181(right)s 7692(parameter)s 13(.)k 240 fnt5 0 4896(3.27.)m 591(@K)s 6(er)k 3(nShrink)k [ /Dest /LOUTkernshrink /DEST pdfmark [ /Dest /LOUT19_4605_pre_kshr_1 /DEST pdfmark 240 fnt1 541 4464(This)m 1018(symbol)s 1779(returns)s 2495(its)s 2772(right)s 3284(parameter)s 4300(unchanged)s 5397(in)s 5641(appearance)s 6774(b)s 4(ut)k 7137(occup)s 2(ying)k 8187(a)s 8355(slightly)s 0 4176(smaller)m 770(bounding)s 1737(box.)s 2269(The)s 2705(reduction)s 3673(is)s 3891(by)s 4193(the)s 4549(amount)s 5335(of)s 5614(k)s 2(erning)k 6404(that)s 6830(w)s 2(ould)k 7493(be)s 7783(applied)s 8553(if)s 8778(the)s 0 3888(right)m 511(parameter)s 1525(w)s 2(as)k 1946(immediately)s 240 fnt6 3194 3890(followed)m 240 fnt1 4084 3888(by)m 4378(the)s 4726(left)s 5103(parameter)s 13(.)k 6208(F)s 3(or)k 6597(e)s 3(xample,)k 220 fnt2 480 3387(.)m 13( @K)k 8(er)k -5(nShr)k -3(ink P)k 240 fnt1 0 2932(has)m 370(result)s 104 158 0 54 240 288 60 480 2484 LoutGr2 LoutBox stroke grestore 0 0(P)m grestore 0 2033(where)m 649(a)s 824(box)s 1249(of)s 1529(size)s 1965(0)s 2150(has)s 2529(been)s 3048(dra)s 3(wn)k 3709(around)s 4441(the)s 4799(result)s 5398(to)s 5647(mak)s 2(e)k 6228(its)s 6513(e)s 3(xtent)k 7164(clear)s 13(.)k 7787(Compare)s 8730(this)s 0 1745(with)m 482(`P')s 806(alone:)s 130 158 0 54 240 288 60 480 1296 LoutGr2 LoutBox stroke grestore 0 0(P)m grestore 0 845(in)m 243(which)s 885(the)s 1232(bounding)s 2191(box)s 2605(e)s 3(xactly)k 3346(encloses)s 4206(the)s 4554(object,)s 5245(or)s 5503(at)s 5735(least)s 6231(is)s 6441(supposed)s 7390(to.)s 7740(The)s 8167(bounding)s 0 557(box)m 415(is)s 625(smaller)s 1387(on)s 1684(the)s 2032(right)s 2543(by)s 2837(the)s 3185(amount)s 3963(of)s 4234(k)s 2(erning)k 5016(that)s 5434(w)s 2(ould)k 6089(be)s 6371(applied)s 7133(between)s 7987(`P')s 8311(and)s 8715(`.)s 16('.)k 480 183(The)m 916(only)s 1405(kno)s 6(wn)k 2117(use)s 2501(for)s 2847(this)s 3252(symbol)s 4020(is)s 4239(to)s 4486(produce)s 5322(tuck)s 2(ed-in)k 6288(subscripts)s 7304(in)s 7555(the)s 7912(Eq)s 8245(equation)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 60 66 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(60)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(formatting)m 1061(package.)s 240 fnt5 0 12412(3.28.)m 591(@Common,)s 1872(@Rump,)s 2847(and)s 3288(@Meld)s [ /Dest /LOUTrump /DEST pdfmark [ /Dest /LOUT19_4605_pre_rump_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_rump_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_rump_3 /DEST pdfmark 240 fnt1 540 11935(The)m 220 fnt2 968 11932(@Common)m 240 fnt1 2127 11935(and)m 220 fnt2 2531 11932(@Rump)m 240 fnt1 3391 11935(symbols)m 4240(compare)s 5119(tw)s 2(o)k 5529(paragraph)s 6542(objects:)s 220 fnt2 480 11434({ Aardv)m 5(ar)k -3(k, 29 } @Common { Aardv)k 5(ar)k -3(k, 359 })k 240 fnt1 0 10940(If)m 234(either)s 842(parameter)s 1860(is)s 2075(not)s 2446(a)s 2616(paragraph)s 3634(object,)s 4329(it)s 4526(is)s 4741(con)s 9(v)k 3(erted)k 5734(into)s 6164(a)s 6334(single-object)s 7633(paragraph)s 8651(\207rst.)s 0 10652(The)m 418(result)s 998(of)s 220 fnt2 1259 10649(@Common)m 240 fnt1 2408 10652(is)m 2608(the)s 2946(common)s 3831(pre\207x)s 4433(of)s 4694(the)s 5032(tw)s 2(o)k 5432(paragraphs;)s 6583(that)s 6991(is,)s 7247(those)s 7798(initial)s 8398(objects)s 0 10364(which)m 640(are)s 985(equal)s 1555(in)s 1796(the)s 2142(tw)s 2(o)k 2549(paragraphs.)s 3760(In)s 4013(the)s 4359(e)s 3(xample)k 5220(abo)s 3(v)k 3(e,)k 5890(the)s 6236(result)s 6824(is)s 220 fnt2 7031 10361(Aardv)m 5(ar)k -3(k,)k 240 fnt1 7949 10364(.)m 8111(The)s 8536(result)s 0 10076(of)m 220 fnt2 271 10073(@Rump)m 240 fnt1 1131 10076(is)m 1341(that)s 1759(part)s 2190(of)s 2461(the)s 2809(second)s 3532(object)s 4176(which)s 4818(is)s 5028(not)s 5394(included)s 6276(in)s 220 fnt2 6519 10073(@Common)m 240 fnt1 7618 10076(;)m 7730(the)s 8078(result)s 8668(of)s 220 fnt2 480 9575({ Aardv)m 5(ar)k -3(k, 29 } @Rump { Aardv)k 5(ar)k -3(k, 359 })k 240 fnt1 0 9079(is)m 220 fnt2 210 9076(359)m 240 fnt1 567 9079(.)m 480 8705(If)m 698(the)s 1034(tw)s 2(o)k 1431(objects)s 2147(ha)s 4(v)k 3(e)k 2635(nothing)s 3408(in)s 3638(common,)s 4571(the)s 4907(result)s 5484(of)s 220 fnt2 5743 8702(@Common)m 240 fnt1 6889 8705(will)m 7303(be)s 7572(an)s 7843(empty)s 8482(object)s 0 8417(and)m 400(the)s 744(result)s 1330(of)s 220 fnt2 1597 8414(@Rump)m 240 fnt1 2453 8417(will)m 2874(be)s 3152(the)s 3496(second)s 4215(object.)s 4959(If)s 5185(the)s 5528(tw)s 2(o)k 5934(objects)s 6658(are)s 7001(identical,)s 7926(the)s 8270(result)s 8855(of)s 220 fnt2 0 8126(@Common)m 240 fnt1 1159 8129(will)m 1585(be)s 1867(the)s 2215(\207rst)s 2646(object,)s 3337(and)s 3741(the)s 4089(result)s 4679(of)s 220 fnt2 4950 8126(@Rump)m 240 fnt1 5810 8129(will)m 6236(be)s 6518(an)s 6801(empty)s 7453(object.)s 480 7755(The)m 933(only)s 1438(kno)s 6(wn)k 2167(use)s 2567(for)s 220 fnt2 2930 7752(@Rump)m 240 fnt1 3815 7755(and)m 220 fnt2 4244 7752(@Common)m 240 fnt1 5428 7755(is)m 5663(to)s 5927(implement)s 7034(mer)s 4(ged)k 7830(inde)s 3(x)k 8439(entries)s 0 7467(\(Section)m 853(2.8\).)s 480 7093(The)m 220 fnt2 942 7090(@Meld)m 240 fnt1 1723 7093(symbol)m 2518(returns)s 3267(the)s 3649(minimum)s 4674(meld)s 5245(of)s 5551(tw)s 2(o)k 5995(paragraphs,)s 7186(that)s 7639(is,)s 7940(the)s 8323(shortest)s 0 6805(paragraph)m 1013(that)s 1431(contains)s 2279(the)s 2627(tw)s 2(o)k 3037(original)s 3835(paragraphs)s 4935(as)s 5185(subsequences.)s 6652(F)s 3(or)k 7041(e)s 3(xample,)k 220 fnt2 480 6304({ Aardv)m 5(ar)k -3(k , 1 , 2 } @Meld { Aardv)k 5(ar)k -3(k , 2 , 3 })k 240 fnt1 0 5810(produces)m 480 5307(Aardv)m 6(ark)k 1438(,)s 1545(1)s 1700(,)s 1807(2)s 1981(,)s 2088(3)s 0 4823(The)m 455(result)s 1073(is)s 1310(related)s 2045(to)s 2312(the)s 2687(well-kno)s 6(wn)k 3909(longest)s 4688(common)s 5610(substring,)s 6622(in)s 6893(that)s 7338(the)s 7714(meld)s 8278(contains)s 0 4535(e)m 6(v)k 3(erything)k 1054(not)s 1407(in)s 1636(the)s 1971(lcs)s 2274(plus)s 2710(one)s 3099(cop)s 2(y)k 3604(of)s 3861(e)s 6(v)k 3(erything)k 4915(in)s 5145(the)s 5479(lcs.)s 5895(Where)s 6575(there)s 7094(are)s 7428(se)s 6(v)k 3(eral)k 8136(minimum)s 0 4247(melds,)m 220 fnt2 705 4244(@Meld)m 240 fnt1 1478 4247(returns)m 2219(the)s 2595(one)s 3024(in)s 3294(which)s 3964(the)s 4339(components)s 5574(of)s 5873(the)s 6248(\207rst)s 6706(parameter)s 7748(are)s 8122(as)s 8399(f)s 2(ar)k 8749(left)s 0 3959(as)m 250(possible.)s 480 3585(Determining)m 1764(the)s 2136(v)s 6(alues)k 2816(of)s 3110(all)s 3427(these)s 3998(symbols)s 4870(requires)s 5714(testing)s 6428(whether)s 7281(one)s 7707(component)s 8855(of)s 0 3297(the)m 372(\207rst)s 827(paragraph)s 1864(is)s 2098(equal)s 2695(to)s 2958(one)s 3384(component)s 4532(of)s 4827(the)s 5199(second.)s 6052(Since)s 6663(V)s 26(ersion)k 7475(3.25,)s 8026(the)s 8398(objects)s 0 3009(in)m 9(v)k 4(olv)k 3(ed)k 893(may)s 1372(be)s 1667(arbitrary)s 2555(and)s 2972(Lout)s 3497(will)s 3936(perform)s 4778(the)s 5139(necessary)s 6135(detailed)s 6962(checking)s 7892(for)s 8244(equality;)s 0 2721(pre)m 6(viously)k 15(,)k 1084(only)s 1552(simple)s 2233(w)s 2(ords)k 2855(were)s 3363(guaranteed)s 4458(to)s 4685(be)s 4954(tested)s 5557(correctly)s 15(.)k 6482(T)s 19(w)k 2(o)k 6941(w)s 2(ords)k 7563(are)s 7898(equal)s 8459(if)s 8663(the)s 3(y)k 0 2433(contain)m 761(the)s 1108(same)s 1655(sequence)s 2587(of)s 2858(characters,)s 3931(re)s 3(g)k 1(ardless)k 4945(of)s 5216(whether)s 6045(the)s 3(y)k 6508(are)s 6854(enclosed)s 7749(in)s 7991(quotes,)s 8722(and)s 0 2145(re)m 3(g)k 1(ardless)k 1008(of)s 1272(the)s 1612(current)s 2341(font)s 2778(or)s 3030(an)s 3(y)k 3419(other)s 3963(style)s 4462(information.)s 5747(Otherwise,)s 6828(objects)s 7549(are)s 7888(equal)s 8454(if)s 8663(the)s 3(y)k 0 1857(are)m 337(of)s 598(the)s 936(same)s 1473(type)s 1931(and)s 2325(ha)s 4(v)k 3(e)k 2816(the)s 3153(same)s 3690(parameters,)s 4834(including)s 5781(g)s 1(aps)k 6260(in)s 6493(concatenation)s 7868(objects.)s 8698(The)s 0 1569(sole)m 459(e)s 3(xception)k 1461(is)s 220 fnt2 1690 1566(@LinkSource)m 240 fnt1 3002 1569(,)m 3127(whose)s 3814(left)s 4209(parameter)s 5241(is)s 5470(ignored)s 6277(during)s 6974(equality)s 7816(testing,)s 8579(since)s 0 1281(otherwise)m 985(there)s 1518(w)s 2(ould)k 2173(be)s 2455(problems)s 3396(in)s 3639(the)s 3987(appearance)s 5118(of)s 5389(melded)s 6151(clickable)s 7069(inde)s 3(x)k 7653(entries.)s 480 907(Style)m 1023(changing)s 1949(operations)s 2991(\()s 220 fnt2 3064 904(@F)m 6(ont)k 240 fnt1 3716 907(,)m 220 fnt2 3819 904(@SetColour)m 240 fnt1 5071 907(etc.\))m 5532(are)s 5874(not)s 6236(considered)s 7325(in)s 7563(equality)s 8382(testing,)s 0 619(since)m 547(these)s 1094(ha)s 4(v)k 3(e)k 1595(been)s 2104(processed)s 3105(and)s 3508(deleted)s 4256(by)s 4550(the)s 4898(time)s 5378(that)s 5796(the)s 6143(tests)s 6618(are)s 6965(done.)s 7595(Also,)s 8154(Lout)s 8665(tries)s 0 331(hard)m 483(to)s 722(get)s 1074(rid)s 1397(of)s 1668(redundant)s 2685(braces)s 3346(around)s 4069(concatenation)s 5454(objects,)s 6238(which)s 6880(is)s 7090(wh)s 1(y)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 61 67 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.28.)m 1991(@Common,)s 3170(@Rump,)s 4042(and)s 4468(@Meld)s 240 fnt5 10256 -1583(61)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13207({ a { b c } } @Meld { { a b } c })m 240 fnt1 0 12713(produces)m 480 12210(a)m 646(b)s 819(c)s 0 11757(The)m 428(tw)s 2(o)k 838(parameters)s 1936(are)s 2283(equal)s 2856(by)s 3150(the)s 3498(time)s 3978(the)s 3(y)k 4441(are)s 4788(compared)s 5789(by)s 220 fnt2 6083 11754(@Meld)m 240 fnt1 6769 11757(.)m 480 11383(One)m 928(problematic)s 2114(area)s 2563(in)s 2799(the)s 3139(use)s 3506(of)s 3770(these)s 4309(operators)s 5241(is)s 5444(the)s 5784(de\207nition)s 6750(of)s 7014(equality)s 7830(when)s 8398(objects)s 0 11095(are)m 365(immediately)s 1631(adjacent.)s 2609(Lout)s 3139(contains)s 4005(an)s 4306(optimization)s 5589(which)s 6249(mer)s 4(ges)k 7004(immediately)s 8270(adjacent)s 0 10807(w)m 2(ords)k 634(whene)s 6(v)k 3(er)k 1615(the)s 3(y)k 2078(ha)s 4(v)k 3(e)k 2579(the)s 2927(same)s 3474(style.)s 4089(F)s 3(or)k 4478(e)s 3(xample,)k 220 fnt2 480 10309({Hello}{w)m 2(or)k -3(ld})k 240 fnt1 0 9815(w)m 2(ould)k 655(be)s 937(treated)s 1644(internally)s 2613(as)s 2863(one)s 3265(w)s 2(ord,)k 3862(whereas)s 220 fnt2 480 9314({Hello}{y)m 4(ello)k 3(w @Colour w)k 2(or)k -3(ld})k 240 fnt1 0 8816(w)m 2(ould)k 683(be)s 994(treated)s 1729(as)s 2008(tw)s 2(o)k 2447(adjacent)s 3331(w)s 2(ords.)k 4107(Thus,)s 4721(although)s 220 fnt2 5645 8813(@F)m 6(ont)k 240 fnt1 6297 8816(,)m 220 fnt2 6433 8813(@SetColour)m 240 fnt1 7630 8816(,)m 7765(and)s 8198(the)s 8575(other)s 0 8528(style)m 517(operators)s 1468(are)s 1825(ignored)s 2625(in)s 2878(equality)s 3713(testing,)s 4467(the)s 3(y)k 4941(may)s 5417(af)s 6(fect)k 6024(the)s 6382(structure)s 7284(of)s 7565(the)s 7924(objects)s 8663(the)s 3(y)k 0 8240(lie)m 294(within.)s 480 7866(At)m 810(present,)s 220 fnt2 1639 7863(@Common)m 240 fnt1 2830 7866(and)m 220 fnt2 3266 7863(@Rump)m 240 fnt1 4158 7866(treat)m 4673(all)s 4998(unmer)s 4(ged)k 6041(components)s 7281(of)s 7584(their)s 8113(paragraph)s 0 7578(as)m 278(separate,)s 1195(e)s 6(v)k 3(en)k 1724(if)s 1969(one)s 2399(is)s 2638(immediately)s 3914(adjacent)s 4799(to)s 5066(another)s 13(.)k 220 fnt2 5962 7575(@Common)m 240 fnt1 7150 7578(and)m 220 fnt2 7582 7575(@Rump)m 240 fnt1 8471 7578(w)m 2(ould)k 0 7290(thus)m 449(see)s 809(one)s 1210(component)s 2333(in)s 2574(the)s 2921(\207rst)s 3351(e)s 3(xample)k 4213(and)s 4615(tw)s 2(o)k 5024(in)s 5266(the)s 5613(second.)s 220 fnt2 6440 7287(@Meld)m 240 fnt1 7185 7290(treats)m 7751(each)s 8245(group)s 8855(of)s 0 7002(immediately)m 1239(adjacent)s 2086(components)s 3285(as)s 3526(a)s 3683(single)s 4301(component,)s 5463(so)s 5720(it)s 5903(w)s 2(ould)k 6549(see)s 6901(one)s 7294(component)s 8409(in)s 8643(both)s 0 6714(e)m 3(xamples;)k 1015(b)s 4(ut)k 1381(it)s 1577(w)s 2(ould)k 2235(still)s 2651(not)s 3021(report)s 3655(them)s 4196(as)s 4450(equal,)s 5079(since)s 5630(one)s 6035(is)s 6249(a)s 6419(single)s 7050(w)s 2(ord)k 7601(and)s 8009(the)s 8361(other)s 8916(is)s 0 6426(a)m 179(pair)s 623(of)s 907(adjacent)s 1777(w)s 2(ords.)k 2537(These)s 3177(confusing)s 4188(and)s 4605(inconsistent)s 5820(properties)s 6839(might)s 7471(be)s 7766(re)s 6(vised)k 8521(in)s 8778(the)s 0 6138(future.)m 754(See)s 1176(Section)s 1971(4.6)s 2345(for)s 2704(an)s 3008(e)s 3(xample)k 3892(of)s 4184(the)s 4553(practical)s 5450(use)s 5846(of)s 6138(these)s 6706(operators,)s 7723(in)s 7987(which)s 8650(v)s 3(ery)k 0 5850(small)m 564(unbreakable)s 1781(g)s 1(aps)k 2262(are)s 2600(used)s 3089(to)s 3320(ensure)s 3991(that)s 4401(apparently)s 5456(adjacent)s 6303(components)s 7503(are)s 7842(separate,)s 8722(and)s 220 fnt2 0 5559(@OneCol)m 240 fnt1 1026 5562(is)m 1250(used)s 1761(to)s 2014(pre)s 6(v)k 3(ent)k 2797(the)s 3159(w)s 2(ord)k 3721(mer)s 4(ging)k 4581(optimization)s 5860(from)s 6399(taking)s 7064(ef)s 6(fect)k 7674(when)s 8264(it)s 8471(w)s 2(ould)k 0 5274(otherwise)m 985(cause)s 1572(trouble.)s 240 fnt5 0 4530(3.29.)m 591(@Insert)s [ /Dest /LOUTinsert /DEST pdfmark [ /Dest /LOUT19_4605_pre_inse_1 /DEST pdfmark 240 fnt1 541 4098(The)m 220 fnt2 970 4095(@Inser)m -8(t)k 240 fnt1 1808 4098(symbol)m 2569(inserts)s 3245(its)s 3522(left)s 3901(parameter)s 4916(at)s 5149(the)s 5499(be)s 3(ginning)k 6508(of)s 6781(the)s 7130(\207rst)s 7563(paragraph)s 8577(of)s 8850(its)s 0 3810(right)m 511(parameter:)s 220 fnt2 480 3309(X @Inser)m -8(t { A B // C // D })k 240 fnt1 0 2815(is)m 210(equi)s 6(v)k 6(alent)k 1254(to)s 220 fnt2 480 2314({ XA B // C // D })m 240 fnt1 0 1820(Notice)m 707(that)s 1139(a)s 1320(zero-width)s 2426(space)s 3028(separates)s 220 fnt2 3968 1817(X)m 240 fnt1 4185 1820(from)m 4723(the)s 5085(\207rst)s 5531(paragraph,)s 6608(so)s 6889(if)s 7120(some)s 7696(wider)s 8314(space)s 8916(is)s 0 1532(required)m 857(it)s 1052(must)s 1580(be)s 1865(placed)s 2550(at)s 2785(the)s 3137(end)s 3544(of)s 220 fnt2 3818 1529(X)m 240 fnt1 3960 1532(.)m 4127(The)s 220 fnt2 4558 1529(@Inser)m -8(t)k 240 fnt1 5397 1532(operation)m 6361(is)s 6574(applied)s 7339(to)s 7581(the)s 7932(v)s 6(alue)k 8503(of)s 8778(the)s 0 1244(right)m 511(parameter)s 1525(after)s 2021(e)s 6(v)k 6(aluation.)k 480 870(The)m 917(only)s 1407(kno)s 6(wn)k 2121(use)s 2506(for)s 2853(this)s 3259(symbol)s 4029(is)s 4249(to)s 4498(attach)s 5134(something)s 6194(lik)s 2(e)k 240 fnt5 6616 869(Figur)m 4(e)k 7355(6)s 240 fnt1 7538 870(to)m 7787(the)s 8145(front)s 8679(of)s 8960(a)s 0 582(multi-paragraph)m 1596(caption.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 62 68 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(62)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 240 fnt5 0 13203(3.30.)m 591(@OneOf)s [ /Dest /LOUToneof /DEST pdfmark [ /Dest /LOUT19_4605_pre_oneo_1 /DEST pdfmark 240 fnt1 534 12771(The)m 220 fnt2 956 12768(@OneOf)m 240 fnt1 1877 12771(symbol)m 2631(returns)s 3339(one)s 3734(of)s 3999(the)s 4341(sequence)s 5268(of)s 5533(objects)s 6254(which)s 6890(is)s 7094(its)s 7364(right)s 7869(parameter)s 8876(as)s 0 12483(its)m 276(result:)s 220 fnt2 480 12032(@OneOf {)m 480 11744( @ResultA)m 480 11456( @ResultB)m 480 11168( @ResultC)m 480 10880(})m 240 fnt1 0 10386(The)m 451(choice)s 1155(is)s 1388(made)s 1986(to)s 2248(ensure)s 2952(that)s 3393(whate)s 6(v)k 3(er)k 4344(g)s 1(alle)k 3(y)k 5001(tar)s 4(get)k 5624(is)s 5857(required)s 6735(at)s 6990(the)s 7362(moment)s 8229(is)s 8463(found.)s 0 10098(F)m 3(or)k 389(e)s 3(xample,)k 1304(if)s 1522(we)s 1858(are)s 2206(e)s 6(v)k 6(aluating)k 220 fnt2 3244 10095(@OneOf)m 240 fnt1 4172 10098(as)m 4423(part)s 4855(of)s 5127(an)s 5411(attempt)s 6188(to)s 6428(attach)s 7056(a)s 7223(g)s 1(alle)k 3(y)k 7858(whose)s 8527(tar)s 4(get)k 0 9810(is)m 220 fnt2 222 9807(@SomeT)m 26(arget)k 240 fnt1 1622 9810(,)m 1741(then)s 2223(the)s 2583(result)s 3186(abo)s 3(v)k 3(e)k 3820(will)s 4259(be)s 220 fnt2 4553 9807(@ResultA)m 240 fnt1 5613 9810(if)m 5843(it)s 6047(contains)s 220 fnt2 6908 9807(@SomeT)m 26(arget)k 240 fnt1 8308 9810(,)m 8427(or)s 8699(else)s 220 fnt2 0 9519(@ResultB)m 240 fnt1 1042 9522(if)m 1260(it)s 1453(contains)s 220 fnt2 2302 9519(@SomeT)m 26(arget)k 240 fnt1 3702 9522(,)m 3810(or)s 4070(else)s 220 fnt2 4498 9519(@ResultC)m 240 fnt1 5552 9522(\(whether)m 6462(or)s 6722(not)s 7089(it)s 7282(contains)s 8131(the)s 8480(tar)s 4(get,)k 0 9234(or)m 259(if)s 476(there)s 1009(is)s 1219(no)s 1512(tar)s 4(get\).)k 480 8860(Use)m 930(of)s 220 fnt2 1224 8857(@OneOf)m 240 fnt1 2174 8860(in)m 2440(conjunction)s 3650(with)s 4155(recursi)s 6(v)k 3(e)k 5100(symbols)s 5972(can)s 6384(lead)s 6863(to)s 7125(problems.)s 8202(Consider)s 0 8572(this)m 396(e)s 3(xample:)k 220 fnt2 480 8071(def @Recursiv)m 5(e {)k 480 7495( def @ChoiceA { @APlace // @Recursiv)m 5(e })k 480 6919( def @ChoiceB { @BPlace // @Recursiv)m 5(e })k 480 6343( @OneOf {)m 480 6055( @ChoiceA)m 480 5767( @ChoiceB)m 480 5479( })m 480 5191(})m 240 fnt1 0 4697(Lout)m 523(belie)s 6(v)k 3(es)k 1360(that)s 1790(e)s 3(xpanding)k 220 fnt2 2849 4694(@Recursiv)m 5(e)k 240 fnt1 4106 4697(is)m 4328(the)s 4687(right)s 5210(thing)s 5767(to)s 6017(do)s 6322(when)s 6910(searching)s 7890(for)s 8240(either)s 8855(of)s 0 4409(the)m 380(g)s 1(alle)k 3(y)k 1046(tar)s 4(gets)k 220 fnt2 1762 4406(@APlace)m 240 fnt1 2763 4409(and)m 220 fnt2 3199 4406(@BPlace)m 240 fnt1 4108 4409(.)m 4305(When)s 4966(searching)s 5968(for)s 220 fnt2 6338 4406(@BPlace)m 240 fnt1 7339 4409(this)m 7768(leads)s 8342(Lout)s 8887(to)s 0 4121(e)m 3(xpand)k 220 fnt2 760 4118(@Recursiv)m 5(e)k 240 fnt1 1945 4121(,)m 2065(then)s 220 fnt2 2547 4118(@ChoiceA)m 240 fnt1 3596 4121(,)m 3717(then)s 4199(the)s 220 fnt2 4560 4118(@Recursiv)m 5(e)k 240 fnt1 5818 4121(symbol)m 6592(within)s 220 fnt2 7273 4118(@ChoiceA)m 240 fnt1 8322 4121(,)m 8442(and)s 8860(so)s 0 3833(on)m 320(in\207nitely)s 15(.)k 1355(This)s 1854(problem)s 2734(can)s 3146(be)s 3451(a)s 4(v)k 4(oided)k 4283(by)s 4600(attaching)s 5552(a)s 220 fnt2 5741 3830(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 7291 3833(symbol)m 8074(to)s 8336(each)s 8855(of)s 0 3545(the)m 357(inner)s 220 fnt2 918 3542(@Recursiv)m 5(e)k 240 fnt1 2172 3545(symbols:)m 3146(these)s 3703(are)s 4059(then)s 4538(not)s 4914(a)s 4(v)k 6(ailable)k 5831(for)s 6179(e)s 3(xpansion)k 7214(until)s 7716(a)s 7892(decision)s 8756(has)s 0 3257(been)m 510(made)s 1085(to)s 1326(e)s 3(xpand)k 2074(the)s 2424(symbol)s 3185(the)s 3(y)k 3650(lie)s 3945(within.)s 4721(In)s 4979(this)s 5376(particular)s 6352(e)s 3(xample)k 7216(it)s 7410(w)s 2(ould)k 8066(be)s 8350(simpler)s 0 2969(to)m 239(write)s 220 fnt2 480 2517(def @Recursiv)m 5(e {)k 480 1941( @OneOf {)m 480 1653( @APlace)m 480 1365( @BPlace)m 480 1077( })m 480 789( // @Recursiv)m 5(e)k 480 501(})m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 63 69 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1578(3.30.)m 1991(@OneOf)s 240 fnt5 10250 -1581(63)m gsave 1417 -15423 translate 240 fnt1 9066 13370 0 13261 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13207(b)m 4(ut)k 378(this)s 791(f)s 2(actoring)k 1720(is)s 1947(not)s 2329(possible)s 3186(when)s 3778(the)s 4143(recursi)s 6(v)k 3(e)k 5081(calls)s 5586(ha)s 4(v)k 3(e)k 6103(parameters)s 7218(that)s 7652(are)s 8016(required)s 8887(to)s 0 12919(dif)m 6(fer)k 583(in)s 826(the)s 1174(tw)s 2(o)k 1584(cases.)s 240 fnt5 0 12175(3.31.)m 591(@Next)s [ /Dest /LOUTnext /DEST pdfmark [ /Dest /LOUT19_4605_pre_next_1 /DEST pdfmark 240 fnt1 535 11743(The)m 220 fnt2 957 11740(@Ne)m 6(xt)k 240 fnt1 1676 11743(symbol)m 2430(returns)s 3138(its)s 3409(parameter)s 4417(plus)s 4861(one.)s 5366(It)s 5565(is)s 5769(rather)s 6380(cle)s 6(v)k 3(er)k 7008(at)s 7234(w)s 2(orking)k 8078(this)s 8468(out:)s 8934(it)s 0 11455(hunts)m 570(through)s 1372(the)s 1720(parameter)s 2734(from)s 3258(right)s 3769(to)s 4008(left,)s 4432(looking)s 5217(for)s 5555(a)s 5721(number)s 6512(to)s 6751(increment:)s 220 fnt2 480 10954(@Ne)m 6(xt \(3.99\))k 240 fnt1 0 10458(has)m 404(result)s 1029(\(3.100\).)s 1925(If)s 220 fnt2 2190 10455(@Ne)m 6(xt)k 240 fnt1 2949 10458(cannot)m 3681(\207nd)s 4147(a)s 4348(digit)s 4880(inside)s 5542(its)s 5852(parameter)s 9(,)k 6939(it)s 7166(is)s 7410(an)s 7728(error)s 13(.)k 8377(Roman)s 0 10170(numerals)m 925(are)s 1270(handled)s 2084(by)s 2376(storing)s 3091(them)s 3627(in)s 3868(a)s 4032(database,)s 4960(as)s 5208(e)s 3(xplained)k 6191(in)s 6432(Section)s 7204(4.2;)s 220 fnt2 7614 10167(@Ne)m 6(xt)k 240 fnt1 8336 10170(will)m 8760(not)s 0 9882(increment)m 1015(a)s 1181(Roman)s 1930(numeral.)s 240 fnt5 0 9139(3.32.)m 591(@Case)s [ /Dest /LOUTcase /DEST pdfmark [ /Dest /LOUT19_4605_pre_case_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_case_2 /DEST pdfmark 240 fnt1 540 8707(The)m 220 fnt2 968 8704(@Case)m 240 fnt1 1755 8707(symbol)m 2515(selects)s 3202(its)s 3478(result)s 4068(from)s 4592(a)s 4758(list)s 5109(of)s 5380(alternati)s 6(v)k 3(es,)k 6578(depending)s 7629(on)s 7926(a)s 8092(tag:)s 220 fnt2 480 8206(@Da)m 6(y @Case {)k 480 7918( { 1 21 31 } @Y)m 4(ield st)k 480 7630( { 2 22 } @Y)m 4(ield nd)k 480 7342( { 3 23 } @Y)m 4(ield rd)k 480 7054( else @Y)m 4(ield th)k 480 6766(})m 240 fnt1 0 6272(In)m 257(this)s 654(e)s 3(xample)k 1518(the)s 1868(result)s 2459(will)s 2886(be)s 3169(st)s 3390(if)s 220 fnt2 3608 6269(@Da)m 6(y)k 240 fnt1 4274 6272(is)m 4485(1,)s 4714(21,)s 5062(or)s 5322(31,)s 5670(and)s 6076(nd)s 6375(if)s 220 fnt2 6593 6269(@Da)m 6(y)k 240 fnt1 7259 6272(is)m 7471(2)s 7646(or)s 7906(22,)s 8254(etc.)s 8698(The)s 0 5984(ef)m 6(fect)k 594(is)s 801(similar)s 1520(to)s 1756(accessing)s 2722(a)s 2885(database,)s 3812(though)s 4532(in)s 4773(a)s 4936(more)s 5480(compact)s 6347(form.)s 6972(The)s 7397(right)s 7905(parameter)s 8916(is)s 0 5696(a)m 171(sequence)s 1109(of)s 220 fnt2 1385 5693(@Y)m 4(ield)k 240 fnt1 2143 5696(symbols,)m 3053(each)s 3553(with)s 4040(a)s 4211(left)s 4594(parameter)s 5613(whose)s 6286(v)s 6(alue)k 6859(is)s 7074(a)s 7245(sequence)s 8183(of)s 8459(one)s 8867(or)s 0 5408(more)m 547(juxtapositions)s 1940(of)s 2211(simple)s 2904(w)s 2(ords,)k 3594(and)s 3998(a)s 4164(right)s 4675(parameter)s 5689(which)s 6331(may)s 6797(be)s 7079(an)s 3(y)k 7476(object.)s 480 5034(W)m 19(e)k 895(\207rst)s 1372(describe)s 2271(the)s 2665(beha)s 4(viour)k 3725(when)s 4347(the)s 4742(v)s 6(alue)k 5356(of)s 5674(the)s 6068(left)s 6492(parameter)s 7552(of)s 220 fnt2 7870 5031(@Case)m 240 fnt1 8703 5034(is)m 8960(a)s 0 4746(juxtaposition)m 1302(of)s 1568(one)s 1965(or)s 2220(more)s 2762(simple)s 3450(w)s 2(ords.)k 4193(Then)s 4737(the)s 5080(result)s 5666(of)s 5932(the)s 220 fnt2 6275 4743(@Case)m 240 fnt1 7058 4746(is)m 7263(the)s 7606(right)s 8112(parameter)s 0 4458(of)m 287(the)s 652(\207rst)s 220 fnt2 1100 4455(@Y)m 4(ield)k 240 fnt1 1870 4458(whose)m 2554(left)s 2948(parameter)s 3979(contains)s 4844(either)s 5463(the)s 5828(v)s 6(alue)k 6413(of)s 6701(the)s 7065(left)s 7459(parameter)s 8490(of)s 8778(the)s 220 fnt2 0 4167(@Case)m 240 fnt1 727 4170(,)m 834(or)s 1093(the)s 1441(special)s 2159(v)s 6(alue)k 220 fnt2 2727 4167(else)m 240 fnt1 3121 4170(.)m 3285(If)s 3515(there)s 4048(is)s 4258(no)s 4551(such)s 220 fnt2 5047 4167(@Y)m 4(ield)k 240 fnt1 5800 4170(it)m 5992(is)s 6202(an)s 6485(error)s 13(.)k 480 3796(When)m 1133(the)s 1506(left)s 1908(parameter)s 2946(of)s 220 fnt2 3242 3793(@Case)m 240 fnt1 4054 3796(is)m 4288(not)s 4679(a)s 4870(juxtaposition)s 6200(of)s 6496(simple)s 7214(w)s 2(ords,)k 7928(the)s 8301(result)s 8916(is)s 0 3508(the)m 350(right)s 864(parameter)s 1881(of)s 2155(the)s 2506(\207rst)s 220 fnt2 2940 3505(@Y)m 4(ield)k 240 fnt1 3696 3508(whose)m 4367(left)s 4746(parameter)s 5763(is)s 220 fnt2 5976 3505(else)m 240 fnt1 6370 3508(,)m 6480(or)s 6742(an)s 7028(error)s 7554(otherwise.)s 8650(This)s 0 3220(permits)m 767(e)s 3(xamples)k 1718(lik)s 2(e)k 220 fnt2 480 2719(@RunningTitle @Case {)m 480 2431( dft @Y)m 4(ield @Title)k 480 2143( else @Y)m 4(ield @RunningTitle)k 480 1855(})m 240 fnt1 0 1361(where)m 661(a)s 848(running)s 1667(title)s 2115(is)s 2346(returned)s 3221(unless)s 3892(it)s 4105(has)s 4496(the)s 4866(v)s 6(alue)k 220 fnt2 5455 1358(dft)m 240 fnt1 5776 1361(\(which)m 6519(presumably)s 7710(means)s 8393(that)s 8833(no)s 0 1073(running)m 798(title)s 1224(w)s 2(as)k 1645(supplied\),)s 2642(in)s 2885(which)s 3527(case)s 3994(an)s 4277(ordinary)s 5141(title)s 5567(is)s 5777(returned)s 6631(instead.)s 480 699(When)m 1127(a)s 1311(recepti)s 6(v)k 3(e)k 2251(symbol)s 3029(is)s 3257(placed)s 3957(within)s 4643(a)s 220 fnt2 4827 696(@Case)m 240 fnt1 5554 699(,)m 5679(it)s 5889(should)s 6604(be)s 6904(included)s 7804(in)s 8065(each)s 8579(alter)s 4(-)k 0 411(nati)m 6(v)k 3(e,)k 695(since)s 1255(otherwise)s 2254(Basser)s 2964(Lout)s 3490(may)s 3969(become)s 4783(confused)s 5718(when)s 6308(trying)s 6945(to)s 7198(predict)s 7934(whether)s 8778(the)s 0 123(symbol)m 755(will)s 1176(be)s 1453(a)s 1613(part)s 2039(of)s 2305(the)s 2648(result)s 3232(or)s 3486(not.)s 3951(Alternati)s 6(v)k 3(ely)k 15(,)k 5288(if)s 5500(it)s 5687(can)s 6071(be)s 6347(guaranteed)s 7449(that)s 7862(the)s 8204(recepti)s 6(v)k 3(e)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 64 70 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(64)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(symbol)m 764(will)s 1195(ne)s 6(v)k 3(er)k 1782(be)s 2069(searched)s 2967(for)s 3310(when)s 3891(the)s 4244(cases)s 4804(that)s 5226(it)s 5423(does)s 5918(not)s 6289(lie)s 6587(within)s 7260(are)s 7612(selected,)s 8493(that)s 8916(is)s 0 12917(all)m 293(right)s 804(too.)s 240 fnt5 0 12124(3.33.)m 591(@Moment)s [ /Dest /LOUTmoment /DEST pdfmark 240 fnt1 480 11692(The)m 908(prede\207ned)s 1976(symbol)s 220 fnt2 2736 11689(@Moment)m [ /Dest /LOUT19_4605_pre_mome_1 /DEST pdfmark 240 fnt1 3808 11692(has)m 4178(the)s 4526(follo)s 6(wing)k 5503(de\207nition:)s 220 fnt2 480 11191(def @Moment)m 480 10903( named @T)m 26(ag {})k 480 10615( named @Second {})m 480 10327( named @Min)m 2(ute {})k 480 10039( named @Hour {})m 480 9751( named @Da)m 6(y {})k 480 9463( named @Month {})m 480 9175( named @Y)m 30(ear {})k 480 8887( named @Centur)m -6(y {})k 480 8599( named @W)m 6(eekDa)k 6(y {})k 480 8311( named @Y)m 30(earDa)k 6(y {})k 480 8023( named @Da)m 6(ylightSa)k 4(ving {})k 480 7735({})m 240 fnt1 0 7241(It)m 208(may)s 677(be)s 962(used)s 1463(lik)s 2(e)k 1878(an)s 3(y)k 2278(other)s 2832(symbol.)s 3705(Lout)s 4220(pro)s 3(vides)k 5095(an)s 5381(in)s 9(v)k 4(ocation)k 6439(of)s 220 fnt2 6713 7238(@Moment)m 240 fnt1 7788 7241(with)m 8273(tag)s 220 fnt2 8622 7238(no)m 3(w)k 240 fnt1 9019 7241(,)m 0 6953(whose)m 668(other)s 1219(parameters)s 2317(are)s 2664(numbers)s 3539(encoding)s 4470(the)s 4818(current)s 5554(date)s 6008(and)s 6412(time:)s 220 fnt2 480 6388(@Second)m 240 fnt1 2482 6391(the)m 2830(current)s 3566(second,)s 4338(usually)s 5083(between)s 5937(00)s 6232(and)s 6636(59)s 220 fnt2 480 6057(@Min)m 2(ute)k 240 fnt1 2482 6060(the)m 2830(current)s 3566(minute,)s 4337(between)s 5191(00)s 5486(and)s 5890(59)s 220 fnt2 480 5747(@Hour)m 240 fnt1 2482 5750(the)m 2830(current)s 3566(hour)s 9(,)k 4103(between)s 4957(00)s 5252(and)s 5656(23)s 220 fnt2 480 5437(@Da)m 6(y)k 240 fnt1 2482 5440(the)m 2830(current)s 3566(day)s 3966(of)s 4237(the)s 4585(month,)s 5304(between)s 6158(1)s 6313(and)s 6717(31)s 220 fnt2 480 5108(@Month)m 240 fnt1 2482 5111(the)m 2830(current)s 3566(month,)s 4285(between)s 5139(1)s 5294(\(January\))s 6245(and)s 6649(12)s 6943(\(December\))s 220 fnt2 480 4779(@Y)m 30(ear)k 240 fnt1 2482 4782(the)m 2830(current)s 3566(year)s 4037(of)s 4308(the)s 4656(century)s 15(,)k 5465(between)s 6319(00)s 6614(and)s 7018(99)s 220 fnt2 480 4450(@Centur)m -6(y)k 240 fnt1 2482 4453(the)m 2830(current)s 3566(century)s 15(,)k 4375(e.g.)s 4765(19)s 5056(or)s 5315(20)s 220 fnt2 480 4121(@W)m 6(eekDa)k 6(y)k 240 fnt1 2482 4124(the)m 2830(current)s 3566(day)s 3966(of)s 4237(the)s 4585(week,)s 5197(between)s 6051(1)s 6206(\(Sunday\))s 7132(and)s 7536(7)s 7704(\(Saturday\))s 220 fnt2 480 3790(@Y)m 30(earDa)k 6(y)k 240 fnt1 2482 3793(the)m 2830(current)s 3566(day)s 3966(of)s 4237(the)s 4585(year)s 9(,)k 5094(between)s 5948(0)s 6123(and)s 6527(365)s 220 fnt2 480 3461(@Da)m 6(ylightSa)k 4(ving)k 240 fnt1 2482 3464(an)m 2784(implementation-dependent)s 5427(number)s 6237(that)s 6675(may)s 7160(encode)s 7914(the)s 8282(daylight)s 2482 3176(sa)m 4(ving)k 3156(currently)s 4072(in)s 4315(ef)s 6(fect)k [ /Dest /LOUT19_4605_pre_mome_2 /DEST pdfmark 0 2615(Unix)m 519(manual)s 1262(entries)s 1934(state)s 2411(that)s 220 fnt2 2814 2612(@Second)m 240 fnt1 3813 2615(can)m 4186(be)s 4453(as)s 4687(high)s 5155(as)s 5389(61,)s 5720(to)s 5944(allo)s 6(w)k 6507(for)s 6830(leap)s 7265(seconds.)s 8171(Judicious)s 0 2327(use)m 375(of)s 646(databases)s 1613(can)s 2002(con)s 9(v)k 3(ert)k 2767(these)s 3314(numbers)s 4189(into)s 4614(useful)s 5253(dates.)s 5908(F)s 3(or)k 6297(e)s 3(xample,)k 220 fnt2 480 1826(@Moment&&no)m 3(w @Open { @Da)k 6(y {@Months&&@Month}, @Centur)k -6(y{@Y)k 30(ear} })k 240 fnt1 0 1328(produces)m 915(something)s 1965(lik)s 2(e)k 2377(14)s 2671(October)s 9(,)k 3539(2008)s 4066(gi)s 6(v)k 3(en)k 4646(a)s 4812(suitable)s 5611(database)s 6490(of)s 6761(months.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 65 71 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.34.)m 1991(@Null)s 240 fnt5 10250 -1583(65)m gsave 1417 -15423 translate 240 fnt1 9066 13412 0 13412 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 240 fnt5 0 13247(3.34.)m 591(@Null)s [ /Dest /LOUTnull /DEST pdfmark 240 fnt1 480 12815(This)m 979(symbol)s [ /Dest /LOUT19_4605_pre_null_1 /DEST pdfmark 1762(pro)s 3(vides)k 2657(a)s 2846(con)s 9(v)k 3(enient)k 3967(w)s 2(ay)k 4441(to)s 4703(remo)s 3(v)k 3(e)k 5493(unw)s 2(anted)k 6503(concatenation)s 7911(symbols.)s 8896(If)s 0 12527(there)m 544(is)s 765(a)s 942(concatenation)s 2339(symbol)s 3110(preceding)s 220 fnt2 4117 12524(@Null)m 240 fnt1 4702 12527(,)m 4821(the)s 220 fnt2 5180 12524(@Null)m 240 fnt1 5836 12527(and)m 6252(the)s 6611(concatenation)s 8007(symbol)s 8779(are)s 0 12239(both)m 482(deleted.)s 1335(Otherwise,)s 2423(if)s 2638(there)s 3170(is)s 3379(a)s 3544(follo)s 6(wing)k 4519(concatenation)s 5903(symbol,)s 6714(it)s 6905(and)s 7307(the)s 220 fnt2 7654 12236(@Null)m 240 fnt1 8298 12239(are)m 8643(both)s 0 11951(deleted.)m 794(Otherwise,)s 220 fnt2 1883 11948(@Null)m 240 fnt1 2528 11951(becomes)m 3416(an)s 3699(empty)s 4351(object.)s 480 11577(These)m 1107(rules)s 1622(apply)s 2208(to)s 2447(a)s 2613(fully)s 3118(parenthesized)s 4490(v)s 3(ersion)k 5248(of)s 5519(the)s 5867(e)s 3(xpression.)k 7051(F)s 3(or)k 7440(e)s 3(xample,)k 8354(in)s 220 fnt2 480 11076(...)m 13( //1vx @Null |0.5i ...)k 240 fnt1 0 10621(it)m 202(is)s 423(the)s 782(horizontal)s 1817(concatenation)s 3213(symbol)s 3984(follo)s 6(wing)k 220 fnt2 4972 10618(@Null)m 240 fnt1 5628 10621(that)m 6057(disappears,)s 7184(because)s 8008(in)s 8262(the)s 8621(fully)s 0 10333(parenthesized)m 1372(v)s 3(ersion)k 220 fnt2 480 9832(...)m 13( //1vx { @Null |0.5i ...)k 13( })k 240 fnt1 0 9338(there)m 533(is)s 743(no)s 1036(concatenation)s 2421(symbol)s 3181(preceding)s 4177(the)s 220 fnt2 4525 9335(@Null)m 240 fnt1 5110 9338(.)m 240 fnt5 0 8545(3.35.)m 591(@Galley)s 1534(and)s 1975(@F)s 6(or)k 4(ceGalley)k [ /Dest /LOUTgalley /DEST pdfmark 240 fnt1 480 8068(These)m 1131(symbols)s [ /Dest /LOUT19_4605_pre_gall_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_gall_2 /DEST pdfmark 2004(both)s 2511(act)s 2874(as)s 3148(a)s 3338(placeholder)s 4538(for)s 4900(a)s 5090(g)s 1(alle)k 3(y)k 15(.)k 5844(That)s 6366(is,)s 6656(the)s 3(y)k 7144(may)s 7634(be)s 7940(replaced)s 8832(by)s 0 7780(components)m 1210(of)s 1483(a)s 1651(g)s 1(alle)k 3(y)k 15(.)k 2383(In)s 2641(the)s 2991(case)s 3460(of)s 220 fnt2 3734 7777(@F)m 6(orceGalle)k 4(y)k 240 fnt1 5189 7780(the)m 5539(g)s 1(alle)k 3(y)k 6175(will)s 6604(then)s 7075(ha)s 4(v)k 3(e)k 7578(a)s 7746(forcing)s 8492(g)s 1(alle)k 3(y)k 0 7492(ef)m 6(fect)k 583(at)s 802(this)s 1184(point)s 1723(although)s 2604(it)s 2783(need)s 3280(not)s 3632(be)s 3901(declared)s 4754(using)s 220 fnt2 5313 7489(f)m 6(orce into)k 240 fnt1 6202 7492(.)m 6353(See)s 6740(Section)s 7501(2.7)s 7835(for)s 8160(a)s 8312(detailed)s 0 7204(discussion)m 1054(of)s 1325(g)s 1(alle)k 3(ys,)k 2105(forcing)s 2848(g)s 1(alle)k 3(ys,)k 3628(and)s 4032(tar)s 4(gets.)k 240 fnt5 0 6411(3.36.)m 591(@BeginHeaderComponent,)s 3466(@EndHeaderComponent,)s 6182(@SetHeaderComponent,)s 591 6123(and)m 1032(@ClearHeaderComponent)s [ /Dest /LOUTheader_comp /DEST pdfmark 240 fnt1 480 5646(Informally)m 15(,)k 1597(header)s 2298(components)s 3510(are)s 3861(running)s 4663(headers)s 5448(that)s 5871(appear)s 6572(at)s 6808(the)s [ /Dest /LOUT19_4605_pre_head_1 /DEST pdfmark 7160(top)s 7523(of)s 7798(the)s 8151(displayed)s 0 5358(se)m 3(gments)k 936(of)s 1204(g)s 1(alle)k 3(ys.)k 2039(The)s 3(y)k 2579(are)s 2923(used,)s 3467(for)s 3802(e)s 3(xample,)k 4714(by)s 5005(the)s 220 fnt2 5350 5355(@Tb)m 4(l)k 240 fnt1 5917 5358(table)m 6434(formatting)s 7493(package)s 8330(to)s 8566(place)s 0 5070(running)m 798(headers)s 1579(at)s 1811(the)s 2159(top)s 2518(of)s 2789(each)s 3284(page)s 3792(of)s 4063(a)s 4229(multi-page)s 5320(table,)s 5891(after)s 6387(the)s 6735(\207rst)s 7166(page.)s 480 4696(F)m 3(ormally)k 15(,)k 1431(a)s 1583(header)s 2266(component)s 3376(of)s 3633(a)s 3785(g)s 1(alle)k 3(y)k 4405(is)s 4601(an)s 4870(ordinary)s 5720(component)s 6830(of)s 7087(a)s 7239(g)s 1(alle)k 3(y)k 7859(\(Section)s 8698(2.7\))s 0 4408(together)m 845(with)s 1330(an)s 1616(indication)s 2631(that)s 3052(the)s 3403(component)s 4530(is)s 4742(a)s 4911(header)s 5611(component.)s 6841(When)s 7473(printed,)s 8260(a)s 8429(header)s 0 4120(component)m 1125(looks)s 1696(e)s 3(xactly)k 2438(lik)s 2(e)k 2851(it)s 3045(w)s 2(ould)k 3701(ha)s 4(v)k 3(e)k 4203(done)s 4726(as)s 4977(an)s 5262(ordinary)s 6127(component;)s 7304(the)s 7653(dif)s 6(ference)k 8671(is)s 8883(in)s 0 3832(whether)m 830(the)s 1178(component)s 2302(is)s 2512(printed)s 3247(at)s 3479(all,)s 3824(and)s 4228(if)s 4445(so)s 4711(where.)s 480 3458(Ev)m 3(ery)k 1109(non-header)s 2253(component)s 3384(of)s 3663(e)s 6(v)k 3(ery)k 4246(g)s 1(alle)k 3(y)k 4888(has)s 5266(associated)s 6313(with)s 6803(it)s 7002(a)s 7176(sequence)s 8116(of)s 8395(zero)s 8867(or)s 0 3170(more)m 553(header)s 1257(components.)s 2585(Whene)s 6(v)k 3(er)k 3625(a)s 3798(g)s 1(alle)k 3(y)k 4439(attaches)s 5266(to)s 5511(a)s 5684(tar)s 4(get,)k 6337(and)s 6748(the)s 7102(tar)s 4(get)k 7708(does)s 8205(not)s 8578(itself)s 0 2882(occup)m 2(y)k 736(an)s 1010(entire)s 1601(component)s 2716(of)s 2979(the)s 3318(enclosing)s 4280(g)s 1(alle)k 3(y)k 15(,)k 4943(copies)s 5597(of)s 5859(the)s 6199(header)s 6887(components)s 8086(associated)s 0 2594(with)m 482(the)s 830(\207rst)s 1261(ordinary)s 2125(component)s 3249(to)s 3488(be)s 3770(promoted)s 4745(into)s 5170(that)s 5588(tar)s 4(get)k 6187(are)s 6534(promoted)s 7509(into)s 7934(it)s 8126(\207rst.)s 480 2220(The)m 914(condition)s 1881(`and)s 2370(the)s 2724(tar)s 4(get)k 3329(does)s 3825(not)s 4197(itself)s 4751(occup)s 2(y)k 5501(an)s 5790(entire)s 6395(component)s 7525(of)s 7802(the)s 8156(enclosing)s 0 1932(g)m 1(alle)k 3(y')k 704(ensures)s 1484(that,)s 1961(for)s 2311(e)s 3(xample,)k 3237(when)s 3825(part)s 4268(of)s 4551(a)s 4729(section)s 5475(has)s 5857(header)s 6566(components,)s 7842(these)s 8401(are)s 8760(not)s 0 1644(printed)m 739(where)s 1384(the)s 1736(section)s 2475(is)s 2689(promoted)s 3669(into)s 4098(its)s 4379(chapter)s 9(,)k 5184(b)s 4(ut)k 5551(rather)s 6171(where)s 6816(the)s 7168(chapter)s 7936(is)s 8151(promoted)s 0 1356(onto)m 481(pages.)s 1193(If)s 1426(the)s 1777(tar)s 4(get)k 2379(occupies)s 3269(the)s 3620(whole)s 4264(component,)s 5438(then)s 5910(the)s 6260(incoming)s 7220(g)s 1(alle)k 3(y)k 7857(will)s 8286(not)s 8655(split)s 0 1068(at)m 232(all,)s 577(so)s 843(headers)s 1624(w)s 2(ould)k 2279(be)s 2561(of)s 2832(no)s 3125(interest)s 3887(there.)s 480 694(The)m 896(one)s 1286(remaining)s 2295(question)s 3151(is)s 3348(`Ho)s 6(w)k 3929(is)s 4126(the)s 4462(sequence)s 5383(of)s 5641(header)s 6326(components)s 7521(of)s 7780(each)s 8262(ordinary)s 0 406(component)m 1124(determined?')s 2477(By)s 2812(def)s 2(ault,)k 3580(the)s 3928(header)s 4626(components)s 5834(of)s 6106(one)s 6508(component)s 7632(are)s 7980(the)s 8328(same)s 8876(as)s 0 118(those)m 561(of)s 832(the)s 1180(pre)s 6(vious)k 2049(component.)s 3277(W)s 19(e)k 3646(can)s 4035(sho)s 6(w)k 4589(this)s 4985(graphically)s 6114(as)s 6364(follo)s 6(ws:)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 66 72 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Symbol %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(66)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13261 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 240 fnt6 480 13209(C)m 167 fnt6 645 13122(i)m 240 fnt4 773 13201(:)m 240 fnt6 903 13209(H)m 167 fnt4 1086 13117(1)m 240 fnt4 1163 13201(,)m 240 fnt6 1270 13209(H)m 167 fnt4 1453 13117(2)m 240 fnt4 1544 13201(,)m 1651(\274)s 1949(,)s 240 fnt6 2056 13209(H)m 167 fnt6 2239 13122(n)m 240 fnt6 480 12921(/)m 480 12633(C)m 167 fnt6 645 12546(i)m 167 fnt4 711 12541(+)m 823(1)s 240 fnt4 972 12625(:)m 240 fnt6 1102 12633(H)m 167 fnt4 1285 12541(1)m 240 fnt4 1362 12625(,)m 240 fnt6 1469 12633(H)m 167 fnt4 1652 12541(2)m 240 fnt4 1743 12625(,)m 1850(\274)s 2148(,)s 240 fnt6 2255 12633(H)m 167 fnt6 2438 12546(n)m 240 fnt1 0 12090(which)m 642(may)s 1109(be)s 1391(read:)s 1909(`If)s 2218(ordinary)s 3083(component)s 240 fnt6 4208 12092(C)m 167 fnt6 4373 12036(i)m 240 fnt1 4477 12090(has)m 4848(header)s 5545(component)s 6670(sequence)s 240 fnt6 7604 12092(H)m 167 fnt4 7787 12032(1)m 240 fnt4 7864 12084(,)m 240 fnt6 7971 12092(H)m 167 fnt4 8154 12031(2)m 240 fnt4 8245 12084(,)m 8352(\274)s 8650(,)s 240 fnt6 8757 12092(H)m 167 fnt6 8940 12037(n)m 240 fnt1 9019 12090(,)m 0 11802(then)m 468(its)s 743(successor)s 1718(component)s 240 fnt6 2841 11804(C)m 167 fnt6 3006 11748(i)m 167 fnt4 3072 11743(+)m 3184(1)s 240 fnt1 3308 11802(has)m 3677(header)s 4373(component)s 5496(sequence)s 240 fnt6 6428 11804(H)m 167 fnt4 6611 11744(1)m 240 fnt4 6688 11796(,)m 240 fnt6 6795 11804(H)m 167 fnt4 6978 11743(2)m 240 fnt4 7069 11796(,)m 7176(\274)s 7474(,)s 240 fnt6 7581 11804(H)m 167 fnt6 7764 11749(n)m 240 fnt1 7902 11802(also.)m 16(')k 8501(Using)s 0 11514(this)m 396(notation,)s 1287(we)s 1622(may)s 2088(no)s 6(w)k 2549(de\207ne)s 3190(the)s 3538(four)s 3996(symbols)s 4845(that)s 5263(af)s 6(fect)k 5859(header)s 6556(component)s 7680(sequences:)s 240 fnt6 480 11015(C)m 167 fnt6 645 10928(i)m 240 fnt4 773 11007(:)m 240 fnt6 903 11015(H)m 167 fnt4 1086 10923(1)m 240 fnt4 1163 11007(,)m 240 fnt6 1270 11015(H)m 167 fnt4 1453 10923(2)m 240 fnt4 1544 11007(,)m 1651(\274)s 1949(,)s 240 fnt6 2056 11015(H)m 167 fnt6 2239 10928(n)m 240 fnt6 480 10727(/)m 480 10439(gap)m 220 fnt2 905 10434(@BeginHeaderComponent)m 240 fnt6 3609 10439(H)m 167 fnt6 3792 10352(n)m 167 fnt4 3893 10347(+)m 4005(1)s 240 fnt6 480 10151(/)m 480 9863(C)m 167 fnt6 645 9776(i)m 167 fnt4 711 9771(+)m 823(1)s 240 fnt4 972 9855(:)m 240 fnt6 1102 9863(H)m 167 fnt4 1285 9771(1)m 240 fnt4 1362 9855(,)m 240 fnt6 1469 9863(H)m 167 fnt4 1652 9771(2)m 240 fnt4 1743 9855(,)m 1850(\274)s 2148(,)s 240 fnt6 2255 9863(H)m 167 fnt6 2438 9776(n)m 240 fnt4 2529 9855(,)m 240 fnt6 2636 9863(H)m 167 fnt6 2819 9776(n)m 167 fnt4 2920 9771(+)m 3032(1)s 240 fnt1 0 9320(That)m 478(is,)s 220 fnt2 723 9317(@BeginHeaderComponent)m 240 fnt1 3394 9320(occup)m 2(ying)k 4422(an)s 4684(entire)s [ /Dest /LOUT19_4605_pre_head_2 /DEST pdfmark 5263(component)s 6366(appends)s 7181(a)s 7326(header)s 8002(component)s 0 9032(to)m 255(the)s 619(sequence)s 1568(of)s 1856(the)s 2220(follo)s 6(wing)k 3213(ordinary)s 4093(components.)s 5431(When)s 6076(printed,)s 6876(this)s 7288(header)s 8002(component)s 0 8744(is)m 217(separated)s 1184(by)s 240 fnt6 1485 8746(gap)m 240 fnt1 1905 8744(from)m 2436(the)s 2792(follo)s 6(wing)k 3776(component;)s 4959(if)s 240 fnt6 5183 8746(gap)m 240 fnt1 5603 8744(is)m 5820(empty)s 6480(it)s 6679(denotes)s 220 fnt2 7468 8741(0ie)m 240 fnt1 7819 8744(as)m 8076(usual)s 8644(with)s 0 8456(concatenation)m 1391(g)s 1(aps.)k 2000(The)s 2434(appearance)s 3572(of)s 3850(the)s 4204(header)s 4908(component)s 6039(will)s 6471(be)s 6760(e)s 3(xactly)k 7508(as)s 7764(it)s 7963(w)s 2(ould)k 8625(ha)s 4(v)k 3(e)k 0 8168(been)m 509(had)s 913(it)s 1105(occurred)s 1999(alone)s 2573(at)s 2805(that)s 3223(point,)s 3822(rather)s 4438(than)s 4907(after)s 220 fnt2 5403 8165(@BeginHeaderComponent)m 240 fnt1 8035 8168(.)m 480 7794(Ne)m 3(xt)k 1002(comes)s 220 fnt2 1664 7791(@EndHeaderComponent)m 240 fnt1 4126 7794(:)m 240 fnt6 480 7299(C)m 167 fnt6 645 7212(i)m 240 fnt4 773 7291(:)m 240 fnt6 903 7299(H)m 167 fnt4 1086 7207(1)m 240 fnt4 1163 7291(,)m 240 fnt6 1270 7299(H)m 167 fnt4 1453 7207(2)m 240 fnt4 1544 7291(,)m 1651(\274)s 1949(,)s 240 fnt6 2056 7299(H)m 167 fnt6 2239 7212(n)m 240 fnt4 2330 7291(,)m 240 fnt6 2437 7299(H)m 167 fnt6 2620 7212(n)m 167 fnt4 2721 7207(+)m 2833(1)s 240 fnt6 480 7011(/)m 220 fnt2 480 6718(@EndHeaderComponent)m 240 fnt6 480 6435(/)m 480 6147(C)m 167 fnt6 645 6060(i)m 167 fnt4 711 6055(+)m 823(1)s 240 fnt4 972 6139(:)m 240 fnt6 1102 6147(H)m 167 fnt4 1285 6055(1)m 240 fnt4 1362 6139(,)m 240 fnt6 1469 6147(H)m 167 fnt4 1652 6055(2)m 240 fnt4 1743 6139(,)m 1850(\274)s 2148(,)s 240 fnt6 2255 6147(H)m 167 fnt6 2438 6060(n)m 240 fnt1 0 5604(That)m 520(is,)s 220 fnt2 809 5601(@EndHeaderComponent)m 240 fnt1 3353 5604(\(which)m 4097(has)s 4490(no)s 4805(parameters\))s 6003(occup)s 2(ying)k 7074(an)s [ /Dest /LOUT19_4605_pre_head_3 /DEST pdfmark 7380(entire)s 8002(component)s 0 5316(deletes)m 722(the)s 1078(last)s 1477(header)s 2182(component.)s 3418(If)s 3656(the)s 4012(sequence)s 4953(is)s 5171(empty)s 15(,)k 5869(a)s 6043(w)s 2(arning)k 6886(message)s 7760(is)s 7978(printed)s 8722(and)s 0 5028(it)m 193(remains)s 1002(empty)s 15(.)k 220 fnt2 1751 5025(@BeginHeaderComponent)m 240 fnt1 4445 5028(and)m 220 fnt2 4851 5025(@EndHeaderComponent)m 240 fnt1 7375 5028(are)m 7724(naturally)s 8629(used)s 0 4740(in)m 243(matching)s 1186(\(possibly)s 2117(nested\))s 2856(pairs,)s 3427(to)s 3666(introduce)s 4625(and)s 5029(subsequently)s 6333(retract)s 7001(a)s 7167(header)s 7864(component.)s 480 4366(Ne)m 3(xt)k 1002(comes)s 220 fnt2 1664 4363(@SetHeaderComponent)m 240 fnt1 4065 4366(:)m 240 fnt6 480 3871(C)m 167 fnt6 645 3784(i)m 240 fnt4 773 3863(:)m 240 fnt6 903 3871(H)m 167 fnt4 1086 3779(1)m 240 fnt4 1163 3863(,)m 240 fnt6 1270 3871(H)m 167 fnt4 1453 3779(2)m 240 fnt4 1544 3863(,)m 1651(\274)s 1949(,)s 240 fnt6 2056 3871(H)m 167 fnt6 2239 3784(n)m 240 fnt6 480 3583(/)m 480 3295(gap)m 220 fnt2 905 3290(@SetHeaderComponent)m 240 fnt6 3378 3295(H)m 167 fnt6 3561 3208(n)m 167 fnt4 3662 3203(+)m 3774(1)s 240 fnt6 480 3007(/)m 480 2719(C)m 167 fnt6 645 2632(i)m 167 fnt4 711 2627(+)m 823(1)s 240 fnt4 972 2711(:)m 240 fnt6 1102 2719(H)m 167 fnt6 1285 2632(n)m 167 fnt4 1386 2627(+)m 1498(1)s 220 fnt2 0 2173(@SetHeaderComponent)m 240 fnt1 2461 2176(clears)m 3068(an)s 3(y)k 3465(current)s 4201(header)s 4898(components)s [ /Dest /LOUT19_4605_pre_head_4 /DEST pdfmark 6107(and)s 6511(replaces)s 7344(them)s 7882(by)s 8176(one)s 8578(of)s 8850(its)s 0 1888(o)m 6(wn.)k 571(Finally)s 1302(we)s 1637(ha)s 4(v)k 3(e)k 220 fnt2 2138 1885(@ClearHeaderComponent)m 240 fnt1 4733 1888(:)m 240 fnt6 480 1389(C)m 167 fnt6 645 1302(i)m 240 fnt4 773 1381(:)m 240 fnt6 903 1389(H)m 167 fnt4 1086 1297(1)m 240 fnt4 1163 1381(,)m 240 fnt6 1270 1389(H)m 167 fnt4 1453 1297(2)m 240 fnt4 1544 1381(,)m 1651(\274)s 1949(,)s 240 fnt6 2056 1389(H)m 167 fnt6 2239 1302(n)m 240 fnt6 480 1101(/)m 220 fnt2 480 808(@ClearHeaderComponent)m 240 fnt6 480 525(/)m 480 237(C)m 167 fnt6 645 150(i)m 167 fnt4 711 145(+)m 823(1)s 240 fnt4 972 229(:)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 67 73 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Courier /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Courier /Courierfnt9 vec2 /Courier LoutRecode /fnt9 { /Courierfnt9 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.36.)m 1991(@Be)s 9(ginHeaderComponent,)k 4777(@EndHeaderComponent,)s 7400(@SetHeaderComponent,)s 1991 -1868(and)m 2417(@ClearHeaderComponent)s 240 fnt5 10248 -1583(67)m gsave 1417 -15423 translate 240 fnt1 9066 13080 0 13080 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 12917(This)m 466(symbol)s 1216(clears)s 1813(an)s 3(y)k 2200(header)s 2886(components,)s 4140(lea)s 4(ving)k 4883(the)s 5221(sequence)s 6143(empty)s 15(.)k 6880(These)s [ /Dest /LOUT19_4605_pre_head_5 /DEST pdfmark 7497(last)s 7878(tw)s 2(o)k 8277(symbols)s 0 12629(combine)m 879(less)s 1286(cleanly)s 2029(than)s 2496(the)s 2843(\207rst)s 3272(tw)s 2(o)k 3681(\(either)s 4361(will)s 4786(wreck)s 5429(an)s 3(y)k 5825(enclosing)s 220 fnt2 6793 12626(@BeginHeaderCompo-)m 0 12338(nent)m 240 fnt1 491 12341(\211)m 220 fnt2 679 12338(@EndHeaderComponent)m 240 fnt1 3209 12341(pair\),)m 3774(b)s 4(ut)k 4145(the)s 3(y)k 4616(are)s 4971(useful)s 5618(in)s 5869(situations)s 6845(where)s 7493(the)s 7849(range)s 8444(of)s 8724(one)s 0 12053(header)m 697(is)s 907(terminated)s 1986(by)s 2280(the)s 2628(start)s 3098(of)s 3369(the)s 3717(range)s 4304(of)s 4575(the)s 4923(ne)s 3(xt.)k 480 11679(All)m 859(four)s 1337(symbols)s 2206(yield)s 2761(the)s 3129(v)s 6(alue)k 220 fnt2 3717 11676(@Null)m 240 fnt1 4382 11679(where)m 5041(the)s 3(y)k 5524(appear)s 13(.)k 6332(If)s 6582(the)s 3(y)k 7064(do)s 7377(not)s 7763(occup)s 2(y)k 8527(entire)s 0 11391(components)m 1208(of)s 1479(their)s 1976(g)s 1(alle)k 3(y)k 15(,)k 2648(the)s 3(y)k 3111(are)s 3458(silently)s 4215(ignored.)s 480 11017(Owing)m 1186(to)s 1426(limitations)s 2499(in)s 2743(the)s 3092(w)s 2(ay)k 3544(header)s 4242(components)s 5451(are)s 5799(implemented,)s 7155(the)s 7504(follo)s 6(wing)k 8482(object)s 0 10729(types)m 547(are)s 885(not)s 1242(allo)s 6(wed)k 2042(inside)s 2660(them,)s 3236(and)s 3631(Basser)s 4319(Lout)s 4821(will)s 5238(complain)s 6176(and)s 6571(quit)s 6994(if)s 7202(it)s 7385(\207nds)s 7893(an)s 3(y)k 8281(of)s 8542(them:)s 0 10441(g)m 1(alle)k 3(ys,)k 772(recepti)s 6(v)k 3(e)k 1686(or)s 1936(recursi)s 6(v)k 3(e)k 2850(symbols,)s 3747(cross)s 4280(references,)s 220 fnt2 5359 10438(@P)m 8(ageLabel)k 240 fnt1 6608 10441(,)m 220 fnt2 6707 10438(@HExpand)m 240 fnt1 7820 10441(,)m 220 fnt2 7918 10438(@VExpand)m 240 fnt1 9019 10441(,)m 220 fnt2 0 10150(@HCo)m 3(v)k 5(er)k 240 fnt1 958 10153(,)m 220 fnt2 1091 10150(@VCo)m 3(v)k 5(er)k 240 fnt1 2037 10153(,)m 2171(and)s 220 fnt2 2602 10150(@Scale)m 240 fnt1 3452 10153(when)m 4054(it)s 4273(has)s 4670(an)s 4980(empty)s 5659(left)s 6062(parameter)s 13(.)k 7134(In)s 7417(addition,)s 8335(if)s 8579(more)s 0 9865(than)m 498(three)s 1061(copies)s 1753(of)s 2054(the)s 2432(same)s 3008(running)s 3836(header)s 4563(are)s 4940(printed)s 5705(on)s 6031(the)s 6409(same)s 6986(page,)s 7575(their)s 8102(horizontal)s 0 9577(positions)m 919(will)s 1350(become)s 2155(confused,)s 3131(probably)s 4040(resulting)s 4934(in)s 5182(the)s 5535(apparent)s 6422(disappearance)s 7837(of)s 8113(all)s 8411(b)s 4(ut)k 8778(the)s 0 9289(last)m 402(three)s 947(copies.)s 1733(\(The)s 2252(magic)s 2900(number)s 3703(3)s 3878(can)s 4279(be)s 4572(increased)s 5544(by)s 5849(recompiling)s 7069(the)s 7428(Lout)s 7952(source)s 8644(with)s 0 9001(the)m 220 fnt9 348 9009(MAX_HCOPIES)m 240 fnt1 1860 9001(constant)m 2717(increased.\))s 240 fnt5 0 8218(3.37.)m 591(@NotRe)s 3(v)k 2(ealed)k [ /Dest /LOUTnotrevealed /DEST pdfmark 240 fnt1 480 7786(The)m 220 fnt2 938 7783(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 2495 7786(symbol)m [ /Dest /LOUT19_4605_pre_notr_1 /DEST pdfmark 3285(e)s 3(x)k 3(erts)k 3931(\207ne)s 4376(control)s 5138(o)s 3(v)k 3(er)k 5647(the)s 6026(process)s 6824(of)s 7125(e)s 3(xpanding)k 8204(recepti)s 6(v)k 3(e)k 0 7498(symbols.)m 955(It)s 1152(may)s 1611(appear)s 2300(only)s 2773(within)s 3433(the)s 3774(body)s 4300(of)s 4564(a)s 4722(de\207nition,)s 5739(immediately)s 6979(follo)s 6(wing)k 7949(the)s 8289(name)s 8855(of)s 0 7210(a)m 166(recepti)s 6(v)k 3(e)k 1088(symbol.)s 1957(F)s 3(or)k 2346(e)s 3(xample:)k 220 fnt2 480 6709(def A { @Galle)m 4(y })k 480 6133(def B { @Galle)m 4(y })k 480 5557(def ABList)m 480 5269({)m 480 4981( A)m 480 4693( // B @NotRe)m 6(v)k 5(ealed)k 480 4405( // ABList)m 480 4117(})m 240 fnt1 0 3623(The)m 424(meaning)s 1297(is)s 1503(that)s 1916(the)s 2260(symbol)s 3016(immediately)s 4259(preceding)s 220 fnt2 5251 3620(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 6718 3623(,)m 220 fnt2 6821 3620(B)m 240 fnt1 7015 3623(in)m 7253(this)s 7645(e)s 3(xample,)k 8555(is)s 8760(not)s 0 3335(re)m 6(v)k 3(ealed)k 851(to)s 1083(g)s 1(alle)k 3(ys)k 1800(which)s 2435(encounter)s 220 fnt2 3431 3332(ABList)m 240 fnt1 4113 3335(while)m 4693(searching)s 5655(for)s 5986(tar)s 4(gets;)k 6723(to)s 6955(such)s 7444(g)s 1(alle)k 3(ys)k 8161(it)s 8345(appears)s 0 3047(that)m 220 fnt2 408 3044(ABList)m 240 fnt1 1086 3047(contains)m 220 fnt2 1923 3044(A)m 240 fnt1 2116 3047(only)m 15(,)k 2624(not)s 220 fnt2 2979 3044(B)m 240 fnt1 3117 3047(,)m 3213(hence)s 3816(only)s 4286(g)s 1(alle)k 3(ys)k 4999(tar)s 4(geted)k 5811(to)s 220 fnt2 6039 3044(A)m 240 fnt1 6233 3047(will)m 6648(e)s 3(xpand)k 220 fnt2 7384 3044(ABList)m 240 fnt1 8013 3047(.)m 8166(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 0 2759(after)m 220 fnt2 496 2756(ABList)m 240 fnt1 1185 2759(is)m 1395(e)s 3(xpanded)k 2368(by)s 2662(such)s 3158(a)s 3324(g)s 1(alle)k 3(y)k 15(,)k 220 fnt2 3996 2756(B)m 240 fnt1 4194 2759(will)m 4620(be)s 4902(a)s 4(v)k 6(ailable)k 5810(as)s 6060(a)s 6226(tar)s 4(get)k 6825(in)s 7068(the)s 7416(usual)s 7976(w)s 2(ay)k 15(.)k 480 2385(Apart)m 1081(from)s 1602(this)s 1994(meaning,)s 220 fnt2 2922 2382(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 4445 2385(has)m 4812(no)s 5102(ef)s 6(fect)k 5694(at)s 5923(all,)s 6264(and)s 6665(the)s 7010(body)s 7540(of)s 7808(the)s 8152(de\207nition)s 0 2097(may)m 501(be)s 819(understood)s 1976(by)s 2306(deleting)s 220 fnt2 3164 2094(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 4727 2097(and)m 5166(an)s 3(y)k 5599(preceding)s 6630(space.)s 7361(Thus,)s 7982(the)s 8366(symbol)s 0 1809(preceding)m 220 fnt2 1001 1806(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 2533 1809(may)m 3004(ha)s 4(v)k 3(e)k 3510(named)s 4211(and)s 4620(right)s 5136(parameters)s 6239(in)s 6487(the)s 6840(usual)s 7405(w)s 2(ay;)k 7919(these)s 8471(w)s 2(ould)k 0 1521(follo)m 6(w)k 672(after)s 1168(the)s 220 fnt2 1516 1518(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 3043 1521(symbol.)m 480 1147(This)m 944(symbol)s 1692(w)s 2(as)k 2101(introduced)s 3169(to)s 3396(o)s 3(v)k 3(ercome)k 4377(a)s 4530(problem)s 5375(with)s 5845(\210oating)s 6616(\207gures)s 7306(treated)s 8001(as)s 8238(displays.)s 0 859(It)m 205(turned)s 874(out)s 1240(to)s 1479(be)s 1761(essential)s 2638(to)s 2877(specify)s 3621(the)s 3969(layout)s 4627(of)s 4898(a)s 5064(column)s 5839(\(in)s 6161(part\))s 6660(as)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 68 74 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(68)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(@BodyT)m 26(e)k 6(xtPlace)k 480 12919(// @FigurePlace)m 480 12631(// @BodyT)m 26(e)k 6(xtPlace)k 480 12343(// @FigurePlace)m 480 12055(// @BodyT)m 26(e)k 6(xtPlace)k 480 11767(...)m 240 fnt1 0 11316(so)m 256(that)s 664(\207gures)s 1355(could)s 1935(alternate)s 2801(with)s 3273(body)s 3797(te)s 3(xt)k 4201(do)s 6(wn)k 4775(the)s 5112(column.)s 5984(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 6934(some)s 7484(means)s 8136(w)s 2(as)k 8546(need-)s 0 11028(ed)m 291(to)s 538(ensure)s 1226(that)s 1652(in)s 1903(the)s 2259(absence)s 3080(of)s 3359(an)s 3(y)k 3764(\207gures)s 4474(there)s 5015(could)s 5613(only)s 6101(be)s 6391(one)s 220 fnt2 6801 11025(@BodyT)m 26(e)k 6(xtPlace)k 240 fnt1 8527 11028(in)m 8778(the)s 0 10740(column,)m 831(since)s 1385(otherwise)s 2377(v)s 6(arious)k 3132(problems)s 4080(arose,)s 4698(for)s 5042(e)s 3(xample)k 5912(the)s 220 fnt2 6267 10737(@NP)m 240 fnt1 6851 10740(symbol)m 7618(merely)s 8342(causing)s 0 10452(a)m 174(skip)s 634(from)s 1167(one)s 220 fnt2 1577 10449(@BodyT)m 26(e)k 6(xtPlace)k 240 fnt1 3303 10452(to)m 3551(the)s 3907(ne)s 3(xt)k 4385(in)s 4636(the)s 4992(same)s 5548(column,)s 6381(rather)s 7006(than)s 7483(to)s 7730(the)s 8087(\207rst)s 8526(in)s 8778(the)s 0 10164(ne)m 3(xt)k 490(column.)s 1394(Also,)s 1974(without)s 2787(this)s 3204(feature)s 3944(the)s 4314(optimal)s 5120(page)s 5650(break)s 2(er')k 13(s)k 6595(attempts)s 7477(to)s 7737(end)s 8163(a)s 8351(column)s 0 9876(early)m 545(w)s 2(ould)k 1214(be)s 1510(frustrated)s 2496(by)s 2805(Lout)s 3331(then)s 3814(disco)s 3(v)k 3(ering)k 4991(that)s 5423(plenty)s 6090(of)s 6375(space)s 6976(e)s 3(xisted)k 7722(at)s 7968(a)s 8149(follo)s 6(wing)k 220 fnt2 0 9585(@BodyT)m 26(e)k 6(xtPlace)k 240 fnt1 1703 9588(in)m 1931(the)s 2263(same)s 2795(column.)s 3662(The)s 4074(solution)s 4887(is)s 5082(based)s 5669(on)s 220 fnt2 5951 9585(ABList)m 240 fnt1 6625 9588(abo)m 3(v)k 3(e;)k 7287(each)s 7767(occurrence)s 8855(of)s 220 fnt2 0 9297(@BodyT)m 26(e)k 6(xtPlace)k 240 fnt1 1712 9300(after)m 2201(a)s 220 fnt2 2361 9297(@FigurePlace)m 240 fnt1 3798 9300(is)m 4002(not)s 4361(re)s 6(v)k 3(ealed)k 5213(in)s 5449(the)s 5791(enclosing)s 6754(de\207nition,)s 7772(and)s 8169(so)s 8428(cannot)s 0 9012(be)m 282(found)s 899(by)s 1193(body)s 1727(te)s 3(xt)k 2142(g)s 1(alle)k 3(ys)k 2866(unless)s 3515(a)s 3680(\207gure)s 4294(has)s 4664(pre)s 6(viously)k 5722(attached)s 6576(to)s 6815(the)s 7163(preceding)s 220 fnt2 8158 9009(@Figure-)m 0 8721(Place)m 240 fnt1 540 8724(.)m 240 fnt5 0 7977(3.38.)m 591(The)s 1046(cr)s 4(oss)k 1614(r)s 4(efer)k 4(ence)k 2616(symbols)s 3494(&&)s 3941(and)s 4382(&&&)s [ /Dest /LOUTcrossref /DEST pdfmark 240 fnt1 480 7500(The)m 941(cross)s 1516(reference)s 2493(symbol)s 220 fnt2 3286 7497(&&)m 240 fnt1 3668 7500(tak)m 2(es)k 4241(the)s 4623(name)s 5230(of)s 5534(a)s 5734(symbol)s 6527(\(not)s 7006(an)s 7322(object\))s 8068(for)s 8439(its)s 8749(left)s 0 7212(parameter)m 9(,)k 1068(and)s 1489(an)s 1788(object)s 2449(whose)s 3134(v)s 6(alue)k 3718(must)s 4260(be)s 4559(a)s 4741(simple)s 5451(w)s 2(ord,)k 6064(or)s 6340(se)s 6(v)k 3(eral)k 7079(simple)s 7788(w)s 2(ords,)k 8495(for)s 8850(its)s 0 6924(right)m 519(parameter)s 13(.)k 1633(The)s 2069(result)s 2668(is)s 2887(a)s 3061(cross)s 3612(reference,)s 4615(which)s 5265(may)s 5740(be)s 6030(thought)s 6831(of)s 7111(as)s 7369(an)s 7661(arro)s 6(w)k 8275(pointing)s 0 6636(from)m 524(the)s 872(cross)s 1414(reference)s 2357(symbol)s 3117(to)s 3356(the)s 3704(be)s 3(ginning)k 4712(of)s 4983(an)s 5266(in)s 9(v)k 4(ocation)k 6320(of)s 6591(the)s 6939(named)s 7635(symbol.)s 480 6262(The)m 894(in)s 9(v)k 4(ocation)k 1934(pointed)s 2696(to,)s 2975(kno)s 6(wn)k 3665(as)s 3901(the)s 240 fnt6 4235 6264(tar)m 8(g)k 2(et)k 240 fnt1 4846 6262(of)m 5103(the)s 5437(cross)s 5965(reference,)s 6945(is)s 7141(generally)s 8070(one)s 8458(whose)s 220 fnt2 0 5971(@T)m 26(ag)k 240 fnt1 643 5974(parameter)m 1677(has)s 2067(v)s 6(alue)k 2655(equal)s 3248(to)s 3507(the)s 3875(right)s 4406(parameter)s 5440(of)s 5731(the)s 6099(cross)s 6661(reference)s 7624(symbol.)s 8513(Three)s 0 5686(special)m 759(tags,)s 220 fnt2 1292 5683(preceding)m 240 fnt1 2243 5686(,)m 220 fnt2 2391 5683(f)m 6(ollo)k 3(wing)k 240 fnt1 3221 5686(,)m 3369(and)s 220 fnt2 3814 5683(f)m 6(oll_or_prec)k 240 fnt1 4948 5686(,)m 5097(point)s 5690(respecti)s 6(v)k 3(ely)k 6930(to)s 7210(the)s 7599(\207rst)s 8072(in)s 9(v)k 4(ocation)k 0 5398(preceding)m 1006(the)s 1365(cross)s 1918(reference)s 2872(in)s 3126(the)s 3485(\207nal)s 3976(printed)s 4721(document,)s 5783(to)s 6033(the)s 6392(\207rst)s 6834(in)s 9(v)k 4(ocation)k 7899(follo)s 6(wing)k 8887(it,)s 0 5110(and)m 404(to)s 643(the)s 991(\207rst)s 1422(follo)s 6(wing)k 2399(it)s 2591(if)s 2808(such)s 3304(e)s 3(xists)k 3896(else)s 4323(to)s 4562(the)s 4910(\207rst)s 5341(preceding)s 6337(it.)s 480 4736(A)m 709(cross)s 1249(reference)s 2190(may)s 2654(be)s 2935(used)s 3430(in)s 3671(four)s 4127(w)s 2(ays:)k 4782(where)s 5420(an)s 5701(object)s 6343(is)s 6552(e)s 3(xpected,)k 7504(in)s 7745(which)s 8385(case)s 8850(its)s 0 4448(v)m 6(alue)k 576(is)s 795(a)s 970(cop)s 2(y)k 1497(of)s 1777(the)s 2134(tar)s 4(get;)k 2794(with)s 3285(the)s 220 fnt2 3642 4445(@Open)m 240 fnt1 4457 4448(and)m 220 fnt2 4870 4445(@Use)m 240 fnt1 5544 4448(symbols;)m 6463(with)s 6954(the)s 220 fnt2 7311 4445(@T)m 26(agged)k 240 fnt1 8309 4448(symbol;)m 0 4160(and)m 414(in)s 667(the)s 220 fnt2 1025 4157(into)m 240 fnt1 1441 4160(clause)m 2105(or)s 220 fnt2 2374 4157(@T)m 26(arget)k 240 fnt1 3271 4160(symbol)m 4041(of)s 4323(a)s 4499(g)s 1(alle)k 3(y)k 5143(de\207nition,)s 6177(in)s 6430(which)s 7083(case)s 7560(the)s 7918(v)s 6(alue)k 8496(of)s 8778(the)s 0 3872(tag)m 345(must)s 870(be)s 220 fnt2 1152 3869(preceding)m 240 fnt1 2103 3872(,)m 220 fnt2 2210 3869(f)m 6(ollo)k 3(wing)k 240 fnt1 3040 3872(,)m 3147(or)s 220 fnt2 3406 3869(f)m 6(oll_or_prec)k 240 fnt1 4540 3872(.)m 480 3498(W)m 9(ithin)k 1233(an)s 220 fnt2 1557 3495(into)m 240 fnt1 2004 3498(clause)m 2698(or)s 220 fnt2 2999 3495(@T)m 26(arget)k 240 fnt1 3927 3498(symbol,)m 4780(the)s 5169(alternati)s 6(v)k 3(e)k 6265(form)s 220 fnt2 6830 3495(&&&)m 240 fnt1 7365 3498(is)m 7616(acceptable)s 8722(and)s 0 3210(indicates)m 900(a)s 1066(forcing)s 1809(g)s 1(alle)k 3(y)k 2443(\(Section)s 3296(2.7\).)s 480 2836(Except)m 1203(within)s 1870(an)s 220 fnt2 2151 2833(into)m 240 fnt1 2556 2836(clause)m 3208(or)s 220 fnt2 3465 2833(@T)m 26(arget)k 240 fnt1 4351 2836(symbol,)m 5162(the)s 5508(symbol)s 6267(referred)s 7078(to)s 7315(must)s 7839(ha)s 4(v)k 3(e)k 8339(a)s 220 fnt2 8503 2833(@T)m 26(ag)k 240 fnt1 0 2548(parameter)m 13(.)k 1100(This)s 1570(is)s 1775(so)s 2035(e)s 6(v)k 3(en)k 2530(if)s 2741(the)s 3084(right)s 3589(parameter)s 4597(of)s 4863(the)s 5205(cross)s 5742(reference)s 6679(is)s 220 fnt2 6884 2545(preceding)m 240 fnt1 7835 2548(,)m 220 fnt2 7936 2545(f)m 6(ollo)k 3(wing)k 240 fnt1 8766 2548(,)m 8867(or)s 220 fnt2 0 2257(f)m 6(oll_or_prec)k 240 fnt1 1134 2260(.)m 240 fnt5 0 1471(3.39.)m 591(@T)s 22(agged)k [ /Dest /LOUTtagged /DEST pdfmark 240 fnt1 480 994(The)m 220 fnt2 924 991(@T)m 26(agged)k [ /Dest /LOUT19_4605_pre_tagg_1 /DEST pdfmark 240 fnt1 1929 994(symbol)m 2705(tak)s 2(es)k 3261(a)s 3444(cross)s 4002(reference)s 4961(for)s 5315(its)s 5607(left)s 6001(parameter)s 7031(and)s 7451(an)s 7750(object,)s 8458(whose)s 0 706(v)m 6(alue)k 565(must)s 1087(be)s 1366(a)s 1528(juxtaposition)s 2831(of)s 3099(simple)s 3788(w)s 2(ords,)k 4475(or)s 4731(se)s 6(v)k 3(eral)k 5450(w)s 2(ords,)k 6136(or)s 6392(an)s 6672(empty)s 7320(object,)s 8008(for)s 8343(its)s 8615(right)s 0 418(parameter)m 13(.)k 1104(It)s 1307(has)s 1675(the)s 2021(ef)s 6(fect)k 2615(of)s 2885(attaching)s 3812(its)s 4086(right)s 4595(parameter)s 5607(as)s 5856(an)s 6137(additional)s 7146(tag)s 7489(to)s 7726(the)s 8072(in)s 9(v)k 4(ocation)k 0 130(denoted)m 819(by)s 1117(its)s 1397(left)s 1778(parameter)s 9(,)k 2834(unless)s 3487(the)s 3839(right)s 4353(parameter)s 5371(is)s 5585(empty)s 15(,)k 6279(in)s 6526(which)s 7172(case)s 220 fnt2 7643 127(@T)m 26(agged)k 240 fnt1 8636 130(does)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 69 75 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.39.)m 1991(@T)s 22(a)k 2(g)k 2(g)k 2(ed)k 240 fnt5 10249 -1583(69)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(nothing.)m 896(The)s 1324(result)s 1914(of)s 220 fnt2 2185 13202(@T)m 26(agged)k 240 fnt1 3174 13205(is)m 3384(al)s 2(w)k 2(ays)k 220 fnt2 4095 13202(@Null)m 240 fnt1 4680 13205(,)m 4787(which)s 5429(mak)s 2(es)k 6089(it)s 6281(ef)s 6(fecti)k 6(v)k 3(ely)k 7340(in)s 9(visible.)k 240 fnt5 0 12412(3.40.)m 591(@Open and @Use)s [ /Dest /LOUTopen /DEST pdfmark 240 fnt1 480 11935(The)m 220 fnt2 904 11932(@Open)m 240 fnt1 1706 11935(symbol)m [ /Dest /LOUT19_4605_pre_open_1 /DEST pdfmark 2462(tak)s 2(es)k 2998(a)s 3159(cross)s 3697(reference)s 4636(or)s 4891(symbol)s 5647(in)s 9(v)k 4(ocation)k 6696(for)s 7030(its)s 7302(left)s 7675(parameter)s 9(,)k 8722(and)s 0 11647(an)m 269(arbitrary)s 1130(object,)s 1807(which)s 2435(must)s 2946(be)s 3214(enclosed)s 4095(in)s 4324(braces,)s 5027(for)s 5351(its)s 5613(right)s 6110(parameter)s 13(.)k 7201(The)s 7615(right)s 8112(parameter)s 0 11359(may)m 462(refer)s 966(to)s 1201(the)s 1544(e)s 3(xported)k 2432(parameters)s 3525(and)s 3925(nested)s 4589(de\207nitions)s 5646(of)s 5912(the)s 6256(in)s 9(v)k 4(ocation)k 7305(denoted)s 8117(by)s 8406(the)s 8749(left)s 0 11071(parameter)m 9(,)k 1050(and)s 1452(its)s 1725(v)s 6(alue)k 2291(is)s 2499(the)s 220 fnt2 2844 11068(@Open)m 240 fnt1 3648 11071(symbol')m 13(s)k 4560(result.)s 5252(The)s 5678(tar)s 4(get)k 6274(of)s 6543(the)s 6889(cross)s 7428(reference)s 8369(may)s 8832(lie)s 0 10783(in)m 234(an)s 507(e)s 3(xternal)k 1318(database)s 2187(\(Section)s 3031(3.42\).)s 3684(An)s 3(y)k 4138(symbol)s 4888(a)s 4(v)k 6(ailable)k 5787(outside)s 6524(the)s 220 fnt2 6862 10780(@Open)m 240 fnt1 7658 10783(which)m 8290(happens)s 0 10495(to)m 239(ha)s 4(v)k 3(e)k 741(the)s 1089(same)s 1637(name)s 2212(as)s 2462(one)s 2865(of)s 3137(the)s 3485(symbols)s 4335(made)s 4910(a)s 4(v)k 6(ailable)k 5818(by)s 6113(the)s 220 fnt2 6462 10492(@Open)m 240 fnt1 7268 10495(will)m 7695(be)s 7978(una)s 4(v)k 6(ailable)k 0 10207(within)m 668(the)s 220 fnt2 1016 10204(@Open)m 240 fnt1 1762 10207(.)m [ /Dest /LOUT19_4605_pre_open_2 /DEST pdfmark 538 9833(The)m 220 fnt2 963 9830(@Use)m 240 fnt1 1625 9833(symbol)m 2382(is)s 2589(an)s 220 fnt2 2869 9830(@Open)m 240 fnt1 3672 9833(symbol)m 4429(in)s 4669(a)s 4832(dif)s 6(ferent)k 5704(form.)s 6329(It)s 6531(may)s 6994(only)s 7471(appear)s 8165(among)s 8867(or)s 0 9545(after)m 502(the)s 857(de\207nitions)s 1925(in)s 2175(Lout')s 13(s)k 2844(input,)s 3450(and)s 3861(it)s 4060(is)s 4277(equi)s 6(v)k 6(alent)k 5328(to)s 5574(enclosing)s 6551(the)s 6906(remainder)s 7941(of)s 8219(the)s 8574(input)s 0 9257(in)m 243(an)s 220 fnt2 526 9254(@Open)m 240 fnt1 1332 9257(symbol.)m 2201(F)s 3(or)k 2590(e)s 3(xample,)k 240 fnt6 480 8754(de\207nitions)m 220 fnt2 480 8461(@Use)m 1145({)s 240 fnt6 1269 8466(x)m 220 fnt2 1435 8461(})m 480 8173(@Use)m 1145({)s 240 fnt6 1269 8178(y)m 220 fnt2 1431 8173(})m 240 fnt6 480 7890(r)m 8(est)k 894(of)s 1175(input)s 240 fnt1 0 7389(is)m 210(equi)s 6(v)k 6(alent)k 1254(to)s 240 fnt6 480 6886(de\207nitions)m 480 6598(x)m 220 fnt2 646 6593(@Open)m 480 6305({)m 240 fnt6 960 6310(y)m 220 fnt2 1122 6305(@Open)m 960 6017({)m 240 fnt6 1084 6022(r)m 8(est)k 1498(of)s 1779(input)s 220 fnt2 960 5729(})m 480 5441(})m 240 fnt1 0 4947(The)m 220 fnt2 424 4944(@Use)m 240 fnt1 1085 4947(symbol)m 1841(allo)s 6(ws)k 2506(a)s 2668(set)s 2989(of)s 3256(standard)s 4120(packages)s 5044(to)s 5279(be)s 5557(opened)s 6303(without)s 7090(the)s 7434(incon)s 9(v)k 3(enience)k 8855(of)s 0 4659(enclosing)m 974(the)s 1327(entire)s 1931(document)s 2939(in)s 220 fnt2 3187 4656(@Open)m 240 fnt1 3998 4659(symbols.)m 4964(Such)s 5505(enclosure)s 6482(could)s 7076(cause)s 7668(Basser)s 8370(Lout)s 8887(to)s 0 4371(run)m 376(out)s 742(of)s 1013(memory)s 15(.)k 240 fnt5 0 3578(3.41.)m 591(@LinkSour)s 4(ce,)k 2120(@LinkDest,)s 3400(and)s 3841(@URLLink)s [ /Dest /LOUTlink_source /DEST pdfmark 240 fnt1 480 3107(The)m 949(tw)s 2(o)k 1400(symbols)s 220 fnt2 2290 3104(@LinkSource)m 240 fnt1 3703 3107(and)m 220 fnt2 4148 3104(@LinkDest)m [ /Dest /LOUT19_4605_pre_link_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_link_2 /DEST pdfmark 240 fnt1 5322 3107(w)m 2(ork)k 5914(together)s 6798(to)s 7078(create)s 240 fnt6 7744 3109(cr)m 10(oss)k 8335(links)s 240 fnt1 8883 3107(in)m 0 2819(a)m 202(document,)s 1290(that)s 1745(is,)s 2048(points)s 2721(where)s 3398(a)s 3601(user)s 4096(vie)s 6(wing)k 4951(the)s 5336(document)s 6377(on)s 6711(screen)s 7415(can)s 7841(click)s 8403(and)s 8844(be)s 0 2531(transported)m 1132(to)s 1369(another)s 2144(point)s 2695(in)s 2936(the)s 3282(document.)s 4389(W)s 19(e)k 4756(call)s 5153(the)s 5500(point)s 6050(where)s 6688(the)s 7035(user)s 7491(clicks)s 8097(the)s 240 fnt6 8443 2533(sour)m 8(ce)k 240 fnt1 0 2243(of)m 271(the)s 619(link,)s 1098(and)s 1502(the)s 1850(point)s 2402(where)s 3042(the)s 3390(user)s 3848(arri)s 6(v)k 3(es)k 4539(the)s 240 fnt6 4887 2245(destination)m 240 fnt1 6004 2243(of)m 6275(the)s 6623(link.)s 480 1869(T)m 19(o)k 780(create)s 1405(a)s 1571(source)s 2251(point,)s 2850(place)s 240 fnt6 480 1366(ta)m 2(g)k 220 fnt2 838 1361(@LinkSource)m 240 fnt6 2210 1366(object)m 240 fnt1 0 863(at)m 228(some)s 785(point)s 1332(in)s 1571(the)s 1915(document,)s 2961(where)s 3597(the)s 3941(v)s 6(alue)k 4504(of)s 240 fnt6 4771 865(ta)m 2(g)k 240 fnt1 5124 863(is)m 5330(a)s 5492(le)s 3(g)k 1(al)k 6002(cross)s 6540(reference)s 7479(tag,)s 7873(and)s 240 fnt6 8273 865(object)m 240 fnt1 8916 863(is)m 0 575(an)m 279(arbitrary)s 1149(Lout)s 1657(object.)s 2400(The)s 2823(result)s 3409(of)s 3675(this)s 4066(is)s 4272(just)s 240 fnt6 4672 577(object)m 240 fnt1 5260 575(,)m 5363(b)s 4(ut)k 5720(if)s 5932(the)s 6276(user)s 6729(of)s 6995(a)s 7157(screen)s 7819(vie)s 6(wer)k 8518(clicks)s 0 287(on)m 297(an)s 3(y)k 694(point)s 1246(within)s 1914(the)s 2262(rectangular)s 3396(bounding)s 4355(box)s 4770(of)s 5041(that)s 5459(object,)s 6150(a)s 6316(link)s 6749(will)s 7175(be)s 7457(entered.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 70 76 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(70)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13257 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 13203(At)m 799(present,)s 240 fnt6 1616 13205(object)m 240 fnt1 2285 13203(abo)m 3(v)k 3(e)k 2927(is)s 3158(treated)s 3885(as)s 4156(though)s 4899(it)s 5111(were)s 5652(enclosed)s 6567(in)s 220 fnt2 6831 13200(@OneCol)m 240 fnt1 7783 13203(.)m 7967(This)s 8464(means)s 0 12915(that)m 420(a)s 589(long)s 1071(link)s 1507(source)s 2190(or)s 2452(destination)s 3561(point)s 4116(will)s 4545(not)s 4914(break)s 5509(o)s 3(v)k 3(er)k 5991(tw)s 2(o)k 6404(lines)s 6909(as)s 7162(part)s 7596(of)s 7870(an)s 8156(enclosing)s 0 12627(paragraph.)m 480 12253(T)m 19(o)k 780(create)s 1405(a)s 1571(destination)s 2677(point,)s 3276(place)s 240 fnt6 480 11750(ta)m 2(g)k 220 fnt2 838 11745(@LinkDest)m 240 fnt6 1970 11750(object)m 240 fnt1 0 11247(at)m 221(some)s 771(point)s 1312(in)s 1544(the)s 1881(document.)s 2978(Ag)s 1(ain,)k 240 fnt6 3658 11249(ta)m 2(g)k 240 fnt1 4005 11247(must)m 4519(e)s 6(v)k 6(aluate)k 5348(to)s 5576(a)s 5731(le)s 3(g)k 1(al)k 6235(cross)s 6766(reference)s 7698(tag,)s 8086(and)s 240 fnt6 8478 11249(object)m 240 fnt1 0 10959(may)m 469(be)s 755(an)s 3(y)k 1156(Lout)s 1672(object.)s 2424(All)s 220 fnt2 2788 10956(@LinkSource)m 240 fnt1 4164 10959(symbols)m 5017(whose)s 5689(tag)s 6038(is)s 6252(equal)s 6829(to)s 7072(this)s 7472(one)s 7878(are)s 8229(link)s 2(ed)k 8887(to)s 0 10671(this)m 396(destination)s 1502(point.)s 480 10297(F)m 3(or)k 907(e)s 6(v)k 3(ery)k 1521(source)s 2239(point)s 2829(there)s 3400(must)s 3963(be)s 4283(e)s 3(xactly)k 5062(one)s 5502(destination)s 6646(point)s 7236(with)s 7756(the)s 8142(same)s 8727(tag,)s 0 10009(otherwise)m 1016(it)s 1240(will)s 1697(not)s 2095(be)s 2408(clear)s 2963(where)s 3634(the)s 4014(link)s 4479(is)s 4720(supposed)s 5702(to)s 5972(tak)s 2(e)k 6456(the)s 6835(user)s 13(.)k 7416(Lout)s 7959(will)s 8417(print)s 8960(a)s 0 9721(w)m 2(arning)k 829(if)s 1040(this)s 1430(condition)s 2384(is)s 2588(violated)s 3410(an)s 3(ywhere;)k 4443(it)s 4628(will)s 5048(refuse)s 5681(to)s 5914(insert)s 6497(a)s 6657(destination)s 7757(point)s 8303(with)s 8778(the)s 0 9433(same)m 555(name)s 1138(as)s 1397(a)s 1571(pre)s 6(vious)k 2449(one,)s 2911(b)s 4(ut)k 3282(it)s 3482(is)s 3701(not)s 4076(able)s 4539(to)s 4786(refrain)s 5487(from)s 6020(inserting)s 6918(a)s 7092(source)s 7781(point)s 8342(with)s 8833(no)s 0 9145(corresponding)m 1430(destination)s 2544(point,)s 3152(and)s 3564(such)s 4068(points)s 4713(must)s 5246(cause)s 5842(errors)s 6457(of)s 6736(some)s 7306(kind)s 7798(when)s 8383(vie)s 6(wed)k 0 8857(\(e)m 3(xactly)k 820(what)s 1345(error)s 1868(will)s 2294(depend)s 3044(on)s 3341(the)s 3689(vie)s 6(wer\).)k 480 8483(The)m 220 fnt2 915 8480(@URLLink)m 240 fnt1 2045 8483(symbol)m 2812(is)s 3029(similar)s 3758(to)s 220 fnt2 4004 8480(@LinkSource)m 240 fnt1 5383 8483(in)m 5633(being)s 6225(the)s 6580(source)s 7267(point)s 7826(of)s 8104(a)s 8277(link,)s 8764(b)s 4(ut)k 0 8195(instead)m 735(of)s 1006(a)s 1172(tag)s 1517(you)s 1932(supply)s 2625(a)s 2791(URL)s 3327(to)s 3566(some)s 4127(other)s 4678(document)s 5682(altogether:)s 220 fnt2 480 7694("http://snar)m -3(k.ptc.spb)k 4(u.r)k -3(u/~uw)k 2(e/lout/lout.html" @URLLink { Lout Home P)k 8(age })k 240 fnt1 0 7195(The)m 445(URL)s 999(will)s 1443(need)s 1970(to)s 2227(be)s 2527(enclosed)s 3439(in)s 3700(quotes,)s 4450(because)s 5280(of)s 5569(the)s 5935(/)s 6080(characters)s 7116(which)s 7776(are)s 8141(otherwise)s 0 6907(tak)m 2(en)k 591(to)s 849(be)s 1150(concatenation)s 2553(operations.)s 3732(As)s 4068(for)s 220 fnt2 4425 6904(@LinkSource)m 240 fnt1 5737 6907(,)m 5862(the)s 6229(result)s 6838(is)s 7067(just)s 7490(the)s 7857(object)s 8520(to)s 8778(the)s 0 6619(right,)m 558(lik)s 2(e)k 970(this:)s [ /Rect [480 6069 2091 6279] /Border [0 0 0] /Action << /Subtype /URI /URI (http://snark.ptc.spbu.ru/~uwe/lout/lout.html) >> /Subtype /Link /ANN pdfmark 480 6121(Lout)m 992(Home)s 1633(P)s 3(age)k 0 5618(b)m 4(ut)k 373(if)s 601(the)s 960(user)s 1429(clicks)s 2048(on)s 2356(this)s 2763(object)s 3418(on)s 3726(the)s 4086(screen)s 4764(the)s 3(y)k 5238(enter)s 5786(a)s 5963(link)s 6407(that)s 6836(tak)s 2(es)k 7387(them)s 7936(to)s 8186(the)s 8546(gi)s 6(v)k 3(en)k 0 5330(URL)m 530(location,)s 1401(assuming)s 2352(that)s 2764(the)s 3106(softw)s 2(are)k 3976(which)s 4612(the)s 3(y)k 5069(are)s 5410(using)s 5976(to)s 6209(display)s 6948(the)s 7290(document)s 8288(is)s 8492(cle)s 6(v)k 3(er)k 0 5042(enough)m 763(to)s 1002(do)s 1295(this.)s 480 4668(F)m 3(or)k 920(the)s 1320(purposes)s 2274(of)s 220 fnt2 2596 4665(@Common)m 240 fnt1 3695 4668(,)m 220 fnt2 3854 4665(@Rump)m 240 fnt1 4654 4668(,)m 4813(and)s 220 fnt2 5269 4665(@Meld)m 240 fnt1 5955 4668(,)m 6113(tw)s 2(o)k 220 fnt2 6575 4665(@LinkSource)m 240 fnt1 7999 4668(objects)m 8779(are)s 0 4380(considered)m 1092(to)s 1328(be)s 1608(equal)s 2178(if)s 2393(their)s 2887(right)s 3396(parameters)s 4491(are)s 4836(equal;)s 5463(the)s 5809(left)s 6183(parameters)s 7279(are)s 7623(not)s 7986(considered.)s 0 4092(This)m 480(beha)s 4(viour)k 1498(is)s 1713(needed,)s 2503(for)s 2846(e)s 3(xample,)k 3765(to)s 4009(mak)s 2(e)k 4586(inde)s 3(x)k 5175(entries)s 5867(look)s 6359(reasonable)s 7442(when)s 8023(melded.)s 8896(If)s 0 3804(tw)m 2(o)k 220 fnt2 420 3801(@LinkSource)m 240 fnt1 1803 3804(objects)m 2542(with)s 3035(equal)s 3619(right)s 4141(parameters)s 5250(b)s 4(ut)k 5623(dif)s 6(ferent)k 6509(left)s 6897(parameters)s 8006(are)s 8364(melded)s 0 3516(into)m 412(one,)s 851(one)s 1239(of)s 1497(the)s 1831(tw)s 2(o)k 2227(will)s 2639(be)s 2908(the)s 3242(result,)s 3865(b)s 4(ut)k 4214(which)s 4842(one)s 5230(is)s 5426(unde\207ned.)s 6522(Notice)s 7201(that)s 7605(melding)s 8428(cannot)s 0 3228(produce)m 827(an)s 1110(unde\207ned)s 2113(link,)s 2592(since)s 3139(the)s 3487(w)s 2(orst)k 4076(it)s 4268(can)s 4657(do)s 4950(is)s 5160(delete)s 5786(a)s 220 fnt2 5952 3225(@LinkSource)m 240 fnt1 7264 3228(.)m 480 2854(Practically)m 1595(speaking,)s 2594(the)s 2984(right)s 3536(parameters)s 4676(of)s 220 fnt2 4988 2851(@LinkSource)m 240 fnt1 6402 2854(and)m 220 fnt2 6847 2851(@URLLink)m 240 fnt1 8012 2854(need)m 8563(to)s 8844(be)s 0 2566(non-null,)m 941(non-empty)s 2055(objects,)s 2863(since)s 3433(otherwise)s 4442(there)s 4998(is)s 5232(nothing)s 6040(visible)s 6756(for)s 7118(the)s 7489(user)s 7971(to)s 8233(click)s 8782(on.)s 0 2278(\(This)m 542(condition)s 1489(is)s 1686(not)s 2038(check)s 2(ed)k 2865(or)s 3110(enforced)s 3991(by)s 4271(Lout.\))s 4958(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 5904(the)s 6239(right)s 6736(parameter)s 7737(of)s 220 fnt2 7994 2275(@LinkDest)m 240 fnt1 0 1990(could)m 588(reasonably)s 1676(be)s 1956(empty)s 2605(or)s 2862(null.)s 3396(Usually)s 15(,)k 4229(when)s 220 fnt2 4803 1987(@Null)m 240 fnt1 5446 1990(lies)m 5825(inside)s 6450(a)s 6614(non-concatenation)s 8435(object,)s 0 1702(for)m 338(e)s 3(xample)k 480 1199(@OneCol @Null)m 0 745(the)m 379(ef)s 6(fect)k 1007(of)s 1309(the)s 220 fnt2 1689 742(@Null)m 240 fnt1 2365 745(is)m 2607(lost)s 3043(\211)s 3255(the)s 3634(result)s 4256(in)s 4530(this)s 4958(e)s 3(xample)k 5852(is)s 6094(equi)s 6(v)k 6(alent)k 7169(to)s 7440(an)s 7754(empty)s 8438(object.)s 0 457(Ho)m 6(we)k 6(v)k 3(er)k 9(,)k 960(when)s 1536(the)s 1884(right)s 2395(parameter)s 3409(of)s 220 fnt2 3680 454(@LinkDest)m 240 fnt1 4812 457(is)m 220 fnt2 5022 454(@Null)m 240 fnt1 5607 457(:)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 71 77 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.41.)m 1991(@LinkSour)s 8(ce)k 2(,)k 3384(@LinkDest,)s 4560(and)s 4986(@URLLink)s 240 fnt5 10256 -1583(71)m gsave 1417 -15423 translate 240 fnt1 9066 13387 0 13278 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13224(@LinkDest @Null)m 0 12770(or)m 307(when)s 932(it)s 1173(is)s 1432(some)s 2042(object)s 2735(treated)s 3491(lik)s 2(e)k 220 fnt2 3952 12767(@Null)m 240 fnt1 4645 12770(by)m 4988(Lout)s 5549(\(e.g.)s 6067(a)s 220 fnt2 6282 12767(@T)m 26(agged)k 240 fnt1 7320 12770(symbol\),)m 8260(then)s 8778(the)s 220 fnt2 0 12479(@LinkDest)m 240 fnt1 1121 12482(itself)m 1657(has)s 2016(the)s 2352(ef)s 6(fect)k 2937(on)s 3222(surrounding)s 4420(concatentation)s 5860(operators)s 6788(that)s 220 fnt2 7195 12479(@Null)m 240 fnt1 7828 12482(has,)m 8242(allo)s 6(wing)k 0 12194(it)m 192(to)s 431(be)s 713(made)s 1287(ef)s 6(fecti)k 6(v)k 3(ely)k 2346(in)s 9(visible)k 3216(in)s 3459(the)s 3807(printed)s 4542(document,)s 5593(though)s 6316(still)s 6728(really)s 7325(there.)s 240 fnt5 0 11401(3.42.)m 591(@Database and @SysDatabase)s [ /Dest /LOUTdatabase /DEST pdfmark [ /Dest /LOUT19_4605_pre_data_1 /DEST pdfmark 240 fnt1 529 10924(The)m 220 fnt2 945 10921(@Database)m 240 fnt1 2148 10924(symbol)m 2896(is)s 3095(used)s 3580(to)s 3808(declare)s 4541(the)s 4877(e)s 3(xistence)k 5808(of)s 6067(a)s 6222(\207le)s 6571(of)s 6831(symbol)s 7579(in)s 9(v)k 4(ocations)k 8708(that)s 0 10636(Lout)m 512(may)s 978(refer)s 1487(to)s 1726(when)s 2302(e)s 6(v)k 6(aluating)k 3339(cross)s 3881(references.)s 5025(In)s 5281(Basser)s 5978(Lout,)s 6537(for)s 6875(e)s 3(xample,)k 220 fnt2 480 10135(@Database @Months @W)m 6(eekDa)k 6(ys { standard })k 240 fnt1 0 9637(means)m 690(that)s 1137(there)s 1698(is)s 1937(a)s 2131(\207le)s 2521(called)s 220 fnt2 3177 9634(standard.ld)m 240 fnt1 4339 9637(containing)m 5430(in)s 9(v)k 4(ocations)k 6600(of)s 6899(the)s 7276(pre)s 6(viously)k 8363(de\207ned)s 0 9349(symbols)m 220 fnt2 846 9346(@Months)m 240 fnt1 1838 9349(and)m 220 fnt2 2238 9346(@W)m 6(eekDa)k 6(ys)k 240 fnt1 3503 9349(.)m 3663(A)s 220 fnt2 3889 9346(@Database)m 240 fnt1 5100 9349(symbol)m 5856(may)s 6318(appear)s 7011(an)s 3(ywhere)k 7990(a)s 8152(de\207nition)s 0 9061(or)m 252(a)s 220 fnt2 411 9058(@Use)m 240 fnt1 1069 9061(symbol)m 1822(may)s 2281(appear)s 13(.)k 3062(Dif)s 6(ferent)k 3982(de\207nitions)s 5036(packages)s 5957(may)s 6416(refer)s 6918(to)s 7150(a)s 7309(common)s 8196(database,)s 0 8773(pro)m 3(vided)k 935(the)s 1312(de\207nitions)s 2402(the)s 3(y)k 2894(gi)s 6(v)k 3(e)k 3382(for)s 3749(its)s 4054(symbols)s 4932(are)s 5308(compatible.)s 6563(An)s 6942(entry)s 7516(is)s 7755(interpreted)s 8876(as)s 0 8485(though)m 756(it)s 981(appears)s 1795(at)s 2060(the)s 2441(point)s 3026(where)s 3699(the)s 4080(cross)s 4655(reference)s 5631(that)s 6082(retrie)s 6(v)k 3(es)k 6978(it)s 7203(does,)s 7782(which)s 8457(allo)s 6(ws)k 0 8197(symbols)m 866(lik)s 2(e)k 220 fnt2 1296 8194(@I)m 240 fnt1 1639 8197(for)m 220 fnt2 1995 8194(Slope @F)m 6(ont)k 240 fnt1 3346 8197(to)m 3602(be)s 3902(used)s 4417(in)s 4678(databases.)s 5776(The)s 6221(database)s 7118(\207le)s 7497(may)s 7981(not)s 8365(contain)s 220 fnt2 0 7906(@Database)m 240 fnt1 1214 7909(or)m 220 fnt2 1473 7906(@Include)m 240 fnt1 2455 7909(symbols,)m 3360(and)s 3764(each)s 4259(in)s 9(v)k 4(ocation)k 5313(within)s 5981(it)s 6173(must)s 6698(be)s 6980(enclosed)s 7875(in)s 8118(braces.)s 480 7535(Basser)m 1198(Lout)s 1732(constructs)s 2773(an)s 240 fnt6 3078 7537(inde)m 4(x)k 3674(\207le)s 240 fnt1 3959 7535(,)m [ /Dest /LOUT19_4605_pre_data_2 /DEST pdfmark 4087(which)s 4751(in)s 5016(this)s 5433(e)s 3(xample)k 6318(is)s 6550(called)s 220 fnt2 7199 7532(standard.li)m 240 fnt1 8196 7535(,)m 8325(the)s 8695(\207rst)s 0 7247(time)m 481(it)s 675(e)s 6(v)k 3(er)k 1139(encounters)s 2227(the)s 2577(database,)s 3509(as)s 3761(an)s 4045(aid)s 4397(to)s 4638(searching)s 5608(it.)s 5906(If)s 6138(the)s 6488(database)s 7368(\207le)s 7731(is)s 7943(changed,)s 8850(its)s 0 6959(inde)m 3(x)k 586(\207le)s 950(must)s 1477(be)s 1762(deleted)s 2512(by)s 2809(the)s 3159(user)s 3620(so)s 3888(that)s 4309(Basser)s 5008(Lout)s 5523(kno)s 6(ws)k 6196(to)s 6438(reconstruct)s 7561(it.)s 7860(There)s 8475(is)s 8688(also)s 0 6671(an)m 300(installation)s 1435(option)s 2121(which)s 2780(allo)s 6(ws)k 3466(this)s 3879(deletion)s 4723(to)s 4979(be)s 5278(done)s 5817(automatically)s 7188(on)s 7502(suitable)s 8318(systems)s 0 6383(\(including)m 1036(Unix\).)s 480 6009(Basser)m 1210(Lout)s 1756(searches)s 2649(for)s 3021(databases)s 4021(in)s 4298(the)s 4679(current)s 5449(directory)s 6398(\207rst,)s 6910(then)s 7412(in)s 7689(a)s 7888(sequence)s 8855(of)s 0 5721(standard)m 868(places.)s 1629(T)s 19(o)k 1929(search)s 2596(the)s 2944(standard)s 3812(places)s 4460(only)s 15(,)k 4978(use)s [ /Dest /LOUT19_4605_pre_data_3 /DEST pdfmark 220 fnt2 5353 5718(@SysDatabase)m 240 fnt1 6873 5721(.)m 240 fnt5 0 4928(3.43.)m 591(@Graphic)s [ /Dest /LOUTgraphic /DEST pdfmark [ /Dest /LOUT19_4605_pre_grap_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_grap_2 /DEST pdfmark 240 fnt1 556 4451(Lout)m 1084(does)s 1590(not)s 1972(pro)s 3(vide)k 2772(the)s 3136(v)s 6(ast)k 3592(repertoire)s 4591(of)s 4878(graphical)s 5838(objects)s 6582(\(lines,)s 7235(circles,)s 7980(box)s 3(es,)k 8660(etc.\))s 0 4163(required)m 846(by)s 1132(diagrams.)s 2163(Instead,)s 2952(it)s 3135(pro)s 3(vides)k 3999(an)s 4274(escape)s 4958(route)s 5497(to)s 5727(some)s 6280(other)s 6823(language)s 7734(that)s 8144(does)s 8625(ha)s 4(v)k 3(e)k 0 3875(these)m 547(features,)s 1409(via)s 1761(its)s 220 fnt2 2037 3872(@Gr)m 2(aphic)k 240 fnt1 3081 3875(symbol:)m [ /Dest /LOUT19_4605_pre_grap_3 /DEST pdfmark 220 fnt2 480 3377({ 0 0 mo)m 3(v)k 5(eto)k 480 3089( 0 ysiz)m 3(e lineto)k 480 2801( xsiz)m 3(e ysiz)k 3(e lineto)k 480 2513( xsiz)m 3(e 0 lineto)k 480 2225( closepath)m 480 1937( strok)m 4(e)k 480 1649(})m 480 1361(@Gr)m 2(aphic)k 480 1073({ //0.2c)m 480 785( ||0.2c hello)m 8(, w)k 2(or)k -3(ld ||0.2c)k 480 497( //0.2c)m 480 209(})m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 72 78 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(72)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(The)m 428(result)s 1018(of)s 1289(the)s 1637(abo)s 3(v)k 3(e)k 2259(in)s 9(v)k 4(ocation)k 3313(of)s 3584(the)s 3932(symbol)s 220 fnt2 4692 13202(@Gr)m 2(aphic)k 240 fnt1 5736 13205(is)m 1365 422 0 422 240 288 60 480 12443 LoutGr2 0 0 moveto 0 ysize lineto xsize ysize lineto xsize 0 lineto closepath stroke grestore 113 146(hello,)m 698(w)s 2(orld)k grestore 480 11727(The)m 909(right)s 1421(parameter)s 2437(al)s 2(w)k 2(ays)k 3149(appears)s 3931(as)s 4183(part)s 4615(of)s 4888(the)s 5237(result,)s 5875(and)s 6281(indeed)s 6978(the)s 7327(result)s 7919(is)s 8130(al)s 2(w)k 2(ays)k 8843(an)s 0 11439(object)m 651(whose)s 1327(size)s 1761(is)s 1979(identical)s 2863(to)s 3110(the)s 3465(size)s 3900(of)s 4178(the)s 4534(right)s 5052(parameter)s 6074(with)s 220 fnt2 6563 11436(@OneCol)m 240 fnt1 7583 11439(and)m 220 fnt2 7995 11436(@OneRo)m 3(w)k 240 fnt1 0 11151(applied)m 762(to)s 1001(it.)s 1297(From)s 1875(no)s 6(w)k 2336(on)s 2633(we)s 2968(refer)s 3477(to)s 3716(this)s 4112(part)s 4543(of)s 4814(the)s 5162(result)s 5752(as)s 6002(the)s 240 fnt6 6350 11153(base)m 240 fnt1 6782 11151(.)m 480 10777(The)m 898(left)s 1264(parameter)s 2267(is)s 2466(implementation-dependent:)s 5184(that)s 5591(is,)s 5847(its)s 6112(meaning)s 6978(is)s 7177(not)s 7532(de\207ned)s 8284(by)s 8567(Lout,)s 0 10489(and)m 421(dif)s 6(ferent)k 1313(implementations)s 2975(could)s 3582(require)s 4332(dif)s 6(ferent)k 5224(v)s 6(alues)k 5898(for)s 6253(it.)s 6567(The)s 7012(follo)s 6(wing)k 8007(description)s 0 10201(applies)m 713(to)s 936(Basser)s 1618(Lout,)s 2161(which)s 2787(uses)s 3235(the)s 3567(PostScript)s 4593(page)s 5086(description)s 6189(language)s 7093([)s [ /Rect [7164 10201 7259 10363] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTadobe1990ps /ANN pdfmark 7164(1)s 7259(].)s 7487(Similar)s 8233(b)s 4(ut)k 8579(more)s 0 9913(restricted)m 962(possibilities)s 2172(e)s 3(xist)k 2698(with)s 3198(the)s 3563(PDF)s 4078(back)s 4609(end)s 5031(\(see)s 5488(a)s 5672(separate)s 6528(document)s 7550(distrib)s 4(uted)k 8644(with)s 0 9625(Lout\);)m 643(to)s 882(include)s 1642(both,)s 2175(use)s 2550(the)s 220 fnt2 2898 9622(@Bac)m 4(kEnd)k 240 fnt1 4043 9625(symbol)m 4803(lik)s 2(e)k 5215(this:)s 220 fnt2 480 9124({ @Bac)m 4(kEnd @Case {)k 480 8836( P)m 11(ostScr)k -3(ipt @Y)k 4(ield)k 480 8548( {)m 480 8260( ...)m 480 7972( })m 480 7684( PDF @Y)m 4(ield)k 480 7396( {)m 480 7108( ...)m 480 6820( })m 480 6532( })m 480 6244( @Gr)m 2(aphic)k 480 5956( {)m 480 5668( ...)m 480 5380( })m 480 5092(})m 240 fnt1 0 4598(Returning)m 1039(to)s 1307(PostScript,)s 2425(the)s 2802(left)s 3208(parameter)s 4251(refers)s 4874(to)s 5142(a)s 5337(coordinate)s 6431(system)s 7184(whose)s 7881(origin)s 8538(is)s 8778(the)s 0 4310(bottom)m 773(left-hand)s 1728(corner)s 2433(of)s 2740(the)s 3123(base.)s 3747(It)s 3987(may)s 4489(use)s 4899(the)s 5282(symbols)s 220 fnt2 6166 4307(xsiz)m 3(e)k 240 fnt1 6751 4310(and)m 220 fnt2 7190 4307(ysiz)m 3(e)k 240 fnt1 7774 4310(to)m 8048(denote)s 8778(the)s 0 4022(horizontal)m 1031(and)s 1442(v)s 3(ertical)k 2216(size)s 2650(of)s 2928(the)s 3283(base;)s 3827(similarly)s 15(,)k 220 fnt2 4774 4019(xmar)m -3(k)k 240 fnt1 5442 4022(and)m 220 fnt2 5853 4019(ymar)m -3(k)k 240 fnt1 6521 4022(denote)m 7222(the)s 7577(positions)s 8499(of)s 8778(the)s 0 3734(base')m 13(s)k 635(column)s 1410(and)s 1814(ro)s 6(w)k 2234(marks:)s gsave 480 1371 translate 180 fnt1 3570 2072 0 1994 180 288 45 LoutGraphic gsave grestore save gsave 200 dict begin lfigdict begin grestore 180 fnt6 107 1955(ysize)m 0 1388(ymark)m 180 fnt1 364 253(0)m 2551 1701 850 1134 180 288 45 676 293 LoutGr2 grestore save gsave 200 dict begin lfigdict begin grestore 2551 1701 850 1134 180 288 45 0 0 LoutGr2 /lfiglightgrey [ lfigbox ] gsave lfigpaintpath grestore 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigsolid [ lfigbox ] lfigdopath pop pop grestore 2551 1701 850 1134 180 288 45 0 0 LoutGr2 0.015 cm setlinewidth lfiground setlinecap 0.15 cm /lfigdashed [ -0.3 cm ymark xsize ymark 0.3 cm 0 lfigpadd [] xmark -0.3 cm xmark ysize 0 0.3 cm lfigpadd ] lfigdopath pop pop grestore grestore grestore end end restore grestore 676 14(0)m 180 fnt6 1526 15(xmark)m 3227(xsize)s end end restore grestore 0 920(In)m 265(addition)s 1115(to)s 1363(these)s 1920(four)s 2387(symbols)s 3245(and)s 3658(0,)s 3895(lengths)s 4646(may)s 5121(be)s 5412(denoted)s 6238(in)s 6490(centimetres,)s 7706(inches,)s 8434(points,)s 0 632(ems,)m 492(f)s -13(')k 13(s,)k 850(v')s 13(s)k 1180(and)s 1584(s')s 13(s)k 1887(using)s 2459(the)s 2807(notation)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 73 79 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.43.)m 1991(@Gr)s 3(aphic)k 240 fnt5 10250 -1583(73)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 240 fnt6 480 13172(l)m 220 fnt2 666 13167(cm)m 240 fnt1 1197 13170(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 13172(l)m 240 fnt1 3111 13170(c)m 240 fnt6 480 12884(l)m 220 fnt2 666 12879(in)m 240 fnt1 1197 12882(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 12884(l)m 240 fnt1 3111 12882(i)m 240 fnt6 480 12596(l)m 220 fnt2 666 12591(pt)m 240 fnt1 1197 12594(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 12596(l)m 240 fnt1 3111 12594(p)m 240 fnt6 480 12308(l)m 220 fnt2 666 12303(em)m 240 fnt1 1197 12306(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 12308(l)m 240 fnt1 3111 12306(m)m 240 fnt6 480 12020(l)m 220 fnt2 666 12015(ft)m 240 fnt1 1197 12018(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 12020(l)m 240 fnt1 3111 12018(f)m 240 fnt6 480 11732(l)m 220 fnt2 666 11727(vs)m 240 fnt1 1197 11730(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 11732(l)m 240 fnt1 3111 11730(v)m 240 fnt6 480 11444(l)m 220 fnt2 666 11439(sp)m 240 fnt1 1197 11442(instead)m 1932(of)s 2203(Lout')s 13(s)k 240 fnt6 3045 11444(l)m 240 fnt1 3111 11442(s)m 0 10901(Note)m 521(that)s 939(there)s 1472(must)s 1997(be)s 2279(a)s 2445(space)s 3032(between)s 3886(the)s 4234(number)s 5025(and)s 5429(its)s 5705(unit,)s 6184(unlik)s 2(e)k 6836(Lout)s 7348(proper)s 13(.)k 480 10527(A)m 732(point)s 1306(within)s 1996(the)s 2366(base)s 2869(\(and,)s 3423(with)s 3927(care,)s 4453(a)s 4642(point)s 5216(outside)s 5985(it\))s 6267(may)s 6755(be)s 7059(denoted)s 7897(by)s 8213(a)s 8401(pair)s 8855(of)s 0 10239(lengths.)m 855(F)s 3(or)k 1244(e)s 3(xample,)k 220 fnt2 480 9742(xmar)m -3(k ymar)k -3(k)k 240 fnt1 0 9244(is)m 210(the)s 558(point)s 1110(where)s 1750(the)s 2098(marks)s 2733(cross,)s 3331(and)s 220 fnt2 480 8750(0 2 cm)m 240 fnt1 0 8295(is)m 195(a)s 346(point)s 883(on)s 1164(the)s 1497(left)s 1859(edge,)s 2402(tw)s 2(o)k 2797(centimetres)s 3933(abo)s 3(v)k 3(e)k 4539(the)s 4872(bottom)s 5595(left-hand)s 6499(corner)s 13(.)k 7245(These)s 7857(tw)s 2(o)k 8251(numbers)s 0 8007(are)m 347(called)s 975(the)s 240 fnt6 1323 8009(x)m 1489(coor)s 8(dinate)k 240 fnt1 2571 8007(and)m 2975(the)s 240 fnt6 3323 8009(y)m 3485(coor)s 8(dinate)k 240 fnt1 4567 8007(of)m 4838(the)s 5186(point.)s 480 7633(The)m 906(\207rst)s 1335(step)s 1770(in)s 2011(specifying)s 3057(a)s 3221(graphic)s 3988(object)s 4630(is)s 4837(to)s 5074(de\207ne)s 5712(a)s 240 fnt6 5876 7635(path)m 240 fnt1 6297 7633(.)m 6458(A)s 6686(path)s 7152(can)s 7539(be)s 7818(thought)s 8608(of)s 8876(as)s 0 7345(the)m 349(track)s 888(of)s 1161(a)s 1328(pen)s 1733(mo)s 3(ving)k 2516(o)s 3(v)k 3(er)k 2996(the)s 3346(page.)s 3963(The)s 4393(pen)s 4797(may)s 5265(be)s 5548(up)s 5842(\(not)s 6289(dra)s 3(wing\))k 7199(or)s 7460(do)s 6(wn)k 8045(\(dra)s 3(wing)k 8960(a)s 0 7057(line)m 414(or)s 673(curv)s 3(e\))k 1329(as)s 1579(it)s 1771(mo)s 3(v)k 3(es.)k 2554(The)s 2982(entire)s 3581(path)s 4050(is)s 4260(a)s 4426(sequence)s 5359(of)s 5630(the)s 5978(follo)s 6(wing)k 6955(items:)s 240 fnt6 1847 6685(x)m 2013(y)s 220 fnt2 2175 6680(mo)m 3(v)k 5(eto)k 240 fnt1 3120 6683(Lift)m 3537(the)s 3885(pen)s 4288(and)s 4692(mo)s 3(v)k 3(e)k 5274(it)s 5466(to)s 5705(the)s 6053(indicated)s 6987(point.)s 240 fnt6 2036 6326(x)m 2202(y)s 220 fnt2 2364 6321(lineto)m 240 fnt1 3120 6324(Put)m 3557(the)s 3963(pen)s 4424(do)s 6(wn)k 5066(and)s 5528(dra)s 3(w)k 6115(a)s 6339(straight)s 7173(line)s 7645(to)s 7942(the)s 8348(indicat-)s 3120 6036(ed)m 3404(point.)s 240 fnt6 702 5677(x)m 868(y)s 1030(r)s 1188(angle1)s 1879(angle2)s 220 fnt2 2580 5672(arc)m 240 fnt1 3120 5675(Put)m 3501(the)s 3852(pen)s 4257(do)s 6(wn)k 4844(and)s 5250(dra)s 3(w)k 5782(a)s 5950(circular)s 6741(arc)s 7087(whose)s 7758(centre)s 8399(has)s 8772(co-)s 3120 5387(ordinates)m 240 fnt6 4058 5389(x)m 240 fnt1 4235 5387(and)m 240 fnt6 4650 5389(y)m 240 fnt1 4823 5387(and)m 5238(whose)s 5917(radius)s 6563(is)s 240 fnt6 6784 5389(r)m 240 fnt1 6882 5387(.)m 7057(The)s 7496(arc)s 7851(be)s 3(gins)k 8535(at)s 8778(the)s 3120 5099(angle)m 240 fnt6 3726 5101(angle1)m 240 fnt1 4449 5099(measuring)m 5530(counterclockwise)s 7291(from)s 7847(the)s 8227(point)s 8812(di-)s 3120 4811(rectly)m 3714(to)s 3949(the)s 4294(right)s 4801(of)s 5069(the)s 5413(centre,)s 6100(and)s 6500(proceeds)s 7397(counterclockwise)s 3120 4523(to)m 240 fnt6 3361 4525(angle2)m 240 fnt1 4002 4523(.)m 4168(If)s 4401(the)s 4751(arc)s 5098(is)s 5310(not)s 5679(the)s 6029(\207rst)s 6462(thing)s 7010(on)s 7309(the)s 7660(path,)s 8181(a)s 8350(straight)s 3120 4235(line)m 3549(will)s 3990(be)s 4287(dra)s 3(wn)k 4954(connecting)s 6072(the)s 6435(current)s 7186(point)s 7753(to)s 8007(the)s 8370(start)s 8855(of)s 3120 3947(the)m 3468(arc.)s 240 fnt6 589 3638(x)m 755(y)s 917(r)s 1075(angle1)s 1766(angle2)s 220 fnt2 2467 3633(arcn)m 240 fnt1 3120 3636(As)m 3437(for)s 3775(arc,)s 4173(b)s 4(ut)k 4535(the)s 4883(arc)s 5227(goes)s 5717(clockwise)s 6729(from)s 240 fnt6 7253 3638(angle1)m 240 fnt1 7944 3636(to)m 240 fnt6 8183 3638(angle2)m 240 fnt1 8824 3636(.)m 220 fnt2 1955 3274(closepath)m 240 fnt1 3120 3277(Dra)m 3(w)k 3702(a)s 3868(straight)s 4644(line)s 5058(back)s 5571(to)s 5810(the)s 6158(point)s 6710(most)s 7235(recently)s 8058(mo)s 3(v)k 3(ed)k 8762(to.)s 0 2903(The)m 428(\207rst)s 860(item)s 1344(should)s 2042(al)s 2(w)k 2(ays)k 2753(be)s 3036(a)s 220 fnt2 3202 2900(mo)m 3(v)k 5(eto)k 240 fnt1 3907 2903(,)m 220 fnt2 4015 2900(arc)m 240 fnt1 4315 2903(,)m 4422(or)s 220 fnt2 4682 2900(arcn)m 240 fnt1 5095 2903(.)m 5259(It)s 5465(should)s 6162(be)s 6445(clear)s 6968(from)s 7493(this)s 7889(that)s 8308(the)s 8657(path)s 0 2615(gi)m 6(v)k 3(en)k 580(earlier:)s 220 fnt2 480 2121(0 0 mo)m 3(v)k 5(eto)k 480 1833(0 ysiz)m 3(e lineto)k 480 1545(xsiz)m 3(e ysiz)k 3(e lineto)k 480 1257(xsiz)m 3(e 0 lineto)k 480 969(closepath)m 240 fnt1 0 473(traces)m 607(around)s 1330(the)s 1678(boundary)s 2637(of)s 2908(the)s 3256(base)s 3737(with)s 4219(the)s 4567(pen)s 4970(do)s 6(wn.)k 480 99(Once)m 1039(a)s 1203(path)s 1670(is)s 1877(set)s 2200(up,)s 2545(we)s 2877(are)s 3222(ready)s 3805(to)s 240 fnt6 4041 101(paint)m 240 fnt1 4595 99(it)m 4785(onto)s 5262(the)s 5607(page.)s 6221(There)s 6832(are)s 7176(tw)s 2(o)k 7584(choices:)s 8405(we)s 8737(can)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 74 80 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(74)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13257 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13203(either)m 240 fnt6 618 13205(str)m 10(ok)k 2(e)k 240 fnt1 1259 13203(it,)m 1514(which)s 2172(means)s 2850(to)s 3105(display)s 3866(it)s 4074(as)s 4340(described;)s 5383(or)s 5658(we)s 6009(can)s 240 fnt6 6414 13205(\207ll)m 240 fnt1 6742 13203(it,)m 6997(which)s 7655(means)s 8333(to)s 8588(paint)s 0 12915(e)m 6(v)k 3(erything)k 1067(inside)s 1694(it)s 1886(gre)s 3(y)k 2362(or)s 2621(black.)s 3303(F)s 3(or)k 3692(stroking)s 4529(the)s 4877(tw)s 2(o)k 5287(main)s 5822(options)s 6578(are)s 240 fnt6 1581 12412(length)m 220 fnt2 2234 12407(setline)m 4(width)k 240 fnt1 3600 12410(The)m 4028(pen)s 4431(will)s 4857(dra)s 3(w)k 5386(lines)s 5888(of)s 6159(the)s 6507(gi)s 6(v)k 3(en)k 7087(width.)s [ /Dest /LOUT16_1731_pre_grap_1 /DEST pdfmark 220 fnt2 1553 11902([)m 240 fnt6 1668 11907(length)m 220 fnt2 2321 11902(])m 2430(0)s 2605(setdash)s 240 fnt1 3600 11905(The)m 4034(pen)s 4444(will)s 4876(dra)s 3(w)k 5412(dashed)s 6142(lines)s 6650(when)s 7233(it)s 7432(is)s 7648(do)s 6(wn,)k 8289(with)s 8778(the)s 3600 11617(dashes)m 4289(each)s 4784(of)s 5055(the)s 5403(gi)s 6(v)k 3(en)k 5983(length.)s [ /Dest /LOUT16_1731_pre_grap_2 /DEST pdfmark 0 11114(These)m 627(options)s 1383(are)s 1730(follo)s 6(wed)k 2632(by)s 2926(the)s 3274(w)s 2(ord)k 220 fnt2 3822 11111(strok)m 4(e)k 240 fnt1 4408 11114(.)m 4572(So,)s 4932(for)s 5270(e)s 3(xample,)k 220 fnt2 480 10616({ 0 0 mo)m 3(v)k 5(eto xsiz)k 3(e 0 lineto)k 480 10328( 2 pt setline)m 4(width [ 5 pt ] 0 setdash strok)k 4(e)k 480 10040(})m 480 9752(@Gr)m 2(aphic { 3i @Wide })k 240 fnt1 0 9256(has)m 370(result)s 4320 0 0 0 240 288 60 480 8966 LoutGr2 0 0 moveto xsize 0 lineto 2 pt setlinewidth [ 5 pt ] 0 setdash stroke grestore grestore 480 8250(When)m 1106(\207lling)s 1726(in)s 1965(the)s 2310(re)s 3(gion)k 2971(enclosed)s 3862(by)s 4153(a)s 4315(path,)s 4830(the)s 5175(main)s 5706(option)s 6371(is)s 220 fnt2 6578 8247(setg)m 2(r)k 2(a)k 6(y)k 240 fnt1 7286 8250(,)m 7389(which)s 8027(determines)s 0 7962(the)m 348(shade)s 949(of)s 1220(gre)s 3(y)k 1696(to)s 1935(use,)s 2361(on)s 2658(a)s 2824(scale)s 3357(from)s 3881(0)s 4056(\(black\))s 4781(to)s 5020(1)s 5175(\(white\).)s 6028(So,)s 6388(for)s 6726(e)s 3(xample,)k 220 fnt2 480 7464({ 0 0 mo)m 3(v)k 5(eto xsiz)k 3(e 0 lineto 0 ysiz)k 3(e lineto closepath)k 480 7176( 0.8 setg)m 2(r)k 2(a)k 6(y \207ll)k 480 6888(})m 480 6600(@Gr)m 2(aphic)k 480 6312({ 2c @Wide 2c @High })m 240 fnt1 0 5813(has)m 370(result)s 1134 1134 0 1134 240 288 60 480 4389 LoutGr2 0 0 moveto xsize 0 lineto 0 ysize lineto closepath 0.8 setgray fill grestore grestore 480 3673(There)m 1107(are)s 1468(man)s 3(y)k 2066(other)s 2631(options.)s 3515(The)s 3957(v)s 6(alue)k 4540(of)s 4825(the)s 5188(left)s 5579(parameter)s 6608(of)s 220 fnt2 6893 3670(@Gr)m 2(aphic)k 240 fnt1 7952 3673(may)m 8432(be)s 8729(an)s 3(y)k 0 3385(fragment)m 922(of)s 1193(the)s 1541(PostScript)s 2583(page)s 3091(description)s 4210(language)s 5130([)s [ /Rect [5201 3385 5296 3547] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTadobe1990ps /ANN pdfmark 5201(1)s 5296(].)s 5539(Here)s 6059(are)s 6406(tw)s 2(o)k 6816(other)s 7367(e)s 3(xamples:)k 220 fnt2 480 2888(xsiz)m 3(e)k 1030(2)s 1203(div)s 240 fnt1 0 2434(denoting)m 891(a)s 1057(length)s 1712(equal)s 2285(to)s 2524(half)s 2967(the)s 3315(horizontal)s 4339(size)s 4766(of)s 5037(the)s 5385(base,)s 5917(and)s 220 fnt2 480 1935(gsa)m 4(v)k 5(e)k 1110(\207ll)s 1363(g)s 2(restore)k 2219(strok)s 4(e)k 240 fnt1 0 1436(which)m 648(both)s 1138(\207lls)s 1554(and)s 1965(strok)s 2(es)k 2698(the)s 3053(path.)s 3636(Since)s 4230(Basser)s 4933(Lout)s 5452(does)s 5949(not)s 6322(check)s 6948(that)s 7373(the)s 7728(left)s 8112(parameter)s 0 1148(is)m 209(v)s 6(alid)k 737(PostScript,)s 1824(it)s 2014(is)s 2222(possible)s 3061(to)s 3298(cause)s 3883(mysterious)s 4981(errors)s 5586(in)s 5828(the)s 6174(printing)s 6982(de)s 6(vice,)k 7705(resulting)s 8592(in)s 8833(no)s 0 860(output,)m 708(if)s 914(an)s 1186(incorrect)s 2083(v)s 6(alue)k 2640(is)s 2839(gi)s 6(v)k 3(en.)k 3515(It)s 3709(is)s 3908(a)s 4063(good)s 4590(idea)s 5037(to)s 5265(encapsulate)s 6425(graphics)s 7275(objects)s 7992(in)s 8224(carefully)s 0 572(tested)m 636(de\207nitions,)s 1774(lik)s 2(e)k 2208(those)s 2790(of)s 3083(the)s 3452(Diag)s 3992(\207gure)s 4627(dra)s 3(wing)k 5482(package)s 6344([)s [ /Rect [6415 569 6521 737] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkingston1995lout_user /ANN pdfmark 6415(5)s 6521(,)s 6649(Chapter)s 7488(9],)s [ /Dest /LOUT19_4605_pre_grap_4 /DEST pdfmark 7815(to)s 8076(be)s 8379(sure)s 8855(of)s 0 284(a)m 4(v)k 4(oiding)k 883(these)s 1430(errors.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 75 81 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.43.)m 1991(@Gr)s 3(aphic)k 240 fnt5 10250 -1583(75)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13205(PostScript)m 1543(e)s 3(xperts)k 2302(may)s 2789(\207nd)s 3241(the)s 3610(follo)s 6(wing)k 4608(information)s 5814(helpful)s 6567(when)s 7164(designing)s 8170(adv)s 6(anced)k 0 12917(graphics)m 861(features.)s 1780(The)s 2208(left)s 2585(parameter)s 3599(of)s 220 fnt2 3870 12914(@Gr)m 2(aphic)k 240 fnt1 4914 12917(may)m 5380(ha)s 4(v)k 3(e)k 5881(tw)s 2(o)k 6291(parts,)s 6862(separated)s 7822(by)s 220 fnt2 8116 12914(//)m 240 fnt1 8241 12917(:)m 220 fnt2 480 12409({)m 240 fnt6 604 12414(\207r)m 2(st)k 1038(part)s 220 fnt2 1501 12409(//)m 240 fnt6 1686 12414(second)m 2417(part)s 220 fnt2 2880 12409(} @Gr)m 2(aphic)k 240 fnt6 4058 12414(object)m 240 fnt1 0 11913(If)m 230(there)s 763(is)s 973(no)s 220 fnt2 1266 11910(//)m 240 fnt1 1391 11913(,)m 1498(the)s 1846(second)s 2569(part)s 3000(is)s 3210(tak)s 2(en)k 3783(to)s 4022(be)s 4304(empty)s 15(.)k 5051(The)s 5479(PostScript)s 6521(output)s 7193(has)s 7563(the)s 7911(form)s 220 fnt2 480 11456(gsa)m 4(v)k 5(e)k 240 fnt6 480 11173(x)m 646(y)s 220 fnt2 808 11168(tr)m 2(anslate)k 240 fnt6 480 10885(Code)m 1039(whic)s 3(h)k 1663(de\207nes)s 220 fnt2 2383 10880(xsiz)m 3(e)k 240 fnt6 2872 10885(,)m 220 fnt2 2965 10880(ysiz)m 3(e)k 240 fnt6 3454 10885(,)m 220 fnt2 3547 10880(xmar)m -3(k)k 240 fnt6 4148 10885(,)m 220 fnt2 4241 10880(ymar)m -3(k)k 240 fnt6 4842 10885(,)m 220 fnt2 4935 10880(ft)m 240 fnt6 5053 10885(,)m 220 fnt2 5146 10880(vs)m 240 fnt6 5359 10885(,)m 5452(and)s 220 fnt2 5878 10880(sp)m 480 10592(gsa)m 4(v)k 5(e)k 240 fnt6 480 10309(\207r)m 2(st)k 914(part)s 220 fnt2 480 10016(g)m 2(restore)k 240 fnt6 480 9733(Code)m 1039(whic)s 3(h)k 1663(r)s 8(ender)k 2(s)k 2439(the)s 2784(right)s 3313(par)s 3(ameter)k 4372(in)s 4612(tr)s 3(anslated)k 5645(coor)s 8(dinates)k 480 9445(second)m 1211(part)s 220 fnt2 480 9152(g)m 2(restore)k 240 fnt1 0 8653(where)m 240 fnt6 628 8655(x)m 240 fnt4 733 8647(,)m 240 fnt6 802 8655(y)m 240 fnt1 952 8653(is)m 1149(the)s 1485(position)s 2300(of)s 2558(the)s 2894(lo)s 6(wer)k 3479(left)s 3843(corner)s 4501(of)s 4759(the)s 5095(base.)s 5671(Ha)s 4(ving)k 6412(tw)s 2(o)k 6810(parts)s 7312(permits)s 8066(brack)s 2(eting)k 0 8365(operations,)m 1112(lik)s 2(e)k 220 fnt2 1533 8362(sa)m 4(v)k 5(e)k 240 fnt1 2049 8365(and)m 220 fnt2 2462 8362(restore)m 240 fnt1 3206 8365(or)m 220 fnt2 3474 8362(begin)m 240 fnt1 4065 8365(and)m 220 fnt2 4478 8362(end)m 240 fnt1 4832 8365(,)m 4949(to)s 5197(enclose)s 5979(an)s 6271(object.)s 7028(See)s 7438(the)s 7795(source)s 8484(\207le)s 8855(of)s 0 8077(the)m 348(Diag)s 866(package)s 1706(for)s 2044(e)s 3(xamples.)k 240 fnt5 0 7284(3.44.)m 591(@PlainGraphic)s [ /Dest /LOUTplaingraphic /DEST pdfmark [ /Dest /LOUT19_4605_pre_plai_1 /DEST pdfmark 240 fnt1 567 6807(The)m 220 fnt2 1023 6804(@PlainGr)m 2(aphic)k 240 fnt1 2580 6807(symbol)m 3368(is)s 3606(a)s 4(v)k 3(ery)k 4211(rudimentary)s 5461(analogue)s 6408(for)s 6774(plain)s 7337(te)s 3(xt)k 7779(output)s 8479(of)s 8778(the)s 220 fnt2 0 6516(@Gr)m 2(aphic)k 240 fnt1 1037 6519(symbol)m 1789(for)s 2119(PostScript)s 3153(output.)s 3921(Its)s 4202(result)s 4784(is)s 4986(its)s 5254(right)s 5757(parameter)s 6763(printed)s 7490(on)s 7779(a)s 7937(background)s 0 6231(created)m 747(by)s 1041(repeated)s 1908(printings)s 2809(of)s 3080(its)s 3356(left)s 3733(parameter)s 9(,)k 4785(which)s 5427(must)s 5952(be)s 6234(a)s 6400(simple)s 7093(w)s 2(ord.)k 7747(F)s 3(or)k 8136(e)s 3(xample,)k 480 5726("." @PlainGraphic 5s @W)m 9(ide)k 0 5223(w)m 2(ould)k 676(produce)s 1525(\207v)s 3(e)k 1959(dots.)s 220 fnt2 2544 5220(@PlainGr)m 2(aphic)k 240 fnt1 4096 5223(is)m 4328(used)s 4847(in)s 5112(the)s 220 fnt2 5482 5220(tb)m 4(l)k 240 fnt1 5777 5223(table-dra)m 3(wing)k 7176(package)s 8038(to)s 8299(produce)s 0 4935(plain-te)m 3(xt)k 972(rules.)s 240 fnt5 0 4142(3.45.)m 591(@IncludeGraphic)s 2491(and)s 2932(@SysIncludeGraphic)s [ /Dest /LOUTincludegraphic /DEST pdfmark [ /Dest /LOUT19_4605_pre_incg_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_incg_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_incg_3 /DEST pdfmark 240 fnt1 540 3665(These)m 1167(symbols)s 2016(instruct)s 2792(Lout)s 3304(to)s 3543(incorporate)s 4687(a)s 4853(separately)s 5875(created)s 6622(illustration:)s 220 fnt2 480 3164(@IncludeGr)m 2(aphic "m)k 3(ypor)k -8(tr)k 2(ait.eps")k 240 fnt1 0 2666(The)m 457(parameter)s 1500(is)s 1739(implementation-dependent;)s 4443(in)s 4715(Basser)s 5441(Lout)s 5982(it)s 6203(is)s 6442(an)s 6754(object)s 7427(whose)s 8124(v)s 6(alue)k 8721(is)s 8960(a)s 0 2378(simple)m 705(w)s 2(ord)k 1265(denoting)s 2168(the)s 2528(name)s 3114(of)s 3397(a)s 3575(\207le.)s 4056(This)s 4544(\207le)s 4917(should)s 5626(ideally)s 6342(be)s 6636(a)s 6814(PostScript)s 7868(EPS)s 8338(V)s 26(ersion)k 0 2090(3.0)m 345(\207le)s 696([)s [ /Rect [767 2090 862 2252] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTadobe1990ps /ANN pdfmark 767(1)s 862(],)s 1038(since)s 1575(then)s 2034(Lout)s 2536(will)s 2952(k)s 2(eep)k 3445(careful)s 4152(track)s 4680(of)s 4941(what)s 5456(resources)s 6399(are)s 6736(required)s 7580(for)s 7908(printing)s 8708(that)s 0 1802(\207le.)m 473(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 1437(an)s 3(y)k 1838(PostScript)s 2885(\207le)s 3250(containing)s 4317(the)s 220 fnt2 4669 1799(%%BoundingBo)m 6(x:)k 240 fnt1 6464 1802(comment)m 7418(and)s 7826(not)s 8197(requiring)s 0 1514(unusual)m 800(resources)s 1753(is)s 1963(lik)s 2(ely)k 2559(to)s 2798(w)s 2(ork.)k 480 1140(The)m 924(result)s 1530(of)s 220 fnt2 1817 1137(@IncludeGr)m 2(aphic)k 240 fnt1 3584 1140(is)m 3811(an)s 4110(ordinary)s 4990(Lout)s 5518(object)s 6179(with)s 6677(marks)s 7328(through)s 8146(its)s 8439(centre.)s 0 852(It)m 202(may)s 665(be)s 944(rotated,)s 1711(scaled,)s 2412(and)s 2813(generally)s 3753(treated)s 4456(lik)s 2(e)k 4865(an)s 3(y)k 5259(other)s 5807(object.)s 6552(Basser)s 7246(Lout)s 7755(determines)s 8850(its)s 0 564(size)m 434(by)s 735(consulting)s 1792(the)s 2147(bounding)s 3113(box)s 3536(information)s 4728(in)s 4978(the)s 5333(\207le.)s 5809(If)s 6047(this)s 6450(cannot)s 7155(be)s 7444(found,)s 8117(a)s 8291(w)s 2(arning)k 0 276(message)m 866(is)s 1076(printed)s 1811(and)s 2215(the)s 2563(result)s 3153(object)s 3797(has)s 4167(zero)s 4631(size.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 76 82 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(76)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13202(@IncludeGr)m 2(aphic)k 240 fnt1 2228 13205(searches)m 3084(the)s 3428(same)s 3972(directories)s 5026(that)s 220 fnt2 5440 13202(@Include)m 240 fnt1 6419 13205(does)m 6905(\(Section)s 7754(3.48\).)s 220 fnt2 8413 13202(@Sys-)m 0 12914(IncludeGr)m 2(aphic)k 240 fnt1 1562 12917(is)m 1806(the)s 2188(same)s 2769(as)s 220 fnt2 3053 12914(@IncludeGr)m 2(aphic)k 240 fnt1 4744 12917(,)m 4885(e)s 3(xcept)k 5600(that)s 6052(it)s 6278(searches)s 7172(only)s 7686(the)s 8068(directories)s 0 12629(searched)m 894(by)s 220 fnt2 1188 12626(@SysInclude)m 240 fnt1 2476 12629(.)m 480 12255(If)m 720(the)s 1079(\207le)s 1450(name)s 2035(ends)s 2536(in)s 2789(an)s 3(y)k 3197(of)s 220 fnt2 3478 12252(.gz)m 240 fnt1 3765 12255(,)m 220 fnt2 3883 12252(-gz)m 240 fnt1 4182 12255(,)m 220 fnt2 4300 12252(.z)m 240 fnt1 4465 12255(,)m 220 fnt2 4582 12252(-z)m 240 fnt1 4759 12255(,)m 220 fnt2 4877 12252(_z)m 240 fnt1 5103 12255(,)m 5220(or)s 220 fnt2 5490 12252(.Z)m 240 fnt1 5680 12255(,)m 5798(the)s 6156(\207le)s 6528(will)s 6964(\207rst)s 7406(be)s 7699(uncompressed)s 0 11967(using)m 565(the)s 220 fnt2 906 11964(gunzip)m 240 fnt1 1597 11967(command)m 2592(into)s 3010(a)s 3169(temporary)s 4198(\207le)s 4552(called)s 220 fnt2 5173 11964(lout.eps)m 240 fnt1 5987 11967(in)m 6223(the)s 6564(current)s 7293(directory)s 15(.)k 8297(This)s 8765(\207le)s 0 11679(is)m 210(remo)s 3(v)k 3(ed)k 1099(immediately)s 2347(after)s 2843(it)s 3035(is)s 3245(copied)s 3941(into)s 4366(the)s 4714(output)s 5386(\207le.)s 240 fnt5 0 10886(3.46.)m 591(@IncludeGraphicRepeated)s 3445(and)s 3886(@SysIncludeGraphicRepeated)s [ /Dest /LOUTincludegraphicrepeated /DEST pdfmark [ /Dest /LOUT19_4605_pre_incr_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_incr_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_incr_3 /DEST pdfmark 240 fnt1 548 10409(These)m 1183(symbols,)s 2097(which)s 2747(are)s 3103(allo)s 6(wed)k 3920(only)s 4409(at)s 4649(the)s 5006(start)s 5484(of)s 5764(a)s 5938(document,)s 6998(tell)s 7365(Lout)s 7886(that)s 8312(the)s 8669(EPS)s 0 10121(\207le)m 361(named)s 1057(is)s 1267(lik)s 2(ely)k 1863(to)s 2102(be)s 2384(included)s 3266(repeatedly:)s 220 fnt2 480 9620(@IncludeGr)m 2(aphicRepeated { m)k 3(ypor)k -8(tr)k 2(ait.eps })k 240 fnt1 0 9122(T)m 19(o)k 289(actually)s 1088(see)s 1438(the)s 1775(graphic)s 2533(you)s 2937(use)s 220 fnt2 3301 9119(@IncludeGr)m 2(aphic)k 240 fnt1 5041 9122(as)m 5279(usual.)s 5937(The)s 6354(purpose)s 7157(of)s 220 fnt2 7416 9119(@IncludeGr)m 2(aphi-)k 0 8831(cRepeated)m 240 fnt1 1117 8834(is)m 1335(not)s 1710(to)s 1957(display)s 2710(the)s 3067(graphic)s 3845(b)s 4(ut)k 4215(rather)s 4840(to)s 5087(instruct)s 5871(Lout)s 6392(to)s 6639(include)s 7407(its)s 7692(EPS)s 8157(\207le)s 8526(in)s 8778(the)s 0 8546(output)m 678(\207le)s 1045(just)s 1456(once,)s 2021(at)s 2260(the)s 2614(start,)s 3137(rather)s 3759(than)s 4234(o)s 3(v)k 3(er)k 4720(and)s 5130(o)s 3(v)k 3(er)k 5615(ag)s 1(ain)k 6195(for)s 6539(e)s 6(v)k 3(ery)k 7122(time)s 7608(it)s 7806(appears)s 8593(in)s 8843(an)s 220 fnt2 0 8255(@IncludeGr)m 2(aphic)k 240 fnt1 1691 8258(,)m 1798(as)s 2048(w)s 2(ould)k 2703(otherwise)s 3688(occur)s 13(.)k 480 7884(An)m 3(y)k 943(number)s 1732(of)s 220 fnt2 2001 7881(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 4695 7884(and)m 220 fnt2 5097 7881(@SysIncludeGr)m 2(aphicRepeated)k 240 fnt1 8156 7884(directi)m 6(v)k 3(es)k 0 7596(may)m 457(appear)s 1145(at)s 1368(the)s 1706(start)s 2167(of)s 2429(the)s 2768(document.)s 3866(The)s 4285(\207les)s 4725(in)s 9(v)k 4(olv)k 3(ed)k 5596(may)s 6052(be)s 6325(compressed)s 7503(as)s 7744(for)s 220 fnt2 8072 7593(@Include-)m 0 7305(Gr)m 2(aphic)k 240 fnt1 761 7308(.)m 922(The)s 1347(\207le)s 1705(names)s 2364(gi)s 6(v)k 3(en)k 2941(within)s 220 fnt2 3605 7305(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 6297 7308(must)m 6819(be)s 7098(identical)s 7972(to)s 8208(the)s 8552(name)s 0 7020(used)m 476(within)s 1122(the)s 1449(corresponding)s 220 fnt2 2849 7017(@IncludeGr)m 2(aphic)k 240 fnt1 4579 7020(symbols,)m 5462(or)s 5700(else)s 6105(the)s 220 fnt2 6431 7017(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 0 6732(will)m 437(be)s 731(inef)s 6(fecti)k 6(v)k 3(e.)k 1911(If)s 220 fnt2 2153 6729(@SysIncludeGr)m 2(aphicRepeated)k 240 fnt1 5226 6732(is)m 5447(used)s 5956(\(as)s 6296(opposed)s 7165(to)s 220 fnt2 7416 6729(@IncludeGr)m 2(aphi-)k 0 6441(cRepeated)m 240 fnt1 1049 6444(\))m 1205(then)s 1703(all)s 2024(corresponding)s 3475(includes)s 4351(must)s 4905(use)s 220 fnt2 5308 6441(@SysIncludeGr)m 2(aphic)k 240 fnt1 7454 6444(rather)m 8098(than)s 220 fnt2 8596 6441(@In-)m 0 6153(cludeGr)m 2(aphic)k 240 fnt1 1285 6156(.)m 480 5782(Use)m 901(of)s 220 fnt2 1165 5779(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 3853 5782(does)m 4336(not)s 4694(change)s 5421(the)s 5762(appearance)s 6886(of)s 7149(the)s 7490(output)s 8155(at)s 8380(all,)s 8717(b)s 4(ut,)k 0 5494(if)m 225(the)s 582(EPS)s 1047(\207le)s 1417(w)s 2(ould)k 2081(otherwise)s 3074(be)s 3365(included)s 4256(man)s 3(y)k 4847(times)s 5424(o)s 3(v)k 3(er)k 9(,)k 5950(the)s 6306(result)s 6905(will)s 7340(be)s 7630(a)s 7805(much)s 8403(shorter)s 0 5206(PostScript)m 1059(\207le)s 1437(which)s 2097(will)s 2540(usually)s 3302(print)s 3831(signi\207cantly)s 5084(f)s 2(aster)k 5689(as)s 5956(well.)s 6548(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 7526(Lout)s 8055(uses)s 8536(Le)s 6(v)k 3(el)k 0 4918(2)m 186(PostScript)s 1240(features)s 2058(to)s 2309(implement)s 220 fnt2 3403 4915(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 6038 4918(,)m 6158(which)s 6812(may)s 7290(not)s 7668(be)s 7962(a)s 4(v)k 6(ailable)k 8883(in)s 0 4630(some)m 565(old)s 934(printers,)s 1775(and)s 2184(the)s 2537(contents)s 3390(of)s 3665(the)s 4018(EPS)s 4480(\207le)s 4846(ha)s 4(v)k 3(e)k 5352(to)s 5596(be)s 5882(stored)s 6529(in)s 6777(the)s 7130(printer)s 7831(for)s 8174(the)s 8527(entire)s 0 4342(duration)m 841(of)s 1099(the)s 1433(print)s 1931(job,)s 2331(so)s 2583(there)s 3103(is)s 3299(a)s 3452(risk)s 3858(that)s 4262(memory)s 5100(will)s 5513(run)s 5875(out)s 6228(if)s 220 fnt2 6431 4339(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 0 4054(is)m 210(used.)s 480 3680(The)m 955(implementation)s 2560(of)s 220 fnt2 2878 3677(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 5621 3680(uses)m 6132(code)s 6687(gi)s 6(v)k 3(en)k 7315(by)s 7656(the)s 8052(authors)s 8855(of)s 0 3392(PostScript)m 1039(which)s 1677(emplo)s 2(ys)k 2533(PostScript)s 3571(forms)s 4175(to)s 4410(sa)s 4(v)k 3(e)k 4880(the)s 5225(EPS)s 5678(\207les)s 6123([)s [ /Rect [6194 3392 6308 3554] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTadobe1996epsforms /ANN pdfmark 6194(2)s 6308(].)s 6547(Lout')s 13(s)k 7205(v)s 3(ersion)k 7959(of)s 8226(this)s 8618(code)s 0 3104(is)m 215(some)s 6(what)k 1245(modi\207ed,)s 2209(partly)s 2825(for)s 3169(simplicity)s 4184(and)s 4593(partly)s 5210(to)s 5455(correct)s 6182(a)s 6354(possible)s 7200(b)s 4(ug)k 7614(caused)s 8329(by)s 8629(their)s 0 2816(use)m 375(of)s 646(a)s 812(single)s 1439(\207lter)s 1949(to)s 2188(read)s 2657(all)s 2950(the)s 3298(EPS)s 3755(\207les,)s 4260(rather)s 4876(than)s 5345(a)s 5511(separate)s 6349(\207lter)s 6859(for)s 7197(each)s 7692(one.)s 240 fnt5 0 2023(3.47.)m 591(@Pr)s 4(ependGraphic and @SysPr)k 4(ependGraphic)k [ /Dest /LOUTprependgraphic /DEST pdfmark [ /Dest /LOUT19_4605_pre_prep_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_prep_2 /DEST pdfmark [ /Dest /LOUT19_4605_pre_prep_3 /DEST pdfmark 240 fnt1 582 1546(These)m 1252(symbols,)s 2200(which)s 2885(may)s 3394(appear)s 4134(an)s 3(ywhere)k 5160(that)s 5621(a)s 5830(de\207nition)s 6847(or)s 220 fnt2 7149 1543(@Use)m 240 fnt1 7857 1546(symbol)m 8660(may)s 0 1258(appear)m 9(,)k 738(tell)s 1101(Lout)s 1617(to)s 1860(include)s 2624(the)s 2976(contents)s 3828(of)s 4103(a)s 4273(\207le)s 4637(in)s 4884(the)s 5236(preamble)s 6185(of)s 6460(its)s 6740(output.)s 7520(F)s 3(or)k 7913(Basser)s 8614(Lout)s 0 970(this)m 418(means)s 1102(that)s 1542(the)s 1912(\207le)s 2295(must)s 2843(contain)s 3626(PostScript)s 4690(\(and)s 5195(ideally)s 5921(it)s 6136(w)s 2(ould)k 6813(be)s 3(gin)k 7421(and)s 7847(end)s 8273(with)s 8778(the)s 220 fnt2 0 679(%%BeginResource)m 240 fnt1 1941 682(and)m 220 fnt2 2345 679(%%EndResource)m 240 fnt1 4116 682(comments)m 5150(of)s 5421(DSC)s 5939(3.0\).)s 6482(F)s 3(or)k 6871(e)s 3(xample,)k 220 fnt2 480 181(@SysPrependGr)m 2(aphic { diagf)k 6(.lpg })k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 77 83 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.47.)m 1991(@Pr)s 8(ependGr)k 3(aphic and @SysPr)k 8(ependGr)k 3(aphic)k 240 fnt5 10248 -1583(77)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(appears)m 818(at)s 1088(the)s 1474(start)s 1981(of)s 2290(the)s 2676(Diag)s 3231(package;)s 4165(the)s 4551(\207le)s 220 fnt2 4949 13202(diagf)m 6(.lpg)k 240 fnt1 5857 13205(contains)m 6743(a)s 6946(number)s 7775(of)s 8084(PostScript)s 0 12917(de\207nitions)m 1048(used)s 1532(by)s 1812(Diag)s 2317(for)s 2642(dra)s 3(wing)k 3462(diagrams.)s 4489(It)s 4680(sa)s 4(v)k 3(es)k 5229(a)s 5382(lot)s 5680(of)s 5938(space)s 6511(to)s 6737(include)s 7484(them)s 8008(just)s 8400(once)s 8894(at)s 0 12629(the)m 334(start)s 789(lik)s 2(e)k 1186(this,)s 1624(rather)s 2225(than)s 2679(with)s 3146(e)s 6(v)k 3(ery)k 3708(diagram.)s 220 fnt2 4640 12626(@PrependGr)m 2(aphic)k 240 fnt1 6498 12629(and)m 220 fnt2 6887 12626(@SysPrependGr)m 2(aphic)k 240 fnt1 0 12341(search)m 667(for)s 1005(the)s 1353(\207le)s 1714(in)s 1957(the)s 2305(same)s 2852(places)s 3500(as)s 220 fnt2 3750 12338(@Include)m 240 fnt1 4732 12341(and)m 220 fnt2 5136 12338(@SysInclude)m 240 fnt1 6484 12341(respecti)m 6(v)k 3(ely)k 15(.)k 480 11967(If)m 699(the)s 1036(same)s 1572(\207le)s 1921(name)s 2484(appears)s 3254(in)s 3486(tw)s 2(o)k 220 fnt2 3884 11964(@PrependGr)m 2(aphic)k 240 fnt1 5746 11967(or)m 220 fnt2 5994 11964(@SysPrependGr)m 2(aphic)k 240 fnt1 8221 11967(symbols,)m 0 11679(the)m 385(second)s 1146(occurrence)s 2288(is)s 2536(silently)s 3330(ignored.)s 4263(This)s 4777(allo)s 6(ws)k 5484(se)s 6(v)k 3(eral)k 6243(packages)s 7209(to)s 7486(share)s 8084(PostScript)s 0 11391(resources:)m 1059(each)s 1545(includes)s 2384(the)s 2722(appropriate)s 3857(prepend)s 4677(\207le,)s 5079(b)s 4(ut)k 5432(in)s 5666(the)s 6005(end)s 6399(only)s 6870(one)s 7263(cop)s 2(y)k 7771(ot)s 8008(it)s 8191(is)s 8391(printed)s 0 11103(to)m 239(Lout')s 13(s)k 901(output.)s 240 fnt5 0 10310(3.48.)m 591(@Include and @SysInclude)s [ /Dest /LOUTinclude /DEST pdfmark [ /Dest /LOUT19_4605_pre_incl_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_incl_2 /DEST pdfmark 240 fnt1 562 9833(These)m 1212(symbols)s 2083(instruct)s 2882(Lout)s 3417(to)s 3678(temporarily)s 4869(switch)s 5572(to)s 5834(reading)s 6627(another)s 7426(\207le,)s 7861(whose)s 8552(name)s 0 9545(appears)m 781(in)s 1024(braces)s 1685(follo)s 6(wing)k 2662(the)s 3010(symbol.)s 3879(F)s 3(or)k 4268(e)s 3(xample,)k 220 fnt2 480 9044(@Include { "/usr/lout/langdefs" })m 240 fnt1 0 8545(will)m 455(cause)s 1072(the)s 1450(contents)s 2328(of)s 2629(\207le)s 3020(/usr/lout/langdefs)s 4773(to)s 5042(be)s 5354(read)s 5853(at)s 6115(the)s 6493(point)s 7075(it)s 7297(occurs.)s 8115(After)s 8708(that)s 0 8257(\207le)m 405(is)s 659(read,)s 1221(the)s 1613(current)s 2393(\207le)s 2798(is)s 3052(resumed.)s 4070(The)s 4542(included)s 5468(\207le)s 5873(may)s 6383(contain)s 7188(arbitrary)s 8107(Lout)s 8664(te)s 3(xt,)k 0 7969(including)m 958(other)s 220 fnt2 1511 7966(@Include)m 240 fnt1 2494 7969(commands.)m 3697(The)s 4127(\207le)s 4489(is)s 4701(searched)s 5597(for)s 5936(\207rst)s 6369(in)s 6614(the)s 6963(current)s 7701(directory)s 15(,)k 8657(then)s 0 7681(in)m 259(a)s 442(sequence)s 1392(of)s 1680(standard)s 2565(places)s 3229(which)s 3888(are)s 4252(not)s 4635(necessarily)s 5767(the)s 6131(same)s 6695(places)s 7360(that)s 7795(databases)s 8779(are)s 0 7393(searched)m 894(for)s 13(.)k 220 fnt2 1323 7390(@SysInclude)m 240 fnt1 2671 7393(searches)m 3531(the)s 3879(standard)s 4747(places)s 5395(only)s 15(.)k 480 7019(From)m 1084(V)s 26(ersion)k 1899(3.27,)s 2452(a)s 2645(special)s 3389(beha)s 4(viour)k 4429(has)s 4826(been)s 5361(instituted)s 6335(when)s 6937(an)s 7247(attempt)s 8049(is)s 8286(made)s 8887(to)s 220 fnt2 0 6728(@Include)m 240 fnt1 973 6731(or)m 220 fnt2 1223 6728(@SysInclude)m 240 fnt1 2562 6731(the)m 2901(same)s 3439(\207le)s 3791(twice.)s 4403(If)s 4623(a)s 4780(second)s 5494(or)s 5744(subsequent)s 6859(attempt)s 7626(occurs)s 8292(after)s 8778(the)s 0 6443(end)m 402(of)s 671(de\207nitions,)s 220 fnt2 1785 6440(@Use)m 240 fnt1 2448 6443(clauses,)m 3242(and)s 220 fnt2 3644 6440(@Database)m 240 fnt1 4855 6443(clauses)m 5594(\(i.e.)s 6006(if)s 6221(it)s 6410(occurs)s 7083(within)s 7748(the)s 8094(content)s 8855(of)s 0 6155(the)m 342(document\),)s 1465(it)s 1650(will)s 2069(go)s 2355(ahead,)s 3014(thus)s 3457(allo)s 6(wing)k 4334(the)s 4675(repeated)s 5535(inclusion)s 6463(of)s 6727(\207les)s 7169(containing)s 8225(objects)s 8946(\211)s 0 5867(not)m 370(necessarily)s 1490(recommended,)s 2957(b)s 4(ut)k 3324(certainly)s 4217(one)s 4624(w)s 2(ay)k 5080(of)s 5356(repeating)s 6302(information.)s 7599(But)s 8010(if)s 8232(a)s 8403(second)s 0 5579(or)m 270(subsequent)s 1406(attempt)s 2194(occurs)s 2881(within)s 3561(the)s 3921(re)s 3(gion)k 4598(of)s 4881(de\207nitions,)s 220 fnt2 6010 5576(@Use)m 240 fnt1 6687 5579(clauses,)m 7496(and)s 220 fnt2 7912 5576(@Database)m 240 fnt1 0 5291(clauses,)m 797(then)s 1266(that)s 1684(attempt)s 2460(will)s 2886(be)s 3168(silently)s 3925(ignored.)s 480 4917(This)m 955(beha)s 4(viour)k 1967(is)s 2175(useful)s 2813(for)s 3149(situations)s 4115(where)s 4754(tw)s 2(o)k 5162(packages)s 6089(depend)s 6837(on)s 7133(a)s 7298(third,)s 7854(caled,)s 8464(say)s 15(,)k 220 fnt2 8873 4914(C)m 240 fnt1 9022 4917(.)m 0 4629(W)m 19(e)k 369(can)s 758(then)s 1227(place)s 220 fnt2 480 4128(@SysInclude { C })m 240 fnt1 0 3630(at)m 222(the)s 559(start)s 1018(of)s 1279(both)s 1751(packages.)s 2781(If)s 3001(neither)s 3713(package)s 4542(is)s 4742(included,)s 5662(then)s 220 fnt2 6120 3627(C)m 240 fnt1 6319 3630(w)m 2(on')k 4(t)k 6920(be)s 7191(either)s 13(.)k 7875(But)s 8270(if)s 8476(one)s 8867(or)s 0 3342(both)m 483(is)s 693(included,)s 1624(then)s 220 fnt2 2093 3339(C)m 240 fnt1 2301 3342(will)m 2727(be)s 3009(included)s 3891(just)s 4296(once)s 4803(at)s 5035(the)s 5383(start)s 5853(of)s 6124(the)s 6471(\207rst.)s 6946(An)s 3(y)k 7410(pattern)s 8130(of)s 8400(ac)s 3(yclic)k 0 3054(dependencies)m 1342(between)s 2198(packages)s 3129(can)s 3520(be)s 3805(e)s 3(xpressed)k 4805(with)s 5289(this)s 5688(mechanism,)s 6886(just)s 7294(by)s 7590(including)s 8550(e)s 6(v)k 3(ery)k 0 2766(package)m 840(that)s 1259(a)s 1426(gi)s 6(v)k 3(en)k 2007(package)s 2848(depends)s 3684(on)s 3982(at)s 4215(the)s 4564(start)s 5035(of)s 5306(the)s 5655(\207le)s 6017(containing)s 7081(that)s 7500(package.)s 8449(Cyclic)s 0 2478(dependencies)m 1340(are)s 1687(be)s 3(yond)k 2448(Lout')s 13(s)k 3110(one-pass)s 3998(comprehension)s 5517(an)s 3(yw)k 2(ay)k 15(.)k 240 fnt5 0 1685(3.49.)m 591(@BackEnd)s 1814(and)s 2255(the)s 2629(PlainT)s 22(ext)k 3663(and)s 4104(PDF)s 4623(back)s 5172(ends)s [ /Dest /LOUTbackend /DEST pdfmark [ /Dest /LOUT19_4605_pre_bend_1 /DEST pdfmark 240 fnt1 547 1253(The)m 220 fnt2 983 1250(@Bac)m 4(kEnd)k 240 fnt1 2136 1253(symbol,)m 2955(which)s 3605(tak)s 2(es)k 4153(no)s 4454(parameters,)s 5615(has)s 5993(for)s 6339(its)s 6623(result)s 7220(a)s 7394(string)s 7999(naming)s 8778(the)s 0 965(back)m 523(end)s 938(currently)s 1865(in)s 2119(use.)s 2613(Three)s 3237(back)s 3761(ends)s 4262(are)s 4620(a)s 4(v)k 6(ailable,)k 5590(PostScript,)s 6690(PDF)s 7198(and)s 7613(PlainT)s 16(e)k 3(xt.)k 8698(The)s 0 677(symbol)m 760(is)s 970(generally)s 1913(used)s 2410(lik)s 2(e)k 2822(this:)s 220 fnt2 480 176(@Bac)m 4(kEnd @Case {)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 78 84 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(78)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207( PlainT)m 26(e)k 6(xt @Y)k 4(ield { ...)k 13( })k 480 12919( P)m 11(ostScr)k -3(ipt @Y)k 4(ield { ...)k 13( })k 480 12631( PDF @Y)m 4(ield { ...)k 13( })k 480 12343(})m 240 fnt1 0 11849(to)m 255(obtain)s 926(dif)s 6(ferent)k 1817(objects)s 2561(depending)s 3628(on)s 3941(the)s 4305(back)s 4834(end.)s 5360(No)s 220 fnt2 5722 11846(else)m 240 fnt1 6192 11849(is)m 6418(required)s 7288(since)s 7851(these)s 8414(are)s 8778(the)s 0 11561(only)m 480(possible)s 1320(v)s 6(alues.)k 480 11187(When)m 1101(a)s 220 fnt2 1259 11184(@Case)m 240 fnt1 2037 11187(symbol)m 2789(has)s 220 fnt2 3151 11184(@Bac)m 4(kEnd)k 240 fnt1 4287 11187(for)m 4617(its)s 4885(left)s 5253(parameter)s 6259(and)s 6655(the)s 6994(left)s 7363(parameter)s 8369(of)s 8631(each)s 220 fnt2 0 10896(@Y)m 4(ield)k 240 fnt1 768 10899(symbol)m 1544(within)s 2228(it)s 2435(consists)s 3259(of)s 3546(a)s 3728(sequence)s 4676(of)s 4963(one)s 5381(or)s 5656(more)s 6218(literal)s 6844(w)s 2(ords)k 7494(\(including)s 220 fnt2 8546 10896(else)m 240 fnt1 8940 10899(\),)m 0 10611(Lout)m 531(will)s 976(optimize)s 1888(by)s 2201(e)s 6(v)k 6(aluating)k 3258(the)s 220 fnt2 3625 10608(@Case)m 240 fnt1 4432 10611(symbol)m 5211(at)s 5463(the)s 5830(time)s 6330(it)s 6541(is)s 6771(read.)s 7365(This)s 7861(optimization)s 0 10323(ensures)m 789(that)s 1228(there)s 1782(is)s 2013(only)s 2514(a)s 2701(small)s 3294(once-only)s 4326(performance)s 5610(penalty)s 6389(for)s 6748(multiple)s 7621(back)s 8155(ends,)s 8722(and)s 0 10035(it)m 206(permits)s 987(these)s 220 fnt2 1548 10032(@Case)m 240 fnt1 2350 10035(symbols)m 3213(\(b)s 4(ut)k 3668(no)s 3976(other)s 4541(symbols\))s 5481(to)s 5734(appear)s 6446(within)s 7128(the)s 7490(object)s 8149(follo)s 6(wing)k 220 fnt2 0 9744(@Include)m 240 fnt1 982 9747(and)m 220 fnt2 1386 9744(@PrependGr)m 2(aphic)k 240 fnt1 3259 9747(symbols.)m 480 9373(The)m 918(PlainT)s 16(e)k 3(xt)k 1899(back)s 2423(end)s 2837(dif)s 6(fers)k 3515(from)s 4050(the)s 4409(PostScript)s 5461(one)s 5874(in)s 6128(tw)s 2(o)k 6548(main)s 7094(respects.)s 8038(First,)s 8593(there)s 0 9085(is)m 226(ef)s 6(fecti)k 6(v)k 3(ely)k 1302(just)s 1724(one)s 2143(font:)s 2711(although)s 3622(all)s 3932(the)s 4297(font)s 4759(commands)s 5864(w)s 2(ork)k 6431(e)s 3(xactly)k 7189(as)s 7456(usual,)s 8085(the)s 3(y)k 8565(don')s 4(t)k 0 8797(actually)m 817(change)s 1558(an)s 3(ything.)k 2565(Each)s 3107(character)s 4049(in)s 4299(this)s 4702(font)s 5155(is)s 5372(tak)s 2(en)k 5953(to)s 6199(be)s 6488(one)s 6898(tenth)s 7440(of)s 7719(one)s 8128(inch)s 8605(wide)s 0 8509(and)m 404(20)s 699(points)s 1335(high.)s 1925(Second,)s 2737(the)s 3085(output)s 3757(is)s 3967(an)s 4250(ordinary)s 5114(te)s 3(xt)k 5529(\207le,)s 5941(not)s 6307(a)s 6473(PostScript)s 7515(\207le.)s 480 8135(Clearly)m 15(,)k 1306(with)s 1820(ordinary)s 2716(te)s 3(xt)k 3162(output)s 3866(the)s 4246(possibility)s 5327(of)s 5630(adv)s 6(anced)k 6618(graphics)s 7510(features)s 8348(such)s 8876(as)s 0 7847(rotation)m 829(and)s 1262(scaling)s 2022(is)s 2261(curtailed.)s 3290(Ne)s 6(v)k 3(ertheless,)k 4651(all)s 4974(symbols)s 5852(ha)s 4(v)k 3(e)k 6383(well-de\207ned)s 7665(\(possibly)s 8626(null\))s 0 7559(ef)m 6(fects)k 706(in)s 976(the)s 1351(PlainT)s 16(e)k 3(xt)k 2348(back)s 2888(end,)s 3368(so)s 3661(there)s 4221(is)s 4457(no)s 4777(additional)s 5815(danger)s 6553(of)s 6851(crashing)s 7741(the)s 8116(system)s 8867(or)s 0 7271(obtaining)m 957(grossly)s 1702(unreasonable)s 3020(output)s 3692(by)s 3986(a)s 4152(change)s 4886(to)s 5125(PlainT)s 16(e)k 3(xt.)k 480 6897(The)m 905(PlainT)s 16(e)k 3(xt)k 1872(back)s 2382(end)s 2783(is)s 2990(obtained)s 3869(by)s 4160(the)s 220 fnt2 4505 6894(-p)m 240 fnt1 4749 6897(option)m 5415(to)s 5651(Basser)s 6345(Lout.)s 6958(The)s 7383(character)s 8314(size)s 8737(can)s 0 6609(be)m 282(changed)s 1138(by)s 1432(adding)s 2137(tw)s 2(o)k 2547(lengths)s 3289(to)s 3528(the)s 220 fnt2 3876 6606(-p)m 240 fnt1 4123 6609(option,)m 4842(lik)s 2(e)k 5254(this:)s 220 fnt2 480 6112(lout -p0.1i12p ...)m 240 fnt1 0 5616(which)m 650(in)s 9(v)k 4(ok)k 2(es)k 1439(the)s 1795(PlainT)s 16(e)k 3(xt)k 2773(back)s 3294(end)s 3706(with)s 4196(each)s 4699(character)s 5641(being)s 6234(0.1)s 6577(inches)s 7247(wide)s 7776(and)s 8188(12)s 8490(points)s 0 5328(high.)m 595(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 1561(e)s 3(xperience)k 2655(suggests)s 3523(that)s 3947(the)s 4301(best)s 4752(approach)s 5691(is)s 5907(to)s 6152(de\207ne)s 6799(all)s 7098(horizontal)s 8128(lengths)s 8876(as)s 0 5040(multiples)m 943(of)s 1218(the)s 220 fnt2 1569 5037(s)m 240 fnt1 1736 5040(unit)m 2171(\(the)s 2602(width)s 3208(of)s 3482(a)s 3652(space,)s 4293(hence)s 4911(the)s 5262(width)s 5868(of)s 6143(all)s 6439(characters\))s 7538(and)s 7945(to)s 8188(de\207ne)s 8833(all)s 0 4752(v)m 3(ertical)k 777(lengths)s 1530(as)s 1791(multiples)s 2742(of)s 3023(the)s 220 fnt2 3382 4749(f)m 240 fnt1 3511 4752(unit)m 3954(\(the)s 4391(font)s 4847(size,)s 5336(equal)s 5920(to)s 6169(the)s 6528(height)s 7197(of)s 7479(e)s 6(v)k 3(ery)k 8066(character\),)s 0 4464(and)m 404(not)s 770(to)s 1009(change)s 1743(the)s 2091(character)s 3025(size)s 3452(in)s 3695(the)s 4043(command)s 5045(line.)s 480 4090(There)m 1098(is)s 1314(a)s 220 fnt2 1486 4087(-P)m 240 fnt1 1762 4090(option)m 2437(which)s 3085(is)s 3301(identical)s 4184(with)s 4671(the)s 220 fnt2 5025 4087(-p)m 240 fnt1 5278 4090(option)m 5953(e)s 3(xcept)k 6640(that)s 7064(it)s 7262(inserts)s 7942(a)s 8114(form-feed)s 0 3802(character)m 934(between)s 1788(each)s 2283(tw)s 2(o)k 2693(components)s 3901(of)s 4172(the)s 4520(output,)s 5239(b)s 4(ut)k 5601(not)s 5967(before)s 6633(the)s 6981(\207rst)s 7412(or)s 7671(after)s 8167(the)s 8515(last.)s 480 3428(The)m 911(PDF)s 1412(back)s 1928(end)s 2336(is)s 2549(obtained)s 3435(by)s 3732(typing)s 220 fnt2 4401 3425(lout -Z)m 240 fnt1 5017 3428(.)m 5185(It)s 5393(is)s 5607(similar)s 6332(to)s 6575(PostScript)s 7620(b)s 4(ut)k 7986(much)s 8579(more)s 0 3140(limited)m 755(in)s 1020(functionality)s 15(.)k 2412(Consult)s 3239(a)s 3426(separate)s 4286(document)s 5312(distrib)s 4(uted)k 6410(with)s 6913(Lout)s 7447(for)s 7807(further)s 8538(infor)s 4(-)k 0 2852(mation.)m 240 fnt5 0 2109(3.50.)m 591(@V)s 24(erbatim and @RawV)k 24(erbatim)k [ /Dest /LOUTverbatim /DEST pdfmark [ /Dest /LOUT19_4605_pre_verb_1 /DEST pdfmark [ /Dest /LOUT19_4605_pre_verb_2 /DEST pdfmark 240 fnt1 543 1677(These)m 1173(symbols)s 2026(instruct)s 2805(Lout)s 3321(to)s 3563(read)s 4036(the)s 4387(follo)s 6(wing)k 5367(te)s 3(xt)k 5786(\(enclosed)s 6763(in)s 7010(braces\))s 7751(v)s 3(erbatim,)k 8708(that)s 0 1389(is,)m 266(turning)s 1010(of)s 6(f)k 1354(all)s 1647(special)s 2365(character)s 3299(meanings.)s 4380(F)s 3(or)k 4769(e)s 3(xample,)k 220 fnt2 480 888(@V)m 17(erbatim { "hello" })k 240 fnt1 0 394(produces)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 79 85 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(3.50.)m 1991(@V)s 26(erbatim and @RawV)k 26(erbatim)k 240 fnt5 10249 -1583(79)m gsave 1417 -15423 translate 240 fnt1 9066 13412 0 13303 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13249("hello")m 220 fnt2 0 12793(@V)m 17(erbatim)k 240 fnt1 1178 12796(ignores)m 1983(all)s 2325(characters)s 3393(after)s 3938(the)s 4336(opening)s 5210(brace)s 5833(up)s 6175(to)s 6464(b)s 4(ut)k 6875(not)s 7291(including)s 8297(the)s 8695(\207rst)s 0 12508(non-white-space)m 1654(character)s 13(.)k 220 fnt2 2697 12505(@Ra)m 4(wV)k 17(erbatim)k 240 fnt1 4278 12508(dif)m 6(fers)k 4964(from)s 220 fnt2 5506 12505(@V)m 17(erbatim)k 240 fnt1 6653 12508(only)m 7151(in)s 7413(that)s 7849(it)s 8059(ignores)s 8833(all)s 0 12220(characters)m 1018(after)s 1514(the)s 1862(opening)s 2687(brace)s 3261(up)s 3554(to)s 3793(b)s 4(ut)k 4155(not)s 4521(including)s 5479(the)s 5827(\207rst)s 6258(non-white-space)s 7894(character)s 9(,)k 8867(or)s 0 11932(up)m 302(to)s 551(and)s 965(including)s 1931(the)s 2289(\207rst)s 2730(ne)s 6(wline)k 3547(character)s 9(,)k 4528(whiche)s 6(v)k 3(er)k 5585(comes)s 6257(\207rst.)s 6802(This)s 7287(v)s 6(ariant)k 8014(is)s 8234(useful)s 8883(in)s 0 11644(cases)m 555(such)s 1051(as)s 220 fnt2 480 11193(@Ra)m 4(wV)k 17(erbatim {)k 480 10905( v)m 5(ar x:)k 11( Real)k 480 10617(begin)m 480 10329(})m 240 fnt1 0 9835(where)m 662(the)s 1033(\207rst)s 1486(line)s 1923(of)s 2217(the)s 2587(v)s 3(erbatim)k 3516(te)s 3(xt)k 3954(be)s 3(gins)k 4649(with)s 5154(white)s 5763(space)s 6373(which)s 7038(w)s 2(ould)k 7715(be)s 8020(ignored)s 8832(by)s 220 fnt2 0 9544(@V)m 17(erbatim)k 240 fnt1 1069 9547(.)m 1232(Both)s 1754(symbols)s 2602(ignore)s 3268(all)s 3560(white)s 4146(spaces)s 4820(at)s 5051(the)s 5398(end)s 5801(of)s 6071(the)s 6418(v)s 3(erbatim)k 7323(te)s 3(xt,)k 7784(preceding)s 8778(the)s 0 9259(closing)m 744(brace.)s 240 fnt5 0 8466(3.51.)m 591(@Underline)s [ /Dest /LOUTunderline /DEST pdfmark [ /Dest /LOUT19_4605_pre_unde_1 /DEST pdfmark 240 fnt1 533 8034(The)m 220 fnt2 953 8031(@Under)m -3(line)k 240 fnt1 2160 8034(symbol)m 2912(underlines)s 3951(its)s 4219(right)s 4722(parameter)s 9(,)k 5767(b)s 4(ut)k 6121(only)s 6593(if)s 6802(that)s 7212(parameter)s 8218(is)s 8420(a)s 8578(w)s 2(ord)k 0 7746(or)m 259(a)s 425(paragraph:)s 220 fnt2 480 7245(W)m 6(e @Under)k -3(line { really do } mean this)k 3(.)k 240 fnt1 0 6747(produces)m 480 6244(W)m 19(e)k 849(really)s 1446(do)s 849 1679 6220 12 ul 1739(mean)s 2314(this.)s 0 5741(It)m 204(is)s 412(not)s 776(possible)s 1614(to)s 1851(underline)s 2808(an)s 3089(arbitrary)s 3962(object)s 4604(using)s 5174(this)s 5568(symbol;)s 6383(the)s 220 fnt2 6729 5738(@Under)m -3(line)k 240 fnt1 7942 5741(symbol)m 8700(will)s 0 5453(be)m 282(ignored)s 1071(if)s 1288(this)s 1684(is)s 1894(attempted.)s 480 5079(It)m 731(is)s 987(v)s 3(ery)k 1509(easy)s 2034(to)s 240 fnt6 2319 5081(de\207ne)m 240 fnt1 2990 5079(a)m 3202(symbol)s 4008(which)s 4696(will)s 5168(underline)s 6173(an)s 6502(arbitrary)s 7423(object,)s 8160(using)s 8778(the)s 220 fnt2 0 4788(@Gr)m 2(aphic)k 240 fnt1 1045 4791(symbol.)m 1915(This)s 2393(raises)s 2988(the)s 3337(question)s 4207(of)s 4479(wh)s 1(y)k 220 fnt2 4946 4788(@Under)m -3(line)k 240 fnt1 6163 4791(is)m 6374(needed)s 7111(at)s 7345(all.)s 7748(The)s 8177(answer)s 8916(is)s 0 4503(that)m 220 fnt2 418 4500(@Under)m -3(line)k 240 fnt1 1633 4503(has)m 2003(tw)s 2(o)k 2413(properties)s 3419(that)s 3837(distinguish)s 4944(it)s 5136(from)s 5660(symbols)s 6509(based)s 7112(on)s 220 fnt2 7409 4500(@Gr)m 2(aphic)k 240 fnt1 8393 4503(.)m 480 4129(First,)m 1021(when)s 220 fnt2 1594 4126(@Under)m -3(line)k 240 fnt1 2806 4129(both)m 3286(contains)s 4130(a)s 4293(paragraph)s 5303(and)s 5704(is)s 5911(used)s 6404(within)s 7069(a)s 7232(paragraph,)s 8292(as)s 8539(in)s 8778(the)s 0 3841(e)m 3(xample)k 875(abo)s 3(v)k 3(e,)k 1561(the)s 1921(inner)s 2485(and)s 2901(outer)s 3465(paragraphs)s 4577(are)s 4937(mer)s 4(ged)k 5720(into)s 6158(one,)s 6623(permitting)s 7684(the)s 8045(underlined)s 0 3553(te)m 3(xt)k 412(to)s 647(break)s 1236(o)s 3(v)k 3(er)k 1711(se)s 6(v)k 3(eral)k 2430(lines.)s 3041(This)s 3513(is)s 3720(ho)s 6(w)k 4177(the)s 220 fnt2 4522 3550(@F)m 6(ont)k 240 fnt1 5230 3553(symbol)m 5986(w)s 2(orks)k 6617(too,)s 7026(b)s 4(ut)k 7385(symbols)s 8230(based)s 8829(on)s 220 fnt2 0 3262(@Gr)m 2(aphic)k 240 fnt1 1044 3265(do)m 1337(not)s 1703(permit)s 2386(this)s 2782(mer)s 4(ging.)k 480 2891(Second,)m 1292(Adobe)s 1987(font)s 2432(\207les)s 2881(specify)s 3625(the)s 3973(correct)s 4694(position)s 5522(and)s 5926(thickness)s 6867(of)s 7138(underlining)s 8294(for)s 8631(each)s 0 2603(font,)m 501(and)s 914(the)s 220 fnt2 1272 2600(@Under)m -3(line)k 240 fnt1 2496 2603(symbol)m 3266(follo)s 6(ws)k 4037(these)s 4593(speci\207cations.)s 6068(The)s 6505(font)s 6960(used)s 7466(is)s 7685(the)s 8043(font)s 8497(of)s 8778(the)s 0 2315(\207rst)m 431(object)s 1075(underlined,)s 2205(if)s 2422(it)s 2614(is)s 2824(a)s 2990(simple)s 3683(w)s 2(ord,)k 4280(or)s 4539(else)s 4966(the)s 5314(font)s 5759(of)s 6030(the)s 6378(enclosing)s 7348(paragraph.)s 480 1941(The)m 914(colour)s 1591(of)s 1868(the)s 2223(underline)s 3188(is)s 3404(usually)s 4156(the)s 4510(same)s 5063(as)s 5320(the)s 5674(colour)s 6351(of)s 6629(the)s 6983(te)s 3(xt)k 7404(being)s 7996(underlined,)s 0 1653(b)m 4(ut)k 362(this)s 758(can)s 1147(be)s 1429(changed)s 2285(using)s 2857(the)s 220 fnt2 3205 1650(@SetUnder)m -3(lineColour)k 240 fnt1 5402 1653(symbol)m 6162(\(Section)s 7015(3.9\).)s 240 fnt5 0 860(3.52.)m 591(@P)s 2(ageLabel)k [ /Dest /LOUTpagelabel /DEST pdfmark [ /Dest /LOUT19_4605_pre_page_1 /DEST pdfmark 240 fnt1 533 383(The)m 220 fnt2 953 380(@P)m 8(ageLabel)k 240 fnt1 2255 383(symbol)m 3007(associates)s 4005(a)s 4164(page)s 4664(label)s 5176(in)s 5411(the)s 5751(PostScript)s 6786(output)s 7450(\207le)s 7804(with)s 8278(the)s 8618(page)s 0 95(within)m 688(which)s 1350(\(or)s 1708(just)s 2133(before)s 2819(which\))s 3552(the)s 3920(symbol)s 4700(occurs,)s 5451(so)s 5737(that)s 6175(PostScript)s 7237(vie)s 6(wers)k 8045(are)s 8412(able)s 8887(to)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 80 86 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(80)m 240 fnt6 7498 -1580(Chapter)m 8348(3.)s 8622(Pr)s 8(ede\207ned)k 9717(symbols)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(inde)m 3(x)k 587(the)s 939(page)s 1450(by)s 1748(this)s 2148(label.)s 2779(\(The)s 3290(label)s 3813(is)s 4026(printed)s 4765(in)s 5011(the)s 220 fnt2 5363 13202(%%P)m 8(age)k 240 fnt1 6313 13205(comment)m 7266(preceding)s 8266(the)s 8618(page)s 0 12917(in)m 243(the)s 591(PostScript)s 1633(output)s 2305(\207le.\))s 2858(F)s 3(or)k 3247(e)s 3(xample,)k 220 fnt2 480 12416(@P)m 8(ageLabel iv)k 240 fnt1 0 11917(associates)m 1018(the)s 1379(label)s 220 fnt2 1910 11914(iv)m 240 fnt1 2140 11917(with)m 2634(the)s 2995(page.)s 3623(The)s 4064(label)s 4595(may)s 5074(be)s 5368(an)s 5664(arbitrary)s 6551(object;)s 7260(if)s 7489(its)s 7778(v)s 6(alue)k 8358(is)s 8581(not)s 8960(a)s 0 11629(simple)m 693(w)s 2(ord,)k 1290(it)s 1482(will)s 1908(be)s 2190(replaced)s 3057(by)s 220 fnt2 3351 11626(?)m 240 fnt1 3459 11629(.)m 220 fnt2 480 11252(@P)m 8(ageLabel)k 240 fnt1 1799 11255(is)m 2019(unrelated)s 2977(to)s 3226(Lout')s 13(s)k 3899(cross)s 4451(referencing)s 5602(mechanism;)s 6813(it)s 7016(is)s 7236(for)s 7585(communicating)s 0 10967(a)m 176(label)s 706(to)s 956(the)s 1315(PostScript)s 2368(output)s 3051(\207le,)s 3474(not)s 3851(to)s 4101(other)s 4662(parts)s 5188(of)s 5470(Lout.)s 6097(The)s 6536(result)s 7137(of)s 220 fnt2 7419 10964(@P)m 8(ageLabel)k 240 fnt1 8739 10967(is)m 8960(a)s 0 10679(null)m 427(object.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 81 87 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica %%+ font Symbol %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13448 0 13448 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 fnt5 0 12397(Chapter)m 1819(4.)s 2400(Examples)s [ /Dest /LOUTexamples /DEST pdfmark 240 fnt1 0 11446(This)m 503(chapter)s 1294(presents)s 2156(some)s 2744(e)s 3(xamples)k 3723(tak)s 2(en)k 4324(from)s 4875(the)s 5251(v)s 6(arious)k 6028(packages)s 6983(a)s 4(v)k 6(ailable)k 7919(with)s 8429(Basser)s 0 11158(Lout.)m 661(The)s 1134(reader)s 1835(who)s 2346(masters)s 3171(these)s 3763(e)s 3(xamples)k 4759(will)s 5230(be)s 5557(well)s 6068(prepared)s 7007(to)s 7291(read)s 7805(the)s 8198(packages)s 0 10870(themselv)m 3(es.)k 1223(The)s 1650(e)s 3(xamples)k 2600(ha)s 4(v)k 3(e)k 3100(not)s 3465(been)s 3973(simpli\207ed)s 4986(in)s 5229(an)s 3(y)k 5625(w)s 2(ay)k 15(,)k 6113(since)s 6659(an)s 6941(important)s 7929(part)s 8359(of)s 8629(their)s 0 10582(purpose)m 814(is)s 1024(to)s 1263(sho)s 6(w)k 1817(Lout)s 2329(in)s 2572(actual)s 3197(practice.)s 480 10208(Although)m 1486(all)s 1823(these)s 2415(e)s 3(xamples)k 3410(ha)s 4(v)k 3(e)k 3956(been)s 4509(tak)s 2(en)k 5127(from)s 5695(real)s 6152(code,)s 6755(the)s 3(y)k 7263(do)s 7600(not)s 8011(necessarily)s 0 9920(represent)m 935(the)s 1283(current)s 2019(state)s 2512(of)s 2783(the)s 3131(Lout)s 3643(packages.)s 240 fnt5 0 9127(4.1.)m 471(An)s 833(equation)s 1779(f)s 6(ormatting)k 2930(package)s [ /Dest /LOUTeq /DEST pdfmark 240 fnt1 480 8650(In)m 751(this)s 1162(section)s 1911(we)s 2261(describe)s 3128(the)s 3491(design)s 4189(and)s 4608(implementation)s 6180(of)s 6466(the)s 6829(Eq)s [ /Dest /LOUT19_4605_exa_equa_1 /DEST pdfmark 7168(equation)s 8065(formatting)s 0 8362(package.)m 976(Equation)s 1925(formatting)s 3014(mak)s 2(es)k 3702(a)s 3896(natural)s 4642(\207rst)s 5101(e)s 3(xample,)k 6043(partly)s 6682(because)s 7523(its)s 7828(requirements)s 0 8074(ha)m 4(v)k 3(e)k 514(strongly)s 1366(in\210uenced)s 2435(the)s 2797(design)s 3493(of)s 3778(Lout,)s 4351(and)s 4769(partly)s 5394(because)s 6221(no)s 6528(cross)s 7084(references)s 8129(or)s 8402(g)s 1(alle)k 3(ys)k 0 7786(are)m 347(required.)s 480 7412(T)m 19(o)k 777(the)s 1121(author')s 13(s)k 1938(kno)s 6(wledge,)k 3086(Eq)s 3406(is)s 3613(the)s 3957(\207rst)s 4384(equation)s 5261(formatter)s 6204(to)s 6440(be)s 6718(implemented)s 8020(as)s 8266(a)s 8428(collec-)s 0 7124(tion)m 430(of)s 702(high-)s 1196(le)s 6(v)k 3(el)k 1707(de\207nitions.)s 2883(This)s 3360(approach)s 4295(has)s 4666(signi\207cant)s 5724(adv)s 6(antages:)k 6948(the)s 7297(basics)s 7933(of)s 8206(language)s 0 6836(and)m 426(layout)s 1106(are)s 1475(tri)s 6(vial,)k 2167(so)s 2456(the)s 2826(implementor)s 4129(can)s 4540(concentrate)s 5720(on)s 6039(\207ne-)s 6466(tuning;)s 7212(and)s 7638(the)s 8009(de\207nitions,)s 0 6548(being)m 585(readily)s 1302(a)s 4(v)k 6(ailable,)k 2261(can)s 2650(be)s 2932(impro)s 3(v)k 3(ed,)k 3950(e)s 3(xtended,)k 4918(or)s 5177(e)s 6(v)k 3(en)k 5677(replaced.)s 480 6174(As)m 809(described)s 1795(in)s 2050(the)s 2411(User')s 13(s)k 3084(Guide)s 3737([)s [ /Rect [3808 6171 3914 6339] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkingston1995lout_user /ANN pdfmark 3808(5)s 3914(],)s 4113(an)s 4408(equation)s 5301(is)s 5523(entered)s 6297(in)s 6552(a)s 6730(format)s 7439(based)s 8054(on)s 8363(the)s 8724(one)s 0 5886(introduced)m 1081(by)s 1375(the)s 1723(eqn)s 2126(language)s 3046(of)s 3317(K)s 6(ernighan)k 4378(and)s 4782(Cherry)s 5500([)s [ /Rect [5571 5883 5675 6048] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkernighan1975eqn /ANN pdfmark 5571(3)s 5675(]:)s [ /Dest /LOUT19_4605_exa_equa_2 /DEST pdfmark [ /Dest /LOUT19_4605_exa_equa_3 /DEST pdfmark 220 fnt2 480 5385(@Eq { { x sup 2 + y sup 2 } o)m 3(v)k 5(er 2 })k 240 fnt1 0 4887(The)m 428(result)s 1018(is)s 167 fnt4 586 4484(2)m 240 fnt6 480 4424(x)m 240 fnt4 737 4416(+)m 167 fnt4 1040 4484(2)m 240 fnt6 938 4424(y)m 639 0 0 0 240 288 12 480 4326 LoutGr2 0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke grestore grestore 240 fnt4 742 4098(2)m 240 fnt1 0 3587(In)m 256(outline,)s 1027(the)s 1375(de\207nition)s 2349(of)s 2620(the)s 220 fnt2 2968 3584(@Eq)m 240 fnt1 3506 3587(symbol)m 4266(is)s [ /Dest /LOUT19_4605_exa_equa_4 /DEST pdfmark 220 fnt2 480 3090(e)m 6(xpor)k -8(t sup o)k 3(v)k 5(er "+" "2" "<=")k 480 2802(def @Eq)m 480 2514( body @Body)m 480 2226({)m 480 1938( def sup precedence 60 left x r)m -3(ight y { ...)k 13( })k 480 1650( def o)m 3(v)k 5(er precedence 54 left x r)k -3(ight y { ...)k 13( })k 480 1362( def "2" { Base @F)m 6(ont "2" })k 480 1074( def "+" { {Symbol Base} @F)m 6(ont "+" })k 480 786( def "<=" { {Symbol Base} @F)m 6(ont "\\243" })k 480 498( ...)m grestore gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5859 -15421(81)m grestore grestore grestore pgsave restore showpage %%Page: 82 88 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(82)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207( Slope @F)m 6(ont 1.2f @Break 0c @Space @Body)k 480 12919(})m 240 fnt1 0 12425(A)m 259(body)s 822(parameter)s 1865(is)s 2104(used)s 2630(to)s 2898(restrict)s 3649(the)s 4026(visibility)s 4958(of)s 5258(the)s 5635(equation)s 6545(formatting)s 7635(symbols)s 8514(\(there)s 0 12137(are)m 366(hundreds)s 1315(of)s 1606(them\).)s 2347(The)s 2794(equation)s 3695(as)s 3965(a)s 4151(whole)s 4811(is)s 5041(set)s 5386(in)s 5649(Slope)s 6269(\(i.e.)s 6704(Italic\))s 7341(font,)s 7853(and)s 8277(symbols)s 0 11849(such)m 515(as)s 220 fnt2 784 11846("2")m 240 fnt1 1127 11849(and)m 220 fnt2 1550 11846("+")m 240 fnt1 1899 11849(are)m 2265(de\207ned)s 3048(when)s 3643(other)s 4213(fonts)s 4762(are)s 5128(needed.)s 5990(Precedences)s 7241(are)s 7608(used)s 8124(to)s 8383(resolv)s 3(e)k 0 11561(ambiguities)m 1170(such)s 1670(as)s 220 fnt2 1925 11558(a sup b o)m 3(v)k 5(er c)k 240 fnt1 3291 11561(.)m 3459(Eq)s 3788(tak)s 2(es)k 4332(all)s 4630(spacing)s 5418(decisions)s 6363(on)s 6665(itself,)s 7252(so)s 7523(to)s 7766(pre)s 6(v)k 3(ent)k 8539(white)s 0 11273(space)m 574(typed)s 1151(by)s 1432(the)s 1767(user)s 2212(from)s 2723(interfering,)s 3824(the)s 4158(equation)s 5026(is)s 5223(enclosed)s 6105(in)s 220 fnt2 6335 11270(0c @Space)m 240 fnt1 7465 11273(.)m 7616(W)s 19(e)k 7972(will)s 8384(discuss)s 0 10985(the)m 220 fnt2 348 10982(1.2f @Break)m 240 fnt1 1631 10985(later)m 13(.)k 480 10611(Thus)m 1015(ha)s 4(v)k 3(e)k 1521(we)s 1861(disposed)s 2762(of)s 3038(the)s 3391(language)s 4316(design)s 5003(part)s 5439(of)s 5715(the)s 6068(equation)s 6954(formatting)s 8020(problem;)s 8934(it)s 0 10323(remains)m 807(no)s 6(w)k 1268(to)s 1507(de\207ne)s 2148(the)s 2496(twenty)s 3201(or)s 3460(so)s 3726(symbols)s 4575(with)s 5057(parameters,)s 6211(and)s 6615(get)s 6967(the)s 7315(layout)s 7973(right.)s 480 9949(Ev)m 3(ery)k 1115(equation)s 2010(has)s 2393(an)s 240 fnt6 2690 9951(axis)m 240 fnt1 3070 9949(:)m 3250(an)s 3546(imaginary)s 4583(horizontal)s 5620(line)s 6048(through)s 6864(the)s 7225(centre)s 7878(of)s 8163(v)s 6(ariables,)k 0 9661(through)m 795(the)s 1136(bar)s 1494(of)s 1757(b)s 4(uilt-up)k 2556(fractions,)s 3491(and)s 3888(so)s 4146(on.)s 4543(W)s 19(e)k 4905(can)s 5287(satisfy)s 5956(this)s 6345(requirement)s 7552(by)s 7839(ensuring)s 8708(that)s 0 9373(the)m 362(result)s 966(of)s 1251(each)s 1761(symbol)s 2535(has)s 2919(a)s 3100(single)s 3741(ro)s 6(w)k 4175(mark,)s 4788(on)s 5099(the)s 5461(axis.)s 6025(F)s 3(or)k 6428(e)s 3(xample,)k 7356(the)s 7719(superscripting)s 0 9085(symbol)m 760(is)s 970(de\207ned)s 1733(as)s 1983(follo)s 6(ws:)k [ /Dest /LOUT19_4605_exa_equa_5 /DEST pdfmark 220 fnt2 480 8586(def sup)m 480 8298( precedence 60)m 480 8010( associativity left)m 480 7722( left x)m 480 7434( named gap { @SupGap })m 480 7146( r)m -3(ight y)k 480 6858({)m 480 6570( @HContr)m 2(act @VContr)k 2(act {)k 480 6282( | @Smaller y)m 480 5994( ^/gap x)m 480 5706( })m 480 5418(})m 240 fnt1 0 4924(The)m 220 fnt2 430 4921(@VContr)m 2(act)k 240 fnt1 1684 4924(and)m 220 fnt2 2091 4921(^/)m 240 fnt1 2320 4924(symbols)m 3171(together)s 4017(ensure)s 4699(that)s 5119(the)s 5470(axis)s 5908(of)s 6181(the)s 6532(result)s 7124(is)s 7336(the)s 7687(axis)s 8125(of)s 8398(the)s 8749(left)s 0 4636(parameter)m 13(.)k 1119(A)s 220 fnt2 1363 4633(gap)m 240 fnt1 1795 4636(parameter)m 2823(has)s 3207(been)s 3730(pro)s 3(vided)k 4650(for)s 5002(v)s 6(arying)k 5794(the)s 6156(height)s 6828(of)s 7113(the)s 7475(superscript,)s 8644(with)s 0 4348(def)m 2(ault)k 709(v)s 6(alue)k 220 fnt2 1265 4345(@SupGap)m 240 fnt1 2393 4348(de\207ned)m 3144(else)s 6(where)k 4137(as)s 220 fnt2 4375 4345(0.40fk)m 240 fnt1 4973 4348(.)m 5124(It)s 5317(is)s 5515(important)s 6492(that)s 6898(such)s 7382(g)s 1(aps)k 7859(be)s 8128(e)s 3(xpressed)k 0 4060(in)m 232(units)s 736(that)s 1142(v)s 6(ary)k 1603(with)s 2073(the)s 2410(font)s 2843(size,)s 3309(so)s 3563(that)s 3969(the)s 3(y)k 4420(remain)s 5129(correct)s 5839(when)s 6403(the)s 6739(size)s 7154(changes.)s 8077(Collecting)s 0 3772(the)m 351(def)s 2(ault)k 1076(v)s 6(alues)k 1735(into)s 2164(symbols)s 3016(lik)s 2(e)k 220 fnt2 3432 3769(@SupGap)m 240 fnt1 4515 3772(ensures)m 5287(consistenc)s 3(y)k 6457(and)s 6865(assists)s 7529(when)s 8109(tuning)s 8778(the)s 0 3484(v)m 6(alues.)k 769(Here)s 1289(is)s 1499(another)s 2276(characteristic)s 3600(de\207nition:)s [ /Dest /LOUT19_4605_exa_equa_6 /DEST pdfmark 220 fnt2 480 3034(def o)m 3(v)k 5(er)k 480 2746( precedence 54)m 480 2458( associativity left)m 480 2170( left x)m 480 1882( named gap { 0.2f })m 480 1594( r)m -3(ight y)k 480 1306({)m 480 1018( @HContr)m 2(act @VContr)k 2(act {)k 480 730( |0.5r)m -8(t @OneCol x)k 480 442( ^//gap @HLine)m 480 154( //gap |0.5r)m -8(t @OneCol y)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 83 89 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica %%+ font Symbol /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Symbol /fnt4 { /Symbol LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.1.)m 1871(An)s 2191(equation)s 3083(formatting)s 4147(pac)s 4(ka)k 2(g)k 2(e)k 240 fnt5 10250 -1583(83)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13267 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13210( })m 480 12922(})m 240 fnt1 0 12428(Both)m 518(parameters)s 1611(are)s 1953(centred,)s 2758(since)s 3299(we)s 3629(do)s 3917(not)s 4278(kno)s 6(w)k 4853(which)s 5490(will)s 5911(be)s 6188(the)s 6530(wider;)s 7181(we)s 7511(use)s 220 fnt2 7881 12425(@OneCol)m 240 fnt1 8887 12428(to)m 0 12140(mak)m 2(e)k 570(sure)s 1021(that)s 1437(the)s 1782(entire)s 2379(parameter)s 3390(is)s 3598(centred,)s 4405(not)s 4769(just)s 5171(its)s 5445(\207rst)s 5873(column,)s 6696(and)s 220 fnt2 7097 12137(@HContr)m 2(act)k 240 fnt1 8358 12140(ensures)m 0 11852(that)m 428(the)s 787(fraction)s 1597(will)s 2034(ne)s 6(v)k 3(er)k 2627(e)s 3(xpand)k 3385(to)s 3635(\207ll)s 3966(all)s 4269(the)s 4628(a)s 4(v)k 6(ailable)k 5547(space,)s 6196(as)s 6457(Lout)s 6980(objects)s 7719(ha)s 4(v)k 3(e)k 8231(a)s 8408(natural)s 0 11564(tendenc)m 3(y)k 915(to)s 1154(do)s 1447(\(Section)s 2300(2.6\).)s 220 fnt2 2843 11561(@HLine)m 240 fnt1 3690 11564(is)m 3900(a)s 4066(horizontal)s 5090(line)s 5504(of)s 5775(the)s 6123(width)s 6725(of)s 6996(the)s 7344(column:)s [ /Dest /LOUT19_4605_exa_equa_7 /DEST pdfmark 220 fnt2 480 11063(def @HLine)m 480 10775( named line { "0.05 ft setline)m 4(width" })k 480 10487({ )m 480 10199( { "0 0 mo)m 3(v)k 5(eto xsiz)k 3(e 0 lineto" line "strok)k 4(e" } @Gr)k 2(aphic {})k 480 9911(})m 240 fnt1 0 9417(Here)m 520(we)s 855(are)s 1202(relying)s 1932(on)s 2229(the)s 2577(e)s 3(xpanding)k 3625(tendenc)s 3(y)k 4540(just)s 4945(mentioned.)s 480 9043(The)m 906(remaining)s 1925(symbols)s 2772(are)s 3116(quite)s 3647(similar)s 4367(to)s 4603(these)s 5148(ones.)s 5748(W)s 19(e)k 6114(conclude)s 7032(with)s 7511(a)s 7675(fe)s 6(w)k 8078(\207ne)s 8490(points)s 0 8755(of)m 271(mathematical)s 1612(typesetting)s 2714(mentioned)s 3782(by)s 4076(a)s 4242(leading)s 4999(authority)s 15(,)k 5954(D.)s 6231(E.)s 6481(Knuth)s 7137([)s [ /Rect [7208 8752 7321 8919] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTknuth1984tex /ANN pdfmark 7208(6)s 7321(].)s [ /Dest /LOUT19_4605_exa_equa_8 /DEST pdfmark 480 8381(Some)m 1090(symbols,)s 2004(such)s 2509(as)s 240 fnt4 2768 8375(\243)m 240 fnt1 2963 8381(and)m 240 fnt4 3376 8375(\271)m 240 fnt1 3505 8381(,)m 3621(should)s 4327(ha)s 4(v)k 3(e)k 4837(a)s 5012(thick)s 5560(space)s 6156(on)s 6462(each)s 6966(side;)s 7472(others,)s 8172(such)s 8677(as)s 240 fnt4 8937 8375(+)m 240 fnt1 0 8093(and)m 240 fnt4 397 8087(-)m 240 fnt1 525 8093(,)m 625(ha)s 4(v)k 3(e)k 1119(a)s 1278(medium)s 2115(space;)s 2751(others)s 3379(ha)s 4(v)k 3(e)k 3873(a)s 4032(thin)s 4454(space)s 5034(on)s 5324(the)s 5665(right)s 6169(only)s 15(.)k 6737(This)s 7206(w)s 2(ould)k 7854(be)s 8129(easy)s 8601(to)s 8833(do)s 0 7805(e)m 3(xcept)k 681(that)s 1099(these)s 1646(spaces)s 2321(are)s 2668(not)s 3034(w)s 2(anted)k 3781(in)s 4024(superscripts)s 5216(and)s 5620(subscripts:)s 167 fnt6 578 7359(n)m 167 fnt4 679 7354(+)m 791(1)s 240 fnt6 480 7261(r)m 240 fnt4 928 7253(-)m 1128(1)s 240 fnt1 0 6802(In)m 271(ef)s 6(fect,)k 929(the)s 1292(de\207nition)s 2281(of)s 2568(such)s 3079(symbols)s 3943(changes)s 4780(depending)s 5846(on)s 6159(the)s 6522(conte)s 3(xt;)k 7350(b)s 4(ut)k 7727(Lout)s 8254(does)s 8760(not)s 0 6514(permit)m 682(such)s 1176(a)s 1340(change.)s 2180(Luckily)s 15(,)k 3015(the)s 3361(so-called)s 4279(`style')s 4919(information)s 6102(set)s 6426(by)s 6718(the)s 220 fnt2 7064 6511(@F)m 6(ont)k 240 fnt1 7716 6514(,)m 220 fnt2 7821 6511(@Break)m 240 fnt1 8617 6514(,)m 8722(and)s 220 fnt2 0 6223(@Space)m 240 fnt1 891 6226(symbols)m 1734(can)s 2116(change)s 2844(in)s 3080(this)s 3470(w)s 2(ay)k 15(.)k 4009(Accordingly)s 15(,)k 5291(Eq)s 5608(uses)s 6065(the)s 220 fnt2 6406 6223(y)m 240 fnt1 6568 6226(unit,)m 7040(which)s 7676(is)s 7879(part)s 8304(of)s 8568(style,)s 0 5938(for)m 338(these)s 885(spaces:)s 220 fnt2 480 5437(def @MedGap { 0.20y })m 480 4861(def "+" { &@MedGap plus &@MedGap })m 480 4285(def @HSqueez)m 3(e r)k -3(ight x { 0.2f @YUnit x })k 240 fnt1 0 3786(In)m 261(the)s 615(equation)s 1502(as)s 1758(a)s 1929(whole,)s 2627(the)s 2981(y)s 3161(unit)s 3599(is)s 3814(initially)s 4616(set)s 4947(to)s 220 fnt2 5192 3783(1f)m 240 fnt1 5372 3786(,)m 5484(and)s 5894(so)s 220 fnt2 6166 3783(@MedGap)m 240 fnt1 7289 3786(ordinarily)m 8291(supplies)s 0 3498(20%)m 495(of)s 777(this)s 1184(amount.)s 2077(But)s 2494(superscripts)s 3697(and)s 4112(subscripts)s 5130(are)s 5488(enclosed)s 6394(in)s 6648(the)s 220 fnt2 7007 3495(@HSqueez)m 3(e)k 240 fnt1 8314 3498(symbol,)m 0 3210(which,)m 744(by)s 1091(changing)s 2075(the)s 2476(y)s 2703(unit,)s 3235(ensures)s 4056(that)s 4527(an)s 3(y)k 220 fnt2 4977 3207(@MedGap)m 240 fnt1 6147 3210(within)m 6868(them)s 7459(is)s 7722(much)s 8364(smaller)s 0 2922(than)m 469(usual.)s 240 fnt5 0 2179(4.2.)m 471(P)s 2(aragraphs,)k 1780(displays,)s 2718(and)s 3159(lists)s [ /Dest /LOUTparas /DEST pdfmark 240 fnt1 480 1702(The)m 914(remaining)s 1942(sections)s 2770(of)s 3047(this)s 3449(chapter)s 4219(are)s 4572(all)s 4871(based)s 5481(on)s 5784(V)s 26(ersion)k 6578(2)s 6759(of)s 7036(the)s 7391(DocumentLayout)s 0 1414(package.)m 941(V)s 26(ersion)k 1722(3,)s 1942(which)s 2577(is)s 2779(similar)s 3494(b)s 4(ut)k 3849(more)s 4389(elaborate,)s 5364(is)s 5566(described)s 6533(from)s 7050(the)s 7391(user')s 13(s)k 7991(perspecti)s 6(v)k 3(e)k 0 1126(in)m 250(the)s [ /Dest /LOUT19_4605_exa_para_1 /DEST pdfmark 606(User')s 13(s)k 1275(Guide)s 1924([)s [ /Rect [1995 1123 2101 1291] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUTkingston1995lout_user /ANN pdfmark 1995(5)s 2101(].)s 2352(In)s 2616(26)s 2917(pages)s 3520(of)s 3799(Lout,)s 4366(the)s 4722(DocumentLaytout)s 6531(package)s 7379(de\207nes)s 8116(man)s 3(y)k 8707(fea-)s 0 838(tures)m 505(required)s 1348(in)s 1581(the)s 1918(formatting)s 2968(of)s 3229(simple)s 3911(documents,)s 5045(technical)s 5951(reports,)s 6710(and)s 7104(books,)s 7773(including)s 8719(dis-)s 0 550(plays,)m 603(lists,)s 1085(page)s 1584(layout,)s 2280(cross)s 2813(references,)s 3891(tables)s 4490(of)s 4752(contents,)s 5647(footnotes,)s 6635(\207gures,)s 7384(tables,)s 8039(references,)s 0 262(chapters,)m 903(sections,)s 1780(and)s 2184(sorted)s 2826(inde)s 3(x)k 3(es.)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 84 90 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(84)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 13205(The)m 939(symbols)s 1819(used)s 2347(for)s 2716(separating)s 3782(paragraphs)s 4913(and)s 5348(producing)s 6403(displays)s 7269(and)s [ /Dest /LOUT19_4605_exa_para_2 /DEST pdfmark 7704(lists)s 8170(may)s 8667(lack)s 0 12917(the)m 351(e)s 3(xcitement)k 1459(of)s 1733(more)s 2284(e)s 3(xotic)k 2921(features,)s 3786(b)s 4(ut)k 4152(the)s 3(y)k 4618(can)s 5010(teach)s 5574(some)s 6139(important)s 7131(lessons)s 7876(about)s 8472(rob)s 4(ust)k 0 12629(design.)m 786(The)s 1211(follo)s 6(wing)k 2185(macro)s 2832(for)s 3167(separating)s 4199(paragraphs)s 5296(produces)s 6207(a)s 6370(0.3)s 6711(cm)s 7060(v)s 3(ertical)k 7824(space)s 8408(and)s 8809(a)s 8971(1)s 0 12341(cm)m 352(indent)s 1010(on)s 1307(the)s 1655(follo)s 6(wing)k 2632(line,)s 3097(and)s 3501(is)s 3711(clearly)s 4414(on)s 4711(the)s 5059(right)s 5570(track:)s 220 fnt2 480 11840(macro @PP { //0.3c &1c })m 240 fnt1 0 11346(Ne)m 6(v)k 3(ertheless)k 1276(it)s 1468(has)s 1838(se)s 6(v)k 3(eral)k 2560(major)s 3177(problems.)s 480 10972(The)m 220 fnt2 926 10969(&)m 240 fnt1 1147 10972(symbol)m 1926(is)s 2154(subject)s 2910(to)s 3168(widening)s 4130(during)s 4827(line)s 5260(adjustment,)s 6434(so)s 6719(it)s 6930(should)s 7645(be)s 7946(replaced)s 8832(by)s 220 fnt2 0 10681(1c @Wide {})m 240 fnt1 1213 10684(.)m 1387(But)s 1804(then)s 2284(white)s 2882(space)s 3480(follo)s 6(wing)k 4468(the)s 4827(symbol)s 5597(will)s 6034(af)s 6(fect)k 6641(the)s 7000(result,)s 7648(so)s 7925(an)s 8219(e)s 3(xtra)k 220 fnt2 8764 10681(&0i)m 240 fnt1 0 10396(must)m 528(be)s 814(added.)s 1553(If)s 1787(the)s 2138(document)s 3146(is)s 3359(printed)s 4098(double)s 4810(spaced,)s 5571(this)s 5971(paragraph)s 6987(g)s 1(ap)k 7389(will)s 7818(f)s 2(ail)k 8192(to)s 8435(widen:)s 0 10108(it)m 204(should)s 914(be)s 1208(e)s 3(xpressed)k 2219(in)s 2475(terms)s 3068(of)s 3352(the)s 220 fnt2 3712 10105(v)m 240 fnt1 3894 10108(unit,)m 4386(with)s 4880(mark-to-mark)s 6280(spacing)s 7076(mode.)s 7785(Similarly)s 15(,)k 8778(the)s 0 9820(paragraph)m 1013(indent)s 1671(should)s 2368(probably)s 3273(be)s 3555(made)s 4129(proportional)s 5366(to)s 5605(the)s 5953(font)s 6398(size.)s 480 9446(`Magic)m 1211(numbers')s 2135(lik)s 2(e)k 220 fnt2 2535 9443(0.3c)m 240 fnt1 2993 9446(should)m 3678(not)s 4032(be)s 4302(b)s 4(uried)k 4955(in)s 5186(de\207nitions)s 6235(where)s 6863(the)s 3(y)k 7314(cannot)s 8000(be)s 8270(changed)s 0 9158(easily)m 15(,)k 649(or)s 908(k)s 2(ept)k 1378(consistent)s 2394(with)s 2876(similar)s 3598(de\207nitions)s 4659(during)s 5337(tuning.)s 6113(The)s 3(y)k 6656(are)s 7003(much)s 7592(better)s 8195(placed)s 8876(as)s 0 8870(symbols,)m 905(possibly)s 1757(parameters)s 2855(of)s 3126(the)s 3474(enclosing)s 4444(package:)s 220 fnt2 480 8369(def @DocumentLa)m 6(y)k 4(out)k [ /Dest /LOUT19_4605_exa_para_3 /DEST pdfmark 480 8081( named @P)m 8(ar)k 2(aGap { 1.3vx })k 480 7793( named @P)m 8(ar)k 2(aIndent { 2f })k 480 7505( ...)m 480 7217(@Begin)m 480 6641( macro @PP { //@P)m 8(ar)k 2(aGap @P)k 8(ar)k 2(aIndent @Wide &0i })k 480 6353( macro @LP { //@P)m 8(ar)k 2(aGap })k 480 6065( ...)m 480 5777(@End @DocumentLa)m 6(y)k 4(out)k 240 fnt1 0 5279(and)m 404(we)s 739(ha)s 4(v)k 3(e)k 1240(arri)s 6(v)k 3(ed)k 1965(at)s 2197(the)s 2545(de\207nition)s 3519(of)s 220 fnt2 3790 5276(@PP)m 240 fnt1 4356 5279(as)m 4606(it)s 4798(appears)s 5579(in)s 5822(the)s 6170(DocumentLayout)s 7905(package.)s 480 4905(A)m 710(display)s 1455(is)s 1665(a)s 1831(table)s 2351(in)s 2594(which)s 3236(the)s 3584(\207rst)s 4015(column)s 4790(is)s 5000(blank:)s [ /Dest /LOUT19_4605_exa_para_4 /DEST pdfmark 240 fnt6 480 4402(pr)m 8(eceding)k 1483(te)s 4(xt)k 220 fnt2 480 4109(//@DispGap |@DispIndent)m 240 fnt6 3183 4114(display)m 220 fnt2 480 3821(//@DispGap)m 240 fnt6 480 3538(following)m 1438(te)s 4(xt)k 240 fnt1 0 3037(Edge-to-edge)m 1345(is)s 1557(the)s 1906(appropriate)s 3052(spacing)s 3838(mode)s 4427(before)s 5095(and)s 5500(after)s 5998(displays,)s 6891(since)s 7439(the)s 7789(display)s 8536(could)s 0 2749(be)m 273(a)s 430(table)s 941(or)s 1191(\207gure)s 1796(whose)s 2455(mark)s 2998(does)s 3479(not)s 3836(correspond)s 4948(to)s 5178(a)s 5335(baseline.)s 6273(Thus,)s 220 fnt2 6850 2746(1v)m 240 fnt1 7132 2749(is)m 7333(a)s 7490(reasonable)s 8558(v)s 6(alue)k 0 2461(for)m 220 fnt2 338 2458(@DispGap)m 240 fnt1 1406 2461(.)m 480 2087(The)m 957(ordinary)s 1871(user)s 2379(cannot)s 3126(be)s 3458(e)s 3(xpected)k 4413(to)s 4702(type)s 5219(the)s 5617(Lout)s 6179(source)s 6908(sho)s 6(wn)k 7635(abo)s 3(v)k 3(e;)k 8363(a)s 8579(more)s 0 1799(appropriate)m 1144(syntax)s 1824(is)s [ /Dest /LOUT19_4605_exa_para_5 /DEST pdfmark 240 fnt6 480 1296(pr)m 8(eceding)k 1483(te)s 4(xt)k 220 fnt2 480 1003(@IndentedDispla)m 6(y {)k 240 fnt6 2514 1008(display)m 220 fnt2 3321 1003(})m 240 fnt6 480 720(following)m 1438(te)s 4(xt)k 240 fnt1 0 219(This)m 491(presents)s 1340(a)s 1521(problem:)s 2499(if)s 220 fnt2 2731 216(@IndentedDispla)m 6(y)k 240 fnt1 4593 219(is)m 4819(made)s 5408(a)s 5589(de\207nition)s 6578(with)s 7075(a)s 7256(right)s 7782(parameter)s 9(,)k 8850(its)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 85 91 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.2.)m 1871(P)s 19(ar)k 3(a)k 2(gr)k 3(aphs,)k 3082(displays,)s 3959(and)s 4385(lists)s 240 fnt5 10250 -1583(85)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(result)m 598(will)s 1032(be)s 1322(an)s 1613(object)s 2265(separated)s 3233(from)s 3765(the)s 4121(surrounding)s 5339(te)s 3(xt)k 5762(only)s 6250(by)s 6552(white)s 7147(space,)s 7793(hence)s 8415(part)s 8855(of)s 0 12917(the)m 343(paragraph;)s 1405(while)s 1986(if)s 2197(it)s 2383(is)s 2587(a)s 2747(macro,)s 3445(the)s 3787(\207nal)s 220 fnt2 4261 12914(//@DispGap)m 240 fnt1 5505 12917(cannot)m 6197(be)s 6473(included)s 7349(in)s 7586(it.)s 7876(The)s 8298(solution)s 0 12629(adopted)m 816(in)s 1059(the)s 1407(DocumentLayout)s 3142(package)s 3982(uses)s 4445(a)s 4611(g)s 1(alle)k 3(y)k 5245(and)s 5649(a)s 5815(macro:)s 220 fnt2 480 12128( def @DispPlace { @Galle)m 4(y })k 480 11840( def @Disp into { @DispPlace&&preceding })m 480 11552( r)m -3(ight x)k 480 11264( {)m 480 10976( @OneRo)m 3(w x)k 480 10688( })m 480 10112( macro @IndentedDispla)m 6(y)k 480 9824( {)m 480 9536( //@DispGap |@DispIndent @DispPlace |)m 480 9248( //@DispGap // @Disp)m 480 8960( })m 0 8463(@DispPlace)m 240 fnt1 1257 8466(and)m 220 fnt2 1657 8463(@Disp)m 240 fnt1 2366 8466(are)m 2709(not)s 3070(e)s 3(xported,)k 4007(so)s 4269(there)s 4798(is)s 5003(no)s 5292(danger)s 5999(of)s 6266(a)s 6427(name)s 6997(clash)s 7541(with)s 8019(some)s 8575(other)s 0 8178(symbol.)m 869(The)s 1297(ordinary)s 2161(user')s 13(s)k 2769(syntax)s 3449(e)s 3(xpands)k 4282(to)s 240 fnt6 480 7675(pr)m 8(eceding)k 1483(te)s 4(xt)k 220 fnt2 480 7382(//@DispGap |@DispIndent @DispPlace |)m 480 7094(//@DispGap // @Disp {)m 240 fnt6 2890 7099(display)m 220 fnt2 3637 7094(})m 240 fnt6 480 6811(following)m 1438(te)s 4(xt)k 240 fnt1 0 6310(and)m 397(the)s 220 fnt2 737 6307(@Disp)m 240 fnt1 1442 6310(g)m 1(alle)k 3(y)k 2068(appears)s 2842(at)s 3066(the)s 3406(preceding)s 220 fnt2 4394 6307(@DispPlace)m 240 fnt1 5595 6310(,)m 5694(being)s 6272(itself)s 6812(replaced)s 7671(by)s 220 fnt2 7957 6307(@Null)m 240 fnt1 8542 6310(.)m 8698(The)s 220 fnt2 0 6019(//)m 240 fnt1 184 6022(symbol)m 942(protects)s 1748(the)s 2094(preceding)s 220 fnt2 3088 6019(//@DispGap)m 240 fnt1 4337 6022(from)m 4859(being)s 5443(deleted)s 6189(by)s 6481(this)s 220 fnt2 6876 6019(@Null)m 240 fnt1 7519 6022(when)m 8094(there)s 8625(is)s 8833(no)s 0 5734(follo)m 6(wing)k 977(te)s 3(xt.)k 480 5360(An)m 858(automatically)s 2240(numbered)s 3283(list)s [ /Dest /LOUT19_4605_exa_para_6 /DEST pdfmark [ /Dest /LOUT19_4605_exa_para_7 /DEST pdfmark 3662(could)s 4280(ha)s 4(v)k 3(e)k 4809(an)s 5121(arbitrarily)s 6156(lar)s 4(ge)k 6713(number)s 7532(of)s 7831(items,)s 8483(so,)s 8832(by)s 0 5072(analogy)m 812(with)s 1294(sequences)s 2315(of)s 2586(pages,)s 3238(we)s 3573(see)s 3934(immmediately)s 5368(that)s 5786(recursion)s 6732(must)s 7257(be)s 7539(in)s 9(v)k 4(olv)k 3(ed:)k 220 fnt2 480 4571(def @List r)m -3(ight n)k 2(um)k 480 4283({)m 480 3995( @DispIndent @Wide n)m 2(um.)k 13( | @ItemPlace)k 480 3707( //@DispGap @List @Ne)m 6(xt n)k 2(um)k 480 3419(})m 240 fnt1 0 2925(Notice)m 689(ho)s 6(w)k 1146(the)s 220 fnt2 1490 2922(@Ne)m 6(xt)k 240 fnt1 2210 2925(symbol)m 2965(w)s 2(orks)k 3595(in)s 3834(conjunction)s 5017(with)s 5495(the)s 5838(recursion)s 6780(to)s 7015(produce)s 7838(an)s 8116(ascending)s 0 2637(sequence)m 933(of)s 1204(numbers;)s 2140(the)s 2488(result)s 3078(of)s 220 fnt2 3349 2634(@List 1)m 240 fnt1 4113 2637(will)m 4539(be)s 220 fnt2 480 2136(1.)m 13( @ItemPlace)k 480 1848(2.)m 13( @ItemPlace)k 480 1560(3.)m 13( @ItemPlace)k 480 1272(...)m 240 fnt1 0 821(W)m 19(e)k 362(can)s 744(follo)s 6(w)k 1408(this)s 1797(with)s 2271(items)s 2832(which)s 3466(are)s 3806(g)s 1(alle)k 3(ys)k 4522(tar)s 4(geted)k 5338(to)s 220 fnt2 5569 818(@ItemPlace&&preceding)m 240 fnt1 8010 821(,)m 8110(and)s 220 fnt2 8506 818(@List)m 240 fnt1 0 533(will)m 426(e)s 3(xpand)k 1173(just)s 1578(enough)s 2341(to)s 2580(accommodate)s 3964(them.)s 480 159(The)m 908(usual)s 1468(problem)s 2325(with)s 2806(recursi)s 6(v)k 3(e-)k 3740(recepti)s 6(v)k 3(e)k 4662(symbols)s 5511(no)s 6(w)k 5972(arises:)s 6680(there)s 7213(is)s 7423(al)s 2(w)k 2(ays)k 8134(one)s 8535(une)s 3(x-)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 86 92 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(86)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(panded)m 220 fnt2 753 13202(@List)m 240 fnt1 1313 13205(,)m 1424(and)s 1832(until)s 2329(it)s 2525(can)s 2917(be)s 3203(remo)s 3(v)k 3(ed)k 4096(the)s 4448(g)s 1(alle)k 3(y)k 5086(containing)s 6152(it)s 6348(will)s 6778(appear)s 7479(to)s 7722(be)s 8008(incomplete)s 0 12917(and)m 394(will)s 810(be)s 1081(pre)s 6(v)k 3(ented)k 2063(at)s 2285(that)s 2692(point)s 3234(from)s 3747(\210ushing)s 4562(into)s 4977(its)s 5242(parent)s 5889(\(see)s 6318(page)s 6816(30\).)s 7289(W)s 19(e)k 7647(adopt)s 8229(the)s 8566(usual)s 0 12629(solution:)m 937(a)s 1104(forcing)s 1847(g)s 1(alle)k 3(y)k 2482(into)s 2908(a)s 3074(later)s 3558(tar)s 4(get)k 4158(will)s 4584(replace)s 5330(the)s 5679(last)s 220 fnt2 6070 12626(@List)m 240 fnt1 6691 12629(by)m 220 fnt2 6986 12626(@Null)m 240 fnt1 7571 12629(.)m 7735(This)s 8212(brings)s 8862(us)s 0 12341(to)m 239(the)s 587(de\207nitions)s 1648(as)s 1898(the)s 3(y)k 2361(appear)s 3058(in)s 3301(DocumentLayout:)s [ /Dest /LOUT19_4605_exa_para_8 /DEST pdfmark 220 fnt2 480 11840(def @ItemPlace { @Galle)m 4(y })k 480 11552(def @ListItem into { @ItemPlace&&preceding })m 480 11264( r)m -3(ight x)k 480 10976({ x })m [ /Dest /LOUT16_1731_exa_para_1 /DEST pdfmark 480 10484(def @EndListPlace { @Galle)m 4(y })k 480 10196(def @EndList f)m 6(orce into { @EndListPlace&&preceding })k 480 9908({})m [ /Dest /LOUT16_1731_exa_para_2 /DEST pdfmark 480 9416(def @Ra)m 4(wIndentedList)k 480 9128( named style r)m -3(ight tag {})k 480 8840( named indent { @DispIndent })m 480 8552( named gap { @DispGap })m 480 8264( named star)m -8(t { 1 })k 480 7976({)m 480 7688( def @IList r)m -3(ight n)k 2(um)k 480 7400( {)m 480 7112( indent @Wide {style n)m 2(um} | @ItemPlace)k 480 6824( //gap @IList @Ne)m 6(xt n)k 2(um)k 480 6536( })m 480 5960( @IList star)m -8(t // @EndListPlace)k 480 5672(})m [ /Dest /LOUT16_1731_exa_para_3 /DEST pdfmark 240 fnt1 0 5178(No)m 6(w)k 514(gi)s 6(v)k 3(en)k 1094(the)s 1442(input)s 220 fnt2 480 4677(@Ra)m 4(wIndentedList)k 480 4389(@ListItem { \207rst item })m 480 4101(@ListItem { second item })m 480 3813(...)m 480 3525(@ListItem { last item })m 480 3237(@EndList)m 0 2779(@Ra)m 4(wIndentedList)k 240 fnt1 1908 2782(will)m 2334(e)s 3(xpand)k 3081(to)s 3320(recei)s 6(v)k 3(e)k 4056(the)s 4404(items,)s 5028(and)s 5432(will)s 5858(be)s 6140(closed)s 6809(of)s 6(f)k 7153(by)s 220 fnt2 7447 2779(@EndList)m 240 fnt1 8397 2782(.)m 480 2408(The)m 220 fnt2 913 2405(indent)m 240 fnt1 1506 2408(,)m 220 fnt2 1619 2405(gap)m 240 fnt1 1977 2408(,)m 2089(and)s 220 fnt2 2499 2405(star)m -8(t)k 240 fnt1 2996 2408(parameters)m 4099(are)s 4452(straightforw)s 2(ard)k 5986(\(note)s 6538(that)s 6962(the)s 7316(b)s 4(urden)k 8039(of)s 8316(typing)s 220 fnt2 8987 2405(1)m 240 fnt1 0 2120(has)m 378(been)s 895(lifted)s 1464(from)s 1996(the)s 2352(ordinary)s 3224(user\),)s 3816(b)s 4(ut)k 4186(the)s 220 fnt2 4543 2117(style)m 240 fnt1 5054 2120(parameter)m 6076(has)s 6454(a)s 6628(parameter)s 7650(of)s 7929(its)s 8213(o)s 6(wn)k 8686(\(see)s 0 1832(page)m 508(17\).)s 991(It)s 1196(is)s 1406(used)s 1903(lik)s 2(e)k 2315(this:)s 220 fnt2 480 1331(def @Ra)m 4(wNumberedList { @Ra)k 4(wIndentedList style { tag.)k 13( } })k 480 1043(def @Ra)m 4(wP)k 8(arenNumberedList { @Ra)k 4(wIndentedList style { \(tag\) } })k 240 fnt1 0 544(In)m 220 fnt2 276 541(@Ra)m 4(wNumberedList)k 240 fnt1 2294 544(,)m 220 fnt2 2422 541(style)m 240 fnt1 2946 544(is)m 3176(gi)s 6(v)k 3(en)k 3777(the)s 4146(v)s 6(alue)k 220 fnt2 4734 541(tag.)m 240 fnt1 5081 544(,)m 5209(where)s 220 fnt2 5870 541(tag)m 240 fnt1 6243 544(is)m 6474(its)s 6771(o)s 6(wn)k 7255(right)s 7787(parameter)s 9(,)k 8860(so)s 0 256(the)m 348(v)s 6(alue)k 916(of)s 220 fnt2 1187 253({style n)m 2(um})k 240 fnt1 2321 256(within)m 220 fnt2 2989 253(@IList)m 240 fnt1 3670 256(is)m 220 fnt2 3880 253(n)m 2(um.)k 240 fnt1 4347 256(;)m 4459(while)s 5046(in)s 220 fnt2 5289 253(@Ra)m 4(wP)k 8(arenNumberedList)k 240 fnt1 7884 256(,)m 220 fnt2 7992 253({style n)m 2(um})k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 87 93 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.2.)m 1871(P)s 19(ar)k 3(a)k 2(gr)k 3(aphs,)k 3082(displays,)s 3959(and)s 4385(lists)s 240 fnt5 10248 -1583(87)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(is)m 220 fnt2 219 13202(\(n)m 2(um\))k 240 fnt1 776 13205(.)m 949(In)s 1215(this)s 1620(w)s 2(ay)k 2080(we)s 2425(achie)s 6(v)k 3(e)k 3211(an)s 3503(unlimited)s 4487(v)s 6(ariety)k 5207(of)s 5487(numbering)s 6587(formats)s 7376(without)s 8176(ha)s 4(ving)k 8887(to)s 0 12917(re)m 6(write)k 220 fnt2 725 12914(@Ra)m 4(wIndentedList)k 240 fnt1 2633 12917(o)m 3(v)k 3(er)k 3112(and)s 3516(o)s 3(v)k 3(er)k 13(.)k 480 12543(These)m 1113(list)s 1470(symbols)s 2325(are)s 2678(objects)s 3412(without)s 4209(surrounding)s 5425(space,)s 6069(so)s 6341(macros)s 7088(similar)s 7816(to)s 8061(those)s 8629(used)s 0 12255(for)m 338(displays)s 1173(are)s 1520(needed:)s 220 fnt2 480 11754(macro @NumberedList { //@DispGap @Ra)m 4(wNumberedList //@DispGap })k 480 11466(macro @P)m 8(arenNumberedList { //@DispGap @Ra)k 4(wP)k 8(arenNumberedList //@DispGap })k 240 fnt1 0 10970(and)m 404(so)s 670(on.)s 480 10596(Lists)m 994(numbered)s 2007(by)s 2300(Roman)s 3047(numerals)s [ /Dest /LOUT19_4605_exa_para_9 /DEST pdfmark 3973(present)s 4721(a)s 4886(problem,)s 5788(because)s 220 fnt2 6600 10593(@Ne)m 6(xt)k 240 fnt1 7322 10596(will)m 7747(not)s 8111(increment)s 0 10308(Roman)m 749(numerals.)s 1789(Instead,)s 2586(the)s 3(y)k 3049(must)s 3574(be)s 3856(stored)s 4498(in)s 4741(a)s 4907(database:)s 220 fnt2 480 9807(def @Roman)m 480 9519( left @T)m 26(ag)k 480 9231( r)m -3(ight @V)k 15(al)k 480 8943({ @V)m 15(al })k 480 8367(@SysDatabase @Roman { standard })m 0 7866(@SysDatabase)m 240 fnt1 1602 7869(is)m 1835(preferred)s 2790(o)s 3(v)k 3(er)k 220 fnt2 3292 7866(@Database)m 240 fnt1 4529 7869(here)m 5019(because)s 5855(this)s 6274(database)s 7176(should)s 7896(be)s 8201(k)s 2(ept)k 8694(in)s 8960(a)s 0 7581(standard)m 880(place)s 1452(and)s 1868(shared)s 2562(by)s 2868(e)s 6(v)k 3(eryone.)k 3912(The)s 4352(database)s 5243(itself,)s 5838(a)s 6016(\207le)s 6389(called)s 220 fnt2 7029 7578(standard.ld)m 240 fnt1 8174 7581(in)m 8429(Basser)s 0 7293(Lout,)m 559(contains)s 1407(in)s 9(v)k 4(ocations)k 2548(of)s 220 fnt2 2819 7290(@Roman)m 240 fnt1 3735 7293(,)m 3842(each)s 4337(enclosed)s 5232(in)s 5475(braces:)s 220 fnt2 480 6811({ 1 @Roman i })m 480 6523({ 2 @Roman ii })m 480 6235(...)m 480 5947({ 100 @Roman c })m 240 fnt1 0 5453(Then)m 220 fnt2 549 5450(@Roman&&12)m 240 fnt1 2065 5453(for)m 2403(e)s 3(xample)k 3266(has)s 3636(v)s 6(alue)k 4204(xii,)s 4563(and)s 220 fnt2 480 4952(def @Ra)m 4(wRomanList { @Ra)k 4(wIndentedList style { {@Roman&&tag}.)k 13( } })k 240 fnt1 0 4453(produces)m 922(a)s 1096(list)s 1454(numbered)s 2477(by)s 2779(Roman)s 3535(numerals.)s 4583(The)s 5019(counting)s 5917(still)s 6337(proceeds)s 7246(in)s 7496(Arabic,)s 8261(b)s 4(ut)k 8631(each)s 0 4165(Arabic)m 719(numeral)s 1573(is)s 1799(con)s 9(v)k 3(erted)k 2804(to)s 3059(Roman)s 3824(by)s 4134(the)s 4498(cross)s 5056(reference.)s 6123(Since)s 6726(arbitrary)s 7617(objects)s 8361(may)s 8844(be)s 0 3877(stored)m 642(in)s 885(databases,)s 1908(arbitrary)s 2783(\207nite)s 3330(sequences)s 4351(of)s 4622(objects)s 5350(may)s 5816(be)s 6098(`counted')s 7047(in)s 7290(this)s 7686(w)s 2(ay)k 15(.)k 240 fnt5 0 3085(4.3.)m 471(P)s 2(age)k 1017(lay)s 6(out)k [ /Dest /LOUTpagelayout /DEST pdfmark 240 fnt1 480 2608(The)m 921(page)s 1443(layout)s [ /Dest /LOUT19_4605_exa_page_1 /DEST pdfmark [ /Dest /LOUT19_4605_exa_page_2 /DEST pdfmark 2115(de\207nitions)s 3190(gi)s 6(v)k 3(en)k 3783(in)s 4040(Section)s 4828(1.2,)s 5249(although)s 6158(correct,)s 6940(are)s 7301(v)s 3(ery)k 7791(basic.)s 8460(In)s 8730(this)s 0 2320(section)m 726(we)s 1053(present)s 1795(the)s 2135(de\207nitions)s 3187(used)s 3676(by)s 3962(the)s 4302(DocumentLayout)s 6029(package)s 6860(for)s 7190(laying)s 7833(out)s 8191(the)s 8530(pages)s 0 2032(of)m 271(books,)s 950(including)s 1906(running)s 2704(page)s 3211(headers)s 3991(and)s 4394(footers,)s 5164(dif)s 6(ferent)k 6038(formats)s 6817(for)s 7155(odd)s 7572(and)s 7975(e)s 6(v)k 3(en)k 8474(pages,)s 0 1744(and)m 404(so)s 670(on.)s 1074(The)s 1502(present)s 2252(document)s 3256(is)s 3466(produced)s 4415(with)s 4897(these)s 5444(de\207nitions.)s 480 1370(W)m 19(e)k 846(be)s 3(gin)k 1429(with)s 1908(a)s 2071(fe)s 6(w)k 2474(de\207nitions)s 3531(which)s 4170(permit)s 4850(the)s 5195(user)s 5650(to)s 5885(create)s 6507(cross)s 7046(references)s 8074(of)s 8342(the)s 8686(`see)s 0 1082(page)m 509(27')s 863(v)s 6(ariety)k 1576(which)s 2220(will)s 2647(be)s 2931(k)s 2(ept)k 3403(up)s 3698(to)s 3938(date)s 4394(automatically)s 15(.)k 5845(The)s 6275(user)s 6734(marks)s 7371(the)s 7721(tar)s 4(get)k 8322(page)s 8832(by)s 0 794(placing)m 220 fnt2 756 791(@P)m 8(ageMar)k -3(k intro)k 240 fnt1 2454 794(,)m 2560(for)s 2897(e)s 3(xample,)k 3810(at)s 4041(the)s 4388(point)s 4939(of)s 5209(interest,)s 6017(and)s 6420(refers)s 7012(to)s 7250(the)s 7597(mark)s 2(ed)k 8369(page)s 8876(as)s 220 fnt2 0 503(@P)m 8(ageOf intro)k 240 fnt1 1499 506(else)m 6(where:)k [ /Dest /LOUT19_4605_exa_page_3 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 88 94 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(88)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(e)m 6(xpor)k -8(t @T)k 26(ag)k 480 12919(def @P)m 8(ageMar)k -3(k)k 4(er r)k -3(ight @T)k 26(ag { @Null })k [ /Dest /LOUT16_1731_exa_page_1 /DEST pdfmark 480 12422(def @P)m 8(ageMar)k -3(k r)k -3(ight x)k 480 12134({)m 480 11846( @P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged x)k 480 11558(})m [ /Dest /LOUT16_1731_exa_page_2 /DEST pdfmark 480 11066(def @P)m 8(ageOf r)k -3(ight x)k 480 10778({)m 480 10490( @P)m 8(ageMar)k -3(k)k 4(er&&x @Open { @T)k 26(ag })k 480 10202(})m [ /Dest /LOUT16_1731_exa_page_3 /DEST pdfmark 240 fnt1 0 9708(W)m 19(e)k 385(will)s 828(see)s 1206(belo)s 6(w)k 1856(that)s 2291(an)s 2591(in)s 9(v)k 4(ocation)k 3662(of)s 220 fnt2 3949 9705(@P)m 8(ageMar)k -3(k)k 4(er)k 240 fnt1 5435 9708(appears)m 6233(before)s 6916(each)s 7428(page,)s 8004(with)s 220 fnt2 8503 9705(@T)m 26(ag)k 240 fnt1 0 9420(parameter)m 1014(equal)s 1587(to)s 1826(the)s 2174(page)s 2682(number)s 13(.)k 3564(Suppose)s 4432(that)s 220 fnt2 4850 9417(@P)m 8(ageMar)k -3(k intro)k 240 fnt1 6548 9420(,)m 6655(which)s 7297(e)s 3(xpands)k 8130(to)s 220 fnt2 480 8919(@P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged intro)k 240 fnt1 0 8420(happens)m 855(to)s 1113(f)s 2(all)k 1502(on)s 1819(page)s 2346(27)s 2653(of)s 2944(the)s 3311(\207nal)s 3810(printed)s 4564(document)s 5588(\(of)s 5957(course,)s 6707(its)s 7003(v)s 6(alue)k 7590(is)s 220 fnt2 7819 8417(@Null)m 240 fnt1 8484 8420(which)m 0 8132(mak)m 2(es)k 686(it)s 905(in)s 9(visible\).)k 1988(Then)s 2564(the)s 2939(ef)s 6(fect)k 3561(of)s 220 fnt2 3859 8129(@T)m 26(agged)k 240 fnt1 4874 8132(is)m 5111(to)s 5377(attach)s 220 fnt2 6030 8129(intro)m 240 fnt1 6536 8132(as)m 6812(an)s 7122(e)s 3(xtra)k 7683(tag)s 8054(to)s 8320(the)s 8695(\207rst)s 0 7844(in)m 9(v)k 4(ocation)k 1092(of)s 220 fnt2 1401 7841(@P)m 8(ageMar)k -3(k)k 4(er)k 240 fnt1 2908 7844(preceding)m 3943(that)s 4399(\207nal)s 4917(point,)s 5554(and)s 5997(this)s 6431(must)s 6994(be)s 220 fnt2 7315 7841(@P)m 8(ageMar)k -3(k)k 4(er 27)k 240 fnt1 9022 7844(.)m 0 7556(Therefore)m 997(the)s 1345(e)s 3(xpression)k 220 fnt2 480 7055(@P)m 8(ageMar)k -3(k)k 4(er&&intro @Open { @T)k 26(ag })k 240 fnt1 0 6556(will)m 422(open)s 941(the)s 1285(in)s 9(v)k 4(ocation)k 220 fnt2 2334 6553(@P)m 8(ageMar)k -3(k)k 4(er 27)k 240 fnt1 4097 6556(and)m 4497(yield)s 5028(the)s 5372(v)s 6(alue)k 5936(of)s 6203(its)s 220 fnt2 6474 6553(@T)m 26(ag)k 240 fnt1 7093 6556(parameter)m 9(,)k 8141(27.)s 8540(Thus,)s 220 fnt2 0 6265(@P)m 8(ageOf intro)k 240 fnt1 1499 6268(appearing)m 2495(an)s 3(ywhere)k 3478(in)s 3721(the)s 4069(document)s 5073(yields)s 5695(27.)s 480 5894(Ne)m 3(xt)k 1009(we)s 1351(ha)s 4(v)k 3(e)k 1859(some)s 2427(little)s 2926(de\207nitions)s 3994(for)s 4339(v)s 6(arious)k 5095(parts)s 5617(of)s 5895(the)s 6250(page.)s 220 fnt2 6873 5891(@FullPlace)m 240 fnt1 8055 5894(will)m 8488(be)s 8778(the)s 0 5606(tar)m 4(get)k 599(of)s 870(full-width)s 1882(body)s 2416(te)s 3(xt:)k 220 fnt2 480 5105(def @FullPlace { @Galle)m 4(y })k 0 4604(@ColPlace)m 240 fnt1 1151 4607(will)m 1577(be)s 1859(the)s 2207(tar)s 4(get)k 2806(of)s 3077(body)s 3611(te)s 3(xt)k 4026(within)s 4694(one)s 5096(column:)s 220 fnt2 480 4106(def @ColPlace { @Galle)m 4(y })k 0 3605(@T)m 26(opList)k 240 fnt1 972 3608(will)m 1398(be)s 1680(the)s 2028(tar)s 4(get)k 2627(of)s 2898(\207gures)s 3600(and)s 4004(tables:)s 220 fnt2 480 3107(e)m 6(xpor)k -8(t @T)k 26(ag)k 480 2819(def @T)m 26(opList r)k -3(ight @T)k 26(ag)k 480 2531({)m 480 2243( @Galle)m 4(y)k 480 1955( //@T)m 26(opGap @T)k 26(opList @Ne)k 6(xt @T)k 26(ag)k 480 1667(})m 240 fnt1 0 1173(W)m 19(e)k 392(ha)s 4(v)k 3(e)k 916(tak)s 2(en)k 1512(a)s 1702(shortcut)s 2555(here,)s 3096(a)s 4(v)k 4(oiding)k 4002(an)s 4309(unnecessary)s 220 fnt2 5555 1170(@T)m 26(opPlace)k 240 fnt1 6753 1173(symbol.)m 220 fnt2 7645 1170(@F)m 6(ootList)k 240 fnt1 8722 1173(and)m 220 fnt2 0 882(@F)m 6(ootSect)k 240 fnt1 1142 885(de\207ne)m 1774(a)s 1931(sequence)s 2854(of)s 3116(full-width)s 4119(tar)s 4(gets)k 4793(at)s 5015(the)s 5354(foot)s 5790(of)s 6052(the)s 6390(page)s 6889(for)s 7218(footnotes,)s 8205(preceded)s 0 597(by)m 294(a)s 460(short)s 998(horizontal)s 2022(line:)s [ /Dest /LOUT19_4605_exa_page_4 /DEST pdfmark 220 fnt2 480 96(e)m 6(xpor)k -8(t @T)k 26(ag)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 89 95 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.3.)m 1871(P)s 19(a)k 2(g)k 2(e)k 2393(layout)s 240 fnt5 10249 -1583(89)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13207(def @F)m 6(ootList r)k -3(ight @T)k 26(ag)k 480 12919({)m 480 12631( @Galle)m 4(y)k 480 12343( //@F)m 6(ootGap @F)k 6(ootList @Ne)k 6(xt @T)k 26(ag)k 480 12055(})m [ /Dest /LOUT16_1731_exa_page_4 /DEST pdfmark 480 11563(def @F)m 6(ootSect)k 480 11275({)m 480 10987( @F)m 6(ootLen @Wide @HLine)k 480 10699( //@F)m 6(ootGap @F)k 6(ootList 1 ||@F)k 6(ootLen)k 480 10411(})m [ /Dest /LOUT16_1731_exa_page_5 /DEST pdfmark 240 fnt1 0 9917(Similarly)m 15(,)k 220 fnt2 988 9914(@ColF)m 6(ootList)k 240 fnt1 2378 9917(and)m 220 fnt2 2791 9914(@ColF)m 6(ootSect)k 240 fnt1 4279 9917(pro)m 3(vide)k 5072(a)s 5247(sequence)s 6189(of)s 6469(tar)s 4(gets)k 7161(for)s 7508(footnotes)s 8458(within)s 0 9629(one)m 402(column:)s 220 fnt2 480 9178(e)m 6(xpor)k -8(t @T)k 26(ag)k 480 8890(def @ColF)m 6(ootList r)k -3(ight @T)k 26(ag)k 480 8602({)m 480 8314( @Galle)m 4(y)k 480 8026( //@F)m 6(ootGap @ColF)k 6(ootList @Ne)k 6(xt @T)k 26(ag)k 480 7738(})m 480 7162(def @ColF)m 6(ootSect)k 480 6874({)m 480 6586( @ColF)m 6(ootLen @Wide @HLine)k 480 6298( //@F)m 6(ootGap @ColF)k 6(ootList 1 ||@ColF)k 6(ootLen)k 480 6010(})m 240 fnt1 0 5516(The)m 428(ne)s 3(xt)k 897(de\207nition)s 1871(pro)s 3(vides)k 2743(a)s 2909(horizontal)s 3933(sequence)s 4866(of)s 5137(one)s 5539(or)s 5798(more)s 6345(columns:)s [ /Dest /LOUT19_4605_exa_page_5 /DEST pdfmark 220 fnt2 480 5015(def @ColList r)m -3(ight col)k 480 4727({)m 480 4439( def @Column)m 480 4151( { @VExpand { @ColPlace //1r)m -8(t @OneRo)k 3(w { //@MidGap @ColF)k 6(ootSect } } })k 480 3575( col @Case {)m 480 3287( Single @Y)m 4(ield @Column)k 480 2999( Doub)m 4(le @Y)k 4(ield { @Doub)k 4(leColWidth @Wide @Column ||@ColGap @ColList col })k 480 2711( Multi @Y)m 4(ield { @MultiColWidth @Wide @Column ||@ColGap @ColList col })k 480 2423( })m 480 2135(})m 240 fnt1 0 1641(Each)m 537(column)s 1315(consists)s 2125(of)s 2399(a)s 220 fnt2 2568 1638(@ColPlace)m 240 fnt1 3721 1641(at)m 3956(the)s 4307(top)s 4668(and)s 5075(a)s 220 fnt2 5243 1638(@F)m 6(ootSect)k 240 fnt1 6397 1641(at)m 6632(the)s 6982(foot.)s 7534(The)s 220 fnt2 7965 1638(@VExpand)m 240 fnt1 0 1353(symbol)m 772(ensures)s 1553(that)s 1983(whene)s 6(v)k 3(er)k 2977(a)s 3156(column)s 3943(comes)s 4618(into)s 5056(e)s 3(xistence,)k 6061(it)s 6266(will)s 6705(e)s 3(xpand)k 7464(v)s 3(ertically)k 8429(so)s 8708(that)s 0 1065(the)m 360(bottom-justi\207cation)s 220 fnt2 2315 1062(//1r)m -8(t)k 240 fnt1 2769 1065(has)m 3152(as)s 3414(much)s 4016(space)s 4615(as)s 4878(possible)s 5730(to)s 5982(w)s 2(ork)k 6545(within.)s 7333(The)s 220 fnt2 7773 1062(col)m 240 fnt1 8112 1065(parameter)m 0 777(determines)m 1099(whether)s 1929(the)s 2277(result)s 2867(has)s 3237(a)s 3403(single)s 4030(column,)s 4855(double)s 5563(columns,)s 6481(or)s 6740(multiple)s 7592(columns.)s 480 403(The)m 220 fnt2 908 400(@P)m 8(age)k 240 fnt1 1687 403(symbol)m 2447(places)s 3095(its)s 3371(parameter)s 4385(in)s 4628(a)s 4794(page)s 5302(of)s 5573(\207x)s 3(ed)k 6107(width,)s 6759(height,)s 7464(and)s 7868(mar)s 4(gins:)k [ /Dest /LOUT19_4605_exa_page_6 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 90 96 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(90)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(def @P)m 8(age r)k -3(ight x)k 480 12919({)m 480 12631( @P)m 8(ageWidth @Wide @P)k 8(ageHeight @High {)k 480 12343( //@P)m 8(ageMargin ||@P)k 8(ageMargin)k 480 12055( @HExpand @VExpand x)m 480 11767( ||@P)m 8(ageMargin //@P)k 8(ageMargin)k 480 11479( })m 480 11191(})m 0 10694(@HExpand)m 240 fnt1 1169 10697(and)m 220 fnt2 1568 10694(@VExpand)m 240 fnt1 2725 10697(ensure)m 3400(that)s 3814(the)s 4157(right)s 4664(parameter)s 5673(occupies)s 6557(all)s 6845(the)s 7189(a)s 4(v)k 6(ailable)k 8092(space;)s 8730(this)s 0 10409(is)m 218(important)s 1215(when)s 1800(the)s 2156(right)s 2676(parameter)s 3698(is)s 3916(unusually)s 4910(small.)s 5599(The)s 220 fnt2 6036 10406(@High)m 240 fnt1 6763 10409(symbol)m 7531(gi)s 6(v)k 3(es)k 8087(the)s 8443(page)s 8960(a)s 0 10121(single)m 627(ro)s 6(w)k 1047(mark,)s 1645(ensuring)s 2522(that)s 2940(it)s 3132(will)s 3558(be)s 3840(printed)s 4575(on)s 4872(a)s 5038(single)s 5665(sheet)s 6216(of)s 6487(paper)s 7078(\(page)s 7665(30\).)s 480 9747(Ne)m 3(xt)k 1002(we)s 1337(ha)s 4(v)k 3(e)k 220 fnt2 1838 9744(@OneP)m 8(age)k 240 fnt1 2972 9747(,)m 3079(de\207ning)s 3917(a)s 4083(typical)s 4788(page)s 5296(of)s 5567(a)s 5733(book)s 6274(or)s 6533(other)s 7084(document:)s [ /Dest /LOUT19_4605_exa_page_7 /DEST pdfmark 220 fnt2 480 9246(def @OneP)m 8(age)k 480 8958( named @Columns {})m 480 8670( named @P)m 8(ageT)k 26(op {})k 480 8382( named @P)m 8(ageF)k 6(oot {})k 480 8094({)m 480 7806( @P)m 8(age {)k 480 7518( @P)m 8(ageT)k 26(op)k 480 7230( //@MidGap @T)m 26(opList)k 480 6942( //@MidGap @FullPlace)m 480 6654( //@MidGap @ColList @Columns)m 480 6366( // //1r)m -8(t @OneRo)k 3(w { //@MidGap @F)k 6(ootSect //@MidGap @P)k 8(ageF)k 6(oot })k 480 6078( })m 480 5790(})m 240 fnt1 0 5296(The)m 431(page)s 943(top)s 1305(and)s 1713(page)s 2224(foot,)s 2720(and)s 3128(the)s 3479(number)s 4274(of)s 4548(columns,)s 5470(are)s 5821(parameters)s 6922(that)s 7344(will)s 7773(be)s 8059(gi)s 6(v)k 3(en)k 8643(later)s 0 5008(when)m 220 fnt2 565 5005(@OneP)m 8(age)k 240 fnt1 1747 5008(is)m 1946(in)s 9(v)k 4(ok)k 2(ed.)k 2855(The)s 3272(body)s 3794(of)s 4054(the)s 4390(page)s 4887(is)s 5085(a)s 5240(straightforw)s 2(ard)k 6756(combination)s 7998(of)s 8257(pre)s 6(vious)k 0 4720(de\207nitions.)m 1171(The)s 220 fnt2 1595 4717(//)m 240 fnt1 1777 4720(symbol)m 2533(protects)s 3337(the)s 3681(follo)s 6(wing)k 220 fnt2 4655 4717(//1r)m -8(t)k 240 fnt1 5093 4720(from)m 5614(deletion)s 6437(in)s 6677(the)s 7021(unlik)s 2(ely)k 7854(e)s 6(v)k 3(ent)k 8419(that)s 8833(all)s 0 4432(the)m 342(preceding)s 1331(symbols)s 2174(are)s 2514(replaced)s 3375(by)s 220 fnt2 3662 4429(@Null)m 240 fnt1 4247 4432(.)m 4405(The)s 4826(follo)s 6(wing)k 5797(object)s 6434(is)s 6638(enclosed)s 7526(in)s 220 fnt2 7763 4429(@OneRo)m 3(w)k 240 fnt1 8887 4432(to)m 0 4144(ensure)m 680(that)s 1098(all)s 1391(of)s 1662(it)s 1854(is)s 2064(bottom-justi\207ed,)s 3698(not)s 4064(just)s 4469(its)s 4745(\207rst)s 5176(component.)s 480 3770(Before)m 1199(presenting)s 2262(the)s 2624(de\207nition)s 3612(of)s 3896(a)s 4076(sequence)s 5023(of)s 5308(pages,)s 5974(we)s 6322(must)s 6861(detour)s 7546(to)s 7799(describe)s 8665(ho)s 6(w)k 0 3482(running)m 803(page)s 1317(headers)s 2104(and)s 2513(footers)s 3233(\(lik)s 2(e)k 3730(those)s 4297(in)s 4545(the)s 4899(present)s 5655(document\))s 6732(are)s 7085(produced.)s 8146(These)s 8779(are)s 0 3194(based)m 603(on)s 900(the)s 220 fnt2 1248 3191(@Runner)m 240 fnt1 2250 3194(symbol:)m [ /Dest /LOUT19_4605_exa_page_8 /DEST pdfmark 220 fnt2 480 2693(e)m 6(xpor)k -8(t @T)k 26(opOdd @T)k 26(opEv)k 5(en @F)k 6(ootOdd @F)k 6(ootEv)k 5(en)k 480 2405(def @Runner)m 480 2117( named @T)m 26(opOdd r)k -3(ight @P)k 8(ageNum { @Null })k 480 1829( named @T)m 26(opEv)k 5(en r)k -3(ight @P)k 8(ageNum { @Null })k 480 1541( named @F)m 6(ootOdd r)k -3(ight @P)k 8(ageNum { @Null })k 480 1253( named @F)m 6(ootEv)k 5(en r)k -3(ight @P)k 8(ageNum { @Null })k 480 965( named @T)m 26(ag {})k 480 677({ @Null })m 240 fnt1 0 183(The)m 440(four)s 910(parameters)s 2020(control)s 2764(the)s 3125(format)s 3833(of)s 4116(running)s 4926(headers)s 5719(and)s 6136(footers)s 6862(on)s 7171(odd)s 7601(and)s 8017(e)s 6(v)k 3(en)k 8530(pages)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 91 97 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.3.)m 1871(P)s 19(a)k 2(g)k 2(e)k 2393(layout)s 240 fnt5 10256 -1583(91)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(respecti)m 6(v)k 3(ely)k 15(.)k 1294(In)s 9(v)k 4(ocations)k 2448(of)s 220 fnt2 2719 13202(@Runner)m 240 fnt1 3661 13205(,)m 3768(for)s 4106(e)s 3(xample)k 220 fnt2 480 12704(@Runner)m 480 12416( @T)m 26(opEv)k 5(en { @B @P)k 8(ageNum |1r)k -8(t @I { Chapter 4 } })k 480 12128( @T)m 26(opOdd { @I { Examples } |1r)k -8(t @B @P)k 8(ageNum })k 240 fnt1 0 11629(will)m 416(be)s 687(embedded)s 1719(in)s 1951(the)s 2289(body)s 2812(te)s 3(xt)k 3217(of)s 3477(the)s 3815(document,)s 4855(and,)s 5298(as)s 5537(we)s 5862(will)s 6277(see)s 6628(in)s 6860(a)s 7016(moment,)s 7896(are)s 8232(accessed)s 0 11341(by)m 220 fnt2 296 11338(@Runner&&f)m 6(ollo)k 3(wing)k 240 fnt1 2423 11341(cross)m 2967(references)s 4001(on)s 4301(the)s 4651(pages.)s 5363(Notice)s 6059(ho)s 6(w)k 6522(the)s 220 fnt2 6873 11338(@P)m 8(ageNum)k 240 fnt1 8112 11341(parameter)m 0 11053(of)m 265(each)s 753(parameter)s 1761(allo)s 6(ws)k 2423(the)s 2764(format)s 3454(of)s 3718(the)s 4059(running)s 4851(header)s 5541(to)s 5774(be)s 6049(speci\207ed)s 6950(while)s 7531(lea)s 4(ving)k 8277(the)s 8618(page)s 0 10765(number)m 791(to)s 1030(be)s 1312(substituted)s 2406(later)s 13(.)k 480 10391(W)m 19(e)k 843(may)s 1303(no)s 6(w)k 1758(de\207ne)s 220 fnt2 2393 10388(@OddP)m 8(ageList)k 240 fnt1 3872 10391(,)m 3973(whose)s 4635(result)s 5219(is)s 5423(a)s 5583(sequence)s 6510(of)s 6775(pages)s 7365(be)s 3(ginning)k 8367(with)s 8843(an)s 0 10103(odd-numbered)m 1454(page:)s [ /Dest /LOUT19_4605_exa_page_9 /DEST pdfmark 220 fnt2 480 9602(def @OddP)m 8(ageList)k 480 9314( named @Columns {})m 480 9026( r)m -3(ight @P)k 8(ageNum)k 480 8738({)m 480 8450( def @Ev)m 5(enP)k 8(ageList ...)k 480 7874( @P)m 8(ageMar)k -3(k)k 4(er @P)k 8(ageNum)k 480 7586( // @Runner&&f)m 6(ollo)k 3(wing @Open {)k 480 7298( @OneP)m 8(age)k 480 7010( @Columns { @Columns })m 480 6722( @P)m 8(ageT)k 26(op { @T)k 26(opOdd @P)k 8(ageNum })k 480 6434( @P)m 8(ageF)k 6(oot { @F)k 6(ootOdd @P)k 8(ageNum })k 480 6146( })m 480 5858( // @Ev)m 5(enP)k 8(ageList)k 480 5570( @Columns { @Columns })m 480 5282( @Ne)m 6(xt @P)k 8(ageNum)k 480 4994(})m 240 fnt1 0 4500(Ignoring)m 220 fnt2 887 4497(@Ev)m 5(enP)k 8(ageList)k 240 fnt1 2516 4500(for)m 2864(the)s 3222(moment,)s 4124(notice)s 4774(\207rst)s 5215(that)s 5643(the)s 6002(in)s 9(v)k 4(ocation)k 7066(of)s 220 fnt2 7347 4497(@OneP)m 8(age)k 240 fnt1 8551 4500(is)m 8772(en-)s 0 4212(closed)m 679(in)s 220 fnt2 932 4209(@Runner&&f)m 6(ollo)k 3(wing @Open)k 240 fnt1 3815 4212(.)m 3989(Since)s 220 fnt2 4586 4209(@Runner&&f)m 6(ollo)k 3(wing)k 240 fnt1 6721 4212(refers)m 7324(to)s 7573(the)s 7931(\207rst)s 8373(in)s 9(v)k 4(oca-)k 0 3924(tion)m 421(of)s 220 fnt2 684 3921(@Runner)m 240 fnt1 1678 3924(appearing)m 2666(after)s 3154(itself)s 3694(in)s 3929(the)s 4269(\207nal)s 4741(printed)s 5468(document,)s 6511(the)s 6851(symbols)s 220 fnt2 7692 3921(@T)m 26(opOdd)k 240 fnt1 8722 3924(and)m 220 fnt2 0 3633(@F)m 6(ootOdd)k 240 fnt1 1127 3636(will)m 1562(tak)s 2(e)k 2023(their)s 2528(v)s 6(alue)k 3105(from)s 3638(the)s 3995(\207rst)s 4434(in)s 9(v)k 4(ocation)k 5497(of)s 220 fnt2 5777 3633(@Runner)m 240 fnt1 6788 3636(follo)m 6(wing)k 7773(the)s 8130(top)s 8498(of)s 8778(the)s 0 3348(page,)m 554(e)s 6(v)k 3(en)k 1049(though)s 220 fnt2 1767 3345(@F)m 6(ootOdd)k 240 fnt1 2880 3348(appears)m 3656(at)s 3883(the)s 4225(foot)s 4665(of)s 4931(the)s 5274(page.)s 5884(Their)s 220 fnt2 6456 3345(@P)m 8(ageNum)k 240 fnt1 7687 3348(parameters)m 8779(are)s 0 3060(replaced)m 867(by)s 220 fnt2 1161 3057(@P)m 8(ageNum)k 240 fnt1 2337 3060(,)m 2444(the)s 2792(actual)s 3417(page)s 3925(number)s 4716(parameter)s 5730(of)s 220 fnt2 6001 3057(@OddP)m 8(ageList)k 240 fnt1 7480 3060(.)m 480 2686(After)m 1043(producing)s 2067(the)s 2415(odd-numbered)s 3869(page,)s 220 fnt2 4428 2683(@OddP)m 8(ageList)k 240 fnt1 5967 2686(in)m 9(v)k 4(ok)k 2(es)k 220 fnt2 6748 2683(@Ev)m 5(enP)k 8(ageList)k 240 fnt1 8307 2686(:)m [ /Dest /LOUT19_4605_exa_page_10 /DEST pdfmark 220 fnt2 480 2185(def @Ev)m 5(enP)k 8(ageList)k 480 1897( named @Columns {})m 480 1609( r)m -3(ight @P)k 8(ageNum)k 480 1321({)m 480 1033( @P)m 8(ageMar)k -3(k)k 4(er @P)k 8(ageNum)k 480 745( // @Runner&&f)m 6(ollo)k 3(wing @Open {)k 480 457( @OneP)m 8(age)k 480 169( @Columns { @Columns })m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 92 98 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(92)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207( @P)m 8(ageT)k 26(op { @T)k 26(opEv)k 5(en @P)k 8(ageNum })k 480 12919( @P)m 8(ageF)k 6(oot { @F)k 6(ootEv)k 5(en @P)k 8(ageNum })k 480 12631( })m 480 12343( // @OddP)m 8(ageList)k 480 12055( @Columns { @Columns })m 480 11767( @Ne)m 6(xt @P)k 8(ageNum)k 480 11479(})m 240 fnt1 0 10985(This)m 465(produces)s 1369(an)s 1641(e)s 6(v)k 3(en-numbered)k 3167(page,)s 3714(then)s 4172(passes)s 4823(the)s 5160(ball)s 5562(back)s 6063(to)s 220 fnt2 6291 10982(@OddP)m 8(ageList)k 240 fnt1 7819 10985(\211)m 7988(a)s 8142(delightful)s 0 10697(e)m 3(xample)k 877(of)s 1162(what)s 1701(computer)s 2678(scientists)s 3619(call)s 4032(mutual)s 4765(recursion.)s 5832(The)s 6274(tw)s 2(o)k 6699(page)s 7221(types)s 7791(dif)s 6(fer)k 8388(only)s 8883(in)s 0 10409(their)m 497(running)s 1295(headers)s 2076(and)s 2480(footers,)s 3250(b)s 4(ut)k 3612(other)s 4163(changes)s 4985(could)s 5575(easily)s 6186(be)s 6468(made.)s 480 10035(It)m 682(w)s 2(as)k 1099(foreshado)s 6(wed)k 2489(earlier)s 3153(that)s 3568(an)s 3847(in)s 9(v)k 4(ocation)k 4897(of)s 220 fnt2 5164 10032(@P)m 8(ageMar)k -3(k)k 4(er)k 240 fnt1 6630 10035(w)m 2(ould)k 7281(precede)s 8076(each)s 8567(page,)s 0 9747(and)m 412(this)s 817(has)s 1195(been)s 1713(done.)s 2351(Although)s 3322(this)s 220 fnt2 3726 9744(@P)m 8(ageMar)k -3(k)k 4(er)k 240 fnt1 5204 9747(is)m 5422(a)s 5597(component)s 6729(of)s 7009(the)s 7365(root)s 7819(g)s 1(alle)k 3(y)k 15(,)k 8499(it)s 8700(will)s 0 9459(not)m 366(cause)s 953(a)s 1119(page)s 1627(to)s 1866(be)s 2148(printed,)s 2932(because)s 3745(Basser)s 4442(Lout)s 4954(skips)s 5497(components)s 6705(of)s 6976(height)s 7634(zero.)s 240 fnt5 0 8666(4.4.)m 471(Chapters)s 1468(and)s 1909(sections)s [ /Dest /LOUTchapters /DEST pdfmark 240 fnt1 480 8189(The)m 905(de\207nitions)s 1962(of)s 2229(chapters)s 3073(and)s 3473(sections)s 4290(from)s 4811(the)s 5155(DocumentSetup)s 6746(package)s [ /Dest /LOUT19_4605_exa_chap_1 /DEST pdfmark 7583(of)s 7850(V)s 26(ersion)k 8634(2)s 8804(\(in)s 0 7901(V)m 26(ersion)k 793(3,)s 1026(the)s 1379(BookSetup)s 2503(e)s 3(xtension)k 3480(of)s 3756(DocumentSetup\))s 5432(form)s 5961(the)s 6315(subject)s 7058(of)s 7334(this)s 7736(section.)s 8583(The)s 3(y)k 0 7613(allo)m 6(w)k 579(a)s 745(chapter)s 1508(to)s 1747(be)s 2029(entered)s 2790(lik)s 2(e)k 3202(this:)s [ /Dest /LOUT19_4605_exa_chap_2 /DEST pdfmark 220 fnt2 480 7112(@Chapter)m 480 6824( @Title { ...)m 13( })k 480 6536( @T)m 26(ag { ...)k 13( })k 480 6248(@Begin)m 480 5960( ...)m 480 5672(@End @Chapter)m 240 fnt1 0 5176(W)m 9(ithin)k 712(the)s 1060(chapter)s 1823(a)s 1989(sequence)s 2922(of)s 3193(sections)s 4014(may)s 4480(be)s 4762(included)s 5644(by)s 5938(writing)s 220 fnt2 480 4675(@BeginSections)m 480 4387(@Section { ...)m 13( })k 480 4099(...)m 480 3811(@Section { ...)m 13( })k 480 3523(@EndSections)m 240 fnt1 0 3068(These)m 627(are)s 974(numbered)s 1989(automatically)s 15(,)k 3381(and)s 3785(an)s 4068(entry)s 4613(is)s 4823(made)s 5397(for)s 5735(each)s 6230(in)s 6473(a)s 6639(table)s 7159(of)s 7430(contents.)s 480 2694(The)m 901(user)s 1352(of)s 1615(the)s 1956(DocumentSetup)s 3544(package)s 4376(can)s 4758(\207nd)s 5182(the)s 5522(number)s 6306(of)s 6570(the)s 6910(chapter)s 7666(or)s 7918(section)s 8644(with)s 0 2406(a)m 176(gi)s 6(v)k 3(en)k 766(tag)s 1121(by)s 1426(writing)s 220 fnt2 2179 2403(@NumberOf tag)m 240 fnt1 3838 2406(at)m 4081(an)s 3(y)k 4488(point)s 5050(in)s 5304(the)s 5662(document.)s 6780(This)s 7267(feature)s 7995(is)s 8215(based)s 8829(on)s 0 2118(the)m 348(follo)s 6(wing)k 1325(de\207nitions:)s [ /Dest /LOUT19_4605_exa_chap_3 /DEST pdfmark 220 fnt2 480 1617(e)m 6(xpor)k -8(t @T)k 26(ag)k 480 1329(def @NumberMar)m -3(k)k 4(er r)k -3(ight @T)k 26(ag { @Null })k 480 753(def @NumberOf r)m -3(ight x)k 480 465({ @NumberMar)m -3(k)k 4(er&&x @Open { @T)k 26(ag } })k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 93 99 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.4.)m 1871(Chapter)s 2(s)k 2802(and)s 3228(sections)s 240 fnt5 10250 -1583(93)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(Each)m 522(chapter)s 1272(and)s 1663(section)s 2384(will)s 2797(contain)s 3545(one)s 3934(in)s 9(v)k 4(ocation)k 4975(of)s 220 fnt2 5233 13202(@NumberMar)m -3(k)k 4(er)k 240 fnt1 6918 13205(;)m 7017(a)s 7170(full)s 7543(e)s 3(xplanation)k 8700(will)s 0 12917(be)m 282(gi)s 6(v)k 3(en)k 862(later)s 13(.)k 480 12543(A)m 710(sequence)s 1643(of)s 1914(places)s 2562(for)s 2900(recei)s 6(ving)k 3836(chapters)s 4683(is)s 4893(easily)s 5504(de\207ned:)s 220 fnt2 480 12042(e)m 6(xpor)k -8(t @T)k 26(ag)k 480 11754(def @ChapterList r)m -3(ight @T)k 26(ag)k 480 11466({)m 480 11178( @Galle)m 4(y)k 480 10890( //@ChapterGap @ChapterList @Ne)m 6(xt @T)k 26(ag)k 480 10602(})m 0 10105(@ChapterGap)m 240 fnt1 1505 10108(will)m 1967(usually)s 2747(be)s 220 fnt2 3065 10105(1.1b)m 240 fnt1 3484 10108(,)m 3626(ensuring)s 4539(that)s 4992(each)s 5523(chapter)s 6321(be)s 3(gins)k 7030(on)s 7362(a)s 7564(ne)s 6(w)k 8046(page.)s 8698(The)s 220 fnt2 0 9817(@Chapter)m 240 fnt1 1063 9820(g)m 1(alle)k 3(y)k 1697(itself)s 2245(is)s 2455(de\207ned)s 3218(as)s 3468(follo)s 6(ws:)k [ /Dest /LOUT19_4605_exa_chap_4 /DEST pdfmark 220 fnt2 480 9319(e)m 6(xpor)k -8(t @F)k 6(ootNote @BeginSections @EndSections @Section)k 480 9031(def @Chapter f)m 6(orce into { @ChapterList&&preceding })k 480 8743( named @T)m 26(ag {})k 480 8455( named @Title {})m 480 8167( named @RunningTitle { dft })m 480 7879( body @Body)m 480 7591({)m 480 7303( def @F)m 6(ootNote r)k -3(ight x { @ColF)k 6(ootNote x })k 480 6727( def @BeginSections ...)m 480 6439( def @EndSections ...)m 480 6151( def @Section ...)m [ /Dest /LOUT16_1731_exa_chap_1 /DEST pdfmark 480 5698( def @ChapterTitle)m 480 5410( {)m 480 5122( @ChapterNumbers @Case {)m 480 4834( {Y)m 30(es y)k 4(es} @Y)k 4(ield { Chapter {@NumberOf @T)k 26(ag}.)k 13( |2s @Title })k 480 4546( else @Y)m 4(ield @Title)k 480 4258( })m 480 3970( })m 480 3394( def @ChapterNum)m 480 3106( {)m 480 2818( @ChapterNumbers @Case {)m 480 2530( {Y)m 30(es y)k 4(es} @Y)k 4(ield { Chapter {@NumberOf @T)k 26(ag} })k 480 2242( else @Y)m 4(ield @Null)k 480 1954( })m 480 1666( })m [ /Dest /LOUT16_1731_exa_chap_2 /DEST pdfmark 480 1174( r)m 2(agged @Break @BookTitleF)k 6(or)k -5(mat @ChapterTitle)k 480 886( // @NumberMar)m -3(k)k 4(er {)k 480 598( @ChapterList&&@T)m 26(ag @Open { @T)k 26(ag })k 480 310( })m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 94 100 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(94)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207( // @ChapterList&&preceding @T)m 26(agged @T)k 26(ag)k 480 12919( // @NumberMar)m -3(k)k 4(er&&preceding @T)k 26(agged @T)k 26(ag)k 480 12631( // @P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged @T)k 26(ag)k 480 12343( // { @ChapterTitle } @MajorContentsEntr)m -6(y {@P)k 8(ageOf @T)k 26(ag})k 480 12055( // @Runner)m 480 11767( @F)m 6(ootEv)k 5(en { |0.5r)k -8(t 0.8f @F)k 6(ont @B @P)k 8(ageNum })k 480 11479( @F)m 6(ootOdd { |0.5r)k -8(t 0.8f @F)k 6(ont @B @P)k 8(ageNum })k 480 11191( // @Body)m 480 10903( //@SectionGap @ChapRefSection)m 480 10615( // @Runner)m 480 10327( @T)m 26(opEv)k 5(en { @B @P)k 8(ageNum |1r)k -8(t @I @ChapterNum })k 480 10039( @T)m 26(opOdd { @I {@RunningTitle @OrElse @Title} |1r)k -8(t @B @P)k 8(ageNum })k 480 9751(})m [ /Dest /LOUT16_1731_exa_chap_3 /DEST pdfmark 240 fnt1 0 9257(W)m 19(e)k 371(will)s 800(see)s 1164(the)s 1515(symbols)s 2366(for)s 2707(sections)s 3531(shortly)s 15(.)k 4347(Notice)s 5042(ho)s 6(w)k 5506(their)s 6006(use)s 6384(has)s 6756(been)s 7268(restricted)s 8216(to)s 8458(within)s 0 8969(the)m 348(right)s 859(parameter)s 1873(of)s 220 fnt2 2144 8966(@Chapter)m 240 fnt1 3147 8969(,)m 3254(by)s 3548(nesting)s 4292(them)s 4830(and)s 5234(using)s 5806(a)s 5972(body)s 6506(parameter)s 13(.)k 480 8595(The)m 956(meaning)s 1882(of)s 220 fnt2 2202 8592(@F)m 6(ootNote)k 240 fnt1 3422 8595(within)m 220 fnt2 4139 8592(@Chapter)m 240 fnt1 5250 8595(has)m 5669(been)s 6227(set)s 6601(to)s 220 fnt2 6889 8592(@ColF)m 6(ootNote)k 240 fnt1 8328 8595(,)m 8484(which)s 0 8307(produces)m 907(a)s 1064(footnote)s 1908(tar)s 4(geted)k 2722(to)s 220 fnt2 2953 8304(@ColF)m 6(ootList)k 240 fnt1 4325 8307(\(see)m 4756(Section)s 5521(4.3\).)s 6056(In)s 6303(other)s 6845(w)s 2(ords,)k 7526(footnotes)s 8458(within)s 0 8019(chapters)m 851(go)s 1149(at)s 1386(the)s 1739(foot)s 2189(of)s 2465(the)s 2818(column,)s 3648(not)s 4019(at)s 4256(the)s 4609(foot)s 5059(of)s 5335(the)s 5688(page.)s 6309(\(Of)s 6717(course,)s 7453(in)s 7701(single-column)s 0 7731(books)m 623(this)s 1018(distinction)s 2083(is)s 2292(insigni\207cant.\))s 220 fnt2 3721 7728(@ChapterTitle)m 240 fnt1 5188 7731(and)m 220 fnt2 5591 7728(@ChapterNum)m 240 fnt1 7102 7731(are)m 7448(tri)s 6(vial)k 8065(de\207nitions)s 0 7443(which)m 642(v)s 6(ary)k 1115(depending)s 2166(on)s 2463(whether)s 3293(the)s 3641(user)s 4099(has)s 4469(requested)s 5443(numbered)s 6458(chapters)s 7305(or)s 7564(not.)s 480 7069(Each)m 1014(in)s 9(v)k 4(ocation)k 2066(of)s 220 fnt2 2336 7066(@Chapter)m 240 fnt1 3397 7069(has)m 3766(its)s 4040(o)s 6(wn)k 4503(unique)s 220 fnt2 5209 7066(@T)m 26(ag)k 240 fnt1 5772 7069(,)m 5878(either)s 6479(supplied)s 7347(by)s 7639(the)s 7986(user)s 8442(or)s 8699(else)s 0 6781(inserted)m 835(automatically)s 2210(by)s 2525(Lout.)s 3162(W)s 19(e)k 3553(no)s 6(w)k 4035(trace)s 4575(the)s 4944(cross)s 5507(referencing)s 6669(of)s 6961(chapter)s 7745(numbers)s 8641(on)s 8960(a)s 0 6493(h)m 1(ypothetical)k 1236(third)s 1745(chapter)s 2508(whose)s 3176(tag)s 3521(is)s 220 fnt2 3731 6490(euclid)m 240 fnt1 4291 6493(.)m 220 fnt2 480 6116(@ChapterList&&preceding @T)m 26(agged euclid)k 240 fnt1 4758 6119(attaches)m 220 fnt2 5573 6116(euclid)m 240 fnt1 6188 6119(as)m 6434(an)s 6712(e)s 3(xtra)k 7241(tag)s 7582(to)s 7816(the)s 8159(\207rst)s 8585(in)s 9(v)k 4(o-)k 0 5831(cation)m 653(of)s 220 fnt2 937 5828(@ChapterList)m 240 fnt1 2350 5831(preceding)m 3359(itself)s 3920(in)s 4176(the)s 4536(\207nal)s 5029(printed)s 5777(document.)s 6898(But)s 7317(this)s 220 fnt2 7726 5828(@ChapterList)m 240 fnt1 0 5543(must)m 525(be)s 807(the)s 1155(tar)s 4(get)k 1754(of)s 2025(the)s 2373(chapter)s 9(,)k 3174(and)s 3578(so)s 220 fnt2 480 5042(@ChapterList&&euclid @Open { @T)m 26(ag })k 240 fnt1 0 4543(is)m 200(3,)s 416(the)s 754(number)s 1534(of)s 1795(the)s 2132(chapter)s 2885(\()s 220 fnt2 2958 4540(@T)m 26(ag)k 240 fnt1 3570 4543(refers)m 4153(to)s 4381(the)s 4719(parameter)s 5722(of)s 220 fnt2 5983 4540(@ChapterList)m 240 fnt1 7323 4543(,)m 7419(not)s 7775(the)s 8112(parameter)s 0 4255(of)m 220 fnt2 272 4252(@Chapter)m 240 fnt1 1275 4255(\).)m 1520(Consequently)s 2892(the)s 3242(in)s 9(v)k 4(ocation)k 4297(of)s 220 fnt2 4570 4252(@NumberMar)m -3(k)k 4(er)k 240 fnt1 6317 4255(within)m 6986(the)s 7336(chapter)s 8100(is)s 8312(equal)s 8887(to)s 220 fnt2 0 3964(@NumberMar)m -3(k)k 4(er 3)k 240 fnt1 1861 3967(.)m 220 fnt2 480 3590(@NumberMar)m -3(k)k 4(er&&preceding @T)k 26(agged euclid)k 240 fnt1 5137 3593(attaches)m 220 fnt2 5992 3590(euclid)m 240 fnt1 6646 3593(to)m 220 fnt2 6920 3590(@NumberMar)m -3(k)k 4(er 3)k 240 fnt1 8876 3593(as)m 0 3305(an)m 283(e)s 3(xtra)k 817(tag,)s 1216(and)s 1620(so)s 220 fnt2 1886 3302(@NumberOf euclid)m 240 fnt1 3742 3305(,)m 3849(which)s 4491(e)s 3(xpands)k 5324(to)s 220 fnt2 480 2804(@NumberMar)m -3(k)k 4(er&&euclid @Open { @T)k 26(ag })k 240 fnt1 0 2305(must)m 538(be)s 833(equal)s 1419(to)s 1671(3,)s 1911(as)s 2175(required.)s 3148(This)s 3637(scheme)s 4423(could)s 5026(be)s 5322(simpli\207ed)s 6349(by)s 6656(placing)s 7426(the)s 7787(in)s 9(v)k 4(ocation)k 8855(of)s 220 fnt2 0 2014(@NumberMar)m -3(k)k 4(er)k 240 fnt1 1758 2017(within)m 220 fnt2 2440 2014(@ChapterList)m 240 fnt1 3854 2017(rather)m 4484(than)s 4966(within)s 220 fnt2 5648 2014(@Chapter)m 240 fnt1 6651 2017(,)m 6772(b)s 4(ut)k 7148(it)s 7353(turns)s 7896(out)s 8276(that)s 8708(that)s 0 1729(scheme)m 773(does)s 1263(not)s 1629(generalize)s 2666(well)s 3132(to)s 3371(sections)s 4192(and)s 4596(subsections.)s 480 1355(There)m 1124(is)s 1365(a)s 1562(trap)s 2017(for)s 2386(the)s 2765(unw)s 2(ary)k 3566(in)s 3840(the)s 4219(use)s 4625(of)s 220 fnt2 4927 1352(preceding)m 240 fnt1 5969 1355(and)m 220 fnt2 6404 1352(f)m 6(ollo)k 3(wing)k 240 fnt1 7234 1355(.)m 7429(Suppose)s 8328(that)s 8778(the)s 0 1067(in)m 9(v)k 4(ocation)k 1054(of)s 220 fnt2 1325 1064(@NumberMar)m -3(k)k 4(er)k 240 fnt1 3070 1067(within)m 220 fnt2 3738 1064(@Chapter)m 240 fnt1 4801 1067(is)m 5011(replaced)s 5878(by)s 6172(the)s 6520(seemingly)s 7557(equi)s 6(v)k 6(alent)k 220 fnt2 480 566(@NumberMar)m -3(k)k 4(er { @ChapterList&&preceding @Open { @T)k 26(ag } })k 240 fnt1 0 67(No)m 6(w)k 514(suppose)s 1342(that)s 220 fnt2 1760 64(@NumberOf euclid)m 240 fnt1 3676 67(appears)m 4457(some)s 6(where)k 5596(within)s 6264(Chapter)s 7081(7.)s 7365(It)s 7570(will)s 7996(e)s 3(xpand)k 8743(to)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 95 101 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.4.)m 1871(Chapter)s 2(s)k 2802(and)s 3228(sections)s 240 fnt5 10250 -1583(95)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13207(@NumberMar)m -3(k)k 4(er&&euclid @Open { @T)k 26(ag })k 240 fnt1 0 12708(which)m 642(w)s 2(ould)k 1297(no)s 6(w)k 1758(be)s 2040(equal)s 2613(to)s 220 fnt2 480 12207(@ChapterList&&preceding @Open { @T)m 26(ag })k 240 fnt1 0 11708(whose)m 663(v)s 6(alue,)k 1276(e)s 6(v)k 6(aluated)k 2233(as)s 2477(it)s 2663(is)s 2868(within)s 3530(Chapter)s 4342(7,)s 4563(is)s 4767(7,)s 4989(not)s 5349(3.)s 5628(Use)s 6050(of)s 220 fnt2 6315 11705(preceding)m 240 fnt1 7321 11708(or)m 220 fnt2 7574 11705(f)m 6(ollo)k 3(wing)k 240 fnt1 8458 11708(within)m 0 11420(the)m 348(parameter)s 1362(of)s 1633(a)s 1799(symbol,)s 2611(rather)s 3227(than)s 3696(within)s 4364(the)s 4712(body)s 15(,)k 5284(is)s 5494(lik)s 2(ely)k 6090(to)s 6329(be)s 6611(erroneous.)s 480 11046(Much)m 1112(of)s 1400(the)s 1765(remainder)s 2810(of)s 3098(the)s 3463(de\207nition)s 4454(of)s 220 fnt2 4742 11043(@Chapter)m 240 fnt1 5822 11046(is)m 6049(f)s 2(airly)k 6634(self-e)s 3(xplanatory:)k 8366(there)s 8916(is)s 0 10758(a)m 180(heading,)s 1060(a)s 1241(tag)s 1601(sent)s 2060(to)s 2314(mark)s 2881(the)s 3244(page)s 3766(on)s 4078(which)s 4735(the)s 5098(chapter)s 5875(be)s 3(gins,)k 6619(a)s 220 fnt2 6800 10755(@ContentsEntr)m -6(y)k 240 fnt1 8492 10758(g)m 1(alle)k 3(y)k 0 10470(sent)m 484(to)s 762(the)s 1149(table)s 1708(of)s 2018(contents,)s 2961(g)s 1(alle)k 3(ys)k 3724(for)s 4101(the)s 4489(\207gures)s 5230(and)s 5673(tables)s 6320(of)s 6630(the)s 7017(chapter)s 7819(to)s 8097(collect)s 8833(in,)s 220 fnt2 0 10179(@Body)m 240 fnt1 781 10182(where)m 1421(the)s 1769(body)s 2303(of)s 2574(the)s 2922(chapter)s 3685(goes,)s 4230(and)s 220 fnt2 4634 10179(@ChapRefSection)m 240 fnt1 6499 10182(to)m 6738(hold)s 7222(a)s 7388(concluding)s 8505(list)s 8855(of)s 0 9894(references.)m 1144(This)s 1620(lea)s 4(v)k 3(es)k 2261(only)s 2741(the)s 3089(tw)s 2(o)k 3499(in)s 9(v)k 4(ocations)k 4640(of)s 220 fnt2 4911 9891(@Runner)m 240 fnt1 5913 9894(to)m 6152(e)s 3(xplain.)k 480 9520(The)m 977(\207rst)s 220 fnt2 1477 9517(@Runner)m 240 fnt1 2548 9520(is)m 2828(just)s 3302(belo)s 6(w)k 4004(the)s 4421(heading.)s 5413(It)s 5687(will)s 6182(be)s 6533(the)s 6951(tar)s 4(get)k 7619(of)s 7959(the)s 220 fnt2 8377 9517(@Run-)m 0 9229(ner&&f)m 6(ollo)k 3(wing)k 240 fnt1 1494 9232(cross)m 2030(reference)s 2967(at)s 3194(the)s 3536(be)s 3(ginning)k 4538(of)s 4803(the)s 5146(\207rst)s 5571(page)s 6073(of)s 6338(the)s 6681(chapter)s 7438(\(see)s 7872(Section)s 8640(4.3\),)s 0 8944(which)m 642(consequently)s 1959(will)s 2385(ha)s 4(v)k 3(e)k 2886(null)s 3313(running)s 4111(headers)s 4892(and)s 5296(the)s 5644(gi)s 6(v)k 3(en)k 6224(footers.)s 480 8570(The)m 954(second)s 220 fnt2 1724 8567(@Runner)m 240 fnt1 2772 8570(appears)m 3600(at)s 3878(the)s 4273(v)s 3(ery)k 4795(end)s 5246(of)s 5563(the)s 5958(chapter)s 9(,)k 6805(hence)s 7466(on)s 7809(its)s 8132(last)s 8570(page.)s 0 8282(Since)m 595(no)s 896(in)s 9(v)k 4(ocations)k 2046(of)s 220 fnt2 2325 8279(@Runner)m 240 fnt1 3335 8282(lie)m 3638(between)s 4500(it)s 4700(and)s 5113(the)s 5469(\207rst)s 220 fnt2 5908 8279(@Runner)m 240 fnt1 6850 8282(,)m 6966(it)s 7166(will)s 7600(be)s 7891(the)s 8247(tar)s 4(get)k 8855(of)s 220 fnt2 0 7991(@Runner&&f)m 6(ollo)k 3(wing)k 240 fnt1 2134 7994(on)m 2442(e)s 6(v)k 3(ery)k 3029(page)s 3547(from)s 4082(the)s 4441(second)s 5175(page)s 5693(of)s 5975(the)s 6334(chapter)s 7107(to)s 7357(the)s 7716(last,)s 8165(inclusi)s 6(v)k 3(e,)k 0 7706(and)m 404(will)s 830(supply)s 1523(the)s 1871(format)s 2567(of)s 2838(their)s 3335(headers)s 4116(and)s 4520(footers.)s 480 7332(The)m 908(interested)s 1893(reader)s 2549(might)s 3166(care)s 3618(to)s 3857(predict)s 4579(the)s 4927(outcome)s 5806(in)s 6048(unusual)s 6848(cases,)s 7458(such)s 7954(as)s 8203(when)s 8778(the)s 0 7044(heading)m 811(occupies)s 1699(tw)s 2(o)k 2109(pages,)s 2761(or)s 3020(when)s 3596(a)s 3762(chapter)s 4524(occupies)s 5412(only)s 5892(one,)s 6345(or)s 6604(\(assuming)s 7640(a)s 7806(change)s 8540(to)s 8778(the)s 0 6756(g)m 1(ap)k 386(between)s 1227(chapters\))s 2138(when)s 2702(a)s 2855(chapter)s 3605(starts)s 4146(halfw)s 2(ay)k 4956(do)s 6(wn)k 5527(a)s 5680(page.)s 6283(Such)s 6807(predictions)s 7907(can)s 8283(be)s 8552(made)s 0 6468(with)m 482(great)s 1019(con\207dence.)s 480 6094(The)m 903(e)s 3(xpression)k 220 fnt2 1975 6091(@RunningTitle @OrElse @Title)m 240 fnt1 5125 6094(appearing)m 6116(in)s 6354(the)s 6697(second)s 220 fnt2 7415 6091(@Runner)m 240 fnt1 8412 6094(returns)m 0 5806(the)m 354(v)s 6(alue)k 928(of)s 1205(the)s 220 fnt2 1560 5803(@RunningTitle)m 240 fnt1 3070 5806(parameter)m 4090(of)s 220 fnt2 4368 5803(@Chapter)m 240 fnt1 5437 5806(if)m 5660(this)s 6063(is)s 6279(not)s 6651(equal)s 7231(to)s 7476(the)s 7830(def)s 2(ault)k 8558(v)s 6(alue)k 220 fnt2 0 5515(dft)m 240 fnt1 240 5518(,)m 347(or)s 220 fnt2 606 5515(@Title)m 240 fnt1 1294 5518(otherwise:)m [ /Dest /LOUT19_4605_exa_chap_5 /DEST pdfmark 220 fnt2 480 5036(def @OrElse)m 480 4748( left x)m 480 4460( r)m -3(ight y)k 480 4172({)m 480 3884( x @Case {)m 480 3596( dft @Y)m 4(ield y)k 480 3308( else @Y)m 4(ield x)k 480 3020( })m 480 2732(})m 240 fnt1 0 2238(This)m 476(produces)s 1391(the)s 1739(ef)s 6(fect)k 2335(of)s 220 fnt2 480 1737(named @RunningTitle { @Title })m 240 fnt1 0 1238(which)m 676(unfortunately)s 2052(is)s 2296(not)s 2696(permissible)s 3887(as)s 4171(it)s 4397(stands,)s 5136(because)s 220 fnt2 5983 1235(@Title)m 240 fnt1 6705 1238(is)m 6949(not)s 7349(visible)s 8076(within)s 8778(the)s 0 950(def)m 2(ault)k 721(v)s 6(alue)k 1289(of)s 220 fnt2 1560 947(@RunningTitle)m 240 fnt1 3004 950(.)m 480 576(Finally)m 15(,)k 1249(the)s 1597(de\207nitions)s 2658(for)s 2996(sections)s 3817(omitted)s 4605(earlier)s 5273(are)s 5620(as)s 5870(follo)s 6(ws:)k [ /Dest /LOUT19_4605_exa_chap_6 /DEST pdfmark 220 fnt2 480 75(def @EndSectionsPlace { @Galle)m 4(y })k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 96 102 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(96)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207(def @EndSections f)m 6(orce into { @EndSectionsPlace&&preceding } {})k 480 12919(macro @BeginSections { //@SectionGap @SectionList 1 // @EndSectionsPlace // })m [ /Dest /LOUT16_1731_exa_chap_4 /DEST pdfmark 480 12422(def @Section f)m 6(orce into { @SectionList&&preceding })k 480 12134( named @T)m 26(ag {})k 480 11846( named @Title {})m 480 11558( named @RunningTitle { dft })m 480 11270( body @Body)m 480 10982({)m 480 10694( def @SectionTitle)m 480 10406( {)m 480 10118( @SectionNumbers @Case {)m 480 9830( {Y)m 30(es y)k 4(es} @Y)k 4(ield { {@NumberOf @T)k 26(ag}.)k 13( |2s @Title })k 480 9542( else @Y)m 4(ield @Title)k 480 9254( })m 480 8966( })m 480 8390( @Heading @Protect @SectionTitle)m 480 8102( // @NumberMar)m -3(k)k 4(er {)k 480 7814( {@ChapterList&&@T)m 26(ag @Open { @T)k 26(ag }}.{)k 480 7526( @SectionList&&@T)m 26(ag @Open { @T)k 26(ag }})k 480 7238( })m 480 6950( // @ChapterList&&preceding @T)m 26(agged @T)k 26(ag)k 480 6662( // @SectionList&&preceding @T)m 26(agged @T)k 26(ag)k 480 6374( // @NumberMar)m -3(k)k 4(er&&preceding @T)k 26(agged @T)k 26(ag)k 480 6086( // @P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged @T)k 26(ag)k 480 5798( // { &3f @SectionTitle } @ContentsEntr)m -6(y {@P)k 8(ageOf @T)k 26(ag})k 480 5510( //0io @Body)m 480 5222(})m [ /Dest /LOUT16_1731_exa_chap_5 /DEST pdfmark 240 fnt1 0 4728(The)m 220 fnt2 409 4725(@BeginSections)m 240 fnt1 2066 4728(macro)m 2696(in)s 9(v)k 4(ok)k 2(es)k 220 fnt2 3457 4725(@SectionList)m 240 fnt1 4748 4728(,)m 4835(preceded)s 5736(by)s 6010(the)s 6338(appropriate)s 7462(g)s 1(ap)k 7840(and)s 8224(follo)s 6(wed)k 0 4440(by)m 284(an)s 220 fnt2 556 4437(@EndSectsPlace)m 240 fnt1 2307 4440(for)m 2635(closing)s 3368(the)s 3705(list)s 4045(of)s 4306(sections)s 5116(when)s 5681(the)s 220 fnt2 6019 4437(@EndSections)m 240 fnt1 7515 4440(symbol)m 8264(is)s 8463(found.)s 220 fnt2 0 4149(@Section)m 240 fnt1 997 4152(itself)m 1542(is)s 1749(just)s 2151(a)s 2314(cop)s 2(y)k 2829(of)s 220 fnt2 3097 4149(@Chapter)m 240 fnt1 4156 4152(with)m 4635(slight)s 5223(changes)s 6042(to)s 6278(the)s 6623(format.)s 7420(The)s 7845(parameter)s 8855(of)s 220 fnt2 0 3861(@NumberMar)m -3(k)k 4(er)k 240 fnt1 1752 3864(is)m 1970(a)s 2143(simple)s 2844(generalization)s 4262(of)s 4540(the)s 4896(one)s 5305(within)s 220 fnt2 5981 3861(@Chapter)m 240 fnt1 6984 3864(.)m 7156(Notice)s 7856(that)s 8282(we)s 8625(ha)s 4(v)k 3(e)k 0 3576(tak)m 2(en)k 573(care)s 1026(that)s 1444(the)s 1792(v)s 6(alue)k 2360(of)s 2631(this)s 3027(parameter)s 4041(be)s 4323(a)s 4489(juxtaposition)s 5795(of)s 6066(simple)s 6759(w)s 2(ords:)k 7508(although)s 220 fnt2 480 3075({@ChapterList&&@T)m 26(ag @Open { @T)k 26(ag }}.)k 13( &)k 480 2787({@SectionList&&@T)m 26(ag @Open { @T)k 26(ag }})k 240 fnt1 0 2288(is)m 210(formally)s 1086(equi)s 6(v)k 6(alent,)k 220 fnt2 2177 2285(&)m 240 fnt1 2379 2288(w)m 2(as)k 2800(not)s 3166(permitted)s 4139(within)s 4807(a)s 220 fnt2 4973 2285(@T)m 26(ag)k 240 fnt1 5596 2288(parameter)m 6610(until)s 7103(recently)s 15(.)k 480 1914(The)m 930(DocumentSetup)s 2548(package)s 3411(also)s 3872(contains)s 4743(de\207nitions)s 5826(for)s 6187(subsections)s 7364(in)s 7630(the)s 8001(same)s 8571(style.)s 0 1626(The)m 3(y)k 564(raise)s 1091(the)s 1461(question)s 2350(of)s 2643(whether)s 3494(Lout)s 4028(is)s 4259(capable)s 5066(of)s 5359(producing)s 6404(subsections)s 7580(should)s 8298(the)s 8668(user)s 0 1338(place)m 220 fnt2 542 1335(@BeginSections)m 240 fnt1 2159 1338(,)m 220 fnt2 2248 1335(@Section)m 240 fnt1 3188 1338(,)m 3276(and)s 220 fnt2 3662 1335(@EndSections)m 240 fnt1 5151 1338(within)m 5800(a)s 240 fnt6 5948 1340(section)m 240 fnt1 6619 1338(,)m 6708(and)s 7093(whether)s 7905(such)s 8382(nesting)s 0 1050(could)m 592(proceed)s 1409(to)s 1650(arbitrary)s 2527(depth.)s 3225(Arbitrary)s 4169(nesting)s 4915(of)s 5188(sections)s 6011(within)s 6681(sections)s 7504(is)s 7716(a)s 4(v)k 6(ailable)k 8627(no)s 6(w)k 15(,)k 0 762(although)m 883(the)s 1218(numbering)s 2295(w)s 2(ould)k 2937(of)s 3195(course)s 3862(be)s 4131(wrong.)s 4894(The)s 5309(author)s 5967(has)s 6324(w)s 2(ork)k 2(ed)k 7083(out)s 7436(de\207nitions)s 8484(which)s 0 474(pro)m 3(vide)k 773(correct)s 1484(numbering)s 2563(to)s 2790(arbitrary)s 3654(depth,)s 4282(with)s 4752(an)s 5024(arbitrary)s 5888(format)s 6573(for)s 6899(each)s 7383(le)s 6(v)k 3(el.)k 7991(These)s 8606(were)s 0 186(not)m 376(incorporated)s 1652(into)s 2087(DocumentSetup)s 3693(because)s 4516(the)s 4874(author)s 5555(considers)s 6520(sub-)s 6921(subsections)s 8085(to)s 8334(be)s 8627(poor)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 97 103 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.4.)m 1871(Chapter)s 2(s)k 2802(and)s 3228(sections)s 240 fnt5 10248 -1583(97)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13205(style,)m 558(and)s 962(he)s 1244(prefers)s 1957(separate)s 2795(names)s 3457(for)s 3795(the)s 4143(symbols)s 4992(at)s 5224(each)s 5719(le)s 6(v)k 3(el.)k 240 fnt5 0 12412(4.5.)m 471(Bibliographies)s [ /Dest /LOUTbiblio /DEST pdfmark [ /Dest /LOUT19_4605_exa_bibl_1 /DEST pdfmark 240 fnt1 533 11935(The)m 953(\207rst)s 1376(step)s 1806(in)s 2041(the)s 2382(production)s 3468(of)s 3731(a)s 3889(bibliograph)s 1(y)k 5157(is)s 5359(to)s 5591(create)s 6208(a)s 6366(database)s 7237(of)s 7500(references)s 8523(based)s 0 11647(on)m 297(the)s 645(de\207nition)s [ /Dest /LOUT19_4605_exa_bibl_2 /DEST pdfmark 220 fnt2 480 11196(e)m 6(xpor)k -8(t @T)k 26(ype @A)k 6(uthor @Title @Institution @Number @Pub)k 4(lisher)k 480 10908( @Y)m 30(ear @Proceedings @Jour)k -5(nal @V)k 17(olume @P)k 8(ages @Comment)k 480 10332(def @Ref)m 6(erence)k 480 10044( named @T)m 26(ag)k 3270({ )s 11(T)k 26(A)k 6(G? })k 480 9756( named @T)m 26(ype)k 3270({ )s 11(TYPE? })k 480 9468( named @A)m 6(uthor)k 3270({ A)s 11(UTHOR? })k 480 9180( named @Title)m 3270({ )s 11(TITLE? })k 480 8892( named @Institution)m 3270({ INSTITUTION? })s 480 8604( named @Number)m 3270({ NUMBER? })s 480 8316( named @Pub)m 4(lisher)k 3270({ PUBLISHER? })s 480 8028( named @Y)m 30(ear)k 3270({ )s 19(YEAR? })k 480 7740( named @Proceedings)m 3270({ PR)s 4(OCEEDINGS? })k 480 7452( named @Jour)m -5(nal)k 3270({ JOURNAL? })s 480 7164( named @V)m 17(olume)k 3270({ )s 11(V)k 8(OLUME? })k 480 6876( named @P)m 8(ages)k 3270({ P)s 26(A)k 6(GES? })k 480 6588( named @Comment)m 3270({ @Null })s 480 6300({ @Null })m 240 fnt1 0 5806(F)m 3(or)k 389(e)s 3(xample,)k 1303(the)s 1651(database)s 2530(might)s 3148(contain)s 220 fnt2 480 5305({ @Ref)m 6(erence)k 480 5017( @T)m 26(ag { str)k -3(unk1979style })k 480 4729( @T)m 26(ype { Book })k 480 4441( @A)m 6(uthor { Str)k -3(unk, )k 8(William and )k 8(White)k 3(, E.)k 13( B)k 4(.)k 13( })k 480 4153( @Title { )m 11(The Elements of Style })k 480 3865( @Pub)m 4(lisher { MacMillan, third edition })k 480 3577( @Y)m 30(ear { 1979 })k 480 3289(})m [ /Dest /LOUT16_1731_exa_bibl_1 /DEST pdfmark 480 2797({ @Ref)m 6(erence)k 480 2509( @T)m 26(ag { kingston92 })k 480 2221( @T)m 26(ype { )k 11(T)k 26(echRepor)k -8(t })k 480 1933( @A)m 6(uthor { Kingston, Jeffre)k 4(y H.)k 13( })k 480 1645( @Title { Document F)m 6(or)k -5(matting with Lout \(Second Edition\) })k 480 1357( @Number { 449 })m 480 1069( @Institution { Basser Depar)m -8(tment of Computer)k 480 781(Science F09, Univ)m 5(ersity of Sydne)k 4(y 2006, A)k 6(ustr)k 2(alia })k 480 493( @Y)m 30(ear { 1992 })k 480 205(})m [ /Dest /LOUT16_1731_exa_bibl_2 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 98 104 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(98)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(Since)m 596(named)s 1301(parameters)s 2408(are)s 2764(optional,)s 3664(we)s 4008(ha)s 4(v)k 3(e)k 4519(one)s 4930(for)s 5277(e)s 6(v)k 3(ery)k 5862(concei)s 6(v)k 6(able)k 7057(type)s 7534(of)s 7814(attrib)s 4(ute,)k 8722(and)s 0 12917(simply)m 702(lea)s 4(v)k 3(e)k 1252(out)s 1614(those)s 2172(that)s 2586(do)s 2876(not)s 3238(apply)s 3821(in)s 4060(an)s 3(y)k 4454(particular)s 5424(reference.)s 6472(W)s 19(e)k 6837(can)s 7223(print)s 7730(a)s 7893(reference)s 8832(by)s 0 12629(using)m 572(the)s 220 fnt2 920 12626(@Open)m 240 fnt1 1726 12629(symbol)m 2486(to)s 2725(get)s 3077(at)s 3309(its)s 3585(attrib)s 4(utes:)k 220 fnt2 480 12128(@Ref)m 6(erence&&str)k -3(unk1979style @Open)k 480 11840({ @A)m 6(uthor)k 11(, {Slope @F)k 6(ont @Title}.)k 13( @Pub)k 4(lisher)k 11(, @Y)k 30(ear)k 11(.)k 13( })k 240 fnt1 0 11344(The)m 428(right)s 939(parameter)s 1953(of)s 220 fnt2 2224 11341(@Open)m 240 fnt1 3030 11344(may)m 3496(use)s 3871(the)s 4219(e)s 3(xported)k 5111(parameters)s 6209(of)s 6480(the)s 6828(left,)s 7252(and)s 7656(so)s 7922(the)s 8270(result)s 8860(is)s 480 10839(W)m 9(illiam)k 1313(Strunk)s 2012(and)s 2416(E.)s 2666(B.)s 2930(White,)s 240 fnt6 3681 10841(The)m 4093(Elements)s 5024(of)s 5305(Style)s 240 fnt1 5762 10839(.)m 5926(Macmillan,)s 7068(1979.)s 0 10340(Incidentally)m 15(,)k 1235(we)s 1573(are)s 1923(not)s 2292(limited)s 3029(to)s 3271(just)s 3679(one)s 4084(database)s 4966(of)s 5240(references;)s 6335(se)s 6(v)k 3(eral)k 220 fnt2 7060 10337(@Database)m 240 fnt1 8277 10340(symbols)m 0 10052(can)m 380(nominate)s 1317(the)s 1656(same)s 2193(symbol,)s 2996(and)s 3391(in)s 9(v)k 4(ocations)k 4523(of)s 4784(that)s 5193(symbol)s 5944(can)s 6324(appear)s 7011(in)s 7245(the)s 7584(document)s 8578(itself)s 0 9764(as)m 250(well)s 716(if)s 933(we)s 1268(wish.)s 480 9390(The)m 930(second)s 1675(step)s 2135(is)s 2368(to)s 2629(create)s 3276(a)s 3464(database)s 4366(of)s 4659(print)s 5192(styles)s 5809(for)s 6170(the)s 6540(v)s 6(arious)k 7311(types)s 7889(of)s 8183(reference)s 0 9102(\(Book,)m 706(T)s 16(echReport,)k 1926(etc.\),)s 2450(based)s 3053(on)s 3350(the)s 3698(follo)s 6(wing)k 4675(de\207nition:)s 220 fnt2 480 8601(e)m 6(xpor)k -8(t @Style)k 480 8313(def @RefStyle)m 480 8025( left @T)m 26(ag)k 480 7737( named @Style r)m -3(ight reftag {})k 480 7449({})m 240 fnt1 0 6955(Notice)m 682(that)s 1089(the)s 1426(named)s 2111(parameter)s 220 fnt2 3114 6952(@Style)m 240 fnt1 3865 6955(has)m 4224(a)s 4379(right)s 4879(parameter)s 220 fnt2 5882 6952(reftag)m 240 fnt1 6431 6955(.)m 6584(The)s 7001(style)s 7497(database)s 8365(has)s 8724(one)s 0 6667(entry)m 545(for)s 883(each)s 1378(type)s 1846(of)s 2117(reference:)s 220 fnt2 480 6166({ Book @RefStyle @Style)m 480 5878( { @Ref)m 6(erence&&reftag @Open)k 480 5590( { @A)m 6(uthor)k 11(, {Slope @F)k 6(ont @Title}.)k 13( @Pub)k 4(lisher)k 11(, @Y)k 30(ear)k 11(.)k 13( @Comment })k 480 5302( })m 480 5014(})m 480 4438({ )m 11(T)k 26(echRepor)k -8(t @RefStyle @Style)k 480 4150( { @Ref)m 6(erence&&reftag @Open)k 480 3862( { @A)m 6(uthor)k 11(, {Slope @F)k 6(ont @Title}.)k 13( )k 11(T)k 26(ech.)k 13( Rep)k 7(.)k 13( @Number \(@Y)k 30(ear\),)k 480 3574(@Institution.)m 13( @Comment })k 480 3286( })m 480 2998(})m 240 fnt1 0 2504(and)m 404(so)s 670(on.)s 1074(The)s 1502(follo)s 6(wing)k 2479(prints)s 3074(the)s 3422(reference)s 4365(whose)s 5033(tag)s 5378(is)s 220 fnt2 5588 2501(str)m -3(unk1979style)k 240 fnt1 7180 2504(in)m 7423(the)s 7771(Book)s 8352(style:)s 220 fnt2 480 2003(@RefStyle&&Book @Open { @Style str)m -3(unk1979style })k 240 fnt1 0 1505(It)m 205(has)s 575(result)s 480 1050(W)m 9(illiam)k 1313(Strunk)s 2012(and)s 2416(E.)s 2666(B.)s 2930(White.)s 240 fnt6 3678 1052(The)m 4090(Elements)s 5021(of)s 5302(Style)s 240 fnt1 5759 1050(.)m 5923(Macmillan)s 6955(.)s 7119(Third)s 7708(Edition)s 8409(,)s 8516(1979)s 8987(.)s 0 551(Notice)m 696(ho)s 6(w)k 1160(the)s 220 fnt2 1512 548(@Style)m 240 fnt1 2277 551(parameter)m 3295(of)s 220 fnt2 3569 548(@RefStyle)m 240 fnt1 4675 551(is)m 4889(gi)s 6(v)k 3(en)k 5472(the)s 5824(parameter)s 220 fnt2 6841 548(str)m -3(unk1979style)k 240 fnt1 8373 551(,)m 8484(which)s 0 263(it)m 192(uses)s 655(to)s 894(open)s 1417(the)s 1765(appropriate)s 2909(reference.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 99 105 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.5.)m 1871(Biblio)s 2(gr)k 3(aphies)k 240 fnt5 10249 -1583(99)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 13205(W)m 19(e)k 858(can)s 1256(consult)s 2017(the)s 220 fnt2 2374 13202(@T)m 26(ype)k 240 fnt1 3121 13205(attrib)m 4(ute)k 3977(of)s 4258(a)s 4433(reference)s 5386(to)s 5634(\207nd)s 6075(out)s 6450(its)s 6736(style,)s 7303(which)s 7955(brings)s 8613(us)s 8887(to)s 0 12917(the)m 348(follo)s 6(wing)k 1325(de\207nition)s 2299(for)s 2637(printing)s 3447(out)s 3813(a)s 3979(reference)s 4922(in)s 5165(the)s 5513(style)s 6020(appropriate)s 7164(to)s 7403(it:)s 220 fnt2 480 12416(def @RefPr)m -3(int)k 480 12128( r)m -3(ight reftag)k 480 11840({ @RefStyle&&{ @Ref)m 6(erence&&reftag @Open { @T)k 26(ype } })k 480 11552( @Open { @Style reftag })m 480 11264(})m 240 fnt1 0 10770(F)m 3(or)k 389(e)s 3(xample,)k 1303(to)s 1542(e)s 6(v)k 6(aluate)k 220 fnt2 2382 10767(@RefPr)m -3(int str)k -3(unk1979style)k 240 fnt1 4992 10770(,)m 5099(Lout)s 5611(\207rst)s 6042(e)s 6(v)k 6(aluates)k 220 fnt2 480 10269(@Ref)m 6(erence&&str)k -3(unk1979style @Open { @T)k 26(ype })k 240 fnt1 0 9771(whose)m 668(result)s 1258(is)s 220 fnt2 1468 9768(Book)m 240 fnt1 1968 9771(,)m 2075(and)s 2479(then)s 2948(e)s 6(v)k 6(aluates)k 220 fnt2 480 9289(@RefStyle&&Book @Open { @Style str)m -3(unk1979style })k 240 fnt1 0 8791(as)m 266(before.)s 1056(Complicated)s 2353(as)s 2619(this)s 3032(is,)s 3314(with)s 3813(its)s 4105(tw)s 2(o)k 4531(databases)s 5515(and)s 5935(cle)s 6(v)k 3(er)k 6586(passing)s 7373(about)s 7982(of)s 8269(tags,)s 8778(the)s 0 8503(adv)m 6(antages)k 1098(of)s 1359(separating)s 2384(references)s 3405(from)s 3919(printing)s 4718(styles)s 5303(are)s 5640(considerable:)s 7004(printing)s 7804(styles)s 8389(may)s 8844(be)s 0 8215(changed)m 856(easily)s 15(,)k 1505(and)s 1909(non-e)s 3(xpert)k 3002(users)s 3544(need)s 4054(ne)s 6(v)k 3(er)k 4636(see)s 4997(them.)s 480 7841(Finally)m 15(,)k 1243(we)s 1571(come)s 2138(to)s 2370(the)s 2711(problem)s 3561(of)s 3825(printing)s 4628(out)s 4987(a)s 5146(numbered)s 6154(list)s 6498(of)s 6762(references,)s 7842(and)s 8239(referring)s 0 7553(to)m 251(them)s 802(by)s 1108(number)s 1912(in)s 2167(the)s 2528(body)s 3074(of)s 3358(the)s 3718(document.)s 4839(The)s 5279(\207rst)s 5723(step)s 6173(is)s 6396(to)s 6647(create)s 7285(a)s 7463(numbered)s 8491(list)s 8855(of)s 0 7265(places)m 648(that)s 1066(g)s 1(alle)k 3(ys)k 1790(containing)s 2853(references)s 3884(may)s 4350(attach)s 4977(to:)s [ /Dest /LOUT19_4605_exa_bibl_3 /DEST pdfmark 220 fnt2 480 6764(def @Ref)m 6(erenceSection)k 480 6476( named @T)m 26(ag {})k 480 6188( named @Title { Ref)m 6(erences })k 480 5900( named @RunningTitle { dft })m 480 5612( named style r)m -3(ight tag { tag.)k 13( })k 480 5324( named headstyle r)m -3(ight @Title { @Heading @Title })k 480 5036( named indent { @DispIndent })m 480 4748( named gap { @DispGap })m 480 4460( named star)m -8(t { 1 })k 480 4172({)m 480 3884( def @RefList r)m -3(ight n)k 2(um)k 480 3596( {)m 480 3308( @NumberMar)m -3(k)k 4(er n)k 2(um & indent @Wide {style n)k 2(um} | @RefPlace)k 480 3020( //gap @RefList @Ne)m 6(xt n)k 2(um)k 480 2732( })m 480 2156( @Protect headstyle @Title)m 480 1868( // @P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged @T)k 26(ag)k 480 1580( // @Title @MajorContentsEntr)m -6(y {@P)k 8(ageOf @T)k 26(ag})k 480 1292( // @Runner)m 480 1004( @F)m 6(ootEv)k 5(en { |0.5r)k -8(t 0.8f @F)k 6(ont @B @P)k 8(ageNum })k 480 716( @F)m 6(ootOdd { |0.5r)k -8(t 0.8f @F)k 6(ont @B @P)k 8(ageNum })k 480 428( //@DispGap @RefList star)m -8(t)k 480 140( // @Runner)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 100 106 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(100)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13264 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 480 13207( @T)m 26(opEv)k 5(en { @B @P)k 8(ageNum })k 480 12919( @T)m 26(opOdd { @I {@RunningTitle @OrElse @Title} |1r)k -8(t @B @P)k 8(ageNum })k 480 12631(})m 240 fnt1 0 12137(W)m 19(e)k 378(place)s 948(the)s 1305(e)s 3(xpression)k 220 fnt2 2392 12134(@Ref)m 6(erenceSection)k 240 fnt1 4408 12137(at)m 4649(the)s 5007(point)s 5569(where)s 6218(we)s 6563(w)s 2(ant)k 7096(the)s 7453(list)s 7814(of)s 8095(references)s 0 11849(to)m 239(appear;)s 988(its)s 1264(v)s 6(alue)k 1832(is)s 2042(something)s 3092(lik)s 2(e)k 220 fnt2 480 11348(1.)m 13( @RefPlace)k 480 11060(2.)m 13( @RefPlace)k 480 10772(3.)m 13( @RefPlace)k 480 10484(...)m 240 fnt1 0 10033(where)m 220 fnt2 648 10030(@RefPlace)m 240 fnt1 1820 10033(is)m 220 fnt2 2038 10030(@Galle)m 4(y)k 240 fnt1 2945 10033(as)m 3203(usual.)s 3880(W)s 19(e)k 4258(can)s 4655(scatter)s 5345(multiple)s 6205(lists)s 6649(of)s 6928(references)s 7967(through)s 8778(the)s 0 9745(document)m 1004(if)s 1220(we)s 1555(wish)s 2063(\(at)s 2373(the)s 2721(end)s 3124(of)s 3395(each)s 3889(chapter)s 9(,)k 4689(for)s 5027(e)s 3(xample\),)k 6019(simply)s 6724(by)s 7017(placing)s 220 fnt2 7773 9742(@Ref)m 6(erence-)k 0 9454(Section)m 240 fnt1 777 9457(at)m 1009(each)s 1504(point.)s 480 9083(Our)m 912(task)s 1358(is)s 1568(completed)s 2622(by)s 2916(the)s 3264(follo)s 6(wing)k 4241(de\207nition:)s [ /Dest /LOUT19_4605_exa_bibl_4 /DEST pdfmark 220 fnt2 480 8582(def @Ref r)m -3(ight x)k 480 8294({)m 480 8006( def sendref into { @RefPlace&&f)m 6(ollo)k 3(wing })k 480 7718( r)m -3(ight @K)k 8(e)k 4(y)k 480 7430( {)m 480 7142( @NumberMar)m -3(k)k 4(er&&preceding @T)k 26(agged x &)k 480 6854( @P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged x &)k 480 6566( @RefPr)m -3(int x)k 480 6278( })m 480 5702( @NumberMar)m -3(k)k 4(er&&x @Open { @T)k 26(ag } sendref x)k 480 5414(})m 240 fnt1 0 4920(Gi)m 6(v)k 3(en)k 633(this)s 1029(de\207nition,)s 2053(the)s 2401(in)s 9(v)k 4(ocation)k 220 fnt2 3455 4917(@Ref str)m -3(unk1979style)k 240 fnt1 5672 4920(has)m 6042(result)s 220 fnt2 480 4421(@NumberMar)m -3(k)k 4(er&&str)k -3(unk1979style @Open { @T)k 26(ag })k 240 fnt1 0 3922(plus)m 450(the)s 798(g)s 1(alle)k 3(y)k 220 fnt2 1432 3919(sendref str)m -3(unk1979style)k 240 fnt1 3757 3922(.)m 3921(W)s 19(e)k 4290(\207rst)s 4721(follo)s 6(w)k 5393(what)s 5918(happens)s 6754(to)s 6993(the)s 7341(g)s 1(alle)k 3(y)k 15(.)k 480 3548(According)m 1555(to)s 1806(its)s 220 fnt2 2094 3545(into)m 240 fnt1 2512 3548(clause,)m 3229(the)s 3589(g)s 1(alle)k 3(y)k 4235(will)s 4673(replace)s 5430(a)s 220 fnt2 5609 3545(@RefPlace)m 240 fnt1 6785 3548(in)m 7040(the)s 7400(nearest)s 8149(follo)s 6(wing)k 220 fnt2 0 3257(@Ref)m 6(erenceSection)k 240 fnt1 1946 3260(.)m 2114(If)s 2348(e)s 6(v)k 3(ery)k 2928(such)s 3428(g)s 1(alle)k 3(y)k 4066(is)s 4280(a)s 4450(sorted)s 5096(g)s 1(alle)k 3(y)k 5734(whose)s 6406(k)s 2(e)k 3(y)k 6805(is)s 7019(the)s 7371(reference')s 13(s)k 8472(tag,)s 8876(as)s 0 2972(this)m 396(one)s 798(is,)s 1064(the)s 3(y)k 1527(will)s 1953(appear)s 2650(sorted)s 3292(by)s 3586(tag.)s 4042(The)s 4470(g)s 1(alle)k 3(y')k 13(s)k 5260(object)s 5904(is)s 220 fnt2 480 2471(@NumberMar)m -3(k)k 4(er&&preceding @T)k 26(agged str)k -3(unk1979style &)k 480 2183(@P)m 8(ageMar)k -3(k)k 4(er&&preceding @T)k 26(agged str)k -3(unk1979style &)k 480 1895(@RefPr)m -3(int str)k -3(unk1979style)k 240 fnt1 0 1397(The)m 428(result)s 1017(of)s 1287(the)s 220 fnt2 1634 1394(@T)m 26(agged)k 240 fnt1 2622 1397(symbol)m 3381(is)s 3590(al)s 2(w)k 2(ays)k 220 fnt2 4300 1394(@Null)m 240 fnt1 4885 1397(,)m 4991(so)s 5256(this)s 5651(prints)s 6245(the)s 220 fnt2 6592 1394(str)m -3(unk1979style)k 240 fnt1 8183 1397(reference)m 0 1109(in)m 243(the)s 591(appropriate)s 1735(style)s 2242(at)s 2474(the)s 220 fnt2 2822 1106(@RefPlace)m 240 fnt1 3926 1109(,)m 4033(as)s 4283(desired.)s 480 735(No)m 6(w)k 220 fnt2 1044 732(@NumberMar)m -3(k)k 4(er&&preceding)k 240 fnt1 4082 735(is)m 4342(the)s 4741(nearest)s 5527(preceding)s 6573(in)s 9(v)k 4(ocation)k 7677(of)s 220 fnt2 7999 732(@Number-)m 0 444(Mar)m -3(k)k 4(er)k 240 fnt1 775 447(in)m 1051(the)s 1432(\207nal)s 1946(document.)s 3087(This)s 3596(must)s 4155(be)s 4470(the)s 4851(in)s 9(v)k 4(ocation)k 5939(of)s 220 fnt2 6243 444(@NumberMar)m -3(k)k 4(er)k 240 fnt1 8021 447(just)m 8460(before)s 0 159(the)m 220 fnt2 378 156(@RefPlace)m 240 fnt1 1572 159(that)m 2020(recei)s 6(v)k 3(ed)k 2908(the)s 3286(g)s 1(alle)k 3(y)k 15(,)k 3988(and)s 4423(so)s 4719(this)s 5145(in)s 9(v)k 4(ocation)k 6229(of)s 220 fnt2 6530 156(@NumberMar)m -3(k)k 4(er)k 240 fnt1 8305 159(is)m 8546(gi)s 6(v)k 3(en)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 101 107 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.5.)m 1871(Biblio)s 2(gr)k 3(aphies)k 240 fnt5 10136 -1583(101)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 0 13202(str)m -3(unk1979style)k 240 fnt1 1585 13205(as)m 1827(an)s 2102(additional)s 3105(tag)s 3442(by)s 3728(the)s 220 fnt2 4068 13202(@T)m 26(agged)k 240 fnt1 5050 13205(symbol.)m 5911(Its)s 6192(original)s 6982(tag)s 7319(w)s 2(as)k 7732(the)s 8072(number)s 8855(of)s 0 12917(the)m 348(reference)s 1291(place,)s 1902(which)s 2544(means)s 3206(that)s 220 fnt2 480 12416(@NumberMar)m -3(k)k 4(er&&str)k -3(unk1979style @Open { @T)k 26(ag })k 240 fnt1 0 11917(has)m 370(for)s 708(its)s 984(result)s 1574(the)s 1922(number)s 2713(of)s 2984(the)s 3332(reference)s 4275(place)s 4835(that)s 5253(recei)s 6(v)k 3(ed)k 6111(the)s 220 fnt2 6459 11914(str)m -3(unk1979style)k 240 fnt1 8051 11917(g)m 1(alle)k 3(y)k 15(,)k 8722(and)s 0 11629(this)m 396(is)s 606(the)s 954(desired)s 1702(result)s 2292(of)s 220 fnt2 2563 11626(@Ref str)m -3(unk1979style)k 240 fnt1 4720 11629(.)m 480 11255(It)m 674(might)s 1281(seem)s 1821(that)s 2228(if)s 2434(we)s 2758(refer)s 3256(to)s 3483(the)s 220 fnt2 3820 11252(str)m -3(unk1979style)k 240 fnt1 5401 11255(reference)m 6333(twice,)s 6946(tw)s 2(o)k 7345(copies)s 7996(will)s 8411(be)s 8681(sent)s 0 10967(to)m 247(the)s 603(reference)s 1554(list)s 1914(and)s 2326(it)s 2526(will)s 2961(appear)s 3666(twice.)s 4355(Ho)s 6(we)k 6(v)k 3(er)k 9(,)k 5324(when)s 5908(more)s 6463(than)s 6941(one)s 7351(sorted)s 8001(g)s 1(alle)k 3(y)k 8644(with)s 0 10679(the)m 341(same)s 881(k)s 2(e)k 3(y)k 1269(is)s 1472(sent)s 1910(to)s 2142(the)s 2483(same)s 3023(place,)s 3627(only)s 4100(one)s 4495(of)s 4759(them)s 5290(is)s 5493(printed)s 6221(\(Section)s 7067(1.4\);)s 7551(so)s 7810(pro)s 3(vided)k 8708(that)s 0 10391(sorted)m 642(g)s 1(alle)k 3(ys)k 1366(are)s 1713(used)s 2210(there)s 2743(is)s 2953(no)s 3246(problem.)s 240 fnt5 0 9598(4.6.)m 471(Mer)s 2(ged)k 1321(index)s 1936(entries)s [ /Dest /LOUTexa_inde /DEST pdfmark 240 fnt1 480 9121(Getting)m 1282(inde)s 3(x)k 1898(entries)s 2618(to)s 2889(mer)s 4(ge)k 3570(correctly)s 4505(has)s 4907(been)s 5448(quite)s 6015(a)s 6213(struggle.)s 7119(It)s 7357(is)s 7599(easy)s 8110(to)s 8382(specify)s 0 8833(what)m 549(is)s 784(w)s 2(anted,)k 1605(b)s 4(ut)k 1991(Lout)s 2528(lacks)s 3095(the)s 3468(lists)s 3927(and)s 4356(objects)s 5109(\(in)s 5456(the)s 5828(object-oriented)s 7357(sense\))s 8028(that)s 8471(w)s 2(ould)k 0 8545(mak)m 2(e)k 618(the)s 1012(implementation)s 2615(straightforw)s 2(ard.)k 4295(The)s 4770(whole)s 5457(problem)s 6360(w)s 2(as)k 6827(reanalysed)s 7953(for)s 8338(V)s 26(ersion)k 0 8257(3.26,)m 523(reimplemented,)s 2059(tested)s 2669(more)s 3212(carefully)s 4110(than)s 4574(is)s 4780(usually)s 5520(necessary)s 6499(in)s 6738(Lout,)s 7292(and)s 7692(pro)s 3(v)k 3(ed)k 8404(correct)s 0 7969(as)m 250(follo)s 6(ws.)k 480 7595(W)m 19(e)k 841(ignore)s 1500(page)s 2000(number)s 2783(ranges)s 3450(in)s 3684(this)s 4072(proof.)s 4746(It)s 4943(is)s 5145(not)s 5503(hard)s 5977(to)s 6208(sho)s 6(w)k 6754(that)s 7164(the)s 3(y)k 7619(will)s 8037(be)s 8310(handled)s 0 7307(correctly)m 910(too,)s 1332(pro)s 3(vided)k 2246(the)s 3(y)k 2718(do)s 3019(not)s 3394(o)s 3(v)k 3(erlap)k 4166(with)s 4657(other)s 5217(entries)s 5912(with)s 6403(the)s 6759(same)s 7315(k)s 2(e)k 3(y)k 15(.)k 7813(The)s 8250(ef)s 6(fect)k 8855(of)s 0 7019(such)m 496(o)s 3(v)k 3(erlaps)k 1352(is)s 1563(unde\207ned,)s 2616(lea)s 4(ving)k 3370(us)s 3635(nothing)s 4421(to)s 4661(pro)s 3(v)k 3(e.)k 5365(W)s 19(e)k 5735(also)s 6174(assume)s 6935(that)s 7354(e)s 6(v)k 3(ery)k 7931(entry)s 8477(with)s 8960(a)s 0 6731(gi)m 6(v)k 3(en)k 582(k)s 2(e)k 3(y)k 980(has)s 1352(the)s 1703(same)s 2252(label,)s 2826(including)s 3785(an)s 3(y)k 4185(format)s 4883(\(that)s 5383(is,)s 5651(the)s 6002(same)s 6551(initial)s 7165(part)s 7598(before)s 8267(the)s 8618(page)s 0 6443(number\).)m 974(If)s 1204(labels)s 1812(dif)s 6(fer)k 2395(the)s 2743(result)s 3333(is)s 3543(unde\207ned)s 4546(and)s 4950(there)s 5483(is)s 5693(nothing)s 6478(to)s 6717(pro)s 3(v)k 3(e.)k 480 6069(W)m 19(e)k 849(will)s 1275(pro)s 3(v)k 3(e)k 1870(that)s 2288(ra)s 3(w)k 2697(entries)s 3384(al)s 2(w)k 2(ays)k 4095(ha)s 4(v)k 3(e)k 4596(the)s 4944(form)s 220 fnt2 480 5570(label &0.03fu {})m 240 fnt1 0 5076(and)m 404(that)s 822(non-ra)s 3(w)k 1670(entries)s 2357(al)s 2(w)k 2(ays)k 3068(ha)s 4(v)k 3(e)k 3569(the)s 3917(form)s 220 fnt2 480 4575(label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2)m 240 fnt1 0 4079(where)m 628(the)s 964(pattern)s 1672(may)s 2125(repeat)s 2756(for)s 3082(an)s 3(y)k 3466(number)s 4245(of)s 4504(page)s 5000(numbers)s 220 fnt2 5862 4076(pn1)m 240 fnt1 6185 4079(,)m 220 fnt2 6280 4076(pn2)m 240 fnt1 6636 4079(,)m 6731(etc.)s 7160(In)s 7404(addition,)s 8283(the)s 8618(page)s 0 3791(numbers)m 867(will)s 1284(be)s 1557(distinct,)s 2359(monotone)s 3364(increasing,)s 4444(and)s 4839(consist)s 5555(of)s 5817(e)s 3(xactly)k 6549(the)s 6889(numbers)s 7755(in)s 7989(the)s 8328(original)s 0 3503(unmer)m 4(ged)k 1011(entries.)s 480 3129(These)m 1128(e)s 3(xpressions)k 2314(are)s 2683(not)s 3071(the)s 3441(simplest)s 4319(that)s 4758(w)s 2(ould)k 5435(gi)s 6(v)k 3(e)k 5916(the)s 6286(correct)s 7030(appearance.)s 8291(W)s 9(ithout)k 220 fnt2 0 2838(&0.03fu {})m 240 fnt1 1006 2841(the)m 1345(code)s 1844(w)s 2(ould)k 2491(not)s 2848(w)s 2(ork)k 3390(correctly)s 15(,)k 4321(as)s 4563(will)s 4980(be)s 5253(e)s 3(xplained)k 6230(belo)s 6(w)k 15(.)k 6949(W)s 9(ithout)k 220 fnt2 7775 2838(@OneCol)m 240 fnt1 8778 2841(the)m 0 2553(commas)m 845(w)s 2(ould)k 1497(be)s 1775(subject)s 2509(to)s 2744(an)s 3024(optimization)s 4285(which)s 4924(can)s 5309(mer)s 4(ge)k 5955(them)s 6489(into)s 6911(the)s 7255(pre)s 6(vious)k 8121(w)s 2(ord.)k 8771(It')s 13(s)k 0 2265(too)m 363(dif\207cult)s 1184(to)s 1428(e)s 3(xplain)k 2191(when)s 2772(this)s 3172(optimization)s 4442(will)s 4873(and)s 5282(will)s 5713(not)s 6084(be)s 6370(applied;)s 7191(suf\207ce)s 7889(to)s 8133(say)s 8511(that)s 8934(it)s 0 1977(will)m 433(sometimes)s 1513(not)s 1886(happen)s 2642(when)s 3225(melding,)s 4123(and)s 4534(this)s 4937(will)s 5370(cause)s 220 fnt2 5964 1974(@Meld)m 240 fnt1 6717 1977(to)m 6963(get)s 7322(its)s 7605(equality)s 8436(testing)s 0 1689(wrong,)m 719(so)s 985(it)s 1177(must)s 1702(be)s 1984(pre)s 6(v)k 3(ented)k 2976(from)s 3500(happening)s 4551(at)s 4783(all.)s 480 1315(Our)m 940(proof)s 1559(is)s 1798(by)s 2121(induction)s 3111(on)s 3436(the)s 3813(number)s 4633(of)s 4933(entries)s 5649(mer)s 4(ged)k 6448(together)s 13(.)k 7411(First,)s 7984(we)s 8348(need)s 8887(to)s 0 1027(establish)m 916(the)s 1288(base)s 1793(cases.)s 2485(If)s 2739(the)s 3111(inde)s 3(x)k 3719(entry)s 4288(is)s 4522(ra)s 3(w)k 15(,)k 4993(the)s 5365(follo)s 6(wing)k 6366(e)s 3(xpression)k 7467(is)s 7701(used)s 8222(to)s 8485(de\207ne)s 0 739(its)m 276(v)s 6(alue:)k 220 fnt2 480 289(label &0.03fu {})m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 102 108 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(102)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13368 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(If)m 230(the)s 578(inde)s 3(x)k 1162(entry)s 1707(is)s 1917(non-ra)s 3(w)k 15(,)k 2803(the)s 3151(follo)s 6(wing)k 4128(e)s 3(xpression)k 5205(is)s 5415(used)s 5912(to)s 6151(de\207ne)s 6792(its)s 7068(v)s 6(alue:)k 220 fnt2 480 12704(label &0.03fu {}{@OneCol ,} pn)m 240 fnt1 0 12208(where)m 220 fnt2 635 12205(pn)m 240 fnt1 919 12208(is)m 1124(the)s 1466(page)s 1969(number)s 2754(or)s 3008(page)s 3510(number)s 4296(range)s 4877(of)s 5143(the)s 5485(entry)s 15(.)k 6120(In)s 6370(each)s 6860(case)s 7321(we)s 7651(clearly)s 8348(ha)s 4(v)k 3(e)k 8843(an)s 0 11920(entry)m 545(that)s 963(satis\207es)s 1770(all)s 2063(the)s 2411(requirements)s 3709(of)s 3980(the)s 4328(theorem.)s 480 11546(No)m 6(w)k 1000(consider)s 1877(what)s 2409(happens)s 3252(when)s 3835(we)s 4176(come)s 4757(to)s 5003(mer)s 4(ge)k 5659(tw)s 2(o)k 6076(entries.)s 6882(The)s 7317(code)s 7832(used)s 8336(to)s 8582(carry)s 0 11258(out)m 366(this)s 762(mer)s 4(ge)k 1411(is)s 220 fnt2 480 10757(def @Merge left x r)m -3(ight y)k 480 10469({)m 480 10181( { x @Rump { x @Meld y } } @Case)m 480 9893( {)m 480 9605( "" @Y)m 4(ield x)k 480 9317( else @Y)m 4(ield { { x{@OneCol ,} } @Meld y })k 480 9029( })m 480 8453(})m 240 fnt1 0 7959(where)m 220 fnt2 640 7956(x)m 240 fnt1 808 7959(is)m 1018(the)s 1366(\207rst)s 1797(entry)s 2342(and)s 220 fnt2 2746 7956(y)m 240 fnt1 2914 7959(is)m 3124(the)s 3472(second.)s 480 7585(W)m 19(e)k 849(call)s 1248(the)s 1596(e)s 3(xpression)k 220 fnt2 480 7084(x @Rump { x @Meld y })m 240 fnt1 0 6584(the)m 240 fnt6 348 6586(discriminant)m 240 fnt1 1561 6584(,)m 1668(since)s 2215(it)s 2407(determines)s 3506(which)s 4148(case)s 4615(to)s 4854(apply)s 15(.)k 5535(W)s 19(e)k 5904(will)s 6330(track)s 6868(this)s 7264(in)s 7507(detail)s 8092(belo)s 6(w)k 15(,)k 8764(b)s 4(ut)k 0 6296(approximately)m 15(,)k 1483(its)s 1770(function)s 2635(is)s 2856(to)s 3105(determine)s 4127(whether)s 220 fnt2 4968 6293(y)m 240 fnt1 5147 6296(contains)m 6005(something)s 7066(that)s 7495(is)s 7716(dif)s 6(ferent)k 8602(from)s 0 6008(an)m 3(ything)k 903(in)s 220 fnt2 1162 6005(x)m 240 fnt1 1270 6008(.)m 1450(If)s 1696(so,)s 2031(then)s 220 fnt2 2516 6005(x @Meld y)m 240 fnt1 3630 6008(dif)m 6(fers)k 4313(from)s 220 fnt2 4852 6005(x)m 240 fnt1 5036 6008(and)m 5456(the)s 5820(discriminant)s 7089(is)s 7315(non-empty;)s 8480(if)s 8713(not,)s 220 fnt2 0 5717(x @Meld y)m 240 fnt1 1098 5720(is)m 1308(equal)s 1881(to)s 220 fnt2 2120 5717(x)m 240 fnt1 2288 5720(and)m 2692(the)s 3040(discriminant)s 4294(is)s 4504(empty)s 15(.)k 480 5346(The)m 919(\207rst)s 1362(entry)s 15(,)k 220 fnt2 1956 5343(x)m 240 fnt1 2064 5346(,)m 2183(may)s 2660(be)s 2954(ra)s 3(w)k 3374(or)s 3645(non-ra)s 3(w)k 15(,)k 4543(and)s 4958(the)s 5318(second,)s 220 fnt2 6101 5343(y)m 240 fnt1 6209 5346(,)m 6328(may)s 6805(also)s 7255(be)s 7548(ra)s 3(w)k 7969(or)s 8240(non-ra)s 3(w)k 15(,)k 0 5058(together)m 843(gi)s 6(ving)k 1502(four)s 1960(cases,)s 2571(which)s 3213(we)s 3548(tak)s 2(e)k 4000(in)s 4243(turn.)s 480 4684(If)m 718(both)s 1209(entries)s 1904(are)s 2260(ra)s 3(w)k 15(,)k 2715(then)s 3192(by)s 3494(assumption)s 4650(the)s 3(y)k 5121(ha)s 4(v)k 3(e)k 5630(the)s 5986(same)s 6542(labels)s 7158(and)s 7570(so)s 7844(are)s 8200(identical.)s 0 4396(Thus,)m 220 fnt2 586 4393(x @Meld y)m 240 fnt1 1684 4396(equals)m 220 fnt2 2346 4393(x)m 240 fnt1 2454 4396(,)m 2561(the)s 2909(discriminant)s 4163(is)s 4373(empty)s 15(,)k 5063(and)s 5467(the)s 5815(result)s 6405(is)s 220 fnt2 6615 4393(x)m 240 fnt1 6723 4396(,)m 6830(which)s 7472(is)s 7682(correct.)s 480 4022(If)m 220 fnt2 704 4019(x)m 240 fnt1 866 4022(is)m 1070(ra)s 3(w)k 1473(and)s 220 fnt2 1870 4019(y)m 240 fnt1 2032 4022(is)m 2236(non-ra)s 3(w)k 15(,)k 3116(then)s 3579(the)s 3920(discriminant)s 5168(is)s 5372(non-empty)s 6457(and)s 6855(the)s 7196(result)s 7780(is)s 7984(the)s 8326(meld)s 8855(of)s 0 3734(tw)m 2(o)k 410(objects,)s 1194(the)s 1542(\207rst)s 1973(ha)s 4(ving)k 2674(the)s 3022(form)s 220 fnt2 480 3233(label &0.03fu {}{@OneCol ,})m 240 fnt1 0 2739(being)m 220 fnt2 585 2736(x)m 240 fnt1 753 2739(with)m 1235(a)s 1401(comma)s 2165(appended,)s 3190(and)s 3594(the)s 3942(second)s 4665(being)s 5250(some)s 5811(non-ra)s 3(w)k 6659(entry)s 7204(such)s 7700(as)s 220 fnt2 480 2238(label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2)m 240 fnt1 0 1742(where)m 646(the)s 1001(pattern)s 1727(may)s 2200(repeat.)s 2954(W)s 19(e)k 3329(are)s 3683(assuming)s 4647(by)s 4947(induction)s 5915(that)s 220 fnt2 6339 1739(y)m 240 fnt1 6514 1742(has)m 6891(this)s 7293(form.)s 7928(Clearly)s 15(,)k 8730(this)s 0 1454(meld)m 536(gi)s 6(v)k 3(es)k 1083(a)s 1249(v)s 6(alue)k 1817(equal)s 2390(to)s 220 fnt2 2629 1451(y)m 240 fnt1 2737 1454(,)m 2844(which)s 3486(is)s 3696(the)s 4044(correct)s 4766(result.)s 480 1080(If)m 220 fnt2 710 1077(x)m 240 fnt1 878 1080(is)m 1088(non-ra)s 3(w)k 1936(and)s 220 fnt2 2340 1077(y)m 240 fnt1 2508 1080(is)m 2718(ra)s 3(w)k 15(,)k 3165(the)s 220 fnt2 3513 1077(@Meld)m 240 fnt1 4259 1080(in)m 4502(the)s 4850(discriminant)s 6104(melds)s 6726(tw)s 2(o)k 7136(v)s 6(alues)k 7792(typi\207ed)s 8581(by)s 220 fnt2 480 579(label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2)m 240 fnt1 0 83(and)m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 103 109 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(4.6.)m 1871(Mer)s 8(g)k 2(ed)k 2671(inde)s 4(x)k 3245(entries)s 240 fnt5 10130 -1583(103)m gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13266 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt2 480 13209(label &0.03fu {})m 240 fnt1 0 12715(The)m 440(result)s 1042(of)s 1325(this)s 1733(is)s 220 fnt2 1955 12712(x)m 240 fnt1 2135 12715(with)m 2629(an)s 2924(empty)s 3588(object)s 4244(added)s 4886(at)s 5130(the)s 5490(end.)s 6012(This)s 6500(empty)s 7164(object)s 7820(is)s 8042(the)s 8403(second)s 0 12427(element)m 815(of)s 220 fnt2 1084 12424(y)m 240 fnt1 1192 12427(,)m 1297(which)s 1937(is)s 2145(not)s 2509(equal)s 3080(to)s 3317(an)s 3(y)k 3712(element)s 4526(of)s 220 fnt2 4795 12424(x)m 240 fnt1 4903 12427(:)m 5067(the)s 5413(second)s 6134(element)s 6948(of)s 220 fnt2 7217 12424(x)m 240 fnt1 7383 12427(is)m 7591(not)s 220 fnt2 7955 12424({})m 240 fnt1 8150 12427(b)m 4(ut)k 8510(rather)s 220 fnt2 0 12136({}{@OneCol ,})m 240 fnt1 1371 12139(,)m 1515(because)s 220 fnt2 2365 12136(@Meld)m 240 fnt1 3148 12139(treats)m 3752(immediately)s 5038(adjacent)s 5931(objects)s 6696(as)s 6983(single)s 7647(elements.)s 8698(The)s 0 11851(result)m 590(of)s 220 fnt2 861 11848(@Rump)m 240 fnt1 1720 11851(is)m 1930(then)s 2398(this)s 2794(e)s 3(xtra)k 3327(empty)s 3979(object,)s 4669(so)s 4935(the)s 5282(discriminant)s 6536(is)s 6745(the)s 7093(empty)s 7744(object)s 8388(and)s 8791(we)s 0 11563(return)m 220 fnt2 627 11560(x)m 240 fnt1 735 11563(,)m 842(correctly)s 15(.)k 1839(It)s 2044(is)s 2254(this)s 2650(case)s 3117(that)s 3535(requires)s 4355(us)s 4619(to)s 4858(use)s 220 fnt2 5233 11560(0.03fu)m 240 fnt1 5829 11563(;)m 5941(without)s 6732(it)s 6924(we)s 7259(w)s 2(ould)k 7914(be)s 8196(melding)s 220 fnt2 480 11062(label{@OneCol ,} pn1{@OneCol ,} pn2)m 240 fnt1 0 10566(with)m 220 fnt2 480 10118(label)m 240 fnt1 0 9664(producing)m 220 fnt2 480 9163(label{@OneCol ,} pn1{@OneCol ,} pn2 label)m 240 fnt1 0 8667(leading)m 757(to)s 996(a)s 1162(non-empty)s 2253(discriminant)s 3507(and)s 3911(the)s 4259(wrong)s 4924(answer)s 13(.)k 480 8293(This)m 957(lea)s 4(v)k 3(es)k 1600(just)s 2007(the)s 2357(case)s 2826(where)s 3468(both)s 220 fnt2 3953 8290(x)m 240 fnt1 4123 8293(and)m 220 fnt2 4529 8290(y)m 240 fnt1 4698 8293(are)m 5047(non-ra)s 3(w)k 15(.)k 5992(W)s 19(e)k 6363(will)s 6791(di)s 6(vide)k 7441(this)s 7839(last)s 8232(case)s 8701(into)s 0 8005(three)m 533(sub-cases,)s 1556(b)s 4(ut)k 1918(\207rst)s 2349(we)s 2684(need)s 3194(some)s 3755(general)s 4513(observ)s 6(ations.)k 480 7631(Inde)m 3(x)k 1078(entries)s 1766(are)s 2114(sorted)s 2757(for)s 3096(mer)s 4(ging)k 3943(in)s 4187(the)s 4536(order)s 5101(in)s 5345(which)s 5988(their)s 6486(anchor)s 7198(points)s 7835(appear)s 8533(in)s 8778(the)s 0 7343(\207nal)m 490(printed)s 1235(document.)s 2354(This)s 2840(means)s 3513(that)s 3941(o)s 3(v)k 3(er)k 4431(the)s 4789(course)s 5480(of)s 5761(these)s 6319(entries)s 7016(the)s 7375(page)s 7893(numbers)s 8779(are)s 0 7055(non-decreasing.)m 1636(It)s 1853(is)s 2075(therefore)s 3004(clear)s 3539(that,)s 4016(although)s 4923(the)s 5283(order)s 5859(of)s 6142(mer)s 4(ging)k 7000(is)s 7222(unde\207ned)s 8237(\(actually)s 0 6767(a)m 196(balanced)s 1134(tree)s 1577(order)s 2172(is)s 2412(used\),)s 3067(whene)s 6(v)k 3(er)k 4078(tw)s 2(o)k 4519(entries)s 5236(are)s 5613(presented)s 6617(for)s 6986(mer)s 4(ging,)k 7916(all)s 8239(the)s 8618(page)s 0 6479(numbers)m 867(in)s 1101(the)s 1440(\207rst)s 1862(entry)s 2398(are)s 2736(no)s 3020(lar)s 4(ger)k 3623(than)s 4083(all)s 4368(the)s 4707(page)s 5206(numbers)s 6072(in)s 6306(the)s 6645(second)s 7359(entry)s 15(.)k 7990(W)s 19(e)k 8350(are)s 8688(also)s 0 6191(assuming)m 957(inducti)s 6(v)k 3(ely)k 2078(that)s 2496(the)s 2844(page)s 3352(numbers)s 4227(in)s 4471(each)s 4966(entry)s 5511(are)s 5858(distinct)s 6621(and)s 7025(monotone)s 8040(increasing.)s 0 5903(Thus,)m 599(there)s 1145(can)s 1547(be)s 1842(at)s 2087(most)s 2626(one)s 3041(page)s 3562(number)s 4366(common)s 5274(to)s 5526(an)s 3(y)k 5937(tw)s 2(o)k 6360(entries)s 7060(being)s 7658(mer)s 4(ged,)k 8491(and)s 8909(if)s 0 5615(there)m 533(is)s 743(one)s 1145(in)s 1388(common)s 2283(it)s 2475(is)s 2685(the)s 3033(last)s 3424(page)s 3932(number)s 4723(of)s 4994(the)s 5342(\207rst)s 5773(entry)s 6318(and)s 6722(the)s 7070(\207rst)s 7501(of)s 7772(the)s 8120(second.)s 480 5241(Our)m 935(\207rst)s 1389(sub-case)s 2291(is)s 2524(when)s 3123(the)s 3494(tw)s 2(o)k 3927(entries)s 4638(ha)s 4(v)k 3(e)k 5162(no)s 5478(page)s 6009(number)s 6823(in)s 7089(common.)s 8114(Since)s 220 fnt2 8724 5238(y)m 240 fnt1 8916 5241(is)m 0 4953(non-ra)m 3(w)k 15(,)k 886(it)s 1079(has)s 1450(a)s 1617(page)s 2126(number)s 2918(not)s 3285(equal)s 3859(to)s 4098(an)s 3(y)k 4496(page)s 5005(number)s 5797(in)s 220 fnt2 6041 4950(x)m 240 fnt1 6149 4953(.)m 6314(Therefore)s 7312(the)s 7661(discriminant)s 8916(is)s 0 4665(non-empty)m 1101(and)s 1516(the)s 1875(result)s 2476(is)s 2697(the)s 3055(meld)s 3602(of)s 220 fnt2 3884 4662(x{@OneCol ,})m 240 fnt1 5290 4665(with)m 220 fnt2 5783 4662(y)m 240 fnt1 5891 4665(,)m 6008(which)s 6661(for)s 7010(e)s 3(xample)k 7884(could)s 8485(be)s 8778(the)s 0 4377(meld)m 536(of)s 220 fnt2 480 3926(label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2{@OneCol ,})m 240 fnt1 0 3430(with)m 220 fnt2 480 2978(label &0.03fu {}{@OneCol ,} pn3{@OneCol ,} pn4)m 240 fnt1 0 2482(This)m 508(will)s 966(gi)s 6(v)k 3(e)k 1457(the)s 1837(right)s 2380(answer)s 9(,)k 3187(since)s 220 fnt2 3767 2479(@Meld)m 240 fnt1 4545 2482(treats)m 5144(adjacent)s 6032(objects)s 6792(as)s 7074(single)s 7733(elements,)s 8722(and)s 0 2194(al)m 2(w)k 2(ays)k 711(incorporates)s 1943(elements)s 2843(from)s 3367(the)s 3715(\207rst)s 4146(parameter)s 5160(\207rst)s 5591(when)s 6167(it)s 6359(has)s 6729(a)s 6895(choice.)s 480 1820(Our)m 908(second)s 1627(sub-case)s 2501(is)s 2707(when)s 3278(the)s 3622(tw)s 2(o)k 4028(entries)s 4710(ha)s 4(v)k 3(e)k 5207(a)s 5368(page)s 5872(number)s 6659(in)s 6897(common)s 7788(and)s 220 fnt2 8187 1817(y)m 240 fnt1 8351 1820(has)m 8716(tw)s 2(o)k 0 1532(or)m 273(more)s 835(page)s 1358(numbers.)s 2361(The)s 2804(common)s 3714(page)s 4236(number)s 5042(must)s 5582(be)s 5879(the)s 6242(last)s 6648(of)s 220 fnt2 6933 1529(x)m 240 fnt1 7116 1532(and)m 7535(the)s 7898(\207rst)s 8344(of)s 220 fnt2 8630 1529(y)m 240 fnt1 8738 1532(,)m 8860(so)s 0 1244(ag)m 1(ain)k 220 fnt2 574 1241(y)m 240 fnt1 742 1244(has)m 1112(something)s 2163(\(its)s 2518(last)s 2909(page)s 3417(number\))s 4277(distinct)s 5040(from)s 220 fnt2 5564 1241(x)m 240 fnt1 5672 1244(,)m 5779(the)s 6128(discriminant)s 7382(is)s 7592(non-empty)s 15(,)k 8722(and)s 0 956(we)m 335(end)s 739(up)s 1032(for)s 1370(e)s 3(xample)k 2233(melding)s 220 fnt2 480 455(label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2{@OneCol ,})m grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 104 110 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(104)m 240 fnt6 8434 -1580(Chapter)m 9284(4.)s 9558(Examples)s gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(with)m 220 fnt2 480 12753(label &0.03fu {}{@OneCol ,} pn2{@OneCol ,} pn3)m 240 fnt1 0 12257(Ag)m 1(ain)k 648(it')s 13(s)k 998(clear)s 1529(that)s 1955(the)s 2310(meld)s 2854(will)s 3288(produce)s 4123(the)s 4478(right)s 4997(answer;)s 5794(in)s 6045(f)s 2(act,)k 6514(this)s 6918(second)s 7649(sub-case)s 8536(could)s 0 11969(be)m 282(uni\207ed)s 1005(with)s 1487(the)s 1835(\207rst)s 2266(sub-case.)s 480 11595(Our)m 916(third)s 1429(sub-case)s 2312(is)s 2526(when)s 3106(the)s 3458(tw)s 2(o)k 3872(entries)s 4563(ha)s 4(v)k 3(e)k 5068(a)s 5238(page)s 5750(number)s 6545(in)s 6792(common)s 7691(and)s 220 fnt2 8099 11592(y)m 240 fnt1 8271 11595(has)m 8646(only)s 0 11307(one)m 402(page)s 910(number)s 13(.)k 1792(In)s 2048(this)s 2444(case,)s 2962(typi\207ed)s 3751(by)s 220 fnt2 4045 11304(x)m 240 fnt1 4213 11307(with)m 4695(v)s 6(alue)k 220 fnt2 480 10806(label &0.03fu {}{@OneCol ,} pn1{@OneCol ,} pn2)m 240 fnt1 0 10310(and)m 220 fnt2 404 10307(y)m 240 fnt1 572 10310(with)m 1054(v)s 6(alue)k 220 fnt2 480 9811(label &0.03fu {}{@OneCol ,} pn2)m 240 fnt1 0 9315(it)m 190(is)s 398(clear)s 918(that)s 220 fnt2 1334 9312(y)m 240 fnt1 1500 9315(of)m 6(fers)k 2098(nothing)s 2881(ne)s 6(w)k 15(,)k 3363(the)s 3709(discriminant)s 4961(is)s 5168(empty)s 15(,)k 5856(and)s 6257(the)s 6603(result,)s 7238(quite)s 7769(correctly)s 15(,)k 8707(is)s 220 fnt2 8914 9312(x)m 240 fnt1 9022 9315(.)m 0 9027(This)m 476(completes)s 1496(the)s 1844(proof.)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 105 111 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt8 vec2 /Times-Italic LoutRecode /fnt8 { /Times-Italicfnt8 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13448 0 13448 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 fnt5 0 12397(A)m 12(ppendix)k 2097(A.)s 2784(Implementation)s 6168(of)s 6713(T)s 44(extur)k 8(es)k [ /Dest /LOUTtex /DEST pdfmark 240 fnt1 0 11711(The)m 430(follo)s 6(wing)k 1409(notes)s 1967(detail)s 2554(ho)s 6(w)k 3018(PostScript)s 4062(patterns)s 4871(ha)s 4(v)k 3(e)k 5374(been)s 5885(used)s 6385(to)s 6626(produce)s 7455(te)s 3(xtures.)k 8374(See)s 8778(the)s 0 11423(PostScript)m 1042(Language)s 2042(Reference)s 3066(Manual,)s 3904(second)s 4627(edition)s 5348(\(PLRM\),)s 6265(especially)s 7274(Section)s 8048(4.9.)s 480 11049(PostScript)m 1525(patterns)s 2336(are)s 2686(implemented)s 3996(as)s 4250(color)s 4804(spaces,)s 5539(whereas)s 6376(from)s 6904(a)s 7074(logical)s 7782(point)s 8338(of)s 8613(vie)s 6(w)k 0 10761(the)m 3(y)k 462(are)s 807(really)s 1402(separate)s 2239(entities)s 2977(in)s 3218(the)s 3564(graphics)s 4424(state,)s 4966(independent)s 6194(of)s 6463(color)s 7013(\(e)s 3(xcept)k 7771(that)s 8187(a)s 8351(colored)s 0 10473(te)m 3(xture)k 716(o)s 3(v)k 3(errides)k 1650(an)s 3(y)k 2047(current)s 2783(color)s 3334(while)s 3921(it)s 4113(is)s 4323(in)s 4566(ef)s 6(fect\).)k 5345(T)s 19(o)k 5645(ensure)s 6325(that)s 6743(Lout')s 13(s)k 220 fnt2 7405 10470(@SetT)m 26(e)k 6(xture)k 240 fnt1 8722 10473(and)m 220 fnt2 0 10182(@SetColour)m 240 fnt1 1260 10185(symbols)m 2112(ha)s 4(v)k 3(e)k 2616(this)s 3015(desired)s 3766(independence)s 5141(of)s 5415(each)s 5913(other)s 9(,)k 6505(the)s 6856(follo)s 6(wing)k 7836(operators)s 8779(are)s 0 9897(de\207ned)m 763(in)s 1006(the)s 1354(Lout)s 1866(prologue:)s 5090 12 0 12 240 288 60 1063 9281 LoutGr2 LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 240 fnt8 2550 9385(Lout-de\207ned)m 3826(oper)s 3(ator)k gsave 6153 9281 translate 240 fnt1 1850 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 6297(What)s 6866(it)s 7062(r)s 8(eplaces)k 220 fnt2 2623 9092(n)m 2(um)k 3322(LoutSetGr)s 2(a)k 6(y)k 5522(-)s 240 fnt1 6297 9095(setgray)m 220 fnt2 1679 8804(n)m 2(um)k 2151(n)s 2(um)k 2623(n)s 2(um)k 3322(LoutSetRGBColor)s 5522(-)s 240 fnt1 6297 8807(setr)m 4(gbcolor)k 220 fnt2 1679 8516(n)m 2(um)k 2151(n)s 2(um)k 2623(n)s 2(um)k 3322(LoutSetHSBColor)s 5522(-)s 240 fnt1 6297 8519(sethsbcolor)m 220 fnt2 1207 8228(n)m 2(um)k 1679(n)s 2(um)k 2151(n)s 2(um)k 2623(n)s 2(um)k 3322(LoutSetCMYKColor)s 5522(-)s 240 fnt1 6297 8231(setcmykcolor)m 2115 12 0 12 240 288 60 1063 7865 LoutGr2 LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 220 fnt2 2920 7940(p)m gsave 3178 7865 translate 240 fnt1 2200 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 3322(LoutSetT)s 26(e)k 6(xture)k gsave 5378 7865 translate 240 fnt1 775 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 5522(-)s gsave 6153 7865 translate 240 fnt1 1850 12 0 12 240 288 60 LoutGraphic gsave LoutBox 0.0 0.0 0.0 LoutSetRGBColor fill grestore grestore 240 fnt1 6297 7943(setpattern)m 0 7426(These)m 619(ha)s 4(v)k 3(e)k 1111(similar)s 1825(signatures)s 2836(to)s 3066(the)s 3406(corresponding)s 4819(PostScript)s 5852(operators)s 6784(sho)s 6(wn,)k 7502(and)s 7897(the)s 8237(idea)s 8686(is)s 8887(to)s 0 7138(use)m 375(the)s 724(Lout-de\207ned)s 2019(v)s 3(ersions)k 2865(where)s 3506(you)s 3922(w)s 2(ould)k 4578(normally)s 5495(use)s 5871(the)s 6220(PostScript)s 7263(ones.)s 7807(The)s 8236(\207rst)s 8668(four)s 0 6850(set)m 336(the)s 695(color)s 1257(without)s 2059(disturbing)s 3094(an)s 3(y)k 3502(current)s 4249(te)s 3(xture;)k 5032(the)s 5391(last)s 5794(sets)s 6214(the)s 6573(te)s 3(xture)k 7300(without)s 8103(disturbing)s 0 6562(an)m 3(y)k 386(current)s 1110(color)s 13(.)k 1740(Here)s 220 fnt2 2248 6559(p)m 240 fnt1 2411 6562(may)m 2865(be)s 3135(the)s 3471(PostScript)s 220 fnt2 4502 6559(n)m 2(ull)k 240 fnt1 4874 6562(object,)m 5553(meaning)s 6418(no)s 6700(te)s 3(xture)k 7404(i.e.)s 7728(normal)s 8448(\207lling,)s 0 6274(or)m 259(else)s 686(it)s 878(must)s 1403(be)s 1685(an)s 1968(instantiated)s 3127(pattern)s 3847(dictionary)s 15(,)k 4908(as)s 5158(returned)s 6012(by)s 220 fnt2 6306 6271(mak)m 4(epatter)k -5(n)k 240 fnt1 7513 6274(.)m 480 5900(There)m 1093(are)s 1440(three)s 1973(k)s 2(e)k 3(y)k 2368(data)s 2826(types)s 3382(used)s 3879(by)s 4173(this)s 4569(code:)s 0 5397(\213)m 480(A)s 761(colorspace,)s 1941(denoted)s 220 fnt2 2809 5394(cs)m 240 fnt1 3022 5397(,)m 3180(is)s 3441(a)s 3659(PostScript)s 4752(colorspace)s 5881(array)s 6477(and)s 6932(may)s 7449(ha)s 4(v)k 3(e)k 8002(one)s 8455(of)s 8778(the)s 480 5109(follo)m 6(wing)k 1457(v)s 6(alues:)k 220 fnt2 1104 4592([ /De)m 6(viceGr)k 2(a)k 6(y ])k 240 fnt1 3059 4595(The)m 3487(gre)s 3(yscale)k 4442(colorspace)s 220 fnt2 1104 4248([ /De)m 6(viceRGB ])k 240 fnt1 3059 4251(The)m 3487(RGB)s 4023(colorspace)s 220 fnt2 1104 3904([ /De)m 6(viceCMYK ])k 240 fnt1 3059 3907(The)m 3487(CMYK)s 4266(colorspace)s 220 fnt2 1104 3560([ /P)m 8(atter)k -5(n ])k 240 fnt1 3059 3563(A)m 3289(colored)s 4064(pattern)s 220 fnt2 1104 3216([ /P)m 8(atter)k -5(n /name ])k 240 fnt1 3059 3219(An)m 3496(uncolored)s 4598(pattern;)s 220 fnt2 5460 3216(/name)m 240 fnt1 6209 3219(may)m 6762(be)s 220 fnt2 7131 3216(/De)m 6(viceGr)k 2(a)k 6(y)k 240 fnt1 8322 3219(,)m 220 fnt2 8517 3216(/De-)m 3059 2928(viceRGB)m 240 fnt1 3916 2931(,)m 4023(or)s 220 fnt2 4282 2928(/De)m 6(viceCMYK)k [ /Dest /LOUT16_1731_tex_1 /DEST pdfmark 240 fnt1 0 2447(\213)m 480(A)s 708(color)s 9(,)k 1294(denoted)s 2107(c,)s 2318(is)s 2525(an)s 2805(array)s 3346(containing)s 4407(a)s 4570(PostScript)s 5609(non-pattern)s 6765(color)s 7314(and)s 7715(thus)s 8162(may)s 8625(ha)s 4(v)k 3(e)k 480 2159(one)m 882(of)s 1153(the)s 1501(follo)s 6(wing)k 2478(v)s 6(alues:)k 220 fnt2 1104 1642([ g)m 2(re)k 4(y ])k 240 fnt1 3031 1645(A)m 220 fnt2 3261 1642(/De)m 6(viceGr)k 2(a)k 6(y)k 240 fnt1 4512 1645(color)m 220 fnt2 1104 1298([ red g)m 2(reen b)k 4(lue ])k 240 fnt1 3031 1301(A)m 220 fnt2 3261 1298(/De)m 6(viceRGB)k 240 fnt1 4513 1301(color)m 220 fnt2 1104 954([ c m y k ])m 240 fnt1 3031 957(A)m 220 fnt2 3261 954(/De)m 6(viceCMYK)k 240 fnt1 4679 957(color)m 480 440(W)m 19(e)k 853(enclose)s 1630(colors)s 2269(in)s 2516(an)s 2804(array)s 3352(to)s 3595(mak)s 2(e)k 4171(it)s 4368(easy)s 4851(for)s 5193(us)s 5461(to)s 5704(deal)s 6162(with)s 6648(their)s 7149(v)s 6(arying)k 7931(length.)s 8698(The)s 480 152(array)m 1024(has)s 1394(to)s 1633(be)s 1915(unpack)s 2(ed)k 2889(with)s 220 fnt2 3371 149(aload)m 240 fnt1 3955 152(before)m 4621(calling)s 220 fnt2 5324 149(setcolor)m 240 fnt1 6092 152(.)m [ /Dest /LOUT16_1731_tex_2 /DEST pdfmark grestore gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5808 -15421(105)m grestore grestore grestore pgsave restore showpage %%Page: 106 112 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica %%+ font Courier /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Courier /Courierfnt9 vec2 /Courier LoutRecode /fnt9 { /Courierfnt9 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(106)m 240 fnt6 6599 -1580(Appendix)m 7563(A.)s 7863(Implementation)s 9418(of)s 9699(T)s 22(e)k 4(xtur)k 8(es)k gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(\213)m 480(A)s 744(pattern,)s 1549(denoted)s 220 fnt2 2400 13202(p)m 240 fnt1 2514 13205(.)m 2712(F)s 3(or)k 3136(us,)s 3491(a)s 3691(pattern)s 4446(is)s 4691(either)s 5328(the)s 5711(PostScript)s 6788(null)s 7249(object,)s 7975(meaning)s 8887(to)s 480 12917(\207ll)m 824(with)s 1331(solid)s 1879(color)s 9(,)k 2492(or)s 2776(else)s 3228(it)s 3444(is)s 3679(a)s 3870(dictionary)s 4917(as)s 5192(returned)s 6071(by)s 220 fnt2 6389 12914(mak)m 4(epatter)k -5(n)k 240 fnt1 7596 12917(.)m 7785(When)s 8439(such)s 8960(a)s 480 12629(dictionary)m 1505(is)s 1718(installed)s 2588(in)s 2834(the)s 3185(current)s 3924(graphics)s 4788(state,)s 5334(this)s 5733(code)s 6244(guarantees)s 7320(that)s 7741(it)s 7936(will)s 8365(contain)s 480 12341(tw)m 2(o)k 890(e)s 3(xtra)k 1424(entries:)s 220 fnt2 1104 11873(/Under)m -3(lyingColorSpace)k 240 fnt1 3640 11876(A)m 220 fnt2 3870 11873(cs)m 240 fnt1 4143 11876(as)m 4393(de\207ned)s 5156(abo)s 3(v)k 3(e)k 220 fnt2 1104 11529(/Under)m -3(lyingColor)k 240 fnt1 3640 11532(A)m 220 fnt2 3870 11529(c)m 240 fnt1 4035 11532(as)m 4285(de\207ned)s 5048(abo)s 3(v)k 3(e)k 480 11015(W)m 19(e)k 849(need)s 1358(these)s 1905(e)s 3(xtra)k 2438(entries)s 3124(to)s 3363(mak)s 2(e)k 3934(color)s 4484(independent)s 5714(of)s 5984(te)s 3(xture:)k 6809(without)s 7600(them)s 8137(we)s 8471(w)s 2(ould)k 480 10727(lose)m 943(the)s 1314(current)s 2072(color)s 2646(when)s 3244(we)s 3602(set)s 3949(a)s 4138(te)s 3(xture.)k 4984(Because)s 5860(of)s 6153(these)s 6723(v)s 6(ariables)k 7652(we)s 8010(can')s 4(t)k 8566(share)s 480 10439(pattern)m 1200(dictionaries)s 2365(among)s 3070(graphics)s 3931(states.)s 4625(W)s 19(e)k 4994(must)s 5519(cop)s 2(y)k 6037(them.)s [ /Dest /LOUT16_1731_tex_3 /DEST pdfmark 0 9936(This)m 476(representation)s 1886(obe)s 3(ys)k 2493(the)s 2841(follo)s 6(wing)k 3818(in)s 9(v)k 6(ariant:)k 0 9433(\213)m 480(All)s 853(components)s 2075(of)s 2360(the)s 2721(PostScript)s 3777(graphics)s 4652(state)s 5158(related)s 5879(to)s 6132(pattern)s 6865(and)s 7283(color)s 7848(ha)s 4(v)k 3(e)k 8363(de\207ned)s 480 9145(v)m 6(alues)k 1136(\(e.g.)s 1605(there)s 2138(is)s 2348(ne)s 6(v)k 3(er)k 2930(a)s 3096(situation)s 3976(where)s 4616(we)s 4951(set)s 5276(color)s 5827(space)s 6414(b)s 4(ut)k 6776(not)s 7142(color\).)s [ /Dest /LOUT16_1731_tex_4 /DEST pdfmark 0 8642(\213)m 480(If)s 709(the)s 1056(PostScript)s 2097(graphics)s 2956(state)s 3448(contains)s 4295(a)s 220 fnt2 4460 8639(/P)m 8(atter)k -5(n)k 240 fnt1 5269 8642(colorspace,)m 6397(the)s 6744(pattern)s 7463(dictionary)s 8484(stored)s 480 8354(in)m 723(the)s 1071(state)s 1564(has)s 220 fnt2 1934 8351(/Under)m -3(lyingColorSpace)k 240 fnt1 4242 8354(and)m 220 fnt2 4646 8351(/Under)m -3(lyingColor)k 240 fnt1 6340 8354(entries)m 7027(of)s 7298(types)s 220 fnt2 7854 8351(cs)m 240 fnt1 8127 8354(and)m 220 fnt2 8531 8351(c)m 240 fnt1 8636 8354(.)m [ /Dest /LOUT16_1731_tex_5 /DEST pdfmark 0 7851(\213)m 480(If)s 732(the)s 1103(graphics)s 1986(state)s 2502(contains)s 3372(an)s 3678(uncolored)s 220 fnt2 4715 7848(/P)m 8(atter)k -5(n)k 240 fnt1 5549 7851(colorspace,)m 6700(then)s 7192(the)s 220 fnt2 7563 7848(/Under)m -3(lyingCol-)k 480 7560(orSpace)m 240 fnt1 1338 7563(and)m 220 fnt2 1730 7560(/Under)m -3(lyingColor)k 240 fnt1 3413 7563(entries)m 4088(of)s 4347(the)s 4684(pattern)s 5392(dictionary)s 6404(stored)s 7034(in)s 7265(the)s 7602(state)s 8083(agree)s 8644(with)s 480 7275(the)m 828(underlying)s 1918(color)s 2469(space)s 3056(and)s 3460(color)s 4011(stored)s 4653(in)s 4896(the)s 5244(graphics)s 6105(state.)s [ /Dest /LOUT16_1731_tex_6 /DEST pdfmark 0 6772(And)m 471(it)s 663(has)s 1033(the)s 1381(follo)s 6(wing)k 2358(abstraction)s 3463(function:)s 0 6269(\213)m 480(If)s 725(the)s 1089(graphics)s 1965(state)s 2474(colorspace)s 3568(is)s 220 fnt2 3793 6266(/P)m 8(atter)k -5(n)k 240 fnt1 4544 6269(,)m 4667(then)s 5152(the)s 5515(abstract)s 6333(current)s 7085(te)s 3(xture)k 7816(is)s 8042(the)s 8406(pattern)s 480 5981(dictionary)m 1500(stored)s 2138(in)s 2378(the)s 2722(graphics)s 3580(state)s 4069(color)s 13(.)k 4707(If)s 4934(the)s 5278(graphics)s 6136(state)s 6625(colorspace)s 7700(is)s 7906(not)s 220 fnt2 8268 5978(/P)m 8(atter)k -5(n)k 240 fnt1 9019 5981(,)m 480 5693(then)m 949(the)s 1297(abstract)s 2099(current)s 2835(te)s 3(xture)k 3551(is)s 220 fnt2 3761 5690(n)m 2(ull)k 240 fnt1 4085 5693(.)m [ /Dest /LOUT16_1731_tex_7 /DEST pdfmark 0 5236(\213)m 480(If)s 725(the)s 1089(graphics)s 1966(state)s 2475(colorspace)s 3568(is)s 220 fnt2 3794 5233(/P)m 8(atter)k -5(n)k 240 fnt1 4545 5236(,)m 4668(then)s 5153(the)s 5517(abstract)s 6334(colorspace)s 7428(and)s 7848(color)s 8415(are)s 8778(the)s 480 4948(v)m 6(alues)k 1145(of)s 220 fnt2 1425 4945(/Under)m -3(lyingColorSpace)k 240 fnt1 3743 4948(and)m 220 fnt2 4156 4945(/Under)m -3(lyingColor)k 240 fnt1 5860 4948(in)m 6112(the)s 6469(pattern)s 7199(dictionary)s 8231(stored)s 8883(in)s 480 4660(the)m 849(graphics)s 1731(state)s 2246(color)s 13(.)k 2849(If)s 3100(the)s 3470(graphics)s 4352(state)s 4866(colorspace)s 5966(is)s 6197(not)s 220 fnt2 6584 4657(/P)m 8(atter)k -5(n)k 240 fnt1 7335 4660(,)m 7464(then)s 7954(the)s 8324(abstract)s 480 4372(current)m 1216(colorspace)s 2294(and)s 2698(color)s 3249(are)s 3596(as)s 3846(returned)s 4700(by)s 220 fnt2 4994 4369(currentcolorspace)m 240 fnt1 6790 4372(and)m 220 fnt2 7194 4369([ currentcolor ])m 240 fnt1 8583 4372(.)m [ /Dest /LOUT16_1731_tex_8 /DEST pdfmark 0 3869(The)m 428(follo)s 6(wing)k 1405(functions)s 2346(are)s 2693(pri)s 6(v)k 6(ate)k 3400(helpers)s 4141(for)s 4479(the)s 4827(public)s 5478(functions:)s 220 fnt9 480 3392(% Current pattern \(may be null\): - LoutCurrentP p)m 480 3144(/LoutCurrentP)m 480 2896({ %% -)m 480 2648( currentcolorspace %% [ /name etc ])m 480 2400( 0 get /Pattern eq %% bool)m 480 2152( { %% - \(have pattern\))m 480 1904( [ currentcolor ] %% [ comp0 ... compn p ])m 480 1656( dup length 1 sub get %% p)m 480 1408( })m 480 1160( { %% - \(no pattern\))m 480 912( null %% null)m 480 664( } ifelse %% p)m 480 416(} def)m [ /Dest /LOUT16_1731_tex_9 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 107 113 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Courier %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Courier /Courierfnt9 vec2 /Courier LoutRecode /fnt9 { /Courierfnt9 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 10128 -1581(107)m gsave 1417 -15423 translate 240 fnt1 9066 13414 0 13323 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt9 480 13277(% Current color and color space: - LoutCurrentCCS c cs)m 480 13029(/LoutCurrentCCS)m 480 12781({)m 480 12533( LoutCurrentP dup null eq %% p bool)m 480 12285( { %% null)m 480 12037( pop [ currentcolor ] %% c)m 480 11789( currentcolorspace %% c cs)m 480 11541( })m 480 11293( { %% p)m 480 11045( dup %% p p)m 480 10797( /UnderlyingColor get exch %% c p)m 480 10549( /UnderlyingColorSpace get %% c cs)m 480 10301( } ifelse %% c cs)m 480 10053(} def)m [ /Dest /LOUT16_1731_tex_10 /DEST pdfmark 480 9604(% Make c, cs, and p current: c cs p LoutSetCCSP -)m 480 9356(/LoutSetCCSP)m 480 9108({ %% c cs p)m 480 8860( dup null eq %% c cs p bool)m 480 8612( { %% c cs p \(null pattern\))m 480 8364( pop setcolorspace %% c)m 480 8116( aload pop setcolor %% -)m 480 7868( })m 480 7620( { %% c cs p \(non-null pattern\))m 480 7372( % copy pattern dictionary)m 480 7124( 12 dict copy %% c cs p)m 480 6628( % record cs and c in p)m 480 6380( dup /UnderlyingColorSpace %% c cs p p /UCS)m 480 6132( 3 index put %% c cs p)m 480 5884( dup /UnderlyingColor %% c cs p p /UC)m 480 5636( 4 index put %% c cs p)m 480 5140( % do setcolorspace and setcolor)m 480 4892( dup /PaintType get 1 eq %% c cs p bool)m 480 4644( { %% c cs p \(colored pattern\))m 480 4396( [/Pattern] setcolorspace %% c cs p)m 480 4148( setcolor %% c cs)m 480 3900( pop pop %% -)m 480 3652( })m 480 3404( { %% c cs p \(uncolored pattern\))m 480 3156( [ /Pattern %% c cs p [ /Pattern)m 480 2908( 4 -1 roll %% c p [ /Pattern cs)m 480 2660( ] setcolorspace %% c p)m 480 2412( exch aload length 1 add %% p comp1 ... compm m+1)m 480 2164( -1 roll %% comp1 ... compm p)m 480 1916( setcolor %% -)m 480 1668( } ifelse %% -)m 480 1420( } ifelse %% -)m 480 1172(} def)m [ /Dest /LOUT16_1731_tex_11 /DEST pdfmark 240 fnt1 0 697(W)m 9(ith)k 536(the)s 894(helper)s 1561(functions)s 2513(it')s 13(s)k 2865(no)s 6(w)k 3336(easy)s 3825(to)s 4075(deri)s 6(v)k 3(e)k 4729(the)s 5087(colour)s 5768(and)s 6183(te)s 3(xture)k 6909(setting)s 7609(commands)s 8708(that)s 0 409(we)m 346(are)s 705(of)s 6(fering)k 1533(to)s 1784(our)s 2175(end)s 2591(users.)s 3197(When)s 3838(setting)s 4540(the)s 4900(color)s 5463(we)s 5810(pass)s 6284(it,)s 6535(plus)s 6997(the)s 7357(current)s 8105(pattern,)s 8887(to)s 220 fnt2 0 118(LoutSetCCSP)m 240 fnt1 1355 121(;)m 1459(when)s 2027(setting)s 2709(the)s 3049(pattern)s 3761(we)s 4088(pass)s 4542(it,)s 4773(plus)s 5215(the)s 5555(current)s 6283(color)s 9(,)k 6864(to)s 220 fnt2 7095 118(LoutSetCCSP)m 240 fnt1 8450 121(.)m 8605(Note)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 108 114 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica %%+ font Courier /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Courier /Courierfnt9 vec2 /Courier LoutRecode /fnt9 { /Courierfnt9 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(108)m 240 fnt6 6599 -1580(Appendix)m 7563(A.)s 7863(Implementation)s 9418(of)s 9699(T)s 22(e)k 4(xtur)k 8(es)k gsave 1417 -15423 translate 240 fnt1 9066 13368 0 13259 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13205(that)m 418(there)s 951(is)s 1161(no)s 220 fnt2 1454 13202(/De)m 6(viceHSB)k 240 fnt1 2621 13205(:)m 220 fnt2 2727 13202(hsb)m 240 fnt1 3133 13205(is)m 3343(a)s 3509(v)s 6(ariant)k 4226(of)s 220 fnt2 4497 13202(rgb)m 240 fnt1 4806 13205(.)m 220 fnt9 480 12731(% num LoutSetGray -)m 480 12483(/LoutSetGray)m 480 12235({)m 480 11987( [ 2 1 roll ] %% c)m 480 11739( [ /DeviceGray ] %% c cs)m 480 11491( LoutCurrentP %% c cs p)m 480 11243( LoutSetCCSP %% -)m 480 10995(} def)m [ /Dest /LOUT16_1731_tex_12 /DEST pdfmark 480 10546(% r g b LoutSetRGBColor -)m 480 10298(/LoutSetRGBColor)m 480 10050({ %% r g b)m 480 9802( [ 4 1 roll ] %% c)m 480 9554( [ /DeviceRGB ] %% c cs)m 480 9306( LoutCurrentP %% c cs p)m 480 9058( LoutSetCCSP %% -)m 480 8810(} def)m [ /Dest /LOUT16_1731_tex_13 /DEST pdfmark 480 8361(% h s b LoutSetHSBColor -)m 480 8113(/LoutSetHSBColor)m 480 7865({ %% h s b)m 480 7617( gsave sethsbcolor %% -)m 480 7369( currentrgbcolor grestore %% r g b)m 480 7121( LoutSetRGBColor %% -)m 480 6873(} def)m [ /Dest /LOUT16_1731_tex_14 /DEST pdfmark 480 6424(% c m y k LoutSetRGBColor -)m 480 6176(/LoutSetCMYKColor)m 480 5928({)m 480 5680( [ 5 1 roll ] %% c)m 480 5432( [ /DeviceCMYK ] %% c cs)m 480 5184( LoutCurrentP %% c cs p)m 480 4936( LoutSetCCSP %% -)m 480 4688(} def)m [ /Dest /LOUT16_1731_tex_15 /DEST pdfmark 480 4241(% p LoutSetTexture -)m 480 3993(/LoutSetTexture)m 480 3745({)m 480 3497( LoutCurrentCCS %% p c cs)m 480 3249( 3 -1 roll %% c cs p)m 480 3001( LoutSetCCSP %% -)m 480 2753(} def)m [ /Dest /LOUT16_1731_tex_16 /DEST pdfmark 240 fnt1 0 2278(All)m 369(we)s 713(need)s 1232(no)s 6(w)k 1702(is)s 1921(some)s 2491(sample)s 3233(te)s 3(xtures.)k 4159(T)s 16(e)k 3(xtures)k 5036(are)s 5392(just)s 5806(pattern)s 6535(dictionaries)s 7709(as)s 7968(returned)s 8832(by)s 220 fnt2 0 1987(mak)m 4(epatter)k -5(n)k 240 fnt1 1207 1990(.)m 1374(Here)s 1898(is)s 2111(a)s 2281(PostScript)s 3327(function)s 4184(that)s 4606(appears)s 5390(in)s 5637(the)s 5989(Lout)s 6504(prologue.)s 7523(Its)s 7815(function)s 8673(is)s 8887(to)s 0 1702(simplify)m 861(the)s 1220(production)s 2325(of)s 2607(te)s 3(xtures.)k 3535(It)s 3751(\207rst)s 4193(tak)s 2(es)k 4744(six)s 5089(parameters)s 6198(to)s 6448(specify)s 7203(a)s 7380(transformation)s 8855(of)s 0 1414(the)m 354(te)s 3(xture)k 1077(used)s 1581(to)s 1827(b)s 4(uild)k 2380(the)s 2735(matrix)s 3420(tak)s 2(en)k 4000(by)s 220 fnt2 4300 1411(mak)m 4(epatter)k -5(n)k 240 fnt1 5507 1414(,)m 5621(then)s 6097(\207v)s 3(e)k 6516(parameters)s 7621(that)s 8046(go)s 8346(into)s 8778(the)s 0 1126(pattern)m 720(dictionary)s 15(.)k grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 109 115 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Courier %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Courier /Courierfnt9 vec2 /Courier LoutRecode /fnt9 { /Courierfnt9 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 10129 -1581(109)m gsave 1417 -15423 translate 240 fnt1 9066 13414 0 13317 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 220 fnt9 480 13271(% )m 480 13023(% LoutMakeTexture p)m 480 12775(/LoutMakeTexture)m 480 12527({ %% s sx sy r h v pt bb xs ys pp)m 480 12279( 12 dict begin %% s sx sy r h v pt bb xs ys pp)m 480 12031( /PaintProc exch def %% s sx sy r h v pt bb xs ys)m 480 11783( /YStep exch def %% s sx sy r h v pt bb xs)m 480 11535( /XStep exch def %% s sx sy r h v pt bb)m 480 11287( /BBox exch def %% s sx sy r h v pt)m 480 11039( /PaintType exch def %% s sx sy r h v)m 480 10791( /PatternType 1 def %% s sx sy r h v)m 480 10543( /TilingType 1 def %% s sx sy r h v)m 480 10295( currentdict end %% s sx sy r h v p)m 480 10047( 7 1 roll %% p s sx sy r h v)m 480 9799( matrix translate %% p s sx sy r mat1)m 480 9551( 5 1 roll %% p mat1 s sx sy r)m 480 9303( matrix rotate %% p mat1 s sx sy mat2)m 480 9055( 4 1 roll %% p mat1 mat2 s sx sy)m 480 8807( matrix scale %% p mat1 mat2 s mat3)m 480 8559( exch dup matrix scale %% p mat1 mat2 mat3 mat4)m 480 8311( matrix concatmatrix %% p mat1 mat2 mat34)m 480 8063( matrix concatmatrix %% p mat1 mat234)m 480 7815( matrix concatmatrix %% p mat1234)m 480 7567( /makepattern where)m 480 7319( { %% p mat123 dict)m 480 7071( pop makepattern %% p)m 480 6823( })m 480 6575( { %% p mat123)m 480 6327( pop pop null %% null)m 480 6079( } ifelse %% p \(may be null\))m 480 5831(} def)m [ /Dest /LOUT16_1731_tex_17 /DEST pdfmark 240 fnt1 0 5356(F)m 3(or)k 384(e)s 3(xamples)k 1330(of)s 1596(te)s 3(xtures)k 2395(using)s 220 fnt2 2962 5353(LoutMak)m 4(eT)k 26(e)k 6(xture)k 240 fnt1 4626 5356(,)m 4727(consult)s 5473(the)s 5816(standard)s 6679(include)s 7434(\207le)s 220 fnt2 7790 5353(colte)m 6(x)k 240 fnt1 8355 5356(.)m 8513(There)s 0 5068(is)m 210(only)s 690(one)s 1092(b)s 4(uilt-in)k 1848(te)s 3(xture,)k 220 fnt2 2615 5065(LoutT)m 26(e)k 6(xtureSolid)k 240 fnt1 4228 5068(:)m 220 fnt9 480 4585(/LoutTextureSolid)m 480 4337({)m 480 4089( null)m 480 3841( LoutSetTexture)m 480 3593(} def)m [ /Dest /LOUT16_1731_tex_18 /DEST pdfmark grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 110 116 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13448 0 13448 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 480 fnt5 0 12397(Refer)m 8(ences)k [ /Dest /LOUT20_530_all_1 /DEST pdfmark [ /Dest /LOUTadobe1990ps /DEST pdfmark 240 fnt1 0 11800([1])m 480(Adobe)s 1182(Systems,)s 2094(Inc..)s 240 fnt6 2631 11802(P)m 19(ostScript)k 3680(Langua)s 2(g)k 2(e)k 4696(Refer)s 8(ence)k 5704(Manual,)s 6550(Second)s 7316(Edition)s 240 fnt1 8014 11800(.)m 8186(Addison-)s 480 11512(W)m 19(esle)k 3(y)k 1169(,)s 1276(1990)s 1751(.)s [ /Dest /LOUTadobe1996epsforms /DEST pdfmark 0 11007([2])m 480(Adobe)s 1167(Systems,)s 2063(Inc..)s 2584(Using)s 3201(EPS)s 3650(\207les)s 4091(in)s 4326(PostScript)s 5360(Language)s 6352(F)s 3(orms)k 6951(.)s 7107(T)s 16(echnical)k 8080(Note)s 8592(5144)s 480 10719(\(1996\))m 1107(.)s [ /Dest /LOUTkernighan1975eqn /DEST pdfmark 0 10226([3])m 480(Brian)s 1132(W)s 22(.)k 1504(K)s 6(ernighan)k 2630(and)s 3098(Lorinda)s 3980(L.)s 4294(Cherry)s 15(.)k 5172(A)s 5466(system)s 6255(for)s 6657(typesetting)s 7824(mathematics)s 9022(.)s 240 fnt6 480 9940(Communications)m 2158(of)s 2439(the)s 2784(A)s 7(CM)k 240 fnt5 3351 9937(18)m 240 fnt1 3585 9938(,)m 3692(182\211193)s 4576(\(1975\))s 5203(.)s [ /Dest /LOUTkingston1995lout_program /DEST pdfmark 0 9437([4])m 480(Jef)s 6(fre)k 3(y)k 1177(H.)s 1443(Kingston.)s 240 fnt6 2475 9439(The)m 2876(Basser)s 3581(Lout)s 4074(Document)s 5111(F)s 25(ormatting)k 6219(System)s 6929(\(V)s 26(er)k 2(sion)k 7767(3\))s 240 fnt1 7956 9437(.)m 8109(Computer)s 480 9149(program)m 1290(,)s 1408(1995)s 1874(.)s 2050(Publicly)s 2913(a)s 4(v)k 6(ailable)k 3833(in)s 4088(the)s 240 fnt6 4448 9151(jef)m 4(f)k 240 fnt1 4855 9149(subdirectory)m 6116(of)s 6399(the)s 6759(home)s 7359(directory)s 8287(of)s 240 fnt6 8570 9151(ftp)m 240 fnt1 8887 9149(to)m 480 8861(host)m 240 fnt6 950 8863(ftp.cs.su.oz.au)m 240 fnt1 2373 8861(with)m 2866(login)s 3427(name)s 240 fnt6 4012 8863(anonymous)m 240 fnt1 5171 8861(or)m 240 fnt6 5442 8863(ftp)m 240 fnt1 5758 8861(and)m 6174(an)s 3(y)k 6582(non-empty)s 7685(passw)s 2(ord)k 8657(\(e.g.)s 240 fnt6 480 8575(none)m 240 fnt1 939 8573(\).)m 1175(Lout)s 1680(distrib)s 4(utions)k 2914(are)s 3254(also)s 3685(a)s 4(v)k 6(ailable)k 4585(from)s 5102(the)s 240 fnt6 5443 8575(comp.sour)m 8(ces.misc)k 240 fnt1 7291 8573(ne)m 6(wsgroup,)k 8436(and)s 8832(by)s 480 8285(electronic)m 1474(mail)s 1953(from)s 2477(the)s 2825(author)s 13(.)k 3587(All)s 3947(enquiries)s 4874(to)s 240 fnt6 5113 8287(jef)m 4(f@cs.su.oz.au)k 240 fnt1 6672 8285(.)m [ /Dest /LOUTkingston1995lout_user /DEST pdfmark 0 7780([5])m 480(Jef)s 6(fre)k 3(y)k 1187(H.)s 1463(Kingston.)s 240 fnt6 2504 7782(A)m 2698(User')s 9(s)k 3380(Guide)s 4017(to)s 4255(the)s 4599(Lout)s 5101(Document)s 6148(F)s 25(ormatting)k 7266(System)s 7985(\(V)s 26(er)k 2(sion)k 8833(3\))s 240 fnt1 9022 7780(.)m 480 7492(Basser)m 1177(Department)s 2365(of)s 2636(Computer)s 3653(Science)s 4392(,)s 4499(Uni)s 6(v)k 3(ersity)k 5553(of)s 5824(Sydne)s 3(y)k 6534(,)s 6641(1995)s 7107(.)s [ /Dest /LOUTknuth1984tex /DEST pdfmark 0 6987([6])m 480(Donald)s 1243(E.)s 1493(Knuth.)s 240 fnt6 2256 6989(The)m 2668(T)s 2764 6941(E)m 2871 6989(X)m 3027(Book)s 240 fnt1 3523 6987(.)m 3687(Addison-W)s 19(esle)k 3(y)k 5267(,)s 5374(1984)s 5848(.)s [ /Dest /LOUTreid1980scribe /DEST pdfmark 0 6482([7])m 480(Brian)s 1048(K.)s 1305(Reid.)s 1900(A)s 2110(High-)s 2657(Le)s 6(v)k 3(el)k 3227(Approach)s 4207(to)s 4426(Computer)s 5423(Document)s 6459(Production)s 7506(.)s 7650(In)s 240 fnt6 7885 6484(Pr)m 10(oceedings)k 480 6196(of)m 745(the)s 1073(7th)s 1417(Symposium)s 2548(on)s 2825(the)s 3153(Principles)s 4174(of)s 4438(Pr)s 10(o)k 2(gr)k 3(amming)k 5804(Langua)s 2(g)k 2(es)k 6891(\(POPL\),)s 7723(Las)s 8107(V)s 26(e)k 9(gas)k 8695(NV)s 240 fnt1 9019 6194(,)m 480 5906(pages)m 1076(24\21131)s 1651(,)s 1758(1980)s 2233(.)s [ /Dest /LOUTstrunk1979style /DEST pdfmark 0 5401([8])m 480(W)s 9(illiam)k 1313(Strunk)s 2012(and)s 2416(E.)s 2666(B.)s 2930(White.)s 240 fnt6 3678 5403(The)m 4090(Elements)s 5021(of)s 5302(Style)s 240 fnt1 5759 5401(.)m 5923(Macmillan)s 6955(.)s 7119(Third)s 7708(Edition)s 8409(,)s 8516(1979)s 8987(.)s grestore gsave 1417 -14865 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5808 -15421(110)m grestore grestore grestore pgsave restore showpage %%Page: 111 117 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Helvetica %%+ font Times-Italic /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate gsave 1417 -14867 translate 0.0 0.0 0.0 LoutSetRGBColor 9066 13450 0 13450 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 480 fnt5 0 12406(Index)m [ /Dest /LOUT20_587_all_1 /DEST pdfmark 220 fnt2 0 11809(adjust)m 641(@Break)s 240 fnt1 1444 11812(,)m [ /Rect [1551 11812 1785 11974] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_1 /ANN pdfmark 1551(44)s 0 11524(Adjustment)m 1176(of)s 1447(object)s 2038(,)s [ /Rect [2145 11521 2371 11689] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hadj_4 /ANN pdfmark 2145(55)s 0 11236(Adobe)m 695(Systems,)s 1599(Inc.)s 1955(,)s [ /Rect [2062 11233 2286 11398] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_8 /ANN pdfmark 2062(43)s 0 10948(Alignment)m 240 fnt6 1083 10950(see)m 240 fnt1 1441 10948(mark)m 1993(alignment)s 0 10660(Associati)m 6(vity)k 1256(,)s [ /Rect [1363 10657 1587 10822] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_prec_2 /ANN pdfmark 1363(23)s 220 fnt2 0 10081(@Bac)m 4(kEnd)k 240 fnt1 1145 10084(symbol)m 1852(,)s [ /Rect [1959 10083 2187 10242] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_bend_1 /ANN pdfmark 1959(77)s 220 fnt2 0 9793(@Bac)m 4(kg)k 2(round)k 240 fnt1 1436 9796(symbol)m 2143(,)s [ /Rect [2250 9791 2481 9961] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_back_1 /ANN pdfmark 2250(59)s 220 fnt2 0 9505(@Begin)m 240 fnt1 829 9508(symbol)m 1536(,)s [ /Rect [1643 9505 1871 9670] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_begi_1 /ANN pdfmark 1643(37)s 220 fnt2 0 9217(@BeginHeaderComponent)m 240 fnt1 2692 9220(symbol)m 3399(,)s [ /Rect [3506 9217 3739 9384] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_head_2 /ANN pdfmark 3506(66)s 0 8932(Bibliographies)m 1406(,)s [ /Rect [1513 8927 1741 9094] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_bibl_1 /ANN pdfmark 1513(97)s 0 8644(Body)m 574(of)s 845(a)s 1011(de\207nition)s 1932(,)s [ /Rect [2039 8644 2153 8806] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_3 /ANN pdfmark 2039(4)s 220 fnt2 0 8353(body)m 240 fnt1 534 8356(parameter)m 1495(,)s [ /Rect [1602 8353 1829 8518] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_visi_3 /ANN pdfmark 1602(18)s 0 8068(Braces)m 648(,)s [ /Rect [755 8065 859 8230] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_6 /ANN pdfmark 755(3)s 220 fnt2 0 7777(b)m 240 fnt1 174 7780(unit)m 553(,)s [ /Rect [660 7777 887 7942] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_15 /ANN pdfmark 660(38)s 240 7492(use)m 615(in)s 220 fnt2 858 7489(//1.1b)m 240 fnt1 1406 7492(,)m [ /Rect [1513 7487 1744 7654] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_4 /ANN pdfmark 1513(29)s 220 fnt2 0 6913(@Case)m 240 fnt1 787 6916(symbol)m 1494(,)s [ /Rect [1601 6913 1825 7080] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_case_1 /ANN pdfmark 1601(63)s 0 6628(Centring)m 837(,)s [ /Rect [944 6625 1171 6790] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_31 /ANN pdfmark 944(38)s 220 fnt2 0 6337(@Chapter)m 240 fnt1 1063 6340(e)m 3(xample)k 1873(,)s [ /Rect [1980 6335 2204 6502] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_chap_4 /ANN pdfmark 1980(93)s 0 6052(Chapters)m 901(and)s 1305(sections)s 2073(,)s [ /Rect [2180 6047 2414 6214] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_chap_1 /ANN pdfmark 2180(92)s 220 fnt2 0 5761(@Char)m 240 fnt1 758 5764(symbol)m 1465(,)s [ /Rect [1572 5764 1806 5926] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_10 /ANN pdfmark 1572(44)s 0 5476(Cherry)m 15(,)k 756(L.)s 953(,)s [ /Rect [1060 5473 1275 5638] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_3 /ANN pdfmark 1060(81)s 220 fnt2 0 5185(@ClearHeaderComponent)m 240 fnt1 2655 5188(symbol)m 3362(,)s [ /Rect [3469 5185 3697 5352] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_head_5 /ANN pdfmark 3469(67)s 220 fnt2 0 4897(clines)m 613(@Break)s 240 fnt1 1416 4900(,)m [ /Rect [1523 4900 1757 5062] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_8 /ANN pdfmark 1523(44)s 220 fnt2 0 4609(@ColList)m 240 fnt1 948 4612(e)m 3(xample)k 1758(,)s [ /Rect [1865 4607 2096 4774] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_5 /ANN pdfmark 1865(89)s 0 4324(Column)m 829(mark)s 1328(,)s [ /Rect [1435 4324 1530 4486] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_2 /ANN pdfmark 1435(1)s 0 4036(Comment)m 951(,)s [ /Rect [1058 4033 1291 4200] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_21 /ANN pdfmark 1058(16)s 0 3748(Comment)m 1004(character)s 1885(,)s [ /Rect [1992 3748 2226 3910] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_6 /ANN pdfmark 1992(14)s 220 fnt2 0 3457(@Common)m 240 fnt1 1159 3460(symbol)m 1866(,)s [ /Rect [1973 3457 2208 3624] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_rump_1 /ANN pdfmark 1973(60)s 0 3172(Components)m 1262(of)s 1533(a)s 1699(g)s 1(alle)k 3(y)k 2280(,)s [ /Rect [2387 3171 2615 3334] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_3 /ANN pdfmark 2387(27)s 240 2884(promotion)m 1294(of)s 1512(,)s [ /Rect [1619 2881 1854 3046] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_8 /ANN pdfmark 1619(30)s 0 2596(Concatenation)m 1439(symbols)s 2235(,)s [ /Rect [2342 2593 2570 2758] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_1 /ANN pdfmark 2342(37)s 0 2308(Contraction)m 1186(of)s 1457(object)s 2048(,)s [ /Rect [2155 2305 2389 2473] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hcon_3 /ANN pdfmark 2155(54)s 220 fnt2 0 2017(cr)m 2(agged)k 839(@Break)s 240 fnt1 1642 2020(,)m [ /Rect [1749 2020 1983 2182] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_4 /ANN pdfmark 1749(44)s 0 1732(Cross)m 596(reference)s 1486(,)s [ /Rect [1593 1729 1700 1894] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_1 /ANN pdfmark 1593(8)s 220 fnt2 0 1441(c)m 240 fnt1 165 1444(unit)m 544(,)s [ /Rect [651 1441 878 1606] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_8 /ANN pdfmark 651(38)s 220 fnt2 0 1153(@CurrLang)m 240 fnt1 1185 1156(symbol)m 1892(,)s [ /Rect [1999 1153 2233 1321] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_lang_3 /ANN pdfmark 1999(52)s 220 fnt2 0 577(@Database)m 240 fnt1 1214 580(symbol)m 1921(,)s [ /Rect [2028 579 2243 742] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_data_1 /ANN pdfmark 2028(71)s 0 292(Date,)m 558(printing)s 1368(of)s 1639(current)s 2322(,)s [ /Rect [2429 289 2663 456] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_mome_2 /ANN pdfmark 2429(64)s 4816 11811(Def)m 2(ault)k 5590(v)s 6(alue)k 6158(of)s 6429(parameter)s 7390(,)s [ /Rect [7497 11810 7725 11973] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_name_3 /ANN pdfmark 7497(17)s 4816 11523(De\207nitions)m 5877(,)s [ /Rect [5984 11523 6098 11685] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_1 /ANN pdfmark 5984(4)s 4816 11235(Delimiter)m 5737(,)s [ /Rect [5844 11235 6078 11397] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_11 /ANN pdfmark 5844(14)s 4816 10947(Diag)m 5334(diagram-dra)s 3(wing)k 7030(package)s 7817(,)s [ /Rect [7924 10946 8158 11109] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_grap_4 /ANN pdfmark 7924(74)s 4816 10659(Diagrams)m 5743(,)s [ /Rect [5850 10658 6065 10821] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_grap_2 /ANN pdfmark 5850(71)s 4816 10371(DocumentLayout)m 6551(package)s 7338(,)s [ /Rect [7445 10368 7669 10533] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_1 /ANN pdfmark 7445(83)s 5056 10083(chapters)m 5903(and)s 6307(sections)s 7075(,)s [ /Rect [7182 10078 7416 10245] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_chap_2 /ANN pdfmark 7182(92)s 5056 9795(displays)m 5838(,)s [ /Rect [5945 9792 6179 9957] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_4 /ANN pdfmark 5945(84)s 5056 9507(lists)m 5438(,)s [ /Rect [5545 9504 5771 9672] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_6 /ANN pdfmark 5545(85)s 5056 9219(page)m 5564(layout)s 6169(,)s [ /Rect [6276 9216 6504 9381] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_2 /ANN pdfmark 6276(87)s 5056 8931(paragraphs)m 6103(,)s [ /Rect [6210 8928 6444 9093] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_2 /ANN pdfmark 6210(84)s 220 fnt2 4816 8640(d)m 240 fnt1 4986 8643(unit)m 5365(,)s [ /Rect [5472 8640 5699 8805] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_17 /ANN pdfmark 5472(38)s 4816 8067(Edge-to-edge)m 6160(g)s 1(ap)k 6558(mode)s 7093(,)s [ /Rect [7200 8064 7427 8229] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_19 /ANN pdfmark 7200(38)s 220 fnt2 4816 7776(e)m 240 fnt1 4990 7779(g)m 1(ap)k 5388(mode)s 5923(,)s [ /Rect [6030 7776 6257 7941] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_20 /ANN pdfmark 6030(38)s 220 fnt2 4816 7488(@Enclose)m 240 fnt1 5818 7491(,)m [ /Rect [5925 7488 6159 7653] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_12 /ANN pdfmark 5925(32)s 220 fnt2 4816 7200(@End)m 240 fnt1 5477 7203(symbol)m 6184(,)s [ /Rect [6291 7200 6519 7365] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_begi_2 /ANN pdfmark 6291(37)s 220 fnt2 4816 6912(@EndHeaderComponent)m 240 fnt1 7338 6915(symbol)m 8045(,)s [ /Rect [8152 6912 8385 7079] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_head_3 /ANN pdfmark 8152(66)s 4816 6627(Eq)m 5140(equation)s 6021(formatting)s 7082(package)s 7869(,)s [ /Rect [7976 6624 8191 6789] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_1 /ANN pdfmark 7976(81)s 220 fnt2 4816 6336(@Eq)m 240 fnt1 5354 6339(e)m 3(xample)k 6164(,)s [ /Rect [6271 6336 6486 6501] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_4 /ANN pdfmark 6271(81)s 4816 6051(Escape)m 5549(character)s 6430(,)s [ /Rect [6537 6051 6771 6213] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_5 /ANN pdfmark 6537(14)s 220 fnt2 4816 5760(@Ev)m 5(enP)k 8(ageList)k 240 fnt1 6435 5763(e)m 3(xample)k 7245(,)s [ /Rect [7352 5758 7567 5925] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_10 /ANN pdfmark 7352(91)s 4816 5475(Expansion)m 5884(of)s 6155(object)s 6746(,)s [ /Rect [6853 5472 7087 5640] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hexp_3 /ANN pdfmark 6853(54)s 220 fnt2 4816 5184(e)m 6(xpor)k -8(t)k 240 fnt1 5484 5187(clause)m 6084(,)s [ /Rect [6191 5182 6422 5349] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_visi_4 /ANN pdfmark 6191(19)s 4816 4611(F)m 3(ace)k 5320(of)s 5591(a)s 5757(font)s 6149(,)s [ /Rect [6256 4611 6471 4773] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_3 /ANN pdfmark 6256(41)s 4816 4323(F)m 3(amily)k 5544(of)s 5815(a)s 5981(font)s 6373(,)s [ /Rect [6480 4323 6695 4485] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_2 /ANN pdfmark 6480(41)s 220 fnt2 4816 4032(f)m 6(ollo)k 3(wing)k 240 fnt1 5653 4035(,)m [ /Rect [5760 4030 5871 4197] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_7 /ANN pdfmark 5760(9)s 220 fnt2 4816 3744(f)m 6(ollo)k 3(wing)k 240 fnt1 5653 3747(,)m [ /Rect [5760 3742 5871 3909] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_6 /ANN pdfmark 5760(9)s 4816 3459(F)m 3(onts)k 5343(,)s [ /Rect [5450 3459 5665 3621] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_1 /ANN pdfmark 5450(41)s 220 fnt2 4816 3168(@F)m 6(ont)k 240 fnt1 5528 3171(symbol)m 6235(,)s [ /Rect [6342 3171 6557 3333] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_6 /ANN pdfmark 6342(41)s 220 fnt2 4816 2880(@F)m 6(ootSect)k 240 fnt1 5967 2883(e)m 3(xample)k 6777(,)s [ /Rect [6884 2880 7111 3045] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_4 /ANN pdfmark 6884(88)s 220 fnt2 4816 2592(@F)m 6(orceGalle)k 4(y)k 240 fnt1 6269 2595(symbol)m 6976(,)s [ /Rect [7083 2592 7309 2760] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_gall_2 /ANN pdfmark 7083(65)s 4816 2307(F)m 3(orcing)k 5610(g)s 1(alle)k 3(y)k 6191(,)s [ /Rect [6298 2304 6533 2469] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_10 /ANN pdfmark 6298(30)s 4816 2019(F)m 3(ormfeed)k 5747(,)s [ /Rect [5854 2019 6088 2181] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_9 /ANN pdfmark 5854(14)s 220 fnt2 4816 1728(f)m 240 fnt1 4934 1731(unit)m 5313(,)s [ /Rect [5420 1728 5647 1893] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_11 /ANN pdfmark 5420(38)s 4816 1155(Galle)m 3(ys)k 5541(,)s [ /Rect [5648 1152 5883 1317] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_gall_1 /ANN pdfmark 5648(10)s 5056 867(in)m 5299(detail)s 5831(,)s [ /Rect [5938 866 6166 1029] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_1 /ANN pdfmark 5938(27)s 220 fnt2 4816 576(@Galle)m 4(y)k 240 fnt1 5714 579(symbol)m 6421(,)s [ /Rect [6528 576 6754 744] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_gall_1 /ANN pdfmark 6528(65)s 4816 291(Gap)m 5215(,)s [ /Rect [5322 288 5549 453] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_6 /ANN pdfmark 5322(38)s grestore gsave 1417 -14867 translate 0.0 0.0 0.0 LoutSetRGBColor 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore 192 fnt5 0.0 0.0 0.0 LoutSetRGBColor 5811 -15423(111)m grestore grestore grestore pgsave restore showpage %%Page: 112 118 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(112)m 240 fnt6 9956 -1580(Inde)m 4(x)k gsave 1417 -15423 translate 240 fnt1 9066 13415 0 13415 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 0 13252(Gap)m 452(mode)s 987(,)s [ /Rect [1094 13249 1321 13414] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_18 /ANN pdfmark 1094(38)s 220 fnt2 0 12961(@Gr)m 2(aphic)k 240 fnt1 1044 12964(symbol)m 1751(,)s [ /Rect [1858 12963 2073 13126] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_grap_1 /ANN pdfmark 1858(71)s 220 fnt2 0 12385(@HAdjust)m 240 fnt1 1046 12388(symbol)m 1753(,)s [ /Rect [1860 12385 2086 12553] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hadj_2 /ANN pdfmark 1860(55)s 220 fnt2 0 12097(@HContr)m 2(act)k 240 fnt1 1264 12100(symbol)m 1971(,)s [ /Rect [2078 12097 2312 12265] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hcon_1 /ANN pdfmark 2078(54)s 220 fnt2 0 11809(@HCo)m 3(v)k 5(er)k 240 fnt1 1018 11812(symbol)m 1725(,)s [ /Rect [1832 11809 2065 11977] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_cove_1 /ANN pdfmark 1832(56)s 0 11524(Header)m 750(component)s 1874(of)s 2145(g)s 1(alle)k 3(y)k 2726(,)s [ /Rect [2833 11521 3059 11689] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_head_1 /ANN pdfmark 2833(65)s 0 11236(Height)m 711(of)s 982(an)s 1265(object)s 1856(,)s [ /Rect [1963 11233 2189 11401] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_size_3 /ANN pdfmark 1963(25)s 220 fnt2 0 10945(@HExpand)m 240 fnt1 1173 10948(symbol)m 1880(,)s [ /Rect [1987 10945 2221 11113] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hexp_1 /ANN pdfmark 1987(54)s 220 fnt2 0 10657(h)m 240 fnt1 168 10660(g)m 1(ap)k 566(mode)s 1101(,)s [ /Rect [1208 10657 1435 10822] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_22 /ANN pdfmark 1208(38)s 220 fnt2 0 10369(@High)m 240 fnt1 719 10372(symbol)m 1426(,)s [ /Rect [1533 10369 1757 10537] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_wide_2 /ANN pdfmark 1533(53)s 220 fnt2 0 10081(@HLimited)m 240 fnt1 1135 10084(symbol)m 1842(,)s [ /Rect [1949 10081 2183 10249] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hlim_1 /ANN pdfmark 1949(54)s 220 fnt2 0 9793(@Hline)m 240 fnt1 773 9796(e)m 3(xample)k 1583(,)s [ /Rect [1690 9793 1914 9958] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_7 /ANN pdfmark 1690(83)s 220 fnt2 0 9505(@HMirror)m 240 fnt1 1013 9508(symbol)m 1720(,)s [ /Rect [1827 9505 2053 9673] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hmir_1 /ANN pdfmark 1827(55)s 0 9220(Horizontal)m 1077(concatenation)s 2409(,)s [ /Rect [2516 9217 2744 9382] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_3 /ANN pdfmark 2516(37)s 220 fnt2 0 8929(@HScale)m 240 fnt1 981 8932(symbol)m 1688(,)s [ /Rect [1795 8929 2021 9097] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hsca_1 /ANN pdfmark 1795(55)s 220 fnt2 0 8641(@HShift)m 240 fnt1 875 8644(symbol)m 1582(,)s [ /Rect [1689 8641 1913 8809] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hshi_1 /ANN pdfmark 1689(53)s 220 fnt2 0 8353(@HSpan)m 240 fnt1 939 8356(symbol)m 1646(,)s [ /Rect [1753 8353 1981 8521] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_span_4 /ANN pdfmark 1753(57)s 0 8068(Hyphenation)m 1294(g)s 1(ap)k 1692(mode)s 2227(,)s [ /Rect [2334 8065 2569 8230] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_37 /ANN pdfmark 2334(40)s 0 7780(Hyphenation)m 1294(g)s 1(ap)k 1692(mode)s 2227(,)s [ /Rect [2334 7777 2561 7942] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_21 /ANN pdfmark 2334(38)s 220 fnt2 0 7489(h)m 6(yphen)k 760(@Break)s 240 fnt1 1563 7492(,)m [ /Rect [1670 7489 1896 7657] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_12 /ANN pdfmark 1670(45)s 0 6916(Identi\207er)m 882(,)s [ /Rect [989 6916 1223 7078] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_12 /ANN pdfmark 989(14)s 220 fnt2 0 6625(impor)m -8(t)k 240 fnt1 673 6628(clause)m 1273(,)s [ /Rect [1380 6623 1611 6790] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_visi_5 /ANN pdfmark 1380(19)s 220 fnt2 0 6337(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 2695 6340(symbol)m 3402(,)s [ /Rect [3509 6337 3742 6504] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incr_1 /ANN pdfmark 3509(76)s 220 fnt2 0 6049(@IncludeGr)m 2(aphic)k 240 fnt1 1751 6052(symbol)m 2458(,)s [ /Rect [2565 6049 2791 6217] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incg_1 /ANN pdfmark 2565(75)s 220 fnt2 0 5761(@Include)m 240 fnt1 982 5764(symbol)m 1689(,)s [ /Rect [1796 5763 2024 5922] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incl_1 /ANN pdfmark 1796(77)s 220 fnt2 0 5473(@IndentedDispla)m 6(y)k 240 fnt1 1847 5476(e)m 3(xample)k 2657(,)s [ /Rect [2764 5473 2998 5638] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_5 /ANN pdfmark 2764(84)s 220 fnt2 0 5185(@IndentedList)m 240 fnt1 1474 5188(e)m 3(xample)k 2284(,)s [ /Rect [2391 5185 2624 5352] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_8 /ANN pdfmark 2391(86)s 0 4900(Inde)m 3(x)k 597(\207le)s 958(\(for)s 1375(databases\))s 2366(,)s [ /Rect [2473 4899 2688 5062] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_data_2 /ANN pdfmark 2473(71)s 0 4612(In-paragraph)m 1291(concatenation)s 2623(,)s [ /Rect [2730 4609 2957 4774] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_4 /ANN pdfmark 2730(38)s 220 fnt2 0 4321(@Inser)m -8(t)k 240 fnt1 836 4324(symbol)m 1543(,)s [ /Rect [1650 4321 1865 4488] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_inse_1 /ANN pdfmark 1650(61)s 220 fnt2 0 4033(into)m 240 fnt1 406 4036(clause)m 1006(,)s [ /Rect [1113 4036 1328 4198] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_gall_2 /ANN pdfmark 1113(11)s 0 3748(In)m 9(v)k 4(ocation)k 1067(of)s 1338(a)s 1504(symbol)s 2211(,)s [ /Rect [2318 3748 2432 3910] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_4 /ANN pdfmark 2318(4)s 0 2884(K)m 6(ernighan,)k 1111(B.)s 1322(,)s [ /Rect [1429 2881 1644 3046] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_2 /ANN pdfmark 1429(81)s 0 2596(K)m 6(erning)k 778(,)s [ /Rect [885 2596 1100 2758] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_5 /ANN pdfmark 885(41)s 0 2308(K)m 6(erning)k 831(g)s 1(ap)k 1229(mode)s 1764(,)s [ /Rect [1871 2305 2098 2470] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_27 /ANN pdfmark 1871(38)s 220 fnt2 0 2017(@K)m 8(er)k -5(nShr)k -3(ink)k 240 fnt1 1367 2020(symbol)m 2074(,)s [ /Rect [2181 2015 2412 2185] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_kshr_1 /ANN pdfmark 2181(59)s 220 fnt2 0 1729(@K)m 8(e)k 4(y)k 240 fnt1 647 1732(parameter)m 1608(,)s [ /Rect [1715 1729 1939 1894] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_sort_2 /ANN pdfmark 1715(33)s 220 fnt2 0 1441(k)m 240 fnt1 170 1444(g)m 1(ap)k 568(mode)s 1103(,)s [ /Rect [1210 1441 1437 1606] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_28 /ANN pdfmark 1210(38)s 0 1156(Knuth,)m 706(D.)s 930(,)s [ /Rect [1037 1153 1261 1318] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_8 /ANN pdfmark 1037(83)s 220 fnt2 0 577(langdef)m 240 fnt1 776 580(language)m 1696(de\207nition)s 2617(,)s [ /Rect [2724 577 2958 745] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_lang_2 /ANN pdfmark 2724(52)s 220 fnt2 0 289(@Language)m 240 fnt1 1251 292(symbol)m 1958(,)s [ /Rect [2065 289 2280 457] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_lang_1 /ANN pdfmark 2065(51)s 220 fnt2 4816 13247(@LClos)m 240 fnt1 5652 13250(symbol)m 6359(,)s [ /Rect [6466 13247 6692 13415] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_13 /ANN pdfmark 6466(15)s 4816 12962(LCM)m 5389(\207le)s 5697(,)s [ /Rect [5804 12959 6028 13124] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_9 /ANN pdfmark 5804(43)s 4816 12674(Length)m 5498(,)s [ /Rect [5605 12671 5832 12836] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_7 /ANN pdfmark 5605(38)s 220 fnt2 4816 12383(@LEn)m 4(v)k 240 fnt1 5594 12386(symbol)m 6301(,)s [ /Rect [6408 12383 6634 12551] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_14 /ANN pdfmark 6408(15)s 4816 12098(Letter)m 5445(character)s 6326(,)s [ /Rect [6433 12098 6667 12260] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_2 /ANN pdfmark 6433(14)s 4816 11810(Lig)m 1(atures)k 5715(,)s [ /Rect [5822 11810 6037 11972] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_4 /ANN pdfmark 5822(41)s 220 fnt2 4816 11519(lines)m 5319(@Break)s 240 fnt1 6122 11522(,)m [ /Rect [6229 11522 6463 11684] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_7 /ANN pdfmark 6229(44)s 220 fnt2 4816 11231(@LinkDest)m 240 fnt1 5948 11234(symbol)m 6655(,)s [ /Rect [6762 11229 6993 11398] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_link_2 /ANN pdfmark 6762(69)s 220 fnt2 4816 10943(@LinkSource)m 240 fnt1 6188 10946(symbol)m 6895(,)s [ /Rect [7002 10941 7233 11110] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_link_1 /ANN pdfmark 7002(69)s 220 fnt2 4816 10655(@LInput)m 240 fnt1 5705 10658(symbol)m 6412(,)s [ /Rect [6519 10655 6745 10823] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_15 /ANN pdfmark 6519(15)s 4816 10370(Literal)m 5506(w)s 2(ord)k 6001(,)s [ /Rect [6108 10367 6334 10535] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_19 /ANN pdfmark 6108(15)s 220 fnt2 4816 10079(@LUse)m 240 fnt1 5603 10082(symbol)m 6310(,)s [ /Rect [6417 10079 6643 10247] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_17 /ANN pdfmark 6417(15)s 220 fnt2 4816 9791(@L)m 24(Vis)k 240 fnt1 5494 9794(symbol)m 6201(,)s [ /Rect [6308 9791 6534 9959] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_16 /ANN pdfmark 6308(15)s 4816 9218(Macro)m 5440(,)s [ /Rect [5547 9215 5780 9382] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_22 /ANN pdfmark 5547(16)s 4816 8930(Mark)m 5395(alignment)s 6358(,)s [ /Rect [6465 8930 6560 9092] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_3 /ANN pdfmark 6465(1)s 5056 8642(in)m 5299(detail)s 5831(,)s [ /Rect [5938 8637 6169 8804] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_5 /ANN pdfmark 5938(29)s 4816 8354(Mark-to-mark)m 6230(g)s 1(ap)k 6628(mode)s 7163(,)s [ /Rect [7270 8351 7497 8516] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_23 /ANN pdfmark 7270(38)s 220 fnt2 4816 8063(@Meld)m 240 fnt1 5562 8066(symbol)m 6269(,)s [ /Rect [6376 8063 6611 8230] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_rump_3 /ANN pdfmark 6376(60)s 220 fnt2 4816 7775(@Merge)m 240 fnt1 5713 7778(symbol)m 6420(,)s [ /Rect [6527 7775 6761 7940] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_sort_3 /ANN pdfmark 6527(34)s 4816 7490(Mirroring)m 5811(an)s 6094(object)s 6685(,)s [ /Rect [6792 7487 7018 7655] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hmir_3 /ANN pdfmark 6792(55)s 220 fnt2 4816 7199(@Moment)m 240 fnt1 5888 7202(symbol)m 6595(,)s [ /Rect [6702 7199 6936 7366] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_mome_1 /ANN pdfmark 6702(64)s 220 fnt2 4816 6911(m)m 240 fnt1 5045 6914(unit)m 5424(,)s [ /Rect [5531 6911 5758 7076] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_10 /ANN pdfmark 5531(38)s 220 fnt2 4816 6335(named)m 240 fnt1 5535 6338(parameter)m 6496(,)s [ /Rect [6603 6335 6836 6502] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_name_2 /ANN pdfmark 6603(16)s 4816 6050(Nested)m 5538(de\207nitions)s 6546(,)s [ /Rect [6653 6047 6880 6212] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_visi_1 /ANN pdfmark 6653(18)s 220 fnt2 4816 5759(@Ne)m 6(xt)k 240 fnt1 5540 5762(symbol)m 6247(,)s [ /Rect [6354 5759 6578 5926] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_next_1 /ANN pdfmark 6354(63)s 220 fnt2 4816 5471(noh)m 6(yphen)k 5820(@Break)s 240 fnt1 6623 5474(,)m [ /Rect [6730 5471 6956 5639] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_13 /ANN pdfmark 6730(45)s 6956(,)s [ /Rect [7063 5471 7296 5638] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_15 /ANN pdfmark 7063(46)s 220 fnt2 4816 5183(@NotRe)m 6(v)k 5(ealed)k 240 fnt1 6343 5186(symbol)m 7050(,)s [ /Rect [7157 5183 7385 5350] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_notr_1 /ANN pdfmark 7157(67)s 220 fnt2 4816 4895(@Null)m 240 fnt1 5461 4898(symbol)m 6168(,)s [ /Rect [6275 4895 6501 5063] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_null_1 /ANN pdfmark 6275(65)s 4816 4610(Numbered)m 5884(list)s 6182(,)s [ /Rect [6289 4607 6515 4775] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_7 /ANN pdfmark 6289(85)s 220 fnt2 4816 4319(@NumberOf)m 240 fnt1 6108 4322(e)m 3(xample)k 6918(,)s [ /Rect [7025 4317 7259 4484] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_chap_3 /ANN pdfmark 7025(92)s 4816 3746(Object)m 5460(,)s [ /Rect [5567 3746 5662 3908] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_1 /ANN pdfmark 5567(1)s 220 fnt2 4816 3455(@OddP)m 8(ageList)k 240 fnt1 6355 3458(e)m 3(xample)k 7165(,)s [ /Rect [7272 3453 7487 3620] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_9 /ANN pdfmark 7272(91)s 220 fnt2 4816 3167(o)m 240 fnt1 4991 3170(g)m 1(ap)k 5389(mode)s 5924(,)s [ /Rect [6031 3167 6258 3332] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_26 /ANN pdfmark 6031(38)s 220 fnt2 4816 2879(olines)m 5441(@Break)s 240 fnt1 6244 2882(,)m [ /Rect [6351 2879 6577 3047] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_10 /ANN pdfmark 6351(45)s 220 fnt2 4816 2591(@OneCol)m 240 fnt1 5828 2594(symbol)m 6535(,)s [ /Rect [6642 2591 6866 2759] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_oner_3 /ANN pdfmark 6642(53)s 220 fnt2 4816 2303(@OneOf)m 240 fnt1 5743 2306(symbol)m 6450(,)s [ /Rect [6557 2303 6791 2470] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_oneo_1 /ANN pdfmark 6557(62)s 220 fnt2 4816 2015(@OneP)m 8(age)k 240 fnt1 6010 2018(e)m 3(xample)k 6820(,)s [ /Rect [6927 2013 7162 2180] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_7 /ANN pdfmark 6927(90)s 220 fnt2 4816 1727(@OneRo)m 3(w)k 240 fnt1 5947 1730(symbol)m 6654(,)s [ /Rect [6761 1727 6995 1895] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_oner_1 /ANN pdfmark 6761(52)s 220 fnt2 4816 1439(@Open)m 240 fnt1 5622 1442(symbol)m 6329(,)s [ /Rect [6436 1437 6667 1606] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_open_1 /ANN pdfmark 6436(69)s 4816 1154(Optimal)m 5654(g)s 1(alle)k 3(y)k 6288(breaking)s 7125(,)s [ /Rect [7232 1151 7465 1318] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_opti_1 /ANN pdfmark 7232(36)s 220 fnt2 4816 863(@Optimiz)m 3(e)k 240 fnt1 5953 866(symbol)m 6660(,)s [ /Rect [6767 863 7000 1030] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_opti_2 /ANN pdfmark 6767(36)s 220 fnt2 4816 575(or)m 2(agged)k 5667(@Break)s 240 fnt1 6470 578(,)m [ /Rect [6577 578 6811 740] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_6 /ANN pdfmark 6577(44)s 220 fnt2 4816 287(@OrElse)m 240 fnt1 5761 290(e)m 3(xample)k 6571(,)s [ /Rect [6678 285 6904 455] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_chap_5 /ANN pdfmark 6678(95)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 113 119 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Italic %%+ font Times-Bold %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt6 0.0 0.0 0.0 LoutSetRGBColor 1417 -1580(Inde)m 4(x)k 240 fnt5 10130 -1583(113)m gsave 1417 -15423 translate 240 fnt1 9066 13412 0 13412 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore 0 13249(Other)m 604(character)s 1485(,)s [ /Rect [1592 13249 1826 13411] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_3 /ANN pdfmark 1592(14)s 220 fnt2 0 12958(outdent)m 788(@Break)s 240 fnt1 1591 12961(,)m [ /Rect [1698 12961 1932 13123] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_2 /ANN pdfmark 1698(44)s 220 fnt2 0 12670(@Outline)m 240 fnt1 969 12673(symbol)m 1676(,)s [ /Rect [1783 12670 1998 12838] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_outl_1 /ANN pdfmark 1783(51)s 220 fnt2 0 12382(o)m 3(v)k 5(er)k 240 fnt1 479 12385(e)m 3(xample)k 1289(,)s [ /Rect [1396 12382 1630 12547] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_6 /ANN pdfmark 1396(82)s 0 12097(Ov)m 3(erstrik)k 2(e)k 1059(g)s 1(ap)k 1457(mode)s 1992(,)s [ /Rect [2099 12094 2326 12259] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_25 /ANN pdfmark 2099(38)s 220 fnt2 0 11518(@P)m 26(Adjust)k 240 fnt1 1008 11521(symbol)m 1715(,)s [ /Rect [1822 11518 2048 11686] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hadj_1 /ANN pdfmark 1822(55)s 220 fnt2 0 11230(@P)m 8(age)k 240 fnt1 779 11233(e)m 3(xample)k 1589(,)s [ /Rect [1696 11228 1927 11395] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_6 /ANN pdfmark 1696(89)s 220 fnt2 0 10942(@P)m 8(ageLabel)k 240 fnt1 1309 10945(symbol)m 2016(,)s [ /Rect [2123 10940 2354 11107] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_page_1 /ANN pdfmark 2123(79)s 0 10657(P)m 3(age)k 518(layout)s 240 10369(principles)m 1233(of)s 1451(,)s [ /Rect [1558 10366 1664 10534] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_7 /ANN pdfmark 1558(5)s 240 10081(in)m 483(practice)s 1241(,)s [ /Rect [1348 10078 1576 10243] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_1 /ANN pdfmark 1348(87)s 220 fnt2 0 9790(@P)m 8(ageOf)k 240 fnt1 1016 9793(e)m 3(xample)k 1826(,)s [ /Rect [1933 9790 2161 9955] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_3 /ANN pdfmark 1933(87)s 0 9505(P)m 3(aragraph)k 1023(breaking)s 1860(,)s [ /Rect [1967 9502 2071 9667] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_7 /ANN pdfmark 1967(3)s 240 9217(in)m 483(detail)s 1015(,)s [ /Rect [1122 9214 1357 9379] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_35 /ANN pdfmark 1122(40)s 0 8929(P)m 3(arameter)k 971(,)s [ /Rect [1078 8929 1192 9091] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_5 /ANN pdfmark 1078(4)s 220 fnt2 240 8638(body)m 240 fnt1 774 8641(parameter)m 1735(,)s [ /Rect [1842 8638 2069 8803] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_visi_2 /ANN pdfmark 1842(18)s 220 fnt2 240 8350(named)m 240 fnt1 959 8353(parameter)m 1920(,)s [ /Rect [2027 8350 2260 8517] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_name_1 /ANN pdfmark 2027(16)s 220 fnt2 0 8062(@PlainGr)m 2(aphic)k 240 fnt1 1530 8065(symbol)m 2237(,)s [ /Rect [2344 8062 2570 8230] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_plai_1 /ANN pdfmark 2344(75)s 0 7777(PostScript)m 989(,)s [ /Rect [1096 7777 1222 7940] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_preface_1 /ANN pdfmark 1096(ii)s 240 7489(used)m 737(by)s 220 fnt2 1031 7486(@Gr)m 2(aphic)k 240 fnt1 2022 7489(,)m [ /Rect [2129 7488 2344 7651] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_grap_3 /ANN pdfmark 2129(71)s 240 7201(used)m 737(by)s 220 fnt2 1031 7198(@IncludeGr)m 2(aphic)k 240 fnt1 2729 7201(,)m [ /Rect [2836 7198 3062 7366] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incg_3 /ANN pdfmark 2836(75)s 240 6913(used)m 737(by)s 220 fnt2 1031 6910(@IncludeGr)m 2(aphicRepeated)k 240 fnt1 3673 6913(,)m [ /Rect [3780 6910 4013 7077] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incr_3 /ANN pdfmark 3780(76)s 240 6625(used)m 737(by)s 220 fnt2 1031 6622(@PrependGr)m 2(aphic)k 240 fnt1 2851 6625(,)m [ /Rect [2958 6622 3191 6789] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_prep_3 /ANN pdfmark 2958(76)s 220 fnt2 0 6334(@PP)m 240 fnt1 566 6337(e)m 3(xample)k 1376(,)s [ /Rect [1483 6334 1717 6499] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_3 /ANN pdfmark 1483(84)s 0 6049(Precedence)m 1091(,)s [ /Rect [1198 6046 1422 6211] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_prec_1 /ANN pdfmark 1198(23)s 220 fnt2 0 5758(preceding)m 240 fnt1 958 5761(,)m [ /Rect [1065 5756 1176 5923] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_5 /ANN pdfmark 1065(9)s 220 fnt2 0 5470(@PrependGr)m 2(aphic)k 240 fnt1 1873 5473(symbol)m 2580(,)s [ /Rect [2687 5470 2920 5637] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_prep_1 /ANN pdfmark 2687(76)s 0 5185(Principal)m 917(mark)s 1416(,)s [ /Rect [1523 5182 1750 5347] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_5 /ANN pdfmark 1523(38)s 240 4897(ef)m 6(fect)k 836(on)s 220 fnt2 1133 4894(@OneCol)m 240 fnt1 2145 4897(and)m 220 fnt2 2549 4894(@OneRo)m 3(w)k 240 fnt1 3627 4897(,)m [ /Rect [3734 4894 3968 5062] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_oner_2 /ANN pdfmark 3734(52)s 0 4609(Promotion)m 1067(of)s 1338(components)s 2493(,)s [ /Rect [2600 4606 2835 4771] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_9 /ANN pdfmark 2600(30)s 220 fnt2 0 4318(p)m 240 fnt1 174 4321(unit)m 553(,)s [ /Rect [660 4318 887 4483] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_9 /ANN pdfmark 660(38)s 0 3745(Quote)m 641(character)s 1522(,)s [ /Rect [1629 3745 1863 3907] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_4 /ANN pdfmark 1629(14)s 0 3457(Quoted)m 763(w)s 2(ord)k 1258(,)s [ /Rect [1365 3454 1591 3622] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_20 /ANN pdfmark 1365(15)s 220 fnt2 0 2878(r)m 2(agged)k 729(@Break)s 240 fnt1 1532 2881(,)m [ /Rect [1639 2881 1873 3043] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_3 /ANN pdfmark 1639(44)s 220 fnt2 0 2590(@Ra)m 4(wV)k 17(erbatim)k 240 fnt1 1563 2593(symbol)m 2270(,)s [ /Rect [2377 2590 2604 2755] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_verb_2 /ANN pdfmark 2377(78)s 0 2305(Recepti)m 6(v)k 3(e)k 1003(symbol)s 1710(,)s [ /Rect [1817 2305 2051 2467] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_gall_4 /ANN pdfmark 1817(12)s 0 2017(Recursion)m 974(,)s [ /Rect [1081 2014 1187 2182] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_6 /ANN pdfmark 1081(5)s 220 fnt2 0 1726(@Ref)m 6(erence)k 240 fnt1 1281 1729(e)m 3(xample)k 2091(,)s [ /Rect [2198 1724 2426 1891] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_bibl_2 /ANN pdfmark 2198(97)s 220 fnt2 0 1438(@Ref)m 6(erenceSection)k 240 fnt1 2006 1441(e)m 3(xample)k 2816(,)s [ /Rect [2923 1436 3154 1603] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_bibl_3 /ANN pdfmark 2923(99)s 220 fnt2 0 1150(@Ref)m 240 fnt1 621 1153(e)m 3(xample)k 1431(,)s [ /Rect [1538 1150 1893 1315] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_bibl_4 /ANN pdfmark 1538(100)s 0 865(Re\210ecting)m 1036(an)s 1319(object)s 1910(,)s [ /Rect [2017 862 2243 1030] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hmir_4 /ANN pdfmark 2017(55)s 0 577(Reid,)m 559(Brian)s 1147(K.)s 1371(,)s [ /Rect [1478 574 1585 739] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_3 /ANN pdfmark 1478(8)s 0 289(Right)m 592(justi\207cation)s 1724(,)s [ /Rect [1831 286 2058 451] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_32 /ANN pdfmark 1831(38)s 220 fnt2 4816 13247(r)m -3(lines)k 5395(@Break)s 240 fnt1 6198 13250(,)m [ /Rect [6305 13250 6539 13412] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_9 /ANN pdfmark 6305(44)s 4816 12962(Roman)m 5565(numerals)s 6439(,)s [ /Rect [6546 12959 6774 13124] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_para_9 /ANN pdfmark 6546(87)s 4816 12674(Root)m 5342(g)s 1(alle)k 3(y)k 5923(,)s [ /Rect [6030 12674 6264 12836] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_gall_5 /ANN pdfmark 6030(12)s 5056 12386(in)m 5299(detail)s 5831(,)s [ /Rect [5938 12383 6173 12548] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_6 /ANN pdfmark 5938(30)s 5056 12098(printing)m 5866(of)s 6084(,)s [ /Rect [6191 12095 6426 12260] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_7 /ANN pdfmark 6191(30)s 5056 11810(size)m 5483(of)s 5754(components)s 6962(of)s 7180(,)s [ /Rect [7287 11807 7520 11974] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_size_5 /ANN pdfmark 7287(26)s 220 fnt2 4816 11519(@Rotate)m 240 fnt1 5737 11522(symbol)m 6444(,)s [ /Rect [6551 11519 6778 11687] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_rota_1 /ANN pdfmark 6551(58)s 4816 11234(Rotation)m 5697(of)s 5968(object)s 6559(,)s [ /Rect [6666 11231 6893 11399] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_rota_2 /ANN pdfmark 6666(58)s 4816 10946(Ro)m 6(w)k 5317(mark)s 5816(,)s [ /Rect [5923 10946 6037 11108] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_4 /ANN pdfmark 5923(2)s 220 fnt2 4816 10655(rr)m 2(agged)k 5618(@Break)s 240 fnt1 6421 10658(,)m [ /Rect [6528 10658 6762 10820] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_5 /ANN pdfmark 6528(44)s 220 fnt2 4816 10367(@Rump)m 240 fnt1 5676 10370(symbol)m 6383(,)s [ /Rect [6490 10367 6725 10534] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_rump_2 /ANN pdfmark 6490(60)s 220 fnt2 4816 10079(r)m 240 fnt1 4949 10082(unit)m 5328(,)s [ /Rect [5435 10079 5662 10244] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_16 /ANN pdfmark 5435(38)s 220 fnt2 4816 9791(@Runner)m 240 fnt1 5818 9794(e)m 3(xample)k 6628(,)s [ /Rect [6735 9789 6970 9956] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_page_8 /ANN pdfmark 6735(90)s 220 fnt2 4816 9215(@Scale)m 240 fnt1 5639 9218(symbol)m 6346(,)s [ /Rect [6453 9215 6680 9383] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_scal_1 /ANN pdfmark 6453(58)s 4816 8930(Scaling)m 5586(of)s 5857(object)s 6448(,)s [ /Rect [6555 8927 6781 9095] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hsca_3 /ANN pdfmark 6555(55)s 4816 8642(Scribe)m 5429(,)s [ /Rect [5536 8639 5643 8804] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_2 /ANN pdfmark 5536(8)s 220 fnt2 4816 8351(@Section)m 240 fnt1 5816 8354(e)m 3(xample)k 6626(,)s [ /Rect [6733 8349 6959 8519] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_chap_6 /ANN pdfmark 6733(95)s 220 fnt2 4816 8063(@SetColor)m 240 fnt1 5951 8066(symbol)m 6658(,)s [ /Rect [6765 8063 6992 8228] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_colo_2 /ANN pdfmark 6765(48)s 220 fnt2 4816 7775(@SetColour)m 240 fnt1 6073 7778(symbol)m 6780(,)s [ /Rect [6887 7775 7114 7940] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_colo_1 /ANN pdfmark 6887(48)s 220 fnt2 4816 7487(@SetHeaderComponent)m 240 fnt1 7277 7490(symbol)m 7984(,)s [ /Rect [8091 7487 8324 7654] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_head_4 /ANN pdfmark 8091(66)s 220 fnt2 4816 7199(@SetT)m 26(e)k 6(xture)k 240 fnt1 6132 7202(symbol)m 6839(,)s [ /Rect [6946 7199 7181 7367] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_text_1 /ANN pdfmark 6946(50)s 220 fnt2 4816 6911(@SetUnder)m -3(lineColor)k 240 fnt1 6891 6914(symbol)m 7598(,)s [ /Rect [7705 6909 7936 7076] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_ucol_2 /ANN pdfmark 7705(49)s 220 fnt2 4816 6623(@SetUnder)m -3(lineColour)k 240 fnt1 7013 6626(symbol)m 7720(,)s [ /Rect [7827 6621 8058 6788] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_ucol_1 /ANN pdfmark 7827(49)s 4816 6338(Size)m 5283(of)s 5554(an)s 5837(object)s 6428(,)s [ /Rect [6535 6335 6761 6503] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_size_4 /ANN pdfmark 6535(25)s 4816 6050(small)m 5388(capitals)s 6115(,)s [ /Rect [6222 6050 6456 6212] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_font_7 /ANN pdfmark 6222(42)s 4816 5762(Sorted)m 5498(g)s 1(alle)k 3(ys)k 6169(,)s [ /Rect [6276 5759 6500 5924] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_sort_1 /ANN pdfmark 6276(33)s 4816 5474(Space)m 5390(,)s [ /Rect [5497 5474 5731 5636] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_10 /ANN pdfmark 5497(14)s 5056 5186(when)m 5632(signi\207cant)s 6635(,)s [ /Rect [6742 5181 6973 5348] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_34 /ANN pdfmark 6742(39)s 220 fnt2 4816 4895(@Space)m 240 fnt1 5713 4898(symbol)m 6420(,)s [ /Rect [6527 4895 6760 5062] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_spac_1 /ANN pdfmark 6527(46)s 220 fnt2 4816 4607(@Star)m -8(tHSpan)k 240 fnt1 6226 4610(symbol)m 6933(,)s [ /Rect [7040 4607 7268 4775] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_span_1 /ANN pdfmark 7040(57)s 220 fnt2 4816 4319(@Star)m -8(tHVSpan)k 240 fnt1 6372 4322(symbol)m 7079(,)s [ /Rect [7186 4319 7414 4487] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_span_3 /ANN pdfmark 7186(57)s 220 fnt2 4816 4031(@Star)m -8(tVSpan)k 240 fnt1 6214 4034(symbol)m 6921(,)s [ /Rect [7028 4031 7256 4199] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_span_2 /ANN pdfmark 7028(57)s 4816 3746(Style)m 5363(of)s 5634(an)s 5917(object)s 6508(,)s [ /Rect [6615 3746 6849 3908] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_size_1 /ANN pdfmark 6615(24)s 220 fnt2 4816 3455(s)m 240 fnt1 4979 3458(unit)m 5358(,)s [ /Rect [5465 3455 5692 3620] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_12 /ANN pdfmark 5465(38)s 5056 3170(and)m 220 fnt2 5460 3167(@Space)m 240 fnt1 6357 3170(symbol)m 7064(,)s [ /Rect [7171 3167 7404 3334] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_spac_2 /ANN pdfmark 7171(46)s 220 fnt2 4816 2879(sup)m 240 fnt1 5222 2882(e)m 3(xample)k 6032(,)s [ /Rect [6139 2879 6373 3044] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_exa_equa_5 /ANN pdfmark 6139(82)s 4816 2594(Symbol)m 5563(,)s [ /Rect [5670 2594 5784 2756] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_defi_2 /ANN pdfmark 5670(4)s 220 fnt2 4816 2303(@SysDatabase)m 240 fnt1 6396 2306(symbol)m 7103(,)s [ /Rect [7210 2305 7425 2468] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_data_3 /ANN pdfmark 7210(71)s 220 fnt2 4816 2015(@SysIncludeGr)m 2(aphicRepeated)k 240 fnt1 7877 2018(symbol)m 8584(,)s [ /Rect [8691 2015 8924 2182] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incr_2 /ANN pdfmark 8691(76)s 220 fnt2 4816 1727(@SysIncludeGr)m 2(aphic)k 240 fnt1 6933 1730(symbol)m 7640(,)s [ /Rect [7747 1727 7973 1895] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incg_2 /ANN pdfmark 7747(75)s 220 fnt2 4816 1439(@SysInclude)m 240 fnt1 6164 1442(symbol)m 6871(,)s [ /Rect [6978 1441 7206 1600] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_incl_2 /ANN pdfmark 6978(77)s 220 fnt2 4816 1151(@SysPrependGr)m 2(aphic)k 240 fnt1 7055 1154(symbol)m 7762(,)s [ /Rect [7869 1151 8102 1318] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_prep_2 /ANN pdfmark 7869(76)s 4816 578(T)m 19(ables)k 5432(,)s [ /Rect [5539 578 5653 740] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_obje_5 /ANN pdfmark 5539(2)s 4816 290(T)m 19(ab)k 4(ulation)k 5886(g)s 1(ap)k 6284(mode)s 6819(,)s [ /Rect [6926 287 7153 452] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_29 /ANN pdfmark 6926(38)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 1 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Page: 114 120 %%BeginPageSetup %%PageResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Helvetica /pgsave save def %%IncludeResource: font Times-Roman /Times-Romanfnt1 vec2 /Times-Roman LoutRecode /fnt1 { /Times-Romanfnt1 LoutFont } def %%IncludeResource: font Times-Bold /Times-Boldfnt5 vec2 /Times-Bold LoutRecode /fnt5 { /Times-Boldfnt5 LoutFont } def %%IncludeResource: font Times-Italic /Times-Italicfnt6 vec2 /Times-Italic LoutRecode /fnt6 { /Times-Italicfnt6 LoutFont } def %%IncludeResource: font Helvetica /Helveticafnt2 vec2 /Helvetica LoutRecode /fnt2 { /Helveticafnt2 LoutFont } def 0.0500 dup scale 10 setlinewidth %%EndPageSetup gsave 0 0 translate 240 fnt1 0.0 0.0 0.0 LoutSetRGBColor LoutTextureSolid 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutPageSet grestore gsave 0 0 translate 1.0 1.0 1.0 LoutSetRGBColor 11900 16840 0 16840 240 288 60 LoutGraphic gsave LoutBox gsave 1.0 1.0 1.0 LoutSetRGBColor fill grestore 0 cm setlinewidth stroke grestore gsave 0 16840 translate 0.0000 rotate 240 fnt5 0.0 0.0 0.0 LoutSetRGBColor 1417 -1583(114)m 240 fnt6 9956 -1580(Inde)m 4(x)k gsave 1417 -15423 translate 240 fnt1 9066 13415 0 13415 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore 220 fnt2 0 13248(@T)m 26(agged)k 240 fnt1 989 13251(symbol)m 1696(,)s [ /Rect [1803 13248 2030 13415] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_tagg_1 /ANN pdfmark 1803(68)s 220 fnt2 0 12960(@T)m 26(ag)k 240 fnt1 623 12963(parameter)m 9(,)k 1675(def)s 2(ault)k 2396(v)s 6(alue)k 2964(of)s 3182(,)s [ /Rect [3289 12962 3517 13125] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_name_4 /ANN pdfmark 3289(17)s 0 12675(T)m 19(ar)k 4(get)k 660(of)s 931(cross)s 1473(reference)s 2363(,)s [ /Rect [2470 12670 2581 12837] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_cros_4 /ANN pdfmark 2470(9)s 0 12387(T)m 19(ar)k 4(get)k 660(of)s 931(a)s 1097(g)s 1(alle)k 3(y)k 1678(,)s [ /Rect [1785 12387 2000 12549] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pri_gall_3 /ANN pdfmark 1785(11)s 240 12099(in)m 483(detail)s 1015(,)s [ /Rect [1122 12098 1350 12261] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_2 /ANN pdfmark 1122(27)s 220 fnt2 0 11808(@T)m 26(arget)k 240 fnt1 887 11811(symbol)m 1594(,)s [ /Rect [1701 11808 1916 11973] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_gall_11 /ANN pdfmark 1701(31)s 0 11523(T)m 96 11475(E)m 203 11523(X)m 240 11235(h)m 1(yphenation)k 1427(,)s [ /Rect [1534 11232 1769 11397] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_38 /ANN pdfmark 1534(40)s 240 10947(optimal)m 1025(paragraph)s 2038(breaking)s 2875(,)s [ /Rect [2982 10944 3217 11109] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_36 /ANN pdfmark 2982(40)s 0 10659(T)m 16(e)k 3(xtual)k 766(unit)s 1145(,)s [ /Rect [1252 10659 1486 10821] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_1 /ANN pdfmark 1252(14)s 220 fnt2 0 10368(t)m 240 fnt1 117 10371(g)m 1(ap)k 515(mode)s 1050(,)s [ /Rect [1157 10368 1384 10533] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_30 /ANN pdfmark 1157(38)s 220 fnt2 0 9792(@Under)m -3(line)k 240 fnt1 1215 9795(symbol)m 1922(,)s [ /Rect [2029 9790 2260 9957] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_unde_1 /ANN pdfmark 2029(79)s 0 9507(Underscore)m 1158(character)s 2039(,)s [ /Rect [2146 9507 2380 9669] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_7 /ANN pdfmark 2146(14)s 220 fnt2 0 9216(@Use)m 240 fnt1 665 9219(symbol)m 1372(,)s [ /Rect [1479 9214 1710 9383] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_open_2 /ANN pdfmark 1479(69)s 220 fnt2 0 8640(@V)m 17(Adjust)k 240 fnt1 1017 8643(symbol)m 1724(,)s [ /Rect [1831 8640 2057 8808] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hadj_3 /ANN pdfmark 1831(55)s 220 fnt2 0 8352(@VContr)m 2(act)k 240 fnt1 1252 8355(symbol)m 1959(,)s [ /Rect [2066 8352 2300 8520] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hcon_2 /ANN pdfmark 2066(54)s 220 fnt2 0 8064(@VCo)m 3(v)k 5(er)k 240 fnt1 1006 8067(symbol)m 1713(,)s [ /Rect [1820 8064 2053 8232] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_cove_2 /ANN pdfmark 1820(56)s 220 fnt2 0 7776(@V)m 17(erbatim)k 240 fnt1 1129 7779(symbol)m 1836(,)s [ /Rect [1943 7776 2170 7941] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_verb_1 /ANN pdfmark 1943(78)s 0 7491(V)m 26(ertical)k 797(concatenation)s 2129(,)s [ /Rect [2236 7488 2464 7653] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_2 /ANN pdfmark 2236(37)s 220 fnt2 0 7200(@VExpand)m 240 fnt1 1161 7203(symbol)m 1868(,)s [ /Rect [1975 7200 2209 7368] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hexp_2 /ANN pdfmark 1975(54)s 220 fnt2 0 6912(@VLimited)m 240 fnt1 1123 6915(symbol)m 1830(,)s [ /Rect [1937 6912 2171 7080] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hlim_2 /ANN pdfmark 1937(54)s 220 fnt2 0 6624(@VMirror)m 240 fnt1 1001 6627(symbol)m 1708(,)s [ /Rect [1815 6624 2041 6792] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hmir_2 /ANN pdfmark 1815(55)s 220 fnt2 0 6336(@VScale)m 240 fnt1 969 6339(symbol)m 1676(,)s [ /Rect [1783 6336 2009 6504] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hsca_2 /ANN pdfmark 1783(55)s 220 fnt2 0 6048(@VShift)m 240 fnt1 863 6051(symbol)m 1570(,)s [ /Rect [1677 6048 1901 6216] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_hshi_2 /ANN pdfmark 1677(53)s 220 fnt2 0 5760(@VSpan)m 240 fnt1 927 5763(symbol)m 1634(,)s [ /Rect [1741 5760 1969 5928] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_span_5 /ANN pdfmark 1741(57)s 220 fnt2 0 5472(v)m 240 fnt1 169 5475(unit)m 548(,)s [ /Rect [655 5472 882 5637] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_13 /ANN pdfmark 655(38)s 240 5187(ef)m 6(fect)k 836(on)s 1133(paragraph)s 2146(breaking)s 2983(,)s [ /Rect [3090 5184 3316 5352] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_brea_11 /ANN pdfmark 3090(45)s 0 4611(White)m 640(space)s 1174(,)s [ /Rect [1281 4611 1515 4773] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_8 /ANN pdfmark 1281(14)s 240 4323(when)m 816(signi\207cant)s 1819(,)s [ /Rect [1926 4318 2157 4485] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_33 /ANN pdfmark 1926(39)s 220 fnt2 0 4032(@Wide)m 240 fnt1 774 4035(symbol)m 1481(,)s [ /Rect [1588 4032 1812 4200] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_wide_1 /ANN pdfmark 1588(53)s 0 3747(W)m 9(idth)k 646(of)s 917(an)s 1200(object)s 1791(,)s [ /Rect [1898 3744 2124 3912] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_size_2 /ANN pdfmark 1898(25)s 0 3459(W)m 19(ord)k 531(,)s [ /Rect [638 3456 864 3624] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_det_lexi_18 /ANN pdfmark 638(15)s 220 fnt2 0 3168(w)m 240 fnt1 216 3171(unit)m 595(,)s [ /Rect [702 3168 929 3333] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_14 /ANN pdfmark 702(38)s 220 fnt2 0 2592(x)m 240 fnt1 168 2595(g)m 1(ap)k 566(mode)s 1101(,)s [ /Rect [1208 2592 1435 2757] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_conc_24 /ANN pdfmark 1208(38)s 220 fnt2 0 2016(@Y)m 4(ield)k 240 fnt1 753 2019(symbol)m 1460(,)s [ /Rect [1567 2016 1791 2183] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_case_2 /ANN pdfmark 1567(63)s 220 fnt2 0 1728(@YUnit)m 240 fnt1 814 1731(symbol)m 1521(,)s [ /Rect [1628 1730 1856 1893] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_yuni_1 /ANN pdfmark 1628(47)s 220 fnt2 0 1152(@ZUnit)m 240 fnt1 802 1155(symbol)m 1509(,)s [ /Rect [1616 1154 1844 1317] /Border [0 0 0] /View [ /XYZ null null null ] /Subtype /Link /Dest /LOUT19_4605_pre_yuni_2 /ANN pdfmark 1616(47)s grestore gsave 1417 -15423 translate 240 fnt1 0 0 0 0 240 288 60 LoutGraphic gsave 0 LoutMargSet grestore grestore grestore grestore grestore pgsave restore showpage %%Trailer %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Times-BoldItalic %%+ font Times-Italic %%+ font Helvetica %%+ font Helvetica-Oblique %%+ font Symbol %%+ font Courier %%DocumentSuppliedResources: procset LoutStartUp %%+ procset LoutTabPrependGraphic %%+ procset LoutFigPrependGraphic %%+ procset LoutBasicSetup %%+ encoding vec2 %%Pages: 120 %%EOF lout-3.39/doc/expert/mydefs0000644000076400007640000003451211363700677014356 0ustar jeffjeff def "->" { {Symbol Base} @Font "\256" } #174 decimal def "=>" { {Symbol Base} @Font "\336" } #222 decimal macro @JP { /0.5v } def @Code right x { { Helvetica Base -1p } @Font lines @Break x } macro @JL { //1vx } ################################################### # # # Lout keywords. # # # ################################################### def @@BackEnd { @Code "@BackEnd" } def @@Background { @Code "@Background" } def @@Begin { @Code "@Begin" } def @@BeginHeaderComponent { @Code "@BeginHeaderComponent" } def @@Break { @Code "@Break" } def @@Case { @Code "@Case" } def @@Char { @Code "@Char" } def @@ClearHeaderComponent { @Code "@ClearHeaderComponent" } def @@Common { @Code "@Common" } def @@CurrLang { @Code "@CurrLang" } def @@CurrFamily { @Code "@CurrFamily" } def @@CurrFace { @Code "@CurrFace" } def @@CurrYUnit { @Code "@CurrYUnit" } def @@CurrZUnit { @Code "@CurrZUnit" } def @@Database { @Code "@Database" } def @@End { @Code "@End" } def @@EndHeaderComponent { @Code "@EndHeaderComponent" } def @@Enclose { @Code "@Enclose" } def @@Font { @Code "@Font" } def @@ForceGalley { @Code "@ForceGalley" } def @@Galley { @Code "@Galley" } def @@GetContext { @Code "@GetContext" } def @@Graphic { @Code "@Graphic" } def @@HAdjust { @Code "@HAdjust" } def @@HCover { @Code "@HCover" } def @@HContract { @Code "@HContract" } def @@HExpand { @Code "@HExpand" } def @@HLimited { @Code "@HLimited" } def @@HMirror { @Code "@HMirror" } def @@High { @Code "@High" } def @@HScale { @Code "@HScale" } def @@HShift { @Code "@HShift" } def @@HSpan { @Code "@HSpan" } def @@Include { @Code "@Include" } def @@IncludeGraphic { @Code "@IncludeGraphic" } def @@IncludeGraphicRepeated { @Code "@IncludeGraphicRepeated" } def @@KernShrink { @Code "@KernShrink" } def @@Key { @Code "@Key" } def @@Language { @Code "@Language" } def @@LClos { @Code "@LClos" } def @@LEnv { @Code "@LEnv" } def @@LInput { @Code "@LInput" } def @@LUse { @Code "@LUse" } def @@LVis { @Code "@LVis" } def @@LinkSource { @Code "@LinkSource" } def @@LinkDest { @Code "@LinkDest" } def @@Meld { @Code "@Meld" } def @@Merge { @Code "@Merge" } def @@Moment { @Code "@Moment" } def @@Next { @Code "@Next" } def @@NotRevealed { @Code "@NotRevealed" } def @@Null { @Code "@Null" } def @@OneCol { @Code "@OneCol" } def @@OneOf { @Code "@OneOf" } def @@OneRow { @Code "@OneRow" } def @@Open { @Code "@Open" } def @@Outline { @Code "@Outline" } def @@PAdjust { @Code "@PAdjust" } def @@PageLabel { @Code "@PageLabel" } def @@PlainGraphic { @Code "@PlainGraphic" } def @@PrependGraphic { @Code "@PrependGraphic" } def @@RawVerbatim { @Code "@RawVerbatim" } def @@Rotate { @Code "@Rotate" } def @@Rump { @Code "@Rump" } def @@Insert { @Code "@Insert" } def @@Scale { @Code "@Scale" } def @@SetColor { @Code "@SetColor" } def @@SetColour { @Code "@SetColour" } def @@SetContext { @Code "@SetContext" } def @@SetHeaderComponent { @Code "@SetHeaderComponent" } def @@SetUnderlineColor { @Code "@SetUnderlineColor" } def @@SetUnderlineColour { @Code "@SetUnderlineColour" } def @@Space { @Code "@Space" } def @@StartHSpan { @Code "@StartHSpan" } def @@StartVSpan { @Code "@StartVSpan" } def @@StartHVSpan { @Code "@StartHVSpan" } def @@SysDatabase { @Code "@SysDatabase" } def @@SysInclude { @Code "@SysInclude" } def @@SysIncludeGraphic { @Code "@SysIncludeGraphic" } def @@SysIncludeGraphicRepeated { @Code "@SysIncludeGraphicRepeated" } def @@SysPrependGraphic { @Code "@SysPrependGraphic" } def @@Tag { @Code "@Tag" } def @@Tagged { @Code "@Tagged" } def @@SetTexture { @Code "@SetTexture" } def @@Underline { @Code "@Underline" } def @@URLLink { @Code "@URLLink" } def @@Use { @Code "@Use" } def @@VAdjust { @Code "@VAdjust" } def @@VContract { @Code "@VContract" } def @@VCover { @Code "@VCover" } def @@VExpand { @Code "@VExpand" } def @@Verbatim { @Code "@Verbatim" } def @@VLimited { @Code "@VLimited" } def @@VMirror { @Code "@VMirror" } def @@VScale { @Code "@VScale" } def @@VShift { @Code "@VShift" } def @@VSpan { @Code "@VSpan" } def @@Wide { @Code "@Wide" } def @@Yield { @Code "@Yield" } def @@YUnit { @Code "@YUnit" } def @@ZUnit { @Code "@ZUnit" } ################################################### # # # Miscellaneous, mostly graphical definitions. # # # ################################################### def @TeX { @OneCol { T &0.4fo {-0.2f @VShift E} &0.45fo X } } export sp sb def @Equation body x @Begin def sp left x right y { @OneRow { | "-2p" @Font y ^/0.5fk x } } def sb left x right y { @OneRow { x ^/0.5fk | "-2p" @Font y } } Slope @Font x @End @Equation def @Super left x right y { @OneRow { | -2p @Font y ^/0.5fk x } } def @NineSquare right x { def @Three { x |0.2i x |0.2i x } @Three /0.2i @Three /0.2i @Three } def @Leaders { .. @Leaders } def @HLine { @BackEnd @Case { PostScript @Yield { {0 0 moveto xsize 0 lineto stroke} @Graphic {} } PDF @Yield { {0 0 m __xsize 0 l s} @Graphic {} } } # { 0 0 moveto xsize 0 lineto stroke } @Graphic {} } def @VDashLine right length { length @High { @BackEnd @Case { PostScript @Yield { { 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke } @Graphic {} } # VT: double quotes required: PDF @Yield { { "__pt 3 0 d 0 0 m 0 __ysize l s" } @Graphic {} } } # { 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke } @Graphic {} } } def @LBox right offset { @HContract @VContract { { //0.2c 0.6c @High 1.2c @Wide @BackEnd @Case { PostScript @Yield { { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath gsave 0.9 setgray fill grestore stroke } @Graphic {} } PDF @Yield { { 0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h q 0.9 g f Q s } @Graphic {} } } # { 0 0 moveto xsize 0 lineto # xsize ysize lineto 0 ysize lineto closepath # gsave 0.9 setgray fill grestore stroke } # @Graphic {} } ||offset @VDashLine 1c } } def @Arrow right length { @OneCol @OneRow { 30d @Rotate {0.12c @Wide @HLine} // length @Wide @HLine // "-30d" @Rotate {0.12c @Wide @HLine} } } def @DoubleArrow right length { @OneCol @OneRow { & 180d @Rotate @Arrow length |0io @Arrow length } } def @Put left coord right x { @OneCol @OneRow { coord / | @OneCol @OneRow x } } macro @At { //0io } ################################################### # # # Interpolated example documents. # # # ################################################### def @LittleEndRunPlace { @Galley } def @LittleEndRun force into { @LittleEndRunPlace&&preceding } {} def @LittleTextPlace { @Galley } def @LittleText into { @LittleTextPlace&&preceding } right x { x } def @LittleFootPlace { @Galley } def @LittleFootNote into { @LittleFootPlace&&following } right x { x } def @LittlePageColumn right x { 9px @Break 8p @Font 2.8c @Wide x } def @LittlePage right x { @HContract @VContract { @BackEnd @Case { PostScript @Yield { { 0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke } @Graphic { //0.3c ||0.3c 9px @Break 8p @Font 2.8c @Wide 3.8c @High x ||0.3c //0.3c } } PDF @Yield { { 0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h s } @Graphic { //0.3c ||0.3c 9px @Break 8p @Font 2.8c @Wide 3.8c @High x ||0.3c //0.3c } } } # { 0 0 moveto xsize 0 lineto xsize ysize lineto # 0 ysize lineto closepath stroke } @Graphic # { //0.3c ||0.3c # 9px @Break 8p @Font # 2.8c @Wide 3.8c @High x # ||0.3c //0.3c # } } } def @LittleFootSect { 1c @Wide @HLine //0.3v @LittleFootPlace ||0.5c } def @LittlePageList right @PageNum { @LittlePage { # |0.5rt @PageNum //0.8v //0.3v @LittleTextPlace //1rt @LittleFootSect } // @LittlePageList @Next @PageNum } def @LittleDocument { @LittlePage { @LittleTextPlace //1rt @LittleFootSect } // @LittlePageList 2 // @LittleEndRunPlace } def @ShowMarks named linewidth { @BackEnd @Case { PostScript @Yield { 0.015 cm } PDF @Yield { __mul(0.015, __cm) } } } named linestyle { dashed } named dashlength { @BackEnd @Case { PostScript @Yield { 0.15 cm } PDF @Yield { __mul(0.15, __cm) } } } named paint { lightgrey} right x { @HContract @VContract @Fig { @Box margin { 0c } linewidth { linewidth } paint { paint } { @Figure shape { @BackEnd @Case { PostScript @Yield { -0.3 cm ymark {xsize ymark} ++ {0.3 cm 0} [] xmark -0.3 cm {xmark ysize} ++ {0 0.3 cm} } PDF @Yield { "" # VT: PDF currently has no output } } } linewidth { linewidth } linestyle { linestyle } dashlength { dashlength } x } } } def @ShowVMark named linewidth { 0.015 cm } named linestyle { dashed } named dashlength { 0.15 cm } named paint { light } right x { @Fig { @Figure shape { @BackEnd @Case { PostScript @Yield { xmark -0.3 cm {xmark ysize} ++ {0 0.3 cm} } PDF @Yield { "" # VT: PDF currently has no output } } } linewidth { linewidth } linestyle { linestyle } dashlength { dashlength } x } } def @ShowHMark named linewidth { 0.015 cm } named linestyle { dashed } named dashlength { 0.15 cm } named paint { light } right x { @Fig { @Figure shape { @BackEnd @Case { PostScript @Yield { -0.3 cm ymark {xsize ymark} ++ {0.3 cm 0} } PDF @Yield { "" # VT: PDF currently has no output } } } linewidth { linewidth } linestyle { linestyle } dashlength { dashlength } x } } def @Strange named @Format right @Val { [@Val] } right x { @Format x } def @TightBox right x { @BackEnd @Case { PostScript @Yield { "0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke" @Graphic x } PDF @Yield { "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h s" @Graphic x } } } def @GreyBox right x { @BackEnd @Case { PostScript @Yield { "0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill" @Graphic x } PDF @Yield { "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h 0.8 g f" @Graphic x } } } lout-3.39/doc/expert/pre_tagg0000644000076400007640000000111511363700677014650 0ustar jeffjeff@Section @Title { "@Tagged" } @Tag { tagged } @Begin @PP The @@Tagged tagged.sym @Index { @@Tagged symbol } symbol takes a cross reference for its left parameter and an object, whose value must be a juxtaposition of simple words, or several words, or an empty object, for its right parameter. It has the effect of attaching its right parameter as an additional tag to the invocation denoted by its left parameter, unless the right parameter is empty, in which case @@Tagged does nothing. The result of @@Tagged is always @@Null, which makes it effectively invisible. @End @Section lout-3.39/doc/expert/pre_cove0000644000076400007640000000255011363700677014666 0ustar jeffjeff@Section @Title { "@HCover" and "@VCover" } @Tag { hcover } @Begin @PP hcover. @Index { @@HCover symbol } vcover. @Index { @@VCover symbol } The @@VCover symbol vertically scales its right parameter so that it covers every object that shares its row mark. For example, @ID @Code "@VCover ( 45d @Rotate Hello @VCover )" produces @ID @ShowHMark { @VCover ( 45d @Rotate Hello @VCover ) } The row mark has been added to show clearly where it lies. This should be compared with @ID @Code "@VScale ( 45d @Rotate Hello @VScale )" which produces @ID @ShowHMark { @VScale ( 45d @Rotate Hello @VScale ) } Scaling abandons mark alignment and so is able to exactly cover the rest of the row, whereas covering preserves mark alignment and so is obliged in general to more than cover the rest of the row. @PP If the parameter of @@VCover has zero vertical size, this is taken to mean that covering is not required after all and the @@VCover is silently ignored. If however the parameter has non-zero size above the mark but zero size below, or vice versa, this is taken to be an error since scaling cannot make the parameter cover the rest of the row. @PP @@HCover is similar, horizontally covering all objects that share its column mark. Neither symbol works well near galley targets, because the scale factor to apply is determined before any galley flushing takes place. @End @Section lout-3.39/doc/expert/pre_oner0000644000076400007640000000212611363700677014674 0ustar jeffjeff@Section @Title { "@OneCol" and "@OneRow" } @Tag { onerow } @Begin @PP The @@OneRow symbol onerow.sym @Index { @@OneRow symbol } principal.mark.effect @SubIndex { effect on @@OneCol and @@OneRow } returns its right parameter modified so that only the principal row mark protrudes. This is normally the first row mark, but another one may be chosen by preceding it with @Code "^/" or {@Code "^//"}. For example, @ID @Code { "@OneRow { |0.5rt Slope @Font x + 2 ^//1p @HLine //1p |0.5rt 5 }" } has result @LP @ID { @ShowMarks @OneRow { |0.5rt Slope @Font x + 2 ^//1p @HLine //1p |0.5rt 5 } } @LP with one row mark protruding from the bar as shown. Compare this with @ID @Code { "@OneRow { |0.5rt Slope @Font x + 2 //1p @HLine //1p |0.5rt 5 }" } where the mark protrudes from the numerator: @LP @ID { @ShowMarks @OneRow { |0.5rt Slope @Font x + 2 //1p @HLine //1p |0.5rt 5 } } onecol.sym @Index { @@OneCol symbol } @@OneCol has the same effect on columns as @@OneRow does on rows, with the symbols @Code "^|" and @Code "^||" (or {@Code "^&"}) determining which mark is chosen. @End @Section lout-3.39/doc/expert/pre_link0000644000076400007640000001011711363700677014665 0ustar jeffjeff@Section @Title { "@LinkSource", "@LinkDest", and "@URLLink" } @Tag { link_source } @Begin @PP The two symbols @@LinkSource and @@LinkDest link.source.sym @Index { @@LinkSource symbol } link.dest.sym @Index { @@LinkDest symbol } work together to create @I { cross links } in a document, that is, points where a user viewing the document on screen can click and be transported to another point in the document. We call the point where the user clicks the @I source of the link, and the point where the user arrives the @I destination of the link. @PP To create a source point, place @ID { @I tag @Code "@LinkSource" @I object } at some point in the document, where the value of @I tag is a legal cross reference tag, and @I object is an arbitrary Lout object. The result of this is just {@I object}, but if the user of a screen viewer clicks on any point within the rectangular bounding box of that object, a link will be entered. @PP At present, @I object above is treated as though it were enclosed in @@OneCol. This means that a long link source or destination point will not break over two lines as part of an enclosing paragraph. @PP To create a destination point, place @ID { @I tag @Code "@LinkDest" @I object } at some point in the document. Again, @I tag must evaluate to a legal cross reference tag, and @I object may be any Lout object. All @Code "@LinkSource" symbols whose tag is equal to this one are linked to this destination point. @PP For every source point there must be exactly one destination point with the same tag, otherwise it will not be clear where the link is supposed to take the user. Lout will print a warning if this condition is violated anywhere; it will refuse to insert a destination point with the same name as a previous one, but it is not able to refrain from inserting a source point with no corresponding destination point, and such points must cause errors of some kind when viewed (exactly what error will depend on the viewer). @PP The @@URLLink symbol is similar to @@LinkSource in being the source point of a link, but instead of a tag you supply a URL to some other document altogether: @ID @Code { "\"http://snark.ptc.spbu.ru/~uwe/lout/lout.html\" @URLLink { Lout Home Page }" } The URL will need to be enclosed in quotes, because of the "/" characters which are otherwise taken to be concatenation operations. As for @@LinkSource, the result is just the object to the right, like this: @ID { "http://snark.ptc.spbu.ru/~uwe/lout/lout.html" @URLLink { Lout Home Page } } but if the user clicks on this object on the screen they enter a link that takes them to the given URL location, assuming that the software which they are using to display the document is clever enough to do this. @PP For the purposes of @@Common, @@Rump, and @@Meld, two @@LinkSource objects are considered to be equal if their right parameters are equal; the left parameters are not considered. This behaviour is needed, for example, to make index entries look reasonable when melded. If two @@LinkSource objects with equal right parameters but different left parameters are melded into one, one of the two will be the result, but which one is undefined. Notice that melding cannot produce an undefined link, since the worst it can do is delete a @@LinkSource. @PP Practically speaking, the right parameters of @@LinkSource and @@URLLink need to be non-null, non-empty objects, since otherwise there is nothing visible for the user to click on. (This condition is not checked or enforced by Lout.) However, the right parameter of @@LinkDest could reasonably be empty or null. Usually, when @@Null lies inside a non-concatenation object, for example @ID "@OneCol @Null" the effect of the @@Null is lost -- the result in this example is equivalent to an empty object. However, when the right parameter of @@LinkDest is @@Null: @ID "@LinkDest @Null" or when it is some object treated like @@Null by Lout (e.g. a @@Tagged symbol), then the @@LinkDest itself has the effect on surrounding concatentation operators that @@Null has, allowing it to be made effectively invisible in the printed document, though still really there. @End @Section lout-3.39/doc/expert/det_prec0000644000076400007640000000706611363700677014660 0ustar jeffjeff@Section @Title { Precedence and associativity of symbols } @Tag { precedence } @Begin @PP Every symbol in Lout has a {@I precedence}, preceden @Index { Precedence } which is a positive whole number. When two symbols compete for an object, the one with the higher precedence wins it. For example, @ID @Code { "a | b / c" } is equivalent to @OneCol @Code { "{" a "|" b "}" "/" c } rather than {@OneCol @Code { a "|" "{" b "/" c "}"} }, because @Code "|" has higher precedence than @Code "/" and thus wins the {@Code b}. @PP When the two competing symbols have equal precedence, Lout applies a second rule. Each symbol is either @I left-associative or associativity @Index { Associativity } {@I right-associative}. The value of @OneCol @Code { a op1 b op2 c} is taken to be @OneCol @Code { "{" a op1 b "}" op2 c } if the symbols are both left-associative, and @OneCol @Code "a op1 { b op2 c }" if they are right-associative. In cases not covered by these two rules, use braces. @PP It sometimes happens that the result is the same regardless of how the expression is grouped. For example, @OneCol @Code { "{" a "|" b "}" "|" c } and @OneCol @Code { a "|" "{" b "|" c "}" } are always the same, for any combination of objects, gaps, and variants of {@Code "|"}. In such cases the symbols are said to be {@I associative}, and we can confidently omit the braces. @PP User-defined symbols may be given a precedence and associativity: @ID @OneRow @Code { "def @Super" " precedence 50" " associativity right" " left x" " right y" "{" " @OneRow { | -2p @Font y ^/0.5fk x }" "}" } They come just after any @Code into clause and before any parameter definitions. The precedence may be any whole number between 10 and 100, and if omitted is assigned the value 100. The higher the number, the higher the precedence. The associativity may be @Code left or {@Code right}, and if omitted defaults to {@Code right}. @PP In the example above, the precedence and associativity are both literal words ({@Code 50} and {@Code right}). It is also possible to define a macro whose value is a suitable literal word, and invoke that macro as the value of a precedence or associativity. But arbitrary expressions, including invocations of symbols other than macros, are not permitted. @PP Lout's symbols have the following precedences and associativities: @ID @Tab vmargin { 0.5vx } @Fmta { @Col @CC A ! @Col @CC B ! @Col C } { @Rowa A { Precedence } B { Associativity } C { Symbols } @Rowa @Rowa A { 5 } B { associative } C { @Code "/ ^/ // ^//" } @Rowa A { 6 } B { associative } C { @Code "| ^| || ^||" } @Rowa A { 7 } B { associative } C { @Code "& ^&" } @Rowa A { 7 } B { associative } C { @Code "&" in the form of one or more white space characters } @Rowa A { 10-100 } B { @Code left or @Code right } C { user-defined symbols } @Rowa A { 100 } B { @Code right } C { @@Wide, @@High, @@Graphic, etc. } @Rowa A { 101 } B { - } C { @Code "&&" } @Rowa A { 102 } B { associative } C { @Code "&" in the form of 0 spaces } @Rowa A { 103 } B { - } C { Body parameters and right parameters of @@Open } } Actually the precedence of juxtaposition (two objects separated by zero spaces) is a little more complicated. If either of the two objects is enclosed in braces, the precedence is 7 as for one or more spaces. If neither object is enclosed in braces, the precedence is 102 as shown above. This complicated rule seems to accord better with what people expect and need in practice than a pure precedence rule can do. @End @Section lout-3.39/doc/expert/pre_hmir0000644000076400007640000000160411363700677014670 0ustar jeffjeff@Section @Title { "@HMirror" and "@VMirror" } @Tag { hmirror } @Begin @PP hmirro. @Index { @@HMirror symbol } vmirro. @Index { @@VMirror symbol } mirroring @Index { Mirroring an object } reflecting @Index { Reflecting an object } @@HMirror and @@VMirror cause their right parameter to be reflected, either horizontally or vertically. For example, @ID @Code { "@HMirror AMBULANCE" } has result @ID @HMirror AMBULANCE and @ID @Code { "@VMirror AMBULANCE" } has result @ID @VMirror AMBULANCE The parameters of these symbols may be arbitrary Lout objects as usual. Both symbols have both a @@OneCol and a @@OneRow effect. @PP In each case the reflection is about the mark of the object (that is, the reflected objects have the same marks as the originals), so that, for example, when used within a line of text the results are @HMirror AMBULANCE and @VMirror AMBULANCE respectively. @End @Section lout-3.39/doc/expert/det0000644000076400007640000000050011363700677013631 0ustar jeffjeff@Chapter @Title { Details } @Tag { details } @Begin @BeginSections @Include { det_lexi } @Include { det_name } @Include { det_visi } @Include { det_filt } @Include { det_prec } @Include { det_size } @Include { det_gall } @Include { det_sort } @Include { det_hori } @Include { det_opti } @EndSections @End @Chapter lout-3.39/doc/expert/pre_incl0000644000076400007640000000404011363700677014653 0ustar jeffjeff@Section @Tag { include } @Title { "@Include and @SysInclude" } @Begin @PP include.sym @Index { @@Include symbol } sysinclude.sym @Index { @@SysInclude symbol } These symbols instruct Lout to temporarily switch to reading another file, whose name appears in braces following the symbol. For example, @ID @Code { "@Include { \"/usr/lout/langdefs\" }" } will cause the contents of file "/usr/lout/langdefs" to be read at the point it occurs. After that file is read, the current file is resumed. The included file may contain arbitrary Lout text, including other @@Include commands. The file is searched for first in the current directory, then in a sequence of standard places which are not necessarily the same places that databases are searched for. @@SysInclude searches the standard places only. @PP From Version 3.27, a special behaviour has been instituted when an attempt is made to @@Include or @@SysInclude the same file twice. If a second or subsequent attempt occurs after the end of definitions, @@Use clauses, and @@Database clauses (i.e. if it occurs within the content of the document), it will go ahead, thus allowing the repeated inclusion of files containing objects -- not necessarily recommended, but certainly one way of repeating information. But if a second or subsequent attempt occurs within the region of definitions, @@Use clauses, and @@Database clauses, then that attempt will be silently ignored. @PP This behaviour is useful for situations where two packages depend on a third, caled, say, {@Code C }. We can then place @ID @Code "@SysInclude { C }" at the start of both packages. If neither package is included, then {@Code C} won't be either. But if one or both is included, then {@Code C} will be included just once at the start of the first. Any pattern of acyclic dependencies between packages can be expressed with this mechanism, just by including every package that a given package depends on at the start of the file containing that package. Cyclic dependencies are beyond Lout's one-pass comprehension anyway. @End @Section lout-3.39/doc/expert/pri0000644000076400007640000000061111363700677013652 0ustar jeffjeff@Chapter @Title { Principles } @Tag { principles } @Begin @LP The Lout document formatting language is based on just four key ideas: objects, definitions, cross references, and galleys. This chapter concentrates on them, postponing the inevitable details. @BeginSections @Include { pri_obje } @Include { pri_defi } @Include { pri_cros } @Include { pri_gall } @EndSections @End @Chapter lout-3.39/doc/expert/pre_unde0000644000076400007640000000303211363700677014661 0ustar jeffjeff@Section @Tag { underline } @Title { "@Underline" } @Begin @PP underline.sym @Index { @@Underline symbol } The @@Underline symbol underlines its right parameter, but only if that parameter is a word or a paragraph: @ID @Code "We @Underline { really do } mean this." produces @ID { We @Underline { really do } mean this. } It is not possible to underline an arbitrary object using this symbol; the @@Underline symbol will be ignored if this is attempted. @PP It is very easy to @I define a symbol which will underline an arbitrary object, using the @@Graphic symbol. This raises the question of why @@Underline is needed at all. The answer is that @@Underline has two properties that distinguish it from symbols based on @@Graphic. @PP First, when @@Underline both contains a paragraph and is used within a paragraph, as in the example above, the inner and outer paragraphs are merged into one, permitting the underlined text to break over several lines. This is how the @@Font symbol works too, but symbols based on @@Graphic do not permit this merging. @PP Second, Adobe font files specify the correct position and thickness of underlining for each font, and the @@Underline symbol follows these specifications. The font used is the font of the first object underlined, if it is a simple word, or else the font of the enclosing paragraph. @PP The colour of the underline is usually the same as the colour of the text being underlined, but this can be changed using the @@SetUnderlineColour symbol (Section {@NumberOf underline_colour}). @End @Section lout-3.39/doc/expert/pre_wide0000644000076400007640000000172111363700677014661 0ustar jeffjeff@Section @Title { "@Wide" and "@High" } @Tag { wide } @Begin @PP The @@Wide symbol wide.sym @Index { @@Wide symbol } returns its right parameter modified to have the width given by its left parameter, which must be a length (Section {@NumberOf concatenation}) whose unit of measurement is {@Code "c"}, {@Code "i"}, {@Code "p"}, {@Code "m"}, {@Code "f"}, {@Code "s"}, or {@Code "v"}. If the right parameter is not as wide as required, white space is added at the right; if it is too wide, its paragraphs are broken (Section {@NumberOf break}) so that it fits. A @@OneCol operation is included in the effect of @@Wide, since it does not make sense for an object of fixed width to have two column marks. @PP high.sym @Index { @@High symbol } The @@High symbol similarly ensures that its result is of a given height, by adding white space at the bottom. In this case it is an error for the right parameter to be too large. A @@OneRow operation is included. @End @Section lout-3.39/doc/expert/tex0000644000076400007640000002737111363700677013674 0ustar jeffjeff@Appendix @Title { Implementation of Textures } @Tag { tex } @Begin The following notes detail how PostScript patterns have been used to produce textures. See the PostScript Language Reference Manual, second edition (PLRM), especially Section 4.9. @PP PostScript patterns are implemented as color spaces, whereas from a logical point of view they are really separate entities in the graphics state, independent of color (except that a colored texture overrides any current color while it is in effect). To ensure that Lout's @@SetTexture and @@SetColour symbols have this desired independence of each other, the following operators are defined in the Lout prologue: @CD @Tbl mv { 0.5vx } bfont { Italic } bformat { @StartHSpan @Cell i { ctr } A | @HSpan | @HSpan | @Cell D } aformat { @Cell i { right } @Code A | @Cell @Code B | @Cell mr { 1c } @Code "-" | @Cell D } { @Rowb ma { 0i } A { Lout-defined operator } D { What it replaces } rb { yes } @Rowa A { num } B { LoutSetGray } D { setgray } @Rowa A { num num num } B { LoutSetRGBColor } D { setrgbcolor } @Rowa A { num num num } B { LoutSetHSBColor } D { sethsbcolor } @Rowa A { num num num num } B { LoutSetCMYKColor } D { setcmykcolor } @Rowa A { p } B { LoutSetTexture } D { setpattern } rb { yes } mb { 0i } } These have similar signatures to the corresponding PostScript operators shown, and the idea is to use the Lout-defined versions where you would normally use the PostScript ones. The first four set the color without disturbing any current texture; the last sets the texture without disturbing any current color. Here @Code { p } may be the PostScript {@Code null} object, meaning no texture i.e. normal filling, or else it must be an instantiated pattern dictionary, as returned by @Code { makepattern }. @PP There are three key data types used by this code: @BulletList @LI { A colorspace, denoted @Code { cs }, is a PostScript colorspace array and may have one of the following values: @DP @RID @Tbl mv { 0.6vx } aformat { @Cell @Code A | @Cell B } { @Rowa ma { 0i } A { "[ /DeviceGray ]" } B { The greyscale colorspace } @Rowa A { "[ /DeviceRGB ]" } B { The RGB colorspace } @Rowa A { "[ /DeviceCMYK ]" } B { The CMYK colorspace } @Rowa A { "[ /Pattern ]" } B { A colored pattern } @Rowa mb { 0i } A { "[ /Pattern /name ]" } B { An uncolored pattern; @Code "/name" may be {@Code "/DeviceGray"}, {@Code "/DeviceRGB"}, or {@Code "/DeviceCMYK"} } } } @LI { A color, denoted c, is an array containing a PostScript non-pattern color and thus may have one of the following values: @ID @Tbl mv { 0.6vx } aformat { @Cell @Code A | @Cell B } { @Rowa ma { 0i } A { "[ grey ]" } B { A @Code "/DeviceGray" color } @Rowa A { "[ red green blue ]" } B { A @Code "/DeviceRGB" color } @Rowa A { "[ c m y k ]" } B { A @Code "/DeviceCMYK" color } mb { 0i } } We enclose colors in an array to make it easy for us to deal with their varying length. The array has to be unpacked with @Code "aload" before calling {@Code setcolor}. } @LI { A pattern, denoted {@Code "p"}. For us, a pattern is either the PostScript null object, meaning to fill with solid color, or else it is a dictionary as returned by {@Code makepattern}. When such a dictionary is installed in the current graphics state, this code guarantees that it will contain two extra entries: @ID @Tbl mv { 0.6vx } aformat { @Cell @Code A | @Cell B } { @Rowa ma { 0i } A { "/UnderlyingColorSpace" } B { A @Code cs as defined above } @Rowa A { "/UnderlyingColor" } B { A @Code c as defined above } mb { 0i } } We need these extra entries to make color independent of texture: without them we would lose the current color when we set a texture. Because of these variables we can't share pattern dictionaries among graphics states. We must copy them. } @EndList This representation obeys the following invariant: @BulletList @LI { All components of the PostScript graphics state related to pattern and color have defined values (e.g. there is never a situation where we set color space but not color). } @LI { If the PostScript graphics state contains a @Code "/Pattern" colorspace, the pattern dictionary stored in the state has @Code "/UnderlyingColorSpace" and @Code "/UnderlyingColor" entries of types @Code cs and {@Code c}. } @LI { If the graphics state contains an uncolored @Code "/Pattern" colorspace, then the @Code "/UnderlyingColorSpace" and @Code "/UnderlyingColor" entries of the pattern dictionary stored in the state agree with the underlying color space and color stored in the graphics state. } @EndList And it has the following abstraction function: @BulletList @LI { If the graphics state colorspace is {@Code "/Pattern"}, then the abstract current texture is the pattern dictionary stored in the graphics state color. If the graphics state colorspace is not {@Code "/Pattern"}, then the abstract current texture is {@Code null}. } @LI { If the graphics state colorspace is {@Code "/Pattern"}, then the abstract colorspace and color are the values of @Code "/UnderlyingColorSpace" and @Code "/UnderlyingColor" in the pattern dictionary stored in the graphics state color. If the graphics state colorspace is not {@Code "/Pattern"}, then the abstract current colorspace and color are as returned by @Code "currentcolorspace" and {@Code "[ currentcolor ]"}. } @EndList The following functions are private helpers for the public functions: @IndentedList @LI @OneRow -2px @Break @F @Verbatim @Begin % Current pattern (may be null): - LoutCurrentP p /LoutCurrentP { %% - currentcolorspace %% [ /name etc ] 0 get /Pattern eq %% bool { %% - (have pattern) [ currentcolor ] %% [ comp0 ... compn p ] dup length 1 sub get %% p } { %% - (no pattern) null %% null } ifelse %% p } def @End @Verbatim @LI @OneRow -2px @Break @F @Verbatim @Begin % Current color and color space: - LoutCurrentCCS c cs /LoutCurrentCCS { LoutCurrentP dup null eq %% p bool { %% null pop [ currentcolor ] %% c currentcolorspace %% c cs } { %% p dup %% p p /UnderlyingColor get exch %% c p /UnderlyingColorSpace get %% c cs } ifelse %% c cs } def @End @Verbatim @LI @OneRow -2px @Break @F @Verbatim @Begin % Make c, cs, and p current: c cs p LoutSetCCSP - /LoutSetCCSP { %% c cs p dup null eq %% c cs p bool { %% c cs p (null pattern) pop setcolorspace %% c aload pop setcolor %% - } { %% c cs p (non-null pattern) % copy pattern dictionary 12 dict copy %% c cs p % record cs and c in p dup /UnderlyingColorSpace %% c cs p p /UCS 3 index put %% c cs p dup /UnderlyingColor %% c cs p p /UC 4 index put %% c cs p % do setcolorspace and setcolor dup /PaintType get 1 eq %% c cs p bool { %% c cs p (colored pattern) [/Pattern] setcolorspace %% c cs p setcolor %% c cs pop pop %% - } { %% c cs p (uncolored pattern) [ /Pattern %% c cs p [ /Pattern 4 -1 roll %% c p [ /Pattern cs ] setcolorspace %% c p exch aload length 1 add %% p comp1 ... compm m+1 -1 roll %% comp1 ... compm p setcolor %% - } ifelse %% - } ifelse %% - } def @End @Verbatim @EndList With the helper functions it's now easy to derive the colour and texture setting commands that we are offering to our end users. When setting the color we pass it, plus the current pattern, to {@Code "LoutSetCCSP"}; when setting the pattern we pass it, plus the current color, to {@Code "LoutSetCCSP"}. Note that there is no {@Code "/DeviceHSB"}: @Code "hsb" is a variant of {@Code "rgb"}. @IndentedList @LI @OneRow -2px @Break @F @Verbatim @Begin % num LoutSetGray - /LoutSetGray { [ 2 1 roll ] %% c [ /DeviceGray ] %% c cs LoutCurrentP %% c cs p LoutSetCCSP %% - } def @End @Verbatim @LI @OneRow -2px @Break @F @Verbatim @Begin % r g b LoutSetRGBColor - /LoutSetRGBColor { %% r g b [ 4 1 roll ] %% c [ /DeviceRGB ] %% c cs LoutCurrentP %% c cs p LoutSetCCSP %% - } def @End @Verbatim @LI @OneRow -2px @Break @F @Verbatim @Begin % h s b LoutSetHSBColor - /LoutSetHSBColor { %% h s b gsave sethsbcolor %% - currentrgbcolor grestore %% r g b LoutSetRGBColor %% - } def @End @Verbatim @LI @OneRow -2px @Break @F @Verbatim @Begin % c m y k LoutSetRGBColor - /LoutSetCMYKColor { [ 5 1 roll ] %% c [ /DeviceCMYK ] %% c cs LoutCurrentP %% c cs p LoutSetCCSP %% - } def @End @Verbatim @LI @OneRow -2px @Break @F @Verbatim @Begin % p LoutSetTexture - /LoutSetTexture { LoutCurrentCCS %% p c cs 3 -1 roll %% c cs p LoutSetCCSP %% - } def @End @Verbatim @EndList All we need now is some sample textures. Textures are just pattern dictionaries as returned by {@Code "makepattern"}. Here is a PostScript function that appears in the Lout prologue. Its function is to simplify the production of textures. It first takes six parameters to specify a transformation of the texture used to build the matrix taken by {@Code makepattern}, then five parameters that go into the pattern dictionary. @IndentedList @LI @OneRow -2px @Break @F @Verbatim @Begin % % LoutMakeTexture p /LoutMakeTexture { %% s sx sy r h v pt bb xs ys pp 12 dict begin %% s sx sy r h v pt bb xs ys pp /PaintProc exch def %% s sx sy r h v pt bb xs ys /YStep exch def %% s sx sy r h v pt bb xs /XStep exch def %% s sx sy r h v pt bb /BBox exch def %% s sx sy r h v pt /PaintType exch def %% s sx sy r h v /PatternType 1 def %% s sx sy r h v /TilingType 1 def %% s sx sy r h v currentdict end %% s sx sy r h v p 7 1 roll %% p s sx sy r h v matrix translate %% p s sx sy r mat1 5 1 roll %% p mat1 s sx sy r matrix rotate %% p mat1 s sx sy mat2 4 1 roll %% p mat1 mat2 s sx sy matrix scale %% p mat1 mat2 s mat3 exch dup matrix scale %% p mat1 mat2 mat3 mat4 matrix concatmatrix %% p mat1 mat2 mat34 matrix concatmatrix %% p mat1 mat234 matrix concatmatrix %% p mat1234 /makepattern where { %% p mat123 dict pop makepattern %% p } { %% p mat123 pop pop null %% null } ifelse %% p (may be null) } def @End @Verbatim @EndList For examples of textures using {@Code LoutMakeTexture}, consult the standard include file {@Code coltex}. There is only one built-in texture, {@Code LoutTextureSolid}: @IndentedList @LI @OneRow -2px @Break @F @Verbatim @Begin /LoutTextureSolid { null LoutSetTexture } def @End @Verbatim @RawEndList @End @Appendix lout-3.39/doc/expert/det_hori0000644000076400007640000000775211363700677014672 0ustar jeffjeff@Section @Title { Horizontal galleys } @Tag { horizontal } @Begin @PP All the galleys so far have been @I { vertical galleys }: galleys whose components are separated by vertical concatenation symbols. There are also horizontal galleys, whose components are separated by the horizontal concatenation operator @Code "&" (or equivalently, by spaces). These work in the same way as vertical galleys, except for the change of direction. For example, the following defines the equivalent of an ordinary outdented paragraph, except that an option is provided for varying the size of the outdent: @ID @Code { "def @OutdentPar" " named outdent { 2f }" " right x" "{" " def @ParPlace { @Galley }" "" " def @LineList" " {" " outdent @Wide {} | @PAdjust @ParPlace" " //1vx @LineList" " }" "" " def @ParGalley force horizontally into { @ParPlace&&preceding }" " right x" " {" " x" " }" "" " @PAdjust @ParPlace" " // @ParGalley { x &1rt }" " //1vx @LineList" "}" } Notice the use of @Code "&1rt" to cancel the effect of @Code "@PAdjust" on the last line of the paragraph. This definition has a problem in that there will be a concluding unexpanded @Code "@LineList" symbol which will hold up promotion of the enclosing galley; this problem may be fixed by the same method used to end a list. @PP In an ideal world, there would be nothing further to say about horizontal galleys. However there are a few differences which arise from various practical considerations and limitations. Perhaps some day a more perfect symmetry will be implemented. @PP Each vertical galley has a fixed finite width, and every component is broken to that width. This is needed basically to trigger paragraph breaking. However, there is no equivalent of paragraph breaking in the vertical direction, so horizontal galleys do not have any particular fixed height. Instead, each component has its own individual height. @PP When two objects are separated by {@Code "/"}, they are assigned the same width (Section {@NumberOf targets}), and this holds true even if the two objects are subsequently separated by being promoted into different targets. For example, two aligned equations will have the same width, and hence their alignment will be preserved, even if they appear in different columns or pages. However, even though @Code "&" aligns the marks of its two parameters, it does not assign them a common height. This means that the height of any component of a horizontal galley promoted into one target does not affect the height consumed by the components promoted into any other target. The other horizontal concatenation operator, {@Code "|"}, does assign a common height to its two parameters; but sequences of objects separated by this operator cannot be the components of a horizontal galley. @PP Lout is able to read vertical galleys one paragraph at a time; in this way it processes the document in small chunks, never holding more than a few pages in memory at any time. However, horizontal galleys are always read in completely, so they should not be extremely long. @PP In principle Lout should be able to hyphenate the components of horizontal galleys when they are simple words, but this is not implemented at present. @PP In an ideal world, every paragraph would be treated as a horizontal galley. However, to do so in practice would be too slow and would lead to excessive clumsiness in notation, so at present Lout has two competing mechanisms in this area: the built-in paragraph breaker with its limited set of options as given under the @Code "@Break" operator, and horizontal galleys. As the example above shows, horizontal galleys are in principle capable of implementing many more paragraph styles than the built-in paragraph breaker could ever hope to do. The recommended practical strategy is to use the built-in paragraph breaker most of the time, and switch to horizontal galleys only for occasional tricks, such as paragraphs with drop capitals, circular outlines, etc. @End @Section lout-3.39/doc/expert/pre_ucol0000644000076400007640000000156511363700677014701 0ustar jeffjeff@Section @Title { "@SetUnderlineColour" and "@SetUnderlineColor" } @Tag { underline_colour } @Begin @PP The @@SetUnderlineColour and @@SetUnderlineColor symbols, setunderlinecolour.sym @Index { @@SetUnderlineColour symbol } setunderlinecolor.sym @Index { @@SetUnderlineColor symbol } which have identical effect, ensure that any underlining in the right parameter is done in the colour specified by their left parameter. The left parameter is a colour as for @@SetColour in Section {@NumberOf colour}. @PP To actually get underlining, you have to use the @@Underline symbol (Section {@NumberOf underline}). @PP Note that the @@SetColour symbol from Section {@NumberOf colour} includes the effect of @@SetUnderlineColour, so in the usual case where underlining is to be in the same colour as the text being underlined, there is no need to use @@SetUnderlineColour. @End @Section lout-3.39/doc/expert/preface0000644000076400007640000000267311442245356014473 0ustar jeffjeff@Preface @Tag { preface } @Begin @PP @IndexBlanks This manual is addressed to those who wish to become expert users of the Lout document formatting system. An expert user is someone who understands the principles of document formatting that Lout embodies, and is able to apply them, for example to design a document format or a special-purpose package. In contrast, a non-expert user is someone who simply uses Lout to format documents. @PP Chapter {@NumberOf principles} explains these principles, and it should be read carefully and in sequence. Chapters {@NumberOf details} and {@NumberOf symbols} are for reference; respectively, they contain descriptions of the detailed operation of Lout's major components, and a complete description of each predefined symbol. The final chapter presents a collection of advanced examples. @PP This manual presents Version 3 of Basser Lout, publicly released in September 1994 @Cite { $kingston1995lout.program } and developed continuously since then. This manual was rendered into PostScript postscript @Index { PostScript } by Version 3.39 of the Basser Lout interpreter, using the symbols described in the User's Guide @Cite { $kingston1995lout.user }. @DP @Heading { Acknowledgment. } Version 3 has benefited from hundreds of comments received since the release of Version 1 in October 1991. Not every suggestion could be followed, but many have been, and the encouragement was greatly appreciated. @End @Preface lout-3.39/doc/expert/pre_yuni0000644000076400007640000000303511363700677014715 0ustar jeffjeff@Section @Title { "@YUnit", "@ZUnit", "@CurrYUnit", and "@CurrZUnit" } @Tag { yunit } @Begin @PP The @@YUnit symbol yunit.sym @Index { @@YUnit symbol } zunit.sym @Index { @@ZUnit symbol } changes the value of the @Code y unit of measurement (Section {@NumberOf concatenation}) within its right parameter to the value given by the left parameter: @ID { @Code "1c @YUnit { ... }" } ensures that the value of @Code "1y" within the right parameter will be {@Code "1c"}. The @@ZUnit symbol is similar, setting the value of the @Code z unit in its right parameter. Both units have default value zero. The left parameter may not include a gap mode, nor may it use the {@Code w}, {@Code b}, {@Code r}, or of course {@Code d} units, but it may begin with @Code "+" or @Code "-" to indicate that value is to be added to or subtracted from the current value. Any negative result of using @Code "-" will be silently replaced by zero. @PP The @@CurrYUnit and @@CurrZUnit symbols report the value of the @Code y and @Code z units, in points, truncated to the nearest integer. For example, @ID @Code "1i @YUnit { The current value of the y unit is @CurrYUnit }" produces @ID 1i @YUnit { The current value of the y unit is @CurrYUnit } since there are 72 points in one inch (at least, Lout thinks there are). @PP These units are not used internally by Lout. They are supplied as part of the style information for the convenience of application packages. For example, the Eq equation formatting package uses them to fine-tune the appearance of equations. @End @Section lout-3.39/doc/expert/det_opti0000644000076400007640000000374511363700677014702 0ustar jeffjeff@Section @Title { Optimal galley breaking } @Tag { optimal } @Begin @PP As explained in Section {@NumberOf targets}, the components of a galley optimal.gall @Index { Optimal galley breaking } are promoted one by one into a target. When space runs out there, the galley searches for a new target and promotion resumes. @PP This process is exactly analogous to placing words onto a line until space runs out, then moving to another line. But, as we know, that simple method is inferior to the optimal paragraph breaking used by Lout (copied from the @TeX system), which examines the entire paragraph and determines the most even assignment of words to lines. @PP Lout offers @I { optimal galley breaking }, the equivalent for galleys of optimal paragraph breaking. Optimal galley breaking can reduce the size of ugly blank spaces at the bottom of pages preceding large unbreakable displays, sometimes quite dramatically. @PP Optimal galley breaking is applied to each galley, horizontal or vertical, that possesses a parameter or nested symbol called @Code "@Optimize" whose value is {@Code Yes}. Like cross referencing, optimize.sym @Index { @Code "@Optimize" symbol } it takes two runs to have effect. On the first run, Lout records the sizes of the galley's components and gaps, and also the space available at each of its targets. At end of run this information is used to find an optimal break, which is written to the cross-reference database. On the second run, the optimal break is retrieved and used. @PP Considering that this process must cope with floating figures, new page and conditional new page symbols, breaks for new chapters, and evolving documents, it is surprisingly robust. If it does go badly wrong, removing file @Code "lout.li" then running Lout twice without changing the document may solve the problem. However, cases are known where the optimization never converges. These are usually related to figures and footnotes whose anchor points fall near page boundaries. @End @Section lout-3.39/doc/expert/pre_hexp0000644000076400007640000000216411363700677014677 0ustar jeffjeff@Section @Title { "@HExpand" and "@VExpand" } @Tag { hexpand } @Begin @PP hexpand. @Index { @@HExpand symbol } vexpand. @Index { @@VExpand symbol } expansion @Index { Expansion of object } The @@HExpand symbol causes its right parameter to be as wide as it possibly could be without violating a @@Wide symbol or intruding into the space occupied by neighbouring gaps or objects. The @@VExpand symbol is similar, but it affects height. For example, in the object @ID @Code { "8i @Wide 11i @High {" " //1i ||1i @HExpand @VExpand x ||1i" " //1i" "}" } object @Code x could have any size up to six inches wide by nine inches high, so the @@HExpand and @@VExpand symbols cause it to have exactly this size. This is important, for example, if @Code x contains @Code "|1rt" or {@Code "/1rt"}; without the expansion these might not move as far across or down as expected. @PP As Section {@NumberOf size} explains in detail, most objects are already as large as they possibly could be. Consequently these symbols are needed only rarely. @@HExpand includes a @@OneCol effect, and @@VExpand includes a @@OneRow effect. @End @Section lout-3.39/doc/expert/pre_oneo0000644000076400007640000000362211363700677014673 0ustar jeffjeff@Section @Title { "@OneOf" } @Tag { oneof } @Begin @PP oneof.sym @Index { @@OneOf symbol } The @@OneOf symbol returns one of the sequence of objects which is its right parameter as its result: @ID @Code @Verbatim { @OneOf { @ResultA @ResultB @ResultC } } The choice is made to ensure that whatever galley target is required at the moment is found. For example, if we are evaluating @@OneOf as part of an attempt to attach a galley whose target is {@Code "@SomeTarget"}, then the result above will be {@Code "@ResultA"} if it contains {@Code "@SomeTarget"}, or else {@Code "@ResultB"} if it contains {@Code "@SomeTarget"}, or else {@Code "@ResultC"} (whether or not it contains the target, or if there is no target). @PP Use of @@OneOf in conjunction with recursive symbols can lead to problems. Consider this example: @ID @Code { "def @Recursive {" "" " def @ChoiceA { @APlace // @Recursive }" "" " def @ChoiceB { @BPlace // @Recursive }" "" " @OneOf {" " @ChoiceA" " @ChoiceB" " }" "}" } Lout believes that expanding @Code "@Recursive" is the right thing to do when searching for either of the galley targets {@Code "@APlace"} and {@Code "@BPlace"}. When searching for @Code "@BPlace" this leads Lout to expand {@Code "@Recursive"}, then {@Code "@ChoiceA"}, then the {@Code "@Recursive"} symbol within {@Code "@ChoiceA"}, and so on infinitely. This problem can be avoided by attaching a @Code "@NotRevealed" symbol to each of the inner @Code "@Recursive" symbols: these are then not available for expansion until a decision has been made to expand the symbol they lie within. In this particular example it would be simpler to write @ID @Code { "def @Recursive {" "" " @OneOf {" " @APlace" " @BPlace" " }" " // @Recursive" "}" } but this factoring is not possible when the recursive calls have parameters that are required to differ in the two cases. @End @Section lout-3.39/doc/expert/pre_verb0000644000076400007640000000210011363700677014657 0ustar jeffjeff@Section @Tag { verbatim } @Title { "@Verbatim and @RawVerbatim" } @Begin @PP verbatim.sym @Index { @@Verbatim symbol } rawverbatim.sym @Index { @@RawVerbatim symbol } These symbols instruct Lout to read the following text (enclosed in braces) verbatim, that is, turning off all special character meanings. For example, @ID @Code @Verbatim { @Verbatim { "hello" } } produces @ID @Verbatim { "hello" } @@Verbatim ignores all characters after the opening brace up to but not including the first non-white-space character. @@RawVerbatim differs from @@Verbatim only in that it ignores all characters after the opening brace up to but not including the first non-white-space character, or up to and including the first newline character, whichever comes first. This variant is useful in cases such as @ID @Code @Verbatim { @RawVerbatim { var x: Real begin } } where the first line of the verbatim text begins with white space which would be ignored by @@Verbatim. Both symbols ignore all white spaces at the end of the verbatim text, preceding the closing brace. @End @Section lout-3.39/doc/expert/pre_next0000644000076400007640000000105411363700677014706 0ustar jeffjeff@Section @Title { "@Next" } @Tag { next } @Begin @PP next.sym @Index { @@Next symbol } The @@Next symbol returns its parameter plus one. It is rather clever at working this out: it hunts through the parameter from right to left, looking for a number to increment: @ID @Code { "@Next (3.99)" } has result {@Next (3.99)}. If @@Next cannot find a digit inside its parameter, it is an error. Roman numerals are handled by storing them in a database, as explained in Section {@NumberOf paras}; @@Next will not increment a Roman numeral. @End @Section lout-3.39/doc/expert/pre_data0000644000076400007640000000332711363700677014646 0ustar jeffjeff@Section @Title { "@Database and @SysDatabase" } @Tag { database } @Begin @PP database.sym @Index { @@Database symbol } The @@Database symbol is used to declare the existence of a file of symbol invocations that Lout may refer to when evaluating cross references. In Basser Lout, for example, @ID @Code { "@Database @Months @WeekDays { standard }" } means that there is a file called @Code "standard.ld" containing invocations of the previously defined symbols @Code "@Months" and {@Code "@WeekDays"}. A @@Database symbol may appear anywhere a definition or a @@Use symbol may appear. Different definitions packages may refer to a common database, provided the definitions they give for its symbols are compatible. An entry is interpreted as though it appears at the point where the cross reference that retrieves it does, which allows symbols like @Code "@I" for @Code "Slope @Font" to be used in databases. The database file may not contain @@Database or @@Include symbols, and each invocation within it must be enclosed in braces. @PP Basser Lout constructs an {@I {index file}}, index.file @Index { Index file (for databases) } which in this example is called {@Code "standard.li"}, the first time it ever encounters the database, as an aid to searching it. If the database file is changed, its index file must be deleted by the user so that Basser Lout knows to reconstruct it. There is also an installation option which allows this deletion to be done automatically on suitable systems (including Unix). @PP Basser Lout searches for databases in the current directory first, then in a sequence of standard places. To search the standard places only, use sysdatabase.sym @Index { @@SysDatabase symbol } @@SysDatabase. @End @Section lout-3.39/doc/expert/det_visi0000644000076400007640000001556611363700677014705 0ustar jeffjeff@Section @Tag { visibility } @Title { Nested definitions, body parameters, extend, import, and export } @Begin @PP A definition may contain nested.def @Index { Nested definitions } other definitions at the beginning of its body: @ID @OneRow @Code { "def @NineSquare" " right x" "{" " def @Three { x |0.2i x |0.2i x }" "" " @Three /0.2i @Three /0.2i @Three" "}" } A parameter like @Code x may be invoked anywhere within the body of the symbol it is a parameter of, including within nested definitions. A nested symbol like @Code "@Three" may be invoked anywhere from the beginning of its own body to the end of the body of the symbol it is defined within. So, assuming an appropriate definition of {@Code "@Box"}, @ID @Code { "@NineSquare @Box" } has result @ID @Fig { @NineSquare @Box { 0.2i @Wide 0.2i @High } } Nested definitions may themselves contain nested definitions, to arbitrary depth. @PP There are three special features which permit a nested symbol or parameter to be invoked outside its normal range; that is, outside the body of the enclosing symbol. The first and simplest of these features is the {@I {body parameter}}, parameter.body @SubIndex { @Code body parameter } body.par @Index { @Code body parameter } an alternative form of right parameter. The Eq equation formatting package @Cite { $kingston1995lout.user, Chapter 7 } is a classic example of the use of a body parameter. In outline, it looks like this: @ID @OneRow @Code { "export \"+\" sup over" "" "def @Eq" " body x" "{" " def \"+\" ..." " def sup ..." " def over ..." " ..." "" " Slope @Font x" "}" } First we list those nested symbols and parameters that we intend to refer to outside the body of @Code "@Eq" in an @Code export clause, export @Index { @Code export clause } preceding the definition as shown. Only exported symbols may be invoked outside the body of {@Code "@Eq"}. The body parameter is like a right parameter except that the exported symbols are visible within it: @ID @Code { "@Eq { {x sup 2 + y sup 2} over 2 }" } calls on the nested definitions of @Code "@Eq" to produce the result @ID { @Eq { {x sup 2 + y sup 2} over 2 } } The body parameter's value must be enclosed in braces. The term `body parameter' is a reminder that the value is interpreted as if it was within the body of the symbol. @PP A body parameter may not be exported, and in fact a body parameter may be invoked only within the body of the enclosing symbol, not within any nested definitions. For example, @Code "x" above may not be invoked within {@Code "sup"}. This restriction is needed to avoid the possibility of recursion, when the actual body parameter invokes an exported nested definition which invokes the body parameter, etc. @PP The second place where exported symbols may be used is in the right parameter of the @@Open symbol, and following its alternative form, @@Use (Section {@NumberOf open}). @PP Exported nested symbols and parameters may be made visible within a subsequent definition or macro by preceding it with an @Code import import @Index { @Code import clause } clause, like this: @ID @OneRow @Code { "import @Eq" "def pythag { sqrt { x sup 2 + y sup 2 } }" } Note however that @Code pythag can only be used with some invocation of {@Code "@Eq"}: within the body parameter of an invocation of {@Code "@Eq"}, within the right parameter of an {@Code "@Eq&&tag @Open"}, or following a {@Code "@Use { @Eq ... }"}. There may be several symbols in the @Code import clause. @PP In a similar way to {@Code "import"}, a definition may be preceded by {@Code "extend"} followed by a symbol name: @ID @OneRow @Code { "extend @Eq" "def pythag { sqrt { x sup 2 + y sup 2 } }" } The effect of this is just as though the definition of @Code "pythag" had occurred directly after the existing definitions within {@Code "@Eq"}, with {@Code "pythag"} added to {@Code "@Eq"}'s export list. This is useful for extending the capabilities of a package of definitions like @Code "@Eq" without modifying its source file. The essential differences to @Code "import" are that all the symbols of @Code "@Eq" become visible within {@Code "pythag"}, not just the exported ones, and only one symbol may follow the @Code "extend" keyword. @PP Actually, more than one symbol may follow {@Code extend}, but this usage indicates a `path name' of the symbol. For example, @ID @OneRow @Code { "extend @DocumentLayout @ReportLayout" "def @Keywords ..." } causes the definition of @Code "@Keywords" to occur directly after the existing definitions of {@Code "@ReportLayout"}, which itself lies within {@Code "@DocumentLayout"}. @PP A named parameter may also be preceded by an @Code "import" clause. As usual, the meaning is that the visible local definitions of the import symbol(s) are visible within the body (the default value) of the named parameter. But furthermore, those symbols will be visible within all invocations of the parameter. For example, suppose we define @ID @OneRow @Code { "def @Diag" " import @Algebra named linewidth { 1p }" " import @Algebra named dashlength { 2p }" " ..." } Then, if @Code "@Algebra" exports symbols {@Code "+"}, {@Code "-"}, and so on, we may write @ID @OneRow @Code { "@Diag" " linewidth { 1f - 2p }" " dashlength { 1f + 2p }" } using the symbols from {@Code "@Algebra"}. There may be several symbols after the @Code "import" keyword. All these symbols share an important restriction: they may not have parameters. This is necessary because Lout would be unable to determine suitable values for any such parameters, if they did exist. @PP As an exception to the rule just given, a named parameter may import the symbol it is a parameter of: @ID @OneRow @Code { "export @Cell" "def @Tbl" " import @Tbl named @Format { ... }" } In this example the exported definitions of @Code "@Tbl" (i.e. {@Code "@Cell"}) will be visible within {@Code "@Format"}. However, they may only be used in actual parameters, not in the default value of the named parameter. This is owing to implementation problems: at the time the default value of {@Code "@Format"} is read, the exported symbols have not been read and are consequently not known. @PP Since @Code "@Cell" is nested within {@Code "@Tbl"}, the value of an invocation of @Code "@Cell" may depend on the value of parameters of {@Code "@Tbl"}. If @Code "@Cell" is used within an actual {@Code "@Format"} parameter, its value depends on the value of parameters of the invocation of {@Code "@Tbl"} of which the {@Code "@Format"} parameter is a part. @PP A definition, macro, or named parameter may have several alternative names, like this: @ID @Code "macro @CD @CentredDisplay @CenteredDisplay { ... }" This is useful for abbreviated and alternative spellings, as shown. The names appear together, and they may subsequently be used interchangeably. @PP If one name of a symbol appears in an export or import list, its other names are automaticaly included as well, and should not also appear in the list. @End @Section lout-3.39/doc/expert/pre_cont0000644000076400007640000000323111363700677014672 0ustar jeffjeff@Section @Title { "@SetContext" and "@GetContext" } @Tag { cont } @Begin @PP As earlier sections showed, the style information contains many attributes: the current font, break style, colour and texture, and so on. It is also possible @FootNote { From Version 3.34 of Basser Lout. } to add arbitrary additional information to the style, using the @@SetContext symbol, and retrieve it using @@GetContext. For example, @ID @OneRow @Code @Verbatim { {dirn @Yield up} @SetContext { The current direction is {@GetContext dirn}. } } produces @ID @OneRow { {dirn @Yield up} @SetContext { The current direction is {@GetContext dirn}. } } The object to the left of @@SetContext must be a @@Yield symbol whose left parameter, the {@I key}, evaluates to a simple word, and whose right parameter, the {@I value}, may be an arbitrary object. Since @@Yield has high precedence it will usually be necessary to enclose non-trivial values in braces. The effect is to associate the value with the key in a symbol table throughout the right parameter of the @@SetContext symbol, as part of the style information. The value may be retrieved anywhere in this region by invoking @@GetContext with the key as its right parameter. @PP The value is evaluated using the style and environment where it occurs, not where it is used. In any case in most applications the value will be a simple word, independent of any style and environment, used to select a branch in a case expression, like this: @ID @OneRow @Code @Verbatim { {@GetContext dirn} @Case { up @Yield ... down @Yield ... } } @@GetContext reports an error if there is no value associated with its key in the current style. @End @Section lout-3.39/doc/expert/pre_null0000644000076400007640000000142711363700677014706 0ustar jeffjeff@Section @Title { "@Null" } @Tag { null } @Begin @PP This symbol null.sym @Index { @@Null symbol } provides a convenient way to remove unwanted concatenation symbols. If there is a concatenation symbol preceding @@Null, the @@Null and the concatenation symbol are both deleted. Otherwise, if there is a following concatenation symbol, it and the @@Null are both deleted. Otherwise, @@Null becomes an empty object. @PP These rules apply to a fully parenthesized version of the expression. For example, in @ID @Code { "... //1vx @Null |0.5i ..." } it is the horizontal concatenation symbol following @@Null that disappears, because in the fully parenthesized version @ID @Code { "... //1vx { @Null |0.5i ... }" } there is no concatenation symbol preceding the @@Null. @End @Section lout-3.39/doc/expert/pre_lang0000644000076400007640000000530411363700677014653 0ustar jeffjeff@Section @Title { "@Language" and "@CurrLang" } @Tag { language } @Begin @PP The @@Language symbol informs Lout that its right parameter is written language.sym @Index { @@Language symbol } in the language of its left parameter: @ID @Code "Danish @Language { ... }" Basser Lout Version 3 uses this information in two ways: to hyphenate words appropriately to that language, and to change the value of the @@CurrLang symbol (see below). Other uses, such as right-to-left formatting of certain languages, may be added in the future. @PP The left parameter must either be empty (which means to leave the current language unchanged) or else it must have been given in a @Code "langdef" langdef.sym @Index { @Code langdef language definition } language definition at the beginning of the input: @ID { @Code "langdef Danish Dansk {" @I implementation-dependent @Code "}" } After @Code "langdef" comes a sequence of one or more simple words, which are alternative names for the language being defined. Following them comes an implementation-dependent part between braces. In Basser Lout Version 3 this part contains the name of the Lout hyphenation information file (minus its .lh suffix) to be used when hyphenating words in this language, followed by a sequence of words which define the ends of sentences. For example: @ID @Code "langdef English { english . : ? ! .) ?) !) }" defines a language called English with hyphenation patterns file {@Code english.lh} and seven ways to end a sentence. The use of these sentence endings is described in Section {@NumberOf space}. If there is no hyphenation file available, this is indicated by writing @Code "-" for the file name; if there are no sentence ends, they are simply omitted. @PP The @@CurrLang symbol, which has no parameters, evaluates to the first currlang.sym @Index { @@CurrLang symbol } name given in the @Code "langdef" of the language in force at the point where it is invoked: @ID @Code "Dansk @Language { This is @CurrLang. }" has result @ID { Dansk @Language { This is @CurrLang. } } It is typically used with the @@Case symbol like this: @ID @Code { "@CurrLang @Case {" " Danish @Yield tirsdag" " English @Yield Tuesday" " French @Yield Mardi" "}" } This example evaluates to the name of the third day of the week in the current language. @PP The current language is part of the style of an object, like its font. As explained in Section {@NumberOf size}, style is inherited through the point of appearance, which for language can be unexpected. For example, an index entry which originates in a French chapter but appears in an English index will have English for its language, so must be explicitly set to French using @@Language. @End @Section lout-3.39/doc/expert/pre_hshi0000644000076400007640000000256411363700677014672 0ustar jeffjeff@Section @Title { "@HShift" and "@VShift" } @Tag { hshift } @Begin @PP The @@HShift symbol hshift.sym @Index { @@HShift symbol } returns its right parameter with principal mark shifted as prescribed by its left parameter: @IL @LI { 2i @Wide { |1rt @Code + & @I length @@HShift @I object } |2m Principal mark shifted to the right by {@I length}; } @LI { 2i @Wide { |1rt @Code - & @I length @@HShift @I object } |2m Principal mark shifted to the left by {@I length}; } @LI { 2i @Wide { |1rt @I length @@HShift @I object } |2m Principal mark shifted so as to lie @I length to the right of the left edge of {@I object}; } @EL In each chase @@HShift includes a @@OneCol effect. @PP The units of measurement of @I length may be {@Code "c"}, {@Code "i"}, {@Code "p"}, {@Code "m"}, {@Code "f"}, {@Code "s"}, {@Code "v"}, or {@Code "w"}. In the latter case, @Code "1w" is taken to be the width of the right parameter, so that, for example, @Code "0.5w @HShift" will centre the principal column mark within the right parameter. @PP vshift.sym @Index { @@VShift symbol } The @@VShift symbol is similar except that it applies vertically to the principal row mark: @Code + & @I length shifts it down, @Code - & @I length shifts it up, and @I length shifts it to @I length below the top edge of the object. With @@VShift, @Code "1w" is taken to be the height of the right parameter. @End @Section lout-3.39/prg2lout.c0000644000076400007640000077031011442244761013010 0ustar jeffjeff /*****************************************************************************/ /* */ /* PRG2LOUT: A PROGRAM TO CONVERT PROGRAM SOURCES INTO LOUT */ /* COPYRIGHT (C) 2000, 2008 Jeffrey H. Kingston */ /* */ /* Part of Lout Version 3.39 */ /* */ /* Jeffrey H. Kingston (jeff@cs.su.oz.au) */ /* Basser Department of Computer Science */ /* The University of Sydney 2006 */ /* AUSTRALIA */ /* */ /* C and C++, Eiffel, Blue, Java, and Nonpareil by Jeff Kingston */ /* Perl and Pod by Jeff Kingston and Mark Summerfield */ /* Python by Mark Summerfield (Python 2.5 update Nov 2006) */ /* Ruby by Michael Piotrowski */ /* Haskell by Thorsten Seitz (Nov 2002), mods by Gabor Greif */ /* RSL by Darren Bane (February 2003) */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either Version 3, or (at your option) */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* GENERAL INTRODUCTION TO PRG2LOUT */ /* */ /* The best way to see what the aim of prg2lout as currently conceived is, */ /* is to look in file cprint at the setup file options. You will see that */ /* the aim is to provide three basic styles: fixed (essentially mono font), */ /* varying (essentially varying-width font with various faces for different */ /* elements at the user's choice), and symbol (similar to varying). */ /* */ /* The elements currently aimed for are strings, identifiers, comments, */ /* keywords, numbers, and operators, and the end user is able to choose, */ /* for each of these kinds of elements, which font to set them in. */ /* */ /* This is achieved by a simple division of labour: prg2lout does the */ /* classifying of the input into a sequence of these elements, and the Lout */ /* end (cprint and cprintf, or their clones for other languages) does the */ /* formatting. For example, the C text */ /* */ /* inc = inc / 2 */ /* */ /* would be classified by prg2lout into identifier, operator, identifier, */ /* operator, number; and consequently prg2lout would emit */ /* */ /* @PI{inc} @PO{=} @PI{inc} @PO{"/"} @PN{2} */ /* */ /* which is readable by Lout, thanks to having quotes around everything */ /* potentially dangerous, and clearly tells Lout, by means of the commands */ /* @PC, @PI, etc., how each part of the input has been classified. */ /* */ /* The actual classification is carried out by prg2lout as follows. Each */ /* programming language is described to prg2lout as a collection of tokens; */ /* you say what the token begins with, what's a legal character inside the */ /* token, and how it ends. You also say which command (@PC, @PI etc.) to */ /* emit when a token of that kind is found. Prg2lout does the rest. */ /* */ /* Prg2lout knows all about tricky problems such as multi-line tokens (it */ /* breaks them up into single-line pieces) and backslash in Lout strings */ /* (it replaces any \ within an output string by \\, " by \", etc.). It */ /* also handles tab characters and formfeed characters properly, and it */ /* produces intelligible error messages when unexpected things happen, */ /* such as input terminating in the middle of a string. This attention to */ /* detail is a strong reason for using prg2lout rather than something more */ /* ad-hoc, such as @Verbatim or a quick script. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* HOW TO ADD ANOTHER LANGUAGE TO PRG2LOUT */ /* */ /* Step 1. Construct clones of (say) eiffel and eiffelf (these are in */ /* $LOUTLIB/include) with every occurrence of eiffel or Eiffel in them */ /* changed to your language as appropriate. Install your files in the */ /* Lout system include directory alongside eiffel and eiffelf. */ /* */ /* It is good to clone the files exactly because that way all program */ /* formatting works the same way, and one chapter of the User's Guide */ /* covers the lot. However if your language has some unique element, not */ /* readily classifiable as a string, identifier, comment, keyword, */ /* number, or operator, it is possible to emit a different command of */ /* your choice for the new element; but then your clones of eiffel and */ /* eiffelf have to be extended to handle that command. */ /* */ /* Step 2. Have a browse through the token declarations below, and work */ /* out which of them you need for your language. If you need a token that */ /* isn't there already, you'll have to define it; there are many examples */ /* and documentation there to help you. The tokens for Perl are rather */ /* complicated and don't make a good model for most languages, so look */ /* more at the C and Eiffel ones. */ /* */ /* Step 3. Browse through the language declarations, and declare your */ /* language following those examples: first you give a set of one or more */ /* alternative names for your language, then some other things, including */ /* the list of tokens of the language, and its keywords. */ /* */ /* Step 4. Add your language variable to the list in the initializer of */ /* variable languages, as you can see the others have been done. Try to */ /* keep the list alphabetical to deflect any charges of language bias. */ /* */ /* Step 5. If any lists of initializers now contain more than MAX_STARTS, */ /* MAX_STARTS2, MAX_NAMES, MAX_TOKENS, or MAX_KEYWORDS elements, increase */ /* these constants until they don't. The gcc compiler will warn you if */ /* you forget to do this. */ /* */ /* Step 6. Recompile and reinstall prg2lout, test "prg2lout -u" then */ /* "prg2lout -l | lout -s > out.ps". */ /* */ /* Step 7. Send your tested and tidied files to me for incorporation */ /* in the next Lout release. If you do this, please try hard to ensure */ /* that your new code conforms to the formal definition of your language. */ /* Feel free to email me for advice as you go along. */ /* */ /* Jeff Kingston */ /* jeff@it.usyd.edu.au */ /* */ /*****************************************************************************/ #include #include #include #define FALSE 0 #define TRUE 1 #define BOOLEAN unsigned #define MAX_CHAR 256 #define is_whitespace(ch) ((ch)==' ' || (ch)=='\t' || (ch)=='\n' || (ch)=='\f') #define U (unsigned char *) /*****************************************************************************/ /* */ /* MAX_STARTS 1 + Maximum length of "starts" array in any token */ /* MAX_STARTS2 1 + Maximum length of "starts2" array in any token */ /* MAX_NAMES 1 + Maximum number of names for any language */ /* MAX_TOKENS 1 + Maximum number of tokens in any language */ /* MAX_KEYWORDS 1 + Maximum number of keywords in any language */ /* */ /*****************************************************************************/ #define MAX_STARTS 120 #define MAX_STARTS2 30 #define MAX_NAMES 10 #define MAX_TOKENS 150 #define MAX_KEYWORDS 350 /*****************************************************************************/ /* */ /* Bracketing pairs */ /* */ /* This declaration explains to prg2lout that { matches }, etc. */ /* */ /*****************************************************************************/ typedef struct { unsigned char *first; unsigned char *second; } CHAR_PAIR; CHAR_PAIR pairs[] = { { (unsigned char *) "(", (unsigned char *) ")" }, { (unsigned char *) "{", (unsigned char *) "}" }, { (unsigned char *) "[", (unsigned char *) "]" }, { (unsigned char *) "<", (unsigned char *) ">" }, { NULL, NULL } }; /*****************************************************************************/ /* */ /* Character sets */ /* */ /* These are prg2lout's definitions of various commonly needed sets of */ /* characters. May need enhancement for Latin1 etc. */ /* */ /*****************************************************************************/ #define AllCharacters NULL /* code will recognize NULL and do this */ /* It is not possible to further categorize the characters in the G1 * area of ISO 8859 code sets (code points 0xA0 through 0xFF) because * there are no fixed ranges (e.g., 0xA1 is a punctuation mark in * Latin 1, but a letter in Latin 2). However, this is not really a * problem since all characters in this area can be considered * printable. */ #define G1_Characters "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" unsigned char AllPrintable[] = " !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`\\{|}~\ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" G1_Characters ; unsigned char AllPrintablePlusNL[] = " !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`\\{|}~\ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\n" G1_Characters ; unsigned char AllPrintablePlusTab[] = " !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`\\{|}~\ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\t" G1_Characters ; unsigned char AllPrintableTabNL[] = " !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`\\{|}~\ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\n\t" G1_Characters ; unsigned char AllPrintableTabNLFF[] = " !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`\\{|}~\ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\n\t\f" G1_Characters ; unsigned char Letters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ; unsigned char lowercaseLetters[] = "abcdefghijklmnopqrstuvwxyz" ; unsigned char uppercaseLetters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; unsigned char Letter_Digit[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789" ; unsigned char Letter_Digit_Quotes[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789`'" ; unsigned char HaskellOpCharacters[] = "!#$%&*+./<=>?^|:-~"; unsigned char NonpareilOperatorPunct[] = "@$%^&*=+|;<>/?`"; unsigned char Ruby_Methodname[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789?!=" ; #define UppercaseSepLetters \ U "A", U "B", U "C", U "D", U "E", U "F", U "G", U "H", U "I", U "J", \ U "K", U "L", U "M", U "N", U "O", U "P", U "Q", U "R", U "S", U "T", \ U "U", U "V", U "W", U "X", U "Y", U "Z" #define LowercaseSepLetters \ U "a", U "b", U "c", U "d", U "e", U "f", U "g", U "h", U "i", U "j", \ U "k", U "l", U "m", U "n", U "o", U "p", U "q", U "r", U "s", U "t", \ U "u", U "v", U "w", U "x", U "y", U "z" #define SepLetters UppercaseSepLetters, LowercaseSepLetters #define SepDigits \ U "0", U "1", U "2", U "3", U "4", U "5", U "6", U "7", U "8", U "9" #define HexDigits \ U "A", U "a", U "B", U "b", U "C", U "c", U "D", U "d", U "E", U "e", \ U "F", U "f" #define SepPunct \ U "/", U "(", U "[", U "{", U "<", U "!", U "%", U "#", U "|", U ",", \ U ":", U ";", U "$", U "\"", U "^", U "&", U "*", U "-", U "=", U "+", \ U "~", U "'", U "@", U "?", U ".", U "`" #define BktPunct \ U "", U "(", U "[", U "{", U "<", U "", U "", U "", U "", U "", \ U "", U "", U "", U "", U "", U "", U "", U "", U "", U "", \ U "", U "", U "", U "", U "", U "" #define EndPunct \ U "/", U ")", U "]", U "}", U ">", U "!", U "%", U "#", U "|", U ",", \ U ":", U ";", U "$", U "\"", U "^", U "&", U "*", U "-", U "=", U "+", \ U "~", U "'", U "@", U "?", U ".", U "`" #define SepNonpareilOperatorPunct \ U "@", U "$", U "%", U "^", U "&", U "*", U "=", U "+", U "|", \ U ";", U "<", U ">", U "/", U "?", U "`" #define HaskellOpChars \ U "!", U "#", U "$", U "%", U "&", U "*", U "+", U ".", U "/", \ U "<", U "=", U ">", U "?", U "^", U "|", U ":", U "-", U "~" #define HaskellParenOpChars \ U "(!", U "(#", U "($", U "(%", U "(&", U "(*", U "(+", U "(.", U "(/", \ U "(<", U "(=", U "(>", U "(?", U "(^", U "(|", U "(:", U "(-", U "(~" #define PercentLetters \ U "%A", U "%B", U "%C", U "%D", U "%E", U "%F", U "%G", U "%H", U "%I", \ U "%J", U "%K", U "%L", U "%M", U "%N", U "%O", U "%P", U "%Q", U "%R", \ U "%S", U "%T", U "%U", U "%V", U "%W", U "%X", U "%Y", U "%Z", \ U "%a", U "%b", U "%c", U "%d", U "%e", U "%f", U "%g", U "%h", U "%i", \ U "%j", U "%k", U "%l", U "%m", U "%n", U "%o", U "%p", U "%q", U "%r", \ U "%s", U "%t", U "%u", U "%v", U "%w", U "%x", U "%y", U "%z", U "%_" /*****************************************************************************/ /* */ /* TOKEN - put your token declarations in this section */ /* */ /* The fields of token_rec have the following meanings: */ /* */ /* name */ /* The name of this token, e.g. "string" or "identifier". This field */ /* is used only by error messages generated by prg2lout; for example, */ /* prg2lout might print the message "input ended within string". */ /* */ /* print_style */ /* */ /* print_style What gets printed */ /* ------------------------------------------------------- */ /* PRINT_WHOLE_QUOTED command{"token"} */ /* PRINT_NODELIMS_QUOTED command{"token-minus-delims"} */ /* PRINT_WHOLE_UNQUOTED command{token} */ /* PRINT_NODELIMS_UNQUOTED command{token-minus-delims} */ /* PRINT_NODELIMS_INNER command{inner} */ /* PRINT_COMMAND_ONLY command */ /* */ /* If command (see next) is empty then the braces {} are not printed. */ /* */ /* PRINT_WHOLE_QUOTED. This command is the most frequently used one; */ /* it prints the token, enclosed in braces and quotes, preceded by the */ /* command. The quotes ensure that the result is legal Lout; any " or */ /* \ in the token is printed with a preceding \ as required in Lout. */ /* The usual arrangement for handling white space is that none of the */ /* tokens contain it; when it is encountered prg2lout generates the */ /* appropriate Lout without being told: a space for a space, a newline */ /* for a newline (possibly triggering a line number on the next line), */ /* @NP for a formfeed, and something clever for tab which does the */ /* required thing. However, you can define a token that contains */ /* white space if you wish, and then the effect will be: */ /* */ /* space and tab The quotation marks will be temporarily */ /* closed off, the white space handled as just */ /* described, then the quotes opened again */ /* */ /* newline and ff Both the quotation marks and the command */ /* will be closed off, the white space handled */ /* as just described, and then a new command */ /* started. In effect, the token is broken into */ /* a sequence of tokens at these characters. */ /* */ /* PRINT_NODELIMS_QUOTED. This is like PRINT_WHOLE_QUOTED except that */ /* the opening and closing delimiters of the token are omitted from */ /* the print. This is useful occasionally when these delimiters are */ /* formatting markers, not intended to be printed. */ /* */ /* PRINT_WHOLE_UNQUOTED. This style prints the command and braces */ /* as usual, but omits the quotes and prints the token absolutely */ /* verbatim. In general this is not going to produce legal Lout, */ /* but it is useful in two cases: when the token is a Lout escape, */ /* so that it is the user's responsibility to ensure that its content */ /* is legal Lout; and when the command is another filter command, so */ /* that the token content will not go directly into Lout anyway, it */ /* will go through the other filter first. Since the result has to */ /* be verbatim, there is no special treatment of white space characters */ /* and no insertion of line numbers. However, if braces are printed */ /* they really ought to match, so prg2lout checks this and will */ /* complain and insert braces into the verbatim part if necessary. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Meaning of TOKEN fields (ctd.) */ /* */ /* PRINT_NODELIMS_UNQUOTED. This is like PRINT_WHOLE_UNQUOTED except */ /* that the opening and closing delimiters of the token are omitted. */ /* */ /* PRINT_NODELIMS_INNER. Like PRINT_NODELIMS_UNQUOTED except that the */ /* inner part (i.e. not delimiters) is formatted in the same language. */ /* */ /* PRINT_COMMAND_ONLY. This ignores the token and prints just the */ /* command, presumably because the command says it all for that token. */ /* When using PRINT_COMMAND_ONLY you will probably need to enclose the */ /* command with braces: since there are no following braces in this */ /* print style, your command will run into the next one otherwise. */ /* */ /* command */ /* The Lout command to print. This command could be any legal Lout; */ /* programming language setup files offer the following Lout symbols */ /* that make the most common commands: */ /* */ /* @PI for formatting identifiers */ /* @PK for formatting keywords */ /* @PO for formatting operators */ /* @PN for formatting numbers */ /* @PS for formatting strings */ /* @PC for formatting comments */ /* @PA for printing an asterisk (lower on the line than usual) */ /* @PM for printing a minus sign (longer than a hyphen) */ /* @PD for printing a dot (.), only larger than usual */ /* */ /* The last three require PRINT_COMMAND_ONLY (they take no parameter). */ /* If command is NULL or "", then no command will be printed and */ /* furthermore the token will not be enclosed in the usual braces. */ /* */ /* alternate_command */ /* Every language has a list of keywords. Just before printing each */ /* token, it is compared against the keywords. If it is one of them, */ /* then alternate_command is used instead of command. For example, */ /* identifiers usually have command @PI and alternate_command @PK. */ /* */ /* following_command */ /* Print this Lout command (or commands) after the token. If it is a */ /* "broken" multi-line token, print this command after each fragment */ /* */ /* start_line_only */ /* A Boolean field. If TRUE, this token is to be recognized only */ /* if it occurs at the very start of a line. */ /* */ /* starts[] */ /* This field holds an array of strings. If prg2lout discovers any */ /* one of these strings while it is not reading some other token, */ /* then it deems that this token has begun. The recognized string */ /* is the token's "starting delimiter". */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Meaning of TOKEN fields (ctd.) */ /* */ /* starts2[], brackets2[], ends2[] */ /* These fields each hold an array of strings, and the three arrays */ /* must have equal length. If starts2[] has length zero, these fields */ /* do not apply. Otherwise, they modify the meaning of starts[], */ /* bracket_delimiter, and end_delimiter below. Their effect is best */ /* seen by looking at some examples from Perl, their main user: */ /* */ /* q/hello/ qq/hello/ qq?hello? qq{hel{}lo} */ /* */ /* These strings may begin with q, qq, qx, and several other things; */ /* this is then followed by a single character which determines the */ /* string terminator; e.g. / means "terminate with /", { means */ /* "terminate with }", etc. In some cases the start and end delims */ /* come in matching pairs, and then there may be nested matching */ /* pairs. This is implemented as follows: */ /* */ /* starts: { "q", "qq" } */ /* starts2: { "/", "?", "{" } */ /* brackets2: { "", "", "{" } */ /* ends2: { "/", "?", "}" } */ /* */ /* Briefly, every token with non-null starts2 is expanded into a set */ /* of tokens, one for each element i of starts2, whose starting delims */ /* are starts with starts2[i] added, bracketing delim brackets2[i], */ /* and end_delim ends2[i]. PerlQTypeToken is a larger example of this. */ /* */ /* legal */ /* This string defines the set of legal characters inside this token. */ /* For example, numbers might have "0123456789." for this field, since */ /* these are the characters that are legal within numbers, usually. */ /* */ /* escape */ /* This string defines a single character which is the escape */ /* character for this token. That is, if we are reading this token */ /* and come upon this character, the character following it is */ /* treated differently. An empty string "" means no escape character. */ /* */ /* escape_legal */ /* This string defines the set of characters which are legal after */ /* the escape character just mentioned. If any one of these appears */ /* immediately after the escape character, it is deemed to be part */ /* of the token even if without the preceding escape it would not be. */ /* */ /* inner_escape */ /* end_inner_escape */ /* The inner_escape string should be either empty (in which case it */ /* does not apply), or else it should contain a single character, the */ /* "inner escape" character. An inner escape is a temporary suspension */ /* of a token, reverting to the original language. It is used to set */ /* program text within comments. For example, in Eiffel and Blue, */ /* inner_escape is "`" and end_inner_escape is "'" and so we can write */ /* */ /* -- increment `balance' by `amount' */ /* */ /* to treat balance and amount as identifiers within a comment token. */ /* The inner escape is not limited to one token, it may have any */ /* number of tokens, and they may have inner escapes too; prg2lout */ /* imposes no limit on the depth of nesting of inner escapes. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Meaning of TOKEN fields (ctd.) */ /* */ /* bracket_delimiter */ /* If this string is encountered within a token (not escaped), it */ /* brackets with the next end_delimiter, meaning that the next end */ /* delimiter will not end the token. */ /* */ /* end_delimiter */ /* This string shows how the token ends; for example, a string would */ /* have end_delimiter ". If empty, it means that the token ends */ /* just before the first character encountered that is not legal (see */ /* "legal" above). For example, identifiers and numbers would have */ /* empty end_delimiter. If ends2[] is not empty then end_delimiter */ /* is ignored, since ends2[] explains how the token ends. */ /* */ /* end_start_line_only */ /* A BOOLEAN field. If true, the end delimiter is to be recognized */ /* only if it occurs at the very start of a line. */ /* */ /* want_two_ends */ /* A Boolean feature used only by Perl; TRUE means that end_delimiter */ /* (or ends2[]) has to be encountered twice before the token ends, */ /* rather than the usual once. Used by PerSTypeToken to recognise */ /* */ /* s/abc/ABC/ */ /* */ /* etc. as single tokens. If there is a bracket delimiter (see above), */ /* this will look for a new matching delimiter pair, as in s{}<>. */ /* */ /*****************************************************************************/ #define PRINT_WHOLE_QUOTED 1 #define PRINT_NODELIMS_QUOTED 2 #define PRINT_WHOLE_UNQUOTED 3 #define PRINT_NODELIMS_UNQUOTED 4 #define PRINT_NODELIMS_INNER 5 #define PRINT_COMMAND_ONLY 6 typedef struct token_rec { unsigned char *name; int print_style; unsigned char *command, *alternate_command, *following_command; BOOLEAN start_line_only; unsigned char *starts[MAX_STARTS]; unsigned char *starts2[MAX_STARTS2]; unsigned char *brackets2[MAX_STARTS2]; unsigned char *ends2[MAX_STARTS2]; unsigned char *legal; unsigned char *escape; unsigned char *escape_legal; unsigned char *inner_escape; unsigned char *end_inner_escape; unsigned char *bracket_delimiter; unsigned char *end_delimiter; BOOLEAN end_start_line_only; BOOLEAN want_two_ends; /* The following options are initialized by the program, so don't you */ unsigned char chtype[MAX_CHAR]; /* char types within token */ unsigned char escape_chtype[MAX_CHAR]; /* char types after escape */ } TOKEN; /*****************************************************************************/ /* */ /* Tokens defining strings and literal characters in non-Perl languages. */ /* NB "U" is a cast to (unsigned char *) */ /* */ /*****************************************************************************/ TOKEN CStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "\"" }, /* strings begin with a " character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable is OK */ U "\\", /* within strings, \\ is the escape character */ AllPrintablePlusNL, /* after escape char, any printable char or nl OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "\"", /* strings end with a " character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN CCharacterToken = { U "character", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting characters */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "'" }, /* characters begin with a ' character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable character is OK */ U "\\", /* within characters, \\ is the escape character */ AllPrintable, /* after escape char, any printable char is OK */ U "", /* characters do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "'", /* characters end with a ' character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN EiffelStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "\"" }, /* strings begin with a " character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable except " is OK */ U "%", /* within strings, % is the escape character */ AllPrintable, /* after escape char, any printable char is OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "\"", /* strings end with a " character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN EiffelCharacterToken = { U "character", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting characters */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "'" }, /* characters begin with a ' character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable except ' is OK */ U "%", /* within characters, % is the escape character */ AllPrintable, /* after escape char, any printable char is OK */ U "", /* characters do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "'", /* characters end with a ' character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PythonDblStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "\"" }, /* strings begin with a " character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable is OK */ U "\\", /* within strings, \\ is the escape character */ AllPrintablePlusNL, /* after escape char, any printable char or nl OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "\"", /* strings end with a " character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PythonSnglStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "'" }, /* strings begin with a ' character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable is OK */ U "\\", /* within strings, \\ is the escape character */ AllPrintablePlusNL, /* after escape char, any printable char or nl OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "'", /* strings end with a ' character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PythonTriSnglStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "'''" }, /* strings begin with ''' */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintableTabNL, /* inside, any printable is OK */ U "\\", /* within strings, \\ is the escape character */ AllPrintableTabNL, /* after escape char, any printable char or nl OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "'''", /* strings end with ''' */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PythonTriDblStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "\"\"\"" }, /* strings begin with """ */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintableTabNL, /* inside, any printable is OK */ U "\\", /* within strings, \\ is the escape character */ AllPrintableTabNL, /* after escape char, any printable char or nl OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "\"\"\"", /* strings end with """ */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN HaskellStringToken = { U "string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "\"" }, /* strings begin with a " character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable except " is OK */ U "\\", /* within strings, \ is the escape character */ AllPrintable, /* after escape char, any printable char is OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "\"", /* strings end with a " character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN HaskellCharacterToken = { U "character", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting characters */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "'" }, /* characters begin with a ' character */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintable, /* inside, any printable except ' is OK */ U "\\", /* within characters, \ is the escape character */ AllPrintable, /* after escape char, any printable char is OK */ U "", /* characters do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "'", /* characters end with a ' character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Identifiers, in the form common to most programming languages. */ /* */ /*****************************************************************************/ TOKEN IdentifierToken = { U "identifier", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PI", /* Lout command for formatting identifiers */ U "@PK", /* Alternate command (for keywords) */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { SepLetters, U "_" }, /* identifiers begin with any letter or _ */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ Letter_Digit, /* inside, letters, underscores, digits are OK */ U "", /* no escape character within identifiers */ U "", /* so nothing legal after escape char either */ U "", /* identifiers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* identifiers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN HaskellIdentifierToken = { U "identifier", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PI", /* Lout command for formatting identifiers */ U "@PK", /* Alternate command (for keywords) */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { SepLetters, U "_", U "`" }, /* identifiers begin with any letter or _ */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ Letter_Digit_Quotes, /* inside, letters, underscores, digits are OK */ U "", /* no escape character within identifiers */ U "", /* so nothing legal after escape char either */ U "", /* identifiers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* identifiers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Numbers, in the form common to most programming languages. */ /* */ /*****************************************************************************/ TOKEN NumberToken = { U "number", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PN", /* Lout command for formatting numbers */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { SepDigits }, /* numbers must begin with a digit */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ U "0123456789.eE", /* inside, digits, decimal point, exponent */ U "", /* no escape character within numbers */ U "", /* so nothing legal after escape char either */ U "", /* numbers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* numbers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Operators, when user-defined from a set of punctuation characters */ /* */ /*****************************************************************************/ #define OperatorToken(start, legal) /* define operator token */ \ { \ U "operator", /* name used for debugging only */ \ PRINT_WHOLE_QUOTED, /* print this token as usual */ \ U "@PO", /* Lout command for formatting this */ \ U "", /* no alternate command */ \ U "", /* no following command */ \ FALSE, /* token not just start of line */ \ { start }, /* token begins with any of these */ \ { NULL }, /* no start2 needed */ \ { NULL }, /* so no brackets2 either */ \ { NULL }, /* so no end2 either */ \ U legal, /* inside, same as start */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape; no end inner esc */ \ U "", /* no bracketing delimiter */ \ U "", /* no ending delimiter */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN NonpareilOperatorToken = OperatorToken(SepNonpareilOperatorPunct, NonpareilOperatorPunct); TOKEN HaskellOperatorToken = OperatorToken(HaskellOpChars, HaskellOpCharacters); /*****************************************************************************/ /* */ /* Tokens defining comments in various languages. */ /* */ /*****************************************************************************/ TOKEN CCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "/*" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintableTabNLFF, /* inside, any printable char, tab, nl, ff is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* C comments do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "*/", /* comments end with this character pair */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN CPPCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "//" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK (not NL) */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* C comments do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* no end delimiter (end of line will end it) */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN EiffelCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "--" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "`", /* start of "inner escape" in Eiffel comment */ U "'", /* end of "inner escape" in Eiffel comment */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN BlueCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "==", U "--" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "`", /* start of "inner escape" in Blue comment */ U "'", /* end of "inner escape" in Blue comment */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN NonpareilCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "#" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK (not NL) */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "`", /* start of "inner escape" in Nonpareil comment */ U "'", /* end of "inner escape" in Nonpareil comment */ U "", /* no bracketing delimiter */ U "", /* no end delimiter (end of line will end it) */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PythonCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "#" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK (not NL) */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* Python comments do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* no end delimiter (end of line will end it) */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN HaskellLineCommentToken = { U "line comment", /* used by error messages involving this token */ PRINT_NODELIMS_QUOTED,/* print this token in quotes without delimiters */ U "@PCL", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "--" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "`", /* start of "inner escape" in Haskell comment */ U "'", /* end of "inner escape" in Haskell comment */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN HaskellCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_NODELIMS_QUOTED,/* print this token in quotes without delimiters */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "{-" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintableTabNLFF, /* inside, any printable char, tab, nl, ff is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* C comments do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "-}", /* comments end with this character pair */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Tokens defining escape comments in various languages. */ /* */ /* See discussion of "inner escapes" above for more information. */ /* */ /*****************************************************************************/ TOKEN CCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "/*@" }, /* escape comments begin with this delimiter */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintableTabNLFF, /* inside, any printable char, tab, nl, ff is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "*/", /* comments end with this character pair */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN CPPCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "//@" }, /* escape comments begin with this delimiter */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "", /* no end delimiter (end of line will end it) */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN EiffelCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "--@" }, /* escape comments begin with this delimiter */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN BlueCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "==@", U "--@" }, /* escape comments begin with these delimiters */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PythonCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "#@" }, /* escape comments begin with this delimiter */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK (not NL) */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN HaskellCommentEscapeToken = { U "Lout escape", PRINT_NODELIMS_UNQUOTED, U "", U "", U "", FALSE, { U "{-@" }, { NULL }, { NULL }, { NULL }, AllPrintablePlusTab, U "", U "", U "", U "", U "", U "-}", FALSE, FALSE, }; TOKEN HaskellLineCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "--@" }, /* escape comments begin with this delimiter */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "", /* no ending delimiter; end of line will end it */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Tokens which are fixed strings, hence simpler than the above. */ /* */ /*****************************************************************************/ #define FixedToken(str, command) /* define fixed-string token */ \ { \ U str, /* name used for debugging only */ \ PRINT_WHOLE_QUOTED, /* print this token as usual */ \ U command, /* Lout command for formatting this */ \ U "", /* no alternate command */ \ U "", /* no following command */ \ FALSE, /* token not just start of line */ \ { U str }, /* token begins (and ends!) with this */ \ { NULL }, /* no start2 needed */ \ { NULL }, /* so no brackets2 either */ \ { NULL }, /* so no end2 either */ \ U "", /* nothing inside, since no inside */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape; no end inner esc */ \ U "", /* no bracketing delimiter */ \ U "", /* no ending delimiter */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN HashToken = FixedToken("#", "@PO"); TOKEN ExclamationToken = FixedToken("!", "@PO"); TOKEN PercentToken = FixedToken("%", "@PO"); TOKEN HatToken = FixedToken("^", "@PO"); TOKEN AmpersandToken = FixedToken("&", "@PO"); TOKEN SlashToken = FixedToken("/", "@PO"); TOKEN ArrowToken = FixedToken("->", "@A sym {arrowright} @PO"); TOKEN BackSlashToken = FixedToken("\\", "@PO"); TOKEN LeftParenToken = FixedToken("(", "@PO"); TOKEN RightParenToken = FixedToken(")", "@PO"); TOKEN PlusToken = FixedToken("+", "@A sym {plus} @PO"); TOKEN EqualToken = FixedToken("=", "@A sym {equal} @PO"); TOKEN LeftBraceToken = FixedToken("{", "@PO"); TOKEN RightBraceToken = FixedToken("}", "@PO"); TOKEN BarToken = FixedToken("|", "@PO"); TOKEN CircumToken = FixedToken("~", "@PO"); TOKEN LeftBracketToken = FixedToken("[", "@PO"); TOKEN LeftBracketBarToken = FixedToken("[|", "@PO"); TOKEN RightBracketToken = FixedToken("]", "@PO"); TOKEN RightBracketBarToken = FixedToken("|]", "@PO"); TOKEN SemicolonToken = FixedToken(";", "@PO"); TOKEN ColonToken = FixedToken(":", "@PO"); TOKEN LessToken = FixedToken("<", "@A sym {less} @PO"); TOKEN GreaterToken = FixedToken(">", "@A sym {greater} @PO"); TOKEN QuestionToken = FixedToken("?", "@PO"); TOKEN CommaToken = FixedToken(",", "@PO"); TOKEN DotToken = FixedToken(".", "@PO"); TOKEN DotDotToken = FixedToken("..", "@PO"); TOKEN DotDotDotToken = FixedToken("...","@PO"); TOKEN LessEqualToken = FixedToken("<=", "@A sym {lessequal} @PO"); TOKEN GreaterEqualToken = FixedToken(">=", "@A sym {greaterequal} @PO"); TOKEN CNotEqualToken = FixedToken("!=", "@A sym {notequal} @PO"); TOKEN EiffelNotEqualToken = FixedToken("/=", "@A sym {notequal} @PO"); TOKEN BlueNotEqualToken = FixedToken("<>", "@A sym {notequal} @PO"); TOKEN AssignToken = FixedToken(":=", "@PO"); TOKEN QuestionAssignToken = FixedToken("?=", "@PO"); TOKEN DollarToken = FixedToken("$", "@PO"); TOKEN ImpliesToken = FixedToken("=>","@A sym {arrowdblright} @PO"); TOKEN LeftArrowToken = FixedToken("<-", "@A sym {arrowleft} @PO"); TOKEN HaskellLambdaToken = FixedToken("\\", "@PLAMBDA"); TOKEN HaskellAtPatternToken = FixedToken("@", "@PO"); TOKEN DoubleColonToken = FixedToken("::", "@PDOUBLECOLON"); TOKEN FunctionCompositionToken = FixedToken(" . ", "@PCIRC"); TOKEN HaskellEquivalenceToken = FixedToken("==", "@A sym {equivalence} @PO"); TOKEN HaskellConcatenationToken = FixedToken("++", "@PPLUSPLUS"); TOKEN EqvToken = FixedToken("<=>","@A sym {arrowdblboth} @PO"); TOKEN HaskellOrToken = FixedToken("||", "@PO"); TOKEN HaskellAndToken = FixedToken("&&", "@PO"); /* TOKEN HaskellBacktickToken = FixedToken("`", "@PO"); unused */ TOKEN PythonPowerToken = FixedToken( "**", "@PO" ); TOKEN PythonBitLeftShiftToken = FixedToken( "<<", "@PO" ); TOKEN PythonBitRightShiftToken = FixedToken( ">>", "@PO" ); TOKEN PythonBacktickToken = FixedToken( "`", "@PO" ); TOKEN PythonDecoratorToken = FixedToken( "@", "@PO" ); /*****************************************************************************/ /* */ /* Fixed-string tokens that are to be printed COMMAND_ONLY (no parameter). */ /* */ /*****************************************************************************/ #define NoParameterToken(str, command) /* fixed-string token */ \ { \ U str, /* name used for debugging only */ \ PRINT_COMMAND_ONLY, /* print only the command */ \ U command, /* Lout command for formatting this */ \ U "", /* no alternate command */ \ U "", /* following command */ \ FALSE, /* token not just start of line */ \ { U str }, /* token begins (and ends!) with this */ \ { NULL }, /* no start2 needed */ \ { NULL }, /* so no bracket2 either */ \ { NULL }, /* so no end2 either */ \ U "", /* nothing inside, since no inside */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape; no end inner esc */ \ U "", /* no bracketing delimiter */ \ U "", /* no ending delimiter */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN StarToken = NoParameterToken("*", "{@PA}"); TOKEN MinusToken = NoParameterToken("-", "{@PM}"); TOKEN EiffelDotToken = NoParameterToken(".", "{@PD}"); TOKEN NonpareilDotDotToken = NoParameterToken("..", "{@PDD}"); TOKEN NonpareilExclamationToken = NoParameterToken("!", "@PO{\"!\" &0.1f}"); TOKEN HaskellColonToken = NoParameterToken(":", "{@PCOLON}"); /*****************************************************************************/ /* */ /* Ruby specifics */ /* */ /*****************************************************************************/ TOKEN RubyIdentifierToken = { U "identifier", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PI", /* Lout command for formatting identifiers */ U "@PK", /* Alternate command (for keywords) */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { SepLetters, U "_", U "$", U "@@", U "@" }, /* identifiers begin with these */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ Ruby_Methodname, /* inside, letters, underscores, digits, !, ?, = */ U "", /* no escape character within identifiers */ U "", /* so nothing legal after escape char either */ U "", /* identifiers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* identifiers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN RubyGenDelimStringToken = { U "generalized string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "%", U "%q", U "%Q", U "%w", U "%r", U "%x" }, /* generalized strings begin with these */ { SepPunct }, /* start2 can be any punctuation character */ { BktPunct }, /* bracketing delimiters to match SepPunct */ { EndPunct }, /* end2 must match start2 */ AllCharacters, /* inside, any character at all is OK */ U "\\", /* within strings, \\ is the escape character */ AllCharacters, /* after escape char, any character at all is OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* will be using bracket2 for bracket delimiter */ U "", /* will be using end2 for the end delimiter here */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* RSL Sepcifics */ /* */ /*****************************************************************************/ TOKEN RSLIdentifierToken = { U "identifier", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PI", /* Lout command for formatting identifiers */ U "@PK", /* Alternate command (for keywords) */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { SepLetters, U "_", U "`" }, /* identifiers begin with any letter or _ */ { NULL }, /* no start2 needed */ { NULL }, /* so no brackets2 either */ { NULL }, /* so no end2 either */ Letter_Digit, /* inside, letters, underscores, digits are OK */ U "", /* no escape character within identifiers */ U "", /* so nothing legal after escape char either */ U "", /* identifiers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* identifiers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN RSLProductToken = FixedToken("><", "@A sym{multiply} @PO" ) ; TOKEN RSLPartialMapToken = FixedToken("-~m->", "@PartialMap @FA @PO" ) ; TOKEN RSLAndToken = FixedToken("/\\", "@A sym{logicaland} @PO" ) ; TOKEN RSLAlwaysToken = FixedToken("always", "@Eq { square } @FA @PO" ) ; TOKEN RSLIsInToken = FixedToken("isin", "@A sym{element @PO" ) ; TOKEN RSLSubsetToken = FixedToken("<<=", "@A sym{reflexsubset} @PO" ) ; TOKEN RSLUnionToken = FixedToken("union", "@A sym{union} @PO" ) ; TOKEN RSLListStartToken = FixedToken("<.", "@A sym{angleleft} @PO" ) ; TOKEN RSLParToken = FixedToken("@Eq { dbar } @FA @PO", "@PO" ) ; TOKEN RSLIntChoiceToken = FixedToken("|^|", "@IntChoice @FA @PO" ) ; TOKEN RSLTurnstileToken = FixedToken("|-", "@Eq { vdash } @FA @PO" ) ; TOKEN RSLListToken = NoParameterToken( "-list", "{*}" ) ; TOKEN RSLPartialFnToken = FixedToken("-~->", "@PartialFn @FA @PO" ) ; TOKEN RSLRelationToken = FixedToken("<->", "@A sym{arrowboth} @PO" ) ; TOKEN RSLOrToken = FixedToken("\\/", "@A sym{logicalor} @PO" ) ; TOKEN RSLNotIsInToken = FixedToken("~isin", "@A sym{notelement }@PO" ) ; TOKEN RSLProperSuperToken= FixedToken(">>", "@A sym{propersuperset} @PO" ) ; TOKEN RSLInterToken = FixedToken("inter", "@A sym{intersection} @PO" ) ; TOKEN RSLListEndToken = FixedToken(".>", "@A sym{angleright} @PO" ) ; TOKEN RSLInterlockToken = FixedToken("++", "@Interlock @FA @PO" ) ; TOKEN RSLLambdaToken = FixedToken("-\\", "@A sym{lambda} @PO" ) ; TOKEN RSLImplRelToken = FixedToken("{=", "@Eq { preceq } @FA @PO" ) ; TOKEN RSLInfListToken = FixedToken("-inflist", "@InfList @FA @PO" ) ; TOKEN RSLMapToken = FixedToken("-m->", "@Map @FA @PO" ) ; TOKEN RSLSTToken = FixedToken(":-", "@A sym{dotmath} @PO" ) ; TOKEN RSLNotEqualToken = FixedToken("~=", "@A sym{notequal} @PO" ) ; TOKEN RSLPowerToken = FixedToken("**", "@A sym{arrowup} @PO" ) ; TOKEN RSLProperSubsetToken = FixedToken( "<<", "@A sym{propersubset} @PO" ) ; TOKEN RSLSupersetToken = FixedToken(">>=", "@A sym{reflexsuperset} @PO" ) ; TOKEN RSLOverrideToken = FixedToken("!!", "@Dagger @FA @PO" ) ; TOKEN RSLMapletToken = FixedToken("+>", "@Eq { mapsto } @FA @PO" ) ; TOKEN RSLExtChoiceToken = FixedToken("|=|", "@ExtChoice @FA @PO" ) ; TOKEN RSLApplyToken = FixedToken("#", "@A sym{degree} @PO" ) ; TOKEN RSLImplExprToken = FixedToken("[=", "@Eq { sqsubseteq } @FA @PO" ) ; TOKEN RSLPrimeToken = NoParameterToken( "'", "{'}" ) ; TOKEN RSLExistsOneToken = FixedToken("exists!", "{@Sym existential}! @FA @PO" ); /*****************************************************************************/ /* */ /* Perl (quarantined from other languages since it's very different). */ /* */ /* Perl code co-authored by Jeffrey H. Kingston and Mark Summerfield */ /* March 2000 */ /* */ /* In the comments below, WCS refers to "Programming Perl", Second */ /* Edition (1996), by Wall, Christiansen, and Schwartz. However Perl */ /* has changed since then and this code also reflects those changes */ /* based on the on-line documentation provided with the 5.6.0 release. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Perl's strings and regular expressions */ /* */ /* The table in WCS pp. 41 is a good summary of the possibilities: */ /* */ /* '' q// */ /* "" qq// */ /* `` qx// */ /* () qw// */ /* // m// */ /* s/// s/// */ /* y/// tr/// */ /* */ /* To this must be added the following quotation, which begins just */ /* below the table: */ /* */ /* Any non-alphabetic, non-whitespace delimiter can be used in place */ /* of /. If the opening delimiter is a parenthesis, bracket, brace, */ /* or angle bracket, the closing delimiter will be the matching */ /* construct. (Embedded occurrences of the delimiters must match in */ /* pairs.) ... Finally, for two-string constructs like s/// and tr///, */ /* if the first pair of quotes is a bracketing pair, then the second */ /* part gets its own starting quote character, which needn't be the */ /* same as the first pair. So you can write things like s{foo}(bar) */ /* or tr[a-z][A-Z]. Whitespace is allowed between the two inner quote */ /* characters, so you could even write that last one as */ /* */ /* tr [a-z] */ /* [A-Z] */ /* */ /* Amazingly, the tokens below implement all of this perfectly except that */ /* when / appears without anything in front, it will be recognized as a */ /* regular expression provided that one of a long list of things precedes */ /* it, otherwise it will be a division symbol. This is not perfect but */ /* seems to come extremely close in practice. */ /* */ /*****************************************************************************/ TOKEN PerlSingleQuoteStringToken = { U "''-string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "'" }, /* strings begin with a ' character */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* inside, any character at all is OK */ U "\\", /* within strings, \\ is the escape character */ AllCharacters, /* after escape, any character is OK (trust us) */ U "", U "", /* no "inner escapes"; no end innner escape */ U "", /* no bracketing delimiter */ U "\'", /* strings end with a ' character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlDoubleQuoteStringToken = { U "\"\"-string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "\"" }, /* strings begin with a " character */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* inside, any character at all is OK */ U "\\", /* within strings, \\ is the escape character */ AllCharacters, /* after escape char, any character at all is OK */ U "", U "", /* no "inner escapes"; no end innner escape */ U "", /* no bracketing delimiter */ U "\"", /* strings end with a " character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlBackQuoteStringToken = { U "``-string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "`" }, /* strings begin with a ` character */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* inside, any character at all is OK */ U "\\", /* within strings, \\ is the escape character */ AllCharacters, /* after escape char, any character at all is OK */ U "", U "", /* no "inner escapes"; no end innner escape */ U "", /* no bracketing delimiter */ U "`", /* strings end with a ` character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlQTypeStringToken = { U "q-type string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "q", U "qq", U "qx", U "qw", U "qr", U "m" },/* q-type string begins */ { SepPunct }, /* start2 can be any punctuation character */ { BktPunct }, /* bracketing delimiters to match SepPunct */ { EndPunct }, /* end2 must match start2 */ AllCharacters, /* inside, any character at all is OK */ U "\\", /* within strings, \\ is the escape character */ AllCharacters, /* after escape char, any character at all is OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* will be using bracket2 for bracket delimiter */ U "", /* will be using end2 for the end delimiter here */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlSTypeStringToken = { U "s-type string", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PS", /* Lout command for formatting strings */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "s", U "y", U "tr" }, /* s-type strings begin with these */ { SepPunct }, /* start2 can be any punctuation character */ { BktPunct }, /* bracketing delimiters to match SepPunct */ { EndPunct }, /* end2 must match start2 */ AllCharacters, /* inside, any character at all is OK */ U "\\", /* within strings, \\ is the escape character */ AllCharacters, /* after escape char, any character at all is OK */ U "", /* strings do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* will be using bracket2 for bracket delimiter */ U "", /* will be using end2 for the end delimiter here */ FALSE, /* end delimiter does not have to be at line start */ TRUE, /* need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Perl "bare" regular expressions */ /* */ /* By a bare regular expression, we mean one that is not preceded by m. */ /* These are distinguished from division by being preceded by one of (, =, */ /* =~, !~, split, if, and, &&, not, ||, xor, not, !, unless, for, foreach, */ /* or while, with up to two white space characters intervening. Also, */ /* a / at the start of a line is taken to begin a regular expression. */ /* */ /*****************************************************************************/ #define PerlREToken(start, com) \ { \ U "regex", /* used by error messages */ \ PRINT_NODELIMS_QUOTED,/* no delims since we supply them */ \ U com, /* the command */ \ U "", /* no alternate command */ \ U "@PS{\"/\"}", /* following command (final /) */ \ FALSE, /* token allowed not just start of line */ \ { U start }, /* preceding token in this case */ \ { U "/", U " /", U "\t/", U " /", U " \t/", U "\t /", U "\t\t/" }, \ { U "", U "", U "", U "", U "", U "", U "" }, \ { U "/", U "/", U "/", U "/", U "/", U "/", U "/" }, \ AllCharacters, /* any character OK inside */ \ U "\\", /* \\ is the escape character */ \ AllCharacters, /* after escape char, any is OK */ \ U "", /* no inner escapes */ \ U "", /* no end innner escape either */ \ U "", /* will be using bracket2 here */ \ U "", /* will be using end2 here */ \ FALSE, /* no need to end at line start */ \ FALSE, /* don't want end delimiter twice */ \ } TOKEN PerlRegExpLPar = PerlREToken("(", "@PO{\"(\"}@PS{\"/\"}@PS"); TOKEN PerlRegExpEq = PerlREToken("=", "@PO{\"=\"} @PS{\"/\"}@PS"); TOKEN PerlRegExpMatch = PerlREToken("=~", "@PO{\"=~\"} @PS{\"/\"}@PS"); TOKEN PerlRegExpNoMatch = PerlREToken("!~", "@PO{\"!~\"} @PS{\"/\"}@PS"); TOKEN PerlRegExpSplit = PerlREToken("split", "@PK{split} @PS{\"/\"}@PS"); TOKEN PerlRegExpIf = PerlREToken("if", "@PK{if} @PS{\"/\"}@PS"); TOKEN PerlRegExpAnd = PerlREToken("and", "@PK{and} @PS{\"/\"}@PS"); TOKEN PerlRegExpAnd2 = PerlREToken("&&", "@PO{\"&&\"} @PS{\"/\"}@PS"); TOKEN PerlRegExpOr = PerlREToken("or", "@PK{or} @PS{\"/\"}@PS"); TOKEN PerlRegExpOr2 = PerlREToken("||", "@PO{\"||\"} @PS{\"/\"}@PS"); TOKEN PerlRegExpXor = PerlREToken("xor", "@PK{xor} @PS{\"/\"}@PS"); TOKEN PerlRegExpNot = PerlREToken("not", "@PK{not} @PS{\"/\"}@PS"); TOKEN PerlRegExpNot2 = PerlREToken("!", "@PO{\"!\"} @PS{\"/\"}@PS"); TOKEN PerlRegExpUnless = PerlREToken("unless", "@PK{unless} @PS{\"/\"}@PS"); TOKEN PerlRegExpFor = PerlREToken("for", "@PK{for} @PS{\"/\"}@PS"); TOKEN PerlRegExpForEach = PerlREToken("foreach","@PK{foreach} @PS{\"/\"}@PS"); TOKEN PerlRegExpWhile = PerlREToken("while", "@PK{while} @PS{\"/\"}@PS"); TOKEN PerlRegExpStartLineToken = { U "regex", /* used by error messages */ PRINT_WHOLE_QUOTED, /* we can print the whole thing this time */ U "@PS", /* the command */ U "", /* no alternate command */ U "", /* no following command */ TRUE, /* token allowed only at start of line */ { U "/" }, /* starting delimiter (so easy!) */ { NULL }, /* no start2 */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* any character OK inside */ U "\\", /* \\ is the escape character */ AllCharacters, /* after escape char, any is OK */ U "", /* no inner escapes */ U "", /* no end innner escape either */ U "", /* no bracketing delimiter */ U "/", /* ending delimiter */ FALSE, /* no need to end at line start */ FALSE, /* don't want end delimiter twice */ }; /*****************************************************************************/ /* */ /* Perl's here-documents [OBSOLETE CODE - see following for replacement] */ /* */ /* At present the only terminating strings recognized are EOT, EOF, END, */ /* and the empty string. These may all be quoted in the usual ways. */ /* */ /*****************************************************************************/ #define X(startstr, endstr, startcom, endcom) \ { \ "here-document", /* used by error messages */ \ PRINT_NODELIMS_QUOTED,/* no delims since we supply them */ \ startcom, /* the command */ \ "", /* no alternate command */ \ endcom, /* following command */ \ FALSE, /* token allowed not just start of line */ \ { startstr }, /* starting delimiter */ \ { NULL }, /* no start2 */ \ { NULL }, /* so no bracket2 either */ \ { NULL }, /* no end2 */ \ AllCharacters, /* any character OK inside */ \ "", "", /* no escape character */ \ "", "", /* no inner escapes */ \ "", /* no bracketing delimiter */ \ endstr, /* token ends with this */ \ TRUE, /* must be found at line start */ \ FALSE, /* don't want end delimiter twice */ \ } #define sEOT "\n@PS{\"EOT\"}\n" #define sEOF "\n@PS{\"EOF\"}\n" #define sEND "\n@PS{\"END\"}\n" #define sBLA "\n@PS{\"\"}\n" /* *** TOKEN HereEOTuq = X("<", U "$(", U "$)", U "$0", U "$[", U "$]", U "$^C", U "$^D", U "$^F", U "$^H", U "%^H", U "$^I", U "$^M", U "$^O", U "$^P", U "$^R", U "$^S", U "$^T", U "$^V", U "$^W", U "${^WARNING_BITS}", U "${^WIDE_SYSTEM_CALLS}", U "$^X", }, { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ U "", /* nothing allowed inside, since ends after start */ U "", /* no escape character within identifiers */ U "", /* so nothing legal after escape char either */ U "", /* identifiers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* identifiers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Perl's numeric literals */ /* */ /* These are defined in WCS page 39 basically by giving these examples: */ /* */ /* 12345 # integer */ /* 12345.67 # floating point */ /* 6.02E23 # scientific notation */ /* 0xffff # hexadecimal */ /* 0377 # octal */ /* 4_294_967_296 # underline for legibility */ /* */ /* Implementation is straightforward; hexadecimal is a separate token. */ /* Binary numbers introduced with 5.6.0 of the form 0b1010 are also */ /* catered for. */ /* */ /*****************************************************************************/ TOKEN PerlLiteralNumberToken = { U "number", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PN", /* Lout command for formatting numbers */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { SepDigits }, /* numbers must begin with a digit */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ U "0123456789.eE_", /* inside, digits, point, exponent, underscore */ U "", /* no escape character within numbers */ U "", /* so nothing legal after escape char either */ U "", /* numbers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* numbers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlHexNumberToken = { U "number", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PN", /* Lout command for formatting numbers */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "0x" }, /* hex numbers must begin with 0x */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ U "0123456789AaBbCcDdEeFf", /* inside, hexadecimal digits */ U "", /* no escape character within numbers */ U "", /* so nothing legal after escape char either */ U "", /* numbers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* numbers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlBinaryNumberToken = { U "number", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PN", /* Lout command for formatting numbers */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "0b" }, /* binary numbers must begin with 0b */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ U "01", /* inside, binary digits */ U "", /* no escape character within numbers */ U "", /* so nothing legal after escape char either */ U "", /* numbers do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* numbers do not end with a delimiter */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Perl's comments */ /* */ /* "Comments are indicated by the # character and extend to the end of */ /* the line." (WCS page 35). To this we have added the usual Lout escape */ /* comment beginning with #@. */ /* */ /*****************************************************************************/ TOKEN PerlCommentToken = { U "comment", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* print this token in quotes etc. as usual */ U "@PC", /* Lout command for formatting comments */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "#" }, /* comments begin with this character */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK (not NL) */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* C comments do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "", /* no end delimiter (end of line will end it) */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PerlCommentEscapeToken = { U "Lout escape", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* print this token unformatted */ U "", /* no Lout command since we are printing raw */ U "", /* no alternate command */ U "", /* no following command */ FALSE, /* token allowed anywhere, not just start of line */ { U "#@" }, /* comments begin with this character pair */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char is OK */ U "", /* no escape character within comments */ U "", /* so nothing legal after escape char either */ U "", /* no "inner escape" in escape comments */ U "", /* so no end of "inner escape" either */ U "", /* no bracketing delimiter */ U "", /* no end delimiter (end of line will end it) */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Perl's POD sub-language */ /* */ /* Pod is handled as a completely different language. However we need */ /* one Perl token which recognizes an entire Pod interpolation and prints */ /* it enclosed in @Pod { ... } so that Lout knows to call back later on it. */ /* */ /* "A line beginning with = is assumed to introduce some documentation, */ /* which continues until another line is reached beginning with =cut" */ /* (WCS page 36). Strictly speaking this is only valid at points where */ /* a statement would be legal, but that is beyond prg2lout to implement. */ /* */ /*****************************************************************************/ TOKEN PerlPodToken = { U "perl-pod", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* unquoted but with a command enclosing it */ U "@DP @Pod", /* Lout command for formatting Pod */ U "", /* no alternate command */ U "@DP\n", /* following command */ TRUE, /* token allowed at start of line only */ { U "=", U "=pod" }, /* pod insert begins with either of these */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* inside, any character at all is OK */ U "", /* no escape character within pod comments */ U "", /* so nothing legal after escape char either */ U "", /* pod comments do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "=cut", /* pod comments end with this string */ TRUE, /* end delimiter must be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Perl's operators */ /* */ /* Only those not already in the C/C++ list are given here. */ /* */ /*****************************************************************************/ TOKEN PerlIncrementToken = FixedToken( "++", "@PO" ) ; TOKEN PerlDecrementToken = FixedToken( "--", "@PO" ) ; TOKEN PerlExponentiateToken = FixedToken( "**", "@PO" ) ; TOKEN PerlMatchToken = FixedToken( "=~", "@PO" ) ; TOKEN PerlNotMatchToken = FixedToken( "!~", "@PO" ) ; TOKEN PerlEqualToken = FixedToken( "==", "@PO" ) ; TOKEN PerlAssignToken = FixedToken( "=", "@PO" ) ; TOKEN PerlBitLeftShiftToken = FixedToken( "<<", "@PO" ) ; TOKEN PerlBitRightShiftToken = FixedToken( ">>", "@PO" ) ; TOKEN PerlSpaceshipToken = FixedToken( "<=>", "@PO" ) ; TOKEN PerlAndToken = FixedToken( "&&", "@PO" ) ; TOKEN PerlOrToken = FixedToken( "||", "@PO" ) ; TOKEN PerlRange2Token = FixedToken( "..", "@PO" ) ; TOKEN PerlRange3Token = FixedToken( "...", "@PO" ) ; /*****************************************************************************/ /* */ /* FlagToken - for -r and the rest (followed by white space) */ /* */ /*****************************************************************************/ #define FlagToken(str, command) /* define fixed-string token */ \ { \ U str, /* name used for debugging only */ \ PRINT_WHOLE_QUOTED, /* print this token as usual */ \ U command, /* Lout command for formatting this */ \ U "", /* no alternate command */ \ U "", /* no following command */ \ FALSE, /* token not just start of line */ \ { U str }, /* token begins (and ends!) with this */ \ { U " ", U "\t" }, /* plus a white space char */ \ { U "", U "" }, /* no bracket2 though */ \ { U "", U "" }, /* no end2 though */ \ U "", /* nothing inside, since no inside */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape; no end inner esc */ \ U "", /* no bracketing delimiter */ \ U "", /* no ending delimiter */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN PerlFileTestrToken = FlagToken( "-r", "@PO" ) ; TOKEN PerlFileTestwToken = FlagToken( "-w", "@PO" ) ; TOKEN PerlFileTestxToken = FlagToken( "-x", "@PO" ) ; TOKEN PerlFileTestoToken = FlagToken( "-o", "@PO" ) ; TOKEN PerlFileTestRToken = FlagToken( "-R", "@PO" ) ; TOKEN PerlFileTestWToken = FlagToken( "-W", "@PO" ) ; TOKEN PerlFileTestXToken = FlagToken( "-X", "@PO" ) ; TOKEN PerlFileTestOToken = FlagToken( "-O", "@PO" ) ; TOKEN PerlFileTesteToken = FlagToken( "-e", "@PO" ) ; TOKEN PerlFileTestzToken = FlagToken( "-z", "@PO" ) ; TOKEN PerlFileTestsToken = FlagToken( "-s", "@PO" ) ; TOKEN PerlFileTestfToken = FlagToken( "-f", "@PO" ) ; TOKEN PerlFileTestdToken = FlagToken( "-d", "@PO" ) ; TOKEN PerlFileTestlToken = FlagToken( "-l", "@PO" ) ; TOKEN PerlFileTestpToken = FlagToken( "-p", "@PO" ) ; TOKEN PerlFileTestSToken = FlagToken( "-S", "@PO" ) ; TOKEN PerlFileTestbToken = FlagToken( "-b", "@PO" ) ; TOKEN PerlFileTestcToken = FlagToken( "-c", "@PO" ) ; TOKEN PerlFileTesttToken = FlagToken( "-t", "@PO" ) ; TOKEN PerlFileTestuToken = FlagToken( "-u", "@PO" ) ; TOKEN PerlFileTestgToken = FlagToken( "-g", "@PO" ) ; TOKEN PerlFileTestkToken = FlagToken( "-k", "@PO" ) ; TOKEN PerlFileTestTToken = FlagToken( "-T", "@PO" ) ; TOKEN PerlFileTestBToken = FlagToken( "-B", "@PO" ) ; TOKEN PerlFileTestMToken = FlagToken( "-M", "@PO" ) ; TOKEN PerlFileTestAToken = FlagToken( "-A", "@PO" ) ; TOKEN PerlFileTestCToken = FlagToken( "-C", "@PO" ) ; /*****************************************************************************/ /* */ /* Pod (Plain Old Documentation, used with Perl) tokens */ /* */ /* Pod is treated as a completely different language to Perl. It is */ /* quite possible to use Pod alone without Perl; or, thanks to the */ /* PerlPodToken, to embed Pod in Perl in the usual way. Quotations below */ /* are from Larry Wall's documentation, communicated by Mark Summerfield. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Pod Verbatim paragraphs */ /* */ /* "A verbatim paragraph [is] distinguished by being indented (that is, it */ /* starts with a space or tab). It should be reproduced exactly, with */ /* tabs assumed to be on 8-column boundaries. There are no special */ /* formatting escapes." */ /* */ /* By a "paragraph" is meant a sequence of lines down to the next empty */ /* line; but we will handle verbatim paragraphs one line at a time. */ /* Also, an empty line in the input has to become an empty line in output. */ /* */ /*****************************************************************************/ TOKEN PodVerbatimLineToken = { U "verbatim-para", /* used by error messages involving this token */ PRINT_WHOLE_QUOTED, /* printing the whole paragraph quoted */ U "@PV ", /* Lout command for formatting verbatim line */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "\t", U " " }, /* command begins with this */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllPrintablePlusTab, /* inside, any printable char except newline is OK */ U "", U "", /* no escape character within verbatim lines */ U "", U "", /* no "inner escapes" within verbatim lines */ U "", /* no bracketing delimiter */ U "", /* ends at end of line */ FALSE, /* don't need to be at start of line to end it */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodEmptyLineToken = { U "pod-empty-line", /* used by error messages involving this token */ PRINT_COMMAND_ONLY, /* printing just the command */ U "@PPG\n", /* Lout command for formatting Pod empty line */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "\n" }, /* command begins with this */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ U "", /* nothing inside */ U "", U "", /* no escape character */ U "", U "", /* no inner escape */ U "", /* no bracketing delimiter */ U "", /* token will end with the end of the line */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Pod Command paragraphs */ /* */ /* "All command paragraphs start with =, followed by an identifier, */ /* followed by arbitrary text that the command can use." */ /* */ /* "[A] command lasts up until the end of the paragraph, not the line. */ /* Hence, ... you can see the empty lines after each command to end */ /* its paragraph." */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Pod command paragraphs: =pod */ /* */ /* "The =pod directive does nothing beyond telling the compiler to lay off */ /* parsing code through the next =cut." */ /* */ /*****************************************************************************/ TOKEN PodIgnoreToken = { U "pod-cut", /* used by error messages involving this token */ PRINT_COMMAND_ONLY, /* printing just the command */ U "", /* Lout command for formatting Pod cut (nothing) */ U "", /* no alternate command */ U "", /* no following command */ TRUE, /* token allowed at start of line only */ { U "=pod", U "=cut" }, /* command begins with this */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* anything at all can be inside */ U "", /* no escape character */ U "", /* so nothing legal after escape char either */ U "", /* cut tokens do not permit "inner escapes" */ U "", /* and so there is no end innner escape either */ U "", /* no bracketing delimiter */ U "\n", /* token will end with the end of the line */ TRUE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Pod command paragraphs: =head1, =head2 (and =head3, folklore extension) */ /* */ /*****************************************************************************/ TOKEN PodHeading1Token = { U "=head1", /* used by error messages involving this token */ PRINT_NODELIMS_INNER, /* print without delimiters, formatting inner */ U "@PHA", /* Lout command for formatting Pod heading */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ {U "=head1", U "head1"}, /* command begins with this */ { U " ", U "\t" }, /* helps to skip following white space */ { U "", U "" }, /* no bracket2 */ { U "\n", U "\n" }, /* token ends at end of line */ AllCharacters, /* anything in the heading */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "\n\n", /* token will end with the first blank line */ FALSE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodHeading2Token = { U "=head2", /* used by error messages involving this token */ PRINT_NODELIMS_INNER, /* print without delimiters, formatting inner */ U "@PHB", /* Lout command for formatting Pod heading */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "=head2" }, /* command begins with this */ { U " ", U "\t" }, /* helps to skip following white space */ { U "", U "" }, /* no bracket2 */ { U "\n", U "\n" }, /* token ends at end of line */ AllCharacters, /* anything in the heading */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "\n\n", /* token will end with the first blank line */ FALSE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodHeading3Token = { U "=head3", /* used by error messages involving this token */ PRINT_NODELIMS_INNER, /* print without delimiters, formatting inner */ U "@PHC", /* Lout command for formatting Pod heading */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "=head3" }, /* command begins with this */ { U " ", U "\t" }, /* helps to skip following white space */ { U "", U "" }, /* no bracket2 */ { U "\n", U "\n" }, /* token ends at end of line */ AllCharacters, /* anything in the heading */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "\n\n", /* token will end with the first blank line */ FALSE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Pod command paragraphs: =over, =item, and =back (for lists) */ /* */ /*****************************************************************************/ TOKEN PodOverToken = { U "=over", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED, /* just a number after =over, so this is safe */ U "@RawTaggedList gap{@PLG}indent{@PLI}rightindent{@PLRI}labelwidth{@PLLW ", U "", /* no alternate command */ U "} // {", /* open brace to match } at first item */ TRUE, /* token allowed at start of line only */ { U "=over" }, /* command begins with this */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* inside, any printable char is OK */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "\n", /* token will end with the end of the line */ TRUE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodItemToken = { U "=item", /* used by error messages involving this token */ PRINT_NODELIMS_INNER, /* printing just what follows =item on the line */ U "@Null //}\n@DTI {@PLL", /* Lout command for formatting Pod item */ U "", /* no alternate command */ U "} {", /* open brace to enclose the item content */ TRUE, /* token allowed at start of line only */ { U "=item" }, /* command begins with this */ { U " ", U "\t" }, /* helps to skip following white space */ { U "", U "" }, /* no bracket2 */ { U "\n\n", U "\n\n"},/* token will end at blank line */ AllPrintableTabNL, /* any printable inside */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", U "", /* see brackets2[]; see ends2[] */ FALSE, /* end delimiter (\n) must already be at start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodBackToken = { U "=back", /* used by error messages involving this token */ PRINT_COMMAND_ONLY, /* printing just the command */ U "@Null // }\n@EndList\n", /* Lout command for formatting Pod back */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "=back" }, /* command begins with this */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* anything inside (in principle) */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "\n", /* token will end with the next blank line */ TRUE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Pod narrow items; for these, we are confident in using @TI not @DTI */ /* */ /*****************************************************************************/ #define PodNarrowItemToken(tag, command) \ { \ U "=item", /* used by error messages */ \ PRINT_NODELIMS_INNER, /* printing just what follows =item */ \ U command, /* Lout command for formatting Pod item */ \ U "", /* no alternate command */ \ U "}} {", /* open brace to enclose the item content*/ \ TRUE, /* token allowed at start of line only */ \ { U "=item", U "=item ", U "=item\t", /* starts */ \ U "=item ", U "=item \t", U "=item\t ", U "=item\t\t" }, /* */ \ { U tag }, /* the tag we recognize */ \ { U "" }, /* no bracket2 */ \ { U "\n\n", U "\n\n" }, /* token will end at blank line */ \ AllPrintableTabNL, /* any printable inside */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escapes; no end inner escape */ \ U "", U "", /* see brackets2[]; see ends2[] */ \ FALSE, /* end delimiter (\n) already at start */ \ FALSE, /* don't need to see end delimiter twice */ \ } TOKEN PodItemBullet = PodNarrowItemToken("*", "@Null //}\n@TI {@PLL {*"); TOKEN PodItem0 = PodNarrowItemToken("0", "@Null //}\n@TI {@PLL {0"); TOKEN PodItem1 = PodNarrowItemToken("1", "@Null //}\n@TI {@PLL {1"); TOKEN PodItem2 = PodNarrowItemToken("2", "@Null //}\n@TI {@PLL {2"); TOKEN PodItem3 = PodNarrowItemToken("3", "@Null //}\n@TI {@PLL {3"); TOKEN PodItem4 = PodNarrowItemToken("4", "@Null //}\n@TI {@PLL {4"); TOKEN PodItem5 = PodNarrowItemToken("5", "@Null //}\n@TI {@PLL {5"); TOKEN PodItem6 = PodNarrowItemToken("6", "@Null //}\n@TI {@PLL {6"); TOKEN PodItem7 = PodNarrowItemToken("7", "@Null //}\n@TI {@PLL {7"); TOKEN PodItem8 = PodNarrowItemToken("8", "@Null //}\n@TI {@PLL {8"); TOKEN PodItem9 = PodNarrowItemToken("9", "@Null //}\n@TI {@PLL {9"); /*****************************************************************************/ /* */ /* Pod command paragraphs: =for, =begin, =end */ /* */ /* "passed directly to particular formatters. A formatter that can utilize */ /* that format will use the section, otherwise it will be ignored." So */ /* I've put in a "=begin lout" token, also recognized as "=begin Lout". */ /* */ /*****************************************************************************/ TOKEN PodForToken = { U "=for", /* used by error messages involving this token */ PRINT_COMMAND_ONLY, /* printing just the command */ U "", /* Lout command for formatting Pod for (nothing) */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "=for" }, /* command begins with this */ { NULL }, { NULL }, /* no start2 needed; so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* anything inside */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "\n", /* token will end with the end of the line */ TRUE, /* end delimiter (\n) has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodBeginToken = { U "=begin", /* used by error messages involving this token */ PRINT_COMMAND_ONLY, /* printing just the command */ U "", /* Lout command for formatting Pod for (nothing) */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "=begin" }, /* command begins with this */ { NULL }, { NULL }, /* no start2 needed; so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* anything inside */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "=end", /* token will end with =end character */ TRUE, /* end delimiter has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; TOKEN PodBeginLoutToken = { U "=begin lout", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED,/* this is a Lout escape, no delims or quotes */ U "", /* Lout command for formatting Pod for (nothing) */ U "", U "", /* no alternate command; no following command */ TRUE, /* token allowed at start of line only */ { U "=begin lout", U "=begin Lout" }, /* command begins with this */ { NULL }, { NULL }, /* no start2 needed; so no bracket2 either */ { NULL }, /* so no end2 either */ AllCharacters, /* anything inside */ U "", U "", /* no escape character; nothing legal after escape */ U "", U "", /* no inner escapes; no end inner escape */ U "", /* no bracketing delimiter */ U "=end", /* token will end with =end character */ TRUE, /* end delimiter has to be at a line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; /*****************************************************************************/ /* */ /* Pod "Ordinary Block of Text" paragraphs */ /* */ /* "It will be filled, and maybe even justified" - I'm setting the whole */ /* Pod in adjust @Break, and making sure that verbatim and command */ /* paragraphs don't get adjusted. So no special requirements here, it */ /* should all happen without any explicit tokens, given that I've set */ /* the Pod language up to simply echo any characters (suitably quoted if */ /* necessary in Lout) that don't match anything else. */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Pod interior sequences (recursive) */ /* */ /* I Italicize text */ /* B Embolden text */ /* S Text containing non-break spaces */ /* C Code "render in typewriter font, or ..." */ /* */ /* Alternatively, instead of "<" .. ">" we may use "<< " .. " >>", or */ /* "<<< " .. " >>>", etc. (Note the whitespace.) */ /* */ /*****************************************************************************/ #define RecursiveToken(str, command) /* Pod recursive token */ \ { \ U str, /* name used for debugging only */ \ PRINT_NODELIMS_INNER, /* recursively format the inside */ \ U command, /* Lout command for formatting this */ \ U "", U "", /* no alternate command; no following */ \ FALSE, /* token not just start of line */ \ { U str }, /* token begins with this */ \ { U "<", U "<< ", U "<<< ", U "<<<< " }, /* start2 */ \ { U "", U "", U "", U "" }, /* no bracket2 */ \ { U ">", U " >>", U " >>>", U " >>>>" }, /* end2 */ \ AllCharacters, /* anything inside (in fact, not used)*/ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape; no end inner esc */ \ U "", /* will use brackets2 here */ \ U "", /* will use end2 here */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN PodItalicToken = RecursiveToken("I", "@PFI"); TOKEN PodBoldToken = RecursiveToken("B", "@PFB"); TOKEN PodNoBreakToken = RecursiveToken("S", "@OneCol"); TOKEN PodCodeToken = RecursiveToken("C", "@PFC"); /*****************************************************************************/ /* */ /* Pod interior sequences (non-recursive) */ /* */ /* L A link; these have an internal format I've not looked at yet. */ /* F File name */ /* X Index */ /* Z<> A zero-width space */ /* */ /* Alternatively, instead of "<" .. ">" we may use "<< " .. " >>", or */ /* "<<< " .. " >>>", etc. (Note the whitespace.) */ /* */ /*****************************************************************************/ #define InteriorToken(str, command, style) /* Pod delimited token */ \ { \ U str, /* name used for debugging only */ \ style, /* print this token unquoted */ \ U command, /* Lout command for formatting this */ \ U "", U "", /* no alternate command; no following */ \ FALSE, /* token not just start of line */ \ { U str }, /* token begins with this */ \ { U "<", U "<< ", U "<<< ", U "<<<< " }, /* start2 */ \ { U "", U "", U "", U "" }, /* no bracket2 */ \ { U ">", U " >>", U " >>>", U " >>>>" }, /* end2 */ \ AllCharacters, /* anything inside */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape; no end inner esc */ \ U "", /* will use brackets2 here */ \ U "", /* will use end2 here */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN PodFileToken = InteriorToken("F", "@PFF", PRINT_NODELIMS_QUOTED); TOKEN PodLinkToken = InteriorToken("L", "@PFL", PRINT_NODELIMS_QUOTED); TOKEN PodIndexToken = InteriorToken("X", "@PFX", PRINT_NODELIMS_QUOTED); TOKEN PodZeroToken = InteriorToken("Z", "", PRINT_COMMAND_ONLY); /*****************************************************************************/ /* */ /* Pod interior sequences (escape sequences) */ /* */ /* E A named character ("optional except in other interior */ /* sequences and when preceded by a capital letter") */ /* */ /* E A literal < */ /* E A literal > */ /* E A literal / */ /* E A literal | */ /* E Character number n (probably in ASCII) */ /* E Some non-numeric HTML entity, such as E */ /* */ /* PodNumCharToken not tested. */ /* */ /*****************************************************************************/ TOKEN PodNumCharToken = { U "E<>", /* used by error messages involving this token */ PRINT_NODELIMS_UNQUOTED,/* we're doing these manually, since they're funny*/ U "\"\\", /* precede character number with \" */ U "", /* no alternate command */ U "\"", /* follow character number with " */ FALSE, /* token allowed at start of line only */ { U "E<" }, /* command begins with this */ { NULL }, /* no start2 needed */ { NULL }, /* so no bracket2 either */ { NULL }, /* so no end2 either */ U "0123456789", /* digits inside */ U "", U "", /* no escape character */ U "", U "", /* no "inner escapes" */ U "", /* no bracketing delimiter */ U ">", /* token will end with > character */ FALSE, /* end delimiter does not have to be at line start */ FALSE, /* don't need to see end delimiter twice to stop */ }; #define PodEscapeToken(str, command) /* Pod delimited token */ \ { \ U str, /* name used for debugging only */ \ PRINT_COMMAND_ONLY, /* print this token unquoted */ \ U command, /* Lout command for formatting this */ \ U "", /* no alternate command */ \ U "", /* no following command */ \ FALSE, /* token not just start of line */ \ { U str }, /* token begins with this */ \ { NULL }, /* start2 */ \ { NULL }, /* bracket2 */ \ { NULL }, /* end2 */ \ U "", /* nothing inside */ \ U "", U "", /* no escape character */ \ U "", U "", /* no inner escape either */ \ U "", /* no bracketing delimiter */ \ U "", /* no ending delimiter */ \ FALSE, /* end not have to be at line start */ \ FALSE, /* don't end delimiter twice to stop */ \ } TOKEN PodLessThanToken = PodEscapeToken("E", "<"); TOKEN PodGreaterThanToken = PodEscapeToken("E", ">"); TOKEN PodSlashToken = PodEscapeToken("E", "/"); TOKEN PodVerbarToken = PodEscapeToken("E", "|"); /*****************************************************************************/ /* */ /* Mark Summerfield writes: */ /* */ /* The following table (and most of its comments) is copied from Gisle Aas */ /* HTML::Entities.pm module with the plain text characters being replaced */ /* by their Lout equivalents and the HTML entities with their pod */ /* equivalents. */ /* */ /*****************************************************************************/ /* Some normal chars that have special meaning in SGML context */ TOKEN PE00 = PodEscapeToken("E", "&"); /* already done above TOKEN PE01 = PodEscapeToken("E", ">"); */ /* already done above TOKEN PE02 = PodEscapeToken("E", "<"); */ TOKEN PE03 = PodEscapeToken("E", "\"\\\"\""); /* PUBLIC ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML */ TOKEN PE04 = PodEscapeToken("E", "{@Char AE}"); TOKEN PE05 = PodEscapeToken("E", "{@Char Aacute}"); TOKEN PE06 = PodEscapeToken("E", "{@Char Acircumflex}"); TOKEN PE07 = PodEscapeToken("E", "{@Char Agrave}"); TOKEN PE08 = PodEscapeToken("E", "{@Char Aring}"); TOKEN PE09 = PodEscapeToken("E", "{@Char Atilde}"); TOKEN PE10 = PodEscapeToken("E", "{@Char Adieresis}"); TOKEN PE11 = PodEscapeToken("E", "{@Char Ccedilla}"); TOKEN PE12 = PodEscapeToken("E", "{@Char Eth}"); TOKEN PE13 = PodEscapeToken("E", "{@Char Eacute}"); TOKEN PE14 = PodEscapeToken("E", "{@Char Ecircumflex}"); TOKEN PE15 = PodEscapeToken("E", "{@Char Egrave}"); TOKEN PE16 = PodEscapeToken("E", "{@Char Edieresis}"); TOKEN PE17 = PodEscapeToken("E", "{@Char Iacute}"); TOKEN PE18 = PodEscapeToken("E", "{@Char Icircumflex}"); TOKEN PE19 = PodEscapeToken("E", "{@Char Igrave}"); TOKEN PE20 = PodEscapeToken("E", "{@Char Idieresis}"); TOKEN PE21 = PodEscapeToken("E", "{@Char Ntilde}"); TOKEN PE22 = PodEscapeToken("E", "{@Char Oacute}"); TOKEN PE23 = PodEscapeToken("E", "{@Char Ocircumflex}"); TOKEN PE24 = PodEscapeToken("E", "{@Char Ograve}"); TOKEN PE25 = PodEscapeToken("E", "{@Char Oslash}"); TOKEN PE26 = PodEscapeToken("E", "{@Char Otilde}"); TOKEN PE27 = PodEscapeToken("E", "{@Char Odieresis}"); TOKEN PE28 = PodEscapeToken("E", "{@Char Thorn}"); TOKEN PE29 = PodEscapeToken("E", "{@Char Uacute}"); TOKEN PE30 = PodEscapeToken("E", "{@Char Ucircumflex}"); TOKEN PE31 = PodEscapeToken("E", "{@Char Ugrave}"); TOKEN PE32 = PodEscapeToken("E", "{@Char Udieresis}"); TOKEN PE33 = PodEscapeToken("E", "{@Char Yacute}"); TOKEN PE34 = PodEscapeToken("E", "{@Char aacute}"); TOKEN PE35 = PodEscapeToken("E", "{@Char acircumflex}"); TOKEN PE36 = PodEscapeToken("E", "{@Char ae}"); TOKEN PE37 = PodEscapeToken("E", "{@Char agrave}"); TOKEN PE38 = PodEscapeToken("E", "{@Char aring}"); TOKEN PE39 = PodEscapeToken("E", "{@Char atilde}"); TOKEN PE40 = PodEscapeToken("E", "{@Char adieresis}"); TOKEN PE41 = PodEscapeToken("E", "{@Char ccedilla}"); TOKEN PE42 = PodEscapeToken("E", "{@Char eacute}"); TOKEN PE43 = PodEscapeToken("E", "{@Char ecircumflex}"); TOKEN PE44 = PodEscapeToken("E", "{@Char egrave}"); TOKEN PE45 = PodEscapeToken("E", "{@Char eth}"); TOKEN PE46 = PodEscapeToken("E", "{@Char edieresis}"); TOKEN PE47 = PodEscapeToken("E", "{@Char iacute}"); TOKEN PE48 = PodEscapeToken("E", "{@Char icircumflex}"); TOKEN PE49 = PodEscapeToken("E", "{@Char igrave}"); TOKEN PE50 = PodEscapeToken("E", "{@Char idieresis}"); TOKEN PE51 = PodEscapeToken("E", "{@Char ntilde}"); TOKEN PE52 = PodEscapeToken("E", "{@Char oacute}"); TOKEN PE53 = PodEscapeToken("E", "{@Char ocircumflex}"); TOKEN PE54 = PodEscapeToken("E", "{@Char ograve}"); TOKEN PE55 = PodEscapeToken("E", "{@Char oslash}"); TOKEN PE56 = PodEscapeToken("E", "{@Char otilde}"); TOKEN PE57 = PodEscapeToken("E", "{@Char odieresis}"); TOKEN PE58 = PodEscapeToken("E", "{@Char germandbls}"); TOKEN PE59 = PodEscapeToken("E", "{@Char thorn}"); TOKEN PE60 = PodEscapeToken("E", "{@Char uacute}"); TOKEN PE61 = PodEscapeToken("E", "{@Char ucircumflex}"); TOKEN PE62 = PodEscapeToken("E", "{@Char ugrave}"); TOKEN PE63 = PodEscapeToken("E", "{@Char udieresis}"); TOKEN PE64 = PodEscapeToken("E", "{@Char yacute}"); TOKEN PE65 = PodEscapeToken("E", "{@Char ydieresis}"); /* Some extra Latin 1 chars that are listed in the HTML3.2 draft 1996/05/21 */ TOKEN PE66 = PodEscapeToken("E", "{@CopyRight}"); TOKEN PE67 = PodEscapeToken("E", "{@Register}"); TOKEN PE68 = PodEscapeToken("E", "~"); /* Additional ISO-8859/1 entities listed in rfc1866 (section 14) */ TOKEN PE69 = PodEscapeToken("E", "{@Char exclamdown}"); TOKEN PE70 = PodEscapeToken("E", "{@Char cent}"); TOKEN PE71 = PodEscapeToken("E", "{@Sterling}"); TOKEN PE72 = PodEscapeToken("E", "{@Char currency}"); TOKEN PE73 = PodEscapeToken("E", "{@Yen}"); TOKEN PE74 = PodEscapeToken("E", "{@Char bar}"); TOKEN PE75 = PodEscapeToken("E", "{@SectSym}"); TOKEN PE76 = PodEscapeToken("E", "{@Char dieresis}"); TOKEN PE77 = PodEscapeToken("E", "{@Char ordfeminine}"); TOKEN PE78 = PodEscapeToken("E", "{@Char guillemotleft}"); TOKEN PE79 = PodEscapeToken("E", "{@Char logicalnot}"); TOKEN PE80 = PodEscapeToken("E", "{@Char hyphen}"); TOKEN PE81 = PodEscapeToken("E", "{@Char macron}"); TOKEN PE82 = PodEscapeToken("E", "{@Char degree}"); TOKEN PE83 = PodEscapeToken("E", "{@Char plusminus}"); TOKEN PE84 = PodEscapeToken("E", "{@Char onesuperior}"); TOKEN PE85 = PodEscapeToken("E", "{@Char twosuperior}"); TOKEN PE86 = PodEscapeToken("E", "{@Char threesuperior}"); TOKEN PE87 = PodEscapeToken("E", "{@Char acute}"); TOKEN PE88 = PodEscapeToken("E", "{@Char mu}"); TOKEN PE89 = PodEscapeToken("E", "{@ParSym}"); TOKEN PE90 = PodEscapeToken("E", "{@Char periodcentered}"); TOKEN PE91 = PodEscapeToken("E", "{@Char cedilla}"); TOKEN PE92 = PodEscapeToken("E", "{@Char ordmasculine}"); TOKEN PE93 = PodEscapeToken("E", "{@Char guillemotright}"); TOKEN PE94 = PodEscapeToken("E", "{@Char onequarter}"); TOKEN PE95 = PodEscapeToken("E", "{@Char onehalf}"); TOKEN PE96 = PodEscapeToken("E", "{@Char threequarters}"); TOKEN PE97 = PodEscapeToken("E", "{@Char questiondown}"); TOKEN PE98 = PodEscapeToken("E", "{@Multiply}"); TOKEN PE99 = PodEscapeToken("E", "{@Divide}"); /*****************************************************************************/ /* */ /* LANGUAGE - put your language declarations in this section. */ /* */ /* The field names and their meanings are: */ /* */ /* names Set of alternative names for this languages */ /* setup_file The default Lout setup file (e.g. "cprint", "eiffel") */ /* lang_sym The symbol for the language (e.g. "@CP", "@Eiffel") */ /* no_match What to do if something fails to match (see below) */ /* tokens Set of all tokens of this language */ /* keywords Set of all keywords for this language */ /* */ /* Acceptable values for no_match are: */ /* */ /* NO_MATCH_ERROR Generate an error message and skip the character. */ /* */ /* NO_MATCH_PRINT Print the character in a way that is Lout-safe; that */ /* is, mostly raw but in quotes for "/", "@" etc., and */ /* handling tabs and newlines appropriately. */ /* */ /*****************************************************************************/ #define NO_MATCH_ERROR 1 #define NO_MATCH_PRINT 2 #define NO_LANGUAGE ((LANGUAGE *) NULL) typedef struct lang_rec { char *names[MAX_NAMES]; char *setup_file; char *lang_sym; int no_match; TOKEN *tokens[MAX_TOKENS]; char *keywords[MAX_KEYWORDS]; } LANGUAGE; LANGUAGE CLanguage = { { "C", "c", "C++", "c++" }, "cprint", "@CP", NO_MATCH_ERROR, { &CStringToken, &CCharacterToken, &IdentifierToken, &NumberToken, &CCommentToken, &CCommentEscapeToken, &CPPCommentToken, &CPPCommentEscapeToken, &HashToken, &ExclamationToken, &PercentToken, &HatToken, &AmpersandToken, &StarToken, &LeftParenToken, &RightParenToken, &MinusToken, &PlusToken, &EqualToken, &LeftBraceToken, &RightBraceToken, &BarToken, &CircumToken, &LeftBracketToken, &RightBracketToken, &SemicolonToken, &ColonToken, &LessToken, &GreaterToken, &QuestionToken, &CommaToken, &DotToken, &SlashToken, &BackSlashToken, &ArrowToken, &LessEqualToken, &GreaterEqualToken, &CNotEqualToken }, { "asm", "auto", "break", "case", "catch", "char", "class", "const", "continue", "default", "delete", "do", "double", "else", "enum", "extern", "float", "for", "friend", "goto", "if", "inline", "int", "long", "new", "operator", "private", "protected", "public", "register", "return", "short", "signed", "sizeof", "static", "struct", "switch", "template", "this", "throw", "try", "typedef", "union", "unsigned", "virtual", "void", "volatile", "while", /* these contributed by Isaac To */ "bool", "wchar_t", "typeid", "typename", "false", "true", "const_cast", "dynamic_cast", "reinterpret_cast", "static_cast", "namespace", "using", "and", "and_eq", "bitand", "bitor", "compl", "not", "not_eq", "or", "or_eq", "xor", "xor_eq", "explicit", "export", "mutable", } }; /* Tokens, keywords taken from the on-line documentation supplied with Python * 2.5 */ LANGUAGE PythonLanguage = { { "Python", "python" }, "python", "@Python", NO_MATCH_ERROR, { &BackSlashToken, &PythonDblStringToken, &PythonSnglStringToken, &PythonTriSnglStringToken, &PythonTriDblStringToken, &PythonCommentToken, &PythonCommentEscapeToken, &IdentifierToken, &NumberToken, &PlusToken, &MinusToken, &StarToken, &PythonPowerToken, &SlashToken, &PercentToken, &PythonBitLeftShiftToken, &PythonBitRightShiftToken, &AmpersandToken, &BarToken, &HatToken, &CircumToken, &LessToken, &GreaterToken, &LessEqualToken, &GreaterEqualToken, &BlueNotEqualToken, &CNotEqualToken, &LeftParenToken, &RightParenToken, &LeftBraceToken, &RightBraceToken, &LeftBracketToken, &RightBracketToken, &CommaToken, &ColonToken, &DotToken, &PythonBacktickToken, &EqualToken, &SemicolonToken, &PythonDecoratorToken, &DotDotDotToken }, { /* Keywords */ "and", "del", "for", "is", "raise", "as", "elif", "from", "lambda", "return", "break", "else", "global", "not", "try", "class", "except", "if", "or", "while", "continue", "exec", "import", "pass", "with", "def", "finally", "in", "print", "yield", /* Built-ins */ "False", "True", "None", "NotImplemented", "Ellipsis", /* Built-in Exceptions */ "BaseException", "SystemExit", "KeyboardInterrupt", "Exception", "GeneratorExit", "StopIteration", "StandardError", "ArithmeticError", "FloatingPointError", "OverflowError", "ZeroDivisionError", "AssertionError", "AttributeError", "EnvironmentError", "IOError", "OSError", "WindowsError", "VMSError", "EOFError", "ImportError", "LookupError", "IndexError", "KeyError", "MemoryError", "NameError", "UnboundLocalError", "ReferenceError", "RuntimeError", "NotImplementedError", "SyntaxError", "IndentationError", "TabError", "SystemError", "TypeError", "ValueError", "UnicodeError", "UnicodeDecodeError", "UnicodeEncodeError", "UnicodeTranslateError", "Warning", "DeprecationWarning", "PendingDeprecationWarning", "RuntimeWarning", "SyntaxWarning", "UserWarning", "FutureWarning", "ImportWarning", "UnicodeWarning", /* Built-in Functions (excluding those designated "non-essential") */ "__import__", "abs", "all", "any", "basestring", "bool", "callable", "chr", "classmethod", "cmp", "compile", "complex", "delattr", "dict", "dir", "divmod", "enumerate", "eval", "execfile", "file", "filter", "float", "frozenset", "getattr", "globals", "hasattr", "hash", "help", "hex", "id", "input", "int", "isinstance", "issubclass", "iter", "len", "list", "locals", "long", "map", "max", "min", "object", "oct", "open", "ord", "pow", "property", "range", "raw_input", "reduce", "reload", "repr", "reversed", "round", "set", "setattr", "slice", "sorted", "staticmethod", "str", "sum", "super", "tuple", "type", "unichr", "unicode", "vars", "xrange", "zip", /* Built-in Modules */ /* This has been deleted because the original list was simply wrong. Python has a large library of modules but they are not built-in or part of the language per-se. */ } }; /*****************************************************************************/ /* */ /* Ruby */ /* */ /*****************************************************************************/ LANGUAGE RubyLanguage = { { "Ruby", "ruby" }, "ruby", "@Ruby", NO_MATCH_ERROR, { &BackSlashToken, &PerlRegExpLPar, &PerlRegExpEq, &PerlRegExpMatch, &PerlRegExpNoMatch, &PerlRegExpSplit, &PerlRegExpIf, &PerlRegExpAnd, &PerlRegExpAnd2, &PerlRegExpOr, &PerlRegExpOr2, &PerlRegExpXor, &PerlRegExpNot, &PerlRegExpNot2, &PerlRegExpUnless, &PerlDoubleQuoteStringToken, &PerlSingleQuoteStringToken, &PerlBackQuoteStringToken, &RubyGenDelimStringToken, &RubyIdentifierToken, &NumberToken, &PerlCommentToken, &PerlCommentEscapeToken, &SemicolonToken, &CommaToken, &ColonToken, &EiffelDotToken, &HereEOTuq, &HereEOTdq, &HereEOTfq, &HereEOTbq, &HereEOFuq, &HereEOFdq, &HereEOFfq, &HereEOFbq, &HereENDuq, &HereENDdq, &HereENDfq, &HereENDbq, &HereBLAuq, &HereBLAdq, &HereBLAfq, &HereBLAbq, &ExclamationToken, &EqualToken, &CNotEqualToken, &LeftParenToken, &RightParenToken, &LeftBracketToken, &RightBracketToken, &LeftBraceToken, &RightBraceToken, &AssignToken, &QuestionAssignToken, &PlusToken, &MinusToken, &StarToken, &PercentToken, &HatToken, &SlashToken, &BarToken, &LessToken, &GreaterToken, &LessEqualToken, &CircumToken, &GreaterEqualToken }, { "alias", "and", "begin", "break", "case", "catch", "class", "def", "do", "elsif", "else", "fail", "ensure", "for", "end", "if", "in", "module", "next", "not", "or", "raise", "redo", "rescue", "retry", "return", "then", "throw", "super", "unless", "undef", "until", "when", "while", "yield" } }; /*****************************************************************************/ /* */ /* Eiffel and Blue */ /* */ /*****************************************************************************/ LANGUAGE EiffelLanguage = { { "Eiffel", "eiffel" }, "eiffel", "@Eiffel", NO_MATCH_ERROR, { &EiffelStringToken, &EiffelCharacterToken, &IdentifierToken, &NumberToken, &EiffelCommentToken, &EiffelCommentEscapeToken, &SemicolonToken, &CommaToken, &ColonToken, &EiffelDotToken, &ExclamationToken, &EqualToken, &EiffelNotEqualToken, &LeftParenToken, &RightParenToken, &LeftBracketToken, &RightBracketToken, &LeftBraceToken, &RightBraceToken, &AssignToken, &QuestionAssignToken, &PlusToken, &MinusToken, &StarToken, &DollarToken, &HatToken, &SlashToken, &BackSlashToken, &LessToken, &GreaterToken, &LessEqualToken, &GreaterEqualToken }, { "alias", "all", "and", "as", "check", "class", "creation", "debug", "deferred", "do", "else", "elseif", "end", "ensure", "expanded", "export", "external", "false", "feature", "from", "frozen", "if", "implies", "indexing", "infix", "inherit", "inspect", "invariant", "is", "like", "local", "loop", "obsolete", "old", "once", "or", "prefix", "redefine", "rename", "require", "rescue", "retry", "select", "separate", "strip", "then", "true", "undefine", "unique", "until", "variant", "when", "xor", "not", "interface" } }; LANGUAGE BlueLanguage = { { "Blue", "blue" }, "blue", "@Blue", NO_MATCH_ERROR, { &CStringToken, &IdentifierToken, &NumberToken, &BlueCommentToken, &BlueCommentEscapeToken, &CommaToken, &LessToken, &GreaterToken, &ColonToken, &AssignToken, &LeftParenToken, &RightParenToken, &LeftBracketToken, &RightBracketToken, &QuestionAssignToken, &ExclamationToken, &EiffelDotToken, &ImpliesToken, &EqualToken, &BlueNotEqualToken, &LeftBraceToken, &RightBraceToken, &PlusToken, &MinusToken, &StarToken, &SlashToken, &HatToken, &LessEqualToken, &GreaterEqualToken }, { "and", "assert", "builtin", "case", "class", "const", "create", "creation", "deferred", "div", "do", "else", "elseif", "end", "Enumeration", "enumeration", "exit", "if", "in", "interface", "internal", "invariant", "is", "loop", "manifest", "mod", "not", "of", "old", "on", "or", "post", "pre", "redefined", "return", "routines", "super", "then", "uses", "var" } }; /*****************************************************************************/ /* */ /* Java */ /* */ /*****************************************************************************/ LANGUAGE JavaLanguage = { { "Java", "java" }, "java", "@Java", NO_MATCH_ERROR, { &CStringToken, &CCharacterToken, &IdentifierToken, &NumberToken, &CCommentToken, &CCommentEscapeToken, &CPPCommentToken, &CPPCommentEscapeToken, &HashToken, &ExclamationToken, &PercentToken, &HatToken, &AmpersandToken, &StarToken, &LeftParenToken, &RightParenToken, &MinusToken, &PlusToken, &EqualToken, &LeftBraceToken, &RightBraceToken, &BarToken, &CircumToken, &LeftBracketToken, &RightBracketToken, &SemicolonToken, &ColonToken, &LessToken, &GreaterToken, &QuestionToken, &CommaToken, &DotToken, &SlashToken, &BackSlashToken, &LessEqualToken, &GreaterEqualToken, &CNotEqualToken }, { "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "default", "do", "double", "else", "extends", "final", "finally", "float", "for", "goto", "if", "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "try", "void", "volatile", "while", } }; /*****************************************************************************/ /* */ /* Nonpareil (December 2002 - still evolving) */ /* */ /*****************************************************************************/ LANGUAGE NonpareilLanguage = { { "Nonpareil", "nonpareil" }, "nonpareil", "@Nonpareil", NO_MATCH_ERROR, { &CStringToken, &CCharacterToken, &IdentifierToken, &NumberToken, &NonpareilCommentToken, &PythonCommentEscapeToken, &MinusToken, &LeftBraceToken, &RightBraceToken, &LeftBracketToken, &LeftBracketBarToken, &RightBracketToken, &RightBracketBarToken, &CommaToken, &ColonToken, &AssignToken, &LeftParenToken, &RightParenToken, &EiffelDotToken, &NonpareilExclamationToken, &NonpareilDotDotToken, &DotDotDotToken, &NonpareilOperatorToken, }, { "abstract", "as", "builtin", "case", "class", "coerce", "else", "elsif", "end", "enum", "extend", "extension", "filter", "fun", "if", "import", "infix", "inherit", "introduce", "invariant", "is", "meet", "module", "noncreation", "operators", "predefined", "prefix", "prefun", "private", "postfix", "rename", "require", "system", "then", "typeobj", "upto", "when", "yield", /* not keywords, but conventionally set like them */ "false", "true", "self", "and", "or", "not", "div", "mod" } }; /*****************************************************************************/ /* */ /* Haskell */ /* */ /*****************************************************************************/ LANGUAGE HaskellLanguage = { { "Haskell", "haskell" }, "haskell", "@Haskell", NO_MATCH_ERROR, { /*&EqualToken, &PlusToken, &MinusToken, &DotToken, &StarToken, &HaskellColonToken, &LessToken, &GreaterToken, these overlap with HaskellOperatorToken */ &HaskellStringToken, &HaskellCharacterToken, &HaskellIdentifierToken, &NumberToken, &HaskellLineCommentToken, &HaskellCommentToken, &HaskellCommentEscapeToken, &HaskellLineCommentEscapeToken, &SemicolonToken, &CommaToken, &DoubleColonToken, &HaskellEquivalenceToken, &FunctionCompositionToken, &ArrowToken, &LeftArrowToken, &HaskellLambdaToken, &LeftParenToken, &RightParenToken, &LeftBracketToken, &RightBracketToken, &LeftBraceToken, &RightBraceToken, &EiffelNotEqualToken, &LessEqualToken, &ImpliesToken, &GreaterEqualToken, &HaskellConcatenationToken, &HaskellOperatorToken, &HaskellOrToken, &HaskellAndToken, &HaskellAtPatternToken }, { "case", "class", "data", "default", "deriving", "do", "else", "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", "mdo", "module", "newtype", "of", "then", "type", "where", "as", "hiding", "qualified", "True", "False" } }; /*****************************************************************************/ /* */ /* RSL */ /* */ /*****************************************************************************/ /* Tokens, keywords taken from UNU/IIST Report No. 249 */ LANGUAGE RSLLanguage = { { "RSL", "rsl" }, "rsl", "@RSL", NO_MATCH_ERROR, { &RSLIdentifierToken, &CommaToken, &EqualToken, &ColonToken, &LeftParenToken, &RightParenToken, &LeftBraceToken, &RightBraceToken, &EiffelDotToken, &CircumToken, &NumberToken, &SemicolonToken, &MinusToken, &LeftBracketToken, &RightBracketToken, &PlusToken, &BarToken, &CCommentToken, &HatToken, &SlashToken, &LessToken, &GreaterToken, &RSLPrimeToken, &RSLProductToken, &ArrowToken, &RSLPartialMapToken, &RSLAndToken, &RSLAlwaysToken, &LessEqualToken, &RSLIsInToken, &RSLSubsetToken, &RSLUnionToken, &RSLListStartToken, &RSLParToken, &RSLIntChoiceToken, &RSLTurnstileToken, &RSLListToken, &RSLPartialFnToken, &RSLRelationToken, &RSLOrToken, &GreaterEqualToken, &RSLNotIsInToken, &RSLProperSuperToken, &RSLInterToken, &RSLListEndToken, &RSLInterlockToken, &RSLLambdaToken, &RSLImplRelToken, &RSLInfListToken, &RSLMapToken, &ImpliesToken, &RSLSTToken, &RSLNotEqualToken, &RSLPowerToken, &RSLProperSubsetToken, &RSLSupersetToken, &RSLOverrideToken, &RSLMapletToken, &RSLExtChoiceToken, &RSLApplyToken, &RSLImplExprToken, &CCommentEscapeToken, &EiffelCommentToken, &EiffelCommentEscapeToken, &BackSlashToken, &RSLExistsOneToken, &StarToken }, { "Bool", "Char", "Int", "Nat", "Real", "Text", "Unit", "abs", "any", "as", "axiom", "card", "case", "channel", "chaos", "class", "do", "dom", "elems", "else", "elsif", "end", "extend", "false", "for", "hd", "hide", "if", "in", "inds", "initialise", "int", "len", "let", "local", "object", "of", "out", "post", "pre", "read", "real", "rng", "scheme", "skip", "stop", "swap", "test_case", "then", "tl", "true", "type", "until", "use", "value", "variable", "while", "with", "write", "is", "exists", "all" } }; /*****************************************************************************/ /* */ /* Perl and Pod */ /* */ /* We list here all keywords, special variables, predefined filehandles, */ /* and any other identifier that is "built-in". */ /* */ /*****************************************************************************/ LANGUAGE PerlLanguage = { { "Perl", "perl", }, "perl", "@Perl", NO_MATCH_ERROR, { &PerlSingleQuoteStringToken, &PerlDoubleQuoteStringToken, &PerlBackQuoteStringToken, &PerlQTypeStringToken, &PerlSTypeStringToken, &PerlRegExpLPar, &PerlRegExpEq, &PerlRegExpMatch, &PerlRegExpNoMatch, &PerlRegExpSplit, &PerlRegExpIf, &PerlRegExpAnd, &PerlRegExpAnd2, &PerlRegExpOr, &PerlRegExpOr2, &PerlRegExpXor, &PerlRegExpNot, &PerlRegExpNot2, &PerlRegExpUnless, &PerlRegExpFor, &PerlRegExpForEach, &PerlRegExpWhile, &PerlRegExpStartLineToken, &HereEOTuq, &HereEOTdq, &HereEOTfq, &HereEOTbq, &HereEOFuq, &HereEOFdq, &HereEOFfq, &HereEOFbq, &HereENDuq, &HereENDdq, &HereENDfq, &HereENDbq, &HereBLAuq, &HereBLAdq, &HereBLAfq, &HereBLAbq, &PerlIdentifierToken, &PerlSpecialIdentifierToken, &PerlLiteralNumberToken, &PerlHexNumberToken, &PerlBinaryNumberToken, &PerlCommentToken, &PerlCommentEscapeToken, &PerlPodToken, &ExclamationToken, &PercentToken, &HatToken, &AmpersandToken, &StarToken, &SlashToken, &ArrowToken, &BackSlashToken, &LeftParenToken, &RightParenToken, &MinusToken, &PlusToken, &LeftBraceToken, &RightBraceToken, &BarToken, &CircumToken, &LeftBracketToken, &RightBracketToken, &SemicolonToken, &ColonToken, &LessToken, &GreaterToken, &QuestionToken, &CommaToken, &DotToken, &LessEqualToken, &GreaterEqualToken, &CNotEqualToken, &PerlIncrementToken, &PerlDecrementToken, &PerlExponentiateToken, &PerlMatchToken, &PerlNotMatchToken, &PerlEqualToken, &PerlAssignToken, &PerlBitLeftShiftToken, &PerlBitRightShiftToken, &PerlSpaceshipToken, &PerlAndToken, &PerlOrToken, &PerlRange2Token, &PerlRange3Token, &PerlFileTestrToken, &PerlFileTestwToken, &PerlFileTestxToken, &PerlFileTestoToken, &PerlFileTestRToken, &PerlFileTestWToken, &PerlFileTestXToken, &PerlFileTestOToken, &PerlFileTesteToken, &PerlFileTestzToken, &PerlFileTestsToken, &PerlFileTestfToken, &PerlFileTestdToken, &PerlFileTestlToken, &PerlFileTestpToken, &PerlFileTestSToken, &PerlFileTestbToken, &PerlFileTestcToken, &PerlFileTesttToken, &PerlFileTestuToken, &PerlFileTestgToken, &PerlFileTestkToken, &PerlFileTestTToken, &PerlFileTestBToken, &PerlFileTestMToken, &PerlFileTestAToken, &PerlFileTestCToken, }, { /* Built-ins taken from WCS and on-line documentation for 5.6.0 */ /* dbmopen and dbmclose are not included because they are obsolete. */ "abs", "accept", "alarm", "atan2", "bind", "binmode", "bless", "caller", "can", "chdir", "chmod", "chomp", "chop", "chown", "chr", "chroot", "close", "closedir", "connect", "continue", "cos", "crypt", "defined", "delete", "die", "do", "dump", "each", "endgrent", "endhostent", "endnetent", "endprotoent", "endpwent", "endservent", "eof", "eval", "exec", "exists", "exit", "exp", "fcntl", "fileno", "flock", "fork", "format", "formline", "getc", "getgrent", "getgrgid", "getgrnam", "gethostbyaddr", "gethostbyname", "gethostent", "getlogin", "getnetbyaddr", "getnetbyname", "getnetent", "getpeername", "getpgrp", "getppid", "getpriority", "getprotobyname", "getprotobynumber", "getprotoent", "getpwent", "getpwnam", "getpwuid", "getservbyname", "getservbyport", "getservent", "getsockname", "getsockopt", "glob", "gmtime", "goto", "grep", "hex", "import", "index", "int", "ioctl", "isa", "join", "keys", "kill", "last", "lc", "lcfirst", "length", "link", "listen", "local", "localtime", "lock", "log", "lstat", "map", "mkdir", "msgctl", "msgget", "msgrcv", "msgsnd", "my", "next", "no", "oct", "open", "opendir", "ord", "our", "pack", "package", "pipe", "pop", "pos", "print", "printf", "prototype", "push", "quotemeta", "rand", "read", "readdir", "readline", "readlink", "readpipe", "recv", "redo", "ref", "rename", "require", "reset", "return", "reverse", "rewinddir", "rindex", "rmdir", "scalar", "seek", "seekdir", "select", "semctl", "semget", "semop", "send", "setgrent", "sethostent", "setnetent", "setpgrp", "setpriority", "setprotoent", "setpwent", "setservent", "setsockopt", "shift", "shmctl", "shmget", "shmread", "shmwrite", "shutdown", "sin", "sleep", "socket", "socketpair", "sort", "splice", "split", "sprintf", "sqrt", "srand", "stat", "study", "sub", "substr", "symlink", "syscall", "sysopen", "sysread", "sysseek", "system", "syswrite", "tell", "telldir", "tie", "tied", "time", "times", "truncate", "unimport", "uc", "ucfirst", "umask", "undef", "unlink", "unpack", "unshift", "untie", "use", "utime", "values", "vec", "VERSION", "wait", "waitpid", "wantarray", "warn", "write", /* Comparison operators */ "lt", "gt", "eq", "ne", "cmp", "le", "ge", /* Special markers & constants */ "__DATA__", "__END__", "__FILE__", "__LINE__", "__PACKAGE__", /* Predefined filehandles */ "ARGV", "ARGVOUT", "STDERR", "STDIN", "STDOUT", "DATA" /* Pragmas */ "attributes", "autouse", "base", "blib", "bytes", "constant", "charnames", "diagnostics", "fields", "filetest", "integer", "less", "lib", "locale", /* "open", Not listed here since its also a function */ "ops", "overload", "re", "sigtrap", "strict", "subs", "utf8", "vars", "warnings", /* Low-precedence logical operators */ "and", "or", "xor", "not", /* The x keyword */ "x", /* Control structures */ "if", "elsif", /* yes one e */ "else", "unless", "while", "for", "foreach", "continue", "until", /* Special subroutines */ "AUTOLOAD", "BEGIN", "CHECK", "END", "DESTROY", "INIT", /* Predefined classes & namespaces */ "CORE", "GLOBAL", "UNIVERSAL", "SUPER", /* Tie predefined subroutines */ "TIESCALAR", "FETCH", "STORE", "TIEARRAY", "FETCHSIZE", "STORESIZE", "EXISTS", "DELETE", "CLEAR", "PUSH", "POP", "SHIFT", "UNSHIFT", "SPLICE", "EXTEND", "TIEHASH", "FIRSTKEY", "NEXTKEY" "TIEHANDLE", "PRINT", "PRINTF", "WRITE", "READLINE", "GETC", "READ", "CLOSE", "BINMODE", "OPEN", "EOF", "FILENO", "SEEK", "TELL", } }; LANGUAGE PodLanguage = { { "Pod", "pod", "POD" }, "pod", "@Pod", NO_MATCH_PRINT, { &PodVerbatimLineToken, &PodEmptyLineToken, &PodIgnoreToken, &PodHeading1Token, &PodHeading2Token, &PodHeading3Token, &PodOverToken, &PodItemToken, &PodBackToken, &PodItemBullet, &PodItem0, &PodItem1, &PodItem2, &PodItem3, &PodItem4, &PodItem5, &PodItem6, &PodItem7, &PodItem8, &PodItem9, &PodForToken, &PodBeginToken, &PodBeginLoutToken, &PodItalicToken, &PodBoldToken, &PodCodeToken, &PodFileToken, &PodNoBreakToken, &PodLinkToken, &PodIndexToken, &PodZeroToken, &PodLessThanToken, &PodGreaterThanToken, &PodSlashToken, &PodVerbarToken, &PE00, /* &PE01, &PE02, */ &PE03, &PE04, &PE05, &PE06, &PE07, &PE08, &PE09, &PE10, &PE11, &PE12, &PE13, &PE14, &PE15, &PE16, &PE17, &PE18, &PE19, &PE20, &PE21, &PE22, &PE23, &PE24, &PE25, &PE26, &PE27, &PE28, &PE29, &PE30, &PE31, &PE32, &PE33, &PE34, &PE35, &PE36, &PE37, &PE38, &PE39, &PE40, &PE41, &PE42, &PE43, &PE44, &PE45, &PE46, &PE47, &PE48, &PE49, &PE50, &PE51, &PE52, &PE53, &PE54, &PE55, &PE56, &PE57, &PE58, &PE59, &PE60, &PE61, &PE62, &PE63, &PE64, &PE65, &PE66, &PE67, &PE68, &PE69, &PE70, &PE71, &PE72, &PE73, &PE74, &PE75, &PE76, &PE77, &PE78, &PE79, &PE80, &PE81, &PE82, &PE83, &PE84, &PE85, &PE86, &PE87, &PE88, &PE89, &PE90, &PE91, &PE92, &PE93, &PE94, &PE95, &PE96, &PE97, &PE98, &PE99, &PodNumCharToken, }, { NULL }, }; /*****************************************************************************/ /* */ /* The "languages" variable - add your language to this list */ /* in alphabetical order and before the concluding NO_LANGUAGE */ /* */ /*****************************************************************************/ LANGUAGE *languages[] = { & BlueLanguage, & CLanguage, & EiffelLanguage, & HaskellLanguage, & JavaLanguage, & NonpareilLanguage, & PerlLanguage, & PodLanguage, & PythonLanguage, & RSLLanguage, & RubyLanguage, NO_LANGUAGE }; /*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/ /*** ***/ /*** If you are adding a new language, you don't need to change anything ***/ /*** below this point. Just repeating: don't change anything below here. ***/ /*** ***/ /*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Global constants and variables */ /* */ /*****************************************************************************/ #define DEBUG_SETUP 0 #define DEBUG_PROCESS 0 #define DEBUG_TRIE 0 #define DEBUG_NEXTCHAR 0 #define DEBUG_PREFIXEQ 0 #define DEBUG_EMIT 0 #define DEBUG_MAIN 0 #define PRG2LOUT_VERSION "prg2lout Version 2.5 (November 2006)" #define MAX_LINE 1024 typedef enum { BLANKNUMBERED_NO, /* blank lines have no line numbers */ BLANKNUMBERED_NOPRINT, /* blank line numbers not printed */ BLANKNUMBERED_YES /* blank line numbers printed */ } BLANKNUMBERED_TYPE; static char file_name[MAX_LINE]; /* current input file name */ static unsigned char curr_line[MAX_LINE]; /* current input line */ static int line_num; /* current input line number */ static int line_pos; /* current input column number */ static BOOLEAN raw_seen; /* TRUE if -r (raw mode) */ static BOOLEAN headers_option; /* TRUE if no -n option (headers) */ static char *style_option; /* value of -p option, else null */ static char *font_option; /* value of -f option, else null */ static char *size_option; /* value of -s option, else null */ static char *line_option; /* value of -v option, else null */ static char *bls_option; /* value of -b option, else null */ static char *tabin_option; /* value of -t option, else null */ static char *tabout_option; /* value of -T option, else null */ static char *setup_option; /* value of -S option, else null */ static char *language_option; /* value of -l option, else null */ static char *numbered_option; /* value of -L option, else null */ static BOOLEAN tab_by_spacing; /* TRUE if using space chars to tab */ static int tab_in; /* tab interval, value of -t option */ static float tab_out; /* tab interval width (-T option) */ static char tab_unit; /* unit of measurement for tab */ static BOOLEAN print_lines; /* TRUE if we are printing line nums */ BLANKNUMBERED_TYPE blanknumbered; /* blank line numbering */ static int print_num; /* current line num for printing */ static FILE *in_fp; /* where input comes from */ static FILE *out_fp; /* where output goes */ static FILE *err_fp; /* where error messages go */ /*****************************************************************************/ /* */ /* char *ErrorHeader() */ /* */ /* Returns a string showing the current file, line, and column. */ /* */ /*****************************************************************************/ char *ErrorHeader() { static char buff[MAX_LINE]; if( line_num == 0 || line_pos == 0 ) sprintf(buff, "prg2lout"); else if( raw_seen ) sprintf(buff, "prg2lout %d,%d", line_num, line_pos); else sprintf(buff, "prg2lout %s %d,%d", file_name, line_num, line_pos); return buff; } /*****************************************************************************/ /* */ /* GetArg(arg, message, null_ok) */ /* */ /* Get the next command line argument's value into arg. If there isn't */ /* one, print an error message and quit unless null_ok is true. */ /* */ /*****************************************************************************/ #define GetArg(arg, message, null_ok) \ { if( strcmp(argv[arg_pos]+2, "") != 0 ) \ arg = argv[arg_pos]+2; \ else if( !null_ok && arg_pos < argc-1 && *argv[arg_pos+1] != '-' ) \ arg = argv[++arg_pos]; \ else if( null_ok ) \ arg = (char *) NULL; \ else \ { fprintf(err_fp, "%s: %s\n", ErrorHeader(), message); \ exit(1); \ } \ } /* end GetArg */ /*****************************************************************************/ /* */ /* char *EchoToken(TOKEN *t) */ /* */ /* Print a brief resume of token t */ /* */ /*****************************************************************************/ char *EchoToken(TOKEN *t) { static char buff[MAX_LINE]; if( t == (TOKEN *) NULL ) sprintf(buff, "(NULL)"); else sprintf(buff, "%s", t->name); return buff; } /*****************************************************************************/ /* */ /* NextChar() */ /* */ /* Move to next character in the input file. This may involve changing */ /* global variables curr_line, line_num, and line_pos; the new character */ /* may be found in curr_line[line_pos]. */ /* */ /* NextChar does not skip any characters at all. When end of file is */ /* reached, curr_line[line_pos] contains '\0'. */ /* */ /* It is possible for code to read ahead of curr_line[line_pos] up to and */ /* including the newline character at the end of the line after the line */ /* we are currently on (thus it is possible to recognize an empty line as */ /* \n\n), but not beyond, using curr_line[line_pos + i] for i > 0. */ /* */ /*****************************************************************************/ void NextChar() { if( curr_line[line_pos] != '\n' ) { /* we can carry on with the current line. This will yield '\0' as */ /* desired if EOF arrives before the end of the line */ line_pos++; } else if( curr_line[line_pos+1] != '\0' ) { /* we've already read in the next line; it's at &curr_line[line_pos+1] */ int len = strlen((char *) &curr_line[line_pos+1]); memmove(&curr_line[1], &curr_line[line_pos+1], len + 1); line_num++; line_pos = 1; } else { /* we need to read in the new line */ line_num++; line_pos = 1; if( fgets((char *) &curr_line[1], MAX_LINE-2, in_fp) == (char *) NULL ) curr_line[1] = '\0'; } if( DEBUG_NEXTCHAR ) fprintf(stderr, "after NextChar, line_num %d, line_pos %d, curr_line %s", line_num, line_pos, &curr_line[1]); } /* end NextChar */ /*****************************************************************************/ /* */ /* BOOLEAN InputMatches(char *pattern) */ /* */ /* Returns TRUE if input starting at curr_line[line_pos] matches pattern. */ /* To check this we may have to read an extra line or more of input. */ /* */ /*****************************************************************************/ BOOLEAN InputMatches(unsigned char *pattern) { unsigned char *p, *q; for(p = &curr_line[line_pos], q = pattern; *q != '\0'; p++, q++ ) { if( *p == '\0' ) { /* attempt to read another line of input, since we are off the end */ if( fgets((char *) p, MAX_LINE-2-(p - curr_line), in_fp) == (char *) NULL ) *p = '\0'; } if( *p != *q ) break; } if( DEBUG_PREFIXEQ ) fprintf(stderr, "InputMatches(%s, %s) returning %s\n", &curr_line[line_pos], pattern, *q == '\0' ? "TRUE" : "FALSE"); return (*q == '\0'); } /* end InputMatches */ /*****************************************************************************/ /* */ /* TRIE */ /* */ /* We use a trie to match the input against the opening pattern of each */ /* token, since some tokens (e.g. <=, // etc.) have multi-character */ /* opening patterns. */ /* */ /*****************************************************************************/ typedef struct trie_node { struct trie_node *sub[MAX_CHAR]; TOKEN *value[MAX_CHAR]; } *TRIE; /*****************************************************************************/ /* */ /* BOOLEAN TrieInsert(&T, str, val) */ /* */ /* Insert str into trie T. May need a new root so pass T by reference. */ /* Return FALSE if the insertion failed, either because the string was */ /* empty, or because it was the same as a previously inserted string. */ /* */ /*****************************************************************************/ BOOLEAN TrieInsert(TRIE *T, unsigned char *str, TOKEN *val) { BOOLEAN res; if( DEBUG_TRIE ) fprintf(stderr, "[ TrieInsert(T, %s, %s)\n", str, EchoToken(val)); if( *str == '\0' ) res = FALSE; else { if( *T == (TRIE) NULL ) *T = (TRIE) calloc(1, sizeof(struct trie_node)); /* will set all to 0 */ if( *(str + 1) != '\0' ) res = TrieInsert(&((*T)->sub[(int) *str]), str + 1, val); else if( (*T)->value[(int) *str] != (TOKEN *) NULL ) res = FALSE; else { (*T)->value[(int) *str] = val; res = TRUE; } } if( DEBUG_TRIE ) fprintf(stderr, "] TrieInsert(T, %s, %s) returning %s\n", str, EchoToken(val), res ? "TRUE" : "FALSE"); return res; } /*****************************************************************************/ /* */ /* TOKEN *TrieRetrieve(T, str, &len) */ /* */ /* Find the longest prefix of string str in T. If this is empty, return */ /* NULL. If non-empty, return the corresponding value as the result, and */ /* the length of the prefix in *len. */ /* */ /*****************************************************************************/ TOKEN *TrieRetrieve(TRIE T, unsigned char *str, int *len) { TOKEN *res; int i; if( DEBUG_TRIE ) fprintf(stderr, "[ TrieRetrieve(T, %s, len)\n", str); res = (TOKEN *) NULL; *len = 0; for( i = 0; T != (TRIE) NULL; T = T->sub[(int) str[i]], i++ ) { if( DEBUG_TRIE ) fprintf(stderr, " i = %d, res = %s\n", i, EchoToken(res)); if( T->value[(int) str[i]] != (TOKEN *) NULL ) { res = T->value[(int) str[i]]; *len = i+1; } } if( DEBUG_TRIE ) fprintf(stderr, "] TrieRetrieve returning (*len = %d) %s\n", *len, EchoToken(res)); return res; } /*****************************************************************************/ /* */ /* HASH_TABLE */ /* */ /* We use a hash table to hold the keywords. There is no associated */ /* value, we just want to know whether they are there or not. */ /* */ /* NB MAX_SYM must be somewhat larger than the number of keywords. */ /* */ /*****************************************************************************/ #define MAX_SYM 609 static char *HashTable[MAX_SYM]; /* will initialze to NULL */ static int HashTableCount = 0; /* number of entries */ static int hash(char *key) { int i, res; res = 0; for( i = 0; key[i] != '\0'; i++ ) { res += key[i]; } return res % MAX_SYM; } /* end hash */ void HashInsert(char *str) { int i; if( DEBUG_SETUP ) fprintf(stderr, "[ HashInsert(%s)\n", str); if( HashTableCount >= MAX_SYM - 20 ) { fprintf(err_fp, "%s internal error: full hash table (increase MAX_SYM)\n", ErrorHeader()); abort(); } for( i=hash(str); HashTable[i]!=(char *) NULL; i = (i+1)%MAX_SYM ); HashTable[i] = str; HashTableCount++; if( DEBUG_SETUP ) fprintf(stderr, "] HashInsert(%s)\n", str); } BOOLEAN HashRetrieve(char *str) { int i; for( i=hash(str); HashTable[i]!=(char *) NULL; i = (i+1)%MAX_SYM ) if( strcmp( (char *) HashTable[i], (char *) str) == 0 ) return TRUE; return FALSE; } /*****************************************************************************/ /* */ /* BACK END */ /* */ /* This is the code that actually prints the output file. */ /* To emit one token, the call sequence should be as follows: */ /* */ /* StartEmit(LANGUAGE *lang, TOKEN *current_token, */ /* unsigned char *start_delim, l) */ /* Emit(TOKEN *current_token, unsigned char ch) */ /* ... */ /* Emit(TOKEN *current_token, unsigned char ch) */ /* EndEmit(TOKEN *current_token, unsigned char *end_delim) */ /* */ /* The back end will then take care of all print styles automatically, */ /* including checking for keywords. When emitting white space each space */ /* can be sent directly: */ /* */ /* EmitRaw(ch) */ /* */ /*****************************************************************************/ static unsigned char save_value[MAX_LINE]; /* the token text */ static int save_len; /* index of \0 in save_value */ static BOOLEAN save_on = FALSE; /* TRUE when saving */ static LANGUAGE *save_language; /* the current language */ static int out_linepos = 0; /* output line position */ static BOOLEAN out_linestart = TRUE; /* TRUE if out line start */ static BOOLEAN out_formfeed = FALSE; /* TRUE if last was formfeed */ static int brace_depth; /* brace depth in verbatim */ extern void Emit(TOKEN *current_token, unsigned char ch); /*****************************************************************************/ /* */ /* EmitTab(int *out_linepos) */ /* */ /* Emit one tab character, keeping track of where we are up to in */ /* *out_linepos. */ /* */ /*****************************************************************************/ void EmitTab() { if( tab_by_spacing ) { putc(' ', out_fp); out_linepos++; while( out_linepos % tab_in != 0 ) { putc(' ', out_fp); out_linepos++; } } else { out_linepos++; while( out_linepos % tab_in != 0 ) out_linepos++; if( out_linestart ) { fprintf(out_fp, "$>\"%.1f%c\" {}", tab_out, tab_unit); /* NB {} is required in case nothing follows on this line */ } else fprintf(out_fp, "$>\"%.1f%ct\" {}", (out_linepos/tab_in)*tab_out, tab_unit); } out_formfeed = FALSE; } /*****************************************************************************/ /* */ /* EmitRaw(ch) */ /* */ /* Emit this character immediately. This is only legal when not saving. */ /* All characters printed on the output file that represent actual text */ /* of the program (i.e. not commands, {}, "", \ in strings etc.) should */ /* pass through here, since EmitRaw keeps track of where we are on */ /* the output line, in order to handle tab characters correctly. */ /* */ /* NB out_linepos is the column where the *next* character will go, and */ /* it counts the first column on the line as column zero. It understands */ /* that a tab character always produces at least one space, and that the */ /* character after a tab goes in a column whose number mod tab_in is zero. */ /* */ /*****************************************************************************/ void EmitRaw(unsigned char ch) { if( DEBUG_EMIT ) fprintf(stderr, "EmitRaw(%c); out_linepos %d, out_linestart %s\n", ch, out_linepos, out_linestart ? "TRUE" : "FALSE"); if( save_on ) { fprintf(err_fp, "%s internal error (EmitRaw save_on)\n", ErrorHeader()); abort(); } /* drop empty lines following formfeed */ if( out_formfeed && (ch == '\n' || ch == '\f') ) { out_formfeed = (ch == '\f'); return; } /* emit line number if required */ if( print_lines && out_linepos == 0 ) { char buff[20]; if( out_formfeed ) print_num--; if( ch != '\n' || blanknumbered == BLANKNUMBERED_YES ) { sprintf(buff, "%d", print_num); fprintf(out_fp, "@PL{\"%s\"}", buff); out_linepos += strlen(buff); out_linestart = FALSE; EmitTab(); } if( ch != '\n' || blanknumbered != BLANKNUMBERED_NO ) print_num++; } switch( ch ) { case ' ': fputc(ch, out_fp); out_linepos++; out_formfeed = FALSE; break; case '\t': EmitTab(); out_formfeed = FALSE; break; case '\n': fputc(ch, out_fp); out_linepos = 0; out_linestart = TRUE; out_formfeed = FALSE; break; case '\f': fputs("\n@NP\n", out_fp); out_linepos = 0; out_linestart = TRUE; out_formfeed = TRUE; break; default: fputc(ch, out_fp); out_linepos++; out_linestart = FALSE; out_formfeed = FALSE; break; } if( DEBUG_EMIT ) fprintf(stderr, "EmitRaw(%c) returning; out_linepos %d, out_linestart %s\n", ch, out_linepos, out_linestart ? "TRUE" : "FALSE"); } /* end EmitRaw */ /*****************************************************************************/ /* */ /* StartEmit(LANGUAGE *lang, TOKEN *current_token, */ /* unsigned char *start_delim, len) */ /* */ /* Start the emission of a token. If it is a PRINT_WHOLE_QUOTED, it has */ /* to be saved since it might be a keyword. */ /* */ /* The token began with the starting delimiter start_delim[0..len-1]. */ /* */ /*****************************************************************************/ void StartEmit(LANGUAGE *lang, TOKEN *current_token, unsigned char *start_delim, int len) { int i; if( save_on ) { fprintf(err_fp, "%s internal error (StartEmit)\n", ErrorHeader()); abort(); } save_language = lang; /* emit line number if required */ if( print_lines && out_linepos == 0 ) { char buff[20]; if( out_formfeed ) print_num--; sprintf(buff, "%d", print_num); fprintf(out_fp, "@PL{\"%s\"}", buff); out_linepos += strlen(buff); out_linestart = FALSE; EmitTab(); print_num++; } switch( current_token->print_style ) { case PRINT_WHOLE_QUOTED: /* start_delim is to be printed */ save_on = TRUE; save_len = 0; save_value[save_len] = '\0'; for( i = 0; i < len; i++ ) Emit(current_token, start_delim[i]); break; case PRINT_NODELIMS_QUOTED: /* like PRINT_WHOLE_QUOTED, but no delims */ save_on = TRUE; save_len = 0; save_value[save_len] = '\0'; break; case PRINT_WHOLE_UNQUOTED: /* print command */ if( current_token->command[0] != '\0' ) fprintf(out_fp, "%s{", current_token->command); /*}*/ /* print opening delimiter, verbatim */ for( i = 0; i < len; i++ ) putc(start_delim[i], out_fp); break; case PRINT_NODELIMS_UNQUOTED: /* command is printed but not delimiter */ if( current_token->command[0] != '\0' ) fprintf(out_fp, "%s{", current_token->command); /*}*/ /* record that we are currently inside no braces in the verbatim text */ brace_depth = 0; break; case PRINT_NODELIMS_INNER: /* command is printed but not delimiter; always print opening brace */ fprintf(out_fp, "%s{", current_token->command); /*}*/ break; case PRINT_COMMAND_ONLY: /* command is printed but nothing else */ fprintf(out_fp, "%s", current_token->command); break; default: fprintf(err_fp, "%s internal error (print_style)\n", ErrorHeader()); abort(); break; } } /* end StartEmit */ /*****************************************************************************/ /* */ /* EndEmit(TOKEN *current_token, unsigned char *end_delim) */ /* */ /* End emitting the current token. Its ending delimiter was end_delim. */ /* */ /*****************************************************************************/ #define at_start_line(s, i) ((i) == 0 || s[(i)-1] == '\n' || s[(i)-1] == '\f' ) void EndEmit(TOKEN *current_token, unsigned char *end_delim) { unsigned char *com; int i; BOOLEAN quoted_now = FALSE; switch( current_token->print_style ) { case PRINT_WHOLE_QUOTED: /* first, emit (i.e. save) ending delimiter */ for( i = 0; end_delim[i] != '\0'; i++ ) Emit(current_token, end_delim[i]); /* NB NO BREAK */ case PRINT_NODELIMS_QUOTED: /* work out whether we are printing the command or its alternative */ com=(current_token->alternate_command[0]!='\0' && HashRetrieve( (char *) save_value)? current_token->alternate_command : current_token->command); /* print command, opening brace */ if( com[0] != '\0' ) fprintf(out_fp, "%s{", com); /*}*/ /* print the token with appropriate escapes */ save_on = FALSE; for( i = 0; i < save_len; i++ ) switch( save_value[i] ) { case '@': case '/': case '|': case '&': case '#': case '{': case '}': case '^': case '~': case '-': case '.': case '\'': if( !quoted_now ) { putc('"', out_fp); quoted_now = TRUE; } EmitRaw(save_value[i]); break; case '"': case '\\': if( !quoted_now ) { putc('"', out_fp); quoted_now = TRUE; } putc('\\', out_fp); EmitRaw(save_value[i]); break; case ' ': case '\t': /* make initial white space significant using "" */ if( !quoted_now && at_start_line(save_value, i) ) { putc('"', out_fp); quoted_now = TRUE; out_linestart = FALSE; } /* make sure we aren't in quoted text */ if( quoted_now ) { putc('"', out_fp); quoted_now = FALSE; } /* print the character */ EmitRaw(save_value[i]); break; case '\n': case '\f': /* these characters are not saved */ fprintf(err_fp, "%s internal error (EndEmit nl/ff)\n", ErrorHeader()); exit(1); break; default: /* anything else can be quoted or unquoted ad. lib. */ EmitRaw(save_value[i]); break; } /* print closing quote and closing brace if needed */ if( quoted_now ) putc('"', out_fp); else if( save_len > 0 && is_whitespace(save_value[save_len-1]) ) fputs("\"\"", out_fp); /* makes trailing white space significant */ if( com[0] != '\0' ) /*{*/ putc('}', out_fp); break; case PRINT_WHOLE_UNQUOTED: /* print end delimiter, verbatim */ fputs( (char *) end_delim, out_fp); /* NB NO BREAK */ case PRINT_NODELIMS_UNQUOTED: /* print closing brace if required*/ if( current_token->command[0] != '\0' ) { if( brace_depth > 0 ) { if( brace_depth > 1 ) fprintf(err_fp, "%s: inserted %d closing braces at end of %s\n", ErrorHeader(), brace_depth, current_token->name); else fprintf(err_fp, "%s: inserted one closing brace at end of %s\n", ErrorHeader(), current_token->name); while( brace_depth > 0 ) { /*{*/ putc('}', out_fp); brace_depth--; } } /*{*/ putc('}', out_fp); } break; case PRINT_NODELIMS_INNER: /* always print closing brace */ /*{*/ putc('}', out_fp); break; case PRINT_COMMAND_ONLY: break; default: fprintf(err_fp, "%s internal error (print_style)\n", ErrorHeader()); abort(); break; } /* print following command if any */ if( current_token->following_command != NULL ) fprintf(out_fp, "%s", current_token->following_command); } /* end EndEmit */ /*****************************************************************************/ /* */ /* Emit(TOKEN *current_token, char ch) */ /* */ /* Emit one character of the current token. */ /* */ /*****************************************************************************/ void Emit(TOKEN *current_token, unsigned char ch) { switch( current_token->print_style ) { case PRINT_WHOLE_QUOTED: case PRINT_NODELIMS_QUOTED: if( !save_on ) { fprintf(err_fp, "%s internal error (EmitChar)\n", ErrorHeader()); abort(); } if( ch == '\n' || ch == '\f' ) { /* could save newline too, but uses less memory if print now */ EndEmit(current_token, U ""); EmitRaw(ch); StartEmit(save_language, current_token, U "", 0); } else if( save_len < MAX_LINE - 1 ) { save_value[save_len++] = ch; save_value[save_len] = '\0'; } else { fprintf(err_fp, "%s internal error (token too long)\n", ErrorHeader()); exit(1); } break; case PRINT_WHOLE_UNQUOTED: case PRINT_NODELIMS_UNQUOTED: /* keep trace of braces, and insert matching braces if required */ if( ch == '{' ) brace_depth++; else if( ch == '}' ) { brace_depth--; if( brace_depth < 0 && current_token->command[0] != '\0' ) { fprintf(err_fp, "%s: inserted opening brace within %s\n", ErrorHeader(), current_token->name); putc('{', out_fp); /*}*/ brace_depth++; } } /* verbatim output */ putc(ch, out_fp); break; case PRINT_NODELIMS_INNER: fprintf(err_fp, "%s internal error (emitting INNER)\n", ErrorHeader()); abort(); break; case PRINT_COMMAND_ONLY: /* emit nothing since printing the command only */ break; default: fprintf(err_fp, "%s internal error (print_style)\n", ErrorHeader()); abort(); break; } } /* end Emit */ /*****************************************************************************/ /* */ /* EmitProtected(unsigned char ch) */ /* */ /* Emit one character of the current token. If the character is a special */ /* one in Lout, protect it with quotes. */ /* */ /*****************************************************************************/ void EmitProtected(unsigned char ch) { switch( ch ) { case '@': case '/': case '|': case '&': case '#': case '{': case '}': case '^': case '~': case '-': putc('"', out_fp); EmitRaw(ch); putc('"', out_fp); break; case '"': case '\\': putc('"', out_fp); putc('\\', out_fp); EmitRaw(ch); putc('"', out_fp); break; default: EmitRaw(ch); break; } } /* end EmitProtected */ /*****************************************************************************/ /* */ /* TOKEN *ExpandToken(TOKEN *t, int starts_pos) */ /* */ /* Create a new token corresponding to t but using starts2[starts_pos] and */ /* ends2[starts_pos] only. */ /* */ /*****************************************************************************/ unsigned char *clone2strings(unsigned char *s1, unsigned char *s2) { unsigned char *res; res = (unsigned char *) malloc( (strlen( (char *) s1) + strlen( (char *) s2) + 1) * sizeof(unsigned char)); sprintf( (char *) res, "%s%s", s1, s2); if( DEBUG_SETUP ) fprintf(stderr, "clone2strings(%s, %s) = %s\n", s1, s2, res); return res; } /* end clone2strings */ TOKEN *ExpandToken(TOKEN *t, int starts_pos) { TOKEN *res; int i; if( DEBUG_SETUP ) fprintf(stderr, "ExpandToken(%s, starts[0] = %s)\n", t->name, t->starts[0]); res = (TOKEN *) calloc(1, sizeof(struct token_rec)); res->name = t->name; res->print_style = t->print_style; res->command = t->command; res->alternate_command = t->alternate_command; res->following_command = t->following_command; res->start_line_only = t->start_line_only; for( i = 0; t->starts[i] != NULL; i++ ) { /* the starts of res are the start of t with starts2[starts_pos] added */ res->starts[i] = clone2strings(t->starts[i], t->starts2[starts_pos]); } res->legal = t->legal; res->escape = t->escape; res->escape_legal = t->escape_legal; res->inner_escape = t->inner_escape; res->end_inner_escape = t->end_inner_escape; res->bracket_delimiter = t->brackets2[starts_pos]; res->end_delimiter = t->ends2[starts_pos]; res->end_start_line_only = t->end_start_line_only; res->want_two_ends = t->want_two_ends; if( DEBUG_SETUP ) fprintf(stderr, "ExpandToken returning res = %s, starts[0] = %s)\n", res->name, res->starts[0]); return res; } /* end ExpandToken */ /*****************************************************************************/ /* */ /* void SetupOneToken(TOKEN *t) */ /* */ /* Set up one token. This involves initializing the chtype and */ /* escape_chtype fields for the token, and loading the trie with all */ /* the opening delimiters of the token. */ /* */ /*****************************************************************************/ #define LEGAL 1 #define ESCAPE 2 #define INNER_ESCAPE 3 TRIE Trie = (TRIE) NULL; /* these tokens allowed anywhere */ TRIE StartLineTrie = (TRIE) NULL; /* these allowed at line start only */ void SetupOneToken(TOKEN *t) { int j; if( DEBUG_SETUP ) fprintf(stderr, "SetupOneToken(%s)\n", t->starts[0]); /* check that any PRINT_NODELIMS_INNER styles have an end delimiter */ if( t->print_style == PRINT_NODELIMS_INNER ) { if( t->end_delimiter == NULL || t->end_delimiter[0] == '\0' ) { fprintf(err_fp, "%s: token %s is INNER but has no end delimiter\n", t->name, ErrorHeader()); } } /* set up the chtype table for this token */ if( t->legal == NULL ) /* all characters are legal in this case */ for( j = 0; j < MAX_CHAR; j++ ) t->chtype[j] = LEGAL; else /* the characters in t->legal are legal in this case */ for( j = 0; t->legal[j] != '\0'; j++ ) t->chtype[(int) t->legal[j]] = LEGAL; if( t->escape[0] != '\0' ) t->chtype[(int) t->escape[0]] = ESCAPE; if( t->inner_escape[0] != '\0' ) t->chtype[(int) t->inner_escape[0]] = INNER_ESCAPE; /* set up the escape_chtype table for this token */ if( t->escape_legal == NULL ) { /* all characters are legal after an escape character */ for( j = 0; j < MAX_CHAR; j++ ) t->escape_chtype[j] = LEGAL; } else { /* the characters in t->escape_legal are legal after an escape character */ for( j = 0; t->escape_legal[j] != '\0'; j++ ) t->escape_chtype[(int) t->escape_legal[j]] = LEGAL; } /* load the opening delimiters of this token into the trie */ for( j = 0; t->starts[j] != (unsigned char *) NULL; j++ ) { if( !TrieInsert(t->start_line_only ? &StartLineTrie:&Trie,t->starts[j],t) ) { if( *(t->starts[j]) == '\0' ) fprintf(err_fp, "%s: empty starting delimiter\n", ErrorHeader()); else fprintf(err_fp, "%s: starting delimiter %s appears twice\n", ErrorHeader(), t->starts[j]); } } if( DEBUG_SETUP ) fprintf(stderr, "SetupOneToken ending %s\n", t->starts[0]); } /* end SetupOneToken */ /*****************************************************************************/ /* */ /* SetupLanguage(LANGUAGE *lang) */ /* */ /* Set up the runtime token structures. This involves setting up each */ /* token (see above), and also loading the hash table with the keywords. */ /* */ /* If a token has non-empty start2 and end2 pairs, it is expanded into */ /* a set of tokens, one for each pair, with the start delimiter set to */ /* the concatenation of the start delimiters and starts2, and end */ /* delimiter set to the corresponding end2. */ /* */ /*****************************************************************************/ void SetupLanguage(LANGUAGE *lang) { int i, j; TOKEN *t; if( DEBUG_SETUP ) fprintf(stderr, "SetupLanguage(%s)\n", lang->names[0]); /* set up each token in the language */ for( i = 0; lang->tokens[i] != (TOKEN *) NULL; i++ ) { if( DEBUG_SETUP ) fprintf(stderr, " (1) setting up token %s (starts[0] = %s)\n", lang->tokens[i]->name, lang->tokens[i]->starts[0]); if( lang->tokens[i]->starts2[0] != NULL ) { /* starts2, so set up one token for each entry in starts[2] */ for( j = 0; lang->tokens[i]->starts2[j] != NULL; j++ ) { t = ExpandToken(lang->tokens[i], j); if( DEBUG_SETUP ) fprintf(stderr, " (2) setting up token %s (starts[0] = %s)\n", t->name, t->starts[0]); SetupOneToken(t); } } else { /* no starts2, so set up just one token */ SetupOneToken(lang->tokens[i]); } } /* load the keyword hash table */ for( j = 0; lang->keywords[j] != NULL; j++ ) HashInsert(lang->keywords[j]); if( DEBUG_SETUP ) fprintf(stderr, "SetupLanguage(%s) returning.\n", lang->names[0]); } /* end SetupLanguage */ /*****************************************************************************/ /* */ /* BOOLEAN Printable(unsigned char ch) */ /* */ /* TRUE if ch is a printable character. Used only by error messages so */ /* can be slow. */ /* */ /*****************************************************************************/ BOOLEAN Printable(unsigned char ch) { unsigned char *p; for( p = AllPrintable; *p != '\0' && *p != ch; p++ ); return (*p == ch); } /* end Printable */ /*****************************************************************************/ /* */ /* TOKEN *TokenStartingHere(int *len) */ /* */ /* Returns the token starting here if there is one, else NULL. */ /* If found, the length of its starting delimiter is returned in *len. */ /* */ /*****************************************************************************/ TOKEN *TokenStartingHere(int *len) { TOKEN *res; if( line_pos == 1 ) { res = TrieRetrieve(StartLineTrie, &curr_line[line_pos], len); if( res == (TOKEN *) NULL ) res = TrieRetrieve(Trie, &curr_line[line_pos], len); } else { res = TrieRetrieve(Trie, &curr_line[line_pos], len); } return res; } /*****************************************************************************/ /* */ /* int Matching() */ /* */ /* Return the index of the pair that matches the current input. */ /* */ /*****************************************************************************/ int Matching() { int i; for( i = 0; pairs[i].first != NULL && !InputMatches(pairs[i].first); i++ ); if( DEBUG_PROCESS ) fprintf(stderr, "Matching() = %d (\"%s\", \"%s\")\n", i, pairs[i].first == NULL ? "NULL" : (char *) pairs[i].first, pairs[i].second == NULL ? "NULL" : (char *) pairs[i].second); return i; } /*****************************************************************************/ /* */ /* Process(LANGUAGE *lang, TOKEN *outer_token, */ /* unsigned char *outer_end_delimiter) */ /* */ /* Process a sequence of input tokens. If we are currently recursing */ /* inside some other token, outer_token is non-null and is that token, */ /* and we stop when we reach outer_end_delimiter outside any token. */ /* Otherwise we stop at end of file. */ /* */ /*****************************************************************************/ #define START 1 #define IN_TOKEN 2 #define IN_TOKEN_NEEDING_DELIM 3 #define IN_TOKEN_AFTER_ESCAPE 4 #define IN_TOKEN_AFTER_INNER_ESCAPE 5 #define STOP 6 char *debug_state(int s) { switch( s ) { case START: return "START"; case IN_TOKEN: return "IN_TOKEN"; case IN_TOKEN_NEEDING_DELIM: return "IN_TOKEN_NEEDING_DELIM"; case IN_TOKEN_AFTER_ESCAPE: return "IN_TOKEN_AFTER_ESCAPE"; case IN_TOKEN_AFTER_INNER_ESCAPE: return "IN_TOKEN_AFTER_INNER_ESCAPE"; case STOP: return "STOP"; default: return "?"; } } void Process(LANGUAGE *lang, TOKEN *outer_token, unsigned char *outer_end_delimiter) { TOKEN *current_token = (TOKEN *) NULL; int len, i, state; int end_delimiter_depth = 0, end_delimiter_count = 0; unsigned char *curr_end_delim = U "", *curr_bracket_delim = U ""; if( DEBUG_PROCESS ) fprintf(stderr, "[ Process(%s, -, -, -, -)\n", lang->names[0]); state = START; while( curr_line[line_pos] != '\0' && state != STOP ) { if( DEBUG_PROCESS ) { if( state >= IN_TOKEN ) fprintf(stderr, " %s, depth %d, count %d, bracket \"%s\", end \"%s\", ch %c\n", debug_state(state), end_delimiter_depth, end_delimiter_count, curr_bracket_delim, curr_end_delim, curr_line[line_pos]); else fprintf(stderr, " %s, ch %c\n", debug_state(state), curr_line[line_pos]); } switch( state ) { case START: /* between tokens; try each of the following */ /* check whether outer_token is ending here, in which case stop */ if( outer_token != (TOKEN *) NULL && curr_line[line_pos] == outer_end_delimiter[0] && InputMatches(outer_end_delimiter) ) { len = strlen( (char *) outer_end_delimiter); for( i = 0; i < len; i++ ) NextChar(); state = STOP; } /* check whether a token is starting here, in which case start it */ else if( (current_token = TokenStartingHere(&len)) != (TOKEN *) NULL ) { if( DEBUG_PROCESS ) { fprintf(stderr, "current_token (len = %d): %s\n", len, EchoToken(current_token)); } StartEmit(lang, current_token, &curr_line[line_pos], len); /* skip the starting delimiter */ for( i = 0; i < len; i++ ) NextChar(); /* we are now either in a token, or else we have to start an inner */ if( current_token->print_style == PRINT_NODELIMS_INNER ) { Process(lang, current_token, current_token->end_delimiter); EndEmit(current_token, U ""); } else { end_delimiter_depth = 1; end_delimiter_count = current_token->want_two_ends ? 2 : 1; curr_end_delim = current_token->end_delimiter; curr_bracket_delim = current_token->bracket_delimiter; state = IN_TOKEN; } } /* check whether we have a space */ else if( is_whitespace(curr_line[line_pos]) ) { EmitRaw(curr_line[line_pos]); NextChar(); } /* check whether we are supposed to echo things that don't match */ else if( lang->no_match == NO_MATCH_PRINT ) { EmitProtected(curr_line[line_pos]); NextChar(); } /* finally, we have an error and must skip the character */ else if( lang->no_match == NO_MATCH_ERROR ) { if( Printable(curr_line[line_pos]) ) fprintf(err_fp, "%s: skipping unexpected %c character\n", ErrorHeader(), curr_line[line_pos]); else fprintf(err_fp, "%s: %s (octal %o)\n", ErrorHeader(), "skipping unexpected unprintable character", (int) curr_line[line_pos]); NextChar(); } else { fprintf(err_fp, "%s internal error: lang->no_match\n", ErrorHeader()); exit(1); } break; case IN_TOKEN: /* within a token; current_token says which kind */ /* check for ending delimiter if there is one */ if( curr_end_delim[0] != '\0' && (!current_token->end_start_line_only || line_pos == 1) && InputMatches(curr_end_delim) ) { end_delimiter_depth--; if( DEBUG_PROCESS ) fprintf(stderr, " InputMatches(%s) so end_delimiter_depth--\n", curr_end_delim); if( end_delimiter_depth > 0 ) { /* if this end delimiter matches with a bracketing delimiter, */ /* so is not the end of the token, emit the char and carry on */ Emit(current_token, curr_line[line_pos]); NextChar(); } else { end_delimiter_count--; if( DEBUG_PROCESS ) fprintf(stderr, " InputMatches(%s) so end_delimiter_count--\n", curr_end_delim); if( end_delimiter_count == 0 ) { /* seen all the end delimiters we need, so token ends */ len = strlen( (char *) curr_end_delim); for( i = 0; i < len; i++ ) NextChar(); EndEmit(current_token, curr_end_delim); state = START; } else { /* need more end delimiters yet, so keep scanning */ Emit(current_token, curr_line[line_pos]); NextChar(); if( curr_bracket_delim[0] != '\0' ) state = IN_TOKEN_NEEDING_DELIM; else state = IN_TOKEN; } } } else { /* check for bracketing delimiter if there is one */ if( curr_bracket_delim[0] != '\0' && InputMatches(curr_bracket_delim) ) { if( DEBUG_PROCESS ) fprintf(stderr, " InputMatches(%s) so end_delimiter_depth++\n", curr_bracket_delim); end_delimiter_depth++; } /* handle current character as usual */ switch( current_token->chtype[(int) curr_line[line_pos]] ) { case LEGAL: Emit(current_token, curr_line[line_pos]); NextChar(); break; case ESCAPE: NextChar(); state = IN_TOKEN_AFTER_ESCAPE; break; case INNER_ESCAPE: EndEmit(current_token, U ""); NextChar(); Process(lang, current_token, current_token->end_inner_escape); state = IN_TOKEN_AFTER_INNER_ESCAPE; break; default: if( curr_end_delim[0] != '\0' ) { /* error: token ends at delimiter, not unexpected character */ if( Printable(curr_line[line_pos]) ) fprintf(err_fp, "%s: skipping %c character (not allowed in %s)\n", ErrorHeader(), curr_line[line_pos], current_token->name); else if( curr_line[line_pos] == '\t' ) fprintf(err_fp, "%s: skipping tab character (not allowed in %s)\n", ErrorHeader(), current_token->name); else if( curr_line[line_pos] == '\n' ) fprintf(err_fp, "%s: skipping newline character (not allowed in %s)\n", ErrorHeader(), current_token->name); else if( curr_line[line_pos] == '\f' ) fprintf(err_fp, "%s: skipping formfeed character (not allowed in %s)\n", ErrorHeader(), current_token->name); else fprintf(err_fp, "%s: %s, octal code %o (not allowed in %s)\n", ErrorHeader(), "skipping unprintable character", (unsigned) curr_line[line_pos], current_token->name); NextChar(); } else { /* normal termination after last legal character */ EndEmit(current_token, U ""); state = START; } break; } } break; case IN_TOKEN_NEEDING_DELIM: /* within a token looking for delim */ /* looking for either a white space or a new matching delim */ switch( curr_line[line_pos] ) { case ' ': case '\t': case '\n': case '\f': Emit(current_token, curr_line[line_pos]); NextChar(); break; default: /* had better match */ i = Matching(); if( pairs[i].first == NULL ) { /* this is not a suitable new start for delimiters */ fprintf(err_fp, "%s: expected new delimiter here, found %c\n", ErrorHeader(), curr_line[line_pos]); exit(0); } curr_bracket_delim = pairs[i].first; curr_end_delim = pairs[i].second; Emit(current_token, curr_line[line_pos]); NextChar(); end_delimiter_depth++; state = IN_TOKEN; break; } break; case IN_TOKEN_AFTER_ESCAPE: if( current_token->escape_chtype[(int) curr_line[line_pos]] == LEGAL ) { Emit(current_token, current_token->escape[0]); Emit(current_token, curr_line[line_pos]); } else { if( Printable(curr_line[line_pos]) ) fprintf(err_fp,"%s: skipping %c%c in %s, since %c not legal here\n", ErrorHeader(), current_token->escape[0], curr_line[line_pos], current_token->name, curr_line[line_pos]); else fprintf(err_fp, "%s: skipping %c and %s (octal %o)\n", ErrorHeader(), current_token->escape[0], "unprintable unexpected character", (int) curr_line[line_pos]); } NextChar(); state = IN_TOKEN; break; case IN_TOKEN_AFTER_INNER_ESCAPE: /* ending delimiter of inner escape has been read over */ StartEmit(lang, current_token, U "", 0); state = IN_TOKEN; break; default: fprintf(err_fp, "%s internal error (state = %d)\n", ErrorHeader(), state); abort(); break; } } /* at end, need to tidy up any residual messiness */ switch( state ) { case START: case STOP: /* we stopped outside any token, or after an escape */ break; case IN_TOKEN: /* we stopped in a token (only a problem if it ends with a delimiter) */ if( current_token->end_delimiter[0] != '\0' ) { if( outer_token == (TOKEN *) NULL ) fprintf(err_fp, "%s: program text ended within %s\n", ErrorHeader(), current_token->name); else fprintf(err_fp, "%s: %s token ended within %s\n", ErrorHeader(), outer_token->name, current_token->name); EndEmit(current_token, U ""); } break; case IN_TOKEN_NEEDING_DELIM: /* we stopped in a token at a point where we were looking for a delim */ if( outer_token == (TOKEN *) NULL ) fprintf(err_fp, "%s: program text ended within %s\n", ErrorHeader(), current_token->name); else fprintf(err_fp, "%s: %s token ended within %s\n", ErrorHeader(), outer_token->name, current_token->name); EndEmit(current_token, U ""); break; case IN_TOKEN_AFTER_ESCAPE: /* we stopped after the escape character */ fprintf(err_fp, "%s: skipping %c at end of program text\n", ErrorHeader(), current_token->escape[0]); EndEmit(current_token, U ""); break; case IN_TOKEN_AFTER_INNER_ESCAPE: /* we stopped after an inner escape (NB no EndEmit in this case) */ if( current_token->end_delimiter[0] != '\0' ) { if( outer_token == (TOKEN *) NULL ) fprintf(err_fp, "%s: program text ended within %s after escape\n", ErrorHeader(), current_token->name); else fprintf(err_fp, "%s: %s token ended within %s after escape\n", ErrorHeader(), outer_token->name, current_token->name); } break; default: fprintf(err_fp, "%s: internal error (state %d)\n", ErrorHeader(), state); abort(); break; } } /* end Process */ /*****************************************************************************/ /* */ /* PrintUsage() */ /* */ /* Print usage message on file err_fp. */ /* */ /*****************************************************************************/ void PrintUsage() { int i; fprintf(err_fp, "\n"); fprintf(err_fp, "usage: prg2lout \n\n"); fprintf(err_fp, "where can be\n"); fprintf(err_fp, "\n"); fprintf(err_fp, " -r raw mode (used within Lout only)\n"); fprintf(err_fp, " -i take input from \n"); fprintf(err_fp, " -o send output to \n"); fprintf(err_fp, " -e send error messages to \n"); fprintf(err_fp, " -l input is in this programming language\n"); fprintf(err_fp, " -p