From owner-cvs-all Sun Jan 21 10: 6:59 2001 Delivered-To: cvs-all@freebsd.org Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66]) by hub.freebsd.org (Postfix) with ESMTP id 5FC2437B402; Sun, 21 Jan 2001 10:06:23 -0800 (PST) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.1/8.11.1) id f0LGq6G10686; Sun, 21 Jan 2001 16:52:06 GMT (envelope-from nik) Date: Sun, 21 Jan 2001 16:52:06 +0000 From: Nik Clayton To: Nik Clayton Cc: Alexander Langer , cvs-committers@freebsd.org, cvs-all@freebsd.org, doc@freebsd.org, nwalsh@nwalsh.com Subject: Flexible label customisation (was Re: cvs commit: ports/textproc/dsssl-docbook-modular Makefile ports/textproc/dsssl-docbook-modular/files patch-common_dbl1de.dsl) Message-ID: <20010121165205.A844@canyon.nothing-going-on.org> References: <200101190840.f0J8e7e87294@freefall.freebsd.org> <20010119105051.A47479@canyon.nothing-going-on.org> <20010119125752.A56295@cichlids.cichlids.com> <20010119155319.A48911@canyon.nothing-going-on.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010119155319.A48911@canyon.nothing-going-on.org>; from nik@freebsd.org on Fri, Jan 19, 2001 at 03:53:20PM +0000 Organization: FreeBSD Project Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 19, 2001 at 03:53:20PM +0000, Nik Clayton wrote: > I've cc'd Norm Walsh on this -- Norm, perhaps you could suggest a more > elegant approach to the problem? ] Still cc'd. I think I've got a more elegant approach to the problem. > 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? Fourth way: Alter all the gentext-* functions so that as well as checking the appropriate ---sep list, they check an additional list, local----sep list. Check the local-* list first, and use it's contents in preference. Attached is the patch to dbl1en.dsl that does this for title labelling. There are another 11 functions in that file that would need modifying in the same way. I've also attached a patch to our freebsd.dsl, showing how declarations in the customisation layer would need to change. Norm, comments? Could we get something like this in for 1.61? 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 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p1 --- dbl1en.dsl.org Sun Jan 21 16:32:05 2001 +++ dbl1en.dsl Sun Jan 21 16:41:43 2001 @@ -273,6 +273,9 @@ ;; abuse. ;; +(define (local-en-label-title-sep) + (list)) + (define (en-label-title-sep) (list (list (normalize "abstract") ": ") @@ -316,10 +319,13 @@ (define (gentext-en-label-title-sep gind) (let* ((giname (if (string? gind) gind (gi gind))) (name (normalize giname)) + (lsep (assoc name (local-en-label-title-sep))) (sep (assoc name (en-label-title-sep)))) - (if sep - (car (cdr sep)) - ""))) + (if lsep + (car (cdr lsep)) + (if sep + (car (cdr sep)) + "")))) (define (en-label-number-format-list) (list --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: freebsd.dsl =================================================================== RCS file: /home/ncvs/doc/share/sgml/freebsd.dsl,v retrieving revision 1.20 diff -u -r1.20 freebsd.dsl --- freebsd.dsl 2001/01/08 12:40:52 1.20 +++ freebsd.dsl 2001/01/21 16:43:09 @@ -283,8 +267,11 @@ (element (caution para) ($admonpara$)) (element (caution simpara) ($admonpara$)) - (define en-warning-label-title-sep ": ") - (define en-caution-label-title-sep ": ") + (define (local-en-label-title-sep) + (list + (list (normalize "warning") ": ") + (list (normalize "caution") ": ") + )) --x+6KMIRAuhnl3hBn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message