在证明中标记部分或“子证明”

在证明中标记部分或“子证明”

有谁知道如何给证明中的某个部分贴上标签,以便以后引用吗?

只是为了清楚起见,我想在证明环境中做一个“子证明”。

答案1

这是一种方法,基于 tex.stackexchange 上引用的答案。

\documentclass{article}

\usepackage{enumitem}

\newlist{pfparts}{description}{1}
\setlist[pfparts,1]{%
  font=\normalfont\textsf,
  itemindent=2pt,
  wide,
  itemsep=0pt,topsep=2pt,
  labelsep=0.75ex
}
% From 
% https://tex.stackexchange.com/questions/1230/reference-name-of-description-list-item-in-latex
\makeatletter
\def\namedlabel#1#2{\begingroup
    #2%
    \def\@currentlabel{#2}%
    \phantomsection\label{#1}\endgroup
}
\makeatother

\usepackage[colorlinks,linkcolor=red]{hyperref}
\usepackage[nameinlink]{cleveref}

\usepackage{amsthm}
\newtheorem{prop}{Proposition}

\begin{document}

\begin{prop}
  $2^{n} > n$ for every natural number $n$.
\end{prop}

\begin{proof}

\begin{pfparts}
  \item[\namedlabel{pfpart:base}{Base step}.]
    First, $2^{0} = 1 > 0$.

  \item[\namedlabel{pfpart:induct}{Inductive step}.]
    We wish to prove that, for every natural number $n$, if $2^{n} > n$, then $2^{n+1}>n+1$. 
    Let $n$ be an arbitrary natural number. Assume that $2^{n} > n$. Then
    \[
      2^{n+1} = 2 \cdot 2^{n} > 2 \cdot n = n + n \geq n,
    \]
    and so $2^{n+1} > n$. \qedhere
\end{pfparts}

\end{proof}

In \ref{pfpart:base} we used \dots.

\end{document}

按名称引用的证明部分

相关内容