Symbol $\perp$ with a shorter horizontal line to be used as a superscript
Adjust to suit:
\documentclass{article}
\usepackage{amsmath,l3draw,xparse}
\ExplSyntaxOn
\NewDocumentCommand{\sperp}{}
{% short perp
{\mathord{\text{\daddy_sperp:}}}
}
\cs_new_protected:Nn \daddy_sperp:
{
\use:c { check@mathfonts }
$\mspace{1mu}$
\draw_begin:
\draw_cap_round: % good for CM fonts
\draw_linewidth:n { \dim_to_fp:n { \fontdimen8\textfont2 }/18 } % thickness of the fraction line
\draw_path_moveto:n { 0em, 0ex }
\draw_path_lineto:n { 0.3em, 0ex }
\draw_path_use:n { stroke }
\draw_path_moveto:n { 0.15em, 0ex }
\draw_path_lineto:n { 0.15em, 1.3ex }
\draw_path_use:n { stroke }
\draw_end:
$\mspace{1mu}$
}
\ExplSyntaxOff
\begin{document}
$A^{\sperp}_n$ $\perp\sperp\scriptstyle\sperp\scriptscriptstyle\sperp$
\end{document}
The version of \perp
in the MnSymbol package is narrower than the 'standard' version, but also slightly shorter. To load it without changing lots of other things, we can borrow most of the code from @Leo Liu's answer to Importing single symbol from MnSymbol. Then we obtain the following:
\documentclass{article}
\DeclareFontFamily{U} {MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6> MnSymbolA5
<6-7> MnSymbolA6
<7-8> MnSymbolA7
<8-9> MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12-> MnSymbolA12}{}
\DeclareFontShape{U}{MnSymbolA}{b}{n}{
<-6> MnSymbolA-Bold5
<6-7> MnSymbolA-Bold6
<7-8> MnSymbolA-Bold7
<8-9> MnSymbolA-Bold8
<9-10> MnSymbolA-Bold9
<10-12> MnSymbolA-Bold10
<12-> MnSymbolA-Bold12}{}
\DeclareSymbolFont{MnSyA} {U} {MnSymbolA}{m}{n}
\DeclareMathSymbol{\mnperp}{\mathrel}{MnSyA}{217}
\begin{document}
\[
\begin{array}{ll}
\perp & \mnperp \\ \mnperp &
\end{array}
\quad
A^\perp \quad A^\mnperp
\]
\end{document}
Works in all math styles...can easily choose scale by changing Vert/Horz. stretch parameters shown as .6
and .5
. Line thicknesses will always be good, since this is composed from an overlay of -
and \vert
in the appropriate math style.
\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\newperp{\mathbin{\ThisStyle{\setbox0=\hbox{%
\abovebaseline[-\dimexpr.5\LMex+.2ex]{%
\ensurestackMath{\stackengine{-\dimexpr.6\LMex+.2ex}%
{\SavedStyle\hstretch{.6}{-}}% ADJUSTABLE V SCALE
{\SavedStyle\vstretch{.5}{\vert}}% ADJUSTABLE H SCALE
{O}{c}{F}{F}{S}}}}\dp0=0pt\box0}}}
\begin{document}
$A\newperp B$
$\scriptstyle A\newperp B$
$\scriptscriptstyle A\newperp B$
$A^{\newperp}_n$
\end{document}
Changing stretches to .7/.6 changes result to