如何引用 enumthm 中的特定項目

如何引用 enumthm 中的特定項目

我嘗試使用 LaTeX 來編寫定義。它看起來不錯,但有另一種方法可以避免最後一項中的硬編碼 (d) 項嗎?

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{euscript}
\usepackage{enumitem}
\usepackage{textcomp}
\newlist{enumthm}{enumerate}{1}
\setlist[enumthm]{label=(\alph*)}
\newcommand\restr[2]{{% we make the whole thing an ordinary symbol
  \left.\kern-\nulldelimiterspace % automatically resize the bar with \right
  #1 % the function
  \vphantom{\big|} % pretend it's a little taller at normal size
  \right|_{#2} % this is the delimiter
  }}
\linespread{1.6}
\newtheorem{thm}{Theorem}[section]
\newtheorem{defn}[thm]{Definition}
\begin{document}
\begin{defn}
Let $X$ be a topological space. A \emph{presheaf} $\mathcal{F}$ (of Abelian groups) on $X$ consists an Abelian group $\mathcal{F}(U)$ for every open subset $U$ of $X$, and a group homomorphism (\emph{restriction map}) $\rho_{UV}:\mathcal{F}(U)\to\mathcal{F}(V)$ for every pair of open subsets $V\subseteq U$ which has the following properties:
\begin{enumthm}
\item $\mathcal{F}(\emptyset )=0$;
\item $\rho_{UU}=\operatorname{Id}$;
\item If we have three open subsets $W\subseteq V\subseteq U$, then $\rho_{UW}=\rho_{VW}\circ\rho_{UV}$.\\
A presheaf is said to be a \emph{sheaf} if in addition
\item (Uniqueness) Let $U$ be an open subset of $X$, $s\in\mathcal{F}$, $\{U_i\}_i$ a covering of $U$ by open subsets $U_i$. If $\restr{s}{U_i}=0$ for every $i$, then $s=0$.
\item (Glueing local sections) Let us keep the notation of (d). Let $s_i\in\mathcal{F}(U_i),i\in I$, be sections such that $\restr{s_i}{{U_i\cap U_j}}=\restr{s_j}{U_i\cap U_j}$. Then there exists a section $s\in \mathcal{F}(U)$ such that $\restr{s}{U_i}=s_i$ (this section $s$ is unique by condition (d)).
\end{enumthm}
\end{defn}
\end{document}

答案1

您可以將\label\ref與其他編號元素一起使用。\label{item:unique}在第四項中加入eg ,並\ref{item:unique}在第五項中使用。

在下面的程式碼中我已刪除,\restr因為我不知道它是如何定義的。

\documentclass{article}
\usepackage{enumitem,amsthm,amsmath}
\newlist{enumthm}{enumerate}{1}
\setlist[enumthm]{label=(\alph*)}
\newtheorem{thm}{Theorem}[section]
\newtheorem{defn}[thm]{Definition}
\begin{document}

\begin{defn}
Let $X$ be a topological space. A \emph{presheaf} $\mathcal{F}$ (of Abelian groups) on $X$ consists an Abelian group $\mathcal{F}(U)$ for every open subset $U$ of $X$, and a group homomorphism (\emph{restriction map}) $\rho_{UV}:\mathcal{F}(U)\to\mathcal{F}(V)$ for every pair of open subsets $V\subseteq U$ which has the following properties:
\begin{enumthm}
\item $\mathcal{F}(\emptyset )=0$;
\item $\rho_{UU}=\operatorname{Id}$;
\item If we have three open subsets $W\subseteq V\subseteq U$, then $\rho_{UW}=\rho_{VW}\circ\rho_{UV}$.\\
A presheaf is said to be a \emph{sheaf} if in addition
\item (Uniqueness) Let $U$ be an open subset of $X$, $s\in\mathcal{F}$, $\{U_i\}_i$ a covering of $U$ by open subsets $U_i$. If ${s}{U_i}=0$ for every $i$, then $s=0$.
\label{item:unique}
\item (Glueing local sections) Let us keep the notation of \ref{item:unique}. Let $s_i\in\mathcal{F}(U_i),i\in I$, be sections such that ${s_i}{{U_i\cap U_j}}={s_j}{U_i\cap U_j}$. Then there exists a section $s\in \mathcal{F}(U)$ such that ${s}{U_i}=s_i$ (this section $s$ is unique by condition \ref{item:unique}).
\end{enumthm}
\end{defn}

\end{document}

相關內容