diff options
author | Karl Berry <karl@freefriends.org> | 2025-02-16 18:35:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2025-02-16 18:35:57 +0000 |
commit | 5ffa1233334770deed0fba3a3ac13c31251236dc (patch) | |
tree | bd6f0430dbfcd59d8a44e964312ec545df4d340b | |
parent | 20514bdc3383c5d5243b1ca2daf920bf08a25ef1 (diff) |
hyph-utf8 (14feb25)
git-svn-id: svn://tug.org/texlive/trunk@74031 c570f23f-e606-0410-a88d-b1316a301751
28 files changed, 439 insertions, 73 deletions
diff --git a/Master/texmf-dist/doc/generic/hyph-utf8/HISTORY b/Master/texmf-dist/doc/generic/hyph-utf8/HISTORY index 9a01c9634f5..00c03f1cf03 100644 --- a/Master/texmf-dist/doc/generic/hyph-utf8/HISTORY +++ b/Master/texmf-dist/doc/generic/hyph-utf8/HISTORY @@ -28,7 +28,7 @@ and the author of the original file should preferraby modify these files instead (feel free to remove credits added by TUG from those files). If you want to change the patterns, rather than uploading directly to CTAN, -we would be grateful if you could send it to us (http://tug.org/tex-hyphen) +we would be grateful if you could send it to us (http://hyphenation.org/) or ask for credentials for SVN repository and commit it yourself; we will then upload the whole "package" to CTAN. @@ -51,10 +51,10 @@ at least a chance to read your patterns. For more information see - http://tug.org/tex-hyphen + http://hyphenation.org/ -Copyright 2008-2015 by TUG +Copyright 2008-2025 by TUG The licence for hyph-foo.tex: Respect licences of original authors. The licence for the rest: Use common sense when modifying and coordinate your work. @@ -62,10 +62,10 @@ The licence for the rest: Use common sense when modifying and coordinate your wo Hyphenation patterns are essential to TeX; whatever changes you make to these files - make sure to coordinate your work with everyone involved. -(TeX Live, MikTeX, CTAN, patter authors, mailing list, ...) +(TeX Live, MikTeX, CTAN, pattern authors, mailing list, ...) People come and go, TeX evolves. We are aware of that. -If we disapear one day and there is a need to change files, +If we disappear one day and there is a need to change files, do whatever needs to be done to make TeX behave in a proper (backward compatible) way. And keep things clean & consistent. diff --git a/Master/texmf-dist/source/generic/hyph-utf8/VERSION b/Master/texmf-dist/source/generic/hyph-utf8/VERSION index f1ed77a4f8c..a7866d16fba 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/VERSION +++ b/Master/texmf-dist/source/generic/hyph-utf8/VERSION @@ -1 +1 @@ -2025-01-10 +2025-02-14 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 c0781932a38..295e6a9cb46 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 @@ -19,7 +19,7 @@ def output(file, string, indent = 0) end end -print 'Generating loaders for ' +print '[1;36mGenerating[0m [0;34mloaders[0m for ' Language.all.each do |language| # puts language.bcp47 @@ -60,7 +60,7 @@ Language.all.each do |language| end next if language.use_old_loader - print language.bcp47, ' ' + print '[0;32m', language.bcp47, '[0m ' filename = File.join(PATH::LOADER, language.loadhyph) File.open(filename, "w") do |file| @@ -84,6 +84,7 @@ Language.all.each do |language| % That\'s Tau (as in Taco or ΤΕΧ, Tau-Epsilon-Chi), a 2-byte UTF-8 character \\def\\testengine#1#2!{\\def\\secondarg{#2}}\\testengine Τ!\\relax \\ifx\\secondarg\\empty' + # byebug if language.bcp47 == 'zh-latn-pinyin' output(file, language.format_inputs(language.utf8_chunk), 2) file.puts("\\else\n") output(file, language.format_inputs(language.nonutf8_chunk('8-bit')), 2) 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 85d1d99dbf9..031f6f0784c 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 @@ -11,15 +11,15 @@ include TeX::Hyphen # FIXME Close files! # FIXME sr-cyrl? -print 'Generating plain files for (parenthesised tags are skipped) ' +print '[1;36mGenerating[0m [0;34mplain files[0m for (parenthesised tags are skipped) ' Language.all.sort.each do |language| bcp47 = language.bcp47 if language.use_old_loader || bcp47 == 'mn-cyrl-x-lmc' - print '(', language.bcp47, ') ' + print '([0;31m', language.bcp47, '[0m) ' next else - print bcp47, ' ' + print '[0;32m', bcp47, '[0m ' end outfile = Proc.new do |ext| 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 a7b5c8e8055..f7c467b081d 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 @@ -30,7 +30,7 @@ header = <<-HEADER %% HEADER -print 'Generating pTeX patterns for (skipped # reason): ' +print '[1;36mGenerating [0;34mpTeX patterns[0m for (skipped # reason): ' Language.all.sort.each do |language| if language.use_old_patterns_comment || !language.encoding || language.encoding == 'ascii' if language.use_old_patterns_comment @@ -38,7 +38,7 @@ Language.all.sort.each do |language| else reason = sprintf 'encoding: %s', language.encoding.inspect end - print '(', language.bcp47, ' # ', reason, ') ' + print '([0;31m', language.bcp47, '[0m [0;35m# ', reason, '[0m) ' next else @@ -47,7 +47,7 @@ Language.all.sort.each do |language| bcp47 = language.bcp47 - print bcp47, ' ' + print '[0;32m', bcp47, '[0m ' File.open(File.join(PATH::PTEX, sprintf('hyph-%s.%s.tex', bcp47, language.encoding)), 'w') do |file_ptex| patterns = language.patterns exceptions = language.exceptions 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 2acb294027f..d7aebcafae8 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 @@ -1,6 +1,8 @@ #!/usr/bin/env ruby # encoding: utf-8 +require 'byebug' + # this file auto-generates tlpsrc files for hyphenation patterns - to be improved require_relative 'lib/tex/hyphen' @@ -12,11 +14,11 @@ include TeXLive # TLPSRC # #--------# -print 'Generating .tlpsrc files for packages: ' +print '[1;36mGenerating[0m [0;34m.tlpsrc files[0m for packages: ' Package.all.sort.each do |package| tlpsrcname = File.join(PATH::TLPSRC, sprintf('hyphen-%s.tlpsrc', package.name.safe)) file_tlpsrc = File.open(tlpsrcname, 'w') - print package.name.safe, ' ' + print '[0;32m', package.name.safe, '[0m ' file_tlpsrc.puts "category TLCore" package.list_dependencies.each do |dependency| @@ -55,6 +57,8 @@ Package.all.sort.each do |package| file_tlpsrc.printf "runpattern f texmf-dist/%s\n", filename end file_tlpsrc.close + # puts File.read(tlpsrcname) if ['chinese', 'latin'].include?(package.name) + # byebug if ['chinese', 'latin'].include?(package.name) end puts @@ -63,7 +67,7 @@ puts #--------------------------# ldatfile = File.join PATH::LANGUAGE_DAT, 'language.dat' File.open(ldatfile, 'w') do |file| - puts 'Generating language.dat' + puts '[1;36mGenerating[0m [0;34mlanguage.dat[0m' Package.all.sort.each do |package| package.languages.each do |language| # Main language name diff --git a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/converter.rb b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/converter.rb index d270767c1b8..99ba31a25cb 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/converter.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/converter.rb @@ -21,6 +21,7 @@ module TeX end def convert(filename) + output = '' raise "Please define the encoding mapping first with #read" unless @mapping doconvert = false File.open(filename, external_encoding: Encoding::ASCII_8BIT).each_line do |line| @@ -31,11 +32,14 @@ module TeX doconvert = false if doconvert && line =~ /}/ if doconvert - puts (line.strip.each_byte.map do |byte| + output += (line.strip.each_byte.map do |byte| @mapping[byte] end || '').join + output += "\n" end end + + output end end end diff --git a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/language.rb b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/language.rb index 7ea6dc90f60..f320caace7d 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/language.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/language.rb @@ -165,7 +165,7 @@ module TeX # Strictly speaking a misnomer, because grc-x-ibycus should also return true. # But useful for a number of apostrophe-related routines def isgreek? - ['grc', 'el-polyton', 'el-monoton'].include? @bcp47 + ['grc', 'el-polyton', 'el-monoton', 'grc-x-ibycus'].include? @bcp47 end def serbian? diff --git a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive.rb b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive.rb index 45dd33da047..687b0511cfd 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive.rb @@ -1,3 +1,6 @@ +# TODO Make it so we can load this direct; +# at the moment require 'tex/hyphen/texlive' fails +# unless we did require 'tex/hyphen' first (Psych isn’t found) require_relative 'texlive/source' require_relative 'texlive/loader' require_relative 'texlive/package' diff --git a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/package.rb b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/package.rb index eae915aca03..e224be18fc9 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/package.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/package.rb @@ -97,17 +97,17 @@ module TeX files = [] files << "tex/generic/hyph-utf8/patterns/tex/hyph-no.tex" if name == "norwegian" - files = languages.inject(files) do |files, language| - files + language.list_run_files + languages.each do |language| + files += language.list_run_files end unless has_dependency? languages.each do |language| if language.use_old_patterns_comment and language.legacy_patterns != "zerohyph.tex" and language.bcp47 != 'cop' - if ['la-x-classic', 'mk'].include? language.bcp47 # FIXME. Yes, fix it ;-) - files << sprintf("tex/generic/hyph-utf8/patterns/tex-8bit/%s", language.legacy_patterns) - else + if language.isgreek? files << sprintf("tex/generic/hyphen/%s", language.legacy_patterns) + else + files << sprintf("tex/generic/hyph-utf8/patterns/tex-8bit/%s", language.legacy_patterns) end end end diff --git a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/source.rb b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/source.rb index 172b9b0a60b..60b0d7d0966 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/source.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/lib/tex/hyphen/texlive/source.rb @@ -19,7 +19,7 @@ module TeX # ext: 'pat' or 'hyp' # filetype: 'patterns' or 'exceptions' def plain_text_line(ext, filetype) # TODO Figure out if we will sr-cyrl to be generated again - return "" if ['ar', 'fa', 'grc-x-ibycus', 'mn-cyrl-x-lmc'].include? @bcp47 + return "" if ['ar', 'fa', 'he', 'vi', 'grc-x-ibycus', 'mn-cyrl-x-lmc'].include? @bcp47 if @bcp47 =~ /^sh-/ # TODO Warning AR 2018-09-12 @@ -83,7 +83,7 @@ module TeX files << File.join(PATH::HYPHU8, 'patterns', 'tex', sprintf('hyph-%s.tex', bcp47)) # FIXME That line is awful -- AR 2020-11-22 - if encoding && encoding != "ascii" && !['la-x-classic', 'mk'].include?( bcp47) then + if encoding && encoding != "ascii" && !['la-x-classic', 'mk', 'zh-latn-pinyin'].include?( bcp47) then files << File.join(PATH::HYPHU8, 'patterns', 'ptex', sprintf('hyph-%s.%s.tex', bcp47, encoding)) elsif ['cop', 'mk'].include? bcp47 # FIXME That one too! files << File.join(PATH::HYPHU8, 'patterns', 'tex-8bit', legacy_patterns) @@ -93,7 +93,8 @@ module TeX return files if bcp47 == "mn-cyrl-x-lmc" ['pat', 'hyp'].each do |t| - files << File.join(PATH::HYPHU8, 'patterns', 'txt', sprintf('hyph-%s.%s.txt', bcp47, t)) + file = File.join(PATH::HYPHU8, 'patterns', 'txt', sprintf('hyph-%s.%s.txt', bcp47, t)) + files << file if File.exist? File.join('hyph-utf8', file) end if bcp47 =~ /^sh-/ @@ -105,6 +106,7 @@ module TeX end end + # byebug if bcp47 == 'zh-latn-pinyin' files end diff --git a/Master/texmf-dist/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb b/Master/texmf-dist/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb index f93f18c340a..187bf671107 100644 --- a/Master/texmf-dist/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb +++ b/Master/texmf-dist/source/generic/hyph-utf8/spec/tex/hyphen/language_spec.rb @@ -124,7 +124,7 @@ describe Language do it "lists all languages" do # All the TeX files. Note [no] and [mn-cyrl-x-lmc] don’t have corresponding plain text files. - expect(Language.languages.count).to eq 85 # Was 79; 3 more “TeX Live dummies” [ar] [fa] [grc-x-ibycus] TODO Maybe remove + expect(Language.languages.count).to eq 87 # Was 79; 3 more “TeX Live dummies” [ar] [fa] [grc-x-ibycus] TODO Maybe remove # Now 87 on 2025-02-14 end end @@ -133,8 +133,8 @@ describe Language do expect(Language.all).to be_an Array end - it "returns 81 languages" do # That’s all of them except for [sr-cyrl] - expect(Language.all.count).to eq 84 + it "returns 86 languages" do # That’s all of them except for [sr-cyrl] + expect(Language.all.count).to eq 86 end end @@ -686,8 +686,8 @@ describe Language do expect(Language.new('la').isgreek?).to be_falsey end - it "exceptionally returns false for Ibycus" do - expect(Language.new('grc-x-ibycus').isgreek?).to be_falsey + it "now returns true for Ibycus too" do + expect(Language.new('grc-x-ibycus').isgreek?).to be_truthy end end @@ -725,7 +725,7 @@ describe Language do end it "includes an empty line for Arabic and Farsi" do - expect(Language.new('ar').list_loader).to eq "file=zerohyph.tex \\\n\tfile_patterns=" + expect(Language.new('ar').list_loader).to eq "file=hyph-ar.tex \\\n\tfile_patterns=" end it "includes a Lua special line for Ibycus" do @@ -735,12 +735,17 @@ describe Language do describe '#list_run_files' do it "returns the list of TeX file" do - # puts Language.new('ka').list_run_files expect(Language.new('ka').list_run_files).to eq ['tex/generic/hyph-utf8/loadhyph/loadhyph-ka.tex', 'tex/generic/hyph-utf8/patterns/tex/hyph-ka.tex', 'tex/generic/hyph-utf8/patterns/ptex/hyph-ka.t8m.tex', - 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.pat.txt', - 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.hyp.txt'] + 'tex/generic/hyph-utf8/patterns/txt/hyph-ka.pat.txt'] + end + + it "works correctly" do + expect(Language.new('zh-latn-pinyin').list_run_files).to eq [ + 'tex/generic/hyph-utf8/loadhyph/loadhyph-zh-latn-pinyin.tex', + 'tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex', + 'tex/generic/hyph-utf8/patterns/txt/hyph-zh-latn-pinyin.pat.txt'] end end @@ -989,7 +994,10 @@ describe Converter do it "reads the conversion data" do converter = Converter.new converter.read(File.join(File.expand_path(__dir__), '..', '..', '..', 'data', 'encodings', 'macedonian.dat')) - puts converter.instance_variable_get(:@mapping) + mapping = converter.instance_variable_get(:@mapping) + expect(mapping).to be_a Hash + expect(mapping.count).to be_equal 42 + expect(mapping[248]).to be == 'ш' end end @@ -997,7 +1005,9 @@ describe Converter do it "runs one pass through the file" do converter = Converter.new converter.read(File.join(File.expand_path(__dir__), '..', '..', '..', 'data', 'encodings', 'macedonian.dat')) - converter.convert(File.join(File.expand_path(__dir__), '..', '..', '..', '..', '..', '..', '..', 'old', 'other', 'mk', 'mkhyphen.tex')) + mkconv = converter.convert(File.join(File.expand_path(__dir__), '..', '..', '..', '..', '..', '..', '..', 'old', 'other', 'mk', 'mkhyphen.tex')) + expect(mkconv.each_line.count).to eq 725 + expect(mkconv).to be =~ /1шу$/ end end end diff --git a/Master/texmf-dist/source/generic/hyph-utf8/tlpsrc.zip b/Master/texmf-dist/source/generic/hyph-utf8/tlpsrc.zip Binary files differdeleted file mode 100644 index 5bb6035b40e..00000000000 --- a/Master/texmf-dist/source/generic/hyph-utf8/tlpsrc.zip +++ /dev/null diff --git a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-zh-latn-pinyin.ec.tex b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-zh-latn-pinyin.ec.tex new file mode 100644 index 00000000000..89c1910cd64 --- /dev/null +++ b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-zh-latn-pinyin.ec.tex @@ -0,0 +1,255 @@ +% title: Hyphenation patterns for Chinese pinyin (Mandarin), without tone +% markers +% +% version: 2018-11-25 +% +% authors: +% - +% name: Werner Lemberg +% contact: wl (at) gnu.org +% +% copyright: Copyright (C) 1994-2018 Werner Lemberg +% +% licence: +% name: MIT +% url: http://opensource.org/licenses/mit-license.php +% text: > +% Permission is hereby granted, free of charge, to any person +% obtaining a copy of this software and associated documentation +% files (the “Software”), to deal in the Software without +% restriction, including without limitation the rights to use, +% copy, modify, merge, publish, distribute, sublicense, and/or +% sell copies of the Software, and to permit persons to whom the +% Software is furnished to do so, subject to the following +% conditions: +% +% The above copyright notice and this permission notice shall be +% included in all copies or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +% OTHER DEALINGS IN THE SOFTWARE. +% +% source: http://git.savannah.gnu.org/gitweb/?p=cjk.git;a=commit;h=e058ceae5561a89e33828f593b094c8b57f6a72e +% +% language: +% name: Mandarin Chinese, pinyin transliteration +% tag: zh-latn-pinyin +% +% hyphenmins: +% generation: +% left: 1 +% right: 2 +% typesetting: +% left: 1 +% right: 2 + +% ========================================== + +% +% The used patgen parameters are +% +% 1 1 | 2 5 | 1 1 1 +% 2 2 | 2 5 | 1 2 1 +% + +\lccode"FC="FC + +\patterns{ +a1b +a1c +a1d +a1f +a1g +a1h +a1j +a1k +a1l +a1m +a1p +a1q +a1r +a1s +a1t +a1w +a1x +a1y +a1z +e1b +e1c +e1d +e1f +e1g +e1h +e1j +e1k +e1l +e1m +e1p +e1q +e1r +e1s +e1t +e1w +e1x +e1y +e1z +1ga +g1b +g1c +g1d +1ge +g1f +g1g +g1h +g1j +g1k +g1l +g1m +g1n +1go +g1p +g1q +g1r +g1s +g1t +1gu +g1w +g1x +g1y +g1z +i1b +i1c +i1d +i1f +i1g +i1h +i1j +i1k +i1l +i1m +i1p +i1q +i1r +i1s +i1t +i1w +i1x +i1y +i1z +1na +n1b +n1c +n1d +1ne +n1f +n1h +1ni +n1j +n1k +n1l +n1m +n1n +1no +n1p +n1q +n1r +n1s +n1t +1nu +1n^^fc +n1w +n1x +n1y +n1z +o1b +o1c +o1d +o1f +o1g +o1h +o1j +o1k +o1l +o1m +o1p +o1q +o1r +o1s +o1t +o1w +o1x +o1y +o1z +2r1b +2r1c +2r1d +2r1f +2r1g +2r1h +2r1j +2r1k +2r1l +2r1m +2r1n +2r1p +2r1q +2r1r +2r1s +2r1t +2r1w +2r1x +2r1y +2r1z +u1b +u1c +u1d +u1f +u1g +u1h +u1j +u1k +u1l +u1m +u1p +u1q +u1r +u1s +u1t +u1w +u1x +u1y +u1z +^^fc1b +^^fc1c +^^fc1d +^^fc1f +^^fc1g +^^fc1h +^^fc1j +^^fc1k +^^fc1l +^^fc1m +^^fc1n +^^fc1p +^^fc1q +^^fc1r +^^fc1s +^^fc1t +^^fc1w +^^fc1x +^^fc1y +^^fc1z +} + +\endinput + +%%% Local Variables: +%%% mode: tex +%%% coding: utf-8 +%%% End: diff --git a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ar.tex b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ar.tex index 42fded70680..22891ad4340 100644 --- a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ar.tex +++ b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ar.tex @@ -1,23 +1,24 @@ % title: (No) Hyphenation patterns for Arabic -% copyright: Copyright (C) Arthur Reutenauer 2018 +% copyright: Copyright (C) Arthur Rosendahl 2018, 2025 % notice: This file is part of the hyph-utf8 package. % See http://www.hyphenation.org/tex for more information. % language: % name: Arabic % tag: ar -% version: 0 +% version: 1 % authors: -% - Arthur Reutenauer +% - Arthur Rosendahl % licence: % - % name: MIT % hyphenmins: % typesetting: -% left: -% right: +% left: 0 +% right: 0 % texlive: % babelname: arabic % use_old_loader: true -% legacy_patterns: zerohyph.tex +% legacy_patterns: hyph-ar.tex % message: % description: Prevent hyphenation in Arabic. +\patterns{} diff --git a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-fa.tex b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-fa.tex index e49c2cab19e..4eac8475f04 100644 --- a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-fa.tex +++ b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-fa.tex @@ -1,25 +1,26 @@ % title: (No) Hyphenation patterns for Persian -% copyright: Copyright (C) Arthur Reutenauer 2018 +% copyright: Copyright (C) Arthur Rosendahl 2018, 2025 % notice: This file is part of the hyph-utf8 package. % See http://www.hyphenation.org/tex for more information. % language: % name: Persian % tag: fa -% version: 0 +% version: 1 % authors: -% - Arthur Reutenauer +% - Arthur Rosendahl % licence: % - % name: MIT % hyphenmins: % typesetting: -% left: -% right: +% left: 0 +% right: 0 % texlive: % babelname: farsi % synonyms: % - persian % use_old_loader: true -% legacy_patterns: zerohyph.tex +% legacy_patterns: hyph-fa.tex % message: % description: Prevent hyphenation in Persian. +\patterns{} diff --git a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-he.tex b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-he.tex new file mode 100644 index 00000000000..f1c0a93447f --- /dev/null +++ b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-he.tex @@ -0,0 +1,25 @@ +% title: (No) Hyphenation patterns for Hebrew +% copyright: Copyright (C) Arthur Rosendahl 2025 +% notice: |- +% This file is part of the hyph-utf8 package. +% See http://www.hyphenation.org/tex for more information. +% language: +% name: Hebrew +% tag: he +% version: 1 +% authors: +% - Arthur Rosendahl +% licence: +% - +% name: MIT +% hyphenmins: +% typesetting: +% left: 0 +% right: 0 +% texlive: +% babelname: hebrew +% use_old_loader: true +% legacy_patterns: hyph-he.tex +% message: +% description: Prevents hyphenation in Arabic. +\patterns{} diff --git a/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-vi.tex b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-vi.tex new file mode 100644 index 00000000000..350086f17a8 --- /dev/null +++ b/Master/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-vi.tex @@ -0,0 +1,25 @@ +% title: (No) Hyphenation patterns for Vietnamese +% copyright: Copyright (C) Arthur Rosendahl 2025 +% notice: |- +% This file is part of the hyph-utf8 package. +% See http://www.hyphenation.org/tex for more information. +% language: +% name: Vietnamese +% tag: vi +% version: 1 +% authors: +% - Arthur Rosendahl +% licence: +% - +% name: MiT +% hyphenmins: +% typesetting: +% left: 0 +% right: 0 +% texlive: +% babelname: vietnamese +% use_old_loader: true +% legacy_patterns: hyph-vi.tex +% message: +% description: Prevents hyphenation in Vietnamese. +\patterns{} diff --git a/Master/tlpkg/bin/tl-hyph-test b/Master/tlpkg/bin/tl-hyph-test index cdf79a2c1a9..8d34dae4745 100755 --- a/Master/tlpkg/bin/tl-hyph-test +++ b/Master/tlpkg/bin/tl-hyph-test @@ -24,15 +24,16 @@ # # After the first time, when the checkout already exists: #cd $tmpdir -#rm -rf inst catdump.pl -#svn update -q Master # get updates made in the meantime -#svn status Master # make sure it's completely clean +#rm -rf inst catdump.pl # clean up from last time +#svn update -q Master # get updates made in the meantime (30-60min) +#svn status Master # make sure it's completely clean # # Unzip the new hyph-utf tree in our temp checkout. #pushd Master/texmf-dist #ls -l $CTAN/install/language/hyph-utf8.tds.zip # ensure new file on ctan #unzip !$ # overwrite All # In that unzip command, overwrite All symlinks with the regular files. +# (Can't use -q since we have to do this overwrite.) # On tug.org, CTAN=/home/ftp/tex-archive. # (This unzip won't remove any no-longer-distributed files, but that # seems like too much trouble to deal with here. The final commit @@ -42,18 +43,23 @@ #cd ../tlpkg/tlpsrc #unzip -j ../../texmf-dist/source/generic/hyph-utf8/tlpsrc.zip # overwrite All # -# Back to top level of $tmpdir (the one with the ./Master subdir) -# for cleanliness, and run this script. +# No tlpsrc should have any non-ASCII characters. If so, change them. +# +# Back to top level of $tmpdir (the one with the ./Master subdir). #popd +# +# See what we've got. #svn status Master # if new package/file has been added, set newpkg/file below #svn diff Master >/tmp/sdh # review changes +# +# When ready, run this script: #./Master/tlpkg/bin/tl-hyph-test # # Once it all works, can install hyph-utf8 with ctan2tl as usual; # don't just commit here, so additions and removals will be correct. # Also, good to run a test build right after committing since there is a # good chance of failure, despite all the testing: -#force_rebuild=true cron.trunk +#force_rebuild=true cron.trunk # or cron.pretest, if during pretest # # To clean up here: #rm -rf inst tmp catdump.pl @@ -67,8 +73,8 @@ : ${do_lang_files=true} : ${do_install=true} : ${do_pkgs=true} -: ${newpkg=hyphen-romansh} # and the package it's in -: ${newfile=hyph-rm.ec.tex} # some new file in the new release +: ${newfile=hyph-he.tex} # some new file in the new release +: ${newpkg=hyphen-hebrew} # and the package it's in real0=`realpath $0` mydir=`cd \`dirname "$real0"\` && pwd` # tlpkg/bin @@ -110,18 +116,22 @@ if $do_tlpdb; then # If running this multiple times, can use --catalogue-dump # to avoid rereading the XML every time; just don't forget # to remove the dump file when done, or it will never get updated. + # If you want to sit around waiting for the Catalogue reading every time, + # can just disable as shown. catdump="--catalogue-dump $top/catdump.pl" #; catdump= # -v for progress; -vv for extremely voluminous debugging. # --save-anyway because there will probably be revision decreases. - # --from-files because we don't want to commit the new files. + # --from-files because we don't want to commit the new files, + # so the script has to read the filesystem, not svn. opts="-v --save-anyway --from-files $nocat $catdump" set -x $Master/tlpkg/bin/tl-update-tlpdb $opts || exit 1; set +x fi # # we intentionally use tlmgr instead of grepping tlpdb directly -# just to make sure it's all working normally. +# to make sure it's working normally. + if tlmgr info --list $newpkg | grep /$newfile'$' >/dev/null; then :; else echo "$0: tlmgr could not find new file, tlpdb problem?: $newfile" >&2 exit 1 diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 327c988b8d2..466d427f4c7 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -7406,19 +7406,26 @@ sub POSThustthesis { sub POSThyph_utf8 { print "POST$package - unpack tlpsrc, etc.\n"; - print "*** !!! c2l p failure? ran ctan2tl p by hand last time\n"; # ??? print "*** Before committing from this:\n"; - print "*** read leading comments in tlpkg/bin/tl-hyph-test and run it!\n"; + print "*** read leading comments in tlpkg/bin/tl-hyph-test and run it!\n"; print "*** \n"; - print "*** All *hyph[en]-* files will not be matched, in own pkgs.\n"; - print "*** Similarly, when committing, ignore svn add errors.\n"; - print "*** Finally, when ready here, add new hyphen-* pkgs to coll*-*.\n"; + print "*** After tl-hyph-test is ok, and still before committing:\n"; + print "*** add new hyphen-* pkgs to collection-lang*.\n"; + print "*** \n"; + print "*** If all ok, then commit.\n"; + print "*** Final commit will have svn add errors per below; ignore.\n"; + print "*** \n"; + print "*** After commit, manually rebuild:\n"; + print "*** env force_rebuild=true cron.trunk # or cron.pretest\n"; + print "*** \n"; + print "*** All *hyph[en]-* files (etc.) will not be matched, in own pkgs.\n"; my $tlpsrc_dir = "$TOPDEST/tlpkg/tlpsrc"; &xmkdir ($tlpsrc_dir); &xchdir ($tlpsrc_dir); # my $pkgsrc_dir = "$DEST/source/generic/$package"; - &xsystem ("unzip -j $pkgsrc_dir/tlpsrc.zip"); # junk top dir in zip + &xsystem ("unzip -j $pkgsrc_dir/tlpsrc.zip"); # junk top dir in tlpsrc.zip + &SYSTEM ("$RM $pkgsrc_dir/tlpsrc.zip"); # no need for tlpsrc.zip } sub POSTibygrk { diff --git a/Master/tlpkg/tlpsrc/collection-langother.tlpsrc b/Master/tlpkg/tlpsrc/collection-langother.tlpsrc index d1cbc4a7e34..e05cf623a3a 100644 --- a/Master/tlpkg/tlpsrc/collection-langother.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langother.tlpsrc @@ -43,12 +43,14 @@ depend hyphen-coptic depend hyphen-esperanto depend hyphen-ethiopic depend hyphen-georgian +depend hyphen-hebrew depend hyphen-indic depend hyphen-indonesian depend hyphen-interlingua depend hyphen-sanskrit depend hyphen-thai depend hyphen-turkmen +depend hyphen-vietnamese depend latex-mr depend latexbangla depend latino-sine-flexione diff --git a/Master/tlpkg/tlpsrc/hyphen-ancientgreek.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-ancientgreek.tlpsrc index 3568aef4a35..b8988980dc3 100644 --- a/Master/tlpkg/tlpsrc/hyphen-ancientgreek.tlpsrc +++ b/Master/tlpkg/tlpsrc/hyphen-ancientgreek.tlpsrc @@ -20,7 +20,6 @@ execute AddHyphen \ file=ibyhyph.tex \ luaspecial="disabled:8-bit only" runpattern f texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex -runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-grc-x-ibycus.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-grc.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/txt/hyph-grc.pat.txt runpattern f texmf-dist/tex/generic/hyphen/grahyph5.tex diff --git a/Master/tlpkg/tlpsrc/hyphen-arabic.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-arabic.tlpsrc index 22568545fba..78b4dd67bd0 100644 --- a/Master/tlpkg/tlpsrc/hyphen-arabic.tlpsrc +++ b/Master/tlpkg/tlpsrc/hyphen-arabic.tlpsrc @@ -7,6 +7,5 @@ execute AddHyphen \ name=arabic \ lefthyphenmin=0 \ righthyphenmin=0 \ - file=zerohyph.tex \ + file=hyph-ar.tex \ file_patterns= -runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ar.tex diff --git a/Master/tlpkg/tlpsrc/hyphen-chinese.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-chinese.tlpsrc index be477f21714..ae2bb3ecf8d 100644 --- a/Master/tlpkg/tlpsrc/hyphen-chinese.tlpsrc +++ b/Master/tlpkg/tlpsrc/hyphen-chinese.tlpsrc @@ -13,6 +13,6 @@ execute AddHyphen \ file_patterns=hyph-zh-latn-pinyin.pat.txt \ file_exceptions= runpattern f texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-zh-latn-pinyin.tex -runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/ptex/hyph-zh-latn-pinyin.ec.tex +runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-zh-latn-pinyin.ec.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/txt/hyph-zh-latn-pinyin.pat.txt diff --git a/Master/tlpkg/tlpsrc/hyphen-farsi.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-farsi.tlpsrc index d57e2080fd9..426f88008de 100644 --- a/Master/tlpkg/tlpsrc/hyphen-farsi.tlpsrc +++ b/Master/tlpkg/tlpsrc/hyphen-farsi.tlpsrc @@ -7,6 +7,5 @@ execute AddHyphen \ name=farsi synonyms=persian \ lefthyphenmin=0 \ righthyphenmin=0 \ - file=zerohyph.tex \ + file=hyph-fa.tex \ file_patterns= -runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-fa.tex diff --git a/Master/tlpkg/tlpsrc/hyphen-hebrew.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-hebrew.tlpsrc new file mode 100644 index 00000000000..8c381235332 --- /dev/null +++ b/Master/tlpkg/tlpsrc/hyphen-hebrew.tlpsrc @@ -0,0 +1,10 @@ +category TLCore +depend hyphen-base +depend hyph-utf8 +shortdesc Hebrew hyphenation patterns. +longdesc Prevents hyphenation in Arabic. +execute AddHyphen \ + name=hebrew \ + lefthyphenmin=0 \ + righthyphenmin=0 \ + file=hyph-he.tex diff --git a/Master/tlpkg/tlpsrc/hyphen-romansh.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-romansh.tlpsrc index cfc8140aef4..136341e5cec 100644 --- a/Master/tlpkg/tlpsrc/hyphen-romansh.tlpsrc +++ b/Master/tlpkg/tlpsrc/hyphen-romansh.tlpsrc @@ -15,6 +15,5 @@ execute AddHyphen \ file_exceptions= runpattern f texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-rm.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/ptex/hyph-rm.ec.tex -runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/quote/hyph-quote-rm.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-rm.tex runpattern f texmf-dist/tex/generic/hyph-utf8/patterns/txt/hyph-rm.pat.txt diff --git a/Master/tlpkg/tlpsrc/hyphen-vietnamese.tlpsrc b/Master/tlpkg/tlpsrc/hyphen-vietnamese.tlpsrc new file mode 100644 index 00000000000..de12657976b --- /dev/null +++ b/Master/tlpkg/tlpsrc/hyphen-vietnamese.tlpsrc @@ -0,0 +1,10 @@ +category TLCore +depend hyphen-base +depend hyph-utf8 +shortdesc Vietnamese hyphenation patterns. +longdesc Prevents hyphenation in Vietnamese. +execute AddHyphen \ + name=vietnamese \ + lefthyphenmin=0 \ + righthyphenmin=0 \ + file=hyph-vi.tex |