groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog NEWS doc/groff.texinfo tmac/gro...


From: Keith Marshall
Subject: [Groff-commit] groff ChangeLog NEWS doc/groff.texinfo tmac/gro...
Date: Sun, 08 Apr 2007 18:50:43 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Keith Marshall <keithmarshall>  07/04/08 18:50:43

Modified files:
        .              : ChangeLog NEWS 
        doc            : groff.texinfo 
        tmac           : groff_ms.man s.tmac 

Log message:
                * tmac/s.tmac (SN): Define unconditionally.
                (SN-STYLE): New string; define.
        
                * NEWS, tmac/groff_ms.man, doc/groff.texinfo (SN-STYLE): 
Document it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1081&r2=1.1082
http://cvs.savannah.gnu.org/viewcvs/groff/NEWS?cvsroot=groff&r1=1.237&r2=1.238
http://cvs.savannah.gnu.org/viewcvs/groff/doc/groff.texinfo?cvsroot=groff&r1=1.256&r2=1.257
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/groff_ms.man?cvsroot=groff&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/s.tmac?cvsroot=groff&r1=1.30&r2=1.31

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1081
retrieving revision 1.1082
diff -u -b -r1.1081 -r1.1082
--- ChangeLog   22 Mar 2007 11:13:26 -0000      1.1081
+++ ChangeLog   8 Apr 2007 18:50:42 -0000       1.1082
@@ -1,3 +1,10 @@
+2007-04-08  Keith Marshall  <address@hidden>
+
+       * tmac/s.tmac (SN): Define unconditionally.
+       (SN-STYLE): New string; define.
+
+       * NEWS, tmac/groff_ms.man, doc/groff.texinfo (SN-STYLE): Document it.
+
 2007-03-22  Werner LEMBERG  <address@hidden>
 
        * tmac/pspic.tmac: Fix harmless numeric overflow warning.  Reported

Index: NEWS
===================================================================
RCS file: /cvsroot/groff/groff/NEWS,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -b -r1.237 -r1.238
--- NEWS        3 Feb 2007 05:32:46 -0000       1.237
+++ NEWS        8 Apr 2007 18:50:42 -0000       1.238
@@ -132,6 +132,9 @@
   localisms `.SC', `.UC', `.P1', and `.P2'.  The latter three are enabled
   only after .SC is called.
 
+o A new string, `SN-STYLE', has been added to the ms macros, controlling
+  the formatting of section numbers in headings defined by `.NH'.
+
 
 VERSION 1.19.2
 ==============

Index: doc/groff.texinfo
===================================================================
RCS file: /cvsroot/groff/groff/doc/groff.texinfo,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -b -r1.256 -r1.257
--- doc/groff.texinfo   1 Feb 2007 23:09:22 -0000       1.256
+++ doc/groff.texinfo   8 Apr 2007 18:50:43 -0000       1.257
@@ -3352,26 +3352,41 @@
 @DefstrItem {SN-DOT, ms}
 @DefstrListEnd {SN-NO-DOT, ms}
 After invocation of @code{NH}, the assigned section number is made
-available in the strings @code{SN-DOT} (exactly as it appears in the
-printed section heading) and @code{SN-NO-DOT} (with the final period
-omitted).  The string @code{SN} is also defined, as an alias for
address@hidden; if preferred, you may redefine it as an alias for
address@hidden, by including the initialization
-
+available in the strings @code{SN-DOT} (as it appears in a printed
+section heading with default formatting, followed by a terminating
+period), and @code{SN-NO-DOT} (with the terminating period omitted).
+The string @code{SN} is also defined, as an alias for @code{SN-DOT};
+if preferred, you may redefine it as an alias for @code{SN-NO-DOT},
+by including the initialization
 @Example
-.ds SN-NO-DOT
 .als SN SN-NO-DOT
 @endExample
 
 @noindent
address@hidden your first use of @code{NH}, or simply
+at any time @strong{before} you would like the change to take effect.
address@hidden
 
address@hidden {SN-STYLE, ms}
+You may control the style used to print section numbers, within
+numbered section headings, by defining an appropriate alias for the
+string @code{SN-STYLE}.  The default style, in which the printed
+section number is followed by a terminating period, is obtained
+by defining the alias
 @Example
-.als SN SN-NO-DOT
+.als SN-STYLE SN-DOT
address@hidden
+
address@hidden
+If you prefer to omit the terminating period, from section numbers
+appearing in numbered section headings, you may define the alias
address@hidden
+.als SN-STYLE SN-NO-DOT
 @endExample
 
 @noindent
address@hidden your first use of @code{NH}.
+Any such change in section numbering style becomes effective from
+the next use of @code{.NH}, following redefinition of the alias for
address@hidden
 @endDefstr
 
 @Defmac {SH, address@hidden, ms}

Index: tmac/groff_ms.man
===================================================================
RCS file: /cvsroot/groff/groff/tmac/groff_ms.man,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- tmac/groff_ms.man   2 Feb 2007 18:43:59 -0000       1.21
+++ tmac/groff_ms.man   8 Apr 2007 18:50:43 -0000       1.22
@@ -528,14 +528,57 @@
 when assigning a value specified in points.
 .
 .IP
+The style used to represent the section number,
+within a numbered heading,
+is controlled by the
+.B SN-STYLE
+string;
+this may be set to either the
+.B SN-DOT
+or the
+.B SN-NO-DOT
+style,
+(described below),
+by aliasing
+.B SN-STYLE
+accordingly.
+By default,
+.B SN-STYLE
+is initialised by defining the alias
+.RS
+.nf
+.IP
+\&.als SN-STYLE SN-DOT
+.fi
+.RE
+.IP
+it may be changed to the
+.B SN-NO-DOT
+style,
+if preferred,
+by defining the alternative alias
+.RS
+.nf
+.IP
+\&.als SN-STYLE SN-NO-DOT
+.fi
+.RE
+.IP
+Any such change becomes effective with the first use of
+.BR .NH ,
+.I after
+the new alias is defined.
+.
+.IP
 After invoking
 .BR .NH ,
 the assigned heading number is available in the strings
 .B SN-DOT
-(exactly as it appears in the formatted heading),
+(as it appears in the default formatting style for numbered headings,
+with a terminating period following the number),
 and
 .B SN-NO-DOT
-(with its final period omitted).
+(with this terminating period omitted).
 The string
 .B SN
 is also defined,
@@ -550,28 +593,16 @@
 .RS
 .nf
 .IP
-\&.ds SN-NO-DOT
 \&.als SN SN-NO-DOT
 .fi
 .RE
 .
 .IP
-.I before
-the first use of
+at any time;
+the change becomes effective with the next use of
 .BR .NH ,
-or simply:
-.
-.RS
-.nf
-.IP
-\&.als SN SN-NO-DOT
-.fi
-.RE
-.
-.IP
 .I after
-the first use of
-.BR .NH .
+the new alias is defined.
 .
 .TP
 .BI .SH\ [ xx ]

Index: tmac/s.tmac
===================================================================
RCS file: /cvsroot/groff/groff/tmac/s.tmac,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- tmac/s.tmac 15 Mar 2007 20:41:49 -0000      1.30
+++ tmac/s.tmac 8 Apr 2007 18:50:43 -0000       1.31
@@ -1534,6 +1534,16 @@
 .\" Numbered headings.
 .\" nh*hl is the level of the last heading
 .nr nh*hl 0
+.\" SN-DOT and SN-NO-DOT represent the section number of
+.\" the current heading, with and without a terminating dot.
+.ds SN-DOT
+.ds SN-NO-DOT
+.\" SN-STYLE sets the statement numbering style used in headings
+.\" (either SN-DOT or SN-NO-DOT); for backward compatibility with
+.\" earlier ms versions, the default is SN-DOT
+.als SN-STYLE SN-DOT
+.\" Also for backward compatibility, let SN represent SN-DOT.
+.als SN SN-DOT
 .\" numbered heading
 .de @NH
 .ie '\\$1'S' \{\
@@ -1577,12 +1587,11 @@
 .      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
 .DEVTAG-NH "\\$1"
 .  if '\*(.T'html' .nr need_eo_h 1
-\\*[SN-DOT]
+\\*[SN-STYLE]
 ..
 .\" ****************************
 .\" ******** module toc ********




reply via email to

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