# Package array error

I'm trying to write the following on my latex

$$(T_n f)(z)=n^{2k-1} \sum_{\begin{array}\ a\geq 1,ad=n \\ 0\leq b<d\end{array}} d^{-2k} f\left(\frac{az+b}{d}\right)$$


But it ends up with error:

! Package array Error: Illegal pream-token (\ ): c'


used.

\documentclass[12pt]{amsart}
\usepackage{fullpage}
\usepackage{amsthm}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{matrix, arrows, decorations.pathmorphing}
\usepackage{amsmath}


What's wrong?

• Welcome to TeX.SX! Don't use $$...$$, use $...$ instead. But the error is \begin{array}...\end{array}. \begin{array}{c}...\end{array} is probably what you need, i.e. a column specifier. array is like a tabular – user31729 Apr 12 '16 at 13:25
• just for information ... amsart incorporates amsthm and loads amsmath, so it's not necessary to specify those for inclusion. – barbara beeton Apr 12 '16 at 14:22
• @ChristianHupfer thanks for welcoming ^_^. I use the double dolars because I want it on the next line. – Chen M Ling Apr 12 '16 at 14:30
• @barbarabeeton OK noted. So I just erase the amsmath and amsthm right? Thanks :) – Chen M Ling Apr 12 '16 at 14:30
• @ChenMLing: $...$ does the same. $$...$$ is deprecated syntax – user31729 Apr 12 '16 at 14:31

array takes a mandatory argument. It would probably be much easier for you to write \sum_{\substack{a\geq1, ad=n \\ 0\leq b<d}}

Full MWE:

\documentclass[12pt]{amsart}
\usepackage{fullpage}
\usepackage{amsthm}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{matrix, arrows, decorations.pathmorphing}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
(T_n f)(z)=n^{2k-1} \sum_{\substack{ a\geq 1,ad=n \\ 0\leq b<d }}
d^{-2k} f\left(\frac{az+b}{d}\right)
\end{equation*}

\end{document}


Note how \substack makes the subscript in a smaller font, whereas array does not.

BTW: please always post full minimal examples including preamble and body that others can just copy'n'paste and use immediately without having to add anything. That makes others much more inclined to help.

• Oh yeah. That works! Thanks very much. Sorry that I didn't post full minimal examples, I'm new here and just learn how to post nicely. :) Thanks again... – Chen M Ling Apr 12 '16 at 13:34
• @ChenMLing also remember to make the example minimal, for example here, none of the used packages are relevant, as amsart already loads amsmath` and the others are not related to the issue. – daleif Apr 12 '16 at 13:56