Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1E19A1337C03 for ; Wed, 13 Apr 2011 15:36:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 33953-02-2 for ; Wed, 13 Apr 2011 18:36:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mail.postgresql.org (Postfix) with SMTP id 6D9BE1337C40 for ; Wed, 13 Apr 2011 15:34:52 -0300 (ADT) Received: (qmail invoked by alias); 13 Apr 2011 18:34:49 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp021) with SMTP; 13 Apr 2011 20:34:49 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX19dNRok/C1dhROzoNluYTXwjzeWDzEYKvj0l9PKpW XnqxBGsJYM6lbW Subject: Re: Proposal: syntax highlight in html manual From: Peter Eisentraut To: Daniele Varrazzo Cc: pgsql-docs@postgresql.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 13 Apr 2011 21:34:48 +0300 Message-ID: <1302719688.11858.2.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/72 X-Sequence-Number: 6643 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 > , > 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.