[lltx] German Hypenation broken in LuaLaTeX for TL2010

Manuel Pégourié-Gonnard mpg at elzevir.fr
Thu Jul 15 12:34:53 CEST 2010


Le 15/07/2010 12:13, Manuel Pégourié-Gonnard a écrit :
> Would it be okay for you to use a modified language switching macro with
> polyglossia? If so, I can provide you with such a macro (just give me a test
> file, so that I can test it).
> 
Here is an attempt:

\usepackage{polyglossia}

\newcommand\loadpatterns[1]{%
  \ifx\directlua\@undefined\else
    \ifx\directlua\relax\else
      \ifcsname lu at texhyphen@loaded@\the\language\endcsname \else
        \global\@namedef{lu at texhyphen@loaded@\the\language}{}%
        \directlua{
          if not luatexhyphen then
              dofile(assert(kpse.find_file("luatex-hyphen.lua")))
          end
          luatexhyphen.loadlanguage("\luatexluaescapestring{#1}",
            \the\language)}%
      \fi
    \fi
  \fi}

\setmainlanguage{german} \loadpatterns{german}
\setotherlanguage{french} \loadpatterns{french}

For each language you declare in your preamble, you should use \loadpatterns for
this language. Then it should work as usual. Note that the \loadpatterns macro
will be a no-op on XeTeX.

Manuel.


More information about the lualatex-dev mailing list