# Using cancelto in the cancel package but the arrow is wavy not straight

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

\documentclass{article}
\usepackage[makeroom]{cancel}
\usepackage{mathtools}
\begin{document}
\begin{align*}
L\{2\cos(3t)\}(s)
& = 2\int_0^{\infty}\cos(3t)e^{-st}dt\\
& = \cancelto{0}{\frac{2e^{-st}\sin(3t)}{3}\biggl|_0^{\infty}} +
\frac{s}{3}\int_0^{\infty}\sin(3t)e^{-st}dt
\end{align*}
\end{document}


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

\usepackage{pict2e}


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

\@ifundefined{OriginalPictureCmds}{\let\OriginalPictureCmds\relax}{}

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


So currently that's just how it is.