TransWikia.com

horizontal equations with numbering in left and centering

TeX - LaTeX Asked by Eli Simhayev on February 27, 2021

I followed the code from Numbering side-by-side equations or inline equations, got:

enter image description here

However, I desire for:

enter image description here
Meaning, the tabular is aligned to the left (or center), and numbering is before the equation, without a lot of space between the number and the equation.

How can I achieve this result?
My code:

documentclass{article}

usepackage{amsmath}


begin{document}
section{Stackexchange Question}
The equations are:

begin{tabular}{p{7cm}p{7cm}}
{begin{align}
&bar{U_i} = frac{1}{m}sum_{j=1}^m U_{ij} \
&tilde{{U_{i}}} = bar{{U_{i}}} + z_{alpha slash 2} cdot sigma_{U_{i}} 
end{align}}
&
{begin{align}
&sigma_{foo}^2 = sigma_{U_{i}}^2 = frac{1}{m-1}sum_{j=1}^m(U_{m}-bar{U_{i}})^2 \ 
&tilde{y_i} = frac{1}{m}sum_{j=1}^m v_{ij} cdot U_{ij} + (1-v_{ij})cdot L_{ij} 
end{align}}
end{tabular}


end{document}

Any help would be appreciated. Thanks!

3 Answers

I have used tasks package using manual enumeration to have the same enumerate list of your image. Now it is perfect. :-)

documentclass[12pt]{article}  
usepackage[margin=2.5cm]{geometry}
usepackage{tasks,amsmath,amssymb} 
begin{document}
section{Stackexchange Question}
The equations are:
begin{tasks}[counter-format=(tsk[1]),label-width=4.5em, column-sep =4.4pt](2)
task $displaystyle tilde{{U_{i}}} = bar{{U_{i}}} + z_{alpha slash 2} cdot sigma_{U_{i}}$ 
task[(3)] $displaystyle sigma_{text{foo}}^2 = sigma_{U_{i}}^2 = frac{1}{m-1}sum_{j=1}^m(U_{m}-bar{U_{i}})^2$
task[(2)] $displaystyle bar{U_i} = frac{1}{m}sum_{j=1}^m U_{ij}$
task[(4)] $displaystyle tilde{y_i} = frac{1}{m}sum_{j=1}^m v_{ij} cdot U_{ij} + (1-v_{ij})cdot L_{ij}$
end{tasks}

end{document}

enter image description here

Correct answer by Sebastiano on February 27, 2021

A code with tabularx and align, using the leqnomode command, defined in Werner's answer to this question. It uses the equation counter. The vertical spacing between the first & second line of align in the left column had to be found by trial and error:

documentclass{article}
usepackage{geometry}
usepackage{amsmath}
makeatletter
newcommand{leqnomode}{tagsleft@true}%
makeatother
usepackage{tabularx}

usepackage{tasks}

begin{document}

section{Stackexchange Question}
The equations are:

{noindentsetlength{tabcolsep}{0pt}begin{tabularx}{textwidth}{*2{>{leqnomodearraybackslash}X}}
{begin{align}
& bar{U_i} = frac{1}{m}sum_{j=1}^m U_{ij} \[1.6ex]
& tilde{{U_{i}}} = bar{{U_{i}}} + z_{alpha slash 2} cdot sigma_{U_{i}}
end{align}}
&
{begin{align}
& sigma_{foo}^2 = sigma_{U_{i}}^2 = frac{1}{m-1}sum_{j=1}^m(U_{m}-bar{U_{i}})^2 \
& tilde{y_i} = frac{1}{m}sum_{j=1}^m v_{ij} cdot U_{ij} + (1-v_{ij}) cdot L_{ij}
end{align}}
end{tabularx}}

end{document}

enter image description here

Answered by Bernard on February 27, 2021

enter image description here

documentclass{article}
usepackage{multicol}
setlength{columnsep}{-10mm}
%setlength{columnseprule}{1pt}
usepackage{enumitem}
usepackage{amsmath}

begin{document}
section{Stackexchange Question}
The equations are:
begin{multicols}{2}
begin{enumerate}[label={(arabic*)}]
item $bar{U_i} = frac{1}{m}sum_{j=1}^m U_{ij}$
item $tilde{{U_{i}}} = bar{{U_{i}}} + z_{alpha slash 2} cdot 
 sigma_{U_{i}} $ 
columnbreak
item $sigma_{foo}^2 = sigma_{U_{i}}^2 = frac{1}{m-1}sum_{j=1}^m(U_{m}- 
bar{U_{i}})^2$
item $tilde{y_i} = frac{1}{m}sum_{j=1}^m v_{ij} cdot U_{ij} + (1- 
v_{ij})cdot L_{ij}$

end{enumerate}
end{multicols}

end{document}

Answered by js bibra on February 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP