Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

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

\begin{array}{*3{>{\displaystyle}c}p{5cm}}

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.

share|improve this answer
    
I really have to learn more about the cool stuff the array package can do! –  Seamus Feb 13 '12 at 15:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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