[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog ./NEWS doc/groff.texinfo tmac...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog ./NEWS doc/groff.texinfo tmac... |
Date: |
Mon, 20 Sep 2004 05:15:01 -0400 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 04/09/20 09:08:34
Modified files:
. : ChangeLog NEWS
doc : groff.texinfo
tmac : groff_ms.man s.tmac
Log message:
This change implements the following features:
PORPHANS
New numeric register: Defines number of lines following LP, PP,
QP, IP or XP, which must be kept together, before any automatic
page break. If insufficient space remains on the current page, a
page break is forced before the new paragraph begins.
HORPHANS
New numeric register: Sets number of lines of following paragraph
which must be kept with a heading, defined by NH or SH, before any
automatic page break. If insufficient space remains on the
current page, a page break is forced before the heading.
GROWPS
(Thanks to Joerg van den Hoff, for this idea).
New numeric register: Sets the first level of heading (set with
NH), which will keep the same point size as body text; e.g. if
GROWPS is set to 3, .NH 3, .NH 4, ... will produce headings at the
point size specified by \n[PS], but .NH 2 and .NH 1 will have
progressively larger point sizes, determined by \n[PSINCR] (see
below).
PSINCR
New numeric register: Sets the point size increment for each level
of heading, (set with NH), below the threshold level set by
GROWPS; e.g. if \n[PS] = 10, \n[GROWPS] = 3 and \n[PSINCR] = 2.0p,
then .NH 1 will produce 14pt headings, .NH 2 will produce 12pt,
and all other levels will remain at 10pt, (because \n[PS] = 10).
SH
Existing macro now accepts a numeric argument, to make heading
size match that of NH with same argument value, when the
GROWPS/PSINCR feature is enabled.
SN-DOT
New string, set by NH macro, replaces the existing (undocumented)
use of SN, to represent the assigned section number.
SN-NO-DOT
New string, set by NH macro, represents the assigned section
number, but omits the terminal period (periods at intermediate
levels are retained).
SN
String set by NH macro, originally undocumented, now implemented
as an alias for SN-DOT (which reproduces original behaviour).
* tmac/s.tmac (PORPHANS): New register.
(par*start): Use it.
(HORPHANS, GROWPS, PSINCR): New registers.
(SH-NO-TAG, @SH): Use them.
(@NH): Improved.
* NEWS, doc/groff.texinfo, tmac/groff_ms.man: Document the deletion
of `Ds' and `De' macros.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.737&tr2=1.738&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/NEWS.diff?tr1=1.191&tr2=1.192&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/doc/groff.texinfo.diff?tr1=1.214&tr2=1.215&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/groff_ms.man.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/s.tmac.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.737 groff/ChangeLog:1.738
--- groff/ChangeLog:1.737 Mon Sep 13 08:13:48 2004
+++ groff/ChangeLog Mon Sep 20 09:08:33 2004
@@ -1,3 +1,65 @@
+2004-09-19 Keith Marshall <address@hidden>
+
+ This change implements the following features:
+
+ PORPHANS
+ New numeric register: Defines number of lines following LP, PP,
+ QP, IP or XP, which must be kept together, before any automatic
+ page break. If insufficient space remains on the current page, a
+ page break is forced before the new paragraph begins.
+
+ HORPHANS
+ New numeric register: Sets number of lines of following paragraph
+ which must be kept with a heading, defined by NH or SH, before any
+ automatic page break. If insufficient space remains on the
+ current page, a page break is forced before the heading.
+
+ GROWPS
+ (Thanks to Joerg van den Hoff, for this idea).
+
+ New numeric register: Sets the first level of heading (set with
+ NH), which will keep the same point size as body text; e.g. if
+ GROWPS is set to 3, .NH 3, .NH 4, ... will produce headings at the
+ point size specified by \n[PS], but .NH 2 and .NH 1 will have
+ progressively larger point sizes, determined by \n[PSINCR] (see
+ below).
+
+ PSINCR
+ New numeric register: Sets the point size increment for each level
+ of heading, (set with NH), below the threshold level set by
+ GROWPS; e.g. if \n[PS] = 10, \n[GROWPS] = 3 and \n[PSINCR] = 2.0p,
+ then .NH 1 will produce 14pt headings, .NH 2 will produce 12pt,
+ and all other levels will remain at 10pt, (because \n[PS] = 10).
+
+ SH
+ Existing macro now accepts a numeric argument, to make heading
+ size match that of NH with same argument value, when the
+ GROWPS/PSINCR feature is enabled.
+
+ SN-DOT
+ New string, set by NH macro, replaces the existing (undocumented)
+ use of SN, to represent the assigned section number.
+
+ SN-NO-DOT
+ New string, set by NH macro, represents the assigned section
+ number, but omits the terminal period (periods at intermediate
+ levels are retained).
+
+ SN
+ String set by NH macro, originally undocumented, now implemented
+ as an alias for SN-DOT (which reproduces original behaviour).
+
+ * tmac/s.tmac (PORPHANS): New register.
+ (par*start): Use it.
+ (HORPHANS, GROWPS, PSINCR): New registers.
+ (SH-NO-TAG, @SH): Use them.
+ (@NH): Improved.
+
+2004-09-19 Keith Marshall <address@hidden>
+
+ * NEWS, doc/groff.texinfo, tmac/groff_ms.man: Document the deletion
+ of `Ds' and `De' macros.
+
2004-09-10 Werner LEMBERG <address@hidden>
In tbl, handle \a as an interpreted leader character if in
Index: groff/NEWS
diff -u groff/NEWS:1.191 groff/NEWS:1.192
--- groff/NEWS:1.191 Tue Jul 27 01:29:22 2004
+++ groff/NEWS Mon Sep 20 09:08:33 2004
@@ -43,6 +43,12 @@
1000. For example, `.nr PS 10250' sets the document's font size to
10.25 points.
+o The `Ds' and `De' macros provided in ms since groff version 1.19 have been
+ removed; the equivalent `DS' and `DE' macros should be used instead. X11
+ documents which actually use `Ds' and `De' always load a specific macro
+ file from the X11 distribution (macros.t) which provides proper
+ definitions for the two macros.
+
VERSION 1.19.1
==============
Index: groff/doc/groff.texinfo
diff -u groff/doc/groff.texinfo:1.214 groff/doc/groff.texinfo:1.215
--- groff/doc/groff.texinfo:1.214 Wed Jul 28 16:52:28 2004
+++ groff/doc/groff.texinfo Mon Sep 20 09:08:34 2004
@@ -3573,7 +3573,12 @@
@DefmacList {Ds, , ms}
@DefmacListEnd {De, , ms}
-These two macros are aliases for @code{DS} and @code{DE}, respectively.
+These two macros were formerly provided as aliases for
address@hidden and @code{DE}, respectively.
+They have been removed, and should no longer be used.
+X11 documents which actually use @code{Ds} and @code{De} always load a
+specific macro file from the X11 distribution (@file{macros.t}) which
+provides proper definitions for the two macros.
@endDefmac
@sp 1
Index: groff/tmac/groff_ms.man
diff -u groff/tmac/groff_ms.man:1.14 groff/tmac/groff_ms.man:1.15
--- groff/tmac/groff_ms.man:1.14 Sun Jul 25 14:05:41 2004
+++ groff/tmac/groff_ms.man Mon Sep 20 09:08:34 2004
@@ -629,12 +629,17 @@
.B Ds
and
.B De
-are aliases for
+were formerly provided as aliases for
.B DS
and
.BR DE ,
-respectively.
-.
+respectively, but they have been removed, and should no longer be used.
+X11 documents which actually use
+.B Ds
+and
+.B De
+always load a specific macro file from the X11 distribution (macros.t)
+which provides proper definitions for the two macros.
.PP
To
.I keep
Index: groff/tmac/s.tmac
diff -u groff/tmac/s.tmac:1.18 groff/tmac/s.tmac:1.19
--- groff/tmac/s.tmac:1.18 Thu Aug 5 16:38:23 2004
+++ groff/tmac/s.tmac Mon Sep 20 09:08:34 2004
@@ -1159,13 +1159,18 @@
.de TA
.ta T 5n
..
+.\" \n[PORPHANS] sets number of initial lines of any paragraph,
+.\" which must be kept together, without any included page break.
+.\" Initialise to reproduce original behaviour; user may adjust it.
+.if !rPORPHANS .nr PORPHANS 1
+.
.de par*start
address@hidden
.nr \\n[.ev]:pli \\$1
.nr \\n[.ev]:pri \\$2
address@hidden
.sp \\n[\\n[.ev]:PD]u
-.ne 1v+\\n(.Vu
+.ne \\n[PORPHANS]v+\\n(.Vu
..
.de address@hidden
.nr \\n[.ev]:pli 0
@@ -1366,14 +1371,37 @@
.\}
.el \!.par*box-draw \\$1 \\$2
..
+.\" \n[HORPHANS] sets how many lines of the following paragraph must be
+.\" kept together, with a preceding section header. Initialise it,
+.\" to reproduce original behaviour; user may change it.
+.if !rHORPHANS .nr HORPHANS 1
+.
+.\" \n[GROWPS] and \n[PSINCR] cause auto-increment of header point size.
+.\" Initialise them, so they have no effect, unless explicitly set by the user.
+.if !rGROWPS .nr GROWPS 0
+.if !rPSINCR .nr PSINCR 1p
+.
.de SH-NO-TAG
address@hidden
-.\" Keep together the heading and the first two lines of the next paragraph.
-.ne 3v+\\n[\\n[.ev]:PD]u+\\n(.Vu
+.\" Keep the heading and the first few lines of the next paragraph together.
+.\" (\n[HORPHANS] defines "first few" -- default = 1; user may redefine it).
+.nr sh*minvs \\n[HORPHANS]v
+.if \\n[sh*psincr]<0 .nr sh*psincr 0
+.ie \\n(VS<1000 .par*vs \\n(VSp+\\n[sh*psincr]u
+.el .par*vs \\n(VSp/1000u+\\n[sh*psincr]u
+.ne 2v+\\n[sh*minvs]u+\\n[\\n[.ev]:PD]u+\\n(.Vu
+.\" Adjust point size for heading text, as specified by \n[GROWPS] and
\n[PSINCR].
+.ie \\n(PS<1000 .ps \\n(PS+\\n[sh*psincr]u
+.el .ps \\n(PSz/1000u+\\n[sh*psincr]u
.sp 1
.ft B
..
.de @SH
+.\" Standard ms implementation does not expect an argument,
+.\" 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]
. SH-NO-TAG
. HTML-TAG ".SH 1"
..
@@ -1535,15 +1563,18 @@
. \}
. nr H\\n[nh*hl] +1
.\}
-.ds SN
-.nr nh*i 0
+.ds SN-NO-DOT \\n(H1
+.nr nh*i 1
.while \\n[nh*i]<\\n[nh*hl] \{\
. nr nh*i +1
-. as SN \\n[H\\n[nh*i]].
+. as SN-NO-DOT .\\n[H\\n[nh*i]]
.\}
+.ds SN-DOT \\*[SN-NO-DOT].
+.if !dSN .als SN SN-DOT
+.nr sh*psincr (\\n[GROWPS]-\\n[nh*hl])*\\n[PSINCR]
.SH-NO-TAG
.HTML-TAG ".NH \\$1"
-\\*[SN]
+\\*[SN-DOT]
..
.\" ****************************
.\" ******** module toc ********
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog ./NEWS doc/groff.texinfo tmac...,
Werner LEMBERG <=