如何在 Enumerate 中重现这种三列格式?

如何在 Enumerate 中重现这种三列格式?

需要说明的是,我并不要求使用 enumerate。我只是想重现图像。我尝试了 flalign 和 multicols 的变体,但无法使其工作。

在此处输入图片描述

答案1

我看不出enumerate这里的环境有多大用处。相反,我会创建一个四列tabular环境,其中我将定义第一列以自动增加计数器并将其显示为小写字母“数字”。哦,我会右对齐而不是左对齐这些字母样式的数字。

在此处输入图片描述

\documentclass{article} % or some other suitable document class

\usepackage{array}      % for \newcolumntype macro
\newcolumntype{L}{>{$}l<{$}} % left aligned & automatic inline math mode
\newcounter{tabrowcount} % create dedicated counter for row nums
% Column type for an automatically incremented counter. (If you prefer
% left-alignment, change "r" to "l" at end of the def. of the column type.)
\newcolumntype{z}{>{\stepcounter{tabrowcount}\alph{tabrowcount}.}r} 
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro

\usepackage{newpxtext,newpxmath} % optional: Palatino-clone text and math fonts

\begin{document}
Show that each statement form in column~I is logically 
equivalent to the form next to it in column~II.
\begin{center}
\setcounter{tabrowcount}{0} % (re)initialize the counter
\begin{tabular}{@{} z L L l @{}}
\mc{} % Create an empty cell in first column
  & \mc{\bfseries I} & \mc{\bfseries II} \\[0.5ex]
  & A\Rightarrow(B\Rightarrow C) & (A\wedge B)\Rightarrow C \\
  & A\wedge(B\vee C) & (A\wedge B)\vee(A\wedge C) & Distributive Law \\
  & \dots \\
  & \dots \\
  & \dots \\
  & \dots \\
  & A\Leftrightarrow B & B\Leftrightarrow A & Biconditional commutativity  
\end{tabular}
\end{center}

\end{document}

附录回答 OP 在本答案下方评论中提出的后续问题:OP 提供的信息不足以完全诊断可能发生的事情,更不用说提出可靠的补救措施了。我只能推测,两个数学列和/或最后一列中的某些表达式足够长,以至于使环境的宽度超出tabular\textwidth从而引发Overfull \hbox警告。

由于我无法做出正确的诊断,因此我只能提供非常通用的治疗方法。

  • 在序言中添加以下说明:

    \usepackage{tabularx,ragged2e}
    \newcolumntype{Y}{>{\RaggedRight}X} % ragged-right version of X col. type
    
  • 改变

    \begin{tabular}{@{} z L L l @{}}
    

    \begin{tabularx}{\textwidth}{@{} z L L Y @{}}
    
  • 改成。\end{tabular}\end{tabularx}

如果您已经猜到,这些变化结合起来,允许在最后一列自动换行,从而有助于防止创建过满的行,那么您就完全正确了。

答案2

这是一个{NiceTabular}使用 的解决方案nicematrix

\documentclass{article}
\usepackage{nicematrix}
\newcolumntype{L}{>{$}l<{$}} % left aligned & automatic inline math mode

\begin{document}

\begin{table}[htb]
\centering
\begin{NiceTabular}{@{}>{\OnlyMainNiceMatrix{\alph{iRow}.}}rLLl@{}}[first-row]
  & \Block[c]{}{\bfseries I} & \Block[c]{}{\bfseries II} \\[0.5ex]
  & A\Rightarrow(B\Rightarrow C) & (A\wedge B)\Rightarrow C \\
  & A\wedge(B\vee C) & (A\wedge B)\vee(A\wedge C) & (Distributive Law) \\
  & \dots \\
  & \dots \\
  & \dots \\
  & \dots \\
  & A\Leftrightarrow B & B\Leftrightarrow A & (Biconditional commutativity)  
\end{NiceTabular}
\end{table}

\end{document} 

上述代码的输出

答案3

您可以从这里开始:

\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{counter}
\newcounter{tabitem}
\newcommand{\tabitem}{\stepcounter{tabitem}\makebox[21pt][r]{\alph{tabitem}.\;\,}}

\begin{document}
    
    \begin{tblr}{colspec={Q[1cm,c]X[l]X[l]X[l]},rows={1cm,m},cell{1}{2,3}={c}}
             & {\Large I} & {\Large II} & \\
\tabitem    & $some math text$&$more math text$& \\
\tabitem    & $even more math$&$ and more$     & (Distributive law)\\
\tabitem    & so so on . . .    & and so om      & (Distributive law)\\              
        \end{tblr}
    
\end{document}

在此处输入图片描述

答案4

以下是使用 TeX 原语的解决方案:

\def\lto{\mathbin\Rightarrow}
\def\liff{\mathbin\Leftrightarrow}

Show that each statement form in column~I is logically equivalent
to the form next to it in column~II.
$$
  \vbox{\halign{#\hfil\quad & $#\hfil$\quad & $#\hfil$\quad & #\hfil \cr
       & \hfil\hbox{\bf I} &  \hfil\hbox{\bf II} \cr
    a. & A \lto (B \lto C) & (A \land B) \lto C \cr
    b. & A\land  (B\lor C) & (A\land B)\lor(A\land C) & Distributive Law \cr
    c. & A \lor (B\land C) & (A\lor B) \land (A \lor C) & Distributive Law \cr
    d. & (A\land B) \lor \lnot B & A \lor \lnot B \cr
    e. & (A\lor B) \land \lnot B & A \land \lnot B \cr
    f. & A\lto B & \lnot B \lto \lnot A & Law of the contrapositive \cr
    g. & A \liff B & B \liff A & Biconditional commutativity \cr
  }}
$$

相关内容