[Top][All Lists]

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

Footnote line length ratio to current line length

From: T . Kurt Bond
Subject: Footnote line length ratio to current line length
Date: Thu, 06 Aug 2020 11:53:38 -0400 (EDT)

groff_ms(7) says that changing the number register FL is effective at
the next footnote.  That seems to be true only for one column text.

In multicolumn text you have to change the undocumented fn:MCLL after
calling .MC.  fn:MCLL is an alias for the number register pg@fn-colw,
which is set when .MC is called.  (.2C calls .MC to do the work, so
we only have to worry about .MC.)

Is fn:MCLL intended to be ms internal use only, or is intended to be
available to users?

If you don't set either FL or fn:MCLL the groff ms macros default to
making the footnote length 5/6 the length of the current line length.

I don't like having the line length of the footnotes only 5/6 the
width of the columns: I like them to be the full width of the current
line, whether that is in one column mode or multicolumn mode.  I'd
like to be able to change that default, to avoid having to change the
footnote line length in multicolumn mode using the undocumented

I propose adding a string variable, FR (footnote ratio), that defaults
to to 5/6 for compatibility and replaces the uses of the literal 5/6
for setting footnote line length.  You can set this at the beginning
of your document, or before each .MC or .2C.  For my use I'd always
set it to 1, making the footnote line length the same as the line

(I think making setting FR effective before the next footnote, like
setting FL in one column mode, would take rewriting par@reset to
recalculate fn:MCLL every time, instead of just after a .MC.)

Here's a patch:
===== footnote-ratio.patch =================================
diff --git a/doc/groff.texi b/doc/groff.texi
index 75b08a5f..f72bda49 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -2774,6 +2774,15 @@ Effective: next footnote.
 Default: @math{@code{@\n[PD]} / 2}.
+@DefstrList {FR, ms}
+Defines the ratio of the footnote line length to the current line
+Effective: start of document or before each @code{.MC} or @code{.2C}.
+Default: @math{5/6}.
 @unnumberedsubsubsec Miscellaneous Number Registers
 @Defmpreg {MINGW, ms}
diff --git a/tmac/ b/tmac/
index 83a6cefc..858ad699 100644
--- a/tmac/
+++ b/tmac/
@@ -235,15 +235,23 @@ cb   cb cb cb
 lfCW 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}     5/6
+Note that \f[CW]FR\fP is a string variable and should be set with  the
+\fBds\fP request.
 .ne 6
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 180a9f81..8f03878f 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -514,7 +514,7 @@ along with this program.  If not, see 
 .DEVTAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]"
 .nr pg*col-num 0 pg@fn-colw \\n[pg@colw]*5/6 pg@fn-colw \\n[pg@colw]*\\*[FR]
 .mk pg*col-top
@@ -1077,7 +1077,7 @@ along with this program.  If not, see 
 .\" happens when the first page begins
 .de par@init
 .if !rLT .nr LT \\n[LL]
-.if !rFL .nr FL \\n[LL]*5/6
+.if !rFL .nr FL \\n[LL]*\\*[FR]
 .if !rVS \{\
 .      ie (\\n[PS] >= 1000) \
 .              nr VS (\\n[PS] + 2000)
@@ -1419,7 +1419,9 @@ along with this program.  If not, see 
 .\" but allow ".SH n" to make heading point size match ".NH n",
 .\" for same "n", when \n[GROWPS] and \n[PSINCR] are set.
 .  nr sh*psincr 0
-.  if 0\\$1>0 .nr sh*psincr (\\n[GROWPS]-0\\$1)*\\n[PSINCR]
+.  if 0\\$1>0 \{\
+.    nr sh*psincr (\\n[GROWPS]-0\\$1)*\\n[PSINCR]
 .  if '\*(.T'html' .nr need_eo_h 1
@@ -1498,6 +1500,8 @@ along with this program.  If not, see 
 .ds par@sup-end \v'-.7m\s0+.9m'
 .als } par@sup-end
 .\" footnote paragraphs
+.\" FR is the footnote ratio to the line length
+.ds FR 5/6
 .\" FF is the footnote format
 .nr FF 0
 .\" This can be redefined. It gets a second argument of 'no' if the

T. Kurt Bond,

reply via email to

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