![]() |
![]() |
![]() |
![]() |
![]() |
Advanced Print Facilities
This section is divided into three parts.
- The first part lists all advanced print facilities.
See List of Advanced Print Facilities.- The second part describes how to use the advanced print facilities to produce a nice printout, starting with an SDL system that is not already prepared for printing with advanced print facilities.
See Introducing Advanced Print Facilities.- The third part is about using the advanced print facilities when an SDL system is prepared for printing with advanced print facilities. See Using Advanced Print Facilities.
List of Advanced Print Facilities
The following print facilities will be described in this section:
Headers
You can create a textual header definition file that defines the appearance of a header that is found at the top of each printed page. All the possibilities for creating a header is described in Footer and Header Files, here you will only find the most important ones.
Creating a Header Definition File
The Organizer preference ShowHeader defines if the header symbol should be visible as default in the Organizer view. If the header symbol is not visible, you can make the symbol visible by selecting Header File in the View > View Options dialog.
You can double-click on the header symbol to open a Text Editor to be able to define the header and create a header definition file. When you have defined the header (read more about some of the possibilities for that below), save the file and you are done with this step.
Defining Text in Headers
In the header definition file, insert a line like this:
60 20 This printout was produced by XThis means that 60 millimeters from the left border and 20 millimeters from the top border, the text "This printout was produced by X" will be placed.
Using Header Variables
In a header definition file, insert a line like this:
100 10 <page>(<totalpages>)This means that 100 millimeters from the left border and 10 millimeters from the top border, a text such as "3(9)" will be placed, informing the reader of the printout that this is page three of nine.
Using Pictures in Headers
You can introduce pictures in the headers. The pictures must be in Encapsulated PostScript file format (EPSF), and they are referenced from the header definition file. If you have a picture of for instance your company logo in a file /home/lat/logo.eps, then you can get it into your header with the following line:
EPSF 10 35 /home/lat/logo.epsThis line means that the picture defined in the referenced file will be placed 10 millimeters from the left border, and 35 millimeters from the top border.
Separate First-page Header
You can have one header for the first page, and another header for all other pages. To achieve this, you can divide your header definition file in three parts by using three different keywords, or rather keylines:
IFFIRST(Part 1. Place everything that is unique for the first page header here.)ENDIFIFNOTFIRST(Part 2. Place everything that is unique for the other header here.)ENDIF(Part 3. Place everything that is common to both the first page header and the other header here.)Chapters
You can divide the diagrams and documents in your Organizer view into different chapters by using the chapter symbol. You add a chapter symbol to the Organizer view with Edit > Add New. In the dialog that follows, select one of the Chapter alternatives under the Organizer document type group, and specify the chapter name under New document name. (If you do not want to create a chapter introduction text (see below), make sure that the Show in editor toggle button is off before closing the dialog.)
Chapters can be auto-numbered and can be moved with the up and down quick buttons. You can select a chapter symbol to restrict the scope for diagrams and documents that are going to be printed.
Creating a Chapter Introduction Text
It is possible to associate a text with a chapter symbol. The text will be printed at the position of the chapter symbol, and the text can be regarded as a chapter introduction text.
To create a chapter introduction text, you should invoke the Text Editor. This can be done in two ways:
- If you have not closed the Add New dialog, then you can bring up the Text Editor by making sure the Show in editor toggle button is on, before closing the dialog.
- If you have closed the Add New dialog, then you can double-click on the chapter symbol. In the dialog that follows, select Edit chapter symbol. In the second dialog that follows, make sure that the Show in editor toggle button is on and close the dialog to bring up the Text Editor.
In the Text Editor, type in the chapter introduction text and save the file.
Starting a New Chapter in the Middle of an SDL Diagram
For a large SDL diagram with many pages, it is convenient to divide the different pages of the diagram into different sub chapters.
To make this possible, you have to make the page symbols visible in the Organizer, if they are not visible already. This is done in the View Options dialog by turning on Page Symbols.
When page symbols are visible, you can move chapter symbols into the correct place within the SDL system by using the up and down quick-buttons. You can also create new chapter symbols directly at the correct place, by selecting the SDL symbol that the chapter symbol should be placed after, before invoking Add New.
Note that MSCs can be placed in the middle of an SDL system or diagram, in the same way as chapters. This is useful if you want to print an MSC close to the corresponding SDL.
Defining the Start Chapter Number
Normally, the start chapter number is 1 (or 1.1 if the first chapter symbol has the type Chapter 1.1.) You can change this number in the View > Chapter Options dialog.
Deciding Maximum Chapter Level in the Table of Contents
As default, all chapters are visible in the table of contents. If you have a lot of chapters, you can limit the number of chapters in the table of contents by using the View > Chapter Options dialog. A maximum chapter level of 2 will only include chapter symbols of type Chapter, Chapter 1 and Chapter 1.1 in the table of contents.
Printing a Table of Contents with Only Chapters
To print a table of contents, you have to turn on the Table of contents toggle button in the Contents section in the Print dialog.
As default, the table of contents includes chapters, diagrams and documents. To restrict the table of contents to just chapters, there are two ways:
- If you want to do a temporary restriction just for one printout, then there is a toggle for doing so in a sub dialog to the Print dialog: To get to the sub dialog from the Print dialog, press the setup button with a picture close to the Table of contents entry in the Contents section. In the sub dialog, turn on the toggle Only chapters in TOC.
- If you want the restriction to be more permanent, go to the Preference Manager. In that tool, double-click on the Print symbol to expand its contents, and set the value of the preference OnlyChaptersInTOC to on. Save the preferences and restart.
Title Page
A plain text document can become a title page by placing it first among the diagrams and documents that are printed. There is nothing special about a title page, except that it can be placed before the table of contents.
Getting the Title Page before the Table of Contents
To print a table of contents, you have to turn on the Table of contents toggle button in the Contents section in the Print dialog.
Normally, you do not have to do anything to get the title page before the table of contents, because the print operation will as default treat an initial text document as a title page. There is however a way to turn this on and off. This is done in the Print Setup dialog for the Table of contents entry in the Contents section in the Print dialog. You can get to this dialog from the Print dialog by pressing the setup button with a picture close to the Table of contents entry.
State Matrices
State Matrices are described in detail in The Text Editor. Here are only the most important things discussed, enabling you to get a nice printout of state matrices for processes in your SDL system.
Creating State Matrices
When you have a correct SDL system, you can create state matrices with the Generate > State Overview menu choice. A state information file (*.ins) will be created in your target directory, a plain text symbol connected to the file will be added in the Organizer view, and a Text Editor will pop up, acting as a State Matrix Viewer.
Process HelloWorld: nextstatesStatesa Start stateb waitingc stop| STATESSIGNALS | a b c|-------------- | bHello | cFilter State Matrices
The Text Editor has two menu choices that you can use to get the state matrices that you want.
- View > State Matrix > Filter Processes. This menu choice allows you to hide state matrices for SDL processes that you are not interested in.
- View > State Matrix > Transition Information. This menu choice decides the information that should be presented for transitions in your state matrices. As default, you will get two state matrices for each SDL process: One with paper page references to the corresponding SDL transition and one with nextstate information. You can with this menu choice also have state matrices with output/signal sending information and procedure call information.
The options in the two dialogs above can also be set in a more permanent way, using preferences. To do this, use these Text Editor preferences:
Printing State Matrices with Paper Page References
When you view state matrices on-line, you will not see any paper page references in a page number state matrix. All page numbers are undefined and replaced by a "*". The page numbers are only visible in your printout, and only if you print the SDL processes together with the state matrices from the Organizer.
Index
The index is described in detail in The SDL Index Viewer. Here are only the most important things discussed, enabling you to get a nice printout of an index of all SDL entities defined and used in your SDL system.
Creating an Index
When you have a correct SDL system, you can press the Generate Index quick button in the Organizer. This will pop up an index viewer with an index of all SDL entities defined and used in your SDL system.
Filter Index Information
The generated index may be too long to be printed in its entirety. You can make the index smaller by filtering out information that you consider unimportant.
You can filter out SDL entities defined in specific SDL diagrams. This is done with the View > Filter Diagrams dialog. A common use of this possibility is to filter out SDL entities defined in package Predefined.
You can filter out SDL entity types. This is done in the View > Filter Types dialog. For instance, if you want an index of just the signals in your SDL system, then you can use this possibility to filter out all other SDL entity types.
To make your filter more permanent than just for the current Index Viewer session, you should define your filter settings in the Preference Manager before starting the Index Viewer. These two preferences are appropriate:
Deciding Index Appearance
Each SDL entity in the index can be presented in four different ways. You can change the index appearance for the current Index Viewer session with the View > Index Appearance dialog. To make your changes more permanent, use the Preference Manager and the following preference:
As default, the index appearance is set to Detailed. This setting is appropriate for on-line viewing. For a printout, it might produce unnecessary large indexes. To get a smaller index in a printout, use the Compact index appearance.
Printing an Index with Paper Page References
It is possible to get paper page references for both definitions and uses of SDL entities in a printout of an index. To achieve this, leave the Index Viewer window on screen while doing a printout from the Organizer that includes your SDL system and the index view.
Fonts
- Proportional fonts such as Times. These fonts have the advantage of not needing much space.
- Non-proportional fonts such as Courier. These fonts have the advantage of being useful for creating tables where it is important that the same character position on different lines are aligned.
Below, you will learn how to set up SDL Suite and TTCN Suite to use appropriate fonts for different uses.
Using a Non-Proportional Font in the Text Editor
State matrices are viewed and printed from the Text Editor. State matrices should be presented using a non-proportional font. To get a non-proportional font in printouts of state matrices, set the preference SDT*PrintFontFamily to Courier.
Using a Non-Proportional Font for SDL Text Symbols
Sometimes, it is convenient to make aligned tables in SDL text symbols. This requires a non-proportional font. On the other hand, you do not want a non-proportional font for all other symbols in a process diagram, because you want to squeeze as much text as possible into a flow symbol without going outside the symbol border.
You can have a separate, non-proportional font for SDL text symbols. This is achieved by setting Editor*FontText*TextSymbolFontFamily to Courier. This preference is valid both on-line and in print. All the other symbols use the fonts set by Editor*FontText*ScreenFontFamily and Editor*FontText*PrintFontFamily.
Title Fonts: Size and Boldness
The table of contents has a title named "Contents" that is always presented in bold.
Font size and boldness for chapter names in text page titles are determined by the chapter level:
- Chapter level 1 (for instance 1) uses 14 pt bold.
- Chapter level 2 (for instance 1.1) uses 12 pt bold.
- Chapter level 3 (for instance 1.1.1) uses 11 pt bold.
- Chapter level 4 (for instance 1.1.1.1) uses 11 pt, not bold.
A normal text, and a chapter without a chapter number (chapter level 0), uses the same font appearance for the title as the font used for the following text.
To get header titles in a larger font (14 pt) and with a bold text, use a header definition file with a Title keyword. (<#Title>, <#Title 2> or something similar.)
Text Indentation
There are three text indentation levels, and each text indentation level has a corresponding preference:
- Print*TextIndentation1. Used by text pages for presenting chapter numbers. Default: 44 mm from the left paper edge.
- Print*TextIndentation2. Used by text pages for presenting chapter names and normal text. Also used by the table of contents for presenting chapter numbers. Default: 67 mm from the left paper edge.
- Print*TextIndentation3. Used by the table of contents for presenting chapter names. Default: 90 mm from the left paper edge.
Introducing Advanced Print Facilities
In this sub section we will take a more detailed and practical look at how an ordinary SDL system can be turned into an SDL system with enhanced print facilities.
As default in this section, we are talking about menu choices and dialogs in the Organizer.
Initial Setup
Before starting doing print enhancements for the specific SDL system, we should set up some preferences affecting how the final printout will look like.
- Bring up the Preference Manager with the menu choice Tools > Preference Manager.
- To get a non-proportional font in printouts of state matrices, set the preference SDT*PrintFontFamily to Courier.
- To get a non-proportional font in text symbols in SDL diagrams, set the preference (SDL) Editor*FontText*TextSymbolFontFamily to Courier.
- Save the preferences and exit the Preference Manager.
The Example SDL System
We will use an SDL system called HelloWorld as an example. When we start, we have a correct SDL system that is not adapted in any way for producing a nice printout. If we just do a plain printout of HelloWorld, we will get the following:
The figures below are not exact copies of a printout, they have been modified slightly to fit in this manual.
To get a better printout, we will add the following:
- A Header on Each Printed Page
- A Title Page
- Chapters and Sub Chapters
- State Matrices for the SDL Process
- An Index of SDL Entities
When we have done that, we will perform a print operation to actually get our enhanced printout.
A Header on Each Printed Page
The header should have the following properties:
- A separate header appearance for the first page.
- The company logo should be visible on every page.
- The header should include information about page number, total pages, chapter number and chapter name.
Fortunately, someone at our company has provided a company logo in Encapsulated PostScript format (*.eps), and a template header definition file. The template looks like this:
IFFIRST18 28 Name of designerENDIFIFNOTFIRST183 20 <page>(<totalpages>)90 24 Chapter <chapternumber> <chaptername>ENDIFEPSF 10 25 /home/lat/hello/tlog.eps90 20 Name of SDL systemAction
- The header symbol is not visible in the Organizer view. To make it visible, bring up the View Options dialog and select the Header file item and press Apply and Close.
- To create a new and unique header for the SDL system, double-click on the header symbol in the Organizer view.
- In the Edit dialog that follows, we should specify the template file under Copy existing file. In our case, someone has put the template file in /home/lat/hello/headerTemplate.txt.
- When we close the Edit dialog, the text editor pops up with a copy of the template header file.
- To get a unique header for our SDL system, we change the following things:
Name of designer -> Lars TufvessonName of SDL system -> HelloWorld- When that is done, we save our specialized header file in the same directory as our SDL diagrams.
A Title Page
A title page is a plain text document that is placed first among all printed pages and documents.
Action
- We should add a new plain text document to our SDL system. To make sure it is placed first, select the header symbol before invoking Add New.
- In the Add New dialog, set the document type to Plain Text and set the document name to TitlePage.
- When you close the dialog, the Text Editor pops up. Type in an appropriate title page text (like the one below) and save the text file in the same directory as the SDL diagrams.
********************System HelloWorld********************A revolutionary SDL system software packageChapters and Sub Chapters
We would like to divide our diagrams and documents in three chapters:
- The first chapter contains state matrices for the SDL process(es).
- The second chapter contains the SDL system.
- The third chapter is an appendix that contains the index of SDL entities.
The second chapter will be further divided into two sub chapters. Each chapter and sub chapter should have a chapter introduction text.
Action
- We would like to place the first chapter directly after the title page text symbol. Select the title page text symbol and bring up the Add New dialog.
- Set the document type to Organizer > Chapter 1, and the document name to State Matrices.
- When you close the dialog, the Text Editor will pop up. Type in an appropriate chapter introduction text (like the one below) and save the text file.
This chapter contains two state matrices for theSDL process: One with page numbers to the SDLprocess and one with nextstate information.We will produce the state matrices for this chapter in the next sub section. For now, we leave this chapter empty.
- We introduce a second chapter for the SDL system. Select the State Matrices chapter symbol and bring up the Add New dialog. Set the document type to Organizer > Chapter 1, and the document name to SDL system. When you close the dialog, the Text Editor will pop up. Type in an appropriate chapter introduction text (like the one below) and save the text file.
In this chapter, you will find the actual SDL system.- The SDL system chapter should have two sub chapters for the SDL process. To be able to begin a chapter between two pages in one SDL diagram, we must make page symbols visible in the Organizer. This is done in the View Options dialog by selecting Page symbols and pressing Apply and Close.
- The first sub chapter should begin where the process diagram begins. Select the process diagram symbol and bring up the Add New dialog. Set the diagram type to Organizer > Chapter 1.1, and the document name to First process page. When you close the dialog, the Text Editor will pop up. Type in an appropriate chapter introduction text (like the one below) and save the text file.
In this sub chapter, the first process page will be defined.- The second sub chapter should be placed between the two pages of the SDL process. Select the first process page symbol and bring up the Add New dialog. Set the diagram type to Organizer > Chapter 1.1, and the document name to Second process page. When you close the dialog, the Text Editor will pop up. Type in an appropriate chapter introduction text (like the one below) and save the text file.
In this sub chapter, the second process page will be defined.- Finally, we should have an appendix chapter for the index of SDL entities. This chapter should be placed last in the Organizer view. Select the last symbol in the Organizer and bring up the Add New dialog. Set the diagram type to Organizer > Chapter 1, and the document name to Appendix. When you close the dialog, the Text Editor pops up. Type in an appropriate chapter introduction text (like the one below) and save the text file.
The appendix contains an index of all SDL entities.State Matrices for the SDL Process
The Organizer can with the help of the Analyzer generate a state overview information file (*.ins). The file is placed in the target directory. The Text Editor can display this file as state matrices.
Action
- First, we should set the target directory to an appropriate directory where we can allow SDL Suite and TTCN Suite to create files. Bring up the Set Directories dialog and type in an appropriate target directory. When that is done, close the dialog.
- Select the SDL system diagram and invoke the state overview information file generation with Generate > State Overview. The Analyzer will check your SDL system and produce some files in the target directory. One of these files is the *.ins file.
- When the Analyzer is ready, the Text Editor will pop up, showing you the state matrices created from the information in the state overview file (*.ins). When you have examined the state matrices, exit the Text Editor.
- The plain text symbol connected to the *.ins file should be placed in the first chapter instead of in the same chapter as the SDL system. To move the plain text symbol for the *.ins file to the correct location, select the symbol and use the up quick button as many times as required to get the symbol into the first chapter.
An Index of SDL Entities
We would like an index of SDL entities defined in our SDL system last in the printout. The Organizer can with the help of the Analyzer produce a cross reference file. The Index Viewer can present the information in the cross reference file as an index. To keep the size of the index small, we filter out some SDL entities and we present the index in an as compact way as possible.
Action
- Make sure that the target directory is set to an appropriate directory where the Analyzer can create some files.
- Select the SDL system diagram symbol and press the Generate Index quick button. The Analyzer will check your SDL system and generate some files in the target directory. One of the files is named *.xrf and contains the cross reference information. The Index Viewer pops up when the Analyzer is ready, and presents the cross reference information as an index.
- If you examine the index, you will notice that there are a lot of SDL entities defined in package Predefined. Let us assume that we are not interested in these SDL entities. To get rid of them, we bring up the Filter Diagrams dialog and select package Predefined. When the dialog is closed, our Index will be much smaller.
- To get an even smaller index, bring up the Index Options dialog and set the index appearance to Compact.
- Now, the index is ready for printing. Since there is no symbol in the Organizer view for the cross reference file, we have to leave the Index Viewer window open until we have completed the print operation.
Performing the Print Operation
Now, everything is in place to do the actual print operation.
Action
- Make sure you have no selection in the Organizer. This can be done by clicking somewhere outside a symbol or text line. This is done to tell the Organizer that we want to print everything, and not just what we have selected.
- Bring up the Print dialog.
- Make sure that the following entries in the Contents area are selected:
- Bring up the Table of contents setup dialog with the picture button close to the Table of contents entry. In the setup dialog, make sure that both After initial text document and Only chapters in TOC are both selected. Close the setup dialog.
- Make sure that the header file check button is on.
- Make sure that the settings in the Destination area are appropriate.
- Click the Print button. We will get a printout, looking approximately as the figures below.
Using Advanced Print Facilities
In the previous section, we took an ordinary SDL system and made enhancements to get a nice printout. In this section, we will look at how we can make the enhancements as permanent as possible. We would like to be able to load a system file, invoke the print operation and get a nice printout without changing any print settings.
Let us take a new look at all the changes we have made, to see how we can make a future print operation as painless as possible.
A Permanent Title Page
Every time the print dialog is invoked, the Table of contents setup option After initial text document will be turned on. This means that the title page will show up as a title page in future print operations also. No extra actions necessary here.
Permanent Chapters and Sub Chapters
The chapter symbols should stay where they were initially placed. Due to implementation reasons, chapter symbols placed between SDL page symbols might be a little more volatile than they should be. The position of a chapter symbol is determined by remembering the name of the next SDL page symbol. If you rename that SDL page symbol, the chapter looses its hook and may end up in the wrong position.
The chapter options that you can set in the Chapter Options dialog are reset every time SDL Suite and TTCN Suite are restarted. This means that if you want the start chapter number to permanently be anything other than 1.1.1.1, or you want to hide sub chapters in the table of contents, then you have to check the Chapter Options settings before each print operation.
Permanent State Matrices
State matrix options are not saved together with the state overview file (*.ins), but they are saved in the system file (*.sdt) and in print selection files (*.sel).
The state overview file (*.ins) is generated in the target directory. You may regard the target directory as a temporary directory where files can be erased after an SDL Suite or TTCN Suite session has ended. It might be cumbersome to regenerate a state overview file each time you want to do a printout. In this situation, it might be a good idea to move the state overview file to the source directory, where your SDL diagram files resides. The file move is best done outside of SDL Suite, but in the Organizer view you have to reconnect the plain text symbol to the (moved) state overview file in the source directory.
A Permanent Index
Index options are not saved together with the cross reference file (*.xrf), but they are saved in the system file (*.sdt) and in print selection files (*.sel).
The cross reference file (*.xrf) is generated in the target directory. You may regard the target directory as a temporary directory where files can be erased after an SDL Suite or TTCN Suite session has ended. It might be cumbersome to regenerate a cross reference file each time you want to do a printout. In this situation, it might be a good idea to move the cross reference file to the source directory, where your SDL diagram files resides. The file move is best done outside of SDL Suite.
To get paper page references in the index, the index has to be printed from the Organizer together with the SDL system.
Performing a Permanent Print Operation
Every time the print dialog is invoked, the Table of contents setup option Only chapters in TOC will be set to off. This means that if you want only chapters in the table of contents, you have to turn this option on every time you want to print.
In a similar manner, every time SDL Suite and TTCN Suite is started, the Table of contents toggle button in the main print dialog is set to off. This means that every time you want to do a print, you have to check the Table of contents toggle button and turn it on, if it is off.
Print Selection Files and Print Selection Symbols
Most print, index and cross reference options are saved in the system file (*.sdt). This is often enough for most of your print needs. However, in some situations you might want to save more than one set of print settings: You want to easily switch...
This can be done by saving a couple of print selection files with different print settings, and reference these files with print selection symbols in the Organizer.
- To save print settings in a print selection file, bring up the Organizer print dialog, as you would for performing a normal print operation.
- Adjust the settings in the dialog to what you want printed, both by changing what diagrams to print and by changing how the print will be performed (paper format etc.).
- When all settings are correct, use the Save button to save the print selection file. In the dialog that appears, you can both decide the print selection file name to use, and if a print selection symbol should be created in the Organizer or not.
A print selection can be reused in several ways:
- Double-click the print selection symbol.
- Select the print selection symbol and invoke File > Print > Selected.
- Invoke File > Print > Selection File, and specify the print selection file in the dialog that appears.
In all these cases, the Organizer print dialog will appear, with settings according to the reused print selection file.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |