5

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

william007
  • 4,781

2 Answers2

3

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}

Peter Grill
  • 223,288
1

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}
Moriambar
  • 11,466
Werner
  • 603,163