From owner-freebsd-doc Fri Jan 19 7:54:11 2001 Delivered-To: freebsd-doc@freebsd.org Received: from nothing-going-on.demon.co.uk (unknown [194.128.198.234]) by hub.freebsd.org (Postfix) with ESMTP id 38F7F37B69D; Fri, 19 Jan 2001 07:53:46 -0800 (PST) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.1/8.11.1) id f0JFrL349347; Fri, 19 Jan 2001 15:53:21 GMT (envelope-from nik) Date: Fri, 19 Jan 2001 15:53:20 +0000 From: Nik Clayton To: Alexander Langer Cc: Nik Clayton , cvs-committers@freebsd.org, cvs-all@freebsd.org, doc@freebsd.org, nwalsh@nwalsh.com Subject: Re: cvs commit: ports/textproc/dsssl-docbook-modular Makefile ports/textproc/dsssl-docbook-modular/files patch-common_dbl1de.dsl Message-ID: <20010119155319.A48911@canyon.nothing-going-on.org> References: <200101190840.f0J8e7e87294@freefall.freebsd.org> <20010119105051.A47479@canyon.nothing-going-on.org> <20010119125752.A56295@cichlids.cichlids.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010119125752.A56295@cichlids.cichlids.com>; from alex@freebsd.org on Fri, Jan 19, 2001 at 12:57:52PM +0100 Organization: FreeBSD Project Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I've cc'd Norm Walsh on this -- Norm, perhaps you could suggest a more elegant approach to the problem? ] On Fri, Jan 19, 2001 at 12:57:52PM +0100, Alexander Langer wrote: > Thus spake Nik Clayton (nik@freebsd.org): > > > This is actually broken in our customisation layer in the most recent > > versions of the base stylesheets. Norm re-worked how he did things, > > which is why the Handbook says things like "WarningDon't do this" > > instead of "Warning: Don't do this.". > > Fixing it is on my list of things to do, unless someone beats me to it. > > Oh - wait... > Do you mean this has to be fixed somewhere in *our* doc/ tree? Sort of. In an earlier version of Norm's stylesheets, he had a function called $admonition$ that was used by , , and . The $admonition$ function used variables like en-note-label-title-sep to work out what to put between text like "Note" and the title. So Norm's stylesheets had things like (define en-note-label-title-sep ": ") in them, which is how A test note became Note: A test note and were handled differently. They had their own function to draw a box around them (or put them in a table), and do sundry other bits and pieces. In particular, this style of presentation meant that the "Warning" and "Caution" label was placed on a separate line, so there was no need for ':' to separate the two pieces of text. However, for (I guess) completeness, Norm's sheets still defined the equivalent en-warning-label-title-sep variable (and it's equivalent). I changed this in our customisation, so that and used the same $admonition$ function, and redefined the en-warning-label-title-sep and en-caution-label-title-sep variables appropriately. All was well. Then Norm changed how he did things. Instead of using a bunch of variables, one per (language x element) pair, he created this function called gentext-label-title-sep (and others in the same style). I suspect this probably makes the DSSSL processing faster, or something. The problem with this, from our point of view, is that it's no longer possible to override a single entry in our customisation. Instead, to fix and , I have to duplicate all of the code from dbl1en.dsl that defines the en-label-title-sep hash[1] *or* rewrite the gentext-en-label-title-sep function so that it special cases and before it looks in the en-label-title-sep hash. Neither of which are particularly clean, so I've sort of ignored the problem, in the hope that I dream up a better way. The alternative is to do what you've done, which is patch the stylesheets as they're installed. That's not really the perfect approach either, as anyone that tries to formation documentation on FreeBSD that doesn't use our customisation layer will now find that they get a spurious ': ' inserted when they use or . Anyway, that's the problem, and we have at least three solutions, none of which are (IMHO) optimal. Any suggestions for a fourth way? N -- Internet connection, $19.95 a month. Computer, $799.95. Modem, $149.95. Telephone line, $24.95 a month. Software, free. USENET transmission, hundreds if not thousands of dollars. Thinking before posting, priceless. Somethings in life you can't buy. For everything else, there's MasterCard. -- Graham Reed, in the Scary Devil Monastery To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message