ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [luatex-plain] loading patterns
@ 2012-11-14 18:12 Philipp Gesang
  2012-11-14 19:15 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Gesang @ 2012-11-14 18:12 UTC (permalink / raw)
  To: ConTeXt ML


[-- Attachment #1.1: Type: text/plain, Size: 1970 bytes --]

Hi all!

              (I assume this is the appropriate list for
              questions regarding luatex-plain.)

I am trying to enable the Russian hyphenation patterns. The demo
code below works with luatex.fmt but not luatex-plain.fmt (both
from tex live).

More precisely, after loading the hyphenation patterns for, say,
*Latin* I get proper hyphenation. Now when I attempt the same
with *Russian*, nothing is hyphenated. (As lang.patterns(id)
correctly returns the patterns in both cases, I guess something
is missing after updating tex.language.)

Any thoughts? Can someone reproduce this?
Philipp

=================================================================

\def\loadpatterns#1{%
  \directlua{
    local pattern_source = kpse.find_file"#1"
    texio.write_nl("* loading patterns from file " .. pattern_source)
    local fh = io.open(kpse.find_file"#1")
    local new_patterns = fh:read"*a"
    fh:close()
    local new_language = lang.new()
    lang.patterns(new_language, new_patterns)
    tex.language = lang.id(new_language)
    %print(lang.patterns(new_language))
  }%
}

% ····························································· %
\showhyphens{Циолковский} %% no pattern yet, so both without
\showhyphens{Oenothea}    %% hyphenation
% ····························································· %
\loadpatterns{hyph-ru.pat.txt} %% Russian
\showhyphens{Циолковский}      %% wrong with luatex-plain
% ····························································· %
\loadpatterns{hyph-la.pat.txt} %% Latin
\showhyphens{Oenothea}         %% correct with either
% ····························································· %
\bye


[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-15 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 18:12 [luatex-plain] loading patterns Philipp Gesang
2012-11-14 19:15 ` Hans Hagen
2012-11-15 13:57   ` Philipp Gesang
2012-11-15 14:51     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).