diff options
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 |