# Half filled square symbol not in amssymb

The question title says pretty all. I need a half-filled square symbol which can't be found in the amssymb package: something between \blacksquare and \square.

I've tried to read the source files at http://tug.ctan.org/fonts/amsfonts/source/amssymb.dtx, but it seems that I will have to use the TikZ/PGF anyway. How to proceed?

 The minimal working example

\documentclass{article}
\usepackage{Alegreya}
\usepackage{amssymb}
% \usepackage{stix} % uncomment this line
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\section{Introduction}
Symbols used here include $\blacksquare$ and $\square$.
\end{document}


shows that stix changes font used in whole document. Including stix before Alegreya changes appearance of \square, which is not desired.

• Hi, Have you seen at the link tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf? There is \squarellblack or \squarelrblack with stixpackage Geometric Shapes. – Sebastiano May 13 '17 at 9:05
• @Sebastiano, the Stix package offers \squarelrblack which is exactly what I wanted. Unfortunately, it breaks compatibility with other packages in my preamble, for example Alegreya. – Santiago May 13 '17 at 9:08
• @Sebastiano the MWE has been added. – Santiago May 13 '17 at 9:14
• Santiago thanks a lot lot for your collaboration. – Sebastiano May 13 '17 at 9:28

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{stix}
\usepackage{Alegreya}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\begin{document}
\section{Introduction}
Symbols used here include $\blacksquare$ and $\square$
and $\squarelrblack$.
\end{document}


or load stix as \usepackage[notextcomp]{stix} if you want it after amssymb. It is also possible to use only the \squarelrblack from stix, but then the symbol is bigger than the ones from amssymb:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{Alegreya}
\usepackage{amssymb}
\makeatletter
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{arrows3}{LS2}{stixtt}{m}{n}
\DeclareMathSymbol{\squarelrblack}{\mathord}{arrows3}{"89}
\makeatother
\usepackage[utf8]{inputenc}
\begin{document}
\section{Introduction}
Symbols used here include $\blacksquare$ and $\square$
and $\squarelrblack$.
\end{document}


• Stix before Alegreya changes appearance of \square and \blacksquare. – Santiago May 13 '17 at 9:18
• Herbert I was doing the same thing myself. I vote +1 for your answer. :-) – Sebastiano May 13 '17 at 9:20
• @Santiago: sure, they are from stix, too. I f you do not like it, the write your own command \SquarelrBlack – user2478 May 13 '17 at 9:23