Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 Aug 2009 11:46:08 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7B9k6D8007503 for ; Tue, 11 Aug 2009 11:46:06 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n7B9g95U024384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Aug 2009 11:42:09 +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 n7B7w6Yg010332; Tue, 11 Aug 2009 11:42:08 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 288178 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 11 Aug 2009 11:42:07 +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 n7B9g7l5004198 for ; Tue, 11 Aug 2009 11:42:07 +0200 Received: from ueamailgate01.uea.ac.uk (ueamailgate01.uea.ac.uk [139.222.131.184]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n7B9foEo024102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 11 Aug 2009 11:41:54 +0200 Received: from ueams01.uea.ac.uk (ueams01.uea.ac.uk [139.222.131.78]) by ueamailgate01.uea.ac.uk (8.13.1/8.13.1) with ESMTP id n7B9fn43024460 for ; Tue, 11 Aug 2009 10:41:50 +0100 Received: from [139.222.202.22] by ueams01.uea.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1ManrZ-0003hJ-KI for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 11 Aug 2009 10:41:49 +0100 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 References: <4A7921CF.5020803@morningstar2.co.uk> <4A7A1505.4040604@residenset.net> <4A7AD930.2090106@residenset.net> <8516B615-51AA-4D90-BB7D-A9E122AA0335@gmail.com> <4A804317.6050909@morningstar2.co.uk> <4A80469B.5040305@morningstar2.co.uk> <4A804ED7.4040305@morningstar2.co.uk> <4A812A23.2000808@morningstar2.co.uk> <30090124-F668-4FB3-8F03-5CB615F80D6F@gmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Canit-CHI2: 0.00 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN, outgoing) X-CanItPRO-Stream: UEA:outgoing (inherits from UEA:default,base:default) X-Canit-Stats-ID: 27956653 - f0ef7a31713e X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 X-Scanned-By: CanIt (www . roaringpenguin . com) on 139.222.131.184 Message-ID: <4A813CE2.7080402@morningstar2.co.uk> Date: Tue, 11 Aug 2009 10:41:54 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: xparse To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 11 Aug 2009 09:46:08.0916 (UTC) FILETIME=[8DAA7540:01CA1A68] Status: R X-Status: X-Keywords: X-UID: 5879 J.Fine wrote: > I want documents that can be readily converted to XML. This is a future requirement for me. TeX macros is not. There are two things going on here: 1) How LaTeX3 default input syntax might look. The current LaTeX2e model is bad for this as it is not that structured. So there is a question of trying to make things more structured, which in part means better separation of content from appearance. 2) How LaTeX3 then typesets input. On (1), then a separate tool may well be the best approach, as you suggest. However, I think that relates more to LaTeX3 input syntax (as yet undecided). xparse is more about (2) (although I see that there is quite a lot of overlap to worry about). In some ways, I wonder if this issue is related to something that is explored in xparse. The "real" version has the experimental concept: \DeclareDocumentCommandInterface \DeclareDocumentCommandImplementation with the idea that the ...Interface function sets up the user syntax, while the ...Implementation one actually contains the code: \DeclareDocumentCommandInterface \foo { s o m } { foo-implementation } \DeclareDocumentCommandImplementation { foo-implementation } 3 {} So to translate to XML (or whatever) the \foo part does not change, but only the foo-implementation part does. In that way, the awkward nature of the LaTeX user interface (optional arguments, stars, ...) is still handled by the same code even if the result (in foo-implementaion) is very different. So you could imagine \DeclareDocumentCommand doing these for every function: \cs_new:Npn \DeclareDocumentCommand #1#2#3 { \DeclareDocumentCommandInterface #1 {#2} { \token_to_set:N #1 -impementation} \DeclareDocumentCommandImplementation { \token_to_set:N #1 -impementation} { \xparse_get_arg_num:n {#2} } % or some such thing! {#3} } Writing XML is then a case of changing each implementation, without changing the input at all. Would this go in the right direction? -- Joseph Wright