I would like to create a new binary operation by squaring a symbol.
In this example I try to do it with \wr.
I use
\usepackage{graphics}
\usepackage{stackengine}
\newcommand{\SmallWr}{\scalebox{0.6}{\( \boldsymbol\wr \)}}
\newcommand{\WrSymbol}{
\stackMath\stackinset{c}{0ex}{c}{0.05pt}{\SmallWr}{\square}
}
\newcommand{\SquaredWr}{
\mathbin{\WrSymbol}
}
It works but not perfectly. I get some pdf aberrations where sometimes the \wr is placed too high in the square and sometimes placed too low.
And this is also dependent on the zoom I use to look at the pdf.
How can I make this symbol more robust?
Edit: Thanks for the proposals. I still get the same aberrations when the PDF is zoomed out. As schtandard pointed out in their comment, this is likely not due to LaTeX and there are no solution apart from increasing the number of screen pixels.




\wr. If there are still problems, please post a picture showing that (in higher resolution) and complete your code snippet to be an MWE. – schtandard Jul 02 '20 at 09:10