diff options
author | wl <wl> | 2009-02-14 17:21:35 +0000 |
---|---|---|
committer | wl <wl> | 2009-02-14 17:21:35 +0000 |
commit | 71ea99d4c8b847766e48883219b38aa3bca74367 (patch) | |
tree | ba6ca3699ca9c6ede2ff0d162b65e8cbff931eb4 /man/groff_diff.man | |
parent | 3e5365fb2c256a2d2273d970a54f434305e34371 (diff) | |
download | groff-71ea99d4c8b847766e48883219b38aa3bca74367.tar.gz |
Implement a leading spaces macro request, `lsm', in analogy to
`blm'.
Implement two new number registers, \n[lsn] and \n[lss], which hold
the number of spaces and the horizontal space, respectively, which
would be inserted if the macro registered by `lsm' wasn't called.
* src/roff/troff/input.cpp (leading_spaces_macro_name,
leading_spaces_number, leading_spaces_space): New global
variables.
(leading_spaces_macro): New function.
(process_input_stack) <token::TOKEN_SPACE>: Handle `lsm'.
(init_input_requests): Register `lsm', \n[lsn], and \n[lss].
* NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo
(Leading Spaces Traps): Document new requests and registers.
Diffstat (limited to 'man/groff_diff.man')
-rw-r--r-- | man/groff_diff.man | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/man/groff_diff.man b/man/groff_diff.man index 7f39a50a..dcd70a0d 100644 --- a/man/groff_diff.man +++ b/man/groff_diff.man @@ -1767,6 +1767,19 @@ read-only number register is set to\~1 if in line-tabs mode, and 0 otherwise. . .TP +.BI .lsm\ xx +Set the leading spaces macro to +.IR xx . +If there are leading spaces in an input line, it is invoked instead of +the usual troff behaviour; the leading spaces are removed. +Registers +.B \[rs]n[lsn] +and +.B \[rs]n[lss] +hold the number of removed leading spaces and the corresponding +horizontal space, respectively. +. +.TP .BI .mso\ file The same as the .B so @@ -2900,7 +2913,7 @@ Zero if no magnification. .B \[rs]n[urx] .TQ .B \[rs]n[ury] -These four registers are set by the +These four read/\:write registers are set by the .B psbb request and contain the bounding box values (in PostScript units) of a given PostScript image. @@ -2952,6 +2965,14 @@ Initialized at start-up. The current horizontal position at input line. . .TP +.B \[rs]n[lsn] +.TQ +.B \[rs]n[lss] +If there are leading spaces in an input line, these registers +hold the number of leading spaces and the corresponding +horizontal space, respectively. +. +.TP .B \[rs]n[minutes] The number of minutes after the hour. . |