groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/07: [ms]: Add string FR for footnote ratio expression.


From: G. Branden Robinson
Subject: [groff] 01/07: [ms]: Add string FR for footnote ratio expression.
Date: Fri, 29 Jan 2021 16:21:46 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 7ededa13fab44eb517e98ff50eec75c4137fbcf5
Author: T. Kurt Bond <tkurtbond@gmail.com>
AuthorDate: Wed Dec 2 21:33:42 2020 +0000

    [ms]: Add string FR for footnote ratio expression.
    
    [ms]: Add new string FR to hold an expression for computing the footnote
    length relative to the line length, consistently for single- and
    multi-column modes, which \n[FL] has never done.
    
    * tmac/s.tmac: Initialize FR string to "11/12".
      (@MC): Compute footnote column width using \*[FR] instead of a
      hard-coded "11/12" expression.
      (par@init): Compute default \n[FL] using \*[FR] instead of a
      hard-coded "11/12" expression.
    
    * doc/groff.texi (Macro Packages/ms/Document control settings):
    * tmac/groff_ms.7.man (Usage/Document control registers): Document it.
    
    Fixes <https://savannah.gnu.org/bugs/?59605>.
---
 ChangeLog           | 18 ++++++++++++++++++
 doc/groff.texi      |  9 +++++++++
 tmac/groff_ms.7.man | 12 ++++++++++--
 tmac/s.tmac         |  8 +++++---
 4 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cf80715..f1a68ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2021-01-29  T. Kurt Bond <tkurtbond@gmail.com>
+
+       [ms]: Add new string FR to hold an expression for computing the
+       footnote length relative to the line length, consistently for
+       single- and multi-column modes, which \n[FL] has never done.
+
+       * tmac/s.tmac: Initialize FR string to "11/12".
+       (@MC): Compute footnote column width using \*[FR] instead of a
+       hard-coded "11/12" expression.
+       (par@init): Compute default \n[FL] using \*[FR] instead of a
+       hard-coded "11/12" expression.
+
+       * doc/groff.texi (Macro Packages/ms/Document control settings):
+       * tmac/groff_ms.7.man (Usage/Document control registers):
+       Document it.
+
+       Fixes <https://savannah.gnu.org/bugs/?59605>.
+
 2021-01-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/env.cpp: Add ADJUST_MAX enumeration constant to
diff --git a/doc/groff.texi b/doc/groff.texi
index d81e592..01b9e20 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -2874,6 +2874,15 @@ Effective: next footnote.
 Default: @math{@code{@\n[PD]} / 2}.
 @endDefmpreg
 
+@DefstrList {FR, ms}
+Defines the ratio of the footnote line length to the current line
+length.
+
+Effective: start of document or before each @code{.MC} or @code{.2C}.
+
+Default: @math{11/12}.
+@endDefmpreg
+
 @unnumberedsubsubsec Miscellaneous Registers
 
 @Defmpreg {MINGW, ms}
diff --git a/tmac/groff_ms.7.man b/tmac/groff_ms.7.man
index faac6b5..f991eda 100644
--- a/tmac/groff_ms.7.man
+++ b/tmac/groff_ms.7.man
@@ -8,7 +8,7 @@ groff_ms \- GNU roff manuscript macro package for formatting 
documents
 .\" Legal Terms
 .\" ====================================================================
 .\"
-.\" Copyright (C) 1989-2020 Free Software Foundation, Inc.
+.\" Copyright (C) 1989-2021 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
@@ -237,15 +237,23 @@ cb   cb cb cb
 lfCR l  l  l.
 Reg.   Definition      Effective       Default
 _
-FL     Footnote length next footnote   \[rs]n[LL]*5/6
+FL     Footnote length T{
+next footnote; not effective in multicolumn mode
+T}     \[rs]n[LL]*\[rs]*[FR]
 FI     Footnote indent next footnote   2n
 FF     Footnote format next footnote   0
 FPS    Point size      next footnote   \[rs]n[PS]\-2
 FVS    Vert.\& spacing next footnote   \[rs]n[FPS]+2
 FPD    Para.\& spacing next footnote   \[rs]n[PD]/2
+FR     Footnote ratio  T{
+before first paragraph, or before each .MC
+T}     11/12
 _
 .TE
 .RE
+.LP
+Note that \f[CW]FR\fP is a string variable and should be set with  the
+\fBds\fP request.
 .
 .LP
 .ne 6
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 476e479..252b5a6 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -2,7 +2,7 @@
 
 s.tmac
 
-Copyright (C) 1989-2020 Free Software Foundation, Inc.
+Copyright (C) 1989-2021 Free Software Foundation, Inc.
      Written by James Clark (jjc@jclark.com)
 
 This file is part of groff.
@@ -532,7 +532,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .DEVTAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]"
 .ns
 .nr pg*col-num 0
-.nr pg@fn-colw \\n[pg@colw]*11/12
+.nr pg@fn-colw \\n[pg@colw]*\\*[FR]
 .par@reset
 .mk pg*col-top
 ..
@@ -1094,7 +1094,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .\" happens when the first page begins
 .de par@init
 .if !rLT .nr LT \\n[LL]
-.if !rFL .nr FL \\n[LL]*11/12
+.if !rFL .nr FL \\n[LL]*\\*[FR]
 .if !rVS \{\
 .      ie (\\n[PS] >= 1000) \
 .              nr VS (\\n[PS] + 2000)
@@ -1520,6 +1520,8 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .ds par@sub-end \v'+.1m\s0-.3m'
 .als > par@sub-end
 .\" footnote paragraphs
+.\" FR is the ratio of footnote (horizontal) length to the line length
+.ds FR 11/12
 .\" FF is the footnote format
 .nr FF 0
 .\" This can be redefined. It gets a second argument of 'no' if the



reply via email to

[Prev in Thread] Current Thread [Next in Thread]