Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Jun 2009 09:53:19 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n5B7rJqk024813 for ; Thu, 11 Jun 2009 09:53:19 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n5B7n48B011571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Jun 2009 09:49:05 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n5AM1omD012985; Thu, 11 Jun 2009 09:48:58 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 285463 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 11 Jun 2009 09:48:58 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n5B7mwUp025469 for ; Thu, 11 Jun 2009 09:48:58 +0200 Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.249]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n5B7mr8h031213 for ; Thu, 11 Jun 2009 09:48:57 +0200 Received: by rv-out-0708.google.com with SMTP id b17so333889rvf.10 for ; Thu, 11 Jun 2009 00:48:52 -0700 (PDT) Received: by 10.141.82.20 with SMTP id j20mr1675386rvl.138.1244706532782; Thu, 11 Jun 2009 00:48:52 -0700 (PDT) Received: from ?129.127.15.244? ([129.127.15.244]) by mx.google.com with ESMTPS id c20sm22549279rvf.40.2009.06.11.00.48.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 00:48:51 -0700 (PDT) Content-Type: multipart/signed; boundary=Apple-Mail-1-111354684; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v935.3) References: <4A2F5FE3.3030205@morningstar2.co.uk> <4A300B9E.4000608@morningstar2.co.uk> X-Mailer: Apple Mail (2.935.3) X-Spam-Whitelist: Message-ID: <8C8871A5-B9AF-4EF4-8AAA-F282C1D206A0@gmail.com> Date: Thu, 11 Jun 2009 17:18:46 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: Key-value input To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A300B9E.4000608@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 11 Jun 2009 07:53:19.0898 (UTC) FILETIME=[AFD187A0:01C9EA69] Status: R X-Status: X-Keywords: X-UID: 5792 --Apple-Mail-1-111354684 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi all, Some rambling general comments below. On 11/06/2009, at 5:08 AM, Joseph Wright wrote: > The spaces really should not be an issue: it > is all building things from csname. I've even toyed with the idea, when dealing with keyval input in fontspec, (never happened though) of normalising all keyval input by stripping spaces and hyphens, and lowercasing the result. So the following would all be equivalent: number case= NumberCase= Number-case= and so on. Not actually sure if that would be a good idea (one person commented something like "why reward the user for incorrect input?"). Easier for the user, however, who must deal with multiple packages in which one has CamelCaseKeys, another "keys with spaces", another with keysruntogether. * * * Regarding keys3 vs template, I'm still firmly on the fence. I think I need to implement something reasonably complex from scratch and see how both fare. One thing that template seems to do nicely is inheritance; what would be the equivalent process in keys3? To the advantage of keys3, I agree that being able to change the default value of a key independently is very desirable. Another feature that template doesn't support as easily is the idea of an explicit set of named options such as keys3's .create_choices:nn and xkeyval's \define@choicekey. * * * I'd like to explore the idea of auto-detecting the variable type (by stripping off and examining the trailing "_xyz" of the variable) to determine which _set function should be used; this could simplify many of the common use cases for both packages. Since it would only need to be done when first setting up the key, the performance hit should be completely reasonable. After all, what's the point of having some nicely rigid naming schemes if we never take advantage of them? :) But even better is that this scheme could allow assignments to other types of variables (such as clists) without any extra work. E.g., \keys_manage:nn {module/caption/} { above-skip/.set:N = \l_caption_above_skip , above-skip/.default:n = 5mm , caption-name/.set:N = \l_caption_name_tl , caption-name/.default:n = {Figure} } or \DeclareTemplate{module}{caption}{4}{ above-skip = n [5mm] \l_caption_above_skip , caption-name = n [Figure] \l_caption_name_tl }{...} * * * Anyway, what I've said above doesn't really help the discussion much but it might spark a couple of new ideas. Will --Apple-Mail-1-111354684 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGITCCAtow ggJDoAMCAQICECN4qE5kBXLk2f/jVDfSZPwwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA5MDEyOTA1NDkxNVoXDTEwMDEyOTA1NDkx NVowQjEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEfMB0GCSqGSIb3DQEJARYQd3Nw cjgxQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0BeSiAbKuqxeRN p2qn/m8ZL+xawr/WXyPgEF0FipWgRe9l3sMXcFHokcUu0xOc97R7xkUsGcQ8EyybGHuWey6x7X1Y xJZXnoAxqcaG+eREytoYGMIKs6B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