What's going on here that the first and last \fbox are not getting drawn correctly when immediately following \noindent?








It's barely noticeable: but now that I see it, it annoys me.

enter image description here

  • 3
    that is a problem with your viewer and the current magnification. – user2478 Dec 6 '12 at 20:43
  • I don't think it's the viewer. The same misalignment shows up when I print the document. It also shows up when I e-mail the pdf to a different computer with a different operating system. – A.Ellett Dec 6 '12 at 20:47
  • 1
    then give more informations! An image is not enough because I cannot see anything different when running the example. – user2478 Dec 6 '12 at 20:49
  • 1
    I can't see it. Can you add info about OS, TeX distribution, compilation procedure and previewer/printer driver? – egreg Dec 6 '12 at 20:50
  • I'm using Max OSX, pdfTeX Version 3.1415926-2.3-1.40.12 (TeX Live 2011), using Mac's preview. I first use latex, then dvips with the switch Pwww and then finally ps2pdf. – A.Ellett Dec 6 '12 at 21:03

It is an rounding error of dvips:

543 575 a % moveto
Fa(A)p % draw `A'
605 575 4 108 v % x y width height rule
515 443 123 4 v % x y width height rule % horizontal rule
515 602 4 161 v % x y width height rule % left vertical rule
633 602 V % x y (previous width) (previous height) rule % right vertical rule
515 604 123 4 v % x y width height rule % horizontal rule

The horizontal rules start at 515 with width 123 to 638. The rule thickness is 4, thus the right vertical rule should start at 634. but it is starting at 633.

You can use a higher resolution to get a more accurate result, e.g.

dvips -D8000

or better

dvips -Ppdf

that uses -D8000 and also includes the header alt-rule.pro:

%%BeginProcSet: alt-rule.pro 0 0
% Patch by TVZ
% Makes dvips files draw rules with stroke rather than fill.
% Makes narrow rules more predictable at low resolutions
% after distilling to PDF.
% May have unknown consequences for very thick rules.
% Tested only with dvips 5.85(k).

Result with dvips -Ppdf:


  • The dvi resolution should not exceed 2636 dpi (dvips -D2636), if the PS contains material to be distilled into XObjects which are later used as appearances in PDF annotations. See: tex.stackexchange.com/a/127836. 2400 dpi is far enough to solve the rounding errors discussed here. – AlexG Aug 20 '13 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.