diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2012-04-16 20:27:04 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2012-04-16 20:27:04 +0000 |
commit | 9d51929278483d4f1cbfe10dee38085f3ca4811c (patch) | |
tree | 3e821b4ce9b13388442fc5ca2836b0449ed2f755 /Master/texmf-dist/source/luatex | |
parent | 20243b2f81048fc1b1a3e3f743bdb1517148d9b7 (diff) |
hyph-utf8 (16apr12)
- fix babel synonyms in lualatex, upgrade from babel v3.8l to v.3.8m for hyphen.cfg
- remove brazil,brazilian from hyphen-portuguese.tlpsrc (temporary patch no longer needed)
- remove catalogue version from all hyphen-<foo>.tlpsrc
git-svn-id: svn://tug.org/texlive/trunk@25990 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.dtx | 52 |
1 files changed, 41 insertions, 11 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 36c0851ce1f..1f7b346b9cb 100644 --- a/Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx +++ b/Master/texmf-dist/source/luatex/hyph-utf8/luatex-hyphen.dtx @@ -4,8 +4,8 @@ % intended for use with LuaTeX, but compatible with other engines. % The present file IS NOT part of the babel system. % -% The modifications are Copyright 2010 Khaled Hosny, Elie Roux, and Manuel -% Pegourie-Gonnard, under LPPL version 1.3 or later. +% The modifications are Copyright 2012 Khaled Hosny, Élie Roux, and Manuel +% Pégourié-Gonnard, under LPPL version 1.3 or later. % % Here is the licence statement of the original hyphen.cfg file: % | @@ -47,7 +47,7 @@ This is a modified version of the hyphen.cfg file from the babel system, intended for use with LuaTeX, but compatible with other engines. The present file IS NOT part of the babel system. -The modifications are Copyright 2010 Khaled Hosny, Elie Roux, and Manuel +The modifications are Copyright 2012 Khaled Hosny, Elie Roux, and Manuel Pegourie-Gonnard, under LPPL version 1.3 or later. Here is the licence statement of the original hyphen.cfg file: @@ -88,7 +88,7 @@ Here is the licence statement of the original hyphen.cfg file: This is a generated file (source: luatex-hyphen.dtx). -Copyright (C) 2010 by The LuaLaTeX development team. +Copyright (C) 2012 by The LuaLaTeX development team. This work is under the CC0 license. @@ -106,9 +106,9 @@ This work is under the CC0 license. %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luatex-hyphen.drv} - [2010/04/28 v1.4 Hyphenation file for LuaTeX] + [2012/04/16 v1.5 Hyphenation file for LuaTeX] \documentclass{ltxdoc} -\usepackage[ascii]{inputenc} +\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \EnableCrossrefs @@ -140,8 +140,8 @@ This work is under the CC0 license. % \GetFileInfo{luatex-hyphen.drv} % % \title{The \texttt{hyphen.cfg} file for Lua\TeX } -% \date{2010/04/28 v1.4} -% \author{Khaled Hosny, \'Elie Roux, and Manuel P\'egouri\'e-Gonnard\\ +% \date{2012/04/16 v1.5} +% \author{Khaled Hosny, Élie Roux, and Manuel Pégourié-Gonnard\\ % \texttt{khaledhosny@eglug.org} \\ % \texttt{elie.roux@telecom-bretagne.eu} \\ % \texttt{mpg@elzevir.fr}} @@ -198,7 +198,7 @@ This work is under the CC0 license. % 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. +% plain text files encoded in UTF-8, with only patterns (resp. % exceptions) and not even comments: their content will be used % directly without being parsed by \TeX. If one of these keys is % missing or is the empty string, it is ignored and no patterns (resp. @@ -312,6 +312,9 @@ end % % \begin{macrocode} function loadlanguage(lname, id) + if id == 0 then + return + end local msg = "loading%s patterns and exceptions for: %s (\\language%d)" % \end{macrocode} % @@ -360,6 +363,16 @@ function loadlanguage(lname, id) end end end +function adddialect(dialect, language) + if dialect ~= '0' then + dialect = dialect:gsub('l@', '') + language = language:gsub('l@', '') + data = language_dat[language] + if data then + data.synonyms[#data.synonyms+1] = dialect + end + end +end % \end{macrocode} % % \begin{macrocode} @@ -434,8 +447,8 @@ end % % \begin{macrocode} \ProvidesFile{hyphen.cfg} - [2010/04/26 v3.8l-luatex-1.4 % - Language switching mechanism for LuaTeX, adapted from babel v3.8l] + [2012/04/16 v3.8l-luatex-1.5 % + Language switching mechanism for LuaTeX, adapted from babel v3.8m] % \end{macrocode} % % \begin{macrocode} @@ -464,6 +477,16 @@ end \fi \def\adddialect#1#2{% \global\chardef#1#2\relax + \ifx\directlua\@undefined\else + \ifx\directlua\relax\else + \directlua{ + if not luatexhyphen then + dofile(assert(kpse.find_file("luatex-hyphen.lua"))) + end + luatexhyphen.adddialect("\string#1", "\string#2") + }% + \fi + \fi \wlog{\string#1 = a dialect from \string\language#2}} \def\iflanguage#1{% \expandafter\ifx\csname l@#1\endcsname\relax @@ -801,6 +824,8 @@ end \message{I couldn't find the file language.dat,\space I will try the file hyphen.tex} \input hyphen.tex\relax + \def\l@english{0}% + \def\languagename{english}% \else \last@language\m@ne \loop @@ -811,11 +836,16 @@ end \else \edef\bbl@line{\bbl@line\space/}% \expandafter\process@line\bbl@line + \ifx\bbl@defaultlanguage\@undefined + \let\bbl@defaultlanguage\languagename + \fi \fi \iftrue \csname fi\endcsname \csname if\ifeof1 false\else true\fi\endcsname \repeat \language=0 + \let\languagename\bbl@defaultlanguage + \let\bbl@defaultlanguage\@undefined \fi \closein1 \let\process@language\@undefined |