texlive[45036] Master/texmf-dist: babel-ukrainian
commits+karl at tug.org
commits+karl at tug.org
Sun Aug 13 23:02:07 CEST 2017
Revision: 45036
http://tug.org/svn/texlive?view=revision&revision=45036
Author: karl
Date: 2017-08-13 23:02:06 +0200 (Sun, 13 Aug 2017)
Log Message:
-----------
babel-ukrainian
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/babel-ukrainian/README.md
trunk/Master/texmf-dist/doc/generic/babel-ukrainian/ukraineb.pdf
trunk/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx
trunk/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf
Modified: trunk/Master/texmf-dist/doc/generic/babel-ukrainian/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-ukrainian/README.md 2017-08-13 21:01:50 UTC (rev 45035)
+++ trunk/Master/texmf-dist/doc/generic/babel-ukrainian/README.md 2017-08-13 21:02:06 UTC (rev 45036)
@@ -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 @@
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 \week<roman number>day macro, since it is should be define in datetime2 class
Modified: trunk/Master/texmf-dist/doc/generic/babel-ukrainian/ukraineb.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx 2017-08-13 21:01:50 UTC (rev 45035)
+++ trunk/Master/texmf-dist/source/generic/babel-ukrainian/ukraineb.dtx 2017-08-13 21:02:06 UTC (rev 45036)
@@ -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 @@
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 \week<roman number>day macro, since it is should be define in datetime2 class
@@ -188,8 +194,8 @@
%</internal>
%<*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]
%</code>
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -787,39 +793,41 @@
%
%
% \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).
+% 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}.
+% 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.
+% 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 at 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.
%
-% We parse the |\cdp at 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.
-%
+% \changes{1.4b}{2017/08/10}{TU encoding added}
% \begin{macrocode}
\def\@setcyrillicencoding{%
\def\sce at a##1##2{%
@@ -836,25 +844,28 @@
\sce at a{##1}{T2B}%
\sce at a{##1}{T2A}%
\if at ukr@uni at ode
- \sce at a{##1}{EU1}%
- \sce at a{##1}{EU2}%
+ %\sce at a{##1}{EU1}%
+ %\sce at a{##1}{EU2}%
+ \sce at a{##1}{TU}%
\fi}%
\cdp at list
}
-\@setcyrillicencoding
+\ifx\cyrillicencoding\undefined
+ \@setcyrillicencoding
+\fi
\@onlypreamble\@setcyrillicencoding
\@onlypreamble\sce at a
\@onlypreamble\sce at b
\@onlypreamble\sce at c
% \end{macrocode}
-% The last lines are to free the memory occupied by the macros
-% |\@setcyrillicencoding| and |\sce at 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 at 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,20 +1161,32 @@
% \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.
+% 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|.
%
-% 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 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|
% it allows hyphenation in the next word.
@@ -1556,7 +1579,7 @@
%\iffalse
%</code>
%\fi
-% \CheckSum{1075}
+% \CheckSum{1088}
%\Finale
%
%%
Modified: trunk/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf 2017-08-13 21:01:50 UTC (rev 45035)
+++ trunk/Master/texmf-dist/tex/generic/babel-ukrainian/ukraineb.ldf 2017-08-13 21:02:06 UTC (rev 45036)
@@ -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 at ukr@uni at ode
\PackageError{babel}{if at ukr@uni at ode already defined.\MessageBreak
@@ -46,12 +46,15 @@
\sce at a{##1}{T2B}%
\sce at a{##1}{T2A}%
\if at ukr@uni at ode
- \sce at a{##1}{EU1}%
- \sce at a{##1}{EU2}%
+ %\sce at a{##1}{EU1}%
+ %\sce at a{##1}{EU2}%
+ \sce at a{##1}{TU}%
\fi}%
\cdp at list
}
-\@setcyrillicencoding
+\ifx\cyrillicencoding\undefined
+ \@setcyrillicencoding
+\fi
\@onlypreamble\@setcyrillicencoding
\@onlypreamble\sce at a
\@onlypreamble\sce at b
@@ -155,8 +158,10 @@
\nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z at 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 at shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}
\if at ukr@uni at ode
\PackageInfo{ukrainian.ldf}{Executing the 3.9 or latter}
More information about the tex-live-commits
mailing list