Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ditroff(5) — NEWS-os 4.1C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ditroff(1)

xprev(1)

nftoif(1)

DITROFF(5)  —  NEWS-OS Programmer’s Manual

NAME

ditroff − Description of text formatting language

DESCRIPTION

ditroff is used to output text files using Shift-JIS character codes only, regardless of the output device.  It contains definitions for specifying aspects of how the output will appear on the page, such as the character positions, typesetting device, fonts and point sizes. The currently available commands are listed below.  In most cases, they consist of an ASCII character string containing a numeric value, designated as n.  Characters enclosed in square brackets [ ] are optional.  ditroff generates them, but they are not required under the specifications of the language. The character string \n indicates the standard line feed.  Any spaces between commands are ignored.  In this case, “spaces” refers to the space or new line characters.  All commands consisting a user-defined length numeric value or word must be followed by a space.  For example, the command for specifying the character point size, s###, must be followed by a space or a new line code. 
 

sn Specifies the character point size. 
 

fn Selects the font corresponding to the number specified.  The range of valid values is from 0 to the largest font number currently defined.  0 is a special position called by ditroff, it does not specified by the user.  Normally, the font numbers used start with 1. 
 

cx Generates the character x at the current page position.  The character x corresponds to a single Shift-JIS character. 
 

Cxyz Generates the special character xyz.  The name of the character must be delimited with a space, and must correspond to a special character valid for the typesetting device specified in the file DESC.out.  The typesetting device may impose limitations on the directories where this file may reside. 
 

Hn Changes the page’s horizontal position to the value specified.  Values are specified using the basic unit defined in the file DESC.out.  This is an absolute “goto” command. 
 

hn Adds the value specified to the current horizontal position.  This is a relative “goto” command. 
 

Vn Changes the page’s vertical position to the value specified.  (downward is positive.) 
 

vn Adds the value specified to the current vertical position. 
 

nnx Consists of a 2-digit number and an Shift-JIS character.  It is equivalent to a combination of the hn and cx commands.  The 2-digit numeric value is added to the current horizontal position and then the Shift-JIS character specified by x is generated.  This is the most commonly used character specification command. 
 

nb a Indicates the end of a line.  If the horizontal position is set to 0, nothing else needs to be done.  Before issuing the request to print characters, ditroff once again sets the x,y coordinates for the page.  The initial nummeric value b indicates the amount of blank space which will precede the line.  The next number, a, indicates the amount of blank space that comes after the line.  The b and a values are delimited with spaces. 
 

w Causes w to be output between each word of the input text.  This does not perform any operation.  It is included to facilitate easy emulation of other devices. 
 

pn Starts a new page.  The page number is specified as n.  The horizontal position of the page must be set to 0. 
 

{ Saves the current environment settings, point size and font specification. 
 

} Restores the stored environment settings. 
 

#.....\n Lines beginning with the character # are treated as comments. 
 

Dl x y\n Draws a line from the current position to the position defined by the coordinates x and y.  Immediately after the line is drawn the x, y position becomes the current position. 
 

Dc d\n Draws a circle of diameter d using the current position (x, y) as the left edge of the circle.  Immediately after the circle is drawn the right edge of the circle x+d, y becomes the current position. 
 

De dx dy\n
Draws an ellipse with the specified axes at the current position as the left edge of the ellipse. If dx is specified, the axis will be aligned with the x axis, if dy, with the y axis.  After the ellipse is drawn x+dx,y becomes the current position. 
 

Da x y r\n
Draws a arc of radius r from the current position to the x,y position in a counterclockwise direction.  After the arc is drawn x,y becomes the current position. 
 

D~ x y x y...\n
Draws a spline curve starting at the current position and passing through the points specified by the x,y coordinate pairs.  The ending position is the last x,y position.  At present, up to 36 points (x,y coordinate pairs) can be specified. 
 

x i[nit]\n Initializes the typesetting device. 
 

x T device\n
The name of the typesetting device. Identical to the argument for the −T option. 
 

x r[es] n h v\n
Indicates the resolution n of the typesetting device in increments per inch.  Movement in the horizontal direction can be specified in units of basic increment h.  And in the vertical direction can be specified in units of basic increment v. 
For example, the NWP-533/537/543/550 laser printers have a horizontal resolution of 400 increments per inch. Movement in either direction can therefore be specified in 1/400 inch units. The appropriate specification would be: x res 400 1 1.
 

x p[ause]\n
Pauses output. The current page becomes the last, but the typesetter is not released.
 

x s[top]\n Stops output. The current page becomes the last, and the typesetter is released. 
 

x t[railer]\n
Generates a trailer. This may not work on some devices.
 

x f[ont] n name\n
Loads the specified font name as number n. 
 

x H[eitht] n\n
Sets the character height to n points.  This makes it possible to enlarge or shrink the character size.  The character width is not affected. 
 

x S[lant] n\n
Applies n degrees of slant. 
 

FILES

/usr/sony/lib/font/devnwp533/DESC.out
font information file for NEWS printer
 

SEE ALSO

ditroff(1), xprev(1), nftoif(1)

NEWS-OSRelease 4.1C

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026