答案1
下面轉載了@Werner 提供的解決方案——https://tex.stackexchange.com/a/410766/197451
提供了兩種證明環境:
證明A
和
證明B
第一個使用常規tabular
,第二個使用tabularx
允許對齊段落文字的 。
微量元素
\documentclass{article}
\usepackage{tabularx}
\newcounter{proofstep}
\newcommand{\step}{}
\newenvironment{proofA}
{\par
\setcounter{proofstep}{0}%
\renewcommand{\step}{\refstepcounter{proofstep}\theproofstep. &}%
\noindent
\begin{tabular}{ @{} r c l @{}}}
{\end{tabular}}
\newenvironment{proofB}
{\par
\setcounter{proofstep}{0}%
\renewcommand{\step}{\refstepcounter{proofstep}\theproofstep. &}%
\noindent
\tabularx{\textwidth}{ @{} r c X @{} }}
{\endtabularx}
\begin{document}
\noindent
\begin{tabular}{ @{} r c l @{} }
1. & some math & Justification. \\
2. & some math & Justification.
\end{tabular}
\begin{proofA}
\step some math & Justification. \\
\step some math & Justification.
\end{proofA}
\begin{proofB}
\step some math & This is just another sentence that will span at least two
lines. Well, now it will, for sure! \\
\step some math & Justification.
\end{proofB}
\end{document}
可以透過修改表格環境的程式碼來新增標題行,如下所示
\begin{tabular}{ @{} r c l @{} }
& \textbf{Step} & \textbf{Reason}\\
1. & some math & Justification. \\
2. & some math & Justification.
\end{tabular}