IBM
Contents Index Previous Next



Footer and Header Files


You may specify if a header and/or footer is to be inserted on each printed page. The first thing you have to do is to define the header and footer in separate text files. The format is ASCII based and line oriented. A number of variables are available, providing additional information of the kind of diagram printed.

Text is written on a white background, which becomes visible if the text appears on top of any graphical object.

Printing Order

The priority order for writing headers and footers is as the inverse order in which the items appear in the file. That is any text, variable or graphical symbol, overwrites an already written item. (The last row in the file has the highest priority).

Syntax

The syntax used in the header and footer files is given below in a BNF notation:

File 	 	 ::= ( <LINE> | <EXTENSION-LINES> | 
<EPSF> ) *
<LINE>	 	 ::= <X> <Y> ( <TEXT> | <VARIABLE> ) 
+ \n
<X> 	 	 ::= integer, x - position in 
millimeter
<Y> 	 	 ::= integer, y - position in 
millimeter
<TEXT> 	 	 ::= any ASCII text - no newlines 
allowed
<VARIABLE> ::= any variable as described  in 
Variables, 
<EXTENSION-LINES> ::= any of the extensions as 
defined in Extensions.
<EPSF>	 	 ::= EPSF <X> <Y> <FILE>
<FILE>	 	 ::= user provided filename 
containing EPS code

Note:

The positions are relative the upper left corner of the physical paper in the header and the lower left corner in the footer.

Variables

The following variables are supported in header and footer files:

Variable Explanation
<date>

As set by the Print preference date.

<diagramname>

The name of the diagram. Ignored if the printed diagram was not one of:

  • SDL diagram
  • SDL Overview diagram
  • MSC.
<diagramtype>

The type of the diagram. Ignored if the printed diagram was not one of:

  • SDL diagram
  • SDL Overview diagram
  • MSC.
<pagename>

The logical name of current page. Ignored if the printed diagram was not one of:

  • SDL diagram
  • SDL Overview diagram.
<file>

The current file being printed. Ignored if no corresponding file exists. It could be a New (unsaved) file being printed or it could be a Type View which has no corresponding file.

<page>

The current page number.

<directory>

The directory where the current file is located. Ignored if no corresponding file exists. It could be a New (unsaved) file being printed or it could be a Type View which has no corresponding file.

<chaptername>

The current chapter name, defined by a chapter symbol in the Organizer View.

<chapternumber>

The current chapter number, defined by a chapter symbol in the Organizer View.

<totalpages>

The total number of printed pages, excluding the title page and the table of contents.

Obsolete Variables

(i.e. variables used in SDT 2.3)

Variable Explanation
<area>

Prints Work Area or Original Area in plain text depending on if the diagram was found in the source directory or not.

The variable is available for backwards compatibility only.

Example 19

For example, you may have a process called Myproc that you are going to print out. First you write a footer file with the following contents:

10 20 Telelogic AB
10 15 <date>
150 15 <diagramtype> <diagramname> <pagename>
180 20 Page <page>

If the date is March 1, 1999, the 15th printed page would look something like this:

Figure 88 : The resulting footer

Extensions

Below are listed the extensions that enhance the appearance of the header and footer.

Frames

The keyword FRAME makes a frame appear at any position on the paper. The function is intended for framing the header and/or footer.

Format

The exact format is:

FRAME x1 y1 x2 y2 [type]

where the start and stop positions are given in millimeters. The optional type argument may be either 3D or plain (default).

Figure 89 : 3D frame and plain frame

Separators

A separator is a horizontal line which is intended to separate the header and/or footer from the data area of a printed page.

Format

The SEPARATOR statement has the general format:

SEPARATOR x1 y1 length [type]

where the start position and length of the separator are given in millimeters. The optional type argument may be either:

Figure 90 : Filled, double and single separators

Boxes

Use the BOX keyword to make a filled rectangle appear anywhere on the paper. It can be used for highlighting sections of the header and/or footer.

Format

The format is:

BOX x1 y1 x2 y2 [grayscale]

where the start and stop positions are given in millimeters. The optional grayscale argument is a number in the range 0 to 100 (default is 50).

Figure 91 : Boxes

Grayscale=0 = white, grayscale=50 = medium gray and grayscale=100 = black.

Defining Multiple Footers and Headers

It is possible to have a separate footer or header for the first printed page. There are three keywords that can be typed on a separate line in a footer or header definition file to achieve this:

Definitions after this keyword will only be used for the first printed page.

Definitions after this keyword will be used for all pages after the first page, but not for the first page.

Definitions after this keyword will be used for all pages.


http://www.ibm.com/rational
Contents Index Previous Next