diff options
author | Norbert Preining <norbert@preining.info> | 2020-01-30 03:00:45 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-01-30 03:00:45 +0000 |
commit | 1f2683ba3ec9c1855d5518e773c72d2241637449 (patch) | |
tree | 8e8cacd9473406eeaf6736cf32f6fa6996439a8d /macros/latex | |
parent | 0d9a20b65398ec99149b5c3d700e78f891b90842 (diff) |
CTAN sync 202001300300
Diffstat (limited to 'macros/latex')
18 files changed, 5011 insertions, 1378 deletions
diff --git a/macros/latex/contrib/curve2e/README.txt b/macros/latex/contrib/curve2e/README.txt index faddfe1ed4..ea1f941352 100644 --- a/macros/latex/contrib/curve2e/README.txt +++ b/macros/latex/contrib/curve2e/README.txt @@ -10,7 +10,7 @@ %% License information appended %% File README.txt for package curve2e - [2020-01-18 v.2.2.0 Extension package for pict2e] + [2020-01-29 v.2.2.1 Extension package for pict2e] The package bundle curve2e is composed of the following files curve2e.dtx diff --git a/macros/latex/contrib/curve2e/curve2e-manual.pdf b/macros/latex/contrib/curve2e/curve2e-manual.pdf Binary files differindex 32691f5d9b..27ace5e0ca 100644 --- a/macros/latex/contrib/curve2e/curve2e-manual.pdf +++ b/macros/latex/contrib/curve2e/curve2e-manual.pdf diff --git a/macros/latex/contrib/curve2e/curve2e-manual.tex b/macros/latex/contrib/curve2e/curve2e-manual.tex index 7e0a5dc1b4..442bb42650 100644 --- a/macros/latex/contrib/curve2e/curve2e-manual.tex +++ b/macros/latex/contrib/curve2e/curve2e-manual.tex @@ -1337,14 +1337,14 @@ Remember to delete all these subfolders if you decide to install a complete upda and \cs{fpdowhile}\meta{test}\meta{operations to be repeated} \end{flushleft} - The name of |\fptest| requires two further arguments that contain + The macro |\fptest| requires two further arguments that contain what to do if the \meta{test} is true, and what to do if the \meta{test} is false. The \meta{test} is a logical expressions that connects math relation - expressions, even floating pint ones, by means of \emph{logical + expressions, even floating point ones, by means of \emph{logical operators}; such operators are \verb+||+, \verb|&&|, and \verb|!|, respectively for OR, AND, NOT; for example \verb|!<| means “not lower - than” which is equivalent to “equal or grater than”. The logical + than”, which is equivalent to “equal or grater than”. The logical expression is parsed left to right and normal parentheses may be used to alter this sequence. The logical operators work also between logical variables, therefore the \meta{test} may contain @@ -1415,11 +1415,11 @@ y = f_2(t) The syntax is the following: \begin{flushleft}\obeylines -\cs{Lissajous}\marg{t}\Oarg{\meta{$A_1$},\meta{$N_1$},\meta{$\phi_1$},\meta{$A_2$},\meta{$N_2$},\meta{$\phi_2$}}\meta{$P_{\mathrm{out}}$} +\cs{Lissajous}\marg{in}\Oarg{\meta{$A_1$},\meta{$N_1$},\meta{$\phi_1$},\meta{$A_2$},\meta{$N_2$},\meta{$\phi_2$}}\meta{$P_{\mathrm{out}}$} \end{flushleft} where \meta{$P_{\mathrm{out}}$} is a macro that gets defined with the cartesian coordinates of the computed output - point. + point.Arguments \meta{in} (the $t$ parameter) and \meta{out} (the computed coordinates) need not be enclosed within braces if they are given as macros; actually the code shown in figure~\ref{fig:lissajous} shows such procedure that renders the input code simpler to read. After this definition the diagram is plotted in figure~\ref{fig:lissajous}. @@ -1432,14 +1432,15 @@ y = f_2(t) \VECTOR(-50,0)(50,0)\Pbox(50,0)[tr]{x}[0] \VECTOR(0,-50)(0,50)\Pbox(0,50)[tr]{y}[0] \Pbox(0,0)[tr]{O}[2] -\countdef\I=2560 \I=0 % -\Lissajous\I[40,2,90,40,3,0]\Pout -{\moveto(\Pout)\relax +{\countdef\I=2560 \I=0 \fpdowhile{\I !> 360}{% -\Lissajous\I\Pout -\lineto(\Pout)\advance\I by1\relax}% -\strokepath} + \fptest{\I=0}% + {\Lissajous\I[40,2,90,40,3,0]\Pout + \moveto(\Pout)}% + {\Lissajous\I\Pout + \lineto(\Pout)}% + \advance\I by1}\strokepath}% \end{picture} \end{Esempio} \caption{A Lissajous diagram}\label{fig:lissajous} @@ -1448,10 +1449,10 @@ y = f_2(t) For the independent variable $t$, the parameter of the Lissajous parametric equations, it is better to work with degrees instead of radians, and with integer numbers, so that the whole range - from $0^\circ$ to $369^\circ$ is certainly spanned. Notice the + from $0^\circ$ to $360^\circ$ is certainly spanned. Notice the braces that include the code for the Lissajous diagram; they may be useful to render that group suitable to be |\put| somewhere - else than with its center in the origin of the canvas axes, + else than with its center at the origin of the canvas axes, and/or to be used as the second argument of a \cs{rotatebox}\marg{angle} command so as to rotate the whole diagram. diff --git a/macros/latex/contrib/curve2e/curve2e.dtx b/macros/latex/contrib/curve2e/curve2e.dtx index 266ca29f25..d387706676 100644 --- a/macros/latex/contrib/curve2e/curve2e.dtx +++ b/macros/latex/contrib/curve2e/curve2e.dtx @@ -46,7 +46,7 @@ README.txt and curve2e-v161.sty. %<+package>\ProvidesPackage{curve2e}% %<+readme>File README.txt for package curve2e %<*package|readme> - [2020-01-18 v.2.2.0 Extension package for pict2e] + [2020-01-29 v.2.2.1 Extension package for pict2e] %</package|readme> %<*driver> \documentclass{ltxdoc}\errorcontextlines=9 @@ -1198,7 +1198,7 @@ README.txt and curve2e-v161.sty. \def\VVECTOR(#1)(#2){{\SubVect#1from#2to\@tempb \ScaleVect\@tempb by0.5to\@tempb \AddVect\@tempb and#1to\@tempb -\VECTOR(\@tempb)(#2)\VECTOR(\@tempb)(#1)\ignorespaces}} +\VECTOR(\@tempb)(#2)\VECTOR(\@tempb)(#1)}\ignorespaces} % \end{macrocode} % % The \texttt{pict2e} documentation says that if the vector length is diff --git a/macros/latex/contrib/curve2e/curve2e.pdf b/macros/latex/contrib/curve2e/curve2e.pdf Binary files differindex d204e13d9a..536c56b9d5 100644 --- a/macros/latex/contrib/curve2e/curve2e.pdf +++ b/macros/latex/contrib/curve2e/curve2e.pdf diff --git a/macros/latex/contrib/musicography/README.md b/macros/latex/contrib/musicography/README.md index da3feec9f0..7fb0add3ec 100644 --- a/macros/latex/contrib/musicography/README.md +++ b/macros/latex/contrib/musicography/README.md @@ -2,7 +2,7 @@ This package makes available the most commonly used symbols in writing about music in a way that can be used with `pdflatex` and looks consistent and -attractive. +attractive. (It also works with `xelatex`.) It includes accidentals, meters, and notes of different rhythmic values. The package provides a flexible, user-friendly interface written using `xparse`. diff --git a/macros/latex/contrib/musicography/musicography.pdf b/macros/latex/contrib/musicography/musicography.pdf Binary files differindex 3d8ab64a0b..59f48171c2 100644 --- a/macros/latex/contrib/musicography/musicography.pdf +++ b/macros/latex/contrib/musicography/musicography.pdf diff --git a/macros/latex/contrib/musicography/musicography.sty b/macros/latex/contrib/musicography/musicography.sty index dad5ff27f4..0e36b46a89 100644 --- a/macros/latex/contrib/musicography/musicography.sty +++ b/macros/latex/contrib/musicography/musicography.sty @@ -1,8 +1,8 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{musicography}[2019/05/28 +\ProvidesPackage{musicography}[2020/01/29 Symbols for music writing with pdflatex] -% Copyright 2019 Andrew A. Cashner, andrewacashner@gmail.com +% Copyright 2020 Andrew A. Cashner, andrewacashner@gmail.com % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -19,6 +19,9 @@ % and the documentation file musicography.tex. % CHANGE LOG +% 2020-01-29 - Reduced stack gap for \musFig +% 2019-11-24 - Fix problem with \MeterCThreeTwo where numerals were being +% printed next to each other instead of stacked. % 2019-05-28 - Fix issue #1: % + Correct notehead symbol for values < quarter note % (was hollow, should be filled) @@ -194,6 +197,7 @@ \let\musFontLarge\musFontBig } \NewDocumentCommand{\musFig}{ m }{% + \setstackgap{S}{1pt}% \musStack[\musFigFont]{#1}% } \NewDocumentCommand{\noFig}{ O{5} }{% @@ -211,7 +215,7 @@ \meterCplus{\musNumFont{3}}% } \NewDocumentCommand{\meterCThreeTwo}{}{% - \meterCplus{\musStack{3}{2}}% + \meterCplus{{\footnotesize\stackanchor[1pt]{3}{2}}}% } % Ternary meter used in 17th-century Spanish music \NewDocumentCommand{\meterCZ}{}{% diff --git a/macros/latex/contrib/musicography/musicography.tex b/macros/latex/contrib/musicography/musicography.tex index 2b7981c188..ce0777b3b7 100644 --- a/macros/latex/contrib/musicography/musicography.tex +++ b/macros/latex/contrib/musicography/musicography.tex @@ -14,8 +14,7 @@ {\end{tabular}\end{quote}} \usepackage[ - pdftitle={The musicography Package: Symbols for Music Writing with - pdflatex}, + pdftitle={The musicography Package: Symbols for Music Writing}, pdfauthor={Andrew A. Cashner}, pdfsubject={LaTeX package}, pdfkeywords={LaTeX, symbols, music, musicology, humanities} ]{hyperref} @@ -27,18 +26,19 @@ {\nolinkurl{andrewacashner@gmail.com}}% }% } -\date{May 28, 2019} +\date{January 29, 2020} \begin{document} \maketitle -Font packages for \code{pdflatex} only provided a limited range of musical -symbols. +Most \LaTeX{} font packages and freely available fonts only provided a limited +range of musical symbols. The \code{lilyglyphs} package uses Lilypond's fonts, but requires \code{lualatex}. This package makes available the most commonly used symbols in writing about -music in a way that can be used with \code{pdflatex} and looks consistent and -attractive. +music in a way that looks consistent and attractive. +It is especially useful for \code{pdflatex} but also works alongside Unicode +fonts with \code{xelatex}. It includes accidentals, meters, notes of different rhythmic values, and automatic formatting of figured bass. @@ -46,6 +46,9 @@ This package builds on the approach used in the \code{harmony} package, where the symbols are taken from the MusiXTeX fonts. But it provides a larger range of symbols and a more flexible, user-friendly interface written using \code{xparse}. +The package is meant to work hand-in-hand with my \code{semantic-markup} +package, and overrides some of its music-symbol commands with better +alternatives. \tableofcontents @@ -193,6 +196,9 @@ See \verb|\musSymbol| and \verb|\musAccidental| in the code listing below. \section{Changes} \begin{itemize} + \item[2020-01-29] Reduced stack gap for \verb|\musFig| + \item[2019/11/24] Fix \verb|\MeterCThreeTwo| so that numbers are stacked + and aligned correctly \item[2019/05/28] Bux fixes and new features, especially figured bass \begin{itemize} \item Fix issue 1 on Bitbucket, thanks to Christian Mondrup diff --git a/macros/latex/contrib/polyglossia/README b/macros/latex/contrib/polyglossia/README index 18b2c4746a..b2864ae1d1 100644 --- a/macros/latex/contrib/polyglossia/README +++ b/macros/latex/contrib/polyglossia/README @@ -1,7 +1,7 @@ ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.46 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -34,8 +34,8 @@ Polyglossia makes it possible to automate the following tasks: LICENSE -Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2019 Arthur Reutenauer, -Copyright (c) 2019 Bastien Roucariès, 2019 Jürgen Spitzmüller +Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, +Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence (https://opensource.org/licenses/MIT). diff --git a/macros/latex/contrib/polyglossia/polyglossia.dtx b/macros/latex/contrib/polyglossia/polyglossia.dtx index 6c669bbd57..3c85e2c6ff 100644 --- a/macros/latex/contrib/polyglossia/polyglossia.dtx +++ b/macros/latex/contrib/polyglossia/polyglossia.dtx @@ -11,7 +11,7 @@ ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.46 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -44,8 +44,8 @@ Polyglossia makes it possible to automate the following tasks: LICENSE -Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2019 Arthur Reutenauer, -Copyright (c) 2019 Bastien Roucariès, 2019 Jürgen Spitzmüller +Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, +Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence (https://opensource.org/licenses/MIT). @@ -74,7 +74,7 @@ to track the issues and follow progress. The polyglossia package (C) 2008–2010 François Charette - (C) 2011-2019 Arthur Reutenauer + (C) 2011-2020 Arthur Reutenauer (C) 2013 Elie Roux License information appended @@ -82,7 +82,7 @@ to track the issues and follow progress. \endpreamble \postamble - Copyright (C) 2019 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> + Copyright (C) 2020 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -101,61 +101,168 @@ to track the issues and follow progress. \let\MetaPrefix\DoubleperCent \askforoverwritefalse \generate{\file{gloss-acadien.ldf}{\from{polyglossia.dtx}{gloss-acadien.ldf}}} +\generate{\file{gloss-aeb.ldf}{\from{polyglossia.dtx}{gloss-aeb.ldf}}} +\generate{\file{gloss-af.ldf}{\from{polyglossia.dtx}{gloss-af.ldf}}} +\generate{\file{gloss-afb.ldf}{\from{polyglossia.dtx}{gloss-afb.ldf}}} \generate{\file{gloss-afrikaans.ldf}{\from{polyglossia.dtx}{gloss-afrikaans.ldf}}} \generate{\file{gloss-albanian.ldf}{\from{polyglossia.dtx}{gloss-albanian.ldf}}} +\generate{\file{gloss-am.ldf}{\from{polyglossia.dtx}{gloss-am.ldf}}} \generate{\file{gloss-american.ldf}{\from{polyglossia.dtx}{gloss-american.ldf}}} \generate{\file{gloss-amharic.ldf}{\from{polyglossia.dtx}{gloss-amharic.ldf}}} +\generate{\file{gloss-apd.ldf}{\from{polyglossia.dtx}{gloss-apd.ldf}}} +\generate{\file{gloss-ar-IQ.ldf}{\from{polyglossia.dtx}{gloss-ar-IQ.ldf}}} +\generate{\file{gloss-ar-JO.ldf}{\from{polyglossia.dtx}{gloss-ar-JO.ldf}}} +\generate{\file{gloss-ar-LB.ldf}{\from{polyglossia.dtx}{gloss-ar-LB.ldf}}} +\generate{\file{gloss-ar-MR.ldf}{\from{polyglossia.dtx}{gloss-ar-MR.ldf}}} +\generate{\file{gloss-ar-PS.ldf}{\from{polyglossia.dtx}{gloss-ar-PS.ldf}}} +\generate{\file{gloss-ar-SY.ldf}{\from{polyglossia.dtx}{gloss-ar-SY.ldf}}} +\generate{\file{gloss-ar-YE.ldf}{\from{polyglossia.dtx}{gloss-ar-YE.ldf}}} +\generate{\file{gloss-ar.ldf}{\from{polyglossia.dtx}{gloss-ar.ldf}}} \generate{\file{gloss-arabic.ldf}{\from{polyglossia.dtx}{gloss-arabic.ldf}}} \generate{\file{gloss-armenian.ldf}{\from{polyglossia.dtx}{gloss-armenian.ldf}}} +\generate{\file{gloss-arq.ldf}{\from{polyglossia.dtx}{gloss-arq.ldf}}} +\generate{\file{gloss-ary.ldf}{\from{polyglossia.dtx}{gloss-ary.ldf}}} +\generate{\file{gloss-arz.ldf}{\from{polyglossia.dtx}{gloss-arz.ldf}}} +\generate{\file{gloss-ast.ldf}{\from{polyglossia.dtx}{gloss-ast.ldf}}} \generate{\file{gloss-asturian.ldf}{\from{polyglossia.dtx}{gloss-asturian.ldf}}} \generate{\file{gloss-australian.ldf}{\from{polyglossia.dtx}{gloss-australian.ldf}}} \generate{\file{gloss-austrian.ldf}{\from{polyglossia.dtx}{gloss-austrian.ldf}}} +\generate{\file{gloss-ayl.ldf}{\from{polyglossia.dtx}{gloss-ayl.ldf}}} \generate{\file{gloss-bahasa.ldf}{\from{polyglossia.dtx}{gloss-bahasa.ldf}}} \generate{\file{gloss-bahasai.ldf}{\from{polyglossia.dtx}{gloss-bahasai.ldf}}} \generate{\file{gloss-bahasam.ldf}{\from{polyglossia.dtx}{gloss-bahasam.ldf}}} \generate{\file{gloss-basque.ldf}{\from{polyglossia.dtx}{gloss-basque.ldf}}} +\generate{\file{gloss-be-tarask.ldf}{\from{polyglossia.dtx}{gloss-be-tarask.ldf}}} +\generate{\file{gloss-be.ldf}{\from{polyglossia.dtx}{gloss-be.ldf}}} \generate{\file{gloss-belarusian.ldf}{\from{polyglossia.dtx}{gloss-belarusian.ldf}}} \generate{\file{gloss-bengali.ldf}{\from{polyglossia.dtx}{gloss-bengali.ldf}}} +\generate{\file{gloss-bg.ldf}{\from{polyglossia.dtx}{gloss-bg.ldf}}} +\generate{\file{gloss-bn.ldf}{\from{polyglossia.dtx}{gloss-bn.ldf}}} +\generate{\file{gloss-bo.ldf}{\from{polyglossia.dtx}{gloss-bo.ldf}}} \generate{\file{gloss-bosnian.ldf}{\from{polyglossia.dtx}{gloss-bosnian.ldf}}} +\generate{\file{gloss-br.ldf}{\from{polyglossia.dtx}{gloss-br.ldf}}} \generate{\file{gloss-brazil.ldf}{\from{polyglossia.dtx}{gloss-brazil.ldf}}} \generate{\file{gloss-breton.ldf}{\from{polyglossia.dtx}{gloss-breton.ldf}}} \generate{\file{gloss-british.ldf}{\from{polyglossia.dtx}{gloss-british.ldf}}} +\generate{\file{gloss-bs.ldf}{\from{polyglossia.dtx}{gloss-bs.ldf}}} \generate{\file{gloss-bulgarian.ldf}{\from{polyglossia.dtx}{gloss-bulgarian.ldf}}} +\generate{\file{gloss-ca.ldf}{\from{polyglossia.dtx}{gloss-ca.ldf}}} \generate{\file{gloss-canadian.ldf}{\from{polyglossia.dtx}{gloss-canadian.ldf}}} \generate{\file{gloss-canadien.ldf}{\from{polyglossia.dtx}{gloss-canadien.ldf}}} \generate{\file{gloss-catalan.ldf}{\from{polyglossia.dtx}{gloss-catalan.ldf}}} +\generate{\file{gloss-ckb-Arab.ldf}{\from{polyglossia.dtx}{gloss-ckb-Arab.ldf}}} +\generate{\file{gloss-ckb-Latn.ldf}{\from{polyglossia.dtx}{gloss-ckb-Latn.ldf}}} +\generate{\file{gloss-ckb.ldf}{\from{polyglossia.dtx}{gloss-ckb.ldf}}} +\generate{\file{gloss-cop.ldf}{\from{polyglossia.dtx}{gloss-cop.ldf}}} \generate{\file{gloss-coptic.ldf}{\from{polyglossia.dtx}{gloss-coptic.ldf}}} \generate{\file{gloss-croatian.ldf}{\from{polyglossia.dtx}{gloss-croatian.ldf}}} +\generate{\file{gloss-cy.ldf}{\from{polyglossia.dtx}{gloss-cy.ldf}}} +\generate{\file{gloss-cz.ldf}{\from{polyglossia.dtx}{gloss-cz.ldf}}} \generate{\file{gloss-czech.ldf}{\from{polyglossia.dtx}{gloss-czech.ldf}}} +\generate{\file{gloss-da.ldf}{\from{polyglossia.dtx}{gloss-da.ldf}}} \generate{\file{gloss-danish.ldf}{\from{polyglossia.dtx}{gloss-danish.ldf}}} +\generate{\file{gloss-de-AT-1901.ldf}{\from{polyglossia.dtx}{gloss-de-AT-1901.ldf}}} +\generate{\file{gloss-de-AT-1996.ldf}{\from{polyglossia.dtx}{gloss-de-AT-1996.ldf}}} +\generate{\file{gloss-de-AT.ldf}{\from{polyglossia.dtx}{gloss-de-AT.ldf}}} +\generate{\file{gloss-de-CH-1901.ldf}{\from{polyglossia.dtx}{gloss-de-CH-1901.ldf}}} +\generate{\file{gloss-de-CH-1996.ldf}{\from{polyglossia.dtx}{gloss-de-CH-1996.ldf}}} +\generate{\file{gloss-de-CH.ldf}{\from{polyglossia.dtx}{gloss-de-CH.ldf}}} +\generate{\file{gloss-de-DE-1901.ldf}{\from{polyglossia.dtx}{gloss-de-DE-1901.ldf}}} +\generate{\file{gloss-de-DE-1996.ldf}{\from{polyglossia.dtx}{gloss-de-DE-1996.ldf}}} +\generate{\file{gloss-de-DE.ldf}{\from{polyglossia.dtx}{gloss-de-DE.ldf}}} +\generate{\file{gloss-de-Latf-AT-1901.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-AT-1901.ldf}}} +\generate{\file{gloss-de-Latf-AT-1996.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-AT-1996.ldf}}} +\generate{\file{gloss-de-Latf-AT.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-AT.ldf}}} +\generate{\file{gloss-de-Latf-CH-1901.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-CH-1901.ldf}}} +\generate{\file{gloss-de-Latf-CH-1996.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-CH-1996.ldf}}} +\generate{\file{gloss-de-Latf-CH.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-CH.ldf}}} +\generate{\file{gloss-de-Latf-DE-1901.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-DE-1901.ldf}}} +\generate{\file{gloss-de-Latf-DE-1996.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-DE-1996.ldf}}} +\generate{\file{gloss-de-Latf-DE.ldf}{\from{polyglossia.dtx}{gloss-de-Latf-DE.ldf}}} +\generate{\file{gloss-de-Latf.ldf}{\from{polyglossia.dtx}{gloss-de-Latf.ldf}}} +\generate{\file{gloss-de.ldf}{\from{polyglossia.dtx}{gloss-de.ldf}}} \generate{\file{gloss-divehi.ldf}{\from{polyglossia.dtx}{gloss-divehi.ldf}}} +\generate{\file{gloss-dsb.ldf}{\from{polyglossia.dtx}{gloss-dsb.ldf}}} \generate{\file{gloss-dutch.ldf}{\from{polyglossia.dtx}{gloss-dutch.ldf}}} +\generate{\file{gloss-dv.ldf}{\from{polyglossia.dtx}{gloss-dv.ldf}}} +\generate{\file{gloss-el-monoton.ldf}{\from{polyglossia.dtx}{gloss-el-monoton.ldf}}} +\generate{\file{gloss-el-polyton.ldf}{\from{polyglossia.dtx}{gloss-el-polyton.ldf}}} +\generate{\file{gloss-el.ldf}{\from{polyglossia.dtx}{gloss-el.ldf}}} +\generate{\file{gloss-en-AU.ldf}{\from{polyglossia.dtx}{gloss-en-AU.ldf}}} +\generate{\file{gloss-en-CA.ldf}{\from{polyglossia.dtx}{gloss-en-CA.ldf}}} +\generate{\file{gloss-en-GB.ldf}{\from{polyglossia.dtx}{gloss-en-GB.ldf}}} +\generate{\file{gloss-en-NZ.ldf}{\from{polyglossia.dtx}{gloss-en-NZ.ldf}}} +\generate{\file{gloss-en-US.ldf}{\from{polyglossia.dtx}{gloss-en-US.ldf}}} +\generate{\file{gloss-en.ldf}{\from{polyglossia.dtx}{gloss-en.ldf}}} \generate{\file{gloss-english.ldf}{\from{polyglossia.dtx}{gloss-english.ldf}}} +\generate{\file{gloss-eo.ldf}{\from{polyglossia.dtx}{gloss-eo.ldf}}} +\generate{\file{gloss-es-ES.ldf}{\from{polyglossia.dtx}{gloss-es-ES.ldf}}} +\generate{\file{gloss-es-MX.ldf}{\from{polyglossia.dtx}{gloss-es-MX.ldf}}} +\generate{\file{gloss-es.ldf}{\from{polyglossia.dtx}{gloss-es.ldf}}} \generate{\file{gloss-esperanto.ldf}{\from{polyglossia.dtx}{gloss-esperanto.ldf}}} \generate{\file{gloss-estonian.ldf}{\from{polyglossia.dtx}{gloss-estonian.ldf}}} +\generate{\file{gloss-et.ldf}{\from{polyglossia.dtx}{gloss-et.ldf}}} +\generate{\file{gloss-eu.ldf}{\from{polyglossia.dtx}{gloss-eu.ldf}}} +\generate{\file{gloss-fa.ldf}{\from{polyglossia.dtx}{gloss-fa.ldf}}} \generate{\file{gloss-farsi.ldf}{\from{polyglossia.dtx}{gloss-farsi.ldf}}} +\generate{\file{gloss-fi.ldf}{\from{polyglossia.dtx}{gloss-fi.ldf}}} \generate{\file{gloss-finnish.ldf}{\from{polyglossia.dtx}{gloss-finnish.ldf}}} +\generate{\file{gloss-fr-CA.ldf}{\from{polyglossia.dtx}{gloss-fr-CA.ldf}}} +\generate{\file{gloss-fr-CH.ldf}{\from{polyglossia.dtx}{gloss-fr-CH.ldf}}} +\generate{\file{gloss-fr-FR.ldf}{\from{polyglossia.dtx}{gloss-fr-FR.ldf}}} +\generate{\file{gloss-fr.ldf}{\from{polyglossia.dtx}{gloss-fr.ldf}}} \generate{\file{gloss-french.ldf}{\from{polyglossia.dtx}{gloss-french.ldf}}} \generate{\file{gloss-friulan.ldf}{\from{polyglossia.dtx}{gloss-friulan.ldf}}} \generate{\file{gloss-friulian.ldf}{\from{polyglossia.dtx}{gloss-friulian.ldf}}} +\generate{\file{gloss-fur.ldf}{\from{polyglossia.dtx}{gloss-fur.ldf}}} +\generate{\file{gloss-ga.ldf}{\from{polyglossia.dtx}{gloss-ga.ldf}}} \generate{\file{gloss-gaelic.ldf}{\from{polyglossia.dtx}{gloss-gaelic.ldf}}} \generate{\file{gloss-galician.ldf}{\from{polyglossia.dtx}{gloss-galician.ldf}}} +\generate{\file{gloss-gd.ldf}{\from{polyglossia.dtx}{gloss-gd.ldf}}} \generate{\file{gloss-georgian.ldf}{\from{polyglossia.dtx}{gloss-georgian.ldf}}} \generate{\file{gloss-german.ldf}{\from{polyglossia.dtx}{gloss-german.ldf}}} \generate{\file{gloss-germanb.ldf}{\from{polyglossia.dtx}{gloss-germanb.ldf}}} +\generate{\file{gloss-gl.ldf}{\from{polyglossia.dtx}{gloss-gl.ldf}}} +\generate{\file{gloss-grc.ldf}{\from{polyglossia.dtx}{gloss-grc.ldf}}} \generate{\file{gloss-greek.ldf}{\from{polyglossia.dtx}{gloss-greek.ldf}}} +\generate{\file{gloss-he.ldf}{\from{polyglossia.dtx}{gloss-he.ldf}}} \generate{\file{gloss-hebrew.ldf}{\from{polyglossia.dtx}{gloss-hebrew.ldf}}} +\generate{\file{gloss-hi.ldf}{\from{polyglossia.dtx}{gloss-hi.ldf}}} \generate{\file{gloss-hindi.ldf}{\from{polyglossia.dtx}{gloss-hindi.ldf}}} +\generate{\file{gloss-hr.ldf}{\from{polyglossia.dtx}{gloss-hr.ldf}}} +\generate{\file{gloss-hsb.ldf}{\from{polyglossia.dtx}{gloss-hsb.ldf}}} +\generate{\file{gloss-hu.ldf}{\from{polyglossia.dtx}{gloss-hu.ldf}}} \generate{\file{gloss-hungarian.ldf}{\from{polyglossia.dtx}{gloss-hungarian.ldf}}} +\generate{\file{gloss-hy.ldf}{\from{polyglossia.dtx}{gloss-hy.ldf}}} +\generate{\file{gloss-ia.ldf}{\from{polyglossia.dtx}{gloss-ia.ldf}}} \generate{\file{gloss-icelandic.ldf}{\from{polyglossia.dtx}{gloss-icelandic.ldf}}} +\generate{\file{gloss-id.ldf}{\from{polyglossia.dtx}{gloss-id.ldf}}} \generate{\file{gloss-interlingua.ldf}{\from{polyglossia.dtx}{gloss-interlingua.ldf}}} \generate{\file{gloss-irish.ldf}{\from{polyglossia.dtx}{gloss-irish.ldf}}} +\generate{\file{gloss-is.ldf}{\from{polyglossia.dtx}{gloss-is.ldf}}} +\generate{\file{gloss-it.ldf}{\from{polyglossia.dtx}{gloss-it.ldf}}} \generate{\file{gloss-italian.ldf}{\from{polyglossia.dtx}{gloss-italian.ldf}}} +\generate{\file{gloss-ja.ldf}{\from{polyglossia.dtx}{gloss-ja.ldf}}} \generate{\file{gloss-japanese.ldf}{\from{polyglossia.dtx}{gloss-japanese.ldf}}} +\generate{\file{gloss-ka.ldf}{\from{polyglossia.dtx}{gloss-ka.ldf}}} \generate{\file{gloss-kannada.ldf}{\from{polyglossia.dtx}{gloss-kannada.ldf}}} \generate{\file{gloss-khmer.ldf}{\from{polyglossia.dtx}{gloss-khmer.ldf}}} +\generate{\file{gloss-km.ldf}{\from{polyglossia.dtx}{gloss-km.ldf}}} +\generate{\file{gloss-kmr-Arab.ldf}{\from{polyglossia.dtx}{gloss-kmr-Arab.ldf}}} +\generate{\file{gloss-kmr-Latn.ldf}{\from{polyglossia.dtx}{gloss-kmr-Latn.ldf}}} +\generate{\file{gloss-kmr.ldf}{\from{polyglossia.dtx}{gloss-kmr.ldf}}} +\generate{\file{gloss-kn.ldf}{\from{polyglossia.dtx}{gloss-kn.ldf}}} +\generate{\file{gloss-ko.ldf}{\from{polyglossia.dtx}{gloss-ko.ldf}}} \generate{\file{gloss-korean.ldf}{\from{polyglossia.dtx}{gloss-korean.ldf}}} +\generate{\file{gloss-ku-Arab.ldf}{\from{polyglossia.dtx}{gloss-ku-Arab.ldf}}} +\generate{\file{gloss-ku-Latn.ldf}{\from{polyglossia.dtx}{gloss-ku-Latn.ldf}}} +\generate{\file{gloss-ku.ldf}{\from{polyglossia.dtx}{gloss-ku.ldf}}} \generate{\file{gloss-kurdish.ldf}{\from{polyglossia.dtx}{gloss-kurdish.ldf}}} +\generate{\file{gloss-kurmanji.ldf}{\from{polyglossia.dtx}{gloss-kurmanji.ldf}}} +\generate{\file{gloss-la-x-classic.ldf}{\from{polyglossia.dtx}{gloss-la-x-classic.ldf}}} +\generate{\file{gloss-la-x-ecclesia.ldf}{\from{polyglossia.dtx}{gloss-la-x-ecclesia.ldf}}} +\generate{\file{gloss-la-x-medieval.ldf}{\from{polyglossia.dtx}{gloss-la-x-medieval.ldf}}} +\generate{\file{gloss-la.ldf}{\from{polyglossia.dtx}{gloss-la.ldf}}} \generate{\file{gloss-lao.ldf}{\from{polyglossia.dtx}{gloss-lao.ldf}}} \generate{\file{gloss-latex.ldf}{\from{polyglossia.dtx}{gloss-latex.ldf}}} \generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}} @@ -164,15 +271,23 @@ to track the issues and follow progress. \generate{\file{gloss-latinmedieval.ldf}{\from{polyglossia.dtx}{gloss-latinmedieval.ldf}}} \generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}} \generate{\file{gloss-lithuanian.ldf}{\from{polyglossia.dtx}{gloss-lithuanian.ldf}}} +\generate{\file{gloss-lo.ldf}{\from{polyglossia.dtx}{gloss-lo.ldf}}} \generate{\file{gloss-lowersorbian.ldf}{\from{polyglossia.dtx}{gloss-lowersorbian.ldf}}} \generate{\file{gloss-lsorbian.ldf}{\from{polyglossia.dtx}{gloss-lsorbian.ldf}}} +\generate{\file{gloss-lt.ldf}{\from{polyglossia.dtx}{gloss-lt.ldf}}} +\generate{\file{gloss-lv.ldf}{\from{polyglossia.dtx}{gloss-lv.ldf}}} \generate{\file{gloss-macedonian.ldf}{\from{polyglossia.dtx}{gloss-macedonian.ldf}}} \generate{\file{gloss-magyar.ldf}{\from{polyglossia.dtx}{gloss-magyar.ldf}}} \generate{\file{gloss-malay.ldf}{\from{polyglossia.dtx}{gloss-malay.ldf}}} \generate{\file{gloss-malayalam.ldf}{\from{polyglossia.dtx}{gloss-malayalam.ldf}}} \generate{\file{gloss-marathi.ldf}{\from{polyglossia.dtx}{gloss-marathi.ldf}}} +\generate{\file{gloss-mk.ldf}{\from{polyglossia.dtx}{gloss-mk.ldf}}} +\generate{\file{gloss-ml.ldf}{\from{polyglossia.dtx}{gloss-ml.ldf}}} +\generate{\file{gloss-mn.ldf}{\from{polyglossia.dtx}{gloss-mn.ldf}}} \generate{\file{gloss-mongolian.ldf}{\from{polyglossia.dtx}{gloss-mongolian.ldf}}} +\generate{\file{gloss-mr.ldf}{\from{polyglossia.dtx}{gloss-mr.ldf}}} \generate{\file{gloss-naustrian.ldf}{\from{polyglossia.dtx}{gloss-naustrian.ldf}}} +\generate{\file{gloss-nb.ldf}{\from{polyglossia.dtx}{gloss-nb.ldf}}} \generate{\file{gloss-newzealand.ldf}{\from{polyglossia.dtx}{gloss-newzealand.ldf}}} \generate{\file{gloss-ngerman.ldf}{\from{polyglossia.dtx}{gloss-ngerman.ldf}}} \generate{\file{gloss-nko.ldf}{\from{polyglossia.dtx}{gloss-nko.ldf}}} @@ -249,19 +364,19 @@ to track the issues and follow progress. % !TeX TS-program = xelatex \documentclass[11pt]{ltxdoc} \usepackage{color} -\usepackage{xspace,fancyvrb,booktabs} +\usepackage{xspace,fancyvrb,longtable,booktabs} \usepackage[neverdecrease]{paralist} \usepackage[format=hang,labelfont=bf,labelsep=period]{caption} -\definecolor{myblue}{rgb}{0.02,0.04,0.48} +\definecolor{xpgblue}{rgb}{0.02,0.04,0.48} \definecolor{lightblue}{rgb}{0.61,.8,.8} -\definecolor{myred}{rgb}{0.65,0.04,0.07} +\definecolor{xpgred}{rgb}{0.65,0.04,0.07} \usepackage[ unicode=true, bookmarks=true, colorlinks=true, - linkcolor=myblue, - urlcolor=myblue, - citecolor=myblue, + linkcolor=xpgblue, + urlcolor=xpgblue, + citecolor=xpgblue, hyperindex=false, hyperfootnotes=false, pdftitle={Polyglossia: Modern multilingual typesetting with XeLaTeX and LuaLaTeX}, @@ -277,13 +392,13 @@ to track the issues and follow progress. \setotherlanguages{arabic,armenian,hebrew,syriac,greek,russian,serbian,catalan,georgian} \usepackage[protrusion]{microtype} \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*\TA[1]{\textsc{\color{myblue}#1}} +\newcommand*\pkg[1]{\textsf{\color{xpgblue}#1}} +\newcommand*\file[1]{\texttt{\color{xpgblue}#1}} +\newcommand*\TR[1]{\textcolor{xpgred}{#1}} +\newcommand*\TX[1]{\hyperref[#1]{\textcolor{xpgred}{#1}}} +\newcommand*\TA[1]{\textsc{\color{xpgblue}#1}} \newcommand*\link[1]{\href{#1}{#1}} +\renewcommand*\meta[1]{\texttt{⟨#1⟩}} \def\eg{\textit{e.g.,}\xspace} \def\ie{\textit{i.e.,}\xspace} \def\ca{\textit{ca.}\@\xspace} @@ -291,14 +406,37 @@ to track the issues and follow progress. \def\Ie{\textit{I.e.,}\xspace} \def\etc{\@ifnextchar.{\textit{etc}}{\textit{etc.}\@\xspace}} +%% Commands for documenting options +\newcommand*\xpgoption[1]{\textcolor{xpgblue}{\ttfamily\bfseries #1}} +\newcommand*\xpgvalue[1]{\texttt{#1}} +\newcommand*\xpgpresetvalue[1]{\texttt{\textit{#1}}} +\newcommand*\xpgdefaultvalue[1]{\texttt{*#1}} + +% arguments: #1 version number, #2 key name, #3 footnote, #4 possible values +\NewDocumentCommand\xpgchoicekey{omom}{% + \xpgoption{#2}\IfValueT{#3}{\footnote{#3}}% + \IfValueT{#1}{\new{#1}} \xpgvalue{=} #4\par% +} + +% arguments: #1 version number, #2 key name, #3 footnote +\NewDocumentCommand\xpgboolkey{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{true} or \xpgvalue{false}}} +\NewDocumentCommand\xpgboolkeytrue{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{\xpgpresetvalue{true}} or \xpgvalue{false}}} +\NewDocumentCommand\xpgboolkeyfalse{omo}{\xpgchoicekey[#1]{#2}[#3]{\xpgdefaultvalue{true} or \xpgpresetvalue{false}}} + +% arguments: #1 version number, #2 key name, #3 default code +\NewDocumentCommand\xpgcodekey{omv}{% + \xpgoption{#2}\IfValueT{#1}{\new{#1}} + \xpgvalue{=} \meta{code} (default value: \texttt{#3})\par% +} + %% Sidenotes << copied from fontspec.dtx \newcommand\new[1]{% - \edef\thisversion{#1}% + \edef\thisversion{v#1}% \ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi $\leftarrow$}% \marginpar{\centering \small\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi - \textsf{#1}}} + \textsf{v#1}}} \newcommand\displaycmd[2]{% \\\DescribeMacro{#2}\centerline{\cmd{#1}}} \renewenvironment{itemize}{\begin{compactitem}[\char"2023]}%[{\fontspec{DejaVu Sans}\char"25BB}]}% @@ -318,7 +456,7 @@ to track the issues and follow progress. \pretocmd{\subsection}{\condbreak{2\baselineskip}}{}{} %% fontspec declarations: -\setmainfont{Linux Libertine O} +\setmainfont{Linux Libertine O}[Numbers=OldStyle] \setsansfont{Linux Biolinum O} \setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono} \newfontfamily\arabicfont[Script=Arabic]{Amiri} @@ -348,12 +486,12 @@ to track the issues and follow progress. % \errorcontextlines=999 % \makeatletter % -% \hyphenation{Kha-li-ghi Reu-ten-auer} +% \hyphenation{Kha-li-ghi Reu-ten-auer new-zea-land} % \GetFileInfo{polyglossia.sty} % % \title{\textcolor{lightblue}{\Huge\fontspec[LetterSpace=40]{GFS Ambrosia} Πολυγλωσσια} % \\[16pt] -% \color{myblue}Polyglossia: Modern multilingual typesetting with \XeLaTeX\ and \LuaLaTeX} +% \color{xpgblue}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\\ @@ -376,7 +514,7 @@ to track the issues and follow progress. % \section{Introduction} % % \pkg{Polyglossia} is a package for facilitating multilingual typesetting with -% \XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it +% \XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it % can be used as an alternative to \pkg{babel} for performing the following % tasks automatically: % @@ -400,7 +538,7 @@ to track the issues and follow progress. % that are written from right to left (via the package \pkg{bidi}, % available separately). % \end{enumerate} -% +% ^^A % Several features of \pkg{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 @@ -412,7 +550,7 @@ to track the issues and follow progress. % 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 +% (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}). @@ -423,16 +561,16 @@ to track the issues and follow progress. % \subsection{Activating languages} % % The default language of a document is specified by means of the command -% \displaycmd{\setdefaultlanguage[⟨options⟩]\{⟨lang⟩\}}{\setdefaultlanguage} +% \displaycmd{\setdefaultlanguage\oarg{options}\marg{lang}}{\setdefaultlanguage} % (or, equivalently, \Cmd\setmainlanguage). % Secondary languages are specified with -% \displaycmd{\setotherlanguage[⟨options⟩]\{⟨lang⟩\}.}{\setotherlanguage} +% \displaycmd{\setotherlanguage\oarg{options}\marg{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} -% +% \displaycmd{\setotherlanguages\marg{lang1⟩,⟨lang2⟩,⟨lang3⟩,⟨…}.}{\setotherlanguages} +% ^^A % All language-specific options can be modified locally by means of the % language-switching commands described in section \ref{languageswitching}. % @@ -453,7 +591,7 @@ to track the issues and follow progress. % ^^A Edited by hand -- JS, 2019-11-01 % \begin{tabular}{lllll} % \toprule -% \TX{afrikaans} & danish & \TX{hungarian} & marathi & \TX{slovenian} \\ +% \TX{afrikaans} & danish & \TX{hungarian} & \TX{marathi} & \TX{slovenian} \\ % albanian & divehi & icelandic & \TX{mongolian} & \TX{sorbian} \\ % amharic & \TX{dutch} & interlingua & nko & \TX{spanish} \\ % \TX{arabic} & \TX{english} & \TX{italian} & \TX{norwegian} & swedish \\ @@ -467,26 +605,26 @@ to track the issues and follow progress. % bulgarian & \TX{georgian} & latvian & \TX{russian} & \TX{ukrainian} \\ % \TX{catalan} & \TX{german} & lithuanian & \TX{sami} & urdu \\ % coptic & \TX{greek} & macedonian & \TX{sanskrit} & vietnamese \\ -% croatian & \TX{hebrew} & \TX{malay} & \TX{serbian} & \TX{welsh} \\ +% \TX{croatian} & \TX{hebrew} & \TX{malay} & \TX{serbian} & \TX{welsh} \\ % \TX{czech} & \TX{hindi} & malayalam & \TX{slovak} & \\ % \bottomrule % \end{tabular} % % \end{table} % -% \paragraph{Version Notes} The support for Amharic\new{v1.0.1} should be considered an experimental attempt to +% \paragraph{Version Notes} The support for Amharic\new{1.0.1} should be considered an experimental attempt to % port the package \pkg{ethiop}; feedback is welcome. -% Version 1.1.1\new{v1.1.1} added support for Asturian, %\footnote{ Provided by Kevin Godby and Xuacu Saturio.}, +% Version 1.1.1\new{1.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.} % ^^A -% Version 1.2\new{v1.2.0} introduced Armenian, Occitan, Bengali, +% Version 1.2\new{1.2.0} introduced Armenian, Occitan, Bengali, % 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} brought basic support for Japanese (this +% Version 1.43\new{1.43} brought basic support for Japanese (this % is considered experimental, 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 +% In version 1.45\new{1.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}, @@ -495,10 +633,10 @@ to track the issues and follow progress. % \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. -% Version 1.46\new{v1.46} introduces support for Afrikaans, Belarusian, Bosnian and Georgian. +% Version 1.46\new{1.46} introduces support for Afrikaans, Belarusian, Bosnian and Georgian. % % -% \subsection{Relation to and use of Babel language names} +% \subsection{Relation to and use of Babel language names}\label{sec:babelnames} % % 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}), @@ -507,7 +645,7 @@ to track the issues and follow progress. % Furthermore, \pkg{babel} sometimes uses abbreviated 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. -% Please refer to table~\ref{tab:bbllang} for the differing language names in both packages. +% Please refer to table~\ref{tab:bbllang} for the differing language names in both packages. % % \begin{table} % \caption{\label{tab:bbllang}Babel-polyglossia language name matching} @@ -515,7 +653,7 @@ to track the issues and follow progress. % \begin{minipage}[t]{1\columnwidth} % \small\centering % \begin{tabular}{lll} -% \toprule +% \toprule % \textbf{Babel name} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\tabularnewline % \midrule % acadien & french & variant=acadian \\ @@ -528,20 +666,20 @@ to track the issues and follow progress. % british & english & variant=british \\ % canadian & english & variant=canadian \\ % canadien & french & variant=canadian \\ +% classiclatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.classic}).} +% & latin & variant=classic \\ % farsi & persian & \\ +% ecclesiasticlatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.ecclesiastic}).} +% & latin & variant=ecclesiastic \\ % friulan & friulian & \\ % german\footnote{Due to the name conflict only available in \pkg{polyglossia} as \emph{germanb} (which is a \pkg{babel} synonym).} % & german & spelling=old \\ % irish & gaelic & variant=irish [\emph{default}] \\ % kurmanji & kurdish & variant=kurmanji \\ -% latin.classic\footnote{Available in \pkg{polyglossia} as \emph{latinclassic} (as dots are invalid in command names).} -% & latin & variant=classic \\ -% latin.ecclesiastic\footnote{Available in \pkg{polyglossia} as \emph{latinecclesiastic} (as dots are invalid in command names).} -% & latin & variant=ecclesiastic \\ -% latin.medieval\footnote{Available in \pkg{polyglossia} as \emph{latinmedieval} (as dots are invalid in command names).} -% & latin & variant=medieval \\ % lowersorbian & sorbian & variant=lower \\ % magyar & hungarian & \\ +% medievallatin\footnote{In \pkg{babel} currently only selectable via dot modifier (\emph{latin.medieval}).} +% & latin & variant=medieval \\ % naustrian & german & variant=austrian \\ % newzealand & english & variant=newzealand \\ % ngerman & german & variant=german [\emph{default}] \\ @@ -556,62 +694,247 @@ to track the issues and follow progress. % slovene & slovenian & \\ % spanishmx & spanish & variant=mexican \\ % swissgerman & german & variant=swiss, spelling=old \\ -% uppersorbian & sorbian & variant=upper \\ +% uppersorbian & sorbian & variant=upper [\emph{default}] \\ % \bottomrule % \end{tabular} % \end{minipage} % % \end{table} % -% For convenience reasons, \pkg{polyglossia} also supports the use of babel names\new{v1.46} (for the few justified +% For convenience reasons, \pkg{polyglossia} also supports the use of babel names\new{1.46} (for the few justified % exceptions, please refer to the notes in table~\ref{tab:bbllang}). % The babel names listed in table~\ref{tab:bbllang} can be used instead of the corresponding polyglossia % name\slash options in \cmd\setdefaultlanguage\ and \cmd\setotherlanguage\ as well as in the \pkg{polyglossia} and % \pkg{babel} language switching commands\slash environments documented in section~\ref{sec:langcmds} and -% \ref{sec:babelcmds} (\eg \cmd\textaustrian\ is synonymous to \cmd{\textgerman[variant=austrian,spelling=old]}). +% \ref{sec:babelcmds} (\eg \cmd\textaustrian\ is synonymous to ¦\textgerman[variant=austrian,spelling=old]¦). % However, unless you have special reasons, we strongly encourage you to use the \pkg{polyglossia} names. % % +% \subsection{Using IETF language tags}\label{sec:langtags} +% +% \pkg{Polyglossia}\new{1.47} also supports the use of language tags that conform to the IETF BCP-47 +% \emph{Best Current Practice}.\footnote{Please refer to \url{https://tools.ietf.org/html/bcp47} and +% \url{https://en.wikipedia.org/wiki/IETF_language_tag} for details.} +% Thus, you can use tags such as ¦en-GB¦ (for British English) or ¦de-AT-1901¦ (for Austrian German, old spelling) +% in \cmd\setdefaultlanguage\ and \cmd\setotherlanguage\ as well as in the language switching command +% \cmd{\textlang\marg{tag}}, the environment \cmd{\begin\{lang\}\marg{tag}} \ldots\ \cmd{\end\{lang\}} and the \pkg{babel} +% language switching commands\slash environments documented in section~\ref{sec:babelcmds}. +% Table~\ref{tab:BCP47-polyglossia} lists the currently supported tags. +% +% \bgroup\small\addfontfeatures{Numbers={Monospaced,Lining}} +% \begin{longtable}[c]{lll} +% \caption{\label{tab:BCP47-polyglossia}BCP47-polyglossia language name matching}\\ +% \toprule +% \textbf{BCP-47 tag} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\\ +% \midrule +% \endfirsthead +% \caption[]{BCP47-polyglossia language name matching (\emph{continued})}\\ +% \toprule +% \textbf{BCP-47 tag} & \textbf{Polyglossia name} & \textbf{Polyglossia options}\\ +% \midrule +% \endhead +% aeb & arabic & locale=tunisia \\ +% af & afrikaans & \\ +% afb & arabic & locale=default \\ +% am & amharic & \\ +% apd & arabic & locale=default \\ +% ar & arabic & \\ +% ar-IQ & arabic & locale=mashriq \\ +% ar-JO & arabic & locale=mashriq \\ +% ar-LB & arabic & locale=mashriq \\ +% ar-MR & arabic & locale=mauritania \\ +% ar-PS & arabic & locale=mashriq \\ +% ar-SY & arabic & locale=mashriq \\ +% ar-YE & arabic & locale=default \\ +% arq & arabic & locale=algeria \\ +% ary & arabic & locale=morocco \\ +% arz & arabic & locale=default \\ +% ast & asturian & \\ +% ayl & arabic & locale=libya \\ +% be & belarusian & \\ +% be-tarask & belarusian & spelling=classic \\ +% bg & bulgarian & \\ +% bn & bengali & \\ +% bo & tibetan & \\ +% br & breton & \\ +% bs & bosnian & \\ +% ca & catalan & \\ +% ckb & kurdish & variant=sorani [\emph{default}] \\ +% ckb-Arab & kurdish & variant=sorani, script=Arabic [\emph{default}] \\ +% ckb-Latn & kurdish & variant=sorani, script=Latin \\ +% cop & coptic & \\ +% cy & welsh & \\ +% cz & czech & \\ +% da & danish & \\ +% de & german & \\ +% de-AT & german & variant=austrian, spelling=new \\ +% de-AT-1901 & german & variant=austrian, spelling=old \\ +% de-AT-1996 & german & variant=austrian, spelling=new \\ +% de-CH & german & variant=swiss, spelling=new \\ +% de-CH-1901 & german & variant=swiss, spelling=old \\ +% de-CH-1996 & german & variant=swiss, spelling=new \\ +% de-DE & german & variant=german, spelling=new \\ +% de-DE-1901 & german & variant=german, spelling=old \\ +% de-DE-1996 & german & variant=german, spelling=new [\emph{default}] \\ +% de-Latf & german & script=blackletter \\ +% de-Latf-AT & german & variant=austrian, spelling=new, script=blackletter \\ +% de-Latf-AT-1901 & german & variant=austrian, spelling=old, script=blackletter \\ +% de-Latf-AT-1996 & german & variant=austrian, spelling=new, script=blackletter \\ +% de-Latf-CH & german & variant=swiss, spelling=new, script=blackletter \\ +% de-Latf-CH-1901 & german & variant=swiss, spelling=old, script=blackletter \\ +% de-Latf-CH-1996 & german & variant=swiss, spelling=new, script=blackletter \\ +% de-Latf-DE & german & variant=german, spelling=new, script=blackletter \\ +% de-Latf-DE-1901 & german & variant=german, spelling=old, script=blackletter \\ +% de-Latf-DE-1996 & german & variant=german, spelling=new, script=blackletter \\ +% dsb & sorbian & variant=lower \\ +% dv & divehi & \\ +% el & greek & \\ +% el-monoton & greek & variant=monotonic [\emph{default}] \\ +% el-polyton & greek & varant=polytonic \\ +% en & english & \\ +% en-AU & english & variant=australian \\ +% en-CA & english & variant=canadian \\ +% en-GB & english & variant=british \\ +% en-NZ & english & variant=newzealand \\ +% en-US & english & variant=us [\emph{default}] \\ +% eo & esperanto & \\ +% es & spanish & \\ +% es-ES & spanish & variant=spanish [\emph{default}] \\ +% es-MX & spanish & variant=mexican \\ +% et & estonian & \\ +% eu & basque & \\ +% fa & persian & \\ +% fi & finnish & \\ +% fr & french & \\ +% fr-CA & french & variant=canadian \\ +% fr-CH & french & variant=swiss \\ +% fr-FR & french & variant=french [\emph{default}] \\ +% fur & friulian & \\ +% ga & gaelic & variant=irish [\emph{default}] \\ +% gd & gaelic & variant=scottish \\ +% gl & galician & \\ +% grc & greek & variant=ancient \\ +% he & hebrew & \\ +% hi & hindi & \\ +% hr & croatian & \\ +% hsb & sorbian & variant=upper [\emph{default}] \\ +% hu & hungarian & \\ +% hy & armenian & \\ +% ia & interlingua & \\ +% id & malay & variant=indonesian \\ +% is & icelandic & \\ +% it & italian & \\ +% ja & japanese & \\ +% ka & georgian & \\ +% km & khmer & \\ +% kmr & kurdish & variant=kurmanji \\ +% kmr-Arab & kurdish & variant=kurmanji, script=Arabic \\ +% kmr-Latn & kurdish & variant=kurmanji, script=Latin \\ +% kn & kannada & \\ +% ko & korean & \\ +% ku & kurdish & \\ +% ku-Arab & kurdish & script=Arabic \\ +% ku-Latn & kurdish & script=Latin \\ +% la & latin & \\ +% la-x-classic & latin & variant=classic \\ +% la-x-ecclesia & latin & variant=ecclesiastic \\ +% la-x-medieval & latin & variant=medieval \\ +% lo & lao & \\ +% lt & lithuanian & \\ +% lv & latvian & \\ +% mk & macedonian & \\ +% ml & malayalam & \\ +% mn & mongolian & \\ +% mr & marathi & \\ +% nb & norwegian & variant=bokmal \\ +% nko & nko & \\ +% nl & dutch & \\ +% nn & norwegian & variant=nynorsk [\emph{default}] \\ +% oc & occitan & \\ +% pl & polish & \\ +% pms & piedmontese & \\ +% pt & portuguese & \\ +% pt-BR & portuguese & variant=brazilian \\ +% pt-PT & portuguese & variant=portuguese [\emph{default}] \\ +% rm & romansh & \\ +% ro & romanian & \\ +% ru & russian & \\ +% ru-luna1918 & russian & spelling=modern [\emph{default}] \\ +% ru-petr1708 & russian & spelling=old \\ +% sa & sanskrit & \\ +% sa-Beng & sanskrit & script=Bengali \\ +% sa-Deva & sanskrit & script=Devanagari [\emph{default}] \\ +% sa-Gujr & sanskrit & script=Gujarati \\ +% sa-Knda & sanskrit & script=Kannada \\ +% sa-Mlym & sanskrit & script=Malayalam \\ +% sa-Telu & sanskrit & script=Telugu \\ +% se & sami & \\ +% sk & slovak & \\ +% sl & slovenian & \\ +% sq & albanian & \\ +% sr & serbian & \\ +% sr-Cyrl & serbian & script=Cyrillic \\ +% sr-Latn & serbian & script=Latin [\emph{default}] \\ +% sv & swedish & \\ +% syr & syriac & \\ +% ta & tamil & \\ +% te & telugu & \\ +% th & thai & \\ +% tk & turkmen & \\ +% tr & turkish & \\ +% uk & ukrainian & \\ +% ur & urdu & \\ +% vi & vietnamese & \\ +% zsm & malay & variant=malaysian [\emph{default}] \\ +% \bottomrule +% \end{longtable} +% \egroup +% % \subsection{Global options} % % \pkg{Polyglossia} can be loaded with the following global package options: % % \begin{itemize} -% \item \TB{babelshorthands}\new{v1.1.1} globally activates \pkg{babel} -% shorthands whenever available. Currently shorthands are implemented for -% Afrikaans, Belarusian, Catalan, Czech, Dutch, Finnish, Georgian, German, -% Italian, Latin, Mongolian, Russian, and Slovak. 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 +% \item \xpgboolkeyfalse[1.1.1]{babelshorthands} +% Globally activates \pkg{babel} shorthands whenever available. Currently +% shorthands are implemented for Afrikaans, Belarusian, Catalan, Croatian, +% Czech, Dutch, Finnish, Georgian, German, Italian, Latin, Mongolian, +% Russian, Slovak, and Ukrainian. Please refer to the respective language descriptions +% (sec.~\ref{specific}) for details. +% +% \item \xpgoption{localmarks} redefines the internal \LaTeX\ macros \cmd\markboth\ and +% \cmd\markright. In earlier versions of \pkg{polyglossia},\new{1.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 +% option \xpgoption{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 +% \item \xpgoption{quiet} turns off most info messages and some of the warnings issued % by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}. % \end{itemize} % +% \condbreak{5\baselineskip} % \section{Language-switching commands}\label{languageswitching} % % \subsection{Recommended commands}\label{sec:langcmds} % For each activated language the command -% \cmd{\text⟨lang⟩[⟨options⟩]\{…\}} \DescribeMacro{\text⟨lang⟩} +% \cmd{\text\meta{lang}\oarg{options}\marg{…}} \DescribeMacro{\text\meta{lang}} % (as well as the synonymous \DescribeMacro{\textlang}% -% \cmd{\textlang[⟨options⟩]\{⟨lang⟩\}\{…\}}\new{1.46}) +% \cmd{\textlang\oarg{options}\marg{lang}\marg{…}}\new{1.46}) % becomes available for short insertions of text in that language. +% % For example ¦\textrussian{\today}¦ and ¦\textlang{russian}{\today}¦ yield \textrussian{\today} % The commands switch to the correct hyphenation patterns, they activate % some extra features for the selected language (such as extra spacing before -% punctuation in French), and they translate the date when using ¦\today¦. -% They do not, however, translate so-called \textit{caption strings},\ie -% ``chapter'', ``figure'' etc., to the local language (these remain in the main +% punctuation in French), and they translate the date when using \cmd\today. +% They do not, however, translate so-called \textit{caption strings}, \ie +% ``chapter'', ``figure'' etc., to the local language (these remain in the currently active `outer' % 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⟩} and +% The\DescribeEnv{\meta{lang}}\ environment \meta{lang}, which is also available for any activated language +% (as well as the equivalent \DescribeMacro{lang}% +% \cmd{\begin\{lang\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{lang\}}\new{1.47}), +% is meant for longer passages of text. It behaves slightly different than the \cmd{\text\meta{lang}} and % \cmd\textlang\ commands: It does everything the latter do, 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. @@ -619,7 +942,7 @@ to track the issues and follow progress. % For instance the following allows us to quote the beginning % of Homer’s \textit{Iliad}: % -% \begin{Verbatim}[formatcom=\color{myblue}] +% \begin{Verbatim}[formatcom=\color{xpgblue}] % \begin{quote} % \begin{greek}[variant=ancient] % μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος οὐλομένην, ἣ μυρί' Ἀχαιοῖς @@ -651,17 +974,17 @@ to track the issues and follow progress. % 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*\}} +% \item \DescribeMacro{\selectlanguage}\cmd{\selectlanguage\oarg{options}\marg{lang}} +% \item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage\oarg{options}\marg{lang}\marg{…}} +% \item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage\}} +% \item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage*\}} % \end{itemize} % ^^A -% ¦\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⟩¦ or ¦\textlang¦ command, with the one -% notable exception that they do not translate the date with ¦\today¦. +% \cmd\selectlanguage\marg{lang} and the ¦otherlanguage¦ environment are identical to the +% the \meta{lang} environment, except that \cmd\selectlanguage\marg{lang} +% does not need to be explicitly closed. The command \cmd\foreinlanguage\marg{lang}\marg{…} and the ¦otherlanguage*¦ +% environment are identical with the use of the \cmd\text\meta{lang} or \cmd\textlang\ command, with the one +% notable exception that they do not translate the date with \cmd\today. % % Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg}, % the low-level commands for hyphenation and language switching @@ -669,13 +992,12 @@ to track the issues and follow progress. % % \subsection{Other commands} % The following commands are probably of lesser interest to the end user, but -% ought to be mentioned here.\footnote{Note that these commands require polyglossia -% language names; they do not support language\slash babel aliases.} +% ought to be mentioned here. % \begin{itemize} -% \item \DescribeMacro{\selectbackgroundlanguage}\cmd{\selectbackgroundlanguage\{⟨lang⟩\}}: +% \item \DescribeMacro{\selectbackgroundlanguage}\cmd{\selectbackgroundlanguage\marg{lang}}: % this selects the global font setup and the numbering definitions for the default language. % -% \item \DescribeMacro{\resetdefaultlanguage}\cmd{\resetdefaultlanguage[⟨options⟩]\{⟨lang⟩\}} (experimental): +% \item \DescribeMacro{\resetdefaultlanguage}\cmd{\resetdefaultlanguage\oarg{options}\marg{lang}} (experimental): % completely switches the default language % to another one in the middle of a document: \textit{this may have adverse effects}! % @@ -693,43 +1015,49 @@ to track the issues and follow progress. % \subsection{Setting up alias commands} % % By means of the macro -% \displaycmd{\setlanguagealias[⟨options⟩]\{⟨language⟩\}\{⟨alias⟩\}}{\setlanguagealias}\new{v1.46} +% \displaycmd{\setlanguagealias\oarg{options}\marg{language}\marg{alias}}{\setlanguagealias}\new{1.46} % you can define alias commands for specific language (variants). \Eg % % \begin{quote} % \begin{verbatim} -% \setlanguagealias[variant=austrian]{german}{deAT} +% \setlanguagealias[variant=austrian]{german}{AT} % \end{verbatim} % \end{quote} % ^^A -% will define a command \cmd{\textdeAT} as well as an environment ¦{deAT}¦ which will link towards -% the command \cmd{\textgerman[variant=austrian]} and the environment ¦{german}[variant=austrian]¦, +% will define a command \cmd{\textAT} as well as an environment ¦{AT}¦ which will link towards +% the command ¦\textgerman[variant=austrian]¦ and the environment ¦{german}[variant=austrian]¦, % respectively. The aliases can also be used in the language switching commands described in % section~\ref{sec:langcmds} and \ref{sec:babelcmds}. % Note, though, that the usual restrictions for command names apply, so something such as -% ¦de-AT¦ or ¦de_AT¦ will not work since ¦-¦ and ¦_¦ are not allowed in command names. +% ¦de-AT¦ or ¦de_AT¦ will not work since ¦-¦ and ¦_¦ are not allowed in command names (the same +% holds true for any non-ASCII character and for digits). +% +% For the latter case, and for the case where an alias would clash with an existing command +% (\eg ¦\fi¦) or a \cmd{\text\meta{\ldots}} command (\eg \cmd\textit), a starred version \Cmd{\setlanguagealias*} +% is provided which does neither define a \cmd{\text\meta{alias}} command nor an \meta{alias} environment, +% but which will set up the alias for everything else, including \cmd{\textlang\marg{alias}} +% and \cmd{\begin\{lang\}\marg{alias}}. % -% For the latter case, and for the case where an alias would clash with an existing \cmd{\text⟨...⟩} -% command (\eg ¦\textit¦), a starred version \Cmd{\setlanguagealias*} is provided which does not define -% a \cmd{\text⟨alias⟩} command (but which will set up the alias for everything else, including -% \cmd{\textlang\{⟨alias⟩\}}). +% \pkg{Polyglossia} comes with some aliases predefined, namely aliases for \pkg{babel} language names +% (see sec.~\ref{sec:babelnames}) and for IETF BCP-47 language tags (the latter via \cmd{\setlanguagealias*}; +% see sec.~\ref{sec:langtags}). % % \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¦. +% \cmd{\⟨script⟩font}\ or \cmd{\⟨language⟩font}. % For instance, if the default font defined by \cmd\setmainfont\ % does not support Greek, then one can define the font used to display Greek with:\\ -% \centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,⟨…⟩]\{⟨font⟩\}}. } +% \centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,\meta{…}]\marg{font}}. } % Note that polyglossia will use the font defined as is, so assure to do all necessary settings % (please refer to the \pkg{fontspec} documentation for details). -% For instance, if ¦\arabicfont¦ is explicitly defined, then the option ¦Script=Arabic¦ should +% For instance, if \cmd\arabicfont\ is explicitly defined, then the option ¦Script=Arabic¦ should % be included in that definition. % % If a specific sans serif or monospace (`teletype') font is needed for a particular script or language, -% it can be defined by means of \new{v1.2.0} -% ¦\⟨script⟩fontsf¦\ or ¦\⟨language⟩fontsf¦ and ¦\⟨script⟩fonttt¦\ or ¦\⟨language⟩fonttt¦, respectively. +% it can be defined by means of \new{1.2.0} +% \cmd{\⟨script⟩fontsf} or \cmd{\⟨language⟩fontsf} and \cmd{\⟨script⟩fonttt} or \cmd{\⟨language⟩fonttt}, respectively. % % Whenever a new language is activated, \pkg{polyglossia} will first check whether % a font has been defined for that language or – for languages in non-Latin scripts – @@ -744,7 +1072,7 @@ to track the issues and follow progress. % % \subsection{Hyphenation exceptions} % -% \TeX\ provides the command ¦\hyphenation{⟨exceptions⟩}¦ to globally define hyphenation exceptions +% \TeX\ provides the command \cmd\hyphenation\marg{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): @@ -756,8 +1084,8 @@ to track the issues and follow progress. % \end{Verbatim} % ^^A % These exceptions, however, apply to all languages. In addition to this, \pkg{polyglossia} provides -% the command\new{v1.45} -% \displaycmd{\pghyphenation[⟨options⟩]\{⟨lang⟩\}\{⟨exceptions⟩\}}{\pghyphenation} +% the command\new{1.45} +% \displaycmd{\xpghyphenation\oarg{options}\marg{lang}\marg{exceptions}}{\xpghyphenation} % which can be used to define exceptions that only apply to a specific language or language variant, % respectively. % @@ -772,25 +1100,33 @@ to track the issues and follow progress. % % \section{Language-specific options and commands}\label{specific} % -% This section gives a list of all languages for which options and end-user commands are defined. -% The default value of each option is given in italic. -% -% ^^A\subsection{amharic}\label{amharic} +% This section gives a list of all languages for which options and end-user +% commands are defined. Note the following conventions: +% \begin{itemize} +% \item The preset value of each option (\ie the setting that applies by default, +% if the option is not explicitly set) is given in \xpgpresetvalue{italics}. +% \item If an option key may be used without a value, the value that applies +% for value-less keys is marked by a preceding \xpgdefaultvalue{asterisk}. +% \end{itemize} +% For instance, \texttt{babelshorthands = *true} or \texttt{\textit{false}} means that +% \xpgvalue{babelshorthands} is \xpgvalue{false} by default in the respective language, +% and that passing \xpgvalue{babelshorthands} (without value) is equivalent to passing +% \xpgvalue{babelshorthands=true}. % -% \subsection{afrikaans}\label{afikaans} +% \subsection{afrikaans}\label{afrikaans} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1} -% if this is turned on, the following shorthands defined for fine-tuning hyphenation and +% \item \xpgboolkeyfalse[1.1.1]{babelshorthands} +% If this is turned on, the following shorthands defined for fine-tuning hyphenation and % micro-typography of Afrikaans 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). +% in the hyphenation patterns (as opposed to \cmd\- 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¦, +% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, % hyphenation at the breakpoints preset in the hyphenation patterns is still allowed. % \end{shorthands} % \end{itemize} @@ -798,23 +1134,23 @@ to track the issues and follow progress. % \subsection{arabic}\label{arabic} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{calendar} = \textit{gregorian} or islamic (= hijri) -% \item \TB{locale} = \textit{default},\footnote{ % -% For Egypt, Sudan, Yemen and the Gulf states.} -% mashriq,\footnote{ % -% For Iraq, Syria, Jordan, Lebanon and Palestine.} -% libya, algeria, tunisia, morocco, or mauritania. +% \item \xpgchoicekey{calendar}{\xpgpresetvalue{gregorian} or \xpgvalue{islamic} (= \xpgvalue{hijri})} +% \item \xpgchoicekey{locale}{\xpgpresetvalue{default}\footnote{ % +% For Egypt, Sudan, Yemen and the Gulf states.}, +% \xpgvalue{mashriq}\footnote{ % +% For Iraq, Syria, Jordan, Lebanon and Palestine.}, +% \xpgvalue{libya}, \xpgvalue{algeria}, \xpgvalue{tunisia}, \xpgvalue{morocco}, \xpgvalue{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 -% (the latter is the default when locale = algeria, tunisia or morocco) -% \item \TB{abjadjimnotail} = \textit{false} or true. \new{v1.0.3} +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{mashriq} or \xpgvalue{maghrib}} +% The latter is the default when \xpgvalue{locale=algeria}, \xpgvalue{tunisia}, or \xpgvalue{morocco}. +% \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail} % 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} % \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} +% \item \Cmd\aemph to emphasize text with \cmd\overline.\new{1.2.0} % ¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}. % This command is also available for Farsi, Urdu, etc. % \end{itemize} @@ -822,19 +1158,19 @@ to track the issues and follow progress. % \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} +% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{eastern} or \xpgpresetvalue{western}} +% \item \xpgchoicekey[1.45]{numerals}{\xpgvalue{armenian} or \xpgpresetvalue{arabic}} % \end{itemize} % -% \subsection[belarusian]{belarusian\new{v1.46}}\label{belarusian} +% \subsection[belarusian]{belarusian\new{1.46}}\label{belarusian} % % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. +% \item \xpgboolkeyfalse{babelshorthands} % 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 ¦\-¦). +% in the hyphenation patterns (as opposed to \cmd\-). % \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. @@ -848,67 +1184,123 @@ to track the issues and follow progress. % \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. -% \item \TB{spelling} = \textit{modern} or classic (=~tarask). With ¦spelling=classic¦, captions and dates -% adhere to the Taraškievica (or Belarusian classical) orthography rather than the standard orthography. +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}} +% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows: +% \begin{itemize} +% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30. +% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.% +% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.} +% It supports numbers up to 999\,999. +% \end{itemize} +% \item \xpgchoicekey{spelling}{\xpgpresetvalue{modern} or \xpgvalue{classic} (= \xpgvalue{tarask})} +% With ¦spelling=classic¦, captions and dates adhere to the Taraškievica (or +% Belarusian classical) orthography rather than the standard orthography. % \end{itemize} % ^^A % \paragraph*{Commands:} % \begin{itemize} -% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for -% environments such as ¦enumerate¦. The command takes a counter as argument, -% \eg ¦\textbelarusian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}. -% \item \Cmd\asbuk: same in lowercase +% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦. +% It steps through the Cyrillic alphabet and thus it can only be used up to 30. +% The command takes a counter as argument, \eg ¦\textbelarusian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}. +% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase. +% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports +% numbers up to 999\,999.\\ +% \Eg ¦\textbelarusian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}. +% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase. % \end{itemize} % -% \subsection[bengali]{bengali\new{v1.2.0}}\label{bengali} +% \subsection[bengali]{bengali\new{1.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 -% numerals for headings and page numbers) +% \item \xpgchoicekey{numerals}{\xpgvalue{Western}, \xpgvalue{Bengali}, or \xpgpresetvalue{Devanagari}} +% \item \xpgboolkeyfalse{changecounternumbering} +% Use specified numerals for headings and page numbers. % \end{itemize} % % \subsection{catalan}\label{catalan} % \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. +% \item \xpgboolkeyfalse[1.1.1]{babelshorthands} +% Activates the shorthands \texttt{"l} and \texttt{"L} to type geminated l or L. % \end{itemize} % % \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}, +% \item \Cmd{\l.l} and \Cmd{\L.L}\new{1.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{croatian}\label{croatian} +% \paragraph*{Options:} +% \begin{itemize} +% \item \xpgboolkeyfalse[1.47]{babelshorthands} +% If this is turned on, the following shorthands for fine-tuning hyphenation and micro-typography +% of Croatian words are activated. +% \begin{shorthands} +% \item[¦"|¦] disables a ligature at this position. +% \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. +% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset +% in the hyphenation patterns (as opposed to \cmd\-). +% \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 \cmd\slash, hyphenation +% at the breakpoints preset in the hyphenation patterns is still allowed. +% \end{shorthands} +% Furthermore, the following shorthands generate easy access to Croatian digraphs (ligatures): +% \begin{shorthands} +% \item[¦"dz¦] Generates the ligature \charifavailable{01C6}{dž}\ if the font provides it. If not, the +% two characters are output separately. Also available for ¦"Dz¦ (\charifavailable{01C5}{Dž}) +% and ¦"DZ¦ (\charifavailable{01C4}{DŽ}). +% \item[¦"lj¦] Generates the ligature \charifavailable{01C9}{lj}\ if the font provides it. If not, the +% two characters are output separately. Also available for ¦"Lj¦ (\charifavailable{01C8}{Lj}) +% and ¦"LJ¦ (\charifavailable{01C7}{LJ}). +% \item[¦"nj¦] Generates the ligature \charifavailable{01CC}{nj}\ if the font provides it. If not, the +% two characters are output separately. Also available for ¦"Nj¦ (\charifavailable{01CB}{Nj}) +% and ¦"NJ¦ (\charifavailable{01CA}{NJ}). +% \end{shorthands} +% +% Finally, there are also four shorthands for quotation marks: +% \begin{shorthands} +% \item[¦"`¦] for Croatian left double quotes („). +% \item[¦"'¦] for Croatian right double quotes (”). +% \item[¦">¦] for Croatian left guillemets (»). +% \item[¦"<¦] for Croatian right guillemets («). +% \end{shorthands} +% \item \xpgboolkeyfalse[1.47]{disableligatures} +% If this is \xpgvalue{true}, all Croatian ligatures (for digraphs such as +% \charifavailable{01C6}{dž}) will be replaced by single characters. This can +% be useful if the ligatures on your font are broken (if the font does not +% have them, they are automatically replaced). +% \end{itemize} +% % \subsection{czech}\label{czech} % % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.45} -% if this is turned on, the following shorthands for Czech are activated: +% \item \xpgboolkeyfalse[1.45]{babelshorthands} +% 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 % (only needed with ¦splithyphens=false¦). -% \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 <<). +% \item[¦"‘¦] for Czech left double quotes („). +% \item[¦"’¦] for Czech right double quotes (“). +% \item[¦">¦] for Czech left double guillemets (»). +% \item[¦"<¦] for Czech right double guillemets («). % \end{shorthands} -% \item \TB{splithyphens} = false or \textit{true}.\new{v1.45} +% \item \xpgboolkeytrue[1.45]{splithyphens} % 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}). -% By default, this is done automatically\new{v1.46} (if you are using \LuaTeX, the \pkg{luavlna} package is +% By default, this is done automatically\new{1.46} (if you are using \LuaTeX, the \pkg{luavlna} package is % loaded to achieve this). % Set this option to ¦false¦ to disable the feature. -% \item \TB{vlna} = false or \textit{true}. \new{v1.45} +% \item \xpgboolkeytrue[1.45]{vlna} % According to Czech typesetting conventions, single-letter words (non-syllable prepositions) % must not occur at line ends. -% \pkg{Polyglossia} takes care of this automatically by default\new{v1.46} (if you are using \LuaTeX, the +% \pkg{Polyglossia} takes care of this automatically by default\new{1.46} (if you are using \LuaTeX, the % \pkg{luavlna} package is loaded to achieve this). % Set this option to ¦false¦ to disable the feature. % \end{itemize} @@ -916,17 +1308,17 @@ to track the issues and follow progress. % \subsection{dutch}\label{dutch} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.1.1} -% if this is turned on, the following shorthands defined for fine-tuning hyphenation and +% \item \xpgboolkeyfalse[1.1.1]{babelshorthands} +% 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). +% in the hyphenation patterns (as opposed to \cmd\- 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¦, +% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\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 ¦"-¦). @@ -935,9 +1327,10 @@ to track the issues and follow progress. % \subsection{english}\label{english} % \paragraph*{Options:} % \begin{itemize} -% \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) +% \item \xpgchoicekey{variant}{\xpgpresetvalue{american} (= \xpgvalue{us}), \xpgvalue{usmax} (same as \xpgvalue{american} but with additional hyphenation patterns), +% \xpgvalue{british} (= \xpgvalue{uk}), \xpgvalue{australian}, \xpgvalue{canadian}\new{1.45}, or \xpgvalue{newzealand}} +% \item \xpgboolkeyfalse{ordinalmonthday} +% The default value is true for \xpgvalue{variant=british}. % \end{itemize} % % \subsection{esperanto}\label{esperanto} @@ -951,17 +1344,17 @@ to track the issues and follow progress. % \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: +% \item \xpgboolkeyfalse[1.45]{babelshorthands} +% 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 ¦\-¦). +% in the hyphenation patterns (as opposed to \cmd\-). % \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¦, +% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, % hyphenation at the breakpoints preset in the hyphenation patterns is still allowed. % \end{shorthands} % \end{itemize} @@ -969,90 +1362,115 @@ to track the issues and follow progress. % \subsection{french}\label{french} % \paragraph*{Options:} % \begin{itemize} -% \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} = \textit{true} or false. 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{thincolonspace}\new{v1.46} = true or \textit{false}. Normally, a -% full (non-breaking) interword space is inserted before a colon. Use this -% option if you prefer a thinner space as used before \texttt{;}, \texttt{!}, -% and \texttt{?}. -% \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.} = \textit{true} -% or false. 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. -% \item \TB{frenchitemlabels}\new{v.1.46} = true or \textit{false} (default value = true). If \textit{true}, itemize item labels use em-dashes throughout, -% as common in French typography. -% Note that this option is only functional (by design) if French is the main language. Also, it might interfere with list packages such as \pkg{enumitem}. -% \item \TB{itemlabels}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of all levels. -% \item \TB{itemlabeli}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the first level. -% \item \TB{itemlabelii}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the second level. -% \item \TB{itemlabeliii}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the third level. -% \item \TB{itemlabeliv}\new{v.1.46} = ¦⟨cmd⟩¦ (default value = ¦\textemdash¦). If \emph{frenchitemlabels} is true, you can customize here the used item label of the fourth level. +% \item \xpgchoicekey{variant}{\xpgpresetvalue{french} or \xpgvalue{canadian} (=~\xpgvalue{acadian})\new{1.45}, \xpgvalue{swiss}\new{1.47}} +% Currently, the only difference between the four variants is that \xpgvalue{swiss} +% uses \xpgvalue{thincolonspace=true} by default since this conforms to the Swiss +% conventions. +% \item \xpgboolkeytrue{autospacing} +% 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 \xpgboolkeyfalse[1.46]{thincolonspace} +% With \xpgvalue{variant=swiss}, the default value is \xpgvalue{true}. If \xpgvalue{false}, a full +% (non-breaking) interword space is inserted before a colon. If \xpgvalue{true}, a +% thinner space -- as before \texttt{;}, \texttt{!}, and \texttt{?} -- is +% used. Note that this option must be set after the ¦variant¦ option. +% \item \xpgboolkeytrue{autospaceguillemets}[Up to version 1.44, the option was +% called \xpgvalue{automaticspacesaroundguillemets}. For backwards compatibility +% reasons, the more verbose old option is still supported.] +% 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 \xpgboolkeyfalse[1.45]{autospacetypewriter}[Babel's syntax \xpgvalue{OriginalTypewriter} +% is also supported.] +% 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 \xpgvalue{autospacing} and +% \xpgvalue{autospaceguillemets} settings (note that this was the default up +% to v.~1.44). +% \item \xpgboolkeyfalse{frenchfootnote} +% If \xpgvalue{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. +% \item \xpgboolkeyfalse[1.46]{frenchitemlabels} +% If \textit{true}, itemize item labels use em-dashes throughout, as common +% in French typography. Note that this option is only functional (by +% design) if French is the main language. Also, it might interfere with +% list packages such as \pkg{enumitem}. +% \item \xpgcodekey[1.46]{itemlabels}¦\textemdash¦ +% If \emph{frenchitemlabels} is true, you can customize here the used item +% label of all levels. +% \item \xpgcodekey[1.46]{itemlabeli}¦\textemdash¦ +% If \emph{frenchitemlabels} is true, you can customize here the used item +% label of the first level. +% \item \xpgcodekey[1.46]{itemlabelii}¦\textemdash¦ +% If \emph{frenchitemlabels} is true, you can customize here the used item +% label of the second level. +% \item \xpgcodekey[1.46]{itemlabeliii}¦\textemdash¦ +% If \emph{frenchitemlabels} is true, you can customize here the used item +% label of the third level. +% \item \xpgcodekey[1.46]{itemlabeliv}¦\textemdash¦ +% If \emph{frenchitemlabels} is true, you can customize here the used item +% label of the fourth level. % \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!}¦ +% \item \Cmd\NoAutoSpacing\new{1.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{1.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} +% \subsection[gaelic]{gaelic\new{1.45}}\label{gaelic} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{variant} = \textit{irish} or scottish +% \item \xpgchoicekey{variant}{\xpgpresetvalue{irish} or \xpgvalue{scottish}} % \end{itemize} % -% \subsection[georgian]{georgian\new{v1.46}}\label{georgian} +% \subsection[georgian]{georgian\new{1.46}}\label{georgian} % % \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 georgian. Uses either Arabic numerals or Georgian -% alphanumerical numbering. -% \item \TB{oldmonthnames} = \textit{true} or false (default: false). Uses traditional Georgian -% month names. +% \item \xpgboolkeyfalse{babelshorthands} +% 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 \cmd\-). +% \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 \xpgchoicekey{numerals}{\xpgpresetvalue{arabic} or \xpgvalue{georgian}} +% Uses either Arabic numerals or Georgian alphanumerical numbering. +% \item \xpgboolkeyfalse{oldmonthnames} +% Uses traditional Georgian month names. % \end{itemize} % % \subsection{german}\label{german} % \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. -% With spelling=old, variant=swiss furthermore loads specific hyphenation +% \item \xpgchoicekey{variant}{\xpgpresetvalue{german}, austrian, or swiss\new{1.33.4}} +% Setting \xpgvalue{variant=austrian} or \xpgvalue{variant=swiss} uses some lexical variants. +% With \xpgvalue{spelling=old}, \xpgvalue{variant=swiss} furthermore loads specific hyphenation % patterns. -% \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901): -% indicates whether hyphenation patterns for traditional (1901) or reformed +% \item \xpgchoicekey{spelling}{\xpgpresetvalue{new} (= \xpgvalue{1996}) or \xpgvalue{old} (= \xpgvalue{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’ -% will be loaded instead of ‘german’ or ‘ngerman’. NB: This is based on -% 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} +% \item \xpgboolkeyfalse[1.0.3]{babelshorthands} +% If this is turned on, all shorthands defined in \pkg{babel} % 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). @@ -1062,12 +1480,12 @@ to track the issues and follow progress. % \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¦. +% 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); +% in the hyphenation patterns (as opposed to \cmd\-). +% \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 +% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation at the breakpoints % preset in the hyphenation patterns is still allowed. % \end{shorthands} % @@ -1078,7 +1496,7 @@ to track the issues and follow progress. % \item[¦"<¦] for French left double quotes («) % \item[¦">¦] for French right double quotes (»). % \end{shorthands} -% \item\TB{script} = \textit{latin} or blackletter\new{v1.46} (=~fraktur\new{v1.2.0}). +% \item \xpgchoicekey[1.2.0]{script}{\xpgpresetvalue{latin} or \xpgvalue{blackletter}\new{1.46} (= \xpgvalue{fraktur})} % Setting ¦script=blackletter¦ adapts the captions for typesetting German in blackletter type (using the long s (ſ) % where appropriate). % \end{itemize} @@ -1086,9 +1504,9 @@ to track the issues and follow progress. % \subsection{greek}\label{greek} % \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 +% \item \xpgchoicekey{variant}{\xpgpresetvalue{monotonic} (= \xpgvalue{mono}), \xpgvalue{polytonic} (= \xpgvalue{poly}), or \xpgvalue{ancient}} +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{greek} or \xpgvalue{arabic}} +% \item \xpgboolkeyfalse{attic} % \end{itemize} % \paragraph*{Commands:} % \begin{itemize} @@ -1103,10 +1521,12 @@ to track the issues and follow progress. % \subsection{hebrew}\label{hebrew} % \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. +% \item \xpgchoicekey{numerals}{\xpgvalue{hebrew} or \xpgpresetvalue{arabic}} +% \item \xpgchoicekey{calendar}{\xpgvalue{hebrew} or \xpgpresetvalue{gregorian}} +% \item \xpgboolkeyfalse{marcheshvan} +% If \xpgvalue{true}, the second month of the civil year will be output as +% \texthebrew{מרחשון} (Marcheshvan) rather than \texthebrew{חשון} (Heshvan), +% which is the default. % \end{itemize} % \paragraph*{Commands:} % \begin{itemize} @@ -1114,17 +1534,17 @@ to track the issues and follow progress. % \item \Cmd\aemph (see section \ref{arabic}). % \end{itemize} % -% \subsection[hindi]{hindi\new{v1.2.0}}\label{hindi} +% \subsection[hindi]{hindi\new{1.2.0}}\label{hindi} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{numerals} = Western or \textit{Devanagari} +% \item \xpgchoicekey{numerals}{\xpgvalue{Western} or \xpgpresetvalue{Devanagari}} % \end{itemize} % % \subsection{hungarian}\label{hungarian} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{swapstrings} = \textit{all}, captions, headings, headers, hheaders or none\new{v1.46} -% +% \item \xpgchoicekey[1.46]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}}, +% \xpgvalue{captions}, \xpgvalue{headings}, \xpgvalue{headers}, \xpgvalue{hheaders}, or \xpgvalue{none}} % In Hungarian, some caption strings need to be in a different order than in other languages % (\eg \emph{1. fejezet} instead of \emph{Chapter 1}). By default, \pkg{polyglossia} tries hard to % provide the correct order for different classes and packages (standard classes, \pkg{KOMA-script}, @@ -1151,41 +1571,66 @@ to track the issues and follow progress. % \subsection{italian}\label{italian} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.2.0cc}% TODO: check version +% \item \xpgboolkeyfalse[1.2.0cc]{babelshorthands}% TODO: check version % 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¦, +% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\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 ¦\-¦). +% in the hyphenation patterns (as opposed to \cmd\-). % \end{shorthands} % \end{itemize} % -% \subsection[korean]{korean\new{v1.40.0}}\label{korean} +% \subsection[korean]{korean\new{1.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 +% \item \xpgchoicekey{variant}{\xpgpresetvalue{plain}, \xpgvalue{classic}, or \xpgvalue{modern}} +% These variants control spacing before/after CJK punctuations. +% \begin{itemize} +% \item ¦plain¦: Do nothing +% \item ¦classic¦: Suitable for text with no interword spaces. +% This option forces CJK punctuations to half-width, and +% inserts half-width glue around them. +% \item ¦modern¦: Suitable for text with interword spaces. +% This option forces CJK punctuations to half-width, and +% inserts small (half of interword space) glue around them. +% \end{itemize} +% \item \xpgchoicekey{captions}{\xpgpresetvalue{hangul} or \xpgvalue{hanja}} +% \item \xpgchoicekey[1.47]{swapstrings}{\xpgdefaultvalue{\xpgpresetvalue{all}}, +% \xpgvalue{headers}, \xpgvalue{headings}, or \xpgvalue{none}} +% With this option, Korean-style part and chapter headings, and +% running headers are available. +% It is similar to Hungarian (see \ref{hungarian}) except that +% figure and table captions are not touched. +% \begin{itemize} +% \item ¦all¦: Redefine part and chapter headings, and running headers +% (=~default setting) +% \item ¦headings¦: Redefine part and chapter headings only +% \item ¦headers¦: Redefine running headers only +% \item ¦none¦: Do not redefine anything +% \end{itemize} % \end{itemize} % -% \subsection[kurdish]{kurdish\new{v1.45}}\label{kurdish} +% \subsection[kurdish]{kurdish\new{1.45}}\label{kurdish} % % \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{ج}. -% ^^A \item \TB{locale} (not yet implemented) -% ^^A \item \TB{calendar} (not yet implemented) +% \item \xpgchoicekey{variant}{\xpgvalue{kurmanji} or \xpgpresetvalue{sorani}} +% \item \xpgchoicekey{script}{\xpgvalue{Arabic} or \xpgvalue{Latin}} +% Defaults are \xpgvalue{Arabic} for Sorani and \xpgvalue{Latin} for Kurmanji. +% \item \xpgchoicekey{numerals}{\xpgvalue{western} or \xpgvalue{eastern}} +% Defaults are \xpgvalue{western} for Latin and \xpgvalue{eastern} for Arabic script, depending +% on the selection above. +% \item \xpgboolkeyfalse{abjadjimnotail} +% 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{ج}. +% ^^A \item \xpgchoicekey{locale}{} (not yet implemented) +% ^^A \item \xpgchoicekey{calendar}{} (not yet implemented) % \end{itemize} % \condbreak{2\baselineskip} % \paragraph*{Commands:} @@ -1196,34 +1641,33 @@ to track the issues and follow progress. % \item \Cmd\aemph (see section \ref{arabic}) % \end{itemize} % -% \subsection[lao]{lao\new{v1.2.0}}\label{lao} +% \subsection[lao]{lao\new{1.2.0}}\label{lao} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{numerals} = lao or \textit{arabic} +% \item \xpgchoicekey{numerals}{\xpgvalue{lao} or \xpgpresetvalue{arabic}} % \end{itemize} % % \subsection{latin}\label{latin} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{variant} = classic, medieval, \emph{modern}, or ecclesiastic\new{v.1.46} -% -% These variants refer to different spelling conventions. The ¦classic¦ -% and the ¦medieval¦ variant do not use the letters \emph{U} and +% \item \xpgchoicekey{variant}{\xpgvalue{classic}, \xpgvalue{medieval}, \xpgpresetvalue{modern}, or \xpgvalue{ecclesiastic}\new{1.46}} +% These variants refer to different spelling conventions. The \xpgvalue{classic} +% and the \xpgvalue{medieval} variant do not use the letters \emph{U} and % \emph{v}, but only \emph{V} and \emph{u}. This concerns predefined terms like % month names as well as the behaviour of the \cmd\MakeUppercase\ and the % \cmd\MakeLowercase\ command. The ¦medieval¦ and the % ¦ecclesiastic¦ variant use the ligatures \emph{\ae} and \emph{\oe}. % See table \ref{tab:latin-spelling} for examples. % -% Furthermore, the \texttt{ecclesiastic} variant takes care for a punctuation +% Furthermore, the \xpgvalue{ecclesiastic} variant takes care for a punctuation % spacing similar to French, but with smaller spaces, as provided for % PDF\TeX\ by the \pkg{ecclesiastic} package. % \begin{table} % \centering % \caption{\label{tab:latin-spelling}Spelling differences between the Latin % language variants.\newline The capitalization of month names and the use of -% \emph{i/j} may be affected by the \texttt{capitalizemonth} and the -% \texttt{usej} option.} +% \emph{i/j} may be affected by the \xpgvalue{capitalizemonth} and the +% \xpgvalue{usej} option.} % \begin{tabular}{llll} % \toprule % \textbf{classic} & \textbf{medieval} & \textbf{modern} & \textbf{ecclesiastic} \\ @@ -1236,8 +1680,7 @@ to track the issues and follow progress. % \bottomrule % \end{tabular} % \end{table} -% \item \TB{hyphenation}\new{v.1.46} = classic, modern, or liturgical -% +% \item \xpgchoicekey[1.46]{hyphenation}{\xpgvalue{classic}, \xpgvalue{modern}, or \xpgvalue{liturgical}} % There are three different sets of hyphenation patterns for Latin. Separate % documention for them is available on the % Internet.\footnote{\url{https://github.com/gregorio-project/hyphen-la/blob/master/doc/README.md\#hyphenation-styles}} @@ -1246,7 +1689,7 @@ to track the issues and follow progress. % ¦hyphenation¦ option if the default style does not fit your needs. % Note that the liturgical hyphenation patterns are the default of none of the % language variants. To use them, you have to say -% ¦hyphenation=liturgical¦ in any case. +% \xpgvalue{hyphenation=liturgical} in any case. % \begin{table} % \caption{\label{tab:latin-hyphenation}Latin default hyphenation styles} % \centering @@ -1261,8 +1704,7 @@ to track the issues and follow progress. % \bottomrule % \end{tabular} % \end{table} -% \item \TB{ecclesiasticfootnotes}\new{v.1.46} = true or \emph{false} -% +% \item \xpgboolkeyfalse[1.46]{ecclesiasticfootnotes} % Use footnotes as provided by the \pkg{ecclesiastic} package, which typesets % footnotes with ordinary instead of superior numbers and without indentation. % As many ecclesiastic documents and liturgical books use footnotes that are @@ -1271,24 +1713,21 @@ to track the issues and follow progress. % % Note that this option is only possible if Latin is the main language of your % document. -% \item \TB{usej}\new{v.1.46} = true or \emph{false} -% +% \item \xpgboolkeyfalse[1.46]{usej} % Use \emph{J/j} in predefined terms. The letter \emph{j} is not of ancient % origin. In early modern times, it was used to distinguish the consonantic % \emph{i} from the vocalic~\emph{i}. Nowadays, the use of \emph{j} has % disappeared from most Latin publications. So ¦false¦ is the default % value for all four language variants. Use this option if you prefer % \emph{Januarii} and \emph{Maji} to \emph{Ianuarii} and \emph{Maii}. -% \item \TB{capitalizemonth}\new{v.1.46} = true or false -% +% \item \xpgboolkey[1.46]{capitalizemonth} % Capitalize the month name when printing dates (using the \cmd\today\ % command). Traditionally, month names are capitalized. However, in recent % liturgical books they are lowercase. So ¦true¦ is the default value for % the variants ¦classic¦, ¦medieval¦, and ¦modern¦, % whereas ¦false¦ is the default value for the ¦ecclesiastic¦ % variant. -% \item \TB{babelshorthands} = true or \emph{false} -% +% \item \xpgboolkeyfalse{babelshorthands} % Enable the following shorthands inherited from \pkg{babel-latin} and the % \pkg{ecclesiastic} package. % \begin{shorthands} @@ -1314,14 +1753,12 @@ to track the issues and follow progress. % \item[¦'Ae¦] for Ǽ (AE ligature with acute), also available for \'Œ % \item[¦'AE¦] for Ǽ (AE ligature with acute), also available for \'Œ % \end{shorthands} -% \item \TB{prosodicshorthands}\new{v.1.46} = true or \emph{false} -% +% \item \xpgboolkeyfalse[1.46]{prosodicshorthands} % Enable shorthands for prosodic marks (macrons and breves) very similiar to % those provided by \pkg{babel-latin} using the ¦withprosodicmarks¦ % modifier. -% % Note that the active ¦=¦ character used for macrons will cause problems with -% commands using \texttt{key=value} interfaces, \eg +% commands using \texttt{key=value} interfaces, such as the command % ¦\includegraphics[scale=2]{...}¦. Use \cmd{\shorthandoff\{=\}} before % such commands (and \cmd{\shorthandon\{=\}} thereafter) within every % environment with prosodic shorthands enabled. @@ -1354,20 +1791,25 @@ to track the issues and follow progress. % \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}) +% \item \xpgchoicekey[1.45]{variant}{\xpgpresetvalue{indonesian} or \xpgvalue{malaysian}} % \end{itemize} % -% \subsection[mongolian]{mongolian\new{v1.45}}\label{mongolian} +% \subsection{marathi}\label{marathi} +% \paragraph*{Options:} +% \begin{itemize} +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{Devanagari} or \xpgvalue{Western}} +% \end{itemize} +% +% \subsection[mongolian]{mongolian\new{1.45}}\label{mongolian} % Currently, only the Khalkha variety in Cyrillic script is supported. % % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. +% \item \xpgboolkeyfalse{babelshorthands} % 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 ¦\-¦). +% in the hyphenation patterns (as opposed to \cmd\-). % \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. @@ -1381,32 +1823,44 @@ to track the issues and follow progress. % \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. +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}} +% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows: +% \begin{itemize} +% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30. +% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.% +% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.} +% It supports numbers up to 999\,999. +% \end{itemize} % \end{itemize} % ^^A % \paragraph*{Commands:} % \begin{itemize} -% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for -% environments such as ¦enumerate¦. The command takes a counter as argument, -% \eg ¦\textmongolian{\Asbuk{page}}¦ produces \textrussian{\Asbuk{page}}. -% \item \Cmd\asbuk: same in lowercase +% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦. +% It steps through the Cyrillic alphabet and thus it can only be used up to 30. +% The command takes a counter as argument, \eg ¦\textmongolian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}. +% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase. +% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports +% numbers up to 999\,999.\\ +% \Eg ¦\textmongolian{\AsbukTrad{section}}¦ produces \textrussian{\AsbukTrad{section}}. +% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but 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} +% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{bokmal} or \xpgpresetvalue{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{ج}. -% ^^A \item \TB{locale} (not yet implemented) -% ^^A \item \TB{calendar} (not yet implemented) +% \item \xpgchoicekey{numerals}{\xpgvalue{western} or \xpgpresetvalue{eastern}} +% \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail} +% Set this to \xpgvalue{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{ج}. +% ^^A \item \xpgchoicekey{locale}{} (not yet implemented) +% ^^A \item \xpgchoicekey{calendar}{} (not yet implemented) % \end{itemize} % \paragraph*{Commands:} % \begin{itemize} @@ -1417,17 +1871,17 @@ to track the issues and follow progress. % \subsection{portuguese}\label{portuguese} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{variant}\new{v1.45} = brazilian or \textit{portuguese} +% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{brazilian} or \xpgpresetvalue{portuguese}} % \end{itemize} % % \subsection{russian}\label{russian} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. +% \item \xpgboolkeyfalse{babelshorthands} % 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 ¦\-¦). +% in the hyphenation patterns (as opposed to \cmd\-). % \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. @@ -1442,48 +1896,72 @@ to track the issues and follow progress. % ^^A \item[¦"<¦] for French left double quotes (looks like <<). % ^^A \item[¦">¦] for French right double quotes (looks like >>). % \end{shorthands} -% \item \TB{indentfirst}\new{v1.46} = \textit{true} or false. By default, all paragraphs are indented in Russian, -% also those after a chapter or section heading. If this option is false, the latter paragraphs -% are not indented, as normal in \LaTeX. -% \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. +% \item \xpgboolkeytrue[1.46]{indentfirst} +% By default, all paragraphs are indented in Russian, also those after a +% chapter or section heading. If this option is false, the latter paragraphs +% are not indented, as normal in \LaTeX. +% \item \xpgchoicekey{spelling}{\xpgpresetvalue{modern} or \xpgvalue{old}} +% This option is for captions and date only, not for hyphenation. +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}} +% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows: +% \begin{itemize} +% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30. +% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.% +% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.} +% It supports numbers up to 999\,999. +% \end{itemize} % \end{itemize} % ^^A % \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 +% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦. +% It steps through the Cyrillic alphabet and thus it can only be used up to 30. +% The command takes a counter as argument, \eg ¦\textrussian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}. +% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase. +% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports +% numbers up to 999\,999.\\ +% \Eg ¦\textrussian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}. +% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase. % \end{itemize} % -% \subsection[sami]{sami\new{v1.45}}\label{sami} +% \subsection[sami]{sami\new{1.45}}\label{sami} % Currently support for Sami is limited to Northern Sami. % % \subsection{sanskrit}\label{sanskrit} % \paragraph*{Options:} % \begin{itemize} -% \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 ¦\⟨script⟩font¦ is not defined. -% This can be useful if you typeset Sanskrit texts in scripts other than Devanagari. -% \item \TB{numerals} = \textit{Devanagari}\new{v1.45} or Western +% \item \xpgchoicekey[1.0.2]{script}{\xpgpresetvalue{Devanagari}, \xpgvalue{Gujarati}, +% \xpgvalue{Malayalam}, \xpgvalue{Bengali}, \xpgvalue{Kannada}, \xpgvalue{Telugu}, or \xpgvalue{Latin}} +% The value is passed to \pkg{fontspec} in cases where the respective +% \cmd{\⟨script⟩font} is not defined. This can be useful if you typeset Sanskrit +% texts in scripts other than Devanagari. +% \item \xpgchoicekey[1.45]{numerals}{\xpgpresetvalue{Devanagari} or \xpgvalue{Western}} % \end{itemize} -% +% % \subsection{serbian}\label{serbian} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{script} = \textit{Cyrillic} or Latin. -% \item \TB{numerals} = \textit{arabic} or cyrillic. Uses either Arabic numerals or Cyrillic -% alphanumerical numbering. -% \end{itemize} +% \item \xpgchoicekey{script}{\xpgpresetvalue{Cyrillic} or \xpgvalue{Latin}} +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}} +% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows: +% \begin{itemize} +% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30. +% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.% +% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.} +% It supports numbers up to 999\,999. +% \end{itemize} +% \end{itemize} +% ^^A % \paragraph*{Commands:} % \begin{itemize} -% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for -% environments such as ¦enumerate¦. The command takes a counter as argument,\\ -% Example: ¦\textserbian[numerals=cyrillic]{\Asbuk{page}}¦ produces \textserbian[numerals=cyrillic]{\Asbuk{page}}. -% \item \Cmd\asbuk: same in lowercase +% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦. +% It steps through the Cyrillic alphabet and thus it can only be used up to 30. +% The command takes a counter as argument, \eg ¦\textserbian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}. +% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase. +% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports +% numbers up to 999\,999.\\ +% \Eg ¦\textserbian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}. +% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase. % \end{itemize} % % @@ -1491,9 +1969,9 @@ to track the issues and follow progress. % % \paragraph*{Options:} % \begin{itemize} -% \item \TB{babelshorthands} = \textit{false} or true. \new{v1.46} -% if this is turned on, the following shorthands for Slovak are activated: -% \begin{shorthands} +% \item \xpgboolkeyfalse[1.46]{babelshorthands} +% If this is turned on, the following shorthands for Slovak 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 Slovak typesetting % (only needed with ¦splithyphens=false¦). @@ -1501,23 +1979,23 @@ to track the issues and follow progress. % \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for % cases where the hyphen should stick at the following syllable. % \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset -% in the hyphenation patterns (as opposed to ¦\-¦). +% in the hyphenation patterns (as opposed to \cmd\-). % \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 +% \item[¦"/¦] a slash that allows for a subsequent line break. As opposed to \cmd\slash, hyphenation at the breakpoints % preset in the hyphenation patterns is still allowed. % \item[¦"‘¦] for Slovak left double quotes (looks like ,,). % \item[¦"’¦] for Slovak right double quotes (looks like “). % \item[¦">¦] for Slovak left double guillemets (looks like >>). % \item[¦"<¦] for Slovak right double guillemets (looks like <<). -% \end{shorthands} -% \item \TB{splithyphens} = \textit{false} or true. \new{v1.46} +% \end{shorthands} +% \item \xpgboolkeytrue[1.46]{splithyphens} % According to Slovak 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}). % By default, this is done automatically (if you are using \LuaTeX, the \pkg{luavlna} package is % loaded to achieve this). % Set this option to ¦false¦ to disable the feature. -% \item \TB{vlna} = \textit{false} or true. \new{v1.46} +% \item \xpgboolkeytrue[1.46]{vlna} % According to Slovak typesetting conventions, single-letter words (non-syllable prepositions) % must not occur at line ends. % \pkg{Polyglossia} takes care of this automatically by default (if you are using \LuaTeX, the @@ -1528,26 +2006,31 @@ to track the issues and follow progress. % \subsection{slovenian}\label{slovenian} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{localalph} = true or \textit{false} +% \item \xpgboolkeyfalse{localalph} +% If \xpgvalue{true}, alpha-numeric counters will use a localized version including characters with caron +% (a, b, c, č, d, \ldots). % \end{itemize} % % \subsection{sorbian}\label{sorbian} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{variant}\new{v1.45} = lower or \textit{upper} -% \item \TB{olddate}\new{v1.45} = true or \textit{false} (default value = true). If true, ¦\today¦ -% will use traditional Sorbian month names (\ie it will be synonymous to ¦\oldtoday¦ below) +% \item \xpgchoicekey[1.45]{variant}{\xpgvalue{lower} or \xpgpresetvalue{upper}} +% \item \xpgboolkeyfalse[1.45]{olddate} +% If \xpgvalue{true}, \cmd\today\ will use traditional Sorbian month names (\ie it will be +% synonymous to \cmd\oldtoday\ below). % \end{itemize} % \paragraph*{Commands:} % \begin{itemize} -% \item \Cmd\oldtoday: outputs the current date using traditional Sorbian month names, even if \TB{olddate} is false. +% \item \Cmd\oldtoday: outputs the current date using traditional Sorbian month names, even if +% \xpgvalue{olddate} is \xpgvalue{false}. % \end{itemize} % % \subsection{spanish}\label{spanish} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{variant} = \textit{spanish} or mexican.\new{v1.46} -% \item \TB{spanishoperators} = all, accented, spaced or none or \textit{false} (default value = all).\new{v1.46} +% \item \xpgchoicekey[1.46]{variant}{\xpgpresetvalue{spanish} or \xpgvalue{mexican}} +% \item \xpgchoicekey[1.46]{spanishoperators}{\xpgdefaultvalue{all}, \xpgvalue{accented}, +% \xpgvalue{spaced}, \xpgvalue{none}, or \xpgpresetvalue{false}} % Determines of and how math operators are localized to Spanish. % \begin{itemize} % \item ¦accented¦ causes some math operators to use accents where usual in Spanish (\emph{lím}, @@ -1555,29 +2038,29 @@ to track the issues and follow progress. % \item ¦spaced¦ causes some math operators to use spaces where usual in Spanish (\emph{arc\,cos}, % \emph{arc\,sen}, \emph{arc\,tg}). % \item ¦all¦ activates ¦accented¦ and ¦spaced¦ and furthermore provides Spanish localizations of -% ¦\sin¦ (\emph{sen}), ¦\tan¦ (\emph{tg}), ¦\sinh¦ (\emph{senh}), and ¦\tanh¦ (\emph{tgh}). -% \item ¦none¦ does no localization at all (default setting). +% \cmd\sin\ (\emph{sen}), \cmd\tan\ (\emph{tg}), \cmd\sinh\ (\emph{senh}), and \cmd\tanh\ (\emph{tgh}). +% \item ¦none¦ does no localization at all (default setting). % \end{itemize} % \end{itemize} -% \paragraph*{\color{black}Commands:}\new{v1.46} +% \paragraph*{\color{black}Commands:}\new{1.46} % \begin{itemize} -% \item \Cmd\arcsen: alias to ¦\arcsin¦ (\pkg{babel} compatibility) -% \item \Cmd\arctg: alias to ¦\arctan¦ (\pkg{babel} compatibility) -% \item \Cmd\sen: alias to ¦\sin¦ (\pkg{babel} compatibility) -% \item \Cmd\senh: alias to ¦\sinh¦ (\pkg{babel} compatibility) -% \item \Cmd\tg: alias to ¦\tan¦ (\pkg{babel} compatibility) -% \item \Cmd\tgh: alias to ¦\tanh¦ (\pkg{babel} compatibility) +% \item \Cmd\arcsen: alias to \cmd\arcsin\ (\pkg{babel} compatibility) +% \item \Cmd\arctg: alias to \cmd\arctan\ (\pkg{babel} compatibility) +% \item \Cmd\sen: alias to \cmd\sin\ (\pkg{babel} compatibility) +% \item \Cmd\senh: alias to \cmd\sinh\ (\pkg{babel} compatibility) +% \item \Cmd\tg: alias to \cmd\tan\ (\pkg{babel} compatibility) +% \item \Cmd\tgh: alias to \cmd\tanh\ (\pkg{babel} compatibility) % \item \Cmd\spanishoperator: allows you to define further localized operators. For instance, ¦\spanishoperator{cotg}¦ -% defines a command ¦\cotg¦ that outputs \emph{cotg} in math. The optional argument of the command lets you specify the +% defines a command \cmd\cotg\ that outputs \emph{cotg} in math. The optional argument of the command lets you specify the % spelling, if needed, \eg ¦\spanishoperator[arc\,ctg]{arcctg}¦. % \end{itemize} % % \subsection{syriac}\label{syriac} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{numerals} = \textit{western} (i.e., 1234567890), eastern -% (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}), -% or abjad. \new{v1.0.1}. +% \item \xpgchoicekey[1.0.1]{numerals}{\xpgpresetvalue{western} (\ie 1234567890), \xpgvalue{eastern} +% (for which the Oriental Arabic numerals are used: \textarabic{١٢٣٤٥٦٧٨٩٠}), or +% \xpgvalue{abjad}} % \end{itemize} % \paragraph*{Commands:} % \begin{itemize} @@ -1588,7 +2071,7 @@ to track the issues and follow progress. % \subsection{thai}\label{thai} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{numerals} = thai or \textit{arabic} +% \item \xpgchoicekey{numerals}{\xpgvalue{thai} or \xpgpresetvalue{arabic}} % \end{itemize} % ^^A % To insert word breaks, you need to use an external processor. @@ -1598,21 +2081,58 @@ to track the issues and follow progress. % \subsection{tibetan}\label{tibetan} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{numerals} = tibetan or \textit{arabic} +% \item \xpgchoicekey{numerals}{\xpgvalue{tibetan} or \xpgpresetvalue{arabic}} % \end{itemize} % % \subsection{ukrainian}\label{ukrainian} -% \paragraph*{Commands:} +% +% \paragraph*{Options:} +% \begin{itemize} +% \item \xpgboolkeyfalse{babelshorthands} +% 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 \cmd\-). +% \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. +% ^^A These are commented out in gloss-ukrainian +% ^^A \item[¦",¦] thinspace for initials with a breakpoint in following surname. +% ^^A \item[¦"‘¦] for German left double quotes (looks like ,,). +% ^^A \item[¦"’¦] for German right double quotes (looks like “). +% ^^A \item[¦"<¦] for French left double quotes (looks like <<). +% ^^A \item[¦">¦] for French right double quotes (looks like >>). +% \end{shorthands} +% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}} +% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows: % \begin{itemize} -% \item \Cmd\Asbuk: produces the uppercase Ukrainian alphabet, for -% environments such as ¦enumerate¦ -% \item \Cmd\asbuk: same in lowercase +% \item \xpgvalue{cyrillic-alph} steps through the Cyrillic alphabet. Thus it can only be used up to 30. +% \item \xpgvalue{cyrillic-trad} (= \xpgvalue{cyrillic}) uses a traditional Cyrillic alphanumeric system.% +% \footnote{See \url{https://en.wikipedia.org/wiki/Cyrillic_numerals}.} +% It supports numbers up to 999\,999. % \end{itemize} +% \end{itemize} +% ^^A +% \paragraph*{Commands:} +% \begin{itemize} +% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦. +% It steps through the Cyrillic alphabet and thus it can only be used up to 30. +% The command takes a counter as argument, \eg ¦\textukrainian{\Asbuk{section}}¦ produces \textrussian{\Asbuk{section}}. +% \item \Cmd\asbuk: same as \cmd\Asbuk\ but in lowercase. +% \item \Cmd\AsbukTrad: same as \cmd\Asbuk\ but using the traditional Cyrillic alphanumeric numbering which supports +% numbers up to 999\,999.\\ +% \Eg ¦\textukrainian{\AsbukTrad{page}}¦ produces \textrussian{\AsbukTrad{page}}. +% \item \Cmd\asbukTrad: same as \cmd\AsbukTrad\ but in lowercase. +% \end{itemize} % % \subsection{welsh}\label{welsh} % \paragraph*{Options:} % \begin{itemize} -% \item \TB{date} = long or \textit{short} +% \item \xpgchoicekey{date}{\xpgvalue{long} or \xpgpresetvalue{short}} % \end{itemize} % % @@ -1620,55 +2140,55 @@ to track the issues and follow progress. % % \pkg{Polyglossia} uses the following macros to define language-specific captions % (\ie strings such as ``chapter''), date formats and additional language settings -% (¦⟨lang⟩¦ is to be replaces with the respective language name): +% (\meta{lang} is to be replaces with the respective language name): % % \begin{itemize} -% \item \Cmd{\captions⟨lang⟩} stores definitions of caption strings +% \item \Cmd{\captions\meta{lang}} stores definitions of caption strings % (such as, in the case of English, ¦\def\chaptername{Chapter}¦) -% \item \Cmd{\date⟨lang⟩} stores definitions of date formats (usually redefinitions -% of ¦\today¦, in some cases also definitions of additional date commands) -% \item \Cmd{\blockextras⟨lang⟩} stores macros that are to be executed when the language -% ⟨lang⟩ is activated via ¦\selectlanguage¦ command or the ¦⟨lang⟩¦ environment -% \item \Cmd{\inlineextras⟨lang⟩} stores macros that are to be executed when the language -% ⟨lang⟩ is activated locally via ¦\text⟨lang⟩¦ command -% \item \Cmd{\noextras⟨lang⟩} stores macros that are to be executed when the language -% ¦⟨lang⟩¦ is closed -% \end{itemize} +% \item \Cmd{\date\meta{lang}} stores definitions of date formats (usually redefinitions +% of \cmd\today, in some cases also definitions of additional date commands) +% \item \Cmd{\blockextras\meta{lang}} stores macros that are to be executed when the language +% \meta{lang} is activated via \cmd\selectlanguage command or the \meta{lang} environment +% \item \Cmd{\inlineextras\meta{lang}} stores macros that are to be executed when the language +% \meta{lang} is activated locally via \cmd\text\meta{lang} command +% \item \Cmd{\noextras\meta{lang}} stores macros that are to be executed when the language +% \meta{lang} is closed +% \end{itemize} % ^^A -% In order to redefine internal macros, we recommend to use the command ¦\gappto¦. -% For compatibility with \pkg{babel} the command ¦\addto¦ is also available -% to the same effect. For instance, to change the ¦\chaptername¦ for language ¦lingua¦, +% In order to redefine internal macros, we recommend to use the command \cmd\gappto. +% For compatibility with \pkg{babel} the command \cmd\addto\ is also available +% to the same effect. For instance, to change the \cmd\chaptername\ for language ¦lingua¦, % you can do this: % \begin{verbatim} % \gappto\captionslingua{\def\chaptername{Caput}} % \end{verbatim} % ^^A % Note that this needs to be done after the respective language has been loaded with -% ¦\setmainlanguage¦ or ¦\setotherlanguage¦. +% \cmd\setmainlanguage\ or \cmd\setotherlanguage. % % Specifically for package authors, analogous commands are provided which are only executed % if a specific language \emph{variety} is used. As opposed to the macros above, these refer % to babel names. Other than that, the function is identical: % % \begin{itemize} -% \item \Cmd{\captions@bbl@⟨babelname⟩} -% \item \Cmd{\date@bbl@⟨babelname⟩} -% \item \Cmd{\blockextras@bbl@⟨babelname⟩} -% \item \Cmd{\inlineextras@bbl@⟨babelname⟩} -% \item \Cmd{\noextras@bbl@⟨babelname⟩} +% \item \Cmd{\captions@bbl@\meta{babelname}} +% \item \Cmd{\date@bbl@\meta{babelname}} +% \item \Cmd{\blockextras@bbl@\meta{babelname}} +% \item \Cmd{\inlineextras@bbl@\meta{babelname}} +% \item \Cmd{\noextras@bbl@\meta{babelname}} % \end{itemize} % ^^A % By default, these macros are undefined. If they are defined (\eg by an external package), -% they will be executed after their respective ¦⟨lang⟩¦ counterpart and thus can be used to -% overwrite definitions of the former. Again, use ¦\gappto¦ to define\slash modify these macros. -% For instance, to add a new caption ¦\footnotename¦ to the Swiss variety of German (babel name +% they will be executed after their respective \meta{lang} counterpart and thus can be used to +% overwrite definitions of the former. Again, use \cmd\gappto\ to define\slash modify these macros. +% For instance, to add a new caption \cmd\footnotename\ to the Swiss variety of German (babel name % ¦nswissgerman¦), you can do this: % \begin{verbatim} % \gappto\captions@bbl@nswissgerman{\def\footnotename{Fussnote}} % \end{verbatim} % ^^A % If you do this in a document preamble rather than in a package, you need to embrace the redefinition -% by ¦\makeatletter¦ and ¦\makeatother¦ due to the ¦@¦ in the macro names. +% by \cmd\makeatletter\ and \cmd\makeatother\ due to the ¦@¦ in the macro names. % % \section{Script-specific numbering} % @@ -1694,25 +2214,27 @@ to track the issues and follow progress. % ¦\localnumeral{42}¦ yields \textarabic{\localnumeral{42}}, whereas in an Hebrew environment, it % results in \texthebrew[numerals=hebrew]{\localnumeral{42}} with ¦numerals=hebrew¦, and \texthebrew{\localnumeral{42}} % with ¦numerals=arabic¦. Note that, as opposed to the various ¦digits¦ macros (described in sec.~\ref{sec:decdigit}), -% the argument of ¦\localnumeral¦ must consist of numbers only. +% the argument of \cmd\localnumeral\ must consist of numbers only. % % For\new{1.45} the conversion of counters, the starred version \Cmd{\localnumeral*} is provided. This takes a counter as argument. % For instance in an Arabic environment ¦\localnumeral*{page}¦ yields \textarabic{\localnumeral*{page}}. % -% For scripts with alphanumeric numbering, the variants \Cmd{\Localnumeral} and \Cmd{\Localnumeral*} provide the uppercased +% For scripts with alphanumeric numbering, the variants \Cmd{\Localnumeral} and \Cmd{\Localnumeral*} provide the uppercased % versions.\medskip % % \noindent All these macros provide the following options: % % \begin{itemize} -% \item \TB{lang} =\DescribeMacro{[lang=]}\ \textit{local}, main, or <language>.\\ -% Output number in the local form of the currently active language for ¦local¦, the main language of the document for ¦main¦, -% and any (loaded) language for ¦<language>¦ (\eg ¦\localnumeral[lang=arabic]{42}}¦). +% \item \DescribeMacro{[lang=]}\xpgchoicekey{lang}{\xpgpresetvalue{local}, \xpgvalue{main}, +% or \xpgvalue{\meta{language}}} +% Output number in the local form of the currently active language for +% ¦local¦, the main language of the document for ¦main¦, and any (loaded) +% language for \meta{language} (\eg ¦\localnumeral[lang=arabic]{42}}¦). % \end{itemize} % % \subsection{Non-Western decimal digits}\label{sec:decdigit} % -% In addition\new{v1.1.1} to the generic macros described above, \pkg{polyglossia} provides language-specific conversion macros +% In addition\new{1.1.1} to the generic macros described above, \pkg{polyglossia} provides language-specific conversion macros % which can be used if the generic ones do not suit the need.\footnote{% % A third method are so-called TECKit fontmappings. % Those can be activated with the \pkg{fontspec} ¦Mapping¦ option, @@ -1721,7 +2243,7 @@ to track the issues and follow progress. % typing \cmd{\textarabic\{2010\}} results in \textarabic{٢٠١٠}. Note that this method has some drawbacks, though, % for instance when the value of a counter has to be written and read from auxiliary files. % So please use this with care.} -% The macros have the form ¦\<script>digits¦. They convert Arabic numerical input and leave every other input untouched. +% The macros have the form \cmd{\⟨script⟩digits}. They convert Arabic numerical input and leave every other input untouched. % In an Arabic context, for instance, ¦\arabicdigits{9182/738543-X}¦ yields \textarabic{\arabicdigits{9182/738543-X}}. % % Currently, the following macros are provided: @@ -1748,9 +2270,9 @@ to track the issues and follow progress. % \url{http://en.wikipedia.org/wiki/Hebrew_numerals}, % and \url{http://en.wikipedia.org/wiki/Syriac_alphabet}.}, dedicated macros are provided. % -% They work in a similar way than the ¦\<script>digits¦ macros described above: They take Arabic numerical input +% They work in a similar way than the \cmd{\⟨script⟩digits} macros described above: They take Arabic numerical input % and output the respective value in the local alphabetic numbering scheme (most of these macros are equivalent -% to ¦\localnumeral¦ and ¦\Localnumeral¦ in the respective context). +% to \cmd\localnumeral\ and \cmd\Localnumeral\ in the respective context). % % The following macros are provided: % @@ -1767,6 +2289,13 @@ to track the issues and follow progress. % % \item \Cmd\armeniannumeral produces Armenian alphabetic numbering. % Example: ¦\armeniannumeral{1863}¦ yields \textarmenian{\armeniannumeral{1863}}. +% +% \item \Cmd\belarusiannumeral produces Belarusian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Belarusiannumeral. +% Depending on the ¦numerals¦ option in the Belarusian language selection, this is either Arabic digit or Cyrillic +% alphanumercial output.\\ +% Example: With ¦numerals=latin¦ ¦\belarusiannumeral{19}¦ yields \textrussian{\russiannumeral{19}}, +% with ¦numerals=cyrillic-trad¦ ¦\belarusiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\ +% with ¦numerals=cyrillic-alph¦ ¦\belarusiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}. % % \item \Cmd\georgiannumeral produces Georgian alphabetic numbering.\\ % Example: ¦\georgiannumeral{1863}¦ yields \textgeorgian{\georgiannumeral{1863}}. @@ -1776,24 +2305,40 @@ to track the issues and follow progress. % ¦\Greeknumeral{1863}¦ results in \textgreek{\Greeknumeral{1863}}. % % \item \Cmd\hebrewnumeral, \Cmd\Hebrewnumeral and \Cmd\Hebrewnumeralfinal generate variants of Hebrew alphanumeric numerals. -% The commands behave exactly as they do in \pkg{babel}: ¦\hebrewnumeral¦ outputs the numbers without any decoration, -% ¦\Hebrewnumeral¦ adds \textit{gereshayim} before the last letter, ¦\Hebrewnumeralfinal¦ uses in addition the final forms of Hebrew letters. +% The commands behave exactly as they do in \pkg{babel}: \cmd\hebrewnumeral\ outputs the numbers without any decoration, +% \cmd\Hebrewnumeral\ adds \textit{gereshayim} before the last letter, \cmd\Hebrewnumeralfinal\ uses in addition the final forms of Hebrew letters. % Examples: % ¦\hebrewnumeral{1750}¦ yields \texthebrew{\hebrewnumeral{1750}}, % ¦\Hebrewnumeral{1750}¦ yields \texthebrew{\Hebrewnumeral{1750}}, % and ¦\Hebrewnumeralfinal{1750}¦ yields \texthebrew{\Hebrewnumeralfinal{1750}}. +% +% \item \Cmd\mongoliannumeral produces Mongolian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Mongoliannumeral. +% Depending on the ¦numerals¦ option in the Mongolian language selection, this is either Arabic digit or Cyrillic +% alphanumercial output.\\ +% Example: With ¦numerals=latin¦ ¦\mongoliannumeral{19}¦ yields \textrussian{\russiannumeral{19}}, +% with ¦numerals=cyrillic-trad¦ ¦\mongoliannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\ +% with ¦numerals=cyrillic-alph¦ ¦\mongoliannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}. % % \item \Cmd\russiannumeral produces Russian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Russiannumeral. % Depending on the ¦numerals¦ option in the Russian language selection, this is either Arabic digit or Cyrillic % alphanumercial output.\\ % Example: With ¦numerals=latin¦ ¦\russiannumeral{19}¦ yields \textrussian{\russiannumeral{19}}, -% with ¦numerals=cyrillic¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic]{\russiannumeral{19}}. +% with ¦numerals=cyrillic-trad¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\ +% with ¦numerals=cyrillic-alph¦ ¦\russiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}. % % \item \Cmd\serbiannumeral produces Serbian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Serbiannumeral. % Depending on the ¦numerals¦ option in the Serbian language selection, this is either Arabic digit or Cyrillic % alphanumercial output.\\ -% Example: With ¦numerals=latin¦ ¦\serbiannumeral{19}¦ yields \textserbian{\serbiannumeral{19}}, -% with ¦numerals=cyrillic¦ ¦\serbiannumeral{19}¦ results in \textserbian[numerals=cyrillic]{\serbiannumeral{19}}. +% Example: With ¦numerals=latin¦ ¦\serbiannumeral{19}¦ yields \textrussian{\serbiannumeral{19}}, +% with ¦numerals=cyrillic-trad¦ ¦\serbiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\serbiannumeral{19}},\\ +% with ¦numerals=cyrillic-alph¦ ¦\serbiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\serbiannumeral{19}}. +% +% \item \Cmd\ukrainiannumeral produces Ukrainian numbering, with uppercased variant (for alphanumerical variant) via \Cmd\Ukrainiannumeral. +% Depending on the ¦numerals¦ option in the Ukrainian language selection, this is either Arabic digit or Cyrillic +% alphanumercial output.\\ +% Example: With ¦numerals=latin¦ ¦\ukrainiannumeral{19}¦ yields \textrussian{\russiannumeral{19}}, +% with ¦numerals=cyrillic-trad¦ ¦\ukrainiannumeral{19}¦ results in \textrussian[numerals=cyrillic-trad]{\russiannumeral{19}},\\ +% with ¦numerals=cyrillic-alph¦ ¦\ukrainiannumeral{19}¦ results in \textrussian[numerals=cyrillic-alph]{\russiannumeral{19}}. % \end{itemize} % % @@ -1806,14 +2351,14 @@ to track the issues and follow progress. % % \subsection{Horizontal footnote position} % -% When right-to-left languages are used, the ¦\footnote¦ command becomes sensitive to the text directionality. The footnote is +% When right-to-left languages are used, the \cmd\footnote\ command becomes sensitive to the text directionality. The footnote is % always placed on the side that is currently the origin of direction: on the left side of the page in LTR paragraphs and % on the right in RTL paragraphs. % % For cases where this is not desired, two additional footnote commands are provided: \Cmd\RTLfootnote and \Cmd\LTRfootnote. -% ¦\LTRfootnote¦ always places the footnote on the left side, notwithstanding the current -% directionality. Likewise, ¦\RTLfootnote¦ always places it on the right side. Like ¦\footnote¦, ¦\RTLfootnote¦ -% and ¦\LTRfootnote¦ provide an optional argument to customize the number. +% \cmd\LTRfootnote\ always places the footnote on the left side, notwithstanding the current +% directionality. Likewise, \cmd\RTLfootnote\ always places it on the right side. Like \cmd\footnote, \cmd\RTLfootnote\ +% and \cmd\LTRfootnote\ provide an optional argument to customize the number. % % % \subsection{Footnote rule length and position} @@ -1830,12 +2375,13 @@ to track the issues and follow progress. % \item Put \Cmd\autofootnoterule in the preamble to have automatic placement depending on the context (see below for elaboration). % \item Put \Cmd\textwidthfootnoterule in the preamble to have a rule that spans the whole text width. % \end{itemize} -% With ¦\autofootnoterule¦, the first footnote on the current page determines the placement. Note that this automatic can fail with -% footnotes at page boundaries that differ in directionality from the first footnote on the page. You can work around such cases by switching to ¦\rightfootnoterule¦ or ¦\leftfootnoterule¦ on these pages. +% With \cmd\autofootnoterule, the first footnote on the current page determines the placement. Note that this automatic can fail with +% footnotes at page boundaries that differ in directionality from the first footnote on the page. You can work around such cases by switching to \cmd\rightfootnoterule\ or \cmd\leftfootnoterule\ on these pages. % % Note also that the rule switches might interfere in bad ways with packages or classes that redefine footnotes themselves. This is also the reason -% why ¦\autofootnoterule¦ is not used by default. +% why \cmd\autofootnoterule\ is not used by default. % +% \condbreak{5\baselineskip} % \section{Calendars} % % \subsection{Hebrew calendar (hebrewcal.sty)} @@ -1852,24 +2398,24 @@ to track the issues and follow progress. % (Cambridge University Press, 2001).\label{reingold}} % It provides two macros for the end-user. % The command -% \displaycmd{\HijriFromGregorian\{⟨year⟩\}\{⟨month⟩\}\{⟨day⟩\}}{\HijriFromGregorian} +% \displaycmd{\HijriFromGregorian\marg{year}\marg{month}\marg{day}}{\HijriFromGregorian} % sets the counters ¦Hijriday¦, ¦Hijrimonth¦ and ¦Hijriyear¦. % \Cmd\Hijritoday\ formats the Hijri date for the current day. -% This command is now locale-aware\new{v1.1.1}: its output will differ depending on the +% This command is now locale-aware\new{1.1.1}: its output will differ depending on the % currently active language. Presently \pkg{polyglossia}’s language definition files -% for Arabic, Farsi, Urdu, Turkish and Malay provide a localized version of ¦\Hijritoday¦. +% for Arabic, Farsi, Urdu, Turkish and Malay provide a localized version of \cmd\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} +% \displaycmd{\DefineHijriDateFormat\marg{lang}\marg{code}.}{\DefineHijriDateFormat} % -% The command ¦\Hijritoday¦ also accepts an optional argument to add or subtract a correction +% The command \cmd\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 % 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 \cmd\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}). @@ -1877,19 +2423,26 @@ to track the issues and follow progress. % \subsection{Farsi (jalālī) calendar (farsical.sty)} % 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}).} +% One day we 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. % % -% ^^A\section{Varia} +% \section{Auxiliary commands} +% +% The macro \displaycmd{\charifavailable\marg{char code}\marg{substitution}}{\charifavailable}\new{1.47} checks whether +% the character with the specified \meta{char code} (\ie unicode utf-16 code without preceding ¦0x¦) exists in +% the current font. If so, the character is printed, if not, the \meta{substitution} is printed. +% +% Example: ¦\charifavailable{1E9E}{SS}¦ prints the capital version of the German letter ⟨ß⟩ if available +% (\ie \charifavailable{1E9E}{SS}), else it prints the substitution digraph SS. +% % % \section{Accessing language information} % % The following is specifically relevant to package authors who need information about the languages in use. -% % In order to get such information, \pkg{polyglossia} provides the following macros: % % \begin{itemize} @@ -1904,20 +2457,36 @@ to track the issues and follow progress. % Note that this macro is also defined for languages that are not supported in \pkg{babel}. In that % case, they are equal to the polyglossia language name. % \item \Cmd\mainbabelname\ analogously stores the name of document's main language (variant) in \pkg{babel}. +% \item \Cmd{\languageid\marg{type}}\new{1.47} stores the identifier tag of the current language. Currently supported \meta{types}: +% \begin{itemize} +% \item ¦bcp-47¦ (alias ¦bcp47¦): IETF BCP-47 language identifier +% \end{itemize} +% \item \Cmd{\mainlanguageid\marg{type}}\new{1.47} stores identifier tag of the main language. Currently supported \meta{types}: +% see \cmd\languageid. % \end{itemize} -% ^^A -% If you want to have a full list of loaded languages/variants, use the following macros: +% \bigskip +% +% \noindent If you want to have a full list of loaded languages/variants, use the following macros: % \begin{itemize} % \item \Cmd{\xpg@loaded}\ stores a comma-separated list of all loaded languages (polyglossia name) % \item \Cmd{\xpg@vloaded}\ stores a comma-separated list of all loaded variants -% \item \Cmd{\xpg@bloaded}\ stores a comma-separated list of \pkg{babel} names of all language variants +% \item \Cmd{\xpg@bloaded}\ stores a comma-separated list of \pkg{babel} names of all language variants +% \item \Cmd{\xpg@bcp@loaded}\new{1.47}\ stores a comma-separated list of the BCP-47 IDs of all language variants % \end{itemize} -% ^^A -% Finally, you can test whether a language is loaded by -% \displaycmd{\iflanguageloaded\{⟨lang⟩\}\{⟨true⟩\}\{⟨false⟩\}}{\iflanguageloaded} -% where \texttt{⟨lang⟩} is a \pkg{polyglossia} language name, or -% \displaycmd{\ifbabellanguageloaded\{⟨lang⟩\}\{⟨true⟩\}\{⟨false⟩\}}{\ifbabellanguageloaded} -% where \texttt{⟨lang⟩} is a \pkg{babel} language name. +% \bigskip +% +% \noindent Whether a language is loaded can be tested by +% \displaycmd{\iflanguageloaded\marg{lang}\marg{true}\marg{false}}{\iflanguageloaded} +% where \texttt{\meta{lang}} is a \pkg{polyglossia} language name, by +% \displaycmd{\ifbabellanguageloaded\marg{lang}\marg{true}\marg{false}}{\ifbabellanguageloaded} +% where \texttt{\meta{lang}} is a \pkg{babel} language name (see table~\ref{tab:bbllang} on p.~\pageref{tab:bbllang}), or by +% \displaycmd{\iflanguageidloaded\marg{type}\marg{id}\marg{true}\marg{false}}{\iflanguageidloaded}\new{1.47} +% where \meta{type} is a supported language id type (such as ¦bcp-47¦) and \meta{id} is a language id +% (such as ¦en-US¦; see table~\ref{tab:BCP47-polyglossia} on p.~\pageref{tab:BCP47-polyglossia}). +% \bigskip +% +% \noindent Finally, if you want to know whether a specific language option has been set, you can use +% \displaycmd{\iflanguageoption\marg{lang}\marg{opt. key}\marg{opt. value}\marg{true}\marg{false}}{\iflanguageoption}\new{1.47} % % \section{Acknowledgements (by François Charette)} % \pkg{Polyglossia} is notable for being a recycle box of previous contributions @@ -1933,7 +2502,7 @@ to track the issues and follow progress. % (Sanskrit), \TA{Zdenĕk Wagner} (Hindi), \TA{Mikhal Oren} (Hebrew), \TA{Sergey Astanin} (Russian), % \TA{Khaled Hosny} (Arabic), \TA{Sertaç Ö. Yıldız} (Turkish), \TA{Kamal Abdali} (Urdu), % and several other members of the \XeTeX\ user community, notably \TA{Enrico Gregorio}, who -% has sent me many useful suggestions and corrections and contributed the ¦\newXeTeXintercharclass¦ +% has sent me many useful suggestions and corrections and contributed the \cmd\newXeTeXintercharclass\ % mechanism in xelatex.ini which is now used by polyglossia. % More recently, \TA{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, @@ -1950,9 +2519,9 @@ to track the issues and follow progress. % In alphabetical order: \TA{Ignas Anikevicius}, \TA{Sina Ahmadi}, \TA{Wouter Bolsterlee}, \TA{Christian Buhtz}, % \TA{Zgarbul Andrey}, \TA{Oleg Domanov}, \TA{Philipp Gesang}, \TA{Kevin Godby}, \TA{Enrico Gregorio}, % \TA{Khaled Hosny}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime}, \TA{Mike Kroutikov}, -% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Maïeul Rouquette}, -% \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Keno Wehr}, \TA{Dominik Wujastyk}, -% \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}. +% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Will Robertson}, \TA{Maïeul Rouquette}, +% \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Niranjan Tambe}, \TA{Keno Wehr}, +% \TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}. % Their respective contributions can be identified from the contributor statistics on % \href{https://github.com/reutenauer/polyglossia/graphs/contributors}{GitHub}. % @@ -1986,6 +2555,51 @@ to track the issues and follow progress. % \end{macrocode} % \iffalse %</gloss-acadien.ldf> +%<*gloss-aeb.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-aeb.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-aeb.ldf}[polyglossia: module for aeb (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-aeb.ldf> +%<*gloss-af.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-af.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-af.ldf}[polyglossia: module for af (afrikaans)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{afrikaans} + +% \end{macrocode} +% \iffalse +%</gloss-af.ldf> +%<*gloss-afb.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-afb.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-afb.ldf}[polyglossia: module for afb (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-afb.ldf> %<*gloss-afrikaans.ldf> % \fi % \clearpage @@ -1995,6 +2609,7 @@ to track the issues and follow progress. \ProvidesFile{gloss-afrikaans.ldf}[polyglossia: module for afrikaans] \PolyglossiaSetup{afrikaans}{ + bcp47=af, hyphennames={afrikaans,dutch}, hyphenmins={2,2}, langtag=AFK, @@ -2002,8 +2617,14 @@ to track the issues and follow progress. fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{afrikaans}{af} + \define@boolkey{afrikaans}[afrikaans@]{babelshorthands}[true]{} +% Register default options +\xpg@initialize@gloss@options{afrikaans}{babelshorthands=false} + \ifsystem@babelshorthands \setkeys{afrikaans}{babelshorthands=true} \else @@ -2089,6 +2710,7 @@ to track the issues and follow progress. \ProvidesFile{gloss-albanian.ldf}[polyglossia: module for albanian] \PolyglossiaSetup{albanian}{ + bcp47=sq, hyphennames={albanian}, langtag=SQI, hyphenmins={2,2}, @@ -2096,6 +2718,9 @@ to track the issues and follow progress. fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{albanian}{sq} + \def\captionsalbanian{% \def\refname{Referencat}% \def\abstractname{Përmbledhja}% @@ -2129,6 +2754,21 @@ to track the issues and follow progress. % \end{macrocode} % \iffalse %</gloss-albanian.ldf> +%<*gloss-am.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-am.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-am.ldf}[polyglossia: module for am (amharic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{amharic} + +% \end{macrocode} +% \iffalse +%</gloss-am.ldf> %<*gloss-american.ldf> % \fi % \clearpage @@ -2152,6 +2792,7 @@ to track the issues and follow progress. % \begin{macrocode} \ProvidesFile{gloss-amharic.ldf}[polyglossia: module for amharic] \PolyglossiaSetup{amharic}{ + bcp47=am, script=Ethiopic, scripttag=ethi, langtag=AMH, @@ -2161,6 +2802,9 @@ to track the issues and follow progress. %TODO localalph=ethnum } +% BCP-47 compliant aliases +\setlanguagealias*{amharic}{am} + \def\captionsamharic{% \def\refname{የነሥ ጹሁፍ ምንጭ}% \def\abstractname{አኅጽተሮ ጽሁፍ}% @@ -2356,6 +3000,141 @@ to track the issues and follow progress. % \end{macrocode} % \iffalse %</gloss-amharic.ldf> +%<*gloss-apd.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-apd.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-apd.ldf}[polyglossia: module for apd (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-apd.ldf> +%<*gloss-ar-IQ.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-IQ.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-IQ.ldf}[polyglossia: module for ar-IQ (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-IQ.ldf> +%<*gloss-ar-JO.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-JO.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-JO.ldf}[polyglossia: module for ar-JO (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-JO.ldf> +%<*gloss-ar-LB.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-LB.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-LB.ldf}[polyglossia: module for ar-LB (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-LB.ldf> +%<*gloss-ar-MR.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-MR.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-MR.ldf}[polyglossia: module for ar-MR (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-MR.ldf> +%<*gloss-ar-PS.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-PS.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-PS.ldf}[polyglossia: module for ar-PS (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-PS.ldf> +%<*gloss-ar-SY.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-SY.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-SY.ldf}[polyglossia: module for ar-SY (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-SY.ldf> +%<*gloss-ar-YE.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar-YE.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar-YE.ldf}[polyglossia: module for ar-YE (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar-YE.ldf> +%<*gloss-ar.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ar.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ar.ldf}[polyglossia: module for ar (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ar.ldf> %<*gloss-arabic.ldf> % \fi % \clearpage @@ -2374,6 +3153,7 @@ and may look very wrong.} \RequirePackage{hijrical} \PolyglossiaSetup{arabic}{ + bcp47=ar, script=Arabic, direction=RL, langtag=ARA, @@ -2385,6 +3165,23 @@ and may look very wrong.} %TODO localalph={abjad,abjad} } +% BCP-47 compliant aliases +\setlanguagealias*{arabic}{ar} +\setlanguagealias*[locale=mashriq]{arabic}{ar-IQ} +\setlanguagealias*[locale=default]{arabic}{ar-YE} +\setlanguagealias*[locale=mashriq]{arabic}{ar-LB} +\setlanguagealias*[locale=mashriq]{arabic}{ar-JO} +\setlanguagealias*[locale=default]{arabic}{afb} +\setlanguagealias*[locale=mauritania]{arabic}{ar-MR} +\setlanguagealias*[locale=default]{arabic}{arz} +\setlanguagealias*[locale=morocco]{arabic}{ary} +\setlanguagealias*[locale=algeria]{arabic}{arq} +\setlanguagealias*[locale=tunisia]{arabic}{aeb} +\setlanguagealias*[locale=mashriq]{arabic}{ar-SY} +\setlanguagealias*[locale=libya]{arabic}{ayl} +\setlanguagealias*[locale=default]{arabic}{apd} +\setlanguagealias*[locale=mashriq]{arabic}{ar-PS} + \newif\ifeastern@numerals \def\tmp@mashriq{mashriq} \def\tmp@maghrib{maghrib} @@ -2411,9 +3208,11 @@ and may look very wrong.} \def\@tmpa{#1}% \ifx\@tmpa\tmp@morocco% \eastern@numeralsfalse% + \SetLanguageKeys{arabic}{bcp47=ary}% \else \ifx\@tmpa\tmp@algeria% \eastern@numeralsfalse% + \SetLanguageKeys{arabic}{bcp47=arq}% \fi% \fi% \gdef\@@arabic@month{\@arabic@month{#1}}} @@ -2433,8 +3232,10 @@ and may look very wrong.} \define@key{arabic}{hijricorrection}[0]{% \gdef\@hijri@correction{#1}}% -% This should set the defaults -\setkeys{arabic}{locale,calendar,numerals,hijricorrection,abjadjimnotail=false} +% Register default options +\xpg@initialize@gloss@options{arabic}{locale=default,calendar=gregorian,numerals=mashriq,hijricorrection=0,abjadjimnotail=false} +% Register alias options +\xpg@set@alias@values{arabic}{calendar}{islamic}{hijri} \def\arabicgregmonth@default#1{\ifcase#1% % Egypt, Sudan, Yemen and Golf states @@ -2596,6 +3397,7 @@ and may look very wrong.} \ProvidesFile{gloss-armenian.ldf}[polyglossia: module for armenian] \PolyglossiaSetup{armenian}{ + bcp47=hy, script=Armenian, scripttag=armn, langtag=HYE, @@ -2605,6 +3407,9 @@ and may look very wrong.} localnumeral=armeniannumerals } +% BCP-47 compliant aliases +\setlanguagealias*{armenian}{hy} + \newif\if@eastern@armenian \@eastern@armenianfalse \define@choicekey*+{armenian}{variant}[\val\nr]{western,eastern}[western]{% @@ -2624,6 +3429,9 @@ and may look very wrong.} \ifstrequal{#1}{arabic}{\@armenian@numeralsfalse}{\@armenian@numeralstrue}% } +% Register default options +\xpg@initialize@gloss@options{armenian}{numerals=armenian,variant=western} + % Taken from ArmTeX. Audit! \def\captionsarmenian{% \def\refname{Հղումներ}% @@ -2765,6 +3573,66 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-armenian.ldf> +%<*gloss-arq.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-arq.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-arq.ldf}[polyglossia: module for arq (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-arq.ldf> +%<*gloss-ary.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ary.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ary.ldf}[polyglossia: module for ary (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ary.ldf> +%<*gloss-arz.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-arz.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-arz.ldf}[polyglossia: module for arz (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-arz.ldf> +%<*gloss-ast.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ast.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ast.ldf}[polyglossia: module for ast (asturian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{asturian} + +% \end{macrocode} +% \iffalse +%</gloss-ast.ldf> %<*gloss-asturian.ldf> % \fi % \clearpage @@ -2776,6 +3644,7 @@ and may look very wrong.} % \ProvidesFile{gloss-asturian.ldf}[polyglossia: module for asturian] \PolyglossiaSetup{asturian}{ + bcp47=ast, hyphennames={asturian,catalan}, hyphenmins={2,2}, langtag=AST, @@ -2784,6 +3653,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{asturian}{ast} + \def\captionsasturian{% \def\prefacename{Entamu}% \def\refname{Referencies}% @@ -2838,7 +3710,7 @@ and may look very wrong.} % % \subsection{gloss-austrian.ldf} % \begin{macrocode} -\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for austrian german (old spelling)] +\ProvidesFile{gloss-austrian.ldf}[polyglossia: module for austrian german (old spelling)] % We provide this as a babel alias @@ -2847,17 +3719,32 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-austrian.ldf> +%<*gloss-ayl.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ayl.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ayl.ldf}[polyglossia: module for ayl (arabic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{arabic} + +% \end{macrocode} +% \iffalse +%</gloss-ayl.ldf> %<*gloss-bahasa.ldf> % \fi % \clearpage % % \subsection{gloss-bahasa.ldf} % \begin{macrocode} -\ProvidesFile{gloss-kurmanji.ldf}[polyglossia: module for kurmanji kurdish] +\ProvidesFile{gloss-bahasa.ldf}[polyglossia: module for bahasa indonesia] % We provide this as a babel alias -\xpg@load@master@language{kurdish} +\xpg@load@master@language{malay} % \end{macrocode} % \iffalse @@ -2902,6 +3789,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-basque.ldf}[polyglossia: module for basque] \PolyglossiaSetup{basque}{ + bcp47=eu, hyphennames={basque}, hyphenmins={2,2}, langtag=EUQ, @@ -2909,6 +3797,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{basque}{eu} + \def\captionsbasque{% \def\refname{Erreferentziak}% \def\abstractname{Laburpena}% @@ -2943,6 +3834,36 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-basque.ldf> +%<*gloss-be-tarask.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-be-tarask.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-be-tarask.ldf}[polyglossia: module for be-tarask (belarusian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{belarusian} + +% \end{macrocode} +% \iffalse +%</gloss-be-tarask.ldf> +%<*gloss-be.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-be.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-be.ldf}[polyglossia: module for be (belarusian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{belarusian} + +% \end{macrocode} +% \iffalse +%</gloss-be.ldf> %<*gloss-belarusian.ldf> % \fi % \clearpage @@ -2954,6 +3875,7 @@ and may look very wrong.} \RequirePackage{xpg-cyrillicnumbers} \PolyglossiaSetup{belarusian}{ + bcp47=be, script=Cyrillic, scripttag=cyrl, langtag=BEL, @@ -2965,30 +3887,56 @@ and may look very wrong.} Localnumeral=Belarusiannumerals } +% BCP-47 compliant aliases +\setlanguagealias*[spelling=classic]{belarusian}{be-tarask} +\setlanguagealias*{belarusian}{be} + \def\belarusian@spelling{modern} \define@choicekey*+{belarusian}{spelling}[\val\nr]{modern,classic,tarask}[modern]{% \ifcase\nr\relax % modern: - \def\belarusian@spelling{modern} + \def\belarusian@spelling{modern}% + \SetLanguageKeys{belarusian}{bcp47=be}% \or % classic: - \def\belarusian@spelling{tarask} + \def\belarusian@spelling{tarask}% + \SetLanguageKeys{belarusian}{bcp47=be-tarask}% \or % tarask: - \def\belarusian@spelling{tarask} + \def\belarusian@spelling{tarask}% + \SetLanguageKeys{belarusian}{bcp47=be-tarask}% \fi }{\xpg@warning{Unknown Belarusian spelling `#1'}} \newif\ifcyrillic@numerals -\define@key{belarusian}{numerals}[arabic]{% - \ifstrequal{#1}{cyrillic}% - {\cyrillic@numeralstrue}% - {\cyrillic@numeralsfalse}% -} +\newif\ifcyrillic@asbuk@numerals +\define@choicekey*+{belarusian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{% + \ifcase\nr\relax + % arabic: + \cyrillic@numeralsfalse% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-trad: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-alph: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralstrue% + \fi + \xpg@info{Option: Belarusian, numerals=\val}% +}{\xpg@warning{Unknown Belarusian numerals value `#1'}} -\define@boolkey{belarusian}[belarusian@]{babelshorthands}[false]{} +\define@boolkey{belarusian}[belarusian@]{babelshorthands}[true]{} -\setkeys{belarusian}{numerals} +% Register default options +\xpg@initialize@gloss@options{belarusian}{babelshorthands=false,numerals=arabic,spelling=modern} +% Register alias options +\xpg@set@alias@values{belarusian}{spelling}{classic}{tarask} \ifsystem@babelshorthands \setkeys{belarusian}{babelshorthands=true} @@ -3153,7 +4101,11 @@ and may look very wrong.} \def\belarusiannumber#1{% \ifcyrillic@numerals - \cyr@alph{#1}% + \ifcyrillic@asbuk@numerals + \belarusian@asbuk@alph{#1}% + \else + \cyr@alph{#1}% + \fi \else \number#1% \fi% @@ -3161,7 +4113,11 @@ and may look very wrong.} \def\Belarusiannumber#1{% \ifcyrillic@numerals - \cyr@Alph{#1}% + \ifcyrillic@asbuk@numerals + \belarusian@asbuk@Alph{#1}% + \else + \cyr@Alph{#1}% + \fi \else \number#1% \fi% @@ -3170,24 +4126,30 @@ and may look very wrong.} \let\belarusiannumeral=\belarusiannumber \let\Belarusiannumeral=\Belarusiannumber -\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\Asbuk#1{\expandafter\belarusian@asbuk@Alph\csname c@#1\endcsname} +\def\asbuk#1{\expandafter\belarusian@asbuk@alph\csname c@#1\endcsname} -\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname} +\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} -% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and -% thus ends at 30. We now use proper cyrillic numbering. -%\def\belarusian@Alph#1{\ifcase#1\or -% А\or Б\or В\or Г\or Д\or Е\or Ж\or -% З\or И\or К\or Л\or М\or Н\or О\or -% П\or Р\or С\or Т\or У\or Ф\or Х\or -% Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я\else\xpg@ill@value{#1}{belarusian@Alph}\fi} +% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and +% thus ends at 30. +\def\belarusian@asbuk@Alph#1{\ifcase#1\or + А\or Б\or В\or Г\or Д\or Е\or Ж\or + З\or И\or К\or Л\or М\or Н\or О\or + П\or Р\or С\or Т\or У\or Ф\or Х\or + Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я% + \else\xpg@ill@value{#1}{belarusian@asbuk@Alph}\fi% +} -%\def\belarusian@alph#1{\ifcase#1\or -% а\or б\or в\or г\or д\or е\or ж\or -% з\or и\or к\or л\or м\or н\or о\or -% п\or р\or с\or т\or у\or ф\or х\or -% ц\or ч\or ш\or щ\or э\or ю\or я\else\xpg@ill@value{#1}{belarusian@alph}\fi} +\def\belarusian@asbuk@alph#1{\ifcase#1\or + а\or б\or в\or г\or д\or е\or ж\or + з\or и\or к\or л\or м\or н\or о\or + п\or р\or с\or т\or у\or ф\or х\or + ц\or ч\or ш\or щ\or э\or ю\or я% + \else\xpg@ill@value{#1}{belarusian@asbuk@alph}\fi% +} \def\belarusian@numbers{% \let\latin@alph\@alph @@ -3232,16 +4194,19 @@ and may look very wrong.} % TODO implement Bengali calendar \ProvidesFile{gloss-bengali.ldf}[polyglossia: module for bengali] + \ifluatex \xpg@warning{Bengali is not supported with LuaTeX.\MessageBreak -I will proceed with the compilation, but\MessageBreak -the output is not guaranteed to be correct\MessageBreak -and may look very wrong.} + I will proceed with the compilation, but\MessageBreak + the output is not guaranteed to be correct\MessageBreak + and may look very wrong.} \fi + \RequirePackage{devanagaridigits} \RequirePackage{bengalidigits} \PolyglossiaSetup{bengali}{ + bcp47=bn, script=Bengali, scripttag=beng, langtag=BEN, @@ -3252,55 +4217,35 @@ and may look very wrong.} %TODO nouppercase=true, } -\def\tmp@western{Western} +% BCP-47 compliant aliases +\setlanguagealias*{bengali}{bn} + \newif\ifbengali@devanagari@numerals -\bengali@devanagari@numeralstrue -\def\tmp@bengali{Bengali} \newif\ifbengali@bengali@numerals -\bengali@bengali@numeralsfalse % Implied, but you never know - - -\define@key{bengali}{numerals}[Devanagari]{% - \def\@tmpa{#1}% - \ifx\@tmpa\tmp@western - \bengali@devanagari@numeralsfalse - \else\ifx\@tmpa\tmp@bengali - \bengali@devanagari@numeralsfalse - \bengali@bengali@numeralstrue\fi - \fi} +\define@choicekey*+{bengali}{numerals}[\val\nr]{Devanagari,Bengali,Western}[Devanagari]{% + \ifcase\nr\relax + % Devanagari: + \bengali@bengali@numeralsfalse% + \bengali@devanagari@numeralstrue% + \or + % Bengali: + \bengali@bengali@numeralstrue% + \bengali@devanagari@numeralsfalse% + \or + % Western: + \bengali@bengali@numeralsfalse% + \bengali@devanagari@numeralsfalse% + \fi + \xpg@info{Option: Bengali, numerals=\val}% +}{\xpg@warning{Unknown Bengali numeral `#1'}} \def\extras@bengali{} \def\noextras@bengali{} -\define@boolkey{bengali}[bengali@]{changecounternumbering}{ - \def\@tmpa{#1} - \def\@tmptrue{true} - \ifx\@tmpa\@tmptrue - \def\extras@bengali{% - % FIXME Tied to the article class! And horrible coding style - \let\savethepage\thepage - \let\savethesection\thesection - \let\savethesubsection\thesubsection - \let\savethesubsubsection\thesubsubsection - \let\savetheparagraph\theparagraph - \let\savethesubparagraph\thesubparagraph - \def\thepage{\bengalinumeral{page}} - \def\thesection{\bengalinumeral{section}} - \def\thesubsection{\bengalinumeral{subsection}} - \def\thesubsubsection{\bengalinumeral{subsubsection}} - \def\theparagraph{\bengalinumeral{paragraph}} - \def\thesubparagraph{\bengalinumeral{subparagraph}} - } - \def\noextras@bengali{% - \let\thepage\savethepage - \let\thesection\savethesection - \let\thesubsection\savethesubsection - \let\thesubsubsection\savethesubsubsection - \let\theparagraph\savetheparagraph - \let\thesubparagraph\savethesubparagraph - } - \fi -} +\define@boolkey{bengali}[bengali@]{changecounternumbering}[true]{} + +% Register default options +\xpg@initialize@gloss@options{bengali}{changecounternumbering=false,numerals=Devanagari} \def\captionsbengali{% \def\refname{তথ্যসূত্রসমূহ}% @@ -3355,13 +4300,19 @@ and may look very wrong.} \else % Assumed Western \number#1% \fi - \fi} + \fi% +} -\def\bengalinumeral#1{\expandafter\bengalinumber\expandafter{\the##1}}% Takes counter +% Backwards compatibility. This command was never documented, but +% some people might use it nevertheless (see #381). +% This takes a counter. +\newcommand\bengalinumeral[1]{\localnumeral*[lang=bengali]{#1}} \def\bengali@globalnumbers{% - \let\@arabic\bengalinumber% - \renewcommand\thefootnote{\localnumeral*{footnote}}% + \ifbengali@changecounternumbering + \let\@arabic\bengalinumber% + \renewcommand\thefootnote{\localnumeral*{footnote}}% + \fi } % Store original definition @@ -3377,6 +4328,51 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-bengali.ldf> +%<*gloss-bg.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-bg.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-bg.ldf}[polyglossia: module for bg (bulgarian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{bulgarian} + +% \end{macrocode} +% \iffalse +%</gloss-bg.ldf> +%<*gloss-bn.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-bn.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-bn.ldf}[polyglossia: module for bn (bengali)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{bengali} + +% \end{macrocode} +% \iffalse +%</gloss-bn.ldf> +%<*gloss-bo.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-bo.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-bo.ldf}[polyglossia: module for bo (tibetan)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{tibetan} + +% \end{macrocode} +% \iffalse +%</gloss-bo.ldf> %<*gloss-bosnian.ldf> % \fi % \clearpage @@ -3386,6 +4382,7 @@ and may look very wrong.} \ProvidesFile{gloss-bosnian.ldf}[polyglossia: module for bosnian] \PolyglossiaSetup{bosnian}{ + bcp47=bs, langtag=BOS, hyphennames={bosnian,croatian}, hyphenmins={2,2}, % adapted from gloss-croatian @@ -3394,6 +4391,9 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{bosnian}{bs} + % TODO: Add script=Cyrillic % from babel-bosnian @@ -3431,6 +4431,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-bosnian.ldf> +%<*gloss-br.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-br.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-br.ldf}[polyglossia: module for br (breton)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{breton} + +% \end{macrocode} +% \iffalse +%</gloss-br.ldf> %<*gloss-brazil.ldf> % \fi % \clearpage @@ -3456,6 +4471,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-breton.ldf}[polyglossia: module for breton] \PolyglossiaSetup{breton}{ + bcp47=br, hyphennames={breton}, hyphenmins={2,2}, langtag=BRE, @@ -3464,6 +4480,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{breton}{br} + \ifluatex % TODO \else @@ -3553,7 +4572,7 @@ and may look very wrong.} % % \subsection{gloss-british.ldf} % \begin{macrocode} -\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for british english] +\ProvidesFile{gloss-british.ldf}[polyglossia: module for british english] % We provide this as a babel alias @@ -3562,6 +4581,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-british.ldf> +%<*gloss-bs.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-bs.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-bs.ldf}[polyglossia: module for bs (bosnian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{bosnian} + +% \end{macrocode} +% \iffalse +%</gloss-bs.ldf> %<*gloss-bulgarian.ldf> % \fi % \clearpage @@ -3570,6 +4604,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-bulgarian.ldf}[polyglossia: module for bulgarian] \PolyglossiaSetup{bulgarian}{ + bcp47=bg, script=Cyrillic, scripttag=cyrl, langtag=BGR, @@ -3580,6 +4615,9 @@ and may look very wrong.} %TODO localalph=bulgarian@alph } +% BCP-47 compliant aliases +\setlanguagealias*{bulgarian}{bg} + \def\bulgarian@Alph#1{% \ifcase#1\or А\or Б\or В\or Г\or Д\or Е\or Ж\or @@ -3654,6 +4692,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-bulgarian.ldf> +%<*gloss-ca.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ca.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ca.ldf}[polyglossia: module for ca (catalan)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{catalan} + +% \end{macrocode} +% \iffalse +%</gloss-ca.ldf> %<*gloss-canadian.ldf> % \fi % \clearpage @@ -3675,7 +4728,7 @@ and may look very wrong.} % % \subsection{gloss-canadien.ldf} % \begin{macrocode} -\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for canadian french] +\ProvidesFile{gloss-canadien.ldf}[polyglossia: module for canadian french] % We provide this as a babel alias @@ -3692,6 +4745,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan] \PolyglossiaSetup{catalan}{ + bcp47=ca, hyphennames={catalan}, hyphenmins={2,2}, langtag=CAT, @@ -3700,6 +4754,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{catalan}{ca} + \define@boolkey{catalan}[catalan@]{babelshorthands}[true]{} \ifsystem@babelshorthands \setkeys{catalan}{babelshorthands=true} @@ -3707,6 +4764,9 @@ and may look very wrong.} \setkeys{catalan}{babelshorthands=false} \fi +% Register default options +\xpg@initialize@gloss@options{catalan}{babelshorthands=false} + \ifcsundef{initiate@active@char}{% \input{babelsh.def}% \initiate@active@char{"}% @@ -3715,33 +4775,21 @@ and may look very wrong.} %%% adapted from Babel's catalan.ldf \newdimen\leftllkern \newdimen\rightllkern \newdimen\raiselldim + % we check if char · exists, and use it instead of raised dot: \def\xpg@raiseddot{% - \ifluatex % - \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\hbox{\char"00B7}% - \else\raise\raiselldim\hbox{.}% - \fi % - \else % - \ifnum\XeTeXcharglyph"00B7 > 0\hbox{\char"00B7}% why a hbox here? - \else\raise\raiselldim\hbox{.}% - \fi % - \fi % - } + \charifavailable{00B7}{\raise\raiselldim\hbox{.}}% +} + \def\lgem{% \ifmmode \csname normal@char\string"\endcsname l% \else \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt% \setbox0\hbox{l}\setbox1\hbox{l\/}% - \ifluatex % - \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\setbox2\hbox{\char"00B7}% - \else\setbox2\hbox{.}% - \fi % - \else % - \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}% - \else\setbox2\hbox{.}% - \fi % - \fi % + \xpg@if@char@available{00B7}% + {\setbox2\hbox{\char"00B7}}% + {\setbox2\hbox{.}}% \advance\raiselldim by \the\fontdimen5\the\font \advance\raiselldim by -\ht2% \leftllkern=-.25\wd0% @@ -3755,21 +4803,16 @@ and may look very wrong.} \kern\rightllkern\hbox{l}}\allowhyphens \fi } + \def\Lgem{% \ifmmode \csname normal@char\string"\endcsname L% \else \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt% \setbox0\hbox{L}\setbox1\hbox{L\/}% - \ifluatex % - \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\setbox2\hbox{\char"00B7}% - \else\setbox2\hbox{.}% - \fi % - \else % - \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}% - \else\setbox2\hbox{.}% - \fi % - \fi % + \xpg@if@char@available{00B7}% + {\setbox2\hbox{\char"00B7}}% + {\setbox2\hbox{.}}% \advance\raiselldim by .5\ht0% \advance\raiselldim by -.5\ht2% \leftllkern=-.125\wd0% @@ -3784,6 +4827,7 @@ and may look very wrong.} \kern\rightllkern\hbox{L}}\allowhyphens \fi } + \AtBeginDocument{% \let\lslash\l \let\Lslash\L @@ -3848,6 +4892,66 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-catalan.ldf> +%<*gloss-ckb-Arab.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ckb-Arab.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ckb-Arab.ldf}[polyglossia: module for ckb-Arab (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-ckb-Arab.ldf> +%<*gloss-ckb-Latn.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ckb-Latn.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ckb-Latn.ldf}[polyglossia: module for ckb-Latn (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-ckb-Latn.ldf> +%<*gloss-ckb.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ckb.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ckb.ldf}[polyglossia: module for ckb (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-ckb.ldf> +%<*gloss-cop.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-cop.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-cop.ldf}[polyglossia: module for cop (coptic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{coptic} + +% \end{macrocode} +% \iffalse +%</gloss-cop.ldf> %<*gloss-coptic.ldf> % \fi % \clearpage @@ -3856,6 +4960,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-coptic.ldf}[polyglossia: module for coptic] \PolyglossiaSetup{coptic}{ + bcp47=cop, script=Coptic, scripttag=copt, langtag=COP, @@ -3864,6 +4969,9 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{coptic}{cop} + %\def\captionscoptic{% % \def\refname{<++>}% % \def\abstractname{<++>}% @@ -3903,6 +5011,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-croatian.ldf}[polyglossia: module for croatian] \PolyglossiaSetup{croatian}{ + bcp47=hr, langtag=HRV, hyphennames={croatian}, hyphenmins={2,2}, % aligned with https://ctan.org/pkg/hrhyph patterns and http://lebesgue.math.hr/~nenad/Diplomski/Maja_Ribaric_2011.pdf @@ -3911,12 +5020,134 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{croatian}{hr} + +\define@boolkey{croatian}[croatian@]{babelshorthands}[true]{} + +\define@boolkey{croatian}[croatian@]{disableligatures}[true]{} + +% Register default options +\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disableligatures=false} + +\ifsystem@babelshorthands + \setkeys{croatian}{babelshorthands=true} +\else + \setkeys{croatian}{babelshorthands=false} +\fi + +\ifcsundef{initiate@active@char}{% + \input{babelsh.def}% + \initiate@active@char{"}% + \shorthandoff{"}% +}{} + +\def\croatian@shorthands{% + \bbl@activate{"}% + \def\language@group{croatian}% + \declare@shorthand{croatian}{"=}{\penalty\@M-\hskip\z@skip}% + \declare@shorthand{croatian}{""}{\hskip\z@skip}% + \declare@shorthand{croatian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}% + \declare@shorthand{croatian}{"-}{\nobreak\-\bbl@allowhyphens}% + \declare@shorthand{croatian}{"|}{% + \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}% + \bbl@allowhyphens}{}% + }% + \declare@shorthand{croatian}{"/}{\textormath + {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}}% + \declare@shorthand{croatian}{"`}{„}% + \declare@shorthand{croatian}{"'}{”}% + \declare@shorthand{croatian}{"<}{«}% + \declare@shorthand{croatian}{">}{»}% + \declare@shorthand{croatian}{"D}{\xpg@hr@lig{D}}% + \declare@shorthand{croatian}{"d}{\xpg@hr@lig{d}}% + \declare@shorthand{croatian}{"L}{\xpg@hr@lig{L}}% + \declare@shorthand{croatian}{"l}{\xpg@hr@lig{l}}% + \declare@shorthand{croatian}{"N}{\xpg@hr@lig{N}}% + \declare@shorthand{croatian}{"n}{\xpg@hr@lig{n}}% +} + +\def\nocroatian@shorthands{% + \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}% +} + +\newcommand*\hr@charifavailable[2]{% + \ifcroatian@disableligatures + \bgroup#2\egroup% + \else + \charifavailable{#1}{#2}% + \fi% +} + +% Provide croatian ligatures if available in current font +\def\xpg@hr@lig#1#2{% + \bgroup% + % 1. DŽ, Dž and dž + \ifx#1D% + \ifx#2Z\relax% + \hr@charifavailable{01C4}{DŽ}% + \else% + \ifx#2z\relax + \hr@charifavailable{01C5}{Dž}% + \else + D#2% + \fi% + \fi% + \fi% + \ifx#1d% + \ifx#2z\relax + \hr@charifavailable{01C6}{dž}% + \else + d#2% + \fi% + \fi% + % 2. LJ, Lj and lj + \ifx#1L% + \ifx#2J\relax% + \hr@charifavailable{01C7}{LJ}% + \else% + \ifx#2j\relax + \hr@charifavailable{01C8}{Lj}% + \else + L#2% + \fi% + \fi% + \fi% + \ifx#1l% + \ifx#2j\relax + \hr@charifavailable{01C9}{lj}% + \else + l#2% + \fi% + \fi% + % 2. NJ, Nj and nj + \ifx#1N% + \ifx#2J\relax% + \hr@charifavailable{01CA}{NJ}% + \else% + \ifx#2j\relax + \hr@charifavailable{01CB}{Nj}% + \else + N#2% + \fi% + \fi% + \fi% + \ifx#1n% + \ifx#2j\relax + \hr@charifavailable{01CC}{nj}% + \else + n#2% + \fi% + \fi% + \egroup% +} + \def\captionscroatian{% \def\prefacename{Predgovor}% \def\refname{Literatura}% \def\abstractname{Sažetak}% \def\bibname{Bibliografija}% - \def\chaptername{Poglavlje}% + \def\chaptername{Poglav\hr@charifavailable{01C9}{lj}e}% \def\appendixname{Dodatak}% \def\contentsname{Sadržaj}% \def\listfigurename{Popis slika}% @@ -3934,15 +5165,59 @@ and may look very wrong.} \def\proofname{Dokaz}% \def\glossaryname{Pojmovnik}% } + \def\datecroatian{% \def\today{\number\day.~\ifcase\month\or siječnja\or veljače\or ožujka\or travnja\or svibnja\or lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenoga\or - prosinca\fi \space \number\year.}} + prosinca\fi \space \number\year.}% +} + +\def\noextras@croatian{% + \nocroatian@shorthands% +} + +\def\blockextras@croatian{% + \ifcroatian@babelshorthands\croatian@shorthands\fi% +} + +\def\inlineextras@croatian{% + \ifcroatian@babelshorthands\croatian@shorthands\fi% +} % \end{macrocode} % \iffalse %</gloss-croatian.ldf> +%<*gloss-cy.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-cy.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-cy.ldf}[polyglossia: module for cy (welsh)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{welsh} + +% \end{macrocode} +% \iffalse +%</gloss-cy.ldf> +%<*gloss-cz.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-cz.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-cz.ldf}[polyglossia: module for cz (czech)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{czech} + +% \end{macrocode} +% \iffalse +%</gloss-cz.ldf> %<*gloss-czech.ldf> % \fi % \clearpage @@ -3952,6 +5227,7 @@ and may look very wrong.} \ProvidesFile{gloss-czech.ldf}[polyglossia: module for czech] \PolyglossiaSetup{czech}{ + bcp47=cz, hyphennames={czech}, hyphenmins={2,2}, langtag=CSY, @@ -3959,6 +5235,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{czech}{cz} + \ifluatex \RequirePackage{luavlna} \fi @@ -3969,7 +5248,8 @@ and may look very wrong.} \define@boolkey{czech}[czech@]{vlna}[true]{} -\setkeys{czech}{splithyphens,vlna} +% Register default options +\xpg@initialize@gloss@options{czech}{babelshorthands=false,splithyphens=true,vlna=true} \ifsystem@babelshorthands \setkeys{czech}{babelshorthands=true} @@ -3984,8 +5264,12 @@ and may look very wrong.} }{} \def\cs@@splithyphen#1{% - \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}% - \nobreak\hskip\z@% + \ifnum\hyphenchar \font>0% + \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}% + \nobreak\hskip\z@% + \else% + #1% + \fi% } \def\cs@splithyphen{% @@ -4163,18 +5447,33 @@ and may look very wrong.} \def\blockextras@czech{% \ifczech@babelshorthands\czech@shorthands\fi% \ifczech@vlna\czech@vlna\else\noczech@vlna\fi% - \ifczech@splithyphens\czech@hyphens\else\noczech@hyhens\fi% + \ifczech@splithyphens\czech@hyphens\else\noczech@hyphens\fi% } \def\inlineextras@czech{% \ifczech@babelshorthands\czech@shorthands\fi% \ifczech@vlna\czech@vlna\else\noczech@vlna\fi% - \ifczech@splithyphens\czech@hyphens\else\noczech@hyhens\fi% + \ifczech@splithyphens\czech@hyphens\else\noczech@hyphens\fi% } % \end{macrocode} % \iffalse %</gloss-czech.ldf> +%<*gloss-da.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-da.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-da.ldf}[polyglossia: module for da (danish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{danish} + +% \end{macrocode} +% \iffalse +%</gloss-da.ldf> %<*gloss-danish.ldf> % \fi % \clearpage @@ -4183,6 +5482,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-danish.ldf}[polyglossia: module for danish] \PolyglossiaSetup{danish}{ + bcp47=da, hyphennames={danish}, hyphenmins={2,3}, langtag=DAN, @@ -4190,6 +5490,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{danish}{da} + \def\captionsdanish{% \def\prefacename{Forord}% \def\refname{Litteratur}% @@ -4223,6 +5526,306 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-danish.ldf> +%<*gloss-de-AT-1901.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-AT-1901.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-AT-1901.ldf}[polyglossia: module for de-AT-1901 (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-AT-1901.ldf> +%<*gloss-de-AT-1996.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-AT-1996.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-AT-1996.ldf}[polyglossia: module for de-AT-1996 (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-AT-1996.ldf> +%<*gloss-de-AT.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-AT.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-AT.ldf}[polyglossia: module for de-AT (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-AT.ldf> +%<*gloss-de-CH-1901.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-CH-1901.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-CH-1901.ldf}[polyglossia: module for de-CH-1901 (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-CH-1901.ldf> +%<*gloss-de-CH-1996.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-CH-1996.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-CH-1996.ldf}[polyglossia: module for de-CH-1996 (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-CH-1996.ldf> +%<*gloss-de-CH.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-CH.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-CH.ldf}[polyglossia: module for de-CH (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-CH.ldf> +%<*gloss-de-DE-1901.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-DE-1901.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-DE-1901.ldf}[polyglossia: module for de-DE-1901 (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-DE-1901.ldf> +%<*gloss-de-DE-1996.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-DE-1996.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-DE-1996.ldf}[polyglossia: module for de-DE-1996 (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-DE-1996.ldf> +%<*gloss-de-DE.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-DE.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-DE.ldf}[polyglossia: module for de-DE (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-DE.ldf> +%<*gloss-de-Latf-AT-1901.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-AT-1901.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-AT-1901-Latf.ldf}[polyglossia: module for de-AT-1901-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-AT-1901.ldf> +%<*gloss-de-Latf-AT-1996.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-AT-1996.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-AT-1996-Latf.ldf}[polyglossia: module for de-AT-1996-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-AT-1996.ldf> +%<*gloss-de-Latf-AT.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-AT.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-AT-Latf.ldf}[polyglossia: module for de-AT-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-AT.ldf> +%<*gloss-de-Latf-CH-1901.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-CH-1901.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-CH-1901-Latf.ldf}[polyglossia: module for de-CH-1901-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-CH-1901.ldf> +%<*gloss-de-Latf-CH-1996.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-CH-1996.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-CH-1996-Latf.ldf}[polyglossia: module for de-CH-1996-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-CH-1996.ldf> +%<*gloss-de-Latf-CH.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-CH.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-CH-Latf.ldf}[polyglossia: module for de-CH-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-CH.ldf> +%<*gloss-de-Latf-DE-1901.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-DE-1901.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-DE-1901-Latf.ldf}[polyglossia: module for de-DE-1901-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-DE-1901.ldf> +%<*gloss-de-Latf-DE-1996.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-DE-1996.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-DE-1996-Latf.ldf}[polyglossia: module for de-DE-1996-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-DE-1996.ldf> +%<*gloss-de-Latf-DE.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf-DE.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-DE-Latf.ldf}[polyglossia: module for de-DE-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf-DE.ldf> +%<*gloss-de-Latf.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de-Latf.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de-Latf.ldf}[polyglossia: module for de-Latf (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de-Latf.ldf> +%<*gloss-de.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-de.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-de.ldf}[polyglossia: module for de (german)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{german} + +% \end{macrocode} +% \iffalse +%</gloss-de.ldf> %<*gloss-divehi.ldf> % \fi % \clearpage @@ -4238,6 +5841,7 @@ and may look very wrong.} \fi \RequireBidi \PolyglossiaSetup{divehi}{ + bcp47=dv, script=Thaana, scripttag=thaa, langtag=DIV,% TODO Support DHV as well? @@ -4246,6 +5850,9 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{divehi}{dv} + %\def\captionsdivehi{% % \def\refname{<++>}% % \def\abstractname{<++>}% @@ -4287,6 +5894,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-divehi.ldf> +%<*gloss-dsb.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-dsb.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-dsb.ldf}[polyglossia: module for dsb (sorbian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{sorbian} + +% \end{macrocode} +% \iffalse +%</gloss-dsb.ldf> %<*gloss-dutch.ldf> % \fi % \clearpage @@ -4295,6 +5917,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-dutch.ldf}[polyglossia: module for dutch] \PolyglossiaSetup{dutch}{ + bcp47=nl, hyphennames={dutch}, hyphenmins={2,2}, langtag=NLD, @@ -4302,8 +5925,14 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{dutch}{nl} + \define@boolkey{dutch}[dutch@]{babelshorthands}[true]{} +% Register default options +\xpg@initialize@gloss@options{dutch}{babelshorthands=false} + \ifsystem@babelshorthands \setkeys{dutch}{babelshorthands=true} \else @@ -4381,6 +6010,156 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-dutch.ldf> +%<*gloss-dv.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-dv.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-dv.ldf}[polyglossia: module for dv (divehi)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{divehi} + +% \end{macrocode} +% \iffalse +%</gloss-dv.ldf> +%<*gloss-el-monoton.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-el-monoton.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-el-monoton.ldf}[polyglossia: module for el-monoton (greek)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{greek} + +% \end{macrocode} +% \iffalse +%</gloss-el-monoton.ldf> +%<*gloss-el-polyton.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-el-polyton.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-el-polyton.ldf}[polyglossia: module for el-polyton (greek)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{greek} + +% \end{macrocode} +% \iffalse +%</gloss-el-polyton.ldf> +%<*gloss-el.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-el.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-el.ldf}[polyglossia: module for el (greek)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{greek} + +% \end{macrocode} +% \iffalse +%</gloss-el.ldf> +%<*gloss-en-AU.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-en-AU.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-en-AU.ldf}[polyglossia: module for en-AU (english)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{english} + +% \end{macrocode} +% \iffalse +%</gloss-en-AU.ldf> +%<*gloss-en-CA.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-en-CA.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-en-CA.ldf}[polyglossia: module for en-CA (english)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{english} + +% \end{macrocode} +% \iffalse +%</gloss-en-CA.ldf> +%<*gloss-en-GB.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-en-GB.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-en-GB.ldf}[polyglossia: module for en-GB (english)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{english} + +% \end{macrocode} +% \iffalse +%</gloss-en-GB.ldf> +%<*gloss-en-NZ.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-en-NZ.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-en-NZ.ldf}[polyglossia: module for en-NZ (english)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{english} + +% \end{macrocode} +% \iffalse +%</gloss-en-NZ.ldf> +%<*gloss-en-US.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-en-US.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-en-US.ldf}[polyglossia: module for en-US (english)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{english} + +% \end{macrocode} +% \iffalse +%</gloss-en-US.ldf> +%<*gloss-en.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-en.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-en.ldf}[polyglossia: module for en (english)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{english} + +% \end{macrocode} +% \iffalse +%</gloss-en.ldf> %<*gloss-english.ldf> % \fi % \clearpage @@ -4390,12 +6169,21 @@ and may look very wrong.} \ProvidesFile{gloss-english.ldf}[polyglossia: module for english] \PolyglossiaSetup{english}{ + bcp47=en-US, hyphennames={english,american,usenglish,USenglish}, hyphenmins={2,3}, langtag=ENG, fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{english}{en} +\setlanguagealias*[variant=australian]{english}{en-AU} +\setlanguagealias*[variant=newzealand]{english}{en-NZ} +\setlanguagealias*[variant=us]{english}{en-US} +\setlanguagealias*[variant=british]{english}{en-GB} +\setlanguagealias*[variant=canadian]{english}{en-CA} + % Babel aliases \setlanguagealias[variant=us]{english}{american} \setlanguagealias[variant=australian]{english}{australian} @@ -4417,41 +6205,41 @@ and may look very wrong.} % Option ordinalmonthday \define@boolkey{english}[english@]{ordinalmonthday}[true]{} -\define@choicekey*+{english}{variant}[\val\nr]{uk,british,us,american,usmax,australian,newzealand,canadian}{% +\define@choicekey*+{english}{variant}[\val\nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{% \ifcase\nr\relax % uk: \british@hyphentrue \british@dateformattrue \english@ordinalmonthdaytrue - \SetLanguageKeys{english}{babelname=british}% + \SetLanguageKeys{english}{babelname=british,bcp47=en-GB}% \xpg@info{Option: English, variant=british}% \or % british: \british@hyphentrue \british@dateformattrue \english@ordinalmonthdaytrue - \SetLanguageKeys{english}{babelname=british}% + \SetLanguageKeys{english}{babelname=british,bcp47=en-GB}% \xpg@info{Option: english variant=british}% \or % us: \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse - \SetLanguageKeys{english}{babelname=american}% + \SetLanguageKeys{english}{babelname=american,bcp47=en-US}% \xpg@info{Option: English, variant=american}% \or % american: \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse - \SetLanguageKeys{english}{babelname=american}% + \SetLanguageKeys{english}{babelname=american,bcp47=en-US}% \xpg@info{Option: English, variant=american}% \or % usmax: \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse - \SetLanguageKeys{english}{babelname=american}% + \SetLanguageKeys{english}{babelname=american,bcp47=en-US}% \xpg@info{Option: english variant=american (with additional patterns)}% \xpg@ifdefined{usenglishmax}{}% {\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak @@ -4466,8 +6254,9 @@ and may look very wrong.} \british@hyphentrue \british@dateformattrue \english@ordinalmonthdayfalse - \SetLanguageKeys{english}{babelname=australian}% + \SetLanguageKeys{english}{babelname=australian,bcp47=en-AU}% \xpg@info{Option: English, variant=australian}% + \adddialect\l@australian\l@english% \or % newzealand: % These use the british hyphenation patterns @@ -4475,16 +6264,18 @@ and may look very wrong.} \british@hyphentrue \british@dateformattrue \english@ordinalmonthdayfalse - \SetLanguageKeys{english}{babelname=newzealand}% + \SetLanguageKeys{english}{babelname=newzealand,bcp47=en-NZ}% \xpg@info{Option: English, variant=newzealand}% + \adddialect\l@newzealand\l@english% \or % canadian: % This is currently equivalent to usenglish (as in babel) \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse - \SetLanguageKeys{english}{babelname=canadian}% + \SetLanguageKeys{english}{babelname=canadian,bcp47=en-CA}% \xpg@info{Option: English, variant=american}% + \adddialect\l@canadian\l@english% \fi \ifbritish@hyphen \xpg@ifdefined{ukenglish}{}% @@ -4496,6 +6287,12 @@ and may look very wrong.} \fi }{\xpg@warning{Unknown English variant `#1'}} +% Register default options +\xpg@initialize@gloss@options{english}{variant=us,ordinalmonthday=false} +% Register alias options +\xpg@set@alias@values{english}{variant}{us}{american} +\xpg@set@alias@values{english}{variant}{uk}{british} + \ifxetex % Check if \l@english is defined. If not, try to set it to some variety % (specific order as in the csv list below), or null language if everything fails @@ -4515,7 +6312,7 @@ and may look very wrong.} \fi \def\english@language{% - \polyglossia@setup@language@patterns{\english@variant} + \polyglossia@setup@language@patterns{\english@variant}% }% \def\captionsenglish{% @@ -4566,6 +6363,66 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-english.ldf> +%<*gloss-eo.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-eo.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-eo.ldf}[polyglossia: module for eo (esperanto)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{esperanto} + +% \end{macrocode} +% \iffalse +%</gloss-eo.ldf> +%<*gloss-es-ES.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-es-ES.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-es-ES.ldf}[polyglossia: module for es-ES (spanish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{spanish} + +% \end{macrocode} +% \iffalse +%</gloss-es-ES.ldf> +%<*gloss-es-MX.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-es-MX.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-es-MX.ldf}[polyglossia: module for es-MX (spanish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{spanish} + +% \end{macrocode} +% \iffalse +%</gloss-es-MX.ldf> +%<*gloss-es.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-es.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-es.ldf}[polyglossia: module for es (spanish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{spanish} + +% \end{macrocode} +% \iffalse +%</gloss-es.ldf> %<*gloss-esperanto.ldf> % \fi % \clearpage @@ -4574,6 +6431,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-esperanto.ldf}[polyglossia: module for esperanto] \PolyglossiaSetup{esperanto}{ + bcp47=eo, hyphennames={esperanto}, hyphenmins={2,2}, langtag=NTO, @@ -4581,6 +6439,9 @@ and may look very wrong.} %TODO localalph={esperanto@alph,esperanto@Alph} } +% BCP-47 compliant aliases +\setlanguagealias*{esperanto}{eo} + \def\captionsesperanto{% \def\refname{Citaĵoj}% \def\abstractname{Resumo}% @@ -4646,6 +6507,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-estonian.ldf}[polyglossia: module for estonian] \PolyglossiaSetup{estonian}{ + bcp47=et, hyphennames={estonian}, hyphenmins={2,2}, langtag=ETI, @@ -4653,6 +6515,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{estonian}{et} + \def\captionsestonian{% \def\refname{Viited}% \def\abstractname{Kokkuvõte}% @@ -4686,6 +6551,51 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-estonian.ldf> +%<*gloss-et.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-et.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-et.ldf}[polyglossia: module for et (estonian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{estonian} + +% \end{macrocode} +% \iffalse +%</gloss-et.ldf> +%<*gloss-eu.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-eu.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-eu.ldf}[polyglossia: module for eu (basque)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{basque} + +% \end{macrocode} +% \iffalse +%</gloss-eu.ldf> +%<*gloss-fa.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fa.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fa.ldf}[polyglossia: module for fa (persian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{persian} + +% \end{macrocode} +% \iffalse +%</gloss-fa.ldf> %<*gloss-farsi.ldf> % \fi % \clearpage @@ -4702,6 +6612,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-farsi.ldf> +%<*gloss-fi.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fi.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fi.ldf}[polyglossia: module for fi (finnish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{finnish} + +% \end{macrocode} +% \iffalse +%</gloss-fi.ldf> %<*gloss-finnish.ldf> % \fi % \clearpage @@ -4710,6 +6635,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-finnish.ldf}[polyglossia: module for finnish] \PolyglossiaSetup{finnish}{ + bcp47=fi, hyphennames={finnish}, hyphenmins={2,2}, langtag=FIN, @@ -4717,8 +6643,14 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{finnish}{fi} + \define@boolkey{finnish}[finnish@]{babelshorthands}[true]{} +% Register default options +\xpg@initialize@gloss@options{finnish}{babelshorthands=false} + \ifsystem@babelshorthands \setkeys{finnish}{babelshorthands=true} \else @@ -4793,6 +6725,66 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-finnish.ldf> +%<*gloss-fr-CA.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fr-CA.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fr-CA.ldf}[polyglossia: module for fr-CA (french)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{french} + +% \end{macrocode} +% \iffalse +%</gloss-fr-CA.ldf> +%<*gloss-fr-CH.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fr-CH.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fr-CH.ldf}[polyglossia: module for fr-CH (french)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{french} + +% \end{macrocode} +% \iffalse +%</gloss-fr-CH.ldf> +%<*gloss-fr-FR.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fr-FR.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fr-FR.ldf}[polyglossia: module for fr-FR (french)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{french} + +% \end{macrocode} +% \iffalse +%</gloss-fr-FR.ldf> +%<*gloss-fr.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fr.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fr.ldf}[polyglossia: module for fr (french)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{french} + +% \end{macrocode} +% \iffalse +%</gloss-fr.ldf> %<*gloss-french.ldf> % \fi % \clearpage @@ -4802,6 +6794,7 @@ and may look very wrong.} \ProvidesFile{gloss-french.ldf}[polyglossia: module for french] \PolyglossiaSetup{french}{% + bcp47=fr-FR, language=French, script=Latin, langtag=FRA, @@ -4811,46 +6804,63 @@ and may look very wrong.} hyphenmins={2,2}, fontsetup=true} +% BCP-47 compliant aliases +\setlanguagealias*{french}{fr} +\setlanguagealias*[variant=french]{french}{fr-FR} +\setlanguagealias*[variant=canadian]{french}{fr-CA} +\setlanguagealias*[variant=swiss]{french}{fr-CH} + % Babel aliases \setlanguagealias[variant=acadian]{french}{acadien} \setlanguagealias[variant=canadian]{french}{canadien} \def\french@variant{french} -\define@choicekey*+{french}{variant}[\val\nr]{french,canadian,acadian}[french]{% +\define@choicekey*+{french}{variant}[\val\nr]{french,canadian,acadian,swiss}[french]{% \ifcase\nr\relax % french: \def\french@variant{french}% + \SetLanguageKeys{french}{babelname=french,bcp47=fr-FR}% + \french@thincolonspacefalse \or % canadian: \def\french@variant{canadien}% - \SetLanguageKeys{french}{babelname=canadien}% + \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA}% \xpg@ifdefined{canadien}{}% {\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak I will use the standard patterns for French instead}% \adddialect\l@canadien\l@french\relax}% + \french@thincolonspacefalse \or % acadian: \def\french@variant{acadian}% - \SetLanguageKeys{french}{babelname=canadien}% + \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA}% \xpg@ifdefined{acadian}{}% {\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak I will use the standard patterns for French instead}% \adddialect\l@acadian\l@french\relax}% + \french@thincolonspacefalse + \or + % swiss: + \def\french@variant{swissfrench}% + \SetLanguageKeys{french}{babelname=french,bcp47=fr-CH}% + \adddialect\l@swissfrench\l@french\relax% + \french@thincolonspacetrue \fi \xpg@info{Option: French, variant=\val}% }{\xpg@warning{Unknown French variant `#1'}} \def\french@language{% - \polyglossia@setup@language@patterns{\french@variant} + \polyglossia@setup@language@patterns{\french@variant}% }% \ifluatex \directlua{require('polyglossia-french')}% \else - \newXeTeXintercharclass\french@openbrackets % ( ] { - \newXeTeXintercharclass\french@closebrackets % ( ] { - \newXeTeXintercharclass\french@punctthin % ! ? ; et autres + \newXeTeXintercharclass\french@openbrackets % ( [ { + \newXeTeXintercharclass\french@closebrackets % ) ] } + \newXeTeXintercharclass\french@questionexclamation % ! ? et autres + \newXeTeXintercharclass\french@punctthin % ; (et :) \newXeTeXintercharclass\french@punctthick % : \newXeTeXintercharclass\french@punctguillstart % « ‹ \newXeTeXintercharclass\french@punctguillend % » › @@ -4863,9 +6873,9 @@ and may look very wrong.} \define@boolkey{french}[french@]{frenchfootnote}[true]{% \AfterPreamble{% - \ifdefstring{\xpg@main@language}{french}{% - \iffrench@frenchfootnote - \ifx\@makefntext\undefined\else + \iffrench@frenchfootnote + \ifdefstring{\xpg@main@language}{french}{% + \ifx\@makefntext\undefined\else \long\def\french@makefntext##1{% \parindent1em \noindent\quad% \ifx\@thefnmark\empty\else% @@ -4873,10 +6883,10 @@ and may look very wrong.} } \let\@makefntext\french@makefntext \fi - \else - \let\@makefntext\xpg@orig@makefntext - \fi - }{\xpg@warning{Option 'frenchfootnote' only supported if French is main language!}}% + }{\xpg@warning{Option 'frenchfootnote' only supported if French is main language!}}% + \else + \let\@makefntext\xpg@orig@makefntext + \fi }% } @@ -4948,19 +6958,28 @@ and may look very wrong.} \define@boolkey{french}[french@]{frenchitemlabels}[true]{% \AfterPreamble{% - \ifdefstring{\xpg@main@language}{french}{% - \iffrench@frenchitemlabels + \iffrench@frenchitemlabels + \ifdefstring{\xpg@main@language}{french}{% \renewcommand{\labelitemi}{\french@itemi}% \renewcommand{\labelitemii}{\french@itemii}% \renewcommand{\labelitemiii}{\french@itemiii}% \renewcommand{\labelitemiv}{\french@itemiv}% - \else - \let\@makefntext\xpg@orig@makefntext - \fi - }{\xpg@warning{Option 'frenchitemlabels' only supported if French is main language!}}% + }{\xpg@warning{Option 'frenchitemlabels' only supported if French is main language!}}% + \else + \let\@makefntext\xpg@orig@makefntext + \fi }% } +% Register default options +\xpg@initialize@gloss@options{french}{variant=french,autospacing=true,thincolonspace=false, + autospaceguillemets=true,autospacetypewriter=false, + frenchfootnote=false,frenchitemlabels=false, + itemlabels=\textemdash,itemlabeli=\textemdash,itemlabelii=\textemdash, + itemlabeliii=\textemdash,itemlabeliv=\textemdash} +% Register alias options +\xpg@set@alias@values{french}{variant}{canadian}{acadian} + \def\french@fontsetup{% \unless\iffrench@autospacetypewriter @@ -4993,12 +7012,13 @@ and may look very wrong.} \fi \else \XeTeXinterchartokenstate=1 - \XeTeXcharclass `\! \french@punctthin - \XeTeXcharclass `\? \french@punctthin - \XeTeXcharclass `\‼ \french@punctthin - \XeTeXcharclass `\⁇ \french@punctthin - \XeTeXcharclass `\⁈ \french@punctthin - \XeTeXcharclass `\⁉ \french@punctthin + \XeTeXcharclass `\! \french@questionexclamation + \XeTeXcharclass `\? \french@questionexclamation + \XeTeXcharclass `\‼ \french@questionexclamation + \XeTeXcharclass `\⁇ \french@questionexclamation + \XeTeXcharclass `\⁈ \french@questionexclamation + \XeTeXcharclass `\⁉ \french@questionexclamation + \XeTeXcharclass `\‽ \french@questionexclamation % U+203D (interrobang) \XeTeXcharclass `\; \french@punctthin \iffrench@thincolonspace \XeTeXcharclass `\: \french@punctthin @@ -5017,26 +7037,35 @@ and may look very wrong.} \XeTeXcharclass `\} \french@closebrackets \XeTeXcharclass `\⟨ \french@openbrackets \XeTeXcharclass `\⟩ \french@closebrackets + \XeTeXinterchartoks \z@ \french@questionexclamation = {\xpg@french@thinsp}% \XeTeXinterchartoks \z@ \french@punctthin = {\xpg@french@thinsp}% \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}% + \XeTeXinterchartoks \xpg@boundaryclass \french@questionexclamation = {\xpg@unskip\xpg@french@thinsp}% \XeTeXinterchartoks \xpg@boundaryclass \french@punctthin = {\xpg@unskip\xpg@french@thinsp}% \XeTeXinterchartoks \xpg@boundaryclass \french@punctthick = {\xpg@unskip\nobreakspace}% \iffrench@autospaceguillemets \let\xpg@french@guillspace\xpg@french@thinsp% \XeTeXinterchartoks \french@punctguillstart \z@ = {\xpg@french@guillspace}% "«a" -> "«\,a" + \XeTeXinterchartoks \french@punctguillstart \french@punctguillstart = {\xpg@french@guillspace}% "«‹" -> "«\,‹" % \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged? % \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged? \XeTeXinterchartoks \z@ \french@punctguillend = {\xpg@french@guillspace}% "a»" -> "a\,»" \XeTeXinterchartoks \french@punctguillstart \xpg@boundaryclass = {\xpg@french@guillspace\ignorespaces}% "« " -> "«\," \XeTeXinterchartoks \xpg@boundaryclass \french@punctguillend = {\xpg@unskip\xpg@french@guillspace}% " »" -> "\,»" \XeTeXinterchartoks \french@closebrackets \french@punctguillend = {\xpg@french@guillspace}% ")»" -> ")\,»" + \XeTeXinterchartoks \french@questionexclamation \french@punctguillend = {\xpg@french@guillspace}% "?»" -> "?\,»" + \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\xpg@french@guillspace}% ";»" -> ";\,»" + \XeTeXinterchartoks \french@punctguillend \french@punctguillend = {\xpg@french@guillspace}% "›»" -> "›\,»" \else \def\xpg@french@guillspace{}% \fi + \XeTeXinterchartoks \french@punctguillend \french@questionexclamation = {\xpg@french@thinsp}% "»?" -> "»\,?" \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\xpg@french@thinsp}% "»;" -> "»\,;" \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :" - \XeTeXinterchartoks \french@punctthin \french@punctguillend = {\xpg@french@thinsp}% "?»" -> "?\,»" - \XeTeXinterchartoks \french@openbrackets \french@punctthin = {\xpg@unskip}% "(?" -> "(?" and not "( ?" + \XeTeXinterchartoks \french@questionexclamation \french@punctthin = {\xpg@french@thinsp}% "?;" -> "?\,;" + \XeTeXinterchartoks \french@questionexclamation \french@punctthick = {\xpg@french@thinsp}% "?:" -> "?\,:" + \XeTeXinterchartoks \french@openbrackets \french@questionexclamation = {\xpg@unskip}% "(?" -> "(?" and not "( ?" + \XeTeXinterchartoks \french@openbrackets \french@punctthin = {\xpg@unskip}% "(;" -> "(;" and not "( ;" \XeTeXinterchartoks \french@punctthin \french@closebrackets = {\xpg@unskip}% "?)" -> "?)" (code not need, just for symetry with previous one) \XeTeXinterchartoks \french@closebrackets \french@punctthin = {\xpg@french@thinsp}% ")?" -> ")\,?" \XeTeXinterchartoks \french@closebrackets \french@punctthick = {\nobreakspace}% "):" -> ") :" @@ -5054,6 +7083,7 @@ and may look very wrong.} \XeTeXcharclass `\⁇ \z@ \XeTeXcharclass `\⁈ \z@ \XeTeXcharclass `\⁉ \z@ + \XeTeXcharclass `\‽ \z@ \XeTeXcharclass `\; \z@ \XeTeXcharclass `\: \z@ \XeTeXcharclass `\« \z@ @@ -5184,6 +7214,7 @@ and may look very wrong.} \ProvidesFile{gloss-friulian.ldf}[polyglossia: module for friulian] \PolyglossiaSetup{friulian}{% + bcp47=fur, language=Friulian, babelname=friulan, hyphennames={friulan,furlan}, @@ -5194,6 +7225,9 @@ and may look very wrong.} frenchspacing=true, } +% BCP-47 compliant aliases +\setlanguagealias*{friulian}{fur} + % Babel and backwards compat. alias \setlanguagealias{friulian}{friulan} @@ -5253,6 +7287,36 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-friulian.ldf> +%<*gloss-fur.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-fur.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-fur.ldf}[polyglossia: module for fur (friulian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{friulian} + +% \end{macrocode} +% \iffalse +%</gloss-fur.ldf> +%<*gloss-ga.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ga.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ga.ldf}[polyglossia: module for ga (gaelic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{gaelic} + +% \end{macrocode} +% \iffalse +%</gloss-ga.ldf> %<*gloss-gaelic.ldf> % \fi % \clearpage @@ -5262,6 +7326,7 @@ and may look very wrong.} \ProvidesFile{gloss-gaelic.ldf}[polyglossia: module for gaelic] \PolyglossiaSetup{gaelic}{ + bcp47=ga, language=Irish, babelname=irish, hyphennames={irish}, @@ -5270,6 +7335,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*[variant=irish]{gaelic}{ga} +\setlanguagealias*[variant=scottish]{gaelic}{gd} % Babel aliases \setlanguagealias[variant=irish]{gaelic}{irish} \setlanguagealias[variant=scottish]{gaelic}{scottish} @@ -5279,17 +7347,20 @@ and may look very wrong.} \ifcase\nr\relax % irish: \gdef\gaelic@variant{irish}% - \SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish}% + \SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish,bcp47=ga}% \xpg@fontsetup@latin{gaelic}% \or % scottish: \gdef\gaelic@variant{scottish}% - \SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish}% + \SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish,bcp47=gd}% \xpg@fontsetup@latin{gaelic}% \fi \xpg@info{Option: gaelic, variant=\val}% }{\xpg@warning{Unknown gaelic variant `#1'}} +% Register default options +\xpg@initialize@gloss@options{gaelic}{variant=irish} + \def\captionsgaelic@irish{% \def\refname{Tagairtí}% \def\abstractname{Achoimre}% @@ -5380,6 +7451,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-galician.ldf}[polyglossia: module for galician] \PolyglossiaSetup{galician}{ + bcp47=gl, hyphennames={galician}, hyphenmins={2,2}, langtag=GAL, @@ -5387,6 +7459,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{galician}{gl} + \def\captionsgalician{% \def\refname{Referencias}% \def\abstractname{Resumo}% @@ -5420,6 +7495,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-galician.ldf> +%<*gloss-gd.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-gd.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-gd.ldf}[polyglossia: module for gd (gaelic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{gaelic} + +% \end{macrocode} +% \iffalse +%</gloss-gd.ldf> %<*gloss-georgian.ldf> % \fi % \clearpage @@ -5429,6 +7519,7 @@ and may look very wrong.} \ProvidesFile{gloss-georgian.ldf}[polyglossia: module for georgian] \PolyglossiaSetup{georgian}{ + bcp47=ka, script=Georgian, scripttag=geor, langtag=KAT, @@ -5437,6 +7528,9 @@ and may look very wrong.} localnumeral=georgiannumerals } +% BCP-47 compliant aliases +\setlanguagealias*{georgian}{ka} + \newif\ifgeorgian@numerals \define@key{georgian}{numerals}[arabic]{% \ifstrequal{#1}{georgian}% @@ -5448,6 +7542,9 @@ and may look very wrong.} \define@boolkey{georgian}[georgian@]{oldmonthnames}[true]{} +% Register default options +\xpg@initialize@gloss@options{georgian}{babelshorthands=false,oldmonthnames=false,numerals=arabic} + \ifsystem@babelshorthands \setkeys{georgian}{babelshorthands=true} \else @@ -5662,6 +7759,7 @@ and may look very wrong.} \ProvidesFile{gloss-german.ldf}[polyglossia: module for german] \PolyglossiaSetup{german}{ + bcp47=de-DE, hyphenmins={2,2}, frenchspacing=true, fontsetup=true, @@ -5669,6 +7767,28 @@ and may look very wrong.} babelname=ngerman } +% BCP-47 compliant aliases +\setlanguagealias*{german}{de} +\setlanguagealias*[variant=swiss,spelling=new]{german}{de-CH} +\setlanguagealias*[variant=austrian,spelling=new]{german}{de-AT} +\setlanguagealias*[variant=german,spelling=new]{german}{de-DE} +\setlanguagealias*[variant=swiss,spelling=new,script=blackletter]{german}{de-Latf-CH} +\setlanguagealias*[variant=german,spelling=new,script=blackletter]{german}{de-Latf-DE} +\setlanguagealias*[variant=austrian,spelling=new,script=blackletter]{german}{de-Latf-AT} +\setlanguagealias*[variant=austrian,spelling=old]{german}{de-AT-1901} +\setlanguagealias*[variant=swiss,spelling=new]{german}{de-CH-1996} +\setlanguagealias*[variant=austrian,spelling=new]{german}{de-AT-1996} +\setlanguagealias*[variant=german,spelling=old]{german}{de-DE-1901} +\setlanguagealias*[variant=swiss,spelling=old,script=blackletter]{german}{de-Latf-CH-1901} +\setlanguagealias*[variant=swiss,spelling=old]{german}{de-CH-1901} +\setlanguagealias*[variant=austrian,spelling=old,script=blackletter]{german}{de-Latf-AT-1901} +\setlanguagealias*[variant=swiss,spelling=new,script=blackletter]{german}{de-Latf-CH-1996} +\setlanguagealias*[script=blackletter]{german}{de-Latf} +\setlanguagealias*[variant=german,spelling=new]{german}{de-DE-1996} +\setlanguagealias*[variant=german,spelling=old,script=blackletter]{german}{de-Latf-DE-1901} +\setlanguagealias*[variant=german,spelling=new,script=blackletter]{german}{de-Latf-DE-1996} +\setlanguagealias*[variant=austrian,spelling=new,script=blackletter]{german}{de-Latf-AT-1996} + % Babel aliases \setlanguagealias[variant=austrian,spelling=old]{german}{austrian} \setlanguagealias[variant=austrian,spelling=new]{german}{naustrian} @@ -5679,7 +7799,7 @@ and may look very wrong.} \newif\if@german@oldspelling \@german@oldspellingfalse -\define@choicekey*+{german}{spelling}[\val\nr]{new,old,1901}[new]{% +\define@choicekey*+{german}{spelling}[\val\nr]{new,old,1901,1996}[new]{% \ifcase\nr\relax % new: \@german@oldspellingfalse @@ -5689,6 +7809,9 @@ and may look very wrong.} \or % 1901: \@german@oldspellingtrue + \or + % 1996: + \@german@oldspellingfalse \fi \german@set@babelname% \xpg@info{Option: German, spelling=\val}% @@ -5725,21 +7848,45 @@ and may look very wrong.} \def\german@set@babelname{% \if@german@oldspelling \if@swiss@locale - \SetLanguageKeys{german}{babelname=swissgerman}% + \if@german@blackletter + \SetLanguageKeys{german}{babelname=swissgerman,bcp47=de-Latf-CH-1901}% + \else + \SetLanguageKeys{german}{babelname=swissgerman,bcp47=de-CH-1901}% + \fi \else \if@austrian@locale - \SetLanguageKeys{german}{babelname=austrian}% + \if@german@blackletter + \SetLanguageKeys{german}{babelname=austrian,bcp47=de-Latf-AT-1901}% + \else + \SetLanguageKeys{german}{babelname=austrian,bcp47=de-AT-1901}% + \fi \else - \SetLanguageKeys{german}{babelname=german}% + \if@german@blackletter + \SetLanguageKeys{german}{babelname=german,bcp47=de-Latf-DE-1901}% + \else + \SetLanguageKeys{german}{babelname=german,bcp47=de-DE-1901}% + \fi \fi\fi \else \if@swiss@locale - \SetLanguageKeys{german}{babelname=nswissgerman}% + \if@german@blackletter + \SetLanguageKeys{german}{babelname=nswissgerman,bcp47=de-Latf-CH}% + \else + \SetLanguageKeys{german}{babelname=nswissgerman,bcp47=de-CH}% + \fi \else \if@austrian@locale - \SetLanguageKeys{german}{babelname=naustrian}% + \if@german@blackletter + \SetLanguageKeys{german}{babelname=naustrian,bcp47=de-Latf-AT}% + \else + \SetLanguageKeys{german}{babelname=naustrian,bcp47=de-AT}% + \fi \else - \SetLanguageKeys{german}{babelname=ngerman}% + \if@german@blackletter + \SetLanguageKeys{german}{babelname=ngerman,bcp47=de-Latf-DE}% + \else + \SetLanguageKeys{german}{babelname=ngerman,bcp47=de-DE}% + \fi \fi\fi \fi } @@ -5756,14 +7903,24 @@ and may look very wrong.} % fraktur: \@german@blacklettertrue% \fi + \german@set@babelname% \xpg@info{Option: German, script=\val}% }{\xpg@warning{Unknown German script `#1'}} -\define@boolkey{german}[german@]{latesthyphen}[false]{} +% Option defunc'ed, as bot XeTeX and LuaTeX meanwhile +% use the experimental German hyphenation patterns by default. +\define@boolkey{german}[german@]{latesthyphen}[true]{} \define@boolkey{german}[german@]{babelshorthands}[true]{} -\setkeys{german}{spelling,latesthyphen,script,variant} +\setkeys{german}{spelling,script,variant} + +% Register default options +\xpg@initialize@gloss@options{german}{variant=german,spelling=new,script=latin,latesthyphen=false,babelshorthands=false} +% Register alias options +\xpg@set@alias@values{german}{spelling}{new}{1996} +\xpg@set@alias@values{german}{spelling}{old}{1901} +\xpg@set@alias@values{german}{script}{blackletter}{fraktur} \ifsystem@babelshorthands \setkeys{german}{babelshorthands=true} @@ -5890,26 +8047,23 @@ and may look very wrong.} } \def\german@language{% - \ifgerman@latesthyphen - \if@german@oldspelling - \if@swiss@locale - \polyglossia@setup@language@patterns{swissgerman}% - \else - \polyglossia@setup@language@patterns{german-x-latest}% - \fi - \else - \polyglossia@setup@language@patterns{ngerman-x-latest}% - \fi - \else% (latesthyphen=false) - \if@german@oldspelling - \if@swiss@locale - \polyglossia@setup@language@patterns{swissgerman}% - \else - \polyglossia@setup@language@patterns{german}% - \fi - \else - \polyglossia@setup@language@patterns{ngerman}% - \fi + \if@german@oldspelling + \if@swiss@locale + \polyglossia@setup@language@patterns{swissgerman}% + \else + \polyglossia@setup@language@patterns{german}% + \fi + \if@austrian@locale + \adddialect\l@austrian\l@german% + \fi + \else + \polyglossia@setup@language@patterns{ngerman}% + \if@austrian@locale + \adddialect\l@naustrian\l@ngerman% + \fi + \if@swiss@locale + \adddialect\l@nswissgerman\l@ngerman% + \fi \fi } @@ -5943,6 +8097,36 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-germanb.ldf> +%<*gloss-gl.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-gl.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-gl.ldf}[polyglossia: module for gl (galician)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{galician} + +% \end{macrocode} +% \iffalse +%</gloss-gl.ldf> +%<*gloss-grc.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-grc.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-grc.ldf}[polyglossia: module for grc (greek)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{greek} + +% \end{macrocode} +% \iffalse +%</gloss-grc.ldf> %<*gloss-greek.ldf> % \fi % \clearpage @@ -5952,6 +8136,7 @@ and may look very wrong.} \ProvidesFile{gloss-greek.ldf}[polyglossia: module for greek] \PolyglossiaSetup{greek}{ + bcp47=el-monoton, script=Greek, scripttag=grek, langtag=ELL, @@ -5963,6 +8148,12 @@ and may look very wrong.} %TODO localalph={greek@alph,greek@Alph} } +% BCP-47 compliant aliases +\setlanguagealias*[variant=ancient]{greek}{grc} +\setlanguagealias*[varant=polytonic]{greek}{el-polyton} +\setlanguagealias*[variant=monotonic]{greek}{el-monoton} +\setlanguagealias*{greek}{el} + % Babel aliases \setlanguagealias[variant=polytonic]{greek}{polutonikogreek} @@ -5999,7 +8190,7 @@ and may look very wrong.} \def\greek@variant{polygreek}% \def\captionsgreek{\polygreekcaptions}% \def\dategreek{\datepolygreek}% - \SetLanguageKeys{greek}{babelname=polutonikogreek}% + \SetLanguageKeys{greek}{babelname=polutonikogreek,bcp47=el-polyton}% \xpg@info{Option: Polytonic Greek}% \else \ifx\@tmpa\tmp@ancient @@ -6010,6 +8201,7 @@ and may look very wrong.} \def\greek@variant{ancientgreek}% \def\captionsgreek{\ancientgreekcaptions}% \def\dategreek{\dateancientgreek}% + \SetLanguageKeys{greek}{babelname=greek,bcp47=grc}% \xpg@info{Option: Ancient Greek}% \else %monotonic \xpg@ifdefined{monogreek}{}% @@ -6019,12 +8211,13 @@ and may look very wrong.} \def\greek@variant{monogreek}% monotonic \def\captionsgreek{\monogreekcaptions}% \def\dategreek{\datemonogreek}% + \SetLanguageKeys{greek}{babelname=greek,bcp47=el-monoton}% \xpg@info{Option: Monotonic Greek}% \fi \fi} \def\greek@language{% - \polyglossia@setup@language@patterns{\greek@variant} + \polyglossia@setup@language@patterns{\greek@variant}% } @@ -6035,8 +8228,11 @@ and may look very wrong.} \define@boolkey{greek}{attic}[true]{\xpg@warning{Greek option `attic' is no longer required.}} -% This sets the defaults -\setkeys{greek}{numerals,variant} +% Register default options +\xpg@initialize@gloss@options{greek}{variant=monotonic,numerals=greek} +% Register alias options +\xpg@set@alias@values{greek}{variant}{monotonic}{mono} +\xpg@set@alias@values{greek}{variant}{polytonic}{poly} \def\monogreekcaptions{% \def\refname{Αναφορές}% @@ -6347,6 +8543,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-greek.ldf> +%<*gloss-he.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-he.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-he.ldf}[polyglossia: module for he (hebrew)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{hebrew} + +% \end{macrocode} +% \iffalse +%</gloss-he.ldf> %<*gloss-hebrew.ldf> % \fi % \clearpage @@ -6364,6 +8575,7 @@ and may look very wrong.} \RequirePackage{hebrewcal} \PolyglossiaSetup{hebrew}{ + bcp47=he, script=Hebrew, direction=RL, scripttag=hebr, @@ -6375,6 +8587,9 @@ and may look very wrong.} %digits = hebrewnumber } +% BCP-47 compliant aliases +\setlanguagealias*{hebrew}{he} + \newif\if@calendar@hebrew \def\tmp@hebrew{hebrew} \define@key{hebrew}{calendar}[gregorian]{% @@ -6405,6 +8620,9 @@ and may look very wrong.} \setkeys{hebrew}{numerals} +% Register default options +\xpg@initialize@gloss@options{hebrew}{numerals=arabic,calendar=gregorian,marcheshvan=false} + \def\captionshebrew{% \def\prefacename{מבוא}% \def\refname{מקורות}% @@ -6459,19 +8677,45 @@ and may look very wrong.} \fi } +% Bidi inserts an RTL mark (0x200f) before any number, forcing numbers to +% RTL. Hebrew uses LTR numbers, though. So we insert an LTR mark to revert +% the directionality +\ifxetex + \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\if@nonlatin\char"200E \fi} +\fi + +\def\hebrew@ltr@numbers{% + \ifxetex + \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks} + \fi% +} + +\def\nohebrew@ltr@numbers{% + \ifxetex + % This is bidi's original intervention + \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks} + \fi% +} + \def\hebrew@numbers{% \let\@alph\hebrewnumeral% \let\@Alph\Hebrewnumeral% + % Prevent bidi from setting the numbers RTL + \hebrew@ltr@numbers% } \def\nohebrew@numbers{% \let\@alph\latin@alph% \let\@Alph\latin@Alph% + % Restore previous bidi numbers definition + \nohebrew@ltr@numbers } \def\hebrew@globalnumbers{% \let\@arabic\hebrewnumber% \renewcommand\thefootnote{\localnumeral*{footnote}}% + % Prevent bidi from setting the numbers RTL + \hebrew@ltr@numbers% } % Store original definition @@ -6496,6 +8740,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-hebrew.ldf> +%<*gloss-hi.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-hi.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-hi.ldf}[polyglossia: module for hi (hindi)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{hindi} + +% \end{macrocode} +% \iffalse +%</gloss-hi.ldf> %<*gloss-hindi.ldf> % \fi % \clearpage @@ -6510,6 +8769,7 @@ and may look very wrong.} \ProvidesFile{gloss-hindi.ldf}[polyglossia: module for hindi] \RequirePackage{devanagaridigits} \PolyglossiaSetup{hindi}{ + bcp47=hi, script=Devanagari, scripttag=deva, langtag=HIN, @@ -6519,6 +8779,9 @@ and may look very wrong.} %TODO nouppercase=true, } +% BCP-47 compliant aliases +\setlanguagealias*{hindi}{hi} + \ifx\l@hindi\@undefined% \ifx\l@sanskrit\@undefined% \xpg@nopatterns{Hindi}% @@ -6542,7 +8805,11 @@ and may look very wrong.} \def\@tmpa{#1}% \ifx\@tmpa\tmp@western \hindi@devanagari@numeralsfalse - \fi} + \fi% +} + +% Register default options +\xpg@initialize@gloss@options{hindi}{numerals=Devanagari} \newcommand{\hindinumerals}[2]{\hindinumber{#2}} @@ -6611,6 +8878,51 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-hindi.ldf> +%<*gloss-hr.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-hr.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-hr.ldf}[polyglossia: module for hr (croatian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{croatian} + +% \end{macrocode} +% \iffalse +%</gloss-hr.ldf> +%<*gloss-hsb.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-hsb.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-hsb.ldf}[polyglossia: module for hsb (sorbian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{sorbian} + +% \end{macrocode} +% \iffalse +%</gloss-hsb.ldf> +%<*gloss-hu.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-hu.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-hu.ldf}[polyglossia: module for hu (hungarian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{hungarian} + +% \end{macrocode} +% \iffalse +%</gloss-hu.ldf> %<*gloss-hungarian.ldf> % \fi % \clearpage @@ -6620,6 +8932,7 @@ and may look very wrong.} \ProvidesFile{gloss-hungarian.ldf}[polyglossia: module for hungarian] \PolyglossiaSetup{hungarian}{ + bcp47=hu, babelname=magyar, hyphennames={hungarian,magyar}, langtag=HUN, @@ -6627,6 +8940,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{hungarian}{hu} + \frenchspacing % Babel and backwards compat. alias @@ -6670,7 +8986,13 @@ and may look very wrong.} \xpg@info{Option: Hungarian, swapstrings=\val}% }{\xpg@warning{Unknown Hungarian swapstrings value `#1'}} -\setkeys{hungarian}{swapstrings} +% Register default options +\xpg@initialize@gloss@options{hungarian}{swapstrings=all} + +\def\hungarian@language{% + \polyglossia@setup@language@patterns{hungarian}% + \xpg@ifdefined{hungarian}{\adddialect\l@magyar\l@hungarian}{}% +}% \def\captionshungarian{% \def\refname{Hivatkozások}% @@ -6741,81 +9063,81 @@ and may look very wrong.} % change chapter and part headings \if@hungarian@swapheadings % With titlesec - \ifdefined\titleformat% - \ifdefined\@part% + \ifcsdef{titleformat}{% + \ifcsdef{@part}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\thepart.\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% - \fi% - \ifdefined\chapter% + }{}% + \ifcsdef{chapter}{% \titleformat\chapter[display]% {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6} {\thechapter.\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit} - \fi% - \else% (not \ifdefined\titleformat) + }{}% + }{% (not \ifdefined\titleformat) % With KOMA - \ifdefined\sectionformat% - \ifdefined\partformat% + \ifcsdef{sectionformat}{% + \ifcsdef{partformat}{% \let\xpg@save@part@format\partformat% \renewcommand{\partformat}{\thepart.~\partname}% - \fi% - \ifdefined\chapterformat% + }{}% + \ifcsdef{chapterformat}{% \let\xpg@save@chap@format\chapterformat% \renewcommand{\chapterformat}{\mbox{\thechapter\autodot% \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}% - \fi% - \else% (not \ifdefined\sectionformat) + }{}% + }{% (not \ifdefined\sectionformat) % With memoir - \ifdefined\@memptsize% - \ifdefined\@makechapterhead% + \ifcsdef{@memptsize}{% + \ifcsdef{@makechapterhead}{% \let\xpg@save@chap@format\@makechapterhead% \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}% {\printchapternum.\chapternamenum\printchaptername}% {}% {\xpg@warning{Failed to patch chapter for Hungarian}}% - \fi% - \ifdefined\@part% + }{}% + \ifcsdef{@part}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}% {\printpartnum.\partnamenum\printpartname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% - \fi% - \else% (not \ifdefined\@memptsize) + }{}% + }{% (not \ifdefined\@memptsize) % With standard classes - \ifdefined\@makechapterhead% + \ifcsdef{@makechapterhead}{% \let\xpg@save@chap@format\@makechapterhead% \patchcmd{\@makechapterhead}% {\@chapapp\space \thechapter}% {\thechapter.\space \@chapapp}% {}% {\xpg@warning{Failed to patch chapter for Hungarian}}% - \fi% - \ifdefined\@part% + }{}% + \ifcsdef{@part}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\thepart.\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% - \fi% (end \ifdefined\@part) - \fi% (end \ifdefined\@memptsize) - \fi% (end \ifdefined\sectionformat) - \fi% (end \ifdefined\titleformat) + }{}% (end \ifdefined\@part) + }% (end \ifdefined\@memptsize) + }% (end \ifdefined\sectionformat) + }% (end \ifdefined\titleformat) \fi% (end \if@hungarian@swapheadings) % % Change running headers \if@hungarian@swapheaders - \ifdefined\chapterformat% + \ifcsdef{chapterformat}{% % With KOMA \let\xpg@save@chaptermark@format\chaptermarkformat% \renewcommand*\chaptermarkformat{% \thechapter\autodot\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}} - \else% (not \ifdefined\chapterformat) - \ifdefined\@memptsize% + }{% (not \ifdefined\chapterformat) + \ifcsdef{@memptsize}{% % With memoir \let\xpg@save@chaptermark@format\chaptermark% \renewcommand*\chaptermark[1]{% @@ -6826,18 +9148,21 @@ and may look very wrong.} \fi \fi ##1}}{}}% - \else% (not \ifdefined\@memptsize) + }{% (not \ifdefined\@memptsize) % With standard classes - \ifdefined\chaptermark% - \let\xpg@save@chaptermark@format\chaptermark% - \patchcmd{\chaptermark}% + \ifcsdef{chaptermark}{% + \ifpatchable{\chaptermark}% + {\@chapapp\ \thechapter.}% + {\let\xpg@save@chaptermark@format\chaptermark% + \patchcmd{\chaptermark}% {\@chapapp\ \thechapter.}% {\thechapter.\ \@chapapp}% {}% - {\xpg@warning{Failed to patch chaptermark for Hungarian}}% - \fi% (end \ifdefined\chaptermark) - \fi% (end \ifdefined\@memptsize) - \fi% (end \ifdefined\chapterformat) + {\xpg@warning{Failed to patch chaptermark for Hungarian}}}% + {}% + }{}% (end \ifdefined\chaptermark) + }% (end \ifdefined\@memptsize) + }% (end \ifdefined\chapterformat) \fi% (end \if@hungarian@swapheaders) } @@ -6848,50 +9173,50 @@ and may look very wrong.} \let\fnum@figure\xpg@save@fnum@figure% % % Reset chapter and part heading - \ifdefined\titleformat% + \ifcsdef{titleformat}{% % With titlesec - \ifdefined\xpg@save@part@format + \ifcsdef{xpg@save@part@format}{% \let\@part\xpg@save@part@format - \fi% - \ifdefined\chapter + }{}% + \ifcsdef{chapter}{% \titleformat\chapter[display]% {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6} {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit} - \fi% - \else% (not \ifdefined\titleformat) - \ifdefined\sectionformat% + }{}% + }{% (not \ifdefined\titleformat) + \ifcsdef{sectionformat}{% % With KOMA - \ifdefined\xpg@save@part@format + \ifcsdef{xpg@save@part@format}{% \let\partformat\xpg@save@part@format - \fi% - \ifdefined\xpg@save@chap@format + }{}% + \ifcsdef{xpg@save@chap@format}{% \let\chapterformat\xpg@save@chap@format - \fi% - \else% + }{}% + }{% % With memoir and standard classes - \ifdefined\xpg@save@part@format + \ifcsdef{xpg@save@part@format}{% \let\@part\xpg@save@part@format - \fi% - \ifdefined\xpg@save@chap@format + }{}% + \ifcsdef{xpg@save@chap@format}{% \let\@makechapterhead\xpg@save@chap@format - \fi% - \fi% (end \ifdefined\sectionformat) - \fi% (end \ifdefined\titleformat) + }{}% + }% (end \ifdefined\sectionformat) + }% (end \ifdefined\titleformat) % % Reset headers - \ifdefined\chaptermarkformat% + \ifcsdef{chaptermarkformat}{% % With KOMA - \ifdefined\xpg@save@chaptermark@format + \ifcsdef{xpg@save@chaptermark@format}{% \let\chaptermarkformat\xpg@save@chaptermark@format% - \fi - \else% - \ifdefined\chaptermark% + }{}% + }{% + \ifcsdef{chaptermark}{% % With memoir and standard classes - \ifdefined\xpg@save@chaptermark@format + \ifcsdef{xpg@save@chaptermark@format}{% \let\chaptermark\xpg@save@chaptermark@format% - \fi - \fi% (end \ifdefined\chaptermark) - \fi% (end \ifdefined\chapterformat) + }{}% + }{}% (end \ifdefined\chaptermark) + }% (end \ifdefined\chapterformat) } \def\blockextras@hungarian{% @@ -6906,6 +9231,36 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-hungarian.ldf> +%<*gloss-hy.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-hy.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-hy.ldf}[polyglossia: module for hy (armenian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{armenian} + +% \end{macrocode} +% \iffalse +%</gloss-hy.ldf> +%<*gloss-ia.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ia.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ia.ldf}[polyglossia: module for ia (interlingua)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{interlingua} + +% \end{macrocode} +% \iffalse +%</gloss-ia.ldf> %<*gloss-icelandic.ldf> % \fi % \clearpage @@ -6914,12 +9269,16 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-icelandic.ldf}[polyglossia: module for icelandic] \PolyglossiaSetup{icelandic}{ + bcp47=is, hyphennames={icelandic}, hyphenmins={2,2}, langtag=ISL, fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{icelandic}{is} + \def\captionsicelandic{% \def\refname{Heimildir}% \def\abstractname{Útdráttur}% @@ -6956,6 +9315,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-icelandic.ldf> +%<*gloss-id.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-id.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-id.ldf}[polyglossia: module for id (malay)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{malay} + +% \end{macrocode} +% \iffalse +%</gloss-id.ldf> %<*gloss-interlingua.ldf> % \fi % \clearpage @@ -6964,6 +9338,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-interlingua.ldf}[polyglossia: module for interlingua] \PolyglossiaSetup{interlingua}{ + bcp47=ia, hyphennames={interlingua}, hyphenmins={2,2}, langtag=INA, @@ -6972,6 +9347,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{interlingua}{ia} + \def\captionsinterlingua{% \def\refname{Referentias}% \def\abstractname{Summario}% @@ -7022,6 +9400,36 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-irish.ldf> +%<*gloss-is.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-is.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-is.ldf}[polyglossia: module for is (icelandic)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{icelandic} + +% \end{macrocode} +% \iffalse +%</gloss-is.ldf> +%<*gloss-it.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-it.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-it.ldf}[polyglossia: module for it (italian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{italian} + +% \end{macrocode} +% \iffalse +%</gloss-it.ldf> %<*gloss-italian.ldf> % \fi % \clearpage @@ -7031,6 +9439,7 @@ and may look very wrong.} % !TEX encoding = UTF-8 Unicode \ProvidesFile{gloss-italian.ldf}[polyglossia: module for italian] \PolyglossiaSetup{italian}{ + bcp47=it, hyphennames={italian}, hyphenmins={2,2}, langtag=ITA, @@ -7039,10 +9448,16 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{italian}{it} + %%% CHANGES START %%% by Enrico Gregorio \define@boolkey{italian}[italian@]{babelshorthands}[true]{} +% Register default options +\xpg@initialize@gloss@options{italian}{babelshorthands=false} + \ifsystem@babelshorthands \setkeys{italian}{babelshorthands=true} \else @@ -7163,6 +9578,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-italian.ldf> +%<*gloss-ja.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ja.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ja.ldf}[polyglossia: module for ja (japanese)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{japanese} + +% \end{macrocode} +% \iffalse +%</gloss-ja.ldf> %<*gloss-japanese.ldf> % \fi % \clearpage @@ -7170,21 +9600,27 @@ and may look very wrong.} % \subsection{gloss-japanese.ldf} % \begin{macrocode} \ProvidesFile{gloss-japanese.ldf}[polyglossia: module for japanese] + \PolyglossiaSetup{japanese}{ + bcp47=ja, script=CJK, language=Japanese, langtag=JAN, hyphennames={nohyphenation}, frenchspacing=false, - fontsetup=true + fontsetup=true, + localnumeral=japanesenumerals } +% BCP-47 compliant aliases +\setlanguagealias*{japanese}{ja} + \def\japanese@capsformat{% \def\@seccntformat##1{% \csname pre##1\endcsname% \csname the##1\endcsname% \csname post##1\endcsname% - } + }% \def\postsection{節\space}% \def\postsubsection{節\space}% \def\postsubsubsection{節\space}% @@ -7224,33 +9660,33 @@ and may look very wrong.} \newif\if@IzumoTuki \@IzumoTukifalse% \newcount\c@TempJNum% -\def\@JapaneseDigit#1{ - \ifcase#1\or 一\or 二\or 三\or 四\or 五\or - 六\or 七\or 八\or 九\or 十\or - 十一\or 十二\or 十三\or 十四\or 十五\or - 十六\or 十七\or 十八\or 十九\or 廿\or - 廿一\or 廿二\or 廿三\or 廿四\or 廿五\or - 廿六\or 廿七\or 廿八\or 廿九\or 丗\or - 丗一\or 丗二\or 丗三\or 丗四\or 丗五\or - 丗六\or 丗七\or 丗八\or 丗九\or 四十\or - 四十一\or 四十二\or 四十三\or 四十四\or 四十五\or - 四十六\or 四十七\or 四十八\or 四十九\or 五十\or - 五十一\or 五十二\or 五十三\or 五十四\or 五十五\or - 五十六\or 五十七\or 五十八\or 五十九\or 六十\or - 六十一\or 六十二\or 六十三\or 六十四\or 六十五\or - 六十六\or 六十七\or 六十八\or 六十九\or 七十\or - 七十一\or 七十二\or 七十三\or 七十四\or 七十五\or - 七十六\or 七十七\or 七十八\or 七十九\or 八十\or - 八十一\or 八十二\or 八十三\or 八十四\or 八十五\or - 八十六\or 八十七\or 八十八\or 八十九\or 九十\or - 九十一\or 九十二\or 九十三\or 九十四\or 九十五\or - 九十六\or 九十七\or 九十八\or 九十九 +\def\@JapaneseDigit#1{% + \ifcase#1\or 一\or 二\or 三\or 四\or 五\or% + 六\or 七\or 八\or 九\or 十\or% + 十一\or 十二\or 十三\or 十四\or 十五\or% + 十六\or 十七\or 十八\or 十九\or 廿\or% + 廿一\or 廿二\or 廿三\or 廿四\or 廿五\or% + 廿六\or 廿七\or 廿八\or 廿九\or 丗\or% + 丗一\or 丗二\or 丗三\or 丗四\or 丗五\or% + 丗六\or 丗七\or 丗八\or 丗九\or 四十\or% + 四十一\or 四十二\or 四十三\or 四十四\or 四十五\or% + 四十六\or 四十七\or 四十八\or 四十九\or 五十\or% + 五十一\or 五十二\or 五十三\or 五十四\or 五十五\or% + 五十六\or 五十七\or 五十八\or 五十九\or 六十\or% + 六十一\or 六十二\or 六十三\or 六十四\or 六十五\or% + 六十六\or 六十七\or 六十八\or 六十九\or 七十\or% + 七十一\or 七十二\or 七十三\or 七十四\or 七十五\or% + 七十六\or 七十七\or 七十八\or 七十九\or 八十\or% + 八十一\or 八十二\or 八十三\or 八十四\or 八十五\or% + 八十六\or 八十七\or 八十八\or 八十九\or 九十\or% + 九十一\or 九十二\or 九十三\or 九十四\or 九十五\or% + 九十六\or 九十七\or 九十八\or 九十九% \else - \@ctrerr - \fi\relax + \@ctrerr% + \fi\relax% } -\def\@JapaneseNum#1{ +\def\@JapaneseNum#1{% \c@TempJNum=#1\divide\c@TempJNum by 1000\relax% \ifnum\c@TempJNum=\z@\c@TempJNum=#1% \divide\c@TempJNum by 100\relax% @@ -7260,7 +9696,7 @@ and may look very wrong.} 六百\or 七百\or 八百\or 九百% \fi \c@TempJNum=#1\divide\c@TempJNum by 100\multiply\c@TempJNum by -100\advance\c@TempJNum#1\@JapaneseDigit\c@TempJNum\relax% - \fi + \fi% \else \ifcase\c@TempJNum\or 千\or 二千\or 三千\or 四千\or 五千\or 六千\or 七千\or 八千\or 九千% @@ -7277,7 +9713,7 @@ and may look very wrong.} \fi } -\def\@japanesenumber#1{ +\def\@japanesenumber#1{% \@tempcnta=#1% \ifnum\@tempcnta=\z@{〇}% \else @@ -7310,12 +9746,14 @@ and may look very wrong.} \fi } -\def\japanesenumber#1{ +\def\japanesenumber#1{% \expandafter\@japanesenumber\csname c@#1\endcsname% } -\def\datejapanese{ - { +\newcommand{\japanesenumerals}[2]{\@japanesenumber{#2}} + +\def\datejapanese{% + {% \ifnum\year<1868% \xdef\the@WarekiCur{}% \else @@ -7334,14 +9772,14 @@ and may look very wrong.} \fi \fi \xdef\the@WameiTosi{\the\year}% - } + }% \def\西暦{\@WameiRekifalse \@WameiTukifalse \@WameiHifalse}% \def\和暦{\@WameiRekitrue \@WameiTosifalse \@WameiTukifalse \@WameiHifalse}% \def\和名暦{\@WameiTositrue \@WameiTukitrue \@WameiHitrue}% \def\数字暦{\@WameiTosifalse \@WameiTukifalse \@WameiHifalse}% \def\出雲月{\@IzumoTukitrue}% \def\大和月{\@IzumoTukifalse}% - \def\today{ + \def\today{% \if@WameiReki% \the@WarekiCur% \if@WameiTosi% @@ -7368,8 +9806,8 @@ and may look very wrong.} \else \,\number\day\,% \fi - {日} - } + {日}% + }% } \def\noextras@japanese{% @@ -7388,6 +9826,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-japanese.ldf> +%<*gloss-ka.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ka.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ka.ldf}[polyglossia: module for ka (georgian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{georgian} + +% \end{macrocode} +% \iffalse +%</gloss-ka.ldf> %<*gloss-kannada.ldf> % \fi % \clearpage @@ -7420,6 +9873,7 @@ the output is not guaranteed to be correct\MessageBreak and may look very wrong.} \fi \PolyglossiaSetup{kannada}{ + bcp47=kn, script=Kannada, scripttag=knda, langtag=KAN, @@ -7429,6 +9883,9 @@ and may look very wrong.} localnumeral=kannadanumerals } +% BCP-47 compliant aliases +\setlanguagealias*{kannada}{kn} + %% Defining Kannada digits equivalents to english \def\kannadadigits#1{\expandafter\@kannada@digits #1@} \def\@kannada@digits#1{% @@ -7516,6 +9973,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer] \PolyglossiaSetup{khmer}{ + bcp47=km, script=Khmer,% scripttag=khmr,% langtag=KHM,% @@ -7674,6 +10132,96 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-khmer.ldf> +%<*gloss-km.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-km.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-km.ldf}[polyglossia: module for km (khmer)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{khmer} + +% \end{macrocode} +% \iffalse +%</gloss-km.ldf> +%<*gloss-kmr-Arab.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-kmr-Arab.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-kmr-Arab.ldf}[polyglossia: module for kmr-Arab (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-kmr-Arab.ldf> +%<*gloss-kmr-Latn.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-kmr-Latn.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-kmr-Latn.ldf}[polyglossia: module for kmr-Latn (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-kmr-Latn.ldf> +%<*gloss-kmr.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-kmr.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-kmr.ldf}[polyglossia: module for kmr (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-kmr.ldf> +%<*gloss-kn.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-kn.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-kn.ldf}[polyglossia: module for kn (kannada)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kannada} + +% \end{macrocode} +% \iffalse +%</gloss-kn.ldf> +%<*gloss-ko.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ko.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ko.ldf}[polyglossia: module for ko (korean)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{korean} + +% \end{macrocode} +% \iffalse +%</gloss-ko.ldf> %<*gloss-korean.ldf> % \fi % \clearpage @@ -7683,6 +10231,7 @@ and may look very wrong.} \ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean] \PolyglossiaSetup{korean}{ + bcp47=ko, script=Hangul, scripttag=hang, language=Korean, @@ -7692,6 +10241,9 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{korean}{ko} + % variant : plain (0), classic (1), or modern (2) \define@choicekey{korean}{variant}[\val\nr]{plain,classic,modern}[plain]{% \let\xpg@korean@variant\nr @@ -7700,7 +10252,32 @@ and may look very wrong.} \define@choicekey{korean}{captions}[\val\nr]{hangul,hanja}[hangul]{% \let\xpg@korean@captions\nr } -\setkeys{korean}{variant,captions} +% swapstrings: all (0), headings (1), headers (2), or none (3) +\newif\if@korean@swapheadings +\newif\if@korean@swapheaders +\define@choicekey*+{korean}{swapstrings}[\val\nr]{all,headings,headers,none}[all]{% + \ifcase\nr\relax + % all: + \@korean@swapheadingstrue% + \@korean@swapheaderstrue% + \or + % headings: + \@korean@swapheadingstrue% + \@korean@swapheadersfalse% + \or + % headers: + \@korean@swapheadingsfalse% + \@korean@swapheaderstrue% + \or + % none: + \@korean@swapheadingsfalse% + \@korean@swapheadersfalse% + \fi + \xpg@info{Option: Korean, swapstrings=\val}% +}{\xpg@warning{Unknown Korean swapstrings value `#1'}} + +% Register default options +\xpg@initialize@gloss@options{korean}{variant=plain,swapstrings=all,captions=hangul} \def\captionskorean{% \ifcase\xpg@korean@captions\relax @@ -7713,7 +10290,7 @@ and may look very wrong.} } \def\captions@korean@hangul{% \def\koreanTHEname{제}% - \def\partname##1##2{제##1##2 편}% + \def\partname{편}% \def\chaptername{장}% \def\refname{참고문헌}% \def\abstractname{요약}% @@ -7731,10 +10308,11 @@ and may look very wrong.} \def\proofname{증명}% \def\headtoname{수신:}% \def\ccname{사본}% + \def\glossaryname{용어집}% } \def\captions@korean@hanja{% \def\koreanTHEname{第}% - \def\partname##1##2{第##1##2 篇}% + \def\partname{篇}% \def\chaptername{章}% \def\refname{參考文獻}% \def\abstractname{要約}% @@ -7752,6 +10330,217 @@ and may look very wrong.} \def\proofname{證明}% \def\headtoname{受信:}% \def\ccname{寫本}% + \def\glossaryname{用語集}% +} + +\def\korean@appendix@chapapp{\appendixname}% to exclude appendix + +\def\korean@headingsformat{% + % change chapter and part headings + \if@korean@swapheadings + % With titlesec + \ifdefined\titleformat + \ifdefined\@part + \let\xpg@save@part@format\@part + \patchcmd{\@part}% + {\partname\nobreakspace\thepart}% + {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}% + {}% + {\xpg@warning{Failed to patch part for Korean}}% + \fi + \ifdefined\chapter + \titleformat\chapter[display]% + {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}% + {% + \ifx\@chapapp\korean@appendix@chapapp + \appendixname\space \thechapter + \else + \koreanTHEname\space \thechapter\space \@chapapp + \fi + }{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}% + \fi + \else % (not \ifdefined\titleformat) + % With KOMA + \ifdefined\sectionformat + \ifdefined\partformat + \let\xpg@save@part@format\partformat + \renewcommand*{\partformat}{\koreanTHEname~\thepart~\partname}% + \fi + \ifdefined\chapterformat + \let\xpg@save@chap@format\chapterformat + \renewcommand*{\chapterformat}{\mbox{% + \IfChapterUsesPrefixLine + {% + \ifx\@chapapp\korean@appendix@chapapp + \chapappifchapterprefix\nobreakspace \thechapter\autodot + \else + \koreanTHEname\nobreakspace \thechapter\nobreakspace \chapappifchapterprefix{}% + \fi + }% + {\thechapter\autodot\enskip}% + }}% + \fi + \else % (not \ifdefined\sectionformat) + % With memoir + \ifdefined\@memptsize + \ifdefined\@makechapterhead + \let\xpg@save@chap@format\@makechapterhead + \patchcmd{\@makechapterhead}% + {\printchaptername \chapternamenum \printchapternum}% + {% + \ifx\@chapapp\korean@appendix@chapapp + \printchaptername\relax\chapternamenum \printchapternum + \else + \printkoreanchapterthe \printchapternum\chapternamenum \printchaptername + \fi + }% + {}% + {\xpg@warning{Failed to patch chapter for Korean}}% + \ifdefined\printkoreanchapterthe\else + \def\printkoreanchapterthe{% + \ifpatchable\printchaptername\@chapapp + {\chapnamefont\koreanTHEname\chapternamenum}{}}% + \fi + \fi + \ifdefined\@part + \let\xpg@save@part@format\@part + \patchcmd{\@part}% + {\printpartname \partnamenum \printpartnum}% + {\printkoreanpartthe \printpartnum\partnamenum \printpartname}% + {}% + {\xpg@warning{Failed to patch part for Korean}}% + \ifdefined\printkoreanpartthe\else + \def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}% + \fi + \fi + \else % (not \ifdefined\@memptsize) + % With standard classes + \ifdefined\@makechapterhead + \let\xpg@save@chap@format\@makechapterhead + \patchcmd{\@makechapterhead}% + {\@chapapp\space \thechapter}% + {% + \ifx\@chapapp\korean@appendix@chapapp + \appendixname\space \thechapter + \else + \koreanTHEname\space \thechapter\space \@chapapp + \fi + }% + {}% + {\xpg@warning{Failed to patch chapter for Korean}}% + \fi + \ifdefined\@part + \let\xpg@save@part@format\@part + \patchcmd{\@part}% + {\partname\nobreakspace\thepart}% + {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}% + {}% + {\xpg@warning{Failed to patch part for Korean}}% + \fi % (end \ifdefined\@part) + \fi % (end \ifdefined\@memptsize) + \fi % (end \ifdefined\sectionformat) + \fi % (end \ifdefined\titleformat) + \fi % (end \if@korean@swapheadings) + % + % Change running headers + \if@korean@swapheaders + \ifdefined\chapterformat + % With KOMA + \let\xpg@save@chaptermark@format\chaptermarkformat + \renewcommand*\chaptermarkformat{% + \IfChapterUsesPrefixLine + {% + \ifx\@chapapp\korean@appendix@chapapp + \chapappifchapterprefix\ \thechapter\autodot + \else + \koreanTHEname\ \thechapter\ \chapappifchapterprefix{}% + \fi + }% + {\thechapter\autodot}% + \enskip + }% + \else % (not \ifdefined\chapterformat) + \ifdefined\@memptsize + % With memoir + \let\xpg@save@chaptermark@format\chaptermark + \patchcmd{\chaptermark}% + {\@chapapp\ \@nameuse{thechapter}}% + {% + \ifx\@chapapp\korean@appendix@chapapp + \appendixname\ \@nameuse{thechapter}% + \else + \koreanTHEname\ \@nameuse{thechapter}\ \@chapapp + \fi + }% + {}% + {}% + \else % (not \ifdefined\@memptsize) + % With standard classes + \ifdefined\chaptermark + \let\xpg@save@chaptermark@format\chaptermark + \patchcmd{\chaptermark}% + {\@chapapp\ \thechapter}% + {% + \ifx\@chapapp\korean@appendix@chapapp + \appendixname\ \thechapter + \else + \koreanTHEname\ \thechapter\ \@chapapp + \fi + }% + {}% + {}% + \fi % (end \ifdefined\chaptermark) + \fi % (end \ifdefined\@memptsize) + \fi % (end \ifdefined\chapterformat) + \fi % (end \if@korean@swapheaders) +} + +\def\nokorean@headingsformat{% + % Reset chapter and part heading + \ifdefined\titleformat + % With titlesec + \ifdefined\xpg@save@part@format + \let\@part\xpg@save@part@format + \fi + \ifdefined\chapter + \titleformat\chapter[display]% + {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}% + {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}% + \fi + \else % (not \ifdefined\titleformat) + \ifdefined\sectionformat + % With KOMA + \ifdefined\xpg@save@part@format + \let\partformat\xpg@save@part@format + \fi + \ifdefined\xpg@save@chap@format + \let\chapterformat\xpg@save@chap@format + \fi + \else + % With memoir and standard classes + \ifdefined\xpg@save@part@format + \let\@part\xpg@save@part@format + \fi + \ifdefined\xpg@save@chap@format + \let\@makechapterhead\xpg@save@chap@format + \fi + \fi % (end \ifdefined\sectionformat) + \fi % (end \ifdefined\titleformat) + % + % Reset headers + \ifdefined\chaptermarkformat + % With KOMA + \ifdefined\xpg@save@chaptermark@format + \let\chaptermarkformat\xpg@save@chaptermark@format + \fi + \else + \ifdefined\chaptermark + % With memoir and standard classes + \ifdefined\xpg@save@chaptermark@format + \let\chaptermark\xpg@save@chaptermark@format + \fi + \fi % (end \ifdefined\chaptermark) + \fi % (end \ifdefined\chapterformat) } \def\datekorean{% @@ -7827,17 +10616,11 @@ and may look very wrong.} \def\blockextras@korean{% \inlineextras@korean - \ifdefined\@chapapp - \long\def\@tmpa{\chaptername}\def\@tmpb{\chaptername}% - \ifnum0\ifx\@chapapp\@tmpa1\else\ifx\@chapapp\@tmpb1\fi\fi>\z@ - \let\xpg@orig@@chapapp\@chapapp - \def\@chapapp##1##2{\koreanTHEname ##1##2##1\chaptername}% - \fi - \fi + \korean@headingsformat } \def\noextras@korean@common{% - \ifdefined\xpg@orig@@chapapp \let\@chapapp\xpg@orig@@chapapp \fi + \nokorean@headingsformat } \ifluatex % luatex @@ -7871,6 +10654,51 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-korean.ldf> +%<*gloss-ku-Arab.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ku-Arab.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ku-Arab.ldf}[polyglossia: module for ku-Arab (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-ku-Arab.ldf> +%<*gloss-ku-Latn.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ku-Latn.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ku-Latn.ldf}[polyglossia: module for ku-Latn (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-ku-Latn.ldf> +%<*gloss-ku.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ku.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ku.ldf}[polyglossia: module for ku (kurdish)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-ku.ldf> %<*gloss-kurdish.ldf> % \fi % \clearpage @@ -7887,6 +10715,7 @@ and may look very wrong.} \RequirePackage{hijrical} \PolyglossiaSetup{kurdish}{ + bcp47=ckb, script=Arabic, direction=RL, scripttag=arab, @@ -7896,6 +10725,17 @@ and may look very wrong.} localnumeral=kurdishnumerals } +% BCP-47 compliant aliases +\setlanguagealias*{kurdish}{ku} +\setlanguagealias*[variant=kurmanji,script=Latin]{kurdish}{kmr-Latn} +\setlanguagealias*[variant=sorani]{kurdish}{ckb} +\setlanguagealias*[variant=kurmanji,script=Arabic]{kurdish}{kmr-Arab} +\setlanguagealias*[script=Latin]{kurdish}{ku-Latn} +\setlanguagealias*[variant=sorani,script=Arabic]{kurdish}{ckb-Arab} +\setlanguagealias*[variant=sorani,script=Latin]{kurdish}{ckb-Latn} +\setlanguagealias*[script=Arabic]{kurdish}{ku-Arab} +\setlanguagealias*[variant=kurmanji]{kurdish}{kmr} + % Babel aliases \setlanguagealias[variant=kurmanji]{kurdish}{kurmanji} @@ -7942,9 +10782,9 @@ and may look very wrong.} \@western@numeralstrue% \if@kurdish@kurmanji \def\kurdish@pattern{kurmanji}% - \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji}% + \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji,bcp47=kmr-Latn}% \else - \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurdish}% + \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurdish,bcp47=ckb-Arab}% \fi \def\kurdish@script{latin} \xpg@fontsetup@latin{kurdish}% @@ -7952,20 +10792,20 @@ and may look very wrong.} \if@kurdish@arabic% Arabic explicitly set \if@kurdish@kurmanji \if@force@western@numerals\else\@western@numeralsfalse\fi% - \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurmanji}% + \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurmanji,bcp47=kmr-Arab}% \def\kurdish@script{arabic}% \else - \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish}% + \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish,bcp47=ckb-Arab}% \fi \xpg@fontsetup@nonlatin{kurdish}% \else% sorani=Arabic, kurmanji=Latin \if@kurdish@kurmanji \@western@numeralstrue% - \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji}% + \SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji,bcp47=kmr-Latn}% \xpg@fontsetup@latin{kurdish}% \def\kurdish@script{latin} \else - \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish}% + \SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish,bcp47=ckb-Arab}% \xpg@fontsetup@nonlatin{kurdish}% \fi \fi @@ -7997,7 +10837,8 @@ and may look very wrong.} %TODO add option for CALENDAR -\setkeys{kurdish}{variant,locale} +% Register default options +\xpg@initialize@gloss@options{kurdish}{variant=sorani,locale=default,script=Arabic,abjadjimnotail=false,numerals=eastern} \def\kurdish@language{% \polyglossia@setup@language@patterns{\kurdish@pattern}% @@ -8204,19 +11045,9 @@ and may look very wrong.} \if@western@numerals \number#1% \else - \ifxetex - \ifnum\XeTeXcharglyph"06F0 > 0\relax - \farsidigits{\number#1}% - \else% - \arabicdigits{\number#1}% - \fi - \else\ifluatex - \expandafter\ifnum\directlua{polyglossia.check_char(0x6F0)} > 0\relax - \farsidigits{\number#1}% - \else% - \arabicdigits{\number#1}% - \fi - \fi\fi + \xpg@if@char@available{06F0}% + {\farsidigits{\number#1}}% + {\arabicdigits{\number#1}}% \fi } @@ -8266,6 +11097,81 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-kurdish.ldf> +%<*gloss-kurmanji.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-kurmanji.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-kurmanji.ldf}[polyglossia: module for kurmanji kurdish] + +% We provide this gloss for babel compatibility. + +\xpg@load@master@language{kurdish} + +% \end{macrocode} +% \iffalse +%</gloss-kurmanji.ldf> +%<*gloss-la-x-classic.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-la-x-classic.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-la-xclassic.ldf}[polyglossia: module for la-xclassic (latin)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{latin} + +% \end{macrocode} +% \iffalse +%</gloss-la-x-classic.ldf> +%<*gloss-la-x-ecclesia.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-la-x-ecclesia.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-la-xecclesiastic.ldf}[polyglossia: module for la-xecclesiastic (latin)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{latin} + +% \end{macrocode} +% \iffalse +%</gloss-la-x-ecclesia.ldf> +%<*gloss-la-x-medieval.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-la-x-medieval.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-la-xmedieval.ldf}[polyglossia: module for la-xmedieval (latin)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{latin} + +% \end{macrocode} +% \iffalse +%</gloss-la-x-medieval.ldf> +%<*gloss-la.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-la.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-la.ldf}[polyglossia: module for la (latin)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{latin} + +% \end{macrocode} +% \iffalse +%</gloss-la.ldf> %<*gloss-lao.ldf> % \fi % \clearpage @@ -8280,6 +11186,7 @@ the output is not guaranteed to be correct\MessageBreak and may look very wrong.} \fi \PolyglossiaSetup{lao}{ + bcp47=lo, script=Lao, scripttag=lao, langtag=LAO, @@ -8291,6 +11198,9 @@ and may look very wrong.} %TODO localdigits=laonumber } +% BCP-47 compliant aliases +\setlanguagealias*{lao}{lo} + \newif\if@lao@numerals \def\tmp@lao{lao} \define@key{lao}{numerals}[arabic]{% @@ -8299,7 +11209,8 @@ and may look very wrong.} \@lao@numeralsfalse\fi } -\setkeys{lao}{numerals} +% Register default options +\xpg@initialize@gloss@options{lao}{numerals=arabic} % Translations provided by Brian Wilson <bountonw at gmail.com> \def\captionslao{% @@ -8420,23 +11331,29 @@ and may look very wrong.} % % \subsection{gloss-latin.ldf} % \begin{macrocode} -\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.0 2019-10-28] +\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin v.2.2 2020-01-03] \ExplSyntaxOn \PolyglossiaSetup {latin} { - hyphennames = {latin}, + bcp47 = la, hyphenmins = {2,2}, frenchspacing = true, fontsetup = true, langtag = LAT } +% BCP-47 compliant aliases +\setlanguagealias*{latin}{la} +\setlanguagealias*[variant=classic]{latin}{la-x-classic} +\setlanguagealias*[variant=ecclesiastic]{latin}{la-x-ecclesia} +\setlanguagealias*[variant=medieval]{latin}{la-x-medieval} + % Babel aliases -\setlanguagealias[variant=classic]{latin}{latinclassic} -\setlanguagealias[variant=ecclesiastic]{latin}{latinecclesiastic} -\setlanguagealias[variant=medieval]{latin}{latinmedieval} +\setlanguagealias[variant=classic]{latin}{classiclatin} +\setlanguagealias[variant=ecclesiastic]{latin}{ecclesiasticlatin} +\setlanguagealias[variant=medieval]{latin}{medievallatin} %%%%% Variables and commands concerning spelling @@ -8469,8 +11386,7 @@ and may look very wrong.} \msg_new:nnn {polyglossia} {latin / missing modern patterns} { - No~hyphenation~patterns~were~found~for~Latin~\msg_line_context:.~ - I~will~not~hyphenate~Latin~words. + The~hyphenation~patterns~for~modern~Latin~were~not~found~\msg_line_context:. } \msg_new:nnn {polyglossia} {latin / missing patterns} @@ -8486,11 +11402,23 @@ and may look very wrong.} \def \latin@language { \polyglossia@setup@language@patterns {latin} + \str_case:Vn \l_polyglossia_latin_variant_str + { + {classic} { \adddialect \l@classiclatin \l@latin } + {medieval} { \adddialect \l@medievallatin \l@latin } + {ecclesiastic} { \adddialect \l@ecclesiasticlatin \l@latin } + } } } { \msg_warning:nn {polyglossia} {latin / missing modern patterns} - \adddialect \l@latin \l@nohyphenation + \str_case:Vn \l_polyglossia_latin_variant_str + { + {classic} { \adddialect \l@classiclatin \l@nohyphenation } + {medieval} { \adddialect \l@medievallatin \l@nohyphenation } + {modern} { \adddialect \l@latin \l@nohyphenation } + {ecclesiastic} { \adddialect \l@ecclesiasticlatin \l@nohyphenation } + } } } @@ -8502,19 +11430,22 @@ and may look very wrong.} \def \latin@language { \polyglossia@setup@language@patterns {#1} + \str_case:Vn \l_polyglossia_latin_variant_str + { + {classic} { + \str_if_eq:nnTF{#1}{liturgicallatin} + { \adddialect \l@classiclatin { \use:c {l@#1} } } + {} + } + {medieval} { \adddialect \l@medievallatin { \use:c {l@#1} } } + {modern} { \adddialect \l@latin { \use:c {l@#1} } } + {ecclesiastic} { \adddialect \l@ecclesiasticlatin { \use:c {l@#1} } } + } } } { - \xpg@ifdefined {latin} - { - \msg_warning:nnn {polyglossia} {latin / missing patterns} {#1} - \adddialect \l@ #1 \l@latin - \polyglossia_latin_use_modern_patterns: - } - { - \msg_warning:nn {polyglossia} {latin / missing modern patterns} - \adddialect \l@ #1 \l@nohyphenation - } + \msg_warning:nnn {polyglossia} {latin / missing patterns} {#1} + \polyglossia_latin_use_modern_patterns: } } @@ -8528,7 +11459,8 @@ and may look very wrong.} \directlua { require('polyglossia-latin') } } { - \newXeTeXintercharclass \g_polyglossia_latin_punctuation_class + \newXeTeXintercharclass \g_polyglossia_latin_question_exclamation_class + \newXeTeXintercharclass \g_polyglossia_latin_colon_semicolon_class \newXeTeXintercharclass \g_polyglossia_latin_opening_guillemet_class \newXeTeXintercharclass \g_polyglossia_latin_closing_guillemet_class \newXeTeXintercharclass \g_polyglossia_latin_opening_bracket_class @@ -8559,14 +11491,15 @@ and may look very wrong.} } { \XeTeXinterchartokenstate = 1 - \XeTeXcharclass `\! \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\? \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\‼ \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\⁇ \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\⁈ \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\⁉ \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\; \g_polyglossia_latin_punctuation_class - \XeTeXcharclass `\: \g_polyglossia_latin_punctuation_class + \XeTeXcharclass `\! \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\? \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\‼ \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\⁇ \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\⁈ \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\⁉ \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\‽ \g_polyglossia_latin_question_exclamation_class + \XeTeXcharclass `\; \g_polyglossia_latin_colon_semicolon_class + \XeTeXcharclass `\: \g_polyglossia_latin_colon_semicolon_class \XeTeXcharclass `\« \g_polyglossia_latin_opening_guillemet_class \XeTeXcharclass `\» \g_polyglossia_latin_closing_guillemet_class \XeTeXcharclass `\‹ \g_polyglossia_latin_opening_guillemet_class @@ -8580,13 +11513,28 @@ and may look very wrong.} \XeTeXcharclass `\⟨ \g_polyglossia_latin_opening_bracket_class \XeTeXcharclass `\⟩ \g_polyglossia_latin_closing_bracket_class - % punctuation followed by a closing guillemet - \XeTeXinterchartoks \g_polyglossia_latin_punctuation_class \g_polyglossia_latin_closing_guillemet_class = + % question or exclamation mark followed by a closing guillemet + \XeTeXinterchartoks \g_polyglossia_latin_question_exclamation_class \g_polyglossia_latin_closing_guillemet_class = + { + \polyglossia_latin_insert_punctuation_space: + } + % question or exclamation mark followed by a colon or semicolon + \XeTeXinterchartoks \g_polyglossia_latin_question_exclamation_class \g_polyglossia_latin_colon_semicolon_class = + { + \polyglossia_latin_insert_punctuation_space: + } + % colon or semicolon followed by a closing guillemet + \XeTeXinterchartoks \g_polyglossia_latin_colon_semicolon_class \g_polyglossia_latin_closing_guillemet_class = + { + \polyglossia_latin_insert_punctuation_space: + } + % closing bracket followed by a question or exclamation mark + \XeTeXinterchartoks \g_polyglossia_latin_closing_bracket_class \g_polyglossia_latin_question_exclamation_class = { \polyglossia_latin_insert_punctuation_space: } - % closing bracket followed by punctuation - \XeTeXinterchartoks \g_polyglossia_latin_closing_bracket_class \g_polyglossia_latin_punctuation_class = + % closing bracket followed by a colon or semicolon + \XeTeXinterchartoks \g_polyglossia_latin_closing_bracket_class \g_polyglossia_latin_colon_semicolon_class = { \polyglossia_latin_insert_punctuation_space: } @@ -8600,18 +11548,38 @@ and may look very wrong.} { \polyglossia_latin_replace_following_space: } + % opening guillemet followed by an opening guillemet + \XeTeXinterchartoks \g_polyglossia_latin_opening_guillemet_class \g_polyglossia_latin_opening_guillemet_class = + { + \polyglossia_latin_insert_punctuation_space: + } % opening guillemet followed by an ordinary character \XeTeXinterchartoks \g_polyglossia_latin_opening_guillemet_class \z@ = { \polyglossia_latin_insert_punctuation_space: } - % closing guillemet followed by punctuation - \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_punctuation_class = + % closing guillemet followed by a closing guillemet + \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_closing_guillemet_class = + { + \polyglossia_latin_insert_punctuation_space: + } + % closing guillemet followed by a question or exclamation mark + \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_question_exclamation_class = + { + \polyglossia_latin_insert_punctuation_space: + } + % closing guillemet followed by a colon or semicolon + \XeTeXinterchartoks \g_polyglossia_latin_closing_guillemet_class \g_polyglossia_latin_colon_semicolon_class = { \polyglossia_latin_insert_punctuation_space: } - % space followed by punctuation - \XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_punctuation_class = + % space followed by a question or exclamation mark + \XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_question_exclamation_class = + { + \polyglossia_latin_replace_preceding_space: + } + % space followed by a colon or semicolon + \XeTeXinterchartoks \xpg@boundaryclass \g_polyglossia_latin_colon_semicolon_class = { \polyglossia_latin_replace_preceding_space: } @@ -8620,8 +11588,13 @@ and may look very wrong.} { \polyglossia_latin_replace_preceding_space: } - % ordinary character followed by punctuation - \XeTeXinterchartoks \z@ \g_polyglossia_latin_punctuation_class = + % ordinary character followed by a question or exclamation mark + \XeTeXinterchartoks \z@ \g_polyglossia_latin_question_exclamation_class = + { + \polyglossia_latin_insert_punctuation_space: + } + % ordinary character followed by a colon or semicolon + \XeTeXinterchartoks \z@ \g_polyglossia_latin_colon_semicolon_class = { \polyglossia_latin_insert_punctuation_space: } @@ -8646,6 +11619,7 @@ and may look very wrong.} \XeTeXcharclass `\⁇ \z@ \XeTeXcharclass `\⁈ \z@ \XeTeXcharclass `\⁉ \z@ + \XeTeXcharclass `\‽ \z@ \XeTeXcharclass `\; \z@ \XeTeXcharclass `\: \z@ \XeTeXcharclass `\« \z@ @@ -8701,7 +11675,9 @@ and may look very wrong.} } } { - \msg_warning:nn {polyglossia} {latin / ineffective footnote option} + \iflatin@ecclesiasticfootnotes + \msg_warning:nn {polyglossia} {latin / ineffective footnote option} + \fi } } @@ -8723,6 +11699,8 @@ and may look very wrong.} %%%%% Language variants: classic, medieval, modern, and ecclesiastic +\str_new:N \l_polyglossia_latin_variant_str + \msg_new:nnn {polyglossia} {latin / language variant} { Activating~Latin~language~variant~"#1"~\msg_line_context:. @@ -8740,7 +11718,8 @@ and may look very wrong.} \bool_set_false:N \l_polyglossia_latin_use_digraphs_bool \bool_set_true:N \l_polyglossia_latin_capitalize_month_bool \bool_set_false:N \l_polyglossia_latin_punctuation_spacing_bool - \SetLanguageKeys {latin} { babelname = latin.classic } + \str_set:Nn \l_polyglossia_latin_variant_str {classic} + \SetLanguageKeys {latin} { babelname = classiclatin, bcp47 = la-x-classic } \polyglossia_latin_set_patterns:n {classiclatin} } @@ -8751,7 +11730,8 @@ and may look very wrong.} \bool_set_true:N \l_polyglossia_latin_use_digraphs_bool \bool_set_true:N \l_polyglossia_latin_capitalize_month_bool \bool_set_false:N \l_polyglossia_latin_punctuation_spacing_bool - \SetLanguageKeys {latin} { babelname = latin.medieval } + \str_set:Nn \l_polyglossia_latin_variant_str {medieval} + \SetLanguageKeys {latin} { babelname = medievallatin, bcp47 = la-x-medieval } \polyglossia_latin_use_modern_patterns: } @@ -8762,7 +11742,8 @@ and may look very wrong.} \bool_set_false:N \l_polyglossia_latin_use_digraphs_bool \bool_set_true:N \l_polyglossia_latin_capitalize_month_bool \bool_set_false:N \l_polyglossia_latin_punctuation_spacing_bool - \SetLanguageKeys {latin} { babelname = latin } + \str_set:Nn \l_polyglossia_latin_variant_str {modern} + \SetLanguageKeys {latin} { babelname = latin, bcp47 = la } \polyglossia_latin_use_modern_patterns: } @@ -8773,7 +11754,8 @@ and may look very wrong.} \bool_set_true:N \l_polyglossia_latin_use_digraphs_bool \bool_set_false:N \l_polyglossia_latin_capitalize_month_bool \bool_set_true:N \l_polyglossia_latin_punctuation_spacing_bool - \SetLanguageKeys {latin} { babelname = latin.ecclesiastic } + \str_set:Nn \l_polyglossia_latin_variant_str {ecclesiastic} + \SetLanguageKeys {latin} { babelname = ecclesiasticlatin, bcp47 = la-x-ecclesia } \polyglossia_latin_use_modern_patterns: } @@ -8841,7 +11823,7 @@ and may look very wrong.} The~Latin~hyphenation~variant~"#1"~is~undefined~\msg_line_context:. } -\define@key{latin}{hyphenation} +\define@key {latin} {hyphenation} { \str_case:nnTF {#1} { @@ -8940,6 +11922,11 @@ and may look very wrong.} { } +% Register default options +\xpg@initialize@gloss@options{latin}{variant=modern,hyphenation=modern,babelshorthands=false, + prosodicshorthands=false,ecclesiasticfootnotes=false, + usej=false,capitalizemonth=true} + \ifsystem@babelshorthands \setkeys{latin}{babelshorthands=true} \else @@ -9322,7 +12309,7 @@ and may look very wrong.} %% Copyright (C) Claudio Beccari 2013-2016 %% Copyright (C) Élie Roux 2016-2019 -%% Copyright (C) Keno Wehr 2019 +%% Copyright (C) Keno Wehr 2019-2020 %% %% Permission is hereby granted, free of charge, to any person obtaining %% a copy of this software and associated documentation files @@ -9400,12 +12387,16 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-latvian.ldf}[polyglossia: module for latvian] \PolyglossiaSetup{latvian}{ + bcp47=lv, hyphennames={latvian}, hyphenmins={2,2}, langtag=LVI, fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{latvian}{lv} + \def\captionslatvian{% \def\prefacename{Priekšvārds}% \def\refname{Literatūras saraksts}% @@ -9451,6 +12442,7 @@ and may look very wrong.} \ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian] \PolyglossiaSetup{lithuanian}{ + bcp47=lt, hyphennames={lithuanian}, hyphenmins={2,2}, langtag=LTH, @@ -9458,6 +12450,9 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{lithuanian}{lt} + \def\captionslithuanian{% \def\prefacename{Pratarmė}% \def\refname{Literatūra}% @@ -9514,6 +12509,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-lithuanian.ldf> +%<*gloss-lo.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-lo.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-lo.ldf}[polyglossia: module for lo (lao)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{lao} + +% \end{macrocode} +% \iffalse +%</gloss-lo.ldf> %<*gloss-lowersorbian.ldf> % \fi % \clearpage @@ -9545,6 +12555,36 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-lsorbian.ldf> +%<*gloss-lt.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-lt.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-lt.ldf}[polyglossia: module for lt (lithuanian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{lithuanian} + +% \end{macrocode} +% \iffalse +%</gloss-lt.ldf> +%<*gloss-lv.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-lv.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-lv.ldf}[polyglossia: module for lv (latvian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{latvian} + +% \end{macrocode} +% \iffalse +%</gloss-lv.ldf> %<*gloss-macedonian.ldf> % \fi % \clearpage @@ -9553,6 +12593,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-macedonian.ldf}[polyglossia: module for macedonian] \PolyglossiaSetup{macedonian}{ + bcp47=mk, script=Cyrillic, scripttag=cyrl, langtag=MKD, @@ -9562,6 +12603,9 @@ and may look very wrong.} fontsetup } +% BCP-47 compliant aliases +\setlanguagealias*{macedonian}{mk} + \def\macedonian@Alph#1{% \ifcase#1\or А\or Б\or В\or Г\or Д\or Ѓ\or Е\or @@ -9662,11 +12706,17 @@ and may look very wrong.} \RequirePackage{hijrical} \PolyglossiaSetup{malay}{% + bcp47=id, language=Malay, langtag=MLY, hyphennames={malay,melayu,bahasam,bahasai,indonesian,indon,bahasa}, hyphenmins={2,2}, - fontsetup=true} + fontsetup=true +} + +% BCP-47 compliant aliases +\setlanguagealias*[variant=malaysian]{malay}{zsm} +\setlanguagealias*[variant=indonesian]{malay}{id} % Babel aliases \setlanguagealias[variant=indonesian]{malay}{bahasai} @@ -9689,7 +12739,7 @@ and may look very wrong.} \malay@melayutrue \fi \ifmalay@melayu - \SetLanguageKeys{malay}{language=Malay,langtag=MLY,babelname=bahasam}% + \SetLanguageKeys{malay}{language=Malay,langtag=MLY,babelname=bahasam,bcp47=zsm}% \xpg@fontsetup@latin{malay}% % Check if \l@malay is defined. If not, try to set it to some variety % (specific order as in the csv list below), or null language if everything fails @@ -9707,7 +12757,7 @@ and may look very wrong.} }% }% \else - \SetLanguageKeys{malay}{language=Indonesian,langtag=IND,babelname=bahasa}% + \SetLanguageKeys{malay}{language=Indonesian,langtag=IND,babelname=bahasa,bcp47=id}% \xpg@fontsetup@latin{malay}% % Check if \l@indonesian is defined. If not, try to set it to some variety % (specific order as in the csv list below), or null language if everything fails @@ -9728,6 +12778,9 @@ and may look very wrong.} \xpg@info{Option: malay, variant=\val}% }{\xpg@warning{Unknown malay variant `#1'}} +% Register default options +\xpg@initialize@gloss@options{malay}{variant=malaysian} + \def\malay@language{% \polyglossia@setup@language@patterns{\malay@variant}% @@ -9853,6 +12906,7 @@ and may look very wrong.} % Translations provided by Kevin & Siji, 01-11-2009 \PolyglossiaSetup{malayalam}{ + bcp47=ml, script=Malayalam, scripttag=mlym, langtag=MAL, %FIXME there is also MLR for "Malayalam Reformed" @@ -9861,6 +12915,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{malayalam}{ml} + \def\captionsmalayalam{% \def\abstractname{സാരാംശം}% \def\appendixname{ശിഷ്ടം}% @@ -9911,6 +12968,7 @@ and may look very wrong.} % \subsection{gloss-marathi.ldf} % \begin{macrocode} % Translations provided by Abhijit Navale <abhi_navale@live.in> +% Ordinals (1-100) added by Niranjan Tambe <niranjanvikastambe@gmail.com> on 14th December, 2019 % TODO implement Hindu calendar (not used in day-to-day practice) \ProvidesFile{gloss-marathi.ldf}[polyglossia: module for marathi] @@ -9923,6 +12981,7 @@ and may look very wrong.} \RequirePackage{devanagaridigits} \PolyglossiaSetup{marathi}{ + bcp47=mr, script=Devanagari, scripttag=deva, langtag=MAR, @@ -9933,15 +12992,25 @@ and may look very wrong.} %TODO nouppercase=true, } -\def\tmp@western{Western} +% BCP-47 compliant aliases +\setlanguagealias*{marathi}{mr} + \newif\ifmarathi@devanagari@numerals \marathi@devanagari@numeralstrue -\define@key{marathi}{numerals}[Devanagari]{% - \def\@tmpa{#1}% - \ifx\@tmpa\tmp@western - \marathi@devanagari@numeralsfalse - \fi} +\define@choicekey*+{marathi}{numerals}[\val\nr]{Western,Devanagari}[Devanagari]{% + \ifcase\nr\relax + % Western: + \marathi@devanagari@numeralsfalse% + \or + % Devanagari: + \marathi@devanagari@numeralstrue% + \fi + \xpg@info{Option: Marathi, numerals=\val}% +}{\xpg@warning{Unknown Marathi numerals value `#1'}} + +% Register default options +\xpg@initialize@gloss@options{marathi}{numerals=Devanagari} \newcommand{\marathinumerals}[2]{\marathinumber{#2}} @@ -9950,55 +13019,155 @@ and may look very wrong.} \devanagaridigits{\number#1}% \else \number#1% - \fi} + \fi% +} \def\captionsmarathi{% \def\refname{संदर्भ}% \def\abstractname{सारांश}% - \def\bibname{संदर्भ ग्रंथांची यादी}% + \def\bibname{संदर्भसूची}% \def\prefacename{प्रस्तावना}% \def\chaptername{प्रकरण}% \def\appendixname{परिशिष्ट}% \def\contentsname{अनुक्रमणिका}% - \def\listfigurename{आकृत्यांची यादी}% - \def\listtablename{कोष्टकांची यादी}% + \def\listfigurename{आकृत्यांची सूची}% + \def\listtablename{कोष्टक सूची}% \def\indexname{सूची}% \def\figurename{आकृती}% \def\tablename{कोष्टक}% - %\def\thepart{}% TODO - \def\partname{भाग}% - \def\pagename{पान}% - \def\seename{पहा}% - \def\alsoname{हे सुध्दा पहा}% + \def\partname{खंड}% + \def\pagename{पृष्ठ}% + \def\seename{पाहा}% + \def\alsoname{हेदेखील पाहा}% \def\enclname{समाविष्ट}% - \def\ccname{सि.सि.}% + \def\ccname{सी.सी.}% \def\headtoname{प्रति}% \def\proofname{सिद्धता}% - \def\glossaryname{स्पष्टीकरणांची यादी}% + \def\glossaryname{संक्षेपसूची}% \def\authorsand{आणि}% } + \def\datemarathi{% \def\marathimonth{% \ifcase\month\or - जानेवारी\or - फेब्रुवारी\or - मार्च\or - एप्रिल\or - मे\or - जून\or - जुलै\or - ऑगस्ट\or - सप्टेंबर\or - ऑक्टोबर\or - नोव्हेंबर\or - डिसेंबर\fi + जानेवारी\or + फेब्रुवारी\or + मार्च\or + एप्रिल\or + मे\or + जून\or + जुलै\or + ऑगस्ट\or + सप्टेंबर\or + ऑक्टोबर\or + नोव्हेंबर\or + डिसेंबर% + \fi% }% - \def\today{\marathinumber\day\space\marathimonth\space\marathinumber\year}% + \def\today{% + \marathinumber\day\space\marathimonth\space\marathinumber\year% + }% +} + +\def\devanagari@akshar#1{\ifcase#1\or अ\or आ\or इ\or ई\or उ\or ऊ\or ए\or ऐ\or ओ\or औ\or अं\or अः\else\@ctrerr\fi} + +\def\devanagari@alph#1{% + \ifcase#1\or क\or ख\or ग\or घ\or ङ\or च\or छ\or ज\or झ\or ञ\or ट\or ठ\or ड\or ढ\or ण\or त\or थ\or द% + \or ध\or न\or प\or फ\or ब\or भ\or म\or य\or र\or ल\or व\or श\or ष\or स\or ह\or ळ\else\@ctrerr% + \fi% +} + +\def\devanagari@letter#1{% + \ifcase#1\or एक\or दोन\or तीन\or चार\or पाच\or सहा\or सात\or आठ\or नऊ\or दहा\or अकरा\or बारा\or तेरा\or चौदा% + \or पंधरा\or सोळा\or सतरा\or अठरा\or एकोणीस\or वीसएकवीस\or बावीस\or तेवीस\or चोवीस\or पंचवीस\or सव्वीस\or सत्तावीस\or अठाव्वीस% + \or एकोणतीस\or तीस\or एकतीस\or बत्तीस\or तेहेत्तीस \or चौतीस \or पस्तीस \or छत्तीस \or सतदिस \or अडतीस \or एकोणचाळीस \or चाळीस % + \or एक्केचाळीस \or बेचाळीस \or त्रेचाळीस \or चौवेचाळीस\or पंचेचाळीस \or सेहेचाळीस \or सत्तेचाळीस \or अठ्ठेचाळीस \or एकोणपन्नास \or पन्नास % + \or एक्कावन्न \or बावन्न \or त्रेपन्न \or चोपन्न \or पंचावन्न \or छपन्न\or सत्तावन्न \or अठ्ठावन्न \or एकोणसाठ \or साठ \or एकसष्ठ \or बासष्ठ \or त्रेसष्ट % + \or चौसष्ठ \or पासष्ठ \or सहासष्ठ \or सदुष्ठ \or अडुसष्ठ \or एकोणसत्तर\or सत्तर \or एकाहत्तर \or बहात्तर \or त्र्याहत्तर \or चौऱ्याहत्तर \or पंच्याहत्तर % + \or शहात्तर \or सत्याहत्तर \or अठ्याहत्तर \or एकोणऐशी \or ऐंशी\or एक्याऐंशी \or ब्याऐंशी \or त्र्याऐंशी \or चौऱ्याऐंशी \or पंच्याऐंशी \or शह्यांशी \or सत्यांऐंशी % + \or अठ्ठ्याऐंशी \or एकोणनव्वद \or नव्वद \or एक्याण्णव\or ब्याण्णव \or त्र्याण्णव \or चौऱ्याण्णव \or पंच्याण्णव \or शहाण्णव \or सत्याण्णव \or अठ्याण्णव % + \or नव्याण्णव \or शंभर\else\@ctrerr% + \fi% +} + +\let\xpg@save@roman\@roman +\let\xpg@save@Roman\@Roman + +\def\marathi@numbers{% + \let\@alph\devanagari@akshar + \let\@Alph\devanagari@letter + \let\@roman\devanagari@alph + \let\@Roman\devanagari@letter +} + +\def\nomarathi@numbers{% + \let\@alph\latin@alph% + \let\@Alph\latin@Alph% + \let\@roman\xpg@save@roman + \let\@Roman\xpg@save@Roman +} + +\def\blockextras@marathi{% + \let\xpg@orig@baselinestretch\baselinestrech% + \renewcommand{\baselinestretch}{1.2}% + \renewcommand{\labelitemii}{$\rightarrow$}% +} + +\let\xpg@orig@labelitemii\labelitemii + +\def\noextras@marathi{% + \let\baselinestrech\xpg@orig@baselinestretch% + \let\labelitemii\xpg@orig@labelitemii% } % \end{macrocode} % \iffalse %</gloss-marathi.ldf> +%<*gloss-mk.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-mk.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-mk.ldf}[polyglossia: module for mk (macedonian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{macedonian} + +% \end{macrocode} +% \iffalse +%</gloss-mk.ldf> +%<*gloss-ml.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-ml.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-ml.ldf}[polyglossia: module for ml (malayalam)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{malayalam} + +% \end{macrocode} +% \iffalse +%</gloss-ml.ldf> +%<*gloss-mn.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-mn.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-mn.ldf}[polyglossia: module for mn (mongolian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{mongolian} + +% \end{macrocode} +% \iffalse +%</gloss-mn.ldf> %<*gloss-mongolian.ldf> % \fi % \clearpage @@ -10010,6 +13179,7 @@ and may look very wrong.} \RequirePackage{xpg-cyrillicnumbers} \PolyglossiaSetup{mongolian}{ + bcp47=mn, script=Cyrillic, scripttag=cyrl, langtag=MNG, @@ -10021,6 +13191,9 @@ and may look very wrong.} Localnumeral=Mongoliannumerals } +% BCP-47 compliant aliases +\setlanguagealias*{mongolian}{mn} + % This file is derived from mongolian-babel. which % provides support for Mongolian (Khalkha variety) % with Cyrillic script @@ -10028,15 +13201,32 @@ and may look very wrong.} % variants of Mongolian \newif\ifcyrillic@numerals -\define@key{mongolian}{numerals}[arabic]{% - \ifstrequal{#1}{cyrillic}% - {\cyrillic@numeralstrue}% - {\cyrillic@numeralsfalse}% -} +\newif\ifcyrillic@asbuk@numerals +\define@choicekey*+{mongolian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{% + \ifcase\nr\relax + % arabic: + \cyrillic@numeralsfalse% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-trad: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-alph: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralstrue% + \fi + \xpg@info{Option: Mongolian, numerals=\val}% +}{\xpg@warning{Unknown Mongolian numerals value `#1'}} -\define@boolkey{mongolian}[mongolian@]{babelshorthands}[false]{} +\define@boolkey{mongolian}[mongolian@]{babelshorthands}[true]{} -\setkeys{mongolian}{numerals} +% Register default options +\xpg@initialize@gloss@options{mongolian}{babelshorthands=false,numerals=arabic} \ifsystem@babelshorthands \setkeys{mongolian}{babelshorthands=true} @@ -10131,7 +13321,11 @@ and may look very wrong.} \def\mongoliannumber#1{% \ifcyrillic@numerals - \cyr@alph{#1}% + \ifcyrillic@asbuk@numerals + \mongolian@asbuk@alph{#1}% + \else + \cyr@alph{#1}% + \fi \else \number#1% \fi% @@ -10139,7 +13333,11 @@ and may look very wrong.} \def\Mongoliannumber#1{% \ifcyrillic@numerals - \cyr@Alph{#1}% + \ifcyrillic@asbuk@numerals + \mongolian@asbuk@Alph{#1}% + \else + \cyr@Alph{#1}% + \fi \else \number#1% \fi% @@ -10148,24 +13346,29 @@ and may look very wrong.} \let\mongoliannumeral=\mongoliannumber \let\Mongoliannumeral=\Mongoliannumber -\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\Asbuk#1{\expandafter\mongolian@asbuk@Alph\csname c@#1\endcsname} +\def\asbuk#1{\expandafter\mongolian@asbuk@alph\csname c@#1\endcsname} -\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname} +\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} % This is a poor man's cyrillic alphanumeric. It just uses the alphabet and -% thus ends at 30. We now use proper cyrillic numbering. - -%\def\mongolian@Alph#1{\ifcase#1\or -% А\or Б\or В\or Г\or Д\or Е\or Ж\or -% З\or И\or К\or Л\or М\or Н\or О\or -% П\or Р\or С\or Т\or У\or Ф\or Х\or -% Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я\else\xpg@ill@value{#1}{mongolian@Alph}\fi} +% thus ends at 30. +\def\mongolian@asbuk@Alph#1{\ifcase#1\or + А\or Б\or В\or Г\or Д\or Е\or Ж\or + З\or И\or К\or Л\or М\or Н\or О\or + П\or Р\or С\or Т\or У\or Ф\or Х\or + Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я% + \else\xpg@ill@value{#1}{mongolian@asbuk@Alph}\fi% +} -%\def\mongolian@alph#1{\ifcase#1\or -% а\or б\or в\or г\or д\or е\or ж\or -% з\or и\or к\or л\or м\or н\or о\or -% п\or р\or с\or т\or у\or ф\or х\or -% ц\or ч\or ш\or щ\or э\or ю\or я\else\xpg@ill@value{#1}{mongolian@alph}\fi} +\def\mongolian@asbuk@alph#1{\ifcase#1\or + а\or б\or в\or г\or д\or е\or ж\or + з\or и\or к\or л\or м\or н\or о\or + п\or р\or с\or т\or у\or ф\or х\or + ц\or ч\or ш\or щ\or э\or ю\or я% + \else\xpg@ill@value{#1}{mongolian@asbuk@alph}\fi% +} \def\mongolian@numbers{% \let\latin@alph\@alph @@ -10200,6 +13403,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-mongolian.ldf> +%<*gloss-mr.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-mr.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-mr.ldf}[polyglossia: module for mr (marathi)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{marathi} + +% \end{macrocode} +% \iffalse +%</gloss-mr.ldf> %<*gloss-naustrian.ldf> % \fi % \clearpage @@ -10215,6 +13433,21 @@ and may look very wrong.} % \end{macrocode} % \iffalse %</gloss-naustrian.ldf> +%<*gloss-nb.ldf> +% \fi +% \clearpage +% +% \subsection{gloss-nb.ldf} +% \begin{macrocode} +\ProvidesFile{gloss-nb.ldf}[polyglossia: module for nb (norwegian)] + +% We provide this as a bcp47-compliant alias + +\xpg@load@master@language{norwegian} + +% \end{macrocode} +% \iffalse +%</gloss-nb.ldf> %<*gloss-newzealand.ldf> % \fi % \clearpage @@ -10253,6 +13486,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-nko.ldf}[Polyglossia: module for N’Ko v0.1 2013/05/19] \PolyglossiaSetup{nko}{% + bcp47=nko, script=N'ko, scripttag=nko~, langtag=NKO, @@ -10261,6 +13495,7 @@ and may look very wrong.} direction=RL, localnumeral=nkonumerals } + \RequirePackage{nkonumbers}% \newcommand{\nkonumerals}[2]{\nkonumber{#2}} @@ -10361,6 +13596,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-norwegian.ldf}[polyglossia: module for norwegian] \PolyglossiaSetup{norwegian}{ + bcp47=nn, hyphennames={nynorsk}, langtag=NYN, hyphenmins={2,2}, @@ -10368,6 +13604,9 @@ and may look very wrong.} fontsetup=false, } +% BCP-47 compliant aliases +\setlanguagealias*[variant=bokmal]{norwegian}{nb} +\setlanguagealias*[variant=nynorsk]{norwegian}{nn} % Babel and backwards compat. aliases \setlanguagealias[variant=bokmal]{norwegian}{norsk} \setlanguagealias[variant=nynorsk]{norwegian}{nynorsk} @@ -10377,20 +13616,24 @@ and may look very wrong.} \ifcase\nr\relax % nynorsk: \def\norwegian@variant{nynorsk}% - \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk}% + \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn}% \xpg@fontsetup@latin{norwegian}% \or % bokmal: \def\norwegian@variant{norsk}% - \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk}% + \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb}% \xpg@fontsetup@latin{norwegian}% \fi \xpg@info{Option: norwegian, variant=\val}% }{\xpg@warning{Unknown norwegian variant `#1'}} +% Register default options +\xpg@initialize@gloss@options{norwegian}{variant=nynorsk} + + \def\norwegian@language{% - \polyglossia@setup@language@patterns{\norwegian@variant} + \polyglossia@setup@language@patterns{\norwegian@variant}% }% \def\captionsnorwegian@nynorsk{% @@ -10525,6 +13768,7 @@ and may look very wrong.} \ProvidesFile{gloss-occitan.ldf}[2016/02/04 v0.3 polyglossia: module for Occitan] \PolyglossiaSetup{occitan}{ + bcp47=oc, hyphennames={occitan}, langtag=OCI, hyphenmins={2,2}, @@ -10532,6 +13776,10 @@ and may look very wrong.} indentfirst=true, fontsetup=true, } + +% BCP-47 compliant aliases +\setlanguagealias*{occitan}{oc} + \define@boolkey{occitan}[occitan@]{babelshorthands}[true]{} \ifsystem@babelshorthands @@ -10687,6 +13935,7 @@ and may look very wrong.} \RequirePackage{farsical} \RequirePackage{hijrical} \PolyglossiaSetup{persian}{ + bcp47=fa, babelname=farsi, script=Arabic, direction=RL, @@ -10697,6 +13946,9 @@ and may look very wrong.} localnumeral=farsinumerals } +% BCP-47 compliant aliases +\setlanguagealias*{persian}{fa} + % Babel and backwards compat. alias \setlanguagealias{persian}{farsi} @@ -10723,7 +13975,8 @@ and may look very wrong.} %TODO add option for CALENDAR -\setkeys{persian}{locale,numerals} +% Register default options +\xpg@initialize@gloss@options{persian}{locale=default,numerals=eastern,abjadjimnotail=false} \def\farsigregmonth#1{\ifcase#1% \or ژانویه\or فوریه\or مارس\or آوریل\or مه\or ژوئن\or ژوئیه\or اوت\or سپتامبر\or اکتبر\or نوامبر\or دسامبر\fi} @@ -10764,28 +14017,13 @@ and may look very wrong.} \newcommand{\farsinumerals}[2]{\farsinumber{#2}} -\newif\ifpersiandigits - \def\farsinumber#1{% \if@western@numerals \number#1% \else - \ifxetex - \ifnum\XeTeXcharglyph"06F0 > 0\relax - \persiandigitstrue - \fi - \else\ifluatex - \expandafter\ifnum\directlua{polyglossia.check_char(0x6F0)} > 0\relax - \persiandigitstrue - \fi - \fi\fi - \ifpersiandigits - \farsidigits{\number#1}% - %%{\protect\addfontfeature{Mapping=farsidigits}\number#1}% - \else% - \arabicdigits{\number#1}% - %%{\protect\addfontfeature{Mapping=arabicdigits}\number#1}% - \fi + \xpg@if@char@available{06F0}% + {\farsidigits{\number#1}}% + {\arabicdigits{\number#1}}% \fi } @@ -10841,6 +14079,7 @@ and may look very wrong.} \ProvidesFile{gloss-piedmontese.ldf}[2013/02/12 v1.0 polyglossia: module for piedmontese] \makeatletter \PolyglossiaSetup{piedmontese}{ + bcp47=pms, hyphennames={piedmontese}, hyphenmins={2,2}, langtag=PMS, @@ -10848,6 +14087,8 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{piedmontese}{pms} \define@boolkey{piedmontese}[piedmontese@]{babelshorthands}[true]{} @@ -10963,6 +14204,7 @@ and may look very wrong.} % \begin{macrocode} \ProvidesFile{gloss-polish.ldf}[polyglossia: module for polish] \PolyglossiaSetup{polish}{ + bcp47=pl, hyphennames={polish}, hyphenmins={2,2}, langtag=PLK, @@ -10970,6 +14212,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{polish}{pl} + \def\captionspolish{% \def\prefacename{Przedmowa}% \def\refname{Literatura}% @@ -11047,6 +14292,7 @@ and may look very wrong.} \ProvidesFile{gloss-portuguese.ldf}[polyglossia: module for portuguese] \PolyglossiaSetup{portuguese}{ + bcp47=pt-PT, babelname=portuges, hyphennames={portuges,portuguese}, hyphenmins={2,3}, @@ -11054,6 +14300,11 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*[variant=portuguese]{portuguese}{pt-PT} +\setlanguagealias*[variant=brazilian]{portuguese}{pt-BR} +\setlanguagealias*{portuguese}{pt} + % Babel aliases \setlanguagealias[variant=portuguese]{portuguese}{portuges} \setlanguagealias[variant=brazilian]{portuguese}{brazil} @@ -11063,11 +14314,11 @@ and may look very wrong.} \ifcase\nr\relax % portuguese: \def\portuguese@variant{portuges}% - \SetLanguageKeys{portuguese}{babelname=portuges}% + \SetLanguageKeys{portuguese}{babelname=portuges,bcp47=pt-PT}% \or % brazilian: \def\portuguese@variant{brazil}% - \SetLanguageKeys{portuguese}{babelname=brazil}% + \SetLanguageKeys{portuguese}{babelname=brazil,bcp47=pt-BR}% \xpg@ifdefined{brazil}{}% {\xpg@warning{No hyphenation patterns were loaded for "Portuguese (Brazil)"\MessageBreak I will use the standard patterns for Portuguese instead}% @@ -11077,8 +14328,12 @@ and may look very wrong.} }{\xpg@warning{Unknown portuguese variant `#1'}} +% Register default options +\xpg@initialize@gloss@options{portuguese}{variant=portuguese} + + \def\portuguese@language{% - \polyglossia@setup@language@patterns{\portuguese@variant} + \polyglossia@setup@language@patterns{\portuguese@variant}% }% \def\captionsportuguese@portuges{% @@ -11164,12 +14419,16 @@ and may look very wrong.} \ProvidesFile{gloss-romanian.ldf}[polyglossia: module for romanian] \PolyglossiaSetup{romanian}{ + bcp47=ro, hyphennames={romanian}, hyphenmins={2,2}, langtag=ROM, fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{romanian}{ro} + \def\captionsromanian{% \def\refname{Bibliografie}% \def\abstractname{Rezumat}% @@ -11215,6 +14474,7 @@ and may look very wrong.} \ProvidesFile{gloss-romansh.ldf}[polyglossia: module for romansh] \makeatletter \PolyglossiaSetup{romansh}{% + bcp47=rm, hyphennames={romansh}, hyphenmins={2,2}, langtag=RMS, @@ -11222,6 +14482,8 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{romansh}{rm} \def\captionsromansh{% \def\prefacename{Prefaziun}% @@ -11268,6 +14530,7 @@ and may look very wrong.} \RequirePackage{xpg-cyrillicnumbers} \PolyglossiaSetup{russian}{ + bcp47=ru, script=Cyrillic, scripttag=cyrl, langtag=RUS, @@ -11280,11 +14543,16 @@ and may look very wrong.} Localnumeral=Russiannumerals } +% BCP-47 compliant aliases +\setlanguagealias*{russian}{ru} +\setlanguagealias*[spelling=modern]{russian}{ru-luna1918} +\setlanguagealias*[spelling=old]{russian}{ru-petr1708} + \newif\if@russian@modern \define@key{russian}{spelling}[modern]{% \ifstrequal{#1}{old}% - {\@russian@modernfalse}% - {\@russian@moderntrue}% + {\@russian@modernfalse\SetLanguageKeys{russian}{bcp47=ru-petr1708}}% + {\@russian@moderntrue\SetLanguageKeys{russian}{bcp47=ru}}% } \def\captionsrussian{% @@ -11296,13 +14564,29 @@ and may look very wrong.} }% \newif\ifcyrillic@numerals -\define@key{russian}{numerals}[arabic]{% - \ifstrequal{#1}{cyrillic}% - {\cyrillic@numeralstrue}% - {\cyrillic@numeralsfalse}% -} +\newif\ifcyrillic@asbuk@numerals +\define@choicekey*+{russian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{% + \ifcase\nr\relax + % arabic: + \cyrillic@numeralsfalse% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-trad: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-alph: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralstrue% + \fi + \xpg@info{Option: Russian, numerals=\val}% +}{\xpg@warning{Unknown Russian numerals value `#1'}} -\define@boolkey{russian}[russian@]{indentfirst}{ +\define@boolkey{russian}[russian@]{indentfirst}[true]{ \ifrussian@indentfirst \SetLanguageKeys{russian}{indentfirst=true} \else @@ -11310,9 +14594,12 @@ and may look very wrong.} \fi } -\define@boolkey{russian}[russian@]{babelshorthands}[false]{} +\define@boolkey{russian}[russian@]{babelshorthands}[true]{} + + +% Register default options +\xpg@initialize@gloss@options{russian}{babelshorthands=false,spelling=modern,numerals=arabic,indentfirst=false} -\setkeys{russian}{spelling,numerals} \ifsystem@babelshorthands \setkeys{russian}{babelshorthands=true} @@ -11496,7 +14783,11 @@ and may look very wrong.} \def\russiannumber#1{% \ifcyrillic@numerals - \cyr@alph{#1}% + \ifcyrillic@asbuk@numerals + \russian@asbuk@alph{#1}% + \else + \cyr@alph{#1}% + \fi \else \number#1% \fi% @@ -11504,7 +14795,11 @@ and may look very wrong.} \def\Russiannumber#1{% \ifcyrillic@numerals - \cyr@Alph{#1}% + \ifcyrillic@asbuk@numerals + \russian@asbuk@Alph{#1}% + \else + \cyr@Alph{#1}% + \fi \else \number#1% \fi% @@ -11513,24 +14808,30 @@ and may look very wrong.} \let\russiannumeral=\russiannumber \let\Russiannumeral=\Russiannumber -\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\Asbuk#1{\expandafter\russian@asbuk@Alph\csname c@#1\endcsname} +\def\asbuk#1{\expandafter\russian@asbuk@alph\csname c@#1\endcsname} -\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname} +\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} -% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and -% thus ends at 30. We now use proper cyrillic numbering. -%\def\russian@Alph#1{\ifcase#1\or -% А\or Б\or В\or Г\or Д\or Е\or Ж\or -% З\or И\or К\or Л\or М\or Н\or О\or -% П\or Р\or С\or Т\or У\or Ф\or Х\or -% Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я\else\xpg@ill@value{#1}{russian@Alph}\fi} +% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and +% thus ends at 30. +\def\russian@asbuk@Alph#1{\ifcase#1\or + А\or Б\or В\or Г\or Д\or Е\or Ж\or + З\or И\or К\or Л\or М\or Н\or О\or + П\or Р\or С\or Т\or У\or Ф\or Х\or + Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я% + \else\xpg@ill@value{#1}{russian@asbuk@Alph}\fi% +} -%\def\russian@alph#1{\ifcase#1\or -% а\or б\or в\or г\or д\or е\or ж\or -% з\or и\or к\or л\or м\or н\or о\or -% п\or р\or с\or т\or у\or ф\or х\or -% ц\or ч\or ш\or щ\or э\or ю\or я\else\xpg@ill@value{#1}{russian@alph}\fi} +\def\russian@asbuk@alph#1{\ifcase#1\or + а\or б\or в\or г\or д\or е\or ж\or + з\or и\or к\or л\or м\or н\or о\or + п\or р\or с\or т\or у\or ф\or х\or + ц\or ч\or ш\or щ\or э\or ю\or я% + \else\xpg@ill@value{#1}{russian@asbuk@alph}\fi% +} \def\russian@numbers{% \let\latin@alph\@alph @@ -11538,8 +14839,8 @@ and may look very wrong.} \ifcyrillic@numerals% \def\russian@alph##1{\expandafter\russiannumeral\expandafter{\the##1}}% \def\russian@Alph##1{\expandafter\Russiannumeral\expandafter{\the##1}}% - \let\@alph\russian@alph% - \let\@Alph\russian@Alph% + \let\@alph\russian@alph% + \let\@Alph\russian@Alph% \fi } @@ -11611,6 +14912,7 @@ and may look very wrong.} \ProvidesFile{gloss-sami.ldf}[polyglossia: module for sami] \PolyglossiaSetup{sami}{ + bcp47=se, babelname=samin, hyphennames={samin}, hyphenmins={2,2}, @@ -11619,6 +14921,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{sami}{se} + % Babel and backwards compat. alias \setlanguagealias{sami}{samin} %\setlanguagealias[variant=northern]{sami}{samin} @@ -11642,7 +14947,7 @@ and may look very wrong.} %\def\sami@language{% -% \polyglossia@setup@language@patterns{\sami@variant} +% \polyglossia@setup@language@patterns{\sami@variant}% %}% \def\captionssami@northern{% @@ -11731,6 +15036,7 @@ and may look very wrong.} \RequirePackage{devanagaridigits} \PolyglossiaSetup{sanskrit}{ + bcp47=sa-Deva, langtag=SAN, hyphennames={sanskrit,prakrit}, hyphenmins={1,3}, @@ -11739,6 +15045,16 @@ and may look very wrong.} localnumeral=sanskritnumerals } +% BCP-47 compliant aliases +\setlanguagealias*{sanskrit}{sa} +\setlanguagealias*[script=Devanagari]{sanskrit}{sa-Deva} +\setlanguagealias*[script=Malayalam]{sanskrit}{sa-Mlym} +\setlanguagealias*[script=Telugu]{sanskrit}{sa-Telu} +\setlanguagealias*[script=Bengali]{sanskrit}{sa-Beng} +\setlanguagealias*[script=Kannada]{sanskrit}{sa-Knda} +\setlanguagealias*[script=Gujarati]{sanskrit}{sa-Gujr} +\setlanguagealias*[script=Latin]{sanskrit}{sa-Latn} + \define@key{sanskrit}{Script}[Devanagari]{% \ifcsdef{fontsetup@sanskrit@#1}% {\csname fontsetup@sanskrit@#1\endcsname}% @@ -11749,29 +15065,27 @@ and may look very wrong.} \define@key{sanskrit}{script}[Devanagari]{\setkeys{sanskrit}{Script=#1}} \def\fontsetup@sanskrit@Devanagari{% - \SetLanguageKeys{sanskrit}{scripttag=deva,script=Devanagari} + \SetLanguageKeys{sanskrit}{scripttag=deva,script=Devanagari,bcp47=sa-Deva} \xpg@fontsetup@nonlatin{sanskrit}} \def\fontsetup@sanskrit@Gujarati{% - \SetLanguageKeys{sanskrit}{scripttag=gujr,script=Gujarati} + \SetLanguageKeys{sanskrit}{scripttag=gujr,script=Gujarati,bcp47=sa-Gujr} \xpg@fontsetup@nonlatin{sanskrit}} \def\fontsetup@sanskrit@Malayalam{% - \SetLanguageKeys{sanskrit}{scripttag=mlym,script=Malayalam} + \SetLanguageKeys{sanskrit}{scripttag=mlym,script=Malayalam,bcp47=sa-Mlym} \xpg@fontsetup@nonlatin{sanskrit}} \def\fontsetup@sanskrit@Bengali{% - \SetLanguageKeys{sanskrit}{scripttag=beng,script=Bengali} + \SetLanguageKeys{sanskrit}{scripttag=beng,script=Bengali,bcp47=sa-Beng} \xpg@fontsetup@nonlatin{sanskrit}} \def\fontsetup@sanskrit@Kannada{% - \SetLanguageKeys{sanskrit}{scripttag=knda,script=Kannada} + \SetLanguageKeys{sanskrit}{scripttag=knda,script=Kannada,bcp47=sa-Knda} \xpg@fontsetup@nonlatin{sanskrit}} \def\fontsetup@sanskrit@Telugu{% - \SetLanguageKeys{sanskrit}{scripttag=telu,script=Telugu} + \SetLanguageKeys{sanskrit}{scripttag=telu,script=Telugu,bcp47=sa-Relu} \xpg@fontsetup@nonlatin{sanskrit}} \def\fontsetup@sanskrit@Latin{% - \SetLanguageKeys{sanskrit}{scripttag=latn,script=Latin} + \SetLanguageKeys{sanskrit}{scripttag=latn,script=Latin,bcp47=sa-Latn} \xpg@fontsetup@latin{sanskrit}} -\setkeys{sanskrit}{Script} %sets the default for Devanagari - \newif\ifsanskrit@devanagari@numerals \sanskrit@devanagari@numeralstrue @@ -11787,6 +15101,10 @@ and may look very wrong.} }{\xpg@warning{Unknown Sanskrit numeral `#1'}} +% Register default options +\xpg@initialize@gloss@options{sanskrit}{script=Devanagari,numerals=Devanagari} + + \newcommand{\sanskritnumerals}[2]{\sanskritnumber{#2}} \def\sanskritnumber#1{% @@ -11800,7 +15118,8 @@ and may look very wrong.} \ifluatex \directlua{require('polyglossia-sanskrit')}% \else - \newXeTeXintercharclass\sanskrit@punctthin % ! ? ‼ ⁇ ⁈ ⁉ : ; danda double_danda + \newXeTeXintercharclass\sanskrit@questionexclamation % ! ? ‼ ⁇ ⁈ ⁉ ‽ + \newXeTeXintercharclass\sanskrit@punctthin % : ; danda double_danda \fi \def\sanskrit@punctthinspace{{\unskip\thinspace}} @@ -11810,17 +15129,20 @@ and may look very wrong.} \directlua{polyglossia.activate_sanskrit_punct()}% \else \XeTeXinterchartokenstate=1% - \XeTeXcharclass `\! \sanskrit@punctthin - \XeTeXcharclass `\? \sanskrit@punctthin - \XeTeXcharclass `\‼ \sanskrit@punctthin - \XeTeXcharclass `\⁇ \sanskrit@punctthin - \XeTeXcharclass `\⁈ \sanskrit@punctthin - \XeTeXcharclass `\⁉ \sanskrit@punctthin + \XeTeXcharclass `\! \sanskrit@questionexclamation + \XeTeXcharclass `\? \sanskrit@questionexclamation + \XeTeXcharclass `\‼ \sanskrit@questionexclamation + \XeTeXcharclass `\⁇ \sanskrit@questionexclamation + \XeTeXcharclass `\⁈ \sanskrit@questionexclamation + \XeTeXcharclass `\⁉ \sanskrit@questionexclamation + \XeTeXcharclass `\‽ \sanskrit@questionexclamation % interrobang, U+203D \XeTeXcharclass `\: \sanskrit@punctthin \XeTeXcharclass `\; \sanskrit@punctthin \XeTeXcharclass `\। \sanskrit@punctthin % danda, U+0964 \XeTeXcharclass `\॥ \sanskrit@punctthin % double danda, U+0965 + \XeTeXinterchartoks \z@ \sanskrit@questionexclamation = \sanskrit@punctthinspace \XeTeXinterchartoks \z@ \sanskrit@punctthin = \sanskrit@punctthinspace + \XeTeXinterchartoks \sanskrit@questionexclamation \sanskrit@punctthin = \sanskrit@punctthinspace \fi } @@ -11834,6 +15156,7 @@ and may look very wrong.} \XeTeXcharclass `\⁇ \z@ \XeTeXcharclass `\⁈ \z@ \XeTeXcharclass `\⁉ \z@ + \XeTeXcharclass `\‽ \z@ \XeTeXcharclass `\: \z@ \XeTeXcharclass `\; \z@ \XeTeXcharclass `\। \z@ @@ -11884,6 +15207,7 @@ and may look very wrong.} \RequirePackage{xpg-cyrillicnumbers} \PolyglossiaSetup{serbian}{ + bcp47=sr-Latn, langtag=SRB, hyphennames={serbian}, hyphenmins={2,2}, @@ -11894,6 +15218,11 @@ and may look very wrong.} %TODO localalph } +% BCP-47 compliant aliases +\setlanguagealias*{serbian}{sr} +\setlanguagealias*[script=Cyrillic]{serbian}{sr-Cyrl} +\setlanguagealias*[script=Latin]{serbian}{sr-Latn} + % Babel aliases \setlanguagealias[script=Cyrillic]{serbian}{serbianc} @@ -11902,12 +15231,12 @@ and may look very wrong.} \ifcase\nr\relax % cyrillic: \@serbian@cyrtrue - \SetLanguageKeys{serbian}{scripttag=cyrl,script=Cyrillic,babelname=serbianc} + \SetLanguageKeys{serbian}{scripttag=cyrl,script=Cyrillic,babelname=serbianc,bcp47=sr-Cyrl} \xpg@fontsetup@nonlatin{serbian}% \or % latin: \@serbian@cyrfalse - \SetLanguageKeys{serbian}{scripttag=latn,script=Latin} + \SetLanguageKeys{serbian}{scripttag=latn,script=Latin,bcp47=sr-Latn} \xpg@fontsetup@latin{serbian}% %TODO \def\serbian@language{\language=\l@serbianlat}% % or should we use Croatian patterns as a fallback for the time being??? @@ -11917,17 +15246,34 @@ and may look very wrong.} \define@key{serbian}{script}[Cyrillic]{\setkeys{serbian}{Script=#1}} -\newif\ifserbian@numerals -\define@key{serbian}{numerals}[arabic]{% - \ifstrequal{#1}{latin}{\serbian@numeralsfalse}{% - \ifstrequal{#1}{cyrillic}% - {\serbian@numeralstrue} - {\serbian@numeralsfalse}% - }% -} +\newif\ifcyrillic@numerals +\newif\ifcyrillic@asbuk@numerals +\define@choicekey*+{serbian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{% + \ifcase\nr\relax + % arabic: + \cyrillic@numeralsfalse% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-trad: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-alph: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralstrue% + \fi + \xpg@info{Option: Serbian, numerals=\val}% +}{\xpg@warning{Unknown Serbian numerals value `#1'}} \setkeys{serbian}{Script,numerals} +% Register default options +\xpg@initialize@gloss@options{serbian}{script=Cyrillic,numerals=arabic} + \def\captionsserbian{% \if@serbian@cyr\captionsserbian@cyr\else\captionsserbian@lat\fi } @@ -12012,19 +15358,27 @@ and may look very wrong.} \newcommand{\Serbiannumerals}[2]{\Serbiannumber{#2}} \def\serbiannumber#1{% - \ifserbian@numerals - \cyr@alph{#1}% + \ifcyrillic@numerals + \ifcyrillic@asbuk@numerals + \serbian@asbuk@alph{#1}% + \else + \cyr@alph{#1}% + \fi \else \number#1% - \fi + \fi% } \def\Serbiannumber#1{% - \ifserbian@numerals - \cyr@Alph{#1}% + \ifcyrillic@numerals + \ifcyrillic@asbuk@numerals + \serbian@asbuk@Alph{#1}% + \else + \cyr@Alph{#1}% + \fi \else \number#1% - \fi + \fi% } \let\serbiannumeral=\serbiannumber @@ -12054,24 +15408,29 @@ and may look very wrong.} \ifserbian@numerals\noserbian@numbers\fi } -\def\Asbuk#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\Asbuk#1{\expandafter\serbian@asbuk@Alph\csname c@#1\endcsname} +\def\asbuk#1{\expandafter\serbian@asbuk@alph\csname c@#1\endcsname} -\def\asbuk#1{\expandafter\cyr@alph\csname c@#1\endcsname} +\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} % This is a poor man's cyrillic alphanumeric. It just uses the alphabet and -% thus ends at 30. We now use proper cyrillic numbering. - -%\def\cyr@Alph#1{\ifcase#1\or -% А\or Б\or В\or Г\or Д\or Ђ\or Е\or Ж\or -% З\or И\or Ј\or К\or Л\or Љ\or М\or Н\or -% Њ\or О\or П\or Р\or С\or Т\or Ћ\or У\or -% Ф\or Х\or Ц\or Ч\or Џ\or Ш\else\xpg@ill@value{#1}{cyr@Alph}\fi} +% thus ends at 30. +\def\serbian@asbuk@Alph#1{\ifcase#1\or + А\or Б\or В\or Г\or Д\or Е\or Ж\or + З\or И\or К\or Л\or М\or Н\or О\or + П\or Р\or С\or Т\or У\or Ф\or Х\or + Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я% + \else\xpg@ill@value{#1}{serbian@asbuk@Alph}\fi% +} -%\def\cyr@alph#1{\ifcase#1\or -% а\or б\or в\or г\or д\or ђ\or е\or ж\or -% з\or и\or ј\or к\or л\or љ\or м\or н\or -% њ\or о\or п\or р\or с\or т\or ћ\or у\or -% ф\or х\or ц\or ч\or џ\or ш\else\xpg@ill@value{#1}{cyr@alph}\fi} +\def\serbian@asbuk@alph#1{\ifcase#1\or + а\or б\or в\or г\or д\or е\or ж\or + з\or и\or к\or л\or м\or н\or о\or + п\or р\or с\or т\or у\or ф\or х\or + ц\or ч\or ш\or щ\or э\or ю\or я% + \else\xpg@ill@value{#1}{serbian@asbuk@alph}\fi% +} % \end{macrocode} @@ -12101,12 +15460,16 @@ and may look very wrong.} \ProvidesFile{gloss-slovak.ldf}[polyglossia: module for slovak] \PolyglossiaSetup{slovak}{ + bcp47=sk, hyphennames={slovak}, hyphenmins={2,2}, langtag=SKY, fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{slovak}{sk} + \ifluatex \RequirePackage{luavlna} \fi @@ -12117,7 +15480,8 @@ and may look very wrong.} \define@boolkey{slovak}[slovak@]{vlna}[true]{} -\setkeys{slovak}{splithyphens,vlna} +% Register default options +\xpg@initialize@gloss@options{slovak}{babelshorthands=false,splithyphens=true,vlna=true} \ifsystem@babelshorthands \setkeys{slovak}{babelshorthands=true} @@ -12132,8 +15496,12 @@ and may look very wrong.} }{} \def\slovak@@splhyphen#1{% - \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}% - \nobreak\hskip\z@% + \ifnum\hyphenchar \font>0% + \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}% + \nobreak\hskip\z@% + \else% + #1% + \fi% } \def\slovak@splhyphen{% @@ -12320,13 +15688,13 @@ and may look very wrong.} \def\blockextras@slovak{% \ifslovak@babelshorthands\slovak@shorthands\fi% \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi% - \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyhens\fi% + \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi% } \def\inlineextras@slovak{% \ifslovak@babelshorthands\slovak@shorthands\fi% \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi% - \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyhens\fi% + \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi% } % \end{macrocode} @@ -12356,6 +15724,7 @@ and may look very wrong.} \ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for slovenian] \PolyglossiaSetup{slovenian}{ + bcp47=sl, hyphennames={slovenian,slovene}, babelname=slovene, hyphenmins={2,2}, @@ -12363,18 +15732,16 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{slovenian}{sl} + % Babel aliases \setlanguagealias{slovenian}{slovene} -\providebool{slovenian@localalph} -\define@boolkey{slovenian}[slovenian@]{localalph}[false]{% - \def\@tmpa{#1}% - \def\@tmptrue{true}% - \ifx\@tmpa\@tmptrue - \slovenian@localalphtrue - \fi - \setlocalalph -} +\define@boolkey{slovenian}[slovenian@]{localalph}[true]{} + +% Register default options +\xpg@initialize@gloss@options{slovenian}{localalph=false} \def\captionsslovenian{% @@ -12400,14 +15767,14 @@ and may look very wrong.} \def\headtoname{Prejme}% \def\proofname{Dokaz}% \def\glossaryname{Slovar}% - } +} \def\dateslovenian{% \def\today{\number\day.~\ifcase\month\or januar\or februar\or marec\or april\or maj\or junij\or julij\or avgust\or september\or oktober\or november\or december\fi \space \number\year}% - } +} \def\slovenian@alph#1{% \ifcase#1\or a\or b\or c\or č\or d\or e\or f\or g\or h\or i\or j\or k\or l\or @@ -12415,17 +15782,22 @@ and may look very wrong.} } \def\slovenian@Alph#1{% \ifcase#1\or A\or B\or C\or Č\or D\or E\or F\or G\or H\or I\or J\or K\or L\or - M\or N\or O\or P\or R\or S\or Š\or T\or U\or V\or Z\or Ž\else#1\fi} + M\or N\or O\or P\or R\or S\or Š\or T\or U\or V\or Z\or Ž\else#1\fi +} + \def\abeceda#1{\expandafter\slovenian@alph\csname c@#1\endcsname} \def\Abeceda#1{\expandafter\slovenian@Alph\csname c@#1\endcsname} -\def\setlocalalph{% - \def\extras@slovenian{\let\alph\abeceda\let\Alph\Abeceda} - \def\blockextras@slovenian{\extras@slovenian} - \def\inlineextras@slovenian{\extras@slovenian} - \def\noextras@slovenian{\let\alph\latinalph\let\Alph\latinAlph} +\def\extras@slovenian{% + \ifslovenian@localalph\let\alph\abeceda\let\Alph\Abeceda\fi% } +\def\blockextras@slovenian{\extras@slovenian} + +\def\inlineextras@slovenian{\extras@slovenian} + +\def\noextras@slovenian{\let\alph\latinalph\let\Alph\latinAlph} + % \end{macrocode} % \iffalse %</gloss-slovenian.ldf> @@ -12438,6 +15810,7 @@ and may look very wrong.} \ProvidesFile{gloss-sorbian.ldf}[polyglossia: module for sorbian] \PolyglossiaSetup{sorbian}{ + bcp47=hsb, language=Upper Sorbian, babelname=uppersorbian, hyphennames={usorbian,uppersorbian}, @@ -12446,6 +15819,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*[variant=upper]{sorbian}{hsb} +\setlanguagealias*[variant=lower]{sorbian}{dsb} % Backwards compat. aliases \setlanguagealias[variant=lower]{sorbian}{lsorbian} \setlanguagealias[variant=upper]{sorbian}{usorbian} @@ -12459,7 +15835,7 @@ and may look very wrong.} \ifcase\nr\relax % upper: \def\sorbian@variant{usorbian}% - \SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian}% + \SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian,bcp47=hsb}% \xpg@fontsetup@latin{sorbian}% % Check if \l@usorbian is defined. If not, try to set it to some variety % (specific order as in the csv list below), or null language if everything fails @@ -12479,7 +15855,7 @@ and may look very wrong.} \or % lower: \def\sorbian@variant{lsorbian}% - \SetLanguageKeys{sorbian}{language=Lower Sorbian,langtag=LSB,babelname=lowersorbian}% + \SetLanguageKeys{sorbian}{language=Lower Sorbian,langtag=LSB,babelname=lowersorbian,bcp47=dsb}% \xpg@fontsetup@latin{sorbian}% % Check if \l@lsorbian is defined. If not, try to set it to some variety % (specific order as in the csv list below), or null language if everything fails @@ -12503,7 +15879,8 @@ and may look very wrong.} \define@boolkey{sorbian}[sorbian@]{olddate}[true]{} -\setkeys{sorbian}{variant} +% Register default options +\xpg@initialize@gloss@options{sorbian}{variant=upper,olddate=false} \def\sorbian@language{% @@ -12620,8 +15997,10 @@ and may look very wrong.} \ProvidesFile{gloss-spanish.ldf}[polyglossia: module for spanish] \PolyglossiaSetup{spanish}{ + bcp47=es-ES, hyphennames={spanish}, hyphenmins={2,2}, + totalhyphenmin=5, langtag=ESP, frenchspacing=true, indentfirst=true, @@ -12629,6 +16008,11 @@ and may look very wrong.} babelname=spanish } +% BCP-47 compliant aliases +\setlanguagealias*{spanish}{es} +\setlanguagealias*[variant=mexican]{spanish}{es-MX} +\setlanguagealias*[variant=spanish]{spanish}{es-ES} + % Babel aliases \setlanguagealias[variant=mexican]{spanish}{spanishmx} @@ -12638,11 +16022,11 @@ and may look very wrong.} \ifcase\nr\relax % spanish: \@spanish@mexicofalse% - \SetLanguageKeys{spanish}{babelname=spanish}% + \SetLanguageKeys{spanish}{babelname=spanish,bcp47=es-ES}% \or % mexican: \@spanish@mexicotrue% - \SetLanguageKeys{spanish}{babelname=spanishmx}% + \SetLanguageKeys{spanish}{babelname=spanishmx,bcp47=es-MX}% \fi \xpg@info{Option: spanish, variant=\val}% }{\xpg@warning{Unknown spanish variant `#1'}} @@ -12677,6 +16061,10 @@ and may look very wrong.} \xpg@info{Option: Spanish, spanishoperators=\val}% }{\xpg@warning{Unknown spanishoperators value `#1'}} + +% Register default options +\xpg@initialize@gloss@options{spanish}{variant=spanish,spanishoperators=none} + \let\xpg@save@lim\lim \let\xpg@save@limsup\limsup \let\xpg@save@liminf\liminf @@ -12857,6 +16245,7 @@ and may look very wrong.} \ProvidesFile{gloss-swedish.ldf}[polyglossia: module for swedish] \PolyglossiaSetup{swedish}{ + bcp47=sv, hyphennames={swedish}, hyphenmins={2,2}, langtag=SVE, @@ -12864,6 +16253,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{swedish}{sv} + \def\captionsswedish{% \def\refname{Referenser}% \def\abstractname{Sammanfattning}% @@ -12937,6 +16329,7 @@ and may look very wrong.} \RequirePackage{arabicnumbers} \PolyglossiaSetup{syriac}{ + bcp47=syr, script=Syriac, scripttag=syrc, langtag=SYR, @@ -12947,6 +16340,9 @@ and may look very wrong.} %TODO localalph } +% BCP-47 compliant aliases +\setlanguagealias*{syriac}{syr} + \def\syriacnumber#1{\@syriacnumber{#1}}% \newif\if@eastern@numerals @@ -12964,7 +16360,8 @@ and may look very wrong.} \fi \fi} -\setkeys{syriac}{numerals} +% Register default options +\xpg@initialize@gloss@options{syriac}{numerals=western} %\define@key{polyglossia}{syriaclocale}[default]{% % \def\@syriac@locale{#1}} @@ -13048,33 +16445,22 @@ and may look very wrong.} %%% we test for the presence of one of ١٢٣٤٥٦٧٨٩٠ in the Syriac font, %%% else we try \arabicfont if defined (and give a warning), %%% else we fall back to the Western numerals. - \ifxetex - \ifnum\XeTeXcharglyph"0661 > 0% - %%\protect\addfontfeature{Mapping=arabicdigits}\number#1}% - \protect\arabicdigits{\number#1}% - \else% + \xpg@if@char@available{0661}% + {\protect\arabicdigits{\number#1}}% + {\arabicdigits{\number#1} \ifcsdef{arabicfont}% {\protect\arabicdigits{\number#1}% - \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: I am using \string\arabicfont instead}}% + \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: + I am using \string\arabicfont instead}}% {\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}% - \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: since \string\arabicfont is not defined, we'll use Western numerals instead}}% - \fi - \else% LuaTeX - \expandafter\ifnum\directlua{polyglossia.check_char(0x661)} > 0\relax - %%\protect\addfontfeature{Mapping=arabicdigits}\number#1}% - \protect\arabicdigits{\number#1}% - \else% - \ifcsdef{arabicfont}% - {\protect\arabicdigits{\number#1}% - \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: I am using \string\arabicfont instead}}% - {\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}% - \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: since \string\arabicfont is not defined, we'll use Western numerals instead}}% - \fi - \fi + \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs: + since \string\arabicfont is not defined, we'll use Western numerals instead}}% + }% \else %%\RL{\protect\reset@font\number#1}% \number#1% - \fi} + \fi% +} \def\syriac@numbers{% \let\@alph\abjadsyriac% @@ -13131,6 +16517,7 @@ and may look very wrong.} % Translations provided by Kevin & Siji, 01-11-2009 \PolyglossiaSetup{tamil}{ + bcp47=ta, script=Tamil, scripttag=taml, langtag=TAM, @@ -13139,6 +16526,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{tamil}{ta} + \def\captionstamil{% \def\abstractname{சாராம்சம்}% \def\appendixname{பிற்சேர்க்கை}%பின்னிணைப்பு @@ -13198,6 +16588,7 @@ and may look very wrong.} % Translations provided by Anmol Sharma <unmole.in@gmail.com> \PolyglossiaSetup{telugu}{ + bcp47=te, script=Telugu, scripttag=telu, langtag=TEL, @@ -13206,6 +16597,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{telugu}{te} + \def\captionstelugu{% \def\refname{ఆధారాలు}% \def\abstractname{సారాంశం}% @@ -13275,6 +16669,7 @@ the output is not guaranteed to be correct\MessageBreak and may look very wrong.} \fi \PolyglossiaSetup{thai}{ + bcp47=th, script=Thai, scripttag=thai, langtag=THA, @@ -13285,6 +16680,9 @@ and may look very wrong.} %TODO localdigits=thainumber } +% BCP-47 compliant aliases +\setlanguagealias*{thai}{th} + \newif\if@thai@numerals \def\tmp@thai{thai} \define@key{thai}{numerals}[arabic]{% @@ -13293,7 +16691,8 @@ and may look very wrong.} \@thai@numeralsfalse\fi } -\setkeys{thai}{numerals} +% Register default options +\xpg@initialize@gloss@options{thai}{numerals=arabic} \def\captionsthai{% \def\refname{หนังสืออ้างอิง}% @@ -13416,6 +16815,7 @@ and may look very wrong.} %% \PolyglossiaSetup{tibetan}{ + bcp47=bo, script=Tibetan, scripttag=tibt, langtag=TIB, @@ -13425,6 +16825,9 @@ and may look very wrong.} %TODO localalph={xxx@alph,xxx@Alph} } +% BCP-47 compliant aliases +\setlanguagealias*{tibetan}{bo} + \newif\if@tibetan@numerals \def\tmp@tibetan{tibetan} \define@key{tibetan}{numerals}[tibetan]{% @@ -13458,7 +16861,8 @@ and may look very wrong.} \fi % } -\setkeys{tibetan}{numerals} +% Register default options +\xpg@initialize@gloss@options{tibetan}{numerals=tibetan} % some are known, but very few % a few come from "Standardizing Tibetan Terms of Information Technology" @@ -13590,6 +16994,7 @@ and may look very wrong.} \ProvidesFile{gloss-turkish.ldf}[polyglossia: module for turkish] \RequirePackage{hijrical} \PolyglossiaSetup{turkish}{ + bcp47=tr, hyphennames={turkish}, hyphenmins={2,2}, langtag=TRK, @@ -13617,6 +17022,9 @@ and may look very wrong.} \fi } +% BCP-47 compliant aliases +\setlanguagealias*{turkish}{tr} + \def\noturkish@punctuation{% \ifxetex \XeTeXcharclass `\! \z@ @@ -13700,6 +17108,7 @@ and may look very wrong.} \ProvidesFile{gloss-turkmen.ldf}[polyglossia: module for turkmen] %% Translations provided by Nazar Annagurban <nazartm at gmail dot com> \PolyglossiaSetup{turkmen}{ + bcp47=tk, hyphennames={turkmen}, hyphenmins={2,2}, langtag=TKM, @@ -13707,6 +17116,9 @@ and may look very wrong.} fontsetup=true } +% BCP-47 compliant aliases +\setlanguagealias*{turkmen}{tk} + \def\captionsturkmen{% \def\prefacename{Sözbaşy}% \def\refname{Çeşmeler}% @@ -13751,32 +17163,57 @@ and may look very wrong.} % Strings taken from Babel % and revised by Roman Kyrylych -\PolyglossiaSetup{ukrainian}{ +\RequirePackage{xpg-cyrillicnumbers} + +\PolyglossiaSetup{ukrainian}{% + bcp47=uk, script=Cyrillic, scripttag=cyrl, langtag=UKR, hyphennames={ukrainian}, hyphenmins={2,2}, frenchspacing=true, - fontsetup=true - %TODO localalph + fontsetup=true, + localnumeral=ukrainiannumerals, + Localnumeral=Ukrainiannumerals } +% BCP-47 compliant aliases +\setlanguagealias*{ukrainian}{uk} + \newif\ifcyrillic@numerals -\define@key{ukrainian}{numerals}[latin]{% -\ifstrequal{#1}{cyrillic}% -{\cyrillic@numeralstrue} -{\cyrillic@numeralsfalse}% -} +\newif\ifcyrillic@asbuk@numerals +\define@choicekey*+{ukrainian}{numerals}[\val\nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{% + \ifcase\nr\relax + % arabic: + \cyrillic@numeralsfalse% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-trad: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralsfalse% + \or + % cyrillic-alph: + \cyrillic@numeralstrue% + \cyrillic@asbuk@numeralstrue% + \fi + \xpg@info{Option: Ukrainian, numerals=\val}% +}{\xpg@warning{Unknown Ukrainian numerals value `#1'}} -\define@boolkey{ukrainian}[ukrainian@]{babelshorthands}[false]{} -\setkeys{ukrainian}{numerals} +% Register default options +\xpg@initialize@gloss@options{ukrainian}{numerals=arabic} + +\define@boolkey{ukrainian}[ukrainian@]{babelshorthands}[true]{} \ifsystem@babelshorthands -\setkeys{ukrainian}{babelshorthands=true} + \setkeys{ukrainian}{babelshorthands=true} \else -\setkeys{ukrainian}{babelshorthands=false} + \setkeys{ukrainian}{babelshorthands=false} \fi \ifcsundef{initiate@active@char}{% @@ -13786,45 +17223,47 @@ and may look very wrong.} }{} \def\ukrainian@shorthands{% -\bbl@activate{"}% -\def\language@group{ukrainian}% + \bbl@activate{"}% + \def\language@group{ukrainian}% % \declare@shorthand{ukrainian}{"`}{„}% % \declare@shorthand{ukrainian}{"'}{“}% % \declare@shorthand{ukrainian}{"<}{«}% % \declare@shorthand{ukrainian}{">}{»}% -\declare@shorthand{ukrainian}{""}{\hskip\z@skip}% -\declare@shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}% -\declare@shorthand{ukrainian}{"=}{\nobreak-\hskip\z@skip}% -\declare@shorthand{ukrainian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}% -\declare@shorthand{ukrainian}{"-}{% -\def\ukrainian@sh@tmp{% -\if\ukrainian@sh@next-\expandafter\ukrainian@sh@emdash -\else\expandafter\ukrainian@sh@hyphen\fi -}% -\futurelet\ukrainian@sh@next\ukrainian@sh@tmp}% -\def\ukrainian@sh@hyphen{% -\nobreak\-\bbl@allowhyphens}% -\def\ukrainian@sh@emdash##1##2{\cdash-##1##2}% -\def\cdash##1##2##3{\def\tempx@{##3}% -\def\tempa@{-}\def\tempb@{~}\def\tempc@{*}% -\ifx\tempx@\tempa@\@Acdash\else -\ifx\tempx@\tempb@\@Bcdash\else -\ifx\tempx@\tempc@\@Ccdash\else -\errmessage{Wrong usage of cdash}\fi\fi\fi}% -\def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi -\cyrdash\hskip.2em\ignorespaces}% -\def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi -\nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% -\def\@Ccdash{\leavevmode -\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% -\ifx\cyrdash\undefined -\def\cyrdash{\hbox to.8em{--\hss--}} -\fi -\declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}% + \declare@shorthand{ukrainian}{""}{\hskip\z@skip}% + \declare@shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}% + \declare@shorthand{ukrainian}{"=}{\nobreak-\hskip\z@skip}% + \declare@shorthand{ukrainian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}% + \declare@shorthand{ukrainian}{"-}{% + \def\ukrainian@sh@tmp{% + \if\ukrainian@sh@next-\expandafter\ukrainian@sh@emdash + \else\expandafter\ukrainian@sh@hyphen\fi + }% + \futurelet\ukrainian@sh@next\ukrainian@sh@tmp}% + \def\ukrainian@sh@hyphen{% + \nobreak\-\bbl@allowhyphens}% + \def\ukrainian@sh@emdash##1##2{\cdash-##1##2}% + \def\cdash##1##2##3{% + \def\tempx@{##3}% + \def\tempa@{-}\def\tempb@{~}\def\tempc@{*}% + \ifx\tempx@\tempa@\@Acdash\else + \ifx\tempx@\tempb@\@Bcdash\else + \ifx\tempx@\tempc@\@Ccdash\else + \errmessage{Wrong usage of cdash}\fi\fi\fi% + }% + \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi + \cyrdash\hskip.2em\ignorespaces}% + \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi + \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% + \def\@Ccdash{\leavevmode + \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% + \ifx\cyrdash\undefined + \def\cyrdash{\hbox to.8em{--\hss--}} + \fi + \declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}% } \def\noukrainian@shorthands{% -\@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}% + \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}% } \def\captionsukrainian{% @@ -13851,7 +17290,8 @@ and may look very wrong.} \def\headtoname{До}% \def\proofname{Доведення}% \def\glossaryname{Словник термінів}% - } +} + \def\dateukrainian{% \def\today{\number\day~\ifcase\month\or січня\or @@ -13866,39 +17306,82 @@ and may look very wrong.} жовтня\or листопада\or грудня\fi% - \space\number\year~р.}} + \space\number\year~р.}% +} % The following is based on some ideas from ruscor.sty \def\ukrainian@capsformat{% -\def\@seccntformat##1{\csname pre##1\endcsname% -\csname the##1\endcsname% -\csname post##1\endcsname}% -\def\@aftersepkern{\hspace{0.5em}}% -\def\postchapter{.\@aftersepkern}% -\def\postsection{.\@aftersepkern}% -\def\postsubsection{.\@aftersepkern}% -\def\postsubsubsection{.\@aftersepkern}% -\def\postparagraph{.\@aftersepkern}% -\def\postsubparagraph{.\@aftersepkern}% -\def\prechapter{}% -\def\presection{}% -\def\presubsection{}% -\def\presubsubsection{}% -\def\preparagraph{}% -\def\presubparagraph{}} - -\def\Asbuk#1{\expandafter\ukrainian@Alph\csname c@#1\endcsname} -\def\ukrainian@Alph#1{\ifcase#1\or - А\or Б\or В\or Г\or Д\or Е\or Є\or Ж\or - З\or И\or І\or Ї\or Й\or К\or Л\or М\or Н\or О\or + \def\@seccntformat##1{\csname pre##1\endcsname% + \csname the##1\endcsname% + \csname post##1\endcsname}% + \def\@aftersepkern{\hspace{0.5em}}% + \def\postchapter{.\@aftersepkern}% + \def\postsection{.\@aftersepkern}% + \def\postsubsection{.\@aftersepkern}% + \def\postsubsubsection{.\@aftersepkern}% + \def\postparagraph{.\@aftersepkern}% + \def\postsubparagraph{.\@aftersepkern}% + \def\prechapter{}% + \def\presection{}% + \def\presubsection{}% + \def\presubsubsection{}% + \def\preparagraph{}% + \def\presubparagraph{}% +} + +\newcommand{\ukrainiannumerals}[2]{\ukrainiannumber{#2}} +\newcommand{\Ukrainiannumerals}[2]{\Ukrainiannumber{#2}} + +\def\ukrainiannumber#1{% + \ifcyrillic@numerals + \ifcyrillic@asbuk@numerals + \serbian@asbuk@alph{#1}% + \else + \cyr@alph{#1}% + \fi + \else + \number#1% + \fi% +} + +\def\Ukrainiannumber#1{% + \ifcyrillic@numerals + \ifcyrillic@asbuk@numerals + \serbian@asbuk@Alph{#1}% + \else + \cyr@Alph{#1}% + \fi + \else + \number#1% + \fi% +} + +\let\ukrainiannumeral=\ukrainiannumber +\let\Ukrainiannumeral=\Ukrainiannumber + +\def\Asbuk#1{\expandafter\ukranian@asbuk@Alph\csname c@#1\endcsname} +\def\asbuk#1{\expandafter\ukranian@asbuk@alph\csname c@#1\endcsname} + +\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} +\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} + +% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and +% thus ends at 30. +\def\ukranian@asbuk@Alph#1{\ifcase#1\or + А\or Б\or В\or Г\or Д\or Е\or Ж\or + З\or И\or К\or Л\or М\or Н\or О\or П\or Р\or С\or Т\or У\or Ф\or Х\or - Ц\or Ч\or Ш\or Щ\or Ю\or Я\else\xpg@ill@value{#1}{ukrainian@Alph}\fi} -\def\asbuk#1{\expandafter\ukrainian@alph\csname c@#1\endcsname} -\def\ukrainian@alph#1{\ifcase#1\or - а\or б\or в\or г\or д\or е\or є\or ж\or - з\or и\or і\or ї\or й\or к\or л\or м\or н\or о\or + Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я% + \else\xpg@ill@value{#1}{ukranian@asbuk@Alph}\fi% +} + +\def\ukranian@asbuk@alph#1{\ifcase#1\or + а\or б\or в\or г\or д\or е\or ж\or + з\or и\or к\or л\or м\or н\or о\or п\or р\or с\or т\or у\or ф\or х\or - ц\or ч\or ш\or щ\or ю\or я\else\xpg@ill@value{#1}{ukrainian@alph}\fi} + ц\or ч\or ш\or щ\or э\or ю\or я% + \else\xpg@ill@value{#1}{ukranian@asbuk@alph}\fi% +} \def\ukrainian@numbers{% \let\@Alph\ukrainian@Alph% @@ -13911,19 +17394,19 @@ and may look very wrong.} } \def\noextras@ukrainian{% -\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel -\ifcyrillic@numerals\noukrainian@numbers\fi -\noukrainian@shorthands% + \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel + \ifcyrillic@numerals\noukrainian@numbers\fi + \noukrainian@shorthands% } \def\blockextras@ukrainian{% -\ukrainian@capsformat% -\ifcyrillic@numerals\ukrainian@numbers\fi -\ifukrainian@babelshorthands\ukrainian@shorthands\fi + \ukrainian@capsformat% + \ifcyrillic@numerals\ukrainian@numbers\fi + \ifukrainian@babelshorthands\ukrainian@shorthands\fi } \def\inlineextras@ukrainian{% -\ifukrainian@babelshorthands\ukrainian@shorthands\fi% + \ifukrainian@babelshorthands\ukrainian@shorthands\fi% } %%% stuff from Babel @@ -13985,6 +17468,7 @@ and may look very wrong.} \RequirePackage{hijrical} \PolyglossiaSetup{urdu}{ + bcp47=ur, script=Arabic, direction=RL, scripttag=arab, @@ -13995,6 +17479,9 @@ and may look very wrong.} %TODO localalph={abjad,abjad} } +% BCP-47 compliant aliases +\setlanguagealias*{urdu}{ur} + \newif\if@western@numerals \def\tmp@western{western} \define@key{urdu}{numerals}[eastern]{% @@ -14147,6 +17634,7 @@ and may look very wrong.} %% Strings contributed by Daniel Owens < dhowens . pmbx . net > \PolyglossiaSetup{vietnamese}{ + bcp47=vi, hyphennames={nohyphenation}, hyphenmins={2,2}, langtag=VIT, @@ -14154,6 +17642,9 @@ and may look very wrong.} fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{vietnamese}{vi} + \def\captionsvietnamese{% \def\refname{Tài liệu}% \def\abstractname{Tóm tắt nội dung}% @@ -14197,20 +17688,31 @@ and may look very wrong.} \ProvidesFile{gloss-welsh.ldf}[polyglossia: module for welsh] \PolyglossiaSetup{welsh}{ + bcp47=cy, hyphennames={welsh}, hyphenmins={2,3}, langtag=WEL, fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{welsh}{cy} + \providebool{welsh@formaldate} -% TODO (maybe) Interface to change that mid-document -\define@key{welsh}{date}{% - \ifstrequal{#1}{long}{% - \welsh@formaldatetrue - }% Anything else gives \welsh@formaldatefalse -} +\define@choicekey*+{welsh}{date}[\val\nr]{long,short}[short]{% + \ifcase\nr\relax + % long: + \welsh@formaldatetrue + \or + % accented: + \welsh@formaldatefalse + \fi + \xpg@info{Option: Welsh, date=\val}% +}{\xpg@warning{Unknown date value `#1'}} + +% Register default options +\xpg@initialize@gloss@options{welsh}{date=short} \def\captionswelsh{% \def\refname{Cyfeiriadau}% @@ -14441,6 +17943,7 @@ local function activate_french_punct(thincolonspace, autospaceguillemets) set_left_space(lang, '⁇', 0.5) set_left_space(lang, '⁈', 0.5) set_left_space(lang, '⁉', 0.5) + set_left_space(lang, '‽', 0.5) -- U+203D (interrobang) if autospaceguillemets then set_left_space(lang, '»', 0.5) @@ -14887,14 +18390,19 @@ local function reorder_tm (head) local curr, tone = node.slide(head) while curr do if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then - local c, wd = curr.char or 0, curr.width or 0 - if (c == 0x302E or c == 0x302F) and wd > 0 then - tone = curr - elseif tone and not nobr_before[c] then - head = node.remove(head, tone) - tone.next, tone.prev = nil, nil - head, curr = node.insert_before(head, curr, tone) + local f = font.getfont(curr.font) or font.fonts[curr.font] + if f and f.hb then -- harfbuzz do the right thing tone = nil + else + local c, wd = curr.char or 0, curr.width or 0 + if (c == 0x302E or c == 0x302F) and wd > 0 then + tone = curr + elseif tone and not nobr_before[c] then + head = node.remove(head, tone) + tone.next, tone.prev = nil, nil + head, curr = node.insert_before(head, curr, tone) + tone = nil + end end end curr = curr.prev @@ -15085,21 +18593,31 @@ require('polyglossia-punct') -- between 1/4 and 1/3 of a quad. We choose a half of a \thinspace here. local hairspace = 0.08333 -- 1/12 +local function space_left(char) + polyglossia.add_left_spaced_character('latin', char, hairspace, 'quad') +end + +local function space_right(char) + polyglossia.add_right_spaced_character('latin', char, hairspace, 'quad') +end + +polyglossia.clear_spaced_characters('latin') +space_left('!') +space_left('?') +space_left('‼') +space_left('⁇') +space_left('⁈') +space_left('⁉') +space_left('‽') -- U+203D (interrobang) +space_left(':') +space_left(';') +space_left('»') +space_left('›') +space_right('«') +space_right('‹') + local function activate_latin_punct() polyglossia.activate_punct('latin') - polyglossia.clear_spaced_characters('latin') - polyglossia.add_left_spaced_character('latin',':',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','!',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','?',hairspace,'quad') - polyglossia.add_left_spaced_character('latin',';',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','‼',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','⁇',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','⁈',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','⁉',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','»',hairspace,'quad') - polyglossia.add_left_spaced_character('latin','›',hairspace,'quad') - polyglossia.add_right_spaced_character('latin','«',hairspace,'quad') - polyglossia.add_right_spaced_character('latin','‹',hairspace,'quad') end local function deactivate_latin_punct() @@ -15180,12 +18698,54 @@ local function get_penalty_node() return node_copy(penalty_node) end --- we have here all possible space characters, referenced by their unicode slot --- number, taken from char-def.lua -local space_chars = {[32] = true, [160] = true, [5760] = true, [6158] = true, - [8192] = true, [8193] = true, [8194] = true, [8195] = true, [8196] = true, - [8197] = true, [8198] = true, [8199] = true, [8200] = true, [8201] = true, - [8202] = true, [8239] = true, [8287] = true, [12288] = true} +-- all possible space characters according to section 6.2 of the Unicode Standard +-- https://www.unicode.org/versions/Unicode12.0.0/ch06.pdf +local space_chars = { + [0x20] = true, -- space + [0xA0] = true, -- no-break space + [0x1680] = true, -- ogham space mark + [0x2000] = true, -- en quad + [0x2001] = true, -- em quad + [0x2002] = true, -- en space + [0x2003] = true, -- em space + [0x2004] = true, -- three-per-em-space + [0x2005] = true, -- four-per-em space + [0x2006] = true, -- six-per-em space + [0x2007] = true, -- figure space + [0x2008] = true, -- punctuation space + [0x2009] = true, -- thin space + [0x200A] = true, -- hair space + [0x202F] = true, -- narrow no-break space + [0x205F] = true, -- medium mathematical space + [0x3000] = true -- ideographic space +} + +-- all left bracket characters, referenced by their Unicode slot +local left_bracket_chars = { + [0x28] = true, -- left parenthesis + [0x5B] = true, -- left square bracket + [0x7B] = true, -- left curly bracket + [0x27E8] = true -- mathematical left angle bracket +} + +-- all right bracket characters, referenced by their Unicode slot +local right_bracket_chars = { + [0x29] = true, -- right parenthesis + [0x5D] = true, -- right square bracket + [0x7D] = true, -- right curly bracket + [0x27E9] = true -- mathematical right angle bracket +} + +-- question and exclamation marks, referenced by their Unicode slot +local question_exclamation_chars = { + [0x21] = true, -- exclamation mark ! + [0x3F] = true, -- question mark ? + [0x203C] = true, -- double exclamation mark ‼ + [0x203D] = true, -- interrobang ‽ + [0x2047] = true, -- double question mark ⁇ + [0x2048] = true, -- question exclamation mark ⁈ + [0x2049] = true, -- exclamation question mark ⁉ +} -- from nodes-tst.lua, adapted local function somespace(n) @@ -15203,9 +18763,6 @@ local function somespace(n) end end --- we have here all left bracket characters, referenced by their unicode slot -local left_bracket_chars = {[40] = true, [123] = true, [91] = true, [10216] = true} - local function someleftbracket(n) if n then local id = n.id @@ -15215,9 +18772,6 @@ local function someleftbracket(n) end end --- we have here all right bracket characters, referenced by their unicode slot -local right_bracket_chars = {[41] = true, [125] = true, [93] = true, [10217] = true} - local function somerightbracket(n) if n then local id = n.id @@ -15227,6 +18781,16 @@ local function somerightbracket(n) end end +local function question_exclamation_sequence(n1, n2) + if n1 and n2 then + local id1 = n1.id + local id2 = n2.id + if id1 == glyph_code and id2 == glyph_code then + return question_exclamation_chars[n1.char] and question_exclamation_chars[n2.char] + end + end +end + -- idem local function somepenalty(n, value) if n then @@ -15312,13 +18876,13 @@ local function process(head) if leftspace or rightspace then local fontparameters = fonts.hashes.parameters[current.font] local unit, stretch, shrink, spacing_node - if leftspace then + if leftspace and fontparameters then local prev = getprev(current) local space_exception = false if prev then local prevprev = getprev(prev) - -- do not add space after left (opening) bracket - space_exception = someleftbracket(prev) + -- do not add space after left (opening) bracket and between question/exclamation marks + space_exception = someleftbracket(prev) or question_exclamation_sequence(prev, current) if somespace(prev) then -- TODO: there is a question here: do we override a preceding space or not?... if somepenalty(prevprev, 10000) then @@ -15345,7 +18909,7 @@ local function process(head) head = insert_node_before(head, current, spacing_node) end end - if rightspace then + if rightspace and fontparameters then local next = getnext(current) local space_exception = false if next then @@ -15440,19 +19004,25 @@ require('polyglossia-punct') -- value. local thinspace = 0.16667 -- 1/6 +local function space_left(char) + polyglossia.add_left_spaced_character('sanskrit', char, thinspace, 'quad') +end + +polyglossia.clear_spaced_characters('sanskrit') +space_left('!') +space_left('?') +space_left('‼') +space_left('⁇') +space_left('⁈') +space_left('⁉') +space_left('‽') -- U+203D (interrobang) +space_left(':') +space_left(';') +space_left('।') -- danda, U+0964 +space_left('॥') -- double danda, U+0965 + local function activate_sanskrit_punct() polyglossia.activate_punct('sanskrit') - polyglossia.clear_spaced_characters('sanskrit') - polyglossia.add_left_spaced_character('sanskrit','!',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit','?',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit','‼',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit','⁇',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit','⁈',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit','⁉',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit',':',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit',';',thinspace,'quad') - polyglossia.add_left_spaced_character('sanskrit','।',thinspace,'quad') -- danda, U+0964 - polyglossia.add_left_spaced_character('sanskrit','॥',thinspace,'quad') -- double danda, U+0965 end local function deactivate_sanskrit_punct() @@ -15767,7 +19337,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.46 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.47 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -15800,8 +19370,8 @@ Polyglossia makes it possible to automate the following tasks: LICENSE -Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2019 Arthur Reutenauer, -Copyright (c) 2019 Bastien Roucariès, 2019 Jürgen Spitzmüller +Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer, +Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence (https://opensource.org/licenses/MIT). @@ -15815,6 +19385,69 @@ This is more efficient than contacting the maintainer by email as it allows me to track the issues and follow progress. %</../README> %<*Changelog> +1.47 (29-01-2020) + +New features: + * IETF BCP-47 compliant language tags can now be used for loading and switching + languages alternatively to language names (#226). + * New commands \languageid{<type>} and \mainlanguageid{<type>}. + * New test \iflanguageidloaded. + * New list \xpg@bcp@loaded. + * New environment {lang}{<lang>} (equivalent to {<lang>}, but also available with + \setlanguagealias* which does not define dedicated alias environments). + * New gloss option totalhyphenmin (corresponds to LuaTeX's \hyphenationmin) (#111). + * New test \iflanguageoption{<lang>}{<key>}{<val>} (#364). + * Restore simple alphabetic numbering for \asbuk and \Asbuk in Belarusian, Mongolian, + Russian, Serbian, and Ukrainian (#377). + * New command \AsbukTrad and \asbukTrad for Belarusian, Mongolian, Russian, Serbian, + and Ukrainian which uses traditional alphanumerical numbering. + * New numerals option "cyrillic-trad" and "cyrillic-alph" to differentiate simple + alphabetic and traditional alpnanumerical Cyrillic numbering. + * \selectbackgroundlanguage and \resetdefaultlanguage now also support language + aliases. + * New macro \charifavailable{<char code>}{<substitution>}. + * Add French language variant "swiss". + * Implement babelshorthands for Croatian. + * Implement \localnumeral for Japanese. + +Bug fixes: + * Fix font family issue in headers (#355). + * Fix whitespace issues in \text<lang> (#356). + * Fix option-less \babelname in multi-variant languages (#357). + * Fix some spacing inconsistencies with French, Latin, and Sanskrit (#358). + * Fix issues with babelshorthands and graphics package (#368). + * Fix some captions and improve numbering in Marathi (#370). + * Fix Hungarian swapstrings feature (#373). + * Fix lua punctuation code problem (#374). + * Fix Bengali changecounternumbering option (#381). + * Fix whitespace issue in Japanese (#387). + * Fix \text<lang> command with multiple paragraphs. + * Actually implement documented german spelling variant '1996' (= 'new'). + * Fix Slovenian localalph option. + * Fix Czech and Slovak splithyphens with typewriter fonts. + * farsical.sty: fix spacing issue with some month names. + * Fix directionalty of numbers in Hebrew with XeTeX. + * Improve interoperatability with biblatex (some language variants did not work yet). + +Interface and defaults changes: + * Some boolean options had 'false' value by default, which meant if you passed + them without value, the logic was reversed. This has been changed, leading to + change of behavior should you have used one of these options without value (#363). + Concerned are the following options: + - babelshorthands in language belarusian, mongolian, ukrainian, and russian + ('babelshorthands' now equals 'babelshorthand=true', no longer 'babelshorthands=false') + - localalph in language slovenian ('localalph' now equals 'localalph=true') + - latesthyphen in language german ('latesthyphen' now equals 'latesthyphen=true') + - fullyear in package hebrewcal ('fullyear' now equals 'fullyear=true') + * The command \setlanguagealias* (introduced in v1.46) does no longer define + dedicated alias environments. + * The babelnames for latin variants have been corrected to classiclatin, ecclesiasticlatin + and medievallatin. This is how the hyphenation patterns and babel \extras are named, even + though the variants can currently be selected in babel only via appended "dot modifier". + * In accordance with the respective l3kernel change, \str_lower_case:n has been renamed to + \str_lowercase:n where used in polyglossia.sty. Thus polyglossia 1.47 requires l3kernel + 2020-01-12 at least. + 1.46 (15-11-2019) New features: diff --git a/macros/latex/contrib/polyglossia/polyglossia.ins b/macros/latex/contrib/polyglossia/polyglossia.ins deleted file mode 100644 index 56050f53cb..0000000000 --- a/macros/latex/contrib/polyglossia/polyglossia.ins +++ /dev/null @@ -1,164 +0,0 @@ -\input docstrip.tex -\keepsilent -\let\MetaPrefix\relax -\preamble - ____________________________ - - The polyglossia package - (C) 2008–2010 François Charette - (C) 2011-2019 Arthur Reutenauer - (C) 2013 Elie Roux - License information appended - -\endpreamble -\postamble - - Copyright (C) 2019 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> - - This work may be distributed and/or modified under the - conditions of the LaTeX Project Public License, either version 1.3 - of this license of (at your option) any later version. - The latest version of this license is in - http://www.latex-project.org/lppl.txt - and version 1.3 or later is part of all distributions of LaTeX - version 2005/12/01 or later. - - This work has the LPPL maintenance status `maintained'. - - The Current Maintainer of this work is Arthur Reutenauer. - -\endpostamble -\let\MetaPrefix\DoubleperCent -\askforoverwritefalse -\generate{\file{gloss-acadien.ldf}{\from{polyglossia.dtx}{gloss-acadien.ldf}}} -\generate{\file{gloss-afrikaans.ldf}{\from{polyglossia.dtx}{gloss-afrikaans.ldf}}} -\generate{\file{gloss-albanian.ldf}{\from{polyglossia.dtx}{gloss-albanian.ldf}}} -\generate{\file{gloss-american.ldf}{\from{polyglossia.dtx}{gloss-american.ldf}}} -\generate{\file{gloss-amharic.ldf}{\from{polyglossia.dtx}{gloss-amharic.ldf}}} -\generate{\file{gloss-arabic.ldf}{\from{polyglossia.dtx}{gloss-arabic.ldf}}} -\generate{\file{gloss-armenian.ldf}{\from{polyglossia.dtx}{gloss-armenian.ldf}}} -\generate{\file{gloss-asturian.ldf}{\from{polyglossia.dtx}{gloss-asturian.ldf}}} -\generate{\file{gloss-australian.ldf}{\from{polyglossia.dtx}{gloss-australian.ldf}}} -\generate{\file{gloss-austrian.ldf}{\from{polyglossia.dtx}{gloss-austrian.ldf}}} -\generate{\file{gloss-bahasa.ldf}{\from{polyglossia.dtx}{gloss-bahasa.ldf}}} -\generate{\file{gloss-bahasai.ldf}{\from{polyglossia.dtx}{gloss-bahasai.ldf}}} -\generate{\file{gloss-bahasam.ldf}{\from{polyglossia.dtx}{gloss-bahasam.ldf}}} -\generate{\file{gloss-basque.ldf}{\from{polyglossia.dtx}{gloss-basque.ldf}}} -\generate{\file{gloss-belarusian.ldf}{\from{polyglossia.dtx}{gloss-belarusian.ldf}}} -\generate{\file{gloss-bengali.ldf}{\from{polyglossia.dtx}{gloss-bengali.ldf}}} -\generate{\file{gloss-bosnian.ldf}{\from{polyglossia.dtx}{gloss-bosnian.ldf}}} -\generate{\file{gloss-brazil.ldf}{\from{polyglossia.dtx}{gloss-brazil.ldf}}} -\generate{\file{gloss-breton.ldf}{\from{polyglossia.dtx}{gloss-breton.ldf}}} -\generate{\file{gloss-british.ldf}{\from{polyglossia.dtx}{gloss-british.ldf}}} -\generate{\file{gloss-bulgarian.ldf}{\from{polyglossia.dtx}{gloss-bulgarian.ldf}}} -\generate{\file{gloss-canadian.ldf}{\from{polyglossia.dtx}{gloss-canadian.ldf}}} -\generate{\file{gloss-canadien.ldf}{\from{polyglossia.dtx}{gloss-canadien.ldf}}} -\generate{\file{gloss-catalan.ldf}{\from{polyglossia.dtx}{gloss-catalan.ldf}}} -\generate{\file{gloss-coptic.ldf}{\from{polyglossia.dtx}{gloss-coptic.ldf}}} -\generate{\file{gloss-croatian.ldf}{\from{polyglossia.dtx}{gloss-croatian.ldf}}} -\generate{\file{gloss-czech.ldf}{\from{polyglossia.dtx}{gloss-czech.ldf}}} -\generate{\file{gloss-danish.ldf}{\from{polyglossia.dtx}{gloss-danish.ldf}}} -\generate{\file{gloss-divehi.ldf}{\from{polyglossia.dtx}{gloss-divehi.ldf}}} -\generate{\file{gloss-dutch.ldf}{\from{polyglossia.dtx}{gloss-dutch.ldf}}} -\generate{\file{gloss-english.ldf}{\from{polyglossia.dtx}{gloss-english.ldf}}} -\generate{\file{gloss-esperanto.ldf}{\from{polyglossia.dtx}{gloss-esperanto.ldf}}} -\generate{\file{gloss-estonian.ldf}{\from{polyglossia.dtx}{gloss-estonian.ldf}}} -\generate{\file{gloss-farsi.ldf}{\from{polyglossia.dtx}{gloss-farsi.ldf}}} -\generate{\file{gloss-finnish.ldf}{\from{polyglossia.dtx}{gloss-finnish.ldf}}} -\generate{\file{gloss-french.ldf}{\from{polyglossia.dtx}{gloss-french.ldf}}} -\generate{\file{gloss-friulan.ldf}{\from{polyglossia.dtx}{gloss-friulan.ldf}}} -\generate{\file{gloss-friulian.ldf}{\from{polyglossia.dtx}{gloss-friulian.ldf}}} -\generate{\file{gloss-gaelic.ldf}{\from{polyglossia.dtx}{gloss-gaelic.ldf}}} -\generate{\file{gloss-galician.ldf}{\from{polyglossia.dtx}{gloss-galician.ldf}}} -\generate{\file{gloss-georgian.ldf}{\from{polyglossia.dtx}{gloss-georgian.ldf}}} -\generate{\file{gloss-german.ldf}{\from{polyglossia.dtx}{gloss-german.ldf}}} -\generate{\file{gloss-germanb.ldf}{\from{polyglossia.dtx}{gloss-germanb.ldf}}} -\generate{\file{gloss-greek.ldf}{\from{polyglossia.dtx}{gloss-greek.ldf}}} -\generate{\file{gloss-hebrew.ldf}{\from{polyglossia.dtx}{gloss-hebrew.ldf}}} -\generate{\file{gloss-hindi.ldf}{\from{polyglossia.dtx}{gloss-hindi.ldf}}} -\generate{\file{gloss-hungarian.ldf}{\from{polyglossia.dtx}{gloss-hungarian.ldf}}} -\generate{\file{gloss-icelandic.ldf}{\from{polyglossia.dtx}{gloss-icelandic.ldf}}} -\generate{\file{gloss-interlingua.ldf}{\from{polyglossia.dtx}{gloss-interlingua.ldf}}} -\generate{\file{gloss-irish.ldf}{\from{polyglossia.dtx}{gloss-irish.ldf}}} -\generate{\file{gloss-italian.ldf}{\from{polyglossia.dtx}{gloss-italian.ldf}}} -\generate{\file{gloss-japanese.ldf}{\from{polyglossia.dtx}{gloss-japanese.ldf}}} -\generate{\file{gloss-kannada.ldf}{\from{polyglossia.dtx}{gloss-kannada.ldf}}} -\generate{\file{gloss-khmer.ldf}{\from{polyglossia.dtx}{gloss-khmer.ldf}}} -\generate{\file{gloss-korean.ldf}{\from{polyglossia.dtx}{gloss-korean.ldf}}} -\generate{\file{gloss-kurdish.ldf}{\from{polyglossia.dtx}{gloss-kurdish.ldf}}} -\generate{\file{gloss-lao.ldf}{\from{polyglossia.dtx}{gloss-lao.ldf}}} -\generate{\file{gloss-latex.ldf}{\from{polyglossia.dtx}{gloss-latex.ldf}}} -\generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}} -\generate{\file{gloss-latinclassic.ldf}{\from{polyglossia.dtx}{gloss-latinclassic.ldf}}} -\generate{\file{gloss-latinecclesiastic.ldf}{\from{polyglossia.dtx}{gloss-latinecclesiastic.ldf}}} -\generate{\file{gloss-latinmedieval.ldf}{\from{polyglossia.dtx}{gloss-latinmedieval.ldf}}} -\generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}} -\generate{\file{gloss-lithuanian.ldf}{\from{polyglossia.dtx}{gloss-lithuanian.ldf}}} -\generate{\file{gloss-lowersorbian.ldf}{\from{polyglossia.dtx}{gloss-lowersorbian.ldf}}} -\generate{\file{gloss-lsorbian.ldf}{\from{polyglossia.dtx}{gloss-lsorbian.ldf}}} -\generate{\file{gloss-macedonian.ldf}{\from{polyglossia.dtx}{gloss-macedonian.ldf}}} -\generate{\file{gloss-magyar.ldf}{\from{polyglossia.dtx}{gloss-magyar.ldf}}} -\generate{\file{gloss-malay.ldf}{\from{polyglossia.dtx}{gloss-malay.ldf}}} -\generate{\file{gloss-malayalam.ldf}{\from{polyglossia.dtx}{gloss-malayalam.ldf}}} -\generate{\file{gloss-marathi.ldf}{\from{polyglossia.dtx}{gloss-marathi.ldf}}} -\generate{\file{gloss-mongolian.ldf}{\from{polyglossia.dtx}{gloss-mongolian.ldf}}} -\generate{\file{gloss-naustrian.ldf}{\from{polyglossia.dtx}{gloss-naustrian.ldf}}} -\generate{\file{gloss-newzealand.ldf}{\from{polyglossia.dtx}{gloss-newzealand.ldf}}} -\generate{\file{gloss-ngerman.ldf}{\from{polyglossia.dtx}{gloss-ngerman.ldf}}} -\generate{\file{gloss-nko.ldf}{\from{polyglossia.dtx}{gloss-nko.ldf}}} -\generate{\file{gloss-norsk.ldf}{\from{polyglossia.dtx}{gloss-norsk.ldf}}} -\generate{\file{gloss-norwegian.ldf}{\from{polyglossia.dtx}{gloss-norwegian.ldf}}} -\generate{\file{gloss-nswissgerman.ldf}{\from{polyglossia.dtx}{gloss-nswissgerman.ldf}}} -\generate{\file{gloss-nynorsk.ldf}{\from{polyglossia.dtx}{gloss-nynorsk.ldf}}} -\generate{\file{gloss-occitan.ldf}{\from{polyglossia.dtx}{gloss-occitan.ldf}}} -\generate{\file{gloss-persian.ldf}{\from{polyglossia.dtx}{gloss-persian.ldf}}} -\generate{\file{gloss-piedmontese.ldf}{\from{polyglossia.dtx}{gloss-piedmontese.ldf}}} -\generate{\file{gloss-polish.ldf}{\from{polyglossia.dtx}{gloss-polish.ldf}}} -\generate{\file{gloss-polutonikogreek.ldf}{\from{polyglossia.dtx}{gloss-polutonikogreek.ldf}}} -\generate{\file{gloss-portuges.ldf}{\from{polyglossia.dtx}{gloss-portuges.ldf}}} -\generate{\file{gloss-portuguese.ldf}{\from{polyglossia.dtx}{gloss-portuguese.ldf}}} -\generate{\file{gloss-romanian.ldf}{\from{polyglossia.dtx}{gloss-romanian.ldf}}} -\generate{\file{gloss-romansh.ldf}{\from{polyglossia.dtx}{gloss-romansh.ldf}}} -\generate{\file{gloss-russian.ldf}{\from{polyglossia.dtx}{gloss-russian.ldf}}} -\generate{\file{gloss-sami.ldf}{\from{polyglossia.dtx}{gloss-sami.ldf}}} -\generate{\file{gloss-samin.ldf}{\from{polyglossia.dtx}{gloss-samin.ldf}}} -\generate{\file{gloss-sanskrit.ldf}{\from{polyglossia.dtx}{gloss-sanskrit.ldf}}} -\generate{\file{gloss-scottish.ldf}{\from{polyglossia.dtx}{gloss-scottish.ldf}}} -\generate{\file{gloss-serbian.ldf}{\from{polyglossia.dtx}{gloss-serbian.ldf}}} -\generate{\file{gloss-serbianc.ldf}{\from{polyglossia.dtx}{gloss-serbianc.ldf}}} -\generate{\file{gloss-slovak.ldf}{\from{polyglossia.dtx}{gloss-slovak.ldf}}} -\generate{\file{gloss-slovene.ldf}{\from{polyglossia.dtx}{gloss-slovene.ldf}}} -\generate{\file{gloss-slovenian.ldf}{\from{polyglossia.dtx}{gloss-slovenian.ldf}}} -\generate{\file{gloss-sorbian.ldf}{\from{polyglossia.dtx}{gloss-sorbian.ldf}}} -\generate{\file{gloss-spanish.ldf}{\from{polyglossia.dtx}{gloss-spanish.ldf}}} -\generate{\file{gloss-spanishmx.ldf}{\from{polyglossia.dtx}{gloss-spanishmx.ldf}}} -\generate{\file{gloss-swedish.ldf}{\from{polyglossia.dtx}{gloss-swedish.ldf}}} -\generate{\file{gloss-swissgerman.ldf}{\from{polyglossia.dtx}{gloss-swissgerman.ldf}}} -\generate{\file{gloss-syriac.ldf}{\from{polyglossia.dtx}{gloss-syriac.ldf}}} -\generate{\file{gloss-tamil.ldf}{\from{polyglossia.dtx}{gloss-tamil.ldf}}} -\generate{\file{gloss-telugu.ldf}{\from{polyglossia.dtx}{gloss-telugu.ldf}}} -\generate{\file{gloss-thai.ldf}{\from{polyglossia.dtx}{gloss-thai.ldf}}} -\generate{\file{gloss-tibetan.ldf}{\from{polyglossia.dtx}{gloss-tibetan.ldf}}} -\generate{\file{gloss-turkish.ldf}{\from{polyglossia.dtx}{gloss-turkish.ldf}}} -\generate{\file{gloss-turkmen.ldf}{\from{polyglossia.dtx}{gloss-turkmen.ldf}}} -\generate{\file{gloss-ukrainian.ldf}{\from{polyglossia.dtx}{gloss-ukrainian.ldf}}} -\generate{\file{gloss-uppersorbian.ldf}{\from{polyglossia.dtx}{gloss-uppersorbian.ldf}}} -\generate{\file{gloss-urdu.ldf}{\from{polyglossia.dtx}{gloss-urdu.ldf}}} -\generate{\file{gloss-usorbian.ldf}{\from{polyglossia.dtx}{gloss-usorbian.ldf}}} -\generate{\file{gloss-vietnamese.ldf}{\from{polyglossia.dtx}{gloss-vietnamese.ldf}}} -\generate{\file{gloss-welsh.ldf}{\from{polyglossia.dtx}{gloss-welsh.ldf}}} -\generate{\file{arabicdigits.map}{\from{polyglossia.dtx}{arabicdigits.map}}} -\generate{\file{bengalidigits.map}{\from{polyglossia.dtx}{bengalidigits.map}}} -\generate{\file{devanagaridigits.map}{\from{polyglossia.dtx}{devanagaridigits.map}}} -\generate{\file{farsidigits.map}{\from{polyglossia.dtx}{farsidigits.map}}} -\generate{\file{thaidigits.map}{\from{polyglossia.dtx}{thaidigits.map}}} -\def\MetaPrefix{-- } -\generate{\file{polyglossia-french.lua}{\from{polyglossia.dtx}{polyglossia-french.lua}}} -\generate{\file{polyglossia-korean.lua}{\from{polyglossia.dtx}{polyglossia-korean.lua}}} -\generate{\file{polyglossia-latin.lua}{\from{polyglossia.dtx}{polyglossia-latin.lua}}} -\generate{\file{polyglossia-punct.lua}{\from{polyglossia.dtx}{polyglossia-punct.lua}}} -\generate{\file{polyglossia-sanskrit.lua}{\from{polyglossia.dtx}{polyglossia-sanskrit.lua}}} -\generate{\file{polyglossia-tibt.lua}{\from{polyglossia.dtx}{polyglossia-tibt.lua}}} -\generate{\file{polyglossia.lua}{\from{polyglossia.dtx}{polyglossia.lua}}} -\let\MetaPrefix\DoubleperCent -\endbatchfile diff --git a/macros/latex/contrib/polyglossia/polyglossia.pdf b/macros/latex/contrib/polyglossia/polyglossia.pdf Binary files differindex 0698550579..94b595acc6 100644 --- a/macros/latex/contrib/polyglossia/polyglossia.pdf +++ b/macros/latex/contrib/polyglossia/polyglossia.pdf diff --git a/macros/latex/contrib/semantic-markup/semantic-markup.pdf b/macros/latex/contrib/semantic-markup/semantic-markup.pdf Binary files differindex cc01f01022..29617ea035 100644 --- a/macros/latex/contrib/semantic-markup/semantic-markup.pdf +++ b/macros/latex/contrib/semantic-markup/semantic-markup.pdf diff --git a/macros/latex/contrib/semantic-markup/semantic-markup.sty b/macros/latex/contrib/semantic-markup/semantic-markup.sty index e6d33668f9..9a5223347f 100644 --- a/macros/latex/contrib/semantic-markup/semantic-markup.sty +++ b/macros/latex/contrib/semantic-markup/semantic-markup.sty @@ -1,7 +1,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{semantic-markup}[2018/05/21 +\ProvidesPackage{semantic-markup}[2020/01/29 Macros for TEI-like semantic markup] -% Copyright 2018 Andrew A. Cashner, andrewacashner@gmail.com +% Copyright 2020 Andrew A. Cashner, andrewacashner@gmail.com % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -18,6 +18,8 @@ % and the documentation file semantic-markup.tex. % CHANGE LOG +% 2020-01-29 - \musfig uses stackengine now instead of amsmath +% 2018-09-07 - ! and ? removed from autopunct for csquotes % 2018-05-21 - Use fontspec's definition of `\strong` if it is loaded % - Use musicography's definition of `\fl`, `\sh`, `\na` commands if % it is loaded @@ -49,7 +51,7 @@ % Put end punctuation inside quotation marks % for the specified marks \renewcommand{\mktextquote}[6]{#1#2#4#5#3#6} - \DeclareAutoPunct{.,!?} + \DeclareAutoPunct{.,} \fi % NB: fontspec defines its own \strong command, so only define this if fontspec @@ -99,13 +101,13 @@ %******************* % Identify problem spot in draft -\NewDocumentCommand{\XXX}{ O{\add{FIX}} }{% - \strong{#1}% +\NewDocumentCommand{\XXX}{ O{FIX} }{% + \strong{\add{#1}}% } % Indicate citation to be filled in later % Optional argument for indicating the source \NewDocumentCommand{\citXXX}{ o }{% - \footnote{\strong{\add{Citation needed}\IfValueTF{#1}{#1}{}}}% + \footnote{\strong{\add{Citation needed\IfValueTF{#1}{: #1}{}}}}% } %******************* @@ -153,13 +155,13 @@ \NewDocumentCommand{\octave}{ }{\textsubscript} % Music figures -\RequirePackage{amsmath} +\RequirePackage{stackengine} +\setstackgap{S}{2pt} \NewDocumentCommand{\musfig}{ m m }{% - $\genfrac{}{}{0pt}{1}{\text{#1}}{\text{#2}}$% -} + \Shortstack{#1 #2}% +} % Meter signatures -\RequirePackage[rm]{harmony} -\NewDocumentCommand{\meter}{ m m }{\Takt{#1}{#2}} +\NewDocumentCommand{\meter}{}{\musfig} \endinput diff --git a/macros/latex/contrib/semantic-markup/semantic-markup.tex b/macros/latex/contrib/semantic-markup/semantic-markup.tex index c53f395306..7d08454bc8 100644 --- a/macros/latex/contrib/semantic-markup/semantic-markup.tex +++ b/macros/latex/contrib/semantic-markup/semantic-markup.tex @@ -18,6 +18,7 @@ \author{Andrew A. Cashner% \thanks{\href{mailto:andrewacashner@gmail.com}{\nolinkurl{andrewacashner@gmail.com}}}% } +\date{January 29, 2020} \begin{document} \maketitle @@ -147,7 +148,9 @@ Command & Alias\\ \end{tabular} \end{center} -For stacked numerals, as in meter signatures or figured bass, we provide two simple options, \verb|\musfig| using \verb|\genfrac| from \texttt{amsmath}, and \verb|\meter|, which uses \verb|\Takt| from the \texttt{harmony} package, which spaces the numerals more closely. +For stacked numerals, as in meter signatures or figured bass, we provide two +simple options, \verb|\musfig| using \verb|\Shortstack| from +\texttt{stackengine}, and \verb|\meter|, which is an alias for the same thing. Both commands take two arguments, one for the top numeral and the second for the bottom numeral. You could write, for example: diff --git a/macros/latex/contrib/suftesi/suftesi.dtx b/macros/latex/contrib/suftesi/suftesi.dtx index 3b278f52ef..1c39a5238e 100644 --- a/macros/latex/contrib/suftesi/suftesi.dtx +++ b/macros/latex/contrib/suftesi/suftesi.dtx @@ -4,7 +4,7 @@ \input docstrip \preamble - Copyright 2009-2019 by Ivan Valbusa + Copyright 2009-2020 by Ivan Valbusa This program is provided under the terms of the LaTeX Project Public License distributed from CTAN @@ -44,7 +44,7 @@ \endgroup %</internal> % -% Copyright (C) 2009-2019 by Ivan Valbusa +% Copyright (C) 2009-2020 by Ivan Valbusa % <ivan dot valbusa at univr dot it> % ------------------------------------------------------- % @@ -67,7 +67,7 @@ %<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<class>\ProvidesClass{suftesi} %<*class> - [2019/10/26 v2.9.2 A class for typesetting theses, books and articles] + [2020/01/29 v2.9.3 A class for typesetting theses, books and articles] %</class> %<*driver> \documentclass{ltxdoc} @@ -175,7 +175,7 @@ %</driver> % \fi % -% \CheckSum{4656} +% \CheckSum{4902} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -193,6 +193,7 @@ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % +% \changes{v2.9.3}{2020/01/29}{Updated documentation.} % \changes{v2.9.2}{2019/10/26}{Added \cmd{protect} to \cmd{SUF@thechapter} and \cmd{SUF@thesection} in the definitions of \cmd{chaptermark} and \cmd{sectionmark} to correct a bug when loading \texttt{greek} option with \sty{babel}} % \changes{v2.9.1}{2018/11/09}{Added \sty{libertinust1math} package for Libertine font. Added \sty{luatex85} for Lua\TeX{} engine} % \changes{v2.9}{2016/04/04}{New options \opt{tocauthorfont} and \opt{toctitlefont}. Added macros\cmd{suftesi@MakeTextTOCLowercase} and \cmd{SUF@TOCtitlesmallcaps}. Improved \cmd{xheadbreak} command. New templates \texttt{book}, \texttt{theses-template-article}, \texttt{theses-template-book}.} @@ -1263,6 +1264,36 @@ % % \changes{v0.5}{2011/10/21}{New command \opt{chapnumfont}} % +% \section{Sections font}\label{sec:secfont} +% +% \changes{v2.9.3}{2020/001/29}{New commands to change the font of the section/number title} +% +% +%\begin{ltxsyntax} +% \cmditem{<level>font}{commands}\hfill(default=\texttt{empty}) +% +% Changes the font of the \meta{level} title. Where \meta{level} can be \opt{part}, \opt{chap}, \opt{sec}, \opt{subsec}, \opt{subsubsec}. For example: +% +%\begin{latexcode} +%\begin{verbatim} +% \chapfont{\bfseries\sffamily\scshape\Huge} +%\end{verbatim} +%\end{latexcode} +% +%^^A \cmditem{{level}numfont}{commands}\hfill(default=\texttt{empty}) +% +% Changes the font of the \meta{level} number. Where \meta{level} can be \opt{part}, \opt{chap}, \opt{sec}, \opt{subsec}, \opt{subsubsec}. Note that you have to adjust the spacing accordingly. For example, with the default chapter style: +% +%\begin{latexcode} +%\begin{verbatim} +%\chapnumfont{% + %\chapnumfont{\bfseries\fontsize{160}{50}\selectfont + %\color{gray}\arabic{chapter}\hskip-15cm} +%\end{verbatim} +%\end{latexcode} +% +%\end{ltxsyntax} +% % \section{Collections}\label{sec:collection} % % The \opt{collection} document structure is thought to create a collection of papers. Each paper has to be typeset in a separate \file{.tex} file inside the \env{article} environment: @@ -1976,6 +2007,7 @@ \or \def\SUF@SUBSUBSEC@StyleSwitch{\expandafter\SUF@titlesmallcaps} \fi} +% % \end{macrocode} % \subsection*{TOC font} % \begin{macrocode} @@ -2065,26 +2097,32 @@ dotarabic,dotroman,dotRoman}[arabic]{% \ifcase\nr\relax \def\SUF@thechapter{\arabic{chapter}} + \def\SUF@HEAD@thechapter{\arabic{chapter}} \def\SUF@dotchap{} \def\SUF@toclabelnum{} \or \def\SUF@thechapter{\textsc{\roman{chapter}}} + \def\SUF@HEAD@thechapter{\textsc{\roman{chapter}}} \def\SUF@dotchap{} \def\SUF@toclabelnum{\scshape\@roman} \or \def\SUF@thechapter{\Roman{chapter}} + \def\SUF@HEAD@thechapter{\Roman{chapter}} \def\SUF@dotchap{} \def\SUF@toclabelnum{\@Roman} \or \def\SUF@thechapter{\arabic{chapter}} + \def\SUF@HEAD@thechapter{\arabic{chapter}} \def\SUF@dotchap{.} \def\SUF@toclabelnum{} \or \def\SUF@thechapter{\textsc{\roman{chapter}}} + \def\SUF@HEAD@thechapter{\textsc{\roman{chapter}}} \def\SUF@dotchap{.} \def\SUF@toclabelnum{\scshape\@roman} \or \def\SUF@thechapter{\Roman{chapter}} + \def\SUF@HEAD@thechapter{\Roman{chapter}} \def\SUF@dotchap{.} \def\SUF@toclabelnum{\@Roman} \fi} @@ -2095,30 +2133,96 @@ dotarabic,dotroman,dotRoman}[arabic]{% {arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% \ifcase\nr\relax \def\SUF@thesection{\arabic{section}} + \def\SUF@HEAD@thesection{\arabic{section}} \def\SUF@dotsec{} \def\SUF@toclabelnum{} \or \def\SUF@thesection{\textsc{\roman{section}}} + \def\SUF@HEAD@thesection{\textsc{\roman{section}}} \def\SUF@dotsec{} \def\SUF@toclabelnum{\scshape\@roman} \or \def\SUF@thesection{\Roman{section}} + \def\SUF@HEAD@thesection{\Roman{section}} \def\SUF@dotsec{} \def\SUF@toclabelnum{\@Roman} \or \def\SUF@thesection{\arabic{section}} + \def\SUF@HEAD@thesection{\arabic{section}} \def\SUF@dotsec{.} \def\SUF@toclabelnum{} \or \def\SUF@thesection{\textsc{\roman{section}}} + \def\SUF@HEAD@thesection{\textsc{\roman{section}}} \def\SUF@dotsec{.} \def\SUF@toclabelnum{\scshape\@roman} \or \def\SUF@thesection{\Roman{section}} + \def\SUF@HEAD@thesection{\Roman{section}} \def\SUF@dotsec{.} \def\SUF@toclabelnum{\@Roman} \fi} % \end{macrocode} +% \subsubsection*{Subsection number style} +% \begin{macrocode} +\define@choicekey{}{subsecnumstyle}[\val\nr] +{arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% + \ifcase\nr\relax + \def\SUF@thesubsection{\arabic{subsection}} + \def\SUF@dotsubsec{} + \def\SUF@toclabelnum{} + \or + \def\SUF@thesubsection{\textsc{\roman{subsection}}} + \def\SUF@dotsubsec{} + \def\SUF@toclabelnum{\scshape\@roman} + \or + \def\SUF@thesubsection{\Roman{subsection}} + \def\SUF@dotsubsec{} + \def\SUF@toclabelnum{\@Roman} + \or + \def\SUF@thesubsection{\arabic{subsection}} + \def\SUF@dotsubsec{.} + \def\SUF@toclabelnum{} + \or + \def\SUF@thesubsection{\textsc{\roman{subsection}}} + \def\SUF@dotsubsec{.} + \def\SUF@toclabelnum{\scshape\@roman} + \or + \def\SUF@thesubsection{\Roman{subsection}} + \def\SUF@dotsubsec{.} + \def\SUF@toclabelnum{\@Roman} + \fi} +% \end{macrocode} +% \subsubsection*{Sub-subsection number style} +% \begin{macrocode} +\define@choicekey{}{subsubsecnumstyle}[\val\nr] +{arabic,roman,Roman,dotarabic,dotroman,dotRoman}[arabic]{% + \ifcase\nr\relax + \def\SUF@thesubsubsection{\arabic{subsubsection}} + \def\SUF@dotsubsubsec{} + \def\SUF@toclabelnum{} + \or + \def\SUF@thesubsubsection{\textsc{\roman{subsubsection}}} + \def\SUF@dotsubsubsec{} + \def\SUF@toclabelnum{\scshape\@roman} + \or + \def\SUF@thesubsubsection{\Roman{subsubsection}} + \def\SUF@dotsubsubsec{} + \def\SUF@toclabelnum{\@Roman} + \or + \def\SUF@thesubsubsection{\arabic{subsubsection}} + \def\SUF@dotsubsubsec{.} + \def\SUF@toclabelnum{} + \or + \def\SUF@thesubsubsection{\textsc{\roman{subsubsection}}} + \def\SUF@dotsubsubsec{.} + \def\SUF@toclabelnum{\scshape\@roman} + \or + \def\SUF@thesubsubsection{\Roman{subsubsection}} + \def\SUF@dotsubsubsec{.} + \def\SUF@toclabelnum{\@Roman} + \fi} +% \end{macrocode} % This option controls the style of small capitals used in the % title of chapters and sections using \opt{\meta{level}font=smallcaps} option: % \begin{macrocode} @@ -2132,6 +2236,18 @@ dotarabic,dotroman,dotRoman}[arabic]{% \def\suftesi@MakeTextTOCLowercase{\relax} \fi} % \end{macrocode} +% \subsubsection*{Fine adjustment of sections font}%EXPERIMENTAL +% \begin{macrocode} +\newcommand{\partfont}[1]{\def\SUF@PART@StyleSwitch{#1}} +\newcommand{\chapfont}[1]{\def\SUF@CHAP@StyleSwitch{#1}} +\newcommand{\secfont}[1]{\def\SUF@SEC@StyleSwitch{#1}} +\newcommand{\subsecfont}[1]{\def\SUF@SUBSEC@StyleSwitch{#1}} +\newcommand{\subsubsecfont}[1]{\def\SUF@SUBSUBSEC@StyleSwitch{#1}} +\newcommand{\chapnumfont}[1]{\def\SUF@thechapter{#1}} +\newcommand{\secnumfont}[1]{\def\SUF@thesection{#1}} +\newcommand{\subsecnumfont}[1]{\def\SUF@thesubsection{#1}} +\newcommand{\subsubsecnumfont}[1]{\def\SUF@thesubsubsection{#1}} +% \end{macrocode} % \subsection*{Headers} % % \subsubsection*{Header style} @@ -2744,9 +2860,11 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} subsecfont=roman, subsubsecfont=roman, headerfont=roman, - secnumstyle=arabic, partnumstyle=Roman, chapnumstyle=arabic, + secnumstyle=arabic, + subsecnumstyle=arabic, + subsubsecnumstyle=arabic, smallcapsstyle=low, titlefont=italic, authorfont=roman, @@ -3140,54 +3258,84 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} % \begin{macrocode} \def\SUF@default@SECTIONS{ \ifsuftesi@numparsec +%\titleformat{\section}[display] +% {\SUF@sectionsize\SUF@lr@SECSwitch} +% {\ifsuftesi@article\SUF@thesection +% \else\thesection\fi\SUF@dotsec} +% {0ex} +% {\SUF@SEC@StyleSwitch} \titleformat{\section}[display] - {\SUF@sectionsize\SUF@lr@SECSwitch} - {\ifsuftesi@article\SUF@thesection - \else\thesection\fi\SUF@dotsec} - {0ex} - {\SUF@SEC@StyleSwitch} +{\SUF@sectionsize\SUF@lr@SECSwitch} +{\SUF@thesection\SUF@dotsec} +{0ex} +{\SUF@SEC@StyleSwitch} \titlespacing*{\section}{0em}{\sectionsep}{\sectionsep}[0em] \else +%\titleformat{\section}[hang] +% {\SUF@sectionsize\SUF@lr@SECSwitch} +% {\ifsuftesi@article\SUF@thesection +% \else\thesection\fi\SUF@dotsec} +% {1em} +% {\SUF@SEC@StyleSwitch} \titleformat{\section}[hang] - {\SUF@sectionsize\SUF@lr@SECSwitch} - {\ifsuftesi@article\SUF@thesection - \else\thesection\fi\SUF@dotsec} - {1em} - {\SUF@SEC@StyleSwitch} +{\SUF@sectionsize\SUF@lr@SECSwitch} +{\SUF@thesection\SUF@dotsec} +{1em} +{\SUF@SEC@StyleSwitch} \titlespacing*{\section}{0ex}{\sectionsep}{\sectionsep}[0ex] \fi % \end{macrocode} % \begin{macrocode} \ifsuftesi@numparsubsec +%\titleformat{\subsection}[display] +% {\SUF@subsectionsize\SUF@lr@SUBSECSwitch} +% {\textnormal\thesubsection} +% {0ex} +% {\SUF@SUBSEC@StyleSwitch} \titleformat{\subsection}[display] - {\SUF@subsectionsize\SUF@lr@SUBSECSwitch} - {\textnormal\thesubsection} - {0ex} - {\SUF@SUBSEC@StyleSwitch} +{\SUF@subsectionsize\SUF@lr@SUBSECSwitch} +{\textnormal\SUF@thesubsection\SUF@dotsubsec} +{0ex} +{\SUF@SUBSEC@StyleSwitch} \titlespacing*{\subsection}{0em}{\sectionsep}{\sectionsep}[0em] \else +%\titleformat{\subsection}[hang] +% {\SUF@subsectionsize\SUF@lr@SUBSECSwitch} +% {\textnormal\thesubsection} +% {1em} +% {\SUF@SUBSEC@StyleSwitch} \titleformat{\subsection}[hang] - {\SUF@subsectionsize\SUF@lr@SUBSECSwitch} - {\textnormal\thesubsection} - {1em} - {\SUF@SUBSEC@StyleSwitch} +{\SUF@subsectionsize\SUF@lr@SUBSECSwitch} +{\textnormal\SUF@thesubsection\SUF@dotsubsec} +{1em} +{\SUF@SUBSEC@StyleSwitch} \titlespacing*{\subsection}{\parindent}{\sectionsep}{\sectionsep}[0ex] \fi % \end{macrocode} % \begin{macrocode} \ifsuftesi@numparsubsubsec +%\titleformat{\subsubsection}[display] +% {\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch} +% {\textnormal\thesubsubsection} +% {0ex} +% {\SUF@SUBSUBSEC@StyleSwitch} \titleformat{\subsubsection}[display] - {\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch} - {\textnormal\thesubsubsection} - {0ex} - {\SUF@SUBSUBSEC@StyleSwitch} +{\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch} +{\textnormal\SUF@thesubsubsection\SUF@dotsubsubsec} +{0ex} +{\SUF@SUBSUBSEC@StyleSwitch} \titlespacing*{\subsubsection}{0em}{\sectionsep}{\sectionsep}[0em] \else +%\titleformat{\subsubsection}[hang] +% {\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch} +% {\textnormal\thesubsubsection} +% {1em} +% {\SUF@SUBSUBSEC@StyleSwitch} \titleformat{\subsubsection}[hang] - {\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch} - {\textnormal\thesubsubsection} - {1em} - {\SUF@SUBSUBSEC@StyleSwitch} +{\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch} +{\textnormal\SUF@thesubsubsection\SUF@dotsubsubsec} +{1em} +{\SUF@SUBSUBSEC@StyleSwitch} \titlespacing*{\subsubsection}{\parindent}{\sectionsep}{\sectionsep}[0ex] \fi } @@ -4022,9 +4170,9 @@ quotesize,footnotestyle,liststyle,captionstyle,parindent} % \paragraph{The \opt{default} headers} % \begin{macrocode} \renewcommand{\chaptermark}[1]{% - \markboth{\chaptertitlename\ \protect\SUF@thechapter}{#1}} + \markboth{\chaptertitlename\ \protect\SUF@HEAD@thechapter}{#1}} \ifsuftesi@article - \renewcommand{\sectionmark}[1]{\markright{\protect\SUF@thesection.\ #1}} + \renewcommand{\sectionmark}[1]{\markright{\protect\SUF@HEAD@thesection.\ #1}} \else \renewcommand{\sectionmark}[1]{} \fi diff --git a/macros/latex/contrib/suftesi/suftesi.pdf b/macros/latex/contrib/suftesi/suftesi.pdf Binary files differindex a786249db9..243d1d378a 100644 --- a/macros/latex/contrib/suftesi/suftesi.pdf +++ b/macros/latex/contrib/suftesi/suftesi.pdf |