summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/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/doc/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/doc/xelatex')
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/README72
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdfbin80335 -> 83185 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex14
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdfbin19578 -> 19253 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/examples.pdfbin161886 -> 168134 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/examples.tex22
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/gloss-template.ldf5
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdfbin187339 -> 202019 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex488
9 files changed, 400 insertions, 201 deletions
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/README b/Master/texmf-dist/doc/xelatex/polyglossia/README
index 999da001ff8..e00455f313e 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/README
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/README
@@ -1,14 +1,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:
@@ -17,39 +17,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
@@ -72,7 +112,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
@@ -87,8 +127,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
------------------------------
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf
index 5ef5b08af0c..0098c169c98 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex b/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex
index acefd404179..e4afddb406a 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/example-arabic.tex
@@ -1,14 +1,15 @@
\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
@@ -66,8 +67,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{فلان}
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf
index 84ab20af95c..d05bf0117dd 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/example-thai.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf
index 21b7d8d8b62..97bc468c848 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/examples.tex b/Master/texmf-dist/doc/xelatex/polyglossia/examples.tex
index 91e7f6dca22..68402264e74 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/examples.tex
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/examples.tex
@@ -8,7 +8,8 @@
\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}
@@ -20,12 +21,12 @@
\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. \\
@@ -34,7 +35,7 @@
\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}
@@ -62,14 +63,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}
@@ -99,9 +100,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 มี%
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/gloss-template.ldf b/Master/texmf-dist/doc/xelatex/polyglossia/gloss-template.ldf
index 18e3a4bf8c0..0923c7f7bda 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/gloss-template.ldf
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/gloss-template.ldf
@@ -1,3 +1,8 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% 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
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf
index ae2fe1fb49f..2bc3f918d4f 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex
index e92046dd433..6ac51291006 100644
--- a/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex
+++ b/Master/texmf-dist/doc/xelatex/polyglossia/polyglossia.tex
@@ -9,7 +9,7 @@
\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,
@@ -18,17 +18,20 @@
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}
@@ -36,10 +39,6 @@
\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}%
@@ -47,22 +46,22 @@
$\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}
%%%
@@ -70,14 +69,14 @@
%% 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
@@ -112,7 +111,7 @@
\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}
@@ -120,90 +119,159 @@ following tasks automatically:
\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 \\
+%albanian
+%amharic
+%\TX{arabic}
+%asturian
+%bahasai
+%bahasam
+%basque
+%brazil
+%breton
+%bulgarian
+%\TX{catalan}
+%coptic
+%croatian
+%czech
+%danish
+%divehi
+%\TX{dutch}
+%\TX{english}
+%\TX{esperanto}
+%estonian
+%\TX{farsi}
+%finnish
+%french
+%galician
+%\TX{german}
+%\TX{greek}
+%\TX{hebrew}
+%hindi
+%icelandic
+%interlingua
+%irish
+%italian
+%latin
+%latvian
+%lithuanian
+%\TX{lsorbian}
+%\TX{magyar}
+%norsk
+%nynorsk
+%polish
+%portuges
+%romanian
+%\TX{russian}
+%samin
+%sanskrit
+%scottish
+%\TX{serbian}
+%slovak
+%slovenian
+%spanish
+%swedish
+%\TX{syriac}
+%\TX{thai}
+%turkish
+%ukrainian
+%urdu
+%\TX{usorbian}
+%welsh
+%%%%% 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}
@@ -218,8 +286,13 @@ specific options:
\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
@@ -231,10 +304,10 @@ Whenever a language definition file \file{gloss-⟨lang⟩.ldf} is loaded,
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}]
@@ -243,7 +316,7 @@ of Homer’s \textit{Iliad}:
ἔθηκε, πολλὰς δ' ἰφθίμους ψυχὰς Ἄϊδι προί̈αψεν ἡρώων, αὐτοὺς δὲ ἑλώρια
τεῦχε κύνεσσιν οἰωνοῖσί τε πᾶσι, Διὸς δ' ἐτελείετο βουλή, ἐξ οὗ δὴ τὰ
πρῶτα διαστήτην ἐρίσαντε Ἀτρεί̈δης τε ἄναξ ἀνδρῶν καὶ δῖος Ἀχιλλεύς.
-\end{greek}
+\end{greek}
\end{Verbatim}
\begin{greek}[variant=ancient]
@@ -251,7 +324,7 @@ of Homer’s \textit{Iliad}:
πολλὰς δ' ἰφθίμους ψυχὰς Ἄϊδι προί̈αψεν ἡρώων, αὐτοὺς δὲ ἑλώρια τεῦχε κύνεσσιν
οἰωνοῖσί τε πᾶσι, Διὸς δ' ἐτελείετο βουλή, ἐξ οὗ δὴ τὰ πρῶτα διαστήτην ἐρίσαντε
Ἀτρεί̈δης τε ἄναξ ἀνδρῶν καὶ δῖος Ἀχιλλεύς.
-\end{greek}
+\end{greek}
\bigskip
Note that for Arabic one cannot use the environment ¦arabic¦,
@@ -270,56 +343,57 @@ This is the beginning of Ibn Khaldūn’s \textit{Muqaddima}:
\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}
%
-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.
+%%\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.}
\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.
@@ -329,22 +403,22 @@ of that language, an error message is displayed.
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.
-%\subsection{amharic}
+%\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}:
@@ -352,21 +426,51 @@ The default value of each option is given in italic.
\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)
@@ -377,29 +481,37 @@ The default value of each option is given in italic.
\item \Cmd\abjad (see section \ref{abjad})
\end{itemize}
-\subsection{german}
-\textbf{Options}:
+%\subsection{french}\label{french}
+%\textbf{Options}:
+% \begin{itemize}
+% \item \TB{espacedeuxpoints} = thick or half \new{v1.2}
+% \footnote{ %
+% Can be customized by redefining \french@colonspace }
+% \end{itemize}
+%
+
+\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}
@@ -412,8 +524,8 @@ The default value of each option is given in italic.
\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
@@ -429,11 +541,11 @@ The default value of each option is given in italic.
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}
@@ -441,28 +553,28 @@ The default value of each option is given in italic.
\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
@@ -470,26 +582,26 @@ The default value of each option is given in italic.
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}
@@ -500,16 +612,38 @@ that comes with this package.
\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{٢٠١٠}.
+
+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 numeration in Greek, Arabic, Hebrew, Syriac and Farsi}\label{abjad}
+\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{ %
@@ -517,72 +651,77 @@ by a special alphanumerical notation.\footnote{ %
\url{http://en.wikipedia.org/wiki/Abjad_numerals},
and \url{http://en.wikipedia.org/wiki/Hebrew_numerals}.}
%% \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.
@@ -598,13 +737,18 @@ whose splendid work has made my task almost trivial in comparision: Johannes
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!
\end{document}