3

I want to do something like this:

enter image description here

in a line with text, not center. Also I can control the left brace but it doesn't seems good.

My MWE is:

\documentclass{article}
\usepackage{amsmath,cancel}
\newcommand\MyLBrace[2]{%
\left\{\rule{0pt}{#1}\right.\text{#2}}\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{document}
   Add m.t.m $\MyLBrace{5ex}{
   \begin{tabular}{r}
   21x\;-\;\cancel{6y}=24\\ 
   4x\;+\;\cancel{6y}=26 \\ \hline
   25x=50\\x=2\;\, 
  \end{tabular} }$
\end{document}

which result in this:

enter image description here

Any help, please?

2 Answers 2

2

This is close.

\documentclass{article}
\usepackage{mathtools,cancel}
\begin{document}
   Add m.t.m $\
   \begin{cases}
   \begin{aligned}
   21x - \cancel{6y} &= 24\\
   4x + \cancel{6y}& =26 \\[\jot] \hline
   25x &=50\\
   x &=2
   \end{aligned}
   \end{cases}
  $
\end{document}

enter image description here

With lot of arrays, you can do this:

\documentclass{article}
\usepackage{amsmath,cancel,array}
\begin{document}
   $\begin{array}{@{}r@{\,\,}r@{}}
   \text{Add m.t.m} & \left\{
   \begin{array}{r@{}}
   21x - \cancel{6y}=24\\
   4x + \cancel{6y}=26 \\ \hline
   25x=50
  \end{array}\right.\kern-\nulldelimiterspace\\
  & x=2\phantom{0}
  \end{array}$
\end{document}

enter image description here

3
  • Yep, thank you!!, maybe with my command MyLBrace could fix the left brace
    – L F
    May 4, 2015 at 2:10
  • 1
    @LuisFelipeVillavicencioLopez I have added another option with arrays (better than tabular for math content).
    – user11232
    May 4, 2015 at 2:17
  • sure, it seems better!
    – L F
    May 4, 2015 at 2:27
1

For the sake of variety, here's a solution that uses one tabular and two array environments. The second array environment is set up to get the spacing around symbols of type mathbin and mathrel right.

enter image description here

\documentclass{article}
\usepackage{array,cancel}

\begin{document}
\[
\begin{tabular}{c}
 \\ text here text here \\ \\ \\
\end{tabular}
\begin{array}{@{}c@{}}
   \left\{ \begin{array}{@{}c@{}} \\ \\ \\ \end{array} \right. \\ \\ \end{array}\,
\begin{array}{@{} r @{}>{{}}c<{{}}@{} r @{{}={}} r @{}}
   21x & - & \cancel{6y} & 24\\
    4x & + & \cancel{6y} & 26\\
   \hline
   & & 25x & 50\\
   & &   x  & 2\\
\end{array}
\]
\end{document}
0

You must log in to answer this question.

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