Page Numbers: Yes X: 530 Y: 10.5" First Page: 1500 Not-on-first-page Columns: 1 Edge Margin: .6" Between Columns: .4" Margins: Top: 1.3" Bottom: 1" Binding: -5 Line Numbers: No Modulus: 5 Page-relative Odd Heading: Not-on-first-pagel3175e12qk40(635)\g Towards an Interchange Standard for Editable Documentsz18697y756x2qc\g Even Heading: Not-on-first-pagel3175qk40\g Towards an Interchange Standard for Editable Documentsz18697y756x2qc\g Towards an Interchange Standard for Editable Documentsz18697y648x2c\f8bg by Jim Mitchell and Jim Horningz18697y576x2e12\bg May 4, 1982 11:42 AMz18697x2e12\bg File: Interdoc-1.5.bravoz18697x2e12\bg Edited by Mitchell, September 18, 1981 7:16 PM, folded in JJH's comments and altered universal ids, comments, tags.z18697l5440d2999e3(0,6096)(1,7366)\f7g111f6 3f7 Edited by Horning, May 4, 1982 1:48 PM, folded in Truth copy comments.z18697l5440d2999e3\f7g z18697l5440d2999e3\f7g 1.5. Introduction to the Interdoc Base Languagez18697x2e24(635)\bg This section is intended to lead the reader through a set of examples, to show what the language looks like and how it is used to represent a number of commonly occurring features of editable documents. The examples purposely use rather long identifiers and lots of white space to make them more readable. In actual use, programs, not people, will generate and read scripts; names will tend to be short and logically unneeded spaces and carriage returns will tend to be omitted.z18697d3634x3e12j\g 1.5.1. Simple text as a documentz18697x2e18k60\ig5I2i25I The following script defines a document consisting of the string "The text of the main node of example 1.5.1"; no font, paragraph structure, or formatting information is supplied. This example will gradually be expanded to represent accurately figure 1.5.1. The numbers at the left margin do not form part of the script; they are used to refer to the various lines in the discussion below.z18697d3634x3e12j\g 0 Interdoc/Interchange/1.0 1 {}z18697l3648x2e6k40(0,4256)(1,65535)\f1g Line 0 is the header denoting version 1.0 of the interchange encoding. Line 1 is the entire body of this script: it contains a single node enclosed in {} which in turn contains a single string value enclosed in <>.z18697x3e6j(635)\g134i4I The text of the main node of example 1.5.1z12700l8255x3e12\f1g The text of the first subnode of example 1.5.1z15240l9525x3\f1g16i5I Example 1.5.1: A simple documentz18697x3e12c\f7g The next version of the example adds the tag, TEXT$ to the node. The identifier TEXT is called a universal name (or atom), which is indicated by its being composed of all uppercase letters. Universal names have no definition within the base language (they are expected to be defined in Layers 2 and 3).z18697d3634x3e12j\g41i3I2f1 5f6 29f1 4f6 13i14I 0 Interdoc/Interchange/1.0 1 {TEXT$ 2 3 }z18697l3648x2e6k40(0,4256)\f1g A tag is denoted by placing "$" after a universal name. A node's tags are strictly local (they are not inherited by other nodes in the script) and serve as "type information" about the node. The tag TEXT$ labels this node as one that can be viewed as textual data. Tags also create implicit indirections; see section 1.6.5.z18697d3634x3e12j(635)\g29f1 1f6 169f1 5f6 60f7 59f6 0 Interdoc/Interchange/1.0 1 {PARAGRAPH$ 2 leftMargin_3.25*inch rightMargin_5.0*inch 3 4 }z18697l3648x2e6k40(0,4256)\f1g26f6 1f1 13f6 1f1 43f6 1f1 46f6 1f1 This example shows how auxiliary information, such as margins, may be associated with a node of a script. The binding leftMargin_3.25*inch adds the attribute leftMargin to the node's environment and binds the value of the expression 3.25*inch to it (inch is a constant whose dimensions are inches/meter; meters are the standard Interdoc units of distance). The bindings to leftMargin and rightMargin convey the fact that this node has margins for display. To denote the change in character of the node, we have tagged it as PARAGRAPH instead of TEXT. Figure 1.5.1 uses these margins for its first line of text. z18697d3634x3e12j(635)\g110i8f1I20f6 20f1 10f6 65f1 9f6 8f1 4f6 119f1 10f6 5f1 11f6 125f1 9f6 12f1 4f6 0 Interdoc/Interchange/1.0 1 {PARAGRAPH$ 2 leftMargin_3.25*inch rightMargin_5.0*inch 3 4 {PARAGRAPH$ leftMargin_+0.5*inch 5 6 } 7 }z18697l3648x2e6k40(0,4256)\f1g26f6 1f1 13f6 1f1 43f6 1f1 46f6 1f1 35f6 1f1 51f6 1f1 4f6 1f1 We have further elaborated the example by nesting another text node in the primary one, with its text following the primary node's text and with an indented leftMargin. The binding leftMargin_+0.5*inch is a contraction of leftMargin_leftMargin+0.5*inch. The right side of the binding is evaluated, and since there is as yet no binding in the inner node's (lines 46) environment for leftMargin, it is looked up in the environment of the containing node (lines 13). The value of the right hand side expression is thus 3.75*inch. This value is then bound to the identifier leftMargin in the inner node's environment. Since no value is bound to rightMargin in the inner node's environment, it will have the same rightMargin as its parent node.z18697d3634x3e12j(635)\g157f1 10f6 14f1 20f6 21f1 30f6 131f1 10f6 125f1 9f6 45f1 10f6 61f1 11f6 56f1 11f6 0 Interdoc/Interchange/1.0 1 p='PARAGRAPH$ leftMargin_3.25*inch rightMargin_6.0*inch' 2 {p rightMargin_5.0*inch 3 4 {p leftMargin_+0.5*inch 5 6 } 7 }z18697l3648x2e6k40(0,4256)\f1g26f6 1f1 58f6 1f1 25f6 1f1 46f6 1f1 26f6 1f1 51f6 1f1 4f6 1f1 One can also define an abbreviation by binding a sequence of unevaluated expressions to an identifier and subsequently using the identifier to cause those expressions to be evaluated at the point of invocation. This example binds the quoted expression 'PARAGRAPH$leftMargin_3.25*inchrightMargin_6.0*inch' to the identifier p. The binding operator is = instead of _ to denote the fact that this binding may not be superseded in this node or any of its subnodes; for this reason such a binding is called a definition. When p is invoked in lines 2 and 4, the quoted expression replaces the invocation and is evaluated there.z18697d3634x3e12j(635)\g23i12I199i17I1f1 54f6 19f1 1f6 26f1 1f6 12f1 1f6 140i10I7f1 1f6 Invoking p places the tag PARAGRAPH$ on the node, sets the leftMargin to 3.25*inch and the rightMargin to 6.0*inch. In line 2, the rightMargin is then rebound to 5.0*inch, overriding the default binding created by invoking p. Similarly, the binding for leftMargin in line 4 overrides the one resulting from invoking p, resulting in its leftMargin being 3.75*inch and its rightMargin being 6.0*inch. z18697d3634x3e12j\g9f1 1f6 16f1 10f6 23f1 10f6 4f1 9f6 9f1 11f6 4f1 8f6 17f1 11f6 20f1 8f6 53f1 1f6 29f1 10f6 53f1 1f6 19f1 10f6 7f1 9f6 9f1 11f6 7f1 8f6 An identifier can also be bound to an environment value as a convenient record-like manner of naming a set of related bindings. For example, a font might be defined as follows (a more complete definition is given later in section 1.6.3):z18697d3634x3e12j\g38i17I font = [ | family_TIMES size_10*pt face_[ | weight_NORMAL style_ROMAN slant_NIL] ] z18697l3648x2e6k40(0,4256)\f1g This defines font to be the environment formed by taking the empty or Null environment and altering it according to the series of bindings following the initial "[ |." In this case font is an environment having bindings for three attributes, family, size, and face. face is itself bound to an environment (with attributes weight, style, and slant). Since font is bound using "=", it cannot directly be changed in its scope, although its components can be since they are bound using "_". The set of default bindings in font specify a normal weight (non-bold), non-italic Times Roman 10 point font.z18697d3634x3e12j(635)\g13f1 4f6 145f1 3f6 16f1 4f6 57f1 6f6 2f1 4f6 6f1 4f6 2f1 4f6 52f1 6f6 2f1 5f6 6f1 5f6 9f1 4f6 159f1 4f6 We can incorporate this font definition in the example and then use it to indicate that the word "first" in the subnode should be in italics:z18697d3634x3e12j\g 0 Interdoc/Interchange/1.0 1 p='PARAGRAPH$ leftMargin_3.25*inch rightMargin_6.0*inch' 2 font = [ | family_Times size_10*pt face_[ | weight_NORMAL style_ROMAN slant_NIL] ] 3 {p rightMargin_5.0*inch 4 5 {p leftMargin_+.5*inch 6 7 font.face.slant_ITALIC font.face.slant_NIL 8 < subnode of example 1.5.1> 9 } 10 }z18697l3648x2e6k40(0,4256)\f1g Bindings affect node contents to their right: so, "first" will be italic, while "subnode of example 1.5.1" will be non-italic due to the binding immediately preceding it. If we expected to switch between italics and non-italics frequently, it might be profitable to introduce abbreviations to shorten what must appear. For example, in the scope of the definitionz18697d3634x3e12j(635)\g l=[ | i='font.face.slant_ITALIC' nI='font.face.slant_NIL']z18697l3648x2e6k40(0,4256)\g1f1 line 7 could be abbreviatedz18697x3e6j(635)\g28f1 l.il.nI z18697l3648x2e6k40(0,4256)\f1g14f6 1.6. Further Examplesz18697x2e24(635)\bg This section gives some more realistic examples of the use of the Interdoc language and explores the issues of making sets of standard definitions for use in scripts.z18697d3634x3e12j\g166f7 1.6.1. A Laurel Messagez18697x2e18k60\ig5I2i Here is a possible Interdoc transcription of a Laurel message:z18697d3634x3e12j\g 0 Interdoc/Interchange/1.0 -- standard heading -- 1 {LAURELMSG$ -- tag for a Laurel document -- 2 Sub='PARAGRAPH$ leftMargin_1.0*inch rightMargin_7.5*inch' 3 justified_F -- "_" means overridable default -- 4 font.family_TIMES font.size_10 5 leading.x_1 6 leading.y_1 -- overridable default leadings -- 7 heading@! -- declare a label -- 8 laurelInfo = -- Laurel information for easy access; none is changeable -- 9 (Heading.time@ Heading.from@ Heading.subject@ Heading.to@ Heading.cc@) 10 { {Heading.time! <18 June 1981 9:18 am PDT (Thursday)>} 11 {Heading.from! AUTHENTICATED$} 12 {Heading.subject! } 13 {Heading.to! } 14 {Heading.cc! }} 15 leading.y_6 -- override outer y leading -- 16 {} -- node which is a paragraph -- 17 {} 18 {} 19 }z18697l3648x2e6k40(0,4256)\f1g264f6 1f1 Line 1 tags this document (by tagging its root node) as a Laurel message, and line 2 tags its subnodes (starting on lines 10, 16, 17, and 18) as paragraphs with default margins. Lines 36 bind some other attributes, likely to be relevant to paragraphs. Line 7 declares the main link identifier heading, and lines 89 bind to laurelInfo a vector of source links whose targets are the parts of the document of interest for mail transport. Lines 1014 have similar structures: each consists of a string followed by a node containing a target link for the label heading and text for that Laurel "field." Line 11 is additionally tagged as AUTHENTICATED. Lines 1618 contain paragraphs constituting the body of the message.z18697x3e12j(635)\g294f1 7f6 24f1 10f6 223f1 7f6 69f1 13f6 Alternatively, the external environment might well contain a definition of laurel60 that establishes a suitable environment for a Laurel 6.0 document:z18697d3634x3e12j\g76f1 8f6 1 laurel60= ' 2 time@! from@! subject@! to@! bodyNodes@! cc@! 3 LAURELMSG$ 4 cr = <#13#> tab = <#9#> 5 p='PARAGRAPH$ leftMargin_1.0*inch rightMargin_7.5*inch' 6 justified_F 7 font.family=TIMES font.size=10 8 margins.left_2540 margins.right_19050 9 leading.x_1 leading.y_1 -- overridable default leadings -- 10 printForm= 11 '{p time@ tab 12 from@ cr 13 subject@ cr 14 to@ 15 leading.y_6 16 bodyNodes@ 17 cc@ 18 }' 19 heading = 'LAURELHEADING$ Sub_'TEXT$ LAURELFIELD$' ' 20 body = 'Sub_'p bodyNodes!' ' 21 'z18697l3648x2e6k40(0,4256)\f1g13f6 1f1 48f6 1f1 13f6 1f1 26f6 1f1 73f6 1f1 33f6 1f1 40f6 1f1 81f6 1f1 29f6 1f1 27f6 1f1 33f6 1f1 20f6 1f1 21f6 1f1 20f6 1f1 20f6 1f1 14f6 1f1 56f6 1f1 32f6 1f1 One advantage of using source labels for the "bodies" of the To:, From:, etc. fields (lines 1114, 17) is that they can represent sets of nodes as well as single nodes.z18697x3e12j(635)\g Now the Laurel document would be described by the following script:z18697x3e12j\g 22 Interdoc/Interchange/1.0 -- standard heading -- 23 {laurel60% -- invoke Laurel 6.0 definitions 24 {heading% -- invoke heading style -- 25 {time! <18 June 1981 9:18 am PDT (Thursday)>} 26 {from! AUTHENTICATED$ } 27 {subject! } 28 {to! } 29 {cc! } 30 } 31 {body% -- Invoke body style -- 32 {} 33 {} 34 {} 35 } 36 }z18697l3648x2e6k40(0,4256)\f1g Invoking laurel60 in line 23 introduces the quoted expressions heading and body into the root node's environment, tags it as LAURELMSG and declares the labels time, from, etc. It also acquires a definition for a print form, which could be used to format the message for sending to a printer. The "%" (indirection) operator indicates that this is intentional structure, to be preserved by each rendition, rather than merely an abbreviation. Thus the message heading and body should "see" the effects of any future changes made to laurel60, by editing its definition. By contrast, p is used as an abbreviation; when the script is rendered, its value may safely be copied at each use.z18697d3634x3e12j(635)\g9f1 8f6 46f1 7f6 5f1 4f6 46f1 9f6 25f1 4f6 2f1 4f6 410f1 1f0 1f6 61i5I Look at the definition of heading (line 19): the right side is a quoted expression sequence. The first expression of the sequence produces the tag LAURELHEADING$ and the second binds the quoted expression 'TEXT$ LAURELFIELD$' to Sub. As a result, each subnode of the one beginning on line 24 will be initialized by invoking Sub from its containing node, which gives each the tags TEXT$ and LAURELFIELD$.z18697d3634x3e12j\g26f1 7f6 114f1 14f6 46f1 5f6 1f1 12f6 5f1 3f6 92f1 3f6 53f1 5f6 5f1 12f6 Similarly, the definition of body (line 20) defines Sub, and the nodes on lines 3234 will be initialized by invoking p and having the target link bodyNodes placed on it. Labelling the set of body nodes this way means that the source link, bodyNodes@, in printForm (line 19) denotes the entire sequence of body nodes, in left-to-right depth-first tree order.z18697d3634x3e12j\g29f1 4f6 19f1 3f6 63f1 1f6 28f1 9f6 84f1 10f6 5f1 9f6 1.6.2. A page of a Star documentz18697x2e18k60\ig5I2i This example is taken from page 71 of the Star Functional Specification and shows one page of a paginated document with a diagram and a footnote (we recommend that you have that page in front of you when analyzing this transcription):z18697d3634x3e12j\g -- pages 1 .. 6 supposedly precede this one, and Sub would be set to PAGE$ to take care of page heading, page number, etc. -- {pg.a7! Sub_'PARAGRAPH$' {z18697l3648x2e6k40(0,4256)\f1g {fn.n1! -- just a unique label: fn! introduced in PAGE -- FOOTNOTE$ }z18697l4891k40\f1g190f6 2f1 < which has shown our techniques to be valid. Other data can be collected by future changes to your accounting and billing packages, which will allow us to perform even better analyses and lead to better problem discovery and correction.> }z18697l4256k40\f1g44f6 2f1 { }z18697l4256k40\f1g131f6 2f1 47f6 2f1 Sub_'FRAME$' -- change to subnode tag FRAME --z18697l4256k40\f1g {Alignment.horizonally_FlushLeft Alignment.vertically_Floatingz18697l4256k40\f1g height_2.8*inch width_3.67*inch edges.expandingRightEdge_T border_dots1 -- change to default subnode environment Rectangle with solid, double width outline -- Sub_'RECTANGLE$ lineType.width_2 lineType.style_solid' rect@! -- declare label class to be used below -- {rect.a1! UpperLeft_(.0254 .07) shading_7 height_.01 width_.027 {Title } }z18697l4891k40\f1g {rect.a2! UpperLeft_(.073 .015) height_.01 width_.018 {Title } }z18697l4891k40\f1g height_.013 -- attribute value shared by following subnodesz18697l4891k40\f1g {rect.a3! UpperLeft_(.02 .03) width_.025 {Title } }z18697l4891k40\f1g {rect.a4! UpperLeft_(.02 .03) width_.028 {Title } }z18697l4891k40\f1g {rect.a5! UpperLeft_(.042 .055) width_.016 {Title } }z18697l4891k40\f1g {rect.a6! UpperLeft_(.067 .055) width_.016 {Title } }z18697l4891k40\f1g -- default subnode environment is LINE with solid, double width outline -- Sub_'LINE lineType.width_2 lineType.style_solid' ln@!z18697l4891k40\f1g {ln.out1! rect.a1@ ln.in34@} {ln.out2! rect.a2@ ln.out1@} {ln.in3! ln.in34@ rect.a3@} {ln.in4! ln.in34@ rect.a4@} {ln.in34! ln.in3@ ln.in4@} {ln.out4! rect.a4@ ln.in56@} {ln.in56! ln.in5@ ln.in6@} {ln.in5! ln.in56@ rect.a5@} {ln.in6! ln.in56@ rect.a6@}z18697l4891k40\f1g9f6 1f1 8f6 1f1 19f6 1f1 8f6 1f1 18f6 1f1 8f6 1f1 18f6 1f1 8f6 1f1 19f6 1f1 26f6 1f1 8f6 1f1 19f6 1f1 25f6 1f1 8f6 1f1 18f6 1f1 8f6 1f1 } -- end of Frame1 -- Sub_'PARAGRAPH$' -- restore default subnode initialization to PARAGRAPH -- {}z18697l4256k40\f1g178f6 2f1 81f6 2f1 {}z18697l4256k40\f1g79f6 2f1 128f6 2f1 } -- end of page --z18697l3621k40\f1g 1.6.3. Some Star property sheetsz18697x2e18k60(635)\ig5I2i Here a few of the definitions invoked in the above example (these were derived from page 148 of the Star Functional Specification). Some of them simply give default values for various attributes; some, like default.font, define a collection of related attributes as an environment; and most are quoted expression sequences for providing abbreviations or "decorating" nodes with tags and their environments with relevant attributes. These definitions would exist in the external environment for Starproduced scripts. They would be made accessible to other editors as part of the definition of XEROX.STAR.VERSION1.z18697d3634x3e12j\g 1.6.3.1. Font-related defaults and definitionsz18697x2e18k60\ig7I2i baseline_0 -- the base line for characters --z18697l3648x2e6k40(0,4256)\f1g underlined_F -- whether or not text in node is to be underlined --z18697l3648x2e6k40\f1g strikeOut_F -- whether or not text in node is to have strike-out line through it --z18697l3648x2e6k40\f1g -- there is no rhyme and little reason behind the names of type fonts. The following definition is intended to provide enough choice, using standard "terms" to name any existing font in an arbitrary font catalog (of course, it doesn't, but perhaps it is close enough) -- default.font = [ | -- Definition -- family_Times -- a font family name -- face_[ | -- Definition -- weight_NORMAL -- In (EXTRALIGHT, LIGHT, BOOK, NORMAL, MEDIUM, DEMIBOLD, SEMIBOLD, BOLD, EXTRABOLD, ULTRABOLD, HEAVY, EXTRAHEAVY, BLACK, GROTESQUE) -- lineType_SOLID -- In (SOLID, INLINE, OPEN, OUTLINE, DISPLAY, SHADED) -- proportions_NORMAL -- In (NORMAL, CONDENSED, EXPANDED, EXTENDED, WIDE, BROAD, ELONGATED) -- style_ROMAN -- In (ROMAN, GOTHIC, EGYPTIAN, CURSIVE, SCRIPT) -- slant_NIL -- In (NIL, ITALIC, OBLIQUE) -- swash_F -- T => use swash capitals -- lowercase_T -- T => use lowercase letters -- uppercase_T -- T => use uppercase letters -- smallCaps_F -- T => use small capitals -- ] size_10*pt -- distance -- ]z18697l3648x2e6k40\f1g69f6 2f1 -- some useful font shorthands: -- Helvetica = 'font _ [default.font% | family_HELVETICA]' Italic = 'font.face.slant_ITALIC' Bold = 'font.face.weight_BOLD' Helvetica10BI = 'Helvetica font.size_10*pt Bold Italic'z18697l3648x2e6k40\f1g 1.6.3.2. Page-related definitionsz18697x2e18k60(635)\ig7I2i PAGE = 'fn@! fnCount:0 -- introduce link class and count for footnotes on this page -- PageControl_NEWPAGE -- In (CONTINUE, NEWPAGE, NEWLEFTPAGE, NEWRIGHTPAGE, NEWCOLUMN) -- height_11*inch width_8.5*inch margins_[ | left_1*inch right_1*inch binding_0.5*inch top_1*inch bottom_1*inch ] numberOfColumns_2 spaceBetweenColumns_.5*inch 'z18697l3648x2e12k40(0,4256)\f1g FOOTNOTE = 'fnCount:=+1 font.size_8*pt FootnoteRef%'z18697l3648x2e6k40\f1g FootnoteRef = '{FOOTREF$ baseline_+5*pt fnCount}' -- raise 5 pts --z18697l3648x2e6k40\f1g 1.6.3.3. Paragraph-related definitionsz18697x2e18k60(635)\ig7I2i Tab = [ | position_0 type_LEFT -- In (LEFT, CENTERED, RIGHT, DECIMAL) -- ] z18697l3648x2e6k40(0,4256)\f1g MakeTabs='n_0 tabs_(RecursiveMakeTab[Value])' RecursiveMakeTab='(EQ[Value 0] | NIL | n_+.25*inch [Tab | position_n ] RecursiveMakeTab[Value-1])'z18697l3648x2e6k40\f1g PARAGRAPH = 'Indent = [ | Left_0.0 Right_0.0] -- distance -- Alignment_FLUSHLEFT -- In (FLUSHLEFT, FLUSHRIGHT, BOTH, CENTERED) -- Justified_F leading_[leading | between_1*pt above_12*pt below_0] charStyle_[| Normal_'font_default.font' Emphasis1_'font_default.font Italic' Emphasis2_'font_default.font Bold' ] Hyphenation_F KeepOn_NIL -- In (NIL, SamePageAsNextParagraph) -- MakeTabs[8] -- binds tabs to a sequence of 8 tabs (0, .25 inch, .50 inch, . . .) -- charStyle.Normal -- initializes to normal stylez18697l3648x2e6k40\f1g484f6 5f1 1.6.3.4. frame, rectangle, and line definitionsz18697x2e18k60(635)\ig7I2i Def.UpperLeft = 'UpperLeft_(0.0 0.0)' -- Def is just a convenient environment in which to put useful auxiliary definitions --z18697l3648x2e6k40(0,4256)\f1g Def.lineType = ' lineType_[ | Visible_T Width_1 Style_SOLID] -- IN (SOLID, DOT, DASH, DOTDASH, DOUBLE, . . .) -- 'z18697l3648x2e6k40\f1g Def.Shading = 'Shading_0'z18697l3648x2e6k40\f1g Def.Box = 'Def.UpperLeft Def.lineType Def.Shading'z18697l3648x2e6k40\f1g Frame = 'FRAME$ Def.Box'z18697l3648x2e6k40\f1g Rectangle = 'RECTANGLE$ Def.Box Constraint_MagnifyOnly -- IN (NIL MagnifyOnly) -- 'z18697l3648x2e6k40\f1g Def.LineEnd = ' LineEnd_(LeftUpper_Flush RightLower_Flush) -- IN (Flush Round Square arrow1 arrow2 arrow3) -- 'z18697l3648x2e6k40\f1g Line = 'LINE$ constraint_FixedAngle Def.lineType Def.LineEnd'z18697l3648x2e6k40\f1g Title = 'CAPTION$ Paragraph'z18697l3648x2e6k40\f1g 1.6.4. Using linksz18697x2e18k60(635)\ig5I2i Links are intended to provide the means for associating nodes in non-hierarchical ways. They can be used for referring to figures, examples, tables, etc., for describing tables of contents, for denoting index items, keeping lists, etc. z18697d3634x3e12j\g 1.6.4.1. References to figuresz18697x2e18k60\ig7I2i The following outlines how the labelling facilities and persistent bindings can be used to generate references to (source links for) a figure whose number may not be known at the point of reference. The identifier n5 is assumed to have been generated by the program that produced the script and is assumed to be unique over the target labels with naming prefix "figures." in the script.z18697d3634x3e12j\g figures@! figCount: 0 -- should appear in a script's root node -- makeFigureNum = 'HIDDEN figCount:=+1 figCount'z18697l3648x2e6k40(0,4256)\f1g {. . . figures.n5@ . . .} -- ref to node with label figures.n5! --z18697l3648x2e6k40\f1g { . . . {figures.n5! makeFigureNum} . . .} -- a hidden node holding the figure number --z18697l3648x2e6k40\f1g The node in which the figure number for figure n5 is defined contains a tag, HIDDEN, which means that the node is not to be considered a part of the dominant structure for display purposes even though it is part of it. The node's sole content is the value of figCount after it has been (persistently) incremented by 1. Because figCount is bound with ":=", the scope of the binding extends beyond the end of the node in which it occurs.z18697d3634x3e12j(635)\g77f1 6f6 1.6.4.2. Collections of index itemsz18697x2e18k60\ig7I2i Assume that the word "framble" is to be considered an index item in certain places where it occurs in a document. The link class Indexable@! should be introduced at the root of the document, and each to-be-indexed occurrence of "framble" in a string, e.g., , should be replaced by the sequence framble < is found, it . . .>. Somewhere in the script within the scope of the declaration of Indexable, at the root of a subtree containing all the uses of framble should be the following definition:z18697d3634x3e12j\g129f1 11f6 117f1 35f6 37f1 39f6 65f1 9f6 framble='{HIDDEN$ indexable.framble! pageNumber} 'z18697l3648x2e6k40(0,4256)\f1g Invoking framble results in the appearance of a hidden node containing the current page number (assumed to be held in the attribute pageNumber) and labelled as being in the set of target links indexable and indexable.framble. The index for the document might then contain the following entry for "framble":z18697d3634x3e12j(635)\g9f1 7f6 116f1 10f6 52f1 9f6 5f1 17f6 {INDEXENTRY$ indexable.framble@}z18697l3648x2e6k40(0,4256)\f1g This entry contains the minimal information needed to generate the sequence of page numbers corresponding to indexable occurrences of framble. If some occurrences are considered primary and some secondary, then these mechanisms can be generalized to have framble defined asz18697x3e6j(635)\g134f1 7f6 114f1 7f6 framble=[ | primary='{HIDDEN$ indexable.framble.primary! pageNum} ' secondary='{HIDDEN$ indexable.framble.secondary! pageNum} ']z18697l3648x2e6k40(0,4256)\f1g Primary references are denoted in the script as framble.primary and secondary ones as framble.secondary. Similarly, the index entry takes the form:z18697x3e6j(635)\g48f1 15f6 23f1 17f6 {INDEXENTRY$ indexable.framble.primary@ indexable.framble.secondary@}z18697l3648x2e6k40(0,4256)\f1g 1.6.5. Using indirectionsz18697x2e18k60(635)\ig5I2i Indirections provide a way to centralize (and delay) the binding of information within a document. They can be used to share information that is intended to be consistent. z18697d3634x3e12j\g 1.6.5.1 Styles and style sheetsz18697x2e18k60\ig Documents generally follow stylistic conventions for presenting different kinds of content. E.g., major headings may be in bold face with twelve points of extra leading, minor headings in italic with six points of extra leading. If this information is explicitly bound for each piece of content, then a stylistic change may require locating and changing all the relevant bindings (note that italic is likely to be also used for other purposes, such as emphasis). If, however, the binding is done indirectly, through a style, a single change will be effective for all places where the style is referenced. Note that each occurrence of a tag implicitly establishes an indirection through the same identifier; this is convenient in associating styles with semantically meaningful tags. For example:z18697d3634x3e12j\g452i8I58i5I MajorHeading = 'PARAGRAPH$ Bold leading_+12' MinorHeading = 'PARAGRAPH$ Italic leading_+6'z18697l3648x2e6k40(0,4256)\f1g 1.6.5.2 Technical termsz18697x2e18k60(635)\ig Terminology may be undergoing change while a document is in production. For example, the previous version of this document used "mark" for what is now called "tag." One way to defer decisions on terminology, while ensuring that each version of the document is self-consistent, is to use an indirect reference for each occurrence of a term that may have to be rebound later.z18697d3634x3e12j\g HISTORY LOGz18697y684x2e24ck648\bg1f7 6f6 2f7 2f6 Edited by Mitchell, September 1, 1981 3:12 PM, added first version of glossaryz18697l5440d2999e3(0,6096)(1,7366)\f7g Edited by Mitchell, September 7, 1981 2:11 PM, wrote parts of introductionz18697l5440d2999e3\f7g Edited by Mitchell, September 10, 1981 10:14 AM, added Tab def to Star property sheetsz18697l5440d2999e3\f7g Edited by Mitchell, September 14, 1981 9:54 AM, renumbered chapters and did minor editsz18697l5440d2999e3\f7g Edited by Mitchell, September 17, 1981 1:37 PM, folding in JJH's edits.z18697l5440d2999e3\f7g Edited by Mitchell, September 18, 1981 12:45 AM, added considerable annotation of examples.z18697l5440d2999e3\f7g Edited by Horning, May 4, 1982 12:30 PM, Fold in Truth Copy editsz18697l5440d2999e3\f7g