From: David G. <go...@py...> - 2005-08-23 23:10:59
|
> David Goodger wrote: >> I'm getting confused though. Can you spell out the logic for when >> the lack-of-stylesheet warning should be generated? [Felix Wiemann] > When using the rst2html.py front-end tool. OK, that's simple and makes sense. >> The base setting is defined in docutils.frontend, but only used by >> the HTML writer; I'm thinking that the definition ought to be >> moved. > > +1. > > Patch below. Please review. +1, with the following trivial changes: > Index: HISTORY.txt > =================================================================== > --- HISTORY.txt (revision 3824) > +++ HISTORY.txt (working copy) ... > @@ -98,6 +94,8 @@ > - Made ``--embed-stylesheet`` the default rather than > ``--link-stylesheet``. > - Added writer-specific transform to check the stylesheet setting. > + - Added ``_stylesheet_required`` internal setting, defaulting to 0 "." Drop this part: > + unless the rst2html.py front-end tool is used. Add this change comment for tools/rst2html.py: - Made stylesheet requirement explicit (via ``_stylesheet_required`` setting). > Index: docs/user/config.txt > =================================================================== > --- docs/user/config.txt (revision 3824) > +++ docs/user/config.txt (working copy) > @@ -651,6 +651,14 @@ > > __ `stylesheet_path [latex2e writer]`_ > > +_`_stylesheet_required` > + Warn if valid stylesheet settings are absent. For programmatic > + use only. > + > + Default: not required (0), except when using the ``rst2html.py`` > + front-end tool. No command-line options; pass ``--stylesheet=`` "(i.e., with no argument)" > + to disable the stylesheet explicitly. > (Hmm; patches are a lot easier than branches, For small changesets, yes. -- David Goodger <http://python.net/~goodger> |