xref: /titanic_52/usr/src/cmd/troff/troff.d/README (revision 843e19887f64dde75055cf8842fc4db2171eff45)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27#ident	"%Z%%M%	%I%	%E% SMI"
28
29#
30# University Copyright- Copyright (c) 1982, 1986, 1988
31# The Regents of the University of California
32# All Rights Reserved
33#
34# University Acknowledgment- Portions of this document are derived from
35# software developed by the University of California, Berkeley, and its
36# contributors.
37#
38
39The troff in this directory
40is a troff that produces machine-independent output.
41It requires a file of descriptive information about
42the particular typesetter you have in mind, and produces
43output parameterized for that device.
44
45Thus:
46	troff -Taps ...
47produces output for the Autologic APS-5.
48(This is the default.)
49
50To make this work, you need two things.
51First, you need to create a set of
52device and font descriptions in the directory
53	/usr/doctools/font/devxxx
54where "xxx" is your device name.
55Currently supported device is
56	aps	Autologic APS-5 phototypesetter
57Source for this device is found in the subdirectory
58devaps of this directory.
59
60The file "DESC" contains information about the
61device itself and the character set.  (See devaps/DESC.)
62
63In addition, each font needs a file describing its
64characters, width and device-driving codes;
65see R and S for typical examples.
66
67The program "makedev" will convert these text
68descriptions into a binary form that the troff can
69slurp up in a single gulp during initialization;
70these wind up in DESC.out (which includes
71default font info) and XX.out for info about font XX.
72
73The second half of the job is to write a post-processor
74that converts the more or less machine-independent troff
75output into specific codes for your favorite typesetter.
76daps.c is the driver for the APS-5;
77it will serve as a useful prototype.  In particular,
78it contains a precise description of the output language.
79	ta	prints ascii on ordinary terminals (crudely)
80
81One can always simply run
82	troff
83and look at the output; it is guaranteed to be ascii text
84and thus safe to edit, grep, etc.
85(Since it is ascii, it is also guaranteed to be quite voluminous.)
86
87The recommended way to create the necessary files to make troff
88able to communicate with a new output device
89is to pick the most similar device for which this software
90already exists, and modify it to suit the new device.
91
92This release contains prototype software for one
93type of device -- a phototypesetter (devaps)
94The devaps subtree contains
95profusely-commented programs and strategically placed README
96files to help guide the experienced user in making
97modifications to these files.
98
99Two other source of information for users who wish to delve
100deeply into this software are the manual pages
101troff(5), which describes the output language produced by troff,
102and font(5), which describes the format of the device
103and font description files.
104
105-----------------------------------------------------------------------------
106
107Changes since the original release:
108
109January, 1985:
110
111Added optional 3rd argument to .fp command:
112	.fp 3 xx longishname
113causes font to be called xx but data is loaded
114from longishname.out instead of xx.out.
115The intent is to deal with the proliferation of fonts.
116
117Turned NBLIST up to 2048 so can handle really big
118diversions.  Tends to blow various systems.
119
120December 1984:
121
122Nroff modified to read ascii tables for various devices
123instead of the compiled C code nonsense.  Only a few
124tables converted;  details of language still subject to
125change.
126
127September 1984:
128
129Added Molly Wagner's code to prevent side effects
130during scanning of false branch of an if.
131
132Added test warning when one removes a macro during
133its execution (more precisely, warning when a macro
134evaluation has encountered a freed block).
135[Disabled Nov 84;  it seemed to cause troubles]
136
137NS = 128;  devname[] is bigger;  turned off the -t
138argument (it could be a synonym for -T but that's
139probably just as risky.)
140
141July, 1984:
142
143Added TYPESETTER environment variable
144
145Added \X'...' command:  ... comes out as
146	x X ...\n in proper place. (doesn't nest)
147
148In \D comands, unrecognized command letters are passed through
149untouched.  This makes it possible to define things like other
150splines, filled polygons, etc.
151
152\s(dd, \s(+dd, \s(-dd size commands.
153
154Added .lf line filename to set current line number & filename
155
156Added Dan Berry's fixes to handle horizontal resolution properly.
157
158New, March 1984:
159
160Dennis Ritchie's hashed macro and number register tables;
161cached width computations, general cleanup.
162Minor work on de-linting.
163
164New comments 9/16/83
165
166This version is the current evolution of 8th Edition troff.
167The only changes of substance since the export version are
168
169	the end of a sentence is more general; things like
170	." .!'' etc are recognized and padded
171
172	the "font too big for position n" error can no longer arise.
173	makedev has a new parameter called biggestfont that
174	ensures that all font positions are at least that big.
175	this eliminates the "font X too big for position Y" message
176
177	some minor bugs fixes have been made:
178		doesn't look for ligatures in \nf
179		doesn't put out WORDSP in -a
180
181	troff no longer produces \^ and \| on output,
182	but this hasn't been tested much since it takes
183	character set changes too.
184
185