11

I am writing notes on finite group theory, and the notation used in the field uses:

  • $A.B$ for an unspecified group extension involving groups A and B
  • $A:B$ for the semidirect product with normal subgroup A
  • $A{}^{.}B$ for a non-split group extension

The last case is supposed to be the "top dot" of the colon. Is there a way to obtain only the top dot of the colon in LaTeX?

Aside: I know looking at arXiv preprints of finite group theorists that, e.g., Robert Wilson uses \def\udot{{}^{\textstyle .}}. If I recall correctly, I once asked him about it, he admitted there was probably a better way, but it worked for him.

It also looks off when writing something like $3\udot 7^{5}:Ly$.

2
  • Well, actually the version with \textstyle is better. Do you want it to have exactly the height of the colon's upper dot?
    – campa
    Commented Nov 15, 2021 at 15:13
  • @campa I was hoping for exactly the height of the colon's upper dot. I am also open to hearing the argument in favor of \textstyle (it clearly looks off in footnotes). Commented Nov 15, 2021 at 15:21

2 Answers 2

11

The version with \textstyle would be in fact better, otherwise the dot would be smaller. If you really need something which is precisely as high as the colon's upper dot and scales correctly in the different math styles, here's a way:

\documentclass{article}

\makeatletter
\newcommand*{\udot}{{\mathpalette\ud@t\relax}} % or \mathrel/\mathbin/\mathwhatever?
\newcommand*{\ud@t}[2]{%
   \sbox\z@{\m@th$#1.$}%
   \sbox\tw@{$#1:$}%
   \raise\dimexpr\ht\tw@-\ht\z@\relax\box\z@
}
\makeatother

\begin{document}

$A . A {:} A \udot A$\par
$\scriptstyle A . A {:} A \udot A$\par
$\scriptscriptstyle A . A {:} A \udot A$

\end{document}

enter image description here

4
  • 1
    You are a wizard, campa, thank you for this! Commented Nov 15, 2021 at 15:25
  • 1
    Out of curiosity: Why use \z@ and \tw@, omitting \@ne?
    – schtandard
    Commented Nov 15, 2021 at 15:46
  • 4
    @schtandard It's more or less customary to use even-numbered registers for local assignment, and odd-numbered ones for global assignments. A custom which is not always followed (including by me ;-)).
    – campa
    Commented Nov 15, 2021 at 15:57
  • 2
    For some explanation, the dot should be raised by precisely (height of the colon - height of the dot), which works ⟺ the two dots of the colon are identical, and identical to the dot, and normally the dot aligns with the lower dot of the colon.
    – user202729
    Commented Nov 15, 2021 at 16:31
10

I'd use semantic names.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\udot}{\mathpalette\udot@\relax}
\newcommand{\udot@}[2]{%
  \begingroup
  \sbox\z@{$#1{:}$}%
  \sbox\tw@{$#1{.}$}%
  \raisebox{\dimexpr\ht\z@-\ht\tw@}{$\m@th#1.$}%
  \endgroup
}
\makeatother
\newcommand{\genericextension}[1]{%
  \mathbin{%
    \nonscript\mkern-0.75\medmuskip
    {#1}%
    \nonscript\mkern-0.75\medmuskip
  }%
}
\DeclareRobustCommand{\gext}{\genericextension{.}}
\DeclareRobustCommand{\sdp}{\genericextension{:}}
\DeclareRobustCommand{\nsext}{\genericextension{\udot}}

\begin{document}

$A\gext B$ is a group extension

$A\sdp B$ is a semidirect product

$A\nsext B$ is a nonsplit group extension

${:}{\udot}$ for checking the alignment

$X_{A\gext B} \quad X_{A\sdp B} \quad X_{A\nsext B}$

\end{document}

enter image description here

I chose to do this way because the standard spacing around binary operation symbols seems to much for this case, but no space doesn't seem very good.

3
  • I completely agree with your suggestion for semantic names. Curiously, for myself, unlike the rest of mathematics, when I read something like $A\udot B$, it's not easily expressible as a phrase: I must pause, then say, "OK, so we're taking groups A and B, then combining them "somehow" to form a group extension." It's not as easy as "A extends B" because it could be that "B extends A". Commented Nov 15, 2021 at 15:44
  • 2
    @AlexNelson Sometimes I don't bother and use \otimes, but when the document has many tensor products, then I usually define \tens to be \otimes. One never knows, and chasing the document to replace \otimes with something else is better avoided. In this case it's even “more necessary”, because inputting . might be easy (supposing you don't want spacing around it), but {:} definitely isn't.
    – egreg
    Commented Nov 15, 2021 at 15:53
  • Ah, I mean, I lack an adequate vocabulary in my mental model to generate good names for semantic macro names. But I heartily agree, semantic macro names are wonderful and good practice. Commented Nov 15, 2021 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .