summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog25
-rw-r--r--NEWS3
-rw-r--r--doc/groff.texinfo10
-rw-r--r--man/groff.man8
-rw-r--r--man/groff_diff.man10
-rw-r--r--man/groff_out.man17
-rw-r--r--src/roff/troff/env.cc2
-rw-r--r--tmac/Makefile.sub2
-rw-r--r--tmac/html-end.tmac25
-rw-r--r--tmac/html.tmac199
-rw-r--r--tmac/troffrc2
-rw-r--r--tmac/troffrc-end2
-rw-r--r--tmac/www.tmac2
13 files changed, 112 insertions, 195 deletions
diff --git a/ChangeLog b/ChangeLog
index d2d1ae50..71d0f3df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2003-04-09 Werner LEMBERG <wl@gnu.org>
+
+ Add register \n[.height] which returns the value of \H.
+ Add register \n[.slant] which returns the value of \S.
+
+ * src/roff/troff/env.cc (init_env_requests): Implement.
+ * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo:
+ Document.
+
+2003-04-08 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/html.tmac: Move some of the data into html-end.tmac.
+ Remove most of the character translations for eqn since html fonts
+ now cover those characters.
+ Load www.tmac.
+ * tmac/html-end.tmac: New file.
+ * tmac/troffrc: Load html.tmac not www.tmac for -Thtml.
+ * tmac/troffrc-end: Load html-end.tmac not html.tmac for -Thtml.
+ * tmac/Makefile.sub (NORMALFILES): Add html-end.tmac.
+
+2003-04-07 Werner LEMBERG <wl@gnu.org>
+
+ * man/groff_out.man: Document negative values of `N' if -Thtml is
+ used.
+
2003-04-06 Werner LEMBERG <wl@gnu.org>
* Makefile.comm (depend.temp): Check location of YTABC.
diff --git a/NEWS b/NEWS
index 640a2aaa..536d24bb 100644
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,9 @@ o For orthogonality, new \D subcommands to change the fill color are
The arguments are the same as with the `defcolor' request. The current
position is *not* changed.
+o The values set with \H and \S are now available in number registers
+ \n[.height] and \n[.slant], respectively.
+
o The `.pe' number register isn't new but hasn't been documented before.
It is set to 1 during a page ejection caused by the `bp' request.
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 28ee9e6e..74d2cef0 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -8996,7 +8996,8 @@ necessary in GNU @code{troff}. Nevertheless, they are supported.
@DefescList {\\H, ', height, '}
@DefescItem {\\H, ', @t{+}height, '}
-@DefescListEnd {\\H, ', @t{-}height, '}
+@DefescItem {\\H, ', @t{-}height, '}
+@DefregListEnd {.height}
@cindex changing the font height (@code{\H})
@cindex font height, changing (@code{\H})
@cindex height, font, changing (@code{\H})
@@ -9004,6 +9005,9 @@ Change (increment, decrement) the height of the current font, but not
the width. If @var{height} is zero, restore the original height.
Default scaling indicator is @samp{z}.
+The read-only number register @code{.height} contains the font height as
+set by @code{\H}.
+
Currently, only the @option{-Tps} device supports this feature.
Note that @code{\H} doesn't produce an input token in @code{gtroff}.
@@ -9031,12 +9035,16 @@ points larger than the current font size).
@endDefesc
@DefescList {\\S, ', slant, '}
+@DefregListEnd {.slant}
@cindex changing the font slant (@code{\S})
@cindex font slant, changing (@code{\S})
@cindex slant, font, changing (@code{\S})
Slant the current font by @var{slant} degrees. Positive values slant
to the right.
+The read-only number register @code{.slant} contains the font slant as
+set by @code{\S}.
+
Currently, only the @option{-Tps} device supports this feature.
Note that @code{\S} doesn't produce an input token in @code{gtroff}.
diff --git a/man/groff.man b/man/groff.man
index e33827b9..82387177 100644
--- a/man/groff.man
+++ b/man/groff.man
@@ -3070,6 +3070,10 @@ Text base-line high-water mark on current page or diversion.
.REG .H
Available horizontal resolution in basic units.
.
+.REG .height
+The current font height as set with
+.request \[rs]H .
+.
.REG .hla
The current hyphenation language as set by the
.B .hla
@@ -3176,6 +3180,10 @@ The number of lines to be right-justified as set by the rj request.
.REG .s
Current point size as a decimal fraction.
.
+.REG .slant
+The slant of the current font as set with
+.request \[rs]S .
+.
.REG .sr
The last requested pointsize in points as a decimal fraction
(string-valued).
diff --git a/man/groff_diff.man b/man/groff_diff.man
index f4f6fc01..eb00b442 100644
--- a/man/groff_diff.man
+++ b/man/groff_diff.man
@@ -2599,6 +2599,11 @@ Macros should use this to determine whether they are running under GNU
troff.
.
.TP
+.B \[rs]n[.height]
+The current height of the font as set with
+.BR \[rs]H .
+.
+.TP
.B \[rs]n[.hla]
The current hyphenation language as set by the
.B hla
@@ -2716,6 +2721,11 @@ The number of lines to be right-justified as set by the
request.
.
.TP
+.B \[rs]n[.slant]
+The slant of the current font as set with
+.BR \[rs]S .
+.
+.TP
.B \[rs]n[.sr]
The last requested pointsize in points as a decimal fraction.
.
diff --git a/man/groff_out.man b/man/groff_out.man
index 5fe7dcce..8db30f13 100644
--- a/man/groff_out.man
+++ b/man/groff_out.man
@@ -3,11 +3,11 @@
.ig
groff_out.5
-Last update: 12 Sep 2002
+Last update: 07 Apr 2003
This file is part of groff, the GNU roff type-setting system.
-Copyright (C) 1989, 2001, 2002 Free Software Foundation, Inc.
+Copyright (C) 1989, 2001, 2002, 2003 Free Software Foundation, Inc.
rewritten from scrach 2001 by Bernd Warken <bwarken@mayn.de>
Permission is granted to copy, distribute and/or modify this document
@@ -719,10 +719,19 @@ red, green, and blue.
.command N n
Print character with index\~\c
.argument n
-(a non-negative integer) of the current font.
+(an integer, normally non-negative) of the current font.
.
The print position is not changed.
.
+If
+.B \-T\~html
+is used, negative values are emitted also to indicate an unbreakable space
+with given width.
+.
+For example,
+.B N\~-193
+represents an unbreakable space which has a width of 193u.
+.
This command is a groff extension.
.
.
@@ -1855,7 +1864,7 @@ see
.SH "AUTHORS"
.\" --------------------------------------------------------------------
.
-Copyright (C) 1989, 2001, 2002 Free Software Foundation, Inc.
+Copyright (C) 1989, 2001, 2002, 2003 Free Software Foundation, Inc.
.P
This document is distributed under the terms of the FDL (GNU Free
Documentation License) version 1.1 or later.
diff --git a/src/roff/troff/env.cc b/src/roff/troff/env.cc
index 9e094511..264b441b 100644
--- a/src/roff/troff/env.cc
+++ b/src/roff/troff/env.cc
@@ -3231,6 +3231,7 @@ void init_env_requests()
init_int_env_reg(".f", get_font);
init_string_env_reg(".fam", get_font_family_string);
init_string_env_reg(".fn", get_font_name_string);
+ init_int_env_reg(".height", get_char_height);
init_int_env_reg(".hlc", get_hyphen_line_count);
init_int_env_reg(".hlm", get_hyphen_line_max);
init_int_env_reg(".hy", get_hyphenation_flags);
@@ -3252,6 +3253,7 @@ void init_env_requests()
init_vunits_env_reg(".pvs", get_post_vertical_spacing);
init_int_env_reg(".rj", get_right_justify_lines);
init_string_env_reg(".s", get_point_size_string);
+ init_int_env_reg(".slant", get_char_slant);
init_int_env_reg(".ss", get_space_size);
init_int_env_reg(".sss", get_sentence_space_size);
init_string_env_reg(".sr", get_requested_point_size_string);
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index a2f83821..0d9cd60a 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -22,7 +22,7 @@ NORMALFILES=\
X.tmac Xps.tmac \
lj4.tmac \
lbp.tmac \
- html.tmac \
+ html.tmac html-end.tmac \
europs.tmac \
composite.tmac \
eqnrc \
diff --git a/tmac/html-end.tmac b/tmac/html-end.tmac
new file mode 100644
index 00000000..0199d201
--- /dev/null
+++ b/tmac/html-end.tmac
@@ -0,0 +1,25 @@
+.\" html-end.tmac
+.\"
+.nr _C \n(.C
+.cp 0
+.
+.\" turn off all headers and footers for ms, me, and mm macro sets
+.if d EF .EF ''''
+.if d EH .EH ''''
+.if d OF .OF ''''
+.if d OH .OH ''''
+.if d ef .ef ''''
+.if d of .of ''''
+.if d oh .oh ''''
+.if d eh .eh ''''
+.tl ''''
+.
+.\" tell grohtml some default parameter values
+.pl 99999i
+.po 0
+.ll \n[.l]u
+.ta \n[.tabs]
+.
+.cp \n(_C
+.
+.\" end of file, make sure this is the last line
diff --git a/tmac/html.tmac b/tmac/html.tmac
index 9d400e02..7843a3cf 100644
--- a/tmac/html.tmac
+++ b/tmac/html.tmac
@@ -23,193 +23,25 @@
.\"
.\" remove hyphenation
.\"
+.nh
+.nr HY 0
+.
.de hy
..
.de nh
..
.
-.\" Now set any characters defined in devps/S but not in devhtml/S to nul --
-.\" these are generated by eqn but not used by grohtml. grops generated
-.\" images during the alternative pass.
-.if !c\[*y] .tr \[*y]
-.if !c\[fa] .tr \[fa]
-.if !c\[te] .tr \[te]
-.if !c\[st] .tr \[st]
-.if !c\[=~] .tr \[=~]
-.if !c\[*A] .tr \[*A]
-.if !c\[*B] .tr \[*B]
-.if !c\[*X] .tr \[*X]
-.if !c\[*D] .tr \[*D]
-.if !c\[*E] .tr \[*E]
-.if !c\[*F] .tr \[*F]
-.if !c\[*G] .tr \[*G]
-.if !c\[*Y] .tr \[*Y]
-.if !c\[*I] .tr \[*I]
-.if !c\[+h] .tr \[+h]
-.if !c\[*K] .tr \[*K]
-.if !c\[*L] .tr \[*L]
-.if !c\[*M] .tr \[*M]
-.if !c\[*N] .tr \[*N]
-.if !c\[*O] .tr \[*O]
-.if !c\[*P] .tr \[*P]
-.if !c\[*H] .tr \[*H]
-.if !c\[*R] .tr \[*R]
-.if !c\[*S] .tr \[*S]
-.if !c\[*T] .tr \[*T]
-.if !c\[ts] .tr \[ts]
-.if !c\[*W] .tr \[*W]
-.if !c\[*C] .tr \[*C]
-.if !c\[*Q] .tr \[*Q]
-.if !c\[*Z] .tr \[*Z]
-.if !c\[3d] .tr \[3d]
-.if !c\[tf] .tr \[tf]
-.if !c\[pp] .tr \[pp]
-.if !c\[radicalex] .tr \[radicalex]
-.if !c\[*a] .tr \[*a]
-.if !c\[*b] .tr \[*b]
-.if !c\[*x] .tr \[*x]
-.if !c\[*d] .tr \[*d]
-.if !c\[*e] .tr \[*e]
-.if !c\[*f] .tr \[*f]
-.if !c\[*g] .tr \[*g]
-.if !c\[*y] .tr \[*y]
-.if !c\[*i] .tr \[*i]
-.if !c\[+f] .tr \[+f]
-.if !c\[*k] .tr \[*k]
-.if !c\[*l] .tr \[*l]
-.if !c\[*m] .tr \[*m]
-.if !c\[*n] .tr \[*n]
-.if !c\[*o] .tr \[*o]
-.if !c\[*p] .tr \[*p]
-.if !c\[*h] .tr \[*h]
-.if !c\[*r] .tr \[*r]
-.if !c\[*s] .tr \[*s]
-.if !c\[*t] .tr \[*t]
-.if !c\[*u] .tr \[*u]
-.if !c\[+p] .tr \[+p]
-.if !c\[*w] .tr \[*w]
-.if !c\[*c] .tr \[*c]
-.if !c\[*q] .tr \[*q]
-.if !c\[*z] .tr \[*z]
-.if !c\[ap] .tr \[ap]
-.if !c\[*U] .tr \[*U]
-.if !c\[fm] .tr \[fm]
-.if !c\[<=] .tr \[<=]
-.if !c\[f/] .tr \[f/]
-.if !c\[if] .tr \[if]
-.if !c\[Fn] .tr \[Fn]
-.if !c\[CL] .tr \[CL]
-.if !c\[DI] .tr \[DI]
-.if !c\[HE] .tr \[HE]
-.if !c\[SP] .tr \[SP]
-.if !c\[<>] .tr \[<>]
-.if !c\[<-] .tr \[<-]
-.if !c\[ua] .tr \[ua]
-.\" .if !c\[arrowverttp] .tr \[arrowverttp]
-.if !c\[->] .tr \[->]
-.if !c\[da] .tr \[da]
-.\" .if !c\[arrowvertbt] .tr \[arrowvertbt]
-.if !c\[de] .tr \[de]
-.if !c\[sd] .tr \[sd]
-.if !c\[>=] .tr \[>=]
-.if !c\[pt] .tr \[pt]
-.if !c\[pd] .tr \[pd]
-.if !c\[bu] .tr \[bu]
-.if !c\[di] .tr \[di]
-.if !c\[!=] .tr \[!=]
-.if !c\[==] .tr \[==]
-.if !c\[~~] .tr \[~~]
-.if !c\[~=] .tr \[~=]
-.\" .if !c\[arrowvertex] .tr \[arrowvertex]
-.if !c\[an] .tr \[an]
-.if !c\[CR] .tr \[CR]
-.if !c\[Ah] .tr \[Ah]
-.if !c\[Im] .tr \[Im]
-.if !c\[Re] .tr \[Re]
-.if !c\[wp] .tr \[wp]
-.if !c\[c*] .tr \[c*]
-.if !c\[c+] .tr \[c+]
-.if !c\[es] .tr \[es]
-.if !c\[ca] .tr \[ca]
-.if !c\[cu] .tr \[cu]
-.if !c\[sp] .tr \[sp]
-.if !c\[ip] .tr \[ip]
-.if !c\[nb] .tr \[nb]
-.if !c\[sb] .tr \[sb]
-.if !c\[ib] .tr \[ib]
-.if !c\[mo] .tr \[mo]
-.if !c\[nm] .tr \[nm]
-.if !c\[/_] .tr \[/_]
-.if !c\[gr] .tr \[gr]
-.\" .if !c\[product] .tr \[product]
-.if !c\[sr] .tr \[sr]
-.if !c\[md] .tr \[md]
-.if !c\[no] .tr \[no]
-.if !c\[AN] .tr \[AN]
-.if !c\[OR] .tr \[OR]
-.if !c\[hA] .tr \[hA]
-.if !c\[lA] .tr \[lA]
-.if !c\[uA] .tr \[uA]
-.if !c\[rA] .tr \[rA]
-.if !c\[dA] .tr \[dA]
-.if !c\[lz] .tr \[lz]
-.if !c\[la] .tr \[la]
-.if !c\[sum] .tr \[sum]
-.\" .if !c\[parenlefttp] .tr \[parenlefttp]
-.\" .if !c\[parenleftex] .tr \[parenleftex]
-.\" .if !c\[parenleftbt] .tr \[parenleftbt]
-.\" .if !c\[bracketlefttp] .tr \[bracketlefttp]
-.if !c\[lc] .tr \[lc]
-.\" .if !c\[bracketleftex] .tr \[bracketleftex]
-.\" .if !c\[bracketleftbt] .tr \[bracketleftbt]
-.if !c\[lf] .tr \[lf]
-.\" .if !c\[bracelefttp] .tr \[bracelefttp]
-.if !c\[lt] .tr \[lt]
-.\" .if !c\[braceleftmid] .tr \[braceleftmid]
-.if !c\[lk] .tr \[lk]
-.\" .if !c\[braceleftbt] .tr \[braceleftbt]
-.if !c\[lb] .tr \[lb]
-.\" .if !c\[braceex] .tr \[braceex]
-.\" .if !c\[bracerightex] .tr \[bracerightex]
-.\" .if !c\[braceleftex] .tr \[braceleftex]
-.\" .if !c\[barex] .tr \[barex]
-.if !c\[bv] .tr \[bv]
-.if !c\[ra] .tr \[ra]
-.if !c\[is] .tr \[is]
-.\" .if !c\[parenrighttp] .tr \[parenrighttp]
-.\" .if !c\[parenrightex] .tr \[parenrightex]
-.\" .if !c\[parenrightbt] .tr \[parenrightbt]
-.\" .if !c\[bracketrighttp] .tr \[bracketrighttp]
-.if !c\[rc] .tr \[rc]
-.\" .if !c\[bracketrightex] .tr \[bracketrightex]
-.\" .if !c\[bracketrightbt] .tr \[bracketrightbt]
-.if !c\[rf] .tr \[rf]
-.\" .if !c\[bracerighttp] .tr \[bracerighttp]
-.if !c\[rt] .tr \[rt]
-.\" .if !c\[bracerightmid] .tr \[bracerightmid]
-.if !c\[rk] .tr \[rk]
-.\" .if !c\[bracerightbt] .tr \[bracerightbt]
-.if !c\[rb] .tr \[rb]
-.
-.\" now turn off all headers and footers for ms, me and mm macro sets
-.if d EF .EF ''''
-.if d EH .EH ''''
-.if d OF .OF ''''
-.if d OH .OH ''''
-.if d ef .ef ''''
-.if d of .of ''''
-.if d oh .oh ''''
-.if d eh .eh ''''
-.tl ''''
-.
-.\" it doesn't make sense to use hyphenation with html, so we turn it off.
-.hy 0
-.nr HY 0
-.
.\" avoid line breaks after hyphen-like characters.
.cflags 0 -\[hy]\[em]\[en]\[shc]
.
-.pl 99999
+.\" Now set any characters defined in devps/S but not in devhtml to nul --
+.\" these are generated by eqn but not used by grohtml. grops generated
+.\" images during the alternative pass.
+.if !c\[radicalex] .tr \[radicalex]
+.if !c\[arrowverttp] .tr \[arrowverttp]
+.if !c\[arrowvertbt] .tr \[arrowvertbt]
+.if !c\[arrowvertex] .tr \[arrowvertex]
+.if !c\[barex] .tr \[barex]
.
.\" now for the color definitions
.\"
@@ -700,17 +532,14 @@
.
.cp \n(_C
.
-.if !\n(_C \
+.if !\n(_C \{\
. mso pspic.tmac
+. mso www.tmac
+.\}
.
.do ie '\[char97]'a' \
. do mso latin1.tmac
.el \
. do mso cp1047.tmac
.
-.\" tell grohtml some default parameter values
-.po 0
-.ll \n[.l]u
-.ta \n[.tabs]
-.
.\" end of file, make sure this is the last line
diff --git a/tmac/troffrc b/tmac/troffrc
index 419a6716..61cb32d1 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -18,7 +18,7 @@
.do ds troffrc!cp1047 tty.tmac
.do ds troffrc!lj4 lj4.tmac
.do ds troffrc!lbp lbp.tmac
-.do ds troffrc!html www.tmac
+.do ds troffrc!html html.tmac
.do if d troffrc!\*[.T] \
. do mso \*[troffrc!\*[.T]]
.do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \
diff --git a/tmac/troffrc-end b/tmac/troffrc-end
index 1dba113c..ef4f0082 100644
--- a/tmac/troffrc-end
+++ b/tmac/troffrc-end
@@ -2,7 +2,7 @@
.
.\" this file is parsed after all macro sets have been read
.
-.do if '\*[.T]'html' .do mso html.tmac
+.do if '\*[.T]'html' .do mso html-end.tmac
.
.\" if we are running the postscript device for html images then load www.tmac
.do if r ps4html .do mso www.tmac
diff --git a/tmac/www.tmac b/tmac/www.tmac
index c7ef46ed..e7c3cc94 100644
--- a/tmac/www.tmac
+++ b/tmac/www.tmac
@@ -49,8 +49,6 @@ www functionality. It should work with any macro set.
.if '\*[.T]'html' .nr www-html 1
.
.\" set up www-image-template
-.\" (cannot do this in html.tmac as the image device must
-.\" also know about this string)
.
.if !d www-image-template \
. ds www-image-template