Variable: org-odt-table-styles

org-odt-table-styles is a customizable variable defined in ox-odt.el.gz.

Value

(("OrgEquation" "OrgEquation"
  ((use-first-column-styles . t) (use-last-column-styles . t)))
 ("TableWithHeaderRowAndColumn" "Custom"
  ((use-first-row-styles . t) (use-first-column-styles . t)))
 ("TableWithFirstRowandLastRow" "Custom"
  ((use-first-row-styles . t) (use-last-row-styles . t)))
 ("GriddedTable" "Custom" nil))

Documentation

Specify how Table Styles should be derived from a Table Template.

This is a list where each element is of the form (TABLE-STYLE-NAME TABLE-TEMPLATE-NAME TABLE-CELL-OPTIONS).

TABLE-STYLE-NAME is the style associated with the table through
"#+ATTR_ODT: :style TABLE-STYLE-NAME" line.

TABLE-TEMPLATE-NAME is a set of - up to 9 - automatic TABLE-CELL-STYLE-NAMEs and PARAGRAPH-STYLE-NAMEs (as defined below) that is included in org-odt-content-template-file.

TABLE-CELL-STYLE-NAME := TABLE-TEMPLATE-NAME + TABLE-CELL-TYPE +
                         "TableCell"
PARAGRAPH-STYLE-NAME := TABLE-TEMPLATE-NAME + TABLE-CELL-TYPE +
                         "TableParagraph"
TABLE-CELL-TYPE := "FirstRow" | "LastColumn" |
                         "FirstRow" | "LastRow" |
                         "EvenRow" | "OddRow" |
                         "EvenColumn" | "OddColumn" | ""
where "+" above denotes string concatenation.

TABLE-CELL-OPTIONS is an alist where each element is of the form (TABLE-CELL-STYLE-SELECTOR . ON-OR-OFF).
TABLE-CELL-STYLE-SELECTOR := use-first-row-styles |
                             use-last-row-styles |
                             use-first-column-styles |
                             use-last-column-styles |
                             use-banding-rows-styles |
                             use-banding-columns-styles |
                             use-first-row-styles
ON-OR-OFF := t | nil

For example, with the following configuration

(setq org-odt-table-styles
      '(("TableWithHeaderRowsAndColumns" "Custom"
         ((use-first-row-styles . t)
          (use-first-column-styles . t)))
        ("TableWithHeaderColumns" "Custom"
         ((use-first-column-styles . t)))))

1. A table associated with "TableWithHeaderRowsAndColumns"
   style will use the following table-cell styles -
   "CustomFirstRowTableCell", "CustomFirstColumnTableCell",
   "CustomTableCell" and the following paragraph styles
   "CustomFirstRowTableParagraph",
   "CustomFirstColumnTableParagraph", "CustomTableParagraph"
   as appropriate.

2. A table associated with "TableWithHeaderColumns" style will
   use the following table-cell styles -
   "CustomFirstColumnTableCell", "CustomTableCell" and the
   following paragraph styles
   "CustomFirstColumnTableParagraph", "CustomTableParagraph"
   as appropriate..

Note that TABLE-TEMPLATE-NAME corresponds to the
"<table:table-template>" elements contained within
"<office:styles>". The entries (TABLE-STYLE-NAME
TABLE-TEMPLATE-NAME TABLE-CELL-OPTIONS) correspond to
"table:template-name" and "table:use-first-row-styles" etc
attributes of "<table:table>" element. Refer ODF-1.2 specification for more information. Also consult the implementation filed under org-odt-get-table-cell-styles.

The TABLE-STYLE-NAME "OrgEquation" is used internally for formatting of numbered display equations. Do not delete this style from the list.

This variable was added, or its default value changed, in Emacs 24.1.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
;;;; Table

(defcustom org-odt-table-styles
  '(("OrgEquation" "OrgEquation"
     ((use-first-column-styles . t)
      (use-last-column-styles . t)))
    ("TableWithHeaderRowAndColumn" "Custom"
     ((use-first-row-styles . t)
      (use-first-column-styles . t)))
    ("TableWithFirstRowandLastRow" "Custom"
     ((use-first-row-styles . t)
      (use-last-row-styles . t)))
    ("GriddedTable" "Custom" nil))
  "Specify how Table Styles should be derived from a Table Template.
This is a list where each element is of the
form (TABLE-STYLE-NAME TABLE-TEMPLATE-NAME TABLE-CELL-OPTIONS).

TABLE-STYLE-NAME is the style associated with the table through
\"#+ATTR_ODT: :style TABLE-STYLE-NAME\" line.

TABLE-TEMPLATE-NAME is a set of - up to 9 - automatic
TABLE-CELL-STYLE-NAMEs and PARAGRAPH-STYLE-NAMEs (as defined
below) that is included in `org-odt-content-template-file'.

TABLE-CELL-STYLE-NAME := TABLE-TEMPLATE-NAME + TABLE-CELL-TYPE +
                         \"TableCell\"
PARAGRAPH-STYLE-NAME  := TABLE-TEMPLATE-NAME + TABLE-CELL-TYPE +
                         \"TableParagraph\"
TABLE-CELL-TYPE       := \"FirstRow\"   | \"LastColumn\" |
                         \"FirstRow\"   | \"LastRow\"    |
                         \"EvenRow\"    | \"OddRow\"     |
                         \"EvenColumn\" | \"OddColumn\"  | \"\"
where \"+\" above denotes string concatenation.

TABLE-CELL-OPTIONS is an alist where each element is of the
form (TABLE-CELL-STYLE-SELECTOR . ON-OR-OFF).
TABLE-CELL-STYLE-SELECTOR := `use-first-row-styles'       |
                             `use-last-row-styles'        |
                             `use-first-column-styles'    |
                             `use-last-column-styles'     |
                             `use-banding-rows-styles'    |
                             `use-banding-columns-styles' |
                             `use-first-row-styles'
ON-OR-OFF                 := t | nil

For example, with the following configuration

\(setq org-odt-table-styles
      \\='((\"TableWithHeaderRowsAndColumns\" \"Custom\"
         ((use-first-row-styles . t)
          (use-first-column-styles . t)))
        (\"TableWithHeaderColumns\" \"Custom\"
         ((use-first-column-styles . t)))))

1. A table associated with \"TableWithHeaderRowsAndColumns\"
   style will use the following table-cell styles -
   \"CustomFirstRowTableCell\", \"CustomFirstColumnTableCell\",
   \"CustomTableCell\" and the following paragraph styles
   \"CustomFirstRowTableParagraph\",
   \"CustomFirstColumnTableParagraph\", \"CustomTableParagraph\"
   as appropriate.

2. A table associated with \"TableWithHeaderColumns\" style will
   use the following table-cell styles -
   \"CustomFirstColumnTableCell\", \"CustomTableCell\" and the
   following paragraph styles
   \"CustomFirstColumnTableParagraph\", \"CustomTableParagraph\"
   as appropriate..

Note that TABLE-TEMPLATE-NAME corresponds to the
\"<table:table-template>\" elements contained within
\"<office:styles>\".  The entries (TABLE-STYLE-NAME
TABLE-TEMPLATE-NAME TABLE-CELL-OPTIONS) correspond to
\"table:template-name\" and \"table:use-first-row-styles\" etc
attributes of \"<table:table>\" element.  Refer ODF-1.2
specification for more information.  Also consult the
implementation filed under `org-odt-get-table-cell-styles'.

The TABLE-STYLE-NAME \"OrgEquation\" is used internally for
formatting of numbered display equations.  Do not delete this
style from the list."
  :version "24.1"
  :type '(choice
          (const :tag "None" nil)
          (repeat :tag "Table Styles"
                  (list :tag "Table Style Specification"
			(string :tag "Table Style Name")
			(string  :tag "Table Template Name")
			(alist :options (use-first-row-styles
					 use-last-row-styles
					 use-first-column-styles
					 use-last-column-styles
					 use-banding-rows-styles
					 use-banding-columns-styles)
			       :key-type symbol
			       :value-type (const :tag "True" t))))))