diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-11-28 00:33:16 -0600 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-11-28 00:33:16 -0600 |
commit | 51f12c7f61bebe78730e561ef4786fdc32b4b687 (patch) | |
tree | 8a8b928feffbf7f0cdb05ff9359c7dbb8bd6676a /NEWS | |
parent | 45515a052d178681891fa5cfc172b7ac3cf3dd6e (diff) | |
download | groff-git-51f12c7f61bebe78730e561ef4786fdc32b4b687.tar.gz |
[troff]: Implement new `.nn` register
...to report the remaining count of lines to have their numbering
suppressed.
* src/roff/troff/env.h (class environment): Declare new member function
`get_no_number_count()`.
* src/roff/troff/env.cpp (get_no_number_count): Define new member
function, returning value of member variable `no_number_count`.
(init_env_requests): Define new ".nn" register and attach it to
`get_no_number_count()`.
* doc/groff.texi (Miscellaneous): Document it. Include example of use
to determine whether current output line will be numbered. Also
clarify meaning of register; `.nn` is not decremented except when
output line numbering is enabled.
* man/groff.7.man (Read-only registers): Document it.
* src/roff/groff/tests/dot-nn_register_works.sh: Test it.
* src/roff/groff/groff.am (groff_TESTS): Run test.
* NEWS: Add item.
See <https://lists.gnu.org/archive/html/groff/2022-11/msg00153.html>.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -22,12 +22,15 @@ o A new read-only register `.cp` is implemented. Within a `do` request, groff_diff(7) or the groff Texinfo manual for rationale, use case, and example. -o A new read-only register `.nm` is implemented. It reports the - enablement status of output line numbering (caused by the `nm` - request) irrespective of the temporary suspension of numbering with - the `nn` request. This register was introduced because there was no - way to introspect its state, tbl(1) needs to be able to do so, and the - writable line number register `ln` is not a reliable proxy for it. +o New read-only registers `.nm` and `.nn` are implemented. `.nm` is of + Boolean sense, reporting the enablement status of output line + numbering (caused by the `nm` request) irrespective of the temporary + suspension of numbering with the `nn` request. `.nn` holds the count + of numbered output lines still to have that numbering suppressed. + These registers were introduced because there was no way for the + formatter (and thus a document) to introspect their state, tbl(1) + needs to be able to do so, and the writable line number register `ln` + is not a reliable proxy for this information. o Type size escape sequences of the form "\sNN", where NN is in the range 10-39, are now recognized only in compatibility mode ("groff |