When using cancel package to cross out something and the package diagbox is also loaded the line does not appear in the proper location. When diagbox is not loaded everything works ok. However, I need to load that package to use it with some cells in tables.
See the following MWE:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{diagbox}
\usepackage{cancel}
\begin{document}
Some text $\frac{ \cancel{2} \cdot \cancel{ \left( q_{1}+2 \right) } }{p_1}$
\end{document}
Best Answer
The
diagbox
package internally loadspict2e
which does some redefinitions that cause the problem withcancel
; to prevent the redefinitions made bypict2e
, load thepict2e
package with theoriginal
option beforediagbox
:Another possibility is to pass the
original
option as class option, sopict2e
will pick it up: