3

Is there a pair of symbols in some package which appear as $\boxtimes$, but each without one diagonal?

If not, what is the best way to render such a symbol? (To be completely explicit, I'm looking for symbols which are a square plus either diagonal.)

Detexify doesn't come up with anything; the only idea I have is to somehow overlay a diagonal line with $\square$, but I'm also not sure what a good way is to do that.

3 Answers 3

8

They are in mathabx package:

\documentclass{article}
\usepackage{mathabx}
\begin{document}
\verb|\boxbackslash|: $\boxbackslash$ 

\verb|\boxslash|: $\boxslash$
\end{document}

enter image description here

Pay attention: mathabx changes the shape of all symbols.

2
  • 1
    With the usual warning that mathabx changes the shape of all symbols.
    – egreg
    Sep 16, 2021 at 9:30
  • @egreg Warning added
    – CarLaTeX
    Sep 16, 2021 at 10:24
4

mathabx introduces some extra trouble as egreg mentioned, so here is a way to "steal" directly the symbol without using a family.

\newcommand\genmathchar[6]{%
    \newcommand*#1{#3{%
        \mathchoice
            {\hbox{#4\char#2}}%
            {\hbox{#4\char#2}}%
            {\hbox{#5\char#2}}%
            {\hbox{#6\char#2}}%
    }}%
}

\font\sixmathb=mathb6
\font\eightmathb=mathb8
\font\twelvemathb=mathb12
\genmathchar {\boxslash}     {"6D} {\mathbin} {\twelvemathb} {\eightmathb} {\sixmathb}
\genmathchar {\boxbackslash} {"6E} {\mathbin} {\twelvemathb} {\eightmathb} {\sixmathb}

$ P \boxslash Q \boxbackslash R $

output

1
3

From the link suggest by the user @Steven B. Segletes, I add my MWE importing just only two symbols, from the specific slot into this link:

https://mirror.las.iastate.edu/tex-archive/fonts/mathabx/texinputs/mathabx.dcl,

Here you can see the slots to take only two request symbols. All the others symbol are of amssmymb.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{
      <5> <6> <7> <8> <9> <10> gen * mathb
      <10.95> mathb10 <12> <14.4> <17.28> <20.74> <24.88> mathb12
      }{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareMathSymbol{\boxslash}{2}{mathb}{"6D}%%%%%% imported only two symbol of mathabx; here there are the slot of this package: https://mirror.las.iastate.edu/tex-archive/fonts/mathabx/texinputs/mathabx.dcl
\DeclareMathSymbol{\boxbackslash}{2}{mathb}{"6E}

\begin{document}
$a\boxslash \triangle \cup \cap \square BCD$ and $acfh \boxbackslash \sum \triangle \cup \cap BCD$ 
\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .