[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Simplify behaviour of .Bl -tag
From: |
Carsten Kunze |
Subject: |
[groff] 01/01: Simplify behaviour of .Bl -tag |
Date: |
Sat, 8 Oct 2016 19:30:06 +0000 (UTC) |
carstenkunze pushed a commit to branch master
in repository groff.
commit aa28f0c99880e14a9ca024495022db908343eec1
Author: Ingo Schwarze <address@hidden>
Date: Sat Oct 8 21:27:34 2016 +0200
Simplify behaviour of .Bl -tag
See https://savannah.gnu.org/bugs/index.php?49272
---
ChangeLog | 28 ++++++++++++++++++++++++++
tmac/doc.tmac-u | 53 +------------------------------------------------
tmac/groff_mdoc.7.man | 10 ++--------
3 files changed, 31 insertions(+), 60 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 62f7ded..0dbb19a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2016-10-05 Ingo Schwarze <address@hidden>
+
+ * tmac/doc.tmac-u: Simplify behaviour of .Bl -tag
+ * tmac/groff_mdoc.7.man: Update documentation to the new
+ behaviour of .Bl -tag
+
+ If an mdoc(7) .Bl -tag macro lacks the -width argument, the
+ body indentation is calculated separately for each child .It
+ macro. Neither the Heirloom nor the mandoc(1) implementation
+ of the mdoc(7) language show such behaviour; both use a
+ constant default width for the whole list in that case.
+
+ Apart from doubts whether lists with variable indentation are
+ typographically sound in the first place, support for variable
+ widths in groff is so restricted that it's practically
+ useless. For each .It, the width will be the default width of
+ whatever happens to be the leading macro after the .It, or of
+ .No if .It is not followed by a macro.
+
+ See
+
+ https://savannah.gnu.org/bugs/index.php?49272
+
+ and
+
+ http://lists.gnu.org/archive/html/groff/2016-10/msg00006.html
+
+
2016-09-09 Werner LEMBERG <address@hidden>
* tmac/sv.tmac: Fix `.hy' settings (#48904).
diff --git a/tmac/doc.tmac-u b/tmac/doc.tmac-u
index 8b351b4..93d5248 100644
--- a/tmac/doc.tmac-u
+++ b/tmac/doc.tmac-u
@@ -2990,6 +2990,7 @@
. \}
. el \{ .ie "\$1"-tag" \{\
. ds doc-list-type-stack\n[doc-list-depth] tag-list
+. nr doc-list-indent-stack\n[doc-list-depth] 6n
. nr doc-list-have-indent-stack\n[doc-list-depth] 1
. \}
. el \{ .ie "\$1"-item" \{\
@@ -3105,7 +3106,6 @@
.\" NS doc-list-offset-stackXXX
.\" NS doc-num-columns
.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
.\" NS
.\" NS local variables:
.\" NS doc-box-dBla
@@ -3148,8 +3148,6 @@
.
. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
. nr doc-arg-ptr +1
-. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
-.
. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
. substring doc-str-dBla 0 0
. ie .\*[doc-str-dBla] \{\
@@ -3394,7 +3392,6 @@
. nr doc-list-indent-stack\n[doc-reg-dsgv]-saved
\n[doc-list-indent-stack\n[doc-reg-dsgv]]
. nr doc-compact-list-stack\n[doc-reg-dsgv]-saved
\n[doc-compact-list-stack\n[doc-reg-dsgv]]
. ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved
"\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
-. ds doc-tag-width-stack\n[doc-reg-dsgv]-saved
"\*[doc-tag-width-stack\n[doc-reg-dsgv]]
. nr doc-list-offset-stack\n[doc-reg-dsgv]-saved
\n[doc-list-offset-stack\n[doc-reg-dsgv]]
. nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved
\n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
. nr doc-reg-dsgv +1
@@ -3538,7 +3535,6 @@
. nr doc-list-indent-stack\n[doc-reg-drgv]
\n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
. nr doc-compact-list-stack\n[doc-reg-drgv]
\n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
. ds doc-tag-prefix-stack\n[doc-reg-drgv]
"\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
-. ds doc-tag-width-stack\n[doc-reg-drgv]
"\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
. nr doc-list-offset-stack\n[doc-reg-drgv]
\n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
. nr doc-enum-list-count-stack\n[doc-reg-drgv]
\n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
. nr doc-reg-drgv +1
@@ -4030,13 +4026,6 @@
. ev
. box
.
-. if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
-. if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
-. in -(\n[doc-list-indent-stack\n[doc-list-depth]]u +
\n[doc-digit-width]u)
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. doc-get-tag-width
-. \}
. doc-set-vertical-and-indent 1
. nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u +
\n[doc-digit-width]u)
. ti -\n[doc-reg-dtl]u
@@ -4064,29 +4053,6 @@
..
.
.
-.\" NS doc-get-tag-width macro
-.\" NS resolve unknown tag width (`tag' list-type only)
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS
-.\" NS requires:
-.\" NS doc-curr-arg
-.\" NS doc-curr-type
-.
-.de doc-get-tag-width
-. ie (\n[doc-curr-type] == 1) \{\
-. ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
-. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
-. \}
-. el \{\
-. ds doc-tag-width-stack\n[doc-list-depth] No
-. nr doc-list-indent-stack\n[doc-list-depth] \n[No]
-. \}
-..
-.
-.
.\" NS doc-set-vertical-and-indent macro
.\" NS set up vertical spacing (if not compact) and indentation (with
.\" NS offset if argument is non-zero)
@@ -4139,19 +4105,6 @@
.ds doc-tag-prefix-stack1
.
.
-.\" NS doc-tag-width-stackXXX global string
-.\" NS stack of strings indicating how to set up current element of
-.\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
-.\" NS directly; if it is a macro name, use the macro's width value;
-.\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-tag-width-stack0
-.ds doc-tag-width-stack1
-.
-.
.\" NS doc-list-offset-stackXXX global register
.\" NS stack of list offsets
.\" NS
@@ -4193,7 +4146,6 @@
.\" NS doc-list-offset-stackXXX
.\" NS doc-list-type-stackXXX
.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
.\" NS doc-enum-list-count-stackXXX
.\" NS
.\" NS local variables:
@@ -4205,7 +4157,6 @@
. nr doc-list-indent-stack\n[doc-reg-dils] 0
. nr doc-list-offset-stack\n[doc-reg-dils] 0
. ds doc-tag-prefix-stack\n[doc-reg-dils]
-. ds doc-tag-width-stack\n[doc-reg-dils]
\*[doc-tag-width-stack\n[doc-list-depth]]
. ds doc-list-type-stack\n[doc-reg-dils]
. nr doc-compact-list-stack\n[doc-reg-dils] 0
. nr doc-enum-list-count-stack\n[doc-reg-dils] 0
@@ -4222,7 +4173,6 @@
.\" NS doc-list-offset-stackXXX
.\" NS doc-list-type-stackXXX
.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
.\" NS doc-enum-list-count-stackXXX
.
.de doc-decrement-list-stack
@@ -4231,7 +4181,6 @@
. nr doc-list-indent-stack\n[doc-list-depth] 0
. nr doc-list-offset-stack\n[doc-list-depth] 0
. ds doc-tag-prefix-stack\n[doc-list-depth]
-. ds doc-tag-width-stack\n[doc-list-depth]
. nr doc-compact-list-stack\n[doc-list-depth] 0
. nr doc-enum-list-count-stack\n[doc-list-depth] 0
..
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index 12416da..5968d0b 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -3925,14 +3925,8 @@ the width of
.Aq Ar string
(typeset with a fixed-width font) is taken as the width.
.Pp
-If a width is not specified for the tag list type, every time
-.Ql .It
-is invoked, an attempt is made to determine an appropriate width.
-If the first argument to
-.Ql .It
-is a callable macro, the default width for that macro will be used;
-otherwise, the default width of
-.Ql .No
+If a width is not specified for the tag list type,
+.Sq 6n
is used.
.It Fl offset Ao Ar string Ac
If
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Simplify behaviour of .Bl -tag,
Carsten Kunze <=