6

How would you create the following relation symbol?

Custom Relation Symbol

My current solution:

So far I've found a code which puts a letter on top of the \vdash symbol. But it's not exactly what I want:

\documentclass{article}
\newcommand{\xvdash}[1]{%
  \vdash^{\mkern-10mu\scriptscriptstyle\rule[-.9ex]{0pt}{0pt}#1}%
}

\begin{document}
\[
A \xvdash{W} x
\]
\end{document}

In the end it will look like this:

Custom Relation Symbol

Are there better ways or packages to do this? How would you increase the size (mostly the width) of the \vdash slightly? Or is there a way to draw a \vdash-like symbol? How would you put a character on top and below? Is there a way to reduce the size of the character?

3
  • Out of curiosity: what dudes this symbol mean? Commented Oct 4, 2015 at 5:31
  • We use this symbol in our theoretical computer science course to denote a relation between two configurations of finite state machines.
    – ndrizza
    Commented Oct 4, 2015 at 7:50
  • 1
    $(q,w)$ represent a configuration in a finite state machine (FSM), where $q$ is the current state and $w$ is the word it's processing. The relation symbol (without a star) means that if the FSM evaluates $w$ in state $q$ it will get to the next configuration $(p,u)$ where $q$ is the new state and $u$ is just like the word $w$, except that the first character has been removed (processed). The relation symbol with the star just means that the FSM can get from $(p,w)$ to $(q,u)$ in a finite amount of steps (in this case $u$ may be shorter than $w$ by more than one character.
    – ndrizza
    Commented Oct 4, 2015 at 7:50

2 Answers 2

4

Is this similar to what you want?

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

\DeclareRobustCommand{\xvdash}[2][]{\mathrel{\drawxvdash{#1}{#2}}}

\newcommand{\drawxvdash}[2]{%
  \vcenter{\hbox{%
    \setlength{\unitlength}{1em}%
    \begin{picture}(1,1)
    \roundcap
    \put(0,0){\line(0,1){1}}
    \put(0,0.5){\line(1,0){1}}
    \put(0.5,0){\makebox[0pt]{\text{\smaller$\scriptscriptstyle#2$}}}
    \put(0.5,0.6){\makebox[0pt]{\text{\smaller$\scriptscriptstyle#1$}}}
    \end{picture}%
  }}%
}

\begin{document}

$(q,w)\xvdash[*]{M}(p,u)$

\end{document}

enter image description here

0
1

A solution with the \stackinset command, from stackengine:

\documentclass[a4paper, 12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{stackengine}
\newcommand\Mvdash{\mathrel{\stackMath\stackinset{r}{0.1em}{c}{0.15ex}{\setstackgap{L}{1.1ex}\everymath{\scriptscriptstyle}\Vectorstack[c]{* M}}{\vdash\mkern-15mu\raisebox{0.23ex}{$\relbar$}}}}

\begin{document}

 \[A \Mvdash B \]%

\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .