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!

  • 2
    Something like $\mathop{\Big[}\limits_{i=1}^N$? – Jairo A. del Rio Dec 6 '20 at 13:11
  • 1
    Welcome! If you post a very small code with what you tried, it would be great: people here could find what's wrong without having to guess too much. So please post a minimal working example (MWE) even if it doesn't really work – Rmano Dec 6 '20 at 13:13
  • @StevenB.Segletes, after posting my answer, I realize this is essentially the same thing you did in your linked solution. Would you like to post it as an answer? I can remove mine. – Sandy G Dec 6 '20 at 15:01
  • 1
    @SandyG Your answer is fine (+1) – Steven B. Segletes Dec 6 '20 at 16:47

A simple solution would be to use the \DeclareMathOperator* command from the amsmath 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:

enter image description here

You could leave it like that, but for me, the displayed version produces a [ symbol that is too small. Using the scalerel package, you could make the symbol the same size as a \sum symbol:

\DeclareMathOperator*{\concat}{\scalerel*{[}{\sum}}, which will produce the following: enter image description here

Here is a MWE:





\concat_{n=1}^{\infty} a_n

Inline: $\concat_{n=1}^{\infty} a_n$.

  • 1
    Excellent!! Thank you – Leonardo Vanni Dec 6 '20 at 15:14
  • I am agree with the user. +1 – Sebastiano Dec 7 '20 at 21:14

You can use a modified version of https://tex.stackexchange.com/a/23436/4427 (first code set).




\sum_{i=1}^n \bigconcat_{i=1}^n x_i
\sum\bigconcat_{i=1}^n x_i
\sum\bigconcat_{i=1}^n x_i
\sum\bigconcat_{i=1}^n x_i

The scaling is necessary because of how TeX is treating [.

enter image description here


My idea uses \left[\phantom{\sum}\right. trick:


 \displaystyle \concat_{n=1}^\infty
 \scriptstyle \concat_{n=1}^\infty


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.