summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-23 22:56:28 +0000
committerKarl Berry <karl@freefriends.org>2010-03-23 22:56:28 +0000
commit3e972ccc1affaed1d2183d610a38aac90478ffd7 (patch)
tree61324e4e4a1f35d56d82faebd00148910b0eccd4 /Master/texmf-dist/source/xelatex
parent1245444c38f58a5f2d3cc77bd773a1cf1920ef4d (diff)
polyglossia update (23mar10)
git-svn-id: svn://tug.org/texlive/trunk@17538 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx2800
1 files changed, 1825 insertions, 975 deletions
diff --git a/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/xelatex/polyglossia/polyglossia.dtx
index 34123f248ef..2f6fa85dc0e 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 2009/11/22 16:07
+% Created on 2010/3/23 15:48
%<*internal>
\iffalse
%</internal>
@@ -10,14 +10,14 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.1.0a ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.1.1 ¦
¦ ¦
¦ Modern multilingual typesetting with XeLaTeX ¦
¦ ¦
¦----------------------------------------------¦
This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 55 different languages.
+This version includes support for 57 different languages.
Polyglossia makes it possible to automate the following tasks:
@@ -26,39 +26,79 @@ Polyglossia makes it possible to automate the following tasks:
available), using the package fontspec.
* Switching to a font assigned by the user to a particular script or language.
* Adjusting some typographical conventions in function of the current language
- (such as afterindent, frenchindent, spaces before or after punctuation marks,
+ (such as afterindent, frenchindent, spaces before or after punctuation marks,
etc.).
-* redefining the document strings (like “chapter”, “figure”, “bibliography”).
+* Redefining the document strings (like “chapter”, “figure”, “bibliography”).
* Adapting the formatting of dates (for non-gregorian calendars via external
- packages bundled with polyglossia: currently the hebrew, islamic and farsi
+ packages bundled with polyglossia: currently the Hebrew, Islamic and Farsi
calendars are supported).
-* For languages that have their own numeration system, modifying the formatting
+* For languages that have their own numeration system, modifying the formatting
of numbers appropriately.
-* Ensuring the proper directionality if the document contains languages
+* Ensuring the proper directionality if the document contains languages
written from right to left (via the package bidi, available separately).
-Several features of Babel that do not make sense in the XeTeX world (like font
-encodings, shorthands, etc) are not supported. For German however, several
+Several features of Babel that do not make sense in the XeTeX world (like font
+encodings, shorthands, etc) are not supported. For German however, several
shorthands do make sense and can be activated with the language option babelshorthands=true.
Polyglossia is distributed in the traditional way with *.dtx and *.ins files,
and also comes with a TDS-conformant ready-to-unpack zip file.
-To install from source (i.e. using polyglossia.dtx), run
+To install from source (i.e. using polyglossia.dtx), run
xelatex polyglossia.dtx
-which will generate all files and produce the pdf documentation all at once.
+which will generate all files and produce the pdf documentation all at once.
Alternatively if you have the file polyglossia.ins run
- xetex polyglossia.ins
+ xetex polyglossia.ins
and follow the instructions displayed.
+
+BUGS
+
+Users are encouraged to report bugs on the github tracker:
+http://github.com/fc7/polyglossia/issues
+
+
CHANGES
+1.1.1
+ * 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.
+ * Bugfix for font switching mechanism within Latin script
+ (pending a complete re-implementation in v1.2):
+ the font shape and series are no longer reset when switching language.
+ * New macros for non-Western decimal digits
+ (instead of fontmappings)
+ * New gloss files for Asturian, Lithuanian and Urdu
+ * hijrical.sty is now locale-aware: \hijritoday is
+ formatted differently in Arabic, Farsi, Urdu, Turkish
+ and Bahasa Indonesia.
+---NB: the above five items were not part of v1.1.1-rc1 which was made available on github---
+ * Enable babelshorthands for Dutch
+ * Add missing macro \allowhyphens
+ * Add global option babelshorthands
+ * Support Catalan geminated l
+ * Bugfix when declaring more than one pkg option
+ * Protect \reset@font
+ * Add missing requirement makecmds
+ * Bugfix for smallcaps in captions
+ * Typo for ccname in Hebrew
+ * Add option numerals to gloss-russian
+ * Provide newXeTeXintercharclass when undefined
+ * Bugfix for Russian alph
+ * Remove superfluous level of {} in def of markright
+ * Bugfix for \datecatalan
+ * Change hyphenmins for Sanskrit
+
+1.1.0b
+ * Modify hyphenmins for Sanskrit (Yves Codet)
+ * Bugfixes for Serbian and Bulgarian (Enrico Gregorio)
1.1.0a
* Bugfix for interchar tokens
1.1.0
* Use \newXeTeXintercharclass (thanks to Enrico Gregorio)
* Fixed implementation of shorthands for German (Babel code in file babelsh.def)
- * Arabic (Khaled Hosny):
+ * Arabic (Khaled Hosny):
- Fix abjad form for 3 and 5 and add option abjadjimnotail
- bugfix for \arabicnumber
- make Gregorian calender the default
@@ -81,7 +121,7 @@ CHANGES
* Fix frenchspacing for vietnamese
* Other minor bugfixes
-1.0.2
+1.0.2
This is mostly a bug fixes release.
* Captions corrected in Hebrew, Russian and Spanish
* Removed all \text<lang> wrappers within caption definitions
@@ -96,8 +136,8 @@ CHANGES
* Extended the scope of \syriacabjad
* Added gloss-amharic.ldf (ported from ethiop.ldf in the package ethiop)
-1.0
- * Initial release on CTAN
+1.0
+ * Initial release on CTAN
------------------------------
@@ -119,14 +159,14 @@ CHANGES
____________________________
The polyglossia package
- (C) 2009 François Charette
+ (C) 2008–2010 François Charette
License information appended
\endpreamble
\postamble
- Copyright (C) 2009 by François Charette <firmicus ατ gmx δοτ net>
+ Copyright (C) 2010 by François Charette <firmicus ατ gmx δοτ net>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -147,11 +187,13 @@ CHANGES
\generate{\file{farsical.sty}{\from{polyglossia.dtx}{farsical.sty}}}
\generate{\file{hebrewcal.sty}{\from{polyglossia.dtx}{hebrewcal.sty}}}
\generate{\file{hijrical.sty}{\from{polyglossia.dtx}{hijrical.sty}}}
+\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{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-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}}}
@@ -182,6 +224,7 @@ CHANGES
\generate{\file{gloss-italian.ldf}{\from{polyglossia.dtx}{gloss-italian.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-norsk.ldf}{\from{polyglossia.dtx}{gloss-norsk.ldf}}}
@@ -202,6 +245,7 @@ CHANGES
\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-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}}}
@@ -233,7 +277,7 @@ CHANGES
\definecolor{darkgray}{gray}{0.3}
\definecolor{lightgray}{gray}{0.6}
\definecolor{mygreen}{rgb}{0,.43,0}
-\usepackage[dvipdfm,
+\usepackage[
bookmarks=true,
colorlinks=true,
linkcolor=myblue,
@@ -242,17 +286,20 @@ CHANGES
hyperindex=false,
hyperfootnotes=false,
pdftitle={Polyglossia: A Babel replacement for XeLaTeX},
- pdfauthor={F Charette <firmicus ατ gmx δοτ net>},
+ pdfauthor={F Charette <firmicus · gmx · net>},
pdfkeywords={xetex, xelatex, multilingual, babel, hyphenation}
]{hyperref}
-\usepackage{polyglossia,farsical}
+\usepackage[babelshorthands]{polyglossia}
+\usepackage{farsical}
\setmainlanguage[variant=uk]{english}
-\setotherlanguages{arabic,hebrew,syriac,greek,russian}
+\setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan}
\newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace}
\newcommand*\pkg[1]{\textsf{\color{myblue}#1}}
\newcommand*\file[1]{\texttt{\color{myblue}#1}}
\newcommand*\TR[1]{\textcolor{myred}{#1}}
+\newcommand*\TX[1]{\hyperref[#1]{\textcolor{myred}{#1}}}
\newcommand*\TB[1]{\textcolor{myblue}{\bf #1}}
+\newcommand*\link[1]{\href{#1}{#1}}
\def\eg{\textit{e.g.,}\xspace}
\def\ie{\textit{i.e.,}\xspace}
\def\ca{\textit{ca.}\@\xspace}
@@ -260,10 +307,6 @@ CHANGES
\def\Ie{\textit{I.e.,}\xspace}
\def\etc{\@ifnextchar.{\textit{etc}}{\textit{etc.}\@\xspace}}
-\newlength{\oldparindent}
-\newcommand{\parindentoff}{\setlength{\oldparindent}{\parindent} \setlength{\parindent}{0pt}}
-\newcommand{\parindenton}{\setlength{\parindent}{\oldparindent}}
-
%% Sidenotes << copied from fontspec.dtx
\newcommand\warn[2]{%
\edef\thisversion{#1}%
@@ -271,22 +314,22 @@ CHANGES
$\leftarrow$}%
\marginpar{\raggedleft
\small%
- {\ifx\thisversion\fileversion\color{red}\fi$\rightarrow$}%
- \,{\notefont #1:~#2}}}
+ \ifx\thisversion\fileversion\color{red}\fi
+ \notefont #1:~#2}}
\newcommand\new[1]{%
\edef\thisversion{#1}%
\ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
$\leftarrow$}%
- \marginpar{\raggedleft
+ \marginpar{\centering
\small\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
- $\rightarrow$\,{\notefont #1:~New!}}}
+ \notefont #1}}
\newcommand\displaycmd[2]{%
- \\\DescribeMacro{#2}\centerline{\cmd{#1}}}
+ \\\DescribeMacro{#2}\centerline{\cmd{#1}}}
\renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}%
{\end{compactitem}}
\renewenvironment{enumerate}{\begin{compactenum}}{\end{compactenum}}
-
+
%% Sidenote font
\newfontfamily\notefont[Scale=MatchLowercase]{Lucida Sans Unicode}
%%%
@@ -294,14 +337,14 @@ CHANGES
%% fontspec declarations:
\setromanfont[Mapping=tex-text]{Linux Libertine}
\defaultfontfeatures{Scale=MatchLowercase}
-\setmonofont{DejaVu Sans Mono}%{Consolas}
+\setmonofont{DejaVu Sans Mono}
\setsansfont{Lucida Sans Unicode}
\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
\newfontfamily\farsifont[Script=Arabic]{Farsi Simple Bold}
\newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem}
\newfontfamily\hebrewfont[Script=Hebrew]{SBL Hebrew}
-\newcommand\Babel{\pkg{babel}\xspace}
+\newcommand\Babel{\pkg{Babel}\xspace}
\linespread{1.05}
\frenchspacing
@@ -347,7 +390,7 @@ CHANGES
% \section{Introduction}
%
% Polyglossia is a package for facilitating multilingual typesetting with \XeLaTeX.
-% Basically, it can be used as a replacement of \Babel{} for performing the
+% Basically, it can be used as a replacement of \Babel for performing the
% following tasks automatically:
%
% \begin{enumerate}
@@ -355,90 +398,159 @@ CHANGES
% \item Setting the script and language tags of the current font (if possible and
% available), via the package \pkg{fontspec}.
% \item Switching to a font assigned by the user to a particular script or language.
-% \item Adjusting some typographical conventions in function of the current language
-% (such as afterindent, frenchindent, spaces before or after punctuation marks,
+% \item Adjusting some typographical conventions according to the current language
+% (such as afterindent, frenchindent, spaces before or after punctuation marks,
% etc.).
% \item Redefining all document strings (like “chapter”, “figure”, “bibliography”).
-% \item Adapting the formatting of dates (for non-gregorian calendars via external
-% packages bundled with polyglossia: currently the hebrew, islamic and farsi
+% \item Adapting the formatting of dates (for non-Gregorian calendars via external
+% packages bundled with polyglossia: currently the Hebrew, Islamic and Farsi
% calendars are supported).
-% \item For languages that have their own numeration system, modifying the formatting
-% of numbers appropriately (this also includes redefining the alphabetic sequence
-% for non-Latin alphabets).
-% \item Ensuring the proper directionality if the document contains languages
-% that are written from right to left (via the package \pkg{bidi},
+% \item For languages that have their own numbering system, modifying the formatting
+% of numbers appropriately (this also includes redefining the alphabetic sequence
+% for non-Latin alphabets).\footnote{ %
+% For the Arabic script this is now done by the bundled package \pkg{arabicnumbers}.}
+% \item Ensuring proper directionality if the document contains languages
+% that are written from right to left (via the package \pkg{bidi},
% available separately).
% \end{enumerate}
%
-% Several features of \Babel{} that do not make sense in the \XeTeX\ world (like font
-% encodings, shorthands, etc.) are (obviously) not supported.
+% Several features of \Babel that do not make sense in the \XeTeX\ world (like font
+% encodings, shorthands, etc.) are not supported.
% Generally speaking, \pkg{polyglossia} aims to remain as compatible as possible
-% with the fundamental features of \Babel{} while being cleaner, light-weight,
-% and modern. The package \pkg{antomega} has been much beneficial in our attempt to
+% with the fundamental features of \Babel while being cleaner, light-weight,
+% and modern. The package \pkg{antomega} has been very beneficial in our attempt to
% reach this objective.
%
% \paragraph{Requirements:} The current version of \pkg{polyglossia} makes use of some convenient
-% macros defined in the \pkg{etoolbox} package by Philipp Lehmann. Being designed
+% macros defined in the \pkg{etoolbox} package by Philipp Lehmann. Being designed
% specifically for \XeLaTeX, it obviously also relies on \pkg{fontspec} by Will
% Robertson. For languages written from right to left, it needs the package \pkg{bidi}
-% (by the present author). Polyglossia also bundles three packages for calendaric
+% by Vafa Khalighi (\textarabic{وفا خليقي}). Polyglossia also bundles three packages for calendaric
% computations (\pkg{hebrewcal}, \pkg{hijrical}, and \pkg{farsical}).
%
% \section{Loading language definition files}
%
% \subsection{The recommended way}
-% You can determine the default language by means of the command:
-% \displaycmd{\setdefaultlanguage[⟨options⟩]\{lang\}}{\setdefaultlanguage}
-% (or equivalently \Cmd\setmainlanguage).
-% Secondary languages can be loaded with
+% You can determine the default language by means of the command:
+% \displaycmd{\setdefaultlanguage[⟨options⟩]\{lang\}}{\setdefaultlanguage}
+% (or equivalently \Cmd\setmainlanguage).
+% Secondary languages can be loaded with
% \displaycmd{\setotherlanguage[⟨options⟩]\{lang\}}{\setotherlanguage}.
-% These commands have the advantage of being explicit and of allowing to set
+% These commands have the advantage of being explicit and of allowing you to set
% language-specific options.\footnote{ %
% More on language-specific options below.}
-% It is also possible to load a series of secondary languages at once using
+% It is also possible to load a series of secondary languages at once using
% \displaycmd{\setotherlanguages\{lang1,lang2,lang3,…\}}{\setotherlanguages}.
-% Language-specific options can be set or changed at any time by means of
+% Language-specific options can be set or changed at any time by means of
% \displaycmd{\setkeys\{⟨lang⟩\}\{opt1=value1,opt2=value2,…\}}{\setkeys}.
-%
+%
%
% \subsection{The “Babel way”}
-% As with \Babel{}, \pkg{polyglossia} also allows to load language definition files
+% 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
+% Note also that this method may not work in some cases, and should be
% considered deprecated.
%
% \subsection{Supported languages}
%
% Table~\ref{tab:lang} lists all languages currently supported.
-% Those in red have specific options and/or command
+% Those in red have specific options and/or commands
% that are explained in section \ref{specific} below.
%
% \begin{table}[h]\centering
% \label{tab:lang}
-% \begin{tabular}{lllll}\hline
-% albanian & croatian & galician & \TR{lsorbian} &\TR{serbian} \\
-% amharic\footnotemark & czech & \TR{german} & \TR{magyar}& slovak \\
-% \TR{arabic}& danish & \TR{greek} & norsk & slovenian\\
-% bahasai & divehi & \TR{hebrew} & nynorsk & spanish \\
-% bahasam & dutch & hindi & polish & swedish \\
-% basque &\TR{english}& icelandic & portuges & \TR{syriac} \\
-% brazil &\TR{esperanto}& interlingua & romanian & \TR{thai} \\
-% breton & estonian & irish &\TR{russian}& turkish \\
-% bulgarian&\TR{farsi} & italian & samin & ukrainian \\
-% catalan & finnish & latin & sanskrit &\TR{usorbian} \\
-% coptic & french & latvian & scottish & welsh \\
+% ^^Aalbanian
+% ^^Aamharic
+% ^^A\TX{arabic}
+% ^^Aasturian
+% ^^Abahasai
+% ^^Abahasam
+% ^^Abasque
+% ^^Abrazil
+% ^^Abreton
+% ^^Abulgarian
+% ^^A\TX{catalan}
+% ^^Acoptic
+% ^^Acroatian
+% ^^Aczech
+% ^^Adanish
+% ^^Adivehi
+% ^^A\TX{dutch}
+% ^^A\TX{english}
+% ^^A\TX{esperanto}
+% ^^Aestonian
+% ^^A\TX{farsi}
+% ^^Afinnish
+% ^^Afrench
+% ^^Agalician
+% ^^A\TX{german}
+% ^^A\TX{greek}
+% ^^A\TX{hebrew}
+% ^^Ahindi
+% ^^Aicelandic
+% ^^Ainterlingua
+% ^^Airish
+% ^^Aitalian
+% ^^Alatin
+% ^^Alatvian
+% ^^Alithuanian
+% ^^A\TX{lsorbian}
+% ^^A\TX{magyar}
+% ^^Anorsk
+% ^^Anynorsk
+% ^^Apolish
+% ^^Aportuges
+% ^^Aromanian
+% ^^A\TX{russian}
+% ^^Asamin
+% ^^Asanskrit
+% ^^Ascottish
+% ^^A\TX{serbian}
+% ^^Aslovak
+% ^^Aslovenian
+% ^^Aspanish
+% ^^Aswedish
+% ^^A\TX{syriac}
+% ^^A\TX{thai}
+% ^^Aturkish
+% ^^Aukrainian
+% ^^Aurdu
+% ^^A\TX{usorbian}
+% ^^Awelsh
+% ^^A 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 & \\
% \hline
% \end{tabular}
% \caption{Languages currently supported in \pkg{polyglossia}}
% \end{table}
-% \footnotetext{ New in version 1.0.1. This should be considered an experimental attempt to
-% port the package \pkg{ethiop}. Feedbacks are welcome.}
%
-% Some options are convenient shortcuts for loading languages with
+% \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}.
+%
+% Some package options are convenient shortcuts for loading languages with
% specific options:
%
% \begin{itemize}
@@ -453,8 +565,13 @@ CHANGES
% \item polygreek = greek with option ‘variant=polytonic’ (or ‘poly’)
% \item ancientgreek = greek with option ‘variant=ancient’
% \end{itemize}
-% Another option (turned off by default) is ‘nolocalmarks’, which
-% prevents the redefinition of the internal \LaTeX\ macros
+%
+% 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.
%
% There is also the option ‘quiet’ which turns off most info messages and some of the warnings
@@ -466,10 +583,10 @@ CHANGES
% the command \cmd{\text⟨lang⟩[⟨options⟩]\{…\}} \DescribeMacro{\text⟨lang⟩}
% becomes available for short insertions of text in that language.
% For example ¦\textrussian{\today}¦ yields \textrussian{\today}
-% Longer passages are better put between the environment ¦⟨lang⟩¦
+% Longer passages are better put between the environment ¦⟨lang⟩¦
% (again with the possibility of setting language options locally.
% \DescribeEnv{⟨lang⟩}
-% For instance the following allows us to quote the beginning
+% For instance the following allows us to quote the beginning
% of Homer’s \textit{Iliad}:
%
% \begin{Verbatim}[formatcom=\color{myblue}]
@@ -478,7 +595,7 @@ CHANGES
% ἔθηκε, πολλὰς δ' ἰφθίμους ψυχὰς Ἄϊδι προί̈αψεν ἡρώων, αὐτοὺς δὲ ἑλώρια
% τεῦχε κύνεσσιν οἰωνοῖσί τε πᾶσι, Διὸς δ' ἐτελείετο βουλή, ἐξ οὗ δὴ τὰ
% πρῶτα διαστήτην ἐρίσαντε Ἀτρεί̈δης τε ἄναξ ἀνδρῶν καὶ δῖος Ἀχιλλεύς.
-% \end{greek}
+% \end{greek}
% \end{Verbatim}
%
% \begin{greek}[variant=ancient]
@@ -486,7 +603,7 @@ CHANGES
% πολλὰς δ' ἰφθίμους ψυχὰς Ἄϊδι προί̈αψεν ἡρώων, αὐτοὺς δὲ ἑλώρια τεῦχε κύνεσσιν
% οἰωνοῖσί τε πᾶσι, Διὸς δ' ἐτελείετο βουλή, ἐξ οὗ δὴ τὰ πρῶτα διαστήτην ἐρίσαντε
% Ἀτρεί̈δης τε ἄναξ ἀνδρῶν καὶ δῖος Ἀχιλλεύς.
-% \end{greek}
+% \end{greek}
% \bigskip
%
% Note that for Arabic one cannot use the environment ¦arabic¦,
@@ -505,56 +622,57 @@ CHANGES
%
% \begin{Arabic}
% اعلم أنّ فنّ التاريخ فنّ عزيز المذهب، جمّ الفوائد، شريف الغاية؛ إذ هو يوقفنا على
-% أحوال الماضين من الأمم في أخلاقهم، والأنبياء في سيرهم، والملوك في دولهم
+% أحوال الماضين من الأمم في أخلاقهم، والأنبياء في سيرهم، والملوك في دولهم
% وسياستهم؛ حتّى تتمّ فائدة الإقتداء في ذلك لمن يرومه في أحوال الدين والدنيا.
% \end{Arabic}
%
% \subsection{Other commands}
-% The following commands are probably of lesser interest to the end user, but
+% The following commands are probably of lesser interest to the end user, but
% ought to be mentioned here.
% \begin{itemize}
-% \item \Cmd\selectbackgroundlanguage: this selects the global font setup and
-% the numeration definitions for the default language.
+% \item \Cmd\selectbackgroundlanguage: this selects the global font setup and
+% the numbering definitions for the default language.
%
-% \item \Cmd\resetdefaultlanguage\ (experimental):
+% \item \Cmd\resetdefaultlanguage\ (experimental):
% completely switches the default language
% to another one in the middle of a document: \textit{this may have adverse effects}!
%
% \item \Cmd\normalfontlatin: in an environment where \cmd\normalfont\ has been redefined
% to a non-latin script, this will call the font defined with \cmd\setromanfont\ etc.
-% Likewise it is possible to use \Cmd\rmfamilylatin, \Cmd\sffamilylatin,
+% Likewise it is possible to use \Cmd\rmfamilylatin, \Cmd\sffamilylatin,
% and \Cmd\ttfamilylatin.
%
-% \item Some macros defined in \Babel’s \file{hyphen.cfg} (and thus usually
+% \item Some macros defined in \Babel’s \file{hyphen.cfg} (and thus usually
% compiled into the xelatex format) are redefined, but keep a similar
% behaviour, namely \Cmd\selectlanguage, \Cmd\foreignlanguage,
% and the environment ¦otherlanguage¦\DescribeEnv{otherlanguage}.
% \end{itemize}
% ^^A
-% Since the \XeLaTeX\ format incorporates \Babel{}'s \file{hyphen.cfg},
+% Since the \XeLaTeX\ format incorporates \Babel’s \file{hyphen.cfg},
% the low-level commands for hyphenation and language switching
-% defined there are also accessible.\footnote{ %
-% The file \file{hyphen\_cfg} (available on the
-% \href{http://scripts.sil.org/svn-view/xetex/TRUNK/texmf/tex/xelatex/polyglossia/hyphen\_cfg}{\XeTeX\ subversion repository})
-% is meant to eventually replace \Babel’s \file{hyphen.cfg}. If you want
-% to experiment with it, rename it into \file{hyphen.cfg}, copy it to
-% \texttt{…/tex/xelatex/polyglossia/} and rebuild the xelatex format.}
+% defined there are also accessible.
+% ^^A\footnote{ %
+% ^^A The file \file{hyphen\_cfg} (available on the
+% ^^A \href{http://scripts.sil.org/svn-view/xetex/TRUNK/texmf/tex/xelatex/polyglossia/hyphen\_cfg}{\XeTeX\ subversion repository})
+% ^^A is meant to eventually replace \Babel’s \file{hyphen.cfg}. If you want
+% ^^A to experiment with it, rename it into \file{hyphen.cfg}, copy it to
+% ^^A \texttt{…/tex/xelatex/polyglossia/} and rebuild the xelatex format.}
%
%
% \section{Font setup}
%
% With polyglossia it is possible to associate a specific font with any script or language
% that occurs in the document. That font should always be defined as
-% ¦\⟨script⟩font¦\ or ¦\⟨language⟩font¦.
+% ¦\⟨script⟩font¦\ or ¦\⟨language⟩font¦.
% For instance, if the default roman font defined by \cmd\setromanfont\
% 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.
%
-% Whenever a new language is activated, \pkg{polyglossia} will first check whether
+% 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 –
-% for the script it uses. If it is not defined, it will use the currently active font
-% and will attempt to turn on the appropriate OpenType tags for the script
+% for the script it uses. If it is not defined, it will use the currently active font
+% and will attempt to turn on the appropriate OpenType tags for the script
% and language used, in case these are available in the font, by means of \pkg{fontspec}’s
% \cmd\addfontfeature. If the current font does not appear to support the script
% of that language, an error message is displayed.
@@ -564,22 +682,22 @@ CHANGES
% This section gives a list of all languages for which options and end-user commands are defined.
% The default value of each option is given in italic.
%
-% ^^A\subsection{amharic}
+% ^^A\subsection{amharic}\label{amharic}
%
-% \subsection{arabic}
-% \textbf{Options}:
+% \subsection{arabic}\label{arabic}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{calendar} = \textit{gregorian} or islamic (= hijri)
% \item \TB{locale} = \textit{default},\footnote{ %
-% For Egypt, Sudan, Yemen and the Golf states.}
+% For Egypt, Sudan, Yemen and the Gulf states.}
% mashriq,\footnote{ %
-% For Iraq, Syria, Jordan, Lebanon and Palestine.}
+% For Iraq, Syria, Jordan, Lebanon and Palestine.}
% libya, algeria, tunisia, morocco, or mauritania.
% This setting influences the spelling of the month names for the Gregorian calendar,
% as well as the form of the numerals (unless overriden by the following option).
-% \item \TB{numerals} = \textit{mashriq} or maghrib
+% \item \TB{numerals} = \textit{mashriq} or maghrib
% (the latter is the default when locale = algeria, tunisia or morocco)
-% \item \TB{abjadjimnotail} = \textit{false} or true.\new{1.0.3}
+% \item \TB{abjadjimnotail} = \textit{false} or true. \new{v1.0.3}
% Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍}\ – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
% \end{itemize}
% \textbf{Commands}:
@@ -587,21 +705,51 @@ CHANGES
% \item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
% \end{itemize}
%
-% \subsection{english}
-% \textbf{Options}:
+% \subsection{catalan}\label{catalan}
+% \textbf{Options:}
+% \begin{itemize}
+% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
+% Activates the shorthands \texttt{"l} and \texttt{"L} to type geminated l’s.
+% \end{itemize}
+% \textbf{Commands}:
+% \begin{itemize}
+% \item \Cmd{\l.l} and \Cmd{\L.L} behave as in \Babel to type a geminated l, as in \textit{co\l.laborar}. \new{v1.1.1}
+% In polyglossia the same can also be achieved with \Cmd{\l·l} and \Cmd{\L·L}.\footnote{ %
+% NB: · is the glyph U+00B7 MIDDLE DOT.}
+% \end{itemize}
+%
+% \subsection{dutch}\label{dutch}
+% \textbf{Options:}
+% \begin{itemize}
+% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1}
+% if this is turned on, all shorthands defined in \Babel
+% for fine-tuning the hyphenation of Dutch words are activated.
+% \begin{itemize}
+% \item ¦"-¦ for an explicit hyphen sign, allowing hyphenation in the rest of the word
+% \item ¦"~¦ for a compound word mark without a breakpoint
+% \item ¦"|¦ disables the ligature at this position
+% \item ¦""¦ is like ¦"-¦, but produces no hyphen sign
+% (for compound words with a hyphen, e.g., ¦foo-""bar¦)
+% \item ¦"/¦ to enable hyphenation in two words written together but separated by a slash.
+% \item In addition, the macro \Cmd\- is redefined to allow hyphens in the rest of the word.
+% \end{itemize}
+% \end{itemize}
+%
+% \subsection{english}\label{english}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{variant} = \textit{american} (= us), usmax (same as ‘american’ but with additional hyphenation patterns), british (= uk), australian or newzealand
-% \item \TB{ordinalmonthday} = true/\textit{false} (true by default only when variant = british)
+% \item \TB{ordinalmonthday} = true/\textit{false} (true by default only when variant = british)
% \end{itemize}
%
-% \subsection{esperanto}
+% \subsection{esperanto}\label{esperanto}
% \textbf{Commands}:
% \begin{itemize}
-% \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \Babel\ documentation)
+% \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \Babel documentation)
% \end{itemize}
%
-% \subsection{farsi}
-% \textbf{Options}:
+% \subsection{farsi}\label{farsi}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{numerals} = western or \textit{eastern}
% \item \TB{locale} (not yet implemented)
@@ -612,29 +760,37 @@ CHANGES
% \item \Cmd\abjad (see section \ref{abjad})
% \end{itemize}
%
-% \subsection{german}
-% \textbf{Options}:
+% ^^A\subsection{french}\label{french}
+% ^^A\textbf{Options}:
+% ^^A \begin{itemize}
+% ^^A \item \TB{espacedeuxpoints} = thick or half \new{v1.2}
+% ^^A \footnote{ %
+% ^^A Can be customized by redefining \french@colonspace }
+% ^^A \end{itemize}
+% ^^A
+%
+% \subsection{german}\label{german}
+% \textbf{Options}:
% \begin{itemize}
-% \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901):
-% indicates whether hyphenation patterns for traditional (1901) or reformed
+% \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901):
+% indicates whether hyphenation patterns for traditional (1901) or reformed
% (1996) orthography should be used. The latter is the default.
-% \item \TB{latesthyphen} = \textit{false} or true: if this option is set to true,
-% the latest (experimental) hyphenation patterns ‘(n)german-x-latest’
+% \item \TB{latesthyphen} = \textit{false} or true: if this option is set to true,
+% the latest (experimental) hyphenation patterns ‘(n)german-x-latest’
% will be loaded instead of ‘german’ or ‘ngerman’. NB: This is based on
-% the file \texttt{language.dat} that comes with \TeX Live 2008.
-% \item\TB{babelshorthands} = \textit{false} or true: \new{1.0.3}
-% if this is turned on, all shorthands defined in the Babel
-% language for fine-tuning the hyphenation of German words are
-% activated. (NB: This feature was broken in the previous version.)
+% the file \texttt{language.dat} that comes with \TeX Live 2008 and later.
+% \item\TB{babelshorthands} = \textit{false} or true: \new{v1.0.3}
+% if this is turned on, all shorthands defined in \Babel
+% for fine-tuning the hyphenation of German words are activated.
% \begin{itemize}
% \item ¦"ck¦ for ¦ck¦ to be hyphenated as ¦k-k¦
% \item ¦"ff¦ for ¦ff¦ to be hyphenated as ¦ff-f¦; this is also available for the letters l, m, n, p, r and t
% \item ¦"|¦ disables the ligature at this position
% \item ¦"-¦ for an explicit hyphen sign, allowing hyphenation in the rest of the word
-% \item ¦""¦ is like ¦"-¦, but produces no hyphen sign
-% (for compound words with an hyphen, e.g., ¦foo-""bar¦)
+% \item ¦""¦ is like ¦"-¦, but produces no hyphen sign
+% (for compound words with a hyphen, e.g., ¦foo-""bar¦)
% \item ¦"~¦ for a compound word mark without a breakpoint
-% \item ¦"=¦ for a compound word mark with a breakpoint,
+% \item ¦"=¦ for a compound word mark with a breakpoint,
% allowing hyphenation in the composing words.
% \end{itemize}
%
@@ -647,8 +803,8 @@ CHANGES
% \end{itemize}
% \end{itemize}
%
-% \subsection{greek}
-% \textbf{Options}:
+% \subsection{greek}\label{greek}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{variant} = \textit{monotonic} (= mono), polytonic (= poly), or ancient
% \item \TB{numerals} = \textit{greek} or arabic
@@ -664,11 +820,11 @@ CHANGES
% See the documentation of the \pkg{xgreek} package for more details.}
% \end{itemize}
%
-% \subsection{hebrew}
-% \textbf{Options}:
+% \subsection{hebrew}\label{hebrew}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{numerals} = hebrew or \textit{arabic}
-% \item \TB{calendar} = hebrew or \textit{gregorian}
+% \item \TB{calendar} = hebrew or \textit{gregorian}
% \end{itemize}
% \textbf{Commands}:
% \begin{itemize}
@@ -676,28 +832,28 @@ CHANGES
% \end{itemize}
%
%
-% \subsection{lsorbian and usorbian}
+% \subsection{lsorbian and usorbian}\label{lsorbian}\label{usorbian}
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\oldtoday : see the \Babel documentation.
% \end{itemize}
%
-% \subsection{magyar}
+% \subsection{magyar}\label{magyar}
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\ontoday\ (= \Cmd\ondatemagyar): special forms of \cmd\today\
-% (see the \Babel\ documentation).
+% (see the \Babel documentation).
% \end{itemize}
%
%
-% \subsection{russian}
-% \textbf{Options}:
+% \subsection{russian}\label{russian}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{spelling} = \textit{modern} or old (for captions and date only, not for hyphenation)
% \end{itemize}
%
-% \subsection{sanskrit}
-% \textbf{Options}:
+% \subsection{sanskrit}\label{sanskrit}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{Script} (default = Devanagari). \new{1.0.2}
% The value is passed to \pkg{fontspec} in cases where ¦\sanskritfont¦ or
@@ -705,26 +861,26 @@ CHANGES
% Sanskrit texts in scripts other than Devanagari.
% \end{itemize}
%
-% \subsection{serbian}
-% \textbf{Options}:
+% \subsection{serbian}\label{serbian}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{script} = \textit{cyrillic} or latin
% \end{itemize}
%
-% \subsection{syriac}
-% \textbf{Options}:
+% \subsection{syriac}\label{syriac}
+% \textbf{Options}:
% \begin{itemize}
-% \item \TB{numerals} = \textit{western} (i.e., 1234567890), eastern
+% \item \TB{numerals} = \textit{western} (i.e., 1234567890), eastern
% (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}),
-% or abjad\new{1.0.1}.
+% or abjad. \new{v1.0.1}.
% \end{itemize}
% \textbf{Commands}:
% \begin{itemize}
% \item \Cmd\abjadsyriac (see section \ref{abjad})
% \end{itemize}
%
-% \subsection{thai}
-% \textbf{Options}:
+% \subsection{thai}\label{thai}
+% \textbf{Options}:
% \begin{itemize}
% \item \TB{numerals} = thai or \textit{arabic}
% \end{itemize}
@@ -735,16 +891,38 @@ CHANGES
%
% \section{Modifying or extending captions and date formats}
%
-% To redefine internal macros, you can use the command ¦\gappto¦ from the package
-% \pkg{etoolbox}. For compatibility with Babel the command ¦\addto¦ is also available
-% with the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
+% To redefine internal macros, you can use the command ¦\gappto¦ from the package
+% \pkg{etoolbox}. For compatibility with \Babel the command ¦\addto¦ is also available
+% with the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦,
% you can do this:
% \begin{verbatim}
% \gappto\linguacaptions{\renewcommand{\chaptername}{Caput}}
% \end{verbatim}
%
+% \section{Non-Western decimal digits}
+%
+% Several scripts have their own versions of the decimal digits commonly called
+% ‘Arabic numerals’. With the appropriate language option set, \pkg{polyglossia}
+% will automatically convert the output of internal LaTeX counters to their
+% localized forms, for instance to display page, chapter and section numbers.
+%
+% In previous versions this conversion was achieved my means of TECKit fontmappings.
+% If needed they can be activated with the fontspec option
+% ¦Mapping=arabicdigits¦ (or ¦farsidigits¦ or ¦thaidigits¦).
+% For instance if \cmd\arabicfont\ is defined with the option ¦Mapping=arabicdigits¦,
+% then by typing ¦\textarabic{2010}¦ one will obtain \textarabic{٢٠١٠}.
%
-% \section{Alphabetic numeration in Greek, Arabic, Hebrew, Syriac and Farsi}\label{abjad}
+% With version v1.1.1\new{v1.1.1} the same conversion is achieved directly by
+% simple \TeX\ macros. This prevents some problems that occur when the value of a
+% 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)
+% are also available to the users. For instance in an Arabic environment
+% ¦\arabicdigits{9182/738543-X}¦ yields
+% \textarabic{\arabicdigits{9182/738543-X}}.
+%
+% \section{Alphabetic numbering in Greek, Arabic, Hebrew, Syriac and Farsi}\label{abjad}
%
% In certain languages, numbers can be represented
% by a special alphanumerical notation.\footnote{ %
@@ -752,72 +930,77 @@ CHANGES
% \url{http://en.wikipedia.org/wiki/Abjad_numerals},
% and \url{http://en.wikipedia.org/wiki/Hebrew_numerals}.}
% ^^A \url{http://en.wikipedia.org/wiki/Syriac_alphabet}
-% Note that the Hebrew implementation in \pkg{polyglossia} is currently less
-% sophisticated than the one in \Babel, where various special cases are taken into
-% account.
%
% The Greek numerals are obtained with \Cmd\greeknumeral (or \Cmd\Greeknumeral\ in uppercase).
% Example: ¦\greeknumeral{1863}¦ yields \textgreek{\greeknumeral{1863}}.
%
% The Arabic \textit{abjad} numbers can be generated with the command \Cmd\abjad.
% Example: ¦\abjad{1863}¦ yields {\arabicfont\abjad{1863}}.
-% In the Maghrib the conventions are somewhat different, and the maghribi forms
+% In the Maghrib the conventions are somewhat different, and the maghribi forms
% of the \textit{abjad} numerals are obtained with the \Cmd\abjadmaghribi\ command.
% Example: ¦\abjadmaghribi{1863}¦ yields {\arabicfont\abjadmaghribi{1863}}.
%
-% Hebrew numerals are generated with the command \Cmd\hebrewnumeral.
-% Example:
-% ¦\hebrewnumeral{1863}¦ yields {\hebrewfont\hebrewnumeral{1863}}.
-%
-% Support is also provided for Syriac abjad numerals, which can be generated
-% with \Cmd\abjadsyriac.
+% 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
+% user interface is identical to the one in \Babel.
+% 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:
+% ¦\hebrewnumeral{1750}¦ yields {\hebrewfont\hebrewnumeral{1750}}.
+% ¦\Hebrewnumeral{1750}¦ yields {\hebrewfont\Hebrewnumeral{1750}}.
+% ¦\Hebrewnumeralfinal{1750}¦ yields {\hebrewfont\Hebrewnumeralfinal{1750}}.
+%
+%
+% Support is also provided for Syriac abjad numerals, which can be generated
+% with \Cmd\abjadsyriac.\footnote{ %
+% A fine guide to numerals in Syriac can be found at \link{http://www.garzo.co.uk/documents/syriac-numerals.pdf}.}
% Example: ¦\abjadsyriac{463}¦ yields {\syriacfont\abjadsyriac{463}}.
%
-% \section{Mappings for Arabic, Farsi and Thai numerals}
-%
-% Three fontmappings are provided with polyglossia to allow the automatic
-% conversion of the standard Western numerals (0123456789) in their Arabic,
-% Farsi, or Thai forms. To activate them, one should use the fontspec option
-% Mapping=arabicdigits (or farsidigits or thaidigits).
-% For instance if \cmd\syriacfont\ is defined with the option ¦Mapping=arabicdigits¦,
-% then by typing ¦\textsyriac{2008}¦ one obtains \textsyriac{٢٠٠٨}.
-%
%
% \section{Calendars}
%
% \subsection{Hebrew calendar (hebrewcal.sty)}
% The package \file{hebrewcal.sty} is almost a verbatim copy of \file{hebcal.sty}
-% that comes with \Babel.
-% The command \Cmd\Hebrewtoday\\ formats the current date in the Hebrew calendar
-% (depending of the current writing direction this will automatically set either
+% that comes with \Babel.
+% The command \Cmd\Hebrewtoday\ formats the current date in the Hebrew calendar
+% (depending of the current writing direction this will automatically set either
% in Hebrew script or in roman transliteration).
%
% \subsection{Islamic calendar (hijrical.sty)}
-% This new package computes dates in the Islamic (Hijra) calendar, which is lunar.\footnote{ %
-% It makes use of the arithmetical algorithm in chapter 6 of
-% Reingold \& Gershowitz, \textit{Calendrical calculation: the Millenium edition}
+% This package computes dates in the lunar Islamic (Hijra) calendar.\footnote{ %
+% It makes use of the arithmetical algorithm in chapter 6 of
+% Reingold \& Gershowitz, \textit{Calendrical calculation: the Millenium edition}
% (Cambridge University Press, 2001).\label{reingold}}
% It provides two macros for the end-user.
-% The command
+% 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 (depending of the
-% current writing direction this is set either in Arabic or in roman transliteration).
-% It also accepts an optional argument to add or subtract a correction
+% 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
+% provide a localized version of ¦\Hijritoday¦.
+% 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}.
+%
+% The command ¦\Hijritoday¦ also accepts an optional argument to add or subtract a correction
% (in days) to the date computed by the arithmetical algorithm.\footnote{ %
-% The Islamic calendar is indeed a purely lunar calendar based on the observation
+% The Islamic calendar is indeed a purely lunar calendar based on the observation
% of the first visibility of the lunar crescent at the beginning of the lunar month,
% so there can be differences between different localities, as well as between
% civil and religious authorities.}
-% For instance if ¦\Hijritoday¦ yields the date “7 Rajab 1429” (which is the date that was
+% For instance if ¦\Hijritoday¦ yields the date “7 Rajab 1429” (which is the date that was
% displayed on the front page of \href{http://www.aljazeera.net}{aljazeera.net} on
% 11th July 2008), ¦\Hijritoday[1]¦ would rather print “8 Rajab 1429” (the date
% indicated the same day on the site \href{http://www.gulfnews.com}{gulfnews.com}).
%
% \subsection{Farsi (jalālī) calendar (farsical.sty)}
-% Again this is taken almost verbatim from ¦Arabiftoday.sty¦ (in the \pkg{Arabi} package),
-% itself a slight modification of the file ¦ftoday.sty¦ in Farsi\TeX.\footnote{ %
-% I intend to rewrite \pkg{farsical} from scratch using the algorithm in
+% This package is an almost verbatim copy of ¦Arabiftoday.sty¦ (in the \pkg{Arabi} package),
+% itself a slight modification of ¦ftoday.sty¦ in Farsi\TeX.\footnote{ %
+% 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.
@@ -833,14 +1016,19 @@ 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}). I should also thank other
+% (\pkg{arabi}), and Vafa Khalighi (\pkg{xepersian} and \pkg{bidi}). 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),
+% 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.
-% And of course my gratitude also goes to Jonathan Kew, the formidable author of \XeTeX!
+% 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.
+% And of course my gratitude also goes to Jonathan Kew, the formidable author of \XeTeX!
%
%
%
@@ -854,9 +1042,10 @@ CHANGES
% \subsection{polyglossia.sty}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2009/11/20 v1.1.0
+\ProvidesPackage{polyglossia}[2010/03/23 v1.1.1
Babel replacement for XeLaTeX]
\RequirePackage{etoolbox}
+\RequirePackage{makecmds}
\RequirePackage{fontspec} %which itself depends on xkeyval
%% This is for compatibility with Babel-aware package:
@@ -874,20 +1063,18 @@ CHANGES
{#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 loaded for \string\language=0\MessageBreak instead}}
+ 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.}}%
+ I will nevertheless try to use hyphenation patterns for #1.}}%
%TODO try at least to load the hyphenation patterns for #1.
\def\xpg@ill@value#1#2{%
\xpg@warning{Illegal value (#1) for #2}}
%% use macro if defined, else warn that it is not
-\def\xpg@csifdef@warn#1{%
- \ifcsundef{#1}{\PackageWarning{polyglossia}{ #1 is not defined}}%
- {\expandafter\protect\csname #1\endcsname}}
-%% same without warning
-\def\xpg@csifdef#1{\ifcsundef{#1}{\relax}{\expandafter\protect\csname #1\endcsname}}
+\def\csuse@warn#1{%
+ \ifcsundef{#1}{\xpg@warning{ \expandafter\string\csname #1\endcsname\space is not defined}}%
+ {\csname #1\endcsname}}
%% ensure directionality if bidi is loaded, else ignore
\def\@@ensure@dir#1{\ifcsundef{@ensure@dir}{#1}{\@ensure@dir{#1}}}
@@ -926,17 +1113,16 @@ CHANGES
\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%\ifx\@tmpa\opt@disabled
+ {\protect\@@ensure@maindir{####3}}}}}
+ \else
\def\local@marks##1{}
\xpg@info{Option: localmarks=off}
- %\fi
\fi
}
\setkeys{polyglossia}{localmarks=on}
% to reset the intercharclass of a character to "normal"
-\newXeTeXintercharclass\xpg@normalclass
+\newXeTeXintercharclass\xpg@normalclass %TODO
%% when no patterns are available, we use \l@nohyphenation, assigned to 255
%% (suggestion by Enrico Gregorio)
@@ -972,17 +1158,7 @@ CHANGES
}%
{\PackageWarning{polyglossia}{gloss-#2.ldf is already loaded!}}%
%% The following settings are for the default language and script:
- \ifcsundef{#2@RL}{}%
- {\@rlmaintrue\@rl@footnotetrue%
- \let\@@oddfoot\@oddfoot%
- \let\@@evenfoot\@evenfoot%
- \let\@oddfoot\@@evenfoot%
- \let\@evenfoot\@@oddfoot%
- \let\@@oddhead\@oddhead%
- \let\@@evenhead\@evenhead%
- \let\@oddhead\@@evenhead%
- \let\@evenhead\@@oddhead%
- }%
+ \ifcsundef{#2@RL}{}{\@RTLmaintrue}% this tells bidi.sty that the document is RTL
\AtBeginDocument{%
\selectlanguage[#1]{#2}%
\selectbackgroundlanguage{#2}}%
@@ -995,11 +1171,17 @@ CHANGES
\newcommand{\resetdefaultlanguage}[2][]{%
\ifcsundef{#2@loaded}{%
\PackageError{polyglossia}{gloss-#2.ldf is not loaded!}}%
- {\def\languagename{#2}%
+ {\csuse{no\xpg@main@language @globalnumbers}% disable globalnumbers of previously defined default language
+ \csuse{noextras@\xpg@main@language}%
+ \def\languagename{#2}%
\ifcsundef{#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 saves the normalfont for the latin script since we may change normalfont in other scripts
\let\normalfontlatin=\normalfont%
\let\rmfamilylatin=\rmfamily%
@@ -1012,7 +1194,20 @@ CHANGES
\let\ttfamily=\ttfamilylatin%
\normalfontlatin}
-\def\reset@LR{\xpg@csifdef{setLR}}
+\def\reset@LR{\csuse{setLR}}
+
+\def\selectnormalfontlatin{%
+ \if\normalfont\ttfamily\ttfamilylatin\else
+ \if\normalfont\sffamily\sffamilylatin\else
+ \normalfontlatin\fi\fi}
+
+\DeclareRobustCommand\selectfontfamilylatin{%
+ \def\tmp@tt{tt}\def\tmp@sf{sf}%
+ \ifx\familytype\tmp@tt%
+ \ttfamilylatin%
+ \else\ifx\familytype\tmp@sf%
+ \sffamilylatin%
+ \else\rmfamilylatin\fi\fi}
\let\@@fterindentfalse\@afterindentfalse
\def\french@indent{\let\@afterindentfalse\@afterindenttrue
@@ -1021,8 +1216,8 @@ CHANGES
\@afterindentfalse}
\newcommand{\selectbackgroundlanguage}[1]{%
- \xpg@csifdef{selectnormalfont#1}%
- \xpg@csifdef{#1@globalnumbers}%
+ \csuse{selectnormalfont#1}%
+ \csuse{#1@globalnumbers}%
}
\newcommand{\setotherlanguage}[2][]{%
@@ -1041,12 +1236,12 @@ CHANGES
\fi
\expandafter\newcommand\csname text#2\endcsname[2][]{%
\ifcsdef{RL}{%
- \ifcsundef{#2@RL}%
- {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
+ \ifcsundef{#2@RL}%
+ {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}%
{\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}%
- }{% else
+ }{% else
\foreignlanguage[####1]{#2}{####2}%
- }}%
+ }}%
\csletcs{local#2}{text#2}%
\csgdef{#2@loaded}{}%
}%
@@ -1064,10 +1259,11 @@ CHANGES
\docsvlist{#1}}%
\def\common@language{%
- \protect\language=0%
- \lefthyphenmin=2\righthyphenmin=3}
+ \language=\z@
+ \lefthyphenmin=\tw@
+ \righthyphenmin=\thr@@}
-\def\noextrascurrent#1{\xpg@csifdef{noextras@#1}}
+\def\noextrascurrent#1{\csuse{noextras@#1}}
\def\xpg@initial@setup{\ifcsundef{languagename}{}%
{\noextrascurrent{\languagename}}%
@@ -1075,29 +1271,32 @@ CHANGES
\AtBeginDocument{\xpg@initial@setup}
-\ifcsundef{foreignlanguage}{}%
- {\let\foreignlanguage\@undefined}
+\providecommand{\foreignlanguage}{}
-\newcommand{\foreignlanguage}[3][]{%
+\renewcommand{\foreignlanguage}[3][]{%
\ifcsundef{#2@loaded}{\xpg@nolang{#2}\hyphenrules{#2}}{%
{\def\languagename{#2}%
\setkeys{#2}{#1}%
- \xpg@csifdef@warn{#2@font}%
- \xpg@csifdef@warn{#2@language}%
- \xpg@csifdef{date#2}%
- \xpg@csifdef{#2@numbers}%
+ \csuse@warn{#2@font}%
+ \csuse@warn{#2@language}%
+ \csuse{date#2}%
+ \csuse{#2@numbers}%
\use@localhyphenmins{#2}%
- \xpg@csifdef{inlineextras@#2}%
+ \csuse{inlineextras@#2}%
#3}%
-}}
+ }%
+}
-\ifcsundef{selectlanguage}{}%
- {\let\selectlanguage\@undefined}
+%Hook that other package authors can use
+%(for instance biblatex):
+\newcommand*{\xpg@hook@setlanguage}{}
-\newcommand{\selectlanguage}[2][]{%
+\providecommand{\selectlanguage}{}
+\renewcommand{\selectlanguage}[2][]{%
\ifcsundef{#2@loaded}{\xpg@nolang{#2}\hyphenrules{#2}}{%
\def\xpg@pop@language{%
\xpg@set@language{\languagename}%
+ \xpg@hook@setlanguage%
\let\emp@langname\@undefined}%
\aftergroup\xpg@pop@language%
\setkeys{#2}{#1}%
@@ -1114,34 +1313,28 @@ CHANGES
\fi
}
-\ifcsundef{select@language}{}%
- {\let\select@language\@undefined}
-
-\newcommand{\select@language}[1]{%
+\def\select@language#1{%
\xpg@initial@setup%
\edef\languagename{#1}%
\ifcsundef{RL}{}%
{\ifcsundef{#1@RL}{\setLR}{\setRL}}%
- \xpg@csifdef@warn{#1@font}%
- \xpg@csifdef@warn{#1@language}%
+ \csuse@warn{#1@font}%
+ \csuse@warn{#1@language}%
\use@localhyphenmins{#1}%
- \xpg@csifdef{captions#1}%
- \xpg@csifdef{date#1}%
- \xpg@csifdef{#1@numbers}%
+ \csuse{captions#1}%
+ \csuse{date#1}%
+ \csuse{#1@numbers}%
\local@marks{#1}%
- \xpg@csifdef{blockextras@#1}%
+ \csuse{blockextras@#1}%
}
\let\xpg@pop@language\relax
-\ifcsundef{otherlanguage}{}%
- {\let\otherlanguage\@undefined}
-\ifcsundef{endotherlanguage}{}%
- {\let\endotherlanguage\@undefined}
+\provideenvironment{otherlanguage}{}{}
-\newenvironment{otherlanguage}[2][]{%
- \selectlanguage[#1]{#2}%
- }{}
+\renewenvironment{otherlanguage}[2][]
+ {\selectlanguage[#1]{#2}}
+ {}
\newcommand{\setlocalhyphenmins}[3]{%
\expandafter\ifx\csname l@#1\endcsname\relax%
@@ -1158,10 +1351,41 @@ CHANGES
\ifcsundef{#1hyphenmins}{}%
{\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}}
-%% package options
+% 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]{}
-%%\DeclareOption{shorthands}{\setkeys{polyglossia}{shorthands=true}}
+%% Package Options %%
\DeclareOption{nolocalmarks}{\setkeys{polyglossia}{localmarks=off}}
+\DeclareOption{babelshorthands}{\setkeys{polyglossia}{babelshorthands=true}}
\DeclareOption{quiet}{%
\gdef\@latex@info#1{\relax}% no latex info
\gdef\@font@info#1{\relax}% no latex font info
@@ -1181,13 +1405,15 @@ CHANGES
\DeclareOption{polygreek}{\xpg@option{variant=poly}{greek}}
\DeclareOption{monogreek}{\xpg@option{variant=mono}{greek}}
\DeclareOption{ancientgreek}{\xpg@option{variant=ancient}{greek}}
-%%% FIXME: this does not work when gloss-<option>.ldf contains a \RequirePackage command !!!
-%%% let's try with \AtEndOfPackage (not tested)
\DeclareOption*{%
-\ifcsundef{xpg@main@language}%
-{\edef\@temp{\noexpand\setdefaultlanguage{\CurrentOption}}}%
-{\edef\@temp{\noexpand\setotherlanguage{\CurrentOption}}}%
- \AtEndOfPackage{\@temp}}
+ \edef\@temp{%
+ \noexpand\ifcsundef{xpg@main@language}%
+ \noexpand\setdefaultlanguage
+ \noexpand\setotherlanguage
+ {\CurrentOption}%
+ }%
+ \expandafter\AtEndOfPackage\expandafter{\@temp}%
+}
\ProcessOptions*
% \end{macrocode}
% \iffalse
@@ -1201,7 +1427,7 @@ CHANGES
\ProvidesPackage{farsical}
[2008/07/02 v0.1 %
Farsi (jalali) calendar]
-\RequirePackage{bidi,calc}
+\RequirePackage{bidi,calc,arabicnumbers}
%TODO - rewrite completely using calc
%% - use Reingold & Dershowitz ME
@@ -1384,17 +1610,16 @@ CHANGES
\JALALI@d = \JALALI@dn \advance \JALALI@d by -\JALALI@sn
\fi
%% DATE FORMATTING
-\if@RTL{\farsinumber\JALALI@d\space%
-\Jalalimonth{\JALALI@m}\space\farsinumber\JALALI@y}%
-\else%
+\if@RTL{\farsidigits{\number\JALALI@d}\space%
+\Jalalimonth{\JALALI@m}\space\farsidigits{\number\JALALI@y}}%
+\else
\number\JALALI@d\space\JalalimonthEnglish{\JALALI@m}%
\space\number\JALALI@y%
-\fi
-}
+\fi}
%%%
-\def\Jalalimonth#1{\ifcase#1\or فروردین\or
-اردیبهشت\or خرداد\or تیر\or مرداد\or شهریور
-\or مهر\or آبان\or آذر\or دی\or بهمن\or اسفند
+\def\Jalalimonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or خرداد\or تیر\or مرداد\or شهریور%
+\or مهر\or آبان\or آذر\or دی\or بهمن\or اسفند%
\fi}
\def\JalalimonthEnglish#1{\ifcase#1%
\or Farvardīn\or Ordībehesht\or Khordād\or Tīr
@@ -1752,6 +1977,7 @@ CHANGES
[2007/12/27 v0.1 %
Islamic calendar]
\RequirePackage{bidi}
+\RequirePackage{arabicnumbers}
\@ifundefined{@Remainder}{\input{cal-util.def}}{}
@@ -1790,11 +2016,8 @@ CHANGES
\def\Hijridate#1#2#3{%
\HijriFromGregorian{#1}{#2}{#3}%
- \if@RTL%
- \FormatHijriDate%
- \else%
- \FormatHijriDateEnglish%
- \fi}
+ \FormatHijriDate}
+
% added option \Hijritoday[n] (default 0) for adjusting the date + n days
\@ifundefined{@hijri@correction}{\gdef\@hijri@correction{0}}{}
\newcommand\Hijritoday[1][\@hijri@correction]{%
@@ -1815,19 +2038,112 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
جمادى الأولى\or جمادى الآخرة\or رجب\or شعبان\or رمضان\or%
شوال\or ذو القعدة\or ذو الحجة\fi}
-\def\FormatHijriDateEnglish{%
-\number\value{Hijriday}\space\HijriMonthTranslit{\value{Hijrimonth}}\space\number\value{Hijriyear}}
+%% This macro is now locale-aware!
+\def\FormatHijriDate{%
+ \@ifundefined{FormatHijriDate@\languagename}%
+ {\if@RTL\FormatHijriDate@defaultRTL\else\FormatHijriDate@defaultLTR\fi}%
+ {\csname FormatHijriDate@\languagename\endcsname}}
-%FIXME : this is already in gloss-arabic
-\def\@rabicnumb@r#1{\@ifundefined{arabicnumber}{{\addfontfeature{Mapping=arabicdigits} #1}}%
-{\arabicnumber{#1}}}
+\newcommand\DefineFormatHijriDate[2]{%
+ \@namedef{FormatHijriDate@#1}{#2}}
-\def\FormatHijriDate{\@ensure@RTL{%
-\@rabicnumb@r{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\@rabicnumb@r{\value{Hijriyear}}}}
+% we provide this as a reasonable default.
+% Further definitions are in polyglossia's language definition files.
+\DefineFormatHijriDate{defaultRTL}{\@ensure@RTL{%
+\arabicdigits{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\arabicdigits{\value{Hijriyear}}}}
+\DefineFormatHijriDate{defaultLTR}{%
+\number\value{Hijriday}\space\HijriMonthTranslit{\value{Hijrimonth}}\space\number\value{Hijriyear}}
% \end{macrocode}
% \iffalse
%</hijrical.sty>
+%<*babel-hebrewalph.def>
+% \fi
+% \clearpage
+%
+% \subsection{babel-hebrewalph.def}
+% \begin{macrocode}
+\ProvidesFile{babel-hebrewalph.def}
+ [2010/03/02 %
+ Babel definitions for Hebrew numerals^^J
+ Adapted from hebrew.ldf (2005/03/30 v2.3h)]
+\newif\if@gim@apost % whether we print apostrophes (gereshayim)
+\newif\if@gim@final % whether we use final or initial letters
+\newcommand*{\hebrewnumeral}[1] % no apostrophe, no final letters
+ {{\@gim@finalfalse\@gim@apostfalse\@hebrew@numeral{#1}}}
+\newcommand*{\Hebrewnumeral}[1] % apostrophe, no final letters
+ {{\@gim@finalfalse\@gim@aposttrue\@hebrew@numeral{#1}}}
+\newcommand*{\Hebrewnumeralfinal}[1] % apostrophe, final letters
+ {{\@gim@finaltrue\@gim@aposttrue\@hebrew@numeral{#1}}}
+\newcommand*{\@hebrew@numeral}[1]{%
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for Hebrew numeral}%
+ \else
+ \@tempcnta=#1\@tempcntb=#1\relax
+ \divide\@tempcntb by 1000
+ \ifnum\@tempcntb=0\gim@nomil\@tempcnta\relax
+ \else{\@gim@apostfalse\@gim@finalfalse\@hebrew@numeral\@tempcntb}׳%
+ \multiply\@tempcntb by 1000\relax
+ \advance\@tempcnta by -\@tempcntb\relax
+ \gim@nomil\@tempcnta\relax
+ \fi
+ \fi
+}
+\def\hebrew@alph@zero{}
+\newcommand*{\gim@nomil}[1]{\@tempcnta=#1\@gim@prevfalse
+ \@tempcntb=\@tempcnta\divide\@tempcntb by 100\relax % hundreds digit
+ \ifcase\@tempcntb % print nothing if no hundreds
+ \or\gim@print{100}{ק}%
+ \or\gim@print{200}{ר}%
+ \or\gim@print{300}{ש}%
+ \or\gim@print{400}{ת}%
+ \or ת\@gim@prevtrue\gim@print{500}{ק}%
+ \or ת\@gim@prevtrue\gim@print{600}{ר}%
+ \or ת\@gim@prevtrue\gim@print{700}{ש}%
+ \or ת\@gim@prevtrue\gim@print{800}{ת}%
+ \or ת\@gim@prevtrue ת\gim@print{900}{ק}%
+ \fi
+ \@tempcntb=\@tempcnta\divide\@tempcntb by 10\relax % tens digit
+ \ifcase\@tempcntb % print nothing if no tens
+ \or % number between 10 and 19
+ \ifnum\@tempcnta = 16 \gim@print {9}{ט}% tet-zayin
+ \else\ifnum\@tempcnta = 15 \gim@print {9}{ט}% tet-vav
+ \else \gim@print{10}{י}%
+ \fi % \@tempcnta = 15
+ \fi % \@tempcnta = 16
+ \or\gim@print{20}{\if@gim@final ך\else כ\fi}%
+ \or\gim@print{30}{ל}%
+ \or\gim@print{40}{\if@gim@final ם\else מ\fi}%
+ \or\gim@print{50}{\if@gim@final ן\else נ\fi}%
+ \or\gim@print{60}{ס}%
+ \or\gim@print{70}{ע}%
+ \or\gim@print{80}{\if@gim@final ף\else פ\fi}%
+ \or\gim@print{90}{\if@gim@final ץ\else צ\fi}%
+ \fi
+ \ifcase\@tempcnta
+ \hebrew@alph@zero% empty but can be defined if desired
+ \or\gim@print{1}{א}%
+ \or\gim@print{2}{ב}%
+ \or\gim@print{3}{ג}%
+ \or\gim@print{4}{ד}%
+ \or\gim@print{5}{ה}%
+ \or\gim@print{6}{ו}%
+ \or\gim@print{7}{ז}%
+ \or\gim@print{8}{ח}%
+ \or\gim@print{9}{ט}%
+ \fi
+}
+\newif\if@gim@prev % flag if a previous letter has been typeset
+\newcommand*{\gim@print}[2]{% #2 is a letter, #1 is its value.
+ \advance\@tempcnta by -#1\relax% deduct the value from the remainder
+ \ifnum\@tempcnta=0% if this is the last letter
+ \if@gim@prev\if@gim@apost ״\fi#2%
+ \else#2\if@gim@apost ׳\fi\fi%
+ \else{\@gim@finalfalse#2}\@gim@prevtrue\fi}
+\def\Alphfinal#1{\expandafter\@Alphfinal\csname c@#1\endcsname}%
+\providecommand*{\@Alphfinal}[1]{\protect\Hebrewnumeralfinal{\number#1}}
+% \end{macrocode}
+% \iffalse
+%</babel-hebrewalph.def>
%<*babelsh.def>
% \fi
% \clearpage
@@ -1901,9 +2217,10 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi}%
\fi}
\fi
- \@ifpackagewith{babel}{KeepShorthandsActive}{}{%
+ %%\@ifpackagewith{babel}{KeepShorthandsActive}{}{%
\edef\bbl@tempa{\catcode`\noexpand##1\the\catcode`##1}%
- \expandafter\AtEndOfPackage\expandafter{\bbl@tempa}}%
+ \expandafter\AtEndOfPackage\expandafter{\bbl@tempa}%
+ %%}%
\@tempcnta=\lccode`\~
\lccode`~=`##1%
\lowercase{%
@@ -2073,7 +2390,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi
}
\def\@notshorthand#1{%
- \PackageError{babel}{%
+ \PackageError{polyglossia}{%
The character `\string #1' should be made
a shorthand character;\MessageBreak
add the command \string\useshorthands\string{#1\string} to
@@ -2084,7 +2401,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\newcommand*\shorthandoff[1]{\bbl@switch@sh{off}#1\@nil}
\def\bbl@switch@sh#1#2#3\@nil{%
\@ifundefined{active@char\string#2}{%
- \PackageError{babel}{%
+ \PackageError{polyglossia}{%
The character '\string #2' is not a shorthand character
in \languagename}{%
Maybe you made a typing mistake?\MessageBreak
@@ -2133,7 +2450,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\bbl@activate{~}
\def\bbl@disc#1#2{%
\nobreak\discretionary{#2-}{}{#1}\allowhyphens}
-%HERE ENDS THE CODE COPIED FROM babel.def --------------------
+\def\bbl@t@one{T1}
+\def\allowhyphens{%
+ \ifx\cf@encoding\bbl@t@one\else\bbl@allowhyphens\fi}
+\def\bbl@allowhyphens{\nobreak\hskip\z@skip}
+%HERE ENDS THE CODE COPIED FROM babel.def --------------------
\def\bbl@disc@german#1#2{%
\nobreak\discretionary{#2-}{}{#1}}
% \end{macrocode}
@@ -2224,7 +2545,7 @@ 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{\normalfontlatin}
+\def\albanian@font{\selectfontfamilylatin}
\ifx\l@albanian\@undefined
\xpg@nopatterns{Albanian}
@@ -2483,25 +2804,26 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\amharic@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{amharicfont}{%
+ \@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%
- }%
+ \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%
+ \zf@check@ot@lang{AMH}%
+ \if@tempswa\addfontfeature{Language=Amharic}\fi
}}%
- {\amharicfont}%
+ {\amharicfont}%
}
\def\selectnormalfontamharic{%
@@ -2521,7 +2843,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-arabic.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-arabic.ldf}[polyglossia: module for arabic]
-\RequirePackage{bidi}[0.3]
+\RequirePackage{bidi}
+\RequirePackage{arabicnumbers}
\RequirePackage{hijrical}
\makeatletter
@@ -2543,7 +2866,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ifx\@tmpa\tmp@maghrib\eastern@numeralsfalse\fi%
\fi}
-\newif\ifabjad@jim@notail
+%this is needed for \abjad in arabicnumbers.sty
\def\tmp@true{true}
\define@key{arabic}{abjadjimnotail}[true]{%
\def\@tmpa{#1}%
@@ -2605,6 +2928,10 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
{\xpg@warning{Option `locale=#1' is not defined for Arabic: using `default' instead}%
\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}}}}
+
\def\captionsarabic{%
\def\prefacename{\@ensure@RTL{مدخل}}%
\def\refname{\@ensure@RTL{المراجع}}
@@ -2646,54 +2973,17 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi}}
-\def\arabicnumber#1{\ifeastern@numerals{\addfontfeature{Mapping=arabicdigits}\number#1}\else\RL{\reset@font\number#1}\fi}
+\def\arabicnumber#1{%
+ \ifeastern@numerals
+ \arabicdigits{\number#1}%
+ \else
+ %%\RL{\protect\reset@font\number#1}%
+ \number#1%
+ \fi}
\def\@ornatebracearabic#1{\RL{\char"FD3F\@arabic#1\char"FD3E}}
\def\@ornatebracealph#1{\RL{\char"FD3F\@alph#1\char"FD3E}}
-\ifcsdef{abjad}{}{%
-\def\abjad#1{%
-\ifnum#1>1999\xpg@ill@value{#1}{abjad numeral}%
-\else%
-\ifnum#1<\z@\space\xpg@ill@value{#1}{abjad numeral}%
- \else%
- \ifnum#1<10\expandafter\abj@num@i@iso\number#1%
- \else%
- \ifnum#1<100\expandafter\abj@num@ii\number#1%
- \else%
- \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
- \else%
- \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
- \fi
- \fi
- \fi
- \fi
- \fi
-\fi
-}
-\def\abjad@zero{}
-\def\abjad@three{ج\ifabjad@jim@notail\char"200D\fi}
-\def\abj@num@i@iso#1{%
- \ifcase#1\or ا\or ب\or\abjad@three\or د%
- \or ه\char"200D\or و\or ز\or ح\or ط\fi%
- \ifnum#1=\z@\abjad@zero\fi}
-\def\abj@num@i#1{%
- \ifcase#1\or ا\or ب\or\abjad@three\or د%
- \or ه\or و\or ز\or ح\or ط\fi%
- \ifnum#1=\z@\abjad@zero\fi}
-\def\abj@num@ii#1{%
- \ifcase#1\or ي\or ك\or ل\or م\or ن%
- \or س\or ع\or ف\or ص\fi%
- \ifnum#1=\z@\fi\abj@num@i}
-\def\abj@num@iii#1{%
- \ifcase#1\or ق\or ر\or ش\or ت\or ث%
- \or خ\or ذ\or ض\or ظ\fi%
- \ifnum#1=\z@\fi\abj@num@ii}
-\def\abj@num@iv#1{%
- \ifcase#1\or غ\fi
- \ifnum#1=\z@\fi\abj@num@iii}
-}
-
\def\abjadmaghribi#1{%
\ifnum#1>1999\xpg@ill@value{#1}{abjad}%
\else
@@ -2714,7 +3004,6 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi
}
-
%maghribi س -> ص ص -> ض ش -> س ض -> ظ ظ -> غ غ -> ش
\def\abj@maghribi@num@ii#1{%
\ifcase#1\or ي\or ك\or ل\or م\or ن%
@@ -2729,95 +3018,167 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ifnum#1=\z@\fi\abj@maghribi@num@iii}
\def\arabic@numbers{%
- \let\@latinalph\@alph%
- \let\@latinAlph\@Alph%
+ \let\@origalph\@alph%
+ \let\@origAlph\@Alph%
\let\@alph\abjad%
\let\@Alph\abjad%
}
\def\noarabic@numbers{%
- \let\@alph\@latinalph%
- \let\@Alph\@latinAlph%
+ \let\@alph\@origalph%
+ \let\@Alph\@origAlph%
}
\def\arabic@globalnumbers{%
- \let\default@arabic\@arabic%
- \let\@arabic\arabicnumber%
- % For some reason these need to be set separately:
- \renewcommand\thefootnote{\protect\arabicnumber{\c@footnote}}%
- %%\ifcsundef{thechapter}{}{\renewcommand\thechapter{\protect\arabicnumber{\c@chapter}}}% <<<<<<<<<<
- %%\ifcsundef{thesection}{}{\renewcommand\thesection{\protect\arabicnumber{\c@section}}}% <<<<<<<<<<
- }
+ \let\orig@arabic\@arabic%
+ \let\@arabic\arabicnumber%
+ \renewcommand\thefootnote{\protect\arabicnumber{\c@footnote}}%
+ }
\def\noarabic@globalnumbers{
- \let\@arabic\default@arabic%
+ \let\@arabic\orig@arabic%
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
- %%\ifcsundef{thechapter}{}{\renewcommand\thechapter{\protect\number{\c@chapter}}}% <<<<<<<<<<
- %%\ifcsundef{thesection}{}{\renewcommand\thesection{\protect\number{\c@section}}}% <<<<<<<<<<
}
\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%
+ \if@tempswa
\addfontfeature{Script=Arabic}%
- \else%
+ \else
\PackageError{polyglossia}{^^J
- The current font does not contain the Arabic script!^^J
- Please define \string\arabicfont\space with \string\newfontfamily}%
- \fi%
- }%
+ The current font does not contain the Arabic script!^^J
+ Please define \string\arabicfont\space with \string\newfontfamily}%
+ \fi}%
{\arabicfont}%
}
-% TODO add setup to define Sans and Mono Arabic fonts if desired
\def\arabic@font@sf{%
\@ifundefined{arabicfontsf}{%
-% \sffamily% FIXME
+% \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%
+% \zf@check@ot@script{arab}%
+% \if@tempswa%
+% \addfontfeature{Script=Arabic}%
+% \else%
+ \arabic@font%
+% \fi%
}%
{\arabicfontsf}%
}
\def\arabic@font@tt{%
\@ifundefined{arabicfonttt}{%
-% \ttfamily% FIXME
+% \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%
+% \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}}
+ \def\reset@font{\normalfont}%
+ %\expand\@tempa%
+ }
\def\blockextras@arabic{%
- \let\@@MakeUppercase\MakeUppercase%
+ \let\orig@MakeUppercase\MakeUppercase%
\def\MakeUppercase##1{##1}%
% TODO disable \@Roman and \@roman ?
}
\def\noextras@arabic{%
- \let\MakeUppercase\@@MakeUppercase%
+ \let\MakeUppercase\orig@MakeUppercase%
}
% \end{macrocode}
% \iffalse
%</gloss-arabic.ldf>
+%<*gloss-asturian.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-asturian.ldf}
+% \begin{macrocode}
+% Translated by Xuacu <xuacusk8 at gmail dot com>
+% Contributed by Kevin Godby <godbyk at gmail dot com>
+%
+\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
+
+\def\captionsasturian{%
+ \def\prefacename{Entamu}%
+ \def\refname{Referencies}%
+ \def\abstractname{Sumariu}%
+ \def\bibname{Bibliografía}%
+ \def\chaptername{Capítulu}%
+ \def\appendixname{Apéndiz}%
+ \def\contentsname{Conteníu}%
+ \def\listfigurename{Llista de figures}%
+ \def\listtablename{Llista de tables}%
+ \def\indexname{Índiz}%
+ \def\figurename{Figura}%
+ \def\tablename{Tabla}%
+ \def\partname{Parte}%
+ \def\enclname{incl.}%
+ \def\ccname{cc}%
+ \def\headtoname{Pa}%
+ \def\pagename{Páxina}%
+ \def\seename{ver}%
+ \def\alsoname{ver tamién}%
+ \def\proofname{Demostración}%
+ \def\glossaryname{Glosariu}%
+ }
+\def\dateasturian{%
+ \def\today{\number\day~\ifcase\month\or
+ de~xineru\or de~febreru\or de~marzu\or d'abril\or de~mayu\or de~xunu\or
+ de~xunetu\or d'agostu\or de~setiembre\or d'ochobre\or de~payares\or
+ 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>
%<*gloss-bahasai.ldf>
% \fi
% \clearpage
@@ -2825,35 +3186,36 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-bahasai.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-bahasai.ldf}[polyglossia: module for bahasa indonesia]
+\RequirePackage{hijrical}
\makeatletter
-\def\bahasai@font{\normalfontlatin}
+\def\bahasai@font{\selectfontfamilylatin}
-\ifx\l@bahasa\@undefined
- \ifx\l@bahasai\@undefined
+\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@bahasa\l@nohyphenation\relax
+ \adddialect\l@bahasai\l@nohyphenation\relax
\else
- \let\l@bahasa\l@meyalu
+ \let\l@bahasai\l@meyalu
\fi
\else
- \let\l@bahasa\l@malay
+ \let\l@bahasai\l@malay
\fi
\else
- \let\l@bahasa\l@bahasam
+ \let\l@bahasai\l@bahasam
\fi
\else
- \let\l@bahasa\l@indonesian
+ \let\l@bahasai\l@indonesian
\fi
\else
- \let\l@bahasa\l@indon
+ \let\l@bahasai\l@indon
\fi
\else
- \let\l@bahasa\l@bahasai
+ \let\l@bahasai\l@bahasa
\fi
\fi
@@ -2887,6 +3249,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Juli\or Agustus\or September\or Oktober\or Nopember\or Desember\fi
\space \number\year}}
+\def\hijrimonthbahasai#1{\ifcase#1%
+\or Muharram\or Safar\or Rabiul awal\or Rabiul akhir\or Jumadil awal\or Jumadil akhir\or Rajab%
+\or Sya'ban\or Ramadhan\or Syawal\or Dzulkaidah\or Dzulhijjah\fi}
+\DefineFormatHijriDate{bahasai}{%
+\number\value{Hijriday}\space\hijrimonthbahasai{\value{Hijrimonth}}\space\number\value{Hijriyear}}
+
\def\bahasai@language{\language=\l@bahasai}
\setlocalhyphenmins{bahasai}{2}{2}
@@ -2900,9 +3268,10 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%
% \subsection{gloss-bahasam.ldf}
% \begin{macrocode}
-\ProvidesFile{gloss-bahasam.ldf}[polyglossia: module for bahasa malaysia]
+\ProvidesFile{gloss-bahasam.ldf}[polyglossia: module for bahasa melayu]
+\RequirePackage{hijrical}
\makeatletter
-\def\bahasam@font{\normalfontlatin}
+\def\bahasam@font{\selectfontfamilylatin}
\ifx\l@malay\@undefined
\ifx\l@meyalu\@undefined
@@ -2911,7 +3280,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ifx\l@bahasai\@undefined
\ifx\l@indon\@undefined
\ifx\l@indonesian\@undefined
- \xpg@nopatterns{Bahasa Malaysia}
+ \xpg@nopatterns{Bahasa Melayu}%
\adddialect\l@malay\l@nohyphenation\relax
\else
\let\l@malay\l@indonesian
@@ -2963,7 +3332,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Julai\or Ogos\or September\or Oktober\or November\or Disember\fi
\space \number\year}}
-\def\bahasam@language{\language=\l@bahasam}
+\def\hijrimonthbahasam#1{\ifcase#1%
+\or Muharram\or Safar\or Rabiulawal\or Rabiulakhir\or Jamadilawal\or Jamadilakhir\or Rejab%
+\or Syaaban\or Ramadan\or Syawal\or Zulkaedah\or Zulhijah\fi}
+\DefineFormatHijriDate{bahasam}{%
+\number\value{Hijriday}\space\hijrimonthbahasam{\value{Hijrimonth}}\space\number\value{Hijriyear}}
+
+\def\bahasam@language{\language=\l@malay}
\setlocalhyphenmins{bahasam}{2}{2}
@@ -2978,7 +3353,7 @@ 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{\normalfontlatin}
+\def\basque@font{\selectfontfamilylatin}
\ifx\l@basque\@undefined%
\xpg@nopatterns{Basque}%
@@ -3031,7 +3406,7 @@ 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{\normalfontlatin}
+\def\brazil@font{\selectfontfamilylatin}
%FIXME check this:
\ifx\l@brazil\@undefined
@@ -3089,7 +3464,7 @@ 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{\normalfontlatin}
+\def\breton@font{\selectfontfamilylatin}
\ifx\l@breton\@undefined%
\xpg@nopatterns{Breton}%
@@ -3202,14 +3577,14 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\xpg@ill@value{#1}{bulgarian@alph}\fi}%
\def\bulgarian@numbers{%
- \let\latin@Alph\@Alph%
- \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
\let\@Alph\bulgarian@Alph%
\let\@alph\bulgarian@alph%
}
\def\nobulgarian@numbers{%
- \let\@Alph\latin@Alph%
+ \let\@Alph\latin@Alph%
\let\@alph\latin@alph%
}
@@ -3251,7 +3626,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
октомври\or
ноември\or
декември\fi%
- \number\year~г.}%
+ \ \number\year~г.}%
\def\month@Roman{\expandafter\@Roman\month}%
\def\todayRoman{\number\day.\,\month@Roman.\,\number\year~г.}%
}
@@ -3259,25 +3634,28 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\bulgarian@language{\language=\l@bulgarian}
\def\bulgarian@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{bulgarianfont}{%
- \@ifundefined{cyrillicfont}{%
- \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%
- \zf@check@ot@lang{BGR}%
- \if@tempswa\addfontfeature{Language=Bulgarian}\fi%
- }}%
-{\bulgarianfont}}
+ \@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}%
@@ -3304,13 +3682,89 @@ 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{\normalfontlatin}
+\def\catalan@font{\selectfontfamilylatin}
\ifx\l@catalan\@undefined%
\xpg@nopatterns{Catalan}%
\adddialect\l@catalan\l@nohyphenation%
\fi
+\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
+\ifsystem@babelshorthands
+ \setkeys{catalan}{babelshorthands=true}
+\else
+ \setkeys{catalan}{babelshorthands=false}
+\fi
+\ifcsundef{initiate@active@char}{%
+\input{babelsh.def}%
+\initiate@active@char{"}%
+}{}
+
+%%% adapted from Babel's catalan.ldf
+\newdimen\leftllkern \newdimen\rightllkern \newdimen\raiselldim
+% we check if char · exists, and use it instead of raised dot:
+\def\xpg@raiseddot{\ifnum\XeTeXcharglyph"00B7 > 0\hbox{\char"00B7}%
+ \else\raise\raiselldim\hbox{.}\fi}
+\def\lgem{%
+ \ifmmode
+ \csname normal@char\string"\endcsname l%
+ \else
+ \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
+ \setbox0\hbox{l}\setbox1\hbox{l\/}%
+ \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}\else\setbox2\hbox{.}\fi
+ \advance\raiselldim by \the\fontdimen5\the\font
+ \advance\raiselldim by -\ht2%
+ \leftllkern=-.25\wd0%
+ \advance\leftllkern by \wd1%
+ \advance\leftllkern by -\wd0%
+ \rightllkern=-.25\wd0%
+ \advance\rightllkern by -\wd1%
+ \advance\rightllkern by \wd0%
+ \allowhyphens\discretionary{l-}{l}%
+ {\hbox{l}\kern\leftllkern\xpg@raiseddot%
+ \kern\rightllkern\hbox{l}}\allowhyphens
+ \fi
+}
+\def\Lgem{%
+ \ifmmode
+ \csname normal@char\string"\endcsname L%
+ \else
+ \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
+ \setbox0\hbox{L}\setbox1\hbox{L\/}%
+ \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}\else\setbox2\hbox{.}\fi
+ \advance\raiselldim by .5\ht0%
+ \advance\raiselldim by -.5\ht2%
+ \leftllkern=-.125\wd0%
+ \advance\leftllkern by \wd1%
+ \advance\leftllkern by -\wd0%
+ \rightllkern=-\wd0%
+ \divide\rightllkern by 6%
+ \advance\rightllkern by -\wd1%
+ \advance\rightllkern by \wd0%
+ \allowhyphens\discretionary{L-}{L}%
+ {\hbox{L}\kern\leftllkern\xpg@raiseddot%
+ \kern\rightllkern\hbox{L}}\allowhyphens
+ \fi
+}
+\AtBeginDocument{%
+ \let\lslash\l
+ \let\Lslash\L
+ \DeclareRobustCommand\l{\@ifnextchar.\bbl@l{\@ifnextchar·\bbl@l\lslash}}
+ \DeclareRobustCommand\L{\@ifnextchar.\bbl@L{\@ifnextchar·\bbl@L\Lslash}}}
+\def\bbl@l#1#2{\lgem}
+\def\bbl@L#1#2{\Lgem}
+
+\def\catalan@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{catalan}%
+ \declare@shorthand{catalan}{"l}{\lgem{}}
+ \declare@shorthand{catalan}{"L}{\Lgem{}}
+}
+
+\def\nocatalan@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+
\def\captionscatalan{%
\def\refname{Referències}%
\def\abstractname{Resum}%
@@ -3335,7 +3789,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Demostració}%
\def\glossaryname{Glossari}%
}
-\datecatalan{%
+\def\datecatalan{%
\def\today{\number\day~\ifcase\month\or
de gener\or de febrer\or de març\or d'abril\or de maig\or
de juny\or de juliol\or d'agost\or de setembre\or d'octubre\or
@@ -3346,6 +3800,20 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\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}
% \iffalse
%</gloss-catalan.ldf>
@@ -3394,20 +3862,20 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\coptic@language{\language=\l@coptic}
\def\coptic@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{copticfont}{%
- \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}%
+ \@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{%
@@ -3427,7 +3895,7 @@ 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{\normalfontlatin}
+\def\croatian@font{\selectfontfamilylatin}
\ifx\l@croatian\@undefined%
\xpg@nopatterns{Croatian}%
@@ -3478,7 +3946,7 @@ 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{\normalfontlatin}
+\def\czech@font{\selectfontfamilylatin}
\ifx\l@czech\@undefined%
\xpg@nopatterns{Czech}%
@@ -3543,7 +4011,7 @@ 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{\normalfontlatin}
+\def\danish@font{\selectfontfamilylatin}
\ifx\l@danish\@undefined
\xpg@nopatterns{Danish}
@@ -3643,20 +4111,21 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\divehi@language{\language=\l@divehi}
\def\divehi@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{divehifont}{%
- \@ifundefined{thaanafont}{%
- \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}%
+ \@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{%
@@ -3686,7 +4155,7 @@ 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{\normalfontlatin}
+\def\dutch@font{\selectfontfamilylatin}
\ifx\l@dutch\@undefined
\xpg@nopatterns{Dutch}
@@ -3701,6 +4170,37 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\nonfrenchspacing%
}
+\define@boolkey{dutch}[dutch@]{babelshorthands}[true]{}
+
+\ifsystem@babelshorthands
+ \setkeys{dutch}{babelshorthands=true}
+\else
+ \setkeys{dutch}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+\input{babelsh.def}%
+\initiate@active@char{"}%
+}{}
+
+\def\dutch@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{dutch}%
+ \declare@shorthand{dutch}{"-}{\nobreak-\bbl@allowhyphens}
+ \declare@shorthand{dutch}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
+ \declare@shorthand{dutch}{"|}{%
+ \textormath{\discretionary{-}{}{\kern.03em}}{}}
+ \declare@shorthand{dutch}{""}{\hskip\z@skip}
+ \declare@shorthand{dutch}{"/}{\textormath
+ {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}}%
+ \def\-{\bbl@allowhyphens\discretionary{-}{}{}\bbl@allowhyphens}%
+}
+
+\def\nodutch@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+ \def\-{\discretionary{-}{}{}}% << original def in latex.ltx
+}
+
\def\captionsdutch{%
\def\prefacename{Voorwoord}%
\def\refname{Referenties}%
@@ -3734,15 +4234,18 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\setlocalhyphenmins{dutch}{2}{2}%
\def\noextras@dutch{%
- \nodutch@punctuation%
+ \nodutch@punctuation%
+ \nodutch@shorthands%
}
\def\blockextras@dutch{%
- \dutch@punctuation%
+ \dutch@punctuation%
+ \ifdutch@babelshorthands\dutch@shorthands\fi%
}
\def\inlineextras@dutch{%
- \dutch@punctuation%
+ \dutch@punctuation%
+ \ifdutch@babelshorthands\dutch@shorthands\fi%
}
% \end{macrocode}
@@ -3756,7 +4259,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-english.ldf}[polyglossia: module for english]
\makeatletter
-\def\english@font{\normalfontlatin}
+%TODO change to \selectnormalfontlatin in all ldfs
+\def\english@font{\selectfontfamilylatin}
\ifx\l@english\@undefined%
\ifx\l@USenglish\@undefined%
@@ -3878,7 +4382,7 @@ 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{\normalfontlatin}
+\def\esperanto@font{\selectfontfamilylatin}
\ifx\l@esperanto\@undefined%
\xpg@nopatterns{Esperanto}%
@@ -3956,7 +4460,7 @@ 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{\normalfontlatin}
+\def\estonian@font{\selectfontfamilylatin}
\ifx\l@estonian\@undefined%
\xpg@nopatterns{Estonian}%
@@ -4020,7 +4524,9 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-farsi.ldf}[polyglossia: module for farsi]
\RequirePackage{bidi}
+\RequirePackage{arabicnumbers}
\RequirePackage{farsical}
+\RequirePackage{hijrical}
\makeatletter
\ifx\l@farsi\@undefined
@@ -4033,27 +4539,40 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\newif\if@western@numerals
\def\tmp@western{western}
\define@key{farsi}{numerals}[eastern]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@western\@western@numeralstrue\else%
- \@western@numeralsfalse%
- \fi}
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@western\@western@numeralstrue\else%
+ \@western@numeralsfalse%
+ \fi}
+
+%this is needed for \abjad in arabicnumbers.sty
+\def\tmp@true{true}
+\define@key{farsi}{abjadjimnotail}[true]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@true\abjad@jim@notailtrue%
+ \else
+ \abjad@jim@notailfalse
+ \fi}
-% NOT YET USED
+% NOT YET USED
\define@key{farsi}{locale}[default]{%
- \def\@farsi@locale{#1}}
+ \def\@farsi@locale{#1}}
%TODO add option for CALENDAR
\setkeys{farsi}{locale,numerals}
\def\farsigregmonth#1{\ifcase#1%
- \or ژانویه\or فوریه\or مارس\or آوریل\or مه\or ژوئن\or ژوئیه؛\or ژویه\or اوت\or سپتامبر\or اکتبر\or نوامبر\or دسامبر\fi}
+ \or ژانویه\or فوریه\or مارس\or آوریل\or مه\or ژوئن\or ژوئیه\or اوت\or سپتامبر\or اکتبر\or نوامبر\or دسامبر\fi}
\def\farsimonth#1{\ifcase#1%
- \or کانون ثانی\or شباط\or اذار%؛\or ادار
+ \or کانون ثانی\or شباط\or اذار%%or ادار
\or نیسان\or ایار\or حزیران\or تموز\or آب\or ایلول\or تشرین اول\or تشرین ثانی\or کانون اول\fi}
+%\Hijritoday is now locale-aware and will format the date with this macro:
+\DefineFormatHijriDate{farsi}{\@ensure@RTL{%
+\farsinumber{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\farsinumber{\value{Hijriyear}}}}
+
\def\captionsfarsi{%
-\def\prefacename{\@ensure@RTL{پیشگفتار}}%
+\def\prefacename{\@ensure@RTL{پیشگفتار}}%
\def\refname{\@ensure@RTL{مراجع}}%
\def\abstractname{\@ensure@RTL{چکیده}}%
\def\bibname{\@ensure@RTL{کتاب‌نامه}}%
@@ -4066,69 +4585,37 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\figurename{\@ensure@RTL{شكل}}%
\def\tablename{\@ensure@RTL{جدول}}%
\def\partname{\@ensure@RTL{بخش}}%
-%\def\enclname{\@ensure@RTL{}}%<-- Needs translation
-%\def\ccname{\@ensure@RTL{}}%<-- Needs translation
-%\def\headtoname{\@ensure@RTL{}}%<-- Needs translation
+\def\enclname{\@ensure@RTL{پیوست}}%
+\def\ccname{\@ensure@RTL{رونوشت}}%
+\def\headtoname{\@ensure@RTL{به}}%
\def\pagename{\@ensure@RTL{صفحة}}%
-%\def\seename{\@ensure@RTL{}}%<-- Needs translation
-%\def\alsoname{\@ensure@RTL{}}%<-- Needs translation
+\def\seename{\@ensure@RTL{ببینید}}%
+\def\alsoname{\@ensure@RTL{نیز ببینید}}%
\def\proofname{\@ensure@RTL{برهان}}%
-\def\glossaryname{\@ensure@RTL{لغت‌نامه}}%<-- Needs to be checked
+\def\glossaryname{\@ensure@RTL{دانش‌نامه}}%
}
\def\datefarsi{%
\def\today{\@ensure@RTL{\farsinumber\day\space\farsigregmonth{\month}\space\farsinumber\year}}%
}
-\def\farsinumber#1{\if@western@numerals\RL{\number#1}\else%
-\ifnum\XeTeXcharglyph"06F0 > 0%
-{\protect\addfontfeature{Mapping=farsidigits}\number#1}%
-\else%
-{\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
-\fi\fi}
+\def\farsinumber#1{%
+ \if@western@numerals
+ \number#1%
+ \else
+ \ifnum\XeTeXcharglyph"06F0 > 0%
+ \farsidigits{\number#1}%
+ %%{\protect\addfontfeature{Mapping=farsidigits}\number#1}%
+ \else%
+ \arabicdigits{\number#1}%
+ %%{\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
+ \fi
+ \fi}
%\def\farsinum#1{\expandafter\farsinumber\csname c@#1\endcsname}
%\def\farsibracenum#1{(\expandafter\farsinumber\csname c@#1\endcsname)}
%\def\farsiornatebracenum#1{\char"FD3E\expandafter\farsinumber\csname c@#1\endcsname\char"FD3F}
%\def\farsialph#1{\expandafter\@farsialph\csname c@#1\endcsname}
-\ifcsdef{abjad}{}{%
-\def\abjad#1{%
-\ifnum#1>1999 \xpg@warning{Illegal value (#1) for abjad numeral} {#1}
-\else
- \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for abjad numeral}%
- \else
- \ifnum#1<10\expandafter\abj@num@i\number#1%
- \else
- \ifnum#1<100\expandafter\abj@num@ii\number#1%
- \else
- \ifnum#1<\@m\expandafter\abj@num@iii\number#1%
- \else
- \ifnum#1<\@M\expandafter\abj@num@iv\number#1%since #1<2000, we must have 1000
- \fi
- \fi
- \fi
- \fi
- \fi
-\fi
-}
-\def\abjad@zero{}
-\def\abj@num@i#1{%
- \ifcase#1\or ا\or ب\or ج\char"200D\or د%
- \or ه\or و\or ز\or ح\or ط\fi
- \ifnum#1=\z@\abjad@zero\fi}
-\def\abj@num@ii#1{%
- \ifcase#1\or ي\or ك\or ل\or م\or ن%
- \or س\or ع\or ف\or ص\fi
- \ifnum#1=\z@\fi\abj@num@i}
-\def\abj@num@iii#1{%
- \ifcase#1\or ق\or ر\or ش\or ت\or ث%
- \or خ\or ذ\or ض\or ظ\fi
- \ifnum#1=\z@\fi\abj@num@ii}
-\def\abj@num@iv#1{%
- \ifcase#1\or غ\fi
- \ifnum#1=\z@\fi\abj@num@iii}
-}
-
\def\farsi@numbers{%
\let\@latinalph\@alph%
\let\@latinAlph\@Alph%
@@ -4141,50 +4628,53 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\farsi@globalnumbers{%
- \let\@latinarabic\@arabic%
+ \let\orig@arabic\@arabic%
\let\@arabic\farsinumber%
% For some reason \thefootnote needs to be set separately:
\renewcommand\thefootnote{\protect\farsinumber{\c@footnote}}%
}
\def\nofarsi@globalnumbers{
- \let\@arabic\@latinarabic%
+ \let\@arabic\orig@arabic%
\renewcommand\thefootnote{\protect\number{\c@footnote}}%
}
\def\farsi@language{\language=\l@farsi}
\def\farsi@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{farsifont}{%
- \@ifundefined{arabicfont}{%
- \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%
- \zf@check@ot@lang{FAR}%
- \if@tempswa\addfontfeature{Language=Farsi}\fi}
- }%
-{\farsifont}}
+ \@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%
+% \if@tempswa
% \addfontfeature{Script=Arabic}%
-% \else%
+% \else
\farsi@font%
-% \fi%
+% \fi
}%
{\farsifontsf}%
}
@@ -4193,11 +4683,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \ttfamily% FIXME
% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
% \zf@check@ot@script{arab}%
-% \if@tempswa%
+% \if@tempswa
% \addfontfeature{Script=Arabic}%
-% \else%
+% \else
\farsi@font%
-% \fi%
+% \fi
}%
{\farsifonttt}%
}
@@ -4227,7 +4717,7 @@ 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{\normalfontlatin}
+\def\finnish@font{\selectfontfamilylatin}
\ifx\l@finnish\@undefined%
\xpg@nopatterns{Finnish}%
@@ -4292,19 +4782,20 @@ 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{\normalfontlatin}
+\def\french@font{\selectfontfamilylatin}
\ifx\l@french\@undefined%
\xpg@nopatterns{French}%
\adddialect\l@french\l@nohyphenation%
\fi
-\newXeTeXintercharclass\french@punctthin % ! ? ;
+\newXeTeXintercharclass\french@punctthin % ! ? ; et autres
\newXeTeXintercharclass\french@punctthick % :
-\newXeTeXintercharclass\french@punctguill % « »
+\newXeTeXintercharclass\french@punctguillstart % « ‹
+\newXeTeXintercharclass\french@punctguillend % » ›
-\def\french@punctthinspace{{\unskip\thinspace}}
-\def\french@punctthickspace{{\unskip\nobreakspace}}
+\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
+\def\xpg@nospace#1{#1}
\def\french@punctuation{%
\frenchspacing
@@ -4312,31 +4803,48 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\XeTeXinterchartokenstate=1
\XeTeXcharclass `\! \french@punctthin
\XeTeXcharclass `\? \french@punctthin
+ \XeTeXcharclass `\‼ \french@punctthin
+ \XeTeXcharclass `\⁇ \french@punctthin
+ \XeTeXcharclass `\⁈ \french@punctthin
+ \XeTeXcharclass `\⁉ \french@punctthin
\XeTeXcharclass `\; \french@punctthin
\XeTeXcharclass `\: \french@punctthick
- \XeTeXinterchartoks \z@ \french@punctthin = \french@punctthinspace
- \XeTeXinterchartoks \z@ \french@punctthick = \french@punctthickspace
+ \XeTeXcharclass `\« \french@punctguillstart
+ \XeTeXcharclass `\» \french@punctguillend
+ \XeTeXcharclass `\‹ \french@punctguillstart
+ \XeTeXcharclass `\› \french@punctguillend
+ \XeTeXinterchartoks \z@ \french@punctthin = {\nobreak\thinspace}%
+ \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
+ \XeTeXinterchartoks 255 \french@punctthin = {\xpg@unskip\nobreak\thinspace}%
+ \XeTeXinterchartoks 255 \french@punctthick = {\xpg@unskip\nobreakspace}%
+ \XeTeXinterchartoks \french@punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
+% \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
+% \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
+ \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »"
+ \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«~"
+ \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "~»"
+ \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
+ \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
+ \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\nobreakspace}% "?»" -> "? »"
}
\def\nofrench@punctuation{%
\nonfrenchspacing
\lccode"2019=\z@
+ \XeTeXcharclass `\! \z@
+ \XeTeXcharclass `\? \z@
+ \XeTeXcharclass `\‼ \z@
+ \XeTeXcharclass `\⁇ \z@
+ \XeTeXcharclass `\⁈ \z@
+ \XeTeXcharclass `\⁉ \z@
+ \XeTeXcharclass `\; \z@
+ \XeTeXcharclass `\: \z@
+ \XeTeXcharclass `\« \z@
+ \XeTeXcharclass `\» \z@
+ \XeTeXcharclass `\‹ \z@
+ \XeTeXcharclass `\› \z@
\XeTeXinterchartokenstate=0
-}
-
-\def\french@guillemets{%
- \XeTeXinterchartokenstate=1
- \XeTeXcharclass `\« \french@punctguill
- \XeTeXcharclass `\» \french@punctguill
- \XeTeXinterchartoks \french@punctguill \z@ = \french@punctthickspace
- \XeTeXinterchartoks \z@ \french@punctguill = \french@punctthickspace
- \XeTeXinterchartoks \french@punctguill \french@punctthin = \french@punctthinspace
- % "»;" -> "» ;"
- \XeTeXinterchartoks \french@punctguill \french@punctthick = \french@punctthickspace
- % "»:" -> "» :"
- \XeTeXinterchartoks \french@punctthin \french@punctguill = \french@punctthickspace
- % "?»" -> "? »"
-}
+ }
\def\captionsfrench{%
\def\refname{Références}%
@@ -4349,13 +4857,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\listfigurename{Table des figures}%
\def\listtablename{Liste des tableaux}%
\def\indexname{Index}%
- \def\figurename{\scshape Fig.}%
- \def\tablename{\scshape Tab.}%
- \def\@Fpt{\ifcase\value{part}\or Première\or Deuxième\or%
- Troisième\or Quatrième\or Cinquième\or Sixième\or%
- Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or%
- Douzième\or Treizième\or Quatorzième\or Quinzième\or%
- Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or%
+ \def\figurename{\textsc{Fig.}}%
+ \def\tablename{\textsc{Tab.}}%
+ \def\@Fpt{\ifcase\value{part}\or Première\or Deuxième\or
+ Troisième\or Quatrième\or Cinquième\or Sixième\or
+ Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or
+ Douzième\or Treizième\or Quatorzième\or Quinzième\or
+ Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or
Vingtième\fi\space}%
\def\thepart{}%
\def\partname{\protect\@Fpt partie}%
@@ -4368,13 +4876,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Démonstration}%
}
\def\datefrench{%
- \def\today{\ifx\ier\undefined\def\ier{er}\fi%
+ \def\today{\ifx\ier\undefined\def\ier{er}\fi
\ifnum\day=1\relax 1\ier%
- \else \number\day\fi%
+ \else \number\day\fi
\space \ifcase\month%
- \or janvier\or février\or mars\or avril\or mai\or juin\or%
- juillet\or août\or septembre\or octobre\or novembre\or%
- décembre\fi%
+ \or janvier\or février\or mars\or avril\or mai\or juin\or
+ juillet\or août\or septembre\or octobre\or novembre\or
+ décembre\fi
\space \number\year}}
\def\french@language{\language=\l@french}
@@ -4383,17 +4891,16 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\noextras@french{%
\nofrench@punctuation%
- \nofrench@indent}
+ \nofrench@indent%
+ }
\def\blockextras@french{%
\french@punctuation%
\french@indent%
- \french@guillemets%
}
\def\inlineextras@french{%
\french@punctuation%
- \french@guillemets%
}
% \end{macrocode}
@@ -4407,7 +4914,7 @@ 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{\normalfontlatin}
+\def\galician@font{\selectfontfamilylatin}
\ifx\l@galician\@undefined%
\xpg@nopatterns{Galician}%
@@ -4459,7 +4966,7 @@ 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{\normalfontlatin}
+\def\german@font{\selectfontfamilylatin}
\def\tmp@old{old}
\def\tmp@oldyr{1901}
@@ -4506,9 +5013,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\define@boolkey{german}[german@]{latesthyphen}[false]{}
-\define@boolkey{german}[german@]{babelshorthands}[false]{}
+\define@boolkey{german}[german@]{babelshorthands}[true]{}
-\setkeys{german}{spelling,latesthyphen,babelshorthands,script}
+\setkeys{german}{spelling,latesthyphen,script}
+
+\ifsystem@babelshorthands
+ \setkeys{german}{babelshorthands=true}
+\else
+ \setkeys{german}{babelshorthands=false}
+\fi
\ifcsundef{initiate@active@char}{%
\input{babelsh.def}%
@@ -4516,104 +5029,104 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}{}
\def\german@shorthands{%
-\bbl@activate{"}%
-\def\language@group{german}%
-\declare@shorthand{german}{"`}{„}%
-\declare@shorthand{german}{"'}{“}%
-\declare@shorthand{german}{"<}{«}%
-\declare@shorthand{german}{">}{»}%
-\declare@shorthand{german}{"c}{\textormath{\bbl@disc@german ck}{c}}%
-\declare@shorthand{german}{"C}{\textormath{\bbl@disc@german CK}{C}}%
-\declare@shorthand{german}{"F}{\textormath{\bbl@disc@german F{FF}}{F}}%
-\declare@shorthand{german}{"l}{\textormath{\bbl@disc@german l{ll}}{l}}%
-\declare@shorthand{german}{"L}{\textormath{\bbl@disc@german L{LL}}{L}}%
-\declare@shorthand{german}{"m}{\textormath{\bbl@disc@german m{mm}}{m}}%
-\declare@shorthand{german}{"M}{\textormath{\bbl@disc@german M{MM}}{M}}%
-\declare@shorthand{german}{"n}{\textormath{\bbl@disc@german n{nn}}{n}}%
-\declare@shorthand{german}{"N}{\textormath{\bbl@disc@german N{NN}}{N}}%
-\declare@shorthand{german}{"p}{\textormath{\bbl@disc@german p{pp}}{p}}%
-\declare@shorthand{german}{"P}{\textormath{\bbl@disc@german P{PP}}{P}}%
-\declare@shorthand{german}{"r}{\textormath{\bbl@disc@german r{rr}}{r}}%
-\declare@shorthand{german}{"R}{\textormath{\bbl@disc@german R{RR}}{R}}%
-\declare@shorthand{german}{"t}{\textormath{\bbl@disc@german t{tt}}{t}}%
-\declare@shorthand{german}{"T}{\textormath{\bbl@disc@german T{TT}}{T}}%
-\declare@shorthand{german}{"f}{\textormath{\bbl@discff}{f}}%
-\def\bbl@discff{\penalty\@M
- \afterassignment\bbl@insertff \let\bbl@nextff= }%
-\def\bbl@insertff{%
- \if f\bbl@nextff
- \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
- {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\bbl@nextff}}%
-\let\bbl@nextff=f%
-\declare@shorthand{german}{"-}{\nobreak\-\nobreak\hskip\z@skip}%
-\declare@shorthand{german}{"|}{\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}}{}}%
-\declare@shorthand{german}{""}{\hskip\z@skip}%
-\declare@shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
-\declare@shorthand{german}{"=}{\penalty\@M-\hskip\z@skip}%
-\def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}%
- }
+ \bbl@activate{"}%
+ \def\language@group{german}%
+ \declare@shorthand{german}{"`}{„}%
+ \declare@shorthand{german}{"'}{“}%
+ \declare@shorthand{german}{"<}{«}%
+ \declare@shorthand{german}{">}{»}%
+ \declare@shorthand{german}{"c}{\textormath{\bbl@disc@german ck}{c}}%
+ \declare@shorthand{german}{"C}{\textormath{\bbl@disc@german CK}{C}}%
+ \declare@shorthand{german}{"F}{\textormath{\bbl@disc@german F{FF}}{F}}%
+ \declare@shorthand{german}{"l}{\textormath{\bbl@disc@german l{ll}}{l}}%
+ \declare@shorthand{german}{"L}{\textormath{\bbl@disc@german L{LL}}{L}}%
+ \declare@shorthand{german}{"m}{\textormath{\bbl@disc@german m{mm}}{m}}%
+ \declare@shorthand{german}{"M}{\textormath{\bbl@disc@german M{MM}}{M}}%
+ \declare@shorthand{german}{"n}{\textormath{\bbl@disc@german n{nn}}{n}}%
+ \declare@shorthand{german}{"N}{\textormath{\bbl@disc@german N{NN}}{N}}%
+ \declare@shorthand{german}{"p}{\textormath{\bbl@disc@german p{pp}}{p}}%
+ \declare@shorthand{german}{"P}{\textormath{\bbl@disc@german P{PP}}{P}}%
+ \declare@shorthand{german}{"r}{\textormath{\bbl@disc@german r{rr}}{r}}%
+ \declare@shorthand{german}{"R}{\textormath{\bbl@disc@german R{RR}}{R}}%
+ \declare@shorthand{german}{"t}{\textormath{\bbl@disc@german t{tt}}{t}}%
+ \declare@shorthand{german}{"T}{\textormath{\bbl@disc@german T{TT}}{T}}%
+ \declare@shorthand{german}{"f}{\textormath{\bbl@discff}{f}}%
+ \def\bbl@discff{\penalty\@M
+ \afterassignment\bbl@insertff \let\bbl@nextff= }%
+ \def\bbl@insertff{%
+ \if f\bbl@nextff
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+ {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\bbl@nextff}}%
+ \let\bbl@nextff=f%
+ \declare@shorthand{german}{"-}{\nobreak\-\nobreak\hskip\z@skip}%
+ \declare@shorthand{german}{"|}{\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}}{}}%
+ \declare@shorthand{german}{""}{\hskip\z@skip}%
+ \declare@shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{german}{"=}{\penalty\@M-\hskip\z@skip}%
+ \def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}%
+}
\def\nogerman@shorthands{%
- \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
}
\def\captions@german{%
- \def\prefacename{Vorwort}%
- \def\refname{Literatur}%
- \def\abstractname{Zusammenfassung}%
- \def\bibname{Literaturverzeichnis}%
- \def\chaptername{Kapitel}%
- \def\appendixname{Anhang}%
- \def\contentsname{Inhaltsverzeichnis}%
- \def\listfigurename{Abbildungsverzeichnis}%
- \def\listtablename{Tabellenverzeichnis}%
- \def\indexname{Index}%
- \def\figurename{Abbildung}%
- \def\tablename{Tabelle}%
- \def\partname{Teil}%
- \def\enclname{Anlage(n)}%
- \def\ccname{Verteiler}%
- \def\headtoname{An}%
- \def\pagename{Seite}%
- \def\seename{siehe}%
- \def\alsoname{siehe auch}%
- \def\proofname{Beweis}%
- \def\glossaryname{Glossar}%
+ \def\prefacename{Vorwort}%
+ \def\refname{Literatur}%
+ \def\abstractname{Zusammenfassung}%
+ \def\bibname{Literaturverzeichnis}%
+ \def\chaptername{Kapitel}%
+ \def\appendixname{Anhang}%
+ \def\contentsname{Inhaltsverzeichnis}%
+ \def\listfigurename{Abbildungsverzeichnis}%
+ \def\listtablename{Tabellenverzeichnis}%
+ \def\indexname{Index}%
+ \def\figurename{Abbildung}%
+ \def\tablename{Tabelle}%
+ \def\partname{Teil}%
+ \def\enclname{Anlage(n)}%
+ \def\ccname{Verteiler}%
+ \def\headtoname{An}%
+ \def\pagename{Seite}%
+ \def\seename{siehe}%
+ \def\alsoname{siehe auch}%
+ \def\proofname{Beweis}%
+ \def\glossaryname{Glossar}%
}
\def\date@german{%
- \def\today{\number\day.%
- \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%
- \space \number\year}%
+ \def\today{\number\day.%
+ \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%
+ \space \number\year}%
}
%%Strings for Fraktur contributed by Gerrit <z0idberg . gmx . de>
\def\captions@german@fraktur{%
- \captions@german%
- \def\abstractname{Zuſammenfaſſung}%
- \def\seename{ſiehe}%
- \def\alsoname{ſiehe auch}%
- \def\glossaryname{Gloſſar}%
- }
+ \captions@german%
+ \def\abstractname{Zuſammenfaſſung}%
+ \def\seename{ſiehe}%
+ \def\alsoname{ſiehe auch}%
+ \def\glossaryname{Gloſſar}%
+}
\def\date@german@fraktur{%
- \def\today{\number\day.%
- \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%
- \space \number\year}%
+ \def\today{\number\day.%
+ \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%
+ \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}
@@ -4621,18 +5134,18 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\setlocalhyphenmins{german}{2}{2}%
\def\noextras@german{%
- \nonfrenchspacing%
- \nogerman@shorthands%
+ \nonfrenchspacing%
+ \nogerman@shorthands%
}
\def\blockextras@german{%
- \frenchspacing%
- \ifgerman@babelshorthands\german@shorthands\fi%
+ \frenchspacing%
+ \ifgerman@babelshorthands\german@shorthands\fi%
}
\def\inlineextras@german{%
- \frenchspacing%
- \ifgerman@babelshorthands\german@shorthands\fi%
+ \frenchspacing%
+ \ifgerman@babelshorthands\german@shorthands\fi%
}
% \end{macrocode}
@@ -5303,6 +5816,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\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%
@@ -5356,9 +5870,9 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\define@key{hebrew}{calendar}[gregorian]{%
\def\@tmpa{#1}%
\ifx\@tmpa\tmp@hebrew%
- \@calendar@hebrewtrue%
+ \@calendar@hebrewtrue%
\else%
- \@calendar@hebrewfalse%
+ \@calendar@hebrewfalse%
\fi}
% hebrewcal.sty also defines the boolean key fullyear (default=false)
@@ -5370,7 +5884,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\ifx\@tmpa\tmp@hebrew%
\@hebrew@numeralstrue%
\else%
- \@hebrew@numeralsfalse%
+ \@hebrew@numeralsfalse%
\fi}
\setkeys{hebrew}{numerals}
@@ -5390,7 +5904,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\tablename{טבלה}%
\def\partname{חלק}%
\def\enclname{רצ"ב}%
- \def\ccname{העטקים}%
+ \def\ccname{העתקים}%
\def\headtoname{אל}%
\def\pagename{עמוד}%
\def\psname{נ.ב.}%
@@ -5417,119 +5931,79 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\or יוני\or יולי\or אוגוסט %אבגוסט
\or ספטמבר\or אוקטובר\or נובמבר\or דצמבר\fi}
+\input{babel-hebrewalph.def}
-\def\hebrewalph#1{%
-\ifnum#1>9999 \xpg@warning{Illegal value (#1) for Hebrew numeral} {#1}
-\else
- \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for Hebrew numeral}%
- \else
- \ifnum#1<10\expandafter\heb@num@i\number#1%
- \else
- \ifnum#1<100\expandafter\heb@num@ii\number#1%
- \else
- \ifnum#1<\@m\expandafter\heb@num@iii\number#1%
- \else
- \ifnum#1<\@M\expandafter\heb@num@iv\number#1%
- \fi
- \fi
- \fi
- \fi
- \fi
-\fi
+\def\hebrewnumber#1{%
+ \if@hebrew@numerals
+ \protect\hebrewnumeral{#1}%
+ \else
+ %%\RL{\protect\reset@font\protect\number#1}%
+ \number#1%
+ \fi
}
-\let\hebrewnumeral\hebrewalph
-
-\def\hebnum@zero{}
-
-%Hebrew alphabetic numerals (primitive implementation -- the code in Babel is more complex):
-\def\heb@num@i#1{%
- \ifcase#1\or\char"05D0\or\char"05D1\or\char"05D2\or\char"05D3\or\char"05D4%
- \or\char"05D5\or\char"05D6\or\char"05D7\or\char"05D8\fi
- \ifnum#1=\z@\hebnum@zero\fi}
-\def\heb@num@ii#1{%
- \ifcase#1\or\char"05D9\or\char"05DB\or\char"05DC\or\char"05DE\or\char"05E0%
- \or\char"05E1\or\char"05E2\or\char"05E4\or\char"05E6\fi
- \ifnum#1=\z@\fi\heb@num@i}
-\def\heb@num@iii#1{%
- \ifcase#1\or\char"05E7\or\char"05E8\or\char"05E9\or\char"05EA\or\char"05DA%
- \or\char"05DD\or\char"05DF\or\char"05E3\or\char"05E5\fi
- \ifnum#1=\z@\fi\heb@num@ii}
-\def\heb@num@iv#1{%
- \ifcase#1\or\char"05D0\char"05F3\or\char"05D1\char"05F3\or\char"05D2\char"05F3%
- \or\char"05D3\char"05F3\or\char"05D4\char"05F3\or\char"05D5\char"05F3%
- \or\char"05D6\char"05F3\or\char"05D7\char"05F3\or\char"05D8\char"05F3\fi
- \ifnum#1=\z@\fi\heb@num@iii}
-%TODO [optionally]
-% -insert gereshayim (\char"05F4) before last letter of a sequence of two letters or more
-% -insert geresh (\char"05F3) after letter if it is alone
\def\hebrew@numbers{%
- \let\@latinalph\@alph%
- \let\@latinAlph\@Alph%
- \let\@alph\hebrewalph%
- \let\@Alph\hebrewalph%
+ \let\@origalph\@alph%
+ \let\@origAlph\@Alph%
+ \let\@alph\hebrewnumeral%
+ \let\@Alph\Hebrewnumeral%
}
\def\nohebrew@numbers{%
- \let\@alph\@latinalph%
- \let\@Alph\@latinAlph%
- }
-
-\def\hebrewnumber#1{%
- \if@hebrew@numerals\hebrewalph{#1}%
- \else{\reset@font\number#1}%
- \fi}
+ \let\@alph\@origalph%
+ \let\@Alph\@origAlph%
+}
\def\hebrew@globalnumbers{%
- \let\@latinarabic\@arabic%
+ \let\orig@arabic\@arabic%
\let\@arabic\hebrewnumber%
\renewcommand\thefootnote{\protect\hebrewnumber{\c@footnote}}%
- }
-
-\def\nohebrew@globalnumbers{
- \let\@arabic\@latinarabic%
- \renewcommand\thefootnote{\protect\number{\c@footnote}}%
- }
+}
+\def\nohebrew@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \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%
+ \if@tempswa
\addfontfeature{Script=Hebrew}%
- \else%
+ \else
\PackageError{polyglossia}{^^J
- The current font does not contain the Hebrew script!^^J
- Please define \string\hebrewfont\space with \string\newfontfamily}%
- \fi%
- }%
-{\hebrewfont}}
+ 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}{%
-% \sffamily% FIXME
+% \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%
+% \fi%
}%
{\hebrewfontsf}%
}
\def\hebrew@font@tt{%
\@ifundefined{hebrewfonttt}{%
-% \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=Hebrew}%
-% \else%
- \hebrew@font%
-% \fi%
+% \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}%
}
@@ -5559,7 +6033,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\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.
+% Velthuis Devanagari project: http://devnag.sarovar.org.
\makeatletter
\ifx\l@hindi\@undefined%
@@ -5617,25 +6091,26 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\hindi@language{\language=\l@hindi}
\def\hindi@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{hindifont}{%
- \@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}%
+ \@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{%
@@ -5665,7 +6140,7 @@ 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{\normalfontlatin}
+\def\icelandic@font{\selectfontfamilylatin}
\ifx\l@icelandic\@undefined%
\xpg@nopatterns{Icelandic}%
@@ -5771,7 +6246,7 @@ 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{\normalfontlatin}
+\def\irish@font{\selectfontfamilylatin}
\ifx\l@irish\@undefined%
\xpg@nopatterns{Irish}%
@@ -5827,7 +6302,7 @@ 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{\normalfontlatin}
+\def\italian@font{\selectfontfamilylatin}
\ifx\l@italian\@undefined
\xpg@nopatterns{Italian}
@@ -5893,7 +6368,7 @@ 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{\normalfontlatin}
+\def\latin@font{\selectfontfamilylatin}
\ifx\l@latin\@undefined
\xpg@nopatterns{latin}
@@ -5958,11 +6433,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{\normalfontlatin}
+\def\latvian@font{\selectfontfamilylatin}
\ifx\l@latvian\@undefined
\xpg@nopatterns{Latvian}
- \adddialect\l@latvian\l@nohyphenation
+ \adddialect\l@latvian\l@nohyphenation\relax
\fi
\def\captionslatvian{%
@@ -6004,6 +6479,82 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-latvian.ldf>
+%<*gloss-lithuanian.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-lithuanian.ldf}
+% \begin{macrocode}
+% Translated by Paulius Sladkevičius <komsas@gmail.com>
+
+\ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian]
+\makeatletter
+
+\ifx\l@lithuanian\@undefined%
+ \xpg@nopatterns{Lithuanian}%
+ \adddialect\l@lithuanian\l@nohyphenation\relax
+\fi
+
+\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\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\blockextras@lithuanian{%
+ }
+
+\def\inlineextras@lithuanian{%
+ }
+
+% \end{macrocode}
+% \iffalse
+%</gloss-lithuanian.ldf>
%<*gloss-lsorbian.ldf>
% \fi
% \clearpage
@@ -6012,7 +6563,7 @@ 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{\normalfontlatin}
+\def\lsorbian@font{\selectfontfamilylatin}
\ifx\l@lowersorbian\@undefined
\ifx\l@lsorbian\@undefined
@@ -6078,7 +6629,7 @@ 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{\normalfontlatin}
+\def\magyar@font{\selectfontfamilylatin}
\ifx\l@magyar\@undefined
\ifx\l@hungarian\@undefined
@@ -6159,7 +6710,7 @@ 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{\normalfontlatin}
+\def\norsk@font{\selectfontfamilylatin}
\ifx\l@norsk\@undefined%
\xpg@nopatterns{Norsk}%
@@ -6224,7 +6775,7 @@ 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{\normalfontlatin}
+\def\nynorsk@font{\selectfontfamilylatin}
\ifx\l@nynorsk\@undefined%
\xpg@nopatterns{Nynorsk}%
@@ -6289,7 +6840,7 @@ 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{\normalfontlatin}
+\def\polish@font{\selectfontfamilylatin}
\ifx\l@polish\@undefined
\xpg@nopatterns{polish}
@@ -6353,7 +6904,7 @@ 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{\normalfontlatin}
+\def\portuges@font{\selectfontfamilylatin}
\ifx\l@portuges\@undefined
\ifx\l@portuguese\@undefined
@@ -6410,7 +6961,7 @@ 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{\normalfontlatin}
+\def\romanian@font{\selectfontfamilylatin}%TODO\addfontfeature{Language=Romanian}
\ifx\l@romanian\@undefined%
\xpg@nopatterns{Romanian}%
@@ -6471,25 +7022,27 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi
\def\russian@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{russianfont}{%
- \@ifundefined{cyrillicfont}{%
- \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%
- }%
- {\cyrillicfont%
- \zf@check@ot@lang{RUS}%
- \if@tempswa\addfontfeature{Language=Russian}\fi}%
- }%
- {\russianfont}%
+ \@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
+ }%
+ {\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}%
}
\def\tmp@old{old}
@@ -6503,7 +7056,19 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\daterussian{\daterussian@modern}%
\fi}
-\setkeys{russian}{spelling}
+%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
+}
+
+\setkeys{russian}{spelling,numerals}
\def\captionsrussian@modern{%
\def\prefacename{Предисловие}%
@@ -6513,8 +7078,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\chaptername{Глава}%
\def\appendixname{Приложение}%
\ifcsundef{thechapter}%
- {\def\contentsname{Содержание}}%
- {\def\contentsname{Оглавление}}%
+ {\def\contentsname{Содержание}}%
+ {\def\contentsname{Оглавление}}%
\def\listfigurename{Список иллюстраций}%
\def\listtablename{Список таблиц}%
\def\indexname{Предметный указатель}%
@@ -6555,8 +7120,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\chaptername{Глава}%
\def\appendixname{Приложеніе}%
\ifcsundef{thechapter}%
- {\def\contentsname{Содержаніе}}%
- {\def\contentsname{Оглавленіе}}%
+ {\def\contentsname{Содержаніе}}%
+ {\def\contentsname{Оглавленіе}}%
\def\listfigurename{Списокъ иллюстрацій}%
\def\listtablename{Списокъ таблицъ}%
\def\indexname{Предмѣтный указатель}%
@@ -6609,12 +7174,12 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\presubparagraph{}}
\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 Х\or
Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я\else\xpg@ill@value{#1}{russian@Alph}\fi}
\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 х\or
ц\or ч\or ш\or щ\or э\or ю\or я\else\xpg@ill@value{#1}{russian@alph}\fi}
@@ -6638,11 +7203,13 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\noextras@russian{%
\nonfrenchspacing%
\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+ \iflatin@numerals\else\norussian@numbers\fi
}
-
+
\def\blockextras@russian{%
\frenchspacing%
\russian@capsformat%
+ \iflatin@numerals\else\russian@numbers\fi
}
\def\inlineextras@russian{%
@@ -6660,7 +7227,7 @@ 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{\normalfontlatin}
+\def\samin@font{\selectfontfamilylatin}
\ifx\l@samin\@undefined%
\xpg@nopatterns{Samin}%
@@ -6821,7 +7388,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\sanskrit@language{\language=\l@sanskrit}
-\setlocalhyphenmins{sanskrit}{1}{5}%
+\setlocalhyphenmins{sanskrit}{1}{3}%
\def\noextras@sanskrit{%
\nosanskrit@punctuation%
@@ -6842,7 +7409,7 @@ 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{\normalfontlatin}
+\def\scottish@font{\selectfontfamilylatin}
\ifx\l@scottish\@undefined%
\xpg@nopatterns{Scottish}%
@@ -6908,10 +7475,10 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\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%
- \fi}
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@cyrillic\@serbian@cyrtrue\else%
+ \@serbian@cyrfalse
+ \fi}
\setkeys{serbian}{script}
@@ -6946,7 +7513,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\proofname{Dokaz}%
\def\glossaryname{Glosar}% <-- CHECK
}
-\def\dateserbian@lat{%
+\def\dateserbian@lat{%
\def\today{\number\day .~\ifcase\month\or
januar\or februar\or mart\or april\or maj\or
juni\or juli\or avgust\or septembar\or oktobar\or novembar\or
@@ -6986,34 +7553,35 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\serbian@font@cyr{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{serbianfont}{%
- \@ifundefined{cyrillicfont}{%
- \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%
- \zf@check@ot@lang{SRB}%
- \if@tempswa\addfontfeature{Language=Serbian}\fi%
- }%
- }%
- {\serbianfont}%
+ \@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{%
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \@ifundefined{serbianfontlatin}{%
- \zf@check@ot@lang{SRB}%
- \if@tempswa\addfontfeature{Language=Serbian}\fi}%
- {\serbianfontlatin}%
+ \@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{%
@@ -7042,7 +7610,7 @@ 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{\normalfontlatin}
+\def\slovak@font{\selectfontfamilylatin}
\ifx\l@slovak\@undefined%
\xpg@nopatterns{Slovak}%
@@ -7096,7 +7664,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for slovenian]
\makeatletter
-\def\slovenian@font{\normalfontlatin}
+\def\slovenian@font{\selectfontfamilylatin}
\ifx\l@slovenian\@undefined%
\ifx\l@slovene\@undefined%
@@ -7150,7 +7718,7 @@ 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{\normalfontlatin}
+\def\spanish@font{\selectfontfamilylatin}
\ifx\l@spanish\@undefined
\xpg@nopatterns{spanish}
@@ -7214,7 +7782,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-swedish.ldf}[polyglossia: module for swedish]
\makeatletter
-\def\swedish@font{\normalfontlatin}
+\def\swedish@font{\selectfontfamilylatin}
\ifx\l@swedish\@undefined%
\xpg@nopatterns{Swedish}%
@@ -7284,7 +7852,8 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-syriac.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-syriac.ldf}[polyglossia: module for syriac]
-\RequirePackage{bidi}[0.3]
+\RequirePackage{bidi}
+\RequirePackage{arabicnumbers}
\makeatletter
\ifx\l@syriac\@undefined
@@ -7301,30 +7870,30 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\tmp@abjad{abjad}
\define@key{syriac}{numerals}[western]{%
\def\@tmpa{#1}%
- \ifx\@tmpa\tmp@abjad%
- \let\syriacnumber\abjadsyriac%
- \else%
- \ifx\@tmpa\tmp@eastern%
- \@eastern@numeralstrue%
- \else%
- \@eastern@numeralsfalse%
- \fi%
- \fi}
+ \ifx\@tmpa\tmp@abjad
+ \let\syriacnumber\abjadsyriac
+ \else
+ \ifx\@tmpa\tmp@eastern
+ \@eastern@numeralstrue
+ \else
+ \@eastern@numeralsfalse
+ \fi
+ \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%
+ \if@tempswa
\addfontfeature{Script=Syriac}%
- \else%
+ \else
\PackageError{polyglossia}{^^J
- The current font does not contain the Syriac script!^^J
- Please define \string\syriacfont\space with \string\newfontfamily}%
- \fi%
- }%
+ The current font does not contain the Syriac script!^^J
+ Please define \string\syriacfont\space with \string\newfontfamily}%
+ \fi}%
{\syriacfont}%
}
@@ -7395,51 +7964,44 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\abj@syr@num@i#1{%
\ifcase#1\or\char"0710\or\char"0712\or\char"0713\or\char"0715%
- \or\char"0717\or\char"0718\or\char"0719\or\char"071A\or\char"071B\fi%
+ \or\char"0717\or\char"0718\or\char"0719\or\char"071A\or\char"071B\fi
\ifnum#1=\z@\syriac@zero\fi}
\def\abj@syr@num@ii#1{%
\ifcase#1\or\char"071D\or\char"071F\or\char"0720\or\char"0721\or\char"0722%
- \or\char"0723\or\char"0725\or\char"0726\or\char"0728\fi%
+ \or\char"0723\or\char"0725\or\char"0726\or\char"0728\fi
\ifnum#1=\z@\fi\abj@syr@num@i}
\def\abj@syr@num@iii#1{%
\ifcase#1\or\char"0729\or\char"072A\or\char"072B\or\char"072C%
\or\char"0722\char"0307\or\char"0723\char"0307\or\char"0725\char"0307%
- \or\char"0726\char"0307\or\char"0728\char"0307\fi%
+ \or\char"0726\char"0307\or\char"0728\char"0307\fi
\ifnum#1=\z@\fi\abj@syr@num@ii}
\def\abj@syr@num@iv#1{%
\ifcase#1\or\char"0710\char"0748\or\char"0712\char"0748%
\or\char"0713\char"0748\or\char"0715\char"0748%
\or\char"0717\char"0748\or\char"0718\char"0748%
- \or\char"0719\char"0748\or\char"071A\char"0748\or\char"071B\char"0748\fi%
+ \or\char"0719\char"0748\or\char"071A\char"0748\or\char"071B\char"0748\fi
\ifnum#1=\z@\fi\abj@syr@num@iii}
\def\@syriacnumber#1{%
- \if@eastern@numerals{%
+ \if@eastern@numerals
\ifnum\XeTeXcharglyph"0661 > 0%
- %%% we test for the presence of one of ١٢٣٤٥٦٧٨٩٠ in the Syriac font,
- %%% else we try \arabicfont if defined (and give a warning),
- %%% else we fall back to the Western numerals.
- \protect\addfontfeature{Mapping=arabicdigits}\number#1}%
+ %%% we test for the presence of one of ١٢٣٤٥٦٧٨٩٠ in the Syriac font,
+ %%% else we try \arabicfont if defined (and give a warning),
+ %%% else we fall back to the Western numerals.
+ %%\protect\addfontfeature{Mapping=arabicdigits}\number#1}%
+ \protect\arabicdigits{\number#1}%
\else%
- \ifcsdef{arabicfont}%
- {{\protect\arabicfont\protect\addfontfeature{Mapping=arabicdigits}%
- \number#1}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: I am using \string\arabicfont instead}}%
- {\RL{\reset@font\number#1}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: since \string\arabicfont is not defined, we'll use Western numerals instead}}%
- \fi%
- \else%
- \RL{\reset@font\number#1}%
+ \ifcsdef{arabicfont}%
+ {\protect\arabicdigits{\number#1}%
+ \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: I am using \string\arabicfont instead}}%
+ {\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}%
+ \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: since \string\arabicfont is not defined, we'll use Western numerals instead}}%
+ \fi
+ \else
+ %%\RL{\protect\reset@font\number#1}%
+ \number#1%
\fi}
-\def\syriac@globalnumbers{%
- \let\@latinarabic\@arabic%
- \let\@arabic\syriacnumber%
- \renewcommand\thefootnote{\protect\syriacnumber{\c@footnote}}%
- }
-\def\nosyriac@globalnumbers{%
- \let\@arabic\@latinarabic%
- }
\def\syriac@numbers{%
\let\@latinalph\@alph%
\let\@latinAlph\@Alph%
@@ -7450,6 +8012,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\let\@alph\@latinalph%
\let\@Alph\@latinAlph%
}
+\def\syriac@globalnumbers{%
+ \let\orig@arabic\@arabic%
+ \let\@arabic\syriacnumber%
+ \renewcommand\thefootnote{\protect\syriacnumber{\c@footnote}}%
+}
+\def\nosyriac@globalnumbers{%
+ \let\@arabic\orig@arabic%
+ \renewcommand\thefootnote{\protect\number{\c@footnote}}%
+ }
\def\syriac@language{\language=\l@syriac}
@@ -7534,7 +8105,23 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
%\catcode"200b=\active
%\def^^200b{\hskip 0pt plus .4em}
-\def\thainumber#1{\if@thai@numerals{\protect\addfontfeature{Mapping=thaidigits}\protect\number#1}\else{\protect\reset@font\protect\number#1}\fi}
+\def\thaidigits#1{\expandafter\@thai@digits #1@}
+\def\@thai@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\@thai@digits
+ \fi
+}
+
+\def\thainumber#1{%
+ \if@thai@numerals%
+ \thaidigits{\number#1}%
+ %%{\protect\addfontfeature{Mapping=thaidigits}\protect\number#1}
+ \else%
+ \number#1%
+ %%{\protect\reset@font\number#1}
+ \fi}
\def\@thaialph#1{%
\ifcase#1\or ก\or ข\or ค\or ง\or จ\or ฉ\or ช\or ซ\or ฌ\or ญ\or ฎ\or
@@ -7554,7 +8141,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\if@thai@numerals%
\let\@alph\@thaialph%
\let\@Alph\@thaiAlph%
- \fi%
+ \fi
}
\def\nothai@numbers{%
\let\@alph\@latinalph%
@@ -7562,28 +8149,29 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
}
\def\thai@globalnumbers{%
- \let\@latinarabic\@arabic%
+ \let\orig@arabic\@arabic%
\let\@arabic\thainumber%
\renewcommand{\thefootnote}{\protect\thainumber{\c@footnote}}%
}
\def\nothai@globalnumbers{%
- \let\@arabic\@latinarabic%
- \renewcommand{\thefootnote}{\protect\number{\c@footnote}}%
+ \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%
+ \if@tempswa
\addfontfeature{Script=Thai}%
- \else%
+ \else
\PackageError{polyglossia}{^^J
- The current font does not contain the Thai script!^^J
- Please define \string\thaifont\space with \string\newfontfamily}%
- \fi%
- }%
- {\thaifont}}
+ 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%
@@ -7595,7 +8183,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\def\thai@language{\language=\l@nohyphenation}
\def\blockextras@thai{%
- \renewcommand{\baselinestretch}{1.2}% FIXME restore default value in noextras?
+ \let\orig@baselinestrech\baselinestretch%
+ \renewcommand{\baselinestretch}{1.2}%
+ }
+\def\noblockextras@thai{%
+ \let\baselinestrech\orig@baselinestretch%
}
% \end{macrocode}
% \iffalse
@@ -7607,6 +8199,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \subsection{gloss-turkish.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-turkish.ldf}[polyglossia: module for turkish]
+\RequirePackage{hijrical}
\makeatletter
\def\turkish@font{%
@@ -7680,6 +8273,11 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
Aralık\fi
\space\number\year}
}
+\def\hijrimonthturkish#1{\ifcase#1%
+\or Muharrem\or Safer\or Rebiülevvel\or Rebiülahir\or Cemaziyelevvel\or Cemaziyelahir\or Recep\or Şaban\or Ramazan\or Şevval\or Zilkade\or Zilhicce\fi}
+%%\Hijritoday is now locale-aware and will format the date with this macro:
+\DefineFormatHijriDate{turkish}{%
+\number\value{Hijriday}\space\hijrimonthturkish{\value{Hijrimonth}}\space\number\value{Hijriyear}}
\def\turkish@language{\language=\l@turkish}
@@ -7718,27 +8316,27 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
\fi
\def\ukrainian@font{%
-\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
-\@ifundefined{ukrainianfont}{%
- \@ifundefined{cyrillicfont}{%
- \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%
- \zf@check@ot@lang{UKR}%
- \if@tempswa\addfontfeature{Language=Ukrainian}\fi%
- }%
- }%
- {\ukrainianfont}%
-}%
+ \@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}%
+}
\def\captionsukrainian{%
\def\refname{Література}%
@@ -7786,24 +8384,24 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
З\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}{ukrainian@Alph}\fi}
-\def\ukrainian@alph#1{\ifcase#1\or
+\def\ukrainian@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 ш\or щ\or ю\or я\else\xpg@ill@value{#1}{ukrainian@alph}\fi}
\def\ukrainian@numbers{%
- \let\latin@Alph\@Alph%
- \let\latin@alph\@alph%
+ \let\latin@Alph\@Alph%
+ \let\latin@alph\@alph%
\let\@Alph\ukrainian@Alph%
\let\@alph\ukrainian@alph%
}
\def\noukrainian@numbers{%
- \let\@Alph\latin@Alph%
+ \let\@Alph\latin@Alph%
\let\@alph\latin@alph%
}
-
+
\def\ukrainian@language{\language=\l@ukrainian}
\setlocalhyphenmins{ukrainian}{2}{2}%
@@ -7823,6 +8421,203 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</gloss-ukrainian.ldf>
+%<*gloss-urdu.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-urdu.ldf}
+% \begin{macrocode}
+%%% Adapted from a file contributed by Kamal Abdali
+\ProvidesFile{gloss-urdu.ldf}[polyglossia: module for Urdu]
+\RequirePackage{bidi}
+\RequirePackage{arabicnumbers}
+\RequirePackage{hijrical}
+\makeatletter
+
+\ifx\l@urdu\@undefined
+ %\xpg@nopatterns{urdu}%
+ \adddialect\l@urdu\l@nohyphenation
+\fi
+
+\def\urdu@RL{\relax}
+
+\newif\if@western@numerals
+\def\tmp@western{western}
+\define@key{urdu}{numerals}[eastern]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@western\@western@numeralstrue%
+ \else\@western@numeralsfalse%
+ \fi}
+
+%this is needed for \abjad in arabicnumbers.sty
+\def\tmp@true{true}
+\define@key{urdu}{abjadjimnotail}[true]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@true\abjad@jim@notailtrue%
+ \else
+ \abjad@jim@notailfalse
+ \fi}
+
+\newif\if@hijrical
+\def\tmp@hijri{hijri}
+\define@key{urdu}{calendar}[gregorian]{%
+ \def\@tmpa{#1}%
+ \ifx\@tmpa\tmp@hijri\@hijricaltrue%
+ \else\@hijricalfalse%
+ \fi}
+
+\define@key{urdu}{hijricorrection}[0]{%
+ \gdef\@hijri@correction{#1}}%
+
+% This should set the defaults
+\setkeys{urdu}{calendar,numerals,hijricorrection}
+
+\def\urdugregmonth#1{\ifcase#1%
+ \or جنوری\or فروری\or مارچ\or اپریل\or مئی\or جون\or جولائی\or اگست\or ستمبر\or اکتوبر\or نومبر\or دسمبر\fi}
+
+\def\urduhijrimonth#1{\ifcase#1%
+ \or محرّم\or صفر\or ربیع الاوّل\or ربیع الثّانی\or جمادی الاوّل\or جمادی الثّانی\or رجب\or شعبان\or رمضان\or شوّال\or ذیقعدہ\or ذی الحجّہ\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}}}}
+
+\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\dateurdu{%
+ \def\today{%
+ \if@hijrical
+ \Hijritoday[\@hijri@correction]%
+ \else
+ \@ensure@RTL{\urdunumber\day؍\space\urdugregmonth{\month}%
+ \space\urdunumber\year}%
+ \fi}%
+}
+
+\def\urdunumber#1{%
+ \if@western@numerals
+ \number#1%
+ \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%
+ }
+\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\selectnormalfonturdu{%
+ \let\normalfont=\urdu@font%
+ \let\rmfamily=\urdu@font%
+ \let\sffamily=\urdu@font@sf%
+ \let\ttfamily=\urdu@font@tt%
+ \def\reset@font{\normalfont}}
+
+\def\blockextras@urdu{%
+ \let\@@MakeUppercase\MakeUppercase%
+ \def\MakeUppercase##1{##1}%
+ }
+\def\noextras@urdu{%
+ \let\MakeUppercase\@@MakeUppercase%
+ }
+% \end{macrocode}
+% \iffalse
+%</gloss-urdu.ldf>
%<*gloss-usorbian.ldf>
% \fi
% \clearpage
@@ -7831,7 +8626,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-usorbian.ldf}[polyglossia: module for upper sorbian]
\makeatletter
-\def\usorbian@font{\normalfontlatin}
+\def\usorbian@font{\selectfontfamilylatin}
\ifx\l@uppersorbian\@undefined
\ifx\l@usorbian\@undefined
@@ -7969,7 +8764,7 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \begin{macrocode}
\ProvidesFile{gloss-welsh.ldf}[polyglossia: module for welsh]
\makeatletter
-\def\welsh@font{\normalfontlatin}
+\def\welsh@font{\selectfontfamilylatin}
\ifx\l@welsh\@undefined%
\xpg@nopatterns{Welsh}%
@@ -8101,14 +8896,14 @@ U+0039 <> U+0E59 ;
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.1.0a ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.1.1 ¦
¦ ¦
¦ Modern multilingual typesetting with XeLaTeX ¦
¦ ¦
¦----------------------------------------------¦
This package for provides a complete Babel replacement for users of XeLaTeX.
-This version includes support for 55 different languages.
+This version includes support for 57 different languages.
Polyglossia makes it possible to automate the following tasks:
@@ -8117,39 +8912,79 @@ Polyglossia makes it possible to automate the following tasks:
available), using the package fontspec.
* Switching to a font assigned by the user to a particular script or language.
* Adjusting some typographical conventions in function of the current language
- (such as afterindent, frenchindent, spaces before or after punctuation marks,
+ (such as afterindent, frenchindent, spaces before or after punctuation marks,
etc.).
-* redefining the document strings (like “chapter”, “figure”, “bibliography”).
+* Redefining the document strings (like “chapter”, “figure”, “bibliography”).
* Adapting the formatting of dates (for non-gregorian calendars via external
- packages bundled with polyglossia: currently the hebrew, islamic and farsi
+ packages bundled with polyglossia: currently the Hebrew, Islamic and Farsi
calendars are supported).
-* For languages that have their own numeration system, modifying the formatting
+* For languages that have their own numeration system, modifying the formatting
of numbers appropriately.
-* Ensuring the proper directionality if the document contains languages
+* Ensuring the proper directionality if the document contains languages
written from right to left (via the package bidi, available separately).
-Several features of Babel that do not make sense in the XeTeX world (like font
-encodings, shorthands, etc) are not supported. For German however, several
+Several features of Babel that do not make sense in the XeTeX world (like font
+encodings, shorthands, etc) are not supported. For German however, several
shorthands do make sense and can be activated with the language option babelshorthands=true.
Polyglossia is distributed in the traditional way with *.dtx and *.ins files,
and also comes with a TDS-conformant ready-to-unpack zip file.
-To install from source (i.e. using polyglossia.dtx), run
+To install from source (i.e. using polyglossia.dtx), run
xelatex polyglossia.dtx
-which will generate all files and produce the pdf documentation all at once.
+which will generate all files and produce the pdf documentation all at once.
Alternatively if you have the file polyglossia.ins run
- xetex polyglossia.ins
+ xetex polyglossia.ins
and follow the instructions displayed.
+
+BUGS
+
+Users are encouraged to report bugs on the github tracker:
+http://github.com/fc7/polyglossia/issues
+
+
CHANGES
+1.1.1
+ * 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.
+ * Bugfix for font switching mechanism within Latin script
+ (pending a complete re-implementation in v1.2):
+ the font shape and series are no longer reset when switching language.
+ * New macros for non-Western decimal digits
+ (instead of fontmappings)
+ * New gloss files for Asturian, Lithuanian and Urdu
+ * hijrical.sty is now locale-aware: \hijritoday is
+ formatted differently in Arabic, Farsi, Urdu, Turkish
+ and Bahasa Indonesia.
+---NB: the above five items were not part of v1.1.1-rc1 which was made available on github---
+ * Enable babelshorthands for Dutch
+ * Add missing macro \allowhyphens
+ * Add global option babelshorthands
+ * Support Catalan geminated l
+ * Bugfix when declaring more than one pkg option
+ * Protect \reset@font
+ * Add missing requirement makecmds
+ * Bugfix for smallcaps in captions
+ * Typo for ccname in Hebrew
+ * Add option numerals to gloss-russian
+ * Provide newXeTeXintercharclass when undefined
+ * Bugfix for Russian alph
+ * Remove superfluous level of {} in def of markright
+ * Bugfix for \datecatalan
+ * Change hyphenmins for Sanskrit
+
+1.1.0b
+ * Modify hyphenmins for Sanskrit (Yves Codet)
+ * Bugfixes for Serbian and Bulgarian (Enrico Gregorio)
1.1.0a
* Bugfix for interchar tokens
1.1.0
* Use \newXeTeXintercharclass (thanks to Enrico Gregorio)
* Fixed implementation of shorthands for German (Babel code in file babelsh.def)
- * Arabic (Khaled Hosny):
+ * Arabic (Khaled Hosny):
- Fix abjad form for 3 and 5 and add option abjadjimnotail
- bugfix for \arabicnumber
- make Gregorian calender the default
@@ -8172,7 +9007,7 @@ CHANGES
* Fix frenchspacing for vietnamese
* Other minor bugfixes
-1.0.2
+1.0.2
This is mostly a bug fixes release.
* Captions corrected in Hebrew, Russian and Spanish
* Removed all \text<lang> wrappers within caption definitions
@@ -8187,8 +9022,8 @@ CHANGES
* Extended the scope of \syriacabjad
* Added gloss-amharic.ldf (ported from ethiop.ldf in the package ethiop)
-1.0
- * Initial release on CTAN
+1.0
+ * Initial release on CTAN
------------------------------
@@ -8197,6 +9032,11 @@ CHANGES
------------------------------
%</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
@@ -8299,7 +9139,8 @@ CHANGES
\setotherlanguage[numerals=thai]{thai}
\setotherlanguage[locale=mashriq]{arabic}
\setotherlanguage[spelling=new,latesthyphen=true,babelshorthands=true]{german}
-\setotherlanguages{german,latin,russian,turkish,polish,latvian,sanskrit,ukrainian,farsi,syriac,divehi,hebrew,amharic}
+\setotherlanguages{latin,russian,turkish,polish,latvian,sanskrit,ukrainian,farsi,syriac,divehi,hebrew,amharic}
+\setotherlanguage[calendar=gregorian,numerals=western]{urdu}
\setromanfont{Linux Libertine}
\defaultfontfeatures{Scale=MatchLowercase,RawFeature={+locl}}
\setmonofont{Inconsolata}
@@ -8311,12 +9152,12 @@ CHANGES
\newfontfamily\thaanafont[Script=Thaana,WordSpace=2]{TITUS Cyberbit Basic}
\newfontfamily\ethiopicfont[Script=Ethiopic]{Abyssinica SIL}
\parskip 1.33\baselineskip
-\newcommand\showhyphmin{\fbox{\the\lefthyphenmin\ \the\righthyphenmin}}
+%\newcommand\showhyphmin{\fbox{\the\lefthyphenmin\ \the\righthyphenmin}}
\begin{document}
\hyphenation{Bru-xel-les}
\noindent
\textbf{Le français}\footnote{ From \url{http://fr.wikipedia.org/wiki/Français}} est une langue romane parlée en France, dont elle est originaire (la «langue d'oïl»), ainsi qu'en Afrique francophone, au Canada (principalement au Québec, au Nouveau-Brunswick et en Ontario), en Belgique (en Région wallonne et à Bruxelles), en Suisse, au Liban, en Haïti et dans d'autres régions du monde, soit au total dans 51 pays du monde ayant pour la plupart fait partie des anciens empires coloniaux français et belge. \\
-(Aujourd'hui! \today)
+(\today)
\begin{english}
\textbf{English}\footnote{From \url{http://en.wikipedia.org/wiki/English_language}} is a West Germanic language originating in England, and the first language for most people in Australia, Canada, the Commonwealth Caribbean, Ireland, New Zealand, the United Kingdom and the United States of America (also commonly known as the Anglosphere). It is used extensively as a second language and as an official language throughout the world, especially in Commonwealth countries and in many international organisations. \\
@@ -8325,7 +9166,7 @@ CHANGES
\begin{german}
\textbf{Die deutsche Sprache}\footnote{ From \url{http://de.wikipedia.org/wiki/Deutsche_Sprache}} (auch das Deutsche) gehört zum westlichen Zweig der germanischen Sprachen und ist eine der meistgesprochenen europäischen Sprachen weltweit, und gilt so als Weltsprache.\\
-("<\today">)
+(\today)
\end{german}
\begin{russian}
@@ -8353,14 +9194,14 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
(\today\ = \hebrewtoday)
\end{hebrew}
-\begin{syriac}%\footnotesize
+\begin{syriac}[numerals=abjad]
ܠܫܢܐ ܐܪܡܝܐ ܐܘ ܐܪܡܝܬ ܗܘ ܠܫܢ̈ܐ ܥܡ ܬܫܥܝܬܐ ܕ\textrm{3000} ܫܢ̈ܝܐ܂ ܗܘܐ ܠܫܢܐ ܕܡܠܟܘ̈ܬܐ ܘܬܘܕ̈ܝܬܐ܂ ܥܡ ܠܫܢܐ ܥܒܪܝܐ܄ ܗܘܐ ܠܫܢܐ ܕܣܦܪ̈ܐ ܕܕܢܝܐܝܠ ܘܥܙܪܐ ܘܗܘ ܠܫܢܐ ܚܕܢܝܐ ܕܬܠܡܘܕ܂ ܐܪܡܝܐ ܗܘܐ ܠܫܢܐ ܕܝܫܘܥ܂ ܐܕܝܘܡ܄ ܐܪܡܝܐ ܗܘ ܠܫܢܐ ܕܟܠܕ̈ܝܐ܄ ܐܬܘܪ̈ܝܐ܄ ܡܪ̈ܘܢܝܐ܄ ܘܣܘܪ̈ܝܝܐ܀ \\
(\today)
\end{syriac}
\begin{turkish}
\textbf{Türkiye Türkçesi}, Ural-Altay Dilleri içerisinde Türk dil ailesinin Oğuz Grubu'na mensup lehçedir. Anadolu, Kıbrıs, Balkanlar ve Orta Avrupa'da geniş yayılım alanı bulmuş olup, Türkiye Cumhuriyeti, Kuzey Kıbrıs Türk Cumhuriyeti, Güney Kıbrıs Rum Kesimi, Makedonya ve Kosova'nın resmî dilidir. \\
-(Bugün: \today)
+(\today = \Hijritoday)
\end{turkish}
\begin{polish}
@@ -8390,9 +9231,16 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
\begin{farsi}
فارسی یا پارسی، (که دری، فارسی دری، و پارسی دری نیز نامیده می‌شود) زبانی است که
در کشورهای ایران، افغانستان، تاجیکستان و ازبکستان به آن سخن می‌رانند. \\
-(\Jalalitoday)
+(\Jalalitoday = \Hijritoday)
\end{farsi}
+\pagebreak
+\begin{urdu}
+اُردو ایک ہندآریائی زبان ہے جس کا تعلّق ہند یوروپی لسانی خاندان کی ہندایرانی شاخ سے ہے۔ بارہویں صدی میں ہندوستان کی مقامی زبانوں اور فارسی، عربی، اور تُرکی زبانوں کے اختلاط سے اردو وجود میں آئی۔ اردو پاکستان کی قومی زبان ہے، اور ہندوستان کی 23 سرکاری زبانوں میں سے ایک ہے۔ جنوبی ایشیا کے باہر خلیجِ فارس کے ممالک، سعودی عرب، برطانیہ، امریکہ، کنیڈا، جرمنی، ناروے، اور آسٹریلیا میں بھی جنوبی ایشیائی مہاجرین کی بڑی تعداد اردو بولتی ہے۔ \\
+
+(\today\ مطابق \Hijritoday[0])
+\end{urdu}
+
\begin{thai}
เป็น\wbr แผนงานเพื่อ\wbr สนับสนุน\wbr การ\wbr ร่วมกัน\wbr สร้าง, การ\wbr ร่วมกันใช้, และ\wbr การ%
ร่วมกัน\wbr พัฒนา\wbr ทรัพยากร\wbr ทาง\wbr ภาษา\wbr ของ\wbr ภาษา\wbr ไทย, บน\wbr เครือข่าย World Wide Web. แผนงานนี้\wbr มี%
@@ -8422,14 +9270,15 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
\documentclass[a4paper]{book}%
\usepackage[no-math]{fontspec}
\usepackage{xltxtra,url,amsmath}
-\usepackage[quiet]{polyglossia}
-\setdefaultlanguage[calendar=gregorian,hijricorrection=1,locale=mashriq]{arabic}
-\setotherlanguage[variant=british]{english}
-\setotherlanguage{farsi}
+\setromanfont{Linux Libertine}
\defaultfontfeatures{Scale=MatchLowercase}
\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}
+\setdefaultlanguage[calendar=gregorian,hijricorrection=1,locale=mashriq]{arabic}
+\setotherlanguage[variant=british]{english}
+\setotherlanguage{farsi}
\parindent 0pt
\makeatletter
\makeatother
@@ -8487,8 +9336,9 @@ and in many international organisations.
\section{أعمال تأريخية \textenglish{(Calendar operations)}}
-\textenglish{\today} = \LR{\today} = \today\ = \Hijritoday\footnote{
- محسوب بـ \textenglish{\textsf{hijrical.sty}}}
+\textenglish[variant=us]{\today} = \LR{\today} = \today\ = \Hijritoday%\footnote{
+% محسوب بـ \textenglish{\textsf{hijrical.sty}}}
+\footnote{ What is this?}
%\newpage
\subsection{فلان}