Multicolumn

Multicolumn[list,cols]

is an object that formats with the elements of list arranged in a grid with the indicated number of columns.

Multicolumn[list,{rows,Automatic}]

formats as a grid with the indicated number of rows.

Multicolumn[list,{rows,cols}]

formats as a grid with the indicated number of rows and columns.

Multicolumn[list]

formats with the elements of list in a roughly square arrangement.

Details and Options

  • Multicolumn[list,cols] uses the smallest number of rows so that all elements will be shown.
  • Multicolumn[list,{rows,cols}] will not show all the elements in list if Length[list] is larger than rows*cols.
  • Multicolumn[list] calculates the number of rows and columns to be near Sqrt[Length[list]].
  • Multicolumn[] evaluates to the corresponding Grid.
  • Multicolumn takes the same options as Grid.
  • Multicolumn fills the first column first, then the second column, etc.
  • Setting Appearance->"Horizontal" will cause the resulting grid to fill row by row, rather than column by column.

Examples

open allclose all

Basic Examples  (2)

Lay out a list in the specified number of columns:

In[1]:=
Click for copyable input
Out[1]=

Create a table with approximately square dimensions:

In[1]:=
Click for copyable input
Out[1]=

Scope  (3)

Options  (1)

Possible Issues  (3)

Neat Examples  (2)

See Also

Grid  Column  Partition  TableForm  TextGrid  GraphicsGrid  ArrayReshape

Introduced in 2014
(10.0)