A First Course in Complex Analysis by Matthias Beck, Gerald Marchesi, Dennis Pixton, and Lucas Sabalka Ch9.1

enter image description here

Circle: $C[z_0,R] = |z-z_0| = R$

Disc: $D[z_0,R] = |z-z_0| < R$

Closed Disc: $\overline{D}[z_0,R] = |z-z_0| \le R$

Punctured disc: $0 < |z-z_0| < R$

How do I do the dot inside the $D$ to denote a punctured disc?

  • 15
    Among the worst notation I ever saw. – egreg Aug 16 at 8:52
  • @egreg Thanks I guess XD – BCLC Aug 16 at 8:53
  • 1
    If you want an alternative that has font support, there is always eth, ð / Ð. It's not just Unicode-supported, it's part of the shared space between Unicode and Windows-1252 that came from them both being built on Latin-1. – CR Drost Aug 16 at 13:39
  • Unicode also has a small number of combining overlay accents, such as rings, although I don’t support using them as notation. They might, technically, work in unicode-math if you need something you can apply to any grapheme. – Davislor Aug 16 at 21:34
up vote 18 down vote accepted

It's among the worst notation I have ever seen.

If you really want it, at least do it right, with the dot in the middle of the 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}

enter image description here

The only “manual” adjustment is \mkern1mu to shift the dot a bit to the right. The amount of shifting depends on the font and the shape of the D, so it cannot be made automatic.


A more complete version with syntax support also for the closed disk.

\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}

enter image description here

The advantage of having a unified syntax is that if, for instance, you decide for \dot{D} instead of \puncturedD, you can just change the call in the definition of \disk.

  • 2
    I expected the first sentence really :-) – boycott.se - yo' Aug 16 at 9:21
  • 1
    What's so bad about it? – Tanner Swett Aug 16 at 21:01
  • @TannerSwett It looks more like a stain, rather than a proper part of the symbol. – egreg Aug 16 at 21:08

A simple \stackinset with a scalerel wrapper thrown around it will support the smaller math styles.

\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}

enter image description here

  • Nice solution, +1. Although 'simple' is not the first word that comes to mind looking at all the macros and arguments inside the \newcommand... – Marijn Aug 17 at 13:09

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.