0

I was trying to put equation number in each column of equations using align. For that I write the following code-

\begin{align}
\label{equn:rotation}
\begin{split}
W^+_\mu=\frac{W^1_\mu-iW^2_\mu}{\sqrt{2}}\\
W^-_\mu=\frac{W^1_\mu+iW^2_\mu}{\sqrt{2}}
\end{split} & &  \begin{split}
Z^0_\mu=\cos{\theta_w} W^3_\mu-\sin{\theta_w} B_\mu\\
A_\mu=\sin{\theta_w} W^3_\mu+\cos{\theta_w} B_\mu
\end{split}
\end{align}

I get this following output-Gain Output.

But I want to get the output something like this-Expected Output.

But I can not able to do this. Can anyone help me how I can do this?

3 Answers 3

2

I propose one solution with the environment minipage. I hope this will help you. Remark: for the alignment of the = symbol, i think it is better to use the &= in the split environment

    \documentclass[11pt]{article}
    \usepackage{amsmath}
        
    \begin{document}
    \begin{minipage}{0.45\linewidth}
        \begin{equation}
            \begin{split}
                W^+_\mu&=\frac{W^1_\mu-iW^2_\mu}{\sqrt{2}}\\
                W^-_\mu&=\frac{W^1_\mu+iW^2_\mu}{\sqrt{2}}
            \end{split}
        \end{equation}%
    \end{minipage}%
    \hfill%
    \begin{minipage}{0.45\linewidth}
        \begin{equation}
            \begin{split}
                Z^0_\mu&=\cos{\theta_w} W^3_\mu-\sin{\theta_w} B_\mu\\
                A_\mu&=\sin{\theta_w} W^3_\mu+\cos{\theta_w} B_\mu
            \end{split}
        \end{equation}%
    \end{minipage}%
    \end{document}

enter image description here

1
0

I would use aligned together with mathtools instead of split.

\documentclass[11pt]{article}
\usepackage{mathtools}
\begin{document}
\begin{minipage}{0.45\linewidth}
\begin{equation}
  \begin{aligned}
  W^+_\mu &= \frac{W^1_\mu-iW^2_\mu}{\sqrt{2}}\\
  W^-_\mu &= \frac{W^1_\mu+iW^2_\mu}{\sqrt{2}}
  \end{aligned}
\end{equation}%
\end{minipage}%
\hfill%
\begin{minipage}{0.45\linewidth}
\begin{equation}
  \begin{aligned}
  Z^0_\mu &= \cos{\theta_w} W^3_\mu-\sin{\theta_w} B_\mu\\
  A_\mu   &= \sin{\theta_w} W^3_\mu+\cos{\theta_w} B_\mu
  \end{aligned}
\end{equation}%
\end{minipage}%
\end{document} 
1
  • Great thanks for your attention to my query. Commented Feb 21, 2022 at 8:11
0

You can measure the two parts, add some space for the equation number and typeset the thing using minipages.

The optional argument to doubleequation is for the left indentation.

On the other hand, the last way, with align seems clearer.

\documentclass{article}
\usepackage{amsmath}

\usepackage{lipsum} % for context

\ExplSyntaxOn

\NewDocumentEnvironment{doubleequation}{O{2em}b}
  {
     \anirban_doubleequation:nn { #1 } { #2 }
  }
  {}

\seq_new:N \l__anirban_doubleequation_seq
\dim_new:N \l__anirban_doubleequation_a_dim
\dim_new:N \l__anirban_doubleequation_b_dim
\box_new:N \l__anirban_doubleequation_a_box
\box_new:N \l__anirban_doubleequation_b_box
\box_new:N \l__anirban_doubleequation_eqnum_box

\cs_new_protected:Nn \anirban_doubleequation:nn
  {
     $$ % yes!
     \seq_set_split:Nnn \l__anirban_doubleequation_seq { \nextequation } { #2 }
     \hbox_set:Nn \l__anirban_doubleequation_eqnum_box { \theequation }
     \hbox_set:Nn \l__anirban_doubleequation_a_box
       {
          $\displaystyle\seq_item:Nn \l__anirban_doubleequation_seq { 1 }$
       }
     \dim_set:Nn \l__anirban_doubleequation_a_dim
       { \box_wd:N \l__anirban_doubleequation_a_box + 4em + \box_wd:N \l__anirban_doubleequation_eqnum_box }
     \hbox_set:Nn \l__anirban_doubleequation_b_box
       {
          $\displaystyle\seq_item:Nn \l__anirban_doubleequation_seq { 2 }$
       }
     \dim_set:Nn \l__anirban_doubleequation_b_dim
       { \box_wd:N \l__anirban_doubleequation_b_box + 4em + \box_wd:N \l__anirban_doubleequation_eqnum_box }
     \hspace{#1}
     \begin{minipage}{\l__anirban_doubleequation_a_dim}
       \noindent
       \begin{equation}
       \hspace{0pt}
       \seq_item:Nn \l__anirban_doubleequation_seq { 1 }
       \hspace{10000pt minus 1fil}
       \end{equation}
     \end{minipage}
     \hspace{10000pt minus 1fil}
     \begin{minipage}{\l__anirban_doubleequation_b_dim}
       \noindent
       \begin{equation}
       \hspace{0pt}
       \seq_item:Nn \l__anirban_doubleequation_seq { 2 }
       \hspace{10000pt minus 1fil}
       \end{equation}
     \end{minipage}
     $$
 }

\ExplSyntaxOff

\begin{document}

\eqref{A} and \eqref{B}

\lipsum[1][1-5]
\begin{doubleequation}
  \begin{aligned}
  W^+_\mu&=\frac{W^1_\mu-iW^2_\mu}{\sqrt{2}}\\
  W^-_\mu&=\frac{W^1_\mu+iW^2_\mu}{\sqrt{2}}
  \end{aligned}\label{A}
\nextequation
  \begin{aligned}
  Z^0_\mu&=\cos{\theta_w} W^3_\mu-\sin{\theta_w} B_\mu\\
  A_\mu&=\sin{\theta_w} W^3_\mu+\cos{\theta_w} B_\mu
  \end{aligned}\label{B}
\end{doubleequation}
\lipsum[2][1-5]\setcounter{equation}{123}
\begin{doubleequation}[1em]
  \begin{aligned}
  W^+_\mu&=\frac{W^1_\mu-iW^2_\mu}{\sqrt{2}}\\
  W^-_\mu&=\frac{W^1_\mu+iW^2_\mu}{\sqrt{2}}
  \end{aligned}
\nextequation
  \begin{aligned}
  Z^0_\mu&=\cos{\theta_w} W^3_\mu-\sin{\theta_w} B_\mu\\
  A_\mu&=\sin{\theta_w} W^3_\mu+\cos{\theta_w} B_\mu
  \end{aligned}
\end{doubleequation}
\lipsum[3][1-5]
\begin{align}
 &  W^+_\mu=\frac{W^1_\mu-iW^2_\mu}{\sqrt{2}}
&&  W^-_\mu=\frac{W^1_\mu+iW^2_\mu}{\sqrt{2}}
\\[1ex]
 &  Z^0_\mu=\cos{\theta_w} W^3_\mu-\sin{\theta_w} B_\mu
&&  A_\mu=\sin{\theta_w} W^3_\mu+\cos{\theta_w} B_\mu
\end{align}
\lipsum[4][1-5]

\end{document}

enter image description here

A few tricks are used…

1
  • Thanks a lot for your kind attention towards my problem and giving helpful solution. Commented Feb 21, 2022 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .