答案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}