1

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.

The header I used:

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

What's wrong?

  • 2
    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
  • 1
    @ChenMLing: \[...\] does the same. $$...$$ is deprecated syntax – user31729 Apr 12 '16 at 14:31
3

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}

enter image description here

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.

  • 1
    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
  • 1
    @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

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.