If the system allows the use of a printer, stedi offers the
possibility of sending the file in the current buffer directly to the
printer in one of two modes. The P command line command prints
the current buffer just as it appears on the screen in the editor, and
the PF command sends the file to the printer with limited
formatting capabilities. The PP command sets the length of a page
for the latter. These commands are explained below. In addition a port
selection can be made if more than one printer port exists. This is done
with the `P=<port>' command.
- P
- Print the contents of the buffer. These contents are sent to the
printer just as they appear on the screen. Thus folds that are
closed are printed as closed folds and tabs are expanded to the
number of spaces they currently represent according to the editor's
settings. Otherwise all characters are sent as they are. The end of
a line is indicated by a carriage return + linefeed which will be
interpreted correctly by most printers. Otherwise all characters are
sent directly to the printer uninterpreted. Hence if the file
contains non-standard ASCII characters, these may have consequences
for the printer settings. (You may also put such characters in the
text deliberately for printer control - see the chapter on `Hex
mode' p. .)
- PF
- As with the P command, this command causes the contents of the
buffer to be printed, but with the added feature that a limited
number of lines per page are printed with a page number at the
bottom of each page and an optional left margin offset. The
length of a page and the left margin offset can be set with the
PP command. Note that the length of the page should include one
empty line and a line for the page number. After each page
number has been sent to the printer, the editor sends a formfeed
to skip to the next page.
- PPn1,n2
- This command sets the number of lines per page (n1) and
optionally it sets a left margin offset (n2). This latter number
causes the printer to create a left margin by printing that
number of spaces in each line before starting to print the
contents of the buffer. These two numbers are stored in the
default buffer so when the DW command is issued they are written
to the default file for future use. The number of lines per page
set by the PP command must be two more than the number of lines
of text actually desired to allow for a blank line before the
page number and then a line for the page number itself. As all
printers are not alike, some experimenting may be required in
order to find the best setting for a given printer. The default
number of lines per page is 60 and the default left margin
offset is set to zero. If the first number is less than five,
stedi sets the number of lines to five. If both numbers are
omitted entirely, the PP command causes a message to be printed
in the message bar telling the current number of lines per
printer page and the current left margin offset.
- P=
- On most computers this command won't have any effect.
Examples:
- PP66
- sets the number of lines per printer page to 66
- PP60,5
- sets the number of lines per printer page to 60, with a left
margin of 5 spaces.
- PP
- queries for the current number of printer pages and the right
margin offset.
Subsections