# How to use \owedge and \boxwedge

We can use symbols of

$\otimes$ and $\boxtimes$, $\oplus$ and $\boxplus$, $\ominus$ and $\boxminus$  in Latex.

However, do we have $\owedge$ and $\boxwedge$, which combines $\wedge$ in the mid of a $O$ and a box? If yes how, if not, how could we define it?

Thank you so much for the experts here!!! (I received great comments from many of you.)

-
The package stmaryrd contains \owedge command which is probably what you need, but I don't know of \boxwedge so far. – Christian Hupfer Apr 21 '14 at 4:16
Indeed, I found the \owedge I wish: homes.esat.kuleuven.be/~texmf/installed/texmf-var/doc/latex/…. Thanks so much. – Idear Apr 21 '14 at 4:50

The following example defines \boxwedge and \owedge using TikZ:

• The symbols adapt in size and line width according to the current math style.
• They are defined as binary operators like \boxplus and \oplus.
• The height, width/side bearings are derived from \boxplus and \oplus.
\documentclass{article}

\usepackage{amsmath,amssymb}
\usepackage{tikz}

\makeatletter
\newcommand*{\boxwedge}{%
\mathbin{%
\mathpalette\@boxwedge{}%
}%
}
\newcommand*{\@boxwedge}[2]{%
% #1: math style
% #2: unused
\sbox0{$#1\boxplus\m@th$}%
\dimen2=.5\dimexpr\wd0-\ht0-\dp0\relax % side bearing
\dimen@=\dimexpr\ht0+\dp0\relax
\def\lw{.06}% linw width as factor for height of \boxplus
\kern\dimen2 % side bearing
\tikz[
line width=\lw\dimen@,
line join=round,
x=\dimen@,
y=\dimen@,
]
\draw
(\lw/2,0) rectangle (1-\lw,1-\lw)
(\lw,0) -- (.5,1-\lw-\lw/2) -- (1-\lw-\lw/2 ,0)
;%
\kern\dimen2 % side bearing
}
\makeatletter

\makeatletter
\newcommand*{\owedge}{%
\mathbin{%
\mathpalette\@owedge{}%
}%
}
\newcommand*{\@owedge}[2]{%
% #1: math style
% #2: unused
\sbox0{$#1\oplus\m@th$}%
\dimen2=.5\dimexpr\wd0-\ht0-\dp0\relax % side bearing
\dimen@=\dimexpr\ht0+\dp0\relax
\def\lw{.04}% line width as factor for height of \oplus
\kern\dimen2 % side bearing
\tikz[
line width=\lw\dimen@,
line join=round,
x=\dimen@,
y=\dimen@,
baseline=\dimexpr-.5\dimen@+\dp0\relax,
]
\draw
% -36.87 = -90 + 2 atan(1/2)
% 216.87 = 180 + 36.87
;%
\kern\dimen2 % side bearing
}
\makeatother

\begin{document}
$\boxplus\boxwedge_{\boxplus\boxwedge_{\boxplus\boxwedge}}$
$\oplus\owedge_{\oplus\owedge_{\oplus\owedge}}$
% Check bounding box
$\setlength{\fboxsep}{0pt} \setlength{\fboxrule}{.1pt} \fbox{\boxplus}\fbox{\boxwedge} \fbox{\owedge} \fbox{\oplus}$
\end{document}


-
This is amazing. It looks really nice!!! +1. (Yours will be the answer if nothing comes out better.) – Idear Apr 21 '14 at 7:28