# How can I construct a nicer veebar?

I really like the general style of mathabx symbols, but I'm a bit turned off by the lack of vertical space between the 'vee' and the 'bar' in \veebar (on the left below). How might I construct an alternate symbol in the same style where there is some separation between the two (such as that on the right below)?

Here is one:

\documentclass{article}
\usepackage{mathtools, amssymb}

\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{ <-6> matha5 <6-7> matha6 <7-8>
matha7 <8-9> matha8 <9-10> matha9 <10-12> matha10 <12-> matha12 }{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}
\DeclareMathSymbol{\myvee}{\mathbin}{matha}{"5F}
\newcommand{\myveebar}{\mathbin{\vcenter{\hbox{$\underline{\mkern-2.4mu{\myvee}\mkern-2.4mu}$}}}}

\begin{document}

$K \myveebar A$

\end{document}


Here is another (does not scale in superscript):

\documentclass[border=1pt]{standalone}
\usepackage{stackengine,mathabx}

% \newcommand{\veebaralt}{\:\stackanchor[-.22em]{$\vee$}{$-$}\:}


\begin{document}

$123 \veebaralt 123$

$123 \veebar 123$

\end{document}


Edit: Added \: before and after the old command; added Steven B. Segletes' helpful answer.

• Nice, but the kerning is noticeably tighter than the regular \veebar (compare the distance from \veebaralt to the 3 with the distance from \veebar to the 1) – solisoc Aug 27 '18 at 12:49
• You are right. I added the correct spacing (which is 4 mu). – Jasper Habicht Aug 27 '18 at 13:01
• Thanks. What does \renewcommand\stacktype{S} do in this context? – Jasper Habicht Aug 27 '18 at 13:08
• If you want me to be notified of your comment, you need to add @StevenBSegletes to it (just saying). But to your question, that makes sure the stack type is set to Short rather than Long. Short is the default, but if the user had reset the default along the way, this will override the default. Change the S to L and see how the result changes... – Steven B. Segletes Aug 27 '18 at 13:23

I myself have just blindly hacked together a possible solution, with all credit going to egreg's answer at Dashed underline under a inequality symbol, from which it is adapted:

\documentclass{article}
\usepackage{pict2e,picture}
\usepackage{mathabx}

\makeatletter
\newcommand{\barredeq}[1]{\mathrel{\vphantom{\veebar}\mathpalette\barred@eq{#1}}}
\newcommand{\barred@eq}[2]{%
\vcenter{%
\offinterlineskip
\roundcap
\linethickness{0.6\dimexpr\variable@rule{#1}\relax}%
\sbox\z@{$\m@th#1#2$}%
\setlength{\unitlength}{\dimexpr(\wd\z@-2\dimexpr\barred@eq@kern{#1})/10}%
\sbox\tw@{\begin{picture}(1,0)\Line(0,0)(10,0)\end{picture}}%
\ialign{%
##\cr
\copy\z@\cr
\noalign{\vskip 0.25\ht\z@}
\kern\barred@eq@kern{#1}%
\copy\tw@
\kern\barred@eq@kern{#1}%
\cr
}%
}%
}
\newcommand{\barred@eq@kern}[1]{%
\ifx#1\displaystyle 0.12\wd\z@\else
\ifx#1\textstyle 0.12\wd\z@\else
\ifx#1\scriptstyle 0.18\wd\z@\else
\ifx#1\scriptscriptstyle 0.22\wd\z@\else
0.16\wd\z@
\fi\fi\fi\fi
}
\newcommand{\variable@rule}[1]{%
\fontdimen8
\ifx#1\displaystyle\textfont3\else
\ifx#1\textstyle\textfont3\else
\ifx#1\scriptstyle\scriptfont3\else
\scriptscriptfont3\relax
\fi\fi\fi
}
\makeatother

\DeclareRobustCommand{\nveebar}{\barredeq{\vee}}

\begin{document}

$A\vee A \veebar A\nveebar A$

$\scriptstyle A\vee A \veebar A \nveebar A$

$\scriptscriptstyle A \vee A \veebar A \nveebar A$

\end{document}