6

I currently am using a relation

\newcommand{\Lsense}{\stackrel{\mathbb{L}^1}{=}}

but unfortunately, the \mathbb{L}^1 is not nicely centred over the = symbol.

enter image description here

I read some other answers that involve shifting the upper glyph to make it appeared centred, but in this case I think the \mathbb{L}^1 is wider than the =, so maybe I have to "stretch" the =?

Alternatively, if someone could explain the code a bit from answers such as from here, that would be great as I reckon I can just use that instead.

jamesh625
  • 349

3 Answers3

5

Some fine tuning is necessary.

First, we have to remove the small space that TeX adds after superscripts, which is \scriptspace. Second, we can compensate the hole due to the conflicting shapes by doing \mathbb{L}^{\!1}. Finally, a thin space before the “L” helps in centering. The whole thing is set in \mathclap, so it won't count for the width of the big symbol.

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

\newcommand{\Lsense}{%
  \overset{\mathclap{\,\mathbb{L}^{\!1}\kern-\scriptspace}}{=}%
}

\begin{document}

$A\Lsense B$

$A=B$

\end{document}

enter image description here

The distance from the left side of the “L” to the left side of “=” is not the same as the distance from the right side of the “1” to the right side of the “=”, but it's not of a concern, visually, because the exponent is set quite high. You may want to use \mspace{2mu} (or less) instead of \, (which would be \mspace{3mu}).

Here's a “boxed” version that shows the horizontal size is the same.

enter image description here

egreg
  • 1,121,712
  • I chose this as the answer because it compensates for the superscript and the left-alignment of the L. :) Thanks for your help! – jamesh625 Sep 13 '16 at 06:10
3

What about

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

\begin{document}

\newcommand{\Lsense}{\stackrel{\mathbb{L}^{\mkern-5mu 1}}{=}} %precise value up to you

$A\Lsense B$

\end{document}

enter image description here

Certainly, \mkern can be also in other places, e.g.,

\newcommand{\Lsense}{\stackrel{\mkern2mu\mathbb{L}^{\mkern-5mu 1}}{=}}
2

How about

\usepackage{mathtools,amssymb}
\newcommand*\Lsense{\overset{\scriptscriptstyle\mathbb{L}^{\mathrlap{\!1}}}{=}}

You can remove \scripscriptstyle if you think it's to small. The \mathrlap is key here, because makes the superscript take zero space.

Manuel
  • 27,118