8

I want a U, with the symbols $\mathfrak{i}$ and $\mathfrak{r}$ stacked up on each other between the parallel vertical lines. They should not protrude higher than the height of the U. It is for a mathematical text, to denote a universe which is regular and invariant; so there are no conditions upon U besides that $\mathfrak{i}$ and $\mathfrak{r}$ should be legible.

5
  • 5
    Off topic, but this might be bad for accessibility. If I were you I would try with one of the present symbols in unicode-math.
    – mickep
    Commented Apr 10, 2023 at 18:08
  • 1
    @mickep: True, in general, but I don't think these symbols are defined, and am not sure you can actually stack 𝔯 and 𝔦 atop of one another, all within the confines of a capital U.
    – Ingmar
    Commented Apr 10, 2023 at 19:48
  • @Ingmar - "[I] am not sure you can actually stack 𝔯 and 𝔦 atop of one another". What about the suggestions provided in my answer? :-)
    – Mico
    Commented Apr 10, 2023 at 19:58
  • 1
    @Mico: I meant using Unicode only. Your solution works, and might in fact be the only way to achieve this. Not sure using \mathfrak{i} instead of 𝔦 really would make a difference.
    – Ingmar
    Commented Apr 10, 2023 at 20:02
  • 1
    @Ingmar - Many thanks for providing this clarification. I suppose an advantage of using \mathfrak -- in conjunction with the machinery of the mathalpha package -- is that one can choose from quite a few Fraktur fonts, as long as they provide lowercase letters. In contrast, with 𝔯 and 𝔦 one is stuck with whatever the (presumably Opentype) math font offers "built in".
    – Mico
    Commented Apr 10, 2023 at 20:12

2 Answers 2

15

(edited to add a second possibility)

Here are two possible solutions; one uses \mathbf{U}, the other \mathsf{U}. I've tested them with Computer Modern math fonts and Euler fraktur fonts only, and exclusively in \textstyle. These symbols will never occur in first- or second-level subscripts, right?

enter image description here

\documentclass{article}
\usepackage[frak=euler]{mathalpha}
\newcommand\Uira{\ooalign{$\mathbf{U}$\cr%
   \hfil\kern0.8pt\raise0.82ex\hbox{$\scriptscriptstyle\mathfrak{i}$}\hfil\cr%
   \hfil\kern0.8pt\raise0.18ex\hbox{$\scriptscriptstyle\mathfrak{r}$}\hfil\cr}}
\newcommand\Uirb{\ooalign{$\mathsf{U}$\cr%
   \hfil\raise0.82ex\hbox{$\scriptscriptstyle\mathfrak{i}$}\hfil\cr%
   \hfil\raise0.19ex\hbox{$\scriptscriptstyle\mathfrak{r}$}\hfil\cr}}

\begin{document}
The symbols $\Uira$ and $\Uirb$ denote...
\end{document}
5
  • 1
    Great! Is there a way to do the same for \bigsqcap? Commented Apr 10, 2023 at 21:37
  • @Sapiens - The \bigsqcap macro is defined by quite a few math packages -- do you have a specific one in mind? If it's the stmaryrd package, you could take \newcommand\bigsqcapir{\ooalign{$\bigsqcap$\cr \hfil\raise0.4ex\hbox{$\scriptstyle\mathfrak{i}$}\hfil\cr \hfil\lower0.4ex\hbox{$\scriptstyle\mathfrak{r}$}\hfil\cr}} as a starting point. Note that I'd use \scriptstyle instead of \scriptscriptstyle as there's now a lot more vertical space to work with.
    – Mico
    Commented Apr 10, 2023 at 21:51
  • The stmaryrd looks ok. Commented Apr 10, 2023 at 21:59
  • I will try your suggestion now. Commented Apr 10, 2023 at 21:59
  • 1
    It's cool! Thank! Commented Apr 10, 2023 at 22:07
11

I stack β€œi” over ”r” and scale the stack to have the same height as β€œU”.

The ”U” and the stack are superimposed to each other (the latter shifted a bit to the right in order to cope with the heavier left stroke).

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}

\makeatletter
\newcommand{\Uir}{\mathpalette\Uir@\relax}

\newcommand{\Uir@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1\mathrm{U}$}%
  \setbox\tw@=\vbox{%
    \offinterlineskip
    \ialign{%
      \hfil##\hfil\cr
      $\m@th#1\mathfrak{i}$\cr
      \noalign{\vskip0.5pt}
      $\m@th#1\mathfrak{r}$\cr
      \noalign{\vskip1.5pt}
     }%
  }%
  \ooalign{%
    $\m@th#1\mathrm{U}$\cr
    \hidewidth$\m@th#1\mkern1mu$\resizebox{!}{\ht\z@}{\box\tw@}\hidewidth\cr
  }%
  \endgroup
}
\makeatother

\begin{document}

\[
\Uir \quad \scriptstyle \Uir
\]

\end{document}

enter image description here

5
  • Great! What is the role of \scriptstyle? Also, as I as well asked Mico: is there a way to do this for \bigsqcap? Commented Apr 10, 2023 at 21:40
  • The 𝔦 and 𝔯 glyphs look rather skinny. Is that because they're being scaled down from the basic (text-style) size of the glyphs? Applying the scaling to \scriptscriptstyle\mathfrak{i} and \scriptscriptstyle\mathfrak{r} might make the glyphs' strokes quite a bit thicker.
    – Mico
    Commented Apr 10, 2023 at 21:40
  • 1
    @Mico Not really, as far as I can see.
    – egreg
    Commented Apr 10, 2023 at 22:04
  • @Sapiens \scriptstyle is just used in the example in order to show that the symbol scales properly in subscripts.
    – egreg
    Commented Apr 10, 2023 at 22:05
  • Nevermind. I had been playing around with \usepackage[frak=stixtwo]{mathalpha} as the source for math-Fraktur letters, and I ended up improperly comparing your output (which uses the "Euler" math-Fraktur letters) with what's produced by employing the Stix2 Fraktur letters. Talk about comparing apples to oranges...
    – Mico
    Commented Apr 10, 2023 at 22:28

You must log in to answer this question.

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