From: Paul F. <fl...@fl...> - 2017-02-13 14:12:40
|
Greetings David Goodger, First, thanks for the response. Up here in the North Country one of our hobbies is staying under-the-radar, and thus we live in cold, dark, ignorance most of the time... In your kind response, you make some interesting points. I will respond below. On Sun, 12 Feb 2017, David Goodger wrote: > On Fri, Feb 10, 2017 at 6:53 AM, Paul Flint <fl...@fl...> wrote: >> >> 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 > Very cool. For openers, I did not know about rst2html.py - Thanks. BTW nice style in the python code! I could learn a thing or two from you. That said, my use case is that I have about 100 DVDs (Source Linux Format) that I am putting up on the web. Each DVD has a page that shows the original front and back cover. What I wanted was that each of these pages display in a color of the season. My idea was to put together these DVD "base pages" using a bash script (I am a registered bashist. See http://visualbash.org :^) and cycling through some seasonally appropriate pastel colors to help the user differentiate between the various DVDs. The ".. raw" directive was wildly successful in allowing this page-by-page transition. Could I advantage myself with the css approach? This experience has led me to the very disturbing conclusion that you could (and maybe should) write all web pages in reStructuredText. Should I seek professional help? >> 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. > Interesting bit of extended notation. I need to think if this would work... > 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). > My fix for this was to go directly to the resultant html and patch it there: <start code> sphinx-build -b html ./ test ; sed -i 's/><img/ target="_blank" ><img/g' test/index.html <end code> (Note what we bashists lack in finesse we make up with gusto... :^) Obviously the "MoinMoin" notation would go a step towards a standard wiki markup language, and why not extend ourselves into this maelstrom? >> 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 :-) > Gotcha. The most fun was getting the reStructuredText editor "enki" to run under Ubuntu 16.04. I need to figure out how to communicate my zaniness to the Sphinx community... > David Goodger > <http://python.net/~goodger> > Finally thanks for the Venn diagram, and I expect we should get together in Portland to rub antennae... Are you up in Montreal? I love that city! Kindest Regards, ☮ Paul Flint (802) 479-2360 Home (802) 595-9365 Cell /************************************ Based upon email reliability concerns, please send an acknowledgement in response to this note. Paul Flint 17 Averill Street Barre, VT 05641 |