Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert a long equation in whole page of two column format? [closed]

Tags:

latex

I have an equation like this:

\begin{flalign}&I(pair_1,pair_2)=\nonumber\\
    &\begin{cases} 
        0 & if\:\begin{cases}
        \max\left(r\left(pair_1^{rx}\right),r\left(pair_2^{tx}\right)\right)\leq
        d(pair_1^{rx},pair_2^{tx})  \\ \& \\
        \max\left(r\left(pair_1^{tx}\right),r\left(pair_2^{rx}\right)\right)\leq
        d(pair_1^{tx},pair_2^{rx}) \end{cases}\\ 1 & otherwise
    \end{cases}\nonumber\\
\end{flalign}

I Want to show this equation in whole of two column page. Indeed avoid to put equation in only one column.

like image 980
Hosein Aqajani Avatar asked Oct 15 '25 03:10

Hosein Aqajani


1 Answers

My first suggestion is that you use multicols environment by multicol package. For example, given your preamble:

\documentclass{doublecol-new}
%\usepackage{natbib,stfloats}
%\usepackage{mathrsfs}
%\usepackage{graphicx}
%\usepackage[tight,footnotesize]{subfigure}
%\usepackage{algorithmic}
%\usepackage{algorithm}
%\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{multicol,lipsum}

\begin{document}
\begin{multicols}{2}
    \lipsum[1]
\end{multicols}

\begin{multicols}{1}
\begin{flalign}&I(pair_1,pair_2)=%\nonumber\\
&\begin{cases} 
0 & if\:\begin{cases}
\max\left(r\left(pair_1^{rx}\right),r\left(pair_2^{tx}\right)\right)\leq
d(pair_1^{rx},pair_2^{tx})  \\ \& \\
\max\left(r\left(pair_1^{tx}\right),r\left(pair_2^{rx}\right)\right)\leq
d(pair_1^{tx},pair_2^{rx}) \end{cases}\\ 1 & otherwise
\end{cases}\nonumber\\
\end{flalign}
\end{multicols}

\begin{multicols}{2}
    \lipsum[2]
\end{multicols}

\end{document}

This would give you the following output:

screenshot of output

Also, a bit better looking:

\begin{multicols}{1}
    \begin{equation}
        I(pair_1,pair_2)=
        \begin{cases}
            0 & \text{if }
            \begin{cases}
                \max\left(r\left(pair_1^{rx}\right),r\left(pair_2^{tx}\right)\right)\leq d(pair_1^{rx},pair_2^{tx}) \\
                \& \\
                \max\left(r\left(pair_1^{tx}\right),r\left(pair_2^{rx}\right)\right)\leq d(pair_1^{tx},pair_2^{rx})
            \end{cases}\\
            1 & \text{otherwise}
        \end{cases}
    \end{equation}
\end{multicols}

enter image description here

like image 149
MattAllegro Avatar answered Oct 16 '25 21:10

MattAllegro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!