summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf15
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
index 21cea5c8b17..73cbfc47e5b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-thai.ldf
@@ -17,8 +17,10 @@ and may look very wrong.}
\PolyglossiaSetup{thai}{
script=Thai,
scripttag=thai,
+ langtag=THA,
hyphennames={nohyphenation},
- fontsetup=true
+ fontsetup=true,
+ localnumeral=thainumerals
%TODO localalph={xxx@alph,xxx@Alph}
%TODO localdigits=thainumber
}
@@ -84,6 +86,8 @@ and may look very wrong.}
\fi
}
+\newcommand{\thainumerals}[2]{\thainumber{#2}}
+
\def\thainumber#1{%
\if@thai@numerals
\thaidigits{\number#1}%
@@ -106,26 +110,23 @@ and may look very wrong.}
ศ\or ษ\or ส\or ห\or ฬ\or อ\or ฮ\else\xpg@ill@value{#1}{@thaialph}\fi}
\def\thai@numbers{%
- \let\@latinalph\@alph%
- \let\@latinAlph\@Alph%
\if@thai@numerals
\let\@alph\@thaialph%
\let\@Alph\@thaiAlph%
\fi
}
\def\nothai@numbers{%
- \let\@alph\@latinalph%
- \let\@Alph\@latinAlph%
+ \let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
}
\def\thai@globalnumbers{%
\let\orig@arabic\@arabic%
\let\@arabic\thainumber%
- \renewcommand{\thefootnote}{\protect\thainumber{\c@footnote}}%
+ \renewcommand{\thefootnote}{\localnumeral*{footnote}}%
}
\def\nothai@globalnumbers{%
\let\@arabic\orig@arabic%
- \renewcommand\thefootnote{\protect\number{\c@footnote}}%
}
\def\blockextras@thai{%