summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorgeorg.brandl <devnull@localhost>2008-05-03 18:14:13 +0000
committergeorg.brandl <devnull@localhost>2008-05-03 18:14:13 +0000
commitf20dd9ee70bdadffba729c925d4c7d99468fcda7 (patch)
tree7198600e8a69d87ffe1f2185ea9ca033fefd83c6 /doc
parentb238b492f976d42d762f16b85b712a8e97f08deb (diff)
downloadsphinx-f20dd9ee70bdadffba729c925d4c7d99468fcda7.tar.gz
* New LaTeX table handling.
* Support parts in LaTeX output.
Diffstat (limited to 'doc')
-rw-r--r--doc/conf.py2
-rw-r--r--doc/config.rst7
-rw-r--r--doc/ext/appapi.rst2
-rw-r--r--doc/markup/misc.rst37
4 files changed, 48 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py
index a39617d5..c3d21936 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -123,6 +123,8 @@ latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',
latex_logo = '_static/sphinx.png'
+#latex_use_parts = True
+
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
diff --git a/doc/config.rst b/doc/config.rst
index 243dcf3e..6f8ea62b 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -310,6 +310,13 @@ These options influence LaTeX output.
configuration directory) that is the logo of the docs. It is placed at the
top of the title page. Default: ``None``.
+.. confval:: latex_use_parts
+
+ If true, the topmost sectioning unit is parts, else it is chapters. Default:
+ ``False``.
+
+ .. versionadded:: 0.2.1
+
.. confval:: latex_appendices
Documents to append as an appendix to all manuals.
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst
index adf80fdc..a0eeeeb7 100644
--- a/doc/ext/appapi.rst
+++ b/doc/ext/appapi.rst
@@ -159,6 +159,8 @@ Sphinx core events
These events are known to the core:
+.. tabularcolumns:: |l|L|L|
+
====================== =================================== =========
Event name Emitted when Arguments
====================== =================================== =========
diff --git a/doc/markup/misc.rst b/doc/markup/misc.rst
index 8a0ba3db..62ee6b67 100644
--- a/doc/markup/misc.rst
+++ b/doc/markup/misc.rst
@@ -39,3 +39,40 @@ Meta-information markup
keep track of contributions), but you can set the configuration value
:confval:`show_authors` to True to make them produce a paragraph in the
output.
+
+
+Tables
+------
+
+Use standard reStructuredText tables. They work fine in HTML output, however
+there are some gotchas when using tables in LaTeX: the column width is hard to
+determine correctly automatically. For this reason, the following directive
+exists:
+
+.. directive:: .. tabularcolumns:: column spec
+
+ This directive gives a "column spec" for the next table occurring in the
+ source file. The spec is the second argument to the LaTeX ``tabulary``
+ package's environment (which Sphinx uses to translate tables). It can have
+ values like ::
+
+ |l|l|l|
+
+ which means three left-adjusted, nonbreaking columns. For columns with
+ longer text that should automatically be broken, use either the standard
+ ``p{width}`` construct, or tabulary's automatic specifiers:
+
+ +-----+------------------------------------------+
+ |``L``| ragged-left column with automatic width |
+ +-----+------------------------------------------+
+ |``R``| ragged-right column with automatic width |
+ +-----+------------------------------------------+
+ |``C``| centered column with automatic width |
+ +-----+------------------------------------------+
+ |``J``| justified column with automatic width |
+ +-----+------------------------------------------+
+
+ The automatic width is determined by rendering the content in the table, and
+ scaling them according to their share of the total width.
+
+ .. versionadded:: 0.2.1