This is the official manual for the latest Org-mode release.

Next: , Previous: Quoting LaTeX code, Up: LaTeX export

#### 12.10.5 Tables in LaTeX export

For LaTeX export of a table, you can specify a label and a caption (see Images and tables). You can also use attributes to control table layout and contents. Valid LaTeX attributes include:

:mode
Nature of table's contents. It can be set to table, math, inline-math or verbatim. In particular, when in math or inline-math mode, every cell is exported as-is and the table is wrapped within a math environment. Also, contiguous tables sharing the same math mode are merged within the same environment. Default mode is determined in org-latex-default-table-mode.
:environment
Environment used for the table. It can be set to any LaTeX table environment, like tabularx1, longtable, array, tabu2, bmatrix... It defaults to org-latex-default-table-environment value.
:caption
#+CAPTION keyword is the simplest way to set a caption for a table (see Images and tables). If you need more advanced commands for that task, you can use :caption attribute instead. Its value should be raw LaTeX code. It has precedence over #+CAPTION.
:float
:placement
The :float specifies the float environment for the table. Possible values are sideways3, multicolumn, t and nil. When unspecified, a table with a caption will have a table environment. Moreover, the :placement attribute can specify the positioning of the float. Note: :placement is ignored for :float sideways tables.
:align
:font
:width
Set, respectively, the alignment string of the table, its font size and its width. They only apply on regular tables.
:spread
Boolean specific to the tabu and longtabu environments, and only takes effect when used in conjunction with the :width attribute. When :spread is non-nil, the table will be spread or shrunk by the value of :width.
:booktabs
:center
:rmlines
They toggle, respectively, booktabs usage (assuming the package is properly loaded), table centering and removal of every horizontal rule but the first one (in a "table.el" table only). In particular, org-latex-tables-booktabs (respectively org-latex-tables-centered) activates the first (respectively second) attribute globally.
:math-prefix
:math-suffix
:math-arguments
A string that will be inserted, respectively, before the table within the math environment, after the table within the math environment, and between the macro name and the contents of the table. The :math-arguments attribute is used for matrix macros that require more than one argument (e.g., qbordermatrix).

Thus, attributes can be used in a wide array of situations, like writing a table that will span over multiple pages, or a matrix product:

     #+ATTR_LATEX: :environment longtable :align l|lp{3cm}r|l
| ..... | ..... |
| ..... | ..... |

#+ATTR_LATEX: :mode math :environment bmatrix :math-suffix \times
| a | b |
| c | d |
#+ATTR_LATEX: :mode math :environment bmatrix
| 1 | 2 |
| 3 | 4 |


In the example below, LaTeX command \bicaption{HeadingA}{HeadingB} will set the caption.

     #+ATTR_LATEX: :caption \bicaption{HeadingA}{HeadingB}
| ..... | ..... |
| ..... | ..... |


#### Footnotes

[1] Requires adding the tabularx package to org-latex-packages-alist.

[2] Requires adding the tabu package to org-latex-packages-alist.

[3] Formerly, the value was sidewaystable. This is deprecated since Org 8.3.