summaryrefslogtreecommitdiff
path: root/docutils/docs/user
diff options
context:
space:
mode:
authordkuhlman <dkuhlman@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-07-26 19:26:14 +0000
committerdkuhlman <dkuhlman@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2010-07-26 19:26:14 +0000
commitd53f1e26e35b5c39efd391aaead5afe9f9b0e656 (patch)
tree8489fc668e70a24630247b44663d5c7b6b981d61 /docutils/docs/user
parentc22118a094f3050e66110ef7d0b30016a7a8f8a4 (diff)
downloaddocutils-d53f1e26e35b5c39efd391aaead5afe9f9b0e656.tar.gz
Added support for custom table styles
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6381 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/docs/user')
-rw-r--r--docutils/docs/user/odt.txt71
1 files changed, 62 insertions, 9 deletions
diff --git a/docutils/docs/user/odt.txt b/docutils/docs/user/odt.txt
index 567c6d5bf..5dcc0b395 100644
--- a/docutils/docs/user/odt.txt
+++ b/docutils/docs/user/odt.txt
@@ -484,19 +484,67 @@ the ``rststyle-heading1`` style to the generated rubric::
Table styles
~~~~~~~~~~~~
-Table styles are generated by ``oowriter`` for each table that you
-create. Therefore, ``odtwriter`` attempts to do something
-similar. These styles are created in the ``content.xml`` document
-in the generated ``.odt``. These styles have names prefixed with
-"rststyle-Table".
+A table style is generated by ``oowriter`` for each table that you
+create. Therefore, ``odtwriter`` attempts to do something similar.
+These styles are created in the ``content.xml`` document in the
+generated ``.odt`` file. These styles have names prefixed with
+"rststyle-table-".
+There are two ways in which you can control the styles of your
+tables: one simple, the other a bit more complex, but more
+powerful.
+First, you can change the thickness of the borders of all tables
+generated in a document using the "--table-border-thickness"
+command line option.
-.. _`Open Document at Wikipedia`:
- http://en.wikipedia.org/wiki/OpenDocument
+Second, you can control additional table properties and you can
+apply different styles to different tables within the same document
+by customizing and using tables in your stylesheet: ``styles.odt``
+or whatever you name your copy of it using the --stylesheet command
+line option. Then, follow these rules to apply a table style to
+the tables in your document:
-.. _`OASIS Open Document Format for Office Applications (OpenDocument) TC`:
- http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office
+- The default table style -- Optionally, alter and customize the
+ style applied by default to tables in your document by modifying
+ table "rststyle-table-0" in your stylesheet (``styles.odt`` or a
+ copy). Caution: Do not change the name of this table.
+
+- User-created table styles -- Add one or more new table styles to
+ be applied selectively to tables in your document by doing the
+ following:
+
+ 1. Using ``oowriter``, add a table to your stylesheet and give it
+ a name that starts with the prefix "rststyle-table-", for
+ example "rststyle-table-vegetabledata". Customize the table's
+ border thickness, border color, and table background color.
+
+ 2. In your reStructuredText document, apply your new table style
+ to a specific table by placing the ".. class::" directive
+ immediately before the table, for example::
+
+ .. class:: rststyle-table-vegetabledata
+
+The default table style will be applied to all tables for which you
+do not specify a style with the ".. class::" directive.
+
+Customize the table properties in ``oowriter`` using the table
+properties dialog for the table (style) that you wish to customize.
+
+Note that "--table-border-thickness" command line option overrides
+the border thickness specified in the stylesheet.
+
+The specific properties that you can control with this second
+method are the following:
+
+- Border thickness and border color.
+
+- Background color -- When you change the background color of a
+ table to be used as a style (in ``styles.odt`` or whatever you
+ name it), make sure you change the background color for the
+ *table* and *not* for a cell in the table. ``odtwriter`` picks
+ the background color from the table, not from a cell within the
+ table.
Line block styles
@@ -1123,6 +1171,11 @@ pick up the default paper size on platforms where the program
.. _`Python Imaging Library`:
http://www.pythonware.com/products/pil/
+.. _`Open Document at Wikipedia`:
+ http://en.wikipedia.org/wiki/OpenDocument
+
+.. _`OASIS Open Document Format for Office Applications (OpenDocument) TC`:
+ http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office