The problem with the vertical scaling is documented in the *Conclusions* section of the file turnstile_article.pdf:

For a future version of this package,
we want to look at changing the height
of the turnstile sign. This will take
into account the heights of the
expressions above and below, similar
to the way we currently allow for the
widths of the expressions.

In particular, since no provision is made for vertical scaling, the symbol will not scale appropriately when used in a subscripted expression (See first part of the example below).

The first idea that comes to my mind is to use `\scalebox`

(from the `graphicx`

) package to scale the turnstile symbol. The following example shows both the actual behaviour with no vertical scaling, and the definition and use of a new command attempting to alleviate this problem; of course, feel free to make the modifications that best suit your needs:

```
\documentclass{article}
\usepackage{amsmath}
\usepackage{turnstile}
\usepackage{graphicx}
\newcommand*\Subsststile[2]{%
\,\scalebox{0.8}[0.5]{$\sststile[ss]{\textstyle#1}{\textstyle#2}$}\,
}
\begin{document}
The standard command with no vertical scaling:
\[
A_{\Gamma\sststile[ss]{}{}P} \qquad A_{\Gamma\sststile[ss]{aaaa}{b}P}
\]
The newly defined command, with vertical scaling:
\[
A_{\Gamma\Subsststile{}{}P} \qquad A_{\Gamma\Subsststile{aaaa}{b}P}
\]
\end{document}
```

The `turnstile`

package provides

```
\turnstile[<size>]{<lvert>}{<horz>}{<below>}{<above>}{<rvert>}
```

where `<horz>`

calls the macro

```
\makehor{<line type>}{<thickness>}{<length>}{<sep>}
```

to draw the horizontal line(s) of the turnstile. In the following code, I've redefined `\makehor`

(and consequently also `\turnstile`

) to take a first argument `w`

(for `wavy`

) which typesets the symbol `$\sim$`

as the "horizontal line". The `adjustbox`

package provides some clipping and resizing.

```
\documentclass{article}
\usepackage{turnstile}% http://ctan.org/pkg/turnstile
\usepackage{adjustbox}% http://ctan.org/pkg/adjustbox
\renewcommand{\makehor}[4]
{\ifthenelse{\equal{#1}{n}}{\hspace{#3}}{}
\ifthenelse{\equal{#1}{s}}{\rule[-0.5#2]{#3}{#2}}{}
\ifthenelse{\equal{#1}{d}}{\setlength{\lengthvar}{#2}
\addtolength{\lengthvar}{0.5#4}
\rule[-\lengthvar]{#3}{#2}
\hspace{-#3}
\rule[0.5#4]{#3}{#2}}{}
\ifthenelse{\equal{#1}{t}}{\setlength{\lengthvar}{1.5#2}
\addtolength{\lengthvar}{#4}
\rule[-\lengthvar]{#3}{#2}
\hspace{-#3}
\rule[-0.5#2]{#3}{#2}
\hspace{-#3}
\setlength{\lengthvar}{0.5#2}
\addtolength{\lengthvar}{#4}
\rule[\lengthvar]{#3}{#2}}{}
\ifthenelse{\equal{#1}{w}}{% New wavy $\sim$ definition
\setbox0=\hbox{$\sim$}%
\raisebox{-.6ex}{\hspace*{-.05ex}\adjustbox{width=#3,height=\height}{\clipbox{0.75 0 0 0}{\usebox0}}}}{}
}
\begin{document}
\[
\renewcommand{\arraystretch}{2}%
\begin{array}{ll}
\textrm{Regular}\ \verb!s! & \textrm{Wavy}\ \verb!w! \\ \hline
A\turnstile{s}{s}{}{}{n}B & A\turnstile{s}{w}{}{}{n}B \\
A\turnstile{s}{s}{L}{}{n}B & A\turnstile{s}{w}{L}{}{n}B \\
A\turnstile{s}{s}{}{D}{n}B & A\turnstile{s}{w}{}{D}{n}B \\
A\turnstile{s}{s}{L}{D}{n}B & A\turnstile{s}{w}{L}{D}{n}B
\end{array}
\]
\end{document}
```

The main advantage of tapping into the existing command (or extending it) rather than writing one's own is that it is easier to use. Additionally, since `\turnstile`

takes the upper/lower letters as arguments, it's easier to grab hold of them than (say) defining a new command that requires some interpretation of limit use, like `\wavyturn_{L}^{D}`

(say). As such, the other features of `\turnstile`

is adopted (like the `\rule`

for the vertical line and the other spacing.

The above code currently only works for a single wavy line. However, if needed, it could be extended to work for more than one (like the original `\turnstile..{d}...`

and `\turnstile..{t}..`

commands). For now, it works based on the MWE, but not work as expected with other variations (longer phrases and/or right vertical line). That may require more work, since I haven't tested it.

**Edit**: Admittedly my `tikz`

-prowess requires a heavy boost of steroids. The following addition to the `turnstile`

horizontal rule is provided by the symbol `z`

. It draws a `thin`

wavy line using a sine curve. I'm pretty sure the horizontal (`\hspace`

) and vertical (`\raisebox`

) adjustments can be done inside `\tikz`

, so suggestions are welcome and encouraged. The same goes for the `adjustbox`

modifications, and whether that can be incorporated in `\tikz`

as well:

```
\documentclass{article}
\usepackage{turnstile}% http://ctan.org/pkg/turnstile
\usepackage{tikz}% http://ctan.org/pkg/pgf
\usepackage{adjustbox}% http://ctan.org/pkg/adjustbox
\renewcommand{\makehor}[4]
{\ifthenelse{\equal{#1}{n}}{\hspace{#3}}{}
\ifthenelse{\equal{#1}{s}}{\rule[-0.5#2]{#3}{#2}}{}
\ifthenelse{\equal{#1}{d}}{\setlength{\lengthvar}{#2}
\addtolength{\lengthvar}{0.5#4}
\rule[-\lengthvar]{#3}{#2}
\hspace{-#3}
\rule[0.5#4]{#3}{#2}}{}
\ifthenelse{\equal{#1}{t}}{\setlength{\lengthvar}{1.5#2}
\addtolength{\lengthvar}{#4}
\rule[-\lengthvar]{#3}{#2}
\hspace{-#3}
\rule[-0.5#2]{#3}{#2}
\hspace{-#3}
\setlength{\lengthvar}{0.5#2}
\addtolength{\lengthvar}{#4}
\rule[\lengthvar]{#3}{#2}}{}
\ifthenelse{\equal{#1}{w}}{% New wavy $\sim$ definition
\setbox0=\hbox{$\sim$}%
\raisebox{-.6ex}{\hspace*{-.05ex}\adjustbox{width=#3,height=\height}{\clipbox{0.75 0 0 0}{\usebox0}}}}{}
\ifthenelse{\equal{#1}{z}}{% New tikz wavy definition
\raisebox{-.4ex}{\hspace*{-.08ex}\tikz \draw [thin,x=0.5ex,y=.25ex] (0,0) sin (1,1) cos (2,0) sin (3,-1) cos (4,0);\hspace*{.2ex}}}{}
}
\begin{document}
\[
\renewcommand{\arraystretch}{2}%
\begin{array}{lll}
\textrm{Regular}\ \verb!s! & \textrm{Wavy}\ \verb!w! & \textrm{TikZ}\ \verb!z! \\ \hline
A\turnstile{s}{s}{}{}{n}B & A\turnstile{s}{w}{}{}{n}B & A\turnstile{s}{z}{}{}{n}B \\
A\turnstile{s}{s}{L}{}{n}B & A\turnstile{s}{w}{L}{}{n}B & A\turnstile{s}{z}{L}{}{n}B \\
A\turnstile{s}{s}{}{D}{n}B & A\turnstile{s}{w}{}{D}{n}B & A\turnstile{s}{z}{}{D}{n}B \\
A\turnstile{s}{s}{L}{D}{n}B & A\turnstile{s}{w}{L}{D}{n}B & A\turnstile{s}{z}{L}{D}{n}B
\end{array}
\]
\end{document}
```

It needs improvement for a number of reasons:

There is a very minute difference in the typesetting of a "denominator-only" and "numerator+denominator" `\turnstile`

. For example, look at the close-up between

Unexpected results may occur from adding the ending vertical line(s).

The spacing of the right operand (`B`

in this case) is too far off. This can be accommodated by means of an intermediate macro, but it is best suited inside the `\turnstile`

macro.

I think all of the above items would be addressed by someone with a better handle on `tikz`

-related commands. But then again, perhaps this is not a problem.

## Best Answer

If your needs are relatively simple, you may want to use

`\vdash`

. If you are typesetting logic for anything beyond the most elementary level, the standard commands are unlikely to meet your needs. In that case, the`turnstile`

package is the answer. This is true both if you need more complex symbols (e.g. triple lines or combinations of single/double/triple) or if you need a turnstile of any kind with subscripts or superscripts, as is usually the case.## Unicode

A couple of symbols that look like the output caused by the above command:

Assertion: ⊦ Unicode hexadecimal: 0x22a6 In block: Mathematical Operators

Right tack: ⊢ Unicode hexadecimal: 0x22a2 In block: Mathematical Operators

(found with http://shapecatcher.com/)