[Tex/LaTex] Creating new symbol derived from hash

math-modesymbols

I have rotated the hash # by about 45 degrees using the command:

\newcommand{\hash}{\mathbin{\rotatebox[origin=c]{45}{$\#$}}}

I used it:

\[
\B(\R^n) = \B(\R^r) \hash_{\sigma} \B(\R^s) \text{, gdzie }
\]
\[
\B(\R^r) \hash_{\sigma} \B(\R^s) = \sigma(\{ A \times B : A \in
\B(\R^r), B \in \B(\R^s) \})
\]

and it looks like:

enter image description here

but it doesn't look beautiful. I would like to ask how can I make the symbol inside the red polygon in a more elegant way.

Best Answer

You can use two rotated \parallel symbols

\documentclass{article}
\usepackage{graphicx}
\newcommand\hash{\mathbin{\mathpalette\xhash\relax}}
\newcommand{\xhash}[2]{\ooalign{%
  $#1\xxhash{#1}{-45}$\cr
  $#1\xxhash{#1}{45}$\cr
  }%
}
\newcommand{\xxhash}[2]{\rotatebox[origin=c]{#2}{$#1\parallel$}}

\begin{document}
$a \hash_{\sigma} b_{\hash}$
\end{document}

enter image description here