0

The \mapstochar character is a vertical bar, with borders slightly rounded and a protuberance on its right-side, in the middle:

enter image description here

I'm trying to get the same symbol, but without the protuberance on the right-side.

I have been through the The Comprehensive LaTeX Symbol List, looked up the definition of \mapstochar (\mathchar"3237), searched this website high and low (for instance, Creating a smaller vertical bar ), but could not find any way of getting a rounded vertical bar.

Clément
  • 5,591

1 Answers1

2

Picture mode.

\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}

\makeatletter \NewDocumentCommand{\smallbar}{}{% \mathrel{\mathpalette\smallbar@\relax}% }

\newcommand{\current@math@font}[1]{% \ifx#1\displaystyle\textfont\else \ifx#1\textstyle\textfont\else \ifx#1\scriptstyle\scriptfont\else \scriptscriptfont\fi\fi\fi } \newcommand{\smallbar@factor}[1]{% \ifx#1\displaystyle 1.135\else \ifx#1\textstyle 1.128\else \ifx#1\scriptstyle 1.09\else 1.06\fi\fi\fi }

\newcommand{\smallbar@}[2]{% \begingroup \sbox\z@{$\m@th#1\mapstochar$}% \dimen0=\smallbar@factor{#1}\ht\z@ \dimen2=\dimeval{2\fontdimen22\current@math@font{#1} 2 - \dimen0}% \mbox{% $\m@th#1\mkern1mu \begin{picture}(0,\dimen0) \roundcap \linethickness{\fontdimen8\current@math@font{#1}3} \Line(0,\dimen2)(0,\dimen0) \end{picture}% \mkern1mu$% }% \endgroup } \makeatother

\begin{document}

$\mapstochar,\smallbar$ $\scriptstyle\mapstochar,\smallbar$ $\scriptscriptstyle\mapstochar,\smallbar$

\end{document}

enter image description here

egreg
  • 1,121,712