2

I have the following fraction: fraction

How can I use a line and cross off the 3, 2, and 1s in the numerator and denominator?

I need a line crossing off the 3s in the numerator and denominator - one line. Same goes for 2s and 1s. (not two separate lines in numerator and denominator).

MCMastery
  • 240

1 Answers1

7

Simple with pst-node: define the numbers you want to cancel as nodes, and connect the corresponding nodes with a line:

\documentclass{article}

\usepackage{mathtools}
\usepackage{pst-node}
\usepackage{auto-pst-pdf}

\begin{document}

\[ \begin{pspicture}
  \dfrac{7\cdot 6\cdot 5\cdot 4\cdot\Rnode{n3}{3}\cdot\Rnode{n2}{2}\cdot\Rnode{n1}{1}}%
  {\Rnode{d3}{3}\cdot\Rnode{d2}{2}\cdot\Rnode{d1}{1}}
  \psset{linewidth=0.3pt,  nodesep=-6pt}
  \ncline[linecolor=magenta]{n3}{d3}
  \ncline[linecolor=cyan]{n2}{d2}
  \ncline[linecolor=green]{n1}{d1}
  \end{pspicture}\]

\end{document} 

enter image description here

Bernard
  • 271,350