Hi, all,
I've read "The hyphen.cfg file for LuaTEX" (luatex-hyphen.pdf from TL2012) and still don't understand is it possible to do not add language to lualatex.fmt, by disabling it in language.dat.lua, but leaving it enabled in language.dat.

The problem is that I want to dump old russian cyrillic hyphenation patterns to latex, but don't want it to be in lualatex (with latex is everything ok).

language-local.dat:
cyrillic loadhyph-ru-cyrl.tex

language-local.def:
\addlanguage {cyrillic}{loadhyph-ru-cyrl}{}{2}{3}

language-local.dat.lua:
    ["cyrillic"] = {
        loader = 'loadhyph-ru-cyrl.tex',
        lefthyphenmin = 2,
        righthyphenmin = 2,
        synonyms = {  },
        special = 'disabled:Not supported in luatex',
    }

I update language config files:
  tlmgr generate language

Then, I recreate fmt files. And when I compile
test document with lualatex, I see "cyrillic" language in listed patterns :
This is LuaTeX, Version beta-0.70.2-2012080612 (TeX Live 2012/W32TeX) (format=lualatex 2012.11.22) 22 NOV 2012 15:29
 restricted \write18 enabled.
**test.tex
(./test.tex
LaTeX2e <2011/06/27>
LuaTeX adaptation of babel <v3.8m-luatex-1.5> and hyphenation patterns for engl
ish, dumylang, nohyphenation, cyrillic, loaded.
(i:/texroot/texlive2012/texmf-dist/tex/latex/base/article.cls
....

and I still can access language counter \l@cyrillic.
So I understand, that language counter is increased anyway (it does not check "special = 'disabled:'" before adding language to the list)

Is it possible to disable some how the language from dumping it to fmt at all?
For example to write let say:
["cyrillic"] = null
????

In tex loadhyph-ru-cyrl.tex I disable it from dumping by testing the engine, but the language counter is increased anyway and \l@cyrillic is defined.

loadhyph-ru-cyrl.tex:
\begingroup
\def\testengine#1#2!{\def\secondarg{#2}}
character
\testengine Τ!\relax
% Unicode-aware engine (such as XeTeX or LuaTeX) only sees a single (2-byte) argument
\ifx\secondarg\empty
    \message{Not supported for XeTeX or LuaTeX}
\else
    \message{Cyrillic Hyphenation Patterns for "russian"}
    \input ruhyph.tex
\fi
\endgroup


Linas.

Reply via email to