summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-06-05 19:09:56 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-06-05 19:09:56 +0000
commite99e5aa449d5f212558414205af36c47d1ee60bb (patch)
tree133230c477375170a82488ef35c019c1884b8f36 /gnu
parente46f8ac9ef86ab5709bb4cccb665cedaa1ca708b (diff)
Increase the -man -Tascii text width from 65 to 78 characters
in both our old in-tree groff and in mandoc, because 1) It looks and reads better. 2) It agrees with both bsd.lv mandoc and with modern groff. The tmac.an part was done by millert@, with a minor fix by me. While touching our old groff, switch off hyphenation, suggested a long time ago by millert@. It helps searching and comparisons. While touching mandoc terminal_man(), explicitely initialize the tabwidth - not strictly required, but easier to understand and more robust, also suggested by millert@. General mumbling of agreement by many, including millert@ deraadt@ jmc@ sobrado@ ... Remaining problem: Setting the title length (.lt) has no effect for me, but we can fix this in tree in case anybody figures it out.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/groff/tmac/tmac.an65
-rw-r--r--gnu/usr.bin/groff/tmac/troffrc7
2 files changed, 56 insertions, 16 deletions
diff --git a/gnu/usr.bin/groff/tmac/tmac.an b/gnu/usr.bin/groff/tmac/tmac.an
index 9f1dba7e465..95059d6c2b7 100644
--- a/gnu/usr.bin/groff/tmac/tmac.an
+++ b/gnu/usr.bin/groff/tmac/tmac.an
@@ -31,6 +31,14 @@
.if !rD .nr D 0
.if !rC .nr C 0
.if rP .pn 0\nP
+.de set-an-margin
+. ie '\*(.T'html' \{\
+. nr an-margin 0i
+. \}
+. el \{\
+. nr an-margin \\n[IN]
+. \}
+..
.\" .TH title section extra1 extra2 extra3
.de TH
.cp 0
@@ -41,17 +49,33 @@
.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 \"UNIX Programmer's Manual
+.el .ds an-extra3 \"System Programmer's Manual
.ds an-init
\\..
.DT
-.nr IN 7.2n
-.nr LL 6.5i
+.ie '\*(.T'html' \{\
+. nr IN 1.3i
+.\}
+.el \{\
+. nr IN 7.2n
+.\}
+.if n \{\
+. nr ll 78n
+. ll 78n
+. nr lt 78n
+. lt 78n
+.\}
+.el \{\
+. nr ll 6.5i
+. ll 6.5i
+. nr lt 6.5i
+. lt 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
-.nr an-margin \\n[IN]
+.set-an-margin
.nr an-prevailing-indent \\n[IN]
.nr an-tag-sep 1n
.nr an-no-space-flag 0
@@ -75,9 +99,14 @@
.de an-header
.an-init
.ev 1
-.sp .5i
-.tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
-.sp |1i
+.ie '\*(.T'html' \{\
+. tl ''''
+.\}
+.el \{\
+. sp .5i
+. tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
+. sp |1i
+.\}
.ev
.ns
..
@@ -87,7 +116,12 @@
.af an-page-letter a
.de an-p-footer
.ev 1
-.ds an-page-string \\n%
+.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
@@ -98,15 +132,18 @@
. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
.\}
.el .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
+.if '\*(.T'html' \{\
+. tl ''''
+.\}
.ev
..
.de SH
.sp \\n[PD]u
.nr an-level 1
-.nr an-margin \\n[IN]
+.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
-.in \\n[IN]u
+.in \\n[an-margin]u
.ti 0
.it 1 an-trap
.nr an-no-space-flag 1
@@ -119,7 +156,7 @@
.de SS
.sp \\n[PD]u
.nr an-level 1
-.nr an-margin \\n[IN]
+.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[IN]u
@@ -178,14 +215,16 @@
.nr an-div? 0
.br
.di
-.in \\n[an-margin]u+\\n[an-prevailing-indent]u
-.ti -\\n[an-prevailing-indent]u
.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
diff --git a/gnu/usr.bin/groff/tmac/troffrc b/gnu/usr.bin/groff/tmac/troffrc
index c8d70920a97..8d99e96c9a1 100644
--- a/gnu/usr.bin/groff/tmac/troffrc
+++ b/gnu/usr.bin/groff/tmac/troffrc
@@ -13,13 +13,14 @@
.do ds troffrc!ascii tmac.tty
.do ds troffrc!latin1 tmac.tty
.do ds troffrc!lj4 tmac.lj4
+.do ds troffrc!html tmac.html
.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!X100 troffrc!X100-12 troffrc!lj4 troffrc!html
.do tr \[char160]
.\" Set the hyphenation language to `us'.
-.do hla us
+.\" .do hla us
.\" Load hyphenation patterns from `hyphen.us' (in the tmac directory).
-.do hpf hyphen.us
+.\" .do hpf hyphen.us
.\" Don't let blank lines creep in here.