Is there any way to typeset in LaTeX a \simeq
with a longer bar, or equivalently \stackrel{\sim}{\longrightarrow}
without the arrowhead?
[Tex/LaTex] How to typeset an isomorphism symbol ($\simeq$) with a long bar
math-modemath-operatorsstacking-symbolssymbols
Related Question
- [Tex/LaTex] How to typeset “evaluated at” vertical bar with two conditions instead of one
- [Tex/LaTex] Wedge with vertical bar
- [Tex/LaTex] Bar over/under integral symbol
- [Tex/LaTex] How to place a \sim over \equiv similar to \simeq and \cong
- [Tex/LaTex] How to typeset a long vdash with symbols on top and bottom
- [Tex/LaTex] How to define a right arrow with bar in LaTeX
Best Answer
The following constructs the math symbol
\isomorphism
similar to\simeq
, but with a longer line:Remarks:
The line is constructed similar to
\longrightarrow
. There a line\relbar
is joined a\rightarrow
. The joining removes the side bearings, which means the glyphs can have white margins at the left and the right. LaTeX's\joinrel
adds a negative space of3mu
to move the relational symbols together. The test file uses the symbol in smaller math styles, there-3mu
leaves a gap, therefore\isomorphism@joinrel
is defined with customized settings (-3.4mu
for\displaystyle
and\textstyle
,-4.4mu
forscriptstyle
and\scriptscriptstyle
).The symbol
\sim
is horizontally centered and set in the same math style and size. It is raised to the same height as aymbol\simeq
.The vertical position of the line in
\simeq
is unhappily not available in TeX, therefore a guessed value is used (the shift of\sim
multiplied by 1.9). If you want the line a little higher, then you can decrease the factor.\mathpalette
is used to support the symbol in all math styles. Then the internal macro\@isomorphism
gets the math style (\displaystyle
,\textstyle
,\scriptstyle
,\scriptscriptstyle
) as first argument. The second argument is not used and left empty.The measuring and glyph composing is done with many low level plain TeX macros for efficiency (and fun).
\m@th
sets\mathsurround
to0pt
. Usually the value is0pt
, but if set, then the space that should surround math expressions should not occur inside a formula or math symbol.