summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorwl <wl>2009-02-14 17:21:35 +0000
committerwl <wl>2009-02-14 17:21:35 +0000
commit71ea99d4c8b847766e48883219b38aa3bca74367 (patch)
treeba6ca3699ca9c6ede2ff0d162b65e8cbff931eb4 /man
parent3e5365fb2c256a2d2273d970a54f434305e34371 (diff)
downloadgroff-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')
-rw-r--r--man/groff.man18
-rw-r--r--man/groff_diff.man23
2 files changed, 40 insertions, 1 deletions
diff --git a/man/groff.man b/man/groff.man
index 4e59c25b..a63961ca 100644
--- a/man/groff.man
+++ b/man/groff.man
@@ -1873,6 +1873,15 @@ default scaling indicator\~\c
.scaleindicator m ).
.
.TPx
+.REQ .lsm
+Unset the leading spaces macro.
+.
+.TPx
+.REQ .lsm "macro"
+Set the leading spaces macro to
+.IR macro .
+.
+.TPx
.REQ .ls
Change to the previous value of additional intra-line skip.
.
@@ -3902,6 +3911,15 @@ image (set by
Output line number.
.
.TPx
+.REG lsn
+The number of leading spaces of an input line.
+.
+.TPx
+.REG lss
+The horizontal space corresponding to the leading spaces of an input
+line.
+.
+.TPx
.REG minutes
The number of minutes after the hour.
.
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.
.