TiogaImagerDoc.tioga
Michael Plass, March 27, 1986 4:53:08 pm PST
Stone, September 25, 1985 11:44:43 am PDT
Bloomenthal, October 28, 1985 4:03:58 pm PST
TiogaImager
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
—————————————————————————————————————
TiogaImager
Michael Plass
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: This package provides a command (TiogaToInterpress) for converting a Tioga file to an Interpress master suitable for printing. It also provides a client interface (TiogaImager) for formatting tioga nodes.
Created by: Michael Plass
Maintained by: Michael Plass <Plass.pa>
Keywords: Typesetting, Imager, Tioga, Interpress, Formatting, Figures, Footnotes, Headers, Footers
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
TiogaImager
This client interface provides a typesetting abstraction that combines some of the features of TEX's boxes-and-glue model with the Interpress notion of what a character operator is. It allows clients to build a "box" data structure from a Tioga document (or portion thereof), and to use this structure for display (with the Imager) and hit detection.
Commands
TiogaToInterpress
Converts a Tioga file to an Interpress file.
TiogaToInterpress [<output> ] <input>
"" style 0 skipPages 9999999 nPages
1.0 magnify
screenFormat | printFormat
1.0 1.0 1.0 background
<output>: if not supplied, derives a name from the input name.
<input>: list of input source file names.
style: takes the name of a style to use instead of the one attached to the document.
skipPages: number of pages to skip at the beginning.
nPages: number of pages to print.
magnify: a magnification factor for the whole page, useful for posters.
verbose: causes logging of additional information, such as the starting location of each page.
terse: cuts down on the logged information (default).
screenFormat: the screen style rules will be used instead of the print style rules.
printFormat: the print style rules will be used instead of the screen style rules (default).
background: three numbers giving the RGB color for the background. Note this convention differs from the one used in style rules!
Examples:
TiogaToInterpress foo.tioga 1 magnify screenFormat
(to use screen style, not print style rules. The "1 magnify" keeps the command line parser from confusing "screenFormat" with a file name.)
TiogaToInterpress foo.tioga 0.0 1.0 1.0 background
(for a slide with a cyan background; document style should have the appropriate pageWidth style parameter)
TiogaToInterpress TiogaDoc.tioga 9 skipPages 1 nPages
(to make a an Interpress master for page 10 of TiogaDoc.tioga)
TiogaToInterpress doc.ip ← [cedar]<CedarChest6.0>Documentation>*.tioga 20 nPages
(to make an Interpress master for the first 20 pages of the documentation files on CedarChest)
As the file is being formatted, the starting location of each page is logged in parentheses, and the page numbers are logged in square brackets.
Multi-column output
Multiple column output may be obtained simply by specifying <n> column in the style rule or postfix for the root node of the document. The width of the columns will be equal, and the same throughout the document. The lineLength, columnGap, pageWidth, leftMargin, rightMargin, and bindingMargin style parameters control the widths and spacing of the columns.
Page layout style parameters
The page layout style parameters are Tioga style parameters that control the page layout as a whole. Most of these do not sensibly apply to individual characters and nodes, and therefore are derived from the style evaluated at the root node of the document. This may be done in one of the following ways:
1. By putting them in the "root" format of a style and applying that style to the root node of the document.
2. By putting a StyleDef property on the root node of the document; this carries the style along with the document, rather than just a reference to the style.
3. By putting a Postfix property on the root node of the document.
Consult TiogaDoc.tioga for further information.
The following page layout style parameters are available (defaults as shown*):
* Note that some of these differ from what is in Cedar.style
1 column number of columns
8.5 in pageWidth width of the paper
11 in pageLength height of the paper
1 in leftMargin whitespace at left of the page
1 in rightMargin whitespace at right of the page
1 in topMargin whitespace at top of the page
1 in bottomMargin whitespace at bottom of the page
0 in headerMargin height of area below topMargin
reserved for headers
0 in footerMargin height of area above bottomMargin
reserved for footers
0 in bindingMargin extra margin on the bound edge of page
1 firstFolio Number associated with first formatted page
1 firstVisibleFolio Folios smaller than this will not be printed. Use a large value to kill page numbers.
1 lastDropFolio Last folio to be placed at the bottom center of the page.
1 firstHeaders Page headers and footers will first appear on the page with this folio. Folios will not be visible before this, either.
1 sided Should be 1 or 2.
0.5 in columnGap Minimum gap between columns.
1 topIndentStretch Stretchability at the top of the column
1 bottomIndentStretch Stretchability at the bottom of the column
3 maxVerticalExpansion Extra fil is inserted if the vertical glue expansion ratio would exceed this (helps avoid "spaced out" pages)
0 pageRotation Degrees of counterclockwise rotation for the whole page
0 pt keep Asserts that a new column or page should be started if there is less than this amount of vertical space remaining when the first line of the node is formatted.
1 fil keepStretch Added to the bottomIndentStretch when a new column is started because of a keep.
Page breaks
A node with the format "pageBreak" (in Cedar style) will force the start of a new column and/or page.
The way this works is to provide a very large bottomLeading, which forces a new page because another line couldn't possible fit. Since the last line of the "pageBreak" node comes at the bottom of a page, the (huge) bottomLeading is discarded and the bottomIndent is used to position it with respect to the bottom of the page.
Page Layout Properties
TiogaToInterpress uses two node properties to control headers, footers, inserts, and footnotes, namely the Mark property and the Insert property.
The Mark Property
A node that has the Mark property is not printed in place. Instead, it is formatted, and the first line is saved away to be used as a header, footer, or a separator between the various kinds of inserts (figures and footnotes). The value of the mark property identifies the role that the mark is to play, and should be one of the following:
insideRectoHeader centerRectoHeader outsideRectoHeader
centerVersoHeader insideVersoHeader outsideVersoHeader
insideHeader centerHeader outsideHeader
insideRectoFooter centerRectoFooter outsideRectoFooter
insideVersoFooter centerVersoFooter outsideVersoFooter
insideFooter centerFooter outsideFooter
headSep topSep bottomSep footSep
(NB: case is significant.) Other kinds of marks are permissible but will disappear into the void, with a warning message.
For two-sided output, the *Recto* marks are used on the odd-numbered (right-hand) pages, and the *Verso* marks are used on the even-numbered (left-hand) pages. The unqualified marks (e.g., insideHeader) are used when the corresponding Recto or Verso marks are not specified. The page number goes where the outside header would go, unless an outside header is specified; in this case it goes in the place of the outside footer.
One-sided output treats all pages as Recto.
The Insert Property
An insert is material that is to be placed at the top or bottom of the column. A node that has the Insert property is placed according to the value of the property:
top: at the top of the column, over the normal material
bottom: at the bottom of the column, under the normal material
foot: under both the normal and the bottom insert
The headSep mark is placed above the top insert, if there is any top insert material present. The topSep mark is placed between the top insert and the normal material. The bottomSep mark is placed above the bottom insert, and the footSep above the foot insert. Thus, for example, a footnote may be placed like this.* Figures would normally be placed by using an Interpress Artwork node with a "top" Insert property (see the Preview and InterpressTools packages). If you use Interpress Artwork, be sure it is turned on when you use TiogaToInterpress, or you won't get the figures.
—————————————————————————————————————
* The footnote node has a Insert property value of "foot". The line of dashes above has a Mark property value of "footSep", and will be placed above any footnotes. It also has a Postfix of "1 fill topIndentStretch" in order to ensure that it fets pushed down to the bottom of the page even if it happens to fall on the last page of the document.
Differences from the TSetter
TiogaToInterpress replaces the functionality of the TSetter package, with some enhancements such as footnotes. The way documents get broken into lines and pages will not be the same, and the following TSetter features are no longer provided:
IncludePress nodes (use Artwork Interpress nodes instead)
IncludeAIS nodes (use Artwork Interpress nodes instead)
BasicPrint.style performs no function with TiogaToInterpress.
There is no tool or cute icon.
TiogaToInterpress does not try to send the file anywhere.
TiogaToInterpress treats tabs just like the screen formatter (it's using the same code); results should differ from the screen only because of column width or print rule vs. screen rule differences.
ArtworkClass Rule nodes (use Artwork Rule nodes instead)
ArtworkClass Invisible nodes (use bogus Mark properties instead)
Page numbering and one vs. two-sided output is controlled by style parameters rather than by executing JaM code to build the page image.