groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / src / devices / grodvi / grodvi.man
CommitLineData
92d0a6a6 1.ig
4d3e9548
JL
2Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2006, 2009
3 Free Software Foundation, Inc.
92d0a6a6
JR
4
5Permission is granted to make and distribute verbatim copies of
6this manual provided the copyright notice and this permission notice
7are preserved on all copies.
8
9Permission is granted to copy and distribute modified versions of this
10manual under the conditions for verbatim copying, provided that the
11entire resulting derived work is distributed under the terms of a
12permission notice identical to this one.
13
14Permission is granted to copy and distribute translations of this
15manual into another language, under the above conditions for modified
16versions, except that this permission notice may be included in
17translations approved by the Free Software Foundation instead of in
18the original English.
19..
20.
21.do nr grodvi_C \n[.C]
22.cp 0
23.
24.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
25.el .ds tx TeX
26.
27.\" Like TP, but if specified indent is more than half
28.\" the current line-length - indent, use the default indent.
29.de Tp
30. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
31. el .TP "\\$1"
32..
33.
34.de TQ
35. br
36. ns
37. TP \$1
38..
39.
40.de FT
41. if '\\*(.T'dvi' .ft \\$1
42..
43.
44.
45.TH GRODVI @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
46.SH NAME
47grodvi \- convert groff output to TeX dvi format
48.
49.
50.SH SYNOPSIS
51.B grodvi
52[
53.B \-dlv
54] [
55.BI \-F dir
56] [
57.BI \-p papersize
58] [
59.BI \-w n
60] [
61.IR files \|.\|.\|.\&
62]
63.PP
64It is possible to have whitespace between a command line option and its
65parameter.
66.
67.
68.SH DESCRIPTION
69.B grodvi
70is a driver for
71.B groff
72that produces \*(tx dvi format.
73.
74Normally it should be run by
75.BR groff\ \-Tdvi .
76.
77This will run
78.BR @g@troff\ \-Tdvi ;
79it will also input the macros in
80.BR @MACRODIR@/dvi.tmac .
81.
82.LP
83The dvi file generated by
84.B grodvi
85can be printed by any correctly-written dvi driver.
86.
87The troff drawing primitives are implemented
88using the tpic version\~2 specials.
89.
90If the driver does not support these, the
91.B \[rs]D
92commands will not produce any output.
93.
94.LP
95There is an additional drawing command available:
96.
97.TP
98.BI \[rs]D'R\ dh\ dv '
99Draw a rule (solid black rectangle), with one corner
100at the current position, and the diagonally opposite corner
101at the current position
102.RI +( dh , dv ).
103.
104Afterwards the current position will be at the opposite corner.
105.
106This produces a rule in the dvi file and so can be printed even with a
107driver that does not support the tpic specials unlike the other
108.B \[rs]D
109commands.
110.
111.LP
112The groff command
113.BI \[rs]X' anything '
114is translated into the same command in the dvi file as would be
115produced by
116.BI \[rs]special{ anything }
117in \*(tx;
118.I anything
119may not contain a newline.
120.
121.LP
122For inclusion of EPS image files,
465b256c 123.B \-Tdvi
92d0a6a6
JR
124loads
125.B pspic.tmac
126automatically, providing the
127.B PSPIC
128macro.
129.
130Please check
131.BR groff_tmac (@MAN5EXT@)
132for a detailed description.
133.
134.LP
135Font files for
136.B grodvi
137can be created from tfm files using
138.BR tfmtodit (@MAN1EXT@).
139.
140The font description file should contain the following
141additional commands:
142.
143.Tp \w'\fBinternalname'u+2n
144.BI internalname\ name
145The name of the tfm file (without the
146.B .tfm
147extension) is
148.IR name .
149.
150.TP
151.BI checksum\ n
152The checksum in the tfm file is
153.IR n .
154.
155.TP
156.BI designsize\ n
157The designsize in the tfm file is
158.IR n .
159.
160.LP
161These are automatically generated by
162.B tfmtodit.
163.
164.LP
165The default color for
166.B \[rs]m
167and
168.B \[rs]M
169is black.
170.
171Currently, the drawing color for
172.B \[rs]D
173commands is always black, and fill color values are translated to gray.
174.
175.LP
176In
177.B troff
178the
179.B \[rs]N
180escape sequence can be used to access characters by their position
181in the corresponding tfm file;
182all characters in the tfm file can be accessed this way.
183.
184.LP
185By design, the DVI format doesn't care about physical dimensions of the
186output medium.
187.
188Instead,
189.B grodvi
190emits the equivalent to \*(tx's
191.BI \[rs]special{papersize= width , length }
192on the first page;
193.B dvips
194(and possibly other DVI drivers) then sets the page size accordingly.
195.
196If either the page width or length is not positive, no papersize special
197is output.
198.
199.
200.SH OPTIONS
201.TP
202.B \-d
203Do not use tpic specials to implement drawing commands.
204.
205Horizontal and vertical lines will be implemented by rules.
206.
207Other drawing commands will be ignored.
208.
209.TP
210.BI \-F dir
211Prepend directory
212.IB dir /dev name
213to the search path for font and device description files;
214.I name
215is the name of the device, usually
216.BR dvi .
217.
218.TP
219.B \-l
220Specify landscape orientation.
221.
222.TP
223.BI \-p papersize
224Specify paper dimensions.
225.
226This overrides the
227.BR papersize ,
228.BR paperlength ,
229and
230.B paperwidth
231commands in the
232.B DESC
233file; it accepts the same arguments as the
234.B papersize
235command (see
236.BR groff_font (@MAN5EXT@)
237for details).
238.
239.TP
240.B \-v
241Print the version number.
242.
243.TP
244.BI \-w n
245Set the default line thickness to
246.I n
247thousandths of an em.
248If this option isn't specified, the line thickness defaults to 0.04\~em.
249.
250.
251.SH USAGE
252There are styles called
253.BR R ,
254.BR I ,
255.BR B ,
256and
257.B BI
258mounted at font positions 1 to\ 4.
259The fonts are grouped into families
260.B T
261and
262.B H\ \c
263having members in each of these styles:
264.
265.RS
266.TP
267.B TR
268.FT TR
269CM Roman (cmr10)
270.FT
271.
272.TQ
273.B TI
274.FT TI
275CM Text Italic (cmti10)
276.FT
277.
278.TQ
279.B TB
280.FT TB
281CM Bold Extended Roman (cmbx10)
282.FT
283.
284.TQ
285.B TBI
286.FT TBI
287CM Bold Extended Text Italic (cmbxti10)
288.FT
289.
290.TQ
291.B HR
292.FT HR
293CM Sans Serif (cmss10)
294.FT
295.
296.TQ
297.B HI
298.FT HI
299CM Slanted Sans Serif (cmssi10)
300.FT
301.
302.TQ
303.B HB
304.FT HB
305CM Sans Serif Bold Extended (cmssbx10)
306.FT
307.
308.TQ
309.B HBI
310.FT HBI
311CM Slanted Sans Serif Bold Extended (cmssbxo10)
312.FT
313.RE
314.
315.LP
316There are also the following fonts which are not members of a family:
317.
318.RS
319.TP
320.B CW
321CM Typewriter Text (cmtt10)
322.FT CW
323.FT
324.
325.TQ
326.B CWI
327CM Italic Typewriter Text (cmitt10)
328.FT CWI
329.FT
330.RE
331.
332.LP
333Special fonts are
334.B MI
335(cmmi10),
336.B S
337(cmsy10),
338.B EX
339(cmex10),
340.B SC
341(cmtex10, only for
342.BR CW ),
343and, perhaps surprisingly,
344.BR TR ,
345.BR TI ,
346and
347.BR CW ,
348due to the different font encodings of text fonts.
349.
350For italic fonts,
351.B CWI
352is used instead of
353.BR CW .
354.
355.LP
356Finally, the symbol fonts of the American Mathematical Society are available
357as special fonts
358.B SA
359(msam10) and
360.B SB
361(msbm10).
362.
363These two fonts are not mounted by default.
364.
365.LP
366Using the option
367.B \-mec
368(which loads the file
369.BR ec.tmac )
370provides the EC and TC fonts.
371.
372The design of the EC family is very similar to that of the CM fonts;
373additionally, they give a much better coverage of groff symbols.
374.
375Note that
376.B ec.tmac
377must be called before any language-specific files; it doesn't take care of
378hcode values.
379.
380.
4d3e9548
JL
381.SH ENVIRONMENT
382.TP
383.SM
384.B GROFF_FONT_PATH
385A list of directories in which to search for the
386.BI dev name
387directory in addition to the default ones.
388.
389See
390.BR @g@troff (@MAN1EXT@)
391and
392.BR \%groff_font (@MAN5EXT@)
393for more details.
394.
395.
92d0a6a6
JR
396.SH FILES
397.TP
398.B @FONTDIR@/devdvi/DESC
399Device description file.
400.
401.TP
402.BI @FONTDIR@/devdvi/ F
403Font description file for font
404.IR F .
405.
406.TP
407.B @MACRODIR@/dvi.tmac
408Macros for use with
409.BR grodvi .
410.
411.TP
412.B @MACRODIR@/ec.tmac
413Macros to switch to EC fonts.
414.
415.
416.SH BUGS
417Dvi files produced by
418.B grodvi
419use a different resolution (57816 units per inch) to those produced by
420\*(tx.
421.
422Incorrectly written drivers which assume the resolution used by \*(tx,
423rather than using the resolution specified in the dvi file will not
424work with
425.BR grodvi .
426.
427.LP
428When using the
429.B \-d
430option with boxed tables,
431vertical and horizontal lines can sometimes protrude by one pixel.
432.
433This is a consequence of the way \*(tx requires that the heights
434and widths of rules be rounded.
435.
436.
437.SH "SEE ALSO"
438.BR tfmtodit (@MAN1EXT@),
439.BR groff (@MAN1EXT@),
440.BR @g@troff (@MAN1EXT@),
441.BR groff_out (@MAN5EXT@),
442.BR groff_font (@MAN5EXT@),
443.BR groff_char (@MAN7EXT@),
444.BR groff_tmac (@MAN5EXT@)
445.
446.cp \n[grodvi_C]
447.
448.\" Local Variables:
449.\" mode: nroff
450.\" End: