Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o2BDK0Qu013642 for ; Thu, 11 Mar 2010 14:20:02 +0100 Received: (qmail 3456 invoked by alias); 11 Mar 2010 13:19:56 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 11 Mar 2010 13:19:52 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx027) with SMTP; 11 Mar 2010 14:19:52 +0100 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 o2BDHW7Z020896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Mar 2010 14:17:32 +0100 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 o2AN14cx011839; Thu, 11 Mar 2010 14:17:37 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 388283 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 11 Mar 2010 14:17:37 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o2BDHbwh022733 for ; Thu, 11 Mar 2010 14:17:37 +0100 Received: from abacus.informatik.uni-freiburg.de (abacus.informatik.uni-freiburg.de [132.230.150.4]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o2BDHEKX020630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 11 Mar 2010 14:17:19 +0100 Received: from remote239-035.home.uni-freiburg.de ([132.230.239.35] helo=irwin.vpn.uni-freiburg.de) by abacus.informatik.uni-freiburg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71) (envelope-from ) id 1NpiGO-0001B0-1e for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 11 Mar 2010 14:17:20 +0100 Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id 4BEB11AAE3; Thu, 11 Mar 2010 14:18:52 +0100 (CET) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <201003040055.o240tMj3019510@f7.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Message-ID: <20100311131851.GA26406@oberdiek.my-fqdn.de> Date: Thu, 11 Mar 2010 14:18:52 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Heiko Oberdiek Subject: Re: Babel, LuaTeX and hyphenation To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p4U4jfdfC5HDevlx1X2sAZgP9e9F2VTUYI/FLDAh5vXTUdJ3cb8VrMsthL0D 3Bm5FvGPWoCdLJEm9HLQdq2oZJ1+efgJyyH9QG358RthiowY/MzVegunMsABYaLhWP05TgiSjDS3 ZQZ9Q==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6314 On Thu, Mar 11, 2010 at 02:26:47PM +0200, Élie Roux wrote: > 2010/3/4 Karl Berry : > > > > Like CTAN, TL already has numerous hyphen.cfg's, so I see no impossible > > barrier on that front.  I agree with Robin's suggestion of "disguising" > > it as a .dtx. > > > > Of course, Will's original point about the so-far-insuperable barriers > > to updating babel remains. > > Hello, > > would the attached .dtx file be ok? The interesting differences are in > the attached diff. It loads english in the format, so there should't > be any problem left. In fact, it loads the first language in the > format, but as far as I can tell, it's quite mandatory for it to be > english, right? > > Is this really OK with the LPPL? > > Thank you, > -- > Elie \def\select@language#1{% > \expandafter\ifx\csname date#1\endcsname\relax > \@noopterr{#1}% > \else > + \ifx\directlua\@undefined\else > + \input \csname bbl@l@patterns@#1\endcsname\relax > + \expandafter\ifx\csname bbl@l@exceptions@#1\endcsname\relax\else > + \input \csname bbl@l@exceptions@#1\endcsname\relax > + \fi > + \message{Loading patterns for #1.}% > + \fi > \bbl@patterns{\languagename}% > \originalTeX > \expandafter\def\expandafter\originalTeX * Also \foreign@language and \hyphenrules call \bbl@patterns. Therefore it think, \bbl@patterns is the better place to hook into. * Calling \input later is quite dangerous: * A catcode table with defined catcodes is necessary, e.g. luatex.sty's \CatcodeTableLaTeX. Without a catcode table it's cumbersome to assign all input characters using \catcode. (We are talking about Unicode input, not the 256 bytes of TeX82). * Empty lines might generate \par tokens, not a good idea, if outer horizontal mode is active. This can be fixed by using a \vbox. * The files might define macros that shouldn't leak in. \begingroup \setbox0=\vbox{% % set catcode table \input ...\relax }% \endgroup Alternative: Using a lua file, included via \directlua. It's more robust and more efficient. But the lua files must be generated somehow. It's probably possible to use the hyph-utf8 project for this. Also a more elaborate logic can be used: If a lua hyphen file exists load that language dynamically using \directlua. Otherwise use the \input method or load the patterns at iniTeX time. Yours sincerely Heiko