2

I need to make a table with some equations and the codes as follow:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}    
\def\arraystretch{3}
\setlength\tabcolsep{0.5cm}
\begin{document}
\begin{tabular}{|l|l|}
\hline 
$|A|>B \Leftrightarrow \left[ \begin{array}{l}A>B\\A<-B\end{array}    \right.$&$|A|\geq B \Leftrightarrow \left[ \begin{array}{l}A \geq B\\A\leq -B\end{array} \right.$\\ 
\hline 
$\sqrt{A}>B \Leftrightarrow \left[ \begin{array}{l}\begin{cases}B <  0\\A\geq 0\end{cases}
\\\begin{cases}B\geq 0\\A>B^2\end{cases}
\end{array} \right.$ & $\sqrt{A}\geq B \Leftrightarrow \left[ \begin{array} {l}\begin{cases}B < 0\\A\geq 0\end{cases}
\\\begin{cases}B\geq 0\\A\geq B^2\end{cases}
\end{array} \right.$ \\ 
\hline 
\end{tabular} 
\end{document}

I want to shorten the left brackets so that they use less spaces. Thanks for help.

cropped image

  • 3
    Remove the setting to \arraystretch – egreg Jul 4 '16 at 14:56
  • You may want to consider cases with square brackets – user103499 Jul 4 '16 at 16:06
2

The error is in setting \arraystretch to 3, because the setting is inherited also by the nested array environments.

With some visual formatting it's easier.

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}    
\begin{document}

\begin{tabular}{|l|l|}
\hline
&\\[-.5\normalbaselineskip]
$|A|>B \Leftrightarrow
\left[
  \begin{array}{l}
  A > B
  \\
  A < -B
  \end{array}
\right.$ &
$|A|\geq B \Leftrightarrow
\left[
  \begin{array}{l}
  A \geq B\\A\leq -B
  \end{array}
\right.$
\\
&\\[-.5\normalbaselineskip]
\hline 
&\\[-.5\normalbaselineskip]
$\sqrt{A}>B \Leftrightarrow 
\left[ 
  \begin{array}{l}
    \begin{cases}B <  0\\A\geq 0\end{cases}
    \\[4ex]
    \begin{cases}B\geq 0\\A>B^2\end{cases}
  \end{array}
  \right.$ &
$\sqrt{A}\geq B \Leftrightarrow
\left[
  \begin{array}{l}
    \begin{cases}B < 0\\A\geq 0\end{cases}
    \\[4ex]
  \begin{cases}B\geq 0\\A\geq B^2\end{cases}
\end{array} \right.$ \\[2.75\normalbaselineskip]
\hline 
\end{tabular} 

\end{document}

enter image description here

A different implementation with booktabs:

\documentclass[12pt,a4paper]{article}

\usepackage{amsmath,booktabs,array}

\begin{document}

$\begin{array}{
  @{}
  l
  @{}
  >{{}}c<{{}}
  @{}
  l
  @{\qquad}
  l
  @{}
  >{{}}c<{{}}
  @{}
  l
  @{}
}
\toprule
\addlinespace
|A|>B & \Leftrightarrow &
\left[
  \begin{array}{l}
  A > B
  \\
  A < -B
  \end{array}
\right. &
|A|\geq B & \Leftrightarrow &
\left[
  \begin{array}{l}
  A \geq B\\A\leq -B
  \end{array}
\right.
\\
\addlinespace
\midrule
\addlinespace
\sqrt{A}>B & \Leftrightarrow &
\left[ 
  \begin{array}{l}
    \begin{cases}B <  0\\A\geq 0\end{cases}
    \\
    \addlinespace
    \begin{cases}B\geq 0\\A>B^2\end{cases}
  \end{array}
  \right. &
\sqrt{A}\geq B & \Leftrightarrow &
\left[
  \begin{array}{l}
    \begin{cases}B < 0\\A\geq 0\end{cases}
    \\
    \addlinespace
    \begin{cases}B\geq 0\\A\geq B^2\end{cases}
\end{array} \right.
\\
\addlinespace
\bottomrule
\end{array}$

\end{document}

enter image description here

| improve this answer | |
0

This allows you to manually adjust the size of the \lbrace. I wouldn't advise using it, however.

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}    

\begin{document}
$\left\lbrace\rule{0pt}{2.5ex}\right. \begin{array}{@{}l@{}}B\geq 0\\A\geq B^2\end{array}$
\end{document}

demo

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.