Like the command \notin, I want to create a \notBox.
So far I have made $\Box\!\!\!\!\diagdown$, but it does not look good.
May be I need to raise the \diagdown by a little.
Please help making such a symbol.
Like the command \notin, I want to create a \notBox.
So far I have made $\Box\!\!\!\!\diagdown$, but it does not look good.
May be I need to raise the \diagdown by a little.
Please help making such a symbol.
Let stackengine do the work for you!
I have also changed \diagdown with
/ to make the symbol similar to \notin.
Edit: I've added a solution without stackengine.
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{stackengine}
\usepackage{graphicx}
\newcommand{\notBox}{\mathrel{\stackinset{c}{}{c}{}{$/$}{$\Box$}}}
\newcommand{\notBoxsimple}{\mathrel{\ooalign{$\Box$\cr$\raise.24ex\hbox{$\mkern2.1mu/$}$\cr}}}
\begin{document}
Benchmark:
\[
A \notin B
\]
With \texttt{stackengine}:
\[
A \notBox B
\]
Without \texttt{stackengine}:
\[
A \notBoxsimple B
\]
\end{document}
/ gets misplaced.
– G_0_pi_i_e
Sep 01 '17 at 04:54
latexsym modifies the dymension of /. In that case you can simply raise a bit the /: \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{latexsym} \usepackage{stackengine} \newcommand{\notBox}{\mathrel{\stackinset{c}{}{c}{.2ex}{$/$}{$\Box$}}} \begin{document} \[ A_1\notBox A_2 \] \end{document}
– CarLaTeX
Sep 01 '17 at 05:19
stackengine, see my renewed answer.
– CarLaTeX
Sep 01 '17 at 05:45