I found this helpful to quelling my issue with the cancel packages arrows but displaymath seems to break it.
The only part of the linked code I am using is
\usepackage{tikz}
\usepackage{relsize}
\usetikzlibrary{calc}
\newcommand\canceltoSwNe[2]{%
\begin{tikzpicture}[baseline = (B.base)]
\node[anchor = center, inner sep = 0pt] (B) {#1};
\draw[arrows = {}-{latex}]%
($(B.south west)+(-1pt, -1pt)$) -- ($(B.north east)+(+4pt, +1pt)$)%
node [anchor = south west, xshift = +1pt, yshift = -1pt,%
inner sep = 0pt]%
{\smaller\smaller{#2}};
\end{tikzpicture}%
}
It would be great if this code would just inherent the environment it is being used in. In my case, the align environment. However, it doesn't and I have to insert math delimiters. If I use \(\), everything works but is disproportional since this is for inline math. I tried using \[\] but it just breaks down instead.
\documentclass{article}
\usepackage[makeroom]{cancel}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{relsize}
\usetikzlibrary{calc}
\newcommand\canceltoSwNe[2]{%
\begin{tikzpicture}[baseline = (B.base)]
\node[anchor = center, inner sep = 0pt] (B) {#1};
\draw[arrows = {}-{latex}]%
($(B.south west)+(-1pt, -1pt)$) -- ($(B.north east)+(+4pt, +1pt)$)%
node [anchor = south west, xshift = +1pt, yshift = -1pt,%
inner sep = 0pt]%
{\smaller\smaller{#2}};
\end{tikzpicture}%
}
\begin{document}
\begin{align*}
L\{2\cos(3t)\}(s)
& = 2\int_0^{\infty}\cos(3t)e^{-st}dt\\
& = \canceltoSwNe{\(\frac{2e^{-st}\sin(3t)}{3}\biggl|_0^{\infty}\)}{\(0\)} +
\frac{s}{3}\int_0^{\infty}\sin(3t)e^{-st}dt
\end{align*}
\begin{align*}
L\{2\cos(3t)\}(s)
& = 2\int_0^{\infty}\cos(3t)e^{-st}dt\\
& = \canceltoSwNe{\[\frac{2e^{-st}\sin(3t)}{3}\biggl|_0^{\infty}\]}{\[0\]} +
\frac{s}{3}\int_0^{\infty}\sin(3t)e^{-st}dt
\end{align*}
\end{document}


\displaystyle? Sinces\[handles some vertical-mode-issue, it is not surprised that it fails to work with TikZ andalign. – Symbol 1 Mar 23 '15 at 02:41\displaystylecan be a short term solution but I would like to see something better. – dustin Mar 23 '15 at 03:41