1

I have a problem in latex. I can't write like that picture. how to write like that.

Please.enter image description here

  • If xcolor does not work, then try color. But this must be an old installation or it's incomplete –  Jun 07 '15 at 06:18

1 Answers1

5

One way is to use the cancel package, but there might be other options with tikz.

\documentclass{article}
\usepackage{xcolor}
\usepackage{cancel}

\renewcommand{\CancelColor}{\color{red}}  % Using red as colour

\begin{document}
\large
$\cancel{\left(m2d2\right)} + \cancel{\left(d2m1\right)}$

\[\cancel{\left(m2d2\right)} + \cancel{\left(d2m1\right)}\]

\end{document}

enter image description here

  • Please note that the even the package author himself does not recommend the usage of cancel ;-) –  Jun 07 '15 at 04:15