# Thread: How to cross out long terms

1. ## How to cross out long terms

How to cross out long terms?

Like this: $\frac{\rlap{---------}(x + 5)(x - 2)}{\rlap{---------}(x + 5)} = x - 2$

This is something I've been wanting to do again for a while but forgot. And I couldn't find it anywhere. Here's what I've found through experimentation.

You use: \rlap {--}

In front of the term where you want the slash to start.

Then increase the "-" between the brackets until it's long enough.

Is there an easier way to do this? I imagine so.

2. I experimented with Jonboy's suggestion . . .

It seems that "rlap" is an over-write command.

\rlap{///}3x^2 . $\Rightarrow\quad \rlap{///}3x^2$

\rlap{TRUE}false . $\Rightarrow\quad \rlap{TRUE}false$

\rlap{|}X . $\Rightarrow\quad \rlap{|}X$

\rlap{||}\:5T^2 . $\Rightarrow\quad \rlap{||}\:5T^2$

I don't know why "|" produces a horizontal line.

3. Thanks for the response Soroban! Very interesting findings.

4. It would be much easier if we had the cancel package in LaTeX...

5. Originally Posted by Jonboy
How to cross out long terms?

Like this: $\frac{\rlap{---------}(x + 5)(x - 2)}{\rlap{---------}(x + 5)} = x - 2$

...
With Jonboy's method you can use different colours to cross out different terms.

$\frac{\bold{\rlap{{\color{red}====}}}(x + 5)(x - 2) \rlap{{\color{blue}---------}}(x + 7)}{\rlap{{\color{red}====}}(x + 5) \rlap{{\color{blue}---------}}(x + 7)} = \bold{x - 2}$

It would be nice and much more legible if the horizontal line could be printed in bold style. Unfortunately I didn't find the appropriate command . The \bold{..} obviously only works with numbers and letters.

6. Originally Posted by earboth
With Jonboy's method you can use different colours to cross out different terms.

$\frac{\bold{\rlap{{\color{red}====}}}(x + 5)(x - 2) \rlap{{\color{blue}---------}}(x + 7)}{\rlap{{\color{red}====}}(x + 5) \rlap{{\color{blue}---------}}(x + 7)} = \bold{x - 2}$

It would be nice and much more legible if the horizontal line could be printed in bold style. Unfortunately I didn't find the appropriate command . The \bold{..} obviously only works with numbers and letters.
Using \vrule, you can create lines of any height, depth and width that you want. For example, $\frac{(\rlap{\color{red}\vrule height3.5pt depth-2pt width2.3em}x + 5)(x - 2) (\rlap{\color{blue}\vrule height3.5pt depth-2pt width2.3em}x + 7)}{(\rlap{\color{red}\vrule height3.5pt depth-2pt width2.3em}x + 5) (\rlap{\color{blue}\vrule height3.5pt depth-2pt width2.3em}x + 7)} = x - 2$ comes from this code:

Code:
\frac{(\rlap{\color{red}\vrule height3.5pt depth-2pt width2.3em}
x + 5)(x - 2) (\rlap{\color{blue}\vrule height3.5pt depth-2pt width2.3em}
x + 7)}{(\rlap{\color{red}\vrule height3.5pt depth-2pt width2.3em}
x + 5) (\rlap{\color{blue}\vrule height3.5pt depth-2pt width2.3em}
x + 7)} = x - 2