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.

The length of formula in attached code is getting too long, I would wish to break it short. I try to insert a break after the \rightsquigarrow by failed.

How should I insert a break?

   \documentclass[conference]{IEEEtran}

    \usepackage{amsmath, amssymb, url, proof}
    \newcommand{\srule}[3]{
    \infer[ (#1) ]
         {#3}
         {#2}
         \bigskip
    }
    \begin{document}

    {\centering
        \begin{minipage}{1\textwidth}
            \srule{if2}
            { \bigwedge\limits_{i=1}^n t_1 \leq t_i}
            {(t_1\Rightarrow P_1,\ldots,t_n\Rightarrow P_n),C,D)
            \stackrel{\tau}\rightsquigarrow
            (P_1, C \land \bigwedge\limits_{i=1}^n t_1 \leq t_i,D+t_1))}
        \end{minipage}

        } 

    \end{document}

The expected formula should be like this

share|improve this question
    
The equation is a little unusual, so it's difficult to make a suggestion. Could you add a picture illustrating the result that you want? –  Ian Thompson Jul 28 '12 at 18:26
    
Hi, I have edited the question to put the picture of expected result. –  william007 Jul 29 '12 at 1:48
    
I guess you don't want the "if" from if2 in math mode, do you? At the moment it looks like the variables i and f. –  Hendrik Vogt Aug 5 '12 at 9:09

2 Answers 2

up vote 3 down vote accepted

You could just add another \stackrel{} to achieve:

enter image description here

Alternatively, you could use \shortstack{}{} as discussed at \shortstack when writing text in nodes in TikZ and shown in the example below. This also produces an image as above.

Code:

\documentclass[conference]{IEEEtran}

\usepackage{amsmath, amssymb, url, proof}
\newcommand{\srule}[3]{
\infer[ (#1) ]
     {#3}
     {#2}
     \bigskip
}
\begin{document}

{\centering
    \begin{minipage}{1\textwidth}% ---------- \stackrel version
        \srule{if2}
        { \bigwedge\limits_{i=1}^n t_1 \leq t_i}
        {\stackrel{\displaystyle(t_1\Rightarrow P_1,\ldots,t_n\Rightarrow P_n),C,D)
        \stackrel{\tau}\rightsquigarrow}
        {(P_1, C \land \bigwedge\limits_{i=1}^n t_1 \leq t_i,D+t_1))}}
    \end{minipage}
    %
    \begin{minipage}{1\textwidth}% ---------- \shortstack version
        \srule{if2}
        { \bigwedge\limits_{i=1}^n t_1 \leq t_i}
        {\shortstack{$(t_1\Rightarrow P_1,\ldots,t_n\Rightarrow P_n),C,D)
        \stackrel{\tau}\rightsquigarrow$ \\
        $(P_1, C \land \bigwedge\limits_{i=1}^n t_1 \leq t_i,D+t_1))$}}
    \end{minipage}
    } 
\end{document}
share|improve this answer

Vertical stacking is easily obtained using array. The following MWE uses a \frac to stack elements as well as array for "sub-stacking" the lower part:

enter image description here

\documentclass[conference]{IEEEtran}

\usepackage{amsmath, amssymb, url, proof}
\newcommand{\srule}[3]{
  \infer[ (#1) ]
    {#3}
    {#2}
    \bigskip
  }

\begin{document}

\centering
\begin{minipage}{1\textwidth}
  \srule{if2}
    { \bigwedge\limits_{i=1}^n t_1 \leq t_i}
    {(t_1\Rightarrow P_1,\ldots,t_n\Rightarrow P_n),C,D)
    \stackrel{\tau}\rightsquigarrow
    (P_1, C \land \bigwedge\limits_{i=1}^n t_1 \leq t_i,D+t_1))}
\end{minipage}

\[
  \frac
    {\bigwedge\limits_{i=1}^n t_1 \leq t_i}
    {\begin{array}{@{}c@{}}
       ((t_1\Rightarrow P_1,\ldots,t_n\Rightarrow P_n),C,D)
         \stackrel{\tau}\rightsquigarrow \\
       (P_1, C \land \bigwedge\limits_{i=1}^n t_1 \leq t_i,D+t_1)
     \end{array}}\ (if2)
\]

\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.