# Tabular and equation in a text line

I want to do something like this:

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]{%
\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:

\documentclass{article}
4x + \cancel{6y}& =26 \\jot] \hline 25x &=50\\ x &=2 \end{aligned} \end{cases}  \end{document}  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}  • Yep, thank you!!, maybe with my command MyLBrace could fix the left brace – L F May 4, 2015 at 2:10 • @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 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. \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}