Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!drw%computer-science.nottingham.ac.uk@ucl-cs.arpa From: drw%computer-science.nottingham.ac.uk@ucl-cs.ar (Douglas Woodall) Newsgroups: net.unix-wizards Subject: Re: bug using doublebox in tbl with ditroff Message-ID: <355@brl-tgr.ARPA> Date: Thu, 1-Aug-85 00:59:36 EDT Article-I.D.: brl-tgr.355 Posted: Thu Aug 1 00:59:36 1985 Date-Received: Fri, 2-Aug-85 21:47:27 EDT Sender: news@brl-tgr.ARPA Lines: 29 naftoli@aecom.UUCP (Robert N. Berlinger) writes: > Does anybody know of a bug in ditroff which causes the box > produced by the doublebox option of tbl not to line up properly? > The boxes don't quite come into agreement at the edges. I assume from this that "box" works correctly but "doublebox" doesn't. You will certainly get this problem if the rounding caused by the resolution of your output device is such that two successive motions of 1p do not give the same result as a single motion of 2p. (The output from "tbl" contains things like .if \n(#a>=0 \h'|0'\h'-1p'\v'1p'\s\n(33\h'-\n(#~u'\ \L'|\n(#au-1v-2p'\s0\v'\n(\*(#du-\n(#au+1v+1p'\ \h'2p'\v'-1p'\s\n(33\h'-\n(#~u'\ \L'|\n(#au-1v+2p'\s0\v'\n(\*(#du-\n(#au+1v-1p'\h'|\n(TWu' and you will have problems later if this lot leaves you in the wrong place because of rounding errors.) Assuming that the resolution of the device is immutable, the problem can only be solved by changing "tbl". My solution was to add two new flags, -h and -v, to specify the distance to be used between the rules. These are set by the user (or, preferably, by a table-driven command program) so as to give no rounding errors on the output device in question. On the Diablo Hyterm, for example, tbl -h1.2p -v1.5p produces very nice double-boxed tables. (In the output, things of the form "1p" and "+2p" turn into things of the form "1u*1.2p" and "+(2u*1.5p)". The changes are mainly in tu.c and tv.c.)