equations – Wrapping Text Around a Displayed Equation

equationshorizontal alignmentwrap

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 ?

Best Answer

I think you might like the wrapfig package for this.

enter image description here

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

\begin{document}

\lipsum[1]
\begin{wrapfigure}{l}{.5\textwidth}
\begin{equation}
 T_y = 
    \begin{cases}
          x + \alpha & \text{if $\alpha = \beta$}\\
          x^2 + \beta & \text{else}
    \end{cases}
\end{equation}
\end{wrapfigure}

\lipsum[2]
\end{document}