texlive[58869] Master/texmf-dist: polyglossia (13apr21)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 13 23:05:55 CEST 2021


Revision: 58869
          http://tug.org/svn/texlive?view=revision&revision=58869
Author:   karl
Date:     2021-04-13 23:05:55 +0200 (Tue, 13 Apr 2021)
Log Message:
-----------
polyglossia (13apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
    trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-uyghur.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex	2021-04-13 21:05:55 UTC (rev 58869)
@@ -38,6 +38,7 @@
 \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}
@@ -238,7 +239,7 @@
 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
@@ -971,6 +972,10 @@
 		\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
@@ -1770,8 +1775,9 @@
 \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}
@@ -1917,6 +1923,47 @@
 \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}
+%
+\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}
@@ -1936,7 +1983,7 @@
 	\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
@@ -2290,6 +2337,26 @@
 \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}
@@ -2921,7 +2988,7 @@
 	\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.

Modified: trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx	2021-04-13 21:05:55 UTC (rev 58869)
@@ -410,6 +410,7 @@
 \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 @@
 % 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 @@
 % 		\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 @@
 % \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 @@
 % \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 @@
 % 	\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 @@
 % \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 @@
 % 	\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 @@
 % \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 @@
 
 \define at boolkey{croatian}[croatian@]{splithyphens}[true]{}
 
+\define at boolkey{croatian}[croatian@]{localalph}[true]{}
+
 % Register default options
-\xpg at initialize@gloss at options{croatian}{babelshorthands=false,disableligatures=false,splithyphens=true}
+\xpg at initialize@gloss at options{croatian}{babelshorthands=false,disableligatures=false,
+                                        splithyphens=true,localalph=true}
 
 \ifsystem at babelshorthands
   \setkeys{croatian}{babelshorthands=true}
@@ -11720,24 +11790,40 @@
 
 \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 at charifavailable{01CC}{nj}a\or ve\hr at charifavailable{01C9}{lj}ače\or
+    ožujka\or trav\hr at charifavailable{01CC}{nj}a\or svib\hr at charifavailable{01CC}{nj}a\or
+    lip\hr at charifavailable{01CC}{nj}a\or srp\hr at 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 at alph#1{\expandafter\croatian@@alph\csname c@#1\endcsname}
+\def\croatian at Alph#1{\expandafter\croatian@@Alph\csname c@#1\endcsname}
+
 \def\noextras at croatian{%
   \ifcroatian at babelshorthands\nocroatian at shorthands\fi%
   \nocroatian at hyphens%
+  \let\alph\latinalph\let\Alph\latinAlph%
 }
 
 \def\blockextras at croatian{%
   \ifcroatian at babelshorthands\croatian at shorthands\fi%
   \ifcroatian at splithyphens\croatian at hyphens\else\nocroatian at hyphens\fi%
+  \ifcroatian at localalph\let\alph\croatian at alph\let\Alph\croatian at Alph\fi%
 }
 
 \def\inlineextras at croatian{%
   \ifcroatian at babelshorthands\croatian at shorthands\fi%
   \ifcroatian at splithyphens\croatian at hyphens\else\nocroatian at hyphens\fi%
+  \ifcroatian at localalph\let\alph\croatian at alph\let\Alph\croatian at Alph\fi%
 }
 
 %    \end{macrocode}
@@ -13771,7 +13857,7 @@
                        {\partname\nobreakspace\thepart}%
                        {\xpg at french@part\nobreakspace\partname}%
                        {}%
-                       {\xpg at warning{Failed to patch part for French}}%
+                       {\ifcsdef{part}{\xpg at warning{Failed to patch part for French}}{}}%
             }{}%  (end \ifdefined \H at old@part)
          }%  (end \ifdefined\@part)
        }% (end \ifdefined\@memptsize)
@@ -13784,7 +13870,11 @@
    \ifcsdef{titleformat}{%
       % With titlesec
      \ifcsdef{xpg at save@part at format}{%
-        \ifcsdef{H at old@part}{\let\@H at old@part\xpg at save@part at format}{\let\@part\xpg at save@part at format}
+        \ifcsdef{H at old@part}{%
+            \let\H at old@part\xpg at save@part at format%
+        }{%
+            \let\@part\xpg at save@part at format%
+        }%
      }{}%
    }{% (not \ifdefined\titleformat)
      \ifcsdef{sectionformat}{%
@@ -13795,7 +13885,11 @@
      }{%
         % With memoir and standard classes
         \ifcsdef{xpg at save@part at format}{%
-           \ifcsdef{H at old@part}{\let\@H at old@part\xpg at save@part at format}{\let\@part\xpg at save@part at format}
+           \ifcsdef{H at old@part}{%
+              \let\H at old@part\xpg at save@part at format%
+           }{%
+              \let\@part\xpg at save@part at format%
+           }%
         }{}%
      }% (end \ifdefined\sectionformat)
    }% (end \ifdefined\titleformat)
@@ -15722,14 +15816,23 @@
   \if at hungarian@swapheadings
      % With titlesec
      \ifcsdef{titleformat}{%
-       \ifcsdef{@part}{%
-          \let\xpg at save@part at format\@part%
-          \patchcmd{\@part}%
-                    {\partname\nobreakspace\thepart}%
-                    {\thepart.\nobreakspace\partname}%
-                    {}%
-                    {\xpg at warning{Failed to patch part for Hungarian}}%
-       }{}%
+       \ifcsdef{H at old@part}{% Hyperref
+            \let\xpg at save@part at format\H at old@part%
+            \patchcmd{\H at old@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\thepart.\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Hungarian}}%
+       }{% not hyperref
+         \ifcsdef{@part}{%
+            \let\xpg at save@part at format\@part%
+            \patchcmd{\@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\thepart.\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Hungarian}}%
+         }{}%
+       }
        \ifcsdef{chapter}{%
           \titleformat\chapter[display]%
              {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
@@ -15757,13 +15860,21 @@
                        {}%
                        {\xpg at warning{Failed to patch chapter for Hungarian}}%
            }{}%
-           \ifcsdef{@part}{%
-              \let\xpg at save@part at format\@part%
-              \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
-                               {\printpartnum.\partnamenum\printpartname}%
-                               {}%
-                               {\xpg at warning{Failed to patch part for Hungarian}}%
-           }{}%
+           \ifcsdef{H at old@part}{% Hyperref
+                \let\xpg at save@part at format\H at old@part%
+                \patchcmd{\H at old@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\printpartnum.\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Hungarian}}%
+           }{% not hyperref
+             \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\printpartnum.\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Hungarian}}%
+             }{}%
+           }%
          }{%  (not \ifdefined\@memptsize)
            % With standard classes
             \ifcsdef{@makechapterhead}{%
@@ -15774,14 +15885,23 @@
                        {}%
                        {\xpg at warning{Failed to patch chapter for Hungarian}}%
             }{}%
-            \ifcsdef{@part}{%
-              \let\xpg at save@part at format\@part%
-              \patchcmd{\@part}%
+            \ifcsdef{H at old@part}{% Hyperref
+              \let\xpg at save@part at format\H at old@part%
+              \patchcmd{\H at old@part}%
                        {\partname\nobreakspace\thepart}%
                        {\thepart.\nobreakspace\partname}%
                        {}%
-                       {\xpg at warning{Failed to patch part for Hungarian}}%
-            }{}%  (end \ifdefined\@part)
+                       {\xpg at warning{Failed to patch part for Hungarian}}%            
+            }{% not hyperref
+              \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}%
+                         {\partname\nobreakspace\thepart}%
+                         {\thepart.\nobreakspace\partname}%
+                         {}%
+                         {\ifcsdef{part}{\xpg at 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 @@
    \ifcsdef{titleformat}{%
       % With titlesec
      \ifcsdef{xpg at save@part at format}{%
-        \let\@part\xpg at save@part at format
+        \ifcsdef{H at old@part}{%
+            \let\H at old@part\xpg at save@part at format%
+        }{%
+            \let\@part\xpg at save@part at format%
+        }%
      }{}%
      \ifcsdef{chapter}{%
         \titleformat\chapter[display]%
@@ -15853,7 +15977,11 @@
      }{%
         % With memoir and standard classes
         \ifcsdef{xpg at save@part at format}{%
-           \let\@part\xpg at save@part at format
+           \ifcsdef{H at old@part}{%
+               \let\H at old@part\xpg at save@part at format%
+           }{%
+               \let\@part\xpg at save@part at format%
+           }%
         }{}%
         \ifcsdef{xpg at save@chap at format}{%
           \let\@makechapterhead\xpg at save@chap at format
@@ -21941,7 +22069,7 @@
    \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 @@
 
 \def\inlineextras at slovenian{\extras at slovenian}
 
-\def\noextras at slovenian{\let\alph\latinalph\let\Alph\latinAlph}
+\def\noextras at slovenian{%
+  \let\alph\latinalph\let\Alph\latinAlph%
+}
 
 %    \end{macrocode}
 % \iffalse
@@ -24280,6 +24410,7 @@
 \ProvidesFile{gloss-uyghur.ldf}[polyglossia: module for Uyghur]
 %% Translations provided by Osman Tursun (Github Account: neouyghur)
 
+\RequireBidi
 \PolyglossiaSetup{uyghur}{
   bcp47=ug,
   script=Arabic,
@@ -24286,7 +24417,7 @@
   direction=RL,
   scripttag=arab,
   langtag=UYG,
-  hyphennames={nohyphenation}،
+  hyphennames={nohyphenation},
   fontsetup=true,
 }
 
@@ -24293,10 +24424,71 @@
 % BCP-47 compliant aliases
 \setlanguagealias*{uyghur}{ug}
 
+\newif\if at uyghur@swapcaptions
+\newif\if at uyghur@swapheadings
+\newif\if at uyghur@swapheaders
+\define at choicekey*+{uyghur}{swapstrings}[\xpg at val\xpg at nr]{all,captions,headings,headers,hheaders,none}[all]{%
+   \ifcase\xpg at nr\relax
+      % all:
+      \@uyghur at swapcaptionstrue%
+      \@uyghur at swapheadingstrue%
+      \@uyghur at swapheaderstrue%
+   \or
+      % captions:
+      \@uyghur at swapcaptionstrue%
+      \@uyghur at swapheadingsfalse%
+      \@uyghur at swapheadersfalse%
+   \or
+      % headings:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingstrue%
+      \@uyghur at swapheadersfalse%
+   \or
+      % headers:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingsfalse%
+      \@uyghur at swapheaderstrue%
+   \or
+      % hheaders:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingstrue%
+      \@uyghur at swapheaderstrue%
+   \or
+      % none:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingsfalse%
+      \@uyghur at swapheadersfalse%
+   \fi
+   \xpg at info{Option: Uyghur, swapstrings=\xpg at val}%
+}{\xpg at warning{Unknown Uyghur swapstrings value `#1'}}
+
+\newif\if at uyghur@ordchapter
+\newif\if at uyghur@romchapter
+\define at choicekey*+{uyghur}{chapterformat}[\xpg at val\xpg at nr]{ordinal,roman,arabic}[ordinal]{%
+   \ifcase\xpg at nr\relax
+      % ordinal:
+      \@uyghur at ordchaptertrue%
+      \@uyghur at romchapterfalse%
+   \or
+      % roman:
+      \@uyghur at ordchapterfalse%
+      \@uyghur at romchaptertrue%
+   \or
+      % arabic:
+      \@uyghur at ordchapterfalse%
+      \@uyghur at romchapterfalse%
+   \fi
+   \xpg at info{Option: Uyghur, chapterformat=\xpg at val}%
+}{\xpg at warning{Unknown Uyghur chapterformat value `#1'}}
+
+% Register default options
+\xpg at initialize@gloss at options{uyghur}{swapstrings=all,chapterformat=ordinal}
+
+
 \def\captionsuyghur{%
-  \def\refname{\@ensure at RTL{پايدىلانما}}%
-  \def\abstractname{\@ensure at RTL{ئابستراكت}}%
-  \def\bibname{\@ensure at RTL{پايدىلانما}}%
+  \def\refname{\@ensure at RTL{پايدىلانمىلار}}%
+  \def\abstractname{\@ensure at RTL{قىسقىچە مەزمۇنى}}%
+  \def\bibname{\@ensure at RTL{پايدىلانمىلار}}%
   \def\prefacename{\@ensure at RTL{كىرىش سۆز}}%
   \def\chaptername{\@ensure at RTL{باب}}%
   \def\appendixname{\@ensure at RTL{قوشۇمچە}}%
@@ -24320,14 +24512,329 @@
   \def\subjectname{\@ensure at RTL{تېما}}%
 }
 
+% Save original capsformats
+\let\xpg at save@fnum at table\fnum at table
+\let\xpg at save@fnum at figure\fnum at figure
+
+\def\uyghur at capsformat{%
+  %
+  % Change captions
+  \if at uyghur@swapcaptions
+     % change ‫‪'x.x‬‬ ‫ﺭﻩﺳﯩﻢ‬' to 'ﺭﻩﺳﯩﻢ-x.x‬‬'
+     \def\fnum at figure{\thefigure-\figurename}
+     %
+     % same for table
+     \def\fnum at table{\thetable-\tablename}
+  \fi
+  %
+  % change chapter and part headings
+  \if at uyghur@swapheadings
+     % With titlesec
+     \ifcsdef{titleformat}{%
+       \ifcsdef{H at old@part}{% Hyperref
+            \let\xpg at save@part at format\H at old@part%
+            \patchcmd{\H at old@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\the at uyghur@part\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Uyghur}}%
+       }{% not hyperref
+         \ifcsdef{@part}{%
+            \let\xpg at save@part at format\@part%
+            \patchcmd{\@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\the at uyghur@part\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Uyghur}}%
+         }{}%
+       }
+       \ifcsdef{chapter}{%
+          \titleformat\chapter[display]%
+             {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
+             {\the at uyghur@chapter\space\@chapapp}{.8\baselineskip}{\ttl at sizes\z@\ttl at passexplicit}
+       }{}%
+     }{% (not \ifdefined\titleformat)
+       % With KOMA
+       \ifcsdef{sectionformat}{%
+          \ifcsdef{partformat}{%
+            \let\xpg at save@part at format\partformat%
+            \renewcommand{\partformat}{\the at uyghur@part~\partname}%
+          }{}%
+          \ifcsdef{chapterformat}{%
+            \let\xpg at save@chap at format\chapterformat%
+            \renewcommand{\chapterformat}{\mbox{\the at uyghur@chapter%
+                                          \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
+          }{}%
+       }{%  (not \ifdefined\sectionformat)
+         % With memoir
+         \ifcsdef{@memptsize}{%
+           \ifcsdef{@makechapterhead}{%
+              \let\xpg at save@chap at format\@makechapterhead%
+              \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
+                       {\chapnumfont\the at uyghur@chapter\chapternamenum\printchaptername}%
+                       {}%
+                       {\xpg at warning{Failed to patch chapter for Uyghur}}%
+           }{}%
+           \ifcsdef{H at old@part}{% Hyperref
+                \let\xpg at save@part at format\H at old@part%
+                \patchcmd{\H at old@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\chapnumfont\the at uyghur@part\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Uyghur}}%
+           }{% not hyperref
+             \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\chapnumfont\the at uyghur@part\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Uyghur}}%
+             }{}%
+           }%
+         }{%  (not \ifdefined\@memptsize)
+           % With standard classes
+            \ifcsdef{@makechapterhead}{%
+              \let\xpg at save@chap at format\@makechapterhead%
+              \patchcmd{\@makechapterhead}%
+                       {\@chapapp\space \thechapter}%
+                       {\the at uyghur@chapter\space \@chapapp}%
+                       {}%
+                       {\xpg at warning{Failed to patch chapter for Uyghur}}%
+            }{}%
+            \ifcsdef{H at old@part}{% Hyperref
+              \let\xpg at save@part at format\H at old@part%
+              \patchcmd{\H at old@part}%
+                       {\partname\nobreakspace\thepart}%
+                       {\the at uyghur@part\nobreakspace\partname}%
+                       {}%
+                       {\xpg at warning{Failed to patch part for Uyghur}}%            
+            }{% not hyperref
+              \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}%
+                         {\partname\nobreakspace\thepart}%
+                         {\the at uyghur@part\nobreakspace\partname}%
+                         {}%
+                         {\ifcsdef{part}{\xpg at 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 at uyghur@swapheadings)
+  %
+  % Change running headers
+  \if at uyghur@swapheaders
+    \ifcsdef{chapterformat}{%
+      % With KOMA
+      \let\xpg at save@chaptermark at format\chaptermarkformat%
+      \renewcommand*\chaptermarkformat{%
+         \the at uyghur@chapter\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}}
+    }{% (not \ifdefined\chapterformat)
+      \ifcsdef{@memptsize}{%
+        % With memoir
+        \let\xpg at save@chaptermark at format\chaptermark%
+        \renewcommand*\chaptermark[1]{%
+          \markboth{\memUChead{%
+            \ifnum \c at secnumdepth >\m at ne
+              \ifbool{@mainmatter}{%
+                \the at uyghur@chapter\ \@chapapp\ %
+              }{}%
+            \fi
+            ##1}}{}}%
+      }{% (not \ifdefined\@memptsize)
+        % With standard classes
+        \ifcsdef{chaptermark}{%
+          \ifpatchable{\chaptermark}%
+               {\@chapapp\ \thechapter.}%
+               {\let\xpg at save@chaptermark at format\chaptermark%
+                \patchcmd{\chaptermark}%
+                    {\@chapapp\ \thechapter.}%
+                    {\the at uyghur@chapter\ \@chapapp}%
+                    {}%
+                    {\xpg at warning{Failed to patch chaptermark for Uyghur}}}%
+               {}%
+        }{}% (end \ifdefined\sectionmark)
+                \ifcsdef{sectionmark}{%
+          \ifpatchable{\sectionmark}%
+               {\thesection.}%
+               {\let\xpg at save@sectionmark at format\sectionmark%
+                \patchcmd{\sectionmark}%
+                    {\thesection.}%
+                    {\thesection}%
+                    {}%
+                    {\xpg at warning{Failed to patch sectionmark for Uyghur}}}%
+               {}%
+        }{}% (end \ifdefined\chaptermark)
+      }% (end \ifdefined\@memptsize)
+    }% (end \ifdefined\chapterformat)
+  \fi% (end \if at uyghur@swapheaders)
+}
+
+\def\nouyghur at capsformat{%
+   %
+   % Reset changes of \uyghur at capsformat
+   \let\fnum at table\xpg at save@fnum at table%
+   \let\fnum at figure\xpg at save@fnum at figure%
+   %
+   % Reset chapter and part heading
+   \ifcsdef{titleformat}{%
+      % With titlesec
+     \ifcsdef{xpg at save@part at format}{%
+        \ifcsdef{H at old@part}{%
+            \let\H at old@part\xpg at save@part at format%
+        }{%
+            \let\@part\xpg at save@part at format%
+        }%
+     }{}%
+     \ifcsdef{chapter}{%
+        \titleformat\chapter[display]%
+          {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
+          {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl at sizes\z@\ttl at passexplicit}
+     }{}%
+   }{% (not \ifdefined\titleformat)
+     \ifcsdef{sectionformat}{%
+        % With KOMA
+        \ifcsdef{xpg at save@part at format}{%
+           \let\partformat\xpg at save@part at format
+        }{}%
+        \ifcsdef{xpg at save@chap at format}{%
+           \let\chapterformat\xpg at save@chap at format
+        }{}%
+     }{%
+        % With memoir and standard classes
+        \ifcsdef{xpg at save@part at format}{%
+           \ifcsdef{H at old@part}{%
+               \let\H at old@part\xpg at save@part at format%
+           }{%
+               \let\@part\xpg at save@part at format%
+           }%
+        }{}%
+        \ifcsdef{xpg at save@chap at format}{%
+          \let\@makechapterhead\xpg at save@chap at format
+        }{}%
+     }% (end \ifdefined\sectionformat)
+   }% (end \ifdefined\titleformat)
+  %
+  % Reset headers
+  \ifcsdef{chaptermarkformat}{%
+     % With KOMA
+     \ifcsdef{xpg at save@chaptermark at format}{%
+       \let\chaptermarkformat\xpg at save@chaptermark at format%
+     }{}%
+  }{%
+     \ifcsdef{chaptermark}{%
+       % With memoir and standard classes
+       \ifcsdef{xpg at save@chaptermark at format}{%
+         \let\chaptermark\xpg at save@chaptermark at format%
+       }{}%
+     }{}% (end \ifdefined\chaptermark)
+     \ifcsdef{sectionmark}{%
+       \ifcsdef{xpg at save@sectionmark at format}{%
+         \let\sectionmark\xpg at save@sectionmark at format%
+       }{}%
+     }{}% (end \ifdefined\sectionmark)
+  }% (end \ifdefined\chapterformat)
+}
+
+\def\blockextras at uyghur{%
+   \uyghur at capsformat%
+}
+
+\def\noextras at uyghur{%
+   \nouyghur at capsformat%
+}
+
+\ifxetex
+  \let\xpg at orig@DigitsDotDashInterCharToks\DigitsDotDashInterCharToks%
+\fi
+
+\def\uyghur at 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 at ltr@numbers{%
+    \ifxetex
+      % Restore bidi's \DigitsDotDashInterCharToks
+      \let\DigitsDotDashInterCharToks\xpg at orig@DigitsDotDashInterCharToks%
+    \fi%
+}
+
+\let\the at uyghur@part\thepart
+\let\the at uyghur@chapter\thechapter
+
+\def\uyghur at chapterformat{%
+   \ifcsdef{part}{%
+      \if at uyghur@ordchapter%
+        \renewcommand{\the at uyghur@part}{\uyghurord{part}}%
+      \fi%
+      \if at uyghur@romchapter%
+        \renewcommand{\the at uyghur@part}{\Roman{part}}%
+      \fi%
+   }{}%
+   \ifcsdef{chapter}{%
+      \if at uyghur@ordchapter%
+        \renewcommand{\the at uyghur@chapter}{\uyghurord{chapter}}%
+      \fi%
+      \if at uyghur@romchapter%
+        \renewcommand{\the at uyghur@chapter}{\Roman{chapter}}%
+      \fi%
+   }{}%
+}
+
+\def\uyghur at numbers{%
+   % Prevent bidi from setting the numbers RTL
+   \uyghur at ltr@numbers%
+   % Format chapter and part
+   \uyghur at chapterformat%
+}
+
+\def\nouyghur at numbers{%
+  % Restore previous bidi numbers definition
+  \nouyghur at ltr@numbers
+}
+
+\def\uyghur at globalnumbers{%
+   % Prevent bidi from setting the numbers RTL
+   \uyghur at ltr@numbers%
+   % Format chapter and part
+   \uyghur at chapterformat%
+}
+
+\def\uyghurmonth#1{\ifcase#1%
+  \or يانۋار\or فېۋرال\or مارت\or ئاپرېل\or ماي\or ئىيۇن
+  \or ئىيۇل\or ئاۋغۇست\or سېنتەبىر\or ئۆكتەبىر\or نويابىر\or دېكابىر\fi}
+
 \def\dateuyghur{%
-   \def\today{\number\day~\ifcase\month\or
-    يانۋار\or فېۋرال\or مارت\or ئاپرېل\or ماي\or ئىيۇن\or
-    ئىيۇل\or ئاۋغۇست\or سېنتەبىر\or ئۆكتەبىر\or نويابىر\or
-    دېكابىر\fi
-    \space\number\year}%
+   \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>

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf	2021-04-13 21:05:55 UTC (rev 58869)
@@ -22,8 +22,11 @@
 
 \define at boolkey{croatian}[croatian@]{splithyphens}[true]{}
 
+\define at boolkey{croatian}[croatian@]{localalph}[true]{}
+
 % Register default options
-\xpg at initialize@gloss at options{croatian}{babelshorthands=false,disableligatures=false,splithyphens=true}
+\xpg at initialize@gloss at options{croatian}{babelshorthands=false,disableligatures=false,
+                                        splithyphens=true,localalph=true}
 
 \ifsystem at babelshorthands
   \setkeys{croatian}{babelshorthands=true}
@@ -202,24 +205,40 @@
 
 \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 at charifavailable{01CC}{nj}a\or ve\hr at charifavailable{01C9}{lj}ače\or
+    ožujka\or trav\hr at charifavailable{01CC}{nj}a\or svib\hr at charifavailable{01CC}{nj}a\or
+    lip\hr at charifavailable{01CC}{nj}a\or srp\hr at 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 at alph#1{\expandafter\croatian@@alph\csname c@#1\endcsname}
+\def\croatian at Alph#1{\expandafter\croatian@@Alph\csname c@#1\endcsname}
+
 \def\noextras at croatian{%
   \ifcroatian at babelshorthands\nocroatian at shorthands\fi%
   \nocroatian at hyphens%
+  \let\alph\latinalph\let\Alph\latinAlph%
 }
 
 \def\blockextras at croatian{%
   \ifcroatian at babelshorthands\croatian at shorthands\fi%
   \ifcroatian at splithyphens\croatian at hyphens\else\nocroatian at hyphens\fi%
+  \ifcroatian at localalph\let\alph\croatian at alph\let\Alph\croatian at Alph\fi%
 }
 
 \def\inlineextras at croatian{%
   \ifcroatian at babelshorthands\croatian at shorthands\fi%
   \ifcroatian at splithyphens\croatian at hyphens\else\nocroatian at hyphens\fi%
+  \ifcroatian at localalph\let\alph\croatian at alph\let\Alph\croatian at Alph\fi%
 }
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf	2021-04-13 21:05:55 UTC (rev 58869)
@@ -422,7 +422,7 @@
                        {\partname\nobreakspace\thepart}%
                        {\xpg at french@part\nobreakspace\partname}%
                        {}%
-                       {\xpg at warning{Failed to patch part for French}}%
+                       {\ifcsdef{part}{\xpg at warning{Failed to patch part for French}}{}}%
             }{}%  (end \ifdefined \H at old@part)
          }%  (end \ifdefined\@part)
        }% (end \ifdefined\@memptsize)
@@ -435,7 +435,11 @@
    \ifcsdef{titleformat}{%
       % With titlesec
      \ifcsdef{xpg at save@part at format}{%
-        \ifcsdef{H at old@part}{\let\@H at old@part\xpg at save@part at format}{\let\@part\xpg at save@part at format}
+        \ifcsdef{H at old@part}{%
+            \let\H at old@part\xpg at save@part at format%
+        }{%
+            \let\@part\xpg at save@part at format%
+        }%
      }{}%
    }{% (not \ifdefined\titleformat)
      \ifcsdef{sectionformat}{%
@@ -446,7 +450,11 @@
      }{%
         % With memoir and standard classes
         \ifcsdef{xpg at save@part at format}{%
-           \ifcsdef{H at old@part}{\let\@H at old@part\xpg at save@part at format}{\let\@part\xpg at save@part at format}
+           \ifcsdef{H at old@part}{%
+              \let\H at old@part\xpg at save@part at format%
+           }{%
+              \let\@part\xpg at save@part at format%
+           }%
         }{}%
      }% (end \ifdefined\sectionformat)
    }% (end \ifdefined\titleformat)

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-hungarian.ldf	2021-04-13 21:05:55 UTC (rev 58869)
@@ -133,14 +133,23 @@
   \if at hungarian@swapheadings
      % With titlesec
      \ifcsdef{titleformat}{%
-       \ifcsdef{@part}{%
-          \let\xpg at save@part at format\@part%
-          \patchcmd{\@part}%
-                    {\partname\nobreakspace\thepart}%
-                    {\thepart.\nobreakspace\partname}%
-                    {}%
-                    {\xpg at warning{Failed to patch part for Hungarian}}%
-       }{}%
+       \ifcsdef{H at old@part}{% Hyperref
+            \let\xpg at save@part at format\H at old@part%
+            \patchcmd{\H at old@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\thepart.\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Hungarian}}%
+       }{% not hyperref
+         \ifcsdef{@part}{%
+            \let\xpg at save@part at format\@part%
+            \patchcmd{\@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\thepart.\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Hungarian}}%
+         }{}%
+       }
        \ifcsdef{chapter}{%
           \titleformat\chapter[display]%
              {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
@@ -168,13 +177,21 @@
                        {}%
                        {\xpg at warning{Failed to patch chapter for Hungarian}}%
            }{}%
-           \ifcsdef{@part}{%
-              \let\xpg at save@part at format\@part%
-              \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
-                               {\printpartnum.\partnamenum\printpartname}%
-                               {}%
-                               {\xpg at warning{Failed to patch part for Hungarian}}%
-           }{}%
+           \ifcsdef{H at old@part}{% Hyperref
+                \let\xpg at save@part at format\H at old@part%
+                \patchcmd{\H at old@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\printpartnum.\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Hungarian}}%
+           }{% not hyperref
+             \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\printpartnum.\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Hungarian}}%
+             }{}%
+           }%
          }{%  (not \ifdefined\@memptsize)
            % With standard classes
             \ifcsdef{@makechapterhead}{%
@@ -185,14 +202,23 @@
                        {}%
                        {\xpg at warning{Failed to patch chapter for Hungarian}}%
             }{}%
-            \ifcsdef{@part}{%
-              \let\xpg at save@part at format\@part%
-              \patchcmd{\@part}%
+            \ifcsdef{H at old@part}{% Hyperref
+              \let\xpg at save@part at format\H at old@part%
+              \patchcmd{\H at old@part}%
                        {\partname\nobreakspace\thepart}%
                        {\thepart.\nobreakspace\partname}%
                        {}%
-                       {\xpg at warning{Failed to patch part for Hungarian}}%
-            }{}%  (end \ifdefined\@part)
+                       {\xpg at warning{Failed to patch part for Hungarian}}%            
+            }{% not hyperref
+              \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}%
+                         {\partname\nobreakspace\thepart}%
+                         {\thepart.\nobreakspace\partname}%
+                         {}%
+                         {\ifcsdef{part}{\xpg at warning{Failed to patch part for Hungarian}}{}}%
+              }{}%  (end \ifdefined\@part)
+            }% (end not hyperref)
           }% (end \ifdefined\@memptsize)
         }% (end \ifdefined\sectionformat)
      }% (end \ifdefined\titleformat)
@@ -245,7 +271,11 @@
    \ifcsdef{titleformat}{%
       % With titlesec
      \ifcsdef{xpg at save@part at format}{%
-        \let\@part\xpg at save@part at format
+        \ifcsdef{H at old@part}{%
+            \let\H at old@part\xpg at save@part at format%
+        }{%
+            \let\@part\xpg at save@part at format%
+        }%
      }{}%
      \ifcsdef{chapter}{%
         \titleformat\chapter[display]%
@@ -264,7 +294,11 @@
      }{%
         % With memoir and standard classes
         \ifcsdef{xpg at save@part at format}{%
-           \let\@part\xpg at save@part at format
+           \ifcsdef{H at old@part}{%
+               \let\H at old@part\xpg at save@part at format%
+           }{%
+               \let\@part\xpg at save@part at format%
+           }%
         }{}%
         \ifcsdef{xpg at save@chap at format}{%
           \let\@makechapterhead\xpg at save@chap at format

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-serbian.ldf	2021-04-13 21:05:55 UTC (rev 58869)
@@ -98,7 +98,7 @@
    \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}%

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-slovenian.ldf	2021-04-13 21:05:55 UTC (rev 58869)
@@ -73,6 +73,8 @@
 
 \def\inlineextras at slovenian{\extras at slovenian}
 
-\def\noextras at slovenian{\let\alph\latinalph\let\Alph\latinAlph}
+\def\noextras at slovenian{%
+  \let\alph\latinalph\let\Alph\latinAlph%
+}
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-uyghur.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-uyghur.ldf	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-uyghur.ldf	2021-04-13 21:05:55 UTC (rev 58869)
@@ -1,6 +1,7 @@
 \ProvidesFile{gloss-uyghur.ldf}[polyglossia: module for Uyghur]
 %% Translations provided by Osman Tursun (Github Account: neouyghur)
 
+\RequireBidi
 \PolyglossiaSetup{uyghur}{
   bcp47=ug,
   script=Arabic,
@@ -7,7 +8,7 @@
   direction=RL,
   scripttag=arab,
   langtag=UYG,
-  hyphennames={nohyphenation}،
+  hyphennames={nohyphenation},
   fontsetup=true,
 }
 
@@ -14,10 +15,71 @@
 % BCP-47 compliant aliases
 \setlanguagealias*{uyghur}{ug}
 
+\newif\if at uyghur@swapcaptions
+\newif\if at uyghur@swapheadings
+\newif\if at uyghur@swapheaders
+\define at choicekey*+{uyghur}{swapstrings}[\xpg at val\xpg at nr]{all,captions,headings,headers,hheaders,none}[all]{%
+   \ifcase\xpg at nr\relax
+      % all:
+      \@uyghur at swapcaptionstrue%
+      \@uyghur at swapheadingstrue%
+      \@uyghur at swapheaderstrue%
+   \or
+      % captions:
+      \@uyghur at swapcaptionstrue%
+      \@uyghur at swapheadingsfalse%
+      \@uyghur at swapheadersfalse%
+   \or
+      % headings:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingstrue%
+      \@uyghur at swapheadersfalse%
+   \or
+      % headers:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingsfalse%
+      \@uyghur at swapheaderstrue%
+   \or
+      % hheaders:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingstrue%
+      \@uyghur at swapheaderstrue%
+   \or
+      % none:
+      \@uyghur at swapcaptionsfalse%
+      \@uyghur at swapheadingsfalse%
+      \@uyghur at swapheadersfalse%
+   \fi
+   \xpg at info{Option: Uyghur, swapstrings=\xpg at val}%
+}{\xpg at warning{Unknown Uyghur swapstrings value `#1'}}
+
+\newif\if at uyghur@ordchapter
+\newif\if at uyghur@romchapter
+\define at choicekey*+{uyghur}{chapterformat}[\xpg at val\xpg at nr]{ordinal,roman,arabic}[ordinal]{%
+   \ifcase\xpg at nr\relax
+      % ordinal:
+      \@uyghur at ordchaptertrue%
+      \@uyghur at romchapterfalse%
+   \or
+      % roman:
+      \@uyghur at ordchapterfalse%
+      \@uyghur at romchaptertrue%
+   \or
+      % arabic:
+      \@uyghur at ordchapterfalse%
+      \@uyghur at romchapterfalse%
+   \fi
+   \xpg at info{Option: Uyghur, chapterformat=\xpg at val}%
+}{\xpg at warning{Unknown Uyghur chapterformat value `#1'}}
+
+% Register default options
+\xpg at initialize@gloss at options{uyghur}{swapstrings=all,chapterformat=ordinal}
+
+
 \def\captionsuyghur{%
-  \def\refname{\@ensure at RTL{پايدىلانما}}%
-  \def\abstractname{\@ensure at RTL{ئابستراكت}}%
-  \def\bibname{\@ensure at RTL{پايدىلانما}}%
+  \def\refname{\@ensure at RTL{پايدىلانمىلار}}%
+  \def\abstractname{\@ensure at RTL{قىسقىچە مەزمۇنى}}%
+  \def\bibname{\@ensure at RTL{پايدىلانمىلار}}%
   \def\prefacename{\@ensure at RTL{كىرىش سۆز}}%
   \def\chaptername{\@ensure at RTL{باب}}%
   \def\appendixname{\@ensure at RTL{قوشۇمچە}}%
@@ -41,12 +103,327 @@
   \def\subjectname{\@ensure at RTL{تېما}}%
 }
 
+% Save original capsformats
+\let\xpg at save@fnum at table\fnum at table
+\let\xpg at save@fnum at figure\fnum at figure
+
+\def\uyghur at capsformat{%
+  %
+  % Change captions
+  \if at uyghur@swapcaptions
+     % change ‫‪'x.x‬‬ ‫ﺭﻩﺳﯩﻢ‬' to 'ﺭﻩﺳﯩﻢ-x.x‬‬'
+     \def\fnum at figure{\thefigure-\figurename}
+     %
+     % same for table
+     \def\fnum at table{\thetable-\tablename}
+  \fi
+  %
+  % change chapter and part headings
+  \if at uyghur@swapheadings
+     % With titlesec
+     \ifcsdef{titleformat}{%
+       \ifcsdef{H at old@part}{% Hyperref
+            \let\xpg at save@part at format\H at old@part%
+            \patchcmd{\H at old@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\the at uyghur@part\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Uyghur}}%
+       }{% not hyperref
+         \ifcsdef{@part}{%
+            \let\xpg at save@part at format\@part%
+            \patchcmd{\@part}%
+                      {\partname\nobreakspace\thepart}%
+                      {\the at uyghur@part\nobreakspace\partname}%
+                      {}%
+                      {\xpg at warning{Failed to patch part for Uyghur}}%
+         }{}%
+       }
+       \ifcsdef{chapter}{%
+          \titleformat\chapter[display]%
+             {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
+             {\the at uyghur@chapter\space\@chapapp}{.8\baselineskip}{\ttl at sizes\z@\ttl at passexplicit}
+       }{}%
+     }{% (not \ifdefined\titleformat)
+       % With KOMA
+       \ifcsdef{sectionformat}{%
+          \ifcsdef{partformat}{%
+            \let\xpg at save@part at format\partformat%
+            \renewcommand{\partformat}{\the at uyghur@part~\partname}%
+          }{}%
+          \ifcsdef{chapterformat}{%
+            \let\xpg at save@chap at format\chapterformat%
+            \renewcommand{\chapterformat}{\mbox{\the at uyghur@chapter%
+                                          \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
+          }{}%
+       }{%  (not \ifdefined\sectionformat)
+         % With memoir
+         \ifcsdef{@memptsize}{%
+           \ifcsdef{@makechapterhead}{%
+              \let\xpg at save@chap at format\@makechapterhead%
+              \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
+                       {\chapnumfont\the at uyghur@chapter\chapternamenum\printchaptername}%
+                       {}%
+                       {\xpg at warning{Failed to patch chapter for Uyghur}}%
+           }{}%
+           \ifcsdef{H at old@part}{% Hyperref
+                \let\xpg at save@part at format\H at old@part%
+                \patchcmd{\H at old@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\chapnumfont\the at uyghur@part\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Uyghur}}%
+           }{% not hyperref
+             \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+                                 {\chapnumfont\the at uyghur@part\partnamenum\printpartname}%
+                                 {}%
+                                 {\xpg at warning{Failed to patch part for Uyghur}}%
+             }{}%
+           }%
+         }{%  (not \ifdefined\@memptsize)
+           % With standard classes
+            \ifcsdef{@makechapterhead}{%
+              \let\xpg at save@chap at format\@makechapterhead%
+              \patchcmd{\@makechapterhead}%
+                       {\@chapapp\space \thechapter}%
+                       {\the at uyghur@chapter\space \@chapapp}%
+                       {}%
+                       {\xpg at warning{Failed to patch chapter for Uyghur}}%
+            }{}%
+            \ifcsdef{H at old@part}{% Hyperref
+              \let\xpg at save@part at format\H at old@part%
+              \patchcmd{\H at old@part}%
+                       {\partname\nobreakspace\thepart}%
+                       {\the at uyghur@part\nobreakspace\partname}%
+                       {}%
+                       {\xpg at warning{Failed to patch part for Uyghur}}%            
+            }{% not hyperref
+              \ifcsdef{@part}{%
+                \let\xpg at save@part at format\@part%
+                \patchcmd{\@part}%
+                         {\partname\nobreakspace\thepart}%
+                         {\the at uyghur@part\nobreakspace\partname}%
+                         {}%
+                         {\ifcsdef{part}{\xpg at 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 at uyghur@swapheadings)
+  %
+  % Change running headers
+  \if at uyghur@swapheaders
+    \ifcsdef{chapterformat}{%
+      % With KOMA
+      \let\xpg at save@chaptermark at format\chaptermarkformat%
+      \renewcommand*\chaptermarkformat{%
+         \the at uyghur@chapter\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}}
+    }{% (not \ifdefined\chapterformat)
+      \ifcsdef{@memptsize}{%
+        % With memoir
+        \let\xpg at save@chaptermark at format\chaptermark%
+        \renewcommand*\chaptermark[1]{%
+          \markboth{\memUChead{%
+            \ifnum \c at secnumdepth >\m at ne
+              \ifbool{@mainmatter}{%
+                \the at uyghur@chapter\ \@chapapp\ %
+              }{}%
+            \fi
+            ##1}}{}}%
+      }{% (not \ifdefined\@memptsize)
+        % With standard classes
+        \ifcsdef{chaptermark}{%
+          \ifpatchable{\chaptermark}%
+               {\@chapapp\ \thechapter.}%
+               {\let\xpg at save@chaptermark at format\chaptermark%
+                \patchcmd{\chaptermark}%
+                    {\@chapapp\ \thechapter.}%
+                    {\the at uyghur@chapter\ \@chapapp}%
+                    {}%
+                    {\xpg at warning{Failed to patch chaptermark for Uyghur}}}%
+               {}%
+        }{}% (end \ifdefined\sectionmark)
+                \ifcsdef{sectionmark}{%
+          \ifpatchable{\sectionmark}%
+               {\thesection.}%
+               {\let\xpg at save@sectionmark at format\sectionmark%
+                \patchcmd{\sectionmark}%
+                    {\thesection.}%
+                    {\thesection}%
+                    {}%
+                    {\xpg at warning{Failed to patch sectionmark for Uyghur}}}%
+               {}%
+        }{}% (end \ifdefined\chaptermark)
+      }% (end \ifdefined\@memptsize)
+    }% (end \ifdefined\chapterformat)
+  \fi% (end \if at uyghur@swapheaders)
+}
+
+\def\nouyghur at capsformat{%
+   %
+   % Reset changes of \uyghur at capsformat
+   \let\fnum at table\xpg at save@fnum at table%
+   \let\fnum at figure\xpg at save@fnum at figure%
+   %
+   % Reset chapter and part heading
+   \ifcsdef{titleformat}{%
+      % With titlesec
+     \ifcsdef{xpg at save@part at format}{%
+        \ifcsdef{H at old@part}{%
+            \let\H at old@part\xpg at save@part at format%
+        }{%
+            \let\@part\xpg at save@part at format%
+        }%
+     }{}%
+     \ifcsdef{chapter}{%
+        \titleformat\chapter[display]%
+          {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
+          {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl at sizes\z@\ttl at passexplicit}
+     }{}%
+   }{% (not \ifdefined\titleformat)
+     \ifcsdef{sectionformat}{%
+        % With KOMA
+        \ifcsdef{xpg at save@part at format}{%
+           \let\partformat\xpg at save@part at format
+        }{}%
+        \ifcsdef{xpg at save@chap at format}{%
+           \let\chapterformat\xpg at save@chap at format
+        }{}%
+     }{%
+        % With memoir and standard classes
+        \ifcsdef{xpg at save@part at format}{%
+           \ifcsdef{H at old@part}{%
+               \let\H at old@part\xpg at save@part at format%
+           }{%
+               \let\@part\xpg at save@part at format%
+           }%
+        }{}%
+        \ifcsdef{xpg at save@chap at format}{%
+          \let\@makechapterhead\xpg at save@chap at format
+        }{}%
+     }% (end \ifdefined\sectionformat)
+   }% (end \ifdefined\titleformat)
+  %
+  % Reset headers
+  \ifcsdef{chaptermarkformat}{%
+     % With KOMA
+     \ifcsdef{xpg at save@chaptermark at format}{%
+       \let\chaptermarkformat\xpg at save@chaptermark at format%
+     }{}%
+  }{%
+     \ifcsdef{chaptermark}{%
+       % With memoir and standard classes
+       \ifcsdef{xpg at save@chaptermark at format}{%
+         \let\chaptermark\xpg at save@chaptermark at format%
+       }{}%
+     }{}% (end \ifdefined\chaptermark)
+     \ifcsdef{sectionmark}{%
+       \ifcsdef{xpg at save@sectionmark at format}{%
+         \let\sectionmark\xpg at save@sectionmark at format%
+       }{}%
+     }{}% (end \ifdefined\sectionmark)
+  }% (end \ifdefined\chapterformat)
+}
+
+\def\blockextras at uyghur{%
+   \uyghur at capsformat%
+}
+
+\def\noextras at uyghur{%
+   \nouyghur at capsformat%
+}
+
+\ifxetex
+  \let\xpg at orig@DigitsDotDashInterCharToks\DigitsDotDashInterCharToks%
+\fi
+
+\def\uyghur at 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 at ltr@numbers{%
+    \ifxetex
+      % Restore bidi's \DigitsDotDashInterCharToks
+      \let\DigitsDotDashInterCharToks\xpg at orig@DigitsDotDashInterCharToks%
+    \fi%
+}
+
+\let\the at uyghur@part\thepart
+\let\the at uyghur@chapter\thechapter
+
+\def\uyghur at chapterformat{%
+   \ifcsdef{part}{%
+      \if at uyghur@ordchapter%
+        \renewcommand{\the at uyghur@part}{\uyghurord{part}}%
+      \fi%
+      \if at uyghur@romchapter%
+        \renewcommand{\the at uyghur@part}{\Roman{part}}%
+      \fi%
+   }{}%
+   \ifcsdef{chapter}{%
+      \if at uyghur@ordchapter%
+        \renewcommand{\the at uyghur@chapter}{\uyghurord{chapter}}%
+      \fi%
+      \if at uyghur@romchapter%
+        \renewcommand{\the at uyghur@chapter}{\Roman{chapter}}%
+      \fi%
+   }{}%
+}
+
+\def\uyghur at numbers{%
+   % Prevent bidi from setting the numbers RTL
+   \uyghur at ltr@numbers%
+   % Format chapter and part
+   \uyghur at chapterformat%
+}
+
+\def\nouyghur at numbers{%
+  % Restore previous bidi numbers definition
+  \nouyghur at ltr@numbers
+}
+
+\def\uyghur at globalnumbers{%
+   % Prevent bidi from setting the numbers RTL
+   \uyghur at ltr@numbers%
+   % Format chapter and part
+   \uyghur at chapterformat%
+}
+
+\def\uyghurmonth#1{\ifcase#1%
+  \or يانۋار\or فېۋرال\or مارت\or ئاپرېل\or ماي\or ئىيۇن
+  \or ئىيۇل\or ئاۋغۇست\or سېنتەبىر\or ئۆكتەبىر\or نويابىر\or دېكابىر\fi}
+
 \def\dateuyghur{%
-   \def\today{\number\day~\ifcase\month\or
-    يانۋار\or فېۋرال\or مارت\or ئاپرېل\or ماي\or ئىيۇن\or
-    ئىيۇل\or ئاۋغۇست\or سېنتەبىر\or ئۆكتەبىر\or نويابىر\or
-    دېكابىر\fi
-    \space\number\year}%
+   \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}
+
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty	2021-04-13 21:05:14 UTC (rev 58868)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty	2021-04-13 21:05:55 UTC (rev 58869)
@@ -1,5 +1,5 @@
 \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}



More information about the tex-live-commits mailing list.