diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2011-06-11 00:32:38 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2011-06-11 00:32:38 +0000 |
commit | b439631e2c3a99a345993513013a2ace563bdd3b (patch) | |
tree | 876f2f14d92e8ca45d1f3b288a911870c406261f /Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb | |
parent | 95f2ee5a2b2d9c18b748c222ea64eacb33f2e959 (diff) |
An attempt to import the latest version of hyph-utf8 (#558)
LuaTeX:
* add support for loading multiple pattern files in LuaTeX
TeX Live:
* remove copthyph.tex from texmf: it is now part of hyph-utf8
* update language.ptx and language.def for pTeX
* update some descriptions in tlpsrc files (not finished)
* change lefthyphenmin from 2 to 1 for Afrikaans (not sure when it was set to 2)
hyph-utf8:
* load patterns for Latin and Cyrillic scripts for Serbian simultaneously
* new version of German hyphenation patterns
* support both U+0027 and U+2019 as apostrophe in Unicode engines
git-svn-id: svn://tug.org/texlive/trunk@22909 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb')
-rw-r--r-- | Master/texmf-dist/source/generic/hyph-utf8/generate-tl-files.rb | 45 |
1 files changed, 29 insertions, 16 deletions
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 b738686b012..f3f19863968 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 @@ -28,9 +28,7 @@ language_grouping = { 'ancientgreek' => ['grc', 'grc-x-ibycus'], 'chinese' => ['zh-latn'], 'indic' => ['as', 'bn', 'gu', 'hi', 'kn', 'ml', 'mr', 'or', 'pa', 'ta', 'te'], - # TODO - until someone tells what to do; but this is wrong anyway - #'serbian' => ['sr-latn', 'sr-cyrl'], - 'serbian' => ['sh-latn'], + 'serbian' => ['sh-latn', 'sh-cyrl'], } language_used_in_group = Hash.new @@ -53,6 +51,8 @@ languages.each do |language| if language.code == 'sh-latn' then language.code = 'sr-latn' + elsif language.code == 'sh-cyrl' then + language.code = 'sr-cyrl' end end @@ -94,6 +94,10 @@ language_groups.sort.each do |language_name,language_list| $file_tlpsrc.puts "depend ukrhyph" end language_list.each do |language| + if language.description_s != nil then + $file_tlpsrc.puts "shortdesc #{language.description_s}" + $file_tlpsrc.puts "longdesc #{language.description_l.join("\nlongdesc ")}" + end name = "name=#{language.name}" # synonyms @@ -121,23 +125,29 @@ language_groups.sort.each do |language_name,language_list| if language.use_new_loader then file = "file=loadhyph-#{language.code}.tex" # we skip the mongolian language - if language.code == "mn-cyrl-x-lmc" then - file = "luaspecial=\"disabled:only for 8bit montex with lmc encoding\"" - else - filename_pat = "hyph-#{language.code}.pat.txt" - filename_hyp = "hyph-#{language.code}.hyp.txt" - - # check for existance of patterns and exceptions - if !File::exists?( "#{$path_txt}/#{filename_pat}" ) then - puts "some problem with #{$path_txt}/#{filename_pat}!!!" - end - if !File::exists?( "#{$path_txt}/#{filename_hyp}" ) then - puts "some problem with #{$path_txt}/#{filename_hyp}!!!" + if language.code != "mn-cyrl-x-lmc" then + if language.code == "sr-latn" or language.code == "sr-cyrl" then + filename_pat = "hyph-sh-latn.pat.txt,hyph-sh-cyrl.pat.txt" + filename_hyp = "hyph-sh-latn.hyp.txt,hyph-sh-cyrl.hyp.txt" + else + filename_pat = "hyph-#{language.code}.pat.txt" + filename_hyp = "hyph-#{language.code}.hyp.txt" + + # check for existance of patterns and exceptions + if !File::exists?( "#{$path_txt}/#{filename_pat}" ) then + puts "some problem with #{$path_txt}/#{filename_pat}!!!" + end + if !File::exists?( "#{$path_txt}/#{filename_hyp}" ) then + puts "some problem with #{$path_txt}/#{filename_hyp}!!!" + end end file_patterns = "file_patterns=#{filename_pat}" if File::size?( "#{$path_txt}/#{filename_hyp}" ) != nil then file_exceptions = "file_exceptions=#{filename_hyp}" + # TODO: nasty workaround + elsif language.code == "sr-latn" or language.code == "sr-cyrl" then + file_exceptions = "file_exceptions=#{filename_hyp}" else file_exceptions = "file_exceptions=" # puts "> #{filename_hyp} is empty" @@ -158,13 +168,16 @@ language_groups.sort.each do |language_name,language_list| if file_patterns + file_exceptions != "" $file_tlpsrc.print " \\\n\t#{file_patterns} \\\n\t#{file_exceptions}" end + if language.code == "mn-cyrl-x-lmc" then + $file_tlpsrc.print " \\\n\tluaspecial=\"disabled:only for 8bit montex with lmc encoding\"" + end # end-of-line $file_tlpsrc.puts end if language_name != "russian" and language_name != "ukrainian" then $file_tlpsrc.puts language_list.each do |language| - if language.use_old_patterns and language.filename_old_patterns != "zerohyph.tex" then + if language.use_old_patterns and language.filename_old_patterns != "zerohyph.tex" and language.filename_old_patterns != "copthyph.tex" then $file_tlpsrc.puts "runpattern f texmf/tex/generic/hyphen/#{language.filename_old_patterns}" end end |