#+TITLE: table-template.org #+AUTHOR: Jambunathan K #+EMAIL: kjambunathan@gmail.com #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-toc #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+XSLT: * Customization #+begin_src emacs-lisp (setq org-export-odt-table-styles '(("TableWithHeaderRowAndColumn" "Custom" ((use-first-row-styles . t) (use-first-column-styles . t))) ("TableWithFirstRowandLastRow" "Custom" ((use-first-row-styles . t) (use-last-row-styles . t))))) #+end_src See docstring of =org-export-odt-table-styles= for more information. Also unzip the exported odt file and inspect the _content.xml_ for _automatic-styles_ starting with keyword _Custom_. * Table Templates Illustrated ** Regular Org Table This table has no *#+ATTR_ODT:* associated with it. | Labels | C1 | C2 | C3 | |------------+-------------+---------------+--------------| | / | < | > | <> | | | | | | | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) | | R2 | R2C1 | R2C2 | R2C3 | |------------+-------------+---------------+--------------| | R3 | R3C1 | R3C2 | R3C3 | | R4 | R4C1 | R4C2 | R4C3 | |------------+-------------+---------------+--------------| | R5 | R5C1 | R5C2 | R5C3 | | R6 | R6C1 | R6C2 | R6C3 | | R7 | R7C1 | R7C2 | | |------------+-------------+---------------+--------------| ** Table using header row and column styles This table uses table template named _Custom_ and selects the following styles: - first row - first column #+ATTR_ODT: TableWithHeaderRowAndColumn | Labels | C1 | C2 | C3 | |------------+-------------+---------------+--------------| | / | < | > | <> | | | | | | | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) | | R2 | R2C1 | R2C2 | R2C3 | |------------+-------------+---------------+--------------| | R3 | R3C1 | R3C2 | R3C3 | | R4 | R4C1 | R4C2 | R4C3 | |------------+-------------+---------------+--------------| | R5 | R5C1 | R5C2 | R5C3 | | R6 | R6C1 | R6C2 | R6C3 | | R7 | R7C1 | R7C2 | | |------------+-------------+---------------+--------------| ** Table using first row and last row styles This table also uses the same table template named _Custom_ and selects the following styles: - first row - last row #+ATTR_ODT: TableWithFirstRowandLastRow | Labels | C1 | C2 | C3 | |------------+-------------+---------------+--------------| | / | < | > | <> | | | | | | | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) | | R2 | R2C1 | R2C2 | R2C3 | |------------+-------------+---------------+--------------| | R3 | R3C1 | R3C2 | R3C3 | | R4 | R4C1 | R4C2 | R4C3 | |------------+-------------+---------------+--------------| | R5 | R5C1 | R5C2 | R5C3 | | R6 | R6C1 | R6C2 | R6C3 | | R7 | R7C1 | R7C2 | | |------------+-------------+---------------+--------------|