Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2FAEA1337B67 for ; Wed, 13 Apr 2011 16:20:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 06736-09 for ; Wed, 13 Apr 2011 19:20:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) by mail.postgresql.org (Postfix) with ESMTP id 3CBF51337BBB for ; Wed, 13 Apr 2011 16:20:27 -0300 (ADT) Received: by qyk7 with SMTP id 7so2916399qyk.19 for ; Wed, 13 Apr 2011 12:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tIe5QkQSl1gX4TrBOpVL2z7Slv15pOGui3RK4Nnn2qU=; b=f6xuXOHuY3sA1n9rnuDI7bpsCs/QmGrFzrduR9lv7CGt2RQj9n+zRBI1/e1sRlZLBk 6TGkg/eruWOXoW/ULfyOF8P2ZG7ndaLinxKLO4EH0RvsVp+rVBYvatgrO2Yotern3szd oiwNNBiJUfe+I1EcocU3UpeuwyVEuaZnHidSY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VNr88m5gAp5me//dW3o2V5ID79ZCyXl0WOaXZfd/BN7waClpcJvHIc8cXA3m86dTuv MBtKm1diT8rHpEHb54Hym9LHl/K8Xy2VNtMUHAShzpkFdCBqxSA1rw9/83ojesUt+/DT BtHiM7XmjKU3A7j4GGfH1wrBCsrA/A+w9FExY= MIME-Version: 1.0 Received: by 10.229.64.156 with SMTP id e28mr6402011qci.296.1302722423646; Wed, 13 Apr 2011 12:20:23 -0700 (PDT) Received: by 10.229.106.199 with HTTP; Wed, 13 Apr 2011 12:20:23 -0700 (PDT) In-Reply-To: <1302719688.11858.2.camel@vanquo.pezone.net> References: <1302719688.11858.2.camel@vanquo.pezone.net> Date: Wed, 13 Apr 2011 20:20:23 +0100 Message-ID: Subject: Re: Proposal: syntax highlight in html manual From: Daniele Varrazzo To: Peter Eisentraut Cc: pgsql-docs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201104/73 X-Sequence-Number: 6644 On Wed, Apr 13, 2011 at 7:34 PM, Peter Eisentraut 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 >> = , >> 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. =A0Then 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