From c9f8f8324c98eeba558aef47efdb2a577dd62f3a Mon Sep 17 00:00:00 2001 From: wl Date: Fri, 21 Sep 2012 04:58:32 +0000 Subject: * doc/groff.texinfo: Improve documentation of `.ad'. --- ChangeLog | 4 ++++ doc/groff.texinfo | 56 +++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90d81423..034de4a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-09-21 Werner LEMBERG + + * doc/groff.texinfo: Improve documentation of `.ad'. + 2012-09-20 Werner LEMBERG * doc/Makefile.sub (uninstall_sub): Fix removal of info files. diff --git a/doc/groff.texinfo b/doc/groff.texinfo index 9360e8be..a7d377b7 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -6674,28 +6674,52 @@ Justify to both margins. This is the default used by @code{gtroff}. Finally, @var{mode} can be the numeric argument returned by the @code{.j} register. -With no argument, @code{gtroff} adjusts lines in the same way it did -before adjusting was deactivated (with a call to @code{na}, for -example). +Using @code{ad} without argument is the same as saying +@w{@code{.ad \[.j]}}. In particular, @code{gtroff} adjusts lines +in the same way it did before adjusting was deactivated (with a call +to @code{na}, say). For example, this input code @Example -text -.ad r +.de AD +. br +. ad \\$1 +.. +. +.de NA +. br +. na +.. +. +textA +.AD r .nr ad \n[.j] -text -.ad c -text -.na -text -.ad \" back to centering -text -.ad \n[ad] \" back to right justifying +textB +.AD c +textC +.NA +textD +.AD \" back to centering +textE +.AD \n[ad] \" back to right justifying +textF +@endExample + +@noindent +produces the following output: + +@Example +textA + textB + textC +textD + textE + textF @endExample @cindex adjustment mode register (@code{.j}) -The current adjustment mode is available in the read-only number -register @code{.j}; it can be stored and subsequently used to set -adjustment. +As just demonstrated, the current adjustment mode is available in the +read-only number register @code{.j}; it can be stored and +subsequently used to set adjustment. The adjustment mode status is associated with the current environment (@pxref{Environments}). -- cgit v1.2.1