[Tex/LaTex] Make every element of an array displaystyle


Is there a way to make every element of an array be \displaystyle? I don't want to do something like \everymath={\displaystyle} (or whatever it should be) because I want this for a particular array only. Also, one of the column specifications is p{5cm} which makes it text mode. So that column shouldn't be \displaystyle. (Or rather, the solution shouldn't choke on a text column.

Any bright ideas?

Best Answer

You could insert \displaystyle into the column definition, such as


Here I used syntax provided by the array package:

  • >{...} can insert commands before the array element
  • *n{...} repeats a column definition n times

So in the example we get 3 columns, where all cells have \displaystyle, and 1 paragraph column without.

Related Question