From: utzoo!decvax!cca!rlb@Purdue@sri-unix Newsgroups: net.unix-wizards Title: Re: Alternate Troff Output Query Article-I.D.: sri-unix.4368 Posted: Wed Nov 24 04:01:23 1982 Received: Thu Nov 25 12:19:13 1982 From: Bob Brown Date: 22 Nov 1982 22:25:16-EST For all you old-troff hackers, I'm submitting the following manual page (we call it ptl.5, not "praise the lord"). It was written at Purdue-CS by Eric Dittert after he was forced to repair our versatec phototypesetter in order to complete his thesis. Pay particular attention to the "bugs" section. Bob Brown ------------------------------------------------------------------ .PU .TH PTL 5 .SH NAME ptl \- phototypesetter language; (\fItroff\fR output/\fIvcat\fR input) .SH DESCRIPTION Each byte of the \fItroff\fR output file is a command to the phototypesetter. The following is a summary of the phototypesetter instructions. .sp 1 .ft B \h'2n'Command_Byte \h'|0.5i+15n'Meaning .ft R .RS 0.5i .IP "000 :" 15n No-op. .IP "001-077 :" 15n Print an ASCII character. .br The character to be printed is determined by using the command_byte (if \fIcase\fR is currently LOWER) or command_byte+64 (if \fIcase\fR is currently UPPER) as an index into a table, the entries in which do not seem to be ordered in any describable way. .IP "0100 :" 15n Initialize. .br This includes setting the modes as follows: \fIcase\fR=LOWER, \fIhorizontal\fR=LEFT, \fIvertical\fR=DOWN, \fIfont\fR=0. It does not change \fIpointsize\fR. .IP "0101-0104 :" 15n Select font. .br The phototypesetter (and hence, \fIvcat\fR) can handle four fonts, numbered 0, 1, 2, and 3. Consider the current font number, \fIfont\fR, as a two-bit value. The command 0101 resets bit 0, 0102 sets bit 0, 0103 sets bit 1, and 0104 resets bit 1. (And yes, we have already sent this one in to Ripley.) .IP "0105 :" 15n Set \fIcase\fR to LOWER. .IP "0106 :" 15n Set \fIcase\fR to UPPER. .IP "0107 :" 15n Set \fIhorizontal\fR to LEFT. .IP "0110 :" 15n Set \fIhorizontal\fR to RIGHT. .IP "0111 :" 15n Halt. .IP "0112 :" 15n Set \fIvertical\fR to DOWN. .IP "0113 :" 15n Undefined (no-op). .IP "0114 :" 15n Set \fIvertical\fR to UP. .IP "0115 :" 15n Formfeed. .br (Added for the Versatec.) .IP "0116,0117 :" 15n Undefined (no-op). .IP "0120-0137 :" 15n Set point size. .br The new value of \fIpointsize\fR is command_byte - 0120. .IP "0140-0177 :" 15n Move vertically (lead). .br The number of units to move is 0177 - command_byte. The direction is determined by the current value of \fIvertical\fR. .IP "0200-0377 :" 15n Move horizontally (escape). .br The number of units to move is 0377 - command_byte. The direction is determined by the current value of \fIhorizontal\fR. .RE .sp 1 Notes: .RS .IP 1) 0.25i Being a single byte, each motion instruction can only specify a relatively small number of units to move (037(oct) = 31(dec) units vertically; 0177(oct) = 127(dec) units horizontally). Hence, it is not uncommon to see lengthy strings of similar motion commands in \fItroff\fR output. .IP 2) 0.25i The units for horizontal and vertical motion are \fItroff\fR basic units (432 units = 1 inch). .IP 3) 0.25i "Print character" instructions do not cause any horizontal or vertical motion. Therefore, the instructions for printing two adjacent characters are separated by a horizontal motion command. .IP 3) 0.25i There is no "new line" instruction; so, in order to avoid large numbers of horizontal motion commands, every other line of text is reversed. .IP 4) 0.25i The mode variables \fIcase\fR, \fIhorizontal\fR, \fIvertical\fR, \fIfont\fR, and \fIpointsize\fR appear in \fIvcat\fR as \fImcase\fR, \fIback\fR, \fIverd\fR, \fIrailmag\fR, and \fIcpsize\fR, respectively. .RS .SH SEE ALSO pti(1), troff(1), vpr(1) .SH BUGS If you are this deeply into the \fIvtroff\fR scene, you should be rewriting \fItroff\fR for the Versatec instead of wasting time reading manual pages.