diff options
author | Karl Berry <karl@freefriends.org> | 2018-08-26 21:26:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-08-26 21:26:03 +0000 |
commit | 7431e459213999bcbadfe024c77b012eeddc8d00 (patch) | |
tree | a74fce513be684316487943e613c31caf467bc6b /Master/texmf-dist/source/generic/hyph-utf8 | |
parent | 14d4efba69f09f016b37f711163573bacbcf3865 (diff) |
hyph-utf8 (26aug18)
git-svn-id: svn://tug.org/texlive/trunk@48489 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/hyph-utf8')
8 files changed, 18 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/generic/hyph-utf8/generate-converters.rb b/Master/texmf-dist/source/generic/hyph-utf8/generate-converters.rb index f344fe2ff30..7b3a0cff320 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/generate-converters.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/generate-converters.rb @@ -2,11 +2,11 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'hyph-utf8')) -$encoding_data_dir = "data/encodings" # $encodings = ["ec", "qx", "t2a", "lmc", "il2", "il3", "l7x", "t8m", "lth"] $encodings = ["t8m", "lth"] -$path_root=File.expand_path("../../..") +$path_root=File.expand_path("../../../..", __FILE__) +$encoding_data_dir = File.expand_path("../data/encodings", __FILE__) $output_data_dir = "#{$path_root}/tex/generic/hyph-utf8/conversions" $encodings.each do |encoding| diff --git a/Master/texmf-dist/source/generic/hyph-utf8/generate-pattern-loaders.rb b/Master/texmf-dist/source/generic/hyph-utf8/generate-pattern-loaders.rb index 385a3e3b2a8..2a13d32d065 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/generate-pattern-loaders.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/generate-pattern-loaders.rb @@ -3,12 +3,12 @@ # this file auto-generates loaders for hyphenation patterns - to be improved -load 'languages.rb' +require_relative 'languages.rb' $package_name="hyph-utf8" # TODO - make this a bit less hard-coded -$path_tex_generic=File.expand_path("../../../tex/generic") +$path_tex_generic=File.expand_path("../../../../tex/generic", __FILE__) $path_loadhyph="#{$path_tex_generic}/#{$package_name}/loadhyph" # TODO: should be singleton 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 87aa742d1e5..2c1a6ee60d4 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 @@ -6,12 +6,13 @@ # use 'gem install unicode' if unicode is missing on your computer require 'unicode' -load 'languages.rb' +$LOAD_PATH << File.expand_path('..', __FILE__) +require 'languages.rb' -$path_root=File.expand_path("../../..") +$path_root=File.expand_path("../../../..", __FILE__) $path_plain="#{$path_root}/tex/generic/hyph-utf8/patterns/txt" $path_quote="#{$path_root}/tex/generic/hyph-utf8/patterns/quote" -$path_TL=File.expand_path("../../../../TL") +$path_TL=File.expand_path("../../../../../TL", __FILE__) $path_language_dat_lua="#{$path_root}/tex/luatex/hyph-utf8/config" $l = Languages.new diff --git a/Master/texmf-dist/source/generic/hyph-utf8/generate-ptex-patterns.rb b/Master/texmf-dist/source/generic/hyph-utf8/generate-ptex-patterns.rb index 3c468b6eb95..1399280a5a8 100755 --- a/Master/texmf-dist/source/generic/hyph-utf8/generate-ptex-patterns.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/generate-ptex-patterns.rb @@ -9,9 +9,9 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'hyph-utf8')) # require 'rubygems' # require 'unicode' -load 'languages.rb' +require_relative 'languages.rb' -$path_root=File.expand_path("../../..") +$path_root=File.expand_path("../../../..", __FILE__) $path_ptex="#{$path_root}/tex/generic/hyph-utf8/patterns/ptex" # load encodings 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 6bf7dd3758b..845d43951c0 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 @@ -3,13 +3,13 @@ # this file auto-generates tlpsrc files for hyphenation patterns - to be improved -load 'languages.rb' +require_relative 'languages.rb' $package_name="hyph-utf8" # TODO - make this a bit less hard-coded -$path_tex_generic=File.expand_path("../../../tex/generic") -$path_TL=File.expand_path("../../../../TL") +$path_tex_generic=File.expand_path("../../../../tex/generic", __FILE__) +$path_TL=File.expand_path("../../../../../TL", __FILE__) $path_language_dat="#{$path_TL}/texmf-dist/tex/generic/config" # hyphen-foo.tlpsrc for TeX Live $path_tlpsrc="#{$path_TL}/tlpkg/tlpsrc" diff --git a/Master/texmf-dist/source/generic/hyph-utf8/generate-webpage.rb b/Master/texmf-dist/source/generic/hyph-utf8/generate-webpage.rb index ea89bccdd29..56ed48af393 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/generate-webpage.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/generate-webpage.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -load 'languages.rb' +require_relative 'languages.rb' # this file auto-generates loaders for hyphenation patterns - to be improved diff --git a/Master/texmf-dist/source/generic/hyph-utf8/hyph-utf8.rb b/Master/texmf-dist/source/generic/hyph-utf8/hyph-utf8.rb index 6e197e2fa73..60005af380a 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/hyph-utf8.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/hyph-utf8.rb @@ -86,7 +86,7 @@ class HyphEncoding private def read_data # fetch the characters - encoding_data_dir = File.expand_path("data/encodings") + encoding_data_dir = File.expand_path("../data/encodings", __FILE__) filename = "#{encoding_data_dir}/#{@encoding_name}.dat" if File.exists?(filename) then diff --git a/Master/texmf-dist/source/generic/hyph-utf8/languages.rb b/Master/texmf-dist/source/generic/hyph-utf8/languages.rb index c5b7b5a41f0..e59b1f8b398 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/languages.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/languages.rb @@ -55,7 +55,7 @@ class Language def get_exceptions if @exceptions1 == nil - filename = "../../../tex/generic/hyph-utf8/patterns/tex/hyph-#{@code}.tex"; + filename = File.expand_path("../../../../tex/generic/hyph-utf8/patterns/tex/hyph-#{@code}.tex", __FILE__); lines = IO.readlines(filename, '.').join("") exceptions = lines.gsub(/%.*/,''); if (exceptions.index('\hyphenation') != nil) @@ -74,7 +74,7 @@ class Language def get_patterns if @patterns == nil - filename = "../../../tex/generic/hyph-utf8/patterns/tex/hyph-#{@code}.tex" + filename = File.expand_path("../../../../tex/generic/hyph-utf8/patterns/tex/hyph-#{@code}.tex", __FILE__) lines = IO.readlines(filename, '.').join("") @patterns = lines.gsub(/%.*/,''). gsub(/.*\\patterns\s*\{(.*?)\}.*/m,'\1'). @@ -102,7 +102,7 @@ class Language def get_comments_and_licence if @comments_and_licence == nil then - filename = File.expand_path("../../../tex/generic/hyph-utf8/patterns/tex/hyph-#{@code}.tex"); + filename = File.expand_path("../../../../tex/generic/hyph-utf8/patterns/tex/hyph-#{@code}.tex", __FILE__); lines = IO.readlines(filename, '.').join("") @comments_and_licence = lines. gsub(/(.*)\\patterns.*/m,'\1') |