我认为这是一个非常基本的问题,但我找不到任何答案。我在乳胶中写下了以下等式:
\begin{equation}
U= \frac{\bar{X}_1 -\bar{X}_2}{\sqrt{\frac{S^2_1}{n_1}+\frac{S^2_1}{n_1}}}
\end{equation}
我也想写变量名,例如
Where,
\bar{X}_1
= mean of first dataset
等等。
问题:
我尝试过建议这里但随后我又遇到了另一个问题。我的变量的详细信息有点孤单,因此文本触及了边缘,如下图所示:
附言:我正在写IEEEtran
我的整个方程的代码:
\begin{align*}
U &= \frac{\bar{X}_1 -\bar{X}_2}{\sqrt{\frac{S^2_1}{n_1}+\frac{S^2_1}
{n_1}}}
\intertext{where}
\bar{X}_1 &= \text{mean of correctly recognized In-direction distractors}; \\
\bar{X}_2 &= \text{mean of correctly recognized Out-direction distractors}; \\
S_1 &= \text{variance of correctly recognized In-direction distractors}; \\
S_2 &= \text{variance of correctly recognized Out-direction distractors}.
\end{align*}
答案1
您可以使用tabularx
代替align
:
\documentclass{IEEEtran}
\usepackage{amsmath}
\usepackage{array,tabularx}
\begin{document}
\begin{equation}
U= \frac{\bar{X}_1 -\bar{X}_2}{\sqrt{\frac{S^2_1}{n_1}+\frac{S^2_1}{n_1}}}
\end{equation}
\begin{tabularx}{\linewidth}{>{$}r<{$} @{${}={}$} X}
\bar{X}_1 & mean of correctly recognized In-direction distractors; \\
\bar{X}_2 & mean of correctly recognized Out-direction distractors; \\
S_1 & variance of correctly recognized In-direction distractors; \\
S_2 & variance of correctly recognized Out-direction distractors.
\end{tabularx}
\end{document}
答案2
问题我在上面的评论中链接了它在这里也可以正常工作。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\SetLabelAlign{myright}{\hss\llap{$#1$}}
\newlist{where}{description}{1}
\setlist[where]{labelwidth=2cm,labelsep=0.5em,itemsep=0pt,
leftmargin=!,align=myright,font=\normalfont}
\begin{document}
\begin{equation}
U= \frac{\bar{X}_1 -\bar{X}_2}{\sqrt{\frac{S^2_1}{n_1}+\frac{S^2_1}{n_1}}}
\end{equation}
Where:
\begin{where}
\item[\bar{X}_1 =] mean of correctly recognized In-direction distractors some text filled for this line and in to the next line;
\item[\bar{X}_2 =] mean of correctly recognized Out-direction distractors;
\item[S_1 =] variance of correctly recognized In-direction distractors;
\item[S_2 =] variance of correctly recognized Out-direction distractors.
\end{where}
\end{document}
如果你不想输入=
每个项目,请替换\SetLabelAlign{myright}
为:
\SetLabelAlign{myright}{\hss\llap{$#1 =$}}