LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Thu, 11 Mar 2010 14:18:52 +0100
Content-Disposition: inline
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=iso-8859-1
From: Heiko Oberdiek <[log in to unmask]>
Parts/Attachments: text/plain (72 lines)
On Thu, Mar 11, 2010 at 02:26:47PM +0200, Élie Roux wrote:

> 2010/3/4 Karl Berry <[log in to unmask]>:
> >
> > 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


>      \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 \[log in to unmask]
  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.

      % set catcode table
      \input ...\relax

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 <[log in to unmask]>