0

who is know how I can make this line like bellow?enter image description here

or like.

1

2 Answers 2

5

The cancel package can be used for this.

\documentclass{article}
\usepackage{mathtools,xcolor,cancel}
\renewcommand\CancelColor{\color{red}}

\begin{document}
    \begin{align}
        \biggl(\frac{8x-2}{\cancel{18}}-\frac{x-2}{\cancel{18}}\biggr) \cdot \cancel{18} &= \frac{21}{\cancel{18}} \cdot \cancel{18}
        \\
        8x - \bcancel{2} - x + \bcancel{2} &= 21
    \end{align}
\end{document}

Result

2

The LaTeX code associated with the image would be:

\begin{align*}
   ( \frac{8x - 2}{{\color{Red} \cancel{{\color{Black} 18}}}} - \frac{x - 2}{{\color{Red} \cancel{{\color{Black} 18}}}} ) \times {\color{Red} \cancel{{\color{Blue} 18}}} = \frac{21}{{\color{Red} \cancel{{\color{Black} 18}}}} \times {\color{Red} \cancel{{\color{Blue} 18}}}\\
   8x - 2 - ( x - 2 ) = 21\\
   8x - {\color{Red} \bcancel{{\color{Black} 2}}} - x + {\color{Red} \bcancel{{\color{Black} 2}}} = 21\\
\end{align*}

your picture

The used commands are:

  • \bcancel{} strikes through the content from top left to bottom right
  • \cancel{} strikes through the content from bottom left to top right
  • {\color{add color} {}} gives the contained objects the color
  • \frac{}{} creates a fraction bar
  • \times creates the symbol of the cross product
  • \begin{align*} and \end{align*} contains a alignmend
  • \\ implies a line break

Personally, however, I would prefer this:

    \begin{align*}
       \left( \frac{8 \cdot x - 2}{{\color{Red} \cancel{{\color{Black} 18}}}} - \frac{x - 2}{{\color{Red} \cancel{{\color{Black} 18}}}} \right) \cdot {\color{Red} \cancel{{\color{Blue} 18}}} &= \frac{21}{{\color{Red} \cancel{{\color{Black} 18}}}} \cdot {\color{Red} \cancel{{\color{Blue} 18}}}\\
       8 \cdot x - 2 - \left( x - 2 \right) &= 21\\
       8 \cdot x - {\color{Red} \bcancel{{\color{Black} 2}}} - x + {\color{Red} \bcancel{{\color{Black} 2}}} &= 21\\
\end{align*}

my idia

The new used commands are:

  • & aligns
  • \cdot creates a center dot
  • \left( \right) creates brackets that are as big as their content

Not the answer you're looking for? Browse other questions tagged .