![枚举中的案例内点填充](https://linux22.com/image/377232/%E6%9E%9A%E4%B8%BE%E4%B8%AD%E7%9A%84%E6%A1%88%E4%BE%8B%E5%86%85%E7%82%B9%E5%A1%AB%E5%85%85.png)
我想要两个(或三个)等式,并希望每行都有一些文本。文本应右对齐,我希望等式和文本之间有点,就像没有案例时一样。当我在枚举中使用 hspace(列表 1 和 2)以及在枚举中使用 wide(列表 2)时,我不知道如何进行正确对齐。文本将在右侧继续,太长了(图片中显示不起作用)。
以下是代码:
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{enumitem}
\makeatletter
\newcommand*\Annadotfill{
\leavevmode
%
\cleaders \hb@xt@ .33em{\hss .\hss }\hfill
\kern \z@
}
\@ifdefinable\@Anna@brace@width{\newdimen\@Anna@brace@width}
\settowidth\@Anna@brace@width{%
$\left\{\vbox{\vskip \@m \p@}\right.\kern -\nulldelimiterspace$%
}
\newenvironment{Annacases}{%
\left\{%
\tabcolsep \z@
\def\arraystretch{1.2}%
\tabularx{\dimexpr \linewidth-\@Anna@brace@width \relax}%
{>{$}r<{$}>{${}}X<{$}}%
}{%
\endtabularx
\right.%
\kern -\nulldelimiterspace
}
\makeatother
\begin{document}
Some text before the enumeration. \Annadotfill works well;
\\~\\
\textbf{List 1:}
\begin{enumerate}
\item $AB=CD$ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a leo ut erat luctus scelerisque.\Annadotfill works well;
\item $AB=CD$ \Annadotfill works well;
\item $\begin{Annacases}
&AB = CD \Annadotfill\text{works well;}\\
&AB = CD+EF\Annadotfill\text{works well;}\\
\end{Annacases}$
\item\hspace{38pt}
$\begin{Annacases}
&AB = CD\Annadotfill\text{doesn't work;}\\
&AB = CD+EF\Annadotfill\text{doesn't work;}\\
\end{Annacases}$
\end{enumerate}
\textbf{List 2:}
\begin{enumerate}[wide, labelindent=0pt]
\item $AB=CD$ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a leo ut erat luctus scelerisque.\Annadotfill works well;
\item $\begin{Annacases}
&AB = CD\Annadotfill\text{doesn't work;}\\
&AB = CD+EF\Annadotfill\text{doesn't work;}\\
\end{Annacases} $
\item\hspace{38pt}
$\begin{Annacases}
&AB = CD\Annadotfill\text{doesn't work;}\\
&AB = CD+EF\Annadotfill\text{doesn't work;}\\
\end{Annacases}$
\item because $\begin{Annacases}
&AB = CD\Annadotfill\text{doesn't work;}\\
&AB = CD+EF\Annadotfill\text{doesn't work;}\\
\end{Annacases} $
\end{enumerate}
\end{document}