I need to draw an arrow but with different head. The head should look like $\dashv$. And I do need to change the line. I tried with $--\dashv$, but it wasn't nice. Any idea?
It should look like a horizontal T.
I need to draw an arrow but with different head. The head should look like $\dashv$. And I do need to change the line. I tried with $--\dashv$, but it wasn't nice. Any idea?
It should look like a horizontal T.
Do you want something like this?

\documentclass{article}
\usepackage{turnstile}
\begin{document}
% \setlength{\leasturnstilewidth}{15em}% this should work if I've understood the documentation correctly, but seems to have no effect
$\nsststile{\hspace*{15em}}{}$
\end{document}
Just change 15em to whatever size you require.
It turns out that it is far from easy to change the height of the turnstile. Although the documentation suggests that the various lengths may be manipulated by the end-user this is not, in fact, the case. Looking in turnstile.sty, it turns out that this is the problem:
\newcommand{\turnstile}[6][s]
{\ifthenelse{\equal{#1}{d}}
{\sbox{\first}{$\displaystyle{#4}$}
\sbox{\second}{$\displaystyle{#5}$}}{}
\ifthenelse{\equal{#1}{t}}
{\sbox{\first}{$\textstyle{#4}$}
\sbox{\second}{$\textstyle{#5}$}}{}
\ifthenelse{\equal{#1}{s}}
{\sbox{\first}{$\scriptstyle{#4}$}
\sbox{\second}{$\scriptstyle{#5}$}}{}
\ifthenelse{\equal{#1}{ss}}
{\sbox{\first}{$\scriptscriptstyle{#4}$}
\sbox{\second}{$\scriptscriptstyle{#5}$}}{}
\setlength{\dashthickness}{0.111ex}
\setlength{\ddashthickness}{0.35ex}
\setlength{\leasturnstilewidth}{0.8em}
\setlength{\extrawidth}{0.2em}
\ifthenelse{%
\equal{#3}{n}}{\setlength{\tinyverdistance}{0ex}}{}
\ifthenelse{%
\equal{#3}{s}}{\setlength{\tinyverdistance}{0.5\dashthickness}}{}
\ifthenelse{%
\equal{#3}{d}}{\setlength{\tinyverdistance}{0.5\ddashthickness}
\addtolength{\tinyverdistance}{\dashthickness}}{}
\ifthenelse{%
\equal{#3}{t}}{\setlength{\tinyverdistance}{1.5\dashthickness}
\addtolength{\tinyverdistance}{\ddashthickness}}{}
\setlength{\verdistance}{0.4ex}
\settoheight{\lengthvar}{\usebox{\first}}
\setlength{\raisedown}{-\lengthvar}
\addtolength{\raisedown}{-\tinyverdistance}
\addtolength{\raisedown}{-\verdistance}
\settodepth{\raiseup}{\usebox{\second}}
\addtolength{\raiseup}{\tinyverdistance}
\addtolength{\raiseup}{\verdistance}
\setlength{\lift}{0.8ex}
\settowidth{\firstwidth}{\usebox{\first}}
\settowidth{\secondwidth}{\usebox{\second}}
\ifthenelse{\lengthtest{\firstwidth = 0ex}
\and
\lengthtest{\secondwidth = 0ex}}
{\setlength{\turnstilewidth}{\leasturnstilewidth}}
{\setlength{\turnstilewidth}{2\extrawidth}
\ifthenelse{\lengthtest{\firstwidth < \secondwidth}}
{\addtolength{\turnstilewidth}{\secondwidth}}
{\addtolength{\turnstilewidth}{\firstwidth}}}
\setlength{\turnstileheight}{3ex}
\sbox{\turnstilebox}
{\raisebox{\lift}{\ensuremath{
\makever{#2}{\dashthickness}{\turnstileheight}{\ddashthickness}
\makehor{#3}{\dashthickness}{\turnstilewidth}{\ddashthickness}
\hspace{-\turnstilewidth}
\raisebox{\raisedown}
{\makebox[\turnstilewidth]{\usebox{\first}}}
\hspace{-\turnstilewidth}
\raisebox{\raiseup}
{\makebox[\turnstilewidth]{\usebox{\second}}}
\makever{#6}{\dashthickness}{\turnstileheight}{\ddashthickness}}}}
\mathrel{\usebox{\turnstilebox}}}
Basically, this hard codes the various lengths defined here. You can redefine them all you like but as soon as you use \turnstile (or e.g. \nsststile which is defined in terms of \turnstile), the lengths will be reset to their default values.
The fist thing I tried was using the facilities of etoolbox to patch \turnstile. However, although etoolbox reports the command to be patchable, my attempts to do so failed.
Finally, desperate measures:
\documentclass{article}
\usepackage{turnstile}
\newlength{\myturnstileheight}
\setlength{\myturnstileheight}{1ex}
\newcommand*\myarrow[2][\myturnstileheight]
{\setlength{\dashthickness}{0.111ex}
\setlength{\ddashthickness}{0.35ex}
\setlength{\tinyverdistance}{0ex}
\setlength{\verdistance}{0.4ex}
\settoheight{\lengthvar}{}
\setlength{\raisedown}{-\lengthvar}
\addtolength{\raisedown}{-\tinyverdistance}
\addtolength{\raisedown}{-\verdistance}
\settodepth{\raiseup}{}
\addtolength{\raiseup}{\tinyverdistance}
\addtolength{\raiseup}{\verdistance}
\setlength{\lift}{0.8ex}
\setlength{\turnstilewidth}{#2}
\setlength{\turnstileheight}{#1}
\sbox{\turnstilebox}
{\raisebox{\lift}{\ensuremath{
\makever{n}{\dashthickness}{\turnstileheight}{\ddashthickness}
\makehor{s}{\dashthickness}{\turnstilewidth}{\ddashthickness}
\hspace{-\turnstilewidth}
\raisebox{\raisedown}
{\makebox[\turnstilewidth]{}}
\hspace{-\turnstilewidth}
\raisebox{\raiseup}
{\makebox[\turnstilewidth]{}}
\makever{s}{\dashthickness}{\turnstileheight}{\ddashthickness}}}}
\mathrel{\usebox{\turnstilebox}}}
\begin{document}
$\myarrow{3em}$
$\myarrow[2ex]{1em}$
$\myarrow[10ex]{10em}$
\end{document}
This defines a new command, \myarrow which is based on the definition of \turnstile but is simplified and adapted to make the height adjustable. It also defines a new length \myturnstileheight which you can set to a suitable default. Here, it is set to 1ex. The syntax of \myarrow is simplified considerably to make this more convenient for your usage:
\myarrow[<height>]{<width>}
Finally, the output:

With tikz
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand\myarrow[1][3em]{%
\tikz\draw[thick,-Bar] (0,0) -- (#1,0);
}
\begin{document}
$\myarrow[15em]$ $\myarrow[2em]$
\end{document}

(Press Enter to retry, or Control-D to exit) Please type another input file name:
– Rebecca Mar 10 '14 at 00:14tikz installed. I think you have old tikz please upgrade to v3.
–
Mar 10 '14 at 00:15
Maybe, if I understand well, what you want exists in the mdsymbol font:

Look at this thread to have details on how to make it available without having all your math symbols typeset with the mdsymbol font.
load the mdsymbol package or to define yourself the command(s) with the indications given in the thread. I'll take a look at the details.
– Bernard
Mar 10 '14 at 00:17