From ffd652038baef26fb84de26fce9991a02e875485 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 28 Oct 2019 20:58:49 +0000 Subject: polyglossia (28oct19) git-svn-id: svn://tug.org/texlive/trunk@52555 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/polyglossia/README | 16 +- .../doc/latex/polyglossia/example-arabic.pdf | Bin 84111 -> 83198 bytes .../doc/latex/polyglossia/example-korean.pdf | Bin 29051 -> 17171 bytes .../doc/latex/polyglossia/example-thai.pdf | Bin 23283 -> 23360 bytes .../texmf-dist/doc/latex/polyglossia/examples.pdf | Bin 168191 -> 151791 bytes .../doc/latex/polyglossia/polyglossia.pdf | Bin 133958 -> 184844 bytes .../doc/latex/polyglossia/polyglossia.tex | 1128 ++++++++++++++------ 7 files changed, 838 insertions(+), 306 deletions(-) (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README index bd15b9aa5dd..531780f8cb1 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/README +++ b/Master/texmf-dist/doc/latex/polyglossia/README @@ -1,7 +1,7 @@ ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.44 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.45 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -10,7 +10,8 @@ This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX (with a few languages incompletely supported for the latter). This version -includes support for 78 different languages. +includes support for 75 different languages, some of which in different regional, +national or scriptal varieties. Polyglossia makes it possible to automate the following tasks: @@ -28,7 +29,8 @@ Polyglossia makes it possible to automate the following tasks: * For languages that have their own numeration system, modifying the formatting of numbers appropriately. * Ensuring the proper directionality if the document contains languages - written from right to left (via the package bidi, available separately). + written from right to left (via the packages bidi and luabidi, available + separately). LICENSE @@ -39,13 +41,13 @@ Polyglossia is placed under the terms of the LaTeX Project Public Licence LICENCE.txt for the text of the LPPL v1.3c, or http://www.latex-project.org/lppl.txt for the latest version. -This work has the LPPL maintenance status ‘maintained’. The current maintainer is Arthur Reutenauer. +This work has the LPPL maintenance status ‘maintained’. The current maintainer is +Arthur Reutenauer. BUGS -Polyglossia is full of bugs. If you run into one, or suspect you do, or you -have a request or comment, please use the GitHub issue tracker: -http://github.com/reutenauer/polyglossia/issues +If you run into a bug, or suspect you do, or you have a request or comment, please +use the GitHub issue tracker: http://github.com/reutenauer/polyglossia/issues This is more efficient than contacting me by email as it allows me to track the issues and follow progress. diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf index a40c2f6773e..d73e6263bea 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf and b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf index 86e7dd72409..d4fe0ac6935 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf and b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf index cfc66a8fb24..5a93b57b50d 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf and b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf index 69a9d742488..b7565cf400a 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf and b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf index a276007b8e3..0da109cf9d3 100644 Binary files a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf and b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf differ diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex index 1fafefd7b22..77c48d2d118 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex +++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex @@ -1,11 +1,14 @@ +% !TeX spellcheck = en_US +% !TeX TS-program = xelatex \documentclass[11pt]{ltxdoc} \usepackage{color} -\usepackage{xspace,fancyvrb} +\usepackage{xspace,fancyvrb,booktabs} \usepackage[neverdecrease]{paralist} \definecolor{myblue}{rgb}{0.02,0.04,0.48} \definecolor{lightblue}{rgb}{0.61,.8,.8} \definecolor{myred}{rgb}{0.65,0.04,0.07} \usepackage[ + unicode=true, bookmarks=true, colorlinks=true, linkcolor=myblue, @@ -13,8 +16,8 @@ citecolor=myblue, hyperindex=false, hyperfootnotes=false, - pdftitle={Polyglossia: An alternative to Babel for XeLaTeX and LuaLaTeX}, - pdfauthor={F Charette, A Reutenauer}, + pdftitle={Polyglossia: Modern multilingual typesetting with XeLaTeX and LuaLaTeX}, + pdfauthor={F Charette, A Reutenauer, B Roucariès, J Spitzmüller}, pdfkeywords={xetex, xelatex, luatex, lualatex, multilingual, babel, hyphenation} ]{hyperref} \usepackage{metalogo} @@ -23,7 +26,7 @@ \usepackage[babelshorthands]{polyglossia} \usepackage{farsical} \setmainlanguage[variant=british,ordinalmonthday=false]{english} -\setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan} +\setotherlanguages{arabic,armenian,hebrew,syriac,greek,russian,serbian,catalan} \usepackage[protrusion]{microtype} \newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace} \newcommand*\pkg[1]{\textsf{\color{myblue}#1}} @@ -31,6 +34,7 @@ \newcommand*\TR[1]{\textcolor{myred}{#1}} \newcommand*\TX[1]{\hyperref[#1]{\textcolor{myred}{#1}}} \newcommand*\TB[1]{\textcolor{myblue}{\bf #1}} +\newcommand*\TA[1]{\textsc{\color{myblue}#1}} \newcommand*\link[1]{\href{#1}{#1}} \def\eg{\textit{e.g.,}\xspace} \def\ie{\textit{i.e.,}\xspace} @@ -52,12 +56,25 @@ \renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}% {\end{compactitem}} \renewenvironment{enumerate}{\begin{compactenum}}{\end{compactenum}} +\newenvironment{shorthands}{% + \begin{list}{}% + {\settowidth{\labelwidth}{MM}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}[1]{##1\hfil}}}% + {\end{list}} + +% This is to prevent page breaks too short after subsections +\def\condbreak#1{% + \vskip 0pt plus #1\pagebreak[3]\vskip 0pt plus -#1\relax} +\pretocmd{\subsection}{\condbreak{2\baselineskip}}{}{} %% fontspec declarations: \setmainfont{Linux Libertine O} \setsansfont{Linux Biolinum O} \setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono} \newfontfamily\arabicfont[Script=Arabic]{Amiri} +\newfontfamily\armenianfont[Script=Armenian]{DejaVu Sans} \newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem} \newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL} @@ -68,14 +85,17 @@ \RecordChanges % COMMENT THE NEXT LINE TO INCLUDE THE CODE \AtBeginDocument{\OnlyDescription} + + \begin{document} -\hyphenation{Kha-li-ghi} +\hyphenation{Kha-li-ghi Reu-ten-auer} \GetFileInfo{polyglossia.sty} \title{\textcolor{lightblue}{\Huge\fontspec[LetterSpace=40]{GFS Ambrosia} Πολυγλωσσια} \\[16pt] -\color{myblue}Polyglossia: An Alternative to Babel for \XeLaTeX\ and \LuaLaTeX} -\author{\scshape\color{myblue}François Charette\\\color{myblue}Current maintainer: \scshape Arthur Reutenauer} +\color{myblue}Polyglossia: Modern multilingual typesetting with \XeLaTeX\ and \LuaLaTeX} +\author{\TA{François Charette} \and \TA{Arthur Reutenauer}\thanks{Current maintainer} + \and \TA{Bastien Roucariès} \and \TA{Jürgen Spitzmüller}} \date{\filedate \qquad \fileversion\\ \footnotesize (\textsc{pdf} file generated on \today)} @@ -93,8 +113,8 @@ \section{Introduction} -Polyglossia is a package for facilitating multilingual typesetting with -\XeLaTeX\ and (at an early stage) \LuaLaTeX. Basically, it +\pkg{Polyglossia} is a package for facilitating multilingual typesetting with +\XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it can be used as an alternative to \pkg{babel} for performing the following tasks automatically: @@ -126,42 +146,38 @@ with the fundamental features of \pkg{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 -for \XeLaTeX\ and \LuaLaTeX, it obviously also relies on \pkg{fontspec} by Will -Robertson. For languages written from right to left, it needs the package \pkg{bidi} -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 - \displaycmd{\setotherlanguage[⟨options⟩]\{lang\}.}{\setotherlanguage} -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 - \displaycmd{\setotherlanguages\{lang1,lang2,lang3,…\}.}{\setotherlanguages} -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” – obsolete} -\new{v1.2.0} -{\color{red}\bfseries Warning}: \pkg{polyglossia} no longer supports loading -language definition files as package options! -%As with \pkg{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 \pkg{babel}. -%Note also that this method may not work in some cases, and should be -%considered deprecated. +\paragraph{Requirements} The current version of \pkg{polyglossia} makes use of some convenient +macros defined in the \pkg{etoolbox} package by \TA{Philipp Lehmann} and \TA{Joseph Wright}. +Being designed for \XeLaTeX\ and \LuaLaTeX, it obviously also relies on \pkg{fontspec} by +\TA{Will Robertson}. For languages written from right to left, it needs the package \pkg{bidi} +(for \XeTeX) or \pkg{luabidi} (for \LuaTeX) by \TA{Vafa Khalighi} (\textarabic{وفا خليقي}) and +the \pkg{bidi-tex GitHub Organisation}. +Polyglossia also bundles three packages for calendaric computations (\pkg{hebrewcal}, +\pkg{hijrical}, and \pkg{farsical}). + + +\section{Setting up multilingual documents} + +\subsection{Activating languages} + +The default language of a document is specified by means of the command + \displaycmd{\setdefaultlanguage[⟨options⟩]\{⟨lang⟩\}}{\setdefaultlanguage} +(or, equivalently, \Cmd\setmainlanguage). +Secondary languages are specified with + \displaycmd{\setotherlanguage[⟨options⟩]\{⟨lang⟩\}.}{\setotherlanguage} +All these commands allow you to set language-specific options.\footnote{% + Section~\ref{specific} documents these options for the respective languages.} +It is also possible to load a series of secondary languages at once (but without options) +using + \displaycmd{\setotherlanguages\{⟨lang1⟩,⟨lang2⟩,⟨lang3⟩,…\}.}{\setotherlanguages} + +All language-specific options can be modified locally by means of the +language-switching commands described in section \ref{languageswitching}. + +\paragraph{Note} In general, it is advisable to activate the languages \emph{after} all +packages have been loaded. This is particularly important if you use right-to-left scripts +or languages with babel shorthands. + \subsection{Supported languages} @@ -169,69 +185,156 @@ Table~\ref{tab:lang} lists all languages currently supported. Those in red have specific options and/or commands that are explained in section \ref{specific} below. -\begin{table}[h]\centering +\begin{table}[ht]\centering \label{tab:lang} -% Produced with tools/insert-language-list.rb -- AR, 2015-07-14 -% Edited by hand -- AR 2019-04-04 +% Produced with tools/insert-language-list.rb -- JS, 2019-10-18 +% Edited by hand -- JS, 2019-10-18 \begin{tabular}{lllll} -\hline -albanian & danish & interlingua & nko & \TX{slovenian}\\ -amharic & divehi & irish & norsk & spanish \\ -\TX{arabic} & \TX{dutch} & \TX{italian} & nynorsk & swedish \\ -armenian & \TX{english} & kannada & occitan & \TX{syriac} \\ -asturian & \TX{esperanto} & khmer & piedmontese & tamil \\ -bahasai & estonian & \TX{korean} & polish & telugu \\ -bahasam & \TX{farsi} & \TX{lao} & portuges & \TX{thai} \\ -basque & finnish & \TX{latin} & romanian & tibetan \\ -\TX{bengali} & french & latvian & romansh & turkish \\ -brazil[ian] & friulan & lithuanian & \TX{russian} & turkmen \\ -breton & galician & \TX{lsorbian} & samin & \TX{ukrainian}\\ -bulgarian & \TX{german} & \TX{magyar} & \TX{sanskrit} & urdu \\ -\TX{catalan} & \TX{greek} & macedonian & scottish & \TX{usorbian} \\ -coptic & \TX{hebrew} & malayalam & \TX{serbian} & vietnamese \\ -croatian & \TX{hindi} & marathi & slovak & \TX{welsh} \\ -czech & icelandic \\ -\hline +\toprule +albanian & \TX{dutch} & interlingua & \TX{mongolian} & \TX{slovenian}\\ +amharic & \TX{english} & \TX{italian} & nko & \TX{sorbian}\\ +\TX{arabic} & \TX{esperanto} & japanese & \TX{norwegian} & spanish\\ +\TX{armenian}& estonian & kannada & occitan & swedish\\ +asturian & \TX{finnish} & khmer & \TX{persian} & \TX{syriac}\\ +basque & \TX{french} & \TX{korean} & piedmontese & tamil\\ +\TX{bengali} & friulian & \TX{kurdish} & polish & telugu\\ +breton & \TX{gaelic} & \TX{lao} & \TX{portuguese} & \TX{thai}\\ +bulgarian & galician & \TX{latin} & romanian & \TX{tibetan}\\ +\TX{catalan} & \TX{german} & latvian & romansh & turkish\\ +coptic & \TX{greek} & lithuanian & \TX{russian} & turkmen\\ +croatian & \TX{hebrew} & macedonian & \TX{sami} & \TX{ukrainian}\\ +\TX{czech} & \TX{hindi} & \TX{malay} & \TX{sanskrit} & urdu\\ +danish & \TX{hungarian} & malayalam & \TX{serbian} & vietnamese\\ +divehi & icelandic & marathi & slovak & \TX{welsh}\\ +\bottomrule \end{tabular} + + \caption{Languages currently supported in \pkg{polyglossia}} \end{table} -\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.} +\paragraph{Version Notes} The support for Amharic\new{v1.0.1} should be considered an experimental attempt to +port the package \pkg{ethiop}.\footnote{Feedback is welcome.} Version 1.1.1\new{v1.1.1} added support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.}, Lithuanian, %\footnote{ Provided by Kevin Godby and Paulius Sladkevičius.}, and Urdu. %\footnote{ Provided by Kamal Abdali.} % Version 1.2\new{v1.2.0} adds support for Armenian, Occitan, Bengali, -Lao, Malayalam, Marathi, Tamil, Telugu, and Turkmen.\footnote{ % +Lao, Malayalam, Marathi, Tamil, Telugu, and Turkmen.\footnote{% See acknowledgements at the end for due credit to the various contributors.} +Version 1.43\new{v1.43} silently introduced basic support for Japanese. This +is considered experimental, and feedback is appreciated. +In version 1.45\new{v1.45}, support for Kurdish and Mongolian as well as some new +variants (Canadian French and English) have been added. Furthermore, for consistency reasons, some language have +been renamed (\emph{farsi}\textrightarrow\emph{persian}, \emph{friulan}\textrightarrow\emph{friulian}, +\emph{magyar}\textrightarrow\emph{hungarian}, \emph{portuges}\textrightarrow\emph{portuguese}, +\emph{samin}\textrightarrow\emph{sami}) or merged (\emph{bahasai}\slash\emph{bahasam}\textrightarrow\emph{malay}, +\emph{brazil}\slash\emph{portuges}\textrightarrow\emph{portuguese}, +\emph{lsorbian}\slash\emph{usorbian}\textrightarrow\emph{sorbian}, +\emph{irish}\slash\emph{scottish}\textrightarrow\emph{gaelic}, +\emph{norsk}\slash\emph{nynorsk}\textrightarrow\emph{norwegian}). The old names are still supported for backwards +compatibility reasons, but they might not give access to newer language features. + + +\subsection{Relation to Babel languages} + +If you are familiar with the \pkg{babel} package, you will note that \pkg{polyglossia}'s language naming +slightly differs. Whereas \pkg{babel} has a unique name for each language variety (\eg\emph{american} and \emph{british}), +\pkg{polyglossia} differentiates language varieties via language options. + +Furthermore, \pkg{babel} uses sometimes abbreviations for language names (\eg\emph{bahasam} for Bahasa Malayu) as well +as endonyms, \ie language names coming from the designated languages (such as \emph{bahasa}, \emph{canadien} or \emph{magyar}). +As opposed to this, \pkg{polyglossia} always uses spelled-out (lower-cased) English language names. + +Table~\ref{tab:bbllang} lists the language names that differ in both packages. \pkg{Babel} names marked in red can also be used +in \pkg{polyglossia} as an alias.\footnote{This is for historical reasons, since earlier versions of \pkg{polyglossia} used + those names as well. Note, however, that you need to use the matching language switching commands, then, as + well, \eg \cmd\textportuges\ with \emph{portuges} (rather than \cmd\textportuguese).} + +\begin{table} +\label{tab:bbllang} +\begin{tabular}{lll} +\toprule +\textbf{Babel name} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\tabularnewline +\midrule +acadien & french & variant=acadian \\ +american & english & \emph{(default)} \\ +australian & english & variant=australian \\ +austrian & german & variant=austrian, spelling=old \\ +bahasa & malay & \emph{(default)} \\ +\TR{bahasam} & malay & variant=malaysian \\ +\TR{brazil} & portuguese & variant=brazilian \\ +british & english & variant=british \\ +canadian & english & variant=canadian \\ +canadien & french & variant=canadian \\ +\TR{farsi} & persian & \\ +\TR{friulan} & friulian & \\ +german & german & spelling=old \\ +\TR{irish} & gaelic & variant=irish \\ +kurmanji & kurdish & variant=kurmanji \\ +lowersorbian & sorbian & variant=lower \\ +\TR{magyar} & hungarian & \\ +naustrian & german & variant=austrian \\ +newzealand & english & variant=newzealand \\ +ngerman & german & \emph{(default)} \\ +\TR{norsk} & norwegian & variant=bokmal \\ +nswissgerman & german & variant=swiss \\ +\TR{nynorsk} & norwegian & \emph{(default)} \\ +polutonikogreek & greek & variant=polytonic \\ +\TR{portuges} & portuguese & \emph{(default)} \\ +\TR{samin} & sami & \\ +\TR{scottish} & gaelic & variant=scottish \\ +serbianc & serbian & script=Cyrillic \\ +slovene & slovenian & \\ +swissgerman & german & variant=swiss, spelling=old \\ +uppersorbian & sorbian & variant=upper \\ +\bottomrule +\end{tabular} + +\caption{Babel-polyglossia language name matching} +\end{table} +\subsection{Global options} -Polyglossia can also be loaded with the option -‘babelshorthands’\new{v1.1.1}, which globally activates \pkg{babel} -shorthands whenever available. Currently shorthands are implemented for -Catalan, Dutch, German, Italian, and Russian: see these respective -languages for details. - -Another option (turned off by default) is ‘localmarks’, which -redefines the internal \LaTeX\ macros \cmd\markboth\ and \cmd\markright. -\new{v1.2.0}Note that this was formerly turned on by default, but we -now realize that it causes more problems than otherwise. For backwards-compatibility -the opposite option ‘nolocalmarks’ is still available. +\pkg{Polyglossia} can be loaded with the following global package options: -There is also the option ‘quiet’ which turns off most info messages and some of the warnings -issued by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}. +\begin{itemize} + \item \TB{babelshorthands}\new{v1.1.1} globally activates \pkg{babel} + shorthands whenever available. Currently shorthands are implemented for + Catalan, Czech, Dutch, Finnish, German, Italian, Mongolian, and Russian. + Please refer to the respective language descriptions (sec.~\ref{specific}) for details. + + \item \TB{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and \cmd\markright. + In earlier versions of \pkg{polyglossia},\new{v1.2.0} this option was set by default, but we + now realize that it causes more problems than it helps, so it is now off by default. + For backwards-compatibility, the option \TB{nolocalmarks} which used to switch off the previous + default, and now does nothing, is still available. + + \item \TB{quiet} turns off most info messages and some of the warnings issued by \LaTeX, + \pkg{fontspec} and \pkg{polyglossia}. +\end{itemize} -\section{Language-switching commands} +\section{Language-switching commands}\label{languageswitching} -Whenever a language definition file \file{gloss-⟨lang⟩.ldf} is loaded, -the command \cmd{\text⟨lang⟩[⟨options⟩]\{…\}} \DescribeMacro{\text⟨lang⟩} +\subsection{Recommended commands} +For each activated language 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⟩¦ -(again with the possibility of setting language options locally. -\DescribeEnv{⟨lang⟩} +This command switches to the correct hyphenation patterns, it activates +some extra features for the selected language (such as extra spacing before +punctuation in French), and it translates the date when using ¦\today¦. +It does not, however, translate so-called \textit{caption strings}, i.\,e. +``chapter'', ``figure'' etc., to the local language (these remain in the main +language). + +The\DescribeEnv{⟨lang⟩}\ environment ¦⟨lang⟩¦, which is also available for any activated language, +is meant for longer passages of text. It behaves slightly different than the \cmd{\text⟨lang⟩\{…\}} +command: It does everything the latter does, but additionally, the caption strings are translated +as well, and the language is also passed to auxiliary files, the table of contents and the lists of +figures/tables. +Like the command, the environment provides the possibility of setting language options locally. For instance the following allows us to quote the beginning of Homer’s \textit{Iliad}: @@ -252,9 +355,30 @@ of Homer’s \textit{Iliad}: \end{greek} \bigskip -Note that for Arabic one cannot use the environment ¦arabic¦, +\noindent\DescribeEnv{Arabic} Note that for Arabic one cannot use the environment ¦arabic¦, as \cmd\arabic\ is defined internally by \LaTeX. In this case -we need to use the environment ¦Arabic¦ instead\DescribeEnv{Arabic}. +we need to use the environment ¦Arabic¦ instead. + +\subsection{Babel commands} +Some macros defined in \pkg{babel}’s \file{hyphen.cfg} (and thus usually +compiled into the \XeLaTeX\ and \LuaLaTeX\ format) are redefined, but keep a +similar behaviour. +\begin{itemize} +\item \DescribeMacro{\selectlanguage}\cmd{\selectlanguage[⟨options⟩]\{⟨lang⟩\}} +\item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage[⟨options⟩]\{⟨lang⟩\}\{…\}} +\item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}[⟨options⟩]\{⟨lang⟩\}} \dots{} \cmd{\end\{otherlanguage\}} +\item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}[⟨options⟩]\{⟨lang⟩\}} \dots{} \cmd{\end\{otherlanguage*\}} +\end{itemize} +% +¦\selectlanguage{⟨lang⟩}¦ and the ¦otherlanguage¦ environment are identical to the +the ¦⟨lang⟩¦ environment, except that ¦\selectlanguage{⟨lang⟩}¦ +does not need to be explicitly closed. The command ¦\foreinlanguage{⟨lang⟩}{…}¦ and the ¦otherlanguage*¦ +environment are identical with the use of the ¦\text⟨lang⟩¦ command, with the one +notable exception that they do not translate the date with ¦\today¦. + +Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg}, +the low-level commands for hyphenation and language switching +defined there are also accessible. \subsection{Other commands} The following commands are probably of lesser interest to the end user, but @@ -268,19 +392,14 @@ ought to be mentioned here. 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\setmainfont\ etc. - Likewise it is possible to use \Cmd\rmfamilylatin, \Cmd\sffamilylatin, + to a non-latin script, this will reset to the font defined with \cmd\setmainfont\ etc. + In a similar vein, it is possible to use \Cmd\rmfamilylatin, \Cmd\sffamilylatin, and \Cmd\ttfamilylatin. -\item Some macros defined in \pkg{babel}’s \file{hyphen.cfg} (and thus usually - compiled into the \XeLaTeX\ and \LuaLaTeX\ format) are redefined, but keep a similar - behaviour, namely \Cmd\selectlanguage, \Cmd\foreignlanguage, - and the environment ¦otherlanguage¦\DescribeEnv{otherlanguage}. +\item \Cmd\latinalph: Representation of counter as a lower-case letter: 1 = a, 2 = b, etc. + +\item \Cmd\latinAlph: Representation of counter as a uper-case letter: 1 = A, 2 = B, etc. \end{itemize} -% -Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg}, -the low-level commands for hyphenation and language switching -defined there are also accessible. \section{Font setup} @@ -307,14 +426,35 @@ the font, by means of \pkg{fontspec}’s \cmd\addfontfeature. If the current fon does not appear to support the script of that language, an error message is displayed. -\section{Hyphenation disabling} +\section{Adapting hyphenation} + +\subsection{Hyphenation exceptions} + +\TeX\ provides the command ¦\hyphenation{⟨exceptions⟩}¦ to globally define hyphenation exceptions +which override the hyphenation patterns for specified words. The command takes as argument a space-separated +list of words where hyphenation points are marked by a dash (if no dash is used, the respective word is not +hyphenated at all): +\begin{Verbatim} +\hyphenation{% + po-ly-glos-sia + LaTeX +} +\end{Verbatim} +% +These exceptions, however, apply to all languages. In addition to this, \pkg{polyglossia} provides +the command\new{v.1.45} +\displaycmd{\pghyphenation[⟨options⟩]\{⟨lang⟩\}\{⟨exceptions⟩\}}{\pghyphenation} +which can be used to define exceptions that only apply to a specific language or language variant, +respectively. + +\subsection{Hyphenation disabling} In some very specific contexts (such as music score creation), \TeX{} hyphenation is something to avoid as it may cause troubles. \pkg{polyglossia} provides two -functions: \cmd\disablehyphenation{} and \cmd\enablehyphenation . Note that when -you select a new language, hyphenation will be in the same state (enabled or -disabled) as before. When you reenable it, it will take the last selected -language. +functions: \Cmd\disablehyphenation\ and \Cmd\enablehyphenation. Note that if +you select a new language while hyphenation is disabled, it will remain disabled. +If you re-enable it, the hyphenation patterns of the currently selected language +will be activated. \section{Language-specific options and commands}\label{specific} @@ -324,7 +464,7 @@ The default value of each option is given in italic. %\subsection{amharic}\label{amharic} \subsection{arabic}\label{arabic} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} \item \TB{calendar} = \textit{gregorian} or islamic (= hijri) \item \TB{locale} = \textit{default},\footnote{ % @@ -339,7 +479,7 @@ The default value of each option is given in italic. \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}: +\paragraph*{Commands:} \begin{itemize} \item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad}) \item \Cmd\aemph to emphasize text with ¦\overline¦.\new{v1.2.0} @@ -347,8 +487,15 @@ The default value of each option is given in italic. This command is also available for Farsi, Urdu, etc. \end{itemize} -\subsection{bengali}\label{bengali}\new{v1.2.0} -\textbf{Options}: +\subsection{armenian}\label{armenian} +\paragraph*{Options:} +\begin{itemize} + \item \TB{variant}\new{v1.45} = eastern or \textit{western} + \item \TB{numerals}\new{v1.45} = armenian or \textit{arabic} +\end{itemize} + +\subsection[bengali]{bengali\new{v1.2.0}}\label{bengali} +\paragraph*{Options:} \begin{itemize} \item \TB{numerals} = Western, Bengali or \textit{Devanagari} \item \TB{changecounternumbering} = true or \textit{false} (use specified @@ -356,70 +503,129 @@ The default value of each option is given in italic. \end{itemize} \subsection{catalan}\label{catalan} -\textbf{Options:} +\paragraph*{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}: + +\paragraph*{Commands:} +\begin{itemize} + \item \Cmd{\l.l} and \Cmd{\L.L}\new{v1.1.1} can be used to type a geminated l, as in \textit{co\l.laborar}, + similar to \pkg{babel} (the glyph U+00B7 MIDDLE DOT is used as a geminating sign). +\end{itemize} + +\subsection{czech}\label{czech} + +\paragraph*{Options:} \begin{itemize} - \item \Cmd{\l.l} and \Cmd{\L.L} behave as in \pkg{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.} + \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45} + if this is turned on, the following shorthands for Czech are activated: + \begin{shorthands} + \item[¦"=¦] for an explicit hyphen sign which is repeated at the beginning + of the next line when hyphenated, as common in Czech typesetting + (also see option ¦splithyphens¦). + \item[¦"‘¦] for Czech left double quotes (looks like ,,). + \item[¦"’¦] for Czech right double quotes (looks like “). + \item[¦">¦] for Czech left double guillemets (looks like >>). + \item[¦"<¦] for Czech right double guillemets (looks like <<). + \end{shorthands} + \item \TB{splithyphens} = \textit{false} or true. \new{v1.45} + According to Czech typesetting conventions, if a word with a hard hyphen (such as \emph{je-li}) + is hyphenated at this hyphen, a second hyphenation character is to be inserted at the beginning + of the line that follows the hyphenation (\emph{je-/-li}).\\ + If this option is true, this is done automatically (so the shorthand ¦"=¦ is not needed). + Note, however, that the option is only available for \XeTeX. If you are using \LuaTeX, + load the \pkg{luavlna} package to the same effect. + \item \TB{vlna} = \textit{false} or true. \new{v1.45} + According to Czech typesetting conventions, single-letter words (non-syllable prepositions) + must not occur at line ends.\\ + If this option is true, this is taken care of. Note, however, that the option + is only available for \XeTeX. If you are using \LuaTeX, load the \pkg{luavlna} package + to the same effect. \end{itemize} \subsection{dutch}\label{dutch} -\textbf{Options:} +\paragraph*{Options:} \begin{itemize} \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1} - if this is turned on, all shorthands defined in \pkg{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} + if this is turned on, the following shorthands defined for fine-tuning hyphenation and + micro-typography of Dutch words are activated: + \begin{shorthands} + \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset + in the hyphenation patterns (as opposed to ¦\-¦ in default \TeX). + \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for + cases where the hyphen should stick at the following syllable. + \item[¦"|¦] disables a ligature at this position. + \item[¦""¦] allows for a line break at this position (without hyphenation sign). + \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, + hyphenation at the breakpoints preset in the hyphenation patterns is still allowed. + \end{shorthands} + In addition, the macro \Cmd\- is redefined to allow hyphens in the rest of the word (equivalent to ¦"-¦). \end{itemize} \subsection{english}\label{english} -\textbf{Options}: +\paragraph*{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{variant} = \textit{american} (= us), usmax (same as ‘american’ but with additional hyphenation patterns), + british (= uk), australian, canadian\new{v1.45} or newzealand \item \TB{ordinalmonthday} = true/\textit{false} (true by default only when variant = british) \end{itemize} \subsection{esperanto}\label{esperanto} -\textbf{Commands}: +\paragraph*{Commands:} \begin{itemize} - \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today\ (see the \pkg{babel} documentation) + \item \Cmd\hodiau\ and \Cmd\hodiaun are special forms of \cmd\today. The former produces the date in Esperanto + preceded by the article (\emph{la}), which is the most common date format. + The latter produces the same date format in accusative case. \end{itemize} -\subsection{farsi}\label{farsi} -\textbf{Options}: - \begin{itemize} - \item \TB{numerals} = western or \textit{eastern} - \item \TB{locale} (not yet implemented) - \item \TB{calendar} (not yet implemented) - \end{itemize} -\textbf{Commands}: - \begin{itemize} - \item \Cmd\abjad (see section \ref{abjad}) - \item \Cmd\aemph (see section \ref{arabic}). - \end{itemize} +\subsection{finnish}\label{finnish} +\paragraph*{Options:} +\begin{itemize} + \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45} + if this is turned on, the following shorthands for fine-tuning hyphenation and micro-typography + of Finnish words are activated: + \begin{shorthands} + \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset + in the hyphenation patterns (as opposed to ¦\-¦). + \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for + cases where the hyphen should stick at the following syllable. + \item[¦"|¦] disables a ligature at this position. + \item[¦""¦] allows for a line break at this position (without hyphenation sign). + \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, + hyphenation at the breakpoints preset in the hyphenation patterns is still allowed. + \end{shorthands} +\end{itemize} -\subsection{french}\label{french}\new{v1.5.0} -\textbf{Options}: +\subsection{french}\label{french} +\paragraph*{Options:} \begin{itemize} - \item \TB{automaticspacesaroundguillemets} = true or \textit{false} (default value = true. Adds space after the opening guillemets and before the closing guillemets. Such space is usually not typed in source code, and you should let polyglossia add it. However, if your source code contains such space, you can set this option to false.) - \item \TB{frenchfootnote} = true or \textit{false} (default value = true. Determines whether the footnote mark starting the footnote is normal script followed by a dot (default) or superscript without a dot.) + \item\TB{variant} = \textit{french} or canadian (=~acadian).\new{v1.45} + Currently, the three variants do not differ; they are supported for compatibility with \pkg{babel} (where they do not differ either). + \item \TB{autospacing} = true or \textit{false} (default value = true). One of the most distinct features of French typography is the addition + of extra spacing around punctuation and quotation marks (guillemets). By default, polyglossia adds these spaces automatically, so you don't need + to enter them. This options allows you to switch this feature off globally. + \item \TB{autospaceguillemets}\footnote{Up to version 1.44, the option was called \textit{automaticspacesaroundguillemets}. For backards compatibility reasons, the more verbose old option is still supported.} = true or \textit{false} (default value = true). If you only want to disable the automatic addition of spacing after opening and before closing guillemets (and not at punctuation), set this to \textit{false}. Note + that the more general option \textit{autospacing} overrides this. + \item \TB{autospacetypewriter}\footnote{Babel's syntax \textit{OriginalTypewriter} is also supported.}\new{1.45} = true or \textit{false} (default value = true). By default, automatic spacing is disabled in typewriter font. If this is enabled, spacing in typewriter context is the same as with roman and sans serif font, depending on the \textit{autospacing} and \textit{autospaceguillemets} settings (note that this was the default up to v.~1.44). + \item \TB{frenchfootnote} = true or \textit{false} (default value = true). If \textit{true}, footnotes start with a non-superscripted number followed by a dot, as common in French typography. Note that this might interfere with the specific footnote handling of classes or packages. + Also note that this option is only functional (by design) if French is the main language. \end{itemize} +\paragraph*{Commands:} +\begin{itemize} + \item \Cmd\NoAutoSpacing\new{v1.45} disables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\NoAutoSpacing foo:bar}¦ + \item \Cmd\AutoSpacing\new{v1.45} enables automatic spacing around punctuation and quotation marks in all following text. The command can also be used locally if braces are used for grouping: ¦{\AutoSpacing regarde!}¦ +\end{itemize} + +\subsection[gaelic]{gaelic\new{v1.45}}\label{gaelic} +\paragraph*{Options:} +\begin{itemize} + \item \TB{variant} = \textit{irish} or scottish +\end{itemize} \subsection{german}\label{german} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} \item\TB{variant} = \textit{german}, austrian or swiss.\new{v1.33.4} Setting variant=austrian or variant=swiss uses some lexical variants. @@ -434,39 +640,43 @@ The default value of each option is given in italic. 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 \pkg{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 a hyphen, e.g., ¦foo-""bar¦) - \item ¦"~¦ for a compound word mark without a breakpoint - \item ¦"=¦ for a compound word mark with a breakpoint, - allowing hyphenation in the composing words. - \item ¦"/¦ a slash that allows for a line break and maintains hyphenation points. - \end{itemize} + for fine-tuning hyphenation and micro-typography of German words are activated. + \begin{shorthands} + \item[¦"ck¦] for ¦ck¦ to be hyphenated as ¦k-k¦ (1901 spelling). + \item[¦"ff¦] for ¦ff¦ to be hyphenated as ¦ff-f¦ (1901 spelling); this is also available + for the letters l, m, n, p, r and t. + \item[¦"|¦] disables a ligature at this position (\eg ¦Auf"|lage¦). + \item[¦"=¦] for an explicit hyphen with a breakpoint, allowing for hyphenation at the + other points preset in the hyphenation patterns (as opposed to plain ¦-¦). + \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for + cases where the hyphen should stick at the following syllable,\eg ¦bergauf und "~ab¦. + \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset + in the hyphenation patterns (as opposed to ¦\-¦). + \item[¦""¦] allows for a line break at this position (without hyphenation sign); + \eg ¦(pseudo"~)""wissenschaftlich¦. + \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, hyphenation at the breakpoints + preset in the hyphenation patterns is still allowed. + \end{shorthands} There are also four shorthands for quotation signs: - \begin{itemize} - \item ¦"`¦ for German left double quotes („) - \item ¦"'¦ for German right double quotes (“) - \item ¦"<¦ for French left double quotes («) - \item ¦">¦ for French right double quotes (»). - \end{itemize} + \begin{shorthands} + \item[¦"`¦] for German left double quotes („) + \item[¦"'¦] for German right double quotes (“) + \item[¦"<¦] for French left double quotes («) + \item[¦">¦] for French right double quotes (»). + \end{shorthands} \item\TB{script} = \textit{latin} or fraktur.\new{v1.2.0} Setting script=fraktur modifies the captions for typesetting German in Fraktur. \end{itemize} \subsection{greek}\label{greek} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} \item \TB{variant} = \textit{monotonic} (= mono), polytonic (= poly), or ancient \item \TB{numerals} = \textit{greek} or arabic \item \TB{attic} = \textit{false}/true \end{itemize} -\textbf{Commands}: +\paragraph*{Commands:} \begin{itemize} \item \Cmd\Greeknumber and \Cmd\greeknumber \ (see section \ref{abjad}). \item The command \Cmd\atticnumeral (= \Cmd\atticnum) (activated with @@ -477,133 +687,274 @@ The default value of each option is given in italic. \end{itemize} \subsection{hebrew}\label{hebrew} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} \item \TB{numerals} = hebrew or \textit{arabic} \item \TB{calendar} = hebrew or \textit{gregorian} + \item \TB{marcheshvan} = true or \textit{false} (default value = true). If true, the second month of the civil year will be output as \texthebrew{מרחשון} (Marcheshvan) + rather than \texthebrew{חשון} (Heshvan), which is the default. \end{itemize} -\textbf{Commands}: +\paragraph*{Commands:} \begin{itemize} \item \Cmd\hebrewnumeral\ (= \Cmd\hebrewalph) (see section \ref{abjad}). \item \Cmd\aemph (see section \ref{arabic}). \end{itemize} -\subsection{hindi}\label{hindi}\new{v1.2.0} -\textbf{Options}: +\subsection[hindi]{hindi\new{v1.2.0}}\label{hindi} +\paragraph*{Options:} \begin{itemize} \item \TB{numerals} = Western or \textit{Devanagari} \end{itemize} +\subsection{hungarian}\label{hungarian} +\paragraph*{Commands:} +\begin{itemize} + \item \Cmd\ontoday\ (= \Cmd\ondatehungarian): special form of \cmd\today\ which produces a slightly different + date format as used in prepositional phrases (such as ‘on February 10th’) in Hungarian. +\end{itemize} + \subsection{italian}\label{italian} -\textbf{Option:} +\paragraph*{Options:} \begin{itemize} \item \TB{babelshorthands} = \textit{false} or true. \new{v1.2.0cc}% TODO: check version - Activates the ¦"¦ character as a switch to perform etymological - hyphenation when followed by a letter, or other tasks when followed by - certain analphabetic characters; in particular ¦""¦ is used to enter - double raised open quotes (the Italian keyboard misses the backtick), - and ¦"<¦ and ¦">¦ to insert open and closed guillemets without any - spacing after the open or before the closed sign. ¦"/¦ is made - equivalent to \slash allowing a linebreak after the slash without any - hyphen sign; ¦"-¦ produces a short rule/hyphen and a discretional line - break alowing line breaks in the second compound word fragment. -\end{itemize} - -\subsection{korean}\label{korean}\new{v1.40.0} -The language definition file includes U. S. hyphenation patterns in order to -enable hyphenation when writing English within Korean text. - -\subsection{lao}\label{lao}\new{v1.2.0} -\textbf{Options}: + Activates the ¦"¦ character as a switch to perform etymological + hyphenation when followed by a letter. Furthermore, the following shorthands are activated: + \begin{shorthands} + \item[¦""¦] double raised open quotes (the Italian keyboard misses the backtick). + \item[¦"<¦] open guillemet (looks like <<). + \item[¦">¦] closing guillemet (looks like >>). + \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to ¦\slash¦, + hyphenation at the breakpoints preset in the hyphenation patterns is still allowed. + \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset + in the hyphenation patterns (as opposed to ¦\-¦). + \end{shorthands} +\end{itemize} + +\subsection[korean]{korean\new{v1.40.0}}\label{korean} +\paragraph*{Options:} + \begin{itemize} + \item \TB{variant} = \textit{plain}, classic or modern: + for spacing before/after CJK punctuations. + `classic' is suitable for text with no interword spaces, + `modern' for text with interword spaces. + \item \TB{captions} = \textit{hangul} or hanja + \end{itemize} + +\subsection[kurdish]{kurdish\new{v1.45}}\label{kurdish} +Kurdish support includes Sorani Kurdish and Kurmanji Kurdish, both in either Arabic or Latin script. + +\paragraph*{Options:} +\begin{itemize} + \item \TB{variant} = kurmanji or \textit{sorani} + \item \TB{script} = Arabic or Latin. Defaults are ¦Arabic¦ for Sorani and ¦Latin¦ for Kurmanji. + \item \TB{numerals} = western or eastern. Defaults are ¦western¦ for Latin and ¦eastern¦ for Arabic script, depending on the selection above. + \item \TB{abjadjimnotail} = \textit{false} or true. + 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{ج}. + \item \TB{locale} (not yet implemented) + \item \TB{calendar} (not yet implemented) +\end{itemize} +\paragraph*{Commands:} +\begin{itemize} + \item \Cmd\ontoday: special form of \cmd\today\ which produces a slightly different + date format as used in prepositional phrases (as in ‘on February 10th’). Only available for Latin script. + \item \Cmd\abjad (see section \ref{abjad}) + \item \Cmd\aemph (see section \ref{arabic}) +\end{itemize} + +\subsection[lao]{lao\new{v1.2.0}}\label{lao} +\paragraph*{Options:} \begin{itemize} \item \TB{numerals} = lao or \textit{arabic} \end{itemize} \subsection{latin}\label{latin} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} \item \TB{variant} = classic, medieval or \textit{modern} \end{itemize} -\subsection{lsorbian and usorbian}\label{lsorbian}\label{usorbian} -\textbf{Commands}: - \begin{itemize} - \item \Cmd\oldtoday : see the \pkg{babel} documentation. - \end{itemize} +\subsection{malay}\label{malay} +\paragraph*{Options:} +\begin{itemize} + \item \TB{variant}\new{v1.45} = \textit{indonesian} (=~bahasai in \pkg{babel}) or + malaysian (=~bahasam in \pkg{babel}) +\end{itemize} -\subsection{magyar}\label{magyar} -\textbf{Commands}: - \begin{itemize} - \item \Cmd\ontoday\ (= \Cmd\ondatemagyar): special forms of \cmd\today\ - (see the \pkg{babel} documentation). - \end{itemize} +\subsection[mongolian]{mongolian\new{v1.45}}\label{mongolian} +Currently, only the Khalkha variety in Cyrillic script is supported. +\paragraph*{Options:} +\begin{itemize} + \item \TB{babelshorthands} = \textit{false} or true. + If this is turned on, the following shorthands are activated: + \begin{shorthands} + \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset + in the hyphenation patterns (as opposed to ¦\-¦). + \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for + cases where the hyphen should stick at the following syllable. + \item[¦"|¦] disables a ligature at this position. + \item[¦""¦] allows for a line break at this position (without hyphenation sign). + \item[¦"---¦] Cyrillic emdash in plain text. + \item[¦"--~¦] Cyrillic emdash in compound names (surnames). + \item[¦"--*¦] Cyrillic emdash for denoting direct speech. + \item[¦",¦] thinspace for initials with a breakpoint in following surname. + \item[¦"‘¦] for German left double quotes (looks like ,,). + \item[¦"’¦] for German right double quotes (looks like “). + \item[¦"<¦] for French left double quotes (looks like <<). + \item[¦">¦] for French right double quotes (looks like >>). + \end{shorthands} + \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic + alphanumerical numbering. +\end{itemize} +% +\paragraph*{Commands:} +\begin{itemize} + \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for + environments such as ¦enumerate¦. The command takes a counter as argument, + \eg ¦\textrussian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}. + \item \Cmd\asbuk: same in lowercase +\end{itemize} + +\subsection{norwegian}\label{norwegian} +\paragraph*{Options:} +\begin{itemize} + \item \TB{variant}\new{v1.45} = bokmal (=~`norsk' in \pkg{babel}) or \textit{nynorsk} +\end{itemize} + +\subsection{persian}\label{persian} +\paragraph*{Options:} +\begin{itemize} + \item \TB{numerals} = western or \textit{eastern} + \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{ج}. + \item \TB{locale} (not yet implemented) + \item \TB{calendar} (not yet implemented) +\end{itemize} +\paragraph*{Commands:} +\begin{itemize} + \item \Cmd\abjad (see section \ref{abjad}) + \item \Cmd\aemph (see section \ref{arabic}). +\end{itemize} + +\subsection{portuguese}\label{portuguese} +\paragraph*{Options:} +\begin{itemize} + \item \TB{variant}\new{v1.45} = brazilian or \textit{portuguese} +\end{itemize} \subsection{russian}\label{russian} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} - \item \TB{babelshorthands} = \textit{false} or true. % TODO check and document! + \item \TB{babelshorthands} = \textit{false} or true. + If this is turned on, the following shorthands are activated: + \begin{shorthands} + \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset + in the hyphenation patterns (as opposed to ¦\-¦). + \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for + cases where the hyphen should stick at the following syllable. + \item[¦"|¦] disables a ligature at this position. + \item[¦""¦] allows for a line break at this position (without hyphenation sign). + \item[¦"---¦] Cyrillic emdash in plain text. + \item[¦"--~¦] Cyrillic emdash in compound names (surnames). + \item[¦"--*¦] Cyrillic emdash for denoting direct speech. +% These are commented out in gloss-russian +% \item[¦",¦] thinspace for initials with a breakpoint in following surname. +% \item[¦"‘¦] for German left double quotes (looks like ,,). +% \item[¦"’¦] for German right double quotes (looks like “). +% \item[¦"<¦] for French left double quotes (looks like <<). +% \item[¦">¦] for French right double quotes (looks like >>). + \end{shorthands} \item \TB{spelling} = \textit{modern} or old (for captions and date only, not for hyphenation) + \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic + alphanumerical numbering. \end{itemize} - -\textbf{Commands}: +% +\paragraph*{Commands:} \begin{itemize} - \item \Cmd\Asbuk: produces the uppercase Russian alphabet, for - environments such as ¦enumerate¦ + \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for + environments such as ¦enumerate¦. The command takes a counter as argument, + \eg ¦\textrussian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}. \item \Cmd\asbuk: same in lowercase \end{itemize} +\subsection[sami]{sami\new{v1.45}}\label{sami} +Currently support for Sami is limited to Northern Sami. + \subsection{sanskrit}\label{sanskrit} -\textbf{Options}: +\paragraph*{Options:} \begin{itemize} - \item \TB{Script} (default = Devanagari). \new{v1.0.2} - The value is passed to \pkg{fontspec} in cases where ¦\sanskritfont¦ or - ¦\devanagarifont¦ are not defined. This can be useful if you typeset - Sanskrit texts in scripts other than Devanagari. - %TODO \item Numerals <<<< + \item \TB{Script} = \textit{Devanagari}\new{v1.0.2}, Gujarati, Malayalam, Bengali, Kannada, + Telugu or Latin. + The value is passed to \pkg{fontspec} in cases where the respective ¦\