3 ===============================================
4 HTML writer for lightweight browsers
5 ===============================================
7 :Author: Guenter Milde <milde@users.BerliOS.de>
15 The HTML Writer module, `docutils.writers.html4css1` produces XHTML
16 compatible with the XHTML 1.0 specification. Correct rendering of the HTML
17 produced depends on the CSS support of the browser. Browsers without full
18 CSS support (lightweight browsers, older browsers, text-only browsers, help
19 viewers) produce inferior results.
21 CSS is the state-of-the art technology for styling of html output and
22 provides many advantages.
23 However, correct rendering of HTML+CSS requires considerable resources in
24 form of program code, memory space and computation time.
26 On older machines or in embedded devices this might pose a serious problem.
27 Another example is a HTML help viewer of a program. It should start up fast
28 ("immediately") and not take too much resources.
30 Editing and generating documentation with reStructuredText is possible with
31 modest requirements on computer power. Viewing the result should be as well.
36 A separate HTML-transitional writer producing non-CSS based HTML.
38 The `html4trans`_ writer module subclasses the `html4css1.HTMLTranslator`
39 and modifies it to remove the dependency on CSS browser support.
41 The output conforms to the XHTML version 1.0 Transitional DTD and contains
42 enough formatting information to be viewed without a cascading style sheet by
43 a lightweight html browser (e.g. Dillo_ or the console browser elinks_).
48 Doing without CSS styling comes at a cost.
50 * The clear distinction of content and layout is lost. The HTML output
51 contains a fair amount of "hard-coded" visual markup.
52 * CSS style sheets can still be used but cannot override the non-CSS layout
53 code. It is no longer possible to e.g. modify the colour of a warning text
56 * Some more advanced features of CSS layout are hard or impossible to
57 achieve with pure HTML code. Less important features, not implemented in
58 this version of the "html4trans" writer are:
60 * Arabic, roman and alpha list markers for enumerated lists.
62 * Grey background for inline literal and literal blocks.
64 * Leading indentation in line-block objects.
66 * ``:Dedication:`` and ``:abstract:`` bibliographic fields.
68 * Topics, Sidebars, and Rubrics.
70 * Custom Roles with class attributes
76 * `<html4trans.py>`_ Simple Hypertext Markup Language document tree Writer.
78 * `rst2html_trans.py`_
79 Front end to the Docutils Publisher, producing HTML not requiring
82 * `<docs>`_ Documentation
84 * `<tools>`_ Front-end and debugging scripts
86 * `<data>`_ sample documents
92 Place `rst2html_trans.py`_ in the binary PATH and `html4trans.py`_ in the
93 PYTHONPATH or in the working directory
94 (from where you start ``rst2html_trans.py``).
99 Similar to the standard ``rst2html`` front end::
101 rst2html_trans.py [options] [<source> [<destination>]]
103 The full usage_ text can be obtained with the ``--help`` option.
109 is a comparable project by Bill Bumgarner. It is more specific
110 in its approach, however, producing non-CSS based HTML that is compliant
111 with the O'Reilly DevCenter's article submission guidelines.
113 * `Inside A Docutils Command-Line Front-End Tool`_
114 How to roll your own Docutils front end. (Also see the other
115 `API Reference Material for Client-Developers`_.)
121 .. _html4trans.py: html4trans.py
122 .. _rst2html_trans.py: tools/rst2html_trans.py
123 .. _usage: docs/usage.html
125 .. _dillo: http://www.dillo.org
126 .. _elinks: http://elinks.cz
127 .. _DocArticle: ../bbum/DocArticle
128 .. _Inside A Docutils Command-Line Front-End Tool:
129 http://docutils.sourceforge.net/docs/api/cmdline-tool.html
130 .. _API Reference Material for Client-Developers:
131 http://docutils.sourceforge.net/docs/index.html#api-api-reference-material-for-client-developers