diff options
author | wlemb <wlemb> | 2000-02-11 16:26:45 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2000-02-11 16:26:45 +0000 |
commit | 2f271d75ec362d861cff1f30d3106ec4f5eb1f7e (patch) | |
tree | aec2e9b477400f1aa05e6a134ff3133025889aae | |
parent | 11e2fe04f457dcd9e4e6bf7bb25fbb3829c8c7ca (diff) | |
download | groff-2f271d75ec362d861cff1f30d3106ec4f5eb1f7e.tar.gz |
* doc/groff.texinfo, src/roff/troff/troff.man: Add documentation
of the `substring' request.
* src/roff/troff/TODO, NEWS: Updated.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | doc/groff.texinfo | 16 | ||||
-rw-r--r-- | src/roff/troff/TODO | 2 | ||||
-rw-r--r-- | src/roff/troff/troff.man | 21 |
5 files changed, 45 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2000-02-11 Werner LEMBERG <wl@gnu.org> + + * doc/groff.texinfo, src/roff/troff/troff.man: Add documentation + of the `substring' request. + * src/roff/troff/TODO, NEWS: Updated. + 2000-02-09 Werner LEMBERG <wl@gnu.org> * src/roff/groff/groff.man: Added an example. @@ -41,8 +41,8 @@ available to get the bounding box of a PostScript image file. The values `llx', `lly', `urx', and `ury'. Consequently, .PSPIC has been adapted to use the new request, and the psbb program has been removed. -A new number predefined writable number register, `year', has been added. -It contains the current year. +A new predefined writable number register, `year', has been added. It +contains the current year. A new read-only register, `.Y', has been added. It contains the revision number of the groff package. @@ -53,7 +53,9 @@ font `foo' is undefined: .B bold text normal text \f[foo]bar\fP normal text -Previously, the text after \fP has appeared as bold. +Previously, the text after \fP appeared as bold. + +The `substring' request is not new, but hasn't been documented before. The macro files `tmac.a4' (for specifying A4 paper format) and `tmac.trace' (a debugging aid) are now installed also. diff --git a/doc/groff.texinfo b/doc/groff.texinfo index 344e6443..d02126f0 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -3580,7 +3580,7 @@ string-valued register. @findex ds Groff has string variables, which are entirely for user convenience -(i.e. there are no builtin strings) They are defined via the +(i.e. there are no builtin strings). They are defined via the @code{ds} request. @example @@ -3588,7 +3588,7 @@ Groff has string variables, which are entirely for user convenience @end example @findex \* -The are interpolated, or expanded in-place, via the @code{\*} escape: +They are interpolated, or expanded in-place, via the @code{\*} escape: @example The \*(UX Operating System @@ -3650,6 +3650,16 @@ of text are on these \ next several lines @end example +@findex substring +@cindex substrings +@code{.substring xx n1 [n2]} +Replace the string in register@w{ }xx with the substring defined by the +indices n1 and@w{ }n2. The first character in the string has index one. +If n2 is omitted, it is taken to be equal to the string's length. If +the index value n1 or n2 is negative or zero, it will be counted from +the end of the string, going backwards: The last character has index@w{ +}0, the character before the last character has index@w{ }-1, etc. + @findex rn @code{rn} @@ -3952,7 +3962,7 @@ request can make a macro have more than one name. This would be called as @example -.vl $Id: groff.texinfo,v 1.1 2000/02/06 09:39:38 wlemb Exp $ +.vl $Id: groff.texinfo,v 1.2 2000/02/11 16:26:45 wlemb Exp $ @end example diff --git a/src/roff/troff/TODO b/src/roff/troff/TODO index 7e511235..2f2ecbf3 100644 --- a/src/roff/troff/TODO +++ b/src/roff/troff/TODO @@ -105,7 +105,7 @@ optionally print the contents of a macro. Provide some way to round numbers to multiples of the current horizontal or vertical resolution. -Better string-processing support (substring, length, search). +Better string-processing support (length, search). Generalized ligatures. diff --git a/src/roff/troff/troff.man b/src/roff/troff/troff.man index 82d373ba..25053376 100644 --- a/src/roff/troff/troff.man +++ b/src/roff/troff/troff.man @@ -1100,7 +1100,7 @@ command looks for a .B %%BoundingBox comment to extract the bounding box values. After a successful call, the coordinates (in PostScript units) of the lower -left and upper right edge can be found in the registers +left and upper right corner can be found in the registers .BR \en[llx] , .BR \en[lly] , .BR \en[urx] , @@ -1237,6 +1237,25 @@ The styles command in the file controls which font positions (if any) are initially associated with styles rather than fonts. .TP +.BI .substring\ xx\ n1\ [ n2 ] +Replace the string in register +.I xx +with the substring defined by the indices +.I n1 +and +.IR n2 . +The first character in the string has index one. +If +.I n2 +is omitted, it is taken to be equal to the string's length. If the +index value +.I n1 +or +.I n2 +is negative or zero, it will be counted from the end of the string, +going backwards: The last character has index 0, the character before +the last character has index -1, etc. +.TP .BI .tkf\ f\ s1\ n1\ s2\ n2 Enable track kerning for font .IR f . |