summaryrefslogtreecommitdiffstats
path: root/contrib/groff/tmac
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
committerru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
commita812d8b090bc4edc23150bff257717b24f282e41 (patch)
tree19d4540966cb92612af25d5154efcc062eefb5c5 /contrib/groff/tmac
parent2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (diff)
downloadFreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.zip
FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.tar.gz
Virgin import of FSF groff v1.16.1
Diffstat (limited to 'contrib/groff/tmac')
-rw-r--r--contrib/groff/tmac/Makefile.sub51
-rw-r--r--contrib/groff/tmac/eqnrc5
-rw-r--r--contrib/groff/tmac/groff_man.man370
-rw-r--r--contrib/groff/tmac/groff_markup.man319
-rw-r--r--contrib/groff/tmac/groff_tmac.man420
-rw-r--r--contrib/groff/tmac/tmac.X2
-rw-r--r--contrib/groff/tmac/tmac.an600
-rw-r--r--contrib/groff/tmac/tmac.arkup175
-rw-r--r--contrib/groff/tmac/tmac.doc2
-rw-r--r--contrib/groff/tmac/tmac.dvi14
-rw-r--r--contrib/groff/tmac/tmac.html6
-rw-r--r--contrib/groff/tmac/tmac.latin14
-rw-r--r--contrib/groff/tmac/tmac.lbp13
-rw-r--r--contrib/groff/tmac/tmac.man1
-rw-r--r--contrib/groff/tmac/tmac.mandoc1
-rw-r--r--contrib/groff/tmac/tmac.markup1
-rw-r--r--contrib/groff/tmac/tmac.mdoc1
-rw-r--r--contrib/groff/tmac/tmac.me1
-rw-r--r--contrib/groff/tmac/tmac.ms1
-rw-r--r--contrib/groff/tmac/tmac.pspic21
-rw-r--r--contrib/groff/tmac/tmac.s3
-rw-r--r--contrib/groff/tmac/tmac.safer3
-rw-r--r--contrib/groff/tmac/tmac.tty5
-rw-r--r--contrib/groff/tmac/tmac.tty-char12
-rw-r--r--contrib/groff/tmac/troffrc10
-rw-r--r--contrib/groff/tmac/troffrc-end6
26 files changed, 1589 insertions, 458 deletions
diff --git a/contrib/groff/tmac/Makefile.sub b/contrib/groff/tmac/Makefile.sub
index 5fd7b4d..be06cc7 100644
--- a/contrib/groff/tmac/Makefile.sub
+++ b/contrib/groff/tmac/Makefile.sub
@@ -1,24 +1,37 @@
-MAN7=groff_ms.n groff_man.n groff_me.n groff_msafer.n \
- groff_mdoc.n groff_mdoc.samples.n
+MAN5=\
+ groff_tmac.n
+MAN7=\
+ groff_ms.n \
+ groff_man.n \
+ groff_me.n \
+ groff_msafer.n \
+ groff_mdoc.n \
+ groff_mdoc.samples.n \
+ groff_markup.n
-NORMALFILES=tmac.andoc tmac.pic tmac.ps tmac.psnew tmac.psold tmac.pspic \
- tmac.psatk tmac.dvi tmac.tty tmac.tty-char tmac.X tmac.Xps tmac.latin1 \
- tmac.lj4 eqnrc troffrc tmac.safer tmac.html tmac.arkup
-SPECIALFILES=tmac.an tmac.s
+NORMALFILES=\
+ tmac.mandoc tmac.andoc tmac.pic tmac.ps tmac.psnew tmac.psold tmac.pspic \
+ tmac.psatk tmac.dvi tmac.tty tmac.tty-char tmac.X tmac.Xps tmac.latin1 \
+ tmac.lj4 eqnrc troffrc troffrc-end tmac.safer tmac.html tmac.markup \
+ tmac.arkup tmac.a4 tmac.trace tmac.me tmac.mdoc
+SPECIALFILES=tmac.an tmac.s tmac.man tmac.ms
STRIPFILES=tmac.e tmac.doc tmac.doc.old
MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
mdocdir=$(tmacdir)/mdoc
-CLEANADD=stamp-strip stamp-wrap tmac.e-s tmac.doc-s tmac.doc.old-s \
- doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s *-wrap
+CLEANADD=\
+ stamp-strip stamp-wrap stamp-sed tmac.e-s tmac.doc-s tmac.doc.old-s \
+ doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s *-wrap \
+ tmac.man-sed tmac.ms-sed
tmac_s_prefix=
tmac_an_prefix=
tmac_wrap=
sys_tmac_prefix=
-all: stamp-strip stamp-wrap
+all: stamp-strip stamp-wrap stamp-sed
-install_data: $(NORMALFILES) $(SPECIALFILES) stamp-wrap stamp-strip man.local
- -test -d $(tmacdir) || mkdir $(tmacdir)
+install_data: $(NORMALFILES) $(SPECIALFILES) \
+ stamp-wrap stamp-strip stamp-sed man.local
+ -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
if test -n "$(tmac_wrap)"; then \
for m in ""$(tmac_wrap); do \
$(INSTALL_DATA) $$m-wrap $(tmacdir)/tmac.$$m; \
@@ -30,13 +43,17 @@ install_data: $(NORMALFILES) $(SPECIALFILES) stamp-wrap stamp-strip man.local
done
-rm -f $(tmacdir)/tmac.$(tmac_s_prefix)s
$(INSTALL_DATA) $(srcdir)/tmac.s $(tmacdir)/tmac.$(tmac_s_prefix)s
+ -rm -f $(tmacdir)/tmac.ms
+ $(INSTALL_DATA) tmac.ms-sed $(tmacdir)/tmac.ms
-rm -f $(tmacdir)/tmac.$(tmac_an_prefix)an
$(INSTALL_DATA) $(srcdir)/tmac.an $(tmacdir)/tmac.$(tmac_an_prefix)an
+ -rm -f $(tmacdir)/tmac.man
+ $(INSTALL_DATA) tmac.man-sed $(tmacdir)/tmac.man
for f in $(STRIPFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \
done
- -test -d $(mdocdir) || mkdir $(mdocdir)
+ -test -d $(mdocdir) || $(mkinstalldirs) $(mdocdir)
for f in $(MDOCFILES); do \
rm -f $(mdocdir)/$$f; \
$(INSTALL_DATA) $$f-s $(mdocdir)/$$f; \
@@ -62,6 +79,15 @@ stamp-wrap:
fi
touch $@
+stamp-sed: tmac.man tmac.ms
+ for f in tmac.man tmac.ms; do \
+ rm -f $$f-sed; \
+ sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
+ -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
+ $(srcdir)/$$f > $$f-sed; \
+ done
+ touch $@
+
uninstall_sub:
-if test -n "$(tmac_wrap)"; then \
for m in ""$(tmac_wrap); do \
@@ -71,6 +97,7 @@ uninstall_sub:
-for f in $(NORMALFILES) $(STRIPFILES); do rm -f $(tmacdir)/$$f; done
-rm -f $(tmacdir)/tmac.$(tmac_s_prefix)s
-rm -f $(tmacdir)/tmac.$(tmac_an_prefix)an
+ -rm -f $(tmacdir)/tmac.man $(tmacdir)/tmac.ms
-if cmp -s $(tmacdir)/man.local $(srcdir)/man.local; then \
rm -f $(tmacdir)/man.local; \
fi
diff --git a/contrib/groff/tmac/eqnrc b/contrib/groff/tmac/eqnrc
index 4b263cf..cfdbf3f 100644
--- a/contrib/groff/tmac/eqnrc
+++ b/contrib/groff/tmac/eqnrc
@@ -51,12 +51,13 @@ ifdef ps|X|html ! set draw_lines 1 !
ifdef ascii ! define n %1% !
ifdef latin1 ! define n %1% !
+ifdef utf8 ! define n %1% !
+ifdef cp1047 ! define n %1% !
ifdef n !
set nroff 1
!
undef X
-undef ps|X
+undef ps|X|html
undef n
-undef html
.EN
diff --git a/contrib/groff/tmac/groff_man.man b/contrib/groff/tmac/groff_man.man
index 57eb9ec..14bd3b0 100644
--- a/contrib/groff/tmac/groff_man.man
+++ b/contrib/groff/tmac/groff_man.man
@@ -1,9 +1,34 @@
+.ig \"-*- nroff -*-
+Copyright (C) 1999-2000 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be included in
+translations approved by the Free Software Foundation instead of in
+the original English.
+..
+.de TQ
+.br
+.ns
+.TP \\$1
+..
.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
.
.SH NAME
.
-groff_man \- groff `an' macros to support generation of man pages
+groff_man \- groff `man' macros to support generation of man pages
+.
.SH SYNOPSIS
+.
.B groff
.B \-m@TMAC_AN_PREFIX@an
[
@@ -16,14 +41,60 @@ groff_man \- groff `an' macros to support generation of man pages
.SH DESCRIPTION
.
The
-.B tmac.an
+.B tmac.@TMAC_AN_PREFIX@an
macros used to generate man pages with
.I groff
were written by James Clark.
This document provides a brief summary of the use of each macro in that
package.
+.
+.SH OPTIONS
+.
+The
+.B man
+macros understand the following command line options (which define various
+registers).
+.TP
+.B \-rC1
+If more than one manual page is given on the command line, number the
+pages continuously, rather than starting each at\ 1.
+.TP
+.B \-rD1
+Double-sided printing.
+Footers for even and odd pages are formatted differently.
+.TP
+.BI \-rP nnn
+Enumeration of pages will start with
+.I nnn
+rather than with\ 1.
+.TP
+.BI \-rS xx
+Base document font size is
+.I xx
+points
+.RI ( xx
+can be 10, 11, or\ 12) rather than 10\ points.
.TP
-.BI .TP " title section " [ extra1 "] [" extra2 "] [" extra3 ]
+.BI \-rX nnn
+After page\ \c
+.IR nnn ,
+number pages as
+.IR nnn a,
+.IR nnn b,
+.IR nnn c,
+etc.
+For example, the option `\-rX2' will produce the following page numbers:
+1, 2, 2a, 2b, 2c, etc.
+.
+.SH USAGE
+.
+This section describes the available macros for manual pages.
+For further customization, put additional macros and requests into the file
+.B man.local
+which will be loaded immediately after
+.BR tmac.@TMAC_AN_PREFIX@an .
+.TP
+.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
Sets the title of the man page to
.I title
and the section to
@@ -33,22 +104,60 @@ The value
.I section
may also have a string appended, e.g. `.pm', to indicate a specific
subsection of the man pages.
+Both
+.I title
+and
+.I section
+are positioned at the left and right in the header line (with
+.I section
+in parentheses immediately appended to
+.IR title .
+.I extra1
+will be positioned in the middle of the footer line.
+.I extra2
+will be positioned at the left in the footer line (resp. at the left on
+even pages and at the right on odd pages if double-sided printing is
+active).
+.I extra3
+is centered in the header line.
+.IP
+For HTML output, headers and footers are completely supressed.
+.IP
+Additionally, this macro starts a new page; the new line number is\ 1 again
+(except if the `-rC1' option is given on the command line) -- this feature
+is intended only for formatting multiple man pages; a single man page should
+contain exactly one
+.B TH
+macro at the beginning of the file.
.TP
-.BI .SH " text for a heading"
-Sets up an unindented and unnumbered section heading.
-Prints out all the text following `.SH' up to the end of the line in bold
-face, with a size slightly smaller than that for indented section headings.
+.BI ".SH [" "text for a heading" ]
+Sets up an unnumbered section heading sticking out to the left.
+Prints out all the text following
+.B SH
+up to the end of the line (resp. the text in the next line if there is no
+argument to
+.BR SH )
+in bold face, one size larger than the base document size.
+Additionally, the left margin for the following text is reset to its default
+value.
.TP
-.BI .SS " text for a heading"
-Sets up an indented section heading.
-Prints out all the text following `.SS' up to the end of the line in bold
-face, with a size slightly larger than that for unindented section headings.
+.BI ".SS [" "text for a heading" ]
+Sets up an secondary, unnumbered section heading.
+Prints out all the text following
+.B SS
+up to the end of the line (resp. the text in the next line if there is no
+argument to
+.BR SS )
+in bold face, at the same size as the base document size.
+Additionally, the left margin for the following text is reset to its default
+value.
.TP
.BI ".TP [" nnn ]
-Sets up an indented paragraph.
+Sets up an indented paragraph with label.
The indentation is set to
.I nnn
-if that argument is supplied.
+if that argument is supplied (the default unit is `n' if omitted), otherwise
+it is set to the default indentation value.
The first line of text following this macro is interpreted as a string to be
printed flush-left, as it is appropriate for a label.
It is not interpreted as part of a paragraph, so there is no attempt to fill
@@ -58,72 +167,149 @@ paragraph starts at the same line (but indented), continuing on the
following lines.
If the label is wider than the indentation, then the descriptive part of the
paragraph begins on the line following the label, entirely indented.
-The `.TP' macro is the macro used for the explanations you are just reading.
+Note that neither font shape nor font size of the label is set to a default
+value; on the other hand, the rest of the text will have default font
+settings.
+The
+.B TP
+macro is the macro used for the explanations you are just reading.
.TP
-.BR ".LP " or " .PP " or " .P"
+.B .LP
+.TQ
+.B .PP
+.TQ
+.B .P
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 that is set in the `PD' counter.
+vertical space downwards by the amount specified by the
+.B PD
+macro.
+The font size and shape are reset to the default value (10pt resp. Roman).
+Finally, the current left margin is restored.
.TP
.BI ".IP [" designator "] [" nnn ]
Sets up an indented paragraph, using
.I designator
as a tag to mark its beginning.
-The indentation is permanently set to
+The indentation is set to
.I nnn
-if that argument is supplied.
-To set the indentation back to the previous level, one must call some other
-macro that uses indented paragraphs, and explicitly provide it with the
-value of the previous indentation.
+if that argument is supplied (default unit is `n'), otherwise the default
+indentation value is used.
+Font size and face of the paragraph (but not the designator) are reset to
+its default values.
+To start an indented paragraph with a particular indentation but without a
+designator, use `""' (two doublequotes) as the second argument.
.IP
For example, the following paragraphs were all set up with bullets as the
-designator, using `.IP \\(bu 4':
+designator, using `.IP\ \\(bu\ 4':
+.RS
.IP \(bu 4
-`IP' is one of the three macros used in
-.B tmac.an
+.B IP
+is one of the three macros used in
+.B tmac.@TMAC_AN_PREFIX@an
to format lists.
.IP \(bu 4
-`HP' is another.
+.B HP
+is another.
This macro produces a paragraph with a left hanging indentation.
.IP \(bu 4
-`TP' is another.
-This macro produces an unindented label (given by the text on the first line
-following `TP'), followed by an indented paragraph with appropriately
-descriptive text.
+.B TP
+is another.
+This macro produces an unindented label followed by an indented paragraph.
+.RE
.TP
.BI ".HP [" nnn ]
-Sets up paragraphs with hanging left indentation.
+Sets up a paragraph with hanging left indentation.
The indentation is set to
.I nnn
-if that argument is supplied.
-The following pargraph illustrates the effect of this macro with the hanging
-indentation set to\ 2:
-.HP 2
-This is a pagraph following an invocation of the `.HP' macro.
+if that argument is supplied (default unit is `n'), otherwise the default
+indentation value is used.
+Font size and face are reset to its default values.
+The following paragraph illustrates the effect of this macro with hanging
+indentation set to\ 4:
+.RS
+.HP 4
+This is a paragraph following an invocation of the
+.B HP
+macro.
As you can see, it produces a paragraph where all lines but the first are
-flushed right and are shorter than the preceding lines.
+indented.
+.RE
+.TP
+.BI ".RS [" nnn ]
+This macro moves the left margin to the right by the value
+.I nnn
+if specified (default unit is `n'); otherwise the default indentation value
+is used.
+Calls to the
+.B RS
+macro can be nested.
+.TP
+.BI ".RE [" nnn ]
+This macro moves the left margin back to level
+.IR nnn ;
+if no argument is given, it moves one level back.
+The first level (i.e., no call to
+.B RS
+yet) has number\ 1, and each call to
+.B RS
+increases the level by\ 1.
+.PP
+To summarize, the following macros cause a line break with the insertion of
+vertical space (which amount can be changed with the
+.B PD
+macro):
+.BR SH ,
+.BR SS ,
+.BR TP ,
+.B LP
+.RB ( PP ,
+.BR P ),
+.BR IP ,
+and
+.BR HP .
+The macros
+.B RS
+and
+.B RE
+also cause a break but no insertion of vertical space.
.
.SH "MACROS TO SET FONTS"
.
+The standard font is Roman; the default text size is 10\ point.
.TP
-.BI .SM
+.BI ".SM [" text ]
Causes the text on the same line or the text on the next line to appear in a
font that is one point size smaller than the default font.
.TP
-.BI .SB
+.BI ".SB [" text ]
Causes the text on the same line or the text on the next line to appear in
-small boldface font.
+boldface font, one point size smaller than the default font.
.TP
.BI ".BI " text
Causes text on the same line to appear alternately in bold face and italic.
The text must be on the same line as the macro call.
-Thus `.BI this word and that' would cause `this' and `and' to appear in bold
-face, while `word' and `that' appear in italics.
+Thus
+.RS
+.IP
+\&.BI this "word and" that
+.PP
+would cause `this' and `that' to appear in bold face, while `word and'
+appears in italics.
+.RE
.TP
.BI ".IB " text
Causes text to appear alternately in italic and bold face.
The text must be on the same line as the macro call.
.TP
+.BI ".RI " text
+Causes text on the same line to appear alternately in roman and italic.
+The text must be on the same line as the macro call.
+.TP
+.BI ".IR " text
+Causes text on the same line to appear alternately in italic and roman.
+The text must be on the same line as the macro call.
+.TP
.BI ".BR " text
Causes text on the same line to appear alternately in bold face and roman.
The text must be on the same line as the macro call.
@@ -132,40 +318,124 @@ The text must be on the same line as the macro call.
Causes text on the same line to appear alternately in roman and bold face.
The text must be on the same line as the macro call.
.TP
-.BI ".R " text
-Causes text to appear in roman font.
+.BI ".R [" text ]
+Causes
+.I text
+to appear in roman font.
If no text is present on the line where the macro is called, then the text
of the next line appears in roman.
This is the default font to which text is returned at the end of processing
of the other macros.
.TP
-.BI ".B " text
-Causes text to appear in bold face.
+.BI ".B [" text ]
+Causes
+.I text
+to appear in bold face.
If no text is present on the line where the macro is called, then the text
of the next line appears in bold face.
.TP
-.BI ".I " text
-Causes text to appear in italic.
+.BI ".I [" text ]
+Causes
+.I text
+to appear in italic.
If no text is present on the line where the macro is called, then the text
of the next line appears in italic.
.
+.SH "MISCELLANEOUS"
+.
+The default indentation is 7.2n for all output devices except for
+.B grohtml
+which uses 1.2i instead.
+.TP
+.B .DT
+Sets tabs every 0.5 inches.
+Since this macro is always called during a
+.B TH
+request, it makes sense to call it only if the tab positions have been
+changed.
+.TP
+.BI ".PD [" nnn ]
+Adjusts the empty space before a new paragraph (resp. section).
+The optional argument gives the amount of space (default units are `v');
+without parameter, the value is reset to its default value (1\ line for tty
+devices, 0.4v\ otherwise).
+This affects the macros
+.BR SH ,
+.BR SS ,
+.BR TP ,
+.B LP
+(resp.\&
+.B PP
+and
+.BR P ),
+.BR IP ,
+and
+.BR HP .
+.PP
+The following strings are defined:
+.TP
+.B \e*S
+Switch back to the default font size.
+.TP
+.B \e*R
+The `registered' sign.
+.TP
+.B \e*(Tm
+The `trademark' sign.
+.TP
+.B \e*(lq
+.TQ
+.B \e*(rq
+Left and right quote.
+This is equal to `\e(lq' and `\e(rq', respectively.
+.PP
+If a preprocessor like
+.B @g@tbl
+or
+.B @g@eqn
+is needed, it has become usage to make the first line of the man page look
+like this:
+.PP
+.RS
+.BI .\e"\ word
+.RE
+.PP
+Note the single space character after the double quote.
+.I word
+consists of letters for the needed preprocessors: `e' for
+.BR @g@eqn ,
+`r' for
+.BR @g@refer ,
+and `t' for
+.BR @g@tbl .
+Modern implementations of the
+.B man
+program read this first line and automatically call the right
+preprocessor(s).
+.
.SH "SEE ALSO"
.
Since the
-.B tmac.an
+.B tmac.@TMAC_AN_PREFIX@an
macros consist of groups of
.I groff
requests, one can, in principle, supplement the functionality of the
-.B tmac.an
+.B tmac.@TMAC_AN_PREFIX@an
macros with individual
.I groff
requests where necessary.
A complete list of these requests is available on the WWW at
+.PP
.ce 1
http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html
+.PP
+.BR @g@tbl (@MAN1EXT@),
+.BR @g@eqn (@MAN1EXT@),
+.BR @g@refer (@MAN1EXT@),
+.BR man (1)
.
.SH AUTHOR
.
This manual page was originally written for the Debian GNU/Linux system by
-Susan G. Kleinmann <sgk@debian.org>, corrected by Werner Lemberg
+Susan G. Kleinmann <sgk@debian.org>, corrected and updated by Werner Lemberg
<wl@gnu.org>, and is now part of the GNU troff distribution.
diff --git a/contrib/groff/tmac/groff_markup.man b/contrib/groff/tmac/groff_markup.man
new file mode 100644
index 0000000..46233ce
--- /dev/null
+++ b/contrib/groff/tmac/groff_markup.man
@@ -0,0 +1,319 @@
+.TH GROFF_MARKUP @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
+.\" Copyright (C) 2000 Free Software Foundation, Inc.
+.\" Written by Gaius Mulley (gaius@glam.ac.uk)
+.\"
+.\" This file is part of groff.
+.\"
+.\" groff is free software; you can redistribute it and/or modify it under
+.\" the terms of the GNU General Public License as published by the Free
+.\" Software Foundation; either version 2, or (at your option) any later
+.\" version.
+.\"
+.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
+.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+.\" for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License along
+.\" with groff; see the file COPYING. If not, write to the Free Software
+.\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" user level guide to using the -markup macroset
+.\"
+.do mso tmac.arkup
+.LINE
+.SH NAME
+groff_markup \- groff macros for authoring web pages
+.LINE
+.SH SYNOPSIS
+.B "groff \-markup"
+[ options ]
+file ...
+.SH DESCRIPTION
+This manual page describes the GNU \-markup macros, which is part of the
+groff document formatting system.
+The manual page is very a basic guide, and the html device driver
+.RB ( grohtml )
+is still very alpha.
+It has been included into the distribution so that a lot of people have a
+chance to test it.
+Note that this macro file will be automatically called (via the
+\fCtroffrc\fP file) if you use \fC-Thtml\fP.
+.PP
+To see the hyperlinks in action, please format this man page with the
+.B grohtml
+device.
+.PP
+Here is a summary of the functions found in this macro set.
+.SH SYNPOSIS
+.ta 2iL
+\&.HTMLINDEX determine automatic link cut off
+.br
+ point for sections/headers
+.br
+\&.BODYCOLOR specify colours on a web page
+.br
+\&.BACKGROUND specify background image
+.br
+\&.URL create a url using two parameters
+.br
+\&.MAILTO create a html email address
+.br
+\&.FTP create an ftp reference
+.br
+\&.IMAGE include an image file
+.br
+\&.HTML pass an html raw request to the
+.br
+ device driver
+.br
+\&.TAG generate an html name tag from $1
+.br
+.\"\&.CDFTP optionally create two different links
+.\".br
+.\" depending on hostname
+.\".br
+\&.LINE create a full width horizontal rule
+.br
+.PP
+Output of the
+.IR pic ,
+.IR eqn ,
+.IR refer ,
+and
+.I tbl
+preprocessors is acceptable as input.
+.SH REQUESTS
+.TP
+.B HTMLINDEX
+determines the cut off point for automatic link generation to headings.
+By default all headings found in a troff document have links created to them
+at the top of the html web page.
+It maybe that many of the lower heading levels do not require links.
+Alternatively some web pages may not need any heading links at all, in which
+case:
+.sp
+.nf
+\fC\&.HTMLINDEX 0\fP
+.fi
+.sp
+will tell
+.B grohtml
+not to generate links.
+An \fCHTMLINDEX\fP of 2 will mean that a heading
+.sp
+.B "1.1.1 Some Title"
+.sp
+will not be included in the links either as it is said to have a heading
+level of three.
+.TP
+.B BODYCOLOR
+takes five parameters: foreground, background, active hypertext link,
+hypertext link not yet visited, and visited hypertext link colour.
+.TP
+.B BACKGROUND
+the only parameter to this macro is the background image file.
+.TP
+.B URL
+generates
+.TAG URL
+a URL using either two or three arguments.
+$1 is the name of the link, $2 is the actual URL, and $3 is optional stuff
+to be printed immediately after $2.
+Here is how to encode
+.URL "homepage for groff" http://groff.ffii.org/ :
+.sp
+.nf
+\s-2\fC\&.URL "homepage for groff" http://groff.ffii.org/ :\fP\s+2
+.fi
+.sp
+If this is processed by a device other than \fC-Thtml\fP
+it appears as:
+homepage for groff \(lahttp://groff.ffii.org\(ra.
+The URL macro can be of any type; for example we can reference
+.URL "Eric Raymond's pic guide" pic.html
+by:
+.sp
+.nf
+\s-2\fC\&.URL "Eric Raymond's pic guide" pic.html\fP\s+2
+.fi
+.sp
+.TP
+.B MAILTO
+generates an email html reference.
+The first argument is mandatory as the email address.
+The optional second argument is the text you see in your browser, and
+an optional third argument is stuff printed immediately after the
+second argument.
+For example, the groff maintainers are
+.MAILTO wl@gnu.org "Werner Lemberg"
+and
+.MAILTO Ted.Harding@nessie.mcc.ac.uk "Ted Harding" .
+This is achieved by the following macros:
+.sp
+.nf
+\s-2\fC\&.MAILTO wl@gnu.org "Werner Lemberg"\fP
+.sp
+\fC\&.MAILTO Ted.Harding@nessie.mcc.ac.uk \\
+.br
+"Ted Harding" .\s+2\fP
+.fi
+.sp
+Note that all the urls actually are treated as consuming no textual space
+in groff.
+This could be considered as a bug since it causes some problems.
+To circumvent this, \fCtmac.arkup\fP inserts a zero-width character which
+expands to a harmless space (only if in HTML mode)
+.TP
+.B FTP
+indicates that data can be obtained via ftp.
+The first argument is the browser text and the second is the url.
+A third argument, similar to the macros above, is intended for stuff printed
+immediately after the second argument.
+The second and the third parameter are optional.
+As an example, here the location of the
+.FTP "current groff development distribution" \
+ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz .
+The macro example above was specified by:
+.sp
+\s-2\fC\&.FTP "current groff development distribution" \\
+.br
+ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz .\fP\s+2
+.sp
+.TP
+.B IMAGE
+allows the document to include pictures.
+The first argument is the image file.
+The next two arguments are optional:
+Argument two is the width in pixels (default is 400 pixels if absent).
+The third argument is the height in pixels (default is the width value if
+absent).
+.sp
+.TP
+.B HTML
+all text after this macro is treated as raw html.
+If the document is processed \fIwithout\fP \fC-Thtml\fP then
+the macro is ignored.
+This macro is a building block for other higher level macros.
+.sp
+For example, the \fCBACKGROUND\fP macro is defined as:
+.nf
+\fC\&.de BACKGROUND
+\&. HTML <body background=\\$1>
+\&..
+\fP
+.fi
+.TP
+.B TAG
+generates an html name tag from its argument.
+This can then be referenced using the
+.URL URL #URL
+macro.
+As you can see, you must precede the tag name with `\fC#\fP' since it is
+a local reference.
+This link was achieved via placing a TAG in the URL description above;
+the source looks like this:
+.sp
+\s-2\fC\&.TP
+.br
+\&.B URL
+.br
+generates
+.br
+\&.TAG URL
+.br
+a URL using either two or three
+.br
+arguments.
+.br
+$1 is the name of the link, $2 is the actual URL
+.br
+\fP\s+2etc.
+.sp
+.\".TP
+.\".B CDFTP
+.\"takes four arguments.
+.\"Basically it is the FTP macro with optional local reference.
+.\"It was designed to allow the same groff source to be built on two different
+.\"machines and access the ftp data differently.
+.\"For example, on a web server you might wish for the web page to reference
+.\"a web site.
+.\"However, if you were producing a CDROM of your information you might wish
+.\"for the ftp data to be also stored on your CDROM and referenced as a file.
+.\"An example to get the current groff development distribution
+.\".CDFTP merlin "click here." \
+.\"ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz \
+.\"../../groff.tar.gz
+.\"The source for this CDFTP invocation is
+.\".sp
+.\"\fC\s-2\&.CDFTP merlin "click here." \
+.\"ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz \
+.\"../../groff.tar.gz\fP\s+2
+.\".sp
+.\"which means if the html is generated on machine \fCmerlin\fP
+.\"then generate a URL to \fC../../groff.tar.gz\fP.
+.\"Otherwise construct an FTP URL to
+.\"\fCftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz\fP.
+.TP
+.B LINE
+generates a full width horizontal rule.
+Example:
+.sp
+\fC\s-2\&.LINE\fP\s+2
+.sp
+.SH
+SECTION HEADING LINKS
+.LP
+By default
+.B grohtml
+generates links to all section headings and places these at the top of the
+html document.
+.B Grohtml
+has to guess what a section heading looks like \(em remember that all
+.B grohtml
+actually sees is a device independent language telling it where to place
+text, draw lines, change font sizes and faces etc.
+It believes a section heading to be a line of bold text which starts at the
+left most margin.
+Consequently it may misinterpret.
+Users can turn off all heading and title guessing by giving invoking groff
+with \fCgroff -P-g\fP.
+.SH
+LIMITATIONS OF GROHTML
+.LP
+Although basic text can be translated in a straightforward fashion there are
+some areas where
+.B grohtml
+has to try and guess text relationship.
+In particular, whenever
+.B grohtml
+encounters text tables and indented paragraphs or two column mode it will
+try and utilize the html table construct to preserve columns.
+.B Grohtml
+also attempts to work out which lines should be automatically formatted by
+the browser.
+Ultimately in trying to make reasonable guesses most of the time it will
+make mistakes.
+Hopefully these mistakes will happen less and less as we get bug reports
+and patches :-).
+.PP
+Tbl, pic, eqn's are also generated using images which may be
+considered a limitation.
+.SH FILES
+@MACRODIR@/tmac.arkup
+.SH "SEE ALSO"
+.BR groff (@MAN1EXT@),
+.BR @g@troff (@MAN1EXT@)
+.BR grohtml (@MAN1EXT@),
+.LP
+.SH AUTHOR
+.B Grohtml
+is written by
+.MAILTO gaius@glam.ac.uk "Gaius Mulley"
+.LINE
+.SH BUGS
+Report bugs to the
+.MAILTO bug-groff@gnu.org "Groff Bug Mailing List" .
+Include a complete, self-contained example that will allow the bug to be
+reproduced, and say which version of groff you are using.
+.LINE
diff --git a/contrib/groff/tmac/groff_tmac.man b/contrib/groff/tmac/groff_tmac.man
new file mode 100644
index 0000000..9e1f8e0
--- /dev/null
+++ b/contrib/groff/tmac/groff_tmac.man
@@ -0,0 +1,420 @@
+.\" -*- nroff -*-
+.ig /
+groff_tmac.5
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2000 Free Software Foundation, Inc.
+written by Bernd Warken <bwarken@mayn.de>
+
+Last update: 17 May 2000
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being this .ig-section and AUTHOR, with no
+Front-Cover Texts, and with no Back-Cover Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+./
+.
+.\" --------------------------------------------------------------------
+.\" Setup
+.\" --------------------------------------------------------------------
+.
+.if n \{\
+. mso tmac.tty-char
+. ftr CR R
+. ftr CI I
+. ftr CB B
+.\}
+.
+.\" text lines in macro definitions or bracketed sections \{...\}
+.de text
+. if 1 \&\\$*\&
+..
+.
+.de BIR
+. ie (\\n[.$] < 3) \
+. BI $@
+. el \{\
+. ds @tmp@ \fB\\$1\fP\fI\\$2\fP
+. shift 2
+. text \\*[@tmp@]\fR\\$*\fP
+. rm @tmp@
+. \}
+..
+.
+.de 'char
+. ds @tmp@ `\f(CB\\$1\fP'
+. shift
+. text \\*[@tmp@]\\$*
+. rm @tmp@
+..
+.
+.de option
+. ds @tmp@ \f(CB\\$1\fP
+. shift 1
+. text \\*[@tmp@]\\$*
+. rm @tmp@
+..
+.
+.als shellcommand option
+.
+.de argument
+. ds @tmp@ \f(CI\\$1\fP
+. shift 1
+. text \\*[@tmp@]\\$*
+. rm @tmp@
+..
+.
+.de request
+. ds @tmp@ \f(CB\\$1\fP
+. shift 1
+. text \\*[@tmp@]\\$*
+. rm @tmp@
+..
+.
+.\" --------------------------------------------------------------------
+.\" Title
+.\" --------------------------------------------------------------------
+.TH GROFF_TMAC @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
+.SH NAME
+groff_tmac \- macro files in the roff typesetting system
+.\" --------------------------------------------------------------------
+.SH DESCRIPTION
+.\" --------------------------------------------------------------------
+The
+.BR roff (@MAN7EXT@)
+type-setting system provides a set of macro packages suitable for
+special kinds of documents. Each macro package stores its macros and
+definitions in a file called the package's
+.BR "tmac file" .
+The name is deduced from
+.RB ` T roff
+.BR MAC ros'.
+.LP
+The tmac files are normal roff source documents, except that they
+usually contain only definitions and setup commands, but no text. All
+tmac files are kept in a single or a small number of directories, the
+.B tmac
+directories.
+.\" --------------------------------------------------------------------
+.SH NAMING
+.\" --------------------------------------------------------------------
+In classical roff systems, there was a funny naming scheme.
+If the name of a macro package started with
+.'char m
+this letter was omitted, e.g., the macro package for the man pages
+.I man
+was called
+.I an
+and its macro file
+.IR tmac.an .
+.LP
+By a similar reasoning, macro packages that did not start with an
+.'char m
+were often referred to by adding an
+.'char m ,
+ e.g., the package corresponding to
+.I tmac.doc
+was called
+.I mdoc
+because the command-line for activating it reads
+.RS
+.LP
+.BIR "troff\ \-m" doc .
+.RE
+.LP
+Actual versions of
+.BR groff (@MAN1EXT@)
+provide both naming schemes for the inflicted macro packages, with and
+without the leading
+.'char m .
+So in
+.IR groff ,
+the
+.I man
+macro package may be specified as
+.RS
+.LP
+.BIR "groff\ \-m\ " man ,
+.br
+.BIR "groff\ \-m" an ,
+.br
+.BIR "groff\ \-m" man , or
+.br
+.BIR "groff\ \-m " an .
+.RE
+.LP
+The easiest way to find out which macro packages are available on a
+system is to check the content of the
+.I tmac
+directories.
+For example, a file called
+.BI tmac. anything
+determines a macro package named
+.IR anything .
+.LP
+In
+.IR groff ,
+most macro packages are described in man pages called
+.BR groff_<name> (@MAN7EXT@),
+with a leading
+.'char m
+for the classical packages.
+.\" --------------------------------------------------------------------
+.SH INCLUSION
+.\" --------------------------------------------------------------------
+There are several ways to use a macro package in documents. At
+run-time, the groff option
+.option \-m \ \c
+.argument name
+makes the definitions in the macro file
+.BI tmac. name
+available as described in the section
+.BR NAMING .
+.LP
+It is also possible to include the macro file into the document by using
+the groff requests
+.request .so
+or
+.request .mso .
+For
+.request .so
+the full filename of the macro file must be specified \(em including the
+directory where it is kept.
+If the macro file is stored in one of the tmac directories it is more
+convenient to use
+.request .mso
+instead because it additionally searches the tmac path for the filename.
+.LP
+Note that in order to resolve the
+.request .so
+and
+.request .mso
+requests the roff preprocessor
+.shellcommand soelim
+must be called. This can be done either directly by a pipeline on the
+command line or by using the
+.option \-s
+option of
+.shellcommand groff .
+.LP
+You can also supply the letter
+.'char s
+in the preprocessor word as described in section
+.BR CONVENTION .
+.LP
+For example, suppose a macro file is stored as
+.I /usr/share/groff/tmac/tmac.macros
+and is used in some document called
+.IR docu.roff .
+.LP
+At run-time, the formatter call for this is
+.RS
+.LP
+.ft CR
+.shellcommand "groff\ \-m"
+.argument macros
+.argument docu.roff
+.ft P
+.RE
+.LP
+To include the macro file directly in the document either
+.RS
+.ft CR
+\&\.mso tmac.macros
+.ft P
+.RE
+is used or
+.RS
+.ft CR
+\&\.so /usr/share/groff/tmac/tmac.macros
+.ft P
+.RE
+.LP
+In both cases, the formatter is called with
+.ft CR
+.RS
+groff\ \-s docu.roff
+.RE
+.ft P
+.
+.\" --------------------------------------------------------------------
+.SH CONVENTION
+.\" --------------------------------------------------------------------
+.LP
+There is a convention that is supported by many modern roff
+type-setters: the
+.B preprocessor word
+described in the following.
+.LP
+If the first line in a document is a comment, the first word (after the
+comment characters and a blank) constitutes the
+.B preprocessor
+.BR word .
+That means that the letters of this word are interpreted as
+abbreviations for those preprocessor commands that should be run
+when formatting the document. Mostly, only the letters corresponding to
+the options for the preprocessors are recognized,
+.'char e ,
+.'char G ,
+.'char g ,
+.'char p ,
+.'char R ,
+.'char s , and
+.'char t
+(see
+.BR roff (@MAN7EXT@)).
+.LP
+Besides being a good reminder for the user, some formatters (like the
+.BR man (1)
+program) are even able to automatically start the preprocessors
+specified in the preprocessor word, but do not bet on this.
+.\" --------------------------------------------------------------------
+.SH "WRITING A MACRO FILE"
+.\" --------------------------------------------------------------------
+Writing a groff macro file is easy. Design a set of macros, strings,
+registers, etc. Store them in a single file. Documents that use the
+macros include this macro file with the
+.request .so
+request as described in the
+.B INCLUSION
+section.
+.LP
+To use the tmac functionality, call the macro file
+.BI tmac. whatever
+and put it in some directory of the tmac path, cf. section
+.BR FILES .
+Then documents can include it with the
+.request .mso
+request or the
+.shellcommand "groff\ \-m"
+option as described in the
+.B INCLUSION
+section.
+.LP
+If your macros might be of general usage contact the groff maintainers
+to have them included in the groff
+.I contrib
+source directory.
+.LP
+Some general guidelines might be helpful in writing macros.
+.IP \(bu 2m
+Double all functional backslashes,
+.'char \e
+->
+.'char \e\e .
+.IP \(bu 2m
+All printable backslashes must be written as
+.'char \ee .
+.IP \(bu 2m
+Escape all dots,
+.'char .
+->
+.'char \e. .
+.IP \(bu 2m
+Make ample use of the non-printable character
+.'char \e&
+in text parts, esp. before
+.'char \e
+and at the beginning of a line, but not before a delayed command.
+.IP \(bu 2m
+Use the character
+.'char @
+in temporary variable names.
+.IP \(bu 2m
+Test your macros for text and graphical devices, e.g.,
+.I latin1
+and
+.IR ps .
+.\" --------------------------------------------------------------------
+.SH FILES
+.\" --------------------------------------------------------------------
+All macro names that want to use the tmac mechanism must be named
+according to the form
+.BIR tmac. name .
+.LP
+The macro files are kept in the
+.B tmac
+.BR directories ,
+all of which constitue the
+.B tmac
+.BR path.
+In accordance with the Filesystem Hierarchy Standard (FHS), the standard
+tmac directory location for groff is
+.IR /usr/share/groff/tmac ,
+a local installation will use
+.IR /usr/local/share/groff/tmac .
+Older systems used a subdirectory of
+.IR /usr/lib .
+Independently of the default tmac path, the tmac path actually used by a
+document can always be set by a shell environment variable, cf. section
+.BR ENVIRONMENT .
+.\" --------------------------------------------------------------------
+.SH ENVIRONMENT
+.\" --------------------------------------------------------------------
+.TP
+.B GROFF_TMAC_PATH
+A colon separated list of tmac directories in which to search for macro
+files, the
+.B tmac
+.BR path .
+If unset a default path is used as is outlined in the
+.B FILES
+section.
+.\" --------------------------------------------------------------------
+.SH BUGS
+.\" --------------------------------------------------------------------
+The groff documentation is in evolution at the moment. It is possible
+that small inconsistencies between different documents exist
+temporarily.
+.\" --------------------------------------------------------------------
+.SH AUTHOR
+.\" --------------------------------------------------------------------
+This document is part of groff, the GNU roff distribution. It was
+written by Bernd Warken <bwarken@mayn.de>.
+.LP
+It is distributed under the terms of the FDL (GNU Free Documentation
+License) version 1.1 or later. You should have received a copy of the
+FDL on your system, it is also available on-line under
+.RS
+.LP
+.IR <http://www.gnu.org/copyleft/fdl.html> .
+.RE
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
+The authoritative source of information for all details of the groff
+system is the groff
+.BR info (1)
+file.
+.LP
+For a groff overview, see
+.BR roff (@MAN7EXT@)
+and the file
+.I README
+in the groff source package.
+.LP
+The groff tmac macro packages are
+.BR groff_man (@MAN7EXT@),
+.BR groff_markup (@MAN7EXT@),
+.BR groff_mdoc (@MAN7EXT@),
+.BR groff_mdoc.samples (@MAN7EXT@),
+.BR groff_me (@MAN7EXT@),
+.BR groff_mm (@MAN7EXT@),
+.BR groff_mmroff (@MAN7EXT@),
+.BR groff_ms (@MAN7EXT@),
+.BR groff_msafer (@MAN7EXT@).
+.LP
+The groff language is described in
+.BR groff (@MAN7EXT@)
+and the formatters in
+.BR groff (@MAN1EXT@),
+.BR troff (@MAN1EXT@).
+.LP
+The Filesystem Hierarchy Standard (FHS) is available at
+.BR http://www.pathname.com/fhs/ .
+
diff --git a/contrib/groff/tmac/tmac.X b/contrib/groff/tmac/tmac.X
index 53dd596..4219b4a 100644
--- a/contrib/groff/tmac/tmac.X
+++ b/contrib/groff/tmac/tmac.X
@@ -31,7 +31,7 @@
\D'l .39m 0'\v'.4m'\D'l -.39m 0''\h'.5m'
.if !c\(lq .char \(lq ``
.if !c\(rq .char \(rq ''
-.if !c\(Bq .char \(bq ,,
+.if !c\(Bq .char \(Bq ,,
.if !c\(OE .char \(OE O\h'-.25m'E
.if !c\(oe .char \(oe o\h'-.14m'e
.if !c\(ah .char \(ah \v'-.55m'\s[\En[.s]/2u]v\s0\v'.55m'
diff --git a/contrib/groff/tmac/tmac.an b/contrib/groff/tmac/tmac.an
index 144dbc8..7d1224d 100644
--- a/contrib/groff/tmac/tmac.an
+++ b/contrib/groff/tmac/tmac.an
@@ -1,355 +1,429 @@
-.\"Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
-.\" Written by James Clark (jjc@jclark.com)
+.\" Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+.\" Written by James Clark (jjc@jclark.com)
.\"
-.\"This file is part of groff.
+.\" This file is part of groff.
.\"
-.\"groff is free software; you can redistribute it and/or modify it under
-.\"the terms of the GNU General Public License as published by the Free
-.\"Software Foundation; either version 2, or (at your option) any later
-.\"version.
+.\" groff is free software; you can redistribute it and/or modify it under
+.\" the terms of the GNU General Public License as published by the Free
+.\" Software Foundation; either version 2, or (at your option) any later
+.\" version.
.\"
-.\"groff is distributed in the hope that it will be useful, but WITHOUT ANY
-.\"WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\"for more details.
+.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
+.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+.\" for more details.
.\"
-.\"You should have received a copy of the GNU General Public License along
-.\"with groff; see the file COPYING. If not, write to the Free Software
-.\"Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\" You should have received a copy of the GNU General Public License along
+.\" with groff; see the file COPYING. If not, write to the Free Software
+.\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
-.\" -rC1 => number pages continuously, rather than start each at 1
-.\" -rD1 => double-sided printing, ie different odd and even page footers
-.\" -rPnnn => number first page nnn
-.\" -rXnnn => number pages after nnn as nnna, nnnb, nnnc, ...
+.\" -rC1 => number pages continuously, rather than start each at 1
+.\" -rD1 => double-sided printing, ie different odd and even page footers
+.\" -rPnnn => number first page nnn
+.\" -rSxx => use size `xx'pt (either 10, 11, or 12) for document rather
+.\" than the default size of 10pt
+.\" -rXnnn => number pages after nnn as nnna, nnnb, nnnc, ...
.\"
.\" The file man.local is loaded at the end. Put local additions there.
.\" If you need to add things to TH, use `.am TH'.
.\"
+.
.if !\n(.g .ab These man macros work only with groff.
+.
.nr _C \n(.C
.cp 0
+.
.if !rD .nr D 0
.if !rC .nr C 0
+.if !rS .nr S 10
.if rP .pn 0\nP
+.
.de set-an-margin
-. ie '\*(.T'html' \{\
-. nr an-margin 0i
-. \}
-. el \{\
-. nr an-margin \\n[IN]
-. \}
+. nr an-margin \\n[IN]
..
+.
.\" .TH title section extra1 extra2 extra3
.de TH
-.cp 0
-.de an-init \" We have to do it like this to get multiple man pages right.
-.ds an-title "\\$1
-.ds an-section "\\$2
-.ds an-extra1 "\\$3
-.ie \\n[.$]>3 .ds an-extra2 "\\$4
-.el .ds an-extra2 \"Sun Release 4.0
-.ie \\n[.$]>4 .ds an-extra3 "\\$5
-.el .ds an-extra3 \"System Programmer's Manual
-.ds an-init
+. cp 0
+.
+. de an-init \" We have to do it like this to get multiple man pages right.
+. ds an-title "\\$1
+. ds an-section "\\$2
+. ds an-extra1 "\\$3
+. ie \\n[.$]>3 .ds an-extra2 "\\$4
+. el .ds an-extra2 \"Sun Release 4.0
+. ie \\n[.$]>4 .ds an-extra3 "\\$5
+. el .ds an-extra3 \"System Programmer's Manual
+. ds an-init
\\..
-.DT
-.ie '\*(.T'html' \{\
-. nr IN 1.3i
-.\}
-.el \{\
-. nr IN 7.2n
-.\}
-.nr LL 6.5i
-.PD
-.nr PS 10 \" normal point-size
-.nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
-.nr an-level 1
-.set-an-margin
-.nr an-prevailing-indent \\n[IN]
-.nr an-tag-sep 1n
-.nr an-no-space-flag 0
-.nr an-break-flag 0
-.nr an-div? 0
-.wh 0 an-header
-.wh -1i an-footer
-.wh -.5i an-p-footer
-.if \\n[nl]>0 \{\
-. ie \\nC .bp \\n%+1
-. el .bp 1
-.\}
+.
+. DT
+.
+.\" use sizes similar to LaTeX
+. ie (\\nS == 11) \{\
+. nr PS 10.95z
+. nr PS-SS 10.95z
+. nr PS-SH 12z
+. nr VS 13.6p
+. \}
+. el \{\
+. ie (\\nS == 12) \{\
+. nr PS 12z
+. nr PS-SS 12z
+. nr PS-SH 14.4z
+. nr VS 14.5p
+. \}
+. el \{\
+. nr PS 10z \" default point size
+. nr PS-SS 10z
+. nr PS-SH 10.95z
+. nr VS 12p
+. \}
+. \}
+.
+. ps \\n[PS]u
+. vs \\n[VS]u
+.
+. ie '\*(.T'html' .nr IN 1.2i
+. el .nr IN 7.2n
+. nr LL 6.5i
+. PD
+. nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
+. nr an-level 1
+. set-an-margin
+. nr an-prevailing-indent \\n[IN]
+. nr an-tag-sep 1n
+.
+. nr an-no-space-flag 0
+. nr an-break-flag 0
+. nr an-div? 0
+.
+. wh 0 an-header
+. wh -1i an-footer
+. wh -.5i an-p-footer
+.
+. if (\\n[nl] > 0) \{\
+. ie \\nC .bp (\\n% + 1)
+. el .bp 1
+. \}
..
+.
.de DT
-.ta T .5i \" This sets tabs every .5 inches
+. ta T .5i \" This sets tabs every .5 inches
..
+.
.de PD
-.ie \\n[.$] .nr PD (v;\\$1)
-.el .nr PD .4v>?\n[.V]
+. ie \\n[.$] .nr PD (v;\\$1)
+. el .nr PD (.4v >? \n[.V])
..
+.
.de an-header
-.an-init
-.ev 1
-.ie '\*(.T'html' \{\
-. tl ''''
-.\}
-.el \{\
-. sp .5i
-. tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
-. sp |1i
-.\}
-.ev
-.ns
+. an-init
+. ev 1
+. ps \\n[PS]u
+. vs \\n[VS]u
+. ie '\*(.T'html' \
+. tl ''''
+. el \{\
+. sp .5i
+. tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
+. sp |1i
+. \}
+. ev
+. ns
..
+.
.de an-footer
-'bp
+' bp
..
+.
.af an-page-letter a
+.
.de an-p-footer
-.ev 1
-.ie '\*(.T'html' \{\
-. ds an-page-string "
-. ds an-extra1 "
-. ds an-extra2 "
-.\}
-.el .ds an-page-string \\n%
-.if rX \{\
-. if \\n%>\\nX \{\
-. nr an-page-letter \\n%-\\nX
-. ds an-page-string \\nX\\n[an-page-letter]
-.\}\}
-.ie \\nD \{\
-. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
-. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
-.\}
-.el .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
-.if '\*(.T'html' \{\
-. tl ''''
-.\}
-.ev
+. ev 1
+. ps \\n[PS]u
+. vs \\n[VS]u
+. ie '\*(.T'html' \{\
+. ds an-page-string "
+. ds an-extra1 "
+. ds an-extra2 "
+. \}
+. el \
+. ds an-page-string \\n%
+. if rX \{\
+. if (\\n% > \\nX) \{\
+. nr an-page-letter (\\n% - \\nX)
+. ds an-page-string \\nX\\n[an-page-letter]
+. \}
+. \}
+. ie '\*(.T'html' \
+. tl ''''
+. el \{\
+. ie \\nD \{\
+. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
+. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
+. \}
+. el \
+. tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
+. \}
+. ev
..
+.
.de SH
-.sp \\n[PD]u
-.nr an-level 1
-.set-an-margin
-.nr an-prevailing-indent \\n[IN]
-.fi
-.in \\n[an-margin]u
-.ti 0
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.ps \\n[PS]-1
-.ft B
-.ne 2v+1u
-.if \\n[.$] \&\\$*
+. sp \\n[PD]u
+. nr an-level 1
+. set-an-margin
+. nr an-prevailing-indent \\n[IN]
+. fi
+. in \\n[an-margin]u
+. ti 0
+. it 1 an-trap
+. nr an-no-space-flag 1
+. nr an-break-flag 1
+. ps \\n[PS-SH]u
+. ft B
+. ne (2v + 1u)
+. if \\n[.$] \&\\$*
..
+.
.de SS
-.sp \\n[PD]u
-.nr an-level 1
-.set-an-margin
-.nr an-prevailing-indent \\n[IN]
-.fi
-.in \\n[IN]u
-.ti \\n[SN]u
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.ps \\n[PS]
-.ft B
-.ne 2v+1u
-.if \\n[.$] \&\\$*
+. sp \\n[PD]u
+. nr an-level 1
+. set-an-margin
+. nr an-prevailing-indent \\n[IN]
+. fi
+. in \\n[IN]u
+. ti \\n[SN]u
+. it 1 an-trap
+. nr an-no-space-flag 1
+. nr an-break-flag 1
+. ps \\n[PS-SS]u
+. ft B
+. ne (2v + 1u)
+. if \\n[.$] \&\\$*
..
+.
.de B
-.it 1 an-trap
-.ft B
-.if \\n[.$] \&\\$*
+. it 1 an-trap
+. ft B
+. if \\n[.$] \&\\$*
..
+.
.de I
-.it 1 an-trap
-.ft I
-.if \\n[.$] \&\\$*
+. it 1 an-trap
+. ft I
+. if \\n[.$] \&\\$*
..
+.
.de SM
-.it 1 an-trap
-.ps -1
-.if \\n[.$] \&\\$*
+. it 1 an-trap
+. ps -1
+. if \\n[.$] \&\\$*
..
+.
.de SB
-.it 1 an-trap
-.ps -1
-.ft B
-.if \\n[.$] \&\\$*
+. it 1 an-trap
+. ps -1
+. ft B
+. if \\n[.$] \&\\$*
..
+.
.de TP
-.sp \\n[PD]u
-.if \\n[.$] .nr an-prevailing-indent (n;\\$1)
-.it 1 an-trap
-.if !\\n[an-div?] .di an-div
-.in 0
-.nr an-div? 1
+. sp \\n[PD]u
+. if \\n[.$] .nr an-prevailing-indent (n;\\$1)
+. it 1 an-trap
+. if !\\n[an-div?] .di an-div
+. in 0
+. nr an-div? 1
..
+.
.de an-trap
-.ft R
-.ps \\n[PS]
-.if \\n[an-break-flag] \{\
-. br
-. nr an-break-flag 0
-.\}
-.if \\n[an-no-space-flag] \{\
-. ns
-. nr an-no-space-flag 0
-.\}
-.if \\n[an-div?] .an-do-tag
+. ft R
+. ps \\n[PS]u
+. vs \\n[VS]u
+. if \\n[an-break-flag] \{\
+. br
+. nr an-break-flag 0
+. \}
+. if \\n[an-no-space-flag] \{\
+. ns
+. nr an-no-space-flag 0
+. \}
+. if \\n[an-div?] .an-do-tag
..
+.
.de an-do-tag
-.nr an-div? 0
-.br
-.di
-.ie \\n[dl]+\\n[an-tag-sep]>\\n[an-prevailing-indent] \{\
-. in \\n[an-margin]u
-. ne 2v+1u
-. an-div
-. br
-. in \\n[an-margin]u+\\n[an-prevailing-indent]u
-.\}
-.el \{\
-. in \\n[an-margin]u+\\n[an-prevailing-indent]u
-. ti -\\n[an-prevailing-indent]u
-. chop an-div
-. ne 1v+1u
+. nr an-div? 0
+. br
+. di
+. ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
+. in \\n[an-margin]u
+. ne (2v + 1u)
+. an-div
+. br
+. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
+. \}
+. el \{\
+. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
+. ti -\\n[an-prevailing-indent]u
+. chop an-div
+. ne (1v + 1u)
\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
-.\}
+. \}
..
+.
.de LP
-.br
-.sp \\n[PD]u
-.ps \\n[PS]
-.ft R
-.in \\n[an-margin]u
-.nr an-prevailing-indent \\n[IN]
+. br
+. sp \\n[PD]u
+. ps \\n[PS]u
+. vs \\n[VS]u
+. ft R
+. in \\n[an-margin]u
+. nr an-prevailing-indent \\n[IN]
..
+.
.als PP LP
.als P LP
+.
.de IP
-.ie !\\n[.$] \{\
-. ps \\n[PS]
-. ft R
-. sp \\n[PD]u
-. ne 1v+1u
-. in \\n[an-margin]u+\\n[an-prevailing-indent]u
-.\}
-.el \{\
-. ie \\n[.$]-1 .TP "\\$2"
-. el .TP
+. ie !\\n[.$] \{\
+. ps \\n[PS]u
+. vs \\n[VS]u
+. ft R
+. sp \\n[PD]u
+. ne (1v + 1u)
+. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
+. \}
+. el \{\
+. ie (\\n[.$] - 1) .TP "\\$2"
+. el .TP
\&\\$1
-.\}
+. \}
..
+.
.de HP
-.ps \\n[PS]
-.ft R
-.sp \\n[PD]u
-.ne 1v+1u
-.if \\n[.$] .nr an-prevailing-indent (n;\\$1)
-.in \\n[an-margin]u+\\n[an-prevailing-indent]u
-.ti \\n[an-margin]u
+. ps \\n[PS]u
+. vs \\n[VS]u
+. ft R
+. sp \\n[PD]u
+. ne (1v + 1u)
+. if \\n[.$] .nr an-prevailing-indent (n;\\$1)
+. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
+. ti \\n[an-margin]u
..
+.
.ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
+.
.de RI
-.if \\n[.$] \{\
-. ds an-result \&\\$1
-. shift
-. while \\n[.$]>=2 \{\
-. as an-result \,\fI\\$1\fR\/\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \,\fI\\$1\fR
+. if \\n[.$] \{\
+. ds an-result \&\\$1
+. shift
+. while (\\n[.$] >= 2) \{\
+. as an-result \,\fI\\$1\fR\/\\$2\\*[an-empty]
+. shift 2
+. \}
+. if \\n[.$] .as an-result \,\fI\\$1\fR
\\*[an-result]
-.\}
+. \}
..
+.
.de IR
-.if \\n[.$] \{\
-. ds an-result \&\fI\\$1\fR
-. shift
-. while \\n[.$]>=2 \{\
-. as an-result \/\\$1\fI\,\\$2\fR
-. shift 2
-. \}
-. if \\n[.$] .as an-result \/\\$1
+. if \\n[.$] \{\
+. ds an-result \&\fI\\$1\fR
+. shift
+. while (\\n[.$] >= 2) \{\
+. as an-result \/\\$1\fI\,\\$2\fR
+. shift 2
+. \}
+. if \\n[.$] .as an-result \/\\$1
\\*[an-result]
-.\}
+. \}
..
+.
.de IB
-.if \\n[.$] \{\
-. ds an-result \&\fI\\$1
-. shift
-. while \\n[.$]>=2 \{\
-. as an-result \/\\fB\\$1\fI\,\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \/\\fB\\$1
+. if \\n[.$] \{\
+. ds an-result \&\fI\\$1
+. shift
+. while (\\n[.$] >= 2) \{\
+. as an-result \/\fB\\$1\fI\,\\$2\\*[an-empty]
+. shift 2
+. \}
+. if \\n[.$] .as an-result \/\fB\\$1
\\*[an-result]
-. ft R
-.\}
+. ft R
+. \}
..
+.
.de BI
-.if \\n[.$] \{\
-. ds an-result \&\fB\\$1
-. shift
-. while \\n[.$]>=2 \{\
-. as an-result \,\fI\\$1\fB\/\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \,\fI\\$1
+. if \\n[.$] \{\
+. ds an-result \&\fB\\$1
+. shift
+. while (\\n[.$] >= 2) \{\
+. as an-result \,\fI\\$1\fB\/\\$2\\*[an-empty]
+. shift 2
+. \}
+. if \\n[.$] .as an-result \,\fI\\$1
\\*[an-result]
-. ft R
-.\}
+. ft R
+. \}
..
+.
.de RB
-.ds an-result \&
-.while \\n[.$]>=2 \{\
-. as an-result \fR\\$1\fB\\$2\\*[an-empty]
-. shift 2
-.\}
-.if \\n[.$] .as an-result \fR\\$1
+. ds an-result \&
+. while (\\n[.$] >= 2) \{\
+. as an-result \fR\\$1\fB\\$2\\*[an-empty]
+. shift 2
+. \}
+. if \\n[.$] .as an-result \fR\\$1
\\*[an-result]
-.ft R
+. ft R
..
+.
.de BR
-.ds an-result \&
-.while \\n[.$]>=2 \{\
-. as an-result \fB\\$1\fR\\$2\\*[an-empty]
-. shift 2
-.\}
-.if \\n[.$] .as an-result \fB\\$1
+. ds an-result \&
+. while (\\n[.$] >= 2) \{\
+. as an-result \fB\\$1\fR\\$2\\*[an-empty]
+. shift 2
+. \}
+. if \\n[.$] .as an-result \fB\\$1
\\*[an-result]
-.ft R
+. ft R
..
+.
.de RS
-.br
-.nr an-saved-margin\\n[an-level] \\n[an-margin]
-.nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
-.ie \\n[.$] .nr an-margin +(n;\\$1)
-.el .nr an-margin +\\n[an-prevailing-indent]
-.in \\n[an-margin]u
-.nr an-prevailing-indent \\n[IN]
-.nr an-level +1
+. br
+. nr an-saved-margin\\n[an-level] \\n[an-margin]
+. nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
+. ie \\n[.$] .nr an-margin +(n;\\$1)
+. el .nr an-margin +\\n[an-prevailing-indent]
+. in \\n[an-margin]u
+. nr an-prevailing-indent \\n[IN]
+. nr an-level +1
..
+.
.de RE
-.br
-.ie \\n[.$] .nr an-level (;\\$1)<?\\n[an-level]
-.el .nr an-level -1
-.nr an-level 1>?\\n[an-level]
-.nr an-margin \\n[an-saved-margin\\n[an-level]]
-.nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
-.in \\n[an-margin]u
+. br
+. ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
+. el .nr an-level -1
+. nr an-level (1 >? \\n[an-level])
+. nr an-margin \\n[an-saved-margin\\n[an-level]]
+. nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
+. in \\n[an-margin]u
..
+.
.ds S \s[\\n[PS]]
.ie c\[rg] .ds R \[rg]
-.el .ds R (Reg.)
+.el .ds R (Reg.)
.ie c\[tm] .ds Tm \[tm]
-.el .ds Tm (TM)
+.el .ds Tm (TM)
.ds lq \(lq
.ds rq \(rq
+.
.hy 14
+.
.\" Load local modifications.
.mso man.local
+.
.cp \n(_C
+.
+.\" end of tmac.an
diff --git a/contrib/groff/tmac/tmac.arkup b/contrib/groff/tmac/tmac.arkup
index b8c94df..ea3113d 100644
--- a/contrib/groff/tmac/tmac.arkup
+++ b/contrib/groff/tmac/tmac.arkup
@@ -1,19 +1,16 @@
.\"
-.\" a simple set of macros to provide HTML documents with basic www functionality
-.\"
-.\" please can someone with more skill at creating macros improve on this
-.\" many thanks - Gaius
-.\"
-.\" suggestion: maybe when run with non -Thtml all the urls should appear as
-.\" references.
-.\"
-.\" some simple html additions to any macro set
+.\" A simple set of macros to provide HTML documents with basic
+.\" www functionality. It will work with any macro set.
.\"
.de HTML
-.if '\*(.T'html' \X^html:\\$*^
+. if '\*(.T'html' \{\
+.\" the following line makes the vertical mode leave, so to say
+\&
+\X^html:\\$*^
+. \}
..
.de HTMLINDEX
-.if '\*(.T'html' \X^index:\\$*^
+. if '\*(.T'html' \X^index:\\$*^
..
.\"
.\" BODYCOLOR - $1 is foreground color
@@ -23,96 +20,77 @@
.\" $5 is the color of a visited hypertext link
.\"
.de BODYCOLOR
-. HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
+. HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
..
.\"
.\" BACKGROUND - $1 is the background image file
.\"
.de BACKGROUND
-. HTML <body background=\\$1>
+. HTML <body background=\\$1>
..
.\"
.\" URL - $1 is the classical underlined blue text
.\" $2 is the url
+.\" $3 is optional stuff printed immediately after $3
.\"
.de URL
-. ie '\*(.T'html' \{\
-. HTML <a href="\\$2">\\$1</a>
-. \}
-. el \{\
-\\$1 (<url: \\$2>)
-. \}
-..
-.\"
-.\" LINK - $1 is the classical underlined blue text
-.\" $2 is the URL *with* the textual reference within a document
-.\"
-.\" example: .LINK "a nice heading" "#heading123"
-.\"
-.\" provides a link from "a nice heading" to the
-.\" textual name reference "heading123"
-.\"
-.\" .LINK "The GNU FSF" "" "www.gnu.org"
-.\"
-.\" deprecated - use the URL macro instead
-.\"
-.\"
-.de LINK
-. ie !'\\$3'' \{\
-. @error the LINK macro has changed, use the URL (or FTP if appropriate) macro here
-. @error you are advised to replace with URL or FTP macro "\\$1" "\\$3#\\$2"
-. URL "\\$1" "\\$3#\\$2"
-. \}
-. el \{\
-. ie '\*(.T'html' \{\
-. HTML <a href=\\$2>\\$1</a>
-. \}
-. el \{\
-. URL "\\$1" "\\$2"
-. \}
-. \}
+. ie '\*(.T'html' \{\
+. HTML <a href="\\$2">\\$1</a>\\$3
+. \}
+. el \{\
+\\$1 \(la\fC\\$2\fP\(ra\\$3
+. \}
..
.\"
.\" FTP - $1 is the classical underlined blue text
.\" $2 is the ftp url
+.\" $3 is optional stuff printed immediately after $2
.de FTP
-. ie '\*(.T'html' \{\
-. HTML <a href=\\$2>\\$1</a>
-. \}
-. el \{\
-$1 (<ftp:\\$2>)
-. \}
+. ie '\*(.T'html' \{\
+. HTML <a href=\\$2>\\$1</a>\\$3
+. \}
+. el \{\
+\\$1 \(la\fC\\$2\fP\(ra\\$3
+. \}
..
.\"
.\" MAILTO - generate html email reference
-.\" $1 is the email address
+.\" $1 is the email address (without the `mailto:' prefix)
.\" $2 is the optional name
+.\" $3 is optional stuff printed immediately after $2 (resp. $1)
+.\"
+.\" example:
.\"
-.\" example .MAILTO fred@foo.bar "Fredrick Bloggs"
+.\" Foobar has been written by
+.\" .MAILTO fred@foo.bar "Fredrick Bloggs" .
.\"
.de MAILTO
.\"
.\" force reset after a potential heading by performing some motion..
.\" how do we do this --fixme--
.\" \h'\w' ''\h'-\w' '' doesn't work..
-. ie '\*(.T'html' \{\
-. ie '\\$2'' \{\
-. HTML "<a href=mailto:\\$1>\\$1</a>"
-. \}
-. el \{\
-. HTML "<a href=mailto:\\$1>\\$2</a>"
-. \}
-. \}
-. el \{\
-\s-2\fB<email:\\$1>\fP\s+2
-. \}
+. ie '\*(.T'html' \{\
+. ie '\\$2'' \{\
+. HTML "<a href=mailto:\\$1>\\$1</a>\\$3"
+. \}
+. el \{\
+. HTML "<a href=mailto:\\$1>\\$2</a>\\$3"
+. \}
+. \}
+. el \{\
+. ie '\\$2'' \{\
+\fC\\$1\fP\\$3
+. \}
+. el \{\
+\\$2 \(la\fC\\$1\fP\(ra\\$3
+. \}
+. \}
..
.\"
-.\"
.\" TAG - generate an html name $1
.\"
.de TAG
-.HTML <a name="\\$1"></a>
+. HTML <a name="\\$1"></a>
..
.\"
.\" IMAGE - reference an image
@@ -121,22 +99,22 @@ $1 (<ftp:\\$2>)
.\" $3 is the y width (default if absent is the x value)
.\"
.de IMAGE
-. ie '\*(.T'html' \{\
-. nr HTMLWIDTH 400
-. if '\\$2'' \{\
-. nr HTMLWIDTH \\$2
-. \}
-. nr HTMLHEIGHT \\n[HTMLWIDTH]
-. if '\\$3'' \{\
-. nr HTMLHEIGHT \\$3
-. \}
-. HTML <img src="\\$1" width=\\n[HTMLWIDTH height=\\n[HTMLHEIGHT]>
-. \}
-. el \{\
-. B1
-\fB\s-2<img src=\\$1>\fP\s+2
-. B2
-. \}
+. ie '\*(.T'html' \{\
+. nr HTMLWIDTH 400
+. if '\\$2'' \{\
+. nr HTMLWIDTH \\$2
+. \}
+. nr HTMLHEIGHT \\n[HTMLWIDTH]
+. if '\\$3'' \{\
+. nr HTMLHEIGHT \\$3
+. \}
+. HTML <img src="\\$1" width=\\n[HTMLWIDTH height=\\n[HTMLHEIGHT]>
+. \}
+. el \{\
+. B1
+\(la\fC\\$1\fP\(ra
+. B2
+. \}
..
.\"
.\" CDFTP - if we are processing this on machine \\$1 then we create a
@@ -161,18 +139,23 @@ $1 (<ftp:\\$2>)
.\" machine doing both though :-(
.\"
.\"
-.de CDFTP
-. sy /bin/rm -f /tmp/tmac.n
-. sy /bin/echo ".ds HOSTNAME `hostname --short`" > /tmp/tmac.n
-. so /tmp/tmac.n
-. sy /bin/rm -f /tmp/tmac.n
-. ie '\\*[HOSTNAME]'\\$1' \{\
-. FTP "\\$2" "\\$3"
-. \}
-. el \{\
-. URL "\\$2" "\\$4"
-. \}
+.\".de CDFTP
+.\". sy /bin/rm -f /tmp/tmac.n
+.\". sy /bin/echo ".ds HOSTNAME `hostname --short`" > /tmp/tmac.n
+.\". so /tmp/tmac.n
+.\". sy /bin/rm -f /tmp/tmac.n
+.\". ie '\\*[HOSTNAME]'\\$1' \{\
+.\". FTP "\\$2" "\\$3"
+.\". \}
+.\". el \{\
+.\". URL "\\$2" "\\$4"
+.\". \}
+.\"..
+.de LINE
+. HTML <hr>
..
+.\"
.\" it doesn't make sense to use hyphenation with html, so we turn it off.
+.\"
.hy 0
.nr HY 0
diff --git a/contrib/groff/tmac/tmac.doc b/contrib/groff/tmac/tmac.doc
index e575df7..18197f1 100644
--- a/contrib/groff/tmac/tmac.doc
+++ b/contrib/groff/tmac/tmac.doc
@@ -1536,7 +1536,7 @@
. if "\\$1"-literal" \&\\*(lI\c
. if "\\$1"-symbolic" \&\\*(sY\c
.\}
-.el .tm Usage .Bf [Em | emphasis | Li | literal | Sy | symbolic] (#\\n(.c)
+.el .tm Usage .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\\n(.c)
..
.de Ef
.ds mN Ef
diff --git a/contrib/groff/tmac/tmac.dvi b/contrib/groff/tmac/tmac.dvi
index 59c6df5..634f49f 100644
--- a/contrib/groff/tmac/tmac.dvi
+++ b/contrib/groff/tmac/tmac.dvi
@@ -2,6 +2,8 @@
.cp 0
.ftr CR CW
.ftr C CW
+.ftr CO CWI
+.ftr CI CWI
.ftr TT CW
.ftr HR H
.\" This uses the dvi-char_1 string in font CW, dvi-char_0 otherwise.
@@ -16,8 +18,16 @@
.if !c\[br] .char \[br] \Z'\v'.25m'\D'R .04m -1m''
.if !c\[ru] .char \[ru] \Z'\v'-.02m'\D'R .54m .04m''\h'.5m'
.if !c\[rn] .char \[rn] \Z'\v'-.77m'\D'R .54m .04m''\h'.5m'
-.if !c\[co] .char \[co] \z\(ci\h'\w'\(ci'u-\w'c'u/2u'c\h'\w'\(ci'u-\w'c'u/2u'
-.if !c\[rg] .char \[rg] \z\(ci\h'\w'\(ci'u-\w'r'u/2u'r\h'\w'\(ci'u-\w'r'u/2u'
+.if !c\[co] .char \[co] \
+\z\s-2\(ci\s0\
+\h'\w'\s-2\(ci\s0'u-\w'\s-4C\s0'u/2u'\
+\s-4C\s0\
+\h'\w'\s-2\(ci\s0'u-\w'\s-4C\s0'u/2u'
+.if !c\[rg] .char \[rg] \
+\z\s-2\(ci\s0\
+\h'\w'\s-2\(ci\s0'u-\w'\s-4R\s0'u/2u'\
+\s-4R\s0\
+\h'\w'\s-2\(ci\s0'u-\w'\s-4R\s0'u/2u'
.if !c\[fm] .char \[fm] \v'-.35m'\s[\\n(.s*7u/10u]\[prime]\s0\v'.35m'
.if !c\[de] .char \[de] \h'.05m'\v'-.54m'\D'c .3m'\v'.54m'\h'.05m'
.if !c\[ct] .char \[ct] \o'c/'
diff --git a/contrib/groff/tmac/tmac.html b/contrib/groff/tmac/tmac.html
index cd8a518..239ce0e 100644
--- a/contrib/groff/tmac/tmac.html
+++ b/contrib/groff/tmac/tmac.html
@@ -12,8 +12,8 @@
.char \(ul \v'.25m'\D'l .5m 0'\v'-.25m'
.char \(br \v'.25m'\D'l 0 -1m'\v'.75m'
.char \(rn \v'-.75m'\D'l .5m 0'\v'.75m'
-.char ~ \v'-.55m'\\s[\\n(.s/2u]\v'.2m'\(ti\v'-.2m'\s0\v'.55m'
-.char ^ \v'-.55m'\\s[\\n(.s/2u]\v'.3m'\(ha\v'-.3m'\s0\v'.55m'
+.\" .char ~ \v'-.55m'\\s[\\n(.s/2u]\v'.2m'\(ti\v'-.2m'\s0\v'.55m'
+.\" .char ^ \v'-.55m'\\s[\\n(.s/2u]\v'.3m'\(ha\v'-.3m'\s0\v'.55m'
.if !c\(va .char \(va \o'\(ua\(da'
.if !c\(em .char \(em --
.if !c\(en .char \(en \-
@@ -56,3 +56,5 @@
.\" it doesn't make sense to use hyphenation with html, so we turn it off.
.hy 0
.nr HY 0
+.\" avoid line breaks after hyphen-like characters.
+.cflags 0 -\(hy\(em\(en\[shc]
diff --git a/contrib/groff/tmac/tmac.latin1 b/contrib/groff/tmac/tmac.latin1
index f33ea21..b9c7473 100644
--- a/contrib/groff/tmac/tmac.latin1
+++ b/contrib/groff/tmac/tmac.latin1
@@ -15,7 +15,7 @@
.latin1-tr \[char170] \(Of
.latin1-tr \[char171] \(Fo
.latin1-tr \[char172] \(no
-.latin1-tr \[char173] \(hy
+.latin1-tr \[char173] \[shc]
.latin1-tr \[char174] \(rg
.latin1-tr \[char175] \(a-
.latin1-tr \[char176] \(de
@@ -25,7 +25,7 @@
.latin1-tr \[char180] \(aa
.latin1-tr \[char181] \(*m
.latin1-tr \[char182] \(ps
-.latin1-tr \[char183] \(md
+.latin1-tr \[char183] \(pc
.latin1-tr \[char184] \(ac
.latin1-tr \[char185] \(S1
.latin1-tr \[char186] \(Om
diff --git a/contrib/groff/tmac/tmac.lbp b/contrib/groff/tmac/tmac.lbp
new file mode 100644
index 0000000..3cba12c
--- /dev/null
+++ b/contrib/groff/tmac/tmac.lbp
@@ -0,0 +1,13 @@
+.nr _C \n(.C
+.cp 0
+.ftr CW CR
+.ftr C CR
+.ftr CO CI
+.ftr H HR
+.ftr HO HI
+.ftr HX HBI
+.ftr Hr HNR
+.ftr Hi HNI
+.ftr Hb HNB
+.ftr Hx HNBI
+.cp \n(_C
diff --git a/contrib/groff/tmac/tmac.man b/contrib/groff/tmac/tmac.man
new file mode 100644
index 0000000..70abd5b
--- /dev/null
+++ b/contrib/groff/tmac/tmac.man
@@ -0,0 +1 @@
+.do mso tmac.@TMAC_AN_PREFIX@an
diff --git a/contrib/groff/tmac/tmac.mandoc b/contrib/groff/tmac/tmac.mandoc
new file mode 100644
index 0000000..9318ad9
--- /dev/null
+++ b/contrib/groff/tmac/tmac.mandoc
@@ -0,0 +1 @@
+.do mso tmac.andoc
diff --git a/contrib/groff/tmac/tmac.markup b/contrib/groff/tmac/tmac.markup
new file mode 100644
index 0000000..3395eca
--- /dev/null
+++ b/contrib/groff/tmac/tmac.markup
@@ -0,0 +1 @@
+.do mso tmac.arkup
diff --git a/contrib/groff/tmac/tmac.mdoc b/contrib/groff/tmac/tmac.mdoc
new file mode 100644
index 0000000..d814358
--- /dev/null
+++ b/contrib/groff/tmac/tmac.mdoc
@@ -0,0 +1 @@
+.do mso tmac.doc
diff --git a/contrib/groff/tmac/tmac.me b/contrib/groff/tmac/tmac.me
new file mode 100644
index 0000000..49738b5
--- /dev/null
+++ b/contrib/groff/tmac/tmac.me
@@ -0,0 +1 @@
+.do mso tmac.e
diff --git a/contrib/groff/tmac/tmac.ms b/contrib/groff/tmac/tmac.ms
new file mode 100644
index 0000000..05f6fe4
--- /dev/null
+++ b/contrib/groff/tmac/tmac.ms
@@ -0,0 +1 @@
+.do mso tmac.@TMAC_S_PREFIX@s
diff --git a/contrib/groff/tmac/tmac.pspic b/contrib/groff/tmac/tmac.pspic
index b47e4fa..55e51b3 100644
--- a/contrib/groff/tmac/tmac.pspic
+++ b/contrib/groff/tmac/tmac.pspic
@@ -1,15 +1,6 @@
.\" Define the PSPIC macro.
.\" When used other than with -Tps, it will draw a box around where
.\" the picture would go.
-.de ps-bb
-.nr ps-nargs \\n[.$]
-.if \\n[ps-nargs]=4 \{\
-. nr ps-llx 0\\$1
-. nr ps-lly 0\\$2
-. nr ps-urx 0\\$3
-. nr ps-ury 0\\$4
-.\}
-..
.de PSPIC
.nr ps-offset-mode 0
.if '\\$1'-L' \{\
@@ -26,12 +17,10 @@
. shift 2
.\}
.br
-.sy echo .ps-bb `psbb \\$1` >/tmp/psbb\\n[$$]
-.so /tmp/psbb\\n[$$]
-.sy rm /tmp/psbb\\n[$$]
-.if \\n[ps-nargs]=4 \{\
-. nr ps-wid (\\n[ps-urx]-\\n[ps-llx])
-. nr ps-ht (\\n[ps-ury]-\\n[ps-lly])
+.psbb \\$1
+.if (\\n[llx] : \\n[lly] : \\n[urx] : \\n[ury]) \{\
+. nr ps-wid (\\n[urx]-\\n[llx])
+. nr ps-ht (\\n[ury]-\\n[lly])
. if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid]
. if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht]
. ie \\n[.$]>=2 .nr ps-deswid (i;\\$2)
@@ -54,7 +43,7 @@
\Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
\X'ps: endinvis'\
\v'\\n[ps-desht]u'\X'ps: import \\$1 \
-\\n[ps-llx] \\n[ps-lly] \\n[ps-urx] \\n[ps-ury] \\n[ps-deswid] \\*[ps-desht]'
+\\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[ps-deswid] \\*[ps-desht]'
. br
. sp \\n[ps-desht]u
.\}
diff --git a/contrib/groff/tmac/tmac.s b/contrib/groff/tmac/tmac.s
index 547f862..6770b0d 100644
--- a/contrib/groff/tmac/tmac.s
+++ b/contrib/groff/tmac/tmac.s
@@ -70,8 +70,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.ds MONTH11 November
.ds MONTH12 December
.ds MO \\*[MONTH\n[mo]]
-.nr *year \n[yr]+1900
-.ds DY \n[dy] \*[MO] \n[*year]
+.ds DY \n[dy] \*[MO] \n[year]
.de ND
.if \\n[.$] .ds DY "\\$*
..
diff --git a/contrib/groff/tmac/tmac.safer b/contrib/groff/tmac/tmac.safer
index be348d5..caabb5b 100644
--- a/contrib/groff/tmac/tmac.safer
+++ b/contrib/groff/tmac/tmac.safer
@@ -1,4 +1,6 @@
.\" remove unsafe requests
+.nr _C \n(.C
+.cp 0
.rm open opena pso sy pi
.de unsafe
.tm \\n(.F:\\n(.c: unsafe to execute request `\\$1'
@@ -8,3 +10,4 @@
.als pso unsafe
.als sy unsafe
.als pi unsafe
+.cp \n(_C
diff --git a/contrib/groff/tmac/tmac.tty b/contrib/groff/tmac/tmac.tty
index 419a685..115c9d3 100644
--- a/contrib/groff/tmac/tmac.tty
+++ b/contrib/groff/tmac/tmac.tty
@@ -4,11 +4,12 @@
.\" Don't warn about non-existent fonts.
.warn \n[.warn]-(\n[.warn]/131072%2*131072)
.po 0
-.if c\[char173] .shc \[char173]
+.if c\[shc] .shc \[shc]
.de tty-char
.if !c\\$1 .char \\$1 "\\$2
..
-.if c\(md .tr \(bu\(md
+.ie c\(pc .tr \(bu\(pc
+.el .if c\(md .tr \(bu\(md
.tty-char \(bu \z+o
.tty-char \(14 1/4
.tty-char \(12 1/2
diff --git a/contrib/groff/tmac/tmac.tty-char b/contrib/groff/tmac/tmac.tty-char
index f66d7a8..e8a45f9 100644
--- a/contrib/groff/tmac/tmac.tty-char
+++ b/contrib/groff/tmac/tmac.tty-char
@@ -1,8 +1,8 @@
.\" This file defines standard troff characters and some groff characters for
-.\" use with -Tascii and -Tlatin1.
+.\" use with -Tascii, -Tlatin1, -Tutf8, and -Tcp1047.
.\"
.\" These definitions are chosen so that, as far as possible, they:
-.\" - work with both -Tascii and -Tlatin1.
+.\" - work with all of -Tascii, -Tlatin1, -Tutf8, and -Tcp1047.
.\" - work on devices that display only the last overstruck character
.\" as well as on devices that support overstriking
.\" - represent the character's graphical shape (not its meaning)
@@ -85,7 +85,9 @@
.tty-char \(OR v
.tty-char \(uA \z=^
.tty-char \(dA \z=v
-.if c\(md .tty-char \(a. \(md
+.if c\(md .tty-char \(pc \(md
+.if c\(pc .tty-char \(md \(pc
+.if c\(pc .tty-char \(a. \(pc
.tty-char \(Im I
.tty-char \(Re R
.tty-char \(/L \z/L
@@ -128,6 +130,7 @@
.tty-char \(S3 3
.tty-char \(ps 9|
.tty-char \(md .
+.tty-char \(pc .
.tty-char \(ac ,
.tty-char \(S1 1
.tty-char \(Om \z_o
@@ -195,4 +198,5 @@
.\"tty-char \(:y \ij
.tty-char \[arrowvertex] |
.cp \n(_C
-.do mso tmac.latin1
+.if !'\*(.T'cp1047' \
+. do mso tmac.latin1
diff --git a/contrib/groff/tmac/troffrc b/contrib/groff/tmac/troffrc
index 1902443..e61319d 100644
--- a/contrib/groff/tmac/troffrc
+++ b/contrib/groff/tmac/troffrc
@@ -12,13 +12,17 @@
.do ds troffrc!X100-12 tmac.X
.do ds troffrc!ascii tmac.tty
.do ds troffrc!latin1 tmac.tty
+.do ds troffrc!utf8 tmac.tty
+.do ds troffrc!cp1047 tmac.tty
.do ds troffrc!lj4 tmac.lj4
-.do ds troffrc!html tmac.html
+.do ds troffrc!lbp tmac.lbp
+.do ds troffrc!html tmac.arkup
.do if d troffrc!\*[.T] \
. do mso \*[troffrc!\*[.T]]
.do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \
-troffrc!X100 troffrc!X100-12 troffrc!lj4 troffrc!html
-.do tr \[char160]
+troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp troffrc!html
+.ie '\*(.T'cp1047' .do tr \[char65]
+.el .do tr \[char160]
.\" Set the hyphenation language to `us'.
.do hla us
.\" Load hyphenation patterns from `hyphen.us' (in the tmac directory).
diff --git a/contrib/groff/tmac/troffrc-end b/contrib/groff/tmac/troffrc-end
new file mode 100644
index 0000000..edd23e4
--- /dev/null
+++ b/contrib/groff/tmac/troffrc-end
@@ -0,0 +1,6 @@
+.\"
+.\" final startup file for troff
+.\" this file is parsed after all macro sets have been read
+.\"
+.if '\*(.T'html' .mso tmac.html
+.\" Don't let blank lines creep in here. \ No newline at end of file
OpenPOWER on IntegriCloud