Formatting and displaying methods and blocks (print)

Synopsis

print id [filename]

Description

Methods and blocks may be displayed on the screen or saved to a file using the print command.

If the given object id is a block, then it will display all the rows of the block; whereas if the id is a method then it will display one plain course of the method.

Displaying rows

Using print without a filename will display the block or method on the screen. Trace lines on bells will not be generated; but instead the bells will have emphasis as determined by variable traceformat. For example:

CRE> print gs120

If the variable pagerows is set to on, then the rows are displayed using the system pager (e.g. less on macOS) as a single column with trace bells being displayed in bold overstrike. It is therefore useful on legacy VT100 terminals without scrolling.

Saving rows to a file

If a filename is supplied, then the output is written to that file. A variety of different formats are available, depending on the filename extension. For example:

CRE> print gs120 grandsire.html

The supported formats are:

Plain text (.txt). Output is similar to what is printed on the screen

HTML (.html). This uses scalable vector graphics to format the tracelines and may be opened in most modern web browsers (e.g. Chrome and Edge)

Comma separated value (.csv). This format is for importing into a spreadsheet with each bell occupying a single cell. No trace lines are produced

Postscript (.ps). Paged output is generated for postscript enabled printers

Encapsulated Postscript (.eps). All the output is placed within a single figure and is suitable for inclusion in a LaTeX document.

Portable Document Format (.pdf). PDF is for distribution in a printable format. Rendering of PDF's requires a third party utility Ghostscript

Portable Network Graphics (.png). PNG's are bitmap images that may be embedded in web pages or in Microsoft Office documents. Producing PNG's requires Ghostscript