# How can I typeset a long vdash with symbols on top and bottom?

Essentially, I am trying to typeset a symbol in math mode that looks like this: . Is there any way I can do this easily with a package or do I have to fiddle around with my own commands?

I tried vdash^*_M, but this leads to a vdash that is too short and with the * and M misplaced.

You can use the turnstile package:

\documentclass{article}
\usepackage{turnstile}

\begin{document}

$x\sststile{M}{*}y$ $x\sdtstile{M}{*}y$

\end{document}


You can also look at https://tex.stackexchange.com/a/29091/4427 for a slightly different realization.

There were many stylistic choices (size, placement, etc.) that were left unspecified, so I took a guess. They of course can be changed.

\documentclass{article}
\usepackage{stackengine}
\def\ruleoffset{1pt}
\newcommand\specialvdash[2]{\mathrel{\ensurestackMath{
\mkern2mu\rule[-\dp\strutbox]{.4pt}{\baselineskip}\stackon[\ruleoffset]{
\stackunder[\dimexpr\ruleoffset-.5\ht\strutbox+.5\dp\strutbox]{
\rule[\dimexpr.5\ht\strutbox-.5\dp\strutbox]{2.5ex}{.4pt}}{
\scriptstyle #1}}{\scriptstyle#2}\mkern2mu}}
}
\begin{document}
$(x+y) \specialvdash{M}{*} y \specialvdash{Q}{+} z \specialvdash{y}{*} p \vdash q$
\end{document}


• Thank you for that solution, it was helpful and I upvoted it. But given that I have to use a package in your solution as well as in the one with the turnstile package, I accepted the other one since it does not involve a complicated \newcommand. Nov 16 '17 at 11:53