Follow-up Comment #2, bug #68830 (group groff):

A little recap. There are two mutually exclusive methods of specifying the
width of lines.

Mode 1: The original method. Line width is proportional to current font size.
.ps is "tracked" by troff and stored in environments. So although current line
width is not a separate attribute in troff its mode 1 value is alway
calculable.

Mode 2: A Groff extension. Line width is set by \D't n>=0' where n is basic
units. This is not stored in the environment. So troff does not "know" the
current line width.

When in mode 2 (which is entered by any \D't n>=0') changes to font size have
no effect on line width. The only way to exit mode 2 is with a \D't -n' and
then it switches back to mode 1.

Tbl uses (via linesize(n)) mode 1, and it assumes it is in that mode on entry.
If you switch to mode 2 before the table all cell borders are drawn with the
mode 2 width and the cell dimensions may be incorrect since it is not aware of
the actual width of the cell border lines it is using.

Pic uses mode 2 to set line width. On exit it arbitrarily resets  to mode 1,
even if it had been in mode 2 on entry to the pic.

It's a mess! Documenting this is even messier. 

How can it be improved? I think Branden is suggesting is for the /D thickness
value to be stored as part of the environment and add a read only  register
(thk) which reports its value. Tbl could then store the value \n[thk] on
entry, do \D't -1', so linesize will always work, then do \D't \n[thk]' to
restore the mode it was in upon entry. Pic would just store, do its work in
mode 2, and restore on exit. A \n[thk] value of -1 (the startup default) means
the output drivers are in mode 1, using current font size to set line width.

I'm probably "not completely wrong" about all this. :-)

Cheers


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68830>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to