diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-25 22:06:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-25 22:06:03 +0000 |
commit | f9e5222a931d1b2671fa84b5c93a4605c00c2373 (patch) | |
tree | 20ac69a38c367d4792d6e3aea532c5ba669fe10a /Master/texmf-dist/source/latex/polyglossia | |
parent | 0cf37a0dcbc1de449eda38e14e357dd7b19dc5dd (diff) |
polyglossia (25mar16)
git-svn-id: svn://tug.org/texlive/trunk@40138 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/polyglossia')
-rw-r--r-- | Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx | 1301 |
1 files changed, 944 insertions, 357 deletions
diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx index 4137eee9bdf..2ef100d1e1f 100644 --- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx +++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx @@ -11,7 +11,7 @@ ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.42.0 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.42.4 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -42,7 +42,7 @@ Polyglossia makes it possible to automate the following tasks: LICENSE -Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2015 Arthur Reutenauer +Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2016 Arthur Reutenauer Polyglossia is placed under the terms of the LaTeX Project Public Licence (LPPL), either version 1.3, or, at your option, any later version. See @@ -74,7 +74,7 @@ http://github.com/reutenauer/polyglossia/issues The polyglossia package (C) 2008–2010 François Charette - (C) 2011-2015 Arthur Reutenauer + (C) 2011-2016 Arthur Reutenauer (C) 2013 Elie Roux License information appended @@ -82,7 +82,7 @@ http://github.com/reutenauer/polyglossia/issues \endpreamble \postamble - Copyright (C) 2015 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> + Copyright (C) 2016 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -560,8 +560,9 @@ http://github.com/reutenauer/polyglossia/issues % \subsection{bengali}\label{bengali}\new{v1.2.0} % \textbf{Options}: % \begin{itemize} -% \item \TB{numerals} = Western, Bengali or \textit{Devanagari} -% \item \TB{changecounternumbering} = true or \textit{false} +% \item \TB{numerals} = Western, Bengali or \textit{Devanagari} +% \item \TB{changecounternumbering} = true or \textit{false} (use specified +% numerals for headings and page numbers) % \end{itemize} % % \subsection{catalan}\label{catalan} @@ -971,7 +972,7 @@ http://github.com/reutenauer/polyglossia/issues % \section{More acknowledgements (by Arthur Reutenauer)} % Many thanks to all the people who have contributed bugfixes and new features to % Polyglossia since I took over. Most of them can be identified from the version -% control log on \href{https://github.com}{GitHub} and I won’t try to name them +% control log on \href{https://github.com/reutenauer/polyglossia}{GitHub} and I won’t try to name them % all (maybe, one day ...); among the ones who sent contributions directly to me % I would like to especially thank Claudio Beccari, the indefatigable champion of % Romance languages, and beyond! @@ -1349,12 +1350,12 @@ and may look very wrong.} \def\captionsarabic{% \def\prefacename{\@ensure@RTL{مدخل}}% - \def\refname{\@ensure@RTL{المراجع}} + \def\refname{\@ensure@RTL{المراجع}}% \def\abstractname{\@ensure@RTL{ملخص}}% \def\bibname{\@ensure@RTL{المصادر}}% \def\chaptername{\@ensure@RTL{باب}}% \def\appendixname{\@ensure@RTL{الملاحق}}% - \def\contentsname{\@ensure@RTL{المحتويات}} + \def\contentsname{\@ensure@RTL{المحتويات}}% %\def\contentsname{\@ensure@RTL{الفهرس}}% \def\listfigurename{\@ensure@RTL{قائمة الأشكال}}% \def\listtablename{\@ensure@RTL{قائمة الجداول}}% @@ -2640,7 +2641,7 @@ and may look very wrong.} \define@key{english}{variant}{% %needs to be reset for loop over hyphennames below: \def\do##1{% - \ifcsdef{l@#1}% + \xpg@ifdefined{#1}% {\csletcs{l@english}{l@#1}\listbreak}% {}% }% @@ -2660,10 +2661,10 @@ and may look very wrong.} {\@british@hyphenfalse\english@ordinalmonthdayfalse \ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={usenglishmax}}\fi \xpg@info{Option: english variant=american (with additional patterns)}% - \ifcsundef{l@usenglishmax}% + \xpg@ifdefined{usenglishmax}{}% {\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak I will use the standard patterns for US English instead}% - \adddialect\l@usenglishmax\l@english\relax}{}% + \adddialect\l@usenglishmax\l@english\relax}% \gdef\english@language{\language=\l@usenglishmax}}% {\ifstrequal{#1}{australian}% {\@british@hyphentrue\english@ordinalmonthdayfalse @@ -2676,10 +2677,10 @@ and may look very wrong.} \if@british@locale\@british@hyphentrue\english@ordinalmonthdaytrue\fi \if@british@hyphen \ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={ukenglish,british,UKenglish}}\fi - \ifcsundef{l@ukenglish}% + \xpg@ifdefined{ukenglish}{}% {\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak I will use the patterns for US English instead}% - \adddialect\l@ukenglish\l@english\relax}{}% + \adddialect\l@ukenglish\l@english\relax}% \gdef\english@language{\language=\l@ukenglish\xpg@set@language@luatex@ii{ukenglish}}% \fi % and we reset \do to its previous definition here: @@ -3098,8 +3099,8 @@ and may look very wrong.} % \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged? % \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged? \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »" - \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~" - \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»" + % \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~" + % \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»" \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;" \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :" \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\nobreakspace}% "?»" -> "? »" @@ -3185,6 +3186,28 @@ and may look very wrong.} \french@punctuation% } +\def\ier{\textsuperscript{er}} +\def\iers{\textsuperscript{ers}} +\def\iere{\textsuperscript{re}} +\def\ieres{\textsuperscript{res}} +\def\ieme{\textsuperscript{e}} +\def\iemes{\textsuperscript{es}} +\def\nd{\textsuperscript{nd}} +\def\nds{\textsuperscript{nds}} +\def\nde{\textsuperscript{nde}} +\def\ndes{\textsuperscript{ndes}} +\def\no{\textsuperscript{o}} +\def\nos{\textsuperscript{os}} + +\def\mme{M\textsuperscript{me}\space} +\def\mmes{M\textsuperscript{mes}\space} +\def\mr{M.\space} +\def\mrs{MM.\space} + +\ifx\@makefntext\undefined\else +\renewcommand\@makefntext[1]{\quad\ifx\@thefnmark\empty\else\@thefnmark.\space\fi #1} +\fi + % \end{macrocode} % \iffalse %</gloss-french.ldf> @@ -3329,23 +3352,23 @@ and may look very wrong.} \def\@tmpa{#1}% \ifx\@tmpa\tmp@oldyr\def\@tmpa{old}\fi \ifx\@tmpa\tmp@old - \ifx\l@german\@undefined + \xpg@ifdefined{german}{}{% \xpg@nopatterns{german}% \adddialect\l@german\l@nohyphenation - \fi + } \@german@oldspellingtrue - \else %try ngerman - \ifx\l@ngerman\@undefined - \ifx\l@german\@undefined - \xpg@nopatterns{ngerman}% - \adddialect\l@ngerman\l@nohyphenation - \else + \else % try ngerman + \xpg@ifdefined{ngerman}{% + \@german@oldspellingfalse + }{% fall back to german + \xpg@ifdefined{german}{% \xpg@warning{You asked for `ngerman' but only `german' hyphenation is available!}% \@german@oldspellingtrue - \fi - \else %we use ngerman - \@german@oldspellingfalse - \fi + }{% + \xpg@nopatterns{ngerman}% + \adddialect\l@ngerman\l@nohyphenation + }% + }% \fi } @@ -3361,10 +3384,10 @@ and may look very wrong.} \@austrian@localefalse% \fi \ifx\@tmpa\tmp@swiss\@swiss@localetrue - \ifcsundef{l@swissgerman}% + \xpg@ifdefined{swissgerman}{}% {\xpg@warning{No hyphenation patterns were loaded for "Swiss German (Old Spelling)"\MessageBreak I will use the standard patterns for German (old spelling) instead}% - \adddialect\l@swissgerman\l@german\relax}{}% + \adddialect\l@swissgerman\l@german\relax}% \else \@swiss@localefalse% \fi} @@ -3504,7 +3527,7 @@ and may look very wrong.} \if@german@fraktur\date@german@fraktur\else\date@german\fi } -\def\german@language{\language=% +\def\german@language{\ifxetex\language=% \csname l@% \if@swiss@locale \if@german@oldspelling @@ -3518,29 +3541,29 @@ and may look very wrong.} \else% (german, austrian) \if@german@oldspelling\else n\fi german\ifgerman@latesthyphen -x-latest\fi \fi - \endcsname + \endcsname\else\ifluatex % LuaTeX \ifgerman@latesthyphen \if@german@oldspelling \if@swiss@locale - \xpg@set@language@luatex@ii{swissgerman}% + \xpg@set@language@luatex@iv{swissgerman}% \else - \xpg@set@language@luatex@ii{german-x-latest}% + \xpg@set@language@luatex@iv{german-x-latest}% \fi \else - \xpg@set@language@luatex@ii{ngerman-x-latest}% + \xpg@set@language@luatex@iv{ngerman-x-latest}% \fi \else% (latesthyphen=false) \if@german@oldspelling \if@swiss@locale - \xpg@set@language@luatex@ii{swissgerman}% + \xpg@set@language@luatex@iv{swissgerman}% \else - \xpg@set@language@luatex@ii{german}% + \xpg@set@language@luatex@iv{german}% \fi \else - \xpg@set@language@luatex@ii{ngerman}% + \xpg@set@language@luatex@iv{ngerman}% \fi - \fi + \fi\fi\fi } \def\noextras@german{% @@ -4581,162 +4604,162 @@ and may look very wrong.} % % \subsection{gloss-khmer.ldf} % \begin{macrocode} -\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer] -\PolyglossiaSetup{khmer}{ - script=Khmer,% - scripttag=khmr,% - langtag=KHM,% - hyphennames={nohyphenation},% - fontsetup=true% -} -\newif\if@khmer@numerals -\def\tmp@khmer{khmer} -\define@key{khmer}{numerals}[arabic]{% - \def\@tmpa{#1}% - \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue% - \else\@khmer@numeralsfalse\fi% -} -\setkeys{khmer}{numerals} -\def\captionskhmer{% - \def\prefacename{អារម្ភកថា}% - \def\refname{ឯកសារយោង}% - \def\abstractname{សង្ខេប}% - \def\bibname{គន្ថនិទ្ទេស}% - \def\chaptername{ជំពូក}% - \def\appendixname{សេចក្ដីបន្ថែម}% - \def\contentsname{មាតិការ}% - \def\listfigurename{បញ្ជីរូបភាព}% - \def\listtablename{បញ្ជីតារាង}% - \def\indexname{សន្ទស្សន៍}% - \def\figurename{រូប}% - \def\tablename{តារាង}% - \def\partname{ផ្នែក}% - \def\pagename{ទំព័រ}% - \def\seename{មើល}% - \def\alsoname{មើលបន្ថែម}% - \def\enclname{ឯកសារភ្ជាប់}% - \def\ccname{ចម្លងជួន}% - \def\headtoname{ផ្ញើរទៅ}% - \def\proofname{សម្រាយ}% - \def\glossaryname{សទានុក្រម}% -} -\def\datekhmer{% - \def\khmer@month{% - \ifcase\month\or% - មករា\or% - កុម្ភៈ\or% - មិនា\or% - មេសា\or% - ឧសភា\or% - មិថុនា\or% - កក្កដា\or% - សីហា\or% - កញ្ញា\or% - តុលា\or% - វិច្ឆិកា\or% - ធ្នូ\fi}% - \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}% -} -\def\khmerdigits#1{\expandafter\@khmer@digits #1@} -\def\@khmer@digits#1{% - \ifx @#1% then terminate - \else\ifx0#1០% - \else\ifx1#1១% - \else\ifx2#1២% - \else\ifx3#1៣% - \else\ifx4#1៤% - \else\ifx5#1៥% - \else\ifx6#1៦% - \else\ifx7#1៧% - \else\ifx8#1៨% - \else\ifx9#1៩% - \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \expandafter\@khmer@digits% - \fi -} -\def\khmernumber#1{% - \if@khmer@numerals% - \khmerdigits{\number#1}% - \else% - \number#1% - \fi} -\def\khmer@globalnumbers{% - \let\orig@arabic\@arabic% - \let\@arabic\khmernumber% - \renewcommand{\thefootnote}{\protect\khmernumber{\c@footnote}}% -} -\def\nokhmer@globalnumbers{% - \let\@arabic\orig@arabic% - \renewcommand\thefootnote{\protect\number{\c@footnote}}% -} -\def\thepart{\arabic{part}} -\def\@khmeralph#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 អ% -\else\xpg@ill@value{#1}{@khmeralph}\fi} -\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname} -\def\@khmerAlph#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 អ% -\else\xpg@ill@value{#1}{@khmeralph}\fi} -\def\khmer@numbers{% - \let\@latinalph\@alph% - \let\@latinAlph\@Alph% - \if@khmer@numerals - \let\@alph\@khmeralph% - \let\@Alph\@khmerAlph% - \fi% -} -\def\nokhmer@numbers{% - \let\@alph\@latinalph% - \let\@Alph\@latinAlph% -} -\def\blockextras@khmer{% - \XeTeXlinebreaklocale "kh" % - \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt -% \let\orig@baselinestretch\baselinestretch% -% \renewcommand{\baselinestretch}{1.2}% not work -} -\def\noblockextras@khmer{% - \XeTeXlinebreaklocale "en"% -% \let\baselinestretch\orig@baselinestretch% -} -\@ifclassloaded{beamer}{% - \usefonttheme{professionalfonts}% - \def\factname{ស្វ័យសត្យ}% - \def\lemmaname{បទគន្លិះ}% - \def\theoremname{ទ្រឹស្ដីបទ}% - \def\corollaryname{អនុសាធ្យ}% - \def\problemname{ចំណោទ}% - \def\solutionname{ដំណោះស្រាយ}% - \def\definitionname{និយមន័យ}% - \def\examplename{ឧទាហរណ៏}% - \uselanguage{khmer}% - \languagepath{khmer}% - \deftranslation[to=khmer]{Fact}{\factname}% - \deftranslation[to=khmer]{Lemma}{\lemmaname}% - \deftranslation[to=khmer]{Theorem}{\theoremname}% - \deftranslation[to=khmer]{Corollary}{\corollaryname}% - \deftranslation[to=khmer]{Problem}{\problemname}% - \deftranslation[to=khmer]{Solution}{\solutionname}% - \deftranslation[to=khmer]{Definition}{\definitionname}% - \deftranslation[to=khmer]{Definitions}{\definitionname}% - \deftranslation[to=khmer]{Example}{\examplename}% - \deftranslation[to=khmer]{Examples}{\examplename}% - \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}% - {\noexpand\headcommand{\noexpand\def\noexpand% - \inserttotalframenumber{\khmernumber{\the\c@framenumber}}}}}}% -}{} +\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
+\PolyglossiaSetup{khmer}{
+ script=Khmer,%
+ scripttag=khmr,%
+ langtag=KHM,%
+ hyphennames={nohyphenation},%
+ fontsetup=true%
+}
+\newif\if@khmer@numerals
+\def\tmp@khmer{khmer}
+\define@key{khmer}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@khmer\@khmer@numeralstrue%
+ \else\@khmer@numeralsfalse\fi%
+}
+\setkeys{khmer}{numerals}
+\def\captionskhmer{%
+ \def\prefacename{អារម្ភកថា}%
+ \def\refname{ឯកសារយោង}%
+ \def\abstractname{សង្ខេប}%
+ \def\bibname{គន្ថនិទ្ទេស}%
+ \def\chaptername{ជំពូក}%
+ \def\appendixname{សេចក្ដីបន្ថែម}%
+ \def\contentsname{មាតិការ}%
+ \def\listfigurename{បញ្ជីរូបភាព}%
+ \def\listtablename{បញ្ជីតារាង}%
+ \def\indexname{សន្ទស្សន៍}%
+ \def\figurename{រូប}%
+ \def\tablename{តារាង}%
+ \def\partname{ផ្នែក}%
+ \def\pagename{ទំព័រ}%
+ \def\seename{មើល}%
+ \def\alsoname{មើលបន្ថែម}%
+ \def\enclname{ឯកសារភ្ជាប់}%
+ \def\ccname{ចម្លងជួន}%
+ \def\headtoname{ផ្ញើរទៅ}%
+ \def\proofname{សម្រាយ}%
+ \def\glossaryname{សទានុក្រម}%
+}
+\def\datekhmer{%
+ \def\khmer@month{%
+ \ifcase\month\or%
+ មករា\or%
+ កុម្ភៈ\or%
+ មិនា\or%
+ មេសា\or%
+ ឧសភា\or%
+ មិថុនា\or%
+ កក្កដា\or%
+ សីហា\or%
+ កញ្ញា\or%
+ តុលា\or%
+ វិច្ឆិកា\or%
+ ធ្នូ\fi}%
+ \def\today{\khmernumber\day\space\khmer@month\space\khmernumber\year}%
+}
+\def\khmerdigits#1{\expandafter\@khmer@digits #1@}
+\def\@khmer@digits#1{%
+ \ifx @#1% then terminate
+ \else\ifx0#1០%
+ \else\ifx1#1១%
+ \else\ifx2#1២%
+ \else\ifx3#1៣%
+ \else\ifx4#1៤%
+ \else\ifx5#1៥%
+ \else\ifx6#1៦%
+ \else\ifx7#1៧%
+ \else\ifx8#1៨%
+ \else\ifx9#1៩%
+ \else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\@khmer@digits%
+ \fi
+}
+\def\khmernumber#1{%
+ \if@khmer@numerals%
+ \khmerdigits{\number#1}%
+ \else%
+ \number#1%
+ \fi}
+\def\khmer@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\khmernumber%
+ \renewcommand{\thefootnote}{\protect\khmernumber{\c@footnote}}%
+}
+\def\nokhmer@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+}
+\def\thepart{\arabic{part}}
+\def\@khmeralph#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 អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmerAlph#1{\expandafter\@khmerAlph\csname c@#1\endcsname}
+\def\@khmerAlph#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 អ%
+\else\xpg@ill@value{#1}{@khmeralph}\fi}
+\def\khmer@numbers{%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \if@khmer@numerals
+ \let\@alph\@khmeralph%
+ \let\@Alph\@khmerAlph%
+ \fi%
+}
+\def\nokhmer@numbers{%
+ \let\@alph\@latinalph%
+ \let\@Alph\@latinAlph%
+}
+\def\blockextras@khmer{%
+ \XeTeXlinebreaklocale "kh" %
+ \XeTeXlinebreakskip = 0pt plus 1pt minus 1pt
+% \let\orig@baselinestretch\baselinestretch%
+% \renewcommand{\baselinestretch}{1.2}% not work
+}
+\def\noblockextras@khmer{%
+ \XeTeXlinebreaklocale "en"%
+% \let\baselinestretch\orig@baselinestretch%
+}
+\@ifclassloaded{beamer}{%
+ \usefonttheme{professionalfonts}%
+ \def\factname{ស្វ័យសត្យ}%
+ \def\lemmaname{បទគន្លិះ}%
+ \def\theoremname{ទ្រឹស្ដីបទ}%
+ \def\corollaryname{អនុសាធ្យ}%
+ \def\problemname{ចំណោទ}%
+ \def\solutionname{ដំណោះស្រាយ}%
+ \def\definitionname{និយមន័យ}%
+ \def\examplename{ឧទាហរណ៏}%
+ \uselanguage{khmer}%
+ \languagepath{khmer}%
+ \deftranslation[to=khmer]{Fact}{\factname}%
+ \deftranslation[to=khmer]{Lemma}{\lemmaname}%
+ \deftranslation[to=khmer]{Theorem}{\theoremname}%
+ \deftranslation[to=khmer]{Corollary}{\corollaryname}%
+ \deftranslation[to=khmer]{Problem}{\problemname}%
+ \deftranslation[to=khmer]{Solution}{\solutionname}%
+ \deftranslation[to=khmer]{Definition}{\definitionname}%
+ \deftranslation[to=khmer]{Definitions}{\definitionname}%
+ \deftranslation[to=khmer]{Example}{\examplename}%
+ \deftranslation[to=khmer]{Examples}{\examplename}%
+ \AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
+ {\noexpand\headcommand{\noexpand\def\noexpand%
+ \inserttotalframenumber{\khmernumber{\the\c@framenumber}}}}}}%
+}{}
% \end{macrocode} % \iffalse %</gloss-khmer.ldf> @@ -4753,13 +4776,33 @@ and may look very wrong.} scripttag=hang, language=Korean, langtag=KOR, - hyphennames={english,american,usenglish,USenglish}, + hyphennames={english,USenglish}, hyphenmins={2,3}, frenchspacing=true, fontsetup=true } +% variant : plain (0), classic (1), or modern (2) +\define@choicekey{korean}{variant}[\val\nr]{plain,classic,modern}[plain]{% + \let\xpg@korean@variant\nr +} +% captions : hangul (0) or hanja (1) +\define@choicekey{korean}{captions}[\val\nr]{hangul,hanja}[hangul]{% + \let\xpg@korean@captions\nr +} +\setkeys{korean}{variant,captions} + \def\captionskorean{% + \ifcase\xpg@korean@captions\relax + \captions@korean@hangul + \else + \captions@korean@hanja + \fi + \def\seename{$rightarrow$}% + \def\alsoname{$Rightarrow$}% +} +\def\captions@korean@hangul{% + \def\koreanTHEname{제}% \def\partname##1##2{제##1##2 편}% \def\chaptername{장}% \def\refname{참고문헌}% @@ -4774,24 +4817,39 @@ and may look very wrong.} \def\figurename{그림}% \def\tablename{표}% \def\pagename{페이지}% - \def\seename{$rightarrow$}% - \def\alsoname{$Rightarrow$}% \def\enclname{동봉}% \def\proofname{증명}% \def\headtoname{수신:}% \def\ccname{사본}% } -\def\xpg@korean@language{korean} -\AtBeginDocument{ - \ifx\xpg@main@language\xpg@korean@language - \@ifclassloaded{book}{\def\@chapapp#1#2{제#1#2#1\chaptername}}{ - \@ifclassloaded{report}{\def\@chapapp#1#2{제#1#2#1\chaptername}}{} - } - \fi +\def\captions@korean@hanja{% + \def\koreanTHEname{第}% + \def\partname##1##2{第##1##2 篇}% + \def\chaptername{章}% + \def\refname{參考文獻}% + \def\abstractname{要約}% + \def\bibname{參考文獻}% + \def\prefacename{序文}% + \def\appendixname{附錄}% + \def\contentsname{目次}% + \def\listfigurename{圖版 目次}% + \def\listtablename{表 目次}% + \def\indexname{索引}% + \def\figurename{圖版}% + \def\tablename{表}% + \def\pagename{面}% + \def\enclname{同封}% + \def\proofname{證明}% + \def\headtoname{受信:}% + \def\ccname{寫本}% } \def\datekorean{% - \def\today{\the\year 년 \the\month 월 \the\day 일}% + \ifcase\xpg@korean@captions\relax + \def\today{\the\year 년 \the\month 월 \the\day 일}% + \else + \def\today{\the\year 年 \the\month 月 \the\day 日}% + \fi } \def\koreanAlph#1{\expandafter\@koreanAlph\csname c@#1\endcsname} @@ -4818,139 +4876,465 @@ and may look very wrong.} } \let\nokorean@globalnumbers\nokorean@numbers -\ifluatex -\newluatexattribute\xpg@attr@korean -\directlua{ -local glyph_id = node.id("glyph") -local attr_korean = luatexbase.attributes["xpg@attr@korean"] -local nobreak_after = { - [0x28] = true, [0x3C] = true, [0x5B] = true, [0x60] = true, [0x7B] = true, - [0x2018] = true, [0x201C] = true, [0x3008] = true, [0x300A] = true, - [0x300C] = true, [0x300E] = true, [0x3010] = true, [0x3014] = true, - [0xFF08] = true, [0xFF1C] = true, [0xFF3B] = true, [0xFF5B] = true, -} -local nobreak_before = { - [0x21] = true, [0x22] = true, [0x27] = true, [0x29] = true, [0x2C] = true, - [0x2D] = true, [0x2E] = true, [0x2F] = true, [0x3A] = true, [0x3B] = true, - [0x3E] = true, [0x3F] = true, [0x5D] = true, [0x7D] = true, [0xB7] = true, - [0x2013] = true, [0x2014] = true, [0x2015] = true, [0x2019] = true, - [0x201D] = true, [0x2025] = true, [0x2026] = true, [0x3001] = true, - [0x3002] = true, [0x3009] = true, [0x300B] = true, [0x300D] = true, - [0x300F] = true, [0x3011] = true, [0x3015] = true, [0xFF01] = true, - [0xFF09] = true, [0xFF0C] = true, [0xFF0E] = true, [0xFF1A] = true, - [0xFF1B] = true, [0xFF1F] = true, [0xFF3D] = true, [0xFF5D] = true, - [0x3041] = true, [0x3043] = true, [0x3045] = true, [0x3047] = true, - [0x3049] = true, [0x3063] = true, [0x3083] = true, [0x3085] = true, - [0x3087] = true, [0x308E] = true, [0x3095] = true, [0x3096] = true, - [0x3099] = true, [0x309A] = true, [0x309B] = true, [0x309C] = true, - [0x309D] = true, [0x309E] = true, [0x30A0] = true, [0x30A1] = true, - [0x30A3] = true, [0x30A5] = true, [0x30A7] = true, [0x30A9] = true, - [0x30C3] = true, [0x30E3] = true, [0x30E5] = true, [0x30E7] = true, - [0x30EE] = true, [0x30F5] = true, [0x30F6] = true, [0x30FB] = true, - [0x30FC] = true, [0x30FD] = true, [0x30FE] = true, -} -for i=0x1160, 0x11FF do nobreak_before[i] = true end -for i=0xD7B0, 0xD7FB do nobreak_before[i] = true end -for i=0x302E, 0x302F do nobreak_before[i] = true end -for i=0x31F0, 0x31FF do nobreak_before[i] = true end -local is_cjk = function (c) - return (c >= 0xAC00 and c <= 0xD7A3) - or (c >= 0x1100 and c <= 0x115F) - or (c >= 0xA960 and c <= 0xA97C) - or (c >= 0x3400 and c <= 0x9FFF) - or (c >= 0xF900 and c <= 0xFAFF) - or (c >= 0x2E80 and c <= 0x2FFF) - or (c >= 0x3040 and c <= 0x30FF) - or (c >= 0x20000 and c <= 0x2CEAF) - or (c >= 0x2F800 and c <= 0x2FA1F) - or (nobreak_after[c] and c > 0xFF) - or (nobreak_before[c] and c > 0xFF) -end -local insert_penalty_glue = function (head, curr) - local penalty = node.new("penalty") - penalty.penalty = 50 - local glue = node.new("glue") - local spec = node.new("glue_spec") - local size = fonts.hashes.identifiers[curr.font] or font.fonts[curr.font] - size = size and size.size or 655360 - spec.width = 0 - spec.stretch = size/10 - spec.shrink = size/25 - glue.spec = spec - head, curr = node.insert_after(head, curr, penalty) - head, curr = node.insert_after(head, curr, glue) - return head, curr -end -local korean_break = function (head) - local curr = head - while curr do - if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then - local next = curr.next - if next and next.id == glyph_id then - local c, n = curr.char, next.char - if (is_cjk(c) or is_cjk(n)) and not nobreak_before[n] and not nobreak_after[c] then - head, curr = insert_penalty_glue(head, curr) - end - end - end - curr = curr.next - end - return head -end -local reorder_tm = function (head) - local tone - local curr = node.tail(head) - while curr do - if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then - local c, wd = curr.char, curr.width - if (c == 0x302E or c == 0x302F) and wd and wd > 0 then - tone = curr - elseif tone and not nobreak_before[c] then - head = node.remove(head, tone) - tone.next, tone.prev = nil, nil - head, curr = node.insert_before(head, curr, tone) - tone = nil - end - end - curr = curr.prev - end - return head -end -luatexbase.add_to_callback ("pre_linebreak_filter", reorder_tm, "polyglossia.reorder_korean_tm", 1) -luatexbase.add_to_callback ("pre_linebreak_filter", korean_break, "polyglossia.korean_break", 1) -luatexbase.add_to_callback ("hpack_filter", reorder_tm, "polyglossia.reorder_korean_tm", 1) -} +\ifxetex + \def\inlineextras@korean{% + \ifcase\xpg@korean@variant\relax + \XeTeXinterchartokenstate\z@ + \XeTeXlinebreakpenalty 50 + \or + \setvariantkoreaninterchartoks + \setvariantkoreancharclasses + \def\XPGKOhalfdim{\dimexpr.5em\relax}% + \XeTeXinterchartokenstate\@ne + \XeTeXlinebreakpenalty \z@ + \else + \setvariantkoreaninterchartoks + \setvariantkoreancharclasses + \def\XPGKOhalfdim{\dimexpr.5\fontdimen\tw@\font\relax}% + \XeTeXinterchartokenstate\@ne + \XeTeXlinebreakpenalty 50 + \fi + \XeTeXlinebreakskip 0pt plus.1em minus .01em + \XeTeXlinebreaklocale "ko" + } + \def\noextras@korean{% + \ifcase\xpg@korean@variant\relax + \else + \unsetvariantkoreaninterchartoks + \unsetvariantkoreancharclasses + \fi + \XeTeXinterchartokenstate\z@ + \XeTeXlinebreakpenalty\z@ + \XeTeXlinebreakskip\z@skip + \XeTeXlinebreaklocale "" + \noextras@korean@common + } +\else % luatex + \def\inlineextras@korean{\xpg@attr@korean\xpg@korean@variant\relax} + \def\noextras@korean{% + \unsetattribute\xpg@attr@korean + \noextras@korean@common + } \fi -\def\noextras@korean{% - \ifxetex - \XeTeXlinebreaklocale "" - \else - \unsetluatexattribute\xpg@attr@korean +\def\blockextras@korean{% + \inlineextras@korean + \ifdefined\@chapapp + \long\def\@tmpa{\chaptername}\def\@tmpb{\chaptername}% + \ifnum0\ifx\@chapapp\@tmpa1\else\ifx\@chapapp\@tmpb1\fi\fi>\z@ + \let\xpg@orig@@chapapp\@chapapp + \def\@chapapp##1##2{\koreanTHEname ##1##2##1\chaptername}% + \fi + \fi + \ifdefined\baselinestretch + \let\xpg@orig@linestretch\baselinestretch + \def\baselinestretch{1.3888}\selectfont + \fi + \ifdefined\footnotesep + \edef\xpg@orig@footnotesep{\noexpand\footnotesep=\the\footnotesep\relax}% + \footnotesep=1.3888\footnotesep \fi - \ifdefined\xpg@orig@baselinestretch \xpg@orig@baselinestretch \fi - \ifdefined\xpg@orig@footnotesep \xpg@orig@footnotesep \fi } -\def\inlineextras@korean{% - \ifxetex - \XeTeXlinebreaklocale "ko" - \XeTeXlinebreakpenalty 50 - \XeTeXlinebreakskip 0pt plus.1em minus .04em +\def\noextras@korean@common{% + \ifdefined\xpg@orig@footnotesep \xpg@orig@footnotesep \fi + \ifdefined\xpg@orig@linestretch \let\baselinestretch\xpg@orig@linestretch \fi + \ifdefined\xpg@orig@@chapapp \let\@chapapp\xpg@orig@@chapapp \fi +} + +\ifxetex % XeTeX +% user commands for Josa +% Josa : particles in Korean grammar that immediately follow a noun or pronoun. +% Josa might vary depending on previous character. +\protected\def\jong {\global\let\XPGKO@let@josa=0}\jong +\protected\def\rieul{\global\let\XPGKO@let@josa=1} +\protected\def\jung {\global\let\XPGKO@let@josa=2} +\protected\def\가{\xpg@make@josa 가이} +\protected\def\이{\futurelet\@let@token\xpg@make@josa@I} +\protected\def\은{\xpg@make@josa 는은} \let\는\은 +\protected\def\을{\xpg@make@josa 를을} \let\를\을 +\protected\def\와{\xpg@make@josa 와과} \let\과\와 +\protected\def\으{\xpg@make@josa \empty 으} +\protected\def\로{\으 로} +\protected\def\라{\xpg@make@josa 라{이라}} +\def\xpg@make@josa@I{% + \ifx\@let@token 라% + \expandafter\xpg@make@josa\expandafter\relax\expandafter 이% \else - \xpg@attr@korean=1 + \expandafter\가 \fi } - -\def\blockextras@korean{% - \inlineextras@korean - \xdef\xpg@orig@baselinestretch{\def\noexpand\baselinestretch{\ifdefined\baselinestretch\baselinestretch\else 1\fi}}% - \def\baselinestretch{1.3888}\selectfont - \xdef\xpg@orig@footnotesep{\noexpand\footnotesep=\ifdefined\footnotesep\the\footnotesep\else 0pt\fi}% - \footnotesep=1.3888\footnotesep +\def\xpg@make@josa#1#2{% + \ifcat\xpg@catcode@letter\XPGKO@let@josa + \expandafter\expandafter\expandafter\count@\expandafter + \xpg@letter@to@num\meaning\XPGKO@let@josa\relax + \else\ifcat\xpg@catcode@other\XPGKO@let@josa + \expandafter\expandafter\expandafter\count@\expandafter + \xpg@character@to@num\meaning\XPGKO@let@josa\relax + \fi\fi + \ifnum\count@<"3260 + \else\ifnum\count@<"3280 \advance\count@-"60 + \else\ifnum\count@<"AC00 + \else\ifnum\count@<"D7A4 % Hangul syllables + \advance\count@-"AC00 + \@tempcnta\count@ \divide\@tempcnta28 \multiply\@tempcnta28 + \advance\count@-\@tempcnta \advance\count@"11A7 + \else\ifnum\count@<"FF00 + \else\ifnum\count@<"FF5B \advance\count@-"FEE0 + \fi\fi\fi\fi\fi \fi + \ifnum\count@<"11A8 + \ifnum "30=\count@ \count@\z@ % 0 + \else\ifnum "31=\count@ \count@\@ne % 1 + \else\ifnum "33=\count@ \count@\z@ % 3 + \else\ifnum "36=\count@ \count@\z@ % 6 + \else\ifnum "37=\count@ \count@\@ne % 7 + \else\ifnum "38=\count@ \count@\@ne % 8 + \else\ifnum "4C=\count@ \count@\@ne % L + \else\ifnum "4D=\count@ \count@\z@ % M + \else\ifnum "4E=\count@ \count@\z@ % N + \else\ifnum "6C=\count@ \count@\@ne % l + \else\ifnum "6D=\count@ \count@\z@ % m + \else\ifnum "6E=\count@ \count@\z@ % n + \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi + \else\ifnum\count@<"1200 + \ifnum\count@="11AF \count@\@ne \else \count@\z@ \fi + \else\ifnum\count@<"3131 + \else\ifnum\count@<"318F + \ifnum \count@="3139 \count@\@ne + \else\ifnum\count@<"314F \count@\z@ + \else\ifnum\count@>"3164 + \ifnum\count@<"3187 \count@\z@ \fi + \fi\fi\fi + \else\ifnum\count@<"3200 + \else\ifnum\count@<"321F + \ifnum \count@="3203 \count@\@ne + \else\ifnum\count@<"320E \count@\z@ + \fi\fi + \else\ifnum\count@<"D7CB + \else\ifnum\count@<"D7FC \count@\z@ + \fi\fi\fi\fi\fi \fi\fi\fi + \ifcase\count@ #2% jong + \or \ifx#1\empty\else#2\fi% rieul + \else #1% jung + \fi +} +\expandafter\def\expandafter\xpg@character@to@num\detokenize{the character} #1#2\relax{`#1\relax} +\expandafter\def\expandafter\xpg@letter@to@num\detokenize{the letter} #1#2\relax{`#1\relax} +\begingroup +\catcode`A=11 \catcode`0=12 +\global\let\xpg@catcode@letter=A \global\let\xpg@catcode@other=0 +\endgroup +% macros for interchartoks (Josa selection) +\def\XPGKOstartID{\global\futurelet\XPGKO@let@josa\XPGKO@skipID} +\def\XPGKOstartAA{\global\futurelet\XPGKO@let@josa\XPGKO@skipAA} +\def\XPGKO@skipID{\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassID{\empty}} +\def\XPGKO@skipAA{\XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassAA{\empty}} +\def\XPGKOstopID {\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassID{\XPGKOstartID}} +\def\XPGKOstopAA {\XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassAA{\XPGKOstartAA}} +% macros for interchartoks (CJK punctuations) +\def\XPGKOstartOP{\leavevmode\hbox to.5em\bgroup\hss}% +\def\XPGKOstopOP {\egroup}% +\def\XPGKOstartCL{\leavevmode\hbox to.5em\bgroup}% +\def\XPGKOstopCL {\hss\egroup}% +\let\XPGKOstartFS\XPGKOstartCL \let\XPGKOstopFS\XPGKOstopCL +\let\XPGKOstartMD\XPGKOstartOP \let\XPGKOstopMD\XPGKOstopCL +\let\XPGKOnobreak \nobreak +\def\XPGKOhalfzero {\hskip \XPGKOhalfdim \relax}% +\def\XPGKOhalfhalf {\hskip \XPGKOhalfdim minus \XPGKOhalfdim \relax}% +\def\XPGKOhalfquarter {\hskip \XPGKOhalfdim minus.5\XPGKOhalfdim \relax}% +\def\XPGKOquarterquarter {\hskip .5\XPGKOhalfdim minus.5\XPGKOhalfdim \relax}% +\def\XPGKOiiiquarterquarter{\hskip1.5\XPGKOhalfdim minus.5\XPGKOhalfdim \relax}% +\def\XPGKOlatincjk {\hskip .5\XPGKOhalfdim plus.25\XPGKOhalfdim minus.125\XPGKOhalfdim}% +% user macro to force zero skip +\let\inhibitglue\relax +% initialize interchartoks and classes +\let\XeTeXcharclassIgnore \@cclvi +\let\XeTeXcharclassBoundary\@cclv +\ifdefined\XeTeXcharclassID\else + \ifdefined\xtxHanGlue + \let\XeTeXcharclassID\@ne + \let\XeTeXcharclassOP\tw@ + \let\XeTeXcharclassCL\thr@@ + \else % email from JW + \newXeTeXintercharclass\XeTeXcharclassID + \newXeTeXintercharclass\XeTeXcharclassOP + \newXeTeXintercharclass\XeTeXcharclassCL + \global\let\XeTeXcharclassEX\XeTeXcharclassCL + \global\let\XeTeXcharclassIS\XeTeXcharclassCL + \global\let\XeTeXcharclassNS\XeTeXcharclassCL + \global\let\XeTeXcharclassCM\XeTeXcharclassIgnore + \input load-unicode-xetex-classes % + \fi +\fi +% assign Hangul +\count@="AC00 \loop + \XeTeXcharclass\count@\XeTeXcharclassID + \ifnum\count@<"D7A3 + \advance\count@\@ne + \repeat +\count@="1100 \loop + \XeTeXcharclass\count@\XeTeXcharclassID + \ifnum\count@<"11FF + \advance\count@\@ne + \repeat +\count@="A960 \loop + \XeTeXcharclass\count@\XeTeXcharclassID + \ifnum\count@<"A97C + \advance\count@\@ne + \repeat +\count@="D7B0 \loop + \XeTeXcharclass\count@\XeTeXcharclassID + \ifnum\count@<"D7FB + \advance\count@\@ne + \repeat +% more classes +\newXeTeXintercharclass\XPGKOcharclassMD % ・ : ; +\newXeTeXintercharclass\XPGKOcharclassFS % 。 . +\newXeTeXintercharclass\XPGKOcharclassLD % ― … ‥ +\newXeTeXintercharclass\XPGKOcharclassEX % ? ! +\newXeTeXintercharclass\XPGKOcharclassAO % ascii ( +\newXeTeXintercharclass\XPGKOcharclassAC % ascii ) +\newXeTeXintercharclass\XPGKOcharclassAA % ascii letters/numbers +% unset all interchartoks +\def\unsetvariantkoreaninterchartoks{% + \@tfor\@tmpa :=\XeTeXcharclassID\XeTeXcharclassOP\XeTeXcharclassCL\XPGKOcharclassMD\XPGKOcharclassFS + \XPGKOcharclassLD\XPGKOcharclassEX\XPGKOcharclassAO\XPGKOcharclassAC\XPGKOcharclassAA + \do{\count@\XeTeXcharclassBoundary \loop + \XeTeXinterchartoks\@tmpa\count@{}% + \XeTeXinterchartoks\count@\@tmpa{}% + \ifnum\count@=\XeTeXcharclassBoundary \count@\m@ne \fi + \ifnum\count@<\xe@alloc@intercharclass + \advance\count@\@ne + \repeat + }% } +% interchartoks for classic/modern variants +\def\setvariantkoreaninterchartoks{% + \count@\XeTeXcharclassBoundary \loop + \ifnum\count@=\XeTeXcharclassID\else + \ifnum\count@=\XeTeXcharclassOP\else + \ifnum\count@=\XeTeXcharclassCL\else + \ifnum\count@=\XPGKOcharclassMD\else + \ifnum\count@=\XPGKOcharclassFS\else + \ifnum\count@=\XPGKOcharclassAA\else + \XeTeXinterchartoks\count@\XeTeXcharclassID{\XPGKOstartID}% + \XeTeXinterchartoks\count@\XeTeXcharclassOP{\XPGKOstartOP}% + \XeTeXinterchartoks\count@\XeTeXcharclassCL{\XPGKOstartCL}% + \XeTeXinterchartoks\count@\XPGKOcharclassMD{\XPGKOstartMD}% + \XeTeXinterchartoks\count@\XPGKOcharclassFS{\XPGKOstartFS}% + \XeTeXinterchartoks\count@\XPGKOcharclassAA{\XPGKOstartAA}% + \XeTeXinterchartoks\XeTeXcharclassID\count@{\XPGKOstopID}% + \XeTeXinterchartoks\XeTeXcharclassOP\count@{\XPGKOstopOP}% + \XeTeXinterchartoks\XeTeXcharclassCL\count@{\XPGKOstopCL}% + \XeTeXinterchartoks\XPGKOcharclassMD\count@{\XPGKOstopMD}% + \XeTeXinterchartoks\XPGKOcharclassFS\count@{\XPGKOstopFS}% + \XeTeXinterchartoks\XPGKOcharclassAA\count@{\XPGKOstopAA}% + \fi\fi\fi\fi\fi\fi + \ifnum\count@=\XeTeXcharclassBoundary \count@\m@ne \fi + \ifnum\count@<\xe@alloc@intercharclass + \advance\count@\@ne + \repeat + % + \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassID{\XPGKOstartID}% + \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassOP{\XPGKOstopAA\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassCL{\XPGKOstopAA\XPGKOstartCL}% + \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassMD{\XPGKOstopAA\XPGKOstartMD}% + \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassFS{\XPGKOstopAA\XPGKOstartFS}% + \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassAA{\XPGKOstartAA}% + % + \XeTeXinterchartoks\XeTeXcharclassID\XeTeXcharclassID{\XPGKOstartID}% + \XeTeXinterchartoks\XeTeXcharclassID\XeTeXcharclassOP{\XPGKOstopID\XPGKOhalfhalf\XPGKOstartOP}% + \XeTeXinterchartoks\XeTeXcharclassID\XeTeXcharclassCL{\XPGKOstopID\XPGKOstartCL}% + \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassMD{\XPGKOstopID\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% + \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassFS{\XPGKOstopID\XPGKOstartFS}% + \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAO{\XPGKOstopID\XPGKOlatincjk}% + \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAA{\XPGKOstartAA}% + % + \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassID{\XPGKOstopOP\XPGKOstartID}% + \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassOP{\XPGKOstopOP\XPGKOstartOP}% + \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassCL{\XPGKOstopOP\XPGKOstartCL}% + \XeTeXinterchartoks\XeTeXcharclassOP\XPGKOcharclassMD{\XPGKOstopOP\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% + \XeTeXinterchartoks\XeTeXcharclassOP\XPGKOcharclassFS{\XPGKOstopOP\XPGKOstartFS}% + \XeTeXinterchartoks\XeTeXcharclassOP\XPGKOcharclassAA{\XPGKOstopOP\XPGKOstartAA}% + % + \XeTeXinterchartoks\XeTeXcharclassCL\XeTeXcharclassID{\XPGKOstopCL\XPGKOhalfhalf\XPGKOstartID}% + \XeTeXinterchartoks\XeTeXcharclassCL\XeTeXcharclassOP{\XPGKOstopCL\XPGKOhalfhalf\XPGKOstartOP}% + \XeTeXinterchartoks\XeTeXcharclassCL\XeTeXcharclassCL{\XPGKOstopCL\XPGKOstartCL}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassMD{\XPGKOstopCL\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassFS{\XPGKOstopCL\XPGKOstartFS}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassLD{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassEX{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAO{\XPGKOstopCL\XPGKOhalfhalf}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAC{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}% + \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAA{\XPGKOstopCL\XPGKOstartAA}% + % + \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassID{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartID}% + \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassOP{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassCL{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartCL}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassMD{\XPGKOstopMD\XPGKOnobreak\XPGKOhalfquarter\XPGKOstartMD}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassFS{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartFS}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassLD{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassEX{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAO{\XPGKOstopMD\XPGKOquarterquarter}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAC{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}% + \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAA{\XPGKOstopMD\XPGKOstartAA}% + % + \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassID{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartID}% + \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassOP{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassCL{\XPGKOstopFS\XPGKOstartCL}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassMD{\XPGKOstopFS\XPGKOnobreak\XPGKOiiiquarterquarter\XPGKOstartMD}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassFS{\XPGKOstopFS\XPGKOstartFS}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassLD{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassEX{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAO{\XPGKOstopFS\XPGKOhalfzero}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAC{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}% + \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAA{\XPGKOstopFS\XPGKOstartAA}% + % + \XeTeXinterchartoks\XPGKOcharclassLD\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassLD\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% + % + \XeTeXinterchartoks\XPGKOcharclassEX\XeTeXcharclassID{\XPGKOhalfhalf\XPGKOstartID}% + \XeTeXinterchartoks\XPGKOcharclassEX\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% + \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAO{\XPGKOhalfhalf}% + \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAC{\XPGKOnobreak\XPGKOhalfhalf}% + % + \XeTeXinterchartoks\XPGKOcharclassAO\XeTeXcharclassOP{\XPGKOnobreak\XPGKOhalfhalf\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassAO\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% + % + \XeTeXinterchartoks\XPGKOcharclassAC\XeTeXcharclassID{\XPGKOlatincjk\XPGKOstartID}% + \XeTeXinterchartoks\XPGKOcharclassAC\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}% + \XeTeXinterchartoks\XPGKOcharclassAC\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% +} +% char classes for classic/modern variants +\def\setvariantkoreancharclasses{} +\def\unsetvariantkoreancharclasses{} +\def\@tmpa#1=#2{% + \edef\setvariantkoreancharclasses{% + \unexpanded\expandafter{\setvariantkoreancharclasses + \XeTeXcharclass#1=#2}}% + \edef\unsetvariantkoreancharclasses{% + \noexpand\XeTeXcharclass#1=\the\XeTeXcharclass#1\relax + \unexpanded\expandafter{\unsetvariantkoreancharclasses}}% +} +\count@"30 \loop % 0 .. 9 + \expandafter\@tmpa\the\count@=\XPGKOcharclassAA + \ifnum\count@<"39 + \advance\count@\@ne + \repeat +\count@"41 \loop % A .. Z + \expandafter\@tmpa\the\count@=\XPGKOcharclassAA + \ifnum\count@<"5A + \advance\count@\@ne + \repeat +\count@"61 \loop % a .. z + \expandafter\@tmpa\the\count@=\XPGKOcharclassAA + \ifnum\count@<"7A + \advance\count@\@ne + \repeat +% NS +\@tmpa "3005=\XeTeXcharclassID % 々 IDEOGRAPHIC ITERATION MARK +\@tmpa "301C=\XeTeXcharclassID % 〜 WAVE DASH +\@tmpa "303B=\XeTeXcharclassID % 〻 VERTICAL IDEOGRAPHIC ITERATION MARK +\@tmpa "303C=\XeTeXcharclassID % 〼 MASU MARK +\@tmpa "309B=\XeTeXcharclassID % ゛ KATAKANA-HIRAGANA VOICED SOUND MARK +\@tmpa "309C=\XeTeXcharclassID % ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK +\@tmpa "309D=\XeTeXcharclassID % ゝ HIRAGANA ITERATION MARK +\@tmpa "309E=\XeTeXcharclassID % ゞ HIRAGANA VOICED ITERATION MARK +\@tmpa "30A0=\XeTeXcharclassID % ゠ KATAKANA-HIRAGANA DOUBLE HYPHEN +\@tmpa "30FD=\XeTeXcharclassID % ヽ KATAKANA ITERATION MARK +\@tmpa "30FE=\XeTeXcharclassID % ヾ KATAKANA VOICED ITERATION MARK +\@tmpa "A015=\XeTeXcharclassID % ꀕ YI SYLLABLE ITERATION MARK +\@tmpa "FF9E=\XeTeXcharclassID % ゙ HALFWIDTH KATAKANA VOICED SOUND MARK +\@tmpa "FF9F=\XeTeXcharclassID % ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK +% IS +\@tmpa "FE13=\XeTeXcharclassID % ︓ PRESENTATION FORM FOR VERTICAL COLON +\@tmpa "FE14=\XeTeXcharclassID % ︔ PRESENTATION FORM FOR VERTICAL SEMICOLON +% CJ +\@tmpa "3041=\XeTeXcharclassID +\@tmpa "3043=\XeTeXcharclassID +\@tmpa "3045=\XeTeXcharclassID +\@tmpa "3047=\XeTeXcharclassID +\@tmpa "3049=\XeTeXcharclassID +\@tmpa "3063=\XeTeXcharclassID +\@tmpa "3083=\XeTeXcharclassID +\@tmpa "3085=\XeTeXcharclassID +\@tmpa "3087=\XeTeXcharclassID +\@tmpa "308E=\XeTeXcharclassID +\@tmpa "3095=\XeTeXcharclassID +\@tmpa "3096=\XeTeXcharclassID +\@tmpa "30A1=\XeTeXcharclassID +\@tmpa "30A3=\XeTeXcharclassID +\@tmpa "30A5=\XeTeXcharclassID +\@tmpa "30A7=\XeTeXcharclassID +\@tmpa "30A9=\XeTeXcharclassID +\@tmpa "30C3=\XeTeXcharclassID +\@tmpa "30E3=\XeTeXcharclassID +\@tmpa "30E5=\XeTeXcharclassID +\@tmpa "30E7=\XeTeXcharclassID +\@tmpa "30EE=\XeTeXcharclassID +\@tmpa "30F5=\XeTeXcharclassID +\@tmpa "30F6=\XeTeXcharclassID +\@tmpa "30FC=\XeTeXcharclassID +\count@"31F0 \loop + \expandafter\@tmpa\the\count@=\XeTeXcharclassID + \ifnum\count@<"31FF + \advance\count@\@ne + \repeat +\count@"FF67 \loop + \expandafter\@tmpa\the\count@=\XeTeXcharclassID + \ifnum\count@<"FF70 + \advance\count@\@ne + \repeat +% +\@tmpa "28=\XPGKOcharclassAO % ( +\@tmpa "5B=\XPGKOcharclassAO % [ +\@tmpa "60=\XPGKOcharclassAO % ` +\@tmpa "7B=\XPGKOcharclassAO % { +% +\@tmpa "21=\XPGKOcharclassAC % ! +\@tmpa "27=\XPGKOcharclassAC % ' +\@tmpa "29=\XPGKOcharclassAC % ) +\@tmpa "2C=\XPGKOcharclassAC % , +\@tmpa "2E=\XPGKOcharclassAC % . +\@tmpa "3B=\XPGKOcharclassAC % ; +\@tmpa "3F=\XPGKOcharclassAC % ? +\@tmpa "5D=\XPGKOcharclassAC % ] +\@tmpa "7D=\XPGKOcharclassAC % } +% +\@tmpa "2018=\XeTeXcharclassOP % ‘ LEFT SINGLE QUOTATION MARK +\@tmpa "201C=\XeTeXcharclassOP % “ LEFT DOUBLE QUOTATION MARK +% +\@tmpa "2019=\XeTeXcharclassCL % ’ RIGHT SINGLE QUOTATION MARK +\@tmpa "201D=\XeTeXcharclassCL % ” RIGHT DOUBLE QUOTATION MARK +\@tmpa "FE10=\XeTeXcharclassCL % ︐ PRESENTATION FORM FOR VERTICAL COMMA +% NS +\@tmpa "00B7=\XPGKOcharclassMD % · MIDDLE DOT +\@tmpa "30FB=\XPGKOcharclassMD % ・ KATAKANA MIDDLE DOT +\@tmpa "FE54=\XPGKOcharclassMD % ﹔ SMALL SEMICOLON +\@tmpa "FE55=\XPGKOcharclassMD % ﹕ SMALL COLON +\@tmpa "FF1A=\XPGKOcharclassMD % : FULLWIDTH COLON +\@tmpa "FF1B=\XPGKOcharclassMD % ; FULLWIDTH SEMICOLON +\@tmpa "FF65=\XPGKOcharclassMD % ・ HALFWIDTH KATAKANA MIDDLE DOT +% +\@tmpa "3002=\XPGKOcharclassFS % 。 IDEOGRAPHIC FULL STOP +\@tmpa "FE12=\XPGKOcharclassFS % ︒ PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC FULL STOP +\@tmpa "FE52=\XPGKOcharclassFS % ﹒ SMALL FULL STOP +\@tmpa "FF0E=\XPGKOcharclassFS % . FULLWIDTH FULL STOP +\@tmpa "FF61=\XPGKOcharclassFS % 。 HALFWIDTH IDEOGRAPHIC FULL STOP +% +\@tmpa "2014=\XPGKOcharclassLD % — EM DASH +\@tmpa "2015=\XPGKOcharclassLD % ― HORIZONTAL BAR +\@tmpa "2025=\XPGKOcharclassLD % ‥ TWO DOT LEADER +\@tmpa "2026=\XPGKOcharclassLD % … HORIZONTAL ELLIPSIS +% EX +\@tmpa "FE15=\XPGKOcharclassEX % ︕ PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK +\@tmpa "FE16=\XPGKOcharclassEX % ︖ PRESENTATION FORM FOR VERTICAL QUESTION MARK +\@tmpa "FE56=\XPGKOcharclassEX % ﹖ SMALL QUESTION MARK +\@tmpa "FE57=\XPGKOcharclassEX % ﹗ SMALL EXCLAMATION MARK +\@tmpa "FF01=\XPGKOcharclassEX % ! FULLWIDTH EXCLAMATION MARK +\@tmpa "FF1F=\XPGKOcharclassEX % ? FULLWIDTH QUESTION MARK -% vim:tw=72:sw=4:ts=4:expandtab % \end{macrocode} % \iffalse %</gloss-korean.ldf> @@ -5067,7 +5451,7 @@ and may look very wrong.} % !TEX encoding = UTF-8 Unicode \ProvidesFile{gloss-latin.ldf}[polyglossia: module for latin] \PolyglossiaSetup{latin}{ -% hyphennames={latin}, +hyphennames={latin}, % hyphenmins={2,2}, frenchspacing=true, fontsetup=true, @@ -5129,7 +5513,7 @@ and may look very wrong.} % set modern as default \def\latin@variant{\l@latin}% -\ifluatex\xpg@set@language@luatex@ii{latin}\fi +\ifluatex\xpg@set@language@luatex@iv{latin}\fi \def\captionslatin{\modernlatincaptions}% \def\datelatin{\modernlatindate}% \def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V} @@ -5142,28 +5526,28 @@ and may look very wrong.} \def\@tempa{#1}% \ifx\@tempa\tmp@medieval \def\latin@variant{\l@latin}% - \xpg@set@language@luatex@ii{latin} + \xpg@set@language@luatex@iv{latin} \def\captionslatin{\medievallatincaptions}% \def\datelatin{\classiclatindate}% \classicuclccodes \xpg@info{Option: Medieval Latin}% \else \ifx\@tempa\tmp@classic - \ifx\l@classiclatin\undefined + \xpg@ifdefined{classiclatin}{% + \def\latin@variant{\l@classiclatin}% + \xpg@set@language@luatex@iv{classiclatin}% + }{% \xpg@nopatterns{Classic Latin}% \adddialect\l@classiclatin\l@latin \def\latin@variant{\l@latin}% - \else - \def\latin@variant{\l@classiclatin}% - \xpg@set@language@luatex@ii{classiclatin}% - \fi + }% \def\captionslatin{\modernlatincaptions}% \def\datelatin{\classiclatindate}% \classicuclccodes \xpg@info{Option: Classic Latin}% \else \def\latin@variant{\l@latin}% - \xpg@set@language@luatex@ii{latin} + \xpg@set@language@luatex@iv{latin} \def\captionslatin{\modernlatincaptions}% \def\datelatin{\modernlatindate}% \xpg@info{Option: Modern Latin}% @@ -5630,9 +6014,9 @@ and may look very wrong.} \def\chaptername{प्रकरण}% \def\appendixname{परिशिष्ट}% \def\contentsname{अनुक्रमणिका}% - \def\listfigurename{आक्रुत्यांची यादी}% + \def\listfigurename{आकृत्यांची यादी}% \def\listtablename{कॊष्टकांची यादी}% - \def\indexname{सुची}% + \def\indexname{सूची}% \def\figurename{आक्रुती}% \def\tablename{कोष्टक}% %\def\thepart{}% TODO @@ -5643,8 +6027,8 @@ and may look very wrong.} \def\enclname{समाविष्ट}% \def\ccname{सि.सि.}% \def\headtoname{प्रति}% - \def\proofname{कसोटी}% - \def\glossaryname{स्पष्टीकरणकोश}% + \def\proofname{सिद्धता}% + \def\glossaryname{स्पष्टीकरणांची यादी}% } \def\datemarathi{% \def\marathimonth{% @@ -5654,11 +6038,11 @@ and may look very wrong.} मार्च\or एप्रिल\or मे\or - जुन\or - जुलॆ\or - ओगस्ट\or + जून\or + जुलै\or + ऑगस्ट\or सप्टेंबर\or - ओक्टोबर\or + ऑक्टोबर\or नोव्हेंबर\or डिसेंबर\fi }% @@ -5860,9 +6244,25 @@ and may look very wrong.} % % \subsection{gloss-occitan.ldf} % \begin{macrocode} -% Translated by Cédric Valmary <cvalmary@yahoo.fr> of Tot en òc <http://www.totenoc.org/> -\ProvidesFile{gloss-occitan.ldf}[polyglossia: module for occitan] - +%% +%% This is file `gloss-occitan.ldf', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gloss-occitan.dtx (with options: `ldf') +%% ------------------------------------------------------------------ +%% The gloss-occitan module for polyglossia +%% Copyright (C) 2016 Cédric Valmary +%% All rights reserved +%% +%% Licence information appended +%% +%% Created by Cédric Valmary: cvalmary at yahoo dot fr +%% of Tot en òc <http://www.totenoc.eu/> +%% +\ProvidesFile{gloss-occitan.ldf}[2016/02/04 v0.3 polyglossia: + module for Occitan] \PolyglossiaSetup{occitan}{ hyphennames={occitan}, hyphenmins={2,2}, @@ -5870,12 +6270,64 @@ and may look very wrong.} indentfirst=true, fontsetup=true, } +\define@boolkey{occitan}[occitan@]{babelshorthands}[true]{} +\ifsystem@babelshorthands + \setkeys{occitan}{babelshorthands=true} +\else + \setkeys{occitan}{babelshorthands=false} +\fi +\ifcsundef{initiate@active@char}{% +\input{babelsh.def}% +\initiate@active@char{"}% +}{} +\def\occitan@shorthands{% + \bbl@activate{"}% + \def\language@group{occitan}% + \declare@shorthand{occitan}{"}{% + \relax\ifmmode + \def\xpgoc@next{''}% + \else + \def\xpgoc@next{\futurelet\xpgoc@temp\xpgoc@cwm}% + \fi + \xpgoc@next}% +} +\def\xpgoc@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip} +\def\xpgoc@ponchinterior{% + \nobreak\discretionary{-}{}{\mbox{$\cdot$}}\nobreak\hskip\z@skip} +\def\xpgoc@cwm{\let\xpgoc@@next\relax + \ifcat\noexpand\xpgoc@temp a% + \def\xpgoc@@next{\xpgoc@@cwm}% + \else + \if\noexpand\xpgoc@temp \string|% + \def\xpgoc@@next##1{\xpgoc@@cwm}% + \else + \if\noexpand\xpgoc@temp \string<% + \def\xpgoc@@next##1{«\ignorespaces}% + \else + \if\noexpand\xpgoc@temp \string>% + \def\xpgoc@@next##1{\unskip»}% + \else + \if\noexpand\xpgoc@temp\string/% + \def\xpgoc@@next##1{\slash}% + \else + \if\noexpand\xpgoc@temp\string.% + \def\xpgoc@@next##1{\xpgoc@ponchinterior}% + \fi + \fi + \fi + \fi + \fi + \fi + \xpgoc@@next} +\def\nooccitan@shorthands{% + \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}% +} \def\captionsoccitan{% \def\refname{Referéncias}% \def\abstractname{Resumit}% \def\bibname{Bibliografia}% - \def\prefacename{Prefàcia}% + \def\prefacename{Prefaci}% \def\chaptername{Capítol}% \def\appendixname{Annèx}% \def\contentsname{Ensenhador}% @@ -5914,9 +6366,41 @@ and may look very wrong.} 1èr\else% primièr \number\day\fi% all other numbers }% - \def\today{\occitanday \occitanmonth\space de~\number\year}% + \def\today{\occitanday\space \occitanmonth\space de~\number\year}% +} +\let\xpgoc@savedvalues\empty +\AtEndPreamble{% the user or the class might define different values + \edef\xpgoc@savedvalues{% + \clubpenalty=\the\clubpenalty\space + \@clubpenalty=\the\@clubpenalty\space + \widowpenalty=\the\widowpenalty\space + \finalhyphendemerits=\the\finalhyphendemerits} +} +\def\noextras@occitan{% + \lccode\string"2019=\z@ + \nooccitan@shorthands + \xpgoc@savedvalues +} +\def\blockextras@occitan{% + \lccode\string"2019=\string"2019 + \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000 + \finalhyphendemerits=50000000 + \ifoccitan@babelshorthands\occitan@shorthands\fi } +\def\inlineextras@occitan{% + \lccode\string"2019=\string"2019 + \ifoccitan@babelshorthands\occitan@shorthands\fi +} +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "author-maintained" +%% The maintainer is Cédric Valmary +%% +%% +%% End of file `gloss-occitan.ldf'. % \end{macrocode} % \iffalse %</gloss-occitan.ldf> @@ -8253,6 +8737,20 @@ and may look very wrong.} \def\glossaryname{Rhestr termau}% } +\newif\ifwelsh@first +\def\welsh@article#1{\welsh@firsttrue y\expandafter\welsh@article@do#1} +\def\welsh@article@do#1{\ifwelsh@first\welsh@isvowel#1\ifwelsh@vowel r\space\welsh@vowelfalse\else\space\fi#1\welsh@firstfalse\fi} +\newif\ifwelsh@vowel +\def\welsh@isvowel#1{\show#1\ifx#1a\welsh@voweltrue\else\ifx#1u\welsh@voweltrue\else\ifx#1w\welsh@voweltrue\fi\fi\fi}% FIXME Add the other vowels, just for good measure + +\def\welsh@ordinal@long#1{% + \ifcase#1\or cyntaf\or ail\or trydydd\or pedwerydd\or + pumed\or chweched\or seithfed\or wythfed\or nawfed\or degfed\or unfed ar ddeg\or deuddegfed\or trydydd ar ddeg\or pedwerydd ar ddeg\or pymthegfed\or unfed ar bymtheg\or ail ar bymtheg\or deunawfed\or pedwerydd ar bymtheg\or ugeinfed\else\expandafter\welsh@ordinalplusxx@long#1\fi} + +\def\welsh@ordinalplusxx@long#1{% + \let\dday=#1\advance\dday by -20\relax\welsh@ordinal@long\dday\space ar hugain% +} + \def\datewelsh{% \def\today{\ifwelsh@formaldate\formaltoday\else\standardtoday\fi} \def\standardtoday{% @@ -8266,8 +8764,7 @@ and may look very wrong.} \space\number\year}% \def\formaltoday{% - \space\ifcase\day\or y\space cyntaf\or yr\space ail\or y\space trydydd\or y\space pedwerydd\or - y\space pumed\or y\space chweched\or y\space seithfed\or yr\space wythfed\or y\space nawfed\or y\space degfed\or yr\space unfed ar ddeg\or y\space deuddegfed\or y\space trydydd ar ddeg\or y\space pedwerydd ar ddeg\or y\space pymthegfed\or yr\space unfed ar bymtheg\or yr\space ail ar bymtheg\or y\space deunawfed\or y\space pedwerydd ar bymtheg\or yr\space ugeinfed\or yr\space unfed ar hugain\or yr\space ail ar hugain\or y\space trydydd ar hugain\or y\space pedwerydd ar hugain\or y\space pumed ar hugain\or y\space chweched ar hugain\or y\space seithfed ar hugain\or yr\space wythfed ar hugain\or y\space nawfed ar hugain\or y\space degfed ar hugain\or yr\space unfed ar ddeg ar hugain\fi\space o\space\ifcase\month\or Ionawr\or Chwefror\or Fawrth\or Ebrill\or Fai\or Fehefin\or Orffenaf\or Awst\or Fedi\or Hydref\or Dachwedd\or Ragfyr\fi + \expandafter\welsh@article\welsh@ordinal@long\day\space o\space\ifcase\month\or Ionawr\or Chwefror\or Fawrth\or Ebrill\or Fai\or Fehefin\or Orffenaf\or Awst\or Fedi\or Hydref\or Dachwedd\or Ragfyr\fi \space\number\year}% } @@ -8526,7 +9023,7 @@ local mappings = { [byte('⁈')] = {left, thinspace}, [byte('⁉')] = {left, thinspace}, [byte('»')] = {left, thinspace}, - [byte('>')] = {left, thinspace}, + [byte('›')] = {left, thinspace}, [byte('«')] = {right, thinspace}, [byte('‹')] = {right, thinspace}, } @@ -8761,6 +9258,19 @@ local current_language local last_language local default_language +polyglossia.newloader_loaded_languages = { } +polyglossia.newloader_max_langid = 0 +local newloader_available_languages = dofile(kpse.find_file('language.dat.lua')) +-- Suggestion by Dohyun Kim on #129 +local t = { } +for k, v in pairs(newloader_available_languages) do + t[k] = v + for _, vv in pairs(v.synonyms) do + t[vv] = v + end +end +newloader_available_languages = t + local function loadlang(lang, id) if luatexhyphen.lookupname(lang) then luatexhyphen.loadlanguage(lang, id) @@ -8824,6 +9334,55 @@ local function load_tibt_eol() require('polyglossia-tibt') end +-- New hyphenation pattern loader: use language.dat.lua directly and the language identifiers +local function newloader(langentry) + loaded_language = polyglossia.newloader_loaded_languages[langentry] + if loaded_language then + texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language)) + -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. tostring(loaded_language) .. '; id is ' .. lang.id(loaded_language)) + -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. loaded_language['patterns'] .. '; id is ' .. lang.id(loaded_language)) + return lang.id(loaded_language) + else + langdata = newloader_available_languages[langentry] + if langdata and langdata['special'] == 'language0' then return 0 end + + if langdata then + print("Language data for " .. langentry) + for k, v in pairs(langdata) do + print(k, tostring(v)) + end + polyglossia.newloader_max_langid = polyglossia.newloader_max_langid + 1 + -- langobject = lang.new(newloader_max_langid) + lang.new(); lang.new(); lang.new() + langobject = lang.new() + texio.write_nl('term and log', langdata.patterns) + if langdata.patterns and langdata.patterns ~= '' then + pattfilepath = kpse.find_file(langdata.patterns) + if pattfilepath then + pattfile = io.open(pattfilepath) + lang.patterns(langobject, pattfile:read('*all')) + pattfile:close() + end + end + if langdata.hyphenation and langdata.hyphenation ~= '' then + hyphfilepath = kpse.find_file(langdata.hyphenation) + if hyphfilepath then + hyphfile = io.open(hyphfilepath) + lang.hyphenation(langobject, hyphfile:read('*all')) + hyphfile:close() + end + end + polyglossia.newloader_loaded_languages[langentry] = langobject + + texio.write_nl('term and log', 'Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject)) + return lang.id(langobject) + else + texio.write_nl('term and log', 'Language ' .. langentry .. ' not found in language.dat.lua') + return 255 + end + end +end + polyglossia.loadlang = loadlang polyglossia.select_language = select_language polyglossia.set_default_language = set_default_language @@ -8834,6 +9393,7 @@ polyglossia.load_frpt = load_frpt polyglossia.load_tibt_eol = load_tibt_eol polyglossia.disable_hyphenation = disable_hyphenation polyglossia.enable_hyphenation = enable_hyphenation +polyglossia.newloader = newloader % \end{macrocode} % \iffalse %</polyglossia.lua> @@ -8847,7 +9407,7 @@ polyglossia.enable_hyphenation = enable_hyphenation ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.42.0 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.42.4 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -8878,7 +9438,7 @@ Polyglossia makes it possible to automate the following tasks: LICENSE -Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2015 Arthur Reutenauer +Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2016 Arthur Reutenauer Polyglossia is placed under the terms of the LaTeX Project Public Licence (LPPL), either version 1.3, or, at your option, any later version. See @@ -8895,7 +9455,34 @@ Hum, sorry, wishful thinking. Please report any bugs, problems or requests on: http://github.com/reutenauer/polyglossia/issues %</../README> %<*Changelog> -06-08-2015 +1.42.4 (February, March 2016) + * Remedial actions for the Babel changes + +09-02-2016 + * Fixed side effect of pull request #122 (see commit d2a34ff) + * Added automatic Josa selection, variant, and captions options to Korean, by Dohyun Kim (pull request #128) + +08-02-2016 + * Updated gloss-occitan from CTAN + +18-01-2016 + * Fixed issue #124 (minor typo in polyglossia-frpt.lua) + +03-12-2015 + * Merged pull request #117 for more French guillemet spacing + * Merged pull request #121 to add \bbl@loaded; fixes issue #120 + * Merged pull request #122 that build on #121 + +08-11-2015 + * Merged pull request #116 for French (spacing around guillemets) + +22-10-2015 + * Fixed issue #115 (spurious spaces in Arabic) + +19-08-2015 + * Fixed issue #107 for Marathi (labels and month names) + +1.42.0 (06-08-2015) * Add Bengali digits package, and option to reset all numbering functions 05-08-2015 |