I used the cancel package today for the first time but the arrow isn't straight. Is this normal?

   & = 2\int_0^{\infty}\cos(3t)e^{-st}dt\\
   & = \cancelto{0}{\frac{2e^{-st}\sin(3t)}{3}\biggl|_0^{\infty}} +

enter image description here

I would like to use this package, but at the same time, it is sloppy unless there is a fix for this problem.

  • How do you mean arrow is not straight? – percusse Mar 22 '15 at 20:50
  • @percusse look at the arrow. It definitely isn't a nice straight line no matter the zoom so it isn't an artifact of the pdf viewer which occurs with some instances of LaTeX but disappear when you adjust the zoom. – dustin Mar 22 '15 at 20:51
  • Ah you mean rasterized or pixallated. Got it. – percusse Mar 22 '15 at 20:55
  • @DavidCarlisle it should be fine now – dustin Mar 22 '15 at 22:32

cancel uses picture environment commands, so sloping lines are made by positioning many font glyphs with small line segments, this inevitably gives a notch sometimes as rounding error moves the line from one pixel to the next.

Normally in such cases, you can use


to re-implement the picture mode commands using pdf drawing primitives to get a smoother appearance and less restrictions on available slopes.

That didn't work here, but it turns out that's a documented feature, the end of cancel.sty says

% pict2e removes bounding box from line and vector, so use original
% versions by declaring \OriginalPictureCmds; make it a no-op if undefined


% Sometime maybe find a better solution that uses all slopes with pict2e

So currently that's just how it is.

|improve this answer|||||

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.