0

I am trying to code my one notation such that I do not want to repeat every time I need to introduce a new sequence. I thought of coding it this way

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter\sequence1{\{}{\}_{i=1}^{n}}

\begin{document}
    \[\sequence1{X_i}\]
\end{document}

For some reason this is not working for me. Can some one help

I am expecting to code \sequence1{X_i} and it gives me $\{X_i\}_{i=1}^{n} on latex.

Thank you for your help

1

It's as simple as removing the number from the command sequence name.

delimiter

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter\sequence{\{}{\}_{i=1}^{n}}

\begin{document}
    \[\sequence{X_i}\]
\end{document}

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.