Re: background color experimentation...
David Goodger <[email protected]>
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <CABiJP=Lq8LGmXj0tMAZtDLt3UAnq=PoP9K-4+52ys2W_xFt9+A@mail.gmail.com> |
On Fri, Feb 10, 2017 at 6:53 AM, Paul Flint <[email protected]> wrote: > Greetings Earthlings (and anyone else :^), > > The nice documentation page indicated that I should write to this list when > I am using the "raw" command too much. I have needed it twice so here goes: > > 1. Easy one - make the background color of your choice: > > .. raw:: html > > <body style="background-color:#E6E6FA;"> You don't need to use the "raw" directive for this. This can be done easily via a stylesheet: http://docutils.sourceforge.net/docs/howto/html-stylesheets.html > 2. Less easy one - Postprocessing the html to get the image to open in a new > tab: This has been on the to-do list for a long time, but (a) it's not a high-frequency request (yours is the first I can recall), and (b) no obviously correct solution has been proposed. The to-do list has a proposal to emulate the MoinMoin wiki's use of "^" as a prefix for this purpose. If you want this for every image in all of some subset of your documents, you could create a custom Writer deriving from the HTML Writer you already use (or its Sphinx equivalent). > Note sphinx is a lot of fun... Maybe tell the Sphinx folks that? This is Docutils/reStructuredText, which Sphinx does use, but they aren't the same thing :-) David Goodger <http://python.net/~goodger> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot