Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t77DqVW7022773 for ; Fri, 7 Aug 2015 15:52:32 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx110) with ESMTPS (Nemesis) id 0LiY7c-1YpTFN3bbQ-00cfDj for ; Fri, 07 Aug 2015 15:52:26 +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 t77DopUk012653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Aug 2015 15:50:51 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7798n34029851; Fri, 7 Aug 2015 15:50:51 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12537844 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 7 Aug 2015 15:50:51 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t77Doo9F013023 for ; Fri, 7 Aug 2015 15:50:50 +0200 Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com [209.85.160.182]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t77DoiKr012603 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 7 Aug 2015 15:50:47 +0200 Received: by ykeo23 with SMTP id o23so88701763yke.3 for ; Fri, 07 Aug 2015 06:50:44 -0700 (PDT) X-Received: by 10.129.79.213 with SMTP id d204mr7371276ywb.159.1438955444021; Fri, 07 Aug 2015 06:50:44 -0700 (PDT) MIME-Version: 1.0 References: <55B34C0E.2070606@morningstar2.co.uk> Content-Type: multipart/alternative; boundary=001a114db35216af94051cb8ecbc Message-ID: Date: Fri, 7 Aug 2015 13:50:34 +0000 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Sean Allred Subject: Re: expl3 and input parsing To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <55B34C0E.2070606@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:+Tmp5teySmo=:HE9iERXTIkzucqb0x40h6qyLnA DTJBngV/CNzR8pzlUaAWZZJrSezLIFvgdV9ORT39PA0AirZtgLT4reV0xXW05wR0dPtEbzimX GirODwCYBGYuPOpqd5thamt8lxBdcPys/m/d9zjRAKtc/CK2cBM0JFbqRfW85QNS2zsDkkiWc kmkh0G9oVqG02tTY18d9vhQW8Na+JcspY4v5GWr5DKSeA6PPzI8AMvlrrEnONqux1OpjPKoyY k33hg4seQbarzkfp8PE6rFTfAFkIWC9my3uiBudUxf+FsBg3yi0lmKtTb03agmaT+09ELQXku a2OrMpvEK+xrui7Y6k54jM5RmRu8eIeLebJbhAbCT5ZOUiZZl9qaJ88uXLNg2fGcLnHIhxpRa eAmgi9OzhWTYoqcbufV0o2awj283GhPMPxhOhVncYVyWCI8062tz3u65GK0N4+vaeP2zzLp4V FutiW/U1fHV0Mmohh0BhMINA6GqQ3d0aq9H+JPBLZGiUf7M5O9AxyvPTW3aMb26BlZhn47jUf B0CuOr45suZg8WUEc1CHsZZEBk592MQNiCRbOj95jz8Dnbjw1gHDnonfyqvf4NsqnJs2VSqjt UwliOHKC3C61QQVqwW04ugkP2rEb68vxh6INmussdE6+mYW9gYtvat1xEVAo0/6dRRbIdech/ XHLK6o432aupKfke56MXGI1LrBHAzgZ9Tafge869Vl0j1DJzXCBmBk88hOCE8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 vkFjXoTg4X5khMjcKIvOue5qfB6TY6lvWuDedm9iJ5cVQVH9lKpoeOsNtk3b84blnu4TovKVr gfSdSWvgaN2qTr6NhZLiZHJtfJXSbnE8W+jwmFXcVMH9dmGALNVCcO37wWLOKbvDxrSB5M0Dg jQ1BEohRhIk9gCy4HMr2KcaUMVGFiYwYMgYHjfEH0QMFgR80s1peAHWfu9grQwKI9gvtS4s7J 8lL4LV9q+Nu2jGHuJdPiChRtlQ24I3ONDTZs4vM/BPs/xQFNQfJVvTa17cNsd+OIBfTsnl0+6 BjNjrCEEvwOq6W2ARSshx+tiyYz48tsCXXq8cmuGgHiJR4W3mFgJ X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7816 --001a114db35216af94051cb8ecbc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sounds good :) I'll just make this a separate module when life slows down again. That being the case, is there any recommendation for how to structure external expl3 modules (other than the name-formats of the control sequences defined)? While they use expl3, things like siunitx and chemmacros are proper LaTeX packages and so the \RequirePackage{expl3} is pretty straightforward, but how does this thought apply to pure expl3 modules? Should it be assumed that expl3 is loaded? My initial thought is that it must -- LaTeX2e packages don't load the kernel (though they do test for a minimum version of it). If LaTeX3 is loaded, of course expl3 will be -- but I suppose this goes back to the chasm of 'how LaTeX3 will be invoked'. Best, Sean On Sat, Jul 25, 2015 at 3:45 AM Joseph Wright < joseph.wright@morningstar2.co.uk> wrote: > On 03/07/2015 02:29, Sean Allred wrote: > > Hello all, > > > > Long story short, I=E2=80=99ve written a general parser for the > > > > key: type [=3D default], [=E2=80=A6] > > > > format that xtemplate uses. Since this seems to be what at least LaTeX3 > is heading toward, I wrote the parser so that it could be applied to a > multitude of situations (even xtemplate itself, I think). In a sense, it = is > generic in that it can handle any input of this type, but is specialized > *to this type* of input. I=E2=80=99ve named the function \parse_dictionar= y:nn, > which takes the input as #1 and the parsing logic as #2: > > > > \parse_dictionary:nn > > { > > key-1: type-1 =3D default-1, > > key-2: type-2 =3D default-2, > > } > > { > > \tl_show:N \l_parse_dictionary_key_tl > > \tl_show:N \l_parse_dictionary_type_tl > > \tl_show:N \l_parse_dictionary_value_tl > > } > > We are pretty sure xtemplate is 'wrong'. Parsing more generally may or > may not be useful, but I think at this stage it's best not to add this > to the kernel. I'm mindful of the need to tackle 'big issues' and we > already have quite a list :-) > > > Does the kernel have philosophical room for a =E2=80=98parsing=E2=80=99= module, or > should this be relegated to a separate expl3 module (like termmenu, > lt3graph, etc.)? This I ask because, from my perspective, the kernel tend= s > toward pure programming and low-level typesetting (from a =E2=80=98physic= al world=E2=80=99 > perspective; i.e. doing what l3coffin does in the real world isn=E2=80=99= t that > difficult, but convincing TeX to do it is nothing short of a world-wonder= ). > Input parsing doesn=E2=80=99t really fit that scope. On the other hand, s= eparate > talks of what l3color will be (someday) make it seem like such > functionality would prove useful in the kernel. I suspect this is just a > misunderstanding on my part, though =E2=80=94 I don=E2=80=99t think compl= ex input parsing > should be a part of the core expl3 language. > > Important note: the aim is that all functionality will have a code level > interface from which higher-level constructs will be built. > -- > Joseph Wright > --001a114db35216af94051cb8ecbc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sounds good :) I'll just make this a separate module w= hen life slows down again.

That being the case, is there= any recommendation for how to structure external expl3 modules (other than= the name-formats of the control sequences defined)? While they use expl3, = things like siunitx and chemmacros are proper LaTeX packages and so the \Re= quirePackage{expl3} is pretty straightforward, but how does this thought ap= ply to pure expl3 modules? Should it be assumed that expl3 is loaded?
=

My initial thought is that it must -- LaTeX2e packages = don't load the kernel (though they do test for a minimum version of it)= . If LaTeX3 is loaded, of course expl3 will be -- but I suppose this goes b= ack to the chasm of 'how LaTeX3 will be invoked'.

Best,
Sean

On Sat, Jul 25, 2015 at 3:45 AM Joseph Wright <joseph.wright@morningstar2.co.uk> wrote:
On 03/07/2015 02:29, S= ean Allred wrote:
> Hello all,
>
> Long story short, I=E2=80=99ve written a general parser for the
>
>=C2=A0 =C2=A0 =C2=A0key: type [=3D default], [=E2=80=A6]
>
> format that xtemplate uses. Since this seems to be what at least LaTeX= 3 is heading toward, I wrote the parser so that it could be applied to a mu= ltitude of situations (even xtemplate itself, I think). In a sense, it is g= eneric in that it can handle any input of this type, but is specialized *to= this type* of input. I=E2=80=99ve named the function \parse_dictionary:nn,= which takes the input as #1 and the parsing logic as #2:
>
>=C2=A0 =C2=A0 =C2=A0\parse_dictionary:nn
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0key-1: type-1 =3D default-1,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0key-2: type-2 =3D default-2,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\tl_show:N \l_parse_dictionary_key_tl=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\tl_show:N \l_parse_dictionary_type_t= l
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\tl_show:N \l_parse_dictionary_value_= tl
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}

We are pretty sure xtemplate is 'wrong'. Parsing more generally may= or
may not be useful, but I think at this stage it's best not to add this<= br> to the kernel. I'm mindful of the need to tackle 'big issues' a= nd we
already have quite a list :-)

> Does the kernel have philosophical room for a =E2=80=98parsing=E2=80= =99 module, or should this be relegated to a separate expl3 module (like te= rmmenu, lt3graph, etc.)? This I ask because, from my perspective, the kerne= l tends toward pure programming and low-level typesetting (from a =E2=80=98= physical world=E2=80=99 perspective; i.e. doing what l3coffin does in the r= eal world isn=E2=80=99t that difficult, but convincing TeX to do it is noth= ing short of a world-wonder). Input parsing doesn=E2=80=99t really fit that= scope. On the other hand, separate talks of what l3color will be (someday)= make it seem like such functionality would prove useful in the kernel. I s= uspect this is just a misunderstanding on my part, though =E2=80=94 I don= =E2=80=99t think complex input parsing should be a part of the core expl3 l= anguage.

Important note: the aim is that all functionality will have a code level interface from which higher-level constructs will be built.
--
Joseph Wright
--001a114db35216af94051cb8ecbc--