From 98d8aaddcf89090675d80d445e7563f040538af5 Mon Sep 17 00:00:00 2001 From: wlemb Date: Thu, 18 Apr 2002 21:43:06 +0000 Subject: * src/roff/troff/input.cc (token::next): Make \H behave consistently if not in compatibility mode, i.e., increment relative to the previous height. * doc/groff.texinfo: Updated accordingly. --- ChangeLog | 7 +++++++ doc/groff.texinfo | 23 +++++++++++++++++++---- src/roff/troff/input.cc | 14 ++++++++++++-- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38c101ef..61bcd0b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-04-18 Werner LEMBERG + + * src/roff/troff/input.cc (token::next): Make \H behave consistently + if not in compatibility mode, i.e., increment relative to the + previous height. + * doc/groff.texinfo: Updated accordingly. + 2002-04-17 Werner LEMBERG * doc/groff.texinfo: Document \\, \e, \E, \., and \c. diff --git a/doc/groff.texinfo b/doc/groff.texinfo index 146dedb1..65491a5d 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -8335,16 +8335,28 @@ the fly: @Example .mc \H'+5z'x\H'0' @endExample + +In compatibility mode, @code{gtroff} behaves differently: If an +increment or decrement is used, it is always taken relative to the +current point size and not relative to the previously selected font +height. Thus, + +@Example +.cp 1 +\H'+5'test \H'+5'test +@endExample + +@noindent +prints the word @samp{test} twice with the same font height (five +points larger than the current font size). @endDefesc @cindex changing the font slant (@code{\S}) @cindex font slant, changing (@code{\S}) @cindex slant, font, changing (@code{\S}) @DefescList {\\S, ', slant, '} -@DefescItem {\\S, ', @t{+}@Var{slant}, '} -@DefescListEnd {\\S, ', @t{-}@Var{slant}, '} -Change (increment, decrement) the slant of the current font by @var{slant} -degrees. Positive values slant to the right. +Slant the current font by @var{slant} degrees. Positive values slant +to the right. Currently, only the @option{-Tps} device supports this feature. @@ -8356,6 +8368,9 @@ the fly: @Example .mc \S'20'x\S'0' @endExample + +This request is incorrectly documented in the original @acronym{UNIX} +troff manual; the slant is always set to an absolute value. @endDefesc @cindex underlining (@code{ul}) diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc index 446bc3d5..398584b7 100644 --- a/src/roff/troff/input.cc +++ b/src/roff/troff/input.cc @@ -1828,8 +1828,18 @@ void token::next() nd = new hmotion_node(x); return; case 'H': - if (get_delim_number(&x, 'z', curenv->get_requested_point_size())) - curenv->set_char_height(x); + // don't take height increments relative to previous height if + // in compatibility mode + if (!compatible_flag && curenv->get_char_height()) + { + if (get_delim_number(&x, 'z', curenv->get_char_height())) + curenv->set_char_height(x); + } + else + { + if (get_delim_number(&x, 'z', curenv->get_requested_point_size())) + curenv->set_char_height(x); + } if (!compatible_flag) have_input = 1; break; -- cgit v1.2.1