X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["5069" "Sun" "13" "February" "1994" "12:50:27" "+0100" "Frank Mittelbach" "MITTELBACH@mzdmza.zdv.uni-mainz.de" "<199402131154.AA28480@mail.cs.tu-berlin.de>" "140" "On named arguments for LaTeX3" "^Date:" nil nil "2" "1994021311:50:27" "On named arguments for LaTeX3" nil nil]) Return-Path: Received: from sc.ZIB-Berlin.DE (mailserv) by dagobert.ZIB-Berlin.DE (4.1/SMI-4.0/24.6.93) id AA24030; Sun, 13 Feb 94 12:55:03 +0100 Received: from mail.cs.tu-berlin.de by sc.ZIB-Berlin.DE (4.1/SMI-4.0-sc/03.06.93) id AA15422; Sun, 13 Feb 94 12:54:50 +0100 Received: from tubvm.cs.tu-berlin.de by mail.cs.tu-berlin.de with SMTP id AA28480 (5.65c8/IDA-1.4.4(mail.m4[1.12]) for <@MAIL.CS.TU-BERLIN.DE:Schoepf@SC.ZIB-BERLIN.DE>); Sun, 13 Feb 1994 12:54:47 +0100 Message-Id: <199402131154.AA28480@mail.cs.tu-berlin.de> Received: from TUBVM.CS.TU-BERLIN.DE by tubvm.cs.tu-berlin.de (IBM VM SMTP V2R2) with BSMTP id 6533; Sun, 13 Feb 94 12:54:30 +0200 Received: from VM.URZ.UNI-HEIDELBERG.DE (NJE origin MAILER@DHDURZ1) by TUBVM.CS.TU-BERLIN.DE (LMail V1.2a/1.8a) with BSMTP id 6532; Sun, 13 Feb 1994 12:54:30 +0200 Received: from VM.URZ.UNI-HEIDELBERG.DE (NJE origin LISTSERV@DHDURZ1) by VM.URZ.UNI-HEIDELBERG.DE (LMail V1.2a/1.8a) with BSMTP id 7305; Sun, 13 Feb 1994 12:53:44 +0000 Reply-To: Mailing list for the LaTeX3 project Date: Sun, 13 Feb 1994 12:50:27 +0100 From: Frank Mittelbach Sender: Mailing list for the LaTeX3 project To: Multiple recipients of list LATEX-L Subject: On named arguments for LaTeX3 Status: R X-Status: X-Keywords: X-UID: 1552 Subj: RE: On compatibility in LaTeX2e [was: Re: keyed options lis Frank > What I have been missing in some notes is the distinction between > compatiblity for style designers and maintainers, and compatibility for > users. > It seems we'll have to accept quite some changes in the way styles > (packages/options/classes...) can "hook into" the LaTeX code. That may > be a point of concern in itself, but compatibility towards the users > seems more important to me. exscuse me, but please understand that it can get tiresome to repeat old arguments over and over again. You are quite right, it is an important goal for ltx3 to produce a highly compatible user-syntax interface one way or the other. We have had this discussion several times and there are many "official" statements to this effect. However this does not need to (I said need!!!!) to mean that that we have to built on the old syntax and extend it in one way or the other. As somebody pointed out this might also be done by suitable conversion tools (you can write them even is a beastly language like tex to have something really portable). This is a scenario, whether or not it will be the scenario to choose depends on the final decision what syntax is best. > In the coming years users will be forced (eg by local style designers > who want to use possibilities of LaTeX2e) to switch to \documentclass > syntax and other "new" commands. If LaTeX3 would force them to yet > another command that would give LaTeX (and possibly TeX) a "bad name". Beside the grumbling of a certain person or two on this list, most people so far have welcomed our decision, especially after thinking it through. Leaving the added functionality out of discussion for the moment, the decision to use a unique new command is the only safe way be able to to produce a compatibility mode that is really working. The clever case statement provided by Dr. Piff does get to the point because the compatibility mode is supposed to be able to process user documents and there is no way using \ifx on defined commands to tell whether a user document was written for 209 or 2e if you don't have a unique starting point. As for forcing the upcoming users to use \documentclass/\usepackage instead of \documentstyle, I doubt that this will give LaTeX or TeX a bad name. On the contrary, the current beta test of 2e so far has shown that we have successfully managed to do something which you seldom find: to get several incompatible versions back under one roof, with nearly absolute upward compatibility (and the compatibility mode is getting better, even if a certain person again is thinking that this is a waste of time spend). But let me come to the topic of the mail: one of the goals for latex3 (also more than once stated) is an attribute oriented syntax. Now you have many possibilities doing this upward or non upward compatible. My favorate one is something like the following: Suppose you have a function foo with named arguments key1 key2 key3 and perhaps required ones req1 You can define a default order on the optional args being key1 key2 ... Then you can have the following syntax: \foo [val1] [val2] {req1} % names derived from order % val3 is default or \foo [key3 = val3] [key1 = val1] {req1} % val2 is default one would need to define what to do with mixed batches, eg \foo [val1] [key3 = val3] {req1} or even worse \foo [val1] [key3 = val3] [val?] {req1} there are many possibilities. one could disallow them or only allow them up front. Or one could simply disallow them. As long as such a rule is simple it would be okay. The "=" is not really meant to be part of the syntax one could go for much stronger typed versions, eg [/key/ = val ] What i was trying to point out is that you can even make good use of the old syntax in such a new scheme by interpreting it as short forms of named arguments defined by order. In some other mail you remarked > How is LaTeXxyz to know that this isn't a user who wants to use the old > syntax to get the text "toc={=--?12gobblegobblegook}" in his t-o-c? > My point is that, if possible, the syntax \section[short]{long} should > remain valid, also if `short' contains an equal sign. This is a problem of any change and will not be resolved by *any* solution, including the one you made (think about it your argument above still applies). Nevertheless, one can find solutions that will virtually work all the time, a simple equal may not be the one, but [/name/ = ....] or [ name = { .... }] or ... Or you accept that some documents will fall over, eg \section [ On the equation $x = y+z$ ] {The finial solution to ...} LaTeX3 Error: Don't know the named argument: `On the equation $x' ..... but maybe that isn't too bad. Okay okay, \section [ toc = is a good syntax ]{...} would go unnoticed, but as i said before you can't produce anything new when trying 100% compatibility in a system with command definition facilitities. cheers Frank