TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have something like the following in a tex document:

some text ...

\[ T_y = \left\{ \begin{array}{ll}
          x + \alpha & \mbox{if $\alpha = \beta$}\\
          x^2 + \beta & \mbox{else} \end{array} \right. \]

some text again ...

Question: is it possible that the formula is adjusted at left and the second test comes in front of the formula (at right), and not immediately under it ?

share|improve this question
Welcome to TeX.SX! Would you try making your question clearer? It's not clear what text you're referring to. – egreg Jun 30 '12 at 17:45
What do you mean with 'above it'? – Sigur Jun 30 '12 at 20:44
up vote 6 down vote accepted

I think you might like the wrapfig package for this.

enter image description here

\usepackage{amsmath}    % for cases environment (and lots more)
\usepackage{wrapfig}    % for wrapfigure environment
\usepackage{lipsum}     % for sample text


 T_y = 
          x + \alpha & \text{if $\alpha = \beta$}\\
          x^2 + \beta & \text{else}

share|improve this answer
Great, is it also possible to reduce the white space on top and bottom of the formula ? It takes a large space here. – user995434 Jul 1 '12 at 0:49
@user995434 have a look at the documentation you can change the 'overhang' for example – cmhughes Jul 1 '12 at 0:51
I tried to change the overhang and the number of lines but it does not reduce the space in "top" of the formula – user995434 Jul 1 '12 at 1:07
You can always add extra negative space. Try \lipsum[3] \begin{wrapfigure}[3]{l}{.5\textwidth} \vspace{-\baselineskip} \begin{equation} T_y = \begin{cases} x + \alpha & \text{if $\alpha = \beta$}\ x^2 + \beta & \text{else} \end{cases} \end{equation} \end{wrapfigure} – mrf Jul 1 '12 at 7:37
@user995434 I think you're looking for \abovedisplayskip; see Herber's Mathmode document – cmhughes Jul 1 '12 at 14:16

Your Answer


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.