# problem packages diagbox and cancel

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}

-
Welcome to TeX.sx! –  hpesoj626 Apr 1 '13 at 1:40

The diagbox package internally loads pict2e which does some redefinitions that cause the problem with cancel; to prevent the redefinitions made by pict2e, load the pict2e package with the original option before diagbox:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage[original]{pict2e}
\usepackage{diagbox}
\usepackage{cancel}
\begin{document}
Some text $\frac{ \cancel{2} \cdot \cancel{ \left( q_{1}+2 \right) } }{p_1}$
\end{document}


Another possibility is to pass the original option as class option, so pict2e will pick it up:

\documentclass[12pt,a4paper,original]{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}

-
Thank you so much! Muchísimas gracias! –  Dom Apr 1 '13 at 1:39
@Dom You're welcome! ¡De nada! –  Gonzalo Medina Apr 1 '13 at 1:41