summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-17 23:23:18 +0000
committerKarl Berry <karl@freefriends.org>2010-07-17 23:23:18 +0000
commit306b4622046e852e3a6d1a44b180adc65d5b2bdf (patch)
tree5629332acdda731ff35d5d94593e737b0f95cc20 /Master/texmf-dist/source/xelatex
parent59346cd52c590f5aea686f78841e398040656feb (diff)
polyglossia update (17jul10)
git-svn-id: svn://tug.org/texlive/trunk@19504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx5437
1 files changed, 2843 insertions, 2594 deletions
diff --git a/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx
index 2f6fa85dc0e..a3e46d92c25 100644
--- a/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx
@@ -2,7 +2,7 @@
% polyglossia.dtx generated using mkpolyglossiadtx.pl
% (derived from makedtx.pl version 0.94b (c) Nicola Talbot)
%
-% Created on 2010/3/23 15:48
+% Created on 2010/7/15 22:28
%<*internal>
\iffalse
%</internal>
@@ -10,14 +10,14 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.1.1 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.2.0 ¦
¦ ¦
¦ Modern multilingual typesetting with XeLaTeX ¦
¦ ¦
¦----------------------------------------------¦
This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 57 different languages.
+This version includes support for 68 different languages.
Polyglossia makes it possible to automate the following tasks:
@@ -60,7 +60,38 @@ http://github.com/fc7/polyglossia/issues
CHANGES
-1.1.1
+1.2.0 (15-07-2010)
+ * Adapted for fontspec 2.0 (will not work with earlier versions!)
+ * New implementation of a \PolyglossiaSetup interface
+ that simplifies writing gloss-*.ldf files
+ * Many internal enhancements and refactoring
+ (including a patch by Dirk Ulrich)
+ * Improved automatic font setup when \<lang>font is not defined
+ * New environment otherlanguage* (env. equivalent of \foreignlanguage
+ (Enrico Gregorio)
+ * Bugfix to prevent bogus expansion of \{rm,sf,tt}family even in aux files
+ (Enrico Gregorio)
+ * New gloss files for Armenian, Bengali, Occitan, Bengali, Lao,
+ Malayalam, Marathi, Tamil, Telugu, and Turkmen.
+ * New auxiliary packages 'devanagaridigits' and 'bengalidigits'
+ * hijrical no longer loads bidi and checks for incompatible l3calc
+ * Add Babel shorthands for Russian (based on a patch by Vladimir Lomov)
+ * Fix \fnum@{table,figure} for Lithuanian
+ * Various improvements in gloss-russian (provided by Vladimir Lomov and
+ others)
+ * Corrected captions for Bahasai, Lithuanian, Russian, Croatian
+ * Add option indentfirst=true for Spanish, Croation and other languages
+ (NB: indentfirst was previously named frenchindent)
+ * New option 'script' for German: Setting script=fraktur modifies the
+ captions for typesetting in Fraktur.
+ * New command \aemph for Arabic, Farsi, Urdu, etc. to mark emphasis through
+ overlining.
+ * Package option 'nolocalmarks' is now true by default: to activate it the
+ option 'localmarks' must be passed instead.
+ * Loading languages à la Babel as package options is no longer possible (this
+ feature was deprecated since v1.1.0).
+
+1.1.1 (23-03-2010)
* Bugfix for French: explicit spaces before/after double punctuation
signs ("Par exemple : les grands « espaces » du Canada ! ") are
now replaced by the appropriate non-breaking spaces, as in Babel.
@@ -141,7 +172,7 @@ CHANGES
------------------------------
- François Charette, Dec 2009
+ François Charette, July 2010
<firmicus ατ gmx δοτ net>
------------------------------
%</README>
@@ -190,13 +221,16 @@ CHANGES
\generate{\file{babel-hebrewalph.def}{\from{polyglossia.dtx}{babel-hebrewalph.def}}}
\generate{\file{babelsh.def}{\from{polyglossia.dtx}{babelsh.def}}}
\generate{\file{cal-util.def}{\from{polyglossia.dtx}{cal-util.def}}}
+\generate{\file{xgreek-fixes.def}{\from{polyglossia.dtx}{xgreek-fixes.def}}}
\generate{\file{gloss-albanian.ldf}{\from{polyglossia.dtx}{gloss-albanian.ldf}}}
\generate{\file{gloss-amharic.ldf}{\from{polyglossia.dtx}{gloss-amharic.ldf}}}
\generate{\file{gloss-arabic.ldf}{\from{polyglossia.dtx}{gloss-arabic.ldf}}}
+\generate{\file{gloss-armenian.ldf}{\from{polyglossia.dtx}{gloss-armenian.ldf}}}
\generate{\file{gloss-asturian.ldf}{\from{polyglossia.dtx}{gloss-asturian.ldf}}}
\generate{\file{gloss-bahasai.ldf}{\from{polyglossia.dtx}{gloss-bahasai.ldf}}}
\generate{\file{gloss-bahasam.ldf}{\from{polyglossia.dtx}{gloss-bahasam.ldf}}}
\generate{\file{gloss-basque.ldf}{\from{polyglossia.dtx}{gloss-basque.ldf}}}
+\generate{\file{gloss-bengali.ldf}{\from{polyglossia.dtx}{gloss-bengali.ldf}}}
\generate{\file{gloss-brazil.ldf}{\from{polyglossia.dtx}{gloss-brazil.ldf}}}
\generate{\file{gloss-breton.ldf}{\from{polyglossia.dtx}{gloss-breton.ldf}}}
\generate{\file{gloss-bulgarian.ldf}{\from{polyglossia.dtx}{gloss-bulgarian.ldf}}}
@@ -222,13 +256,17 @@ CHANGES
\generate{\file{gloss-interlingua.ldf}{\from{polyglossia.dtx}{gloss-interlingua.ldf}}}
\generate{\file{gloss-irish.ldf}{\from{polyglossia.dtx}{gloss-irish.ldf}}}
\generate{\file{gloss-italian.ldf}{\from{polyglossia.dtx}{gloss-italian.ldf}}}
+\generate{\file{gloss-lao.ldf}{\from{polyglossia.dtx}{gloss-lao.ldf}}}
\generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}}
\generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}}
\generate{\file{gloss-lithuanian.ldf}{\from{polyglossia.dtx}{gloss-lithuanian.ldf}}}
\generate{\file{gloss-lsorbian.ldf}{\from{polyglossia.dtx}{gloss-lsorbian.ldf}}}
\generate{\file{gloss-magyar.ldf}{\from{polyglossia.dtx}{gloss-magyar.ldf}}}
+\generate{\file{gloss-malayalam.ldf}{\from{polyglossia.dtx}{gloss-malayalam.ldf}}}
+\generate{\file{gloss-marathi.ldf}{\from{polyglossia.dtx}{gloss-marathi.ldf}}}
\generate{\file{gloss-norsk.ldf}{\from{polyglossia.dtx}{gloss-norsk.ldf}}}
\generate{\file{gloss-nynorsk.ldf}{\from{polyglossia.dtx}{gloss-nynorsk.ldf}}}
+\generate{\file{gloss-occitan.ldf}{\from{polyglossia.dtx}{gloss-occitan.ldf}}}
\generate{\file{gloss-polish.ldf}{\from{polyglossia.dtx}{gloss-polish.ldf}}}
\generate{\file{gloss-portuges.ldf}{\from{polyglossia.dtx}{gloss-portuges.ldf}}}
\generate{\file{gloss-romanian.ldf}{\from{polyglossia.dtx}{gloss-romanian.ldf}}}
@@ -242,14 +280,19 @@ CHANGES
\generate{\file{gloss-spanish.ldf}{\from{polyglossia.dtx}{gloss-spanish.ldf}}}
\generate{\file{gloss-swedish.ldf}{\from{polyglossia.dtx}{gloss-swedish.ldf}}}
\generate{\file{gloss-syriac.ldf}{\from{polyglossia.dtx}{gloss-syriac.ldf}}}
+\generate{\file{gloss-tamil.ldf}{\from{polyglossia.dtx}{gloss-tamil.ldf}}}
+\generate{\file{gloss-telugu.ldf}{\from{polyglossia.dtx}{gloss-telugu.ldf}}}
\generate{\file{gloss-thai.ldf}{\from{polyglossia.dtx}{gloss-thai.ldf}}}
\generate{\file{gloss-turkish.ldf}{\from{polyglossia.dtx}{gloss-turkish.ldf}}}
+\generate{\file{gloss-turkmen.ldf}{\from{polyglossia.dtx}{gloss-turkmen.ldf}}}
\generate{\file{gloss-ukrainian.ldf}{\from{polyglossia.dtx}{gloss-ukrainian.ldf}}}
\generate{\file{gloss-urdu.ldf}{\from{polyglossia.dtx}{gloss-urdu.ldf}}}
\generate{\file{gloss-usorbian.ldf}{\from{polyglossia.dtx}{gloss-usorbian.ldf}}}
\generate{\file{gloss-vietnamese.ldf}{\from{polyglossia.dtx}{gloss-vietnamese.ldf}}}
\generate{\file{gloss-welsh.ldf}{\from{polyglossia.dtx}{gloss-welsh.ldf}}}
\generate{\file{arabicdigits.map}{\from{polyglossia.dtx}{arabicdigits.map}}}
+\generate{\file{bengalidigits.map}{\from{polyglossia.dtx}{bengalidigits.map}}}
+\generate{\file{devanagaridigits.map}{\from{polyglossia.dtx}{devanagaridigits.map}}}
\generate{\file{farsidigits.map}{\from{polyglossia.dtx}{farsidigits.map}}}
\generate{\file{thaidigits.map}{\from{polyglossia.dtx}{thaidigits.map}}}
%</batchfile>
@@ -258,7 +301,6 @@ CHANGES
\generate{\file{polyglossia.ins}{\from{polyglossia.dtx}{batchfile}}}
\nopreamble\nopostamble
\generate{\file{README}{\from{polyglossia.dtx}{README}}}
-\generate{\file{gloss-template.ldf}{\from{polyglossia.dtx}{gloss-template.ldf}}}
\generate{\file{examples.tex}{\from{polyglossia.dtx}{examples.tex}}}
\generate{\file{example-arabic.tex}{\from{polyglossia.dtx}{example-arabic.tex}}}
\generate{\file{example-thai.tex}{\from{polyglossia.dtx}{example-thai.tex}}}
@@ -290,7 +332,7 @@ CHANGES
pdfkeywords={xetex, xelatex, multilingual, babel, hyphenation}
]{hyperref}
\usepackage[babelshorthands]{polyglossia}
-\usepackage{farsical}
+%\usepackage{farsical} <<< needs to be disabled otherwise we have too many counters!
\setmainlanguage[variant=uk]{english}
\setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan}
\newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace}
@@ -446,14 +488,17 @@ CHANGES
%
%
% \subsection{The “Babel way”}
-% As with \Babel, \pkg{polyglossia} also allows you to load language definition files
-% as package options. In most cases, option \texttt{⟨lang⟩} will load the file
-% \file{gloss-⟨lang⟩.ldf}. Note however that the \textit{first} language listed in \\
-% \centerline{\cmd{\usepackage[lang1,lang2,…]{polyglossia}}}
-% will be the default language for the document, which
-% is the opposite convention of \Babel.
-% Note also that this method may not work in some cases, and should be
-% considered deprecated.
+% \new{v1.2.0}
+% {\color{red}\bfseries Warning}: \pkg{polyglossia} no longer supports loading
+% language definition files as package options!
+% ^^AAs with \Babel, \pkg{polyglossia} also allows you to load language definition files
+% ^^Aas package options. In most cases, option \texttt{⟨lang⟩} will load the file
+% ^^A\file{gloss-⟨lang⟩.ldf}. Note however that the \textit{first} language listed in \\
+% ^^A\centerline{\cmd{\usepackage[lang1,lang2,…]{polyglossia}}}
+% ^^Awill be the default language for the document, which
+% ^^Ais the opposite convention of \Babel.
+% ^^ANote also that this method may not work in some cases, and should be
+% ^^Aconsidered deprecated.
%
% \subsection{Supported languages}
%
@@ -466,11 +511,13 @@ CHANGES
% ^^Aalbanian
% ^^Aamharic
% ^^A\TX{arabic}
+% ^^Aarmenian
% ^^Aasturian
% ^^Abahasai
% ^^Abahasam
% ^^Abasque
-% ^^Abrazil
+% ^^A\TX{bengali}
+% ^^Abrazil[ian]
% ^^Abreton
% ^^Abulgarian
% ^^A\TX{catalan}
@@ -490,18 +537,22 @@ CHANGES
% ^^A\TX{german}
% ^^A\TX{greek}
% ^^A\TX{hebrew}
-% ^^Ahindi
+% ^^A\TX{hindi}
% ^^Aicelandic
% ^^Ainterlingua
% ^^Airish
% ^^Aitalian
+% ^^A\TX{lao}
% ^^Alatin
% ^^Alatvian
% ^^Alithuanian
% ^^A\TX{lsorbian}
% ^^A\TX{magyar}
+% ^^Amalayalam
+% ^^Amarathi
% ^^Anorsk
% ^^Anynorsk
+% ^^Aoccitan
% ^^Apolish
% ^^Aportuges
% ^^Aromanian
@@ -515,27 +566,33 @@ CHANGES
% ^^Aspanish
% ^^Aswedish
% ^^A\TX{syriac}
+% ^^Atamil
+% ^^Atelugu
% ^^A\TX{thai}
% ^^Aturkish
+% ^^Aturkmen
% ^^Aukrainian
% ^^Aurdu
% ^^A\TX{usorbian}
+% ^^Avietnamese
% ^^Awelsh
-% ^^A the following table was automatically generated with "maketabular.pl 5 < above_input"
+% ^^A private note: the following table was automatically generated with "maketabular.pl 5 < above_input"
% \begin{tabular}{lllll}
% \hline
-% albanian & croatian & \TX{german} & \TX{magyar} & slovenian \\
-% amharic & czech & \TX{greek} & norsk & spanish \\
-% \TX{arabic} & danish & \TX{hebrew} & nynorsk & swedish \\
-% asturian & divehi & hindi & polish & \TX{syriac} \\
-% bahasai & \TX{dutch} & icelandic & portuges & \TX{thai} \\
-% bahasam & \TX{english} & interlingua & romanian & turkish \\
-% basque & \TX{esperanto} & irish & \TX{russian} & ukrainian \\
-% brazil & estonian & italian & samin & urdu \\
-% breton & \TX{farsi} & latin & sanskrit & \TX{usorbian} \\
-% bulgarian & finnish & latvian & scottish & welsh \\
-% \TX{catalan} & french & lithuanian & \TX{serbian} & \\
-% coptic & galician & \TX{lsorbian} & slovak & \\
+% albanian & croatian & \TX{hebrew} & norsk & swedish \\
+% amharic & czech & \TX{hindi} & nynorsk & \TX{syriac} \\
+% \TX{arabic} & danish & icelandic & occitan & tamil \\
+% armenian & divehi & interlingua & polish & telugu \\
+% asturian & \TX{dutch} & irish & portuges & \TX{thai} \\
+% bahasai & \TX{english} & italian & romanian & turkish \\
+% bahasam & \TX{esperanto} & \TX{lao} & \TX{russian} & turkmen \\
+% basque & estonian & latin & samin & ukrainian \\
+% \TX{bengali} & \TX{farsi} & latvian & sanskrit & urdu \\
+% brazil[ian] & finnish & lithuanian & scottish & \TX{usorbian} \\
+% breton & french & \TX{lsorbian} & \TX{serbian} & vietnamese \\
+% bulgarian & galician & \TX{magyar} & slovak & welsh \\
+% \TX{catalan} & \TX{german} & malayalam & slovenian & \\
+% coptic & \TX{greek} & marathi & spanish & \\
% \hline
% \end{tabular}
% \caption{Languages currently supported in \pkg{polyglossia}}
@@ -543,36 +600,25 @@ CHANGES
%
% \textit{NB:} The support for Amharic\new{v1.0.1} should be considered an experimental attempt to
% port the package \pkg{ethiop}.\footnote{ Feedback is welcome.}
-% The language definition files for Asturian\footnote{ %
-% Provided by Kevin Godby and Xuacu Saturio.}, Lithuanian\footnote{ %
-% Provided by Kevin Godby and Paulius Sladkevičius.},
-% and Urdu\footnote{ %
-% Provided by Kamal Abdali.}
-% are new in version 1.1.1\new{v1.1.1}.
+% Version 1.1.1\new{v1.1.1} addded support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.},
+% Lithuanian, %\footnote{ Provided by Kevin Godby and Paulius Sladkevičius.},
+% and Urdu. %\footnote{ Provided by Kamal Abdali.}
+% ^^A
+% Version 1.2\new{v1.2.0} adds support for Armenian, Occitan, Bengali,
+% Lao, Malayalam, Marathi, Tamil, Telugu, and Turkmen.\footnote{ %
+% See acknowledgements at the end for due credit to the various contributors.}
%
-% Some package options are convenient shortcuts for loading languages with
-% specific options:
%
-% \begin{itemize}
-% \item american = english with option ‘variant=american’
-% \item USenglish = english with option ‘variant=american’
-% \item UKenglish = english with option ‘variant=british’
-% \item british = english with option ‘variant=british’
-% \item australian = english with option ‘variant=australian’
-% \item newzealand = english with option ‘variant=newzealand’
-% \item ogerman = german with option ‘spelling=old’
-% \item monogreek = greek with option ‘variant=monotonic’ (or ‘mono’)
-% \item polygreek = greek with option ‘variant=polytonic’ (or ‘poly’)
-% \item ancientgreek = greek with option ‘variant=ancient’
-% \end{itemize}
%
% Polyglossia can also be loaded with the option ‘babelshorthands’\new{v1.1.1}, which
% globally activates \Babel shorthands whenever available. Currently shorthands are
% only implemented for German and Catalan: see below for details.
%
-% Another option (turned off by default) is ‘nolocalmarks’, which
-% prevents the redefinition of the internal \LaTeX\ macros
-% \cmd\markboth\ and \cmd\markright.
+% Another option (turned off by default) is ‘localmarks’, which
+% redefines the internal \LaTeX\ macros \cmd\markboth\ and \cmd\markright.
+% \new{v1.2.0}Note that this was formerly turned on by default, but ẃe
+% now realize that it causes more problems than otherwise. For backwards-compatibility
+% the opposite option ‘nolocalmarks’ is still available.
%
% There is also the option ‘quiet’ which turns off most info messages and some of the warnings
% issued by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}.
@@ -668,6 +714,9 @@ CHANGES
% does not support Greek, then one can define the font used to display Greek with:\\
% \centerline{ \cmd\newfontfamily\cmd{\greekfont[⟨options⟩]\{⟨font⟩\}}. }
% See the \pkg{fontspec} documentation for more information.
+% If a specific sans or monospace fonts is needed for a particular script or language,
+% it can be specified by means of \new{v1.2.0}
+% ¦\⟨script⟩fontsf¦\ or ¦\⟨language⟩fontsf¦ and ¦\⟨script⟩fonttt¦\ or ¦\⟨language⟩fonttt¦, respectively.
%
% Whenever a new language is activated, \pkg{polyglossia} will first check whether
% a font has been defined for that language or – for languages in non-Latin scripts –
@@ -703,6 +752,15 @@ CHANGES
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
+% \item \Cmd\aemph to emphasize Arabic text with ¦\overline¦:\new{v1.2.0}
+% ¦\textarabic{مثال: \aemph{اب}}¦ yields \textarabic{مثال: \aemph{اب}}.
+% This command is also available for Farsi, Urdu, etc.
+% \end{itemize}
+%
+% \subsection{bengali}\label{bengali}\new{v1.2.0}
+% \textbf{Options}:
+% \begin{itemize}
+% \item \TB{numerals} = Western or \textit{Devanagari}
% \end{itemize}
%
% \subsection{catalan}\label{catalan}
@@ -758,16 +816,17 @@ CHANGES
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\abjad (see section \ref{abjad})
+% \item \Cmd\aemph (see section \ref{arabic}).
% \end{itemize}
%
% ^^A\subsection{french}\label{french}
% ^^A\textbf{Options}:
% ^^A \begin{itemize}
-% ^^A \item \TB{espacedeuxpoints} = thick or half \new{v1.2}
+% ^^A \item \TB{espacedeuxpoints} = thick or half \new{v1.2.x} ???
% ^^A \footnote{ %
% ^^A Can be customized by redefining \french@colonspace }
% ^^A \end{itemize}
-% ^^A
+% ^^A
%
% \subsection{german}\label{german}
% \textbf{Options}:
@@ -801,6 +860,8 @@ CHANGES
% \item ¦"<¦ for French left double quotes («)
% \item ¦">¦ for French right double quotes (»).
% \end{itemize}
+% \item\TB{script} = \textit{latin} or fraktur.\new{v1.2.0}
+% Setting script=fraktur modifies the captions for typesetting German in Fraktur.
% \end{itemize}
%
% \subsection{greek}\label{greek}
@@ -829,8 +890,20 @@ CHANGES
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\hebrewnumeral\ (= \Cmd\hebrewalph) (see section \ref{abjad}).
+% \item \Cmd\aemph (see section \ref{arabic}).
% \end{itemize}
%
+% \subsection{hindi}\label{hindi}\new{v1.2.0}
+% \textbf{Options}:
+% \begin{itemize}
+% \item \TB{numerals} = Western or \textit{Devanagari}
+% \end{itemize}
+%
+% \subsection{lao}\label{lao}\new{v1.2.0}
+% \textbf{Options}:
+% \begin{itemize}
+% \item \TB{numerals} = lao or \textit{arabic}
+% \end{itemize}
%
% \subsection{lsorbian and usorbian}\label{lsorbian}\label{usorbian}
% \textbf{Commands}:
@@ -855,10 +928,11 @@ CHANGES
% \subsection{sanskrit}\label{sanskrit}
% \textbf{Options}:
% \begin{itemize}
-% \item \TB{Script} (default = Devanagari). \new{1.0.2}
+% \item \TB{Script} (default = Devanagari). \new{v1.0.2}
% The value is passed to \pkg{fontspec} in cases where ¦\sanskritfont¦ or
% ¦\devanagarifont¦ are not defined. This can be useful if you typeset
% Sanskrit texts in scripts other than Devanagari.
+% ^^ATODO \item Numerals <<<<
% \end{itemize}
%
% \subsection{serbian}\label{serbian}
@@ -877,6 +951,7 @@ CHANGES
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\abjadsyriac (see section \ref{abjad})
+% \item \Cmd\aemph (see section \ref{arabic}).
% \end{itemize}
%
% \subsection{thai}\label{thai}
@@ -896,7 +971,7 @@ CHANGES
% with the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
% you can do this:
% \begin{verbatim}
-% \gappto\linguacaptions{\renewcommand{\chaptername}{Caput}}
+% \gappto\captionslingua{\renewcommand{\chaptername}{Caput}}
% \end{verbatim}
%
% \section{Non-Western decimal digits}
@@ -917,7 +992,7 @@ CHANGES
% counter has to be written and read from auxiliary files.\footnote{ %
% For instance the package \pkg{lastpage} did not work with \pkg{polyglossia} in situations
% where the display of counters was redefined to include a font-switching command.}
-% These macros (currently \Cmd\arabicdigits, \Cmd\farsidigits\ and \Cmd\thaidigits\ are provided)
+% These macros (currently \Cmd\arabicdigits, \Cmd\farsidigits\ and \Cmd\thaidigits\ are provided)
% are also available to the users. For instance in an Arabic environment
% ¦\arabicdigits{9182/738543-X}¦ yields
% \textarabic{\arabicdigits{9182/738543-X}}.
@@ -941,9 +1016,9 @@ CHANGES
% Example: ¦\abjadmaghribi{1863}¦ yields {\arabicfont\abjadmaghribi{1863}}.
%
% The code for Hebrew numerals, which was incorrect in previous versions, was
-% ported from the implementation in \Babel with v1.1.1\new{v1.1.1}, and the
+% ported from the implementation in \Babel with v1.1.1\new{v1.1.1}, and the
% user interface is identical to the one in \Babel.
-% The commands \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal\ behave exactly
+% The commands \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal\ behave exactly
% as they do in \Babel: the second command prints the number with \textit{gereshayim} before
% the last letter, and the latter uses in addition the final forms of Hebrew letters.
% Examples:
@@ -976,12 +1051,12 @@ CHANGES
% The command
% \displaycmd{\HijriFromGregorian\{⟨year⟩\}\{⟨month⟩\}\{⟨day⟩\}}{\HijriFromGregorian}
% sets the counters ¦Hijriday¦, ¦Hijrimonth¦ and ¦Hijriyear¦.
-% \Cmd\Hijritoday\ formats the Hijri date for the current day.
-% This command is now locale-aware\new{v1.1.1}: its output will differ depending on the
-% currently active language. Presently \pkg{polyglossia}’s language definition files
-% for Arabic, Farsi, Urdu, Turkish, Bahasa Indonesia and Bahasa Melayu
+% \Cmd\Hijritoday\ formats the Hijri date for the current day.
+% This command is now locale-aware\new{v1.1.1}: its output will differ depending on the
+% currently active language. Presently \pkg{polyglossia}’s language definition files
+% for Arabic, Farsi, Urdu, Turkish, Bahasa Indonesia and Bahasa Melayu
% provide a localized version of ¦\Hijritoday¦.
-% If the formatting macro for the current language is undefined, the Hijri date will be formatted
+% If the formatting macro for the current language is undefined, the Hijri date will be formatted
% in Arabic or in roman transliteration, depending of the current writing direction.
% You can define a new format or redefine one with the command
% \displaycmd{\DefineHijriDateFormat\{<lang>\}\{<code>\}}{\DefineHijriDateFormat}.
@@ -1003,7 +1078,7 @@ CHANGES
% One day I may rewrite \pkg{farsical} from scratch using the algorithm in
% Reingold \& Gershowitz (ref.~n.~\ref{reingold}).}
% Here we have renamed the command \cmd\ftoday\ to
-% \Cmd\Jalalitoday. Example: today is \Jalalitoday.
+% \Cmd\Jalalitoday. %Example: today is \Jalalitoday.
%
%
% ^^A\section{Varia}
@@ -1016,18 +1091,22 @@ CHANGES
% Braams and the numerous contributors to the \Babel{} package (in particular
% Boris Lavva and others for its Hebrew support), Alexej Kryukov (\pkg{antomega}), Will
% Robertson (\pkg{fontspec}), Apostolos Syropoulos (\pkg{xgreek}), Youssef Jabri
-% (\pkg{arabi}), and Vafa Khalighi (\pkg{xepersian} and \pkg{bidi}). I should also thank other
+% (\pkg{arabi}), and Vafa Khalighi (\pkg{xepersian} and \pkg{bidi}).
+% The work of Mojca Miklavec and Arthur Reutenauer on hyphenation patterns with their package
+% \pkg{hyph-utf8} is of course invaluable. I should also thank other
% individuals for their assistance in supporting specific languages: Yves Codet
% (Sanskrit), Zdenek Wagner (Hindi), Mikhal Oren (Hebrew), Sergey Astanin (Russian),
% Khaled Hosny (Arabic), Sertaç Ö. Yıldız (Turkish), Kamal Abdali (Urdu),
% and several other members of the \XeTeX\ user community, notably Enrico Gregorio, who
% has sent me many useful suggestions and corrections and contributed the ¦\newXeTeXintercharclass¦
-% mechanism in xelatex.ini which is now used by polyglossia.
-% More recently, Kevin Godby of the \href{http://ubuntu-manual.org}{Ubuntu Manual} project has
+% mechanism in xelatex.ini which is now used by polyglossia.
+% More recently, Kevin Godby of the \href{http://ubuntu-manual.org}{Ubuntu Manual} project has
% contributed very useful feedback, bug hunting and, with the help of translators,
-% new language definition files for Asturian and Lithuanian. It is particularly heartening to
-% realize that this package is used to typeset a document in dozens of different languages!
-% I also thank Alan Munn for kindly proof-reading the documentation.
+% new language definition files for Asturian, Lithuanian, Occitan, Bengali, Malayalam, Marathi, Tamil, and Telugu.
+% It is particularly heartening to realize that this package is used to typeset a widely-read
+% document in dozens of different languages!
+% Support for Lao was also added thanks to Brian Wilson.
+% I also thank Alan Munn for kindly proof-reading the penultimate version of this documentation.
% And of course my gratitude also goes to Jonathan Kew, the formidable author of \XeTeX!
%
%
@@ -1042,11 +1121,19 @@ CHANGES
% \subsection{polyglossia.sty}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2010/03/23 v1.1.1
+\ProvidesPackage{polyglossia}[2010/07/15 v1.2.0
Babel replacement for XeLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}
-\RequirePackage{fontspec} %which itself depends on xkeyval
+\RequirePackage{fontspec}[2010/06/08]% v2.0
+% fontspec now uses LaTeX3 packages such as expl3, so we need this:
+% TODO is is possible to localize this further?
+\ExplSyntaxOn
+
+\ifcsundef{newXeTeXintercharclass}{%
+ \xpg@error{Your~ xelatex~ format~ appears~ to~ be~ outdated!^^J
+~~~~Please~ update~ your~ system~ and~ recreate~ it~ with~ fmtutil.}
+ }{}
%% This is for compatibility with Babel-aware package:
\cslet{ver@babel.sty}{\@empty} % this "fakes" babel
@@ -1054,26 +1141,41 @@ CHANGES
\AtEndPreamble{\let\bbl@set@language\xpg@set@language} %for biblatex
\AtEndPreamble{\let\bbl@main@language\xpg@main@language} %for biblatex
+%% for \docvslist (etoolbox)
+\providecommand*{\do}[1]{}%
+
%% custom message macros
+\providecommand*{\xpg@error}[1]{%
+ \PackageError{polyglossia}{#1}{}%
+}
+
\providecommand*{\xpg@warning}[1]{%
- \PackageWarning{polyglossia}%
- {#1}}
+ \PackageWarning{polyglossia}{#1}%
+}
+
\providecommand*{\xpg@info}[1]{%
\PackageInfo{polyglossia}%
- {#1\@gobble}} %% the \@gobble is to prevent displaying the line nr
-\providecommand*{\xpg@nopatterns}[1]{%
- \xpg@warning{No hyphenation patterns were loaded for `#1'\MessageBreak
- I will use the patterns for \string\language=\string\l@nohyphenation\space instead}}
-\providecommand*{\xpg@nolang}[1]{%
- \xpg@warning{File gloss-#1.ldf does not exist!^^J
- I will nevertheless try to use hyphenation patterns for #1.}}%
- %TODO try at least to load the hyphenation patterns for #1.
+ {#1\@gobble}%
+} %% the \@gobble is to prevent displaying the line nr
+
+%TODO change all instances of \xpg@nopatterns in gloss-*.ldf files
+\providecommand*{\xpg@nopatterns@fallback}[2][nohyphenation]{%
+ \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#2'\MessageBreak
+ I~ will~ use~ \string\language=\string\l@ #1\space instead}%
+ \expandafter\adddialect\csname l@#2\expandafter\endcsname\csname l@#1\endcsname\relax}
+
+ \providecommand*{\xpg@nopatterns}[1]{%
+ \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#1'\MessageBreak
+ I~ will~ use~ \string\language=\string\l@nohyphenation\space instead}%
+ %%TODO? \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
+ }
+
\def\xpg@ill@value#1#2{%
- \xpg@warning{Illegal value (#1) for #2}}
+ \xpg@warning{Illegal~ value~ (#1)~ for~ #2}}
%% use macro if defined, else warn that it is not
\def\csuse@warn#1{%
- \ifcsundef{#1}{\xpg@warning{ \expandafter\string\csname #1\endcsname\space is not defined}}%
+ \ifcsundef{#1}{\xpg@warning{ \expandafter\string\csname #1\endcsname\space is~ not~ defined}}%
{\csname #1\endcsname}}
%% ensure directionality if bidi is loaded, else ignore
@@ -1082,44 +1184,377 @@ CHANGES
%% compatibility with babel
\let\addto\gappto% gappto is defined in etoolbox
-%%
+
+%% == Utility macros ==
+%% They are needed because \MakeUppercase and \MakeLowercase are protected,
+%% but we need to change case while defining csnames when setting up fonts for
+%% non-Latin scripts. For instance with "Script=Arabic" we need to lowercase
+%% "Arabic" to create \arabicfont.
+\def\xpg@uppercasefirst#1{\expandafter\xpg@@uppercasefirst #1}
+\def\xpg@@uppercasefirst#1{%
+ \if a#1A\else
+ \if b#1B\else
+ \if c#1C\else
+ \if d#1D\else
+ \if e#1E\else
+ \if f#1F\else
+ \if g#1G\else
+ \if h#1H\else
+ \if i#1I\else
+ \if j#1J\else
+ \if k#1K\else
+ \if l#1L\else
+ \if m#1M\else
+ \if n#1N\else
+ \if o#1O\else
+ \if p#1P\else
+ \if q#1Q\else
+ \if r#1R\else
+ \if s#1S\else
+ \if t#1T\else
+ \if u#1U\else
+ \if v#1V\else
+ \if w#1W\else
+ \if x#1X\else
+ \if y#1Y\else
+ \if z#1Z\else
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+\def\xpg@lowercasefirst#1{\expandafter\xpg@@lowercasefirst #1}
+\def\xpg@@lowercasefirst#1{%
+ \if A#1a\else
+ \if B#1b\else
+ \if C#1c\else
+ \if D#1d\else
+ \if E#1e\else
+ \if F#1f\else
+ \if G#1g\else
+ \if H#1h\else
+ \if I#1i\else
+ \if J#1j\else
+ \if K#1k\else
+ \if L#1l\else
+ \if M#1m\else
+ \if N#1n\else
+ \if O#1o\else
+ \if P#1p\else
+ \if Q#1q\else
+ \if R#1r\else
+ \if S#1s\else
+ \if T#1t\else
+ \if U#1u\else
+ \if V#1v\else
+ \if W#1w\else
+ \if X#1x\else
+ \if Y#1y\else
+ \if Z#1z\else
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+%% NEW EXPERIMENTAL SETUP INTERFACE FOR GLOSS FILES
+%% options currently available:
+%% language : the name of the language (as understood by fontspec)
+%% hyphennames : the different hyphenation patterns to try (comma separated list)
+%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback, with \xpg@nopatterns@fallback - i.e. with a warning: e.g. sanskrit for hindi, or catalan for asturian.
+%% script : the name of the script (as understood by fontspec) – default is Latin
+%% direction : the direction of the script: LR or RL
+%% scripttag : the OpenType tag for the script
+%% langtag : the OpenType tag for the language
+%% hyphenmins : the hyphenmins for this language (comma-sep list of two integers)
+%% frenchspacing : boolean
+%% indentfirst : boolean
+%% fontsetup : boolean
+%% TODO: nouppercase : boolean (for scripts like Arabic, Devanagari, etc which have no concept of uppercase/lowercase)
+%% TODO: localalph = {<alph_csname>,<Alph_csname>}
+%% TODO: localnumber = <csname>
+%% or even better localdigits = {0123456789} for fully automatic setup
+
+\newcommand*\PolyglossiaSetup[2]{%
+ %define booleans etoolbox style and set defaults
+ %% TODO ? \providetoggle{#1@setup@done}%
+ \providetoggle{#1@RL}%
+ \providetoggle{#1@latin}\toggletrue{#1@latin}%
+ \providetoggle{#1@scriptlangequal}% whether lang and script names are same: e.g. Hebrew, Arabic
+ \providebool{#1@fontsetup}%
+ \providebool{#1@indentfirst}%
+ \providebool{#1@frenchspacing}%
+ % we initialize these so that we can use \gappto below
+ \csgdef{init@extras@#1}{}%
+ \csgdef{init@noextras@#1}{}% we don't use this yet: remove?
+ \csgdef{xpg@langname@#1}{\xpg@uppercasefirst{#1}}%
+ %needed for docvslist with hyphennames key:
+ \renewcommand*{\do}[1]{%
+ \ifcsdef{l@#1}{}{%
+ \ifstrequal{#1}{##1}{}%
+ {\ifcsdef{l@##1}%
+ {\csletcs{l@#1}{l@##1}\listbreak}%
+ {}%
+ }%
+ }%
+ }%
+ %define all keys:
+ \xpg@define@keys{#1}%
+ \setkeys[xpg@setup]{#1}{#2}%
+ % here we do the fontsetup:
+ \ifbool{#1@fontsetup}%
+ {\xpg@fontsetup@auto{#1}}%
+ {\xpg@info{Skipping~ automatic~ font~ setup~ for~ language~ #1}}%
+ %% TODO? \toggletrue{#1@setup@done}%
+ % reinit \do
+ \renewcommand*{\do}[1]{\setotherlanguage{##1}}%
+}
+
+\def\xpg@first#1,#2{#1}
+\def\xpg@second#1,#2{#2}
+
+\def\xpg@define@keys#1{%
+ \define@key[xpg@setup]{#1}{script}{%
+ \ifstrequal{##1}{Latin}%
+ {\toggletrue{#1@latin}}%
+ {\togglefalse{#1@latin}}%
+ \csgdef{xpg@scriptname@#1}{##1}%
+ \csgdef{xpg@scriptname@#1@lc}{\xpg@lowercasefirst{##1}}}%
+ \define@key[xpg@setup]{#1}{scripttag}{%
+ \csgdef{xpg@scripttag@#1}{##1}}%
+ \define@key[xpg@setup]{#1}{language}{%
+ \csgdef{xpg@langname@#1}{##1}}%
+ \define@key[xpg@setup]{#1}{langtag}{%
+ \csgdef{xpg@langtag@#1}{##1}}%
+ \define@key[xpg@setup]{#1}{hyphennames}[{#1}]{%
+ \docsvlist{##1}%
+ % if l@#1 does not yet exist,
+ % we assign it to nohyphenation
+ % we do this here in case the hyphennames key was omitted
+ \ifcsundef{l@#1}%
+ {\xpg@nopatterns{\csname xpg@langname@#1\endcsname}%
+ \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}{}%
+ \csdef{#1@language}{\language=\csname l@#1\endcsname}%
+ }%
+ \define@choicekey+[xpg@setup]{#1}{direction}[\val\nr]{LR,RL}[LR]%
+ {\ifcase\nr\relax
+ \togglefalse{#1@RL}%
+ \or
+ \toggletrue{#1@RL}%
+ \ifcsundef{RTL}{\RequirePackage{bidi}}{}%
+ \fi}%
+ {\xpg@warning{#1: Invalid value \val\space for key "direction"}}%
+ \define@key[xpg@setup]{#1}{hyphenmins}[{2,3}]%
+ {\edef\@tmpfirst{\xpg@first##1}%
+ \edef\@tmpsecond{\xpg@second##1}%
+ \setlocalhyphenmins{#1}{\@tmpfirst}{\@tmpsecond}}%
+ \define@boolkey[xpg@setup]{#1}[#1@]{frenchspacing}[true]{%
+ \ifbool{#1@frenchspacing}%
+ {\csgappto{init@extras@#1}{\frenchspacing}}%
+ {\csgappto{init@extras@#1}{\nonfrenchspacing}}}%
+ \define@boolkey[xpg@setup]{#1}[#1@]{indentfirst}[true]{%
+ \ifbool{#1@indentfirst}%
+ {\csgappto{init@extras@#1}{\french@indent}}%
+ {\csgappto{init@extras@#1}{\nofrench@indent}}}%
+% \define@choicekey*+[xpg@setup]{#1}{fontsetup}[\val\nr]{none,custom,auto}[none]%
+% %{\csgdef{#1@fontsetup}{\val}}%
+% {\xpg@fontsetup{\val}{#1}}%
+% {\xpg@warning{Invalid value \val\space for key "fontsetup" in module "#1"}}%
+ \define@boolkey[xpg@setup]{#1}[#1@]{fontsetup}[true]{}%
+ %TODO assign csnames corr. to localized alph and Alph
+ % \define@key[xpg@setup]{#1}{localalph}[{#1@alph,#1@Alph}]{%
+ % \cslet{xpg@localalph@#1}{\expandafter\csname\xpg@first##1\endcsname}%
+ % \cslet{xpg@localAlph@#1}{\expandafter\csname\xpg@second##1\endcsname}%
+ %}%
+ %TODO same thing with localdigits
+}
+
+%\def\xpg@fontsetup#1{\xpg@csifdef@warn{xpg@fontsetup@#1}}
+%\def\xpg@fontsetup@none#1{\csgdef{#1@font}{\ifcsdef{#1font}{\csname #1font\endcsname}{}}} %<-- simplistic
+%\def\xpg@fontsetup@custom#1{\csuse{#1@font}}
+
+\def\xpg@fontsetup@auto#1{\iftoggle{#1@latin}%
+ {\xpg@fontsetup@latin{#1}}%
+ {\xpg@fontsetup@nonlatin{#1}}%
+}
+
+\def\xpg@addfontfeature@lang#1#2{% #1 is langtag, #2 is langname
+ % Turkish is a special case: tag can be TRK or TUR
+ \edef\tmp@Turkish{Turkish}%
+ \edef\tmp@@langname{#2}%
+ % \ifstrequal{#2}{Turkish}%
+ \ifx\tmp@@langname\tmp@Turkish
+ \fontspec_if_language:nTF {TRK}%
+ {\addfontfeature{Language=Turkish}}%
+ {\fontspec_if_language:nTF {TUR}%
+ {\addfontfeature{Language=Turkish}}%
+ {}}%
+ % else not Turkish
+ \else
+ \edef\tmp@@langparam{Language=#2}%
+ \expandafter\expandafter\expandafter\fontspec_if_language:nTF \expandafter{#1}%
+ {\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@langparam}}%
+ {}%
+ \fi
+}
+
+\def\xpg@addfontfeature@script#1#2{% #1 is scripttag, #2 is scriptname
+ \edef\tmp@@scriptparam{Script=#2}%
+ \expandafter\expandafter\expandafter\fontspec_if_script:nTF \expandafter{#1}%
+ {\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@scriptparam}}%
+ {\xpg@error{^^J
+ The~ current~ roman~ font~ does~ not~ contain~ the~ \expandafter\noexpand#2 ~ script!^^J
+ Please~ define~ \expandafter\string\csname \xpg@lowercasefirst{#2}font\endcsname\space with~ \string\newfontfamily}}%
+}
+
+\def\xpg@fontsetup@latin#1{%
+ \begingroup
+ \csgdef{#1@font@rm}{%
+ \ifcsdef{#1font}{\csname #1font\endcsname}%
+ {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}%
+ \edef\tmp@langname{\csuse{xpg@langname@#1}}%
+ \rmfamilylatin%
+ \ifcsvoid{xpg@langtag@#1}{}{%
+ \ifcsvoid{xpg@langname@#1}{}{%
+ \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}%
+ }}}%
+ \csgdef{#1@font@sf}{%
+ \ifcsdef{#1fontsf}{\csname #1fontsf\endcsname}%
+ {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}%
+ \edef\tmp@langname{\csuse{xpg@langname@#1}}%
+ \sffamilylatin%
+ \ifcsvoid{xpg@langtag@#1}{}{%
+ \ifcsvoid{xpg@langname@#1}{}{%
+ \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}%
+ }}}%
+ \csgdef{#1@font@tt}{%
+ \ifcsdef{#1fonttt}{\csname #1fonttt\endcsname}%
+ {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}%
+ \edef\tmp@langname{\csuse{xpg@langname@#1}}%
+ \ttfamilylatin%
+ \ifcsvoid{xpg@langtag@#1}{}{%
+ \ifcsvoid{xpg@langname@#1}{}{%
+ \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}%
+ }}}%
+ \endgroup
+}
+
+\def\xpg@fontsetup@nonlatin#1{%
+ \begingroup
+ \edef\tmp@langname@lc{#1}% eg ukrainian
+ \edef\tmp@scriptname@lc{\csuse{xpg@scriptname@#1@lc}}% eg cyrillic
+ \ifx\tmp@scriptname@lc\tmp@langname@lc
+ \toggletrue{#1@scriptlangequal}%
+ \else
+ \togglefalse{#1@scriptlangequal}%
+ \fi
+ \csgdef{#1@font@rm}{%
+ \ifcsdef{#1font}%
+ {\@nameuse{#1font}}%
+ {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl
+ \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic
+ \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR
+ \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian
+ \providetoggle{#1@use@script@font}%
+ \iftoggle{#1@scriptlangequal}%
+ {\rmfamilylatin}%
+ {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} font\endcsname% eg \cyrillicfont
+ \toggletrue{#1@use@script@font}%
+ \expandafter\csname\csuse{xpg@scriptname@#1@lc} font\endcsname
+ \else
+ \rmfamilylatin
+ \fi}
+ \iftoggle{#1@use@script@font}{}{%
+ \ifcsvoid{xpg@scripttag@#1}{}{%
+ \ifcsvoid{xpg@scriptname@#1}{}{%
+ \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}%
+ \ifcsvoid{xpg@langtag@#1}{}{%
+ \ifcsvoid{xpg@langname@#1}{}{%
+ \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}%
+ }}%
+ \csgdef{#1@font@sf}{%
+ \ifcsdef{#1fontsf}%
+ {\@nameuse{#1fontsf}}%
+ {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl
+ \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic
+ \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR
+ \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian
+ \providetoggle{#1@use@script@fontsf}%
+ \iftoggle{#1@scriptlangequal}%
+ {\sffamilylatin}%
+ {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} fontsf\endcsname% eg \cyrillicfontsf
+ \toggletrue{#1@use@script@fontsf}%
+ \expandafter\csname\csuse{xpg@scriptname@#1@lc} fontsf\endcsname
+ \else
+ \sffamilylatin
+ \fi}
+ \iftoggle{#1@use@script@fontsf}{}{%
+ \ifcsvoid{xpg@scripttag@#1}{}{%
+ \ifcsvoid{xpg@scriptname@#1}{}{%
+ \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}%
+ \ifcsvoid{xpg@langtag@#1}{}{%
+ \ifcsvoid{xpg@langname@#1}{}{%
+ \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}%
+ }}%
+ \csgdef{#1@font@tt}{%
+ \ifcsdef{#1fonttt}%
+ {\@nameuse{#1fonttt}}%
+ {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl
+ \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic
+ \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR
+ \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian
+ \providetoggle{#1@use@script@fonttt}%
+ \iftoggle{#1@scriptlangequal}%
+ {\ttfamilylatin}%
+ {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} fonttt\endcsname% eg \cyrillicfonttt
+ \toggletrue{#1@use@script@fonttt}%
+ \expandafter\csname\csuse{xpg@scriptname@#1@lc} fonttt\endcsname
+ \else
+ \ttfamilylatin
+ \fi}
+ \iftoggle{#1@use@script@fonttt}{}{%
+ \ifcsvoid{xpg@scripttag@#1}{}{%
+ \ifcsvoid{xpg@scriptname@#1}{}{%
+ \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}%
+ \ifcsvoid{xpg@langtag@#1}{}{%
+ \ifcsvoid{xpg@langname@#1}{}{%
+ \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}%
+ }}%
+ \endgroup
+}
+
+%%% END OF PolyglossiaSetup
+
%% ensure localization of \markright and \markboth commands
-\def\opt@enabled{on}
-\def\opt@disabled{off}
-\define@key{polyglossia}{localmarks}[on]{%
- \def\@tmpa{#1}
- \ifx\@tmpa\opt@enabled
+%%% THIS IS NOW DISABLED BY DEFAULT
+\define@boolkey{polyglossia}[xpg@]{localmarks}[false]{%
+ \ifbool{xpg@localmarks}{%
+ \xpg@info{Option:~ localmarks}%
\def\local@marks##1{%
\def\markboth####1####2{%
- \begingroup%
- \let\label\relax \let\index\relax \let\glossary\relax%
- \unrestored@protected@xdef\@themark%
- {{\foreignlanguage{##1}{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \unrestored@protected@xdef\@themark
+ {{\foreignlanguage{##1}{%
\protect\@@ensure@maindir{####1}}}%
- {\foreignlanguage{##1}{%
+ {\foreignlanguage{##1}{%
\protect\@@ensure@maindir{####2}}}}%
\@temptokena \expandafter{\@themark}%
\mark{\the\@temptokena}%
- \endgroup%
+ \endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}%
\def\markright####1{%
- \begingroup%
- \let\label\relax \let\index\relax \let\glossary\relax%
- \expandafter\@markright\@themark%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \expandafter\@markright\@themark
{\foreignlanguage{##1}{\protect\@@ensure@maindir{####1}}}%
\@temptokena \expandafter{\@themark}%
\mark{\the\@temptokena}%
- \endgroup%
+ \endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}%
\def\@markright####1####2####3{\@temptokena{\protect\@@ensure@maindir{####1}}%
\unrestored@protected@xdef\@themark{{\the\@temptokena}%
- {\protect\@@ensure@maindir{####3}}}}}
- \else
- \def\local@marks##1{}
- \xpg@info{Option: localmarks=off}
- \fi
+ {\protect\@@ensure@maindir{####3}}}}}%
+ }{% else
+ \def\local@marks##1{}%
+ }%
}
-\setkeys{polyglossia}{localmarks=on}
+\setkeys{polyglossia}{localmarks=false}
% to reset the intercharclass of a character to "normal"
\newXeTeXintercharclass\xpg@normalclass %TODO
@@ -1128,80 +1563,89 @@ CHANGES
%% (suggestion by Enrico Gregorio)
\@ifundefined{l@nohyphenation}{\chardef\l@nohyphenation=255 }{}
+%we call this macro when a gloss file is not found for a given language
+\def\xpg@nogloss#1{%
+ \xpg@warning{File~ gloss-#1.ldf~ does~ not~ exist!^^J
+ I~ will~ nevertheless~ try~ to~ use~ hyphenation~ patterns~ for~ #1.}%
+ \PolyglossiaSetup{#1}{hyphenmins,hyphennames={#1},fontsetup=true}%
+ % the above amounts to:
+ %\ifcsundef{l@#1}%
+ % {\expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}%
+ % {\setlocalhyphenmins{#1}{2}{3}}%
+ %\csdef{#1@language}{\language=\csname l@#1\endcsname}%
+}
+
\newcommand{\setdefaultlanguage}[2][]{%
\IfFileExists{gloss-#2.ldf}%
{\ifcsundef{#2@loaded}%
{\input{gloss-#2.ldf}%
- \xpg@info{Default language is #2.}
+ \xpg@info{Default~ language~ is~ #2.}
\def\languagename{#2}%
% This is needed because \arabic is a built-in LaTeX command:
- % so now we have \begin{Arabic}... instead of \begin{arabic}...
- \edef\@tmpa{arabic}%
- \edef\@tmpb{#2}%
- \ifx\@tmpb\@tmpa%
- \newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
- {\end{otherlanguage}}%
- \else%
- \newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
- {\end{otherlanguage}}%
- \fi
+ % so now we have \begin{Arabic}... instead of \begin{arabic}...
+ \ifstrequal{#2}{arabic}%
+ {\newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
+ {\end{otherlanguage}}}%
+ {\newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
+ {\end{otherlanguage}}}%
\expandafter\newcommand\csname text#2\endcsname[2][]{%
- \ifcsdef{RL}%
- {\ifcsundef{#2@RL}%
- {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
- {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}}%
- {\foreignlanguage[####1]{#2}{####2}}%
+ \ifcsdef{RTL}%
+ {\iftoggle{#2@RL}%
+ {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}%
+ {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
+ }% else bidi not loaded
+ {\iftoggle{#2@RL}%
+ {\xpg@error{Language~ #2~ is~ right-to-left,~ but~ bidi~ package~ was~ not~ loaded!}}%
+ {\foreignlanguage[####1]{#2}{####2}}%
+ }%
}%
\csletcs{local#2}{text#2}%
\csgdef{#2@loaded}{}%
\gdef\xpg@main@language{#2}%
}%
- {\PackageWarning{polyglossia}{gloss-#2.ldf is already loaded!}}%
- %% The following settings are for the default language and script:
- \ifcsundef{#2@RL}{}{\@RTLmaintrue}% this tells bidi.sty that the document is RTL
- \AtBeginDocument{%
- \selectlanguage[#1]{#2}%
- \selectbackgroundlanguage{#2}}%
+ {\xpg@warning{gloss-#2.ldf~ is~ already~ loaded!}}%:
+ %% The following settings are for the default language and script:
+ \iftoggle{#2@RL}{\@RTLmaintrue}{}% this tells bidi.sty that the document is RTL
+ \AtBeginDocument{%
+ \selectlanguage[#1]{#2}%
+ \selectbackgroundlanguage{#2}}%
}%
%ELSE
- {\xpg@nolang{#2}\hyphenrules{#2}}}%
+ {\xpg@nogloss{#2}}%
+}
\let\setmainlanguage=\setdefaultlanguage
\newcommand{\resetdefaultlanguage}[2][]{%
\ifcsundef{#2@loaded}{%
- \PackageError{polyglossia}{gloss-#2.ldf is not loaded!}}%
+ \xpg@error{gloss-#2.ldf~ is~ not~ loaded!}}%
{\csuse{no\xpg@main@language @globalnumbers}% disable globalnumbers of previously defined default language
\csuse{noextras@\xpg@main@language}%
+ \csuse{init@noextras@\xpg@main@language}%
\def\languagename{#2}%
- \ifcsundef{#2@RL}{}{\@rlmaintrue\@rl@footnotetrue}%
+ \iftoggle{#2@RL}{\@rlmaintrue\@rl@footnotetrue}{}%
\selectlanguage[#1]{#2}%
\selectbackgroundlanguage{#2}}}
\def\familytype{rm}
-\gappto\rmfamily{\def\familytype{rm}}
-\gappto\sffamily{\def\familytype{sf}}
-\gappto\ttfamily{\def\familytype{tt}}
+% This robustifies the redefinitions of \<xx>family (suggestion by Enrico Gregorio)
+% e.g. to prevent expansion of the \familytype redefinition in auxiliary files
+\csgappto{rmfamily }{\def\familytype{rm}}
+\csgappto{sffamily }{\def\familytype{sf}}
+\csgappto{ttfamily }{\def\familytype{tt}}
% This saves the normalfont for the latin script since we may change normalfont in other scripts
\let\normalfontlatin=\normalfont%
\let\rmfamilylatin=\rmfamily%
\let\sffamilylatin=\sffamily%
\let\ttfamilylatin=\ttfamily%
-\def\reset@latin@script{%
+\def\resetfontlatin{%
\let\rmfamily=\rmfamilylatin%
\let\sffamily=\sffamilylatin%
\let\ttfamily=\ttfamilylatin%
- \normalfontlatin}
-
-\def\reset@LR{\csuse{setLR}}
+ \let\normalfont=\normalfontlatin}
-\def\selectnormalfontlatin{%
- \if\normalfont\ttfamily\ttfamilylatin\else
- \if\normalfont\sffamily\sffamilylatin\else
- \normalfontlatin\fi\fi}
-
-\DeclareRobustCommand\selectfontfamilylatin{%
+\def\selectfontfamilylatin{%
\def\tmp@tt{tt}\def\tmp@sf{sf}%
\ifx\familytype\tmp@tt%
\ttfamilylatin%
@@ -1209,6 +1653,22 @@ CHANGES
\sffamilylatin%
\else\rmfamilylatin\fi\fi}
+\def\xpg@select@fontfamily#1{%
+ \def\tmp@tt{tt}\def\tmp@sf{sf}%
+ \ifx\familytype\tmp@tt
+ \csuse@warn{#1@font@tt}%
+ \else\ifx\familytype\tmp@sf
+ \csuse@warn{#1@font@sf}%
+ \else\csuse@warn{#1@font@rm}\fi\fi}
+
+\def\xpg@set@normalfont#1{%
+ \letcs{\rmfamily}{#1@font@rm}%
+ \letcs{\sffamily}{#1@font@sf}%
+ \letcs{\ttfamily}{#1@font@tt}%
+ \gdef\normalfont{\protect\xpg@select@fontfamily{#1}}%
+ \gdef\reset@font{\protect\normalfont}%
+}
+
\let\@@fterindentfalse\@afterindentfalse
\def\french@indent{\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue}
@@ -1216,7 +1676,7 @@ CHANGES
\@afterindentfalse}
\newcommand{\selectbackgroundlanguage}[1]{%
- \csuse{selectnormalfont#1}%
+ \iftoggle{#1@latin}{}{\xpg@set@normalfont{#1}}%
\csuse{#1@globalnumbers}%
}
@@ -1230,35 +1690,35 @@ CHANGES
\ifx\@tmpb\@tmpa%
\newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}%
{\end{otherlanguage}}%
- \else%
+ \else
\newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}%
{\end{otherlanguage}}%
\fi
\expandafter\newcommand\csname text#2\endcsname[2][]{%
- \ifcsdef{RL}{%
- \ifcsundef{#2@RL}%
- {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
- {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}%
- }{% else
- \foreignlanguage[####1]{#2}{####2}%
- }}%
- \csletcs{local#2}{text#2}%
- \csgdef{#2@loaded}{}%
+ \ifcsdef{RTL}%
+ {\iftoggle{#2@RL}%
+ {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}%
+ {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
+ }% else bidi not loaded
+ {\iftoggle{#2@RL}%
+ {\xpg@error{Language~ #2~ is~ right-to-left,~ but~ bidi~ package~ was~ not~ loaded!}}%
+ {\foreignlanguage[####1]{#2}{####2}}%
+ }%
+ }%
+ \csletcs{local#2}{text#2}%
+ \csgdef{#2@loaded}{}%
}%
- {\PackageWarning{polyglossia}{gloss-#2.ldf is already loaded!}}%
+ {\xpg@warning{gloss-#2.ldf~ is~ already~ loaded!}}%
}%
- %ELSE
- {\xpg@nolang{#2}\hyphenrules{#2}}%
- %TODO ? \expandafter\ifx\csname l@#2\endcsname\@undefined
- %\xpg@nopatterns{#2}\expandafter\adddialect\csname l@#2\endcsname 0%
- %\else\expandafter\expandafter\protect\language=\csname l@#2\endcsname\fi
+ %ELSE
+ {\xpg@nogloss{#2}}%
}
\newcommand\setotherlanguages[1]{%
- \def\do##1{\setotherlanguage{##1}}%
+ \renewcommand*{\do}[1]{\setotherlanguage{##1}}%
\docsvlist{#1}}%
-\def\common@language{%
+\def\common@language{% FIXME is this really needed???
\language=\z@
\lefthyphenmin=\tw@
\righthyphenmin=\thr@@}
@@ -1274,34 +1734,47 @@ CHANGES
\providecommand{\foreignlanguage}{}
\renewcommand{\foreignlanguage}[3][]{%
- \ifcsundef{#2@loaded}{\xpg@nolang{#2}\hyphenrules{#2}}{%
- {\def\languagename{#2}%
+ \ifcsundef{#2@loaded}%
+ {\xpg@nogloss{#2}}%
+ {{\select@@language{#2}%
\setkeys{#2}{#1}%
- \csuse@warn{#2@font}%
- \csuse@warn{#2@language}%
- \csuse{date#2}%
- \csuse{#2@numbers}%
\use@localhyphenmins{#2}%
+ \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}%
\csuse{inlineextras@#2}%
#3}%
- }%
+ }%
}
+% otherlanguage* is the environment equivalent of \foreignlanguage
+\expandafter\providecommand\csname otherlanguage*\endcsname{}
+\renewenvironment{otherlanguage*}[2][]{%
+ \ifcsundef{#2@loaded}%
+ {\bgroup\xpg@nogloss{#2}}%
+ {\bgroup\select@@language{#2}%
+ \setkeys{#2}{#1}%
+ \use@localhyphenmins{#2}%
+ \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}%
+ \csuse{inlineextras@#2}%
+ }%
+}{\egroup}
+
%Hook that other package authors can use
%(for instance biblatex):
\newcommand*{\xpg@hook@setlanguage}{}
\providecommand{\selectlanguage}{}
\renewcommand{\selectlanguage}[2][]{%
- \ifcsundef{#2@loaded}{\xpg@nolang{#2}\hyphenrules{#2}}{%
- \def\xpg@pop@language{%
+ \ifcsundef{#2@loaded}%
+ {\xpg@nogloss{#2}}%
+ {\def\xpg@pop@language{%
\xpg@set@language{\languagename}%
\xpg@hook@setlanguage%
\let\emp@langname\@undefined}%
\aftergroup\xpg@pop@language%
\setkeys{#2}{#1}%
\xpg@set@language{#2}%
-}}
+ }%
+}
\newcommand{\xpg@set@language}[1]{%
\select@language{#1}%
@@ -1315,19 +1788,26 @@ CHANGES
\def\select@language#1{%
\xpg@initial@setup%
- \edef\languagename{#1}%
- \ifcsundef{RL}{}%
- {\ifcsundef{#1@RL}{\setLR}{\setRL}}%
- \csuse@warn{#1@font}%
- \csuse@warn{#1@language}%
- \use@localhyphenmins{#1}%
+ \select@@language{#1}%
+ \ifcsundef{setRL}{}%
+ {\iftoggle{#1@RL}{\setRL}{\setLR}}%
\csuse{captions#1}%
- \csuse{date#1}%
- \csuse{#1@numbers}%
\local@marks{#1}%
+ \csuse{init@extras@#1}%
\csuse{blockextras@#1}%
}
+% Common code for `\select@language' and `\foreignlanguage'.
+\newcommand{\select@@language}[1]{%
+ \edef\languagename{#1}%
+ \xpg@select@fontfamily{#1}%
+ \csuse@warn{#1@language}%
+ \csuse{date#1}%
+ \csuse{#1@numbers}%
+ \use@localhyphenmins{#1}%
+}
+
+
\let\xpg@pop@language\relax
\provideenvironment{otherlanguage}{}{}
@@ -1338,10 +1818,10 @@ CHANGES
\newcommand{\setlocalhyphenmins}[3]{%
\expandafter\ifx\csname l@#1\endcsname\relax%
- \xpg@warning{\string\setlocalhyphenmin useless for unknown language #1}%
+ \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unknown~ language~ #1}%
\else
\expandafter\ifx\csname l@#1\endcsname\l@nohyphenation%
- \xpg@warning{\string\setlocalhyphenmin useless for unhyphenated language #1}%
+ \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unhyphenated~ language~ #1}%
\else
\providehyphenmins{#1}{#2#3}%
\fi
@@ -1351,40 +1831,13 @@ CHANGES
\ifcsundef{#1hyphenmins}{}%
{\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}}
-% FIXME: remove this eventually, say in 2012 :)
-% taken from xelatex.ini, in case the xelatex format is too old
-\ifcsundef{newXeTeXintercharclass}{%
- \xpg@warning{Your xelatex format appears to be outdated!^^J
- Please update your system and recreate it with fmtutil.}
- \newcount\xe@alloc@intercharclass % allocates intercharclass
- \xe@alloc@intercharclass=\thr@@ % from 4 (1,2 and 3 are used by CJK, AFAIK)
- \def\xe@alloc@#1#2#3#4#5{\global\advance#1\@ne
- \xe@ch@ck#1#4#2% make sure there's still room
- \allocationnumber#1%
- \global#3#5\allocationnumber
- \wlog{\string#5=\string#2\the\allocationnumber}}
- \def\xe@ch@ck#1#2#3{%
- \ifnum#1<#2\else
- \errmessage{No room for a new #3}%
- \fi}
- \def\newXeTeXintercharclass{%
- \xe@alloc@\xe@alloc@intercharclass\XeTeXintercharclass\chardef\@cclv} %at most 254
- }
- {}
-
-%% patch lastpage to avoid problem with \thepage when \@arabic is redefined for non-Latin numbers
-%\@ifpackageloaded{lastpage}{%
-%\xpg@info{Redefining lastpage command \string\lastpage@putlabel}%
-%\def\lastpage@putlabel{\addtocounter{page}{-1}%
-% \immediate\write\@auxout{\string
-% \newlabel{LastPage}{{}{\number\c@page}}}%
-% \addtocounter{page}{1}}}%
-% {}
-%
\define@boolkey{polyglossia}[system@]{babelshorthands}[false]{}
+\AtEndPreamble{\@ifpackageloaded{bidi}{\newcommand*{\aemph}[1]{$\overline{\hboxR{#1}}$}}{}}
+
%% Package Options %%
-\DeclareOption{nolocalmarks}{\setkeys{polyglossia}{localmarks=off}}
+\DeclareOption{nolocalmarks}{\setkeys{polyglossia}{localmarks=false}}
+\DeclareOption{localmarks}{\setkeys{polyglossia}{localmarks=true}}
\DeclareOption{babelshorthands}{\setkeys{polyglossia}{babelshorthands=true}}
\DeclareOption{quiet}{%
\gdef\@latex@info#1{\relax}% no latex info
@@ -1392,28 +1845,31 @@ CHANGES
\gdef\@font@warning#1{\relax}% no latex font warnings
\gdef\zf@PackageInfo#1{\relax}% no fontspec info
\gdef\xpg@info#1{\relax}}% no polyglossia info
+%
+% FIXME these should also be loaded \AtEndOfPackage !!!
\def\xpg@option#1#2{%
\ifcsundef{xpg@main@language}{\setdefaultlanguage}{\setotherlanguage}%
[#1]{#2}}
-\DeclareOption{USenglish}{\xpg@option{variant=american}{english}}
-\DeclareOption{american}{\xpg@option{variant=american}{english}}
-\DeclareOption{UKenglish}{\xpg@option{variant=british}{english}}
-\DeclareOption{british}{\xpg@option{variant=british}{english}}
-\DeclareOption{australian}{\xpg@option{variant=australian}{english}}
-\DeclareOption{newzealand}{\xpg@option{variant=newzealand}{english}}
-\DeclareOption{ngerman}{\xpg@option{spelling=new}{german}}
-\DeclareOption{polygreek}{\xpg@option{variant=poly}{greek}}
-\DeclareOption{monogreek}{\xpg@option{variant=mono}{greek}}
-\DeclareOption{ancientgreek}{\xpg@option{variant=ancient}{greek}}
-\DeclareOption*{%
- \edef\@temp{%
- \noexpand\ifcsundef{xpg@main@language}%
- \noexpand\setdefaultlanguage
- \noexpand\setotherlanguage
- {\CurrentOption}%
- }%
- \expandafter\AtEndOfPackage\expandafter{\@temp}%
-}
+%\DeclareOption{USenglish}{\xpg@option{variant=american}{english}}
+%\DeclareOption{american}{\xpg@option{variant=american}{english}}
+%\DeclareOption{UKenglish}{\xpg@option{variant=british}{english}}
+%\DeclareOption{british}{\xpg@option{variant=british}{english}}
+%\DeclareOption{australian}{\xpg@option{variant=australian}{english}}
+%\DeclareOption{newzealand}{\xpg@option{variant=newzealand}{english}}
+%\DeclareOption{ngerman}{\xpg@option{spelling=new}{german}}
+%\DeclareOption{polygreek}{\xpg@option{variant=poly}{greek}}
+%\DeclareOption{monogreek}{\xpg@option{variant=mono}{greek}}
+%\DeclareOption{ancientgreek}{\xpg@option{variant=ancient}{greek}}
+%%% TODO add warning message that this approach is deprecated <<<<<<<<<<<<<<
+%\DeclareOption*{%
+% \edef\@temp{%
+% \noexpand\ifcsundef{xpg@main@language}%
+% \noexpand\setdefaultlanguage
+% \noexpand\setotherlanguage
+% {\CurrentOption}%
+% }%
+% \expandafter\AtEndOfPackage\expandafter{\@temp}%
+%}
\ProcessOptions*
% \end{macrocode}
% \iffalse
@@ -1974,10 +2430,17 @@ CHANGES
% \subsection{hijrical.sty}
% \begin{macrocode}
\ProvidesPackage{hijrical}
- [2007/12/27 v0.1 %
+ [2010/07/12 v0.2 %
Islamic calendar]
-\RequirePackage{bidi}
+\RequirePackage{calc}
\RequirePackage{arabicnumbers}
+\@ifpackageloaded{bidi}{}{\newif\if@RTL\@RTLfalse}
+\@ifpackageloaded{l3calc}{\PackageError{hijrical}{\MessageBreak
+Package l3calc is loaded, which replaces the functionality of
+calc. Computation of Hijri dates will not work properly with
+l3calc! The latest version of expl3 on CTAN no longer loads
+l3calc. Please update expl3!
+}{}}{}
\@ifundefined{@Remainder}{\input{cal-util.def}}{}
@@ -2537,6 +3000,322 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</cal-util.def>
+%<*xgreek-fixes.def>
+% \fi
+% \clearpage
+%
+% \subsection{xgreek-fixes.def}
+% \begin{macrocode}
+% the following fixes are taken verbatim from xgreek.sty:
+\global\lccode"0386="03AC \global\uccode"0386="0391
+\global\lccode"0388="03AD \global\uccode"0388="0395
+\global\lccode"0389="03AC \global\uccode"0389="0397
+\global\lccode"038A="03AF \global\uccode"038A="0399
+\global\lccode"038C="03CC \global\uccode"038C="039F
+\global\lccode"038E="03CD \global\uccode"038E="03A5
+\global\lccode"038F="03CE \global\uccode"038F="03A9
+\global\lccode"0390="0390 \global\uccode"0390="03AA
+\global\lccode"0391="03B1 \global\uccode"0391="0391
+\global\lccode"0392="03B2 \global\uccode"0392="0392
+\global\lccode"0393="03B3 \global\uccode"0393="0393
+\global\lccode"0394="03B4 \global\uccode"0394="0394
+\global\lccode"0395="03B5 \global\uccode"0395="0395
+\global\lccode"0396="03B6 \global\uccode"0396="0396
+\global\lccode"0397="03B7 \global\uccode"0397="0397
+\global\lccode"0398="03B8 \global\uccode"0398="0398
+\global\lccode"0399="03B9 \global\uccode"0399="0399
+\global\lccode"039A="03BA \global\uccode"039A="039A
+\global\lccode"039B="03BB \global\uccode"039B="039B
+\global\lccode"039C="03BC \global\uccode"039C="039C
+\global\lccode"039D="03BD \global\uccode"039D="039D
+\global\lccode"039E="03BE \global\uccode"039E="039E
+\global\lccode"039F="03BF \global\uccode"039F="039F
+\global\lccode"03A0="03C0 \global\uccode"03A0="03A0
+\global\lccode"03A1="03C1 \global\uccode"03A1="03A1
+\global\lccode"03A3="03C3 \global\uccode"03A3="03A3
+\global\lccode"03A4="03C4 \global\uccode"03A4="03A4
+\global\lccode"03A5="03C5 \global\uccode"03A5="03A5
+\global\lccode"03A6="03C6 \global\uccode"03A6="03A6
+\global\lccode"03A7="03C7 \global\uccode"03A7="03A7
+\global\lccode"03A8="03C8 \global\uccode"03A8="03A8
+\global\lccode"03A9="03C9 \global\uccode"03A9="03A9
+\global\lccode"03AA="03CA \global\uccode"03AA="03AA
+\global\lccode"03AB="03CB \global\uccode"03AB="03AB
+\global\lccode"03AC="03AC \global\uccode"03AC="0391
+\global\lccode"03AD="03AD \global\uccode"03AD="0395
+\global\lccode"03AE="03AE \global\uccode"03AE="0397
+\global\lccode"03AF="03AF \global\uccode"03AF="0399
+\global\lccode"03B0="03B0 \global\uccode"03B0="03AB
+\global\lccode"03B1="03B1 \global\uccode"03B1="0391
+\global\lccode"03B2="03B2 \global\uccode"03B2="0392
+\global\lccode"03B3="03B3 \global\uccode"03B3="0393
+\global\lccode"03B4="03B4 \global\uccode"03B4="0394
+\global\lccode"03B5="03B5 \global\uccode"03B5="0395
+\global\lccode"03B6="03B6 \global\uccode"03B6="0396
+\global\lccode"03B7="03B7 \global\uccode"03B7="0397
+\global\lccode"03B8="03B8 \global\uccode"03B8="0398
+\global\lccode"03B9="03B9 \global\uccode"03B9="0399
+\global\lccode"03BA="03BA \global\uccode"03BA="039A
+\global\lccode"03BB="03BB \global\uccode"03BB="039B
+\global\lccode"03BC="03BC \global\uccode"03BC="039C
+\global\lccode"03BD="03BD \global\uccode"03BD="039D
+\global\lccode"03BE="03BE \global\uccode"03BE="039E
+\global\lccode"03BF="03BF \global\uccode"03BF="039F
+\global\lccode"03C0="03C0 \global\uccode"03C0="03A0
+\global\lccode"03C1="03C1 \global\uccode"03C1="03A1
+\global\lccode"03C2="03C2 \global\uccode"03C2="03A3
+\global\lccode"03C3="03C3 \global\uccode"03C3="03A3
+\global\lccode"03C4="03C4 \global\uccode"03C4="03A4
+\global\lccode"03C5="03C5 \global\uccode"03C5="03A5
+\global\lccode"03C6="03C6 \global\uccode"03C6="03A6
+\global\lccode"03C7="03C7 \global\uccode"03C7="03A7
+\global\lccode"03C8="03C8 \global\uccode"03C8="03A8
+\global\lccode"03C9="03C9 \global\uccode"03C9="03A9
+\global\lccode"03CA="03CA \global\uccode"03CA="03AA
+\global\lccode"03CB="03CB \global\uccode"03CB="03AB
+\global\lccode"03CC="03CC \global\uccode"03CC="039F
+\global\lccode"03CD="03CD \global\uccode"03CD="03A5
+\global\lccode"03CE="03CE \global\uccode"03CE="03A9
+\global\lccode"03D0="03D0 \global\uccode"03D0="0392
+\global\lccode"03D1="03D1 \global\uccode"03D1="0398
+\global\lccode"03D2="03C5 \global\uccode"03D2="03A5
+\global\lccode"03D3="03CD \global\uccode"03D3="03A5
+\global\lccode"03D4="03CB \global\uccode"03D4="03AB
+\global\lccode"03D5="03C6 \global\uccode"03D5="03A6
+\global\lccode"03D6="03C0 \global\uccode"03D6="03A0
+\global\lccode"03DA="03DB \global\uccode"03DA="03DA
+\global\lccode"03DB="03DB \global\uccode"03DB="03DA
+\global\lccode"03DC="03DD \global\uccode"03DC="03DC
+\global\lccode"03DD="03DD \global\uccode"03DD="03DC
+\global\lccode"03DE="03DF \global\uccode"03DE="03DE
+\global\lccode"03DF="03DF \global\uccode"03DF="03DE
+\global\lccode"03E0="03E1 \global\uccode"03E0="039A
+\global\lccode"03E0="03E1 \global\uccode"03E1="03A1
+\global\lccode"03F0="03BA \global\uccode"03F0="039A
+\global\lccode"03F1="03C1 \global\uccode"03F1="03A1
+\global\lccode"03F2="03F2 \global\uccode"03F2="03F9
+\global\lccode"03F9="03F2 \global\uccode"03F9="03F9
+\global\lccode"1F00="1F00 \global\uccode"1F00="0391
+\global\lccode"1F01="1F01 \global\uccode"1F01="0391
+\global\lccode"1F02="1F02 \global\uccode"1F02="0391
+\global\lccode"1F03="1F03 \global\uccode"1F03="0391
+\global\lccode"1F04="1F04 \global\uccode"1F04="0391
+\global\lccode"1F05="1F05 \global\uccode"1F05="0391
+\global\lccode"1F06="1F06 \global\uccode"1F06="0391
+\global\lccode"1F07="1F07 \global\uccode"1F07="0391
+\global\lccode"1F08="1F00 \global\uccode"1F08="0391
+\global\lccode"1F09="1F01 \global\uccode"1F09="0391
+\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391
+\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391
+\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391
+\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391
+\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391
+\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391
+\global\lccode"1F10="1F10 \global\uccode"1F10="0395
+\global\lccode"1F11="1F11 \global\uccode"1F11="0395
+\global\lccode"1F12="1F12 \global\uccode"1F12="0395
+\global\lccode"1F13="1F13 \global\uccode"1F13="0395
+\global\lccode"1F14="1F14 \global\uccode"1F14="0395
+\global\lccode"1F15="1F15 \global\uccode"1F15="0395
+\global\lccode"1F18="1F10 \global\uccode"1F18="0395
+\global\lccode"1F19="1F11 \global\uccode"1F19="0395
+\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395
+\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395
+\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395
+\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395
+\global\lccode"1F20="1F20 \global\uccode"1F20="0397
+\global\lccode"1F21="1F21 \global\uccode"1F21="0397
+\global\lccode"1F22="1F22 \global\uccode"1F22="0397
+\global\lccode"1F23="1F23 \global\uccode"1F23="0397
+\global\lccode"1F24="1F24 \global\uccode"1F24="0397
+\global\lccode"1F25="1F25 \global\uccode"1F25="0397
+\global\lccode"1F26="1F26 \global\uccode"1F26="0397
+\global\lccode"1F27="1F27 \global\uccode"1F27="0397
+\global\lccode"1F28="1F20 \global\uccode"1F28="0397
+\global\lccode"1F29="1F21 \global\uccode"1F29="0397
+\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397
+\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397
+\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397
+\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397
+\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397
+\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397
+\global\lccode"1F30="1F30 \global\uccode"1F30="0399
+\global\lccode"1F31="1F31 \global\uccode"1F31="0399
+\global\lccode"1F32="1F32 \global\uccode"1F32="0399
+\global\lccode"1F33="1F33 \global\uccode"1F33="0399
+\global\lccode"1F34="1F34 \global\uccode"1F34="0399
+\global\lccode"1F35="1F35 \global\uccode"1F35="0399
+\global\lccode"1F36="1F36 \global\uccode"1F36="0399
+\global\lccode"1F37="1F37 \global\uccode"1F37="0399
+\global\lccode"1F38="1F30 \global\uccode"1F38="0399
+\global\lccode"1F39="1F31 \global\uccode"1F39="0399
+\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399
+\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399
+\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399
+\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399
+\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399
+\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399
+\global\lccode"1F40="1F40 \global\uccode"1F40="039F
+\global\lccode"1F41="1F41 \global\uccode"1F41="039F
+\global\lccode"1F42="1F42 \global\uccode"1F42="039F
+\global\lccode"1F43="1F43 \global\uccode"1F43="039F
+\global\lccode"1F44="1F44 \global\uccode"1F44="039F
+\global\lccode"1F45="1F45 \global\uccode"1F45="039F
+\global\lccode"1F48="1F40 \global\uccode"1F48="039F
+\global\lccode"1F49="1F41 \global\uccode"1F49="039F
+\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F
+\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F
+\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F
+\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F
+\global\lccode"1F50="1F50 \global\uccode"1F50="03A5
+\global\lccode"1F51="1F51 \global\uccode"1F51="03A5
+\global\lccode"1F52="1F52 \global\uccode"1F52="03A5
+\global\lccode"1F53="1F53 \global\uccode"1F53="03A5
+\global\lccode"1F54="1F54 \global\uccode"1F54="03A5
+\global\lccode"1F55="1F55 \global\uccode"1F55="03A5
+\global\lccode"1F56="1F56 \global\uccode"1F56="03A5
+\global\lccode"1F57="1F57 \global\uccode"1F57="03A5
+\global\lccode"1F59="1F51 \global\uccode"1F59="03A5
+\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5
+\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5
+\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5
+\global\lccode"1F60="1F60 \global\uccode"1F60="03A9
+\global\lccode"1F61="1F61 \global\uccode"1F61="03A9
+\global\lccode"1F62="1F62 \global\uccode"1F62="03A9
+\global\lccode"1F63="1F63 \global\uccode"1F63="03A9
+\global\lccode"1F64="1F64 \global\uccode"1F64="03A9
+\global\lccode"1F65="1F65 \global\uccode"1F65="03A9
+\global\lccode"1F66="1F66 \global\uccode"1F66="03A9
+\global\lccode"1F67="1F67 \global\uccode"1F67="03A9
+\global\lccode"1F68="1F60 \global\uccode"1F68="03A9
+\global\lccode"1F69="1F61 \global\uccode"1F69="03A9
+\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9
+\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9
+\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9
+\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9
+\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9
+\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9
+\global\lccode"1F70="1F70 \global\uccode"1F70="0391
+\global\lccode"1F71="1F71 \global\uccode"1F71="0391
+\global\lccode"1F72="1F72 \global\uccode"1F72="0395
+\global\lccode"1F73="1F73 \global\uccode"1F73="0395
+\global\lccode"1F74="1F74 \global\uccode"1F74="0397
+\global\lccode"1F75="1F75 \global\uccode"1F75="0397
+\global\lccode"1F76="1F76 \global\uccode"1F76="0399
+\global\lccode"1F77="1F77 \global\uccode"1F77="0399
+\global\lccode"1F78="1F78 \global\uccode"1F78="039F
+\global\lccode"1F79="1F79 \global\uccode"1F79="039F
+\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5
+\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5
+\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9
+\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9
+\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC
+\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC
+\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC
+\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC
+\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC
+\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC
+\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC
+\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC
+\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC
+\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC
+\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC
+\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC
+\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC
+\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC
+\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC
+\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC
+\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC
+\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC
+\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC
+\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC
+\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC
+\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC
+\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC
+\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC
+\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC
+\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC
+\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC
+\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC
+\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC
+\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC
+\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC
+\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC
+\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC
+\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC
+\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC
+\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC
+\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC
+\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC
+\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC
+\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC
+\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC
+\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC
+\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC
+\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC
+\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC
+\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC
+\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC
+\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC
+\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8
+\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9
+\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC
+\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC
+\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC
+\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391
+\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC
+\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8
+\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9
+\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391
+\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391
+\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC
+\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD
+\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC
+\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC
+\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC
+\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397
+\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC
+\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395
+\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395
+\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397
+\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397
+\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC
+\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8
+\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9
+\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA
+\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA
+\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399
+\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA
+\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8
+\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9
+\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399
+\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399
+\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8
+\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9
+\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB
+\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB
+\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1
+\global\lccode"1FE5="1FE5 \global\uccode"1FE5="1FEC
+\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5
+\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB
+\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8
+\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9
+\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5
+\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5
+\global\lccode"1FEC="1FE5 \global\uccode"1FEC="1FEC
+\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC
+\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC
+\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC
+\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9
+\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC
+\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F
+\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F
+\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9
+\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9
+\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC
+% \end{macrocode}
+% \iffalse
+%</xgreek-fixes.def>
%<*gloss-albanian.ldf>
% \fi
% \clearpage
@@ -2545,11 +3324,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-albanian.ldf}[polyglossia: module for albanian]
\makeatletter
-\def\albanian@font{\selectfontfamilylatin}
-\ifx\l@albanian\@undefined
- \xpg@nopatterns{Albanian}
- \adddialect\l@albanian\l@nohyphenation\fi
+\PolyglossiaSetup{albanian}{
+ hyphennames={albanian},
+ hyphenmins={2,2},
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsalbanian{%
\def\refname{Referencat}%
@@ -2581,18 +3362,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Qershor\or Korrik\or Gusht\or Shtator\or Tetor\or Nëntor\or
Dhjetor\fi \space \number\year}}}
-\def\albanian@language{\language=\l@albanian}
-
-\setlocalhyphenmins{albanian}{2}{2}
-
-\def\noextras@albanian{%
- \nofrench@indent%
- }
-
-\def\blockextras@albanian{%
- \french@indent%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-albanian.ldf>
@@ -2602,14 +3371,17 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%
% \subsection{gloss-amharic.ldf}
% \begin{macrocode}
-%% RENAME TO gloss-amharic.ldf
\ProvidesFile{gloss-amharic.ldf}[polyglossia: module for amharic]
\makeatletter
-
-\ifx\l@amharic\@undefined%
- %\xpg@nopatterns{Amharic}%
- \adddialect\l@amharic\l@nohyphenation%
-\fi
+\PolyglossiaSetup{amharic}{
+ script=Ethiopic,
+ scripttag=ethi,
+ langtag=AMH,
+ hyphennames={amharic,nohyphenation},
+ %hyphenmins={2,2},
+ fontsetup=true,
+ %TODO localalph=ethnum
+}
\def\captionsamharic{%
\def\refname{የነሥ ጹሁፍ ምንጭ}%
@@ -2803,36 +3575,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ethnum@five%
}
-\def\amharic@font{%
- \@ifundefined{amharicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \@ifundefined{ethiopicfont}{%
- \zf@check@ot@script{ethi}%
- \if@tempswa
- \addfontfeature{Script=Ethiopic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Ethiopic script!^^J
- Please define \string\ethiopicfont\space or \string\amharicfont\space with \string\newfontfamily}%
- \fi
- \zf@check@ot@lang{AMH}%
- \if@tempswa\addfontfeature{Language=Amharic}\fi
- }%
- {\ethiopicfont%
- \zf@check@ot@lang{AMH}%
- \if@tempswa\addfontfeature{Language=Amharic}\fi
- }}%
- {\amharicfont}%
-}
-
-\def\selectnormalfontamharic{%
- \let\normalfont=\amharic@font%
- \def\reset@font{\normalfont}}
-
-\def\amharic@language{\language=\l@amharic}
-
-
% \end{macrocode}
% \iffalse
%</gloss-amharic.ldf>
@@ -2848,12 +3590,16 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\RequirePackage{hijrical}
\makeatletter
-\ifx\l@arabic\@undefined
- %\xpg@nopatterns{arabic}%
- \adddialect\l@arabic\l@nohyphenation
-\fi
-
-\def\arabic@RL{\relax}
+\PolyglossiaSetup{arabic}{
+ script=Arabic,
+ direction=RL,
+ langtag=ARA,
+ scripttag=arab,
+ hyphennames={nohyphenation},
+ fontsetup=true
+ %TODO localalph={abjad,abjad}
+ %TODO localnumber=arabicnumber
+}
\newif\ifeastern@numerals
\def\tmp@mashriq{mashriq}
@@ -2929,32 +3675,32 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\arabicgregmonth@default}}
%\Hijritoday is now locale-aware and will format the date with this macro:
-\DefineFormatHijriDate{arabic}{\@ensure@RTL{%
-\arabicnumber{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\arabicnumber{\value{Hijriyear}}}}
+\DefineFormatHijriDate{arabic}{\@ensure@RTL{\arabicnumber{\value{Hijriday}}%
+ \space\HijriMonthArabic{\value{Hijrimonth}}\space\arabicnumber{\value{Hijriyear}}}}
\def\captionsarabic{%
-\def\prefacename{\@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\listfigurename{\@ensure@RTL{قائمة الأشكال}}%
-\def\listtablename{\@ensure@RTL{قائمة الجداول}}%
-\def\indexname{\@ensure@RTL{الفهرس}}%
-\def\figurename{\@ensure@RTL{شكل}}%
-\def\tablename{\@ensure@RTL{جدول}}%
-\def\partname{\@ensure@RTL{القسم}}%
-\def\enclname{\@ensure@RTL{المرفقات}}%<-- Needs translation
-\def\ccname{\@ensure@RTL{نسخة ل‬}}% <<
-\def\headtoname{\@ensure@RTL{إلى}}%<-- Needs translation
-\def\pagename{\@ensure@RTL{صفحة}}%
-\def\seename{\@ensure@RTL{راجع}}%\alefhamza\nun\za\ra
-\def\alsoname{\@ensure@RTL{راجع أيضًا}}%<<\alefhamza\nun\za\ra
-\def\proofname{\@ensure@RTL{برهان}}%
-\def\glossaryname{\@ensure@RTL{قاموس}}%<<
+ \def\prefacename{\@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\listfigurename{\@ensure@RTL{قائمة الأشكال}}%
+ \def\listtablename{\@ensure@RTL{قائمة الجداول}}%
+ \def\indexname{\@ensure@RTL{الفهرس}}%
+ \def\figurename{\@ensure@RTL{شكل}}%
+ \def\tablename{\@ensure@RTL{جدول}}%
+ \def\partname{\@ensure@RTL{القسم}}%
+ \def\enclname{\@ensure@RTL{المرفقات}}%<-- Needs translation
+ \def\ccname{\@ensure@RTL{نسخة ل‬}}% <<
+ \def\headtoname{\@ensure@RTL{إلى}}%<-- Needs translation
+ \def\pagename{\@ensure@RTL{صفحة}}%
+ \def\seename{\@ensure@RTL{راجع}}%\alefhamza\nun\za\ra
+ \def\alsoname{\@ensure@RTL{راجع أيضًا}}%<<\alefhamza\nun\za\ra
+ \def\proofname{\@ensure@RTL{برهان}}%
+ \def\glossaryname{\@ensure@RTL{قاموس}}%<<
}
\def\datearabic{%
\def\today{%
@@ -2964,7 +3710,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\if@RTL%
\arabicnumber\day\space\@@arabic@month{\month}%
\space\arabicnumber\year%
- \else% in LR environment we format the gregorian date within \textenglish
+ \else% in LR environment we format the gregorian date within \textenglish
\ifcsdef{english@loaded}{\textenglish{\today}}%else US format
{\normalfontlatin\ifcase\month\or January\or February\or March\or April\or May\or June\or%
July\or August\or September\or October\or November\or December\fi%
@@ -2972,7 +3718,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi%
\fi}}
-
\def\arabicnumber#1{%
\ifeastern@numerals
\arabicdigits{\number#1}%
@@ -3007,7 +3752,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%maghribi س -> ص ص -> ض ش -> س ض -> ظ ظ -> غ غ -> ش
\def\abj@maghribi@num@ii#1{%
\ifcase#1\or ي\or ك\or ل\or م\or ن%
- \or ص\or ع\or ف\or ض\fi
+ \or ص\or ع\or ف\or ض\fi
\ifnum#1=\z@\abjad@zero\fi\abj@num@i}
\def\abj@maghribi@num@iii#1{%
\ifcase#1\or ق\or ر\or س\or ت\or ث%
@@ -3039,61 +3784,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
}
-\def\arabic@language{\language=\l@arabic}
-
-\def\arabic@font{%
- \@ifundefined{arabicfont}{%
- \rmfamilylatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{arab}%
- \if@tempswa
- \addfontfeature{Script=Arabic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Arabic script!^^J
- Please define \string\arabicfont\space with \string\newfontfamily}%
- \fi}%
- {\arabicfont}%
-}
-\def\arabic@font@sf{%
- \@ifundefined{arabicfontsf}{%
-% \sffamilylatin%
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa%
-% \addfontfeature{Script=Arabic}%
-% \else%
- \arabic@font%
-% \fi%
- }%
- {\arabicfontsf}%
-}
-\def\arabic@font@tt{%
- \@ifundefined{arabicfonttt}{%
-% \ttfamilylatin%
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa%
-% \addfontfeature{Script=Arabic}%
-% \else%
- \arabic@font%
-% \fi%
- }%
- {\arabicfonttt}%
-}
-
-\def\selectnormalfontarabic{%
- %\edef\@tempa{\if\normalfont\sffamily\noexpand\arabic@font@sf\else
- % \if\normalfont\ttfamily\noexpand\arabic@font@tt\else
- % \noexpand\arabic@font\fi\fi}%
- \let\normalfont=\arabic@font%
- \let\rmfamily=\arabic@font%
- \let\sffamily=\arabic@font@sf%
- \let\ttfamily=\arabic@font@tt%
- \def\reset@font{\normalfont}%
- %\expand\@tempa%
- }
-
\def\blockextras@arabic{%
\let\orig@MakeUppercase\MakeUppercase%
\def\MakeUppercase##1{##1}%
@@ -3106,6 +3796,67 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-arabic.ldf>
+%<*gloss-armenian.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-armenian.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-armenian.ldf}[polyglossia: module for armenian]
+\makeatletter
+
+\PolyglossiaSetup{armenian}{
+ script=Armenian,
+ scripttag=armn,
+ langtag=HYE,
+ hyphennames={armenian},
+ hyphenmins={2,2},
+ fontsetup=true
+}
+
+%\def\captionsarmenian{%
+% \def\refname{}%
+% \def\abstractname{}%
+% \def\bibname{}%
+% \def\prefacename{}%
+% \def\chaptername{}%
+% \def\appendixname{}%
+% \def\contentsname{}%
+% \def\listfigurename{}%
+% \def\listtablename{}%
+% \def\indexname{}%
+% \def\authorname{}%
+% \def\figurename{}%
+% \def\tablename{}%
+% %\def\thepart{}%
+% \def\partname{}%
+% \def\pagename{}%
+% \def\seename{}%
+% \def\alsoname{}%
+% \def\enclname{}%
+% \def\ccname{}%
+% \def\headtoname{}%
+% \def\proofname{}%
+% \def\glossaryname{}%
+%}
+\def\datearmenian{%
+ \def\today{\ifcase\month\or
+ Յունուար\or
+ Փետրուար\or
+ Մարտ\or
+ Ապրիլ\or
+ Մայիս\or
+ Յունիս\or
+ Յուլիս\or
+ Օգոստոս\or
+ Սեպտեմբեր\or
+ Հոկտեմբեր\or
+ Նոյեմբեր\or
+ Դեկտեմբեր\fi
+ \number\day,\space\number\year}}
+% \end{macrocode}
+% \iffalse
+%</gloss-armenian.ldf>
%<*gloss-asturian.ldf>
% \fi
% \clearpage
@@ -3117,18 +3868,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%
\ProvidesFile{gloss-asturian.ldf}[polyglossia: module for asturian]
\makeatletter
-\def\asturian@font{\selectfontfamilylatin}
-
-\ifx\l@asturian\@undefined
- \ifx\l@catalan\@undefined%
- \xpg@nopatterns{asturian}
- \adddialect\l@asturian\l@nohyphenation
- \else
- \xpg@warning{No hyphenation patterns were loaded for `asturian'\MessageBreak
- I will use \string\language=\string\l@catalan\space instead}
- \adddialect\l@asturian\l@catalan
- \fi
-\fi
+\PolyglossiaSetup{asturian}{
+ hyphennames={asturian,catalan},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsasturian{%
\def\prefacename{Entamu}%
@@ -3160,22 +3906,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
d'avientu\fi\space de~\number\year}%
}
-\def\asturian@language{\language=\l@asturian}
-
-\setlocalhyphenmins{asturian}{2}{2}%
-
-\def\noextras@asturian{%
- \nonfrenchspacing%
-}
-
-\def\blockextras@asturian{%
- \frenchspacing%
-}
-
-\def\inlineextras@asturian{%
- \frenchspacing%
-}
-
% \end{macrocode}
% \iffalse
%</gloss-asturian.ldf>
@@ -3188,36 +3918,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ProvidesFile{gloss-bahasai.ldf}[polyglossia: module for bahasa indonesia]
\RequirePackage{hijrical}
\makeatletter
-\def\bahasai@font{\selectfontfamilylatin}
-
-\ifx\l@bahasai\@undefined
- \ifx\l@bahasa\@undefined
- \ifx\l@indon\@undefined
- \ifx\l@indonesian\@undefined
- \ifx\l@bahasam\@undefined
- \ifx\l@malay\@undefined
- \ifx\l@meyalu\@undefined
- \xpg@nopatterns{Bahasa Indonesia}
- \adddialect\l@bahasai\l@nohyphenation\relax
- \else
- \let\l@bahasai\l@meyalu
- \fi
- \else
- \let\l@bahasai\l@malay
- \fi
- \else
- \let\l@bahasai\l@bahasam
- \fi
- \else
- \let\l@bahasai\l@indonesian
- \fi
- \else
- \let\l@bahasai\l@indon
- \fi
- \else
- \let\l@bahasai\l@bahasa
- \fi
-\fi
+
+\PolyglossiaSetup{bahasai}{%
+ language=Bahasa Indonesia,
+ hyphennames={indonesian,indon,bahasai,bahasa,bahasam,malay,melayu},
+ hyphenmins={2,2},
+ fontsetup=true}
\def\captionsbahasai{%
\def\refname{Pustaka}%
@@ -3255,10 +3961,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\DefineFormatHijriDate{bahasai}{%
\number\value{Hijriday}\space\hijrimonthbahasai{\value{Hijrimonth}}\space\number\value{Hijriyear}}
-\def\bahasai@language{\language=\l@bahasai}
-
-\setlocalhyphenmins{bahasai}{2}{2}
-
% \end{macrocode}
% \iffalse
%</gloss-bahasai.ldf>
@@ -3271,49 +3973,24 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ProvidesFile{gloss-bahasam.ldf}[polyglossia: module for bahasa melayu]
\RequirePackage{hijrical}
\makeatletter
-\def\bahasam@font{\selectfontfamilylatin}
-
-\ifx\l@malay\@undefined
- \ifx\l@meyalu\@undefined
- \ifx\l@bahasam\@undefined
- \ifx\l@bahasa\@undefined
- \ifx\l@bahasai\@undefined
- \ifx\l@indon\@undefined
- \ifx\l@indonesian\@undefined
- \xpg@nopatterns{Bahasa Melayu}%
- \adddialect\l@malay\l@nohyphenation\relax
- \else
- \let\l@malay\l@indonesian
- \fi
- \else
- \let\l@malay\l@indon
- \fi
- \else
- \let\l@malay\l@bahasai
- \fi
- \else
- \let\l@malay\l@bahasa
- \fi
- \else
- \let\l@malay\l@bahasam
- \fi
- \else
- \let\l@malay\l@meyalu
- \fi
-\fi
+\PolyglossiaSetup{bahasam}{%
+ language=Bahasa Melayu,
+ hyphennames={malay,melayu,bahasam,bahasa,bahasai,indonesian,indon},
+ hyphenmins={2,2},
+ fontsetup=true}
\def\captionsbahasam{%
- \def\refname{Pustaka}%
- \def\abstractname{Ringkasan}%
+ \def\refname{Rujukan}%
+ \def\abstractname{Abstrak}%
\def\bibname{Bibliografi}%
\def\prefacename{Pendahuluan}%
\def\chaptername{Bab}%
\def\appendixname{Lampiran}%
\def\contentsname{Kandungan}%
- \def\listfigurename{Senarai Gambar}%
+ \def\listfigurename{Senarai Rajah}%
\def\listtablename{Senarai Jadual}%
\def\indexname{Indeks}%
- \def\figurename{Gambar}%
+ \def\figurename{Rajah}%
\def\tablename{Jadual}%
\def\thepart{}%
\def\partname{Bahagian}%
@@ -3321,14 +3998,23 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\seename{lihat}%
\def\alsoname{lihat juga}%
\def\enclname{Lampiran}%
- \def\ccname{cc}%
+ \def\ccname{salinan kpd}%
\def\headtoname{Kepada}%
\def\proofname{Bukti}%
- \def\glossaryname{Istilah}%
+ \def\glossaryname{Senarai Istilah}%
}
\def\datebahasam{%
- \def\today{\number\day~\ifcase\month\or
- Januari\or Pebruari\or Mac\or April\or Mei\or Jun\or
+ \def\bahasam@day{%
+ \ifcase\day\or%
+ 1hb\or 2hb\or 3hb\or 4hb\or 5hb\or%
+ 6hb\or 7hb\or 8hb\or 9hb\or 10hb\or%
+ 11hb\or 12hb\or 13hb\or 14hb\or 15hb\or%
+ 16hb\or 17hb\or 18hb\or 19hb\or 20hb\or%
+ 21hb\or 22hb\or 23hb\or 24hb\or 25hb\or%
+ 26hb\or 27hb\or 28hb\or 29hb\or 30hb\or%
+ 31hb\fi}%
+ \def\today{\bahasam@day~\ifcase\month\or
+ Januari\or Februari\or Mac\or April\or Mei\or Jun\or
Julai\or Ogos\or September\or Oktober\or November\or Disember\fi
\space \number\year}}
@@ -3338,10 +4024,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\DefineFormatHijriDate{bahasam}{%
\number\value{Hijriday}\space\hijrimonthbahasam{\value{Hijrimonth}}\space\number\value{Hijriyear}}
-\def\bahasam@language{\language=\l@malay}
-
-\setlocalhyphenmins{bahasam}{2}{2}
-
% \end{macrocode}
% \iffalse
%</gloss-bahasam.ldf>
@@ -3353,12 +4035,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-basque.ldf}[polyglossia: module for basque]
\makeatletter
-\def\basque@font{\selectfontfamilylatin}
-
-\ifx\l@basque\@undefined%
- \xpg@nopatterns{Basque}%
- \adddialect\l@basque\l@nohyphenation%
-\fi
+\PolyglossiaSetup{basque}{
+ hyphennames={basque},
+ hyphenmins={2,2},
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsbasque{%
\def\refname{Erreferentziak}%
@@ -3391,13 +4073,95 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
irailaren\or urriaren\or azaroaren\or
abenduaren\fi~\number\day}}
-\def\basque@language{\language=\l@basque}
+% \end{macrocode}
+% \iffalse
+%</gloss-basque.ldf>
+%<*gloss-bengali.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-bengali.ldf}
+% \begin{macrocode}
+% Translations provided by সাজেদুর রহিম জোয়ারদার <toshazed@gmail.com>
+% TODO implement Bengali calendar
+
+\ProvidesFile{gloss-bengali.ldf}[polyglossia: module for bengali]
+\RequirePackage{devanagaridigits}
+\makeatletter
+
+\PolyglossiaSetup{bengali}{
+ script=Bengali,
+ scripttag=beng,
+ langtag=BEN,
+ hyphennames={bengali},
+ hyphenmins={2,2},%CHECK
+ fontsetup=true,
+ %TODO nouppercase=true,
+ %TODO localnumber=bengalinumber
+}
+
+\def\tmp@western{Western}
+\newif\ifbengali@devanagari@numerals
+\bengali@devanagari@numeralstrue
-\setlocalhyphenmins{basque}{2}{2}
+\define@key{bengali}{numerals}[Devanagari]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@western
+ \bengali@devanagari@numeralsfalse
+ \fi}
+
+\def\captionsbengali{%
+ \def\refname{তথ্যসুত্রসমূহ}%
+ \def\abstractname{সারসংক্ষেপ}%
+ \def\bibname{তথ্যবিবরণ}%
+ \def\prefacename{পূর্বকথা}%
+ \def\chaptername{অধ্যায়}%
+ \def\appendixname{পরিশিষ্ট}%
+ \def\contentsname{সূচীপত্র}%
+ \def\listfigurename{ছবি/নকশা সমূহের তালিকা}%
+ \def\listtablename{তালিকাসারণী}%
+ \def\indexname{সূচক/নির্দেশক}%
+ \def\figurename{ছবি/নকশা}%
+ \def\tablename{সারনী}%
+ %\def\thepart{}% TODO
+ \def\partname{খন্ড}%
+ \def\pagename{পৃষ্ঠা}%
+ \def\seename{দেখুন}%
+ \def\alsoname{আরও দেখুন}%
+ \def\enclname{সংযুক্তি}%
+ \def\ccname{অনুলিপি}%
+ \def\headtoname{প্রতি}%
+ \def\proofname{প্রমাণ}%
+ \def\glossaryname{পরিভাষার শব্দসম্ভার}%
+}
+\def\datebengali{%
+ \def\bengalimonth{%
+ \ifcase\month\or
+ জানুয়ারী\or
+ ফেব্রুয়ারী\or
+ মার্চ\or
+ এপ্রিল\or
+ মে\or
+ জুন\or
+ জুলাই\or
+ আগষ্ট\or
+ সেপ্টেম্বর\or
+ অক্টোবর\or
+ নভেম্বর\or
+ ডিসেম্বর\fi}%
+ \def\today{\bengalinumber\day\space\bengalimonth\space\bengalinumber\year}%
+}
+
+\def\bengalinumber#1{%
+ \ifbengali@devanagari@numerals
+ \devanagaridigits{\number#1}%
+ \else
+ \number#1%
+ \fi}
% \end{macrocode}
% \iffalse
-%</gloss-basque.ldf>
+%</gloss-bengali.ldf>
%<*gloss-brazil.ldf>
% \fi
% \clearpage
@@ -3406,17 +4170,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-brazil.ldf}[polyglossia: module for portuguese]
\makeatletter
-\def\brazil@font{\selectfontfamilylatin}
-
-%FIXME check this:
-\ifx\l@brazil\@undefined
- \ifx\l@portuguese\@undefined
- \xpg@nopatterns{Brazilian Portuguese}
- \adddialect\l@brazil\l@nohyphenation
- \else
- \let\l@brazil\l@portuguese
- \fi
-\fi
+\PolyglossiaSetup{brazil}{
+ language=Brazilian Portuguese,
+ hyphennames={brazil,portuguese,portuges},
+ hyphenmins={2,3},
+ fontsetup=true,
+}
\def\captionsbrazil{%
\def\refname{Referências}%
@@ -3449,10 +4208,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi\space de\space\number\year}%
}
-\def\brazil@language{\language=\l@brazil}
-
-\setlocalhyphenmins{brazil}{2}{3}
-
% \end{macrocode}
% \iffalse
%</gloss-brazil.ldf>
@@ -3464,12 +4219,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-breton.ldf}[polyglossia: module for breton]
\makeatletter
-\def\breton@font{\selectfontfamilylatin}
-
-\ifx\l@breton\@undefined%
- \xpg@nopatterns{Breton}%
- \adddialect\l@breton\l@nohyphenation%
-\fi
+\PolyglossiaSetup{breton}{
+ hyphennames={breton},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
\newXeTeXintercharclass\breton@punctthin % ! ? ;
\newXeTeXintercharclass\breton@punctthick % :
@@ -3478,7 +4234,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\breton@punctthickspace{{\unskip\nobreakspace}}
\def\breton@punctuation{%
- \frenchspacing%
\XeTeXinterchartokenstate=1%
\XeTeXcharclass `\! \breton@punctthin
\XeTeXcharclass `\? \breton@punctthin
@@ -3486,10 +4241,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\XeTeXcharclass `\: \breton@punctthick
\XeTeXinterchartoks \z@ \breton@punctthin = \breton@punctthinspace
\XeTeXinterchartoks \z@ \breton@punctthick = \breton@punctthickspace
- }
+}
\def\nobreton@punctuation{%
- \nonfrenchspacing%
+ \XeTeXcharclass `\! \z@
+ \XeTeXcharclass `\? \z@
+ \XeTeXcharclass `\; \z@
+ \XeTeXcharclass `\: \z@
\XeTeXinterchartokenstate=0%
}
@@ -3525,10 +4283,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Gouere\or Eost\or Gwengolo\or Here\or Du\or Kerzu\fi
\space\number\year}}
-\def\breton@language{\language=\l@breton}
-
-\setlocalhyphenmins{breton}{2}{2}
-
\def\noextras@breton{%
\nobreton@punctuation%
}
@@ -3552,11 +4306,16 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-bulgarian.ldf}[polyglossia: module for bulgarian]
\makeatletter
-
-\ifx\l@bulgarian\@undefined%
- \xpg@nopatterns{Bulgarian}%
- \adddialect\l@bulgarian\l@nohyphenation%
-\fi
+\PolyglossiaSetup{bulgarian}{
+ script=Cyrillic,
+ scripttag=cyrl,
+ langtag=BGR,
+ hyphennames={bulgarian},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup
+ %TODO localalph=bulgarian@alph
+}
\def\bulgarian@Alph#1{%
\ifcase#1\or
@@ -3631,46 +4390,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\todayRoman{\number\day.\,\month@Roman.\,\number\year~г.}%
}
-\def\bulgarian@language{\language=\l@bulgarian}
-
-\def\bulgarian@font{%
- \@ifundefined{bulgarianfont}{%
- \@ifundefined{cyrillicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{cyrl}%
- \if@tempswa
- \addfontfeature{Script=Cyrillic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Cyrillic script!^^J
- Please define \string\cyrillicfont\space or \string\bulgarianfont\space with \string\newfontfamily}%
- \fi
- \zf@check@ot@lang{BGR}%
- \if@tempswa\addfontfeature{Language=Bulgarian}\fi
- }%
- {\cyrillicfont%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{BGR}%
- \if@tempswa\addfontfeature{Language=Bulgarian}\fi
- }}%
- {\bulgarianfont}%
-}
-
-\setlocalhyphenmins{bulgarian}{2}{2}%
-
-\def\noextras@bulgarian{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@bulgarian{%
- \frenchspacing%
- }
-
-\def\inlineextras@bulgarian{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-bulgarian.ldf>
@@ -3682,12 +4401,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan]
\makeatletter
-\def\catalan@font{\selectfontfamilylatin}
-
-\ifx\l@catalan\@undefined%
- \xpg@nopatterns{Catalan}%
- \adddialect\l@catalan\l@nohyphenation%
-\fi
+\PolyglossiaSetup{catalan}{
+ hyphennames={catalan},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
\ifsystem@babelshorthands
@@ -3796,22 +4516,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
de novembre\or de desembre\fi
\space de~\number\year}}
-\def\catalan@language{\language=\l@catalan}
-
-\setlocalhyphenmins{catalan}{2}{2}
-
\def\noextras@catalan{%
- \nonfrenchspacing%
\nocatalan@shorthands%
}
\def\blockextras@catalan{%
- \frenchspacing%
\ifcatalan@babelshorthands\catalan@shorthands\fi%
}
\def\inlineextras@catalan{%
- \frenchspacing%
\ifcatalan@babelshorthands\catalan@shorthands\fi%
}
% \end{macrocode}
@@ -3825,11 +4538,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-coptic.ldf}[polyglossia: module for coptic]
\makeatletter
-
-\ifx\l@coptic\@undefined%
- \xpg@nopatterns{Coptic}%
- \adddialect\l@coptic\l@nohyphenation%
-\fi
+\PolyglossiaSetup{coptic}{
+ script=Coptic,
+ direction=RL,
+ scripttag=copt,
+ langtag=COP,
+ hyphennames={coptic},
+ hyphenmins={2,2},
+ fontsetup=true
+}
%\def\captionscoptic{%
% \def\refname{<++>}%
@@ -3859,31 +4576,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \def\today{<++>}%
% }
-\def\coptic@language{\language=\l@coptic}
-
-\def\coptic@font{%
- \@ifundefined{copticfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{copt}%
- \if@tempswa
- \addfontfeature{Script=Coptic}%
- \zf@check@ot@lang{COP}%
- \if@tempswa\addfontfeature{Language=Coptic}\fi
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Coptic script!^^J
- Please define \string\copticfont\space with \string\newfontfamily}%
- \fi}%
- {\copticfont}%
-}
-
-\def\selectnormalfontcoptic{%
- \let\normalfont=\coptic@font%
- \def\reset@font{\normalfont}}
-
-\setlocalhyphenmins{coptic}{2}{2}
-
% \end{macrocode}
% \iffalse
%</gloss-coptic.ldf>
@@ -3895,12 +4587,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-croatian.ldf}[polyglossia: module for croatian]
\makeatletter
-\def\croatian@font{\selectfontfamilylatin}
-
-\ifx\l@croatian\@undefined%
- \xpg@nopatterns{Croatian}%
- \adddialect\l@croatian\l@nohyphenation%
-\fi
+\PolyglossiaSetup{croatian}{
+ hyphennames={croatian},
+ hyphenmins={2,2},
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionscroatian{%
\def\refname{Literatura}%
@@ -3915,7 +4607,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\indexname{Indeks}%
\def\figurename{Slika}%
\def\tablename{Tablica}%
- \def\partname{Deo}% <<< CHECK (taken from Serbian)
+ \def\partname{Dio}%
\def\pagename{Stranica}%
\def\seename{Vidjeti}%
\def\alsoname{Vidjeti i}%
@@ -3931,10 +4623,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenog\or
prosinca\fi \space \number\year.}}
-\def\croatian@language{\language=\l@croatian}
-
-\setlocalhyphenmins{croatian}{2}{2}
-
% \end{macrocode}
% \iffalse
%</gloss-croatian.ldf>
@@ -3946,12 +4634,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-czech.ldf}[polyglossia: module for czech]
\makeatletter
-\def\czech@font{\selectfontfamilylatin}
-
-\ifx\l@czech\@undefined%
- \xpg@nopatterns{Czech}%
- \adddialect\l@czech\l@nohyphenation%
-\fi
+\PolyglossiaSetup{czech}{
+ hyphennames={czech},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsczech{%
\def\refname{Reference}%
@@ -3984,22 +4672,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
října\or listopadu\or prosince\fi
\space \number\year}}
-\def\czech@language{\language=\l@czech}
-
-\setlocalhyphenmins{czech}{2}{2}%
-
-\def\noextras@czech{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@czech{%
- \frenchspacing%
- }
-
-\def\inlineextras@czech{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-czech.ldf>
@@ -4011,12 +4683,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-danish.ldf}[polyglossia: module for danish]
\makeatletter
-\def\danish@font{\selectfontfamilylatin}
-
-\ifx\l@danish\@undefined
- \xpg@nopatterns{Danish}
- \adddialect\l@danish\l@nohyphenation
-\fi
+\PolyglossiaSetup{danish}{
+ hyphennames={danish},
+ hyphenmins={2,3},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsdanish{%
\def\prefacename{Forord}%
@@ -4045,23 +4717,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
juli\or august\or september\or oktober\or november\or december\fi
\space\number\year}
-\def\danish@language{%
- \language=\l@danish}
-
-\setlocalhyphenmins{danish}{2}{3}%
-
-\def\noextras@danish{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@danish{%
- \frenchspacing%
- }
-
-\def\inlineextras@danish{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-danish.ldf>
@@ -4074,13 +4729,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ProvidesFile{gloss-divehi.ldf}[polyglossia: module for divehi]
\RequirePackage{bidi}
\makeatletter
-
-\ifx\l@divehi\@undefined%
- %\xpg@nopatterns{Divehi}%
- \adddialect\l@divehi\l@nohyphenation%
-\fi
-
-\def\divehi@RL{\relax}
+\PolyglossiaSetup{divehi}{
+ script=Thaana,
+ scripttag=thaa,
+ direction=RL,
+ hyphennames={nohyphenation},
+ fontsetup=true
+}
%\def\captionsdivehi{%
% \def\refname{<++>}%
@@ -4108,34 +4763,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% }
%\def\datedivehi{\def\today{<++>}}
-\def\divehi@language{\language=\l@divehi}
-
-\def\divehi@font{%
- \@ifundefined{divehifont}{%
- \@ifundefined{thaanafont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{thaa}%
- \if@tempswa
- \addfontfeature{Script=Thaana}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Thaana script!^^J
- Please define \string\thaanafont\space or \string\divehifont\space with \string\newfontfamily}%
- \fi
- }%
- {\thaanafont}}%
- {\divehifont}%
-}
-
-\def\selectnormalfontdivehi{%
- \let\normalfont=\divehi@font%
- \let\rmfamily=\divehi@font%
- % TODO add setup to define Sans and Mono fonts if desired
- \let\sffamily=\divehi@font%
- \let\ttfamily=\divehi@font%
- \def\reset@font{\normalfont}}
-
\def\blockextras@divehi{%
\let\@@MakeUppercase\MakeUppercase%
\def\MakeUppercase##1{##1}%
@@ -4155,19 +4782,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-dutch.ldf}[polyglossia: module for dutch]
\makeatletter
-\def\dutch@font{\selectfontfamilylatin}
-
-\ifx\l@dutch\@undefined
- \xpg@nopatterns{Dutch}
- \adddialect\l@dutch\l@nohyphenation
-\fi
-
-\def\dutch@punctuation{%
- \frenchspacing%
-}
-
-\def\nodutch@punctuation{%
- \nonfrenchspacing%
+\PolyglossiaSetup{dutch}{
+ hyphennames={dutch},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
}
\define@boolkey{dutch}[dutch@]{babelshorthands}[true]{}
@@ -4229,22 +4848,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
december\fi
\space \number\year}}
-\def\dutch@language{\language=\l@dutch}
-
-\setlocalhyphenmins{dutch}{2}{2}%
-
\def\noextras@dutch{%
- \nodutch@punctuation%
\nodutch@shorthands%
}
\def\blockextras@dutch{%
- \dutch@punctuation%
\ifdutch@babelshorthands\dutch@shorthands\fi%
}
\def\inlineextras@dutch{%
- \dutch@punctuation%
\ifdutch@babelshorthands\dutch@shorthands\fi%
}
@@ -4259,66 +4871,66 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-english.ldf}[polyglossia: module for english]
\makeatletter
-%TODO change to \selectnormalfontlatin in all ldfs
-\def\english@font{\selectfontfamilylatin}
-
-\ifx\l@english\@undefined%
- \ifx\l@USenglish\@undefined%
- \ifx\l@american\@undefined%
- \xpg@nopatterns{English}%
- \adddialect\l@english\l@nohyphenation%
- \else%
- \let\l@english\l@american%
- \fi%
- \else%
- \let\l@english\l@USenglish%
- \fi%
-\fi
-\ifx\l@american\@undefined%
- \let\l@american\l@english%
-\fi
-\ifx\l@british\@undefined%
- \ifx\l@UKenglish\@undefined%
- \adddialect\l@british\l@english%
- \else%
- \let\l@british\l@UKenglish%
- \fi%
-\fi
-
-\def\tmp@us{us}
-\def\tmp@usmax{usmax}
-\def\tmp@uk{uk}
-\def\tmp@british{british}
-\def\tmp@american{american}
-\def\tmp@australian{australian}
-\def\tmp@newzealand{newzealand}
-\def\en@variant{english}
-\def\english@language{\expandafter\protect\expandafter\language=\csname l@\en@variant\endcsname}
-
-\newif\if@ordinalmonthday
-
-\define@key{english}{variant}[american]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@uk\def\en@variant{british}\@ordinalmonthdaytrue%
- \xpg@info{Option: english variant=british}%
- \else\ifx\@tmpa\tmp@british\def\en@variant{british}\@ordinalmonthdaytrue%
- \xpg@info{Option: english variant=british}%
- \else\ifx\@tmpa\tmp@us\def\en@variant{american}\@ordinalmonthdayfalse%
- \xpg@info{Option: english variant=american}%
- \else\ifx\@tmpa\tmp@usmax\def\en@variant{usenglishmax}\@ordinalmonthdayfalse%
- \xpg@info{Option: english variant=american (with additional patterns)}%
- \else\ifx\@tmpa\tmp@australian\def\en@variant{british}\@ordinalmonthdayfalse%
- \xpg@info{Option: english variant=australian}%
- \else\ifx\@tmpa\tmp@newzealand\def\en@variant{british}\@ordinalmonthdayfalse%
- \xpg@info{Option: english variant=newzealand}%
- \fi\fi\fi\fi\fi\fi}
-
-\def\tmp@true{true}
-\define@key{english}{ordinalmonthday}[false]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@true\@ordinalmonthdaytrue%
- \else\@ordinalmonthdayfalse%
- \fi}
+\PolyglossiaSetup{english}{
+ hyphennames={english,american,usenglish,USenglish},
+ hyphenmins={2,3},
+ fontsetup=true,
+}
+
+\newif\if@british@locale
+\@british@localefalse
+\providebool{@british@hyphen}
+\providebool{english@ordinalmonthday}
+
+\define@boolkey{english}[english@]{ordinalmonthday}[true]{}
+
+%% English is a special case in that \l@english is reserved for US English, so
+%% we need to handle it differently
+\define@key{english}{variant}{%
+ %needs to be reset for loop over hyphennames below:
+ \renewcommand*{\do}[1]{%
+ \ifcsdef{l@#1}%
+ {\csletcs{l@english}{l@#1}\listbreak}%
+ {}%
+ }%
+ \ifstrequal{#1}{uk}%
+ {\@british@localetrue
+ \xpg@info{Option: english variant=british}}%
+ {\ifstrequal{#1}{british}%
+ {\@british@localetrue
+ \xpg@info{Option: english variant=british}}%
+ {\ifstrequal{#1}{us}% these patterns are the default so we don't need to reset them
+ {\@british@hyphenfalse\english@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=american}}%
+ {\ifstrequal{#1}{usmax}%
+ {\@british@hyphenfalse\english@ordinalmonthdayfalse
+ \setkeys[xpg@setup]{english}{hyphennames={usenglishmax}}%
+ \xpg@info{Option: english variant=american (with additional patterns)}}%
+ \ifcsundef{l@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}{}%
+ \gdef\english@language{\language=\l@usenglishmax}}%
+ {\ifstrequal{#1}{australian}%
+ {\@british@hyphentrue\english@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=australian}}%
+ {\ifstrequal{#1}{newzealand}%
+ {\@british@hyphentrue\english@ordinalmonthdayfalse
+ \xpg@info{Option: english variant=newzealand}}%
+ {\xpg@warning{Unknown English variant `#1'}}%
+ }}}}%
+ \if@british@locale\@british@hyphentrue\english@ordinalmonthdaytrue\fi
+ \if@british@hyphen
+ \setkeys[xpg@setup]{english}{hyphennames={ukenglish,british,UKenglish}}%
+ \ifcsundef{l@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}{}%
+ \gdef\english@language{\language=\l@ukenglish}%
+ \fi
+ % and we reset \do to its previous definition here:
+ \renewcommand*{\do}[1]{\setotherlanguage{#1}}%
+}
\def\captionsenglish{%
\def\prefacename{Preface}%
@@ -4341,35 +4953,29 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\seename{see}%
\def\alsoname{see also}%
\def\proofname{Proof}%
- }
+}
\def\dateenglish{%
\def\english@day{%
- \if@ordinalmonthday%
- \ifcase\day\or%
- 1st\or 2nd\or 3rd\or 4th\or 5th\or%
- 6th\or 7th\or 8th\or 9th\or 10th\or%
- 11th\or 12th\or 13th\or 14th\or 15th\or%
- 16th\or 17th\or 18th\or 19th\or 20th\or%
- 21st\or 22nd\or 23rd\or 24th\or 25th\or%
- 26th\or 27th\or 28th\or 29th\or 30th\or%
- 31st\fi%
+ \ifenglish@ordinalmonthday
+ \ifcase\day\or
+ 1st\or 2nd\or 3rd\or 4th\or 5th\or
+ 6th\or 7th\or 8th\or 9th\or 10th\or
+ 11th\or 12th\or 13th\or 14th\or 15th\or
+ 16th\or 17th\or 18th\or 19th\or 20th\or
+ 21st\or 22nd\or 23rd\or 24th\or 25th\or
+ 26th\or 27th\or 28th\or 29th\or 30th\or
+ 31st\fi
\else\number\day\fi}%
+ \def\english@month{\ifcase\month\or
+ January\or February\or March\or April\or May\or June\or
+ July\or August\or September\or October\or November\or December\fi}%
\def\today{%
- \ifx\en@variant\tmp@british%
- \english@day\space%
- \ifcase\month\or%
- January\or February\or March\or April\or May\or June\or%
- July\or August\or September\or October\or November\or December\fi%
- \space\number\year%
- \else%
- \ifcase\month\or%
- January\or February\or March\or April\or May\or June\or%
- July\or August\or September\or October\or November\or December\fi%
- \space\english@day, \number\year%
- \fi}%
- }
-
-%\setlocalhyphenmins{english}{2}{3}% this is the default in babel
+ \if@british@locale
+ \english@day\space\english@month\space\number\year
+ \else
+ \english@month\space\english@day, \number\year
+ \fi}
+}
% \end{macrocode}
% \iffalse
@@ -4382,12 +4988,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-esperanto.ldf}[polyglossia: module for esperanto]
\makeatletter
-\def\esperanto@font{\selectfontfamilylatin}
-
-\ifx\l@esperanto\@undefined%
- \xpg@nopatterns{Esperanto}%
- \adddialect\l@esperanto\l@nohyphenation%
-\fi
+\PolyglossiaSetup{esperanto}{
+ hyphennames={esperanto},
+ hyphenmins={2,2},
+ fontsetup=true,
+ %TODO localalph={esperanto@alph,esperanto@Alph}
+}
\def\captionsesperanto{%
\def\refname{Citaĵoj}%
@@ -4434,8 +5040,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
P\or R\or S\or Ŝ\or T\or U\or Ŭ\or V\or Z\else\xpg@ill@value{#1}{esperanto@Alph}\fi}%
\def\esperanto@numbers{%
- \let\latin@Alph\@Alph%
- \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
\let\@Alph\esperanto@Alph%
\let\@alph\esperanto@alph%
}
@@ -4445,10 +5051,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\let\@alph\latin@alph%
}
-\def\esperanto@language{\language=\l@esperanto}
-
-\setlocalhyphenmins{esperanto}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-esperanto.ldf>
@@ -4460,12 +5062,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-estonian.ldf}[polyglossia: module for estonian]
\makeatletter
-\def\estonian@font{\selectfontfamilylatin}
-
-\ifx\l@estonian\@undefined%
- \xpg@nopatterns{Estonian}%
- \adddialect\l@estonian\l@nohyphenation%
-\fi
+\PolyglossiaSetup{estonian}{
+ hyphennames={estonian},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsestonian{%
\def\refname{Viited}%
@@ -4497,22 +5099,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
juuli\or august\or september\or oktoober\or november\or
detsember\fi\space\number\year.\space a.}}
-\def\estonian@language{\language=\l@estonian}
-
-\setlocalhyphenmins{estonian}{2}{2}%
-
-\def\noextras@estonian{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@estonian{%
- \frenchspacing%
- }
-
-\def\inlineextras@estonian{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-estonian.ldf>
@@ -4528,13 +5114,14 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\RequirePackage{farsical}
\RequirePackage{hijrical}
\makeatletter
-
-\ifx\l@farsi\@undefined
- %\xpg@nopatterns{Farsi}%
- \adddialect\l@farsi\l@nohyphenation
-\fi
-
-\def\farsi@RL{\relax}
+\PolyglossiaSetup{farsi}{
+ script=Arabic,
+ direction=RL,
+ scripttag=arab,
+ langtag=FAR,
+ hyphennames={nohyphenation},
+ fontsetup=true
+}
\newif\if@western@numerals
\def\tmp@western{western}
@@ -4639,66 +5226,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
}
-\def\farsi@language{\language=\l@farsi}
-
-\def\farsi@font{%
- \@ifundefined{farsifont}{%
- \@ifundefined{arabicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{arab}%
- \if@tempswa
- \addfontfeature{Script=Arabic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Arabic script!^^J
- Please define \string\arabicfont\space or \string\farsifont\space with \newfontfamily}%
- \fi
- \zf@check@ot@lang{FAR}%
- \if@tempswa\addfontfeature{Language=Farsi}\fi}%
- {\arabicfont%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{FAR}%
- \if@tempswa\addfontfeature{Language=Farsi}\fi}%
- }%
- {\farsifont}%
-}
-
-% TODO add setup to define Sans and Mono Arabic fonts if desired
-\def\farsi@font@sf{%
- \@ifundefined{farsifontsf}{%
-% \sffamily% FIXME
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa
-% \addfontfeature{Script=Arabic}%
-% \else
- \farsi@font%
-% \fi
- }%
- {\farsifontsf}%
-}
-\def\farsi@font@tt{%
- \@ifundefined{farsifonttt}{%
-% \ttfamily% FIXME
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa
-% \addfontfeature{Script=Arabic}%
-% \else
- \farsi@font%
-% \fi
- }%
- {\farsifonttt}%
-}
-
-\def\selectnormalfontfarsi{%
- \let\normalfont=\farsi@font%
- \let\rmfamily=\farsi@font%
- \let\sffamily=\farsi@font@sf%
- \let\ttfamily=\farsi@font@tt%
- \def\reset@font{\normalfont}}
-
\def\blockextras@farsi{%
\let\@@MakeUppercase\MakeUppercase%
\def\MakeUppercase##1{##1}%
@@ -4717,12 +5244,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-finnish.ldf}[polyglossia: module for finnish]
\makeatletter
-\def\finnish@font{\selectfontfamilylatin}
-
-\ifx\l@finnish\@undefined%
- \xpg@nopatterns{Finnish}%
- \adddialect\l@finnish\l@nohyphenation%
-\fi
+\PolyglossiaSetup{finnish}{
+ hyphennames={finnish},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsfinnish{%
\def\refname{Viitteet}%
@@ -4755,22 +5282,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
syyskuuta\or lokakuuta\or marraskuuta\or joulukuuta\fi
\space\number\year}}
-\def\finnish@language{\language=\l@finnish}
-
-\setlocalhyphenmins{finnish}{2}{2}%
-
-\def\noextras@finnish{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@finnish{%
- \frenchspacing%
- }
-
-\def\inlineextras@finnish{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-finnish.ldf>
@@ -4782,12 +5293,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]
\makeatletter
-\def\french@font{\selectfontfamilylatin}
-\ifx\l@french\@undefined%
- \xpg@nopatterns{French}%
- \adddialect\l@french\l@nohyphenation%
-\fi
+\PolyglossiaSetup{french}{%
+ language=French,
+ script=Latin,
+ hyphennames={french,francais},
+ frenchspacing=true,
+ indentfirst=true,
+ hyphenmins={2,2},
+ fontsetup=true}
\newXeTeXintercharclass\french@punctthin % ! ? ; et autres
\newXeTeXintercharclass\french@punctthick % :
@@ -4798,7 +5312,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\xpg@nospace#1{#1}
\def\french@punctuation{%
- \frenchspacing
\lccode"2019="2019
\XeTeXinterchartokenstate=1
\XeTeXcharclass `\! \french@punctthin
@@ -4829,7 +5342,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\nofrench@punctuation{%
- \nonfrenchspacing
\lccode"2019=\z@
\XeTeXcharclass `\! \z@
\XeTeXcharclass `\? \z@
@@ -4885,18 +5397,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
décembre\fi
\space \number\year}}
-\def\french@language{\language=\l@french}
-
-\setlocalhyphenmins{french}{2}{2}%
-
\def\noextras@french{%
\nofrench@punctuation%
- \nofrench@indent%
}
\def\blockextras@french{%
\french@punctuation%
- \french@indent%
}
\def\inlineextras@french{%
@@ -4914,12 +5420,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-galician.ldf}[polyglossia: module for galician]
\makeatletter
-\def\galician@font{\selectfontfamilylatin}
-
-\ifx\l@galician\@undefined%
- \xpg@nopatterns{Galician}%
- \adddialect\l@galician\l@nohyphenation%
-\fi
+\PolyglossiaSetup{galician}{
+ hyphennames={galician},
+ hyphenmins={2,2},
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsgalician{%
\def\refname{Referencias}%
@@ -4951,10 +5457,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
xullo\or agosto\or setembro\or outubro\or novembro\or decembro\fi
\space de~\number\year}}
-\def\galician@language{\language=\l@galician}
-
-\setlocalhyphenmins{galician}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-galician.ldf>
@@ -4966,48 +5468,45 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-german.ldf}[polyglossia: module for german]
\makeatletter
-\def\german@font{\selectfontfamilylatin}
+\PolyglossiaSetup{german}{
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\tmp@old{old}
\def\tmp@oldyr{1901}
\newif\if@german@oldspelling
\@german@oldspellingfalse
\define@key{german}{spelling}[new]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@old%
- \ifx\l@german\@undefined%
- \xpg@nopatterns{german}%
- \adddialect\l@german\l@nohyphenation%
- \fi%
- \@german@oldspellingtrue%
- \else%
- \ifx\@tmpa\tmp@oldyr%
- \ifx\l@german\@undefined%
- \xpg@nopatterns{german}%
- \adddialect\l@german\l@nohyphenation%
- \fi%
- \@german@oldspellingtrue%
- \else%
- \ifx\l@ngerman\@undefined%
- \ifx\l@german\@undefined%
- \xpg@nopatterns{ngerman}%
- \adddialect\l@ngerman\l@nohyphenation%
- \else%
- \xpg@warning{You asked for `ngerman' but only `german' hyphenation is available!}%
- \@german@oldspellingtrue%
- \fi%
- \else%
- \@german@oldspellingfalse
- \fi%
- \fi%
- \fi%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@oldyr\def\@tmpa{old}\fi
+ \ifx\@tmpa\tmp@old
+ \ifx\l@german\@undefined
+ \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
+ \xpg@warning{You asked for `ngerman' but only `german' hyphenation is available!}%
+ \@german@oldspellingtrue
+ \fi
+ \else %we use ngerman
+ \@german@oldspellingfalse
+ \fi
+ \fi
}
\newif\if@german@fraktur
\def\tmp@fraktur{fraktur}
\define@key{german}{script}[latin]{%
\def\@tmpa{#1}%
- \ifx\@tmpa\tmp@fraktur\@german@frakturtrue\else%
+ \ifx\@tmpa\tmp@fraktur\@german@frakturtrue\else
\@german@frakturfalse%
\fi}
@@ -5098,7 +5597,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\space \ifcase\month%TODO add option for Austrian forms (Jänner etc)
\or Januar\or Februar\or März\or April\or Mai\or Juni\or%
Juli\or August\or September\or Oktober\or November\or%
- Dezember\fi%
+ Dezember\fi
\space \number\year}%
}
@@ -5116,36 +5615,31 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\space \ifcase\month%TODO add option for Austrian forms (Jänner etc)
\or Januar\or Februar\or März\or April\or Mai\or Juni\or%
Juli\or Auguſt\or September\or Oktober\or November\or%
- Dezember\fi%
+ Dezember\fi
\space \number\year}%
}
\def\captionsgerman{%
- \if@german@fraktur\captions@german@fraktur\else\captions@german\fi%
+ \if@german@fraktur\captions@german@fraktur\else\captions@german\fi
}
\def\dategerman{%
- \if@german@fraktur\date@german@fraktur\else\date@german\fi%
+ \if@german@fraktur\date@german@fraktur\else\date@german\fi
}
\def\german@language{\language=%
\csname l@\if@german@oldspelling\else n\fi german\ifgerman@latesthyphen -x-latest\fi\endcsname}
-\setlocalhyphenmins{german}{2}{2}%
-
\def\noextras@german{%
- \nonfrenchspacing%
\nogerman@shorthands%
}
\def\blockextras@german{%
- \frenchspacing%
- \ifgerman@babelshorthands\german@shorthands\fi%
+ \ifgerman@babelshorthands\german@shorthands\fi
}
\def\inlineextras@german{%
- \frenchspacing%
- \ifgerman@babelshorthands\german@shorthands\fi%
+ \ifgerman@babelshorthands\german@shorthands\fi
}
% \end{macrocode}
@@ -5159,336 +5653,41 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek]
\makeatletter
+\PolyglossiaSetup{greek}{
+ script=Greek,
+ scripttag=grek,
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+ %TODO localalph={greek@alph,greek@Alph}
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The code in this file was initially adapted from the antomega
%% module for greek. Currently large parts of it derive from the
%% package xgreek.sty (c) Apostolos Syropoulos
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% the following fixes are taken verbatim from xgreek.sty:
-\global\lccode"0386="03AC \global\uccode"0386="0391
-\global\lccode"0388="03AD \global\uccode"0388="0395
-\global\lccode"0389="03AC \global\uccode"0389="0397
-\global\lccode"038A="03AF \global\uccode"038A="0399
-\global\lccode"038C="03CC \global\uccode"038C="039F
-\global\lccode"038E="03CD \global\uccode"038E="03A5
-\global\lccode"038F="03CE \global\uccode"038F="03A9
-\global\lccode"0390="0390 \global\uccode"0390="03AA
-\global\lccode"0391="03B1 \global\uccode"0391="0391
-\global\lccode"0392="03B2 \global\uccode"0392="0392
-\global\lccode"0393="03B3 \global\uccode"0393="0393
-\global\lccode"0394="03B4 \global\uccode"0394="0394
-\global\lccode"0395="03B5 \global\uccode"0395="0395
-\global\lccode"0396="03B6 \global\uccode"0396="0396
-\global\lccode"0397="03B7 \global\uccode"0397="0397
-\global\lccode"0398="03B8 \global\uccode"0398="0398
-\global\lccode"0399="03B9 \global\uccode"0399="0399
-\global\lccode"039A="03BA \global\uccode"039A="039A
-\global\lccode"039B="03BB \global\uccode"039B="039B
-\global\lccode"039C="03BC \global\uccode"039C="039C
-\global\lccode"039D="03BD \global\uccode"039D="039D
-\global\lccode"039E="03BE \global\uccode"039E="039E
-\global\lccode"039F="03BF \global\uccode"039F="039F
-\global\lccode"03A0="03C0 \global\uccode"03A0="03A0
-\global\lccode"03A1="03C1 \global\uccode"03A1="03A1
-\global\lccode"03A3="03C3 \global\uccode"03A3="03A3
-\global\lccode"03A4="03C4 \global\uccode"03A4="03A4
-\global\lccode"03A5="03C5 \global\uccode"03A5="03A5
-\global\lccode"03A6="03C6 \global\uccode"03A6="03A6
-\global\lccode"03A7="03C7 \global\uccode"03A7="03A7
-\global\lccode"03A8="03C8 \global\uccode"03A8="03A8
-\global\lccode"03A9="03C9 \global\uccode"03A9="03A9
-\global\lccode"03AA="03CA \global\uccode"03AA="03AA
-\global\lccode"03AB="03CB \global\uccode"03AB="03AB
-\global\lccode"03AC="03AC \global\uccode"03AC="0391
-\global\lccode"03AD="03AD \global\uccode"03AD="0395
-\global\lccode"03AE="03AE \global\uccode"03AE="0397
-\global\lccode"03AF="03AF \global\uccode"03AF="0399
-\global\lccode"03B0="03B0 \global\uccode"03B0="03AB
-\global\lccode"03B1="03B1 \global\uccode"03B1="0391
-\global\lccode"03B2="03B2 \global\uccode"03B2="0392
-\global\lccode"03B3="03B3 \global\uccode"03B3="0393
-\global\lccode"03B4="03B4 \global\uccode"03B4="0394
-\global\lccode"03B5="03B5 \global\uccode"03B5="0395
-\global\lccode"03B6="03B6 \global\uccode"03B6="0396
-\global\lccode"03B7="03B7 \global\uccode"03B7="0397
-\global\lccode"03B8="03B8 \global\uccode"03B8="0398
-\global\lccode"03B9="03B9 \global\uccode"03B9="0399
-\global\lccode"03BA="03BA \global\uccode"03BA="039A
-\global\lccode"03BB="03BB \global\uccode"03BB="039B
-\global\lccode"03BC="03BC \global\uccode"03BC="039C
-\global\lccode"03BD="03BD \global\uccode"03BD="039D
-\global\lccode"03BE="03BE \global\uccode"03BE="039E
-\global\lccode"03BF="03BF \global\uccode"03BF="039F
-\global\lccode"03C0="03C0 \global\uccode"03C0="03A0
-\global\lccode"03C1="03C1 \global\uccode"03C1="03A1
-\global\lccode"03C2="03C2 \global\uccode"03C2="03A3
-\global\lccode"03C3="03C3 \global\uccode"03C3="03A3
-\global\lccode"03C4="03C4 \global\uccode"03C4="03A4
-\global\lccode"03C5="03C5 \global\uccode"03C5="03A5
-\global\lccode"03C6="03C6 \global\uccode"03C6="03A6
-\global\lccode"03C7="03C7 \global\uccode"03C7="03A7
-\global\lccode"03C8="03C8 \global\uccode"03C8="03A8
-\global\lccode"03C9="03C9 \global\uccode"03C9="03A9
-\global\lccode"03CA="03CA \global\uccode"03CA="03AA
-\global\lccode"03CB="03CB \global\uccode"03CB="03AB
-\global\lccode"03CC="03CC \global\uccode"03CC="039F
-\global\lccode"03CD="03CD \global\uccode"03CD="03A5
-\global\lccode"03CE="03CE \global\uccode"03CE="03A9
-\global\lccode"03D0="03D0 \global\uccode"03D0="0392
-\global\lccode"03D1="03D1 \global\uccode"03D1="0398
-\global\lccode"03D2="03C5 \global\uccode"03D2="03A5
-\global\lccode"03D3="03CD \global\uccode"03D3="03A5
-\global\lccode"03D4="03CB \global\uccode"03D4="03AB
-\global\lccode"03D5="03C6 \global\uccode"03D5="03A6
-\global\lccode"03D6="03C0 \global\uccode"03D6="03A0
-\global\lccode"03DA="03DB \global\uccode"03DA="03DA
-\global\lccode"03DB="03DB \global\uccode"03DB="03DA
-\global\lccode"03DC="03DD \global\uccode"03DC="03DC
-\global\lccode"03DD="03DD \global\uccode"03DD="03DC
-\global\lccode"03DE="03DF \global\uccode"03DE="03DE
-\global\lccode"03DF="03DF \global\uccode"03DF="03DE
-\global\lccode"03E0="03E1 \global\uccode"03E0="039A
-\global\lccode"03E0="03E1 \global\uccode"03E1="03A1
-\global\lccode"03F0="03BA \global\uccode"03F0="039A
-\global\lccode"03F1="03C1 \global\uccode"03F1="03A1
-\global\lccode"03F2="03F2 \global\uccode"03F2="03F9
-\global\lccode"03F9="03F2 \global\uccode"03F9="03F9
-\global\lccode"1F00="1F00 \global\uccode"1F00="0391
-\global\lccode"1F01="1F01 \global\uccode"1F01="0391
-\global\lccode"1F02="1F02 \global\uccode"1F02="0391
-\global\lccode"1F03="1F03 \global\uccode"1F03="0391
-\global\lccode"1F04="1F04 \global\uccode"1F04="0391
-\global\lccode"1F05="1F05 \global\uccode"1F05="0391
-\global\lccode"1F06="1F06 \global\uccode"1F06="0391
-\global\lccode"1F07="1F07 \global\uccode"1F07="0391
-\global\lccode"1F08="1F00 \global\uccode"1F08="0391
-\global\lccode"1F09="1F01 \global\uccode"1F09="0391
-\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391
-\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391
-\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391
-\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391
-\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391
-\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391
-\global\lccode"1F10="1F10 \global\uccode"1F10="0395
-\global\lccode"1F11="1F11 \global\uccode"1F11="0395
-\global\lccode"1F12="1F12 \global\uccode"1F12="0395
-\global\lccode"1F13="1F13 \global\uccode"1F13="0395
-\global\lccode"1F14="1F14 \global\uccode"1F14="0395
-\global\lccode"1F15="1F15 \global\uccode"1F15="0395
-\global\lccode"1F18="1F10 \global\uccode"1F18="0395
-\global\lccode"1F19="1F11 \global\uccode"1F19="0395
-\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395
-\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395
-\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395
-\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395
-\global\lccode"1F20="1F20 \global\uccode"1F20="0397
-\global\lccode"1F21="1F21 \global\uccode"1F21="0397
-\global\lccode"1F22="1F22 \global\uccode"1F22="0397
-\global\lccode"1F23="1F23 \global\uccode"1F23="0397
-\global\lccode"1F24="1F24 \global\uccode"1F24="0397
-\global\lccode"1F25="1F25 \global\uccode"1F25="0397
-\global\lccode"1F26="1F26 \global\uccode"1F26="0397
-\global\lccode"1F27="1F27 \global\uccode"1F27="0397
-\global\lccode"1F28="1F20 \global\uccode"1F28="0397
-\global\lccode"1F29="1F21 \global\uccode"1F29="0397
-\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397
-\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397
-\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397
-\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397
-\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397
-\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397
-\global\lccode"1F30="1F30 \global\uccode"1F30="0399
-\global\lccode"1F31="1F31 \global\uccode"1F31="0399
-\global\lccode"1F32="1F32 \global\uccode"1F32="0399
-\global\lccode"1F33="1F33 \global\uccode"1F33="0399
-\global\lccode"1F34="1F34 \global\uccode"1F34="0399
-\global\lccode"1F35="1F35 \global\uccode"1F35="0399
-\global\lccode"1F36="1F36 \global\uccode"1F36="0399
-\global\lccode"1F37="1F37 \global\uccode"1F37="0399
-\global\lccode"1F38="1F30 \global\uccode"1F38="0399
-\global\lccode"1F39="1F31 \global\uccode"1F39="0399
-\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399
-\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399
-\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399
-\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399
-\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399
-\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399
-\global\lccode"1F40="1F40 \global\uccode"1F40="039F
-\global\lccode"1F41="1F41 \global\uccode"1F41="039F
-\global\lccode"1F42="1F42 \global\uccode"1F42="039F
-\global\lccode"1F43="1F43 \global\uccode"1F43="039F
-\global\lccode"1F44="1F44 \global\uccode"1F44="039F
-\global\lccode"1F45="1F45 \global\uccode"1F45="039F
-\global\lccode"1F48="1F40 \global\uccode"1F48="039F
-\global\lccode"1F49="1F41 \global\uccode"1F49="039F
-\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F
-\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F
-\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F
-\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F
-\global\lccode"1F50="1F50 \global\uccode"1F50="03A5
-\global\lccode"1F51="1F51 \global\uccode"1F51="03A5
-\global\lccode"1F52="1F52 \global\uccode"1F52="03A5
-\global\lccode"1F53="1F53 \global\uccode"1F53="03A5
-\global\lccode"1F54="1F54 \global\uccode"1F54="03A5
-\global\lccode"1F55="1F55 \global\uccode"1F55="03A5
-\global\lccode"1F56="1F56 \global\uccode"1F56="03A5
-\global\lccode"1F57="1F57 \global\uccode"1F57="03A5
-\global\lccode"1F59="1F51 \global\uccode"1F59="03A5
-\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5
-\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5
-\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5
-\global\lccode"1F60="1F60 \global\uccode"1F60="03A9
-\global\lccode"1F61="1F61 \global\uccode"1F61="03A9
-\global\lccode"1F62="1F62 \global\uccode"1F62="03A9
-\global\lccode"1F63="1F63 \global\uccode"1F63="03A9
-\global\lccode"1F64="1F64 \global\uccode"1F64="03A9
-\global\lccode"1F65="1F65 \global\uccode"1F65="03A9
-\global\lccode"1F66="1F66 \global\uccode"1F66="03A9
-\global\lccode"1F67="1F67 \global\uccode"1F67="03A9
-\global\lccode"1F68="1F60 \global\uccode"1F68="03A9
-\global\lccode"1F69="1F61 \global\uccode"1F69="03A9
-\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9
-\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9
-\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9
-\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9
-\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9
-\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9
-\global\lccode"1F70="1F70 \global\uccode"1F70="0391
-\global\lccode"1F71="1F71 \global\uccode"1F71="0391
-\global\lccode"1F72="1F72 \global\uccode"1F72="0395
-\global\lccode"1F73="1F73 \global\uccode"1F73="0395
-\global\lccode"1F74="1F74 \global\uccode"1F74="0397
-\global\lccode"1F75="1F75 \global\uccode"1F75="0397
-\global\lccode"1F76="1F76 \global\uccode"1F76="0399
-\global\lccode"1F77="1F77 \global\uccode"1F77="0399
-\global\lccode"1F78="1F78 \global\uccode"1F78="039F
-\global\lccode"1F79="1F79 \global\uccode"1F79="039F
-\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5
-\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5
-\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9
-\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9
-\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC
-\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC
-\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC
-\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC
-\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC
-\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC
-\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC
-\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC
-\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC
-\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC
-\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC
-\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC
-\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC
-\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC
-\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC
-\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC
-\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC
-\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC
-\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC
-\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC
-\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC
-\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC
-\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC
-\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC
-\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC
-\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC
-\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC
-\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC
-\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC
-\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC
-\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC
-\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC
-\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC
-\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC
-\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC
-\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC
-\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC
-\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC
-\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC
-\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC
-\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC
-\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC
-\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC
-\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC
-\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC
-\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC
-\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC
-\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC
-\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8
-\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9
-\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC
-\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC
-\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC
-\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391
-\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC
-\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8
-\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9
-\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391
-\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391
-\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC
-\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD
-\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC
-\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC
-\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC
-\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397
-\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC
-\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395
-\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395
-\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397
-\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397
-\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC
-\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8
-\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9
-\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA
-\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA
-\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399
-\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA
-\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8
-\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9
-\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399
-\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399
-\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8
-\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9
-\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB
-\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB
-\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1
-\global\lccode"1FE5="1FE5 \global\uccode"1FE5="1FEC
-\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5
-\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB
-\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8
-\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9
-\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5
-\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5
-\global\lccode"1FEC="1FE5 \global\uccode"1FEC="1FEC
-\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC
-\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC
-\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC
-\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9
-\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC
-\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F
-\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F
-\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9
-\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9
-\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC
+% this file imported from xgreek fixes the \lccode and \uccode of Greek letters:
+\input{xgreek-fixes.def}
+%TODO: set these in \define@key instead:
\ifx\l@greek\@undefined
- \ifx\l@polygreek\@undefined
- \xpg@nopatterns{Greek}
- \adddialect\l@greek\l@nohyphenation
- \else
- \let\l@greek\l@polygreek
- \fi
+ \ifx\l@polygreek\@undefined
+ \xpg@nopatterns{Greek}%
+ \adddialect\l@greek\l@nohyphenation
+ \else
+ \let\l@greek\l@polygreek
+ \fi
\fi
\ifx\l@monogreek\@undefined
- \xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
+ \xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
I will use the patterns loaded for \string\l@greek instead}
- \adddialect\l@monogreek\l@greek
+ \adddialect\l@monogreek\l@greek
\fi
\ifx\l@ancientgreek\@undefined
- \xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
+ \xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
I will use the patterns loaded for \string\l@greek instead}
- \adddialect\l@ancientgreek\l@greek
+ \adddialect\l@ancientgreek\l@greek
\fi
%set monotonic as default
@@ -5504,40 +5703,29 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\tmp@ancientgreek{ancientgreek}
\define@key{greek}{variant}[monotonic]{%
-\def\@tmpa{#1}%
-\def\captionsgreek{\polygreekcaptions}%
-\ifx\@tmpa\tmp@polytonic%
- \def\greek@variant{\l@polygreek}%
- \def\captionsgreek{\polygreekcaptions}%
- \def\dategreek{\datepolygreek}%
- \xpg@info{Option: Polytonic Greek}%
-\else%
- \ifx\@tmpa\tmp@poly%
- \def\greek@variant{\l@polygreek}%
- \def\captionsgreek{\polygreekcaptions}%
- \def\dategreek{\datepolygreek}%
- \xpg@info{Option: Polytonic Greek}%
- \else%
- \ifx\@tmpa\tmp@ancient%
- \def\greek@variant{\l@ancientgreek}%
- \def\captionsgreek{\ancientgreekcaptions}%
- \def\dategreek{\dateancientgreek}%
- \xpg@info{Option: Ancient Greek}%
- \else%
- \ifx\@tmpa\tmp@ancientgreek%
- \def\greek@variant{\l@ancientgreek}%
- \def\captionsgreek{\ancientgreekcaptions}%
- \def\dategreek{\dateancientgreek}%
- \xpg@info{Option: Ancient Greek}%
- \else%
- \def\greek@variant{\l@monogreek}% monotonic
- \def\captionsgreek{\monogreekcaptions}%
- \def\dategreek{\datemonogreek}%
- \xpg@info{Option: Monotonic Greek}%
- \fi%
- \fi%
- \fi%
-\fi}
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@poly\def\@tmpa{polytonic}\fi
+ \ifx\@tmpa\tmp@ancientgreek\def\@tmpa{ancient}\fi
+ \ifx\@tmpa\tmp@polytonic%
+ \def\greek@variant{\l@polygreek}%
+ \def\captionsgreek{\polygreekcaptions}%
+ \def\dategreek{\datepolygreek}%
+ \xpg@info{Option: Polytonic Greek}%
+ \else
+ \ifx\@tmpa\tmp@ancient
+ \def\greek@variant{\l@ancientgreek}%
+ \def\captionsgreek{\ancientgreekcaptions}%
+ \def\dategreek{\dateancientgreek}%
+ \xpg@info{Option: Ancient Greek}%
+ \else %monotonic
+ \def\greek@variant{\l@monogreek}% monotonic
+ \def\captionsgreek{\monogreekcaptions}%
+ \def\dategreek{\datemonogreek}%
+ \xpg@info{Option: Monotonic Greek}%
+ \fi
+ \fi}
+
+\def\greek@language{\language=\greek@variant}
\def\tmp@arabic{arabic}
\newif\if@greek@numerals
@@ -5576,6 +5764,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\headtoname{Προς}%
\def\proofname{Απόδειξη}%
\def\glossaryname{Γλωσσάρι}}%
+
\def\datemonogreek{%
\def\today{\number\day\space%
\greek@month%
@@ -5599,6 +5788,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Οκτωβρίου\or
Νοεμβρίου\or
Δεκεμβρίου\fi}}%
+
\def\polygreekcaptions{%
\def\refname{Ἀναφορές}%
\def\abstractname{Περίληψη}%
@@ -5620,6 +5810,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\ccname{Κοινοποίηση}%
\def\headtoname{Πρὸς}%
\def\proofname{Ἀπόδειξη}}%
+
\def\datepolygreek{%
\def\today{\number\day\space%
\greek@month%
@@ -5643,6 +5834,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Ὀκτωβρίου\or
Νοεμβρίου\or
Δεκεμβρίου\fi}}%
+
% this is copied verbatim from xgreek.sty:
\def\ancientgreekcaptions{%
\def\prefacename{Προοίμιον}%
@@ -5670,6 +5862,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\indexname{Εὑρετήριο}%
\def\figurename{Σχῆμα}%
\def\headtoname{Πρὸς}}%
+
\def\dateancientgreek{%
\def\today{\number\day\space%
\greek@month%
@@ -5812,38 +6005,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\let\greek@Alph\@undefined%
}
-\def\greek@language{\language=\greek@variant}
-
-\def\greek@font{%
- \@ifundefined{greekfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{grek}%
- \if@tempswa%
- \addfontfeature{Script=Greek}%
- \else%
- \PackageError{polyglossia}{^^J
- The current font does not contain the Greek script!^^J
- Please define \string\greekfont\space with \string\newfontfamily}%
- \fi%
- }%
- {\greekfont}}
-
-\def\selectnormalfontgreek{%
- \let\normalfont=\greek@font%
- \def\reset@font{\normalfont}}
-
-\setlocalhyphenmins{greek}{2}{2}%
-
-\def\noextras@greek{%
- \nofrench@indent%
- }
-
-\def\blockextras@greek{%
- \frenchspacing%
- \french@indent%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-greek.ldf>
@@ -5858,12 +6019,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\RequirePackage{hebrewcal}
\makeatletter
-\ifx\l@hebrew\@undefined
- %\xpg@nopatterns{Hebrew}%
- \adddialect\l@hebrew\l@nohyphenation
-\fi
-
-\def\hebrew@RL{\relax}
+\PolyglossiaSetup{hebrew}{
+ script=Hebrew,
+ direction=RL,
+ scripttag=hebr,
+ hyphennames={nohyphenation},
+ fontsetup=true,
+ %TODO localalph={hebrewnumeral,Hebrewnumeral}
+ %digits = hebrewnumber
+}
\newif\if@calendar@hebrew
\def\tmp@hebrew{hebrew}
@@ -5937,7 +6101,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\if@hebrew@numerals
\protect\hebrewnumeral{#1}%
\else
- %%\RL{\protect\reset@font\protect\number#1}%
\number#1%
\fi
}
@@ -5963,57 +6126,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
}
-\def\hebrew@language{\language=\l@hebrew}
-
-\def\hebrew@font{%
- \@ifundefined{hebrewfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{hebr}%
- \if@tempswa
- \addfontfeature{Script=Hebrew}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Hebrew script!^^J
- Please define \string\hebrewfont\space with \string\newfontfamily}%
- \fi}%
- {\hebrewfont}%
-}
-
-% TODO add setup to define Sans and Mono Hebrew fonts if desired
-\def\hebrew@font@sf{%
- \@ifundefined{hebrewfontsf}{%
-% \sffamilylatin% FIXME
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa%
-% \addfontfeature{Script=Hebrew}%
-% \else%
- \hebrew@font%
-% \fi%
- }%
- {\hebrewfontsf}%
-}
-\def\hebrew@font@tt{%
- \@ifundefined{hebrewfonttt}{%
-% \ttfamilylatin% FIXME
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa%
-% \addfontfeature{Script=Hebrew}%
-% \else%
- \hebrew@font%
-% \fi%
- }%
- {\hebrewfonttt}%
-}
-\def\selectnormalfonthebrew{%
- \let\normalfont=\hebrew@font%
- \let\rmfamily=\hebrew@font%
- \let\sffamily=\hebrew@font@sf%
- \let\ttfamily=\hebrew@font@tt%
- \def\reset@font{\normalfont}}
-
\def\blockextras@hebrew{%
\let\@@MakeUppercase\MakeUppercase%
\def\MakeUppercase##1{##1}%
@@ -6030,21 +6142,53 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%
% \subsection{gloss-hindi.ldf}
% \begin{macrocode}
-\ProvidesFile{gloss-hindi.ldf}[polyglossia: module for hindi]
% UTF-8 strings kindly provided by Zdenek Wagner, 10-03-2008
% TODO: add option for velthuis transliteration with link to
% Velthuis Devanagari project: http://devnag.sarovar.org.
+
+\ProvidesFile{gloss-hindi.ldf}[polyglossia: module for hindi]
+\RequirePackage{devanagaridigits}
\makeatletter
+\PolyglossiaSetup{hindi}{
+ script=Devanagari,
+ scripttag=deva,
+ langtag=HIN,
+%% hyphennames={hindi,!sanskrit}, TODO: implement fallback patterns (with ! prefix)
+ fontsetup=true
+ %TODO nouppercase=true,
+ %TODO localnumber=hindinumber
+}
\ifx\l@hindi\@undefined%
\ifx\l@sanskrit\@undefined%
\xpg@nopatterns{Hindi}%
\adddialect\l@hindi\l@nohyphenation%
\else
- \let\l@hindi\l@sanskrit%
+ \xpg@warning{No hyphenation patterns were loaded for Hindi\MessageBreak
+ I will use the patterns for Sanskrit instead}
+ \adddialect\l@hindi\l@sanskrit%
\fi
\fi
+\def\hindi@language{\language=\l@hindi}
+
+\def\tmp@western{Western}
+\newif\ifhindi@devanagari@numerals
+\hindi@devanagari@numeralstrue
+
+\define@key{hindi}{numerals}[Devanagari]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@western
+ \hindi@devanagari@numeralsfalse
+ \fi}
+
+\def\hindinumber#1{%
+ \ifhindi@devanagari@numerals
+ \devanagaridigits{\number#1}%
+ \else
+ \number#1%
+ \fi}
+
\def\captionshindi{%
\def\abstractname{सारांश}%
\def\appendixname{परिशिष्ट}%
@@ -6072,62 +6216,29 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\alsoseename{और देखिए}%
}
\def\datehindi{%
- \def\today{\number\day\space\ifcase\month\or
- जनवरी\or
- फ़रवरी\or
- मार्च\or
- अपरैल\or
- मई\or
- जून\or
- जलाई\or
- अगस्त\or
- सितम्बर\or
- अक्तूबर\or
- नवम्बर\or
- दिसम्बर\fi
- \space\number\year}%
+ \def\today{\hindinumber\day\space\ifcase\month\or
+ जनवरी\or
+ फ़रवरी\or
+ मार्च\or
+ अपरैल\or
+ मई\or
+ जून\or
+ जलाई\or
+ अगस्त\or
+ सितम्बर\or
+ अक्तूबर\or
+ नवम्बर\or
+ दिसम्बर\fi
+ \space\hindinumber\year}%
}
-\def\hindi@language{\language=\l@hindi}
-
-\def\hindi@font{%
- \@ifundefined{hindifont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \@ifundefined{devanagarifont}{%
- \zf@check@ot@script{deva}%
- \if@tempswa%
- \addfontfeature{Script=Devanagari}%
- \else%
- \PackageError{polyglossia}{^^J
- The current font does not contain the Devanagari script!^^J
- Please define \string\devanagarifont\space or \string\hindifont\space with \string\newfontfamily}%
- \fi%
- \zf@check@ot@lang{HIN}%
- \if@tempswa\addfontfeature{Language=Hindi}\fi%
- }%
- {\devanagarifont%
- \zf@check@ot@lang{HIN}%
- \if@tempswa\addfontfeature{Language=Hindi}\fi%
- }}%
- {\hindifont}%
-}
-
-\def\selectnormalfonthindi{%
- \let\normalfont=\hindi@font%
- \let\rmfamily=\hindi@font%
- % TODO add setup to define Sans and Mono fonts if desired
- \let\sffamily=\hindi@font%
- \let\ttfamily=\hindi@font%
- \def\reset@font{\normalfont}}
-
\def\blockextras@hindi{%
- \let\@@MakeUppercase\MakeUppercase%
- \def\MakeUppercase##1{##1}%
- }
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+}
\def\noextras@hindi{%
- \let\MakeUppercase\@@MakeUppercase%
- }
+ \let\MakeUppercase\@@MakeUppercase%
+}
% \end{macrocode}
% \iffalse
@@ -6140,12 +6251,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-icelandic.ldf}[polyglossia: module for icelandic]
\makeatletter
-\def\icelandic@font{\selectfontfamilylatin}
-
-\ifx\l@icelandic\@undefined%
- \xpg@nopatterns{Icelandic}%
- \adddialect\l@icelandic\l@nohyphenation%
-\fi
+\PolyglossiaSetup{icelandic}{
+ hyphennames={icelandic},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsicelandic{%
\def\refname{Heimildir}%
@@ -6171,6 +6281,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Sönnun}%
\def\glossaryname{Orðalisti}%
}
+
\def\dateicelandic{%
\def\today{\number\day.~\ifcase\month\or
janúar\or febrúar\or mars\or apríl\or maí\or
@@ -6179,10 +6290,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\space\number\year}%
}
-\def\icelandic@language{\language=\l@icelandic}
-
-\setlocalhyphenmins{icelandic}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-icelandic.ldf>
@@ -6194,11 +6301,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-interlingua.ldf}[polyglossia: module for interlingua]
\makeatletter
-
-\ifx\l@interlingua\@undefined%
- \xpg@nopatterns{Interlingua}%
- \adddialect\l@interlingua\l@nohyphenation%
-\fi
+\PolyglossiaSetup{interlingua}{
+ hyphennames={interlingua},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsinterlingua{%
\def\refname{Referentias}%
@@ -6231,10 +6340,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
decembre\fi
\space \number\year}}
-\def\interlingua@language{\language=\l@interlingua}
-
-\setlocalhyphenmins{interlingua}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-interlingua.ldf>
@@ -6246,12 +6351,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-irish.ldf}[polyglossia: module for irish]
\makeatletter
-\def\irish@font{\selectfontfamilylatin}
-
-\ifx\l@irish\@undefined%
- \xpg@nopatterns{Irish}%
- \adddialect\l@irish\l@nohyphenation%
-\fi
+\PolyglossiaSetup{irish}{
+ hyphennames={irish},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsirish{%
\def\refname{Tagairtí}%
@@ -6287,10 +6391,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Mí na Samhna\or Mí na Nollag\fi
\space \number\year}}
-\def\irish@language{\language=\l@irish}
-
-\setlocalhyphenmins{irish}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-irish.ldf>
@@ -6302,12 +6402,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-italian.ldf}[polyglossia: module for italian]
\makeatletter
-\def\italian@font{\selectfontfamilylatin}
-
-\ifx\l@italian\@undefined
- \xpg@nopatterns{Italian}
- \adddialect\l@italian\l@nohyphenation
-\fi
+\PolyglossiaSetup{italian}{
+ hyphennames={italian},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsitalian{%
\def\prefacename{Prefazione}%
@@ -6336,21 +6437,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\today{\number\day~\ifcase\month\or
gennaio\or febbraio\or marzo\or aprile\or maggio\or giugno\or
luglio\or agosto\or settembre\or ottobre\or novembre\or
- dicembre\fi\space \number\year}
-}
-
-\def\italian@language{\language=\l@italian}
-
-\setlocalhyphenmins{italian}{2}{2}%
+ dicembre\fi\space \number\year}}
\def\noextras@italian{%
- \lccode"2019=0%
- \nofrench@indent}
+ \lccode"2019=\z@
+ }
\def\blockextras@italian{%
\lccode"2019="2019
%TODO ? \clubpenalty3000\widowpenalty3000\finalhyphendemerits50000000 << in Babel
- \french@indent%
}
\def\inlineextras@italian{%
@@ -6360,6 +6455,105 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-italian.ldf>
+%<*gloss-lao.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-lao.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-lao.ldf}[polyglossia: module for Lao]
+\makeatletter
+\PolyglossiaSetup{lao}{
+ script=Lao,
+ scripttag=lao,
+ hyphennames={lao},
+ hyphenmins={1,1},
+ fontsetup=true,
+ %TODO localalph={xxx@alph,xxx@Alph}
+ %TODO localdigits=laonumber
+}
+
+\newif\if@lao@numerals
+\def\tmp@lao{lao}
+\define@key{lao}{numerals}[arabic]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@lao\@lao@numeralstrue\else
+ \@lao@numeralsfalse\fi
+}
+
+\setkeys{lao}{numerals}
+
+% Translations provided by Brian Wilson <bountonw at gmail.com>
+\def\captionslao{%
+ \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\datelao{%
+ \def\lao@month{%
+ \ifcase\month\or
+ ມັງກອນ\or
+ ກຸມພາ\or
+ ມີນາ\or
+ ເມສາ\or
+ ພຶດສະພາ\or
+ ມິຖຸນາ\or
+ ກໍລະກົດ\or
+ ສິງຫາ\or
+ ກັນຍາ\or
+ ຕຸລາ\or
+ ພະຈິກ\or
+ ທັນວາ\fi}%
+ \def\today{\laonumber\day \space \lao@month \space \laonumber\year}%
+}
+
+\def\laodigits#1{\expandafter\@lao@digits #1@}
+\def\@lao@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\@lao@digits
+ \fi
+}
+
+\def\laonumber#1{%
+ \if@lao@numerals
+ \laodigits{\number#1}%
+ \else
+ \number#1%
+ \fi}
+
+\def\lao@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\laonumber%
+ \renewcommand{\thefootnote}{\protect\laonumber{\c@footnote}}%
+}
+\def\nolao@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-lao.ldf>
%<*gloss-latin.ldf>
% \fi
% \clearpage
@@ -6368,12 +6562,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-latin.ldf}[polyglossia: module for latin]
\makeatletter
-\def\latin@font{\selectfontfamilylatin}
-
-\ifx\l@latin\@undefined
- \xpg@nopatterns{latin}
- \adddialect\l@latin\l@nohyphenation
-\fi
+\PolyglossiaSetup{latin}{
+ hyphennames={latin},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionslatin{%
\def\prefacename{Praefatio}%
@@ -6406,22 +6600,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Decembris\fi%
\space \uppercase\expandafter{\romannumeral\year}}}
-\def\latin@language{\language=\l@latin}
-
-\setlocalhyphenmins{latin}{2}{2}%
-
-\def\noextras@latin{%
- \nonfrenchspacing%
-}
-
-\def\blockextras@latin{%
- \frenchspacing%
-}
-
-\def\inlineextras@latin{%
- \frenchspacing%
-}
-
% \end{macrocode}
% \iffalse
%</gloss-latin.ldf>
@@ -6433,12 +6611,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-latvian.ldf}[polyglossia: module for latvian]
\makeatletter
-\def\latvian@font{\selectfontfamilylatin}
-
-\ifx\l@latvian\@undefined
- \xpg@nopatterns{Latvian}
- \adddialect\l@latvian\l@nohyphenation\relax
-\fi
+\PolyglossiaSetup{latvian}{
+ hyphennames={latvian},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionslatvian{%
\def\prefacename{Priekšvārds}%
@@ -6472,10 +6649,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
jūlijā\or augustā\or septembrī\or%
oktobrī\or novembrī\or decembrī\fi}}
-\def\latvian@language{\language=\l@latvian}
-
-\setlocalhyphenmins{latvian}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-latvian.ldf>
@@ -6486,71 +6659,67 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-lithuanian.ldf}
% \begin{macrocode}
% Translated by Paulius Sladkevičius <komsas@gmail.com>
+% See also http://github.com/fc7/polyglossia/issues#issue/6
\ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian]
-\makeatletter
-
-\ifx\l@lithuanian\@undefined%
- \xpg@nopatterns{Lithuanian}%
- \adddialect\l@lithuanian\l@nohyphenation\relax
-\fi
+\PolyglossiaSetup{lithuanian}{
+ hyphennames={lithuanian},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionslithuanian{%
- \def\refname{\textlithuanian{Literatūra}}%
- \def\abstractname{\textlithuanian{Santrauka}}%
- \def\bibname{\textlithuanian{Literatūra}}%
- \def\prefacename{\textlithuanian{Pratarmė}}%
- \def\chaptername{\textlithuanian{Skyrius}}%
- \def\appendixname{\textlithuanian{Priedas}}%
- \def\contentsname{\textlithuanian{Turinys}}%
- \def\listfigurename{\textlithuanian{Iliustracijų sąrašas}}%
- \def\listtablename{\textlithuanian{Lentelių sąrašas}}%
- \def\indexname{\textlithuanian{Rodyklė}}%
- \def\figurename{\textlithuanian{Pav.}}%
- \def\tablename{\textlithuanian{Lentelė}}%
- %\def\thepart{\textlithuanian{}}% Roman numerals are fine
- \def\partname{\textlithuanian{Dalis}}%
- \def\pagename{\textlithuanian{Puslapis}}%
- \def\seename{\textlithuanian{žiūrėk}}%
- \def\alsoname{\textlithuanian{tai pat}}%
- \def\enclname{\textlithuanian{Įdėta}}%
- \def\ccname{\textlithuanian{Kopijos}}%
- \def\headtoname{\textlithuanian{Kam}}%
- \def\proofname{\textlithuanian{Įrodymas}}%
- \def\glossaryname{\textlithuanian{Terminų žodynas}}%
- }
+ \def\refname{Literatūra}%
+ \def\abstractname{Santrauka}%
+ \def\bibname{Literatūra}%
+ \def\prefacename{Pratarmė}%
+ \def\chaptername{skyrius}%
+ \def\appendixname{Priedas}%
+ \def\contentsname{Turinys}%
+ \def\listfigurename{Iliustracijų sąrašas}%
+ \def\listtablename{Lentelių sąrašas}%
+ \def\indexname{Rodyklė}%
+ \def\figurename{pav.}%
+ \def\tablename{lentelė}%
+ %\def\thepart{}% Roman numerals are fine
+ \def\partname{Dalis}%
+ \def\pagename{puslapis}%
+ \def\seename{žiūrėk}%
+ \def\alsoname{taip pat}%
+ \def\enclname{Įdėta}%
+ \def\ccname{Kopijos}%
+ \def\headtoname{Kam}%
+ \def\proofname{Įrodymas}%
+ \def\glossaryname{Terminų žodynas}%
+}
\def\datelithuanian{%
- \def\lithuanianmonth{\ifcase\month\or%
- sausio\or% Jan
- vasario\or% Feb
- kovo\or% Mar
- balandžio\or% Apr
- gegužės\or% May
- birželio\or% Jun
- liepos\or% Jul
- rugpjūčio\or% Aug
- rugsėjo\or% Sep
- spalio\or% Oct
- lapkričio\or% Nov
- gruodžio% Dec
- \fi}
- \def\today{\textlithuanian{\number\year~m.~\lithuanianmonth~\number\day~d.}}%
- }
-
-\def\lithuanian@font{\selectfontfamilylatin} % <== if the script is Latin
-
-\def\lithuanian@language{\protect\language=\l@lithuanian}
-
-\setlocalhyphenmins{lithuanian}{2}{2}%
-
-\def\noextras@lithuanian{%
- }
+ \def\lithuanianmonth{\ifcase\month\or
+ sausio\or
+ vasario\or
+ kovo\or
+ balandžio\or
+ gegužės\or
+ birželio\or
+ liepos\or
+ rugpjūčio\or
+ rugsėjo\or
+ spalio\or
+ lapkričio\or
+ gruodžio\fi}
+ \def\today{\number\year~m.~\lithuanianmonth~\number\day~d.}%
+}
\def\blockextras@lithuanian{%
- }
+ \let\fnum@figure@orig\fnum@figure
+ \let\fnum@table@orig\fnum@table
+ \def\fnum@figure{\thefigure\nobreakspace\figurename}%
+ \def\fnum@table{\thetable\nobreakspace\tablename}%
+}
-\def\inlineextras@lithuanian{%
- }
+\def\noblockextras@lithuanian{%
+ \let\fnum@figure\fnum@figure@orig
+ \let\fnum@table\fnum@table@orig
+}
% \end{macrocode}
% \iffalse
@@ -6563,19 +6732,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-lsorbian.ldf}[polyglossia: module for lower sorbian]
\makeatletter
-\def\lsorbian@font{\selectfontfamilylatin}
-
-\ifx\l@lowersorbian\@undefined
- \ifx\l@lsorbian\@undefined
- \xpg@nopatterns{Lsorbian}
- \adddialect\l@lsorbian\z@
- \let\l@lowersorbian\l@lsorbian
- \else
- \let\l@lowersorbian\l@lsorbian
- \fi
-\else
- \let\l@lsorbian\l@lowersorbian
-\fi
+\PolyglossiaSetup{lsorbian}{
+ hyphennames={lsorbian,lowersorbian,Lsorbian},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionslsorbian{%
\def\refname{Referency}%
@@ -6614,10 +6775,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
godownika\fi\space \number\year}}%
}
-\def\lsorbian@language{\language=\l@lsorbian}
-
-\setlocalhyphenmins{lsorbian}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-lsorbian.ldf>
@@ -6629,19 +6786,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-magyar.ldf}[polyglossia: module for magyar]
\makeatletter
-\def\magyar@font{\selectfontfamilylatin}
-
-\ifx\l@magyar\@undefined
- \ifx\l@hungarian\@undefined
- \xpg@nopatterns{Magyar}
- \adddialect\l@magyar\l@nohyphenation
- \else
- \let\l@magyar\l@hungarian
- \fi
-\fi
-\ifx\l@hungarian\@undefined
- \let\l@hungarian\l@magyar
-\fi
+\PolyglossiaSetup{magyar}{
+ hyphennames={magyar,hungarian},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsmagyar{%
\def\refname{Hivatkozások}%
@@ -6675,7 +6824,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
július\or augusztus\or szeptember\or
október\or november\or december\fi
\space\number\day.}%
- \def\ondatemagyar{\textmagyar{%
+ \def\ondatemagyar{%
\number\year.\nobreakspace\ifcase\month\or
január\or február\or március\or
április\or május\or június\or
@@ -6688,20 +6837,165 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
16-án\or 17-én\or 18-án\or 19-én\or 20-án\or
21-én\or 22-én\or 23-án\or 24-én\or 25-én\or
26-án\or 27-én\or 28-án\or 29-én\or 30-án\or
- 31-én\fi}}%
+ 31-én\fi}%
\let\ontoday\ondatemagyar}
-\def\magyar@language{\language=\l@magyar}
-
\def\noextras@magyar{%
\let\ontoday\@undefined
- }
-
-\setlocalhyphenmins{magyar}{2}{2}%
+}
% \end{macrocode}
% \iffalse
%</gloss-magyar.ldf>
+%<*gloss-malayalam.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-malayalam.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-malayalam.ldf}[polyglossia: module for malayalam]
+% Translations provided by Kevin & Siji, 01-11-2009
+\makeatletter
+
+\PolyglossiaSetup{malayalam}{
+ script=Malayalam,
+ scripttag=mlym,
+ langtag=MAL, %FIXME there is also MLR for "Malayalam Reformed"
+ hyphennames={malayalam},
+ hyphenmins={2,2}, %FIXME
+ fontsetup=true,
+}
+
+\def\captionsmalayalam{%
+ \def\abstractname{സാരാംശം}%
+ \def\appendixname{ശിഷ്ടം}%
+ \def\bibname{}% (?)
+ \def\ccname{}%
+ \def\chaptername{അദ്ധ്യായം}%
+ \def\contentsname{ഉള്ളടക്കം}%
+ \def\enclname{}%
+ \def\figurename{ചിത്രം}% रेखाचित्र
+ \def\headpagename{}%
+ \def\headtoname{}%
+ \def\indexname{സൂചിക}%
+ \def\listfigurename{ചിത്രസൂചിക}%
+ \def\listtablename{പട്ടികകളുടെ സൂചിക}%
+ \def\pagename{}%
+ \def\partname{ഭാഗം}%
+ \def\prefacename{}%
+ \def\refname{}%
+ \def\tablename{പട്ടിക}%
+ \def\seename{കാണുക}%
+ \def\alsoname{ഇതും കാണുക}%
+ \def\alsoseename{ഇതും കാണുക}%
+}
+\def\datemalayalam{%
+ \def\today{\number\year\space\ifcase\month\or
+ ജനുവരി\or
+ ഫിബ്രുവരി\or
+ മാർച്ച്\or
+ ഏപ്രിൽ\or
+ മെയ്\or
+ ജൂൺ\or
+ ജൂലായ്\or
+ ആഗസ്ത്\or
+ സെപ്തംബർ\or
+ ഒക്ടോബർ\or
+ നവംബർ\or
+ ഡിസംബർ\fi
+ \space\number\day}%
+}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-malayalam.ldf>
+%<*gloss-marathi.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-marathi.ldf}
+% \begin{macrocode}
+% Translations provided by Abhijit Navale <abhi_navale@live.in>
+% TODO implement Hindu calendar (not used in day-to-day practice)
+
+\ProvidesFile{gloss-marathi.ldf}[polyglossia: module for marathi]
+\RequirePackage{devanagaridigits}
+\makeatletter
+
+\PolyglossiaSetup{marathi}{
+ script=Devaganari,
+ scripttag=deva,
+ langtag=MAR,
+ hyphennames={marathi},
+ hyphenmins={2,2},%CHECK
+ fontsetup=true,
+ %TODO nouppercase=true,
+ %TODO localnumber=marathinumber
+}
+
+\def\tmp@western{Western}
+\newif\ifmarathi@devanagari@numerals
+\marathi@devanagari@numeralstrue
+
+\define@key{marathi}{numerals}[Devanagari]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@western
+ \marathi@devanagari@numeralsfalse
+ \fi}
+
+\def\marathinumber#1{%
+ \ifmarathi@devanagari@numerals
+ \devanagaridigits{\number#1}%
+ \else
+ \number#1%
+ \fi}
+
+\def\captionsmarathi{%
+ \def\refname{संदर्भ}%
+ \def\abstractname{सारांश}%
+ \def\bibname{संदर्भ ग्रंथांची यादी}%
+ \def\prefacename{प्रस्तावना}%
+ \def\chaptername{प्रकरण}%
+ \def\appendixname{परिशिष्ट}%
+ \def\contentsname{अनुक्रमणिका}%
+ \def\listfigurename{आक्रुत्यांची यादी}%
+ \def\listtablename{कॊष्टकांची यादी}%
+ \def\indexname{सुची}%
+ \def\figurename{आक्रुती}%
+ \def\tablename{कोष्टक}%
+ %\def\thepart{}% TODO
+ \def\partname{भाग}%
+ \def\pagename{पान}%
+ \def\seename{पहा}%
+ \def\alsoname{हे सुध्दा पहा}%
+ \def\enclname{समाविष्ट}%
+ \def\ccname{सि.सि.}%
+ \def\headtoname{प्रति}%
+ \def\proofname{कसोटी}%
+ \def\glossaryname{स्पष्टीकरणकोश}%
+}
+\def\datemarathi{%
+ \def\marathimonth{%
+ \ifcase\month\or
+ जानेवारी\or
+ फेब्रुवारी\or
+ मार्च\or
+ एप्रिल\or
+ मे\or
+ जुन\or
+ जुलॆ\or
+ ओगस्ट\or
+ सप्टेंबर\or
+ ओक्टोबर\or
+ नोव्हेंबर\or
+ डिसेंबर\fi
+ }%
+ \def\today{\marathinumber\day\space\marathimonth\space\marathinumber\year}%
+}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-marathi.ldf>
%<*gloss-norsk.ldf>
% \fi
% \clearpage
@@ -6710,12 +7004,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-norsk.ldf}[polyglossia: module for norwegian]
\makeatletter
-\def\norsk@font{\selectfontfamilylatin}
-
-\ifx\l@norsk\@undefined%
- \xpg@nopatterns{Norsk}%
- \adddialect\l@norsk\l@nohyphenation%
-\fi
+\PolyglossiaSetup{norsk}{
+ hyphennames={norsk},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsnorsk{%
\def\refname{Referanser}%
@@ -6741,6 +7035,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Bevis}%
\def\glossaryname{Ordliste}%
}
+
\def\datenorsk{%
\def\today{\number\day.~\ifcase\month\or
januar\or februar\or mars\or april\or mai\or juni\or
@@ -6748,22 +7043,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi\space\number\year}%
}
-\def\norsk@language{\language=\l@norsk}
-
-\setlocalhyphenmins{norsk}{2}{2}%
-
-\def\noextras@norsk{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@norsk{%
- \frenchspacing%
- }
-
-\def\inlineextras@norsk{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-norsk.ldf>
@@ -6775,12 +7054,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-nynorsk.ldf}[polyglossia: module for norwegian (Nynorsk)]
\makeatletter
-\def\nynorsk@font{\selectfontfamilylatin}
-
-\ifx\l@nynorsk\@undefined%
- \xpg@nopatterns{Nynorsk}%
- \adddialect\l@nynorsk\l@nohyphenation%
-\fi
+\PolyglossiaSetup{nynorsk}{
+ hyphennames={nynorsk},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsnynorsk{%
\def\refname{Referansar}%
@@ -6806,6 +7085,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Bevis}%
\def\glossaryname{Ordliste}%
}
+
\def\datenynorsk{%
\def\today{\number\day.~\ifcase\month\or
januar\or februar\or mars\or april\or mai\or juni\or
@@ -6813,25 +7093,75 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi\space\number\year}%
}
-\def\norsk@language{\language=\l@nynorsk}
-
-\setlocalhyphenmins{nynorsk}{2}{2}%
-
-\def\noextras@nynorsk{%
- \nonfrenchspacing%
- }
+% \end{macrocode}
+% \iffalse
+%</gloss-nynorsk.ldf>
+%<*gloss-occitan.ldf>
+% \fi
+% \clearpage
+%
+% \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]
-\def\blockextras@nynorsk{%
- \frenchspacing%
- }
+\PolyglossiaSetup{occitan}{
+ hyphennames={occitan},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
-\def\inlineextras@nynorsk{%
- \frenchspacing%
- }
+\def\captionsoccitan{%
+ \def\refname{Referéncias}%
+ \def\abstractname{Resumit}%
+ \def\bibname{Bibliografia}%
+ \def\prefacename{Prefàcia}%
+ \def\chaptername{Capítol}%
+ \def\appendixname{Annèx}%
+ \def\contentsname{Ensenhador}%
+ \def\listfigurename{Taula de las figuras}%
+ \def\listtablename{Taula dels tablèus}%
+ \def\indexname{Indèx}%
+ \def\figurename{Figura}%
+ \def\tablename{Tablèu}%
+ %\def\thepart{\textoccitan{}}%
+ \def\partname{Partida}%
+ \def\pagename{Pagina}%
+ \def\seename{vejatz}%
+ \def\alsoname{vejatz tanben}%
+ \def\enclname{Pèça junta}%
+ \def\ccname{còpia a}%
+ \def\headtoname{A}%
+ \def\proofname{Demostracion}%
+ \def\glossaryname{Glossari}%
+}
+\def\dateoccitan{%
+ \def\occitanmonth{\ifcase\month\or
+ de~genièr\or
+ de~febrièr\or
+ de~març\or
+ d'abril\or
+ de~mai\or
+ de~junh\or
+ de~julhet\or
+ d'agost\or
+ de~setembre\or
+ d'octobre\or
+ de~novembre\or
+ de~decembre\fi
+ }%
+ \def\occitanday{\ifcase\day\or
+ 1èr\else% primièr
+ \number\day\fi% all other numbers
+ }%
+ \def\today{\occitanday \occitanmonth\space de~\number\year}%
+}
% \end{macrocode}
% \iffalse
-%</gloss-nynorsk.ldf>
+%</gloss-occitan.ldf>
%<*gloss-polish.ldf>
% \fi
% \clearpage
@@ -6840,12 +7170,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-polish.ldf}[polyglossia: module for polish]
\makeatletter
-\def\polish@font{\selectfontfamilylatin}
-
-\ifx\l@polish\@undefined
- \xpg@nopatterns{polish}
- \adddialect\l@polish\l@nohyphenation
-\fi
+\PolyglossiaSetup{polish}{
+ hyphennames={polish},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionspolish{%
\def\prefacename{Przedmowa}%
@@ -6869,29 +7199,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\alsoname{Porównaj także}%
\def\proofname{Dowód}%
\def\glossaryname{Glossary}% <-- Needs translation
- }
-\def\datepolish{%
- \def\today{\ifcase\month\or%
- stycznia\or lutego\or marca\or kwietnia\or maja\or czerwca\or%
- lipca\or sierpnia\or września\or października\or%
- listopada\or grudnia\fi%
- \space\number\day, \number\year}}
-
-\def\polish@language{\language=\l@polish}
-
-\setlocalhyphenmins{polish}{2}{2}%
-
-\def\noextras@polish{%
- \nonfrenchspacing%
-}
-
-\def\blockextras@polish{%
- \frenchspacing%
-}
+ }
-\def\inlineextras@polish{%
- \frenchspacing%
-}
+\def\datepolish{%
+ \def\today{\ifcase\month\or
+ stycznia\or lutego\or marca\or kwietnia\or maja\or czerwca\or
+ lipca\or sierpnia\or września\or października\or
+ listopada\or grudnia\fi
+ \space\number\day, \number\year}%
+ }
% \end{macrocode}
% \iffalse
@@ -6904,52 +7220,44 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-portuges.ldf}[polyglossia: module for portuguese]
\makeatletter
-\def\portuges@font{\selectfontfamilylatin}
-
-\ifx\l@portuges\@undefined
- \ifx\l@portuguese\@undefined
- \xpg@nopatterns{Portuguese}
- \adddialect\l@portuges\l@nohyphenation
- \else
- \let\l@portuges\l@portuguese
- \fi
-\fi
+\PolyglossiaSetup{portuges}{
+ hyphennames={portuges,portuguese},
+ hyphenmins={2,3},
+ fontsetup=true,
+}
\def\captionsportuges{%
- \def\refname{Referências}%
- \def\abstractname{Resumo}%
- \def\bibname{Bibliografia}%
- \def\prefacename{Prefácio}%
- \def\chaptername{Capítulo}%
- \def\appendixname{Apêndice}%
- \def\contentsname{Conteúdo}%
- \def\listfigurename{Lista de Figuras}%
- \def\listtablename{Lista de Tabelas}%
- \def\indexname{Índice}%
- \def\figurename{Figura}%
- \def\tablename{Tabela}%
- %\def\thepart{}%
- \def\partname{Parte}%
- \def\pagename{Página}%
- \def\seename{ver}%
- \def\alsoname{ver também}%
- \def\enclname{Anexo}%
- \def\ccname{Com cópia a}%
- \def\headtoname{Para}%
- \def\proofname{Demonstração}%
- \def\glossaryname{Glossário}%
- }
+ \def\refname{Referências}%
+ \def\abstractname{Resumo}%
+ \def\bibname{Bibliografia}%
+ \def\prefacename{Prefácio}%
+ \def\chaptername{Capítulo}%
+ \def\appendixname{Apêndice}%
+ \def\contentsname{Conteúdo}%
+ \def\listfigurename{Lista de Figuras}%
+ \def\listtablename{Lista de Tabelas}%
+ \def\indexname{Índice}%
+ \def\figurename{Figura}%
+ \def\tablename{Tabela}%
+ %\def\thepart{}%
+ \def\partname{Parte}%
+ \def\pagename{Página}%
+ \def\seename{ver}%
+ \def\alsoname{ver também}%
+ \def\enclname{Anexo}%
+ \def\ccname{Com cópia a}%
+ \def\headtoname{Para}%
+ \def\proofname{Demonstração}%
+ \def\glossaryname{Glossário}%
+ }
+
\def\dateportuges{%
- \def\today{\number\day\space de\space\ifcase\month\or
- Janeiro\or Fevereiro\or Março\or Abril\or Maio\or Junho\or
- Julho\or Agosto\or Setembro\or Outubro\or Novembro\or Dezembro%
- \fi\space de\space\number\year}%
- }
+ \def\today{\number\day\space de\space\ifcase\month\or
+ Janeiro\or Fevereiro\or Março\or Abril\or Maio\or Junho\or
+ Julho\or Agosto\or Setembro\or Outubro\or Novembro\or Dezembro\fi
+ \space de\space\number\year}%
+ }
-\def\portuges@language{\language=\l@portuges}
-
-%\setlocalhyphenmins{portuges}{2}{3}% this is the default
-
% \end{macrocode}
% \iffalse
%</gloss-portuges.ldf>
@@ -6961,12 +7269,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-romanian.ldf}[polyglossia: module for romanian]
\makeatletter
-\def\romanian@font{\selectfontfamilylatin}%TODO\addfontfeature{Language=Romanian}
-\ifx\l@romanian\@undefined%
- \xpg@nopatterns{Romanian}%
- \adddialect\l@romanian\l@nohyphenation%
-\fi
+\PolyglossiaSetup{romanian}{
+ hyphennames={romanian},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsromanian{%
\def\refname{Bibliografie}%
@@ -6992,17 +7300,14 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Demonstrație}%
\def\glossaryname{Glosar}%
}
-\def\dateromanian{%
- \def\today{\number\day~\ifcase\month\or
+
+\def\dateromanian{%
+ \def\today{\number\day~\ifcase\month\or
ianuarie\or februarie\or martie\or aprilie\or mai\or
iunie\or iulie\or august\or septembrie\or octombrie\or
noiembrie\or decembrie\fi
\space \number\year}%
- }
-
-\def\romanian@language{\language=\l@romanian}
-
-\setlocalhyphenmins{romanian}{2}{2}%
+ }
% \end{macrocode}
% \iffalse
@@ -7015,60 +7320,89 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-russian.ldf}[polyglossia: module for russian]
\makeatletter
+\PolyglossiaSetup{russian}{
+ script=Cyrillic,
+ scripttag=cyrl,
+ langtag=RUS,
+ hyphennames={russian},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup
+ %TODO localalph={russian@alph,russian@Alph}
+}
+
+\define@key{russian}{spelling}[modern]{%
+ \ifstrequal{#1}{old}%
+ {\def\captionsrussian{\captionsrussian@old}%
+ \def\daterussian{\daterussian@old}}%
+ {\def\captionsrussian{\captionsrussian@modern}%
+ \def\daterussian{\daterussian@modern}}%
+}
+
+\newif\ifcyrillic@numerals
+\define@key{russian}{numerals}[latin]{%
+ \ifstrequal{#1}{cyrillic}%
+ {\cyrillic@numeralstrue}
+ {\cyrillic@numeralsfalse}
+}
+
+\define@boolkey{russian}[russian@]{babelshorthands}[false]{}
+
+\setkeys{russian}{spelling,numerals}
-\ifx\l@russian\@undefined
- \xpg@nopatterns{Russian}
- \adddialect\l@russian\l@nohyphenation
+\ifsystem@babelshorthands
+ \setkeys{russian}{babelshorthands=true}
+\else
+ \setkeys{russian}{babelshorthands=false}
\fi
-\def\russian@font{%
- \@ifundefined{russianfont}{%
- \@ifundefined{cyrillicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{cyrl}%
- \if@tempswa
- \addfontfeature{Script=Cyrillic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Cyrillic script!^^J
- Please define \string\cyrillicfont\space or \string\russianfont\space with \string\newfontfamily}%
- \fi
- \zf@check@ot@lang{RUS}%
- \if@tempswa\addfontfeature{Language=Russian}\fi
+\ifcsundef{initiate@active@char}{%
+ \input{babelsh.def}%
+ \initiate@active@char{"}%
+}{}
+
+\def\russian@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{russian}%
+% \declare@shorthand{russian}{"`}{„}%
+% \declare@shorthand{russian}{"'}{“}%
+% \declare@shorthand{russian}{"<}{«}%
+% \declare@shorthand{russian}{">}{»}%
+ \declare@shorthand{russian}{""}{\hskip\z@skip}%
+ \declare@shorthand{russian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{russian}{"=}{\nobreak\-\hskip\z@skip}%
+ \declare@shorthand{russian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+ \declare@shorthand{russian}{"-}{%
+ \def\russian@sh@tmp{%
+ \if\russian@sh@next-\expandafter\russian@sh@emdash
+ \else\expandafter\russian@sh@hyphen\fi
}%
- {\cyrillicfont%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{RUS}%
- \if@tempswa\addfontfeature{Language=Russian}\fi}%
- }%
- {\russianfont}%
+ \futurelet\russian@sh@next\russian@sh@tmp}%
+ \def\russian@sh@hyphen{%
+ \nobreak\-\bbl@allowhyphens}%
+ \def\russian@sh@emdash##1##2{\cdash-##1##2}%
+ \def\cdash##1##2##3{\def\tempx@{##3}%
+ \def\tempa@{-}\def\tempb@{~}\def\tempc@{*}%
+ \ifx\tempx@\tempa@\@Acdash\else
+ \ifx\tempx@\tempb@\@Bcdash\else
+ \ifx\tempx@\tempc@\@Ccdash\else
+ \errmessage{Wrong usage of cdash}\fi\fi\fi}
+ \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi
+ \cyrdash\hskip.2em\ignorespaces}%
+ \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi
+ \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}%
+ \def\@Ccdash{\leavevmode
+ \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+ \ifx\cyrdash\undefined
+ \def\cyrdash{\hbox to.8em{--\hss--}}
+ \fi
+ \declare@shorthand{russian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
-\def\tmp@old{old}
-\define@key{russian}{spelling}[modern]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@old
- \def\captionsrussian{\captionsrussian@old}
- \def\daterussian{\daterussian@old}%
- \else%
- \def\captionsrussian{\captionsrussian@modern}
- \def\daterussian{\daterussian@modern}%
- \fi}
-
-%TODO: enable key to switch between latin and cyrillic \alph
-\def\tmp@latin{latin}
-\newif\iflatin@numerals
-\define@key{russian}{numerals}[russian]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@latin
- \latin@numeralstrue
- \else
- \latin@numeralsfalse
- \fi
+\def\norussian@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
}
-\setkeys{russian}{spelling,numerals}
\def\captionsrussian@modern{%
\def\prefacename{Предисловие}%
@@ -7137,7 +7471,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\alsoname{см.~также}%
\def\proofname{Доказательство}%
}
-\def\daterussian@old{
+\def\daterussian@old{%
\def\today{\number\day%
\space\ifcase\month\or%
января\or
@@ -7173,48 +7507,68 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\preparagraph{}%
\def\presubparagraph{}}
+\def\Asbuk#1{\expandafter\russian@Alph\csname c@#1\endcsname}
\def\russian@Alph#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 Я\else\xpg@ill@value{#1}{russian@Alph}\fi}
-\def\russian@alph#1{\ifcase#1\or
+\def\asbuk#1{\expandafter\russian@alph\csname c@#1\endcsname}
+\def\russian@alph#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 я\else\xpg@ill@value{#1}{russian@alph}\fi}
\def\russian@numbers{%
- \let\latin@Alph\@Alph%
- \let\latin@alph\@alph%
- \let\@Alph\russian@Alph%
- \let\@alph\russian@alph%
+ \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \ifcyrillic@numerals
+ \let\@alph\russian@alph%
+ \let\@Alph\russian@Alph%
+ \fi
}
\def\norussian@numbers{%
- \let\@Alph\latin@Alph%
\let\@alph\latin@alph%
+ \let\@Alph\latin@Alph%
}
-\def\russian@language{\language=\l@russian}
-
-\setlocalhyphenmins{russian}{2}{2}%
-
\def\noextras@russian{%
- \nonfrenchspacing%
\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
- \iflatin@numerals\else\norussian@numbers\fi
- }
+ \ifcyrillic@numerals\norussian@numbers\fi
+ \norussian@shorthands%
+}
\def\blockextras@russian{%
- \frenchspacing%
\russian@capsformat%
- \iflatin@numerals\else\russian@numbers\fi
- }
+ \ifcyrillic@numerals\russian@numbers\fi
+ \ifrussian@babelshorthands\russian@shorthands\fi
+}
\def\inlineextras@russian{%
- \frenchspacing%
- }
+ \ifrussian@babelshorthands\russian@shorthands\fi%
+}
+
+%%% These lines taken from russianb.ldf, part of babel package.
+% make it optional?
+\def\sh {\mathop{\operator@font sh}\nolimits}
+\def\ch {\mathop{\operator@font ch}\nolimits}
+\def\tg {\mathop{\operator@font tg}\nolimits}
+\def\arctg {\mathop{\operator@font arctg}\nolimits}
+\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
+\def\th {\mathop{\operator@font th}\nolimits}
+\def\ctg {\mathop{\operator@font ctg}\nolimits}
+\def\cth {\mathop{\operator@font cth}\nolimits}
+\def\cosec {\mathop{\operator@font cosec}\nolimits}
+\def\Prob {\mathop{\kern\z@\mathsf{P}}\nolimits}
+\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
+\def\nod {\mathop{\mathrm{н.о.д.}}\nolimits}
+\def\nok {\mathop{\mathrm{н.о.к.}}\nolimits}
+\def\NOD {\mathop{\mathrm{НОД}}\nolimits}
+\def\NOK {\mathop{\mathrm{НОК}}\nolimits}
+\def\Proj {\mathop{\mathrm{Пр}}\nolimits}
+%\DeclareRobustCommand{\No}{№}
% \end{macrocode}
% \iffalse
@@ -7227,12 +7581,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-samin.ldf}[polyglossia: module for samin]
\makeatletter
-\def\samin@font{\selectfontfamilylatin}
-\ifx\l@samin\@undefined%
- \xpg@nopatterns{Samin}%
- \adddialect\l@samin\l@nohyphenation%
-\fi
+\PolyglossiaSetup{samin}{
+ hyphennames={samin},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionssamin{%
\def\refname{Čujuhusat}%
@@ -7258,8 +7612,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Duođaštus}%
\def\glossaryname{Sátnelistu}%
}
-\def\datesamin{%
- \def\today{\ifcase\month\or
+\def\datesamin{%
+ \def\today{\ifcase\month\or
ođđajagemánu\or
guovvamánu\or
njukčamánu\or
@@ -7273,11 +7627,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
skábmamánu\or
juovlamánu\fi
\space\number\day.~b.\space\number\year}%
- }
-
-\def\samin@language{\language=\l@samin}
-
-\setlocalhyphenmins{samin}{2}{2}%
+ }
% \end{macrocode}
% \iffalse
@@ -7289,114 +7639,90 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-sanskrit.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-sanskrit.ldf}[polyglossia: module for sanskrit]
+\RequirePackage{devanagaridigits}
\makeatletter
-\ifx\l@sanskrit\@undefined%
- \ifx\l@prakrit\@undefined%
- \xpg@nopatterns{Sanskrit}%
- \adddialect\l@sanskrit\l@nohyphenation%
- \else%
- \let\l@sanskrit=\l@prakrit%
- \fi%
-\fi
+\PolyglossiaSetup{sanskrit}{
+ langtag=SAN,
+ hyphennames={sanskrit,prakrit},
+ hyphenmins={1,3},
+ frenchspacing=true,
+ fontsetup=false, % will be done below
+ %TODO localnumber=sanskritnumber
+}
-\def\tmp@deva{Devanagari}
\define@key{sanskrit}{Script}[Devanagari]{%
- \gdef\sanskrit@script{#1}}
+ \setkeys[xpg@setup]{sanskrit}{script=#1}%
+ \ifcsdef{fontsetup@sanskrit@#1}%
+ {\csname fontsetup@sanskrit@#1\endcsname}%
+ {\xpg@error{`#1' is not a valid script for Sanskrit}%
+ }%
+}
-\setkeys{sanskrit}{Script}
+\def\fontsetup@sanskrit@Devanagari{%
+ \def\xpg@scripttag@sanskrit{deva}%
+ \xpg@fontsetup@nonlatin{sanskrit}}
+\def\fontsetup@sanskrit@Gujarati{%
+ \def\xpg@scripttag@sanskrit{gujr}%
+ \xpg@fontsetup@nonlatin{sanskrit}}
+\def\fontsetup@sanskrit@Malayalam{%
+ \def\xpg@scripttag@sanskrit{mlym}%
+ \xpg@fontsetup@nonlatin{sanskrit}}
+\def\fontsetup@sanskrit@Bengali{%
+ \def\xpg@scripttag@sanskrit{beng}%
+ \xpg@fontsetup@nonlatin{sanskrit}}
+\def\fontsetup@sanskrit@Kannada{%
+ \def\xpg@scripttag@sanskrit{knda}%
+ \xpg@fontsetup@nonlatin{sanskrit}}
+\def\fontsetup@sanskrit@Telugu{%
+ \def\xpg@scripttag@sanskrit{telu}%
+ \xpg@fontsetup@nonlatin{sanskrit}}
+
+\setkeys{sanskrit}{Script} %sets the default for Devanagari
+
+%% TODO option for numerals (Devanagari or Western)
+%\def\tmp@western{Western}
+%\newif\ifsanskrit@devanagari@numerals
+%\sanskrit@devanagari@numeralstrue
+%
+%\define@key{sanskrit}{numerals}[Devanagari]{%
+% \def\@tmpa{#1}%
+% \ifx\@tmpa\tmp@western
+% \sanskrit@devanagari@numeralsfalse
+% \fi}
\newXeTeXintercharclass\sanskrit@punctthin % ! ? ; : danda double_danda
+
\def\sanskrit@punctthinspace{{\unskip\thinspace}}
\def\sanskrit@punctuation{%
- \frenchspacing%
- \XeTeXinterchartokenstate=1%
- \XeTeXcharclass `\! \sanskrit@punctthin
- \XeTeXcharclass `\? \sanskrit@punctthin
- \XeTeXcharclass `\; \sanskrit@punctthin
- \XeTeXcharclass `\: \sanskrit@punctthin
- \XeTeXcharclass `\। \sanskrit@punctthin
- \XeTeXcharclass `\॥ \sanskrit@punctthin
- \XeTeXinterchartoks \z@ \sanskrit@punctthin = \sanskrit@punctthinspace
+ \XeTeXinterchartokenstate=1%
+ \XeTeXcharclass `\! \sanskrit@punctthin
+ \XeTeXcharclass `\? \sanskrit@punctthin
+ \XeTeXcharclass `\; \sanskrit@punctthin
+ \XeTeXcharclass `\: \sanskrit@punctthin
+ \XeTeXcharclass `\। \sanskrit@punctthin
+ \XeTeXcharclass `\॥ \sanskrit@punctthin
+ \XeTeXinterchartoks \z@ \sanskrit@punctthin = \sanskrit@punctthinspace
}
\def\nosanskrit@punctuation{%
- \nonfrenchspacing%
- \XeTeXinterchartokenstate=0%
-}
-
-%\def\captionssanskrit{%
-% \def\refname{<++>}%
-% \def\abstractname{<++>}%
-% \def\bibname{<++>}%
-% \def\prefacename{<++>}%
-% \def\chaptername{<++>}%
-% \def\appendixname{<++>}%
-% \def\contentsname{<++>}%
-% \def\listfigurename{<++>}%
-% \def\listtablename{<++>}%
-% \def\indexname{<++>}%
-% \def\figurename{<++>}%
-% \def\tablename{<++>}%
-% \def\thepart{}%
-% \def\partname{<++>}%
-% \def\pagename{<++>}%
-% \def\seename{<++>}%
-% \def\alsoname{<++>}%
-% \def\enclname{<++>}%
-% \def\ccname{<++>}%
-% \def\headtoname{<++>}%
-% \def\proofname{<++>}%
-% \def\glossaryname{<++>}%
-% \def\today{<++>}}
-
-\def\sanskrit@font{%
-\@ifundefined{sanskritfont}{%
- \@ifundefined{devanagarifont}{%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{deva}%
- \ifx\sanskrit@script\tmp@deva%
- \if@tempswa%
- \addfontfeature{Script=Devanagari}%
- \else%
- \PackageError{polyglossia}{^^J
- The current font does not contain the devanagari script!^^J
- Please define \string\devanagarifont\space or \string\sanskritfont\space with \string\newfontfamily}%
- \fi%
- \else%
- \addfontfeature{Script=\sanskrit@script}%
- \fi%
- \zf@check@ot@lang{SAN}%
- \if@tempswa\addfontfeature{Language=Sanskrit}\fi%
- }%
- {\devanagarifont%
- \zf@check@ot@lang{SAN}%
- \if@tempswa\addfontfeature{Language=Sanskrit}\fi%
- }%
- }%
- {\sanskritfont}%
+ \XeTeXcharclass `\! \z@
+ \XeTeXcharclass `\? \z@
+ \XeTeXcharclass `\; \z@
+ \XeTeXcharclass `\: \z@
+ \XeTeXcharclass `\। \z@
+ \XeTeXcharclass `\॥ \z@
+ \XeTeXinterchartokenstate=0%
}
-\def\selectnormalfontsanskrit{%
- \let\normalfont=\sanskrit@font%
- \let\rmfamily=\sanskrit@font%
- % TODO add setup to define Sans and Mono Sanskrit fonts if desired
- \let\sffamily=\sanskrit@font%
- \let\ttfamily=\sanskrit@font%
- \def\reset@font{\normalfont}}
-
-\def\sanskrit@language{\language=\l@sanskrit}
-
-\setlocalhyphenmins{sanskrit}{1}{3}%
-
\def\noextras@sanskrit{%
- \nosanskrit@punctuation%
- }
+ \nosanskrit@punctuation%
+}
\def\blockextras@sanskrit{%
- \sanskrit@punctuation%
- }
+ \sanskrit@punctuation%
+}
% \end{macrocode}
% \iffalse
@@ -7409,12 +7735,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-scottish.ldf}[polyglossia: module for scottish]
\makeatletter
-\def\scottish@font{\selectfontfamilylatin}
-\ifx\l@scottish\@undefined%
- \xpg@nopatterns{Scottish}%
- \adddialect\l@scottish\l@nohyphenation%
-\fi
+\PolyglossiaSetup{scottish}{
+ hyphennames={scottish},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsscottish{%
\def\refname{Iomraidh}%
@@ -7440,6 +7766,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Proof}% <-- needs translation
\def\glossaryname{Glossary}% <-- needs translation
}
+
\def\datescottish{%
\def\today{%
\number\day\space \ifcase\month\or
@@ -7450,10 +7777,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\space \number\year}%
}
-\def\scottish@language{\language=\l@scottish}
-
-\setlocalhyphenmins{scottish}{2}{2}%
-
% \end{macrocode}
% \iffalse
%</gloss-scottish.ldf>
@@ -7465,22 +7788,41 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-serbian.ldf}[polyglossia: module for serbian]
\makeatletter
+%TODO split into gloss-serbiancyr.ldf and gloss-serbianlat.ldf
+%% load these automatically from polyglossia.sty according to the script option ??
+%% same thing for all languages that have a "script" key !
+%% BETTER APPROACH: see gloss-sanskrit!
-%TODO eventually there will be patterns for Serbian-Latin as well as Serbian-Cyrillic
-\ifx\l@serbian\@undefined%
- \xpg@nopatterns{Serbian}%
- \adddialect\l@serbian\l@nohyphenation%
-\fi
+\PolyglossiaSetup{serbian}{
+ langtag=SRB,
+ hyphennames={serbian},
+ hyphenmins={2,2},
+ indentfirst=true,
+ fontsetup=false
+ %TODO localalph
+}
\newif\if@serbian@cyr
-\def\tmp@cyrillic{cyrillic}
-\define@key{serbian}{script}[cyrillic]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@cyrillic\@serbian@cyrtrue\else%
- \@serbian@cyrfalse
- \fi}
-\setkeys{serbian}{script}
+\define@key{serbian}{Script}[Cyrillic]{% TODO FIXDOC: keyname is CHANGED: script -> Script !!!
+ \ifstrequal{#1}{Cyrillic}%
+ {\@serbian@cyrtrue
+ \setkeys[xpg@setup]{serbian}{script=Cyrillic}%
+ \def\xpg@scripttag@serbian{cyrl}%
+ \xpg@fontsetup@nonlatin{serbian}%
+ }%
+ {\ifstrequal{#1}{Latin}%
+ {\@serbian@cyrfalse
+ \xpg@fontsetup@latin{serbian}%
+ %TODO \def\serbian@language{\language=\l@serbianlat}%
+ % or should we use Croatian patterns as a fallback for the time being???
+ }%
+ {\xpg@error{Unknown script `#1' for Serbian language\MessageBreak
+ Valid values are "Cyrillic" and "Latin"}}%
+ }
+}
+
+\setkeys{serbian}{Script}
\def\captionsserbian{%
\if@serbian@cyr\captionsserbian@cyr\else\captionsserbian@lat\fi%
@@ -7552,53 +7894,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
децембар\fi \space \number\year}%
}
-\def\serbian@font@cyr{%
- \@ifundefined{serbianfont}{%
- \@ifundefined{cyrillicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{cyrl}%
- \if@tempswa
- \addfontfeature{Script=Cyrillic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Cyrillic script!^^J
- Please define \string\cyrillicfont\space or \string\serbianfont\space with \string\newfontfamily}%
- \fi%
- \zf@check@ot@lang{SRB}%
- \if@tempswa\addfontfeature{Language=Serbian}\fi}%
- {\cyrillicfont%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{SRB}%
- \if@tempswa\addfontfeature{Language=Serbian}\fi}%
- }%
- {\serbianfont}%
-}
-
-\def\serbian@font@lat{%
- \@ifundefined{serbianfontlatin}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{SRB}%
- \if@tempswa\addfontfeature{Language=Serbian}\fi}%
- {\serbianfontlatin}%
-}
-
-\def\serbian@font{%
- \if@serbian@cyr\serbian@font@cyr\else\serbian@font@lat\fi}
-
-%TODO when available load latin hyphenation patterns as well!
-\def\serbian@language{\language=\l@serbian}
-
-\setlocalhyphenmins{serbian}{2}{2}%
-
-\def\noextras@serbian{%
- \nofrench@indent%
- }
-
-\def\blockextras@serbian{%
- \french@indent%
- }
% \end{macrocode}
% \iffalse
%</gloss-serbian.ldf>
@@ -7610,12 +7905,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-slovak.ldf}[polyglossia: module for slovak]
\makeatletter
-\def\slovak@font{\selectfontfamilylatin}
-\ifx\l@slovak\@undefined%
- \xpg@nopatterns{Slovak}%
- \adddialect\l@slovak\l@nohyphenation%
-\fi
+\PolyglossiaSetup{slovak}{
+ hyphennames={slovak},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsslovak{%
\def\refname{Referencie}%
@@ -7641,17 +7936,14 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Dôkaz}%
\def\glossaryname{Slovník}%
}
+
\def\dateslovak{%
- \def\today{\number\day.~\ifcase\month\or
+ \def\today{\number\day.~\ifcase\month\or
januára\or februára\or marca\or apríla\or mája\or
júna\or júla\or augusta\or septembra\or októbra\or
novembra\or decembra\fi
\space \number\year}%
- }
-
-\def\slovak@language{\language=\l@slovak}
-
-\setlocalhyphenmins{slovak}{2}{2}%
+ }
% \end{macrocode}
% \iffalse
@@ -7663,14 +7955,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-slovenian.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for slovenian]
-\makeatletter
-\def\slovenian@font{\selectfontfamilylatin}
-\ifx\l@slovenian\@undefined%
- \ifx\l@slovene\@undefined%
- \xpg@nopatterns{Slovenian}%
- \adddialect\l@slovenian\l@nohyphenation%
-\fi\fi
+\PolyglossiaSetup{slovenian}{
+ hyphennames={slovenian,slovene},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsslovenian{%
\def\refname{Literatura}%
@@ -7696,16 +7986,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Dokaz}%
\def\glossaryname{Glosar}% <-- CHECK!
}
+
\def\dateslovenian{%
- \def\today{\number\day.~\ifcase\month\or
+ \def\today{\number\day.~\ifcase\month\or
januar\or februar\or marec\or april\or maj\or junij\or
julij\or avgust\or september\or oktober\or november\or december\fi
\space \number\year}%
- }
-
-\def\slovenian@language{\language=\l@slovenian}
-
-\setlocalhyphenmins{slovenian}{2}{2}%
+ }
% \end{macrocode}
% \iffalse
@@ -7718,58 +8005,44 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-spanish.ldf}[polyglossia: module for spanish]
\makeatletter
-\def\spanish@font{\selectfontfamilylatin}
-
-\ifx\l@spanish\@undefined
- \xpg@nopatterns{spanish}
- \adddialect\l@spanish\l@nohyphenation
-\fi
+\PolyglossiaSetup{spanish}{
+ hyphennames={spanish},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
\def\captionsspanish{%
- \def\prefacename{Prefacio}%
- \def\refname{Referencias}%
- \def\abstractname{Resumen}%
- \def\bibname{Bibliografía}%
- \def\chaptername{Capítulo}%
- \def\appendixname{Apéndice}%
- \def\contentsname{Índice general}%
- \def\listfigurename{Índice de figuras}%
- \def\listtablename{Índice de cuadros}%
- \def\indexname{Índice alfabético}%
- \def\figurename{Figura}%
- \def\tablename{Cuadro}%
- \def\partname{Parte}%
- \def\enclname{Adjunto(s)}%
- \def\ccname{Copia a}%
- \def\headtoname{A}%
- \def\pagename{Página}%
- \def\seename{véase}%
- \def\alsoname{véase también}%
- \def\proofname{Prueba}%
- \def\glossaryname{Glosario}%
- }
+ \def\prefacename{Prefacio}%
+ \def\refname{Referencias}%
+ \def\abstractname{Resumen}%
+ \def\bibname{Bibliografía}%
+ \def\chaptername{Capítulo}%
+ \def\appendixname{Apéndice}%
+ \def\contentsname{Índice general}%
+ \def\listfigurename{Índice de figuras}%
+ \def\listtablename{Índice de cuadros}%
+ \def\indexname{Índice alfabético}%
+ \def\figurename{Figura}%
+ \def\tablename{Cuadro}%
+ \def\partname{Parte}%
+ \def\enclname{Adjunto(s)}%
+ \def\ccname{Copia a}%
+ \def\headtoname{A}%
+ \def\pagename{Página}%
+ \def\seename{véase}%
+ \def\alsoname{véase también}%
+ \def\proofname{Prueba}%
+ \def\glossaryname{Glosario}%
+ }
+
\def\datespanish{%
- \def\today{\number\day~de~\ifcase\month\or
+ \def\today{\number\day~de~\ifcase\month\or
enero\or febrero\or marzo\or abril\or mayo\or junio\or
julio\or agosto\or septiembre\or octubre\or noviembre\or
diciembre\fi\space \number\year}%
-}
-
-\def\spanish@language{\language=\l@spanish}
-
-\setlocalhyphenmins{spanish}{2}{2}%
-
-\def\noextras@spanish{%
- \nonfrenchspacing%
-}
-
-\def\blockextras@spanish{%
- \frenchspacing%
-}
-
-\def\inlineextras@spanish{%
- \frenchspacing%
-}
+ }
% \end{macrocode}
% \iffalse
@@ -7781,40 +8054,41 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-swedish.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-swedish.ldf}[polyglossia: module for swedish]
-\makeatletter
-\def\swedish@font{\selectfontfamilylatin}
-\ifx\l@swedish\@undefined%
- \xpg@nopatterns{Swedish}%
- \adddialect\l@swedish\l@nohyphenation%
-\fi
+\PolyglossiaSetup{swedish}{
+ hyphennames={swedish},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsswedish{%
- \def\refname{Referenser}%
- \def\abstractname{Sammanfattning}%
- \def\bibname{Litteraturförteckning}%
- \def\prefacename{Förord}%
- \def\chaptername{Kapitel}%
- \def\appendixname{Bilaga}%
- \def\contentsname{Innehåll}%
- \def\listfigurename{Figurer}%
- \def\listtablename{Tabeller}%
- \def\indexname{Sakregister}%
- \def\figurename{Figur}%
- \def\tablename{Tabell}%
- %\def\thepart{}%
- \def\partname{Del}%
- \def\pagename{Sida}%
- \def\seename{se}%
- \def\alsoname{se även}%
- \def\enclname{Bil.}%
- \def\ccname{Kopia för kännedom}%
- \def\headtoname{Till}%
- \def\proofname{Bevis}%
- \def\glossaryname{Ordlista}%
- }
+ \def\refname{Referenser}%
+ \def\abstractname{Sammanfattning}%
+ \def\bibname{Litteraturförteckning}%
+ \def\prefacename{Förord}%
+ \def\chaptername{Kapitel}%
+ \def\appendixname{Bilaga}%
+ \def\contentsname{Innehåll}%
+ \def\listfigurename{Figurer}%
+ \def\listtablename{Tabeller}%
+ \def\indexname{Sakregister}%
+ \def\figurename{Figur}%
+ \def\tablename{Tabell}%
+ %\def\thepart{}%
+ \def\partname{Del}%
+ \def\pagename{Sida}%
+ \def\seename{se}%
+ \def\alsoname{se även}%
+ \def\enclname{Bil.}%
+ \def\ccname{Kopia för kännedom}%
+ \def\headtoname{Till}%
+ \def\proofname{Bevis}%
+ \def\glossaryname{Ordlista}%
+ }
+
\def\dateswedish{%
- \def\today{%
+ \def\today{%
\number\day~\ifcase\month\or
januari\or februari\or mars\or april\or maj\or juni\or
juli\or augusti\or september\or oktober\or november\or
@@ -7826,22 +8100,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\today{\number\day/\number\month\space\number\year}}%
}
-\def\swedish@language{\language=\l@swedish}
-
-\setlocalhyphenmins{swedish}{2}{2}%
-
-\def\noextras@swedish{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@swedish{%
- \frenchspacing%
- }
-
-\def\inlineextras@swedish{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-swedish.ldf>
@@ -7856,12 +8114,14 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\RequirePackage{arabicnumbers}
\makeatletter
-\ifx\l@syriac\@undefined
- %\xpg@nopatterns{Syriac}%
- \adddialect\l@syriac\l@nohyphenation
-\fi
-
-\def\syriac@RL{\relax}
+\PolyglossiaSetup{syriac}{
+ script=Syriac,
+ scripttag=syrc,
+ direction=RL,
+ hyphennames={syriac,nohyphenation},
+ fontsetup=true,
+ %TODO localalph
+}
\def\syriacnumber#1{\@syriacnumber{#1}}%
@@ -7882,29 +8142,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\setkeys{syriac}{numerals}
-\def\syriac@font{%
- \@ifundefined{syriacfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{syrc}%
- \if@tempswa
- \addfontfeature{Script=Syriac}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Syriac script!^^J
- Please define \string\syriacfont\space with \string\newfontfamily}%
- \fi}%
- {\syriacfont}%
-}
-
-\def\selectnormalfontsyriac{%
- \let\normalfont=\syriac@font%
- \let\rmfamily=\syriac@font%
- % TODO add setup to define Sans and Mono Syriac fonts if desired
- \let\sffamily=\syriac@font%
- \let\ttfamily=\syriac@font%
- \def\reset@font{\normalfont}}
-
%\define@key{polyglossia}{syriaclocale}[default]{%
% \def\@syriac@locale{#1}}
%
@@ -8022,8 +8259,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
}
-\def\syriac@language{\language=\l@syriac}
-
\def\blockextras@syriac{%
\let\@@MakeUppercase\MakeUppercase%
\def\MakeUppercase##1{##1}%
@@ -8035,6 +8270,133 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-syriac.ldf>
+%<*gloss-tamil.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-tamil.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-tamil.ldf}[polyglossia: module for tamil]
+% Translations provided by Kevin & Siji, 01-11-2009
+\makeatletter
+
+\PolyglossiaSetup{tamil}{
+ script=Tamil,
+ scripttag=taml,
+ langtag=TAM,
+ hyphennames={tamil},
+ hyphenmins={2,2}, %FIXME?
+ fontsetup=true,
+}
+
+\def\captionstamil{%
+ \def\abstractname{சாராம்சம்}%
+ \def\appendixname{பிற்சேர்க்கை}%பின்னிணைப்பு
+ %\def\bibname{}%
+ %\def\ccname{}%
+ \def\chaptername{அத்தியாயம்}%
+ \def\contentsname{உள்ளே}%
+ %\def\enclname{}%
+ \def\figurename{படம்}%
+ %\def\headpagename{}%
+ %\def\headtoname{}%
+ \def\indexname{சுட்டி}%பொருளடக்க அட்டவணை
+ \def\listfigurename{படங்களின் பட்டியல்}%
+ \def\listtablename{அட்டவணை பட்டியல்}%
+ %\def\pagename{}%
+ \def\partname{பகுதி}%
+ %\def\prefacename{}%
+ %\def\refname{}%
+ \def\tablename{அட்டவணை}%
+ \def\seename{பார்க்க}%
+ %\def\alsoname{}%
+ %\def\alsoseename{}%
+}
+\def\datetamil{%
+ \def\today{\number\year\space\ifcase\month\or
+ ஜனவரி\or
+ பிப்ரவரி\or
+ மார்ச்\or
+ ஏப்ரல்\or
+ மே\or
+ ஜூன்\or
+ ஜூலை\or
+ ஆகஸ்ட்\or
+ செப்டம்பர்\or
+ அக்டோபர்\or
+ நவம்பர்\or
+ டிசம்பர்\fi
+ \space\number\day}%
+}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-tamil.ldf>
+%<*gloss-telugu.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-telugu.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-telugu.ldf}[polyglossia: module for telugu]
+% Translations provided by Anmol Sharma <unmole.in@gmail.com>
+\makeatletter
+
+\PolyglossiaSetup{telugu}{
+ script=Telugu,
+ scripttag=telu,
+ langtag=TEL,
+ hyphennames={telugu},
+ hyphenmins={2,2}, %FIXME
+ fontsetup=true,
+}
+
+\def\captionstelugu{%
+ \def\refname{ఆధారాలు}%
+ \def\abstractname{సారాంశం}%
+ \def\bibname{గ్రంథాల జాబితా}%
+ \def\prefacename{ముందుమాట}%
+ \def\chaptername{అధ్యాయము}%
+ \def\appendixname{అదనంగా}%
+ \def\contentsname{విషయాలు}%
+ \def\listfigurename{ఆకృతుల జాబితా}%
+ \def\listtablename{పట్టికల జాబితా}%
+ \def\indexname{విషయ సూచిక}%
+ \def\figurename{ఆకృతి}%
+ \def\tablename{పట్టిక}%
+ %\def\thepart{}%
+ \def\partname{భాగం}%
+ \def\pagename{పేజి}%
+ \def\seename{చూడండి}%
+ \def\alsoname{కూడా చూడండి}%
+ \def\enclname{ఎంక్లోజర్*}%
+ \def\ccname{సిసి}%
+ \def\headtoname{కి}%
+ \def\proofname{రుజువు}%
+ \def\glossaryname{నిఘంటువు}%
+}
+
+\def\datetelugu{%
+ \def\telugu@month{%
+ \ifcase\month\or
+ జనవరి\or
+ ఫిబ్రవరి\or
+ మార్చ్\or
+ ఏప్రిల్\or
+ మే\or
+ జూన్\or
+ జూలై\or
+ ఆగస్ట్\or
+ సెప్టెంబర్\or
+ అక్తోబెర్\or
+ నవంబర్\or
+ డిసంబర్\fi}%
+ \def\today{\telugu@month\space\number\day,\space\number\year}%
+}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-telugu.ldf>
%<*gloss-thai.ldf>
% \fi
% \clearpage
@@ -8052,14 +8414,22 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%%%% Thai Linux Working Group
%%%% http://linux.thai.net/
%%%%
+\PolyglossiaSetup{thai}{
+ script=Thai,
+ scripttag=thai,
+ hyphennames={nohyphenation},
+ fontsetup=true
+ %TODO localalph={xxx@alph,xxx@Alph}
+ %TODO localdigits=thainumber
+}
\newif\if@thai@numerals
\def\tmp@thai{thai}
\define@key{thai}{numerals}[arabic]{%
\def\@tmpa{#1}%
- \ifx\@tmpa\tmp@thai\@thai@numeralstrue\else%
- \@thai@numeralsfalse\fi%
- }
+ \ifx\@tmpa\tmp@thai\@thai@numeralstrue\else
+ \@thai@numeralsfalse\fi
+}
\setkeys{thai}{numerals}
@@ -8086,7 +8456,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\headtoname{เรียน}%
\def\proofname{พิสูจน์}%
%\def\glossaryname{}%
- }
+}
\def\datethai{%
\def\thai@month{%
\ifcase\month\or
@@ -8097,7 +8467,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\thai@year=\year%
\advance\thai@year by 543%
\def\today{\thainumber\day \space \thai@month\space พ.ศ.~\thainumber\thai@year}%
- }
+}
%NB: thai-latex had "plus 0.6pt", but .4em appears to give better results
% FIXME to avoid name clashes, rename \wbr to \wordbreak or \thaiworkbreak ?
@@ -8115,10 +8485,10 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\thainumber#1{%
- \if@thai@numerals%
+ \if@thai@numerals
\thaidigits{\number#1}%
%%{\protect\addfontfeature{Mapping=thaidigits}\protect\number#1}
- \else%
+ \else
\number#1%
%%{\protect\reset@font\number#1}
\fi}
@@ -8138,57 +8508,36 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\thai@numbers{%
\let\@latinalph\@alph%
\let\@latinAlph\@Alph%
- \if@thai@numerals%
+ \if@thai@numerals
\let\@alph\@thaialph%
\let\@Alph\@thaiAlph%
\fi
- }
+}
\def\nothai@numbers{%
\let\@alph\@latinalph%
\let\@Alph\@latinAlph%
- }
+}
\def\thai@globalnumbers{%
\let\orig@arabic\@arabic%
\let\@arabic\thainumber%
\renewcommand{\thefootnote}{\protect\thainumber{\c@footnote}}%
- }
+}
\def\nothai@globalnumbers{%
\let\@arabic\orig@arabic%
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
- }
-
-\def\thai@font{%
- \@ifundefined{thaifont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{thai}%
- \if@tempswa
- \addfontfeature{Script=Thai}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Thai script!^^J
- Please define \string\thaifont\space with \string\newfontfamily}%
- \fi}%
- {\thaifont}%
}
-\def\selectnormalfontthai{%
- \let\normalfont=\thai@font%
- \let\rmfamily=\thai@font%
- \let\sffamily=\thai@font%
- \let\ttfamily=\thai@font%
- \def\reset@font{\normalfont}}
-
-\def\thai@language{\language=\l@nohyphenation}
-
\def\blockextras@thai{%
+%%TODO \XeTeXlinebreaklocales "th"% uses ICU to find line breaks on the basis of a dictionary lookup-- make this optional? (in case a user might prefer a preprocessor
\let\orig@baselinestrech\baselinestretch%
\renewcommand{\baselinestretch}{1.2}%
- }
+}
\def\noblockextras@thai{%
+%%TODO \XeTeXlinebreaklocales "en"%
\let\baselinestrech\orig@baselinestretch%
- }
+}
+
% \end{macrocode}
% \iffalse
%</gloss-thai.ldf>
@@ -8201,25 +8550,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ProvidesFile{gloss-turkish.ldf}[polyglossia: module for turkish]
\RequirePackage{hijrical}
\makeatletter
-
-\def\turkish@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{turkishfont}{%
- \zf@check@ot@lang{TUR}%
- \if@tempswa
- \addfontfeature{Language=Turkish}%
- \else
- \zf@check@ot@lang{TRK}%
- \if@tempswa
- \addfontfeature{Language=Turkish}\fi%
- \fi}
- {\turkishfont}%
-}%
-
-\ifx\l@turkish\@undefined
- \xpg@nopatterns{turkish}
- \adddialect\l@turkish\l@nohyphenation
-\fi
+\PolyglossiaSetup{turkish}{
+ hyphennames={turkish},
+ hyphenmins={2,2},
+ langtag=TRK,
+ frenchspacing=true,
+ fontsetup=true
+ }
\newXeTeXintercharclass\turkish@punctthin % ! :
\newXeTeXintercharclass\turkish@punctthick % =
@@ -8228,7 +8565,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\turkish@punctthickspace{{\unskip\nobreakspace}}
\def\turkish@punctuation{%
- \frenchspacing%
\XeTeXinterchartokenstate=1%
\XeTeXcharclass `\! \turkish@punctthin
\XeTeXcharclass `\: \turkish@punctthin
@@ -8238,7 +8574,9 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\noturkish@punctuation{%
- \nonfrenchspacing%
+ \XeTeXcharclass `\! \z@
+ \XeTeXcharclass `\: \z@
+ \XeTeXcharclass `\= \z@
\XeTeXinterchartokenstate=0%
}
@@ -8279,10 +8617,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\DefineFormatHijriDate{turkish}{%
\number\value{Hijriday}\space\hijrimonthturkish{\value{Hijrimonth}}\space\number\value{Hijriyear}}
-\def\turkish@language{\language=\l@turkish}
-
-\setlocalhyphenmins{turkish}{2}{2}%
-
\def\noextras@turkish{%
\noturkish@punctuation%
}
@@ -8298,6 +8632,57 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-turkish.ldf>
+%<*gloss-turkmen.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-turkmen.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-turkmen.ldf}[polyglossia: module for turkmen]
+%% Translations provided by Nazar Annagurban <nazartm at gmail dot com>
+\makeatletter
+\PolyglossiaSetup{turkmen}{
+ hyphennames={turkmen},
+ hyphenmins={2,2},
+ langtag=TKM,
+ frenchspacing=false,
+ fontsetup=true
+}
+
+\def\captionsturkmen{%
+ \def\prefacename{Sözbaşy}%
+ \def\refname{Çeşmeler}%
+ \def\abstractname{Gysgaça manysy}%
+ \def\bibname{Çeşmeler}%
+ \def\chaptername{Bap}%
+ \def\appendixname{Goşmaça}%
+ \def\contentsname{Mazmuny}%
+ \def\listfigurename{Suratlaryň sanawy}%
+ \def\listtablename{Tablisalaryň sanawy}%
+ \def\indexname{Indeks}%
+ \def\figurename{Surat}%
+ \def\tablename{Tablisa}%
+ \def\partname{Bölüm}%
+ \def\enclname{Goşmaça}%
+ \def\ccname{Iberilenler}%
+ \def\headtoname{Kime}%
+ \def\pagename{Sahypa}%
+ \def\subjectname{Tema}%
+ \def\seename{ser.}%
+ \def\alsoname{şuňa-da ser.}%
+ \def\proofname{Delil}%
+ \def\glossaryname{Sözlük}%
+}
+\def\dateturkmen{%
+ \def\today{\number\day~\ifcase\month\or
+ Ýanwar\or Fewral\or Mart\or Aprel\or Maý\or Iýun\or
+ Iýul\or Awgust\or Sentýabr\or Oktýabr\or Noýabr\or
+ Dekabr\fi
+ \space\number\year}%
+}
+% \end{macrocode}
+% \iffalse
+%</gloss-turkmen.ldf>
%<*gloss-ukrainian.ldf>
% \fi
% \clearpage
@@ -8307,35 +8692,17 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ProvidesFile{gloss-ukrainian.ldf}[polyglossia: module for ukrainian]
% Strings taken from Babel
% and revised by Roman Kyrylych
-%
\makeatletter
-\ifx\l@ukrainian\@undefined%
- \xpg@nopatterns{Ukrainian}%
- \adddialect\l@ukrainian\l@nohyphenation%
-\fi
-
-\def\ukrainian@font{%
- \@ifundefined{ukrainianfont}{%
- \@ifundefined{cyrillicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{cyrl}%
- \if@tempswa
- \addfontfeature{Script=Cyrillic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Cyrillic script!^^J
- Please define \string\cyrillicfont\space or \string\ukrainianfont\space with \newfontfamily}%
- \fi
- \zf@check@ot@lang{UKR}%
- \if@tempswa\addfontfeature{Language=Ukrainian}\fi
- }%
- {\cyrillicfont%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{UKR}%
- \if@tempswa\addfontfeature{Language=Ukrainian}\fi}}%
- {\ukrainianfont}%
+\PolyglossiaSetup{ukrainian}{
+ script=Cyrillic,
+ scripttag=cyrl,
+ langtag=UKR,
+ hyphennames={ukrainian},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ fontsetup=true
+ %TODO localalph
}
\def\captionsukrainian{%
@@ -8395,29 +8762,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\let\latin@alph\@alph%
\let\@Alph\ukrainian@Alph%
\let\@alph\ukrainian@alph%
- }
+}
\def\noukrainian@numbers{%
\let\@Alph\latin@Alph%
\let\@alph\latin@alph%
}
-\def\ukrainian@language{\language=\l@ukrainian}
-
-\setlocalhyphenmins{ukrainian}{2}{2}%
-
-\def\noextras@ukrainian{%
- \nonfrenchspacing%
- }
-
-\def\blockextras@ukrainian{%
- \frenchspacing%
- }
-
-\def\inlineextras@ukrainian{%
- \frenchspacing%
- }
-
% \end{macrocode}
% \iffalse
%</gloss-ukrainian.ldf>
@@ -8434,12 +8785,16 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\RequirePackage{hijrical}
\makeatletter
-\ifx\l@urdu\@undefined
- %\xpg@nopatterns{urdu}%
- \adddialect\l@urdu\l@nohyphenation
-\fi
-
-\def\urdu@RL{\relax}
+\PolyglossiaSetup{urdu}{
+ script=Arabic,
+ direction=RL,
+ scripttag=arab,
+ langtag=URD,
+ hyphennames={urdu,nohyphenation},
+ fontsetup=true
+ %TODO localalph={abjad,abjad}
+ %TODO localnumber=urdunumber
+}
\newif\if@western@numerals
\def\tmp@western{western}
@@ -8449,6 +8804,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\else\@western@numeralsfalse%
\fi}
+%% TODO USE boolkey instead !!!
%this is needed for \abjad in arabicnumbers.sty
\def\tmp@true{true}
\define@key{urdu}{abjadjimnotail}[true]{%
@@ -8480,32 +8836,32 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%\Hijritoday is now locale-aware and will format the date with this macro:
\DefineFormatHijriDate{urdu}{\@ensure@RTL{%
-\urdunumber{\value{Hijriday}}؍\space\urduhijrimonth{\value{Hijrimonth}}\space\urdunumber{\value{Hijriyear}}}}
+ \urdunumber{\value{Hijriday}}؍\space\urduhijrimonth{\value{Hijrimonth}}\space\urdunumber{\value{Hijriyear}}}}
\def\captionsurdu{%
-\def\refname{\@ensure@RTL{حوالہ جات}}%
-\def\abstractname{\@ensure@RTL{ملخّص}}%
-\def\bibname{\@ensure@RTL{کتابیات}}%
-\def\prefacename{\@ensure@RTL{دیباچہ}}%
-\def\chaptername{\@ensure@RTL{باب}}%
-\def\appendixname{\@ensure@RTL{ضمیمہ}}%
-\def\contentsname{\@ensure@RTL{فہرست عنوانات}}%
-\def\listfigurename{\@ensure@RTL{فہرست اشکال}}%
-\def\listtablename{\@ensure@RTL{فہرست جداول}}%
-\def\indexname{\@ensure@RTL{اشاریہ}}%
-\def\figurename{\@ensure@RTL{شكل}}%
-\def\tablename{\@ensure@RTL{جدول}}%
-%\def\thepart{\text<lang>{}}%
-\def\partname{\@ensure@RTL{حصّہ}}%
-\def\pagename{\@ensure@RTL{صفحہ}}%
-\def\seename{\@ensure@RTL{ملاحظہ ہو}}%
-\def\alsoname{\@ensure@RTL{ایضاً}}%
-\def\enclname{\@ensure@RTL{منسلک}}%
-\def\ccname{\@ensure@RTL{نقل}}%
-\def\headtoname{\@ensure@RTL{بملاحظہ}}%
-\def\proofname{\@ensure@RTL{ثبوت}}%
-\def\glossaryname{\@ensure@RTL{لغت}}%
-\def\sectionname{\@ensure@RTL{فصل}}%
+ \def\refname{\@ensure@RTL{حوالہ جات}}%
+ \def\abstractname{\@ensure@RTL{ملخّص}}%
+ \def\bibname{\@ensure@RTL{کتابیات}}%
+ \def\prefacename{\@ensure@RTL{دیباچہ}}%
+ \def\chaptername{\@ensure@RTL{باب}}%
+ \def\appendixname{\@ensure@RTL{ضمیمہ}}%
+ \def\contentsname{\@ensure@RTL{فہرست عنوانات}}%
+ \def\listfigurename{\@ensure@RTL{فہرست اشکال}}%
+ \def\listtablename{\@ensure@RTL{فہرست جداول}}%
+ \def\indexname{\@ensure@RTL{اشاریہ}}%
+ \def\figurename{\@ensure@RTL{شكل}}%
+ \def\tablename{\@ensure@RTL{جدول}}%
+ %\def\thepart{\text<lang>{}}%
+ \def\partname{\@ensure@RTL{حصّہ}}%
+ \def\pagename{\@ensure@RTL{صفحہ}}%
+ \def\seename{\@ensure@RTL{ملاحظہ ہو}}%
+ \def\alsoname{\@ensure@RTL{ایضاً}}%
+ \def\enclname{\@ensure@RTL{منسلک}}%
+ \def\ccname{\@ensure@RTL{نقل}}%
+ \def\headtoname{\@ensure@RTL{بملاحظہ}}%
+ \def\proofname{\@ensure@RTL{ثبوت}}%
+ \def\glossaryname{\@ensure@RTL{لغت}}%
+ \def\sectionname{\@ensure@RTL{فصل}}%
}
\def\dateurdu{%
@@ -8524,97 +8880,41 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\else
%%FIXME use farsidigits instead???
\protect\arabicdigits{\number#1}%
- %%{\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
\fi}
\def\urdu@numbers{%
- \let\@latinalph\@alph%
- \let\@latinAlph\@Alph%
- \let\@alph\abjad%
- \let\@Alph\abjad%
+ \let\@latinalph\@alph%
+ \let\@latinAlph\@Alph%
+ \let\@alph\abjad%
+ \let\@Alph\abjad%
}
+
\def\nourdu@numbers{%
\let\@alph\@latinalph%
\let\@Alph\@latinAlph%
}
-\def\urdu@globalnumbers{%
- \let\orig@arabic\@arabic%
- \let\@arabic\urdunumber%
- % For some reason \thefootnote needs to be set separately:
- \renewcommand\thefootnote{\protect\urdunumber{\c@footnote}}%
- }
-\def\nourdu@globalnumbers{
- \let\@arabic\orig@arabic%
- \renewcommand\thefootnote{\protect\number{\c@footnote}}%
- }
-
-\def\urdu@language{\language=\l@urdu}
-\def\urdu@font{%
- \@ifundefined{urdufont}{%
- \@ifundefined{arabicfont}{%
- \normalfontlatin%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@script{arab}%
- \if@tempswa
- \addfontfeature{Script=Arabic}%
- \else
- \PackageError{polyglossia}{^^J
- The current font does not contain the Arabic script!^^J
- Please define \string\arabicfont\space or \string\urdufont\space with \newfontfamily}%
- \fi
- \zf@check@ot@lang{URD}%
- \if@tempswa\addfontfeature{Language=urdu}\fi}%
- {\arabicfont%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@check@ot@lang{URD}%
- \if@tempswa\addfontfeature{Language=urdu}\fi}%
- }%
- {\urdufont}%
-}
-
-% TODO add setup to define Sans and Mono Arabic fonts if desired
-\def\urdu@font@sf{%
- \@ifundefined{urdufontsf}{%
-% \sffamily% FIXME
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa%
-% \addfontfeature{Script=Arabic}%
-% \else%
- \urdu@font%
-% \fi%
- }%
- {\urdufontsf}%
-}
-\def\urdu@font@tt{%
- \@ifundefined{urdufonttt}{%
-% \ttfamily% FIXME
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{arab}%
-% \if@tempswa%
-% \addfontfeature{Script=Arabic}%
-% \else%
- \urdu@font%
-% \fi%
- }%
- {\urdufonttt}%
-}
+\def\urdu@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\urdunumber%
+ % For some reason \thefootnote needs to be set separately:
+ \renewcommand\thefootnote{\protect\urdunumber{\c@footnote}}%
+ }
-\def\selectnormalfonturdu{%
- \let\normalfont=\urdu@font%
- \let\rmfamily=\urdu@font%
- \let\sffamily=\urdu@font@sf%
- \let\ttfamily=\urdu@font@tt%
- \def\reset@font{\normalfont}}
+\def\nourdu@globalnumbers{
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+ }
\def\blockextras@urdu{%
- \let\@@MakeUppercase\MakeUppercase%
- \def\MakeUppercase##1{##1}%
- }
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+
\def\noextras@urdu{%
- \let\MakeUppercase\@@MakeUppercase%
- }
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+
% \end{macrocode}
% \iffalse
%</gloss-urdu.ldf>
@@ -8625,20 +8925,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-usorbian.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-usorbian.ldf}[polyglossia: module for upper sorbian]
-\makeatletter
-\def\usorbian@font{\selectfontfamilylatin}
-\ifx\l@uppersorbian\@undefined
- \ifx\l@usorbian\@undefined
- \xpg@nopatterns{Upper Sorbian}
- \adddialect\l@usorbian\l@nohyphenation
- \let\l@uppersorbian\l@usorbian
- \else
- \let\l@uppersorbian\l@usorbian
- \fi
-\else
- \let\l@usorbian\l@uppersorbian
-\fi
+\PolyglossiaSetup{usorbian}{
+ hyphennames={usorbian,uppersorbian},
+ hyphenmins={2,2},
+ fontsetup=true,
+}
\def\captionsusorbian{%
\def\refname{Referency}%
@@ -8664,23 +8956,20 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Proof}% <-- needs translation
\def\glossaryname{Glossary}% <-- needs translation
}%
+
\def\dateusorbian{%
- \def\today{\number\day.~\ifcase\month\or
+ \def\today{\number\day.~\ifcase\month\or
januara\or februara\or měrca\or apryla\or meje\or junija\or
julija\or awgusta\or septembra\or oktobra\or
nowembra\or decembra\fi
\space \number\year}%
-%TODO implement option olddate:
+ %TODO implement option olddate:
\def\oldtoday{\number\day.~\ifcase\month\or
wulkeho róžka\or małeho róžka\or nalětnika\or
jutrownika\or róžownika\or smažnika\or pražnika\or
žnjenca\or požnjenca\or winowca\or nazymnika\or
hodownika\fi \space \number\year}%
- }
-
-\def\usorbian@language{\language=\l@usorbian}
-
-\setlocalhyphenmins{usorbian}{2}{2}%
+ }
% \end{macrocode}
% \iffalse
@@ -8693,66 +8982,46 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-vietnamese.ldf}[polyglossia: module for vietnamese]
%% Strings contributed by Daniel Owens < dhowens . pmbx . net >
-\makeatletter
-\def\vietnamese@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{vietnamesefont}{%
- \zf@check@ot@lang{VIT}%
- \if@tempswa\addfontfeature{Language=Vietnamese}\fi}
- {\vietnamesefont}%
-}%
-
-\ifx\l@vietnamese\@undefined%
- \xpg@nopatterns{Vietnamese}%
- \adddialect\l@vietnamese\l@nohyphenation%
-\fi
+\PolyglossiaSetup{vietnamese}{
+ hyphennames={vietnamese},
+ hyphenmins={2,2},
+ langtag=VIT,
+ frenchspacing=true,
+ fontsetup=true,
+}
\def\captionsvietnamese{%
- \def\refname{Tài liệu}%
- \def\abstractname{Tóm tắt nội dung}%
- \def\bibname{Tài liệu tham khảo}%
- \def\prefacename{Lời nói đầu}%
- \def\chaptername{Chương}%
- \def\appendixname{Phụ lục}%
- \def\contentsname{Mục lục}%
- \def\listfigurename{Danh sách hình vẽ}%
- \def\listtablename{Danh sách bẳng}%
- \def\indexname{Chỉ mục}%
- \def\figurename{Hình}%
- \def\tablename{Bẳng}%
- \def\partname{Phần}%
- \def\pagename{Trang}%
- \def\seename{Xem}%
- \def\alsoname{Xem thêm}%
- \def\enclname{Kèm theo}%
- \def\ccname{Cùng gửi}%
- \def\headtoname{Gửi}%
- \def\proofname{Chứng minh}%
- \def\glossaryname{Từ điển chú giải}%
- }
+ \def\refname{Tài liệu}%
+ \def\abstractname{Tóm tắt nội dung}%
+ \def\bibname{Tài liệu tham khảo}%
+ \def\prefacename{Lời nói đầu}%
+ \def\chaptername{Chương}%
+ \def\appendixname{Phụ lục}%
+ \def\contentsname{Mục lục}%
+ \def\listfigurename{Danh sách hình vẽ}%
+ \def\listtablename{Danh sách bẳng}%
+ \def\indexname{Chỉ mục}%
+ \def\figurename{Hình}%
+ \def\tablename{Bẳng}%
+ \def\partname{Phần}%
+ \def\pagename{Trang}%
+ \def\seename{Xem}%
+ \def\alsoname{Xem thêm}%
+ \def\enclname{Kèm theo}%
+ \def\ccname{Cùng gửi}%
+ \def\headtoname{Gửi}%
+ \def\proofname{Chứng minh}%
+ \def\glossaryname{Từ điển chú giải}%
+ }
+
\def\datevietnamese{%
- \def\today{%
+ \def\today{%
Ngày \number\day\space
tháng \number\month\space
năm \number\year}%
- }
-
-\def\vietnamese@language{\language=\l@vietnamese}
-
-\setlocalhyphenmins{vietnamese}{2}{2}%
-
-\def\noextras@vietnamese{%
- \nonfrenchspacing%
-}
-
-\def\blockextras@vietnamese{%
- \frenchspacing%
-}
+ }
-\def\inlineextras@vietnamese{%
- \frenchspacing%
-}
% \end{macrocode}
% \iffalse
%</gloss-vietnamese.ldf>
@@ -8763,50 +9032,46 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-welsh.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-welsh.ldf}[polyglossia: module for welsh]
-\makeatletter
-\def\welsh@font{\selectfontfamilylatin}
-\ifx\l@welsh\@undefined%
- \xpg@nopatterns{Welsh}%
- \adddialect\l@welsh\l@nohyphenation%
-\fi
+\PolyglossiaSetup{welsh}{
+ hyphennames={welsh},
+ hyphenmins={2,3},
+ fontsetup=true,
+}
\def\captionswelsh{%
- \def\refname{Cyfeiriadau}%
- \def\abstractname{Crynodeb}%
- \def\bibname{Llyfryddiaeth}%
- \def\prefacename{Rhagair}%
- \def\chaptername{Pennod}%
- \def\appendixname{Atodiad}%
- \def\contentsname{Cynnwys}%
- \def\listfigurename{Rhestr Ddarluniau}%
- \def\listtablename{Rhestr Dablau}%
- \def\indexname{Mynegai}%
- \def\figurename{Darlun}%
- \def\tablename{Taflen}%
- %\def\thepart{}%
- \def\partname{Rhan}%
- \def\pagename{tudalen}%
- \def\seename{gweler}%
- \def\alsoname{gweler hefyd}%
- \def\enclname{amgaeëdig}%
- \def\ccname{copïau}%
- \def\headtoname{At}%
- \def\proofname{Prawf}%
- \def\glossaryname{Rhestr termau}%
- }
+ \def\refname{Cyfeiriadau}%
+ \def\abstractname{Crynodeb}%
+ \def\bibname{Llyfryddiaeth}%
+ \def\prefacename{Rhagair}%
+ \def\chaptername{Pennod}%
+ \def\appendixname{Atodiad}%
+ \def\contentsname{Cynnwys}%
+ \def\listfigurename{Rhestr Ddarluniau}%
+ \def\listtablename{Rhestr Dablau}%
+ \def\indexname{Mynegai}%
+ \def\figurename{Darlun}%
+ \def\tablename{Taflen}%
+ %\def\thepart{}%
+ \def\partname{Rhan}%
+ \def\pagename{tudalen}%
+ \def\seename{gweler}%
+ \def\alsoname{gweler hefyd}%
+ \def\enclname{amgaeëdig}%
+ \def\ccname{copïau}%
+ \def\headtoname{At}%
+ \def\proofname{Prawf}%
+ \def\glossaryname{Rhestr termau}%
+ }
+
\def\datewelsh{%
- \def\today{\ifnum\day=1\relax 1\/\textsuperscript{añ}\else%
+ \def\today{\ifnum\day=1\relax 1\/\textsuperscript{añ}\else
\number\day\fi\space\ifcase\month\or
- Ionawr\or Chwefror\or Mawrth\or Ebrill\or
- Mai\or Mehefin\or Gorffennaf\or Awst\or
- Medi\or Hydref\or Tachwedd\or Rhagfyr\fi%
- \space\number\year}%
- }
-
-\def\welsh@language{\language=\l@welsh}
-
-\setlocalhyphenmins{welsh}{2}{3}%
+ Ionawr\or Chwefror\or Mawrth\or Ebrill\or
+ Mai\or Mehefin\or Gorffennaf\or Awst\or
+ Medi\or Hydref\or Tachwedd\or Rhagfyr\fi%
+ \space\number\year}%
+ }
% \end{macrocode}
% \iffalse
@@ -8836,6 +9101,56 @@ U+0039 <> U+0669 ;
% \end{macrocode}
% \iffalse
%</arabicdigits.map>
+%<*bengalidigits.map>
+% \fi
+% \clearpage
+%
+% \subsection{bengalidigits.map}
+% \begin{macrocode}
+; FC ...
+LHSName "Digits"
+RHSName "BengaliDigits"
+
+pass(Unicode)
+U+0030 <> U+09E6 ;
+U+0031 <> U+09E7 ;
+U+0032 <> U+09E8 ;
+U+0033 <> U+09E9 ;
+U+0034 <> U+09EA ;
+U+0035 <> U+09EB ;
+U+0036 <> U+09EC ;
+U+0037 <> U+09ED ;
+U+0038 <> U+09EE ;
+U+0039 <> U+09EF ;
+
+% \end{macrocode}
+% \iffalse
+%</bengalidigits.map>
+%<*devanagaridigits.map>
+% \fi
+% \clearpage
+%
+% \subsection{devanagaridigits.map}
+% \begin{macrocode}
+; FC ...
+LHSName "Digits"
+RHSName "DevanagariDigits"
+
+pass(Unicode)
+U+0030 <> U+0966 ;
+U+0031 <> U+0967 ;
+U+0032 <> U+0968 ;
+U+0033 <> U+0969 ;
+U+0034 <> U+096A ;
+U+0035 <> U+096B ;
+U+0036 <> U+096C ;
+U+0037 <> U+096D ;
+U+0038 <> U+096E ;
+U+0039 <> U+096F ;
+
+% \end{macrocode}
+% \iffalse
+%</devanagaridigits.map>
%<*farsidigits.map>
% \fi
% \clearpage
@@ -8896,14 +9211,14 @@ U+0039 <> U+0E59 ;
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.1.1 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.2.0 ¦
¦ ¦
¦ Modern multilingual typesetting with XeLaTeX ¦
¦ ¦
¦----------------------------------------------¦
This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 57 different languages.
+This version includes support for 68 different languages.
Polyglossia makes it possible to automate the following tasks:
@@ -8946,7 +9261,38 @@ http://github.com/fc7/polyglossia/issues
CHANGES
-1.1.1
+1.2.0 (15-07-2010)
+ * Adapted for fontspec 2.0 (will not work with earlier versions!)
+ * New implementation of a \PolyglossiaSetup interface
+ that simplifies writing gloss-*.ldf files
+ * Many internal enhancements and refactoring
+ (including a patch by Dirk Ulrich)
+ * Improved automatic font setup when \<lang>font is not defined
+ * New environment otherlanguage* (env. equivalent of \foreignlanguage
+ (Enrico Gregorio)
+ * Bugfix to prevent bogus expansion of \{rm,sf,tt}family even in aux files
+ (Enrico Gregorio)
+ * New gloss files for Armenian, Bengali, Occitan, Bengali, Lao,
+ Malayalam, Marathi, Tamil, Telugu, and Turkmen.
+ * New auxiliary packages 'devanagaridigits' and 'bengalidigits'
+ * hijrical no longer loads bidi and checks for incompatible l3calc
+ * Add Babel shorthands for Russian (based on a patch by Vladimir Lomov)
+ * Fix \fnum@{table,figure} for Lithuanian
+ * Various improvements in gloss-russian (provided by Vladimir Lomov and
+ others)
+ * Corrected captions for Bahasai, Lithuanian, Russian, Croatian
+ * Add option indentfirst=true for Spanish, Croation and other languages
+ (NB: indentfirst was previously named frenchindent)
+ * New option 'script' for German: Setting script=fraktur modifies the
+ captions for typesetting in Fraktur.
+ * New command \aemph for Arabic, Farsi, Urdu, etc. to mark emphasis through
+ overlining.
+ * Package option 'nolocalmarks' is now true by default: to activate it the
+ option 'localmarks' must be passed instead.
+ * Loading languages à la Babel as package options is no longer possible (this
+ feature was deprecated since v1.1.0).
+
+1.1.1 (23-03-2010)
* Bugfix for French: explicit spaces before/after double punctuation
signs ("Par exemple : les grands « espaces » du Canada ! ") are
now replaced by the appropriate non-breaking spaces, as in Babel.
@@ -9027,112 +9373,16 @@ CHANGES
------------------------------
- François Charette, Dec 2009
+ François Charette, July 2010
<firmicus ατ gmx δοτ net>
------------------------------
%</README>
-%<*gloss-template.ldf>
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% IMPORTANT: The format of gloss-*.ldf files will become much simpler in v1.2.
-% If you want to write new support files for polyglossia, you are urged to
-% contact the author. The present template will very soon be deprecated!
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{gloss-<lang>.ldf}[polyglossia: module for <lang>]
-\makeatletter
-
-\ifx\l@<lang>\@undefined%
- \xpg@nopatterns{<Lang>}%
- \adddialect\l@<lang>0%
-\fi
-
-\def\captions<lang>{%
- \def\refname{\text<lang>{<++>}}%
- \def\abstractname{\text<lang>{<++>}}%
- \def\bibname{\text<lang>{<++>}}%
- \def\prefacename{\text<lang>{<++>}}%
- \def\chaptername{\text<lang>{<++>}}%
- \def\appendixname{\text<lang>{<++>}}%
- \def\contentsname{\text<lang>{<++>}}%
- \def\listfigurename{\text<lang>{<++>}}%
- \def\listtablename{\text<lang>{<++>}}%
- \def\indexname{\text<lang>{<++>}}%
- \def\figurename{\text<lang>{<++>}}%
- \def\tablename{\text<lang>{<++>}}%
- \def\thepart{\text<lang>{}}%
- \def\partname{\text<lang>{<++>}}%
- \def\pagename{\text<lang>{<++>}}%
- \def\seename{\text<lang>{<++>}}%
- \def\alsoname{\text<lang>{<++>}}%
- \def\enclname{\text<lang>{<++>}}%
- \def\ccname{\text<lang>{<++>}}%
- \def\headtoname{\text<lang>{<++>}}%
- \def\proofname{\text<lang>{<++>}}%
- \def\glossaryname{\text<lang>{<++>}}%
- }
-\def\date<lang>{%
- \def\today{\text<lang>{<++>}}%
- }
-
-%\def\<lang>@font{\normalfontlatin} % <== if the script is Latin
-% else:
-\def\<lang>@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{<lang>font}{%
- \@ifundefined{<script>font}{%
- \zf@check@ot@script{<xxxx>}%xxx
- \if@tempswa%
- \addfontfeature{Script=<Script>}%
- \else%
- \PackageError{polyglossia}{^^J
- The current font does not contain the <Script> script!^^J
- Please define \string\<script>font\space or \string\<lang>font\space with \string\newfontfamily}%
- \fi%
- \zf@check@ot@lang{<XXX>}%xxx
- \if@tempswa\addfontfeature{Language=<Lang>}\fi%
- }%
- {\<script>font%
- \zf@check@ot@lang{<XXX>}%xxx
- \if@tempswa\addfontfeature{Language=<Lang>}\fi%
- }}%
- {\<lang>font}%
-}
-% If script and lang are identical (e.g. Greek, Arabic, Syriac, …), then use this:
-%\def\<lang>@font{%
-% \@ifundefined{<lang>font}{%
-% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-% \zf@check@ot@script{<xxx>}%
-% \if@tempswa%
-% \addfontfeature{Script=<Lang>}%
-% \else%
-% \PackageError{polyglossia}{The current font does not contain the <Lang> script!^^J
-% Please define \string\<lang>font\space with \string\newfontfamily}%
-% \fi%
-% }%
-% {\<lang>font}}
-
-\def\selectnormalfont<lang>{%
- \let\normalfont=\<lang>@font%
- \def\reset@font{\normalfont}}
-
-\def\<lang>@language{\protect\language=\l@<lang>}
-
-\setlocalhyphenmins{<lang>}{2}{2}%
-
-\def\noextras@<lang>{%
- }
-
-\def\blockextras@<lang>{%
- }
-
-\def\inlineextras@<lang>{%
- }
-
-%</gloss-template.ldf>
%<*examples.tex>
\documentclass[a4paper]{article}
\usepackage[no-math]{fontspec}
\usepackage{xltxtra,url}
\usepackage{polyglossia}
+\usepackage{trace}
\setdefaultlanguage{french}
\setotherlanguage[variant=british,ordinalmonthday=false]{english}
\setotherlanguage[variant=poly]{greek}
@@ -9149,7 +9399,7 @@ CHANGES
\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
\newfontfamily\sanskritfont[Script=Devanagari]{Sanskrit 2003}
\newfontfamily\thaifont[Script=Thai]{Norasi}%{Arial Unicode MS}
-\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{TITUS Cyberbit Basic}
+\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{TITUS Cyberbit Basic}%this font does not have OT script tags, but it still seems to work
\newfontfamily\ethiopicfont[Script=Ethiopic]{Abyssinica SIL}
\parskip 1.33\baselineskip
%\newcommand\showhyphmin{\fbox{\the\lefthyphenmin\ \the\righthyphenmin}}
@@ -9275,13 +9525,11 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Scheherazade}%
\newfontfamily\arabicfonttt[Script=Arabic,Scale=.75]{DejaVu Sans Mono}
\newfontfamily\farsifont[Script=Arabic,Scale=1.1,WordSpace=2]{IranNastaliq}
-\usepackage[quiet]{polyglossia}
+\usepackage[quiet,nolocalmarks]{polyglossia}
\setdefaultlanguage[calendar=gregorian,hijricorrection=1,locale=mashriq]{arabic}
\setotherlanguage[variant=british]{english}
\setotherlanguage{farsi}
\parindent 0pt
-\makeatletter
-\makeatother
\title{اختبار دعم اللغة العربية}
\author{فرانسوا شاريت}
\begin{document}
@@ -9292,7 +9540,6 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
\pagenumbering{arabic}
\section{لغات مختلفة}
-
\textbf{العربية}\footnote{%
من «\LR{\textenglish{\url{http://ar.wikipedia.org/wiki/}}\RL{\ttfamily لغة عربية}}»}
أكبر لغات المجموعة السامية من حيث عدد المتحدثين، وإحدى أكثر اللغات انتشارا في
@@ -9335,10 +9582,12 @@ and in many international organisations.
\section{أعمال تأريخية \textenglish{(Calendar operations)}}
-
-\textenglish[variant=us]{\today} = \LR{\today} = \today\ = \Hijritoday%\footnote{
+%\textenglish{\today} = \LTR{\today} =
+\setfootnoteLR
+\today\ = \Hijritoday%\footnote{
% محسوب بـ \textenglish{\textsf{hijrical.sty}}}
-\footnote{ What is this?}
+\LTRfootnote{ What is this?}
+\setfootnoteRL
%\newpage
\subsection{فلان}