Custom \sqcap operators
You can overlap the \sqcap
and minus with \ooalign
. The mismatch in width can be cured by shrinking the minus sign only in the horizontal direction. For the “big” version, the same idea is used, but the minus sign is also stretched vertically to match the thickness (it maybe requires a different factor in scriptstyle, though).
\documentclass{article}
\usepackage{amsmath,stmaryrd,graphicx}
\makeatletter
\newcommand{\semisqcap}{\mathbin{\mathpalette\semisqcap@\relax}}
\newcommand{\semisqcap@}[2]{%
\begingroup\m@th
\sbox\z@{$#1\sqcap$}%
\ooalign{\hidewidth\resizebox{\wd\z@}{\height}{$#1-$}\hidewidth\cr$#1\sqcap$\cr}%
\endgroup
}
\newcommand{\bigsemisqcap}{\DOTSB\mathop{\mathpalette\bigsemisqcap@\relax}\slimits@}
\newcommand{\bigsemisqcap@}[2]{%
\begingroup\m@th
\sbox\z@{$#1\bigsqcap$}%
\ooalign{\hidewidth\semisqbar@{#1}\hidewidth\cr$#1\bigsqcap$\cr}%
\vphantom{\box\z@}%
\endgroup
}
\newcommand{\semisqbar@}[1]{%
\raisebox{-0.25\height}{\resizebox{\wd\z@}{2\height}{$#1-$}}%
}
\makeatother
\begin{document}
\begin{gather*}
a\semisqcap b
\quad\scriptstyle a\semisqcap b
\\
a\sqcap b
\quad\scriptstyle a\sqcap b
\\
\bigsemisqcap_{i=1}^n a_i \bigsqcap_{i=1}^n a_i
\\
\bigsemisqcap_{i=1}^n a_i \bigsqcap_{i=1}^n a_i
\\
\textstyle\bigsemisqcap_{i=1}^n a_i \bigsqcap_{i=1}^n a_i
\\
\scriptstyle\bigsemisqcap_{i=1}^n a_i \bigsqcap_{i=1}^n a_i
\end{gather*}
\end{document}
You can literally take the answer you link to, and change a few values.
\documentclass{article}
\usepackage{amsmath}
\usepackage{scalerel}
\def\widen{\mathrel{\ThisStyle{\stretchrel*{\ooalign{%
\raise0.45\LMex\hbox{$\SavedStyle\sqcup$}\cr%
\raise-0.45\LMex\hbox{$\SavedStyle\sqcup$}}}{\sqcup}}}}
\def\narrow{\mathrel{\ThisStyle{\stretchrel*{\ooalign{%
\raise0.75\LMex\hbox{$\SavedStyle\sqcap$}\cr%
\raise-0.75\LMex\hbox{$\SavedStyle\sqcap$}}}{\sqcap}}}}
\def\Widen{\mathrel{\ThisStyle{\stretchrel*{\ooalign{%
\raise0.6\LMex\hbox{$\SavedStyle\sqcup$}\cr%
\raise-0.6\LMex\hbox{$\SavedStyle\sqcup$}}}{\bigsqcup}}}}
\begin{document}
$a -\widen b \quad\scriptstyle a -\widen b \quad\scriptscriptstyle a -\widen b$
$a -\narrow b \quad\scriptstyle a -\narrow b \quad\scriptscriptstyle a -\narrow b$
$a -\Widen b \quad\scriptstyle a -\Widen b \quad\scriptscriptstyle a -\Widen b$
\end{document}