我遵循了对并排方程或内联方程进行编号, 得到:
然而我的愿望是:
意思是,表格左对齐(或居中),并且编号是前等式,数字和等式之间没有太多空格。
我怎样才能达到这个结果? 我的代码:
\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}
任何帮助都将不胜感激。谢谢!
答案1
我使用tasks
手动枚举包来获得与你的图像相同的枚举列表。现在它很完美。:-)
\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}
答案2
tabularx
带有和 的代码align
,使用\leqnomode
Werner 的回答中定义的命令这个问题。它使用equation
计数器。必须通过反复试验才能找到左列中第一行和第二行对齐之间的垂直间距:
\documentclass{article}
\usepackage{geometry}
\usepackage{amsmath}
\makeatletter
\newcommand{\leqnomode}{\tagsleft@true}%
\makeatother
\usepackage{tabularx}
\usepackage{tasks}
\begin{document}
\section{Stackexchange Question}
The equations are:
{\noindent\setlength{\tabcolsep}{0pt}\begin{tabularx}{\textwidth}{*2{>{\leqnomode\arraybackslash}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}
答案3
\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}