diff options
| -rw-r--r-- | docutils/FAQ.txt | 1 | ||||
| -rw-r--r-- | docutils/docs/dev/distributing.txt | 43 | ||||
| -rw-r--r-- | docutils/docs/dev/hacking.txt | 4 | ||||
| -rw-r--r-- | docutils/docs/dev/testing.txt | 2 | ||||
| -rw-r--r-- | docutils/docutils/writers/html4css1.py | 4 | ||||
| -rw-r--r-- | docutils/test/DocutilsTestSupport.py | 4 |
6 files changed, 15 insertions, 43 deletions
diff --git a/docutils/FAQ.txt b/docutils/FAQ.txt index 37b955a3e..8e5925036 100644 --- a/docutils/FAQ.txt +++ b/docutils/FAQ.txt @@ -764,7 +764,6 @@ Here's the question in full: <head> ... <title>Heading 1</title> - <link rel="stylesheet" href="default.css" type="text/css" /> </head> <body> <div class="document" id="heading-1"> diff --git a/docutils/docs/dev/distributing.txt b/docutils/docs/dev/distributing.txt index c1cfc3603..e4495512c 100644 --- a/docutils/docs/dev/distributing.txt +++ b/docutils/docs/dev/distributing.txt @@ -87,7 +87,9 @@ The documentation should be generated using ``buildhtml.py``. To generate HTML for all documentation files, go to the ``tools/`` directory and run:: - ./buildhtml.py .. + # Place html4css1.css in base directory. + cp ../docutils/writers/support/html4css1.css .. + ./buildhtml.py --stylesheet-path=../html4css1.css .. Then install the following files to ``/usr/share/doc/docutils/`` (or wherever you install documentation): @@ -102,15 +104,7 @@ wherever you install documentation): * The ``licenses/`` directory. -* ``tools/stylesheets/default.css``, creating the ``tools/`` and - ``tools/stylesheets/`` directory beforehand. This file is needed - for correct viewing of the HTML files. The remaining contents of - the ``tools/`` and ``tools/stylesheets/`` directories are not - needed. - - Be sure not to install ``default.css`` into the root of the - documentation directory, or the relative references to the - stylesheet will not work. +* ``html4css1.css`` in the base directory. Removing the ``.txt`` Files @@ -126,40 +120,23 @@ the tree except for: be readable in source form. Before you remove the ``.txt`` files you should rerun ``buildhtml.py`` -as ``./buildhtml.py .. --no-source-link`` to avoid broken references -to the source files. +with the ``--no-source-link`` switch to avoid broken references to the +source files. Other Files =========== -Install ``tools/stylesheets/`` to ``/usr/lib/docutils/stylesheets/`` -and ``tools/pep-html-template`` to -``/usr/lib/docutils/pep-html-template``. - -You may also want to install the Emacs-Lisp files +You may want to install the Emacs-Lisp files ``tools/editors/emacs/*.el`` into the appropriate directory. Configuration File ================== -The system-wide configuration file is located in -``/etc/docutils.conf``. You should *not* install -``tools/docutils.conf`` into ``/etc/``. Instead, we recommend that -you create a new ``/etc/docutils.conf`` file containing references to -the appropriate files on your system:: - - [html4css1 writer] - # These entries affect HTML output: - stylesheet-path: /usr/lib/docutils/stylesheets/default.css - - [pep_html writer] - # These entries affect reStructuredText-style PEPs: - template: /usr/lib/docutils/pep-html-template - stylesheet-path: /usr/lib/docutils/stylesheets/pep.css - -(Adjust the paths as necessary.) +It is possible to have a system-wide configuration file at +``/etc/docutils.conf``. However, this is usually not necessary. You +should *not* install ``tools/docutils.conf`` into ``/etc/``. Tests diff --git a/docutils/docs/dev/hacking.txt b/docutils/docs/dev/hacking.txt index ab0c85259..dcbc80943 100644 --- a/docutils/docs/dev/hacking.txt +++ b/docutils/docs/dev/hacking.txt @@ -158,7 +158,7 @@ HTML writer in this case (``docutils/writers/html4css1.py``). The writer receives the node tree and returns the output document. For HTML output, we can test this using the ``rst2html.py`` tool:: - $ rst2html.py test.txt + $ rst2html.py --link-stylesheet test.txt <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> @@ -166,7 +166,7 @@ For HTML output, we can test this using the ``rst2html.py`` tool:: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" /> <title></title> - <link rel="stylesheet" href="default.css" type="text/css" /> + <link rel="stylesheet" href="../docutils/writers/support/html4css1.css" type="text/css" /> </head> <body> <div class="document"> diff --git a/docutils/docs/dev/testing.txt b/docutils/docs/dev/testing.txt index 681cb7ae9..fc6feae2b 100644 --- a/docutils/docs/dev/testing.txt +++ b/docutils/docs/dev/testing.txt @@ -134,7 +134,7 @@ For example, ``functional/tests/some_test.py`` could read like this:: writer_name = "html" settings_overrides['output-encoding'] = 'utf-8' # Relative to main ``test/`` directory. - settings_overrides['stylesheet_path'] = '../tools/stylesheets/default.css' + settings_overrides['stylesheet_path'] = '../docutils/writers/support/html4css1.css' The two variables ``test_source`` and ``test_destination`` contain the input file name (relative to ``functional/input/``) and the output diff --git a/docutils/docutils/writers/html4css1.py b/docutils/docutils/writers/html4css1.py index 14d0424da..d11e88c48 100644 --- a/docutils/docutils/writers/html4css1.py +++ b/docutils/docutils/writers/html4css1.py @@ -9,8 +9,8 @@ Simple HyperText Markup Language document tree Writer. The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The output contains a minimum of formatting -information. A cascading style sheet ("default.css" by default) is -required for proper viewing with a modern graphical browser. +information. The cascading style sheet "html4css1.css" is required +for proper viewing with a modern graphical browser. """ __docformat__ = 'reStructuredText' diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py index ea1672d1b..6947c4478 100644 --- a/docutils/test/DocutilsTestSupport.py +++ b/docutils/test/DocutilsTestSupport.py @@ -767,8 +767,6 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase): standard_content_type_template + standard_generator_template % docutils.__version__) standard_meta_value = standard_html_meta_value % 'utf-8' - standard_stylesheet_value = ('<link rel="stylesheet" href="default.css" ' - 'type="text/css" />\n') standard_html_prolog = """\ <?xml version="1.0" encoding="%s" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -782,8 +780,6 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase): del parts['body'] # remove standard portions: parts['meta'] = parts['meta'].replace(self.standard_meta_value, '') - if parts['stylesheet'] == self.standard_stylesheet_value: - del parts['stylesheet'] parts['html_head'] = parts['html_head'].replace( self.standard_html_meta_value, '...') parts['html_prolog'] = parts['html_prolog'].replace( |
