From 11b4c0c9232ddb2eacc88676103ed3dd5ce0c9fc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 13 Aug 2017 21:02:06 +0000 Subject: babel-ukrainian git-svn-id: svn://tug.org/texlive/trunk@45036 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/generic/babel-ukrainian/README.md | 8 +- .../doc/generic/babel-ukrainian/ukraineb.pdf | Bin 447411 -> 492314 bytes .../source/generic/babel-ukrainian/ukraineb.dtx | 141 ++++++++++++--------- .../tex/generic/babel-ukrainian/ukraineb.ldf | 17 ++- 4 files changed, 100 insertions(+), 66 deletions(-) diff --git a/Master/texmf-dist/doc/generic/babel-ukrainian/README.md b/Master/texmf-dist/doc/generic/babel-ukrainian/README.md index 1896280a2f1..573727617e1 100644 --- a/Master/texmf-dist/doc/generic/babel-ukrainian/README.md +++ b/Master/texmf-dist/doc/generic/babel-ukrainian/README.md @@ -1,6 +1,6 @@ ---------------------------------------------------------------- -Ukrainian language module for Babel, v1.4a +Ukrainian language module for Babel, v1.4b Released under the LaTeX Project Public License v1.3c or later. See http://www.latex-project.org/lppl.txt @@ -81,6 +81,12 @@ files as they might have stored incompatible internal encodings. 5. CHANGES +2017-08-10 version 1.4b + + * Default for \cyrdash is provided. + * TU encoding is set as default for XeTeX and LuaTeX; EU1 and EU2 encodings + are kept for backward compatibility. + 2017-06-13 version 1.4a * Removing \weekday macro, since it is should be define in datetime2 class diff --git a/Master/texmf-dist/doc/generic/babel-ukrainian/ukraineb.pdf b/Master/texmf-dist/doc/generic/babel-ukrainian/ukraineb.pdf index d85d5881f59..106104c581e 100644 Binary files a/Master/texmf-dist/doc/generic/babel-ukrainian/ukraineb.pdf and b/Master/texmf-dist/doc/generic/babel-ukrainian/ukraineb.pdf differ diff --git a/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx b/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx index cc1f35d1bb5..f66e293a91c 100644 --- a/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx +++ b/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx @@ -6,7 +6,7 @@ %<*readme> ---------------------------------------------------------------- -Ukrainian language module for Babel, v1.4a +Ukrainian language module for Babel, v1.4b Released under the LaTeX Project Public License v1.3c or later. See http://www.latex-project.org/lppl.txt @@ -90,6 +90,12 @@ files as they might have stored incompatible internal encodings. 5. CHANGES +2017-08-10 version 1.4b + + * Default for \cyrdash is provided. + * TU encoding is set as default for XeTeX and LuaTeX; EU1 and EU2 encodings + are kept for backward compatibility. + 2017-06-13 version 1.4a * Removing \weekday macro, since it is should be define in datetime2 class @@ -188,8 +194,8 @@ and the derived files ukraineb.ins, % %<*code> \NeedsTeXFormat{LaTeX2e} -%\ProvidesLanguage{\jobname}[2017/06/13 1.4a Ukrainian support for the Babel system] -\ProvidesLanguage{ukraineb}[2017/06/13 1.4a Ukrainian support for the Babel system] +%\ProvidesLanguage{\jobname}[2017/08/10 1.4b Ukrainian support for the Babel system] +\ProvidesLanguage{ukraineb}[2017/08/10 1.4b Ukrainian support for the Babel system] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -787,39 +793,41 @@ and the derived files ukraineb.ins, % % % \Describe\cyrillicencoding{} -% There is a limited list of encodings appropriate for Cyrillic text. We -% will look which of them is declared and keep its name in the macro -% |\cyrillicencoding|. -% Correct (but obsolete and now deleted) 7-bit Cyrillic encoding is -% \texttt{LWN}. -% Correct 8-bit Cyrillic encodings are -% \texttt{T2A} (default for 8-bit compilers), \texttt{T2B}, \texttt{T2C}, -% \texttt{LCY} and \texttt{X2}. -% Correct utf8 encodings are -% \texttt{EU1} (default for Xe\LaTeX), -% \texttt{EU2} (default for Lua\LaTeX). -% -% In 8-bit (\LaTeX) mode, user may choose between different non-unicode Cyrillic -% encodings---e.g., \texttt{X2} or \texttt{LCY}.\@ If user wants -% to use another font encoding rather than default (\texttt{T2A}), -% he has to load the corresponding file \emph{before} \file{babel.sty}. -% -% Remember that for the Ukrainian language, the \texttt{T2A} encoding is -% better than \texttt{X2}, because \texttt{X2} does not contain Latin -% letters, and users should be very careful to switch the language -% every time they want to typeset a Latin word inside a Ukrainian phrase -% or vice versa. -% -% -% We parse the |\cdp@list| containing encodings known to \LaTeX\ -% in the order they were loaded by the time when \babel{} is loaded. -% We set the |\cyrillicencoding| to the \emph{last} loaded encoding in the -% list of supported Cyrillic encodings: \texttt{OT2}, \texttt{LCY}, -% \texttt{X2}, \texttt{T2C}, \texttt{T2B}, \texttt{T2A}. In Unicode mode -% we also try the Unicode encodings \texttt{EU1} and \texttt{EU2}; 8-bit -% encodings are kept for Unicode compilers (Lua\LaTeX\ and Xe\LaTeX) since -% they can run in compatibility (8-bit) mode. -% +% There is a limited list of encodings appropriate for Cyrillic text. We +% will look which of them is declared and keep its name in the macro +% |\cyrillicencoding|. +% Correct (but obsolete and now deleted) 7-bit Cyrillic encoding is +% \texttt{LWN}. +% Correct 8-bit Cyrillic encodings are +% \texttt{T2A} (default for 8-bit compilers), \texttt{T2B}, \texttt{T2C}, +% \texttt{LCY} and \texttt{X2}. +% Correct utf8 encodings are +% \texttt{TU} (default for Xe\LaTeX\ and Lua\LaTeX), +% \texttt{EU1} (obsolete, formerly used for Xe\LaTeX), +% \texttt{EU2} (obsolete, formerly used for Lua\LaTeX). +% +% In 8-bit (\LaTeX) mode, user may choose between different non-unicode Cyrillic +% encodings---e.g., \texttt{X2} or \texttt{LCY}.\@ If user wants +% to use another font encoding rather than default (\texttt{T2A}), +% he has to load the corresponding file \emph{before} \file{babel.sty}. +% +% Remember that for the Ukrainian language, the \texttt{T2A} encoding is +% better than \texttt{X2}, because \texttt{X2} does not contain Latin +% letters, and users should be very careful to switch the language +% every time they want to typeset a Latin word inside a Ukrainian phrase +% or vice versa. +% +% We parse the |\cdp@list| containing encodings known to \LaTeX\ +% in the order they have been loaded by the time \pkg{babel} is called. +% We set the |\cyrillicencoding| to the \emph{last} loaded encoding in the +% list of supported Cyrillic encodings: \texttt{OT2}, \texttt{LCY}, +% \texttt{X2}, \texttt{T2C}, \texttt{T2B}, \texttt{T2A}. In Unicode mode, +% |\cyrillicencoding| is set to \texttt{TU} by \pkg{fontspec}. Nevertheless +% here we provide similar definitions; 8-bit encodings are kept for Unicode +% compilers (Lua\LaTeX\ and Xe\LaTeX) since they can run in compatibility +% (8-bit) mode. +% +% \changes{1.4b}{2017/08/10}{TU encoding added} % \begin{macrocode} \def\@setcyrillicencoding{% \def\sce@a##1##2{% @@ -836,25 +844,28 @@ and the derived files ukraineb.ins, \sce@a{##1}{T2B}% \sce@a{##1}{T2A}% \if@ukr@uni@ode - \sce@a{##1}{EU1}% - \sce@a{##1}{EU2}% + %\sce@a{##1}{EU1}% + %\sce@a{##1}{EU2}% + \sce@a{##1}{TU}% \fi}% \cdp@list } -\@setcyrillicencoding +\ifx\cyrillicencoding\undefined + \@setcyrillicencoding +\fi \@onlypreamble\@setcyrillicencoding \@onlypreamble\sce@a \@onlypreamble\sce@b \@onlypreamble\sce@c % \end{macrocode} -% The last lines are to free the memory occupied by the macros -% |\@setcyrillicencoding| and |\sce@x| that are useless in the document. -% The contents of |\@begindocumenthook| is cleared automatically. +% The last lines are to free the memory occupied by the macros +% |\@setcyrillicencoding| and |\sce@x| that are useless in the document. +% The contents of |\@begindocumenthook| is cleared automatically. % -% If |\cyrillicencoding| is still undefined, we issue warning and provide -% reasonable default value for |\cyrillicencoding|. We then load default -% encoding definitions; we use the lowercase names (i.e., -% \texttt{lcyenc.def} instead of \texttt{LCYenc.def}) when we do that. +% If |\cyrillicencoding| is still undefined, we issue warning and provide +% reasonable default value for |\cyrillicencoding|. We then load default +% encoding definitions; we use the lowercase names (i.e., +% \texttt{lcyenc.def} instead of \texttt{LCYenc.def}) when we do that. % % \begin{macrocode} \ifdefined\cyrillicencoding @@ -1150,19 +1161,31 @@ and the derived files ukraineb.ins, % \end{macrocode} % % \Describe\cyrdash{} -% The |\cyrdash| can be defined in a fontenc file as it is done for -% the \texttt{T2*} encodings. We provide fake definition of |\cyrdash| only if -% it is not defined there. -% -% Cyrillic \texttt{T2*} fonts contains shorter (Cyrillic) emdash. It can be -% typeset also via the ligature |---|. So, if |\laticencoding| differs from -% \texttt{T2*} switching of languages also changes the emdash length typed as -% ligature in the source file. -% +% The |\cyrdash| macro is defined in Cyrillic font encodings (LCY, T2*, OT2, +% and |X2|) by means of |\DeclareTextSymbol|. In T2* encodings |\cyrdash| +% refers to same code point 22 as |\textemdash| does so that these two macros +% are equivalent. However the dash at the code point 22 have different length +% in different fonts. The dash in Cyrillic fonts LH is 20\% shorter as +% compared to Latin fonts such as CM (Computer Modern). As a result, the dash +% typed by the ligature |---| or its variations mentioned in Table +% \ref{tab:russian-quote} might change its length after |\selectlanguage|. +% +% The |\cyrdash| macro is not available in Latin encodings such as T1. Therefor +% an explicit or implicit call for |\cyrdash| when current language is English +% causes an error. For such a case, we provide a fake default. A standard check +% such as |\ifx\cyrdash\undefined ...\fi| fails to detect absent definitions +% for Latin encodings since the |\cyrdash| macro is in fact defined. Therefor +% we use the |\ProvideTextCommandDefault| method: +% \changes{1.4b}{2017/08/10}{Default for \cs{cyrdash} is provided} % \begin{macrocode} -\ProvideTextCommandDefault{\cyrdash}{\iflanguage{ukrainian}% - {\hbox to.8em{--\hss--}}{\textemdash}} -% \end{macrocode} +\PackageInfo{babel}{Default for \string\cyrdash\space is provided} +%%\ProvideTextCommandDefault{\cyrdash}{\iflanguage{ukrainian}% +%% {\hbox to.8em{--\hss--}}{\textemdash}} +\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}} +% \end{macrocode}% +% +% The |\cyrdash| macro is not defined in the Unicode encoding TU. The fake +% definition given above cope with this case. % % Finally, we define a shorthand thin space to be placed between initials % as in |D.",Mendeleev|. When used instead of |\,| as in |D.\,Mendeleev| @@ -1556,7 +1579,7 @@ and the derived files ukraineb.ins, %\iffalse % %\fi -% \CheckSum{1075} +% \CheckSum{1088} %\Finale % %% diff --git a/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf b/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf index 0668657cc70..4a65c261173 100644 --- a/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf +++ b/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf @@ -12,7 +12,7 @@ %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesLanguage{ukraineb}[2017/06/13 1.4a Ukrainian support for the Babel system] +\ProvidesLanguage{ukraineb}[2017/08/10 1.4b Ukrainian support for the Babel system] \LdfInit{ukrainian}{captionsukrainian} \ifdefined\if@ukr@uni@ode \PackageError{babel}{if@ukr@uni@ode already defined.\MessageBreak @@ -46,12 +46,15 @@ \sce@a{##1}{T2B}% \sce@a{##1}{T2A}% \if@ukr@uni@ode - \sce@a{##1}{EU1}% - \sce@a{##1}{EU2}% + %\sce@a{##1}{EU1}% + %\sce@a{##1}{EU2}% + \sce@a{##1}{TU}% \fi}% \cdp@list } -\@setcyrillicencoding +\ifx\cyrillicencoding\undefined + \@setcyrillicencoding +\fi \@onlypreamble\@setcyrillicencoding \@onlypreamble\sce@a \@onlypreamble\sce@b @@ -155,8 +158,10 @@ \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% \def\@Ccdash{\leavevmode \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% -\ProvideTextCommandDefault{\cyrdash}{\iflanguage{ukrainian}% - {\hbox to.8em{--\hss--}}{\textemdash}} +\PackageInfo{babel}{Default for \string\cyrdash\space is provided} +%%\ProvideTextCommandDefault{\cyrdash}{\iflanguage{ukrainian}% +%% {\hbox to.8em{--\hss--}}{\textemdash}} +\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}} \declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces} \if@ukr@uni@ode \PackageInfo{ukrainian.ldf}{Executing the 3.9 or latter} -- cgit v1.2.3