From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao!not-for-mail From: Patrice Dumas Newsgroups: gmane.comp.tex.texinfo.general,gmane.emacs.devel Subject: Re: html manual +css Date: Wed, 15 Jan 2020 14:43:49 +0100 Message-ID: <20200115134349.GF1435@free.fr> References: <834lvyct3t.fsf@gnu.org> <01B655FC-51F0-4A33-ADBF-3E1268E9E0EA@gmail.com> <3D282E00-27F3-451A-9895-5BCEEE0B7FA8@gmail.com> <7D24D068-4BEF-4EC3-8C31-BED768533BEF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao:159.69.161.202"; logging-data="52030"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Texinfo Help , emacs-devel To: Jean-Christophe Helary Original-X-From: help-texinfo-bounces+gnu-help-texinfo2=m.gmane-mx.org@gnu.org Wed Jan 15 15:47:11 2020 Return-path: Envelope-to: gnu-help-texinfo2@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irixq-0003oZ-5m for gnu-help-texinfo2@m.gmane-mx.org; Wed, 15 Jan 2020 14:44:06 +0100 Original-Received: from localhost ([::1]:54344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irixo-0007Uz-Sc for gnu-help-texinfo2@m.gmane-mx.org; Wed, 15 Jan 2020 08:44:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59712) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irixk-0007Ta-J0 for help-texinfo@gnu.org; Wed, 15 Jan 2020 08:44:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irixj-0001lq-Dm for help-texinfo@gnu.org; Wed, 15 Jan 2020 08:44:00 -0500 Original-Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]:35892) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1irixh-0001j4-1U; Wed, 15 Jan 2020 08:43:57 -0500 Original-Received: from localhost (unknown [193.55.115.26]) (Authenticated sender: pertusus) by smtp5-g21.free.fr (Postfix) with ESMTPSA id 876F55FFA0; Wed, 15 Jan 2020 14:43:49 +0100 (CET) Mail-Followup-To: Patrice Dumas , Jean-Christophe Helary , Texinfo Help , emacs-devel Content-Disposition: inline In-Reply-To: <7D24D068-4BEF-4EC3-8C31-BED768533BEF@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:e0c:1:1599::14 X-BeenThere: help-texinfo@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the Texinfo documentation system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-texinfo-bounces+gnu-help-texinfo2=m.gmane-mx.org@gnu.org Original-Sender: "help-texinfo" Xref: news.gmane.io gmane.comp.tex.texinfo.general:2334 gmane.emacs.devel:244268 Archived-At: On Wed, Jan 15, 2020 at 09:12:15PM +0900, Jean-Christophe Helary wrote: > > > > The Guix developers managed to implement syntax highlighting by > > post-processing the HTML. > > (https://lists.gnu.org/archive/html/bug-texinfo/2019-11/msg00004.html) > > Wow, I just checked this page: > https://guix.gnu.org/manual/devel/en/html_node/Using-the-Configuration-System.html > > and the source if full of css "hooks" even for the parens in the code... > > What they do is interesting, and I guess some kind of postprocessing would be possible to achieve what I suggest, but instead of that, I'm guessing that just having texinfo add the css selectors would be easier. There are already hooks to customize the HTML produced, but it requires knowing perl and digging into the HTML customization API which is not documented anywhere. My wild guess is that it could be possible to generate the same output using this facility, maybe using something similar with how @math and @tex blocks are processed by outside commands in tp/init/latex2html.pm or tp/init/tex4ht.pm. I do not know if it is the best way, though, maybe it makes sense to use guile to highlight code in the guile manual. > Also, what's interesting with the current HTML export is that even though it is quite "old" in terms of standard (supposed to accept HTML 3.2 if I remember correctly ?) adding appropriate classes and IDs is just enough to access even bleeding edge CSS. Hence the idea of adding the appropriate "hooks" directly from texinfo. Currently the default is 4.01 Transitional. But there is a customization file to produce HTML 3.2 in tp/init/html32.pm. -- Pat