public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniele Varrazzo <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: [email protected]
Subject: Re: Proposal: syntax highlight in html manual
Date: Wed, 13 Apr 2011 20:20:23 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Wed, Apr 13, 2011 at 7:34 PM, Peter Eisentraut <[email protected]> wrote:
> On ons, 2011-04-13 at 11:31 +0100, Daniele Varrazzo wrote:
>> If there is, I think the rendering should be performed as a
>> post-processing step on the html output and should be a totally
>> optional phase: we may do it for the website but have the docs
>> generation not to fail if the tools (python, pygments) are missing.
>> There would be the need to tag every snippet in the docs with the
>> correct language: I think the correct way is to use the "role"
>> attribute in the docbook tags generating the snippets (screen,
>> programlisting, synopsis...): its value can be propagated to the html
>> (e.g. as a css class) using a suitable docbook configuration (see
>> <http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#CustomClassValues;,
>> albeit a test I've done in that direction failed - but I'm completely
>> clueless about debugging the docbooc tool chain).
>
> I guess the verdict is that we shouldn't do it by default, but what we
> could do anyway is language tag the code as you describe.  Then users
> could either hook in client-side Javascript to do the highlighting or
> whoever wants to can produce an alternative colorful pygments-based
> version.

Fine for me, the motivation for not wanting highlight in the official
docs are pretty solid. If you fancy implementing the role to class
propagation I may complete the tagging and provide patches for the
sgml, but I expect it to be pretty much everything.

Regards,

-- Daniele




view thread (7+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Proposal: syntax highlight in html manual
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox