5

The amssymb package has \lesssim and \lessapprox and \leqq. Is there a way to construct \lesscong?

I looked at the amssymb.sty file, and there's not an obvious way to modify the \DeclareMathSymbol which defines the initial three.

I'm familiar with rough commands to stack symbols on top of one another, but I'm interested in the aesthetics of \lesscong to "fit" among the initial three. I'm also interested in the slashed and mirrored variants of \lesscong, but I'm sure I can create those once I have the "parent" construction for lesscong.

Barely related: A long time ago I wanted to create \appprox which is three \sim symbols stacked on top of one another in such a way that the spacing between consecutive two \sim is exactly the same as the spacing in \approx. I forgot how I managed to define it, but it may help.

\newcommand{\appprox}{\mathrel{\vcenter{\offinterlineskip\hbox{$\m@th\approx$}\vskip-2.50134pt\hbox{$\m@th\approx$}}}}

Of course, if I manage to find a nice solution on my own, then I'll post it here for others as well.

4
  • \DeclareMathSymbol is useful only if the image of the desired symbol already exists in a font. The symbols in the amsfonts collection (for which amssymb merely assigns names) were originally created with Metafont and the fonts in which they were placed later converted to Type 1. There's no room left in these fonts for additional symbols. However, the STIX fonts are conceptually open-ended, and a request might be made if you find that possibility interesting. Apr 3, 2020 at 2:50
  • @barbarabeeton After a quick read through <en.wikipedia.org/wiki/STIX_Fonts_project> it seems that STIX works well with Times New Roman which I can only deduce that it does not work well with Latin Modern which currently is my preference due to my background in mathematics. I'm very much an amateur with fonts so correct me if I'm wrong; If I'm wrong then I will look into STIX in more depth. Apr 3, 2020 at 3:15
  • 1
    Yes, the STIX fonts are designed to go with Times. Preference for a particular font style is distinctly personal, so you probably won't be satisfied by STIX if you're particularly fond of Latin Modern, even though the symbol complement of STIX is much more comprehensive. (You might be interested to learn, though, that Times was for a large part of the 20th century preferentially used by many math publishers before TeX appeared on the scene.) Apr 3, 2020 at 4:12
  • Is \lsime or \simlE an adequate substitute? They're in unicode-math and I believe stix and stix2.
    – Davislor
    Apr 3, 2020 at 12:30

2 Answers 2

4

It can be done with some \raiseboxes. The resulting symbol fits well with \lesssim, \lessapprox and \leqq, but it is a bit tall.

What do you think?

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\newlength{\congwidth}
\newlength{\congheight}
\settowidth{\congwidth}{$\cong$}
\settoheight{\congheight}{$\cong$}
\newcommand{\lesscong}{%
    \mathrel{\smash{%
        \raisebox{-.5\congheight}{$\cong$}%
        \hspace*{-\congwidth}%
        \raisebox{.6\congheight}{$<$}%
    }}%
}
\begin{document}
\begin{tabular}{ll}
    \verb|\lesssim|     & \( A \lesssim B \) \\
    \verb|\lessapprox|  & \( A \lessapprox B \) \\
    \verb|\leqq|        & \( A \leqq B \) \\
    \verb|\lesscong|    & \( A \lesscong B \) \\
\end{tabular}
\end{document}
2
  • 1
    I like that I can also generalize this to make \lesssimeq. I plan to use \lesscong as a relation asserting the existence of a split monomorphism (from category theory) and \lesssimeq for monomorphism instead. Apr 3, 2020 at 2:45
  • 1
    @AlbertoTakase -- \lesssimeq already exists in Unicode (2A8D), and is thus present in the STIX font. Apr 3, 2020 at 2:57
5

Here is a generic command for defining such symbols. The internal macro \gl@over takes an optional argument (for a bit of vertical spacing, default 1pt), the < or > symbol and the symbol to go below.

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

\makeatletter
\newcommand{\lesscong}{\mathrel{\gl@over{<}{\cong}}}
\newcommand{\lesssimeq}{\mathrel{\gl@over{<}{\simeq}}}
\newcommand{\gtrcong}{\mathrel{\gl@over{>}{\cong}}}
\newcommand{\gtrsimeq}{\mathrel{\gl@over{>}{\simeq}}}
\newcommand{\gl@over}[3][1pt]{%
  \vcenter{\m@th\offinterlineskip\ialign{%
    \hfil$##$\hfil\cr #2\cr \noalign{\vskip#1} #3\cr
  }}%
}
\makeatother

\begin{document}

\begin{tabular}{ll}
\verb|\lesssim|    & \( A \lesssim B \) \\
\verb|\lessapprox| & \( A \lessapprox B \) \\
\verb|\leqq|       & \( A \leqq B \) \\
\verb|\lesscong|   & \( A \lesscong B \) \\
\verb|\lesssimeq|  & \( A \lesssimeq B \) \\
\verb|\gtrsim|    & \( A \gtrsim B \) \\
\verb|\gtrapprox| & \( A \gtrapprox B \) \\
\verb|\geqq|       & \( A \geqq B \) \\
\verb|\gtrcong|   & \( A \gtrcong B \) \\
\verb|\gtrsimeq|  & \( A \gtrsimeq B \) \\
\end{tabular}

\end{document}

The calculations are left to TeX.

enter image description here

1
  • I like that your solution uses more primitive TEX commands! Apr 5, 2020 at 1:44

You must log in to answer this question.

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