[tex-k] dvips/rounding problem

Heiko Oberdiek oberdiek@ruf.uni-freiburg.de
Thu, 07 Jun 2001 09:01:20 +0200


At 21:41 03.06.2001 -0700, Tomas G. Rokicki wrote:
>But zero maxdrift for rules is wrong too, since some characters are
>composed of glyphs and rules (long arrows for instance) and you can
>end up then with a gap between the rule and the glyph . . .

Do you have examples, please. I only found:
* \textvisiblespace (composed of only rules)
* \textunderscore (one rule)
* \blacksquare (one rule)
* AmSLaTeX: \...arrowfill (only consists of glyphs, the "rule" is "-")

>A better fix would be to be smarter about rules in general,
>recognize when they line up (dvips preprocesses anyway) and
>line up just those that are supposed to line up . . . I don't
>know if this is possible in general, but the common case of a
>rule on the right side of a table shouldn't be too hard to
>catch . . .

This requires much intelligence to implement, errorprone and
the probability is low, that someone will implement this.

To minimize possible problems with rule and glyph interaction
here a code fix suggestion that affects only vertical
non-zero rules:

%%% cut %%% dopage.diff %%% cut %%%
*** dopage.c.orig	Thu Jun  7 10:57:40 2001
--- dopage.c	Thu Jun  7 10:58:11 2001
***************
*** 234,239 ****
--- 234,245 ----
        }
        rxx = (int)(conv * rx + 0.9999999) ;
        ryy = (int)(vconv * ry + 0.9999999) ;
+       /* HO 2001/06/03: synchronisation added for vertical rules
+          because of alignment reasons.
+       */
+       if (ry > rx) {
+         hh = PixRound(h);
+       }
        drawrule(rxx, ryy) ;
     } else
        rxx = 0 ;
%%% cut %%% dopage.diff %%% cut %%%

Best regards
  Heiko <oberdiek@uni-freiburg.de>