2

I would like to mark a ray in a picture. The symbol I need is the \vdash placed over AB (see first picture and MWE). Unfortunately, the symbol is quite short, so I want it to be as wide as AB itself (see second picture).

Any thoughts? Thank you very much for your effort!

enter image description here

enter image description here

MWE:

  \documentclass{standalone}
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage[ngerman]{babel}
  \usepackage{pst-all}
  \usepackage{amsmath}

  \begin{document}

  \begin{pspicture}[showgrid=false](0,0)(5,5)
  \psdot[dotstyle=Mul,dotsize=4pt](1,1)
  \psdot[dotstyle=Mul,dotsize=4pt](3,3)
  \psline(1,1)(5,5)
  \uput{0.1cm}[-90](1,1){$A$}
  \uput{0.1cm}[-75](3,3){$B$}
  \rput[l](4,3.7){$\stackrel{\vdash}{AB}$}

  \end{pspicture}

  \end{document}
Gotti91
  • 509

2 Answers2

2

You can also have this code, which uses only amsmath\mkern-2.33mu . It is adapted from @mafp's answer to extensible-vec-instead-of-overrightarrow question. For uprght maths fonts (\mathrm and \mathbf, you'll have to add some manual math kerning):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\makeatletter
\newcommand{\amsray}{%
\mathpalette {\overarrow@\rayfill@}}
\def\rayfill@{\arrowfill@{\mkern4mu\mapstochar\relbar}\relbar{\mkern 4.08mu}}%
\makeatother

\begin{document} 

\[ \amsray{ABC}\quad\boldsymbol{\amsray{ABCD}}\quad\amsray{\:\mathbf{AB}\mkern-2.33mu} \]%

\end{document} 

enter image description here

Bernard
  • 271,350
0

This symbol is simple enough to be drawn by hand.

enter image description here

  \documentclass{standalone}
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage[ngerman]{babel}
  \usepackage{pst-all}
  \usepackage{amsmath}

  \begin{document}

  \begin{pspicture}[showgrid=false](0,0)(5,5)
  \psdot[dotstyle=Mul,dotsize=4pt](1,1)
  \psdot[dotstyle=Mul,dotsize=4pt](3,3)
  \psline(1,1)(5,5)
  \uput{0.1cm}[-90](1,1){$A$}
  \uput{0.1cm}[-75](3,3){$B$}
  \rput[l](4,3.7){$\overset{\,\rule{0.5pt}{4pt}\rule[1.75pt]{12pt}{0.5pt}}{AB}$}

  \end{pspicture}

  \end{document}