summaryrefslogtreecommitdiffstats
path: root/contrib/groff/tmac/an-old.tmac
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/groff/tmac/an-old.tmac')
-rw-r--r--contrib/groff/tmac/an-old.tmac65
1 files changed, 51 insertions, 14 deletions
diff --git a/contrib/groff/tmac/an-old.tmac b/contrib/groff/tmac/an-old.tmac
index 063ebce..b51f2e2 100644
--- a/contrib/groff/tmac/an-old.tmac
+++ b/contrib/groff/tmac/an-old.tmac
@@ -1,6 +1,6 @@
.\" an-old.tmac
.\"
-.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003
+.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005
.\" Free Software Foundation, Inc.
.\" Written by James Clark (jjc@jclark.com)
.\"
@@ -18,7 +18,7 @@
.\"
.\" 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.
+.\" Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.\"
.\" -rcR=1 => Create a single, very long page instead of multiple pages.
.\" Useful for online display. Default in nroff mode.
@@ -38,6 +38,8 @@
.
.do if d RI .nx
.
+.do mso devtag.tmac
+.
.nr _C \n(.C
.cp 0
.
@@ -58,10 +60,29 @@
. el .nr cR 0
.\}
.
+.nr need_eo_h 0
+.
+.\" set up the line length...
+.\" giving precedence to any prior assignment to the \n[LL] register.
.if !r LL \{\
-. ie n .nr LL 78n
-. el .nr LL 6.5i
+.
+. \" but if that isn't predefined...
+. \" then try to respect any prior `.ll' request.
+. nr LL \n[.l]
+.
+. \" For troff, this is sufficient to give us a default line length of
+. \" 6.5i, but for nroff, we prefer a default of 78n to nroff's default
+. \" 65n. This has the unfortunate side effect that we will override a
+. \" user's `.ll 65n' request, with our preferred 78n default; we can't
+. \" possibly know that the 65n came from a `.ll' request, and MUST
+. \" assume that it was set by nroff, as its built-in default! If the
+. \" user wants to force this setting, then he MUST use the `-rLL=65n'
+. \" option, or an equivalent `.nr LL 65n' request.
+. if n \
+. if (\n[LL] = 65n) \
+. nr LL 78n
.\}
+.
.if !r LT \
. nr LT \n[LL]
.
@@ -77,17 +98,27 @@
.if \n[an-html] .nr C 1
.if r ps4html .nr C 1
.
-.\" we redefine .ne to avoid page breaks; instead, the page length is
-.\" increased to the necessary amount (this is needed for tables)
-.if n \{\
+.\" we redefine .ne to avoid page breaks if cR is set; instead, the page
+.\" length is increased to the necessary amount (this is needed for tables)
+.\"
+.\" similarly, we redefine .bp if cR is set, adjusting the page length to
+.\" the current position so that no empty lines are inserted
+.if \n[cR] \{\
. de1 ne
. ie \\n[.$] \
-. nr an-ne \\$*
+. nr an-ne (v;\\$*)
. el \
. nr an-ne 1v
. if (\\n[an-ne] >= \\n[.t]) \
. pl +(\\n[an-ne]u - \\n[.t]u + 1v)
. .
+.
+. rn bp an-bp
+. de1 bp
+. br
+. pl \\n[nl]u
+. an-bp \\$*
+. .
.\}
.
.de set-an-margin
@@ -97,8 +128,9 @@
.\" .TH title section extra1 extra2 extra3
.de1 TH
. if \\n[an-html] \{\
-. HTML-TAG-NS ".tl"
+. DEVTAG-TL
\\$1
+. DEVTAG-EO-TL
. \}
.
. de an-init \" We have to do it like this to get multiple man pages right.
@@ -300,7 +332,8 @@
. fi
. in \\n[an-margin]u
. ti 0
-. HTML-TAG-NS ".NH \\n[an-level]"
+. nr need_eo_h 1
+. DEVTAG-NH \\n[an-level]
. it 1 an-trap
. nr an-no-space-flag 1
. nr an-break-flag 1
@@ -363,6 +396,8 @@
..
.
.de1 an-trap
+. if \\n[need_eo_h]>0 .DEVTAG-EO-H
+. nr need_eo_h 0
. ft R
. ps \\n[PS]u
. vs \\n[VS]u
@@ -397,9 +432,9 @@
. ti -\\n[an-prevailing-indent]u
. chop an-div
. ne (1v + 1u)
-. HTML-TAG-NS ".col 1"
+. DEVTAG-COL 1
\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
-. HTML-TAG-NS ".col 2"
+. DEVTAG-COL-NEXT 2
. \}
..
.
@@ -446,14 +481,15 @@
.
.de1 RI
. if \\n[.$] \{\
-. ds an-result \&\\$1
+. ds an-result \&\f[R]\\$1
. shift
. while (\\n[.$] >= 2) \{\
. as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
. shift 2
. \}
-. if \\n[.$] .as an-result \,\f[I]\\$1\f[R]
+. if \\n[.$] .as an-result \,\f[I]\\$1
\\*[an-result]
+. ft R
. \}
..
.
@@ -467,6 +503,7 @@
. \}
. if \\n[.$] .as an-result \/\\$1
\\*[an-result]
+. ft R
. \}
..
.
OpenPOWER on IntegriCloud