1 .. include:: data/standard.txt
2 .. include:: data/header_footer.txt
3 .. include:: data/table_colspan.txt
4 .. include:: data/table_rowspan.txt
5 .. include:: data/table_complex.txt
6 .. include:: data/list_table.txt
7 .. include:: data/custom_roles.txt
8 .. include:: data/svg_images.txt
9 .. include:: data/swf_images.txt
11 Changes to the html4css1 writer
12 ===============================
14 * Use only meta keywords recognized by HTML 5.
16 * Set table column widths with <style="width: ...">, not "width" argument.
18 * Horizontal alignment of table heads with CSS.
20 * Field lists as styled definition lists.
22 * Do not drop paragraph objects, use CSS rules to prevent unwanted vertical
25 * Put subtitles in <p> elements.
30 The following list demonstrates the problems with the html4css1
31 approach: the `field-name-limit` setting is given in "number of
32 characters" but the field name uses a proportional font.
34 :The field name: is typeset on the same line, unless it is "long".
36 :this field name: is considered "long" in the html table rendering by
37 the html4css1 writer with the default setting of
38 ``--field-name-limit=14``.
40 :iiiiiiiiiiiiiii: a field name that is considered "long" by html4css1
41 with the default setting of `field-name-limit: 14`.
43 :MMMMMMMMMMMMMM: a field name that is actually longer than the
44 previous one but regarded "short" by html4css1.
46 With ``html_plain``, a `field list` is typeset as CSS-styled `definition
47 list`. The default layout is similar to the look with `html4css1`:
51 :A long field name: sticks into the field body.
53 The field body is pushed to the next line (you can suppress
54 this behaviour with the `run-in`_ class argument).
56 :Customization: of the field name width is possible with CSS instead
57 of the `field-name-limit` configuration setting, for
60 dl.field-list > dd { margin-left: 6em; }
64 :fields: must not lead to misalignment of the following content.
66 Styling with class arguments
67 ----------------------------
69 The ``plain.css`` style sheet comes with some pre-defined style variants
70 that can be choosen via a class argument.
75 Definition lists with the "description" class argument:
77 .. class:: description
80 Definition lists that are styled like in most dictionaries,
81 encyclopedias etc. (as well as the LaTeX `description` environment).
83 The term to be described. Put in boldface.
85 Starts on the same line and has a hanging indent.
90 For field lists, the "compact/open", "narrow" and "run-in" styles are defined.
95 :Feature: No additional space between list items.
97 :Option: The ``--compact-field-lists`` command line option (and the
98 corresponding configuration setting) set the `compact`
99 class argument on all "simple" field lists, if not
100 overridden with `open`.
102 :Use: For lists with short field body.
107 :Feature: Additional space between list items also in "simple" lists.
108 (Overrides the ``--compact-field-lists`` command line
109 option and the corresponding configuration setting)
111 :Use: For "simple" lists that should keep the space between list items.
116 :Feature: Less indented field body.
117 :Use: For lists with short field names.
119 sticks into the field body and the field body starts on a
120 new line (if not combined with `run-in`_).
127 :Feature: Field body starts on the same line also after long field
130 :A long field name: sticks into the field body which continues on
133 :The next field name: and field body should align. Long text in the field
134 body is wrapped and aligns with other fields.
139 The following styles can be applied to individual tables via a class
140 argument or as document wide setting with the table-style_ configuration
141 setting (or command line argument).
143 * Numbered tables can be achieved with the "numbered" class option:
145 .. table:: truth values
148 ======= ======= ==========
150 ======= ======= ==========
155 ======= ======= ==========
157 Currently, referencing to the table by number is not supported. This is a
158 common request and already on the `TODO list`.
160 * With the "widths" argument "auto" (or "class" value "colwidths-auto"),
161 column widths are determined by the browser.
166 ======= ======= ==========
168 ======= ======= ==========
173 ======= ======= ==========
175 * A table with "booktabs" class value, is rendered similar to the style
176 from the booktabs_ LaTeX package.
179 http://docutils.sourceforge.net/docs/user/config.html#table-style
181 http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf
183 "Booktabs" style table, numbered, centre-aligned, with auto-sized columns:
185 .. table:: I/O values
186 :class: booktabs numbered
190 ======= ======= ==========
192 --------------- ----------
194 ======= ======= ==========
199 ======= ======= ==========
202 .. include:: data/errors.txt
204 .. footer:: |HTML 5| |validator| |valid-CSS2|
206 .. |HTML 5| image:: http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png
209 :alt: Conforms to HTML 5
210 :target: http://www.w3.org/TR/html5/
212 .. |validator| image:: https://validator-suite.w3.org/icons/vs-blue-256.png
215 :alt: Check validity!
216 :target: http://validator.w3.org/check?uri=referer
218 .. |valid-CSS2| image:: http://jigsaw.w3.org/css-validator/images/vcss
222 :target: http://jigsaw.w3.org/css-validator/check/referer