# How do I define a right arrow with bar in LaTeX?

could any one tell me how I can define the following symbol in Latex please? It looks like an implies symbol concatenated with a vertical bar.

The stmaryrd font has \mapsfromchar:

\documentclass{article}
\usepackage{amsmath}
\usepackage{stmaryrd}

\newcommand{\Rightarrowbar}{\Rightarrow\mapsfromchar}
\newcommand{\Leftarrowbar}{\mapstochar\Leftarrow}

\begin{document}

$a\Rightarrowbar b$

$a\Leftarrowbar b$

\end{document}


If stmaryrd is not an option for you, it's possible to reflect \mapstochar:

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

\newcommand{\fakedmapsfromchar}{%
\mathrel{\mathpalette\reflectmathchar\mapstochar}%
}
\makeatletter
\newcommand{\reflectmathchar}[2]{%
\reflectbox{$\m@th#1#2$}%
}
\makeatother

\newcommand{\Rightarrowbar}{\Rightarrow\fakedmapsfromchar}
\newcommand{\Leftarrowbar}{\mapstochar\Leftarrow}

\begin{document}

$a\Rightarrowbar b$

$a\Leftarrowbar b$

\end{document}


Something like this?

\documentclass{article}
\usepackage{mathtools}

\newcommand{\myRightarrow}{\mathrel{{\Longrightarrow}\!\vcenter{\hbox{$\scriptscriptstyle|$}}}}

\begin{document}

$A \myRightarrow B$

\end{document}


Edit: If you want the final bar to have the same width as the \Rightarrow, you can use two consecutive | with some kerning between them:

\newcommand{\myvarRightarrow}{\mathrel{{ =⇒ }\!\vcenter{\hbox{$\scriptscriptstyle|\mkern-5.4mu|$}}}}


• Doesn't this have uneven stroke widths due to scaling the bar part? – Joey Mar 27 at 9:41
• That's right. I propose a work-around in my update. – Bernard Mar 27 at 10:55

One can always build a symbol by himself (thanks to samcarter, this is a scalable version):

\documentclass[margin=1mm]{standalone}
\usepackage{graphicx}
\usepackage{amssymb}
\newcommand{\yoursymbol}{\mathbin{\Rightarrow\hspace{-0.45em}\vcenter{\hbox{\scalebox{0.8}{$\shortmid$}}}}}
\begin{document}
$1\yoursymbol2$ {\Huge $1\yoursymbol2$}
\end{document}


Caution: This doesn't work in subscript. I'm trying to find some solution...

• If you use a unit that scales with the font, this will also work with other font sizes. For example \hspace{-0.45em} instead of \hspace{-4.3pt} – user36296 Mar 26 at 9:55
• @samcarter Added! Thank you very much! – JouleV Mar 26 at 9:59