COGENT provides facilities for printing complete projects, complete models, or any of a model's component boxes. A complete project can be printed by clicking on the Print button on the model's history window. A complete model can be printed by selecting Print from the File menu on the model's top-level window (i.e., its principal box/arrow editor window). Details of specific boxes can be printed in an analogous way, by selecting Print from the File menu on the main window associated with the box in question. The details of individual boxes can also be printed by selecting Print from the menu that appears when you right click over the desired box on a box/arrow editor. A variety of other parts of a model may also be printed (e.g., the output trace). Print buttons occur in a variety of contexts within COGENT, and all printouts are governed by the details given below.
Selecting Print opens a new dialogue box, which presents a number of options, and at the bottom of the box, two buttons which allow the user to either cancel the operation or go ahead with the printing. The printing dialog window is shown in figure 1:
The Print facility can be used to generate plain ASCII text files, nicely formatted PostScript files, or moderately well formatted HTML files. Which of these options is chosen, and the layout of the resultant printout is determined by the values specified in the print dialogue box. The dialogue items, their values, and the resulting behaviour, are as follows:
Print to file is a boolean option that, when checked, directs output to a file (rather than a printer). Click on the box following this option to switch its value between checked (indicated by a tick in the box) and unchecked. Make sure the box is not ticked if you want your output to go straight to your system's printer.
Print directory and Print file are only relevant when output is being saved in a file. The print file is the name of the file in which the output will be saved. The file will be stored in the print directory (whose value is inherited from the File Locations options panel). Note that you must be able to write files in the print directory for printing to work. Even if you are not printing to a file, this directory will be used for temporary working space and so must be writable. (To set or check this option, switch the category of the options window to File Locations.)
Printer command is only relevant when output is not being printed to a file. It is then used to control how the printer output is handled. Its value should be the name of the UNIX command to be used for printing. Typically this is lpr (on older BSD systems) or lp -c (on System V UNIX).
Printouts are actually written to a temporary file in the print directory. If Print to file is set, this file is then renamed to the value of Print file. Otherwise a system command is constructed by prefixing the temporary file name with the value of Printer command. Thus if Printer command is set to lp -c, the system command lp -c tmp.ps will be executed, causing the file to be printed via the lp command. If, on the other hand, Printer command is set to ghostview, the system command ghostview tmp.ps will be executed. If the output is in PostScript format this will cause the file to be previewed. The temporary file is deleted once the print operation is complete.
Output format controls whether HTML, PostScript or plain text output is generated. Some users may find PostScript files difficult to handle on their systems; in such cases it is possible to get a plain text printout. Other users may prefer HTML output, which can be viewed (and printed) by a Web Browser. Plain text may be useful for including in other documents. HTML may be useful for including in Web pages. In such the option is probably best used in conjunction with the Print to file? option checked.
Printer font size controls the point size of the font used in the PostScript printout. The default value (10) is relatively small, but helps conserve paper.
Print new box on new page controls page breaks (in PostScript output) between box details. When checked, COGENT starts a new output page for each box. By default this is unchecked (again to conserve paper).
Output page style controls whether the printout is generated in Portrait, Landscape or Two-up styles. When Two-up is selected, COGENT produces landscape style output (rather than portrait style output), with two pages printed side by side on each sheet of paper. This mode is again provided for those worried about unnecessary paper use.
Show initial contents governs inclusion of initial contents in the printout. If checked, the initial contents windows of all boxes are included in the printout.
Show current contents governs inclusion of current contents in the printout. If checked, the current contents windows of all boxes are included in the printout.
Show conditions governs how much detail is shown in the output of processes. If checked, all conditions are given in detail. If FALSE, just the rules are included.
Show messages governs inclusion of message logs in the printout. If checked, the message logs windows of all boxes are included in the printout.
Recurse through subobjects governs recursion through sub-boxes. When checked, and a compound box is being printed, all subboxes of the compound will be included in the printout. An entire project may be printed by selecting Print from the history window and checking this option.
The default options in the printing dialog can be set using the Print Options menu, which has a similar layout to the main print dialogue shown above.