From: David G. <go...@py...> - 2017-02-13 04:40:05
|
On Fri, Feb 10, 2017 at 6:53 AM, Paul Flint <fl...@fl...> 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> |