\usepackage{bm} % bold
\usepackage{hyperref}
\usepackage[parfill]{parskip} % no indent
\usepackage{graphicx}
\usepackage{subcaption} %to have subfigures available
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{braket}
\allowdisplaybreaks
\usepackage{physics}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{listings}
\usepackage{array,tabularx}
\usepackage{imakeidx}
\makeindex [intoc]
\theoremstyle{plain}% default
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}{Conjecture}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{example}{Example}[section]
\theoremstyle{remark}
\newtheorem*{remark}{Remark} % a written or spoken comment.
\newcommand*{\definitionautorefname}{Definition}
\DeclareMathOperator{\lxor}{\oplus}
\DeclareMathOperator{\lequiv}{\leftrightarrow}
\DeclareMathOperator{\powerset}{\mathcal P}
\DeclareMathOperator{\seg}{seg} % initial segment
\DeclareMathOperator*{\defeq}{\stackrel{\text{def}}{=}}
\DeclareMathOperator*{\domain}{dom}
\DeclareMathOperator*{\range}{ran}
\DeclareMathOperator{\iu}{{i\mkern1mu}}
\begin{definition}
\begin{align}
\tag{Equinumerous}
A\approx B \defeq & \exists f\colon A\to B \text{ is bijection}\\
\tag{Dominate}
A\leq B
\defeq & \exists f\colon A\to B \text{ is injection}\\
\defeq & \exists g\colon B\to A \text{ is surjection} \notag
\end{align}
\end{definition}
我在 defeq 符号后得到了一个非常小的空间,我能找到的解决方案是将对齐符号移到 defeq 符号的左侧。然而,这只是一种解决方法,有时我确实需要一个 RHS 对齐符号。有没有更好的解决方案?
\begin{definition}
\begin{align}
\tag{Equinumerous}
A\approx B &\defeq \exists f\colon A\to B \text{ is bijection}\\
\tag{Dominate}
A\leq B
&\defeq \exists f\colon A\to B \text{ is injection}\\
&\defeq \exists g\colon B\to A \text{ is surjection} \notag
\end{align}
\end{definition}
答案1
您不应该使用\DeclareMathOperator
for \defeq
。
\documentclass{article}
\usepackage{amsmath}
\newcommand{\defeq}{\overset{\mathrm{def}}{=}}
\begin{document}
\begin{align*}
\tag{Equinumerous}
A\approx B \defeq{} & \exists f\colon A\to B \text{ is bijection}\\
\tag{Dominate}
A\leq B
\defeq{} & \exists f\colon A\to B \text{ is injection}\\
\defeq{} & \exists g\colon B\to A \text{ is surjection}
\end{align*}
\begin{align*}
\tag{Equinumerous}
A\approx B &\defeq \exists f\colon A\to B \text{ is bijection}\\
\tag{Dominate}
A\leq B
&\defeq \exists f\colon A\to B \text{ is injection}\\
&\defeq \exists g\colon B\to A \text{ is surjection}
\end{align*}
\end{document}
现在\defeq
被视为二元关系符号,这是理所当然的。我认为使用第二种方法没有问题。在第一种情况下,您需要{}
after \defeq
,否则就没有空格。
答案2
每当要将对齐标记放置&
在关系的右侧时,请记住使用
relation {} & ....
没有{}
关系只会看到&
并且它不会在关系后使用任何间距。