《复杂分析入门课程》,作者:Matthias Beck、Gerald Marchesi、Dennis Pixton 和 Lucas Sabalka第 9.1 章
圆圈:$C[z_0,R] = |z-z_0| = R$
光碟:$D[z_0,R] = |z-z_0| < R$
封闭式光盘:$\overline{D}[z_0,R] = |z-z_0| \le R$
椎间盘穿孔:$0 < |z-z_0| < R$
我该如何处理里面的点$D$
来表示椎间盘穿孔?
答案1
这是我见过的最糟糕的符号之一。
如果你真的想要它,至少把它做好,把点放在 D 的中间。
\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}
\usepackage{mathpazo}
\NewDocumentCommand{\disk}{smm}{%
\IfBooleanTF{#1}{\puncturedD}{D}[#2,#3]%
}
\makeatletter
\newcommand{\puncturedD}{{\vphantom{D}\mathpalette\punctured@D\relax}}
\newcommand{\punctured@D}[2]{%
\sbox\z@{$\m@th#1D$}
\ooalign{%
$\m@th#1D$\cr
\noalign{\punctured@adj{#1}}
\hidewidth$\m@th#1\mkern1mu\cdot$\hidewidth\cr
}%
}
\newcommand{\punctured@adj}[1]{%
\kern\dimexpr\fontdimen22
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 2
-\ht\z@/2\relax
}
\makeatother
\begin{document}
\begin{gather}
\disk*{z_0}{R}=
\{z\in\mathbb{C}:0<\lvert z-z_0\rvert<R\}=
\disk{z_0}{R}\setminus\{z_0\}
\\
\disk*{0}{1} \scriptstyle \disk*{0}{1} \scriptscriptstyle \disk*{0}{1}
\end{gather}
\end{document}
唯一的“手动”调整是\mkern1mu
将点向右移动一点。移动的量取决于字体和 D 的形状,因此无法实现自动化。
更完整的版本还具有针对封闭磁盘的语法支持。
\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}
\usepackage{mathpazo}
\NewDocumentCommand{\disk}{st-mm}{%
\IfBooleanTF{#1}{\puncturedD}{%
\IfBooleanTF{#2}{\,\overline{\!D\!}\,}{D}%
}%
[#3,#4]%
}
\makeatletter
\newcommand{\puncturedD}{{\vphantom{D}\mathpalette\punctured@D\relax}}
\newcommand{\punctured@D}[2]{%
\sbox\z@{$\m@th#1D$}
\ooalign{%
$\m@th#1D$\cr
\noalign{\punctured@adj{#1}}
\hidewidth$\m@th#1\mkern1mu\cdot$\hidewidth\cr
}%
}
\newcommand{\punctured@adj}[1]{%
\kern\dimexpr\fontdimen22
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi 2
-\ht\z@/2\relax
}
\makeatother
\begin{document}
\begin{gather}
\disk{z_0}{R}=
\{z\in\mathbb{C}:\lvert z-z_0\rvert<R\}
\\
\disk-{z_0}{R}=
\{z\in\mathbb{C}:\lvert z-z_0\rvert\le R\}
\\
\disk*{z_0}{R}=
\{z\in\mathbb{C}:0<\lvert z-z_0\rvert<R\}=
\disk{z_0}{R}\setminus\{z_0\}
\\
\disk*{0}{1} \scriptstyle \disk*{0}{1} \scriptscriptstyle \disk*{0}{1}
\end{gather}
\end{document}
拥有统一语法的优点是,例如,如果您决定用\dot{D}
而不是\puncturedD
,那么您只需更改 定义中的调用即可\disk
。
答案2
一个简单\stackinset
的带有scalerel
包装器的东西将支持较小的数学样式。
\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\dotD{\ThisStyle{\ensurestackMath{%
\stackinset{c}{.7\LMpt}{c}{-.2\LMpt}%
{\SavedStyle\cdot}{\SavedStyle D}}}}
\begin{document}
\[
x\dotD\scriptstyle\dotD\scriptscriptstyle\dotD
\]
\end{document}