[Tex/LaTex] Place symbol inside of \bigsqcup

math-modemath-operatorssymbols

How can I place a symbol inside of \bigsqcup?

What I have tried is this:

\newcommand{\concn}{\bigsqcup_{i=1}^n\hspace{-1.07em}\text{\footnotesize $h$\normalsize\hspace{0.6em}}}

The problem ist that this only looks nice in an equation enviroment. When I use it inside of text, then my hspaces are no longer correct:

enter image description here

Is there a method to place the h inside of \bigsqcup which works in any environment?

Best Answer

A variation on Mathematical symbol for disjoint set union

\documentclass{article}

\makeatletter % \moverlay by D. Arsenau
\def\moverlay{\mathpalette\mov@rlay}
\def\mov@rlay#1#2{\leavevmode\vtop{%
   \baselineskip\z@skip \lineskiplimit-\maxdimen
   \ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}

\newcommand{\charfusion}[3][\mathord]{
    #1{\ifx#1\mathop\vphantom{#2}\fi
        \mathpalette\mov@rlay{#2\cr#3}
      }
    \ifx#1\mathop\expandafter\displaylimits\fi}
\makeatother

\newcommand{\bighsqcup}{\charfusion[\mathop]{\bigsqcup}{\innerh}}
\newcommand{\innerh}{\mathchoice
  {h}
  {\scriptstyle h}
  {\scriptscriptstyle h}
  {\scriptscriptstyle h}
}

\begin{document}
$\bighsqcup_{i=1}^n$
\[
\bighsqcup_{i=1}^n
\bigsqcup_{i=1}^n % for comparison
\]
\end{document}

enter image description here

Related Question