# How can I typeset a formula or result like this one?

I want to make a result like this one, but I have no clue. Please give me your suggest. Thank you a lot for your help.

P/s: Please tell me how to typeset equations in the same way like this... Sorry my bad English cannot give you all what I'm asking for.

For specific:

\documentclass[a4paper , 12pt]{article}
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{array}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{vietnam}
\usepackage{tikz,tkz-tab}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usetikzlibrary{arrows}
\renewcommand{\baselinestretch}{1.5} %Chỉnh dãn dòng
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\makeatletter
\newcases{bcases}
{$\m@th{##}$\hfil}
{$\m@th{##}$\hfil}
{\lbrack}
{.}
\makeatother

\begin{document}
{\color{blue}\textbf{Câu 18: }} Cho hàm số $y=f(x)$ có bảng biến thiên như hình phía dưới. Tìm tất cả $m\in \mathds{R}$ để hàm số $y=\dfrac{1}{f(x)-m}$ có 2 đường tiệm cận đứng. \\
\begin{center}
\begin{tikzpicture}
\tkzTabInit{$x$ /1, $f'(x)$ /1, $f(x)$ /2.5}
{$-\infty$,-1,1,2, $+\infty$}
\tkzTabLine{,+,0,-,0,+,0,-  }
\tkzTabVar{-/$-\infty$, +/$4$ , -/$-5$, +/$4$, -/$\infty$}
\end{tikzpicture}
\end{center}
\begin{tabular}{m{6cm}m{6cm}}
{\color{blue}\textbf{A.}} $m=4 v m<-5$ & {\color{blue}\textbf{B.}} $m=4$ \\
{\color{blue}\textbf{C.}} $m<-5$ & {\color{red}\textbf{D.}} $\begin{bcases} m = A \\ m < -5 \end{bcases}$ \\
\end{tabular}
\end{document}


The final picture is what I expected for

• You can use $\begin{bcases}...\end{bcases}$ instead of $...$, – egreg Sep 19 '18 at 9:46
• I added something based on your test case – egreg Sep 19 '18 at 9:52
• please tell us, what you expect from your code example? it works fine, but result is somehow unusual (to my taste) – Zarko Sep 19 '18 at 9:54

The \newcases macro of mathtools ought to have an easier interface; with the current one you can still define a bcases environment (b for “bracket”).

\documentclass{article}
\usepackage{mathtools}

\makeatletter
\newcases{bcases}
{$\m@th{##}$\hfil}
{$\m@th{##}$\hfil}
{\lbrack}
{.}
\makeatother

\begin{document}

$\begin{bcases} m = A \\ m < -5 \end{bcases}$

\end{document}


You should also consider the more standard cases environment (it uses a brace).

Your test case can be improved:

\documentclass[a4paper , 12pt]{article}
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{array}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{vietnam}
\usepackage{tikz,tkz-tab}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usetikzlibrary{arrows}
\renewcommand{\baselinestretch}{1.5} %Chỉnh dãn dòng
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\makeatletter
\newcases{bcases}
{$\m@th{##}$\hfil}
{$\m@th{##}$\hfil}
{\lbrack}
{.}
\makeatother

\begin{document}
\textcolor{blue}{\textbf{Câu 18: }} Cho hàm số $y=f(x)$ có bảng biến thiên
như hình phía dưới. Tìm tất cả $m\in \mathds{R}$ để hàm số
$y=\dfrac{1}{f(x)-m}$ có 2 đường tiệm cận đứng.
\begin{center}
\begin{tikzpicture}
\tkzTabInit{$x$ /1, $f'(x)$ /1, $f(x)$ /2.5}
{$-\infty$,-1,1,2, $+\infty$}
\tkzTabLine{,+,0,-,0,+,0,-  }
\tkzTabVar{-/$-\infty$, +/$4$ , -/$-5$, +/$4$, -/$\infty$}
\end{tikzpicture}
\end{center}
\begin{tabular}{p{6cm}p{6cm}}
\textcolor{blue}{\textbf{A.}} $m=4 \vee m<-5$ &
\textcolor{blue}{\textbf{B.}} $m=4$ \\
\textcolor{blue}{\textbf{C.}} $m<-5$ & \textcolor{red}{\textbf{D.}}
$\begin{bcases} m = A \\ m < -5 \end{bcases}$
\end{tabular}
\end{document}


Note \textcolor{<color>}{<text>} instead of {\color{<color>}<text>}; the removal of useless \\ tokens; the p column type instead of m; $...$ around bcases instead of $...$.

I use an aligned stack here only to emphasize that if the left hand side of the two rows had different widths (here they do not), the aligned forms would be the most appropriate.

\documentclass{article}
\usepackage{tabstackengine}
\stackMath
\begin{document}
\left[\alignCenterstack{m=&4\\m<&-5}\right.
\end{document}


In terms of the OP's test case, I give two different vertical alignment options, in the form of "D" and "E".

\documentclass[a4paper , 12pt]{article}
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{array}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{vietnam}
\usepackage{tikz,tkz-tab}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usetikzlibrary{arrows}
\renewcommand{\baselinestretch}{1.5} %Chỉnh dãn dòng
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tabstackengine}
\stackMath
\begin{document}
{\color{blue}\textbf{Câu 18: }} Cho hàm số $y=f(x)$ có bảng biến thiên như hình phía dưới. Tìm tất cả $m\in \mathds{R}$ để hàm số $y=\dfrac{1}{f(x)-m}$ có 2 đường tiệm cận đứng. \\
\begin{center}
\begin{tikzpicture}
\tkzTabInit{$x$ /1, $f'(x)$ /1, $f(x)$ /2.5}
{$-\infty$,-1,1,2, $+\infty$}
\tkzTabLine{,+,0,-,0,+,0,-  }
\tkzTabVar{-/$-\infty$, +/$4$ , -/$-5$, +/$4$, -/$\infty$}
\end{tikzpicture}
\end{center}
\begin{tabular}{m{6cm}m{6cm}}
{\color{blue}\textbf{A.}} $m=4 v m<-5$ & {\color{blue}\textbf{B.}} $m=4$ \\
{\color{blue}\textbf{C.}} $m<-5$ & {\color{red}\textbf{D.}}
\left[\alignCenterstack{m =& A \\m <& -5}\right. \\
{\color{red}\textbf{E.}}
\belowbaseline[-\ht\strutbox]{\left[\alignCenterstack{m =& A \\m <& -5}\right.}
&
\end{tabular}
\end{document}


• It doesn't work much in my test question :( Check the code of my test question please. – Hoàng Duy Anh Sep 19 '18 at 9:51
• @HoàngDuyAnh Yes it does. Please see my edit. – Steven B. Segletes Sep 19 '18 at 9:59
• Oh I see, that's exactly what I'm trying to text out! Thank you alot – Hoàng Duy Anh Sep 19 '18 at 10:00

a simple way which cross my mind :-) :

\documentclass{article}

\begin{document}
$\left[ \begin{array}{l} m=4 \\ m<-5 \end{array} \right.$
\end{document}


edit: considering your mwe, with my above proposition you will obtain:

\documentclass[a4paper , 12pt]{article}
% \usepackage{color}  % it is loaded by xcolor
\usepackage[dvipsnames]{xcolor}
\usepackage{array}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{vietnam}
\usepackage{tikz,tkz-tab}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage{pgfplots}%pgf,tikz
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usetikzlibrary{arrows}
\renewcommand{\baselinestretch}{1.5} %Chỉnh dãn dòng
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\begin{document}
\textcolor{blue}{\textbf{Câu 18: }} Cho hàm số $y=f(x)$ có bảng biến thiên
như hình phía dưới. Tìm tất cả $m\in \mathds{R}$ để hàm số
$y=\dfrac{1}{f(x)-m}$ có 2 đường tiệm cận đứng.
\begin{center}
\begin{tikzpicture}
\tkzTabInit{$x$ /1, $f'(x)$ /1, $f(x)$ /2.5}
{$-\infty$,-1,1,2, $+\infty$}
\tkzTabLine{,+,0,-,0,+,0,-  }
\tkzTabVar{-/$-\infty$, +/$4$ , -/$-5$, +/$4$, -/$\infty$}
\end{tikzpicture}
\end{center}
\begin{tabular}{p{6cm}p{6cm}}
\textcolor{blue}{\textbf{A.}} $m=4 \vee m<-5$ &
\textcolor{blue}{\textbf{B.}} $m=4$ \\
\textcolor{blue}{\textbf{C.}} $m<-5$ & \textcolor{red}{\textbf{D.}}
$\left[\begin{array}{c} m = A \\ m < -5 \end{array}\right.$
\end{tabular}
\end{document}

\documentclass[t]{beamer}