summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2011-06-11 00:32:38 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2011-06-11 00:32:38 +0000
commitb439631e2c3a99a345993513013a2ace563bdd3b (patch)
tree876f2f14d92e8ca45d1f3b288a911870c406261f /Master/texmf-dist/source/luatex
parent95f2ee5a2b2d9c18b748c222ea64eacb33f2e959 (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/luatex')
-rw-r--r--Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx17
1 files changed, 11 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx b/Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx
index bca95daf0c7..c5a5af933a0 100644
--- a/Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx
+++ b/Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx
@@ -192,9 +192,11 @@ This work is under the CC0 license.
% \begin{itemize}
% \item For most languages:
% \begin{quote}
-% \verb+patterns = <string> filename for patterns+\\
-% \verb+hyphenation = <string> filename for exceptions+\\
+% \verb+patterns = <string> filenames for patterns+\\
+% \verb+hyphenation = <string> filenames for exceptions+\\
% \end{quote}
+% Each string contains a coma-separated list of file names (whitespace
+% before or after the coma is not accepted).
% The files given by \verb+patterns+ (resp. \verb+hypenation+) must be
% plain text files encoded in utf8, with only patterns (resp.
% exceptions) and not even comments: their content will be used
@@ -217,8 +219,8 @@ This work is under the CC0 license.
% \item Optional fields may be added. For example:
% \begin{quote}
% \verb+loader = <string> name of the TeX loader+\\
-% \verb+lefthyphenmin = <number> value for \letfhyphenmin+\\
-% \verb+righthyphenmin = <number> value for \letfhyphenmin+
+% \verb+lefthyphenmin = <number> value for \lefthyphenmin+\\
+% \verb+righthyphenmin = <number> value for \righthyphenmin+
% \end{quote}
% Those fields are present in \texttt{language.dat.lua} as generated bu
% \texttt{tlmgr}, for example, but they \emph{are not} used by the present
@@ -280,6 +282,7 @@ local dbfile = kpse.find_file(dbname)
if not dbfile then
err("file not found: "..dbname)
else
+ wlog('using data file: %s', dbfile)
language_dat = dofile(dbfile)
end
% \end{macrocode}
@@ -342,13 +345,15 @@ function loadlanguage(lname, id)
% \begin{macrocode}
wlog(msg, '', cname, id)
for _, item in ipairs{'patterns', 'hyphenation'} do
- local file = ldata[item]
- if file ~= nil and file ~= '' then
+ local filelist = ldata[item]
+ if filelist ~= nil and filelist ~= '' then
+ for _, file in ipairs(filelist:explode(',')) do
local file = kpse.find_file(file) or err("file not found: %s", file)
local fh = io.open(file, 'r')
local data = fh:read('*a') or err("file not readable: %s", f)
fh:close()
lang[item](lang.new(id), data)
+ end
else
if item == 'hyphenation' then item = item..' exceptions' end
wlog("info: no %s for this language", item)