As I finish up the work on the Viewrendered3 plugin, I'd appreciate some 
advice on a few points.  One thing I'd like to know is whether it is 
considered acceptable to place a css style sheet in the plugins directory.  
I know that some plugins do put a UI definition file there.

Here's the context for my question.  It's about being able to locate the 
ReStructured Text (RsT) stylesheet.  My goal is to have the plugin work out 
of the box without the user having to know or care about any stylesheet. 
For MD, it's possible to get the MD processor to emit its spreadsheet.  I 
have a few tweeks I give it to improve the appearance for literal and code 
blocks.  On startup, if no spreadsheet is specified, and the default one is 
not found, the plugin creates one and stores it in a specified location. 
This way, the user doesn't have to fuss with the stylesheet at all unless 
he wants to.

For RsT (i.e., docutils), though, this tactic isn't available.  The plugin 
can find the default docutils stylesheet, but it has to be modified to 
support colorizing and my mods for the literal and code blocks.  The usual 
way to have a stylesheet with the changes, and have it point to the 
docutils one.  But that means that I have to write the whole thing such 
that it includes the pointer to the docutils stylesheet.  I'd rather not 
clutter the code with a large block of static text that would hardly ever 
be used except once or twice to create the stylesheet.

I could just copy the docutils stylesheet and the extensions into a single 
stylesheet.  Docutils doesn't recommend this in case they should change the 
default one.   In any event, if I go that route, the only place it could 
reasonably go would be in the plugins directory.  Otherwise the user would 
have to get the file from somewhere, and put it into the right location, 
which would be different for Windows and Linux.  That's undesirable, and 
asking for trouble.

So that's my question - is it OK to put the default RsT stylesheet into the 
plugins directory?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/e4f3f65d-244c-4dd6-a423-f712103adf6f%40googlegroups.com.

Reply via email to