How can I create my own scalable math operator with limits just like the sum symbol? Specifically I want to invent a "concatenation" symbol that looks alike to: "[". For example I want to put
[ _{i=1}^N
etc. where the subscript/superscripts are positioned below and above the symbol as in "eqnarray" environment.
I have tried with \newcommand
and creating a drawing similar to "[" with \begin{picture} \end{picture}
, but it didn't work.
Thanks for the help!
Best Answer
A simple solution would be to use the
\DeclareMathOperator*
command from theamsmath
package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle.\DeclareMathOperator*{\concat}{[}
will produce the following results:You could leave it like that, but for me, the displayed version produces a
[
symbol that is too small. Using thescalerel
package, you could make the symbol the same size as a\sum
symbol:\DeclareMathOperator*{\concat}{\scalerel*{[}{\sum}}
, which will produce the following:Here is a MWE: