diff options
author | Norbert Preining <preining@logic.at> | 2010-04-09 18:26:02 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-04-09 18:26:02 +0000 |
commit | f293eb2a74a0057e5bf17b1658b3484316af1050 (patch) | |
tree | 49dead4aa8641359db9acd4b5d5a63b2defc20a5 /Master/texmf-dist/source/generic | |
parent | b3ff2c1ad9cb1259f9a6a6a9c3958e82ffc1dd5a (diff) |
hyph-utf8 update for montex changes
git-svn-id: svn://tug.org/texlive/trunk@17771 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
3 files changed, 50 insertions, 33 deletions
diff --git a/Master/texmf-dist/source/generic/hyph-utf8/generate-plain-patterns.rb b/Master/texmf-dist/source/generic/hyph-utf8/generate-plain-patterns.rb index 59bb491f8a0..5ec25efaf69 100755 --- a/Master/texmf-dist/source/generic/hyph-utf8/generate-plain-patterns.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/generate-plain-patterns.rb @@ -10,6 +10,8 @@ require 'unicode' load 'languages.rb' $path_plain="../../../../plain" +$path_TL="../../../../TL" +$path_language_dat="#{$path_TL}/texmf/tex/generic/config" $l = Languages.new # TODO: should be singleton @@ -26,17 +28,20 @@ languages.each do |language| end # language_codes['de-1901'] = 'de-1901' # language_codes['de-1996'] = 'de-1996' -language_codes['de-ch-1901'] = 'de-CH-1901' -language_codes['en-gb'] = 'en-GB' -language_codes['en-us'] = 'en-US' -language_codes['zh-latn'] = 'zh-Latn' +language_codes['de-ch-1901'] = 'de-CH-1901' +language_codes['en-gb'] = 'en-GB' +language_codes['en-us'] = 'en-US' +language_codes['zh-latn'] = 'zh-Latn' # language_codes['el-monoton'] = 'el-monoton' # language_codes['el-polyton'] = 'el-polyton' -language_codes['mn-cyrl'] = nil -language_codes['mn-cyrl-x-2a'] = 'mn' -language_codes['sh-latn'] = 'sr-Latn' -language_codes['sh-cyrl'] = nil -language_codes['sr-cyrl'] = 'sr-Cyrl' +language_codes['mn-cyrl'] = 'mn' +language_codes['mn-cyrl-x-lmc'] = nil +language_codes['sh-latn'] = 'sr-Latn' +language_codes['sh-cyrl'] = nil +language_codes['sr-cyrl'] = 'sr-Cyrl' + +$file_language_dat_lua = File.open("#{$path_language_dat}/language.dat.lua", "w") +$file_language_dat_lua.puts "{\n" languages.sort{|x,y| x.code <=> y.code }.each do |language| if language.use_new_loader or language.code == 'en-us' then @@ -93,5 +98,28 @@ languages.sort{|x,y| x.code <=> y.code }.each do |language| $file_hyp.close $file_let.close $file_inf.close + + $file_language_dat_lua.puts "\t[\"#{language.name}\"]={" + $file_language_dat_lua.puts "\t\tloader=\"loadhyph-#{language.code}.tex\"," + $file_language_dat_lua.puts "\t\tcode=\"#{code}\"," + if language.hyphenmin == nil or language.hyphenmin.length == 0 then + lmin = '' + rmin = '' + else + lmin = language.hyphenmin[0] + rmin = language.hyphenmin[1] + end + $file_language_dat_lua.puts "\t\tlefthyphenmin=#{lmin}," + $file_language_dat_lua.puts "\t\trighthyphenmin=#{rmin}," + if language.synonyms.length > 0 + $file_language_dat_lua.puts "\t\tsynonyms={\"#{language.synonyms.join('","')}\"}," + else + $file_language_dat_lua.puts "\t\tsynonyms={}," + end + $file_language_dat_lua.puts "\t},\n" end end + +$file_language_dat_lua.puts "}\n" + +$file_language_dat_lua.close diff --git a/Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb b/Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb index 233fb60bbcb..817a0e04d4f 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb @@ -20,7 +20,7 @@ languages = $l.list.sort{|a,b| a.name <=> b.name} language_grouping = { 'norwegian' => ['nb', 'nn'], 'german' => ['de-1901', 'de-1996', 'de-ch-1901'], - 'mongolian' => ['mn-cyrl', 'mn-cyrl-x-2a'], + 'mongolian' => ['mn-cyrl', 'mn-cyrl-x-lmc'], 'greek' => ['el-monoton', 'el-polyton'], 'ancientgreek' => ['grc', 'grc-x-ibycus'], 'chinese' => ['zh-latn'], @@ -79,7 +79,7 @@ language_groups.sort.each do |language_name,language_list| $file_tlpsrc = File.open("#{$path_tlpsrc}/hyphen-#{language_name}.tlpsrc", 'w') puts "generating #{$path_tlpsrc}/hyphen-#{language_name}.tlpsrc" - $file_tlpsrc.puts "name hyphen-#{language_name}" + #$file_tlpsrc.puts "name hyphen-#{language_name}" $file_tlpsrc.puts "category TLCore" # external dependencies for Russian and Ukrainian (until we implement the new functionality at least) diff --git a/Master/texmf-dist/source/generic/hyph-utf8/languages.rb b/Master/texmf-dist/source/generic/hyph-utf8/languages.rb index c9e3c5c463f..c16782bea4d 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/languages.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/languages.rb @@ -716,7 +716,7 @@ class Languages < Hash "use_new_loader" => true, "use_old_patterns" => false, "filename_old_patterns" => nil, - "hyphenmin" => [1,2], + "hyphenmin" => [2,2], "encoding" => "ec", "exceptions" => false, "message" => "Turkmen Hyphenation Patterns", @@ -787,29 +787,29 @@ class Languages < Hash "exceptions" => true, "message" => "Serbian hyphenation patterns in Cyrillic script", }, -# mongolian xu-mnhyph.tex +# mongolian (used to be mongolian2a) { "code" => "mn-cyrl", "name" => "mongolian", "use_new_loader" => true, "use_old_patterns" => false, - "filename_old_patterns" => "mnhyph.tex", + "filename_old_patterns" => "mnhyphn.tex", "hyphenmin" => [2,2], - "encoding" => "lmc", + "encoding" => "t2a", "exceptions" => false, - "message" => "Mongolian hyphenation patterns", + "message" => "(New) Mongolian Hyphenation Patterns", }, -# mongolian2a +# mongolianlmc xu-mnhyph.tex (used to be mongolian) { - "code" => "mn-cyrl-x-2a", - "name" => "mongolian2a", + "code" => "mn-cyrl-x-lmc", + "name" => "mongolianlmc", "use_new_loader" => true, "use_old_patterns" => false, - "filename_old_patterns" => "mnhyphn.tex", + "filename_old_patterns" => "mnhyph.tex", "hyphenmin" => [2,2], - "encoding" => "t2a", + "encoding" => "lmc", "exceptions" => false, - "message" => "(New) Mongolian Hyphenation Patterns", + "message" => "Mongolian hyphenation patterns", }, # bulgarian xu-bghyphen.tex { @@ -901,17 +901,6 @@ class Languages < Hash "exceptions" => false, "message" => "Guajrati Hyphenation Patterns", }, -# assamese -{ - "code" => "as", - "name" => "assamese", - "use_new_loader" => true, - "use_old_patterns" => false, - "hyphenmin" => [1,1], # TODO - "encoding" => nil, # no patterns for 8-bit TeX - "exceptions" => false, - "message" => "Assameze Hyphenation Patterns", -}, # hindi { "code" => "hi", |