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 ?

  • 4
    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

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}

  • 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
  • 1
    @user995434 I think you're looking for \abovedisplayskip; see Herber's Mathmode document – cmhughes Jul 1 '12 at 14:16

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.