summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-04-13 21:05:55 +0000
committerKarl Berry <karl@freefriends.org>2021-04-13 21:05:55 +0000
commita3267648e99e87945a308bbde6d8c6d68c427feb (patch)
treeaee6ce1ee4740fa73a285de672e0cf1d80d6aa15 /Master/texmf-dist/source
parente0c4dfb20aabca609bc12462ce0c3f4d9e062b07 (diff)
polyglossia (13apr21)
git-svn-id: svn://tug.org/texlive/trunk@58869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx601
1 files changed, 554 insertions, 47 deletions
diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
index b6fd4c23b85..fdcd7f32eb3 100644
--- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
@@ -410,6 +410,7 @@ to track the issues and follow progress.
\newcommand*\link[1]{\href{#1}{#1}}
\renewcommand*\meta[1]{\texttt{⟨#1⟩}}
\newcommand*\TXI[1]{\href{https://github.com/reutenauer/polyglossia/issues/#1}{\textcolor{xpgred}{\##1}}}
+\newcommand*\TXP[1]{\href{https://github.com/reutenauer/polyglossia/pull/#1}{\textcolor{xpgred}{\##1}}}
\def\eg{\textit{e.g.,}\xspace}
\def\ie{\textit{i.e.,}\xspace}
\def\ca{\textit{ca.}\@\xspace}
@@ -621,7 +622,7 @@ to track the issues and follow progress.
% breton & galician & \TX{latin} & romansh & turkmen \\
% bulgarian & \TX{georgian} & latvian & \TX{russian} & \TX{ukrainian} \\
% \TX{catalan} & \TX{german} & lithuanian & \TX{sami} & urdu \\
-% coptic & \TX{greek} & macedonian & \TX{sanskrit} & uyghur \\
+% coptic & \TX{greek} & macedonian & \TX{sanskrit} & \TX{uyghur} \\
% \TX{croatian} & \TX{hebrew} & \TX{malay} & \TX{serbian} & vietnamese \\
% \TX{czech} & \TX{hindi} & malayalam & \TX{slovak} & \TX{welsh} \\
% \bottomrule
@@ -1354,6 +1355,10 @@ to track the issues and follow progress.
% \charifavailable{01C6}{dž}) will be replaced by single characters. This can
% be useful if the ligatures on your font are broken (if the font does not
% have them, they are automatically replaced).
+% \item \xpgboolkeytrue[1.53]{localalph}
+% If \xpgvalue{true}, alphanumeric counters will use a locally established version which excludes
+% the characters \meta{q}, \meta{w}, \meta{x} and \meta{y} from alphabetic counting.
+% Obviously this limits the counting range to 22.
% \item \xpgboolkeytrue[1.51]{splithyphens}
% According to Croatian typesetting conventions, if a word with a hard hyphen (such as \emph{je-li})
% is hyphenated at this hyphen, a second hyphenation character is to be inserted at the beginning
@@ -2153,8 +2158,9 @@ to track the issues and follow progress.
% \paragraph*{Options:}
% \begin{itemize}
% \item \xpgboolkeyfalse{localalph}
-% If \xpgvalue{true}, alpha-numeric counters will use a localized version including characters with caron
-% (a, b, c, č, d, \ldots).
+% If \xpgvalue{true}, alphanumeric counters will use a localized version including characters with caron
+% (\emph{a, b, c, č, d, \ldots}) and excluding the characters \meta{q}, \meta{w}, \meta{x} and \meta{y}
+% from alphabetic counting.
% \end{itemize}
%
% \subsection{sorbian}\label{sorbian}
@@ -2300,6 +2306,47 @@ to track the issues and follow progress.
% \cmd\nsk , \cmd\Proj\ print some rare
% Ukrainian mathematical symbols.
%
+%
+% \subsection{uyghur}\label{uyghur}
+% \paragraph*{Options:}
+% \begin{itemize}
+% \item \xpgchoicekey[1.53]{chapterformat}{\xpgdefaultvalue{\xpgpresetvalue{ordinal}},
+% \xpgvalue{roman}, \xpgvalue{arabic}}
+% In Uyghur, chapter and part headings usually use ordinals rather than numbers. Alternatively Roman numbers
+% are common as well. By default, \pkg{polyglossia} uses ordinals.
+% This option allows to change this. Choices are:
+% \begin{itemize}
+% \item ¦ordinal¦: Use ordinals for chapter and part headings (=~default setting)
+% \item ¦roman¦: Use Roman numbering for chapter and part heading.
+% \item ¦arabic¦: Use Arabic numbering for chapter and part heading (=~LaTeX default).
+% \end{itemize}
+% Note that this option only works if \xpgoption{swapstrings} is set to \xpgvalue{all}, \xpgvalue{headings} or
+% \xpgvalue{hheaders}. The caveats for that options (see below) apply.
+% \item \xpgchoicekey[1.53]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}},
+% \xpgvalue{captions}, \xpgvalue{headings}, \xpgvalue{headers}, \xpgvalue{hheaders}, or \xpgvalue{none}}
+% In Uyghur, table and figure caption strings need to be in a different order and format than in other languages.
+% By default, \pkg{polyglossia} provides the correct for different classes and packages (standard classes, \pkg{KOMA-script},
+% \pkg{memoir}, and \pkg{titlesec} package should work, as well as \pkg{fancyhdr} and \pkg{caption}).
+% However, since the definition of these strings is not standardized, the redefinitions might not work
+% and even interfere badly if you use specific classes or packages that redefine the respective strings
+% themselves. In this case, you can disable some or all changes.
+% The possibilities are:
+% \begin{itemize}
+% \item ¦all¦: Redefine figure and table captions, part and chapter headings, and running headers (=~default setting)
+% \item ¦captions¦: Redefine figure and table captions only
+% \item ¦headings¦: Redefine part and chapter headings only
+% \item ¦headers¦: Redefine running headers only
+% \item ¦hheaders¦: Redefine part and chapter headings as well as running headers
+% \item ¦none¦: Do not redefine anything
+% \end{itemize}
+% \end{itemize}
+% ^^A
+% \paragraph*{Commands:}
+% \begin{itemize}
+% \item \Cmd\uyghurordinal: outputs Uyghur ordinals. Supported input: integer numbers in the range of 1--100.
+% \item \Cmd\uyghurord: same as \cmd\uyghurordinal\ but with counter as input (\eg ¦\textuyghur{\uyghurord{page}}¦).
+% \end{itemize}
+%
% \subsection{welsh}\label{welsh}
% \paragraph*{Options:}
% \begin{itemize}
@@ -2319,7 +2366,7 @@ to track the issues and follow progress.
% \item \Cmd{\date\meta{lang}} stores definitions of date formats (usually redefinitions
% of \cmd\today, in some cases also definitions of additional date commands)
% \item \Cmd{\blockextras\meta{lang}} stores macros that are to be executed when the language
-% \meta{lang} is activated via \cmd\selectlanguage command or the \meta{lang} environment
+% \meta{lang} is activated via \cmd\selectlanguage\ command or the \meta{lang} environment
% \item \Cmd{\inlineextras\meta{lang}} stores macros that are to be executed when the language
% \meta{lang} is activated locally via \cmd\text\meta{lang} command
% \item \Cmd{\noextras\meta{lang}} stores macros that are to be executed when the language
@@ -2673,6 +2720,26 @@ to track the issues and follow progress.
% \section{Revision history}
%
% \bgroup\footnotesize
+% \subsection*{1.53 (12-04-2021)}
+%
+% \subsubsection*{New features}
+% \begin{itemize}
+% \item New option \xpgoption{localalph} for Croatian (\TXI{486}).
+% \item Use ordinals in part and chapter headings. A new option \xpgoption{chapterformat} has been
+% added to disable this or change format to Roman numbering (\TXI{479}).
+% \item New command \cmd\uyghurordinal\ and \cmd\uyghurord\ to produce Uyghur ordinals from 1--100.
+% \end{itemize}
+%
+% \subsubsection*{Bug fixes}
+% \begin{itemize}
+% \item Fix typo in Uyghur language definition file (\TXI{479}).
+% \item Fix Uyghur date format (\TXI{479}).
+% \item Fix Uyghur caption format and add \xpgoption{swapstrings} option (\TXI{479}).
+% \item Add overlooked digraphs in Croatian (\TXP{484}).
+% \item Fix typo in Serbian ¦\thepart¦ (\TXP{485}).
+% \item Fix part modifications in Hungarian with \pkg{hyperref} (\TXI{493}).
+% \end{itemize}
+%
% \subsection*{1.52 (16-03-2021)}
%
% \subsubsection*{New features}
@@ -3304,7 +3371,7 @@ to track the issues and follow progress.
% \item Various improvements in ¦gloss-russian¦ (provided by \TA{Vladimir Lomov} and
% others)
% \item Corrected captions for Bahasai, Lithuanian, Russian, Croatian
-% \item Add option \xpgoption{indentfirst=true} for Spanish, Croation and other languages
+% \item Add option \xpgoption{indentfirst=true} for Spanish, Croatian and other languages
% (NB: \xpgoption{indentfirst} was previously named \xpgoption{frenchindent})
% \item New option \xpgoption{script} for German: Setting \xpgoption{script=fraktur} modifies the
% captions for typesetting in Fraktur.
@@ -3476,7 +3543,7 @@ to track the issues and follow progress.
% \subsection{polyglossia.sty}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2021/03/16 v1.52
+\ProvidesPackage{polyglossia}[2021/04/12 v1.53
Modern multilingual typesetting with XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}
@@ -11540,8 +11607,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\define@boolkey{croatian}[croatian@]{splithyphens}[true]{}
+\define@boolkey{croatian}[croatian@]{localalph}[true]{}
+
% Register default options
-\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disableligatures=false,splithyphens=true}
+\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disableligatures=false,
+ splithyphens=true,localalph=true}
\ifsystem@babelshorthands
\setkeys{croatian}{babelshorthands=true}
@@ -11720,24 +11790,40 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\datecroatian{%
\def\today{\number\day.~\ifcase\month\or
- siječnja\or veljače\or ožujka\or travnja\or svibnja\or
- lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenoga\or
- prosinca\fi \space \number\year.}%
+ siječ\hr@charifavailable{01CC}{nj}a\or ve\hr@charifavailable{01C9}{lj}ače\or
+ ožujka\or trav\hr@charifavailable{01CC}{nj}a\or svib\hr@charifavailable{01CC}{nj}a\or
+ lip\hr@charifavailable{01CC}{nj}a\or srp\hr@charifavailable{01CC}{nj}a\or
+ kolovoza\or rujna\or listopada\or studenoga\or prosinca\fi \space \number\year.}%
+}
+
+\def\croatian@@alph#1{%
+ \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 r\or s\or t\or u\or v\or z\else#1\fi
+}
+\def\croatian@@Alph#1{%
+ \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 R\or S\or T\or U\or V\or Z\else#1\fi
}
+\def\croatian@alph#1{\expandafter\croatian@@alph\csname c@#1\endcsname}
+\def\croatian@Alph#1{\expandafter\croatian@@Alph\csname c@#1\endcsname}
+
\def\noextras@croatian{%
\ifcroatian@babelshorthands\nocroatian@shorthands\fi%
\nocroatian@hyphens%
+ \let\alph\latinalph\let\Alph\latinAlph%
}
\def\blockextras@croatian{%
\ifcroatian@babelshorthands\croatian@shorthands\fi%
\ifcroatian@splithyphens\croatian@hyphens\else\nocroatian@hyphens\fi%
+ \ifcroatian@localalph\let\alph\croatian@alph\let\Alph\croatian@Alph\fi%
}
\def\inlineextras@croatian{%
\ifcroatian@babelshorthands\croatian@shorthands\fi%
\ifcroatian@splithyphens\croatian@hyphens\else\nocroatian@hyphens\fi%
+ \ifcroatian@localalph\let\alph\croatian@alph\let\Alph\croatian@Alph\fi%
}
% \end{macrocode}
@@ -13771,7 +13857,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{\partname\nobreakspace\thepart}%
{\xpg@french@part\nobreakspace\partname}%
{}%
- {\xpg@warning{Failed to patch part for French}}%
+ {\ifcsdef{part}{\xpg@warning{Failed to patch part for French}}{}}%
}{}% (end \ifdefined \H@old@part)
}% (end \ifdefined\@part)
}% (end \ifdefined\@memptsize)
@@ -13784,7 +13870,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ifcsdef{titleformat}{%
% With titlesec
\ifcsdef{xpg@save@part@format}{%
- \ifcsdef{H@old@part}{\let\@H@old@part\xpg@save@part@format}{\let\@part\xpg@save@part@format}
+ \ifcsdef{H@old@part}{%
+ \let\H@old@part\xpg@save@part@format%
+ }{%
+ \let\@part\xpg@save@part@format%
+ }%
}{}%
}{% (not \ifdefined\titleformat)
\ifcsdef{sectionformat}{%
@@ -13795,7 +13885,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}{%
% With memoir and standard classes
\ifcsdef{xpg@save@part@format}{%
- \ifcsdef{H@old@part}{\let\@H@old@part\xpg@save@part@format}{\let\@part\xpg@save@part@format}
+ \ifcsdef{H@old@part}{%
+ \let\H@old@part\xpg@save@part@format%
+ }{%
+ \let\@part\xpg@save@part@format%
+ }%
}{}%
}% (end \ifdefined\sectionformat)
}% (end \ifdefined\titleformat)
@@ -15722,14 +15816,23 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\if@hungarian@swapheadings
% With titlesec
\ifcsdef{titleformat}{%
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\thepart.\nobreakspace\partname}%
- {}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{}%
+ \ifcsdef{H@old@part}{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}%
+ {\partname\nobreakspace\thepart}%
+ {\thepart.\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }{% not hyperref
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\thepart.\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }{}%
+ }
\ifcsdef{chapter}{%
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
@@ -15757,13 +15860,21 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{}%
{\xpg@warning{Failed to patch chapter for Hungarian}}%
}{}%
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
- {\printpartnum.\partnamenum\printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{}%
+ \ifcsdef{H@old@part}{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}{\printpartname \partnamenum \printpartnum}%
+ {\printpartnum.\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }{% not hyperref
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+ {\printpartnum.\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }{}%
+ }%
}{% (not \ifdefined\@memptsize)
% With standard classes
\ifcsdef{@makechapterhead}{%
@@ -15774,14 +15885,23 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{}%
{\xpg@warning{Failed to patch chapter for Hungarian}}%
}{}%
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
+ \ifcsdef{H@old@part}{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}%
{\partname\nobreakspace\thepart}%
{\thepart.\nobreakspace\partname}%
{}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{}% (end \ifdefined\@part)
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }{% not hyperref
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\thepart.\nobreakspace\partname}%
+ {}%
+ {\ifcsdef{part}{\xpg@warning{Failed to patch part for Hungarian}}{}}%
+ }{}% (end \ifdefined\@part)
+ }% (end not hyperref)
}% (end \ifdefined\@memptsize)
}% (end \ifdefined\sectionformat)
}% (end \ifdefined\titleformat)
@@ -15834,7 +15954,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ifcsdef{titleformat}{%
% With titlesec
\ifcsdef{xpg@save@part@format}{%
- \let\@part\xpg@save@part@format
+ \ifcsdef{H@old@part}{%
+ \let\H@old@part\xpg@save@part@format%
+ }{%
+ \let\@part\xpg@save@part@format%
+ }%
}{}%
\ifcsdef{chapter}{%
\titleformat\chapter[display]%
@@ -15853,7 +15977,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}{%
% With memoir and standard classes
\ifcsdef{xpg@save@part@format}{%
- \let\@part\xpg@save@part@format
+ \ifcsdef{H@old@part}{%
+ \let\H@old@part\xpg@save@part@format%
+ }{%
+ \let\@part\xpg@save@part@format%
+ }%
}{}%
\ifcsdef{xpg@save@chap@format}{%
\let\@makechapterhead\xpg@save@chap@format
@@ -21941,7 +22069,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\tablename{Tabela}%
\def\partname{Deo}%
\renewcommand\thepart{\ifcase\value{part}\or Prvi\or Drugi\or
- Treći\or Čevrti\or Peti\or Šesti\or Sedmi\or Osmi\or
+ Treći\or Četvrti\or Peti\or Šesti\or Sedmi\or Osmi\or
Deveti\or Deseti\or Jedanaesti\or Dvanaesti\or Trinaesti\or
Četrnaesti\or Petnaesti\or Šesnaesti\or Sedamnaesti\or
Osamnaesti\or Devetnaesti\or Dvadeseti\fi}%
@@ -22445,7 +22573,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\inlineextras@slovenian{\extras@slovenian}
-\def\noextras@slovenian{\let\alph\latinalph\let\Alph\latinAlph}
+\def\noextras@slovenian{%
+ \let\alph\latinalph\let\Alph\latinAlph%
+}
% \end{macrocode}
% \iffalse
@@ -24280,23 +24410,85 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ProvidesFile{gloss-uyghur.ldf}[polyglossia: module for Uyghur]
%% Translations provided by Osman Tursun (Github Account: neouyghur)
+\RequireBidi
\PolyglossiaSetup{uyghur}{
bcp47=ug,
script=Arabic,
direction=RL,
scripttag=arab,
langtag=UYG,
- hyphennames={nohyphenation}،
+ hyphennames={nohyphenation},
fontsetup=true,
}
% BCP-47 compliant aliases
\setlanguagealias*{uyghur}{ug}
+\newif\if@uyghur@swapcaptions
+\newif\if@uyghur@swapheadings
+\newif\if@uyghur@swapheaders
+\define@choicekey*+{uyghur}{swapstrings}[\xpg@val\xpg@nr]{all,captions,headings,headers,hheaders,none}[all]{%
+ \ifcase\xpg@nr\relax
+ % all:
+ \@uyghur@swapcaptionstrue%
+ \@uyghur@swapheadingstrue%
+ \@uyghur@swapheaderstrue%
+ \or
+ % captions:
+ \@uyghur@swapcaptionstrue%
+ \@uyghur@swapheadingsfalse%
+ \@uyghur@swapheadersfalse%
+ \or
+ % headings:
+ \@uyghur@swapcaptionsfalse%
+ \@uyghur@swapheadingstrue%
+ \@uyghur@swapheadersfalse%
+ \or
+ % headers:
+ \@uyghur@swapcaptionsfalse%
+ \@uyghur@swapheadingsfalse%
+ \@uyghur@swapheaderstrue%
+ \or
+ % hheaders:
+ \@uyghur@swapcaptionsfalse%
+ \@uyghur@swapheadingstrue%
+ \@uyghur@swapheaderstrue%
+ \or
+ % none:
+ \@uyghur@swapcaptionsfalse%
+ \@uyghur@swapheadingsfalse%
+ \@uyghur@swapheadersfalse%
+ \fi
+ \xpg@info{Option: Uyghur, swapstrings=\xpg@val}%
+}{\xpg@warning{Unknown Uyghur swapstrings value `#1'}}
+
+\newif\if@uyghur@ordchapter
+\newif\if@uyghur@romchapter
+\define@choicekey*+{uyghur}{chapterformat}[\xpg@val\xpg@nr]{ordinal,roman,arabic}[ordinal]{%
+ \ifcase\xpg@nr\relax
+ % ordinal:
+ \@uyghur@ordchaptertrue%
+ \@uyghur@romchapterfalse%
+ \or
+ % roman:
+ \@uyghur@ordchapterfalse%
+ \@uyghur@romchaptertrue%
+ \or
+ % arabic:
+ \@uyghur@ordchapterfalse%
+ \@uyghur@romchapterfalse%
+ \fi
+ \xpg@info{Option: Uyghur, chapterformat=\xpg@val}%
+}{\xpg@warning{Unknown Uyghur chapterformat value `#1'}}
+
+% Register default options
+\xpg@initialize@gloss@options{uyghur}{swapstrings=all,chapterformat=ordinal}
+
+
\def\captionsuyghur{%
- \def\refname{\@ensure@RTL{پايدىلانما}}%
- \def\abstractname{\@ensure@RTL{ئابستراكت}}%
- \def\bibname{\@ensure@RTL{پايدىلانما}}%
+ \def\refname{\@ensure@RTL{پايدىلانمىلار}}%
+ \def\abstractname{\@ensure@RTL{قىسقىچە مەزمۇنى}}%
+ \def\bibname{\@ensure@RTL{پايدىلانمىلار}}%
\def\prefacename{\@ensure@RTL{كىرىش سۆز}}%
\def\chaptername{\@ensure@RTL{باب}}%
\def\appendixname{\@ensure@RTL{قوشۇمچە}}%
@@ -24320,14 +24512,329 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\subjectname{\@ensure@RTL{تېما}}%
}
-\def\dateuyghur{%
- \def\today{\number\day~\ifcase\month\or
- يانۋار\or فېۋرال\or مارت\or ئاپرېل\or ماي\or ئىيۇن\or
- ئىيۇل\or ئاۋغۇست\or سېنتەبىر\or ئۆكتەبىر\or نويابىر\or
- دېكابىر\fi
- \space\number\year}%
+% Save original capsformats
+\let\xpg@save@fnum@table\fnum@table
+\let\xpg@save@fnum@figure\fnum@figure
+
+\def\uyghur@capsformat{%
+ %
+ % Change captions
+ \if@uyghur@swapcaptions
+ % change ‫‪'x.x‬‬ ‫ﺭﻩﺳﯩﻢ‬' to 'ﺭﻩﺳﯩﻢ-x.x‬‬'
+ \def\fnum@figure{\thefigure-\figurename}
+ %
+ % same for table
+ \def\fnum@table{\thetable-\tablename}
+ \fi
+ %
+ % change chapter and part headings
+ \if@uyghur@swapheadings
+ % With titlesec
+ \ifcsdef{titleformat}{%
+ \ifcsdef{H@old@part}{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }{% not hyperref
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }{}%
+ }
+ \ifcsdef{chapter}{%
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
+ {\the@uyghur@chapter\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
+ }{}%
+ }{% (not \ifdefined\titleformat)
+ % With KOMA
+ \ifcsdef{sectionformat}{%
+ \ifcsdef{partformat}{%
+ \let\xpg@save@part@format\partformat%
+ \renewcommand{\partformat}{\the@uyghur@part~\partname}%
+ }{}%
+ \ifcsdef{chapterformat}{%
+ \let\xpg@save@chap@format\chapterformat%
+ \renewcommand{\chapterformat}{\mbox{\the@uyghur@chapter%
+ \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
+ }{}%
+ }{% (not \ifdefined\sectionformat)
+ % With memoir
+ \ifcsdef{@memptsize}{%
+ \ifcsdef{@makechapterhead}{%
+ \let\xpg@save@chap@format\@makechapterhead%
+ \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
+ {\chapnumfont\the@uyghur@chapter\chapternamenum\printchaptername}%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Uyghur}}%
+ }{}%
+ \ifcsdef{H@old@part}{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}{\printpartname \partnamenum \printpartnum}%
+ {\chapnumfont\the@uyghur@part\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }{% not hyperref
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+ {\chapnumfont\the@uyghur@part\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }{}%
+ }%
+ }{% (not \ifdefined\@memptsize)
+ % With standard classes
+ \ifcsdef{@makechapterhead}{%
+ \let\xpg@save@chap@format\@makechapterhead%
+ \patchcmd{\@makechapterhead}%
+ {\@chapapp\space \thechapter}%
+ {\the@uyghur@chapter\space \@chapapp}%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Uyghur}}%
+ }{}%
+ \ifcsdef{H@old@part}{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }{% not hyperref
+ \ifcsdef{@part}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\ifcsdef{part}{\xpg@warning{Failed to patch part for Uyghur}}{}}%
+ }{}% (end \ifdefined\@part)
+ }% (end not hyperref)
+ }% (end \ifdefined\@memptsize)
+ }% (end \ifdefined\sectionformat)
+ }% (end \ifdefined\titleformat)
+ \fi% (end \if@uyghur@swapheadings)
+ %
+ % Change running headers
+ \if@uyghur@swapheaders
+ \ifcsdef{chapterformat}{%
+ % With KOMA
+ \let\xpg@save@chaptermark@format\chaptermarkformat%
+ \renewcommand*\chaptermarkformat{%
+ \the@uyghur@chapter\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}}
+ }{% (not \ifdefined\chapterformat)
+ \ifcsdef{@memptsize}{%
+ % With memoir
+ \let\xpg@save@chaptermark@format\chaptermark%
+ \renewcommand*\chaptermark[1]{%
+ \markboth{\memUChead{%
+ \ifnum \c@secnumdepth >\m@ne
+ \ifbool{@mainmatter}{%
+ \the@uyghur@chapter\ \@chapapp\ %
+ }{}%
+ \fi
+ ##1}}{}}%
+ }{% (not \ifdefined\@memptsize)
+ % With standard classes
+ \ifcsdef{chaptermark}{%
+ \ifpatchable{\chaptermark}%
+ {\@chapapp\ \thechapter.}%
+ {\let\xpg@save@chaptermark@format\chaptermark%
+ \patchcmd{\chaptermark}%
+ {\@chapapp\ \thechapter.}%
+ {\the@uyghur@chapter\ \@chapapp}%
+ {}%
+ {\xpg@warning{Failed to patch chaptermark for Uyghur}}}%
+ {}%
+ }{}% (end \ifdefined\sectionmark)
+ \ifcsdef{sectionmark}{%
+ \ifpatchable{\sectionmark}%
+ {\thesection.}%
+ {\let\xpg@save@sectionmark@format\sectionmark%
+ \patchcmd{\sectionmark}%
+ {\thesection.}%
+ {\thesection}%
+ {}%
+ {\xpg@warning{Failed to patch sectionmark for Uyghur}}}%
+ {}%
+ }{}% (end \ifdefined\chaptermark)
+ }% (end \ifdefined\@memptsize)
+ }% (end \ifdefined\chapterformat)
+ \fi% (end \if@uyghur@swapheaders)
}
+\def\nouyghur@capsformat{%
+ %
+ % Reset changes of \uyghur@capsformat
+ \let\fnum@table\xpg@save@fnum@table%
+ \let\fnum@figure\xpg@save@fnum@figure%
+ %
+ % Reset chapter and part heading
+ \ifcsdef{titleformat}{%
+ % With titlesec
+ \ifcsdef{xpg@save@part@format}{%
+ \ifcsdef{H@old@part}{%
+ \let\H@old@part\xpg@save@part@format%
+ }{%
+ \let\@part\xpg@save@part@format%
+ }%
+ }{}%
+ \ifcsdef{chapter}{%
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
+ {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
+ }{}%
+ }{% (not \ifdefined\titleformat)
+ \ifcsdef{sectionformat}{%
+ % With KOMA
+ \ifcsdef{xpg@save@part@format}{%
+ \let\partformat\xpg@save@part@format
+ }{}%
+ \ifcsdef{xpg@save@chap@format}{%
+ \let\chapterformat\xpg@save@chap@format
+ }{}%
+ }{%
+ % With memoir and standard classes
+ \ifcsdef{xpg@save@part@format}{%
+ \ifcsdef{H@old@part}{%
+ \let\H@old@part\xpg@save@part@format%
+ }{%
+ \let\@part\xpg@save@part@format%
+ }%
+ }{}%
+ \ifcsdef{xpg@save@chap@format}{%
+ \let\@makechapterhead\xpg@save@chap@format
+ }{}%
+ }% (end \ifdefined\sectionformat)
+ }% (end \ifdefined\titleformat)
+ %
+ % Reset headers
+ \ifcsdef{chaptermarkformat}{%
+ % With KOMA
+ \ifcsdef{xpg@save@chaptermark@format}{%
+ \let\chaptermarkformat\xpg@save@chaptermark@format%
+ }{}%
+ }{%
+ \ifcsdef{chaptermark}{%
+ % With memoir and standard classes
+ \ifcsdef{xpg@save@chaptermark@format}{%
+ \let\chaptermark\xpg@save@chaptermark@format%
+ }{}%
+ }{}% (end \ifdefined\chaptermark)
+ \ifcsdef{sectionmark}{%
+ \ifcsdef{xpg@save@sectionmark@format}{%
+ \let\sectionmark\xpg@save@sectionmark@format%
+ }{}%
+ }{}% (end \ifdefined\sectionmark)
+ }% (end \ifdefined\chapterformat)
+}
+
+\def\blockextras@uyghur{%
+ \uyghur@capsformat%
+}
+
+\def\noextras@uyghur{%
+ \nouyghur@capsformat%
+}
+
+\ifxetex
+ \let\xpg@orig@DigitsDotDashInterCharToks\DigitsDotDashInterCharToks%
+\fi
+
+\def\uyghur@ltr@numbers{%
+ \ifxetex
+ % Bidi inserts an RTL mark (0x200f) between number and number separator (- .),
+ % forcing numbers to RTL. This is wrong for Uyghur, where numbers are left to right.
+ % So we defunc the respective command.
+ \renewcommand*{\DigitsDotDashInterCharToks}{}%
+ \fi%
+}
+
+\def\nouyghur@ltr@numbers{%
+ \ifxetex
+ % Restore bidi's \DigitsDotDashInterCharToks
+ \let\DigitsDotDashInterCharToks\xpg@orig@DigitsDotDashInterCharToks%
+ \fi%
+}
+
+\let\the@uyghur@part\thepart
+\let\the@uyghur@chapter\thechapter
+
+\def\uyghur@chapterformat{%
+ \ifcsdef{part}{%
+ \if@uyghur@ordchapter%
+ \renewcommand{\the@uyghur@part}{\uyghurord{part}}%
+ \fi%
+ \if@uyghur@romchapter%
+ \renewcommand{\the@uyghur@part}{\Roman{part}}%
+ \fi%
+ }{}%
+ \ifcsdef{chapter}{%
+ \if@uyghur@ordchapter%
+ \renewcommand{\the@uyghur@chapter}{\uyghurord{chapter}}%
+ \fi%
+ \if@uyghur@romchapter%
+ \renewcommand{\the@uyghur@chapter}{\Roman{chapter}}%
+ \fi%
+ }{}%
+}
+
+\def\uyghur@numbers{%
+ % Prevent bidi from setting the numbers RTL
+ \uyghur@ltr@numbers%
+ % Format chapter and part
+ \uyghur@chapterformat%
+}
+
+\def\nouyghur@numbers{%
+ % Restore previous bidi numbers definition
+ \nouyghur@ltr@numbers
+}
+
+\def\uyghur@globalnumbers{%
+ % Prevent bidi from setting the numbers RTL
+ \uyghur@ltr@numbers%
+ % Format chapter and part
+ \uyghur@chapterformat%
+}
+
+\def\uyghurmonth#1{\ifcase#1%
+ \or يانۋار\or فېۋرال\or مارت\or ئاپرېل\or ماي\or ئىيۇن
+ \or ئىيۇل\or ئاۋغۇست\or سېنتەبىر\or ئۆكتەبىر\or نويابىر\or دېكابىر\fi}
+
+\def\dateuyghur{%
+ \def\today{\number\year-يىلى\space\number\day-\uyghurmonth{\month}}%
+}
+
+\def\uyghurord#1{\expandafter\uyghurordinal\csname c@#1\endcsname}
+
+% Ordinals 1--100
+\def\uyghurordinal#1{\ifcase#1%
+\or بىرىنچى\or ئىككىنچى\or ئۈچىنچى\or تۆتىنچى\or بەشىنچى\or ئالتىنچى\or يەتتىنچى\or سەككىزىنچى
+\or توققۇزىنچى\or ئونىنچى\or ئون بىرىنچى\or ئون ئىككىنچى\or ئون ئۈچىنچى\or ئون تۆتىنچى\or ئون بەشىنچى
+\or ئون ئالتىنچى\or ئون يەتتىنچى\or ئون سەككىزىنچى\or ئون توققۇزىنچى\or يىگىرمىنچى\or يىگىرمە بىرىنچى
+\or يىگىرمە ئىككىنچى\or يىگىرمە ئۈچىنچى\or يىگىرمە تۆتىنچى\or يىگىرمە بەشىنچى\or يىگىرمە ئالتىنچى
+\or يىگىرمە يەتتىنچى\or يىگىرمە سەككىزىنچى\or يىگىرمە توققۇزىنچى\or ئوتتۇزىنچى\or ئوتتۇز بىرىنچى
+\or ئوتتۇز ئىككىنچى\or ئوتتۇز ئۈچىنچى\or ئوتتۇز تۆتىنچى\or ئوتتۇز بەشىنچى\or ئوتتۇز ئالتىنچى\or ئوتتۇز يەتتىنچى
+\or ئوتتۇز سەككىزىنچى\or ئوتتۇز توققۇزىنچى\or قىرىقىنچى\or قىرىق بىرىنچى\or قىرىق ئىككىنچى\or قىرىق ئۈچىنچى
+\or قىرىق تۆتىنچى\or قىرىق بەشىنچى\or قىرىق ئالتىنچى\or قىرىق يەتتىنچى\or قىرىق سەككىزىنچى\or قىرىق توققۇزىنچى
+\or ئەللىكىنچى\or ئەللىك بىرىنچى\or ئەللىك ئىككىنچى\or ئەللىك ئۈچىنچى\or ئەللىك تۆتىنچى\or ئەللىك بەشىنچى
+\or ئەللىك ئالتىنچى\or ئەللىك يەتتىنچى\or ئەللىك سەككىزىنچى\or ئەللىك توققۇزىنچى\or ئاتمىشىنچى\or ئاتمىش بىرىنچى
+\or ئاتمىش ئىككىنچى\or ئاتمىش ئۈچىنچى\or ئاتمىش تۆتىنچى\or ئاتمىش بەشىنچى\or ئاتمىش ئالتىنچى\or ئاتمىش يەتتىنچى
+\or ئاتمىش سەككىزىنچى\or ئاتمىش توققۇزىنچى\or يەتمىشىنچى\or يەتمىش بىرىنچى\or يەتمىش ئىككىنچى\or يەتمىش ئۈچىنچى
+\or يەتمىش تۆتىنچى\or يەتمىش بەشىنچى\or يەتمىش ئالتىنچى\or يەتمىش يەتتىنچى\or يەتمىش سەككىزىنچى\or يەتمىش توققۇزىنچى
+\or سەكسىنىنچى\or سەكسەن بىرىنچى\or سەكسەن ئىككىنچى\or سەكسەن ئۈچىنچى\or سەكسەن تۆتىنچى\or سەكسەن بەشىنچى
+\or سەكسەن ئالتىنچى\or سەكسەن يەتتىنچى\or سەكسەن سەككىزىنچى\or سەكسەن توققۇزىنچى\or توقسىنىنچى\or توقسان بىرىنچى
+\or توقسان ئىككىنچى\or توقسان ئۈچىنچى\or توقسان تۆتىنچى\or توقسان بەشىنچى\or توقسان ئالتىنچى\or توقسان يەتتىنچى
+\or توقسان سەككىزىنچى\or توقسان توققۇزىنچى\or يۈزىنچى\fi}
+
% \end{macrocode}
% \iffalse
%</gloss-uyghur.ldf>