7

I am using the IEEEtran document class to generate my PDF file so that it has two columns, but now I get a long equation and I cannot put it into just one of the two columns. Thus I used \onecolumn at the beginning of my equation and \twocolumn at the end of my equation like this:

\documentclass[journal]{IEEEtran}
\begin{document}
...
\onecolumn
\begin{align}
    T\triangleq{} &
    \int_{0}^{\infty}
    \frac
    {\gamma^{k+m_2-1}\exp\Bigl(-\frac{m_2\gamma}{\bar\gamma_2}\Bigr)}
    {1+\Bigl(\frac{(m_1+s\bar\gamma_1)\gamma}{cm_1}\Bigr)^{m_1}(1+\frac{1}{c}\gamma_2)
        ^{\lceil m_1 \rceil -m_1}}
    \,\mathrm{d}\gamma
    \\
    \nonumber
    ={}& C\int_{0}^{\infty}\gamma^{k+m_2-1}\exp\Biggl(-\frac{m_2\gamma}{\bar\gamma_2}\Biggr)
    \\
    &\times H_{1,1}^{1,1}
    \left[
    \frac{(m_1+s\bar\gamma_1)\gamma}{cm_1}
    \;\middle|\;
    \begin{gathered} (1-m_1,1) \\ (0,1)\end{gathered}
    \right]
    H_{1,1}^{1,1}
    \left[
    \frac{\gamma}{c}
    \;\middle|\;
    t \begin{gathered} (1-\lceil m_1 \rceil +m_1,1) \\ (0,1)\end{gathered}
    \right]
    \mathrm{d}\gamma
    \\
    ={}& C\Biggl(\frac{\bar\gamma_2}{m_2}\Biggr)^{k+m_2}
    H_{1,\,[1:\,1],\,0,\,[1:\,1]}^{1,\,1,\,1,\,1,\,1}
    \left[
    \begin{gathered}
        \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2} \\
        \frac{\bar{\gamma}^{}_{2}}{c\,m_2}
    \end{gathered}
    \;\middle|\;
    \begin{gathered}
        (k+m_2,1) \\
        (1-m_1,1);(1-\lceil{m_1}\rceil+m_1,) \\
        - \\
        (0,1);(0,1)
    \end{gathered}
    \right]
    \\
    ={}& C\Biggl(\frac{\bar\gamma_2}{m_2}\Biggr)^{k+m_2}
    G_{1,\,[1:\,1],\,0,\,[1:\,1]}^{1,\,1,\,1,\,1,\,1}
    \left[
    \begin{gathered}
        \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2}\\
        \frac{\bar{\gamma}_{_2}}{c\,m_2}
    \end{gathered}
    \;\middle|\;
    \begin{gathered}
        k+m_2\\1-m_1;1-\lceil{m_1}\rceil+m_1 \\
        - \\
        0;0\end{gathered}
    \right].
\end{align}
\twocolumn

which will generate an equation in the middle of the paper like this: The long equation I want to break But I was told that the format is not suitable for publication, and I have to put this long equation spanning two columns. What's the solution?

10

We can make the whole group fit one column if we break some equations and use the \medmath command (from nccmath) which reduces the formulae size by ~80%.

I add another solution based on the strip environment from cuted (a component of the sttools bundle) which allows to have full width formulae in a two-column environment, but in contrast to table*, is inserted at the point where it is called.

\documentclass[journal]{IEEEtran}
\usepackage{mathtools,amssymb,lipsum, nccmath}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\usepackage{cuted}
\setlength\stripsep{3pt plus 1pt minus 1pt}

\begin{document}

\lipsum[1-2] % filler text

\begin{align}
  & T
  \triangleq
  \int_{0}^{\infty}
  \frac
  {\gamma^{k+m_2-1}\exp\Bigl(-\mfrac{m_2\gamma}{\bar\gamma_2}\Bigr)}
  {1+\Bigl(\mfrac{(m_1+s\bar\gamma_1)\gamma}{cm_1}\Bigr)^{\mathstrut m_1}
  \Bigl(1+\mfrac{1}{c}\gamma_2\Bigr)^{\ceil{m_1}-m_1}}
  \,\mathrm{d}\gamma
  \\[1ex]
    & =\!\begin{aligned}[t]\medmath{C\!\int_{0}^{\infty}\!\!\gamma^{k+m_2-1}} & \medmath{\exp\Bigl(\!-\frac{m_2\gamma}{\bar\gamma_2}\!\Bigr)
  H_{1,1}^{1,1}
  \mathrlap{\left[
  \frac{(m_1\!+s\bar\gamma_1)\gamma}{cm_1}
  \middle\vert
  \begin{gathered} (1\!- m_1,1) \\ (0,1)\end{gathered}
  \right]}}\\
  & {}\times\medmath{H_{1,1}^{1,1}
  \left[
  \frac{\gamma}{c}
  \;\middle|\;
  t \begin{gathered} (1-\ceil{m_1} +m_1,1) \\ (0,1)\end{gathered}
  \right]
  \mathrm{d}\gamma}
  \end{aligned}
  \\
  & =\!\begin{aligned}[t] \medmath{
  C\biggl(\frac{\bar\gamma_2}{m_2}\biggr)^{k+m_2}} & \medmath{H_{1,\,[1:1],\,0,\,[1:1]} ^{1,\,1,\,1,\,1,\,1}}\times {}\\[-1ex]
  \MoveEqLeft\medmath{\times\left[
  \begin{gathered}
  \frac{(m_1\!+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2} \\
  \frac{\bar{\gamma}^{}_{2}}{c\,m_2}
  \end{gathered}
  \middle\vert
  \begin{gathered}
  (k+m_2,1) \\
  (1\!- m_1,1);(1\!-\!\ceil{m_1}\!+ m_1,) \\
  - \\
  (0,1);(0,1)
  \end{gathered}
  \right]}
  \end{aligned}
  \\[1ex]
  & =\!\begin{aligned}[t] \medmath{C\biggl(\frac{\bar\gamma_2}{m_2}\biggr)^{k+m_2}}
  & \medmath{G_{1,\,[1:1],\,0,\,[1:1]}^{1,\,1,\,1,\,1,\,1}}\times{}\\[-1ex]
  \MoveEqLeft\times \medmath{\left[
  \begin{gathered}
  \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2}\\
  \frac{\bar{\gamma}_{_2}}{c\,m_2}
  \end{gathered}
  \;\middle|\;
  \begin{gathered}
  k+m_2\\
  1-m_1;1-\ceil{m_1}+m_1 \\
  - \\
  0;0
  \end{gathered}
  \right]}.
  \end{aligned}
\end{align}

\lipsum[3-6] % more filler text
\end{document} 

enter image description here

\documentclass[journal]{IEEEtran}
\usepackage{mathtools,amssymb,lipsum}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\usepackage{cuted}
\setlength\stripsep{3pt plus 1pt minus 1pt}

\begin{document}

\lipsum[1-2] % filler text

\begin{strip}
  \begin{align}
    T & \triangleq
    \int_{0}^{\infty}
    \frac
    {\gamma^{k+m_2-1}\exp\Bigl(-\frac{m_2\gamma}{\bar\gamma_2}\Bigr)}
    {1+\Bigl(\frac{(m_1+s\bar\gamma_1)\gamma}{cm_1}\Bigr)^{\mathstrut m_1}
    \bigl(1+\frac{1}{c}\gamma_2\bigr)^{\ceil{m_1}-m_1}}
    \,\mathrm{d}\gamma
    \\
      & = C\int_{0}^{\infty}\gamma^{k+m_2-1}\exp\Bigl(-\frac{m_2\gamma}{\bar\gamma_2}\Bigr)
    H_{1,1}^{1,1}
    \left[
    \frac{(m_1+s\bar\gamma_1)\gamma}{cm_1}
    \;\middle|\;
    \begin{gathered} (1-m_1,1) \\ (0,1)\end{gathered}
    \right]
    H_{1,1}^{1,1}
    \left[
    \frac{\gamma}{c}
    \;\middle|\;
    t \begin{gathered} (1-\ceil{m_1} +m_1,1) \\ (0,1)\end{gathered}
    \right]
    \mathrm{d}\gamma
    \\
      & = C\biggl(\frac{\bar\gamma_2}{m_2}\biggr)^{k+m_2}
    H_{1,\,[1:\,1],\,0,\,[1:\,1]}^{1,\,1,\,1,\,1,\,1}
    \left[
    \begin{gathered}
    \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2} \\
    \frac{\bar{\gamma}^{}_{2}}{c\,m_2}
    \end{gathered}
    \;\middle|\;
    \begin{gathered}
    (k+m_2,1) \\
    (1-m_1,1);(1-\ceil{m_1}+m_1,) \\
    - \\
    (0,1);(0,1)
    \end{gathered}
    \right]
    \\
      & = C\biggl(\frac{\bar\gamma_2}{m_2}\biggr)^{k+m_2}
    G_{1,\,[1:\,1],\,0,\,[1:\,1]}^{1,\,1,\,1,\,1,\,1}
    \left[
    \begin{gathered}
    \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2}\\
    \frac{\bar{\gamma}_{_2}}{c\,m_2}
    \end{gathered}
    \;\middle|\;
    \begin{gathered}
    k+m_2\\
    1-m_1;1-\ceil{m_1}+m_1 \\
    - \\
    0;0
    \end{gathered}
    \right].
  \end{align}
\end{strip}
\lipsum[3-6] % more filler text

\end{document} 

enter image description here

  • +1. I wasn't sure if the termH_{1,\,[1:1],\,0,\,[1:1]} ^{1,\,1,\,1,\,1,\,1} and the subsequent large expression in square brackets are connected multiplicatively or not; that's why I stayed away from inserting line breaks and \times symbols in those spots in my answer... – Mico Jul 13 '15 at 13:59
  • Thanks for your reply, and the second method is what I needed. :-) – Vinnton Yao Jul 13 '15 at 15:05
  • @Mico: I wasn't so sure too, except by elimination ;o) – Bernard Jul 13 '15 at 18:54
6

My understanding of the equations you're trying to display isn't sufficient to judge if it's sensible to introduce additional line breaks in order to make them fit in a single column of the two-column document layout that's provided by the IEEEtran class.

If it doesn't really make sense to introduce additional line breaks, I would suggest that you place the entire align environment inside a double-width table* environment; you'll need to choose a suitable caption, of course. Note that table* environments can only occur at the top of a page.

enter image description here

\documentclass[journal]{IEEEtran}
\usepackage{mathtools,amssymb,lipsum,caption}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\begin{document}

\lipsum[1-2] % filler text

\begin{table*}
\caption{Derivation of Result XYZ}
\centering
\begin{minipage}{0.75\textwidth}
\begin{align}
    T&\triangleq
    \int_{0}^{\infty}
    \frac
    {\gamma^{k+m_2-1}\exp\Bigl(-\frac{m_2\gamma}{\bar\gamma_2}\Bigr)}
    {1+\Bigl(\frac{(m_1+s\bar\gamma_1)\gamma}{cm_1}\Bigr)^{\mathstrut m_1}
    \bigl(1+\frac{1}{c}\gamma_2\bigr)^{\ceil{m_1}-m_1}}
    \,\mathrm{d}\gamma
    \\
    &=  \nonumber C\int_{0}^{\infty}\gamma^{k+m_2-1}\exp\Bigl(-\frac{m_2\gamma}{\bar\gamma_2}\Bigr)
    \\
    &\qquad\qquad \times 
    H_{1,1}^{1,1}
    \left[
    \frac{(m_1+s\bar\gamma_1)\gamma}{cm_1}
    \;\middle|\;
    \begin{gathered} (1-m_1,1) \\ (0,1)\end{gathered}
    \right]
    H_{1,1}^{1,1}
    \left[
    \frac{\gamma}{c}
    \;\middle|\;
    t \begin{gathered} (1-\ceil{m_1} +m_1,1) \\ (0,1)\end{gathered}
    \right]
    \mathrm{d}\gamma
    \\
    &= C\biggl(\frac{\bar\gamma_2}{m_2}\biggr)^{k+m_2}
    H_{1,\,[1:\,1],\,0,\,[1:\,1]}^{1,\,1,\,1,\,1,\,1}
    \left[
    \begin{gathered}
        \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2} \\
        \frac{\bar{\gamma}^{}_{2}}{c\,m_2}
    \end{gathered}
    \;\middle|\;
    \begin{gathered}
        (k+m_2,1) \\
        (1-m_1,1);(1-\ceil{m_1}+m_1,) \\
        - \\
        (0,1);(0,1)
    \end{gathered}
    \right]
    \\
    &= C\biggl(\frac{\bar\gamma_2}{m_2}\biggr)^{k+m_2}
    G_{1,\,[1:\,1],\,0,\,[1:\,1]}^{1,\,1,\,1,\,1,\,1}
    \left[
    \begin{gathered}
        \frac{(m_1+s\bar{\gamma}^{}_{1})\bar{\gamma}^{}_{2}}{c\,m_1m_2}\\
        \frac{\bar{\gamma}_{_2}}{c\,m_2}
    \end{gathered}
    \;\middle|\;
    \begin{gathered}
        k+m_2\\
        1-m_1;1-\ceil{m_1}+m_1 \\
        - \\
        0;0
    \end{gathered}
    \right].
\end{align}
\medskip
\hrule
\end{minipage}
\end{table*}
%\twocolumn
\lipsum[3-20] % more filler text
\end{document}
  • Thanks for your reply :-) But I think maybe Bernard's answer is closer to what I want, sorry for that. – Vinnton Yao Jul 13 '15 at 15:06
0

Finally:

\documentclass[journal]{IEEEtran}
\usepackage{mathtools,amssymb,lipsum,caption}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}

\usepackage{glossaries}
\makeglossaries
\newacronym{rog}{ROG}{radius of gyration}

\begin{document}

\lipsum[1-2] % filler text

\begin{table*}
\caption{Derivation of Result XYZ}
\centering
\begin{minipage}{0.75\textwidth}
\begin{align}
    \text{mean} &={\frac {1}{n}}\sum _{i=1}^{n}x_{i} \\
    \text{weightedMean} &= \frac{\sum_{i_1}^{n} w_i * x_i}{\sum_{i_1}^{n} w_i} \\
    \text{centroid} &= \left[ mean(x_{long}), mean(y_{lat}) \right] \\
    \text{distanceHaversine} &= 2r \arcsin{\sqrt{\sin^2{\left(\frac{y_{lat_1}-y_{lat_2}}{2} \right)}+ \cos(y_{lat_1}) \cos{y_{lat_2}} \sin^2{\left(\frac{x_{long_1}-x_{long_2}}{2} \right)}}} \\

\end{align}
\medskip
\hrule
\end{minipage}
\end{table*}
%\twocolumn
\lipsum[3-20] % more filler text
\end{document}
  • This fixes the two-column layout problem – Georg Heiler Apr 23 '20 at 10:53

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.