1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158
|
% \iffalse meta-comment
%
% Copyright 1989-2004 Johannes L. Braams and any individual authors
% listed elsewhere in this file. All rights reserved.
%
% This file is part of the Babel system.
% --------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work is Johannes Braams.
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.bbl. See also `legal.bbl' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
% \CheckSum{1472}
%
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
% transcript.
%<*dtx>
\ProvidesFile{ukraineb.dtx}
%</dtx>
%<code>\ProvidesLanguage{ukraineb}
[2004/05/21 v1.1k Ukrainian support from the babel system]
%
%% File `ukraineb.dtx'
%% Babel package for LaTeX version 2e
%% Copyright (C) 1989 - 2004
%% by Johannes Braams, TeXniek
%
%% ukraineb Language Definition File
%% Copyright (C) 1997 - 2004
%% by Andrij Shvaika ashv at icmp.lviv.ua
%
%% derived from the Russianb Language Definition File
%% Copyright (C) 1995 - 2004
%% by Olga Lapko cyrtug at mir.msk.su
%% Johannes Braams, TeXniek
% adapted to the new T2 and X2 Cyrillic encodings
% by Vladimir Volovich TeX at vvv.vsu.ru
% Werner Lemberg wl at gnu.org
%
%% Please report errors to: J.L. Braams
%% babel at braams.cistron.nl
%
%<*filedriver>
\documentclass{ltxdoc}
\newcommand\TeXhax{\TeX hax}
\newcommand\babel{\textsf{babel}}
\newcommand\langvar{$\langle \it lang \rangle$}
\newcommand\note[1]{}
\newcommand\Lopt[1]{\textsf{#1}}
\newcommand\file[1]{\texttt{#1}}
\newcommand\pkg[1]{\texttt{#1}}
\begin{document}
\DocInput{ukraineb.dtx}
\end{document}
%</filedriver>
%\fi
% \GetFileInfo{ukraineb.dtx}
%
% \changes{ukraineb-1.1e}{1999/08/19}{replaced all \cs{penalty}\cs{@M}
% with \cs{nobreak}}
%
% \section{The Ukrainian language}
%
% The file \file{\filename}\footnote{The file described in this
% section has version number \fileversion.
% This file was derived from the \file{russianb.dtx} version 1.1g.}
% defines all the language-specific macros for the Ukrainian
% language. It needs the file \file{cyrcod} for success documentation
% with Ukrainian encodings (see below).
%
% For this language the character |"| is made active. In
% table~\ref{tab:ukrainian-quote} an overview is given of its
% purpose.
%
% \begin{table}[htb]
% \begin{center}
% \begin{tabular}{lp{8cm}}
% \verb="|= & disable ligature at this position. \\
% |"-| & an explicit hyphen sign, allowing hyphenation
% in the rest of the word. \\
% |"---| & Cyrillic emdash in plain text. \\
% |"--~| & Cyrillic emdash in compound names (surnames). \\
% |"--*| & Cyrillic emdash for denoting direct speech. \\
% |""| & like |"-|, but producing no hyphen sign
% (for compund words with hyphen, e.g.\ |x-""y|
% or some other signs as ``disable/enable''). \\
% |"~| & for a compound word mark without a breakpoint. \\
% |"=| & for a compound word mark with a breakpoint, allowing
% hyphenation in the composing words. \\
% |",| & thinspace for initials with a breakpoint
% in following surname. \\
% |"`| & for German left double quotes
% (looks like ,\kern-0.08em,). \\
% |"'| & for German right double quotes (looks like ``). \\%''
% |"<| & for French left double quotes (looks like $<\!\!<$). \\
% |">| & for French right double quotes (looks like $>\!\!>$). \\
% \end{tabular}
% \caption{The extra definitions made
% by \file{ukraineb}}\label{tab:ukrainian-quote}
% \end{center}
% \end{table}
%
% The quotes in table~\ref{tab:ukrainian-quote} (see, also
% table~\ref{tab:russian-quote}) can also be typeset by using the commands
% in table~\ref{tab:umore-quote} (see, also table~\ref{tab:rmore-quote}).
%
% \begin{table}[htb]
% \begin{center}
% \begin{tabular}{lp{8cm}}
% |\cdash---| & Cyrillic emdash in plain text. \\
% |\cdash--~| & Cyrillic emdash in compound names (surnames). \\
% |\cdash--*| & Cyrillic emdash for denoting direct speech. \\
% |\glqq| & for German left double quotes
% (looks like ,\kern-0.08em,). \\
% |\grqq| & for German right double quotes (looks like ``). \\%''
% |\flqq| & for French left double quotes (looks like $<\!\!<$). \\
% |\frqq| & for French right double quotes (looks like $>\!\!>$). \\
% |\dq| & the original quotes character (|"|). \\
% \end{tabular}
% \caption{More commands which produce quotes, defined
% by \babel}\label{tab:umore-quote}
% \end{center}
% \end{table}
%
% The French quotes are also available as ligatures `|<<|' and `|>>|' in
% 8-bit Cyrillic font encodings (\texttt{LCY}, \texttt{X2}, \texttt{T2*})
% and as `|<|' and `|>|' characters in 7-bit Cyrillic font encodings
% (\texttt{OT2} and \texttt{LWN}).
%
% The quotation marks traditionally used in Ukrainian and Russian
% languages were borrowed from other languages (e.g. French and German)
% so they keep their original names.
%
% \StopEventually{}
%
% The macro |\LdfInit| takes care of preventing that this file is loaded
% more than once, checking the category code of the \texttt{@} sign, etc.
%
% \begin{macrocode}
%<*code>
\LdfInit{ukrainian}{captionsukrainian}
% \end{macrocode}
%
% When this file is read as an option, i.e., by the |\usepackage|
% command, \texttt{ukraineb} will be an `unknown' language, in which case
% we have to make it known. So we check for the existence of |\l@ukrainian|
% to see whether we have to do something here.
%
% \begin{macrocode}
\ifx\l@ukrainian\@undefined
\@nopatterns{Ukrainian}
\adddialect\l@ukrainian0
\fi
% \end{macrocode}
%
% \begin{macro}{\latinencoding}
%
% We need to know the encoding for text that is supposed to be which is
% active at the end of the \babel\ package. If the \pkg{fontenc} package
% is loaded later, then\ldots too bad!
%
% \begin{macrocode}
\let\latinencoding\cf@encoding
% \end{macrocode}
%
% \end{macro}
%
% The user may choose between different available Cyrillic
% encodings---e.g., \texttt{X2}, \texttt{LCY}, or \texttt{LWN}.\@
% Hopefully, \texttt{X2} will eventually replace the two latter encodings
% (\texttt{LCY} and \texttt{LWN}).\@ If the user wants to use another
% font encoding than the default (\texttt{T2A}), he has to load the
% corresponding file \emph{before} \file{ukraineb.sty}. This may be done
% in the following way:
%
% \begin{verbatim}
% % override the default X2 encoding used in Babel
% \usepackage[LCY,OT1]{fontenc}
% \usepackage[english,ukrainian]{babel}
% \end{verbatim}
% \unskip
%
% Note: 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 the encodings known to \LaTeX\ in
% the order they were loaded. We set the |\cyrillicencoding| to the
% \emph{last} loaded encoding in the list of supported Cyrillic
% encodings: \texttt{OT2}, \texttt{LWN}, \texttt{LCY}, \texttt{X2},
% \texttt{T2C}, \texttt{T2B}, \texttt{T2A}, if any.
%
% \begin{macrocode}
\def\reserved@a#1#2{%
\edef\reserved@b{#1}%
\edef\reserved@c{#2}%
\ifx\reserved@b\reserved@c
\let\cyrillicencoding\reserved@c
\fi}
\def\cdp@elt#1#2#3#4{%
\reserved@a{#1}{OT2}%
\reserved@a{#1}{LWN}%
\reserved@a{#1}{LCY}%
\reserved@a{#1}{X2}%
\reserved@a{#1}{T2C}%
\reserved@a{#1}{T2B}%
\reserved@a{#1}{T2A}}
\cdp@list
% \end{macrocode}
%
% Now, if |\cyrillicencoding| is undefined, then the user did not load
% any of supported encodings. So, we have to set |\cyrillicencoding| to
% some default value. We test the presence of the encoding definition
% files in the order from less preferable to more preferable encodings.
% We use the lowercase names (i.e., \file{lcyenc.def} instead of
% \file{LCYenc.def}).
%
% \begin{macrocode}
\ifx\cyrillicencoding\undefined
\IfFileExists{ot2enc.def}{\def\cyrillicencoding{OT2}}\relax
\IfFileExists{lwnenc.def}{\def\cyrillicencoding{LWN}}\relax
\IfFileExists{lcyenc.def}{\def\cyrillicencoding{LCY}}\relax
\IfFileExists{x2enc.def}{\def\cyrillicencoding{X2}}\relax
\IfFileExists{t2cenc.def}{\def\cyrillicencoding{T2C}}\relax
\IfFileExists{t2benc.def}{\def\cyrillicencoding{T2B}}\relax
\IfFileExists{t2aenc.def}{\def\cyrillicencoding{T2A}}\relax
% \end{macrocode}
%
% If |\cyrillicencoding| is still undefined, then the user seems not to
% have a properly installed distribution. A fatal error.
%
% \begin{macrocode}
\ifx\cyrillicencoding\undefined
\PackageError{babel}%
{No Cyrillic encoding definition files were found}%
{Your installation is incomplete.\MessageBreak
You need at least one of the following files:\MessageBreak
\space\space
x2enc.def, t2aenc.def, t2benc.def, t2cenc.def,\MessageBreak
\space\space
lcyenc.def, lwnenc.def, ot2enc.def.}%
\else
% \end{macrocode}
%
% We avoid |\usepackage[\cyrillicencoding]{fontenc}| because we don't
% want to force the switch of |\encodingdefault|.
%
% \begin{macrocode}
\lowercase
\expandafter{\expandafter\input\cyrillicencoding enc.def\relax}%
\fi
\fi
% \end{macrocode}
%
% \begin{verbatim}
% \PackageInfo{babel}
% {Using `\cyrillicencoding' as a default Cyrillic encoding}%
% \end{verbatim}
% \unskip
%
% \begin{macrocode}
\DeclareRobustCommand{\Ukrainian}{%
\fontencoding\cyrillicencoding\selectfont
\let\encodingdefault\cyrillicencoding
\expandafter\set@hyphenmins\ukrainianhyphenmins
\language\l@ukrainian}%
\DeclareRobustCommand{\English}{%
\fontencoding\latinencoding\selectfont
\let\encodingdefault\latinencoding
\expandafter\set@hyphenmins\englishhyphenmins
\language\l@english}%
\let\Ukr\Ukrainian
\let\Eng\English
\let\cyrillictext\Ukrainian
\let\cyr\Ukrainian
% \end{macrocode}
%
% Since the \texttt{X2} encoding does not contain Latin letters, we
% should make some redefinitions of \LaTeX\ macros which implicitly
% produce Latin letters.
%
% \begin{macrocode}
\expandafter\ifx\csname T@X2\endcsname\relax\else
% \end{macrocode}
%
% We put |\latinencoding| in braces to avoid problems with
% |\@alph| inside minipages (e.g., footnotes inside minipages) where
% |\@alph| is expanded and we get for example `|\fontencoding OT1|'
% (|\fontencoding| is robust).
%
% \begin{macrocode}
\def\@alph#1{{\fontencoding{\latinencoding}\selectfont
\ifcase#1\or
a\or b\or c\or d\or e\or f\or g\or h\or
i\or j\or k\or l\or m\or n\or o\or p\or
q\or r\or s\or t\or u\or v\or w\or x\or
y\or z\else\@ctrerr\fi}}%
\def\@Alph#1{{\fontencoding{\latinencoding}\selectfont
\ifcase#1\or
A\or B\or C\or D\or E\or F\or G\or H\or
I\or J\or K\or L\or M\or N\or O\or P\or
Q\or R\or S\or T\or U\or V\or W\or X\or
Y\or Z\else\@ctrerr\fi}}%
% \end{macrocode}
%
% Unfortunately, the commands |\AA| and |\aa| are not encoding dependent
% in \LaTeX\ (unlike e.g., |\oe| or |\DH|). They are defined as |\r{A}| and
% |\r{a}|. This leads to unpredictable results when the font encoding
% does not contain the Latin letters `A' and `a' (like \texttt{X2}).
%
% \begin{macrocode}
\DeclareTextSymbolDefault{\AA}{OT1}
\DeclareTextSymbolDefault{\aa}{OT1}
\DeclareTextCommand{\aa}{OT1}{\r a}
\DeclareTextCommand{\AA}{OT1}{\r A}
\fi
% \end{macrocode}
%
% The following block redefines the character class of uppercase Greek
% letters and some accents, if it is equal to 7 (variable family), to
% avoid incorrect results if the font encoding in some math family does
% not contain these characters in places of OT1 encoding. The code was
% taken from |amsmath.dtx|. See comments and further explanation there.
%
% \changes{ukraineb-1.1i}{2001/02/21}{As this code generates a
% textfont 7 error it is commented out for now.}
% \begin{macrocode}
% \begingroup\catcode`\"=12
% % uppercase greek letters:
% \def\@tempa#1{\expandafter\@tempb\meaning#1\relax\relax\relax\relax
% "0000\@nil#1}
% \def\@tempb#1"#2#3#4#5#6\@nil#7{%
% \ifnum"#2=7 \count@"1#3#4#5\relax
% \ifnum\count@<"1000 \else \global\mathchardef#7="0#3#4#5\relax \fi
% \fi}
% \@tempa\Gamma\@tempa\Delta\@tempa\Theta\@tempa\Lambda\@tempa\Xi
% \@tempa\Pi\@tempa\Sigma\@tempa\Upsilon\@tempa\Phi\@tempa\Psi
% \@tempa\Omega
% % some accents:
% \def\@tempa#1#2\@nil{\def\@tempc{#1}}\def\@tempb{\mathaccent}
% \expandafter\@tempa\hat\relax\relax\@nil
% \ifx\@tempb\@tempc
% \def\@tempa#1\@nil{#1}%
% \def\@tempb#1{\afterassignment\@tempa\mathchardef\@tempc=}%
% \def\do#1"#2{}
% \def\@tempd#1{\expandafter\@tempb#1\@nil
% \ifnum\@tempc>"FFF
% \xdef#1{\mathaccent"\expandafter\do\meaning\@tempc\space}%
% \fi}
% \@tempd\hat\@tempd\check\@tempd\tilde\@tempd\acute\@tempd\grave
% \@tempd\dot\@tempd\ddot\@tempd\breve\@tempd\bar
% \fi
% \endgroup
% \end{macrocode}
%
% The user must use the \pkg{inputenc} package when any 8-bit Cyrillic
% font encoding is used, selecting one of the Cyrillic input encodings.
% We do not assume any default input encoding, so the user should
% explicitly call the \pkg{inputenc} package by |\usepackage{inputenc}|.
% We also removed |\AtBeginDocument|, so \pkg{inputenc} should be used
% before \babel.
%
% \changes{ukraineb-1.1f}{1999/08/27}{Made not using inputenc a
% warning instead of an error}
% \begin{macrocode}
\@ifpackageloaded{inputenc}{}{%
\def\reserved@a{LWN}%
\ifx\reserved@a\cyrillicencoding\else
\def\reserved@a{OT2}%
\ifx\reserved@a\cyrillicencoding\else
\PackageWarning{babel}%
{No input encoding specified for Ukrainian language}
\fi\fi}
% \end{macrocode}
%
% Now we define two commands that offer the possibility to switch between
% Cyrillic and Roman encodings.
%
% \begin{macro}{\cyrillictext}
% \begin{macro}{\latintext}
%
% The command |\cyrillictext| will switch from Latin font encoding to the
% Cyrillic font encoding, the command |\latintext| switches back. This
% assumes that the `normal' font encoding is a Latin one. These commands
% are \emph{declarations}, for shorter peaces of text the commands
% |\textlatin| and |\textcyrillic| can be used.
%
% \changes{ukraineb-1.1j}{2003/10/12}{\cs{latintext} is already
% defined by the core of \babel}
% \begin{macrocode}
%\DeclareRobustCommand{\latintext}{%
% \fontencoding{\latinencoding}\selectfont
% \def\encodingdefault{\latinencoding}}
\let\lat\latintext
% \end{macrocode}
%
% \end{macro}
% \end{macro}
%
% \begin{macro}{\textcyrillic}
% \begin{macro}{\textlatin}
%
% These commands take an argument which is then typeset using the
% requested font encoding.
% \changes{ukraineb-1.1j}{2003/10/12}{\cs{latintext} is already
% defined by the core of \babel}
% \begin{macrocode}
\DeclareTextFontCommand{\textcyrillic}{\cyrillictext}
%\DeclareTextFontCommand{\textlatin}{\latintext}
% \end{macrocode}
%
% \end{macro}
% \end{macro}
%
% We make the \TeX
% \begin{macrocode}
%\ifx\ltxTeX\undefined\let\ltxTeX\TeX\fi
%\ProvideTextCommandDefault{\TeX}{\textlatin{\ltxTeX}}
% \end{macrocode}
% and \LaTeX\ logos encoding independent.
% \begin{macrocode}
%\ifx\ltxLaTeX\undefined\let\ltxLaTeX\LaTeX\fi
%\ProvideTextCommandDefault{\LaTeX}{\textlatin{\ltxLaTeX}}
% \end{macrocode}
%
% The next step consists of defining commands to switch to (and
% from) the Ukrainian language.
%
% \begin{macro}{\captionsukrainian}
%
% The macro |\captionsukrainian| defines all strings used in the four
% standard document classes provided with \LaTeX. The two commands |\cyr|
% and |\lat| activate Cyrillic resp.\ Latin encoding.
% \changes{ukraineb-1.1d}{1999/04/03}{replace \cs{CYRUKRI} with
% \cs{CYRII} in \cs{authorname} }
% \changes{ukraineb-1.1g}{2000/09/20}{Added \cs{glossaryname}}
% \changes{ukraineb-1.1h}{2001/02/13}{Added translation for
% `Glossary'}
% \begin{macrocode}
\addto\captionsukrainian{%
\def\prefacename{{\cyr\CYRV\cyrs\cyrt\cyru\cyrp}}%
% \def\prefacename{{\cyr\CYRP\cyre\cyrr\cyre\cyrd\cyrm\cyro\cyrv\cyra}}%
\def\refname{%
{\cyr\CYRL\cyrii\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}%
% \def\refname{%
% {\cyr\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk
% \ \cyrp\cyro\cyrs\cyri\cyrl\cyra\cyrn\cyrsftsn}}%
\def\abstractname{%
{\cyr\CYRA\cyrn\cyro\cyrt\cyra\cyrc\cyrii\cyrya}}%
% \def\abstractname{{\cyr\CYRR\cyre\cyrf\cyre\cyrr\cyra\cyrt}}%
\def\bibname{%
{\cyr\CYRB\cyrii\cyrb\cyrl\cyrii\cyro\cyrgup\cyrr\cyra\cyrf\cyrii\cyrya}}%
% \def\bibname{{\cyr\CYRL\cyrii\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}%
\def\chaptername{{\cyr\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}}%
% \def\chaptername{{\cyr\CYRG\cyrl\cyra\cyrv\cyra}}%
\def\appendixname{{\cyr\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}}%
\def\contentsname{{\cyr\CYRZ\cyrm\cyrii\cyrs\cyrt}}%
\def\listfigurename{{\cyr\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk
\ \cyrii\cyrl\cyryu\cyrs\cyrt\cyrr\cyra\cyrc\cyrii\cyrishrt}}%
\def\listtablename{{\cyr\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk
\ \cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrsftsn}}%
\def\indexname{{\cyr\CYRP\cyro\cyrk\cyra\cyrzh\cyrch\cyri\cyrk}}%
\def\authorname{{\cyr\CYRII\cyrm\cyre\cyrn\cyrn\cyri\cyrishrt
\ \cyrp\cyro\cyrk\cyra\cyrzh\cyrch\cyri\cyrk}}%
\def\figurename{{\cyr\CYRR\cyri\cyrs.}}%
% \def\figurename{\cyr\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}}%
\def\tablename{{\cyr\CYRT\cyra\cyrb\cyrl.}}%
% \def\tablename{\cyr\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}}%
\def\partname{{\cyr\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}}%
\def\enclname{{\cyr\cyrv\cyrk\cyrl\cyra\cyrd\cyrk\cyra}}%
\def\ccname{{\cyr\cyrk\cyro\cyrp\cyrii\cyrya}}%
\def\headtoname{{\cyr\CYRD\cyro}}%
\def\pagename{{\cyr\cyrs.}}%
% \def\pagename{{\cyr\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra}}%
\def\seename{{\cyr\cyrd\cyri\cyrv.}}%
\def\alsoname{{\cyr\cyrd\cyri\cyrv.\ \cyrt\cyra\cyrk\cyro\cyrzh}}
\def\proofname{{\cyr\CYRD\cyro\cyrv\cyre\cyrd\cyre\cyrn\cyrn\cyrya}}%
\def\glossaryname{{\cyr\CYRS\cyrl\cyro\cyrv\cyrn\cyri\cyrk\ %
\cyrt\cyre\cyrr\cyrm\cyrii\cyrn\cyrii\cyrv}}%
}
% \end{macrocode}
%
% \end{macro}
%
% \begin{macro}{\dateukrainian}
%
% The macro |\dateukrainian| redefines the command |\today| to produce
% Ukrainian dates.
%
% \begin{macrocode}
\def\dateukrainian{%
\def\today{\number\day~\ifcase\month\or
\cyrs\cyrii\cyrch\cyrn\cyrya\or
\cyrl\cyryu\cyrt\cyro\cyrg\cyro\or
\cyrb\cyre\cyrr\cyre\cyrz\cyrn\cyrya\or
\cyrk\cyrv\cyrii\cyrt\cyrn\cyrya\or
\cyrt\cyrr\cyra\cyrv\cyrn\cyrya\or
\cyrch\cyre\cyrr\cyrv\cyrn\cyrya\or
\cyrl\cyri\cyrp\cyrn\cyrya\or
\cyrs\cyre\cyrr\cyrp\cyrn\cyrya\or
\cyrv\cyre\cyrr\cyre\cyrs\cyrn\cyrya\or
\cyrzh\cyro\cyrv\cyrt\cyrn\cyrya\or
\cyrl\cyri\cyrs\cyrt\cyro\cyrp\cyra\cyrd\cyra\or
\cyrg\cyrr\cyru\cyrd\cyrn\cyrya\fi
\space\number\year~\cyrr.}}
% \end{macrocode}
%
% \end{macro}
%
% \begin{macro}{\extrasukrainian}
%
% The macro |\extrasukrainian| will perform all the extra definitions
% needed for the Ukrainian language. The macro |\noextrasukrainian|
% is used to cancel the actions of |\extrasukrainian|.
%
% The first action we define is to switch on the selected Cyrillic
% encoding whenever we enter `ukrainian'.
%
% \begin{macrocode}
\addto\extrasukrainian{\cyrillictext}
% \end{macrocode}
%
% When the encoding definition file was processed by \LaTeX\ the current
% font encoding is stored in |\latinencoding|, assuming that \LaTeX\ uses
% \texttt{T1} or \texttt{OT1} as default. Therefore we switch back to
% |\latinencoding| whenever the Ukrainian language is no longer `active'.
%
% \begin{macrocode}
\addto\noextrasukrainian{\latintext}
% \end{macrocode}
%
% Next we must allow hyphenation in the Ukrainian words with apostrophe
% whenever we enter `ukrainian'. This solution was proposed by
% Vladimir Volovich <vvv@vvv.vsu.ru>
%
% \begin{macrocode}
\addto\extrasukrainian{\lccode`\'=`\'}
\addto\noextrasukrainian{\lccode`\'=0}
% \end{macrocode}
%
% \begin{macro}{\verbatim@font}
%
% In order to get both Latin and Cyrillic letters in verbatim text we
% need to change the definition of an internal \LaTeX\ command somewhat:
%
% \begin{macrocode}
%\def\verbatim@font{%
% \let\encodingdefault\latinencoding
% \normalfont\ttfamily
% \expandafter\def\csname\cyrillicencoding-cmd\endcsname##1##2{%
% \ifx\protect\@typeset@protect
% \begingroup\UseTextSymbol\cyrillicencoding##1\endgroup
% \else\noexpand##1\fi}}
% \end{macrocode}
%
% \end{macro}
%
% The category code of the characters `\texttt{:}', `\texttt{;}',
% `\texttt{!}', and `\texttt{?}' is made |\active| to insert a little
% white space.
%
% For Ukrainian (as well as for Russian and German) the \texttt{"}
% character also is made active.
%
% Note: It is \emph{very} questionable whether the Russian typesetting
% tradition requires additional spacing before those punctuation signs.
% Therefore, we make the corresponding code optional. If you need it,
% then define the \texttt{frenchpunct} docstrip option in
% \file{babel.ins}.
%
% Borrowed from french.
% Some users dislike automatic insertion of a space before
% `double punctuation', and prefer to decide themselves whether a
% space should be added or not; so a hook |\NoAutoSpaceBeforeFDP|
% is provided: if this command is added (in file |ukraineb.cfg|, or
% anywhere in a document) |ukraineb| will respect your typing, and
% introduce a suitable space before `double punctuation' \emph{if
% and only if} a space is typed in the source file before those
% signs.
%
% The command |\AutoSpaceBeforeFDP| switches back to the
% default behavior of |ukraineb|.
%
% \begin{macrocode}
%<*frenchpunct>
\initiate@active@char{:}
\initiate@active@char{;}
%</frenchpunct>
%<*frenchpunct|spanishligs>
\initiate@active@char{!}
\initiate@active@char{?}
%</frenchpunct|spanishligs>
\initiate@active@char{"}
% \end{macrocode}
%
% The code above is necessary because we need extra active characters.
% The character |"| is used as indicated in
% table~\ref{tab:ukrainian-quote}.
%
% We specify that the Ukrainian group of shorthands should be used.
%
% \begin{macrocode}
\addto\extrasukrainian{\languageshorthands{ukrainian}}
% \end{macrocode}
%
% These characters are `turned on' once, later their definition may
% vary.
%
% \begin{macrocode}
\addto\extrasukrainian{%
%<frenchpunct> \bbl@activate{:}\bbl@activate{;}%
%<frenchpunct|spanishligs> \bbl@activate{!}\bbl@activate{?}%
\bbl@activate{"}}
\addto\noextrasukrainian{%
%<frenchpunct> \bbl@deactivate{:}\bbl@deactivate{;}%
%<frenchpunct|spanishligs> \bbl@deactivate{!}\bbl@deactivate{?}%
\bbl@deactivate{"}}
% \end{macrocode}
%
% The \texttt{X2} and \texttt{T2*} encodings do not contain
% |spanish_shriek| and |spanish_query| symbols; as a consequence, the
% ligatures `|?`|' and `|!`|' do not work with them (these characters are
% useless for Cyrillic texts anyway). But we define the shorthands to
% emulate these ligatures (optionally).
%
% We do not use |\latinencoding| here (but instead explicitly use
% \texttt{OT1}) because the user may choose \texttt{T2A} to be the primary
% encoding, but it does not contain these characters.
%
% \begin{macrocode}
%<*spanishligs>
\declare@shorthand{ukrainian}{?`}{\UseTextSymbol{OT1}\textquestiondown}
\declare@shorthand{ukrainian}{!`}{\UseTextSymbol{OT1}\textexclamdown}
%</spanishligs>
% \end{macrocode}
%
% \begin{macro}{\ukrainian@sh@;@}
% \begin{macro}{\ukrainian@sh@:@}
% \begin{macro}{\ukrainian@sh@!@}
% \begin{macro}{\ukrainian@sh@?@}
%
% We have to reduce the amount of white space before \texttt{;},
% \texttt{:} and \texttt{!}. This should only happen in horizontal mode,
% hence the test with |\ifhmode|.
%
% \begin{macrocode}
%<*frenchpunct>
\declare@shorthand{ukrainian}{;}{%
\ifhmode
% \end{macrocode}
%
% In horizontal mode we check for the presence of a `space', `unskip' if
% it exists and place a |0.1em| kerning.
%
% \begin{macrocode}
\ifdim\lastskip>\z@
\unskip\nobreak\kern.1em
\else
% \end{macrocode}
% If no space has been typed, we add |\FDP@thinspace|
% which will be
% defined, up to the user's wishes, as an automatic added
% thinspace, or as |\@empty|.
%
% \begin{macrocode}
\FDP@thinspace
\fi
\fi
% \end{macrocode}
%
% Now we can insert a `|;|' character.
%
% \begin{macrocode}
\string;}
% \end{macrocode}
%
% The other definitions are very similar.
%
% \begin{macrocode}
\declare@shorthand{ukrainian}{:}{%
\ifhmode
\ifdim\lastskip>\z@
\unskip\nobreak\kern.1em
\else
\FDP@thinspace
\fi
\fi
\string:}
% \end{macrocode}
%
% \begin{macrocode}
\declare@shorthand{ukrainian}{!}{%
\ifhmode
\ifdim\lastskip>\z@
\unskip\nobreak\kern.1em
\else
\FDP@thinspace
\fi
\fi
\string!}
% \end{macrocode}
%
% \begin{macrocode}
\declare@shorthand{ukrainian}{?}{%
\ifhmode
\ifdim\lastskip>\z@
\unskip\nobreak\kern.1em
\else
\FDP@thinspace
\fi
\fi
\string?}
% \end{macrocode}
%
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\AutoSpaceBeforeFDP}
% \begin{macro}{\NoAutoSpaceBeforeFDP}
% \begin{macro}{\FDP@thinspace}
% |\FDP@thinspace| is defined as unbreakable
% spaces if |\AutoSpaceBeforeFDP| is activated or as |\@empty| if
% |\NoAutoSpaceBeforeFDP| is in use.
% The default is |\AutoSpaceBeforeFDP|.
% \begin{macrocode}
\def\AutoSpaceBeforeFDP{%
\def\FDP@thinspace{\nobreak\kern.1em}}
\def\NoAutoSpaceBeforeFDP{\let\FDP@thinspace\@empty}
\AutoSpaceBeforeFDP
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\FDPon}
% \begin{macro}{\FDPoff}
%
% The next macros allow to switch on/off activeness of double
% punctuation signs.
%
% \begin{macrocode}
\def\FDPon{\bbl@activate{:}%
\bbl@activate{;}%
\bbl@activate{?}%
\bbl@activate{!}}
\def\FDPoff{\bbl@deactivate{:}%
\bbl@deactivate{;}%
\bbl@deactivate{?}%
\bbl@deactivate{!}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\system@sh@:@}
% \begin{macro}{\system@sh@!@}
% \begin{macro}{\system@sh@?@}
% \begin{macro}{\system@sh@;@}
%
% When the active characters appear in an environment where their
% Ukrainian behaviour is not wanted they should give an `expected'
% result. Therefore we define shorthands at system level as well.
%
% \begin{macrocode}
\declare@shorthand{system}{:}{\string:}
\declare@shorthand{system}{;}{\string;}
%</frenchpunct>
%<*frenchpunct&!spanishligs>
\declare@shorthand{system}{!}{\string!}
\declare@shorthand{system}{?}{\string?}
%</frenchpunct&!spanishligs>
% \end{macrocode}
%
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% To be able to define the function of `|"|', we first define a couple of
% `support' macros.
%
% \begin{macro}{\dq}
%
% We save the original double quote character in |\dq| to keep it
% available, the math accent |\"| can now be typed as `|"|'.
%
% \begin{macrocode}
\begingroup \catcode`\"12
\def\reserved@a{\endgroup
\def\@SS{\mathchar"7019 }
\def\dq{"}}
\reserved@a
% \end{macrocode}
%
% \end{macro}
%
% Now we can define the doublequote macros: german and french quotes.
% We use definitions of these quotes made in babel.sty.
% The french quotes are contained in the \texttt{T2*} encodings.
%
% \begin{macrocode}
\declare@shorthand{ukrainian}{"`}{\glqq}
\declare@shorthand{ukrainian}{"'}{\grqq}
\declare@shorthand{ukrainian}{"<}{\flqq}
\declare@shorthand{ukrainian}{">}{\frqq}
% \end{macrocode}
%
% Some additional commands:
%
% \begin{macrocode}
\declare@shorthand{ukrainian}{""}{\hskip\z@skip}
\declare@shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{ukrainian}{"=}{\nobreak-\hskip\z@skip}
\declare@shorthand{ukrainian}{"|}{%
\textormath{\nobreak\discretionary{-}{}{\kern.03em}%
\allowhyphens}{}}
% \end{macrocode}
%
% The next two macros for |"-| and |"---| are somewhat different.
% We must check whether the second token is a hyphen character:
%
% \begin{macrocode}
\declare@shorthand{ukrainian}{"-}{%
% \end{macrocode}
%
% If the next token is `|-|', we typeset an emdash, otherwise a hyphen
% sign:
%
% \begin{macrocode}
\def\ukrainian@sh@tmp{%
\if\ukrainian@sh@next-\expandafter\ukrainian@sh@emdash
\else\expandafter\ukrainian@sh@hyphen\fi
}%
% \end{macrocode}
%
% \TeX\ looks for the next token after the first `|-|': the meaning of
% this token is written to |\ukrainian@sh@next| and |\ukrainian@sh@tmp| is
% called.
%
% \begin{macrocode}
\futurelet\ukrainian@sh@next\ukrainian@sh@tmp}
% \end{macrocode}
%
% Here are the definitions of hyphen and emdash. First the hyphen:
%
% \begin{macrocode}
\def\ukrainian@sh@hyphen{%
\nobreak\-\bbl@allowhyphens}
% \end{macrocode}
%
% For the emdash definition, there are the two parameters: we must `eat'
% two last hyphen signs of our emdash\dots :
% \begin{macrocode}
\def\ukrainian@sh@emdash#1#2{\cdash-#1#2}
% \end{macrocode}
% \begin{macro}{\cdash}
% \dots\ these two parameters are useful for another macro:
% |\cdash|:
% \begin{macrocode}
%\ifx\cdash\undefined % should be defined earlier
\def\cdash#1#2#3{\def\tempx@{#3}%
\def\tempa@{-}\def\tempb@{~}\def\tempc@{*}%
\ifx\tempx@\tempa@\@Acdash\else
\ifx\tempx@\tempb@\@Bcdash\else
\ifx\tempx@\tempc@\@Ccdash\else
\errmessage{Wrong usage of cdash}\fi\fi\fi}
% \end{macrocode}
% second parameter (or third for |\cdash|) shows what kind of emdash
% to create in next step
% \begin{center}
% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}}
% |"---| & ordinary (plain) Cyrillic emdash inside text:
% an unbreakable thinspace will be inserted before only in case of
% a \textit{space} before the dash (it is necessary for dashes after
% display maths formulae: there could be lists, enumerations etc.\
% started with ``--- where $a$ is ...'' i.e., the dash starts a line).
% (Firstly there were planned rather soft rules for user: he may put
% a space before the dash or not. But it is difficult to place this
% thinspace automatically, i.e., by checking modes because after
% display formulae \TeX{} uses horizontal mode. Maybe there is a
% misunderstanding? Maybe there is another way?) After a dash
% a breakable thinspace is always placed; \\
% \end{tabular}
% \end{center}
% \begin{macrocode}
% What is more grammatically: .2em or .2\fontdimen6\font ?
\def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi
\cyrdash\hskip.2em\ignorespaces}%
% \end{macrocode}
% \begin{center}
% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}}
% |"--~| & emdash in compound names or surnames
% (like Mendeleev--Klapeiron); this dash has no space characters
% around; after the dash some space is added
% |\exhyphenalty| \\
% \end{tabular}
% \end{center}
% \begin{macrocode}
\def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi
\nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}%
% \end{macrocode}
% \begin{center}
% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}}
% |"--*| & for denoting direct speech (a space like |\enskip|
% must follow the emdash); \\
% \end{tabular}
% \end{center}
% \begin{macrocode}
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
%\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cyrdash}
% Finally the macro for ``body'' of the Cyrillic emdash.
% The |\cyrdash| macro will be defined in case this macro hasn't been
% defined in a fontenc file. For T2* fonts, cyrdash will be placed in
% the code of the English emdash thus it uses ligature |---|.
% \begin{macrocode}
% Is there an IF necessary?
\ifx\cyrdash\undefined
\def\cyrdash{\hbox to.8em{--\hss--}}
\fi
% \end{macrocode}
% \end{macro}
%
% Here a really new macro---to place thinspace between initials.
% This macro used instead of |\,| allows hyphenation in the following
% surname.
%
% \begin{macrocode}
%\declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}
% \end{macrocode}
%
% \begin{macro}{\mdqon}
% \begin{macro}{\mdqoff}
% All that's left to do now is to define a couple of commands
% for |"|.
% \begin{macrocode}
\def\mdqon{\bbl@activate{"}}
\def\mdqoff{\bbl@deactivate{"}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% The Ukrainian hyphenation patterns can be used with |\lefthyphenmin|
% and |\righthyphenmin| set to~2.
% \changes{ukraineb-1.1g}{2000/09/22}{Now use \cs{providehyphenmins} to
% provide a default value}
% \begin{macrocode}
\providehyphenmins{\CurrentOption}{\tw@\tw@}
% temporary hack:
\ifx\englishhyphenmins\undefined
\def\englishhyphenmins{\tw@\thr@@}
\fi
% \end{macrocode}
%
% Now the action |\extrasukrainian| has to execute is to make sure that the
% command |\frenchspacing| is in effect. If this is not the case the
% execution of |\noextrasukrainian| will switch it off again.
%
% \begin{macrocode}
\addto\extrasukrainian{\bbl@frenchspacing}
\addto\noextrasukrainian{\bbl@nonfrenchspacing}
% \end{macrocode}
%
% \end{macro}
%
% Next we add a new enumeration style for Ukrainian manuscripts with
% Cyrillic letters, and later on we define some math operator names in
% accordance with Ukrainian and Russian typesetting traditions.
%
% \begin{macro}{\Asbuk}
%
% We begin by defining |\Asbuk| which works like |\Alph|, but produces
% (uppercase) Cyrillic letters intead of Latin ones. The letters CYRGUP,
% and SFTSN are skipped, as usual for such enumeration.
%
% \begin{macrocode}
\def\Asbuk#1{\expandafter\@Asbuk\csname c@#1\endcsname}
\def\@Asbuk#1{\ifcase#1\or
\CYRA\or\CYRB\or\CYRV\or\CYRG\or\CYRD\or\CYRE\or\CYRIE\or
\CYRZH\or\CYRZ\or\CYRI\or\CYRII\or\CYRYI\or\CYRISHRT\or
\CYRK\or\CYRL\or\CYRM\or\CYRN\or\CYRO\or\CYRP\or\CYRR\or
\CYRS\or\CYRT\or\CYRU\or\CYRF\or\CYRH\or\CYRC\or\CYRCH\or
\CYRSH\or\CYRSHCH\or\CYRYU\or\CYRYA\else\@ctrerr\fi}
% \end{macrocode}
%
% \end{macro}
%
% \begin{macro}{\asbuk}
%
% The macro |\asbuk| is similar to |\alph|; it produces lowercase
% Ukrainian letters.
%
% \begin{macrocode}
\def\asbuk#1{\expandafter\@asbuk\csname c@#1\endcsname}
\def\@asbuk#1{\ifcase#1\or
\cyra\or\cyrb\or\cyrv\or\cyrg\or\cyrd\or\cyre\or\cyrie\or
\cyrzh\or\cyrz\or\cyri\or\cyrii\or\cyryi\or\cyrishrt\or
\cyrk\or\cyrl\or\cyrm\or\cyrn\or\cyro\or\cyrp\or\cyrr\or
\cyrs\or\cyrt\or\cyru\or\cyrf\or\cyrh\or\cyrc\or\cyrch\or
\cyrsh\or\cyrshch\or\cyryu\or\cyrya\else\@ctrerr\fi}
% \end{macrocode}
%
% \end{macro}
%
% Set up default Cyrillic math alphabets. The math groups for cyrillic
% letters are defined in the encoding definition files. First, declare
% a new alphabet for symbols, |\cyrmathrm|, based on the symbol font
% for Cyrillic letters defined in the encoding definition file. Note,
% that by default Cyrillic letters are taken from upright font in math
% mode (unlike Latin letters).
% \begin{macrocode}
%\RequirePackage{textmath}
\@ifundefined{sym\cyrillicencoding letters}{}{%
\SetSymbolFont{\cyrillicencoding letters}{bold}\cyrillicencoding
\rmdefault\bfdefault\updefault
\DeclareSymbolFontAlphabet\cyrmathrm{\cyrillicencoding letters}
% \end{macrocode}
% And we need a few commands to be able to switch to different variants.
% \begin{macrocode}
\DeclareMathAlphabet\cyrmathbf\cyrillicencoding
\rmdefault\bfdefault\updefault
\DeclareMathAlphabet\cyrmathsf\cyrillicencoding
\sfdefault\mddefault\updefault
\DeclareMathAlphabet\cyrmathit\cyrillicencoding
\rmdefault\mddefault\itdefault
\DeclareMathAlphabet\cyrmathtt\cyrillicencoding
\ttdefault\mddefault\updefault
%
\SetMathAlphabet\cyrmathsf{bold}\cyrillicencoding
\sfdefault\bfdefault\updefault
\SetMathAlphabet\cyrmathit{bold}\cyrillicencoding
\rmdefault\bfdefault\itdefault
}
% \end{macrocode}
%
% Some math functions in Ukrainian and Russian math books have other
% names: e.g., \texttt{sinh} in Russian is written as \texttt{sh} etc.
% So we define a number of new math operators.
%
% |\sinh|:
% \begin{macrocode}
\def\sh{\mathop{\operator@font sh}\nolimits}
% \end{macrocode}
% |\cosh|:
% \begin{macrocode}
\def\ch{\mathop{\operator@font ch}\nolimits}
% \end{macrocode}
% |\tan|:
% \begin{macrocode}
\def\tg{\mathop{\operator@font tg}\nolimits}
% \end{macrocode}
% |\arctan|:
% \begin{macrocode}
\def\arctg{\mathop{\operator@font arctg}\nolimits}
% \end{macrocode}
% arcctg:
% \begin{macrocode}
\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
% \end{macrocode}
% The following macro conflicts with |\th| defined in Latin~1 encoding:
%
% |\tanh|:
% \changes{ukraineb-1.1k}{2004/05/21}{Change definition of \cs{th}
% only for this language}
% \begin{macrocode}
\addto\extrasrussian{%
\babel@save{\th}%
\let\ltx@th\th
\def\th{\textormath{\ltx@th}%
{\mathop{\operator@font th}\nolimits}}%
}
% \end{macrocode}
% |\cot|:
% \begin{macrocode}
\def\ctg{\mathop{\operator@font ctg}\nolimits}
% \end{macrocode}
% |\coth|:
% \begin{macrocode}
\def\cth{\mathop{\operator@font cth}\nolimits}
% \end{macrocode}
% |\csc|:
% \begin{macrocode}
\def\cosec{\mathop{\operator@font cosec}\nolimits}
% \end{macrocode}
%
% And finally some other Ukrainian and Russian mathematical symbols:
% \begin{macrocode}
\def\Prob{\mathop{\kern\z@\mathsf{P}}\nolimits}
\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
\def\nsd{\mathop{\cyrmathrm{\cyrn.\cyrs.\cyrd.}}\nolimits}
\def\nsk{\mathop{\cyrmathrm{\cyrn.\cyrs.\cyrk.}}\nolimits}
\def\NSD{\mathop{\cyrmathrm{\CYRN\CYRS\CYRD}}\nolimits}
\def\NSK{\mathop{\cyrmathrm{\CYRN\CYRS\CYRK}}\nolimits}
\def\nod{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrd.}}\nolimits} % ??????
\def\nok{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrk.}}\nolimits} % ??????
\def\NOD{\mathop{\cyrmathrm{\CYRN\CYRO\CYRD}}\nolimits} % ??????
\def\NOK{\mathop{\cyrmathrm{\CYRN\CYRO\CYRK}}\nolimits} % ??????
\def\Proj{\mathop{\cyrmathrm{\CYRP\cyrr}}\nolimits}
% \end{macrocode}
%
% This is for compatibility with older Ukrainian packages.
% \begin{macrocode}
\DeclareRobustCommand{\No}{%
\ifmmode{\nfss@text{\textnumero}}\else\textnumero\fi}
% \end{macrocode}
%
% The macro |\ldf@finish| takes care of looking for a configuration file,
% setting the main language to be switched on at |\begin{document}| and
% resetting the category code of \texttt{@} to its original value.
%
% \begin{macrocode}
\ldf@finish{ukrainian}
%</code>
% \end{macrocode}
%
% \Finale
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
\endinput
|