2010/4/26 Élie Roux <[email protected]>: > > I just made a new version of etex.src (attached, with the patch from > 2.1;0)
Attached this time... Thank you, -- Elie
--- etexold.src 2010-04-26 10:01:34.887874900 +0300
+++ etex.src 2010-04-26 10:03:32.778807200 +0300
@@ -1,5 +1,5 @@
-%% e-TeX V2.1;0
-%% Revision-date: 01-FEB-1999 22:36:22 /PB
+%% e-TeX V2.1;2
+%% Revision-date: 26-APR-2010 11:05:45
%% Revision-history: (at-end)
% The version number in the first line is compared with the corresponding
@@ -275,6 +275,19 @@
\language=\csname l...@#1\endcsname
\lefthyphenmin=\csname l...@#1\endcsname
\righthyphenmin=\csname r...@#1\endcsname
+ % special case of LuaTeX: we load patterns at run-time, V 2.1;2
+ \ifcsname directlua\endcsname
+ % loading patterns if not loaded yet
+ \ifcsname pl...@#1\endcsname\else
+ \directlua{if not luatexhyphen then dofile(kpse.find_file("luatex-hyphen.lua")) end}%
+ \directlua{luatexhyphen.loadpatterns([[\luatexluaescapestring{#1}]], \luatexluaescapestring{\expandafter\csname l...@luatex@#...@id\endcsname})}%
+ \ifcsname e...@#1\endcsname
+ \directlua{luatexhyphen.loadexceptions([[\luatexluaescapestring{#1}]], \luatexluaescapestring{\expandafter\csname l...@luatex@#...@id\endcsname})}%
+ \fi
+ \expandafter \gdef \csname pl...@#1\endcsname {1}
+ \wlog{Loading patterns for language #1.}
+ \fi
+ \fi
\ifdefined \uselangu...@hook % V1.0-1
\uselangu...@hook {#1}% % V1.0-1
\fi
@@ -290,15 +303,28 @@
\def \addlanguage #1#2#3#4#5% language patterns exceptions lhm rhm
{\expandafter \...@xlang \csname l...@#1\endcsname
+ \ifx\directl...@undefined\else
+ \expandafter\xdef\csname l...@luatex@#...@id\endcsname{\the\count19}%
+ \fi
\expandafter \chardef \csname l...@#1\endcsname=#4 % V1.0-1
\expandafter \chardef \csname r...@#1\endcsname=#5 % V1.0-1
- \uselanguage {#1}%
- \input #2
- \if *#3*\else \input #3 \fi
+ % special case of LuaTeX: we don't load patterns in the format, % V 2.1;2
+ \ifcsname directlua\endcsname
+ \expandafter \def \csname p...@#1\endcsname {#2}
+ \if *#3*\else
+ \expandafter \def \csname e...@#1\endcsname {#3}
+ \fi
+ \else
+ \uselanguage {#1}%
+ \input #2
+ \if *#3*\else \input #3 \fi
+ \fi
\ifdefined \addlangu...@hook % V1.0-4
\addlangu...@hook {#1}% % V1.0-4
\fi
- \edef \fmtversion {\fmtversion/#1}%
+ \ifcsname directlua\endcsname\else % V 2.1;1
+ \edef \fmtversion {\fmtversion/#1}%
+ \fi
}
% Decrement \count 19, because \newlanguage will increment it again
@@ -776,6 +802,19 @@
%% Revision-history:
+26-APR-2010: 2.1;2 Improving the pattern loading system with the new TeXLive
+ plain pattern system. Pattern loading is now resistant
+ to catcode changes.
+ (Elie Roux <[email protected]> &
+ Khaled Hosny <[email protected]>)
+
+01-MAR-2010: 2.1;1 Don't pre-load hyphenation patterns in the format when
+ running under LuaTeX, as LuaTeX can dynamically load
+ hyphenation patterns, and loading hyphenation patterns
+ in the format is discouraged.
+ (Elie Roux <[email protected]> &
+ Khaled Hosny <[email protected]>)
+
01-FEB-1999: 2.1;0 Allow file to be used with e-TeX versions 2.0 and 2.1
25-MAR-1998: 2.0;19 Improved log message for \{glob|loc}{marks|box}vector (PEB)
etex.src
Description: WAIS Source
