Files
plan9port/man/man1/deroff.1
Dmitri Vereshchagin 10564b1175 tmac/tmac.an: define .MR in a groff compatible way
groff 1.23.0 added .MR to its -man macro package.  The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020."  From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.

Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.

Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized.  groff's .MR does not.  This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
2025-07-27 09:58:50 -04:00

118 lines
1.8 KiB
Groff

.TH DEROFF 1
.SH NAME
deroff, delatex \- remove formatting requests
.SH SYNOPSIS
.B deroff
[
.I option ...
]
.I file ...
.PP
.B delatex
.I file
.SH DESCRIPTION
.I Deroff
reads each file in sequence
and removes all
.I nroff
and
.MR troff 1
requests and non-text arguments, backslash constructions,
and constructs of preprocessors such as
.MR eqn 1 ,
.MR pic 1 ,
and
.MR tbl 1 .
Remaining text is written on the standard output.
.I Deroff
follows files included by
.L .so
and
.L .nx
commands;
if a file has already been included, a
.L .so
for that file is ignored and a
.L .nx
terminates execution.
If no input file is given,
.I deroff
reads from standard input.
.PP
The options are
.TP
.B -w
Output a word list, one `word' (string of letters, digits, and
properly embedded ampersands and apostrophes,
beginning with a letter) per line.
Other characters are skipped.
Otherwise, the output follows the original, with the deletions mentioned above.
.TP
.B -_
Like
.BR -w ,
but consider underscores to be alphanumeric rather than punctuation.
.TP
.B -i
Ignore
.L .so
and
.L .nx
requests.
.TP
.BR -ms
.PD0
.TP
.B -mm
Remove titles, attachments, etc., as well as ordinary
.IR troff
constructs, from
.MR ms 7
or
.I mm
documents.
.PD
.TP
.B -ml
Same as
.BR -mm ,
but remove lists as well.
.PP
.I Delatex
does for
.I tex
and
.I latex
(see
.MR tex 1 )
files what
.B deroff -wi
does for
.I troff
files.
.SH SOURCE
.B \*9/src/cmd/deroff.c
.br
.B \*9/src/cmd/delatex.lx
.SH "SEE ALSO"
.IR troff (1),
.MR tex 1 ,
.MR spell 1
.SH BUGS
These filters are not complete interpreters of
.I troff
or
.IR tex .
For example, macro definitions containing
.L \e$
cause chaos in
.IR deroff
when the popular
.L $$
delimiters for
.I eqn
are in effect.
.PP
Text inside macros is emitted at place of
definition, not place of call.