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 o2ODpAb7009711 for ; Wed, 24 Mar 2010 14:51:11 +0100 Received: (qmail 1416 invoked by alias); 24 Mar 2010 13:51:05 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 24 Mar 2010 13:51:04 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx002) with SMTP; 24 Mar 2010 14:51:04 +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 o2ODlxT7013418 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Mar 2010 14:47:59 +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 o2OC660k002087; Wed, 24 Mar 2010 14:47:59 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 388400 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 24 Mar 2010 14:47:59 +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 o2ODlxfe019583 for ; Wed, 24 Mar 2010 14:47:59 +0100 Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o2ODlhvI013179 for ; Wed, 24 Mar 2010 14:47:47 +0100 Received: by fxm6 with SMTP id 6so347950fxm.38 for ; Wed, 24 Mar 2010 06:47:48 -0700 (PDT) Received: by 10.102.129.7 with SMTP id b7mr433289mud.11.1269438468347; Wed, 24 Mar 2010 06:47:48 -0700 (PDT) Received: from irwin.vpn.uni-freiburg.de (p57B2EA0B.dip.t-dialin.net [87.178.234.11]) by mx.google.com with ESMTPS id y37sm240842mug.52.2010.03.24.06.47.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Mar 2010 06:47:47 -0700 (PDT) Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id 587281AF52; Wed, 24 Mar 2010 14:53:20 +0100 (CET) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <201003040055.o240tMj3019510@f7.net> <20100311131851.GA26406@oberdiek.my-fqdn.de> <20100311201225.GA3890@khaled-laptop> <20100311202406.GA4414@oberdiek.my-fqdn.de> <20100311212544.GA4583@khaled-laptop> <20100311220430.GA4973@oberdiek.my-fqdn.de> <20100324112922.GA9719@khaled-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20100324135320.GA22620@oberdiek.my-fqdn.de> Date: Wed, 24 Mar 2010 14:53:20 +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: <20100324112922.GA9719@khaled-laptop> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p6i75npGen84eVAEFK/syJmiNoEBJhgjYKpglu1TZLLw7xMZnJMXwBFK0zrU udEInhYyaWAzwtcf5K2pCdD+gZ2/z4PnBLkwiwojjh6Igq3px6+f6feSzlnT7pQdfQrmBozCL/aS QLizg==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: 6325 On Wed, Mar 24, 2010 at 01:29:22PM +0200, Khaled Hosny wrote: > On Thu, Mar 11, 2010 at 11:04:30PM +0100, Heiko Oberdiek wrote: > > On Thu, Mar 11, 2010 at 11:25:44PM +0200, Khaled Hosny wrote: > > > > > On Thu, Mar 11, 2010 at 09:24:06PM +0100, Heiko Oberdiek wrote: > > > > On Thu, Mar 11, 2010 at 10:12:25PM +0200, Khaled Hosny wrote: > > > > > > > > > What about the approach we used in etex.src; redefining \patterns and > > > > > \hyphenation to use corresponding lua functions, so we don't need to > > > > > duplicate hyphenation files and, AFAIU, solves the catcode issue. > > > > > > > > \patterns is not read by Lua but by TeX, thus the catcode > > > > problem remains. > > > > > > I don't claim that I understand anything, but do we have some example > > > for the likes of me to see the problem? > > > > * verbatim mode > > * babel shorthands > > * other active characters > > * ... > > A more concrete example showing such an issue would greatly make testing > much either, I, apparently, don't know enough catcodes black magic to > come with such a test file myself. % Setup for iniTeX % ---------------- \catcode`\{=1 % \catcode`\}=2 % \catcode`\#=6 % % Helper macros % ------------- \def\ForLoopCount#1{% \countdef\LoopCount=255 % \LoopCount=#1\relax \DoForLoopCount } \def\DoForLoopCount#1#2{% \ifnum#1<\LoopCount \expandafter\Gobble \else \expandafter\FirstOfOne \fi {% #2% \advance\LoopCount by 1 % \DoForLoopCount{#1}{#2}% }% } \long\def\Gobble#1{} \long\def\FirstOfOne#1{#1} \def\SetCatcodeRange#1#2#3{% \ForLoopCount{#1}{#2}{\catcode\LoopCount=#3\relax}% } \def\SaveCatcodes{% \begingroup \toks0=\expandafter{% \expandafter\endlinechar\number\the\endlinechar \expandafter\relax \expandafter\escapechar\number\the\escapechar \expandafter\relax \expandafter\newlinechar\the\newlinechar\relax }% \ForLoopCount{0}{255}{% \toks0=\expandafter{% \the\toks0% \expandafter\catcode\number\the\LoopCount \expandafter=\the\catcode\LoopCount \relax }% }% \edef\x{% \endgroup \def\noexpand\RestoreCatcodes{\the\toks0}% }% \x } \def\CatcodeBlackMagic#1{% \SaveCatcodes \SetCatcodeRange{0}{255}{15}% invalid \SetCatcodeRange{65}{90}{11}% A-Z \SetCatcodeRange{97}{122}{11}% a-z \SetCatcodeRange{48}{57}{12}% 0-9 #1% \RestoreCatcodes } % Testing % ------- \def\Test{% % as example read file `s.tex' \catcode`\%=14 % comment \catcode`\ =10 % space \catcode`\\=0 % escape \catcode`\{=1 % brace left \catcode`\}=2 % brace right \catcode`\@=12 % other \endlinechar=13 % ^^M \catcode\endlinechar=5 % end of line \input s % } \CatcodeBlackMagic{\Test} % End of job % ---------- \csname @@end\endcsname\end If you are in the middle of nowhere (inside \CatcodeBlackMagic), then you cann't simply use "\input s", but you have to ensure the conditions (settings at the beginning of \Test) that the file can be read properly. Yours sincerely Heiko