gbranden pushed a commit to branch master
in repository groff.
commit 977caeb8a7420cf24541b78e4ccb45c736a24a77
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jul 2 20:22:54 2024 -0500
[mm]: Improve overlong mark detection.
* contrib/mm/m.tmac (LI): Improve overlong mark detection: count the
padding since it can throw off the alignment of indented text.
---
contrib/mm/ChangeLog | 5 +++++
contrib/mm/m.tmac | 14 +++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index be5594734..916c90e6a 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,8 @@
+2024-07-02 G. Branden Robinson <[email protected]>
+
+ * m.tmac (LI): Improve overlong mark detection: count the
+ padding since it can throw off the alignment of indented text.
+
2024-07-02 G. Branden Robinson <[email protected]>
* m.tmac (AL, RL): Reduce "pad" argument to `LB` call from 2
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index c63d92f47..195f584e0 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2382,11 +2382,15 @@ ML, RL, VL, or LB first
. el .ds li*c-mark \\$1\ \\*[li*c-mark]
.\}
.nr li*c-pad \\n[li*pad]
-.\"
-.\" determine where the text begins
-.if (\\n[li*type]>=0)&(\w'\\*[li*c-mark]'>\\n[li*tind]) \{\
-. @warning \\$0: overlong mark '\\*[li*c-mark]'
-. nr li*c-pad 1n \" force item/mark separation
+.\" Compute width of the mark plus the padding after it.
+.if \\n[li*type]>=0 \{\
+. nr li*markpad \w'\\*[li*c-mark]'+\\n[li*c-pad]
+. if \\n[li*markpad]>\\n[li*tind] \{\
+. @warning \\$0: overlong mark '\\*[li*c-mark]'
+. \" Force (minimal) item/mark separation.
+. nr li*c-pad 1n
+. rr li*markpad
+. \}
.\}
.nr li*text-begin \\n[li*tind]>?(\w@\\*[li*c-mark]@+\\n[li*c-pad])
.\"
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit