[Tex/LaTex] Half filled square symbol not in amssymb

amssymbsymbolstikz-pgf

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.

enter image description here

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?

[edit] 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.

Best Answer

\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}

enter image description here

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}

enter image description here

Related Question