summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2002-05-08 08:21:53 +0000
committerwlemb <wlemb>2002-05-08 08:21:53 +0000
commitbbf2e3c1ebf9ee6a8a0bde2aa812f29fe0f3029e (patch)
tree3d96ece03e1870d1b47ae6c5817c519c94c26948
parent9567f2f049316741759df55bd25b04ff40961dd9 (diff)
downloadgroff-bbf2e3c1ebf9ee6a8a0bde2aa812f29fe0f3029e.tar.gz
* src/roff/troff/node.cc (special_node::special_node): Use
env_definite_font(curenv) instead of curenv->get_font(). Otherwise \X''\% crashes, for example. * doc/groff.texinfo: Document \! and \? used at top-level. * src/preproc/pic/pic.man: Fix some keyword syntax. Other minor typographical fixes. * src/roff/groff/groff.man: Fix typos. * src/roff/groff/groff.man ([ShortOpt]): Renamed to... (ShortOpt[]): This to avoid problems with refer. * doc/pic.ms: Fix typo. Fix pic grammar description. * tmac/an-old.tmac (ne): Use de1, not de.
-rw-r--r--ChangeLog25
-rw-r--r--doc/groff.texinfo115
-rw-r--r--doc/pic.ms226
-rw-r--r--src/preproc/pic/pic.man134
-rw-r--r--src/roff/groff/groff.man44
-rw-r--r--src/roff/troff/node.cc2
-rw-r--r--tmac/an-old.tmac2
7 files changed, 361 insertions, 187 deletions
diff --git a/ChangeLog b/ChangeLog
index fa524761..8ebd7841 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2002-05-08 Werner LEMBERG <wl@gnu.org>
+
+ * src/roff/troff/node.cc (special_node::special_node): Use
+ env_definite_font(curenv) instead of curenv->get_font(). Otherwise
+ \X''\% crashes, for example.
+
+ * doc/groff.texinfo: Document \! and \? used at top-level.
+
+2002-05-06 Werner LEMBERG <wl@gnu.org>
+
+ * src/preproc/pic/pic.man: Fix some keyword syntax.
+ Other minor typographical fixes.
+
+ * src/roff/groff/groff.man: Fix typos.
+
+2002-05-04 Werner LEMBERG <wl@gnu.org>
+
+ * src/roff/groff/groff.man ([ShortOpt]): Renamed to...
+ (ShortOpt[]): This to avoid problems with refer.
+
+ * doc/pic.ms: Fix typo.
+ Fix pic grammar description.
+
+ * tmac/an-old.tmac (ne): Use de1, not de.
+
2002-05-03 Werner LEMBERG <wl@gnu.org>
* doc/groff.texinfo: Finished separation of glyphs and characters.
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 2d9a9242..b28ef4b5 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -644,7 +644,7 @@ page control
font and glyph size control
@item
-vertical spacing (i.e.@: double spacing)
+vertical spacing (i.e.@: double-spacing)
@item
line length and indenting
@@ -1510,11 +1510,13 @@ hyphens out and join a word back together. Also, words such as
can occur where not wanted, such as ``@w{mother- in}-law''.
@end itemize
-@cindex double spacing (@code{ls})
+@cindex double-spacing (@code{ls})
@cindex spacing
-@code{gtroff} double spaces output text automatically if you use the
-request @w{@samp{.ls 2}}. Reactivate single spaced mode by typing
-@w{@samp{.ls 1}}.
+@code{gtroff} double-spaces output text automatically if you use the
+request @w{@samp{.ls 2}}. Reactivate single-spaced mode by typing
+@w{@samp{.ls 1}}.@footnote{If you need finer granularity of the
+vertical space, use the @code{pvs} request (@pxref{Changing Type
+Sizes}).}
A number of requests allow to change the way the output looks,
sometimes called the @dfn{layout} of the output page. Most of these
@@ -1640,7 +1642,9 @@ A variation of this is a bulleted list.
@Example
. Bulleted lists start with a bullet. It is possible
- to use other glyphs instead of the bullet.
+ to use other glyphs instead of the bullet. In nroff
+ mode using the ASCII character set for output, a dot
+ is used instead of a real bullet.
@endExample
@@ -1660,11 +1664,15 @@ supply macros for starting chapters and appendices.
@node Headers and Footers, Page Layout Adjustment, Sections and Chapters, Common Features
@subsection Headers and Footers
-Every macro package gives some way to manipulate the headers and footers
-(or @dfn{titles}) on each page. Some packages allow for different ones
-on the even and odd pages (for material printed in a book form).
+Every macro package gives some way to manipulate the @dfn{headers} and
+@dfn{footers} (also called @dfn{titles}) on each page. This is text
+put at the top and bottom of each page, respectively, which contain
+data like the current page number, the current chapter title, and so
+on. Its appearance is not affected by the running text. Some packages
+allow for different ones on the even and odd pages (for material printed
+in a book form).
-The titles are called three-part titles, that is, there is a
+The titles are called @dfn{three-part titles}, that is, there is a
left-justified part, a centered part, and a right-justified part. An
automatically generated page number may be put in any of these fields
with the @samp{%} character (see @ref{Page Layout}, for more details).
@@ -1683,9 +1691,9 @@ other details about the appearance of the printed pages.
@subsection Displays
@cindex displays
-Displays are sections of text to be set off from the body of the paper.
-Major quotes, tables, and figures are types of displays, as are all the
-examples used in this document.
+@dfn{Displays} are sections of text to be set off from the body of
+the paper. Major quotes, tables, and figures are types of displays, as
+are all the examples used in this document.
@cindex quotes, major
@cindex major quotes
@@ -1693,7 +1701,7 @@ examples used in this document.
are set in from the rest of the text without quote marks around them.
@cindex list
-A @dfn{list} is an indented, single spaced, unfilled display. Lists
+A @dfn{list} is an indented, single-spaced, unfilled display. Lists
should be used when the material to be printed should not be filled and
justified like normal text, such as columns of figures or the examples
used in this paper.
@@ -1706,7 +1714,7 @@ not.
@cindex keep, floating
@cindex floating keep
-Floating keeps move relative to the text. Hence, they are good for
+@dfn{Floating keeps} move relative to the text. Hence, they are good for
things which are referred to by name, such as ``See figure@w{ }3''. A
floating keep appears at the bottom of the current page if it fits;
otherwise, it appears at the top of the next page. Meanwhile, the
@@ -1756,6 +1764,10 @@ While some macro packages use the term @dfn{index}, none actually
provide that functionality. The facilities they call indices are
actually more appropriate for tables of contents.
+@pindex makeindex
+To produce a real index in a document, external tools like the
+@code{makeindex} program are necessary.
+
@c ---------------------------------------------------------------------
@node Paper Formats, Multiple Columns, Indices, Common Features
@@ -1797,12 +1809,12 @@ various special characters.
@node Preprocessor Support, Configuration and Customization, Predefined Strings, Common Features
@subsection Preprocessor Support
-All macro packages provide support for the various preprocessors and may
+All macro packages provide support for various preprocessors and may
extend their functionality.
For example, all macro packages mark tables (which are processed with
-@code{gtbl}) by placing them between @code{.TS} and @code{.TE} macros.
-The @file{ms} macro package has an option, @code{.TS@w{}H}, that prints
+@code{gtbl}) by placing them between @code{TS} and @code{TE} macros.
+The @file{ms} macro package has an option, @samp{.TS@w{ }H}, that prints
a caption at the top of a new page (when the table is too long to fit on
a single page).
@@ -1879,12 +1891,14 @@ It is possible to use @samp{-man} instead of @w{@samp{-m man}}.
@table @code
@item -rLL=@var{length}
-Set line length to @var{length}. If not specified, the line lenght
-defaults to 78@dmn{n} in nroff mode and 6.5@dmn{i} otherwise.
+Set line length to @var{length}. If not specified, the line length
+defaults to 78@w{ }en in nroff mode (this is 78@w{ }characters per
+line) and 6.5@w{ }inch otherwise.
@item -rLT=@var{length}
-Set title length to @var{length}. If not specified, the title lenght
-defaults to 78@dmn{n} in nroff mode and 6.5@dmn{i} otherwise.
+Set title length to @var{length}. If not specified, the title length
+defaults to 78@w{ }en in nroff mode (this is 78@w{ }characters per
+line) and 6.5@w{ }inch otherwise.
@item -rcR=1
This option (the default if a TTY output device is used) creates a
@@ -1925,7 +1939,7 @@ further customization, put additional macros and requests into the file
@file{man.local} which is loaded immediately after the @file{man}
package.
-@Defmac {TH, title section [@Var{extra1}] [@Var{extra2}] [@Var{extra3}], man}
+@Defmac {TH, title section [@Var{extra1} [@Var{extra2} [@Var{extra3}]]], man}
Set the title of the man page to @var{title} and the section to
@var{section}, which must have a value between 1 and@w{ }8. The value
of @var{section} may also have a string appended, e.g.@: @samp{.pm},
@@ -1988,11 +2002,12 @@ default font settings.
These macros are mutual aliases. Any of them causes a line break at
the current position, followed by a vertical space downwards by the
amount specified by the @code{PD} macro. The font size and shape are
-reset to the default value (10@dmn{pt} roman). Finally, the current
-left margin is restored.
+reset to the default value (10@dmn{pt} roman if no @option{-rS} option
+is given on the command line). Finally, the current left margin is
+restored.
@endDefmac
-@Defmac {IP, [@Var{designator}] [@Var{nnn}], man}
+@Defmac {IP, [@Var{designator} [@Var{nnn}]], man}
Set up an indented paragraph, using @var{designator} as a tag to mark
its beginning. The indentation is set to @var{nnn} if that argument
is supplied (default unit is @samp{n}), otherwise the default
@@ -2003,7 +2018,7 @@ designator, use @samp{""} (two double quotes) as the first argument of
@code{IP}.
For example, to start a paragraph with bullets as the designator and
-4@dmn{en} indentation, write
+4@w{ }en indentation, write
@Example
.IP \(bu 4
@@ -2054,6 +2069,8 @@ vertical space.
@cindex @code{man} macros, how to set fonts
The standard font is roman; the default text size is 10@w{ }point.
+If command line option @option{-rS=@var{n}} is given, use
+@var{n}@dmn{pt} as the default text size.
@Defmac {SM, [@Var{text}], man}
Set the text on the same line or the text on the next line in a font
@@ -2120,15 +2137,15 @@ macro is called, then the text of the next line appears in italic.
@pindex grohtml
@cindex @code{man} macros, default indentation
@cindex default indentation [@code{man}]
-The default indentation is 7.2@dmn{n} for all output devices except for
+The default indentation is 7.2@w{ }en for all output devices except for
@code{grohtml} which ignores indentation.
@Defmac {DT, , man}
@cindex tab stops [@code{man}]
@cindex @code{man} macros, tab stops
-Set tabs every 0.5@w{ }inches. Since this macro is always called
-during a @code{TH} request, it makes sense to call it only if the tab
-positions have been changed.
+Set tabs every 0.5@w{ }inches. Since this macro is always executed
+during a call to the @code{TH} macro, it makes sense to call it only if
+the tab positions have been changed.
@endDefmac
@Defmac {PD, [@Var{nnn}], man}
@@ -4378,6 +4395,16 @@ expect an identifier as a parameter. For example, @samp{\[foo]]}
accesses the glyph @samp{foo}, followed by @samp{]}, whereas
@samp{\C'foo]'} really asks for glyph @samp{foo]}.
+@cindex @code{refer}, and macro names starting with @code{[} or @code{]}
+@cindex @code{[}, macro names starting with, and @code{refer}
+@cindex @code{]}, macro names starting with, and @code{refer}
+@cindex macro names, starting with @code{[} or @code{]}, and @code{refer}
+To avoid problems with the @code{refer} preprocessor, macro names
+should not start with @samp{[} or @samp{]}. Due to backwards
+compatibility, everything after @samp{.[} and @samp{.]} is handled as
+a special argument to @code{refer}. For example, @samp{.[foo} makes
+@code{refer} to start a reference, using @samp{foo} as a parameter.
+
@Defesc {\\A, ', ident, '}
Test whether an identifier @var{ident} is valid in @code{gtroff}. It
expands to the character@w{ }1 or@w{ }0 according to whether its
@@ -6105,7 +6132,7 @@ request causes a line break. The default scaling indicator is @samp{v}.
@DefreqList {ls, [@Var{nnn}]}
@DefregListEnd {.L}
-@cindex double spacing (@code{ls})
+@cindex double-spacing (@code{ls})
Output @w{@var{nnn}@minus{}1} blank lines after each line of text.
With no argument, @code{gtroff} uses the previous value before the
last @code{ls} call.
@@ -6113,7 +6140,7 @@ last @code{ls} call.
@Example
.ls 2 \" This causes double-spaced output
.ls 3 \" This causes triple-spaced output
-.ls \" Again double spaced
+.ls \" Again double-spaced
@endExample
The line spacing is associated with the current environment
@@ -8758,11 +8785,11 @@ using a positive value. This is vertical space which will be added once
after the current line has been output.
@end itemize
-@cindex double spacing (@code{vs}, @code{pvs})
+@cindex double-spacing (@code{vs}, @code{pvs})
It is usually better to use @code{vs} or @code{pvs} instead of @code{ls}
to produce double-spaced documents: @code{vs} and @code{pvs} have a finer
granularity for the inserted vertical space compared to @code{ls};
-furthermore, certain preprocessors assume single spacing.
+furthermore, certain preprocessors assume single-spacing.
@xref{Manipulating Spacing}, for more details on the @code{\x} escape
and the @code{ls} request.
@@ -9352,8 +9379,8 @@ Use the @code{ie} and @code{el} requests to write an if-then-else.
The first request is the `if' part and the latter is the `else' part.
@Example
-.ie n .ls 2 \" double spacing in nroff
-.el .ls 1 \" single spacing in troff
+.ie n .ls 2 \" double-spacing in nroff
+.el .ls 1 \" single-spacing in troff
@endExample
@endDefreq
@@ -10835,6 +10862,20 @@ prints@w{ }4.
@endExample
Both escapes read the data in copy mode.
+
+@cindex @code{\!}, in top-level diversion
+@cindex top-level diversion, and @code{\!}
+@cindex diversion, top-level, and @code{\!}
+If @code{\!} is used in the top-level diversion, its argument is
+directly embedded into the @code{gtroff} intermediate output. This can
+be used for example to control a postprocessor which processes the data
+before it is sent to the device driver.
+
+@cindex @code{\?}, in top-level diversion
+@cindex top-level diversion, and @code{\?}
+@cindex diversion, top-level, and @code{\?}
+The @code{\?} escape used in the top-level diversion produces no output
+at all; its argument is simply ignored.
@endDefesc
@Defreq {asciify, div}
diff --git a/doc/pic.ms b/doc/pic.ms
index ab2b01ce..71f9e44c 100644
--- a/doc/pic.ms
+++ b/doc/pic.ms
@@ -10,7 +10,7 @@
.\" This document was written for free use and redistribution by
.\" Eric S. Raymond <esr@thyrsus.com> in August 1995.
.\"
-.\" $Id: pic.ms,v 1.12 2002/02/09 14:37:03 wlemb Exp $
+.\" $Id: pic.ms,v 1.13 2002/05/08 08:21:54 wlemb Exp $
.\"
.\" Set a proper TeX
.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
@@ -820,7 +820,7 @@ More generally, objects of a given type are implicitly numbered
current picture with \fB3rd ellipse\fP, or to the first box as \fB1st
box\fP, or to the fifth line as \fB5th line\fP.
.PP
-Objects are also numbered backwards by type from the last one of
+Objects are also numbered backwards by type from the last one.
You can say \fB2nd last box\fP to get the second-to-last box, or
\fB3rd last ellipse\fP to get the third-to-last box.
.PP
@@ -1230,7 +1230,7 @@ compass([junction()]);
To refer to one of the composite's attachment points, you can say
(for example) \fBA .s\fP. For purposes of object naming, composites
are a class. You could write \fBlast [] .s\fP as an equivalent
-refrence, usable anywhere a location is needed. This construction is
+reference, usable anywhere a location is needed. This construction is
very important for putting together large, multi-part diagrams.
.PP
Blocks are also a variable-scoping mechanism, like a \fIgroff\fP(1)
@@ -1435,7 +1435,7 @@ As an example of macro use, consider the following:
.DS
.CW
\&.PS
-# Plot a single jumper in a $1 by $2 box, $3 is the on-off state
+# Plot a single jumper in a box, $1 is the on-off state.
define jumper { [
shrinkfactor = 0.8;
Outer: box invis wid 0.5 ht 1;
@@ -1448,7 +1448,7 @@ define jumper { [
box fill ($1) with .n at center of Outer;
] }
-# Plot a block of six jumpers
+# Plot a block of six jumpers.
define jumperblock {
jumper($1);
jumper($2);
@@ -1467,7 +1467,7 @@ define jumperblock {
{"Jumpers in state $1$2$3$4$5$6" at last box .s + (0, -0.2);}
}
-# Sample macro invocations
+# Sample macro invocations.
jumperblock(1,1,0,0,1,0);
move;
jumperblock(1,0,1,0,1,1);
@@ -2162,9 +2162,10 @@ surrounded with single quotes.
The top-level \fBpic\fP object is a picture.
.DS
.CW
-<picture> ::= .PS [width [height]]\en
- <statement> ...
- .PE \en
+<picture> ::=
+ .PS [width [height]]\en
+ <statement> ...
+ .PE \en
.R
.DE
.LP
@@ -2185,23 +2186,25 @@ normally supplied by the post-processor.
.DS
.CW
-<statement> ::= <command> ;
- <command> \en
+<statement> ::=
+ <command> ;
+ <command> \en
-<command> ::= <primitive> <modifier>...
- <label> : <command>
- <label> : <position>
- <variable> = <expr>
- <direction>
- { <command> ... }
- '[' <command> ... ']'
- for <var> = <expr> to <expr> [by <expr>] do { <command> ... }
- if <expr> then { <command> ... } [else { <command> ... }]
- copy <filename> [until <word>]
- copy <filename> thru <macroname> [until <word>]
- sh <balanced-text>
- print <print-item>
- reset [ <variable> ... ]
+<command> ::=
+ <primitive> <modifier>...
+ <label> : <command>
+ <label> : <position>
+ <variable> = <expr>
+ <direction>
+ { <command> ... }
+ '[' <command> ... ']'
+ for <var> = <expr> to <expr> [by <expr>] do { <command> ... }
+ if <expr> then { <command> ... } [else { <command> ... }]
+ copy <filename> [until <word>]
+ copy <filename> thru <macroname> [until <word>]
+ sh <balanced-text>
+ print <print-item>
+ reset [ <variable> ... ]
.R
.DE
.LP
@@ -2217,45 +2220,48 @@ current position becomes the exit position for the current direction
on the block's bounding box.
.DS
.CW
-<primitive> ::= box \fR# Closed object -- rectangle\fP
- circle \fR# Closed object -- circle\fP
- ellipse \fR# Closed object -- ellipse\fP
- arc \fR# Open object -- quarter-circle\fP
- line \fR# Open object -- line\fP
- arrow \fR# Open object -- line with arrowhead\fP
- spline \fR# Open object -- spline curve\fP
- move
- <text> <text> ... \fR# Text within invisible box\fP
+<primitive> ::=
+ box \fR# Closed object -- rectangle\fP
+ circle \fR# Closed object -- circle\fP
+ ellipse \fR# Closed object -- ellipse\fP
+ arc \fR# Open object -- quarter-circle\fP
+ line \fR# Open object -- line\fP
+ arrow \fR# Open object -- line with arrowhead\fP
+ spline \fR# Open object -- spline curve\fP
+ move
+ <text> <text> ... \fR# Text within invisible box\fP
-<attribute> ::= h[eigh]t <expr> \fR# Set height of closed figure \fP
- wid[th] <expr> \fR# Set width of closed figure \fP
- rad[ius] <expr> \fR# Set radius of circle/arc \fP
- diam[eter] <expr> \fR# Set diameter of circle/arc \fP
- up [ <expr> ] \fR# Move up \fP
- down [ <expr> ] \fR# Move down \fP
- left [ <expr> ] \fR# Move left \fP
- right [ <expr> ] \fR# Move right \fP
- from <position> \fR# Set from position of open figure\fP
- to <position> \fR# Set to position of open figure\fP
- at <position> \fR# Set center of open figure\fP
- with <corner> \fR# Fix corner at specified location\fP
- by <expr> <expr> \fR# Set object's attachment point\fP
- then \fR# Sequential segment composition\fP
- dotted [ <expr> ] \fR# Set dotted line style\fP
- dashed [ <expr> ] \fR# Set dashed line style\fP
- chop [ <expr> ] \fR# Chop end(s) of segment\fP
- -> \fR# Decorate with "to" arrow\fP
- <- \fR# Decorate with "from" arrow\fP
- <-> \fR# Decorate with both arrows\fP
- invis \fR# Make primitive invisible\fP
- solid \fR# Make closed figure solid\fP
- fill <expr> \fR# Set fill density for figure\fP
- colo[u]r[ed] <word> \fR# Set fill and outline color for figure\fP
- outline[d] <word> \fR# Set outline color for figure\fP
- shaded <word> \fR# Set fill color for figure\fP
- same \fR# Copy size of previous object\fP
- <text> <text> ... \fR# Text within object\fP
- <expr> \fR# Motion in the current direction\fR
+<attribute> ::=
+ h[eigh]t <expr> \fR# Set height of closed figure \fP
+ wid[th] <expr> \fR# Set width of closed figure \fP
+ rad[ius] <expr> \fR# Set radius of circle/arc \fP
+ diam[eter] <expr> \fR# Set diameter of circle/arc \fP
+ up [ <expr> ] \fR# Move up \fP
+ down [ <expr> ] \fR# Move down \fP
+ left [ <expr> ] \fR# Move left \fP
+ right [ <expr> ] \fR# Move right \fP
+ from <position> \fR# Set from position of open figure\fP
+ to <position> \fR# Set to position of open figure\fP
+ at <position> \fR# Set center of open figure\fP
+ with <corner> \fR# Fix corner at specified location\fP
+ by <expr> <expr> \fR# Set object's attachment point\fP
+ then \fR# Sequential segment composition\fP
+ dotted [ <expr> ] \fR# Set dotted line style\fP
+ dashed [ <expr> ] \fR# Set dashed line style\fP
+ chop [ <expr> ] \fR# Chop end(s) of segment\fP
+ -> \fR# Decorate with "to" arrow\fP
+ <- \fR# Decorate with "from" arrow\fP
+ <-> \fR# Decorate with both arrows\fP
+ invis[ible] \fR# Make primitive invisible\fP
+ solid \fR# Make closed figure solid\fP
+ fill <expr> \fR# Set fill density for figure\fP
+ colo[u]r[ed] <word> \fR# Set fill and outline color for figure\fP
+ outline[d] <word> \fR# Set outline color for figure\fP
+ shaded <word> \fR# Set fill color for figure\fP
+ thick[ness] <expr> \fR# Set thickness for figure\fP
+ same \fR# Copy size of previous object\fP
+ <text> <text> ... \fR# Text within object\fP
+ <expr> \fR# Motion in the current direction\fR
.R
.DE
.LP
@@ -2273,10 +2279,12 @@ the Kernighan paper, and should probably be considered unreliable.
The primitive \fBarrow\fR is a synonym for \fBline ->\fR.
.DS
.CW
-<text> ::= <string> [ <placement> ... ]
- sprintf("format", <expr> ...) [ <placement> ... ]
+<text> ::=
+ <string> [ <placement> ... ]
+ sprintf("format", <expr> ...) [ <placement> ... ]
-<placement> ::= center | ljust | rjust | above | below
+<placement> ::=
+ center | ljust | rjust | above | below
.R
.DE
.LP
@@ -2294,25 +2302,29 @@ A position is an (x, y) coordinate pair. There are lots of different
ways to specify positions:
.DS
.CW
-<position> ::= <expr> , <expr>
- <place> {+-} <expr> , <expr>
- <place> {+-} ( <expr> , <expr> )
- ( <position> , <position> )
- <expr> [of the way] between <position> and <position>
- <expr> '<' <position> , <position> '>'
- ( <position> )
+<position> ::=
+ <expr> , <expr>
+ <place> {+-} <expr> , <expr>
+ <place> {+-} ( <expr> , <expr> )
+ ( <position> , <position> )
+ <expr> [of the way] between <position> and <position>
+ <expr> '<' <position> , <position> '>'
+ ( <position> )
-<place> ::= <label> [ <dot-corner> ]
- <corner> of <label>
- [0|1|2|3|4|5|6|7|8|9]th [last] <primitive> <dot-corner>
- <expr>'th [last]<primitive> <dot-corner>
- <corner> of [0|1|2|3|4|5|6|7|8|9]th [last] <primitive>
- <corner> of <expr>'th [last] <primitive>
- Here
+<place> ::=
+ <label> [ <dot-corner> ]
+ <corner> of <label>
+ [0|1|2|3|4|5|6|7|8|9]th [last] <primitive> <dot-corner>
+ <expr>'th [last]<primitive> <dot-corner>
+ <corner> of [0|1|2|3|4|5|6|7|8|9]th [last] <primitive>
+ <corner> of <expr>'th [last] <primitive>
+ Here
-<dot-corner> ::= .n | .e | .w | .s | .ne | .nw | .se | .sw | .c | .start | .end
+<dot-corner> ::=
+ .n | .e | .w | .s | .ne | .nw | .se | .sw | .c | .start | .end
-<corner> ::= top | bot | left | right | start | end
+<corner> ::=
+ top | bot | left | right | start | end
.R
.DE
.LP
@@ -2369,31 +2381,33 @@ default to inches. Expressions have the following simple grammar,
with semantics very similar to C expressions:
.DS
.CW
-<expr> ::= <expr> <op> <expr>
- ! <expr>
- ( <expr> )
- - <expr>
- <variable>
- <number>
- <place> .x
- <place> .y
- <place> .ht
- <place> .wid
- <place> .rad
- sin(<expr>)
- cos(<expr>)
- log(<expr>)
- exp(<expr>)
- sqrt(<expr>)
- max(<expr>, <expr>...)
- atan2(<expr>, <expr>)
- min(<expr>, <expr>...)
- int(<expr>)
- rand()
+<expr> ::=
+ <expr> <op> <expr>
+ ! <expr>
+ ( <expr> )
+ - <expr>
+ <variable>
+ <number>
+ <place> .x
+ <place> .y
+ <place> .ht
+ <place> .wid
+ <place> .rad
+ sin(<expr>)
+ cos(<expr>)
+ atan2(<expr>, <expr>)
+ log(<expr>)
+ exp(<expr>)
+ sqrt(<expr>)
+ min(<expr>, <expr>...)
+ max(<expr>, <expr>...)
+ int(<expr>)
+ rand()
-<op> := + | - | * | / | % | ^ |
- != | == | '<' | '>' | >= | <= |
- '||' | &&
+<op> :=
+ + | - | * | / | % | ^ |
+ != | == | '<' | '>' | >= | <= |
+ '||' | &&
.R
.DE
.LP
diff --git a/src/preproc/pic/pic.man b/src/preproc/pic/pic.man
index fd17cd5f..2add8cb5 100644
--- a/src/preproc/pic/pic.man
+++ b/src/preproc/pic/pic.man
@@ -16,23 +16,36 @@ versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.
..
+.
+.
.\" Like TP, but if specified indent is more than half
.\" the current line-length - indent, use the default indent.
.de Tp
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
.el .TP "\\$1"
..
+.
.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
-.el .ds tx TeX
+.el .ds tx TeX
+.
.ie \n(.g .ds ic \/
-.el .ds ic \^
+.el .ds ic \^
+.
.\" The BSD man macros can't handle " in arguments to font change macros,
.\" so use \(ts instead of ".
.tr \(ts"
+.
+.
.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
+.
+.
.SH NAME
+.
@g@pic \- compile pictures for troff or TeX
+.
+.
.SH SYNOPSIS
+.
.B @g@pic
[
.B \-nvCSU
@@ -51,7 +64,10 @@ the original English.
.I filename
\&.\|.\|.
]
+.
+.
.SH DESCRIPTION
+.
This manual page describes the GNU version of
.BR pic ,
which is part of the groff document formatting system.
@@ -80,7 +96,10 @@ When the macro package being used does not supply such definitions
appropriate definitions can be obtained with
.BR \-mpic :
these will center each picture.
+.
+.
.SH OPTIONS
+.
Options that do not take arguments may be grouped behind a single
.BR \- .
The special option
@@ -89,6 +108,7 @@ can be used to mark the end of the options.
A filename of
.B \-
refers to the standard input.
+.
.TP
.B \-C
Recognize
@@ -96,6 +116,7 @@ Recognize
and
.B .PE
even when followed by a character other than space or newline.
+.
.TP
.B \-S
Safer mode; do not execute
@@ -103,10 +124,12 @@ Safer mode; do not execute
commands.
This can be useful when operating on untrustworthy input.
(enabled by default)
+.
.TP
.B \-U
Unsafe mode; revert the default option
.BR \-S .
+.
.TP
.B \-n
Don't use the groff extensions to the troff drawing commands.
@@ -119,9 +142,11 @@ The
option also causes
.B pic
not to use zero-length lines to draw dots in troff mode.
+.
.TP
.B \-t
\*(tx mode.
+.
.TP
.B \-c
Be more compatible with
@@ -151,21 +176,26 @@ specified by use of the
attribute or by setting the
.B linethick
variable.
+.
.TP
.B \-v
Print the version number.
+.
.TP
.B \-z
In \*(tx mode draw dots using zero-length lines.
+.
.LP
The following options supported by other versions of
.B pic
are ignored:
+.
.TP
.B \-D
Draw all lines using the \eD escape sequence.
.B pic
always does this.
+.
.TP
.BI \-T \ dev
Generate output for the
@@ -177,15 +207,19 @@ This is unnecessary because the
output generated by
.B pic
is device-independent.
+.
+.
.SH USAGE
+.
This section describes only the differences between GNU
.B pic
and the original version of
.BR pic .
Many of these differences also apply to newer versions of Unix
.BR pic .
+.
.SS \*(tx mode
-.LP
+.
\*(tx mode is enabled by the
.B \-t
option.
@@ -225,7 +259,9 @@ change the value of
.BR \ebaselineskip .
Anything else may well produce undesirable results; use at your own risk.
Lines beginning with a period are not given any special treatment.
+.
.SS Commands
+.
.TP
\fBfor\fR \fIvariable\fR \fB=\fR \fIexpr1\fR \fBto\fR \fIexpr2\fR \
[\fBby\fR [\fB*\fR]\fIexpr3\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR
@@ -259,6 +295,7 @@ will instead be multiplied by
.I X
can be any character not occurring in
.IR body .
+.
.TP
\fBif\fR \fIexpr\fR \fBthen\fR \fIX\fR \fIif-true\fR \fIX\fR \
[\fBelse\fR \fIY\fR \fIif-false\fR \fIY\fR]
@@ -274,6 +311,7 @@ can be any character not occurring in
.I Y
can be any character not occurring in
.IR if-false .
+.
.TP
\fBprint\fR \fIarg\fR\|.\|.\|.
Concatenate the arguments and print as a line on stderr.
@@ -281,18 +319,20 @@ Each
.I arg
must be an expression, a position, or text.
This is useful for debugging.
+.
.TP
\fBcommand\fR \fIarg\fR\|.\|.\|.
Concatenate the arguments
-and pass them through as a line to troff or\*(tx.
+and pass them through as a line to troff or \*(tx.
Each
.I arg
must be an expression, a position, or text.
This has a similar effect to a line beginning with
-.B .
+.B .\&
or
.BR \e ,
but allows the values of variables to be passed through.
+.
.TP
\fBsh\fR \fIX\fR \fIcommand\fR \fIX\fR
Pass
@@ -301,11 +341,13 @@ to a shell.
.I X
can be any character not occurring in
.IR command .
+.
.TP
\fBcopy\fR \fB"\fIfilename\fB"\fR
Include
.I filename
at this point in the file.
+.
.TP
\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \
[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR]
@@ -377,12 +419,13 @@ The commands to be performed for each line can also be taken
from a macro defined earlier by giving the name of the macro
as the argument to
.BR thru .
+.
.LP
.B reset
.br
.ns
.TP
-\fBreset\fI variable1\fB,\fI variable2 .\^.\^.
+\fBreset\fI variable1\fR[\fB,\fR]\fI variable2 .\^.\^.
Reset pre-defined variables
.IR variable1 ,
.I variable2
@@ -393,6 +436,7 @@ Note that assigning a value to
.B scale
also causes all pre-defined variables that control dimensions
to be reset to their default values times the new value of scale.
+.
.TP
\fBplot\fR \fIexpr\fR [\fB"\fItext\*(ic\fB"\fR]
This is a text object which is constructed by using
@@ -412,8 +456,9 @@ Be very careful that you specify an appropriate format string;
does only very limited checking of the string.
This is deprecated in favour of
.BR sprintf .
+.
.TP
-.IB variable := expr
+.IB variable\ := \ expr
This is similar to
.B =
except
@@ -426,10 +471,11 @@ will be changed only in the innermost block in which it is defined.
.B =
defines the variable in the current block if it is not already defined there,
and then changes the value in the current block.)
+.
.LP
Arguments of the form
.IP
-.IR X\ anything\ X
+.I X anything X
.LP
are also allowed to be of the form
.IP
@@ -447,8 +493,11 @@ or imbalanced occurrences of
.B {
and
.BR } .
+.
.SS Expressions
+.
The syntax for expressions has been significantly extended:
+.
.LP
.IB x\ ^\ y
(exponentiation)
@@ -463,7 +512,9 @@ The syntax for expressions has been significantly extended:
(base 10)
.br
.BI exp( x )
-(base 10, ie 10\v'-.4m'\fIx\*(ic\fR\v'.4m')
+(base 10, ie
+.ie t 10\v'-.4m'\fIx\*(ic\fR\v'.4m')
+.el 10^\fIx\fR)
.br
.BI sqrt( x )
.br
@@ -506,11 +557,13 @@ deprecated)
.br
\fB"\fIstr1\*(ic\fB" != "\fIstr2\*(ic\fB"\fR
.br
+.
.LP
String comparison expressions must be parenthesised in some contexts
to avoid ambiguity.
+.
.SS Other Changes
-.LP
+.
A bare expression,
.IR expr ,
is acceptable as an attribute;
@@ -523,13 +576,19 @@ For example
.IP
.B line 2i
.LP
-means draw a line 2 inches long in the current direction.
+means draw a line 2\ inches long in the current direction.
+The `i' (or `I') character is ignored; to use another measurement unit,
+set the
+.I scale
+variable to an appropriate value.
+.
.LP
The maximum width and height of the picture are taken from the variables
.B maxpswid
and
.BR maxpsht .
Initially these have values 8.5 and 11.
+.
.LP
Scientific notation is allowed for numbers.
For example
@@ -537,6 +596,7 @@ For example
.B
x = 5e\-2
.RE
+.
.LP
Text attributes can be compounded.
For example,
@@ -545,6 +605,7 @@ For example,
"foo" above ljust
.RE
is legal.
+.
.LP
There is no limit to the depth to which blocks can be examined.
For example,
@@ -556,12 +617,15 @@ For example,
circle at last [\^].A.B.C
.RE
is acceptable.
+.
.LP
Arcs now have compass points
determined by the circle of which the arc is a part.
+.
.LP
Circles and arcs can be dotted or dashed.
In \*(tx mode splines can be dotted or dashed.
+.
.LP
Boxes can have rounded corners.
The
@@ -576,8 +640,9 @@ attribute is given, a radius of
is used.
Initially,
.B boxrad
-has a value of 0.
+has a value of\ 0.
A box with rounded corners can be dotted or dashed.
+.
.LP
The
.B .PS
@@ -587,13 +652,15 @@ If the width of zero is specified the width will be ignored in computing
the scaling factor for the picture.
Note that GNU
.B pic
-will always scale a picture by the same amount vertically as horizontally.
+will always scale a picture by the same amount vertically as well as
+horizontally.
This is different from the
.SM DWB
2.0
.B pic
which may scale a picture by a different amount vertically than
horizontally if a height is specified.
+.
.LP
Each text object has an invisible box associated with it.
The compass points of a text object are determined by this box.
@@ -611,8 +678,9 @@ Initially
and
.B textht
have a value of 0.
+.
.LP
-In places where a quoted text string can be used,
+In (almost all) places where a quoted text string can be used,
an expression of the form
.IP
.BI sprintf(\(ts format \(ts,\ arg ,\fR.\|.\|.\fB)
@@ -623,6 +691,7 @@ this will produce the arguments formatted according to
which should be a string as described in
.BR printf (3)
appropriate for the number of arguments supplied.
+.
.LP
The thickness of the lines used to draw objects is controlled by the
.B linethick
@@ -656,9 +725,10 @@ value of the
variable, nor by the width or height given in the
.B .PS
line.
+.
.LP
Boxes (including boxes with rounded corners),
-circles and ellipses can be filled by giving then an attribute of
+circles and ellipses can be filled by giving them an attribute of
.BR fill [ ed ].
This takes an optional argument of an expression with a value between
0 and 1; 0 will fill it with white, 1 with black, values in between
@@ -676,13 +746,14 @@ The invisible attribute does not affect the filling of objects.
Any text associated with a filled object will be added after the
object has been filled, so that the text will not be obscured
by the filling.
+.
.LP
Three additional modifiers are available to specify colored objects:
-.B outline
+.BR outline [ d ]
sets the color of the outline,
.B shaded
the fill color, and
-.B color
+.BR colo [ u ] r [ ed ]
sets both.
All three keywords expect a suffix specifying the color, for example
.RS
@@ -700,6 +771,7 @@ additional colors can be defined with the
request (see the manual page of
.BR @g@troff (@MAN1EXT@)
for more details).
+.
.LP
Arrow heads will be drawn as solid triangles if the variable
.B arrowhead
@@ -708,7 +780,8 @@ is non-zero and either \*(tx mode is enabled or the
option has not been given.
Initially
.B arrowhead
-has a value of 1.
+has a value of\ 1.
+.
.LP
The troff output of
.B pic
@@ -718,11 +791,12 @@ The
option is therefore redundant.
All numbers are taken to be in inches; numbers are never interpreted
to be in troff machine units.
+.
.LP
Objects can have an
.B aligned
attribute.
-This will only work when the postprocessor is
+This will only work if the postprocessor is
.BR grops .
Any text associated with an object having the
.B aligned
@@ -731,6 +805,7 @@ so that it is aligned in the direction from the start point
to the end point of the object.
Note that this attribute will have no effect for objects whose start and
end points are coincident.
+.
.LP
In places where
.IB n th
@@ -745,13 +820,17 @@ and the
.BR th .
For example,
.IP
-.B
+.ft B
.nf
for i = 1 to 4 do {
line from `i'th box.nw to `i+1'th box.se
}
+.ft
.fi
+.
+.
.SH CONVERSION
+.
To obtain a stand-alone picture from a
.B pic
file, enclose your
@@ -765,6 +844,7 @@ requests;
configuration commands may be added at the beginning of the file, but no
.B roff
text.
+.
.LP
It is necessary to feed this file into
.B groff
@@ -790,6 +870,7 @@ Alternatively, you can define your own requests, e.g. to do nothing:
.ft
.fi
.RE
+.
.LP
.B groff
itself does not provide direct conversion into other graphics file
@@ -822,6 +903,7 @@ Call
.RE
.LP
for a list of the available devices.
+.
.LP
As the Encapsulated PostScript File Format
.B EPS
@@ -843,7 +925,10 @@ file can be then converted to virtually any graphics format using the tools
of the
.B netpbm
package .
+.
+.
.SH FILES
+.
.Tp \w'\fB@MACRODIR@/pic.tmac'u+3n
.B
@MACRODIR@/pic.tmac
@@ -852,7 +937,10 @@ Example definitions of the
and
.B PE
macros.
+.
+.
.SH "SEE ALSO"
+.
.BR @g@troff (@MAN1EXT@),
.BR groff_out (@MAN5EXT@),
.BR tex (1),
@@ -867,7 +955,7 @@ Tpic: Pic for \*(tx
Brian W. Kernighan,
PIC \(em A Graphics Language for Typesetting (User Manual).
AT&T Bell Laboratories, Computing Science Technical Report No.\ 116
-<URL:http://cm.bell-labs.com/cm/cs/cstr/116.ps.gz>
+<http://cm.bell-labs.com/cm/cs/cstr/116.ps.gz>
(revised May, 1991).
.LP
.B ps2eps
@@ -882,8 +970,10 @@ W. Richard Stevens - Turning PIC Into HTML
W. Richard Stevens - Examples of picMacros
.br
<http://www.kohala.com/start/troff/pic.examples.ps>
+.
+.
.SH BUGS
-.LP
+.
Input characters that are invalid for
.B groff
(ie those with
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index b0d2b5ee..4ac7cf3e 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -1,7 +1,7 @@
.ig
groff.man
-Last update : 14 April 2002
+Last update: 04 May 2002
Copyright (C) 1989, 2002 Free Software Foundation, Inc.
Rewritten in 2002 by Bernd Warken <bwarken@mayn.de>
@@ -87,11 +87,11 @@ FDL in the main directory of the groff source package.
. in
..
.c --------------------------------------------------------------------
-.c [ShortOpt] (name [arg])
+.c ShortOpt[] (name [arg])
.c
.c short option in synopsis
.c
-.de [ShortOpt]
+.de ShortOpt[]
. if \n[.$]=0 \
. return
. ds @opt \$1\"
@@ -238,21 +238,21 @@ groff \- front-end for the groff document formatting system
.
.ad l
.Synopsis groff
-.[ShortOpt] abcegilpstzCEGNRSUVXZ
-.[ShortOpt] d cs
-.[ShortOpt] f fam
-.[ShortOpt] F dir
-.[ShortOpt] I dir
-.[ShortOpt] L arg
-.[ShortOpt] m name
-.[ShortOpt] M dir
-.[ShortOpt] n num
-.[ShortOpt] o list
-.[ShortOpt] P arg
-.[ShortOpt] r cn
-.[ShortOpt] T dev
-.[ShortOpt] w name
-.[ShortOpt] W name
+.ShortOpt[] abcegilpstzCEGNRSUVXZ
+.ShortOpt[] d cs
+.ShortOpt[] f fam
+.ShortOpt[] F dir
+.ShortOpt[] I dir
+.ShortOpt[] L arg
+.ShortOpt[] m name
+.ShortOpt[] M dir
+.ShortOpt[] n num
+.ShortOpt[] o list
+.ShortOpt[] P arg
+.ShortOpt[] r cn
+.ShortOpt[] T dev
+.ShortOpt[] w name
+.ShortOpt[] W name
.RI [ file
.Text \*[Ellipsis]]
.EndSynopsis
@@ -277,9 +277,13 @@ The command line is parsed according to the usual GNU convention.
The whitespace between a command line option and its argument is
optional.
.
-Options can be grouped behind a single \*[Minus] (minus character).
+Options can be grouped behind a single
+.ShortOpt
+(minus character).
.
-A filename of \*[Minus] (minus character) denotes the standard input.
+A filename of
+.ShortOpt
+(minus character) denotes the standard input.
.
.
.\" --------------------------------------------------------------------
diff --git a/src/roff/troff/node.cc b/src/roff/troff/node.cc
index 76db8cad..61177771 100644
--- a/src/roff/troff/node.cc
+++ b/src/roff/troff/node.cc
@@ -3499,7 +3499,7 @@ special_node::special_node(const macro &m, int n)
font_size fs = curenv->get_font_size();
int char_height = curenv->get_char_height();
int char_slant = curenv->get_char_slant();
- int fontno = curenv->get_font();
+ int fontno = env_definite_font(curenv);
tf = font_table[fontno]->get_tfont(fs, char_height, char_slant,
fontno);
if (curenv->is_composite())
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 12726638..fd133b3e 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -75,7 +75,7 @@
.\" we redefine .ne to avoid page breaks; instead, the page length is
.\" increased to the necessary amount (this is needed for tables)
.if n \{\
-. de ne
+. de1 ne
. ie \\n[.$] \
. nr an-ne \\$*
. el \