Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a theorem which is about some 4 conditions, 3 of which are equivalent in one case, and some other three are equivalent in some other case, hence I would like to typeset something like this:

\begin{align*}
   equivalent if B -{ condition (1) \        
                    { condition (2) \\     }-  equivalent if A
                    { condition (3) \\     }
                      condition (4) \      }
\end{align*}

I can do one brace or the other, or both if one's scope extended the other or was disjoint from the other's. But what can I do in this case? Is it possible without hacking too much?

What about non-mathmode alternatives?

share|improve this question
    
I'm not really sure you're helping your readers with this format. –  egreg Jul 24 at 12:29
    
@egreg: This is for a beamer presentation. I intend to display one brace first and the second later (well, actually, with $\Downarrows$ in between the conditions and "$\Uparrow$ if" instead of those "equivalent if", but still. Do you have any better ideas on how to do that concisely? –  tomasz Jul 24 at 12:41

3 Answers 3

up vote 2 down vote accepted
\documentclass{article}
\usepackage{amsmath}
\usepackage{stackengine}
\setstackEOL{\#}
\setstackgap{L}{.7\baselineskip}
\begin{document}
\begin{equation*}
\begin{aligned}
   &condition (1) &\\       
   equivalent\ if\ B - \smash{\left\{\Centerstack{\#\#\#}\right.} \, &condition (2) &\\
   &condition (3) &\!\!\!\smash{\left\}\Centerstack{\#\#\#}\right.}-  equivalent\ if\ A\\     
   & condition (4) &    
\end{aligned}
\end{equation*}
\end{document}

enter image description here

As a follow up, to make the conditions centered with respect to each other, I could use an array environment (or tabular for text mode), rather than aligned. Also, because array and tabular environments redefine \baselineskip, one has to set the stackgap to an explicit point value, rather than defining it in terms of \baselineskip.

\documentclass{article}
\usepackage{amsmath}
\usepackage{stackengine}
\setstackEOL{\#}
\setstackgap{L}{10pt}
\begin{document}

\begin{equation*}
\arraycolsep=.5ex
\renewcommand\arraystretch{1.2}
\begin{array}{rcl}
   &condition\ (1) &\\       
   equivalent\ if\ B - \smash{\left\{\Centerstack{\#\#\#}\right.} &condition\ (2) &\\
   &condition\ (3) &\smash{\left\}\Centerstack{\#\#\#}\right.}-  equivalent\ if\ A\\     
   & centered\ condition\ (4) &    
\end{array}
\end{equation*}

{\centering\renewcommand\arraystretch{1.2}
\tabcolsep=.5ex
\begin{tabular}{rcl}
   &condition\ (1) &\\       
   equivalent\ if\ B - $\smash{\left\{\Centerstack{\#\#\#}\right.}$ &condition\ (2) &\\
   &condition\ (3) &$\smash{\left\}\Centerstack{\#\#\#}\right.}$-  equivalent\ if\ A\\     
   & centered\ condition\ (4) &    
\end{tabular}\par}
\end{document}

enter image description here

share|improve this answer
    
How can I make the middle column align to center? –  tomasz Jul 24 at 11:49
    
Also, thanks for the suggestion, works great (though I'd found that .8 gap works better). –  tomasz Jul 24 at 11:50
    
Alternatively, how can I make this work with \tabular? –  tomasz Jul 24 at 12:13
    
@tomasz See revision. I used array to achieve centering. Changing to tabular is just a step from there. –  Steven B. Segletes Jul 24 at 12:14
    
@tomasz See latest revision for text mode. –  Steven B. Segletes Jul 24 at 12:18

This is a job for \valign! Although I don't think this will help readers much.

\documentclass{article}

\begin{document}

\valign{#\cr
  \vbox{\hbox{%
    Equivalent if $A$
    $\left\{\vphantom{\begin{tabular}{c} A\\B\\C\end{tabular}}\right.$%
  }}
  \vfill\cr
  \hbox{\begin{tabular}{@{}c@{}}
  Condition (1) \\
  Condition (2) \\
  Condition (3) \\
  Condition (4)
  \end{tabular}}\cr
  \vfill
  \vbox{\hbox{%
    $\left.\vphantom{\begin{tabular}{c} A\\B\\C\end{tabular}}\right\}$
    Equivalent if $B$%
  }}\cr
}

\end{document}

enter image description here

share|improve this answer

Here's a solution that uses only arrays to align the three parts. The outermost array, which is set up to have three columns, serves to "house" the three horizontal parts. Each horizontal part consists of four rows, but some of the cells in the left-hand and right-hand parts -- which are constructed as nested arrays, each consisting of a single column -- are empty. The instruction \null is used to create empty cells.

The middle part is currently set up as a tabular rather than as an array since it would appear to contain mostly text. If that's not correct, i.e., if it's supposed to contain mostly math as well, you could could use an array environment for the middle parts as well. Conversely, if the left-hand and right-hand parts are to contain mostly text, you may want to use tabulars instead of arrays to define their layout.

enter image description here

\documentclass{article}
\usepackage{amsmath} %% for "\text" macro
\begin{document}
\[
\begin{array}{c@{}c@{}c}  %% outermost array: 3 centered columns
\begin{array}{c} \left. \begin{array}{@{}c}  %% a pair of nested arrays
  \null \\ \text{equivalent if $B$} \\ \null
\end{array} \right\{ \\ \null \end{array}
&
\begin{tabular}{c}
Condition (1)\\
Condition (2)\\
Condition (3)\\
Condition (4)\\
\end{tabular}
&
\begin{array}{c}  %% another pair of nested arrays
\null \\
\left\} \begin{array}{c@{}}%
  \null \\ \text{equivalent if $A$} \\ \null
\end{array} \right. \end{array}
\end{array}
\]
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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