texlive[47358] Master/texmf-dist: polyglossia (7apr18)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 7 22:58:19 CEST 2018


Revision: 47358
          http://tug.org/svn/texlive?view=revision&revision=47358
Author:   karl
Date:     2018-04-07 22:58:18 +0200 (Sat, 07 Apr 2018)
Log Message:
-----------
polyglossia (7apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/polyglossia/README
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex
    trunk/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/examples.tex
    trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
    trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
    trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
    trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/polyglossia/gloss-latin.pdf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-churchslavonic.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-classiclatin.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf
    trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-liturgicallatin.ldf

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/README	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/README	2018-04-07 20:58:18 UTC (rev 47358)
@@ -1,7 +1,7 @@
 
    ¦----------------------------------------------¦
    ¦                                              ¦
-   ¦       THE POLYGLOSSIA PACKAGE v1.42.4        ¦
+   ¦       THE POLYGLOSSIA PACKAGE v1.43          ¦
    ¦                                              ¦
    ¦     Modern multilingual typesetting          ¦
    ¦        with XeLaTeX and LuaLaTeX             ¦
@@ -10,7 +10,7 @@
 
 This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
 (with a few languages incompletely supported for the latter). This version
-includes support for 76 different languages.
+includes support for 77 different languages.
 
 Polyglossia makes it possible to automate the following tasks:
 
@@ -32,7 +32,7 @@
 
 LICENSE
 
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2016 Arthur Reutenauer
+Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2018 Arthur Reutenauer
 
 Polyglossia is placed under the terms of the LaTeX Project Public Licence
 (LPPL), either version 1.3, or, at your option, any later version.  See
@@ -43,7 +43,9 @@
 
 BUGS
 
-Polyglossia has no bug, of course.
+Polyglossia is full of bugs.  If you run into one, or suspect you do, or you
+have a request or comment, please use the GitHub issue tracker:
+http://github.com/reutenauer/polyglossia/issues
 
-Hum, sorry, wishful thinking.  Please report any bugs, problems or requests on:
-http://github.com/reutenauer/polyglossia/issues
+This is more efficient than contacting me by email as it allows me to track the
+issues and follow progress.

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/example-arabic.tex	2018-04-07 20:58:18 UTC (rev 47358)
@@ -6,6 +6,8 @@
 \newfontfamily\arabicfont[Script=Arabic]{Amiri}%
 \newfontfamily\arabicfonttt[Script=Arabic,Scale=.75]{DejaVu Sans Mono}
 \newfontfamily\farsifont[Script=Arabic,Scale=1.1,WordSpace=2]{IranNastaliq}
+\let\XeTeX\undefined
+\let\XeLaTeX\undefined
 \usepackage[quiet,nolocalmarks]{polyglossia}
 \setdefaultlanguage[calendar=gregorian,hijricorrection=1,locale=mashriq]{arabic}
 \setotherlanguage[variant=british]{english}

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex	2018-04-07 20:58:18 UTC (rev 47358)
@@ -4,6 +4,7 @@
 \setdefaultlanguage{korean}
 \setotherlanguage{english}
 \setmainfont[Script=Hangul]{UnBatang}
+\newfontfamily\hangulfont[Script=Hangul]{UnBatang}
 \begin{document}
 \begin{center}
 	\abstractname

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/examples.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/examples.tex	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/examples.tex	2018-04-07 20:58:18 UTC (rev 47358)
@@ -1,6 +1,8 @@
 \documentclass[a4paper]{article}
 \usepackage[no-math]{fontspec}
 \usepackage{xltxtra,url}
+\let\XeTeX\undefined
+\let\XeLaTeX\undefined
 \usepackage{polyglossia}
 \usepackage{trace}
 \setdefaultlanguage{french}

Added: trunk/Master/texmf-dist/doc/latex/polyglossia/gloss-latin.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/polyglossia/gloss-latin.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/gloss-latin.pdf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/gloss-latin.pdf	2018-04-07 20:58:18 UTC (rev 47358)

Property changes on: trunk/Master/texmf-dist/doc/latex/polyglossia/gloss-latin.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex	2018-04-07 20:58:18 UTC (rev 47358)
@@ -17,11 +17,13 @@
     pdfauthor={F Charette, A Reutenauer},
     pdfkeywords={xetex, xelatex, luatex, lualatex, multilingual, babel, hyphenation}
     ]{hyperref}
+\usepackage{metalogo}
+\let\XeTeX\undefined
+\let\XeLaTeX\undefined
 \usepackage[babelshorthands]{polyglossia}
 \usepackage{farsical}
 \setmainlanguage[variant=british,ordinalmonthday=false]{english}
 \setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan}
-\usepackage{metalogo}
 \usepackage[protrusion]{microtype}
 \newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace}
 \newcommand*\pkg[1]{\textsf{\color{myblue}#1}}
@@ -408,14 +410,12 @@
   \item \Cmd\aemph (see section \ref{arabic}).
 	\end{itemize}
 
-%\subsection{french}\label{french}
-%\textbf{Options}:
-%	\begin{itemize}
-%    \item \TB{espacedeuxpoints} = thick or half \new{v1.2.x} ???
-%  \footnote{ %
-%    Can be customized by redefining \french at colonspace }
-%	\end{itemize}
-%
+\subsection{french}\label{french}\new{v1.5.0}
+\textbf{Options}:
+	\begin{itemize}
+		\item \TB{automaticspacesaroundguillemets} = true or \textit{false} (default value = true. Adds space after the opening guillemets and before the closing guillemets. Such space is usually not typed in source code, and you should let polyglossia add it. However, if your source code contains such space, you can set this option to false.)
+		\item \TB{frenchfootnote} = true or \textit{false} (default value = true. Determines whether the footnote mark starting the footnote is normal script followed by a dot (default) or superscript without a dot.)
+	\end{itemize}
 
 \subsection{german}\label{german}
 \textbf{Options}:
@@ -444,6 +444,7 @@
 		\item ¦"~¦ for a compound word mark without a breakpoint
 		\item ¦"=¦ for a compound word mark with a breakpoint,
 			allowing hyphenation in the composing words.
+		\item ¦"/¦ a slash that allows for a line break and maintains hyphenation points.
 		\end{itemize}
 
 		There are also four shorthands for quotation signs:
@@ -558,9 +559,13 @@
 	The value is passed to \pkg{fontspec} in cases where ¦\sanskritfont¦ or
 	¦\devanagarifont¦ are not defined. This can be useful if you typeset
 	Sanskrit texts in scripts other than Devanagari.
-  %TODO \item Numerals <<<<
+	  %TODO \item Numerals <<<<
 	\end{itemize}
-
+  \pkg{polyglossia} currently supports the typesetting of Sanskrit in the
+  following writing systems: Devanagari, Gujarati, Malayalam, Bengali, Kannada,
+  Telugu, and Latin.  Use the ¦Script=¦ option to select the writing system 
+  you want, and enter your input in that script.
+ 
 \subsection{serbian}\label{serbian}
 \textbf{Options}:
 	\begin{itemize}

Modified: trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx	2018-04-07 20:58:18 UTC (rev 47358)
@@ -11,7 +11,7 @@
 
    ¦----------------------------------------------¦
    ¦                                              ¦
-   ¦       THE POLYGLOSSIA PACKAGE v1.42.4        ¦
+   ¦       THE POLYGLOSSIA PACKAGE v1.43          ¦
    ¦                                              ¦
    ¦     Modern multilingual typesetting          ¦
    ¦        with XeLaTeX and LuaLaTeX             ¦
@@ -20,7 +20,7 @@
 
 This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
 (with a few languages incompletely supported for the latter). This version
-includes support for 76 different languages.
+includes support for 77 different languages.
 
 Polyglossia makes it possible to automate the following tasks:
 
@@ -42,7 +42,7 @@
 
 LICENSE
 
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2016 Arthur Reutenauer
+Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2018 Arthur Reutenauer
 
 Polyglossia is placed under the terms of the LaTeX Project Public Licence
 (LPPL), either version 1.3, or, at your option, any later version.  See
@@ -53,10 +53,12 @@
 
 BUGS
 
-Polyglossia has no bug, of course.
+Polyglossia is full of bugs.  If you run into one, or suspect you do, or you
+have a request or comment, please use the GitHub issue tracker:
+http://github.com/reutenauer/polyglossia/issues
 
-Hum, sorry, wishful thinking.  Please report any bugs, problems or requests on:
-http://github.com/reutenauer/polyglossia/issues
+This is more efficient than contacting me by email as it allows me to track the
+issues and follow progress.
 %</README>
 %<*internal>
 \fi
@@ -74,7 +76,7 @@
 
   The polyglossia package         
   (C) 2008–2010 François Charette    
-  (C) 2011-2016 Arthur Reutenauer
+  (C) 2011-2018 Arthur Reutenauer
   (C) 2013 Elie Roux
   License information appended
 
@@ -82,7 +84,7 @@
 \endpreamble
 \postamble
 
- Copyright (C) 2016 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> 
+ Copyright (C) 2018 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
@@ -113,6 +115,8 @@
 \generate{\file{gloss-breton.ldf}{\from{polyglossia.dtx}{gloss-breton.ldf}}}
 \generate{\file{gloss-bulgarian.ldf}{\from{polyglossia.dtx}{gloss-bulgarian.ldf}}}
 \generate{\file{gloss-catalan.ldf}{\from{polyglossia.dtx}{gloss-catalan.ldf}}}
+\generate{\file{gloss-churchslavonic.ldf}{\from{polyglossia.dtx}{gloss-churchslavonic.ldf}}}
+\generate{\file{gloss-classiclatin.ldf}{\from{polyglossia.dtx}{gloss-classiclatin.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}}}
@@ -135,6 +139,7 @@
 \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}}}
@@ -142,6 +147,7 @@
 \generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}}
 \generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}}
 \generate{\file{gloss-lithuanian.ldf}{\from{polyglossia.dtx}{gloss-lithuanian.ldf}}}
+\generate{\file{gloss-liturgicallatin.ldf}{\from{polyglossia.dtx}{gloss-liturgicallatin.ldf}}}
 \generate{\file{gloss-lsorbian.ldf}{\from{polyglossia.dtx}{gloss-lsorbian.ldf}}}
 \generate{\file{gloss-magyar.ldf}{\from{polyglossia.dtx}{gloss-magyar.ldf}}}
 \generate{\file{gloss-malayalam.ldf}{\from{polyglossia.dtx}{gloss-malayalam.ldf}}}
@@ -219,11 +225,13 @@
     pdfauthor={F Charette, A Reutenauer},
     pdfkeywords={xetex, xelatex, luatex, lualatex, multilingual, babel, hyphenation}
     ]{hyperref}
+\usepackage{metalogo}
+\let\XeTeX\undefined
+\let\XeLaTeX\undefined
 \usepackage[babelshorthands]{polyglossia}
 \usepackage{farsical}
 \setmainlanguage[variant=british,ordinalmonthday=false]{english}
 \setotherlanguages{arabic,hebrew,syriac,greek,russian,catalan}
-\usepackage{metalogo}
 \usepackage[protrusion]{microtype}
 \newcommand*\Cmd[1]{\cmd{#1}\DescribeMacro{#1}\xspace}
 \newcommand*\pkg[1]{\textsf{\color{myblue}#1}}
@@ -621,14 +629,12 @@
 %   \item \Cmd\aemph (see section \ref{arabic}).
 % 	\end{itemize}
 % 
-% ^^A\subsection{french}\label{french}
-% ^^A\textbf{Options}:
-% ^^A	\begin{itemize}
-% ^^A    \item \TB{espacedeuxpoints} = thick or half \new{v1.2.x} ???
-% ^^A  \footnote{ %
-% ^^A    Can be customized by redefining \french at colonspace }
-% ^^A	\end{itemize}
-% ^^A
+% \subsection{french}\label{french}\new{v1.5.0}
+% \textbf{Options}:
+% 	\begin{itemize}
+% 		\item \TB{automaticspacesaroundguillemets} = true or \textit{false} (default value = true. Adds space after the opening guillemets and before the closing guillemets. Such space is usually not typed in source code, and you should let polyglossia add it. However, if your source code contains such space, you can set this option to false.)
+% 		\item \TB{frenchfootnote} = true or \textit{false} (default value = true. Determines whether the footnote mark starting the footnote is normal script followed by a dot (default) or superscript without a dot.)
+% 	\end{itemize}
 % 
 % \subsection{german}\label{german}
 % \textbf{Options}:
@@ -657,6 +663,7 @@
 % 		\item ¦"~¦ for a compound word mark without a breakpoint
 % 		\item ¦"=¦ for a compound word mark with a breakpoint,
 % 			allowing hyphenation in the composing words.
+% 		\item ¦"/¦ a slash that allows for a line break and maintains hyphenation points.
 % 		\end{itemize}
 % 
 % 		There are also four shorthands for quotation signs:
@@ -773,7 +780,11 @@
 % 	Sanskrit texts in scripts other than Devanagari.
 % ^^ATODO \item Numerals <<<<
 % 	\end{itemize}
-% 
+%   \pkg{polyglossia} currently supports the typesetting of Sanskrit in the
+%   following writing systems: Devanagari, Gujarati, Malayalam, Bengali, Kannada,
+%   Telugu, and Latin.  Use the ¦Script=¦ option to select the writing system 
+%   you want, and enter your input in that script.
+%  
 % \subsection{serbian}\label{serbian}
 % \textbf{Options}:
 % 	\begin{itemize}
@@ -2284,6 +2295,424 @@
 %    \end{macrocode}
 % \iffalse
 %</gloss-catalan.ldf>
+%<*gloss-churchslavonic.ldf>
+% \fi
+% \clearpage
+% 
+% \subsection{gloss-churchslavonic.ldf}
+%    \begin{macrocode}
+\ProvidesFile{gloss-churchslavonic.ldf}[polyglossia: module for Church Slavonic]
+\PolyglossiaSetup{churchslavonic}{
+  script=Cyrillic,
+  scripttag=cyrl,
+  langtag=CHU,
+  hyphennames={churchslavonic},
+  hyphenmins={1,2},
+  frenchspacing=true,
+  fontsetup=true
+}
+
+% if spelling is set to modern, Russian date and caption
+% as well as ASCII digits are used.
+\define at key{churchslavonic}{spelling}[modern]{%
+  \ifstrequal{#1}{traditional}%
+    {\def\captionschurchslavonic{\captionschurchslavonic at traditional}%
+     \def\datechurchslavonic{\datechurchslavonic at traditional}}%
+    {\def\captionschurchslavonic{\captionschurchslavonic at modern}%
+     \def\datechurchslavonic{\datechurchslavonic at modern}}%
+}
+
+\newif\ifcyrillic at numerals
+\define at key{churchslavonic}{numerals}[latin]{%
+   \ifstrequal{#1}{cyrillic}%
+      {\cyrillic at numeralstrue}
+      {\cyrillic at numeralsfalse}%
+}
+
+\define at boolkey{churchslavonic}[churchslavonic@]{babelshorthands}[false]{}
+
+\setkeys{churchslavonic}{spelling,numerals}
+
+\ifsystem at babelshorthands
+  \setkeys{churchslavonic}{babelshorthands=true}
+\else
+ \setkeys{churchslavonic}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+ \input{babelsh.def}%
+  \initiate at active@char{"}%
+}{}
+
+\def\churchslavonic at shorthands{%
+  \bbl at activate{"}%
+  \def\language at group{churchslavonic}%
+%  \declare at shorthand{russian}{"`}{„}%
+%  \declare at shorthand{russian}{"'}{“}%
+%  \declare at shorthand{russian}{"<}{«}%
+%  \declare at shorthand{russian}{">}{»}%
+  \declare at shorthand{churchslavonic}{""}{\hskip\z at skip}%
+  \declare at shorthand{churchslavonic}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+  \declare at shorthand{churchslavonic}{"=}{\nobreak-\hskip\z at skip}%
+  \declare at shorthand{churchslavonic}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+  \declare at shorthand{churchslavonic}{"-}{%
+    \def\churchslavonic at sh@tmp{%
+      \if\churchslavonic at sh@next-\expandafter\churchslavonic at sh@emdash
+      \else\expandafter\churchslavonic at sh@hyphen\fi
+    }%
+    \futurelet\churchslavonic at sh@next\churchslavonic at sh@tmp}%
+  \def\churchslavonic at sh@hyphen{%
+    \nobreak\-\bbl at allowhyphens}%
+  \def\churchslavonic at 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 at skip\ignorespaces}%
+  \def\@Ccdash{\leavevmode
+   \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+  \ifx\cyrdash\undefined
+    \def\cyrdash{\hbox to.8em{--\hss--}}
+  \fi
+  \declare at shorthand{churchslavonic}{",}{\nobreak\hskip.2em\ignorespaces}%
+}
+
+\def\nochurchslavonic at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+}
+
+
+\def\captionschurchslavonic at modern{%
+   \def\prefacename{Предисловие}%
+   \def\refname{Список литературы}%
+   \def\abstractname{Аннотация}%
+   \def\bibname{Литература}%
+\def\chaptername{Глава}%
+   \def\appendixname{Приложение}%
+   \ifcsundef{thechapter}%
+     {\def\contentsname{Содержание}}%
+     {\def\contentsname{Оглавление}}%
+   \def\listfigurename{Список иллюстраций}%
+   \def\listtablename{Список таблиц}%
+   \def\indexname{Предметный указатель}%
+   \def\authorname{Именной указатель}%
+   \def\figurename{Рис.}%
+   \def\tablename{Таблица}%
+   \def\partname{Часть}%
+   \def\enclname{вкл.}%
+   \def\ccname{исх.}%
+   \def\headtoname{вх.}%
+   \def\pagename{с.}%
+   \def\seename{см.}%
+   \def\alsoname{см.~также}%
+   \def\proofname{Доказательство}%
+}
+\def\datechurchslavonic at modern{%
+      \def\today{\number\day%
+      \space\ifcase\month\or%
+      января\or
+      февраля\or
+      марта\or
+      апреля\or
+      мая\or
+      июня\or
+      июля\or
+      августа\or
+      сентября\or
+      октября\or
+      ноября\or
+      декабря\fi%
+      \space \number\year\space г.}}
+    
+\def\captionschurchslavonic at traditional{%
+   \def\prefacename{Предисло́вїе}%
+   \def\refname{Примѣча̑нїѧ}%
+   \def\abstractname{А҆ннота́цїѧ}%
+   \def\bibname{Вивлїогра́фїѧ}%
+   \def\chaptername{Глава̀}%
+   \def\appendixname{Приложе́нїе}%
+   \ifcsundef{thechapter}%
+     {\def\contentsname{Содержа́нїе}}%
+     {\def\contentsname{Ѡ҆главле́нїе}}%
+   \def\listfigurename{Надписа́нїе и҆з̾ѡбраже́нїй}%
+   \def\listtablename{Надписа́нїе табли́цъ}%
+   \def\indexname{Предмѣ́тный ᲂу҆каза́тель}%
+   \def\authorname{И҆менно́й ᲂу҆каза́тель}%
+   \def\figurename{И҆з̾ѡбраже́нїе}%
+   \def\tablename{Табли́ца}%
+   \def\partname{Ча́сть}%
+   \def\enclname{вкл.}%
+   \def\ccname{исх.}%
+   \def\headtoname{вх.}%
+   \def\pagename{с.}%
+   \def\seename{зрѝ}%
+   \def\alsoname{зрѝ~та́кожде}%
+   \def\proofname{Доказа́тельство}%
+}  
+\def\datechurchslavonic at traditional{%
+      \def\today{\number\day%
+      \space\ifcase\month\or%
+      і҆аннꙋа́рїа\or
+      феврꙋа́рїа\or
+      ма́рта\or
+      а҆прі́ллїа\or
+      ма́їа\or
+      і҆ꙋ́нїа\or
+      і҆ꙋ́лїа\or
+      а҆́ѵгꙋста\or
+      септе́мврїа\or
+      ѻ҆ктѡ́врїа\or
+      ное́мврїа\or
+      деке́мврїа\fi%
+      \space л.\space\number\year\space}}
+
+% The following is based on some ideas from ruscor.sty
+\def\churchslavonic at 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\Azbuk#1{\expandafter\churchslavonic at Alph\csname c@#1\endcsname}
+\def\churchslavonic at Alph#1{\ifcase#1\or
+   А\or Б\or В\or Г\or Д\or Є\or Ж\or Ѕ\or
+   З\or И\or І\or К\or Л\or М\or Н\or О\or
+   П\or Р\or С\or Т\or Ꙋ\or Ф\or Х\or Ѿ\or
+   Ц\or Ч\or Ш\or Щ\or Ъ\or Ы\or Ь\or Ѣ\or
+   Ю\or Ѫ\or Ѧ\or Ѯ\or Ѱ\or Ѳ\or Ѵ\else\xpg at ill@value{#1}{churchslavonic at Alph}\fi}
+
+\def\azbuk#1{\expandafter\churchslavonic at alph\csname c@#1\endcsname}
+\def\churchslavonic at alph#1{\ifcase#1\or
+   а\or б\or в\or г\or д\or е\or ж\or ѕ\or 
+   з\or и\or ї\or к\or л\or м\or н\or о\or
+   п\or р\or с\or т\or ꙋ\or ф\or х\or ѿ\or
+   ц\or ч\or ш\or щ\or ъ\or ы\or ь\or ѣ\or
+   ю\or ѫ\or ѧ\or ѯ\or ѱ\or ѳ\or ѵ\else\xpg at ill@value{#1}{churchslavonic at alph}\fi}
+
+%% Deleting stuff for Cyrillic numerals
+%% TODO: link with cu-num package
+\def\noextras at churchslavonic{%
+  \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+  \ifcyrillic at numerals\nochurchslavonic at numbers\fi
+ \nochurchslavonic at shorthands%
+}
+
+\def\blockextras at churchslavonic{%
+  \churchslavonic at capsformat%
+   \ifcyrillic at numerals\churchslavonic at numbers\fi
+  \ifchurchslavonic at babelshorthands\churchslavonic at shorthands\fi
+}
+
+\def\inlineextras at churchslavonic{%
+  \ifchurchslavonic at babelshorthands\churchslavonic at shorthands\fi%
+}
+
+%%% These lines taken from russianb.ldf, part of babel package.
+% make it optional?
+\def\sh    {\mathop{\operator at font sh}\nolimits}
+\def\ch    {\mathop{\operator at font ch}\nolimits}
+\def\tg    {\mathop{\operator at font tg}\nolimits}
+\def\arctg {\mathop{\operator at font arctg}\nolimits}
+\def\arcctg{\mathop{\operator at font arcctg}\nolimits}
+\def\th    {\mathop{\operator at font th}\nolimits}
+\def\ctg   {\mathop{\operator at font ctg}\nolimits}
+\def\cth   {\mathop{\operator at font cth}\nolimits}
+\def\cosec {\mathop{\operator at font cosec}\nolimits}
+\def\Prob  {\mathop{\kern\z@\mathsf{P}}\nolimits}
+\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
+\def\nod   {\mathop{\mathrm{н.о.д.}}\nolimits}
+\def\nok   {\mathop{\mathrm{н.о.к.}}\nolimits}
+\def\NOD   {\mathop{\mathrm{НОД}}\nolimits}
+\def\NOK   {\mathop{\mathrm{НОК}}\nolimits}
+\def\Proj  {\mathop{\mathrm{Пр}}\nolimits}
+%\DeclareRobustCommand{\No}{№}
+
+%    \end{macrocode}
+% \iffalse
+%</gloss-churchslavonic.ldf>
+%<*gloss-classiclatin.ldf>
+% \fi
+% \clearpage
+% 
+% \subsection{gloss-classiclatin.ldf}
+%    \begin{macrocode}
+%%
+%% This is file `gloss-classiclatin.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gloss-latin.dtx  (with options: `laclassic')
+%%   ------------------------------------------------------------------
+%%   Latin module for polyglossia
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%%   This work is distributed under the MIT License.
+%% 
+%%   See the postamble.
+%%   ------------------------------------------------------------------
+\ProvidesFile{gloss-classiclatin.ldf}
+        [2016/09/10 v.1.03 Latin support from polyglossia]
+%%
+
+
+\PolyglossiaSetup{classiclatin}{%
+      hyphennames={classiclatin},
+      hyphenmins={2,2},
+      frenchspacing=true,
+      fontsetup=true,
+}
+\def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V}
+\def\noclassicuclccodes{\lccode`\V=`\v \uccode`\u=`\U}
+\def\classiclatincaptions{%
+   \def\prefacename{Praefatio}%
+   \def\refname{Conspectus librorum}%
+   \def\abstractname{Summarium}%
+   \def\bibname{Conspectus librorum}%
+   \def\chaptername{Caput}%
+   \def\appendixname{Additamentum}%
+   \def\contentsname{Index}%
+   \def\listfigurename{Conspectus descriptionum}%
+   \def\listtablename{Conspectus tabularum}%
+   \def\indexname{Index rerum notabilium}%
+   \def\figurename{Descriptio}%
+   \def\tablename{Tabula}%
+   \def\partname{Pars}%
+   \def\enclname{Additur}%
+   \def\ccname{Exemplar}%
+   \def\headtoname{\ignorespaces}%
+   \def\pagename{charta}%
+   \def\seename{cfr.}%
+   \def\alsoname{cfr.}%
+   \def\proofname{Demonstratio}%
+   \def\glossaryname{Glossarium}%
+   }
+
+\def\classiclatindate{%
+   \def\today{\uppercase\expandafter{\romannumeral\day}%
+      \space \ifcase\month
+      \or Januarii\or Februarii\or Martii\or Aprilis\or Maii\or Junii\or
+      Julii\or Augusti\or Septembris\or Octobris\or Nouembris\or
+      Decembris\fi
+      \space \uppercase\expandafter{\romannumeral\year}}}
+
+\define at boolkey{classiclatin}[classiclatin@]{babelshorthands}[true]{}
+
+\ifsystem at babelshorthands
+  \setkeys{classiclatin}{babelshorthands=true}
+\else
+  \setkeys{classiclatin}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+    \input{babelsh.def}\initiate at active@char{"}}{}
+
+\def\classiclatin at shorthands{%
+  \def\language at group{classiclatin}%
+  \bbl at activate{"}%
+  \declare at shorthand{classiclatin}{"}{\relax
+    \ifmmode
+      \def\xpgcla at next{''}%
+    \else
+      \def\xpgcla at nextdq{\futurelet\xpgla at temp\xpgla at cwm}%
+    \fi
+  \xpgcla at nextdq}%
+}
+
+\def\xpgcla at allowhyphens{\bbl at allowhyphens\discretionary{-}{}{}\bbl at allowhyphens}
+\newcommand*{\xpgcla at cwm}{\let\xpgcla@@nextdq\relax
+  \ifcat\noexpand\xpgcla at temp a%
+    \let\xpgcla@@nextdq\xpgcla at allowhyphens
+  \else
+    \ifx\xpgcla at temp\ae
+        \let\xpgcla@@nextdq\xpgcla at allowhyphens
+    \else
+        \ifx\xpgcla at temp\oe
+           \let\xpgcla@@nextdq\xpgcla at allowhyphens
+        \else
+           \if\noexpand\xpgla at temp\string|%
+              \def\xpgcla@@nextdq{\xpgcla at allowhyphens\@gobble}%
+           \fi
+        \fi
+    \fi
+  \fi
+  \xpgla@@nextdq}%
+\def\noclassiclatin at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+}
+
+\let\xpgcla at savedvalues\empty
+\AtEndPreamble{%
+  \edef\xpgcla at savedvalues{%
+    \clubpenalty=\the\clubpenalty\space
+    \@clubpenalty=\the\@clubpenalty\space
+    \widowpenalty=\the\widowpenalty\space
+    \finalhyphendemerits=\the\finalhyphendemerits}%
+}
+
+\def\noextras at classiclatin{%
+   \lccode\string"2019=\z@
+   \noclassiclatin at shorthands
+   \noclassicuclccodes
+   \xpgcla at savedvalues
+}
+
+\def\blockextras at classiclatin{%
+   \lccode\string"2019=\string"2019
+   \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
+   \finalhyphendemerits=50000000
+   \classicuclccodes
+   \ifclassiclatin at babelshorthands\classiclatin at shorthands\fi
+}
+
+\def\inlineextras at classiclatin{%
+   \lccode\string"2019=\string"2019
+   \classicuclccodes
+   \ifclassiclatin at babelshorthands\classiclatin at shorthands\fi
+}
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%% 
+%%   Permission is hereby granted, free of charge, to any person obtaining
+%%   a copy of this software and associated documentation files
+%%   (the "Software"), to deal in the Software without restriction, including
+%%   without limitation the rights to use, copy, modify, merge, publish,
+%%   distribute, sublicense, and/or sell copies of the Software, and to permit
+%%   persons to whom the Software is furnished to do so, subject to the following
+%%   conditions:
+%% 
+%%   The above copyright notice and this permission notice shall be included in
+%%   all copies or substantial portions of the Software.
+%% 
+%%   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%%   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%%   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+%%   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%%   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%%   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+%%   IN THE SOFTWARE.
+%%
+%% End of file `gloss-classiclatin.ldf'.
+%    \end{macrocode}
+% \iffalse
+%</gloss-classiclatin.ldf>
 %<*gloss-coptic.ldf>
 % \fi
 % \clearpage
@@ -2340,36 +2769,36 @@
 \ProvidesFile{gloss-croatian.ldf}[polyglossia: module for croatian]
 \PolyglossiaSetup{croatian}{
   hyphennames={croatian},
-  hyphenmins={2,2},
-  indentfirst=true,
-  fontsetup=true,
+  hyphenmins={2,2}, % aligned with https://ctan.org/pkg/hrhyph patterns and http://lebesgue.math.hr/~nenad/Diplomski/Maja_Ribaric_2011.pdf
+  indentfirst=false, % recommendation from Damir Bralić
+  fontsetup=true
 }
 
 \def\captionscroatian{%
-   \def\refname{Literatura}%
-   \def\abstractname{Sažetak}%
-   \def\bibname{Bibliografija}%
-   \def\prefacename{Predgovor}%
-   \def\chaptername{Poglavlje}%
-   \def\appendixname{Dodatak}%
-   \def\contentsname{Sadržaj}%
-   \def\listfigurename{Popis slika}%
-   \def\listtablename{Popis tablica}%
-   \def\indexname{Kazalo}%
-   \def\figurename{Slika}%
-   \def\tablename{Tablica}%
-   \def\partname{Dio}%
-   \def\pagename{Stranica}%
-   \def\seename{Vidjeti}%
-   \def\alsoname{Također vidjeti}%
-   \def\enclname{Prilozi}%
-   \def\ccname{Kopija}%
-   \def\headtoname{Prima}%
-   \def\proofname{Dokaz}%
-   \def\glossaryname{Pojmovnik}%
-   }
+  \def\prefacename{Predgovor}%
+  \def\refname{Literatura}%
+  \def\abstractname{Sažetak}%
+  \def\bibname{Bibliografija}%
+  \def\chaptername{Poglavlje}%
+  \def\appendixname{Dodatak}%
+  \def\contentsname{Sadržaj}%
+  \def\listfigurename{Popis slika}%
+  \def\listtablename{Popis tablica}%
+  \def\indexname{Kazalo}%
+  \def\figurename{Slika}%
+  \def\tablename{Tablica}%
+  \def\partname{Dio}%
+  \def\enclname{Prilozi}%
+  \def\ccname{Kopija}%
+  \def\headtoname{Prima}%
+  \def\pagename{Stranica}%
+  \def\seename{Vidjeti}%
+  \def\alsoname{Također vidjeti}%
+  \def\proofname{Dokaz}%
+  \def\glossaryname{Pojmovnik}%
+}
 \def\datecroatian{%
-   \def\today{\number\day.~\ifcase\month\or
+  \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.}}
@@ -2728,7 +3157,7 @@
     \if at british@locale
       \english at day\space\english at month\space\number\year
     \else
-      \english at month\space\english at day, \number\year
+      \english at month\space\english at day,\space\number\year
     \fi}%
 }
 
@@ -3063,6 +3492,8 @@
   \newluatexattribute\xpg at frpt %
   \directlua{polyglossia.load_frpt()}%
 \else
+  \newXeTeXintercharclass\french at openbrackets % ( ] {
+  \newXeTeXintercharclass\french at closebrackets % ( ] {
   \newXeTeXintercharclass\french at punctthin % ! ? ; et autres
   \newXeTeXintercharclass\french at punctthick % :
   \newXeTeXintercharclass\french at punctguillstart % « ‹
@@ -3072,6 +3503,30 @@
 \def\xpg at unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
 \def\xpg at nospace#1{#1}
 
+\ifx\@makefntext\undefined\else
+  \let\nofrench at makefntext\@makefntext
+  \long\def\french at makefntext#1{\parindent1em \noindent\quad\ifx\@thefnmark\empty\else\@thefnmark.\space\fi #1}
+  \let\@makefntext\french at makefntext
+  \define at boolkey{french}[french@]{frenchfootnote}[true]{%
+  	\def\@tmpa{#1}
+    \def\@tmptrue{true}
+    \ifx\@tmpa\@tmptrue
+    	\let\@makefntext\french at makefntext
+		\else 
+			\let\@makefntext\nofrench at makefntext
+    \fi
+  }
+\fi
+
+
+\newif\iffrench at automaticspacesaroundguillemets
+\define at boolkey{french}[french@]{automaticspacesaroundguillemets}[true]{%
+  %\def\tmp at true{true}%
+  %\def\@tmpa{#1}%
+  %\ifx\@tmpa\tmp at true
+}
+\french at automaticspacesaroundguillemetstrue
+
 \def\french at punctuation{%
     \lccode"2019="2019
     \ifluatex
@@ -3091,19 +3546,31 @@
       \XeTeXcharclass `\» \french at punctguillend
       \XeTeXcharclass `\‹ \french at punctguillstart
       \XeTeXcharclass `\› \french at punctguillend
+      \XeTeXcharclass `\( \french at openbrackets
+      \XeTeXcharclass `\) \french at closebrackets
+      \XeTeXcharclass `\] \french at openbrackets
+      \XeTeXcharclass `\[ \french at closebrackets
+      \XeTeXcharclass `\{ \french at openbrackets
+      \XeTeXcharclass `\} \french at closebrackets
       \XeTeXinterchartoks \z@ \french at punctthin = {\nobreak\thinspace}%
       \XeTeXinterchartoks \z@ \french at punctthick = {\nobreakspace}%
-      \XeTeXinterchartoks 255 \french at punctthin = {\xpg at unskip\nobreak\thinspace}%
-      \XeTeXinterchartoks 255 \french at punctthick = {\xpg at unskip\nobreakspace}%
+      \XeTeXinterchartoks \xpg at boundaryclass \french at punctthin = {\xpg at unskip\nobreak\thinspace}%
+      \XeTeXinterchartoks \xpg at boundaryclass \french at punctthick = {\xpg at unskip\nobreakspace}%
       \XeTeXinterchartoks \french at punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
   %   \XeTeXinterchartoks \z@ \french at punctguillstart = {\nobreakspace}% "a«" unchanged?
   %   \XeTeXinterchartoks \french at punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
       \XeTeXinterchartoks \z@ \french at punctguillend = {\nobreakspace}% "a»" -> "a »"
-  %   \XeTeXinterchartoks \french at punctguillstart 255 = {\nobreakspace\xpg at nospace}% "«  " -> "«~"
-  %   \XeTeXinterchartoks 255 \french at punctguillend = {\xpg at unskip\nobreakspace}% "  »" -> "~»"
+      \iffrench at automaticspacesaroundguillemets
+        \XeTeXinterchartoks \french at punctguillstart \xpg at boundaryclass = {\nobreakspace\xpg at nospace\relax}% "«  " -> "«~"
+        \XeTeXinterchartoks \xpg at boundaryclass \french at punctguillend = {\xpg at unskip\nobreakspace}% "  »" -> "~»"
+      \fi
       \XeTeXinterchartoks \french at punctguillend \french at punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
       \XeTeXinterchartoks \french at punctguillend \french at punctthick = {\nobreakspace}% "»:" -> "» :"
       \XeTeXinterchartoks \french at punctthin \french at punctguillend  = {\nobreakspace}% "?»" -> "? »"
+     \XeTeXinterchartoks \french at openbrackets \french at punctthin = {\xpg at unskip}% "(?" -> "(?" and not "( ?"      
+     \XeTeXinterchartoks \french at punctthin \french at closebrackets = {\xpg at unskip}% "?)" -> "?)" (code not need, just for symetry with previous one)
+     \XeTeXinterchartoks \french at closebrackets \french at punctthin = {\nobreak\thinspace}% ")?" -> ") ?"
+     \XeTeXinterchartoks \french at closebrackets \french at punctthick = {\nobreakspace}% "):" -> ") :"
     \fi
     }
 
@@ -3154,8 +3621,8 @@
    Douzième\or Treizième\or Quatorzième\or Quinzième\or
    Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or
    Vingtième\fi\space}%
-   \def\thepart{}%
-   \def\partname{\protect\@Fpt partie}%
+   \def\thepart{\@Fpt partie}%
+   \def\partname{}%
    \def\pagename{page}%
    \def\seename{\emph{voir}}%
    \def\alsoname{\emph{voir aussi}}%
@@ -3204,10 +3671,6 @@
 \def\mr{M.\space}
 \def\mrs{MM.\space}
 
-\ifx\@makefntext\undefined\else
-\renewcommand\@makefntext[1]{\quad\ifx\@thefnmark\empty\else\@thefnmark.\space\fi #1}
-\fi
-
 %    \end{macrocode}
 % \iffalse
 %</gloss-french.ldf>
@@ -3452,6 +3915,8 @@
   \declare at shorthand{german}{""}{\hskip\z at skip}%
   \declare at shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
   \declare at shorthand{german}{"=}{\penalty\@M-\hskip\z at skip}%
+  \declare at shorthand{german}{"/}{\textormath
+    {\bbl at allowhyphens\discretionary{/}{}{/}\bbl at allowhyphens}{}}%
   \def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}%
 }
 
@@ -4481,6 +4946,231 @@
 %    \end{macrocode}
 % \iffalse
 %</gloss-italian.ldf>
+%<*gloss-japanese.ldf>
+% \fi
+% \clearpage
+% 
+% \subsection{gloss-japanese.ldf}
+%    \begin{macrocode}
+\ProvidesFile{gloss-japanese.ldf}[polyglossia: module for japanese]
+\PolyglossiaSetup{japanese}{
+	script=CJK,
+	language=Japanese,
+	langtag=JAN,
+	hyphennames={nohyphenation},
+	frenchspacing=false,
+	fontsetup=true
+}
+
+\def\japanese at 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}%
+	\def\presection{第}%
+	\def\presubsection{第}%
+	\def\presubsubsection{第}%
+}
+
+\def\captionsjapanese{%
+	\def\refname{参考文献}%
+	\def\abstractname{概要}%
+	\def\bibname{文献目録}%
+	\def\prefacename{端書き}%
+	\def\chaptername##1##2{第##1##2 章}%
+	\def\appendixname{付録}%
+	\def\contentsname{目次}%
+	\def\listfigurename{図目次}%
+	\def\listtablename{表目次}%
+	\def\indexname{索引}%
+	\def\figurename{図}%
+	\def\tablename{表}%
+	\def\partname##1##2{第##1##2 部}%
+	\def\pagename##1##2{第##1##2 頁}%
+	\def\seename{参照}%
+	\def\alsoname{参照}%
+	\def\enclname{添付}%
+	\def\ccname{同報}%
+	\def\headtoname{宛先}%
+	\def\proofname{証明}%
+	\def\glossaryname{用語集}%
+ }
+
+\newif\if at WameiReki \@WameiRekifalse%
+\newif\if at WameiTosi \@WameiTosifalse%
+\newif\if at WameiTuki \@WameiTukifalse%
+\newif\if at WameiHi \@WameiHifalse%
+\newif\if at IzumoTuki \@IzumoTukifalse%
+\newcount\c at 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 九十九
+	\else
+		\@ctrerr
+	\fi\relax
+}
+
+\def\@JapaneseNum#1{
+	\c at TempJNum=#1\divide\c at TempJNum by 1000\relax%
+	\ifnum\c at TempJNum=\z@\c at TempJNum=#1%
+		\divide\c at TempJNum by 100\relax%
+		\ifnum\c at TempJNum=\z@\@JapaneseDigit{#1}\relax%
+		\else
+			\ifcase\c at TempJNum\or 百\or 二百\or 三百\or 四百\or 五百\or
+				六百\or 七百\or 八百\or 九百%
+			\fi
+			\c at TempJNum=#1\divide\c at TempJNum by 100\multiply\c at TempJNum by -100\advance\c at TempJNum#1\@JapaneseDigit\c at TempJNum\relax%
+		\fi
+	\else
+		\ifcase\c at TempJNum\or 千\or 二千\or 三千\or 四千\or 五千\or
+			六千\or 七千\or 八千\or 九千%
+		\fi
+		\c at TempJNum=#1\divide\c at TempJNum by 1000\multiply\c at TempJNum by -1000\advance\c at TempJNum#1\divide\c at TempJNum by 100\relax%
+		\ifnum\c at TempJNum=\z@\c at TempJNum=#1%
+			\divide\c at TempJNum by 100\multiply\c at TempJNum by -100\advance\c at TempJNum#1\@JapaneseDigit\c at TempJNum\relax%
+		\else
+			\ifcase\c at TempJNum\or 百\or 二百\or 三百\or 四百\or 五百\or
+				六百\or 七百\or 八百\or 九百%
+			\fi
+			\c at TempJNum=#1\divide\c at TempJNum by 100\multiply\c at TempJNum by -100\advance\c at TempJNum#1\@JapaneseDigit\c at TempJNum\relax%
+		\fi
+	\fi
+}
+
+\def\@japanesenumber#1{
+	\@tempcnta=#1%
+	\ifnum\@tempcnta=\z@{〇}%
+	\else
+		\ifnum\@tempcnta<\z@{負}%
+			\multiply\@tempcnta by -1%
+		\fi
+		\@tempcntb=\@tempcnta\divide\@tempcntb by 10000\relax%
+		\ifnum\@tempcntb=\z@\@JapaneseNum%
+			\@tempcnta%
+		\else
+			\@tempcntb=\@tempcnta\divide\@tempcntb by 100000000\relax%
+			\ifnum\@tempcntb=\z@\@tempcntb=\@tempcnta%
+				\divide\@tempcntb by 10000%
+				\@JapaneseNum\@tempcntb{万}\@tempcntb=\@tempcnta%
+				\divide\@tempcntb by 10000\multiply\@tempcntb by -10000%
+				\advance\@tempcntb\@tempcnta\relax\@JapaneseNum\@tempcntb%
+			\else
+				\@JapaneseNum\@tempcntb{億}\@tempcntb=\@tempcnta%
+				\divide\@tempcntb by 100000000\multiply\@tempcntb by -100000000%
+				\advance\@tempcntb\@tempcnta\divide\@tempcntb by 10000\relax%
+				\ifnum\@tempcntb=\z@%
+				\else
+					\@JapaneseNum\@tempcntb{万}%
+				\fi
+				\@tempcntb=\@tempcnta\divide\@tempcntb by 10000%
+				\multiply\@tempcntb by -10000\advance\@tempcntb\@tempcnta%
+				\@JapaneseNum\@tempcntb%
+			\fi
+		\fi
+	\fi
+}
+
+\def\japanesenumber#1{
+	\expandafter\@japanesenumber\csname c@#1\endcsname%
+}
+
+\def\datejapanese{
+	{
+		\ifnum\year<1868%
+			\xdef\the at WarekiCur{}%
+		\else
+			\ifnum\year<1912%
+				\xdef\the at WarekiCur{明治}\advance\year-1867\relax%
+			\else
+				\ifnum\year<1926%
+					\xdef\the at WarekiCur{大正}\advance\year-1911\relax%
+  				\else
+					\ifnum\year<1989%
+						\xdef\the at WarekiCur{昭和}\advance\year-1925\relax%
+  					\else
+						\xdef\the at WarekiCur{平成}\advance\year-1988\relax%
+					\fi
+				\fi
+			\fi
+		\fi
+		\xdef\the at 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{
+		\if at WameiReki%
+			\the at WarekiCur%
+			\if at WameiTosi%
+				\@JapaneseNum\the at WameiTosi%
+			\else
+				\,\the at WameiTosi%
+			\fi
+		\else
+			\number\year\,%
+		\fi
+		{年}%
+		\if at WameiTuki%
+			\ifcase\month\or 睦月\or 如月\or 弥生\or 卯月\or 皐月\or
+				水無月\or 文月\or 葉月\or 長月\or
+				\if at IzumoTuki 神在月\else 神無月\fi
+				\or 霜月\or 師走%
+			\fi
+		\else
+			\,\number\month\,%
+		{月}%
+		\fi
+		\if at WameiHi%
+			\@JapaneseNum\day%
+		\else
+			\,\number\day\,%
+		\fi
+		{日}
+	}
+}
+
+\def\noextras at japanese{%
+	\japanese at capsformat%
+}
+
+\def\blockextras at japanese{%
+	\japanese at capsformat%
+}
+
+\def\inlineextras at japanese{%
+	\japanese at capsformat%
+}
+% Based on contributions of Toru Inagaki, Norio Iwase, François Charette
+
+%    \end{macrocode}
+% \iffalse
+%</gloss-japanese.ldf>
 %<*gloss-kannada.ldf>
 % \fi
 % \clearpage
@@ -4894,7 +5584,7 @@
             \XeTeXinterchartokenstate\@ne
             \XeTeXlinebreakpenalty 50
         \fi
-        \XeTeXlinebreakskip 0pt plus.1em minus .01em
+        \XeTeXlinebreakskip 0pt plus.05em minus .01em
         \XeTeXlinebreaklocale "ko"
     }
     \def\noextras at korean{%
@@ -4957,9 +5647,16 @@
 \protected\def\으{\xpg at make@josa \empty 으}
 \protected\def\로{\으 로}
 \protected\def\라{\xpg at make@josa 라{이라}}
+\def\xpg at make@josa at II{\xpg at make@josa\relax 이}
 \def\xpg at make@josa at I{%
-    \ifx\@let at token 라%
-        \expandafter\xpg at make@josa\expandafter\relax\expandafter 이%
+    \ifcat\@let at token\xpg at catcode@letter
+        \expandafter\expandafter\expandafter\count@\expandafter
+        \xpg at letter@to at num\meaning\@let at token\relax
+        \ifnum 0\ifnum\count@>"ABFF \ifnum\count@<"D7A4 1\fi\fi>\z@
+            \expandafter\expandafter\expandafter\xpg at make@josa at II
+        \else
+            \expandafter\expandafter\expandafter\가
+        \fi
     \else
         \expandafter\가
     \fi
@@ -5048,8 +5745,13 @@
 % user macro to force zero skip
 \let\inhibitglue\relax
 % initialize interchartoks and classes
-\let\XeTeXcharclassIgnore  \@cclvi
-\let\XeTeXcharclassBoundary\@cclv
+\ifdim\the\XeTeXversion\XeTeXrevision pt<0.99994pt
+    \let\XeTeXcharclassIgnore  \@cclvi
+    \let\XeTeXcharclassBoundary\@cclv
+\else
+    \chardef\XeTeXcharclassIgnore  =4096
+    \chardef\XeTeXcharclassBoundary=4095
+\fi
 \ifdefined\XeTeXcharclassID\else
     \ifdefined\xtxHanGlue
         \let\XeTeXcharclassID\@ne
@@ -5059,6 +5761,7 @@
         \newXeTeXintercharclass\XeTeXcharclassID
         \newXeTeXintercharclass\XeTeXcharclassOP
         \newXeTeXintercharclass\XeTeXcharclassCL
+        \global\let\XeTeXcharclassCJ\XeTeXcharclassID
         \global\let\XeTeXcharclassEX\XeTeXcharclassCL
         \global\let\XeTeXcharclassIS\XeTeXcharclassCL
         \global\let\XeTeXcharclassNS\XeTeXcharclassCL
@@ -5135,10 +5838,10 @@
         \advance\count@\@ne
         \repeat
     %
-    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassID{\XPGKOstartID}%
-    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassOP{\XPGKOstopAA\XPGKOstartOP}%
+    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassID{\XPGKOstopAA\XPGKOlatincjk\XPGKOstartID}%
+    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassOP{\XPGKOstopAA\XPGKOhalfhalf\XPGKOstartOP}%
     \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassCL{\XPGKOstopAA\XPGKOstartCL}%
-    \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassMD{\XPGKOstopAA\XPGKOstartMD}%
+    \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassMD{\XPGKOstopAA\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
     \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassFS{\XPGKOstopAA\XPGKOstartFS}%
     \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassAA{\XPGKOstartAA}%
     %
@@ -5148,7 +5851,7 @@
     \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassMD{\XPGKOstopID\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
     \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassFS{\XPGKOstopID\XPGKOstartFS}%
     \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAO{\XPGKOstopID\XPGKOlatincjk}%
-    \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAA{\XPGKOstartAA}%
+    \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAA{\XPGKOstopID\XPGKOlatincjk\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassID{\XPGKOstopOP\XPGKOstartID}%
     \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassOP{\XPGKOstopOP\XPGKOstartOP}%
@@ -5166,7 +5869,7 @@
     \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassEX{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}%
     \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAO{\XPGKOstopCL\XPGKOhalfhalf}%
     \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAC{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}%
-    \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAA{\XPGKOstopCL\XPGKOstartAA}%
+    \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAA{\XPGKOstopCL\XPGKOhalfhalf\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassID{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartID}%
     \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassOP{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartOP}%
@@ -5177,7 +5880,7 @@
     \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassEX{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}%
     \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAO{\XPGKOstopMD\XPGKOquarterquarter}%
     \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAC{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}%
-    \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAA{\XPGKOstopMD\XPGKOstartAA}%
+    \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAA{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassID{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartID}%
     \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassOP{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartOP}%
@@ -5188,7 +5891,7 @@
     \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassEX{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}%
     \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAO{\XPGKOstopFS\XPGKOhalfzero}%
     \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAC{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}%
-    \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAA{\XPGKOstopFS\XPGKOstartAA}%
+    \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAA{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassLD\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}%
     \XeTeXinterchartoks\XPGKOcharclassLD\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
@@ -5198,6 +5901,7 @@
     \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
     \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAO{\XPGKOhalfhalf}%
     \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAC{\XPGKOnobreak\XPGKOhalfhalf}%
+    \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAA{\XPGKOhalfhalf\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassAO\XeTeXcharclassOP{\XPGKOnobreak\XPGKOhalfhalf\XPGKOstartOP}%
     \XeTeXinterchartoks\XPGKOcharclassAO\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
@@ -5251,56 +5955,60 @@
 \@tmpa "FE13=\XeTeXcharclassID % ︓ PRESENTATION FORM FOR VERTICAL COLON
 \@tmpa "FE14=\XeTeXcharclassID % ︔ PRESENTATION FORM FOR VERTICAL SEMICOLON
 % CJ
-\@tmpa "3041=\XeTeXcharclassID
-\@tmpa "3043=\XeTeXcharclassID
-\@tmpa "3045=\XeTeXcharclassID
-\@tmpa "3047=\XeTeXcharclassID
-\@tmpa "3049=\XeTeXcharclassID
-\@tmpa "3063=\XeTeXcharclassID
-\@tmpa "3083=\XeTeXcharclassID
-\@tmpa "3085=\XeTeXcharclassID
-\@tmpa "3087=\XeTeXcharclassID
-\@tmpa "308E=\XeTeXcharclassID
-\@tmpa "3095=\XeTeXcharclassID
-\@tmpa "3096=\XeTeXcharclassID
-\@tmpa "30A1=\XeTeXcharclassID
-\@tmpa "30A3=\XeTeXcharclassID
-\@tmpa "30A5=\XeTeXcharclassID
-\@tmpa "30A7=\XeTeXcharclassID
-\@tmpa "30A9=\XeTeXcharclassID
-\@tmpa "30C3=\XeTeXcharclassID
-\@tmpa "30E3=\XeTeXcharclassID
-\@tmpa "30E5=\XeTeXcharclassID
-\@tmpa "30E7=\XeTeXcharclassID
-\@tmpa "30EE=\XeTeXcharclassID
-\@tmpa "30F5=\XeTeXcharclassID
-\@tmpa "30F6=\XeTeXcharclassID
-\@tmpa "30FC=\XeTeXcharclassID
-\count@"31F0 \loop
-    \expandafter\@tmpa\the\count@=\XeTeXcharclassID
-    \ifnum\count@<"31FF
-    \advance\count@\@ne
-    \repeat
-\count@"FF67 \loop
-    \expandafter\@tmpa\the\count@=\XeTeXcharclassID
-    \ifnum\count@<"FF70
-    \advance\count@\@ne
-    \repeat
+\ifnum\the\XeTeXcharclass"3041=\XeTeXcharclassID \else
+    \@tmpa "3041=\XeTeXcharclassID % ぁ HIRAGANA LETTER SMALL A
+    \@tmpa "3043=\XeTeXcharclassID % ぃ HIRAGANA LETTER SMALL I
+    \@tmpa "3045=\XeTeXcharclassID % ぅ HIRAGANA LETTER SMALL U
+    \@tmpa "3047=\XeTeXcharclassID % ぇ HIRAGANA LETTER SMALL E
+    \@tmpa "3049=\XeTeXcharclassID % ぉ HIRAGANA LETTER SMALL O
+    \@tmpa "3063=\XeTeXcharclassID % っ HIRAGANA LETTER SMALL TU
+    \@tmpa "3083=\XeTeXcharclassID % ゃ HIRAGANA LETTER SMALL YA
+    \@tmpa "3085=\XeTeXcharclassID % ゅ HIRAGANA LETTER SMALL YU
+    \@tmpa "3087=\XeTeXcharclassID % ょ HIRAGANA LETTER SMALL YO
+    \@tmpa "308E=\XeTeXcharclassID % ゎ HIRAGANA LETTER SMALL WA
+    \@tmpa "3095=\XeTeXcharclassID % ゕ HIRAGANA LETTER SMALL KA
+    \@tmpa "3096=\XeTeXcharclassID % ゖ HIRAGANA LETTER SMALL KE
+    \@tmpa "30A1=\XeTeXcharclassID % ァ KATAKANA LETTER SMALL A
+    \@tmpa "30A3=\XeTeXcharclassID % ィ KATAKANA LETTER SMALL I
+    \@tmpa "30A5=\XeTeXcharclassID % ゥ KATAKANA LETTER SMALL U
+    \@tmpa "30A7=\XeTeXcharclassID % ェ KATAKANA LETTER SMALL E
+    \@tmpa "30A9=\XeTeXcharclassID % ォ KATAKANA LETTER SMALL O
+    \@tmpa "30C3=\XeTeXcharclassID % ッ KATAKANA LETTER SMALL TU
+    \@tmpa "30E3=\XeTeXcharclassID % ャ KATAKANA LETTER SMALL YA
+    \@tmpa "30E5=\XeTeXcharclassID % ュ KATAKANA LETTER SMALL YU
+    \@tmpa "30E7=\XeTeXcharclassID % ョ KATAKANA LETTER SMALL YO
+    \@tmpa "30EE=\XeTeXcharclassID % ヮ KATAKANA LETTER SMALL WA
+    \@tmpa "30F5=\XeTeXcharclassID % ヵ KATAKANA LETTER SMALL KA
+    \@tmpa "30F6=\XeTeXcharclassID % ヶ KATAKANA LETTER SMALL KE
+    \@tmpa "30FC=\XeTeXcharclassID % ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
+    \count@"31F0 \loop
+        \expandafter\@tmpa\the\count@=\XeTeXcharclassID
+        \ifnum\count@<"31FF
+        \advance\count@\@ne
+        \repeat
+    \count@"FF67 \loop
+        \expandafter\@tmpa\the\count@=\XeTeXcharclassID
+        \ifnum\count@<"FF70
+        \advance\count@\@ne
+        \repeat
+\fi
 %
-\@tmpa "28=\XPGKOcharclassAO % (
-\@tmpa "5B=\XPGKOcharclassAO % [
-\@tmpa "60=\XPGKOcharclassAO % `
-\@tmpa "7B=\XPGKOcharclassAO % {
+\@tmpa "28=\XPGKOcharclassAO % ( LEFT PARENTHESIS
+\@tmpa "5B=\XPGKOcharclassAO % [ LEFT SQUARE BRACKET
+\@tmpa "60=\XPGKOcharclassAO % ` GRAVE ACCENT
+\@tmpa "7B=\XPGKOcharclassAO % { LEFT CURLY BRACKET
+\@tmpa "AB=\XPGKOcharclassAO % « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
 %
-\@tmpa "21=\XPGKOcharclassAC % !
-\@tmpa "27=\XPGKOcharclassAC % '
-\@tmpa "29=\XPGKOcharclassAC % )
-\@tmpa "2C=\XPGKOcharclassAC % ,
-\@tmpa "2E=\XPGKOcharclassAC % .
-\@tmpa "3B=\XPGKOcharclassAC % ;
-\@tmpa "3F=\XPGKOcharclassAC % ?
-\@tmpa "5D=\XPGKOcharclassAC % ]
-\@tmpa "7D=\XPGKOcharclassAC % }
+\@tmpa "21=\XPGKOcharclassAC % ! EXCLAMATION MARK
+\@tmpa "27=\XPGKOcharclassAC % ' APOSTROPHE
+\@tmpa "29=\XPGKOcharclassAC % ) RIGHT PARENTHESIS
+\@tmpa "2C=\XPGKOcharclassAC % , COMMA
+\@tmpa "2E=\XPGKOcharclassAC % . FULL STOP
+\@tmpa "3B=\XPGKOcharclassAC % ; SEMICOLON
+\@tmpa "3F=\XPGKOcharclassAC % ? QUESTION MARK
+\@tmpa "5D=\XPGKOcharclassAC % ] RIGHT SQUARE BRACKET
+\@tmpa "7D=\XPGKOcharclassAC % } RIGHT CURLY BRACKET
+\@tmpa "BB=\XPGKOcharclassAC % » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
 %
 \@tmpa "2018=\XeTeXcharclassOP % ‘ LEFT SINGLE QUOTATION MARK
 \@tmpa "201C=\XeTeXcharclassOP % “ LEFT DOUBLE QUOTATION MARK
@@ -5307,7 +6015,6 @@
 %
 \@tmpa "2019=\XeTeXcharclassCL % ’ RIGHT SINGLE QUOTATION MARK
 \@tmpa "201D=\XeTeXcharclassCL % ” RIGHT DOUBLE QUOTATION MARK
-\@tmpa "FE10=\XeTeXcharclassCL % ︐ PRESENTATION FORM FOR VERTICAL COMMA
 % NS
 \@tmpa "00B7=\XPGKOcharclassMD % · MIDDLE DOT
 \@tmpa "30FB=\XPGKOcharclassMD % ・ KATAKANA MIDDLE DOT
@@ -5448,117 +6155,153 @@
 % 
 % \subsection{gloss-latin.ldf}
 %    \begin{macrocode}
-% !TEX encoding = UTF-8 Unicode
-\ProvidesFile{gloss-latin.ldf}[polyglossia: module for latin]
-\PolyglossiaSetup{latin}{
-hyphennames={latin},
-%  hyphenmins={2,2},
-  frenchspacing=true,
-  fontsetup=true,
-}
+%%
+%% This is file `gloss-latin.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gloss-latin.dtx  (with options: `lamodern')
+%%   ------------------------------------------------------------------
+%%   Latin module for polyglossia
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%%   This work is distributed under the MIT License.
+%% 
+%%   See the postamble.
+%%   ------------------------------------------------------------------
+\ProvidesFile{gloss-latin.ldf}
+        [2016/09/10 v.1.03 Latin support from polyglossia]
+%%
 
 
-\define at boolkey{latin}[latin@]{babelshorthands}[true]{}
-
-
-\ifsystem at babelshorthands
-  \setkeys{latin}{babelshorthands=true}
-\else
-  \setkeys{latin}{babelshorthands=false}
-\fi
-
-
-\ifcsundef{initiate at active@char}{%
-\input{babelsh.def}%
-}{}\initiate at active@char{"}%
-
-
-
-\def\latin at shorthands{%
-  \bbl at activate{"}%
-  \def\language at group{latin}%
-  \declare at shorthand{latin}{"}{%
-    \relax\ifmmode
-      \def\xpgla at next{''}%
-    \else
-      \def\xpgla at next{\futurelet\xpgla at temp\xpgla at cwm}%
-    \fi
-  \xpgla at next}%
+\PolyglossiaSetup{latin}{%
+      hyphennames={latin},
+      hyphenmins={2,2},
+      frenchspacing=true,
+      fontsetup=true,
 }
-
-
-\def\xpgla at allowhyphens{\bbl at allowhyphens\discretionary{-}{}{}\bbl at allowhyphens}
-\newcommand*{\xpgla at cwm}{\let\xpgla@@next\relax
-  \ifcat\noexpand\xpgla at temp a%
-    \let\xpgla@@next\xpgla at allowhyphens
-  \else
-    \ifx\xpgla at temp\ae
-        \let\xpgla@@next\xpgla at allowhyphens
-    \else
-        \ifx\xpgla at temp\oe
-           \let\xpgla@@next\xpgla at allowhyphens
-        \else
-           \if\noexpand\xpgla at temp\string|%
-              \def\xpgla@@next{\xpgla at allowhyphens\@gobble}%
-           \fi
-        \fi
-    \fi
-  \fi
-  \xpgla@@next}%
-
-\def\nolatin at shorthands{%
-  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
-}
-
-
-% set modern as default
-\def\latin at variant{\l at latin}%
-\ifluatex\xpg at set@language at luatex@iv{latin}\fi
-\def\captionslatin{\modernlatincaptions}%
-\def\datelatin{\modernlatindate}%
 \def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V}
-
+\def\noclassicuclccodes{\lccode`\V=`\v \uccode`\u=`\U}
 \def\tmp at modern{modern}
 \def\tmp at medieval{medieval}
-\def\tmp at classic{classic}
+\unless\ifluatex
+  \def\tmp at classic{classic}
+  \def\tmp at liturgical{liturgical}
+\fi
+\newif\ifmedieval\medievalfalse
+\newif\ifclassic\classicfalse
+\define at boolkey{latin}[latin@]{ecclesiastic}[true]{}
 
+\let\latin at variant\l at latin
+\ifluatex
+  \ifcsname l at latin\endcsname\xpg at set@language at luatex@ii{latin}\fi
+\fi
+\def\captionslatin{\latincaptions}%
+\def\datelatin{\latindate}%
 \define at key{latin}{variant}[modern]{%
 \def\@tempa{#1}%
 \ifx\@tempa\tmp at medieval
-  \def\latin at variant{\l at latin}%
-  \xpg at set@language at luatex@iv{latin}
-  \def\captionslatin{\medievallatincaptions}%
-  \def\datelatin{\classiclatindate}% 
+  \ifluatex
+    \ifcsname l at latin\endcsname\xpg at set@language at luatex@ii{latin}\fi
+  \fi
+  \let\latin at variant\l at latin
+  \xpg at set@language at luatex@ii{latin}
+  \medievaltrue \classictrue
   \classicuclccodes
   \xpg at info{Option: Medieval Latin}%
 \else
   \ifx\@tempa\tmp at classic
-    \xpg at ifdefined{classiclatin}{%
-      \def\latin at variant{\l at classiclatin}%
-      \xpg at set@language at luatex@iv{classiclatin}%
-    }{%
-       \xpg at nopatterns{Classic Latin}%
-       \adddialect\l at classiclatin\l at latin
-       \def\latin at variant{\l at latin}%
-    }%
-    \def\captionslatin{\modernlatincaptions}%
-    \def\datelatin{\classiclatindate}%
-    \classicuclccodes
+    \unless\ifluatex
+      \unless\ifcsname l at classiclatin\endcsname
+         \xpg at nopatterns{Classic Latin}%
+         \adddialect\l at classiclatin\l at latin
+         \let\latin at variant\l at latin
+      \else
+         \let\latin at variant\l at classiclatin
+      \fi
+    \fi
+    \medievalfalse\classictrue\classicuclccodes
     \xpg at info{Option: Classic Latin}%
   \else
-    \def\latin at variant{\l at latin}%
-    \xpg at set@language at luatex@iv{latin}
-    \def\captionslatin{\modernlatincaptions}%
-    \def\datelatin{\modernlatindate}%
-    \xpg at info{Option: Modern Latin}%
+   \ifx\@tempa\tmp at liturgical\unless\ifluatex
+      \unless\ifcsname l at liturgicallatin\endcsname
+         \xpg at nopatterns{Liturgical Latin}%
+         \adddialect\l at liturgicallatin\l at latin
+         \def\latin at variant{\l at latin}%
+      \else
+         \let\latin at variant\l at liturgicallatin
+      \fi
+        \medievaltrue\classicfalse
+        \xpg at info{Option: Liturgical Latin}\fi
+   \else
+      \ifx\@tempa\tmp at modern
+        \let\latin at variant\l at latin
+        \ifluatex\xpg at set@language at luatex@ii{latin}\fi
+        \xpg at info{Option: Modern Latin}%
+      \else
+        \def\latin at variant{\l at nohyphenation}%
+        \PackageWarning{polyglossia}{%
+          *******************\MessageBreak
+          No hyphenation set for \@tempa
+          *******************\MessageBreak
+        }{}%
+      \fi
+    \fi
   \fi
 \fi
 }
 
 \def\latin at language{\language=\latin at variant}%
+\ifluatex
+       \PackageWarning{polyglossia}{\MessageBreak\MessageBreak
+       *****************\MessageBreak
+       The ecclesiastic option is not active\MessageBreak
+       when typesetting with LuaLaTeX\MessageBreak
+       *****************\MessageBreak
+       \MessageBreak}{}
+  \else
+   \def\ecclesiasticlatin at punctuation{%
+      \def\xpg at unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
+      \lccode\string"2019=\string"2019
+      \newXeTeXintercharclass\ecclesiasticlatin at punctthin
+      \newXeTeXintercharclass\ecclesiasticlatin at punctguillstart
+      \newXeTeXintercharclass\ecclesiasticlatin at punctguillend
+      \XeTeXinterchartokenstate=1
+      \XeTeXcharclass `\! \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\? \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\; \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\: \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\« \ecclesiasticlatin at punctguillstart
+      \XeTeXcharclass `\» \ecclesiasticlatin at punctguillend
+      \XeTeXinterchartoks \z@ \ecclesiasticlatin at punctthin = {\penalty\@M
+      \hskip.2\fontdimen2\font \@plus\z@\@minus\z@}%
+      \XeTeXinterchartoks 255 \ecclesiasticlatin at punctthin = {\xpg at unskip}
+      \XeTeXinterchartoks \ecclesiasticlatin at punctguillstart \z@ = {\penalty\@M
+      \hskip.2\fontdimen2\font \@plus\z@\@minus\z@\ignorespaces}
+      \XeTeXinterchartoks \z@ \ecclesiasticlatin at punctguillend = {\xpg at unskip
+      \penalty\@M\hskip.2\fontdimen2\font \@plus\z@\@minus\z@}
+    }
 
-\def\modernlatincaptions{%
-   \def\prefacename{Praefatio}%
+   \def\noecclesiasticlatin at punctuation{%
+      \lccode\string"2019=\z@
+        \XeTeXcharclass `\! \z@
+        \XeTeXcharclass `\? \z@
+        \XeTeXcharclass `\; \z@
+        \XeTeXcharclass `\: \z@
+        \XeTeXcharclass `\« \z@
+        \XeTeXcharclass `\» \z@
+        \XeTeXinterchartokenstate=0
+      }
+    \let\latin at original@makefntext\@makefntext
+    \newcommand\latin at ecclesiastic@makefntext[1]{%
+        \parindent 1em \noindent
+        \latin at Makefnmark{\enspace #1}}
+    \newcommand\latin at Makefnmark{\hbox{\normalfont\@thefnmark.}}
+\fi
+\setkeys{latin}{variant,ecclesiastic=false}
+\def\latincaptions{%
+   \def\prefacename{\ifmedieval Præfatio\else Praefatio\fi}%
    \def\refname{Conspectus librorum}%
    \def\abstractname{Summarium}%
    \def\bibname{Conspectus librorum}%
@@ -5580,49 +6323,93 @@
    \def\proofname{Demonstratio}%
    \def\glossaryname{Glossarium}%
    }
-      
-\def\medievallatincaptions{%
-   \def\prefacename{Præfatio}%
-   \def\refname{Conspectus librorum}%
-   \def\abstractname{Summarium}%
-   \def\bibname{Conspectus librorum}%
-   \def\chaptername{Caput}%
-   \def\appendixname{Additamentum}%
-   \def\contentsname{Index}%
-   \def\listfigurename{Conspectus descriptionum}%
-   \def\listtablename{Conspectus tabularum}%
-   \def\indexname{Index rerum notabilium}%
-   \def\figurename{Descriptio}%
-   \def\tablename{Tabula}%
-   \def\partname{Pars}%
-   \def\enclname{Additur}%
-   \def\ccname{Exemplar}%
-   \def\headtoname{\ignorespaces}%
-   \def\pagename{charta}%
-   \def\seename{cfr.}%
-   \def\alsoname{cfr.}%
-   \def\proofname{Demonstratio}%
-   \def\glossaryname{Glossarium}%
-   }
 
-\def\modernlatindate{%   
+\def\latindate{%
    \def\today{\uppercase\expandafter{\romannumeral\day}%
       \space \ifcase\month%
-      \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or Junii\or%
-      Julii\or Augusti\or Septembris\or Octobris\or Novembris\or%
-      Decembris\fi%
+      \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or
+      Junii\or Julii\or Augusti\or Septembris\or Octobris\or
+        \ifclassic Nouembris\else Novembris\fi
+      \or Decembris\fi%
       \space \uppercase\expandafter{\romannumeral\year}}}
+%%%%%%%%% Latin shorthands
 
-\def\classiclatindate{%   
-   \def\today{\uppercase\expandafter{\romannumeral\day}%
-      \space \ifcase\month
-      \or Januarii\or Februarii\or Martii\or Aprilis\or Maii\or Junii\or
-      Julii\or Augusti\or Septembris\or Octobris\or Nouembris\or
-      Decembris\fi
-      \space \uppercase\expandafter{\romannumeral\year}}}
-      
+\define at boolkey{latin}[latin@]{babelshorthands}[true]{}
+
+\ifsystem at babelshorthands
+  \setkeys{latin}{babelshorthands=true}
+\else
+  \setkeys{latin}{babelshorthands=false}
+\fi
+\ifcsundef{initiate at active@char}{%
+\input{babelsh.def}%
+\initiate at active@char{"}%
+\initiate at active@char{'}%
+}{}
+\def\latin at shorthands{%
+  \def\language at group{latin}%
+  \bbl at activate{"}%
+  \declare at shorthand{latin}{"}{\relax
+    \ifmmode
+      \def\xpgla at nextdq{''}%
+    \else
+      \def\xpgla at nextdq{\futurelet\xpgla at temp\xpgla at cwm}%
+    \fi
+  \xpgla at nextdq}%
+  \bbl at activate{'}%
+  \declare at shorthand{latin}{'}{\relax
+    \ifmmode
+      \def\xpgla at nextsq{'}%
+    \else
+      \def\xpgla at nextsq{\futurelet\xpgla at temp@A\xpgla at putacute}%
+    \fi
+  \xpgla at nextsq}%
+}
+\def\xpgla at allowhyphens{\bbl at allowhyphens
+        \discretionary{-}{}{}\bbl at allowhyphens}
+\newcommand*{\xpgla at cwm}{\let\xpgla@@nextdq\relax
+  \ifcat\noexpand\xpgla at temp a%
+    \let\xpgla@@nextdq\xpgla at allowhyphens
+  \else
+    \ifx\xpgla at temp\ae
+        \let\xpgla@@nextdq\xpgla at allowhyphens
+    \else
+        \ifx\xpgla at temp\oe
+           \let\xpgla@@nextdq\xpgla at allowhyphens
+        \else
+           \if\noexpand\xpgla at temp\string|%
+              \def\xpgla@@nextdq{\xpgla at allowhyphens\@gobble}%
+           \fi
+        \fi
+    \fi
+  \fi
+  \xpgla@@nextdq}%
+\def\xpgla at putacute#1{\let\xpgla at nextsq\relax%
+\if a\xpgla at temp@A
+  æ\kern-0.175em^^^^0301\kern0.175em\xpgla at allowhyphens
+\else
+\if o\xpgla at temp@A
+  œ\kern-0.175em^^^^0301\kern0.175em\xpgla at allowhyphens
+\else
+  \if æ\xpgla at temp@A
+    æ^^^^0301%
+  \else
+    \if œ\xpgla at temp@A
+      œ^^^^0301%
+    \else
+      \string'%
+    \fi
+  \fi
+\fi
+\fi}%
+
+\def\nolatin at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{'}}%
+}
+
 \let\xpgla at savedvalues\empty
-\AtEndPreamble{% the user or the class might define different values
+\AtEndPreamble{%
   \edef\xpgla at savedvalues{%
     \clubpenalty=\the\clubpenalty\space
     \@clubpenalty=\the\@clubpenalty\space
@@ -5629,12 +6416,15 @@
     \widowpenalty=\the\widowpenalty\space
     \finalhyphendemerits=\the\finalhyphendemerits}
 }
-
-
 \def\noextras at latin{%
    \lccode\string"2019=\z@
    \nolatin at shorthands
    \xpgla at savedvalues
+   \noclassicuclccodes
+  \iflatin at ecclesiastic
+    \unless\ifluatex\noecclesiasticlatin at punctuation
+    \let\@makefntext\latin at original@makefntext\fi
+  \fi
 }
 
 \def\blockextras at latin{%
@@ -5642,13 +6432,42 @@
    \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
    \finalhyphendemerits=50000000
    \iflatin at babelshorthands\latin at shorthands\fi
+   \iflatin at ecclesiastic\unless\ifluatex\ecclesiasticlatin at punctuation
+   \let\@makefntext\latin at ecclesiastic@makefntext\fi
+   \fi
 }
 
 \def\inlineextras at latin{%
    \lccode\string"2019=\string"2019
    \iflatin at babelshorthands\latin at shorthands\fi
+   \iflatin at ecclesiastic
+      \unless\ifluatex\ecclesiasticlatin at punctuation
+      \let\@makefntext\latin at ecclesiastic@makefntext\fi
+   \fi
 }
-
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%% 
+%%   Permission is hereby granted, free of charge, to any person obtaining
+%%   a copy of this software and associated documentation files
+%%   (the "Software"), to deal in the Software without restriction, including
+%%   without limitation the rights to use, copy, modify, merge, publish,
+%%   distribute, sublicense, and/or sell copies of the Software, and to permit
+%%   persons to whom the Software is furnished to do so, subject to the following
+%%   conditions:
+%% 
+%%   The above copyright notice and this permission notice shall be included in
+%%   all copies or substantial portions of the Software.
+%% 
+%%   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%%   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%%   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+%%   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%%   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%%   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+%%   IN THE SOFTWARE.
+%%
+%% End of file `gloss-latin.ldf'.
 %    \end{macrocode}
 % \iffalse
 %</gloss-latin.ldf>
@@ -5707,13 +6526,12 @@
 % \subsection{gloss-lithuanian.ldf}
 %    \begin{macrocode}
 % Translated by Paulius Sladkevičius <komsas at gmail.com>
-% See also http://github.com/fc7/polyglossia/issues#issue/6
 
 \ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian]
 \PolyglossiaSetup{lithuanian}{
   hyphennames={lithuanian},
   hyphenmins={2,2},
-  fontsetup=true,
+  fontsetup=true
 }
 
 \def\captionslithuanian{%
@@ -5729,7 +6547,6 @@
    \def\indexname{Rodyklė}%
    \def\figurename{pav.}%
    \def\tablename{lentelė}%
-   %\def\thepart{}% Roman numerals are fine
    \def\partname{Dalis}%
    \def\pagename{puslapis}%
    \def\seename{žiūrėk}%
@@ -5740,6 +6557,7 @@
    \def\proofname{Įrodymas}%
    \def\glossaryname{Terminų žodynas}%
 }
+
 \def\datelithuanian{%
    \def\lithuanianmonth{\ifcase\month\or
       sausio\or
@@ -5753,18 +6571,18 @@
       rugsėjo\or
       spalio\or
       lapkričio\or
-      gruodžio\fi}
+      gruodžio\fi}%
    \def\today{\number\year~m.~\lithuanianmonth~\number\day~d.}%
 }
 
 \def\blockextras at lithuanian{%
   \let\fnum at figure@orig\fnum at figure
+  \def\fnum at figure{\thefigure\nobreakspace\figurename}%
   \let\fnum at table@orig\fnum at table
-  \def\fnum at figure{\thefigure\nobreakspace\figurename}%
   \def\fnum at table{\thetable\nobreakspace\tablename}%
 }
 
-\def\noblockextras at lithuanian{%
+\def\noextras at lithuanian{%
   \let\fnum at figure\fnum at figure@orig
   \let\fnum at table\fnum at table@orig
 }
@@ -5772,6 +6590,200 @@
 %    \end{macrocode}
 % \iffalse
 %</gloss-lithuanian.ldf>
+%<*gloss-liturgicallatin.ldf>
+% \fi
+% \clearpage
+% 
+% \subsection{gloss-liturgicallatin.ldf}
+%    \begin{macrocode}
+%%
+%% This is file `gloss-liturgicallatin.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gloss-latin.dtx  (with options: `laliturgic')
+%%   ------------------------------------------------------------------
+%%   Latin module for polyglossia
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%%   This work is distributed under the MIT License.
+%% 
+%%   See the postamble.
+%%   ------------------------------------------------------------------
+\ProvidesFile{gloss-liturgiclatin.ldf}
+        [2016/09/10 v.1.03 Latin support from polyglossia]
+%%
+
+
+\PolyglossiaSetup{liturgicallatin}{%
+      hyphennames={liturgicallatin},
+      hyphenmins={2,2},
+      frenchspacing=true,
+      fontsetup=true,
+}
+\def\liturgicallatincaptions{%
+   \def\prefacename{Præfatio}%
+   \def\refname{Conspectus librorum}%
+   \def\abstractname{Summarium}%
+   \def\bibname{Conspectus librorum}%
+   \def\chaptername{Caput}%
+   \def\appendixname{Additamentum}%
+   \def\contentsname{Index}%
+   \def\listfigurename{Conspectus descriptionum}%
+   \def\listtablename{Conspectus tabularum}%
+   \def\indexname{Index rerum notabilium}%
+   \def\figurename{Descriptio}%
+   \def\tablename{Tabula}%
+   \def\partname{Pars}%
+   \def\enclname{Additur}%
+   \def\ccname{Exemplar}%
+   \def\headtoname{\ignorespaces}%
+   \def\pagename{charta}%
+   \def\seename{cfr.}%
+   \def\alsoname{cfr.}%
+   \def\proofname{Demonstratio}%
+   \def\glossaryname{Glossarium}%
+   }
+
+\def\liturgicallatindate{%
+   \def\today{\uppercase\expandafter{\romannumeral\day}%
+      \space \ifcase\month%
+      \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or Junii\or%
+      Julii\or Augusti\or Septembris\or Octobris\or Novembris\or%
+      Decembris\fi%
+      \space \uppercase\expandafter{\romannumeral\year}}}
+
+\define at boolkey{liturgicallatin}[liturgicallatin@]{babelshorthands}[true]{}
+
+\ifsystem at babelshorthands
+  \setkeys{liturgicallatin}{babelshorthands=true}
+\else
+  \setkeys{liturgicallatin}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+    \input{babelsh.def}%
+    \initiate at active@char{"}%
+    \initiate at active@char{'}%
+}{}
+
+\def\liturgicallatin at shorthands{%
+  \def\language at group{liturgicallatin}%
+  \bbl at activate{"}%
+  \declare at shorthand{liturgicallatin}{"}{\relax
+    \ifmmode
+      \def\xpglla at next{''}%
+    \else
+      \def\xpglla at nextdq{\futurelet\xpglla at temp\xpglla at cwm}%
+    \fi
+  \xpglla at nextdq}%
+  \bbl at activate{'}%
+  \declare at shorthand{liturgicallatin}{'}{\relax
+    \ifmmode
+      \def\xpglla at nextsq{'}%
+    \else
+      \def\xpglla at nextsq{\futurelet\temp at A\xpglla at putacute}%
+    \fi
+  \xpgla at nextsq}%
+}
+
+\def\xpglla at allowhyphens{\bbl at allowhyphens
+     \discretionary{-}{}{}\bbl at allowhyphens}
+
+\newcommand*{\xpglla at cwm}{\let\xpglla@@nextdq\relax
+  \ifcat\noexpand\xpglla at temp a%
+    \let\xpglla@@nextdq\xpglla at allowhyphens
+  \else
+    \ifx\xpglla at temp\ae
+        \let\xpglla@@nextdq\xpglla at allowhyphens
+    \else
+        \ifx\xpglla at temp\oe
+           \let\xpglla@@nextdq\xpglla at allowhyphens
+        \else
+           \if\noexpand\xpglla at temp\string|%
+              \def\xpglla@@nextdq{\xpglla at allowhyphens\@gobble}%
+           \fi
+        \fi
+    \fi
+  \fi
+  \xpglla@@nextdq}%
+
+\def\xpglla at putacute#1{\let\xpglla at nextsq\relax%
+\if a\xpglla at temp@A
+  æ\kern-0.175em^^^^0301\kern0.175em\xpglla at allowhyphens
+\else
+\if o\xpglla at temp@A
+  œ\kern-0.175em^^^^0301\kern0.175em\xpglla at allowhyphens
+\else
+  \if æ\xpglla at temp@A
+    æ^^^^0301%
+  \else
+    \if œ\xpglla at temp@A
+      œ^^^^0301%
+    \else
+      \string'%
+    \fi
+  \fi
+\fi
+\fi}%
+\def\noliturgicallatin at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{'}}%
+}
+
+\let\xpglla at savedvalues\empty
+\AtEndPreamble{%
+  \edef\xpglla at savedvalues{%
+    \clubpenalty=\the\clubpenalty\space
+    \@clubpenalty=\the\@clubpenalty\space
+    \widowpenalty=\the\widowpenalty\space
+    \finalhyphendemerits=\the\finalhyphendemerits}%
+}
+
+\def\noextras at liturgicallatin{%
+   \lccode\string"2019=\z@
+   \noliturgicallatin at shorthands
+   \xpglla at savedvalues
+}
+
+\def\blockextras at liturgicallatin{%
+   \lccode\string"2019=\string"2019
+   \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
+   \finalhyphendemerits=50000000
+   \ifliturgicallatin at babelshorthands\liturgicallatin at shorthands\fi
+}
+
+\def\inlineextras at liturgicallatin{%
+   \lccode\string"2019=\string"2019
+   \ifliturgicallatin at babelshorthands\liturgicallatin at shorthands\fi
+}
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%% 
+%%   Permission is hereby granted, free of charge, to any person obtaining
+%%   a copy of this software and associated documentation files
+%%   (the "Software"), to deal in the Software without restriction, including
+%%   without limitation the rights to use, copy, modify, merge, publish,
+%%   distribute, sublicense, and/or sell copies of the Software, and to permit
+%%   persons to whom the Software is furnished to do so, subject to the following
+%%   conditions:
+%% 
+%%   The above copyright notice and this permission notice shall be included in
+%%   all copies or substantial portions of the Software.
+%% 
+%%   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%%   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%%   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+%%   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%%   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%%   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+%%   IN THE SOFTWARE.
+%%
+%% End of file `gloss-liturgicallatin.ldf'.
+%    \end{macrocode}
+% \iffalse
+%</gloss-liturgicallatin.ldf>
 %<*gloss-lsorbian.ldf>
 % \fi
 % \clearpage
@@ -5838,6 +6850,16 @@
   fontsetup=true,
 }
 
+\frenchspacing
+
+% change 'táblázat x.x' to 'x.x. táblázat'
+\newcommand{\@magyar at fnum@table}{\thetable.~\tablename}
+\let\fnum at table\@magyar at fnum@table
+
+% change 'ábra x.x' to 'x.x. ábra'
+\newcommand{\@magyar at fnum@figure}{\thefigure.~\figurename}
+\let\fnum at figure\@magyar at fnum@figure
+
 \def\captionsmagyar{%
    \def\refname{Hivatkozások}%
    \def\abstractname{Kivonat}%
@@ -5979,7 +7001,7 @@
 \RequirePackage{devanagaridigits}
 
 \PolyglossiaSetup{marathi}{
-  script=Devaganari,
+  script=Devanagari,
   scripttag=deva,
   langtag=MAR,
   hyphennames={marathi},
@@ -6900,9 +7922,18 @@
 
 % The following is based on some ideas from ruscor.sty
 \def\russian at capsformat{%
-   \def\@seccntformat##1{\csname pre##1\endcsname%
-      \csname the##1\endcsname%
-      \csname post##1\endcsname}%
+   \ifdef{\KOMAScript}{%
+      \renewcommand{\chapterformat}{\prechapter\thechapter\postchapter}%
+      \renewcommand{\sectionformat}{\presection\thesection\postsection}%
+      \renewcommand{\subsectionformat}{\presubsection\thesubsection\postsubsection}%
+      \renewcommand{\subsubsectionformat}{\presubsubsection\thesubsubsection\postsubsubsection}%
+      \renewcommand{\paragraphformat}{\preparagraph\theparagraph\postparagraph}%
+      \renewcommand{\subparagraphformat}{\presubparagraph\thesubparagraph\postsubparagraph}%
+   }{%
+      \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}%
@@ -6945,7 +7976,16 @@
 }
 
 \def\noextras at russian{%
-   \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+   \ifdef{\KOMAScript}{%
+      \renewcommand{\chapterformat}{\thechapter\autodot\enskip}%
+      \renewcommand{\sectionformat}{\thesection\autodot\enskip}%
+      \renewcommand{\subsectionformat}{\thesubsection\autodot\enskip}%
+      \renewcommand{\subsubsectionformat}{\thesubsubsection\autodot\enskip}%
+      \renewcommand{\paragraphformat}{\theparagraph\autodot\enskip}%
+      \renewcommand{\subparagraphformat}{\thesubparagraph\autodot\enskip}%
+   }{%
+      \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+   }%
    \ifcyrillic at numerals\norussian at numbers\fi
    \norussian at shorthands%
 }
@@ -7085,6 +8125,11 @@
 \def\fontsetup at sanskrit@Telugu{%
   \def\xpg at scripttag@sanskrit{telu}%
   \xpg at fontsetup@nonlatin{sanskrit}}
+%% DW
+\def\fontsetup at sanskrit@Latin{%
+    \def\xpg at scripttag@sanskrit{latn}%
+    \xpg at fontsetup@latin{sanskrit}}
+%% DW
 
 \setkeys{sanskrit}{Script} %sets the default for Devanagari
 
@@ -8361,6 +9406,70 @@
   %TODO localalph
 }
 
+\newif\ifcyrillic at numerals
+\define at key{ukrainian}{numerals}[latin]{%
+\ifstrequal{#1}{cyrillic}%
+{\cyrillic at numeralstrue}
+{\cyrillic at numeralsfalse}%
+}
+
+\define at boolkey{ukrainian}[ukrainian@]{babelshorthands}[false]{}
+
+\setkeys{ukrainian}{numerals}
+
+\ifsystem at babelshorthands
+\setkeys{ukrainian}{babelshorthands=true}
+\else
+\setkeys{ukrainian}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+\input{babelsh.def}%
+\initiate at active@char{"}%
+}{}
+
+\def\ukrainian at shorthands{%
+\bbl at activate{"}%
+\def\language at group{ukrainian}%
+%  \declare at shorthand{ukrainian}{"`}{„}%
+%  \declare at shorthand{ukrainian}{"'}{“}%
+%  \declare at shorthand{ukrainian}{"<}{«}%
+%  \declare at shorthand{ukrainian}{">}{»}%
+\declare at shorthand{ukrainian}{""}{\hskip\z at skip}%
+\declare at shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+\declare at shorthand{ukrainian}{"=}{\nobreak-\hskip\z at skip}%
+\declare at shorthand{ukrainian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+\declare at shorthand{ukrainian}{"-}{%
+\def\ukrainian at sh@tmp{%
+\if\ukrainian at sh@next-\expandafter\ukrainian at sh@emdash
+\else\expandafter\ukrainian at sh@hyphen\fi
+}%
+\futurelet\ukrainian at sh@next\ukrainian at sh@tmp}%
+\def\ukrainian at sh@hyphen{%
+\nobreak\-\bbl at allowhyphens}%
+\def\ukrainian at 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 at skip\ignorespaces}%
+\def\@Ccdash{\leavevmode
+\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+\ifx\cyrdash\undefined
+\def\cyrdash{\hbox to.8em{--\hss--}}
+\fi
+\declare at shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}%
+}
+
+\def\noukrainian at shorthands{%
+\@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+}
+
 \def\captionsukrainian{%
    \def\refname{Література}%
    \def\abstractname{Анотація}%
@@ -8402,6 +9511,25 @@
     грудня\fi%
     \space\number\year~р.}}
 
+% The following is based on some ideas from ruscor.sty
+\def\ukrainian at 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 at Alph\csname c@#1\endcsname}
 \def\ukrainian at Alph#1{\ifcase#1\or
    А\or Б\or В\or Г\or Д\or Е\or Є\or Ж\or
@@ -8427,6 +9555,44 @@
    \let\@alph\latin at alph%
 }
 
+\def\noextras at ukrainian{%
+\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+\ifcyrillic at numerals\noukrainian at numbers\fi
+\noukrainian at shorthands%
+}
+
+\def\blockextras at ukrainian{%
+\ukrainian at capsformat%
+\ifcyrillic at numerals\ukrainian at numbers\fi
+\ifukrainian at babelshorthands\ukrainian at shorthands\fi
+}
+
+\def\inlineextras at ukrainian{%
+\ifukrainian at babelshorthands\ukrainian at shorthands\fi%
+}
+
+%%% stuff from Babel
+% make it optional?
+\def\sh{\mathop{\operator at font sh}\nolimits}
+\def\ch{\mathop{\operator at font ch}\nolimits}
+\def\tg{\mathop{\operator at font tg}\nolimits}
+\def\arctg{\mathop{\operator at font arctg}\nolimits}
+\def\arcctg{\mathop{\operator at font arcctg}\nolimits}
+\def\ctg{\mathop{\operator at font ctg}\nolimits}
+\def\cth{\mathop{\operator at font cth}\nolimits}
+\def\cosec{\mathop{\operator at font cosec}\nolimits}
+\def\Prob{\mathop{\kern\z@\mathsf{P}}\nolimits}
+\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
+\def\nsd{\mathop{\mathrm{н.с.д.}}\nolimits}
+\def\nsk{\mathop{\mathrm{н.с.к.}}\nolimits}
+\def\NSD{\mathop{\mathrm{НСД}}\nolimits}
+\def\NSK{\mathop{\mathrm{НСК}}\nolimits}
+\def\nod{\mathop{\mathrm{н.о.д.}}\nolimits}
+\def\nok{\mathop{\mathrm{н.о.к.}}\nolimits}
+\def\NOD{\mathop{\mathrm{НОД}}\nolimits}
+\def\NOK{\mathop{\mathrm{НОК}}\nolimits}
+\def\Proj{\mathop{\mathrm{пр}}\nolimits}
+
 %    \end{macrocode}
 % \iffalse
 %</gloss-ukrainian.ldf>
@@ -8663,10 +9829,10 @@
   \def\appendixname{Phụ lục}%
   \def\contentsname{Mục lục}%
   \def\listfigurename{Danh sách hình vẽ}%
-  \def\listtablename{Danh sách bẳng}%
+  \def\listtablename{Danh sách bảng}%
   \def\indexname{Chỉ mục}%
   \def\figurename{Hình}%
-  \def\tablename{Bẳng}%
+  \def\tablename{Bảng}%
   \def\partname{Phần}%
   \def\pagename{Trang}%
   \def\seename{Xem}%
@@ -9238,8 +10404,9 @@
 local luatexhyphen = luatexhyphen
 local byte = unicode.utf8.byte
 
+local module_name = "polyglossia"
 local polyglossia_module = {
-    name          = "polyglossia",
+    name          = module_name,
     version       = 1.3,
     date          = "2013/05/11",
     description   = "Polyglossia",
@@ -9248,9 +10415,15 @@
     license       = "CC0"
 }
 
-local error, warning, info, log =
-    luatexbase.provides_module(polyglossia_module)
+luatexbase.provides_module(polyglossia_module)
 
+local log_info = function(message)
+	luatexbase.module_info(module_name, message)
+end
+local log_warning = function(message)
+	luatexbase.module_warning(module_name, message)
+end
+
 polyglossia = polyglossia or {}
 local polyglossia = polyglossia
 
@@ -9338,7 +10511,7 @@
 local function newloader(langentry)
     loaded_language = polyglossia.newloader_loaded_languages[langentry]
     if loaded_language then
-        texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language))
+        log_info('Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language))
         -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. tostring(loaded_language) .. '; id is ' .. lang.id(loaded_language))
         -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. loaded_language['patterns'] .. '; id is ' .. lang.id(loaded_language))
         return lang.id(loaded_language)
@@ -9347,15 +10520,16 @@
         if langdata and langdata['special'] == 'language0' then return 0 end
 
         if langdata then
-            print("Language data for " .. langentry)
+            local s = "Language data for " .. langentry
             for k, v in pairs(langdata) do
-                print(k, tostring(v))
+				s = s .. "\n" .. k .. "\t" .. tostring(v)
             end
             polyglossia.newloader_max_langid = polyglossia.newloader_max_langid + 1
             -- langobject = lang.new(newloader_max_langid)
             lang.new(); lang.new(); lang.new()
             langobject = lang.new()
-            texio.write_nl('term and log', langdata.patterns)
+			s = s .. "\npatterns: " .. langdata.patterns
+			log_info(s)
             if langdata.patterns and langdata.patterns ~= '' then
                 pattfilepath = kpse.find_file(langdata.patterns)
                 if pattfilepath then
@@ -9374,10 +10548,10 @@
             end
             polyglossia.newloader_loaded_languages[langentry] = langobject
 
-            texio.write_nl('term and log', 'Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject))
+            log_info('Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject))
             return lang.id(langobject)
         else
-            texio.write_nl('term and log', 'Language ' .. langentry .. ' not found in language.dat.lua')
+            log_warning('Language ' .. langentry .. ' not found in language.dat.lua')
             return 255
         end
     end
@@ -9407,7 +10581,7 @@
 
    ¦----------------------------------------------¦
    ¦                                              ¦
-   ¦       THE POLYGLOSSIA PACKAGE v1.42.4        ¦
+   ¦       THE POLYGLOSSIA PACKAGE v1.43          ¦
    ¦                                              ¦
    ¦     Modern multilingual typesetting          ¦
    ¦        with XeLaTeX and LuaLaTeX             ¦
@@ -9416,7 +10590,7 @@
 
 This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
 (with a few languages incompletely supported for the latter). This version
-includes support for 76 different languages.
+includes support for 77 different languages.
 
 Polyglossia makes it possible to automate the following tasks:
 
@@ -9438,7 +10612,7 @@
 
 LICENSE
 
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2016 Arthur Reutenauer
+Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2018 Arthur Reutenauer
 
 Polyglossia is placed under the terms of the LaTeX Project Public Licence
 (LPPL), either version 1.3, or, at your option, any later version.  See
@@ -9449,12 +10623,17 @@
 
 BUGS
 
-Polyglossia has no bug, of course.
+Polyglossia is full of bugs.  If you run into one, or suspect you do, or you
+have a request or comment, please use the GitHub issue tracker:
+http://github.com/reutenauer/polyglossia/issues
 
-Hum, sorry, wishful thinking.  Please report any bugs, problems or requests on:
-http://github.com/reutenauer/polyglossia/issues
+This is more efficient than contacting me by email as it allows me to track the
+issues and follow progress.
 %</../README>
 %<*Changelog>
+1.42.5 (13-04-2017)
+  * Many changes to the French language file, by Maïeul Rouquette
+
 1.42.4 (February, March 2016)
   * Remedial actions for the Babel changes
 
@@ -9738,6 +10917,8 @@
 \documentclass[a4paper]{article}
 \usepackage[no-math]{fontspec}
 \usepackage{xltxtra,url}
+\let\XeTeX\undefined
+\let\XeLaTeX\undefined
 \usepackage{polyglossia}
 \usepackage{trace}
 \setdefaultlanguage{french}
@@ -9889,6 +11070,8 @@
 \newfontfamily\arabicfont[Script=Arabic]{Amiri}%
 \newfontfamily\arabicfonttt[Script=Arabic,Scale=.75]{DejaVu Sans Mono}
 \newfontfamily\farsifont[Script=Arabic,Scale=1.1,WordSpace=2]{IranNastaliq}
+\let\XeTeX\undefined
+\let\XeLaTeX\undefined
 \usepackage[quiet,nolocalmarks]{polyglossia}
 \setdefaultlanguage[calendar=gregorian,hijricorrection=1,locale=mashriq]{arabic}
 \setotherlanguage[variant=british]{english}

Added: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-churchslavonic.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-churchslavonic.ldf	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-churchslavonic.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -0,0 +1,244 @@
+\ProvidesFile{gloss-churchslavonic.ldf}[polyglossia: module for Church Slavonic]
+\PolyglossiaSetup{churchslavonic}{
+  script=Cyrillic,
+  scripttag=cyrl,
+  langtag=CHU,
+  hyphennames={churchslavonic},
+  hyphenmins={1,2},
+  frenchspacing=true,
+  fontsetup=true
+}
+
+% if spelling is set to modern, Russian date and caption
+% as well as ASCII digits are used.
+\define at key{churchslavonic}{spelling}[modern]{%
+  \ifstrequal{#1}{traditional}%
+    {\def\captionschurchslavonic{\captionschurchslavonic at traditional}%
+     \def\datechurchslavonic{\datechurchslavonic at traditional}}%
+    {\def\captionschurchslavonic{\captionschurchslavonic at modern}%
+     \def\datechurchslavonic{\datechurchslavonic at modern}}%
+}
+
+\newif\ifcyrillic at numerals
+\define at key{churchslavonic}{numerals}[latin]{%
+   \ifstrequal{#1}{cyrillic}%
+      {\cyrillic at numeralstrue}
+      {\cyrillic at numeralsfalse}%
+}
+
+\define at boolkey{churchslavonic}[churchslavonic@]{babelshorthands}[false]{}
+
+\setkeys{churchslavonic}{spelling,numerals}
+
+\ifsystem at babelshorthands
+  \setkeys{churchslavonic}{babelshorthands=true}
+\else
+ \setkeys{churchslavonic}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+ \input{babelsh.def}%
+  \initiate at active@char{"}%
+}{}
+
+\def\churchslavonic at shorthands{%
+  \bbl at activate{"}%
+  \def\language at group{churchslavonic}%
+%  \declare at shorthand{russian}{"`}{„}%
+%  \declare at shorthand{russian}{"'}{“}%
+%  \declare at shorthand{russian}{"<}{«}%
+%  \declare at shorthand{russian}{">}{»}%
+  \declare at shorthand{churchslavonic}{""}{\hskip\z at skip}%
+  \declare at shorthand{churchslavonic}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+  \declare at shorthand{churchslavonic}{"=}{\nobreak-\hskip\z at skip}%
+  \declare at shorthand{churchslavonic}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+  \declare at shorthand{churchslavonic}{"-}{%
+    \def\churchslavonic at sh@tmp{%
+      \if\churchslavonic at sh@next-\expandafter\churchslavonic at sh@emdash
+      \else\expandafter\churchslavonic at sh@hyphen\fi
+    }%
+    \futurelet\churchslavonic at sh@next\churchslavonic at sh@tmp}%
+  \def\churchslavonic at sh@hyphen{%
+    \nobreak\-\bbl at allowhyphens}%
+  \def\churchslavonic at 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 at skip\ignorespaces}%
+  \def\@Ccdash{\leavevmode
+   \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+  \ifx\cyrdash\undefined
+    \def\cyrdash{\hbox to.8em{--\hss--}}
+  \fi
+  \declare at shorthand{churchslavonic}{",}{\nobreak\hskip.2em\ignorespaces}%
+}
+
+\def\nochurchslavonic at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+}
+
+
+\def\captionschurchslavonic at modern{%
+   \def\prefacename{Предисловие}%
+   \def\refname{Список литературы}%
+   \def\abstractname{Аннотация}%
+   \def\bibname{Литература}%
+\def\chaptername{Глава}%
+   \def\appendixname{Приложение}%
+   \ifcsundef{thechapter}%
+     {\def\contentsname{Содержание}}%
+     {\def\contentsname{Оглавление}}%
+   \def\listfigurename{Список иллюстраций}%
+   \def\listtablename{Список таблиц}%
+   \def\indexname{Предметный указатель}%
+   \def\authorname{Именной указатель}%
+   \def\figurename{Рис.}%
+   \def\tablename{Таблица}%
+   \def\partname{Часть}%
+   \def\enclname{вкл.}%
+   \def\ccname{исх.}%
+   \def\headtoname{вх.}%
+   \def\pagename{с.}%
+   \def\seename{см.}%
+   \def\alsoname{см.~также}%
+   \def\proofname{Доказательство}%
+}
+\def\datechurchslavonic at modern{%
+      \def\today{\number\day%
+      \space\ifcase\month\or%
+      января\or
+      февраля\or
+      марта\or
+      апреля\or
+      мая\or
+      июня\or
+      июля\or
+      августа\or
+      сентября\or
+      октября\or
+      ноября\or
+      декабря\fi%
+      \space \number\year\space г.}}
+    
+\def\captionschurchslavonic at traditional{%
+   \def\prefacename{Предисло́вїе}%
+   \def\refname{Примѣча̑нїѧ}%
+   \def\abstractname{А҆ннота́цїѧ}%
+   \def\bibname{Вивлїогра́фїѧ}%
+   \def\chaptername{Глава̀}%
+   \def\appendixname{Приложе́нїе}%
+   \ifcsundef{thechapter}%
+     {\def\contentsname{Содержа́нїе}}%
+     {\def\contentsname{Ѡ҆главле́нїе}}%
+   \def\listfigurename{Надписа́нїе и҆з̾ѡбраже́нїй}%
+   \def\listtablename{Надписа́нїе табли́цъ}%
+   \def\indexname{Предмѣ́тный ᲂу҆каза́тель}%
+   \def\authorname{И҆менно́й ᲂу҆каза́тель}%
+   \def\figurename{И҆з̾ѡбраже́нїе}%
+   \def\tablename{Табли́ца}%
+   \def\partname{Ча́сть}%
+   \def\enclname{вкл.}%
+   \def\ccname{исх.}%
+   \def\headtoname{вх.}%
+   \def\pagename{с.}%
+   \def\seename{зрѝ}%
+   \def\alsoname{зрѝ~та́кожде}%
+   \def\proofname{Доказа́тельство}%
+}  
+\def\datechurchslavonic at traditional{%
+      \def\today{\number\day%
+      \space\ifcase\month\or%
+      і҆аннꙋа́рїа\or
+      феврꙋа́рїа\or
+      ма́рта\or
+      а҆прі́ллїа\or
+      ма́їа\or
+      і҆ꙋ́нїа\or
+      і҆ꙋ́лїа\or
+      а҆́ѵгꙋста\or
+      септе́мврїа\or
+      ѻ҆ктѡ́врїа\or
+      ное́мврїа\or
+      деке́мврїа\fi%
+      \space л.\space\number\year\space}}
+
+% The following is based on some ideas from ruscor.sty
+\def\churchslavonic at 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\Azbuk#1{\expandafter\churchslavonic at Alph\csname c@#1\endcsname}
+\def\churchslavonic at Alph#1{\ifcase#1\or
+   А\or Б\or В\or Г\or Д\or Є\or Ж\or Ѕ\or
+   З\or И\or І\or К\or Л\or М\or Н\or О\or
+   П\or Р\or С\or Т\or Ꙋ\or Ф\or Х\or Ѿ\or
+   Ц\or Ч\or Ш\or Щ\or Ъ\or Ы\or Ь\or Ѣ\or
+   Ю\or Ѫ\or Ѧ\or Ѯ\or Ѱ\or Ѳ\or Ѵ\else\xpg at ill@value{#1}{churchslavonic at Alph}\fi}
+
+\def\azbuk#1{\expandafter\churchslavonic at alph\csname c@#1\endcsname}
+\def\churchslavonic at alph#1{\ifcase#1\or
+   а\or б\or в\or г\or д\or е\or ж\or ѕ\or 
+   з\or и\or ї\or к\or л\or м\or н\or о\or
+   п\or р\or с\or т\or ꙋ\or ф\or х\or ѿ\or
+   ц\or ч\or ш\or щ\or ъ\or ы\or ь\or ѣ\or
+   ю\or ѫ\or ѧ\or ѯ\or ѱ\or ѳ\or ѵ\else\xpg at ill@value{#1}{churchslavonic at alph}\fi}
+
+%% Deleting stuff for Cyrillic numerals
+%% TODO: link with cu-num package
+\def\noextras at churchslavonic{%
+  \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+  \ifcyrillic at numerals\nochurchslavonic at numbers\fi
+ \nochurchslavonic at shorthands%
+}
+
+\def\blockextras at churchslavonic{%
+  \churchslavonic at capsformat%
+   \ifcyrillic at numerals\churchslavonic at numbers\fi
+  \ifchurchslavonic at babelshorthands\churchslavonic at shorthands\fi
+}
+
+\def\inlineextras at churchslavonic{%
+  \ifchurchslavonic at babelshorthands\churchslavonic at shorthands\fi%
+}
+
+%%% These lines taken from russianb.ldf, part of babel package.
+% make it optional?
+\def\sh    {\mathop{\operator at font sh}\nolimits}
+\def\ch    {\mathop{\operator at font ch}\nolimits}
+\def\tg    {\mathop{\operator at font tg}\nolimits}
+\def\arctg {\mathop{\operator at font arctg}\nolimits}
+\def\arcctg{\mathop{\operator at font arcctg}\nolimits}
+\def\th    {\mathop{\operator at font th}\nolimits}
+\def\ctg   {\mathop{\operator at font ctg}\nolimits}
+\def\cth   {\mathop{\operator at font cth}\nolimits}
+\def\cosec {\mathop{\operator at font cosec}\nolimits}
+\def\Prob  {\mathop{\kern\z@\mathsf{P}}\nolimits}
+\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits}
+\def\nod   {\mathop{\mathrm{н.о.д.}}\nolimits}
+\def\nok   {\mathop{\mathrm{н.о.к.}}\nolimits}
+\def\NOD   {\mathop{\mathrm{НОД}}\nolimits}
+\def\NOK   {\mathop{\mathrm{НОК}}\nolimits}
+\def\Proj  {\mathop{\mathrm{Пр}}\nolimits}
+%\DeclareRobustCommand{\No}{№}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-churchslavonic.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-classiclatin.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-classiclatin.ldf	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-classiclatin.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -0,0 +1,157 @@
+%%
+%% This is file `gloss-classiclatin.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gloss-latin.dtx  (with options: `laclassic')
+%%   ------------------------------------------------------------------
+%%   Latin module for polyglossia
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%%   This work is distributed under the MIT License.
+%% 
+%%   See the postamble.
+%%   ------------------------------------------------------------------
+\ProvidesFile{gloss-classiclatin.ldf}
+        [2016/09/10 v.1.03 Latin support from polyglossia]
+%%
+
+
+\PolyglossiaSetup{classiclatin}{%
+      hyphennames={classiclatin},
+      hyphenmins={2,2},
+      frenchspacing=true,
+      fontsetup=true,
+}
+\def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V}
+\def\noclassicuclccodes{\lccode`\V=`\v \uccode`\u=`\U}
+\def\classiclatincaptions{%
+   \def\prefacename{Praefatio}%
+   \def\refname{Conspectus librorum}%
+   \def\abstractname{Summarium}%
+   \def\bibname{Conspectus librorum}%
+   \def\chaptername{Caput}%
+   \def\appendixname{Additamentum}%
+   \def\contentsname{Index}%
+   \def\listfigurename{Conspectus descriptionum}%
+   \def\listtablename{Conspectus tabularum}%
+   \def\indexname{Index rerum notabilium}%
+   \def\figurename{Descriptio}%
+   \def\tablename{Tabula}%
+   \def\partname{Pars}%
+   \def\enclname{Additur}%
+   \def\ccname{Exemplar}%
+   \def\headtoname{\ignorespaces}%
+   \def\pagename{charta}%
+   \def\seename{cfr.}%
+   \def\alsoname{cfr.}%
+   \def\proofname{Demonstratio}%
+   \def\glossaryname{Glossarium}%
+   }
+
+\def\classiclatindate{%
+   \def\today{\uppercase\expandafter{\romannumeral\day}%
+      \space \ifcase\month
+      \or Januarii\or Februarii\or Martii\or Aprilis\or Maii\or Junii\or
+      Julii\or Augusti\or Septembris\or Octobris\or Nouembris\or
+      Decembris\fi
+      \space \uppercase\expandafter{\romannumeral\year}}}
+
+\define at boolkey{classiclatin}[classiclatin@]{babelshorthands}[true]{}
+
+\ifsystem at babelshorthands
+  \setkeys{classiclatin}{babelshorthands=true}
+\else
+  \setkeys{classiclatin}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+    \input{babelsh.def}\initiate at active@char{"}}{}
+
+\def\classiclatin at shorthands{%
+  \def\language at group{classiclatin}%
+  \bbl at activate{"}%
+  \declare at shorthand{classiclatin}{"}{\relax
+    \ifmmode
+      \def\xpgcla at next{''}%
+    \else
+      \def\xpgcla at nextdq{\futurelet\xpgla at temp\xpgla at cwm}%
+    \fi
+  \xpgcla at nextdq}%
+}
+
+\def\xpgcla at allowhyphens{\bbl at allowhyphens\discretionary{-}{}{}\bbl at allowhyphens}
+\newcommand*{\xpgcla at cwm}{\let\xpgcla@@nextdq\relax
+  \ifcat\noexpand\xpgcla at temp a%
+    \let\xpgcla@@nextdq\xpgcla at allowhyphens
+  \else
+    \ifx\xpgcla at temp\ae
+        \let\xpgcla@@nextdq\xpgcla at allowhyphens
+    \else
+        \ifx\xpgcla at temp\oe
+           \let\xpgcla@@nextdq\xpgcla at allowhyphens
+        \else
+           \if\noexpand\xpgla at temp\string|%
+              \def\xpgcla@@nextdq{\xpgcla at allowhyphens\@gobble}%
+           \fi
+        \fi
+    \fi
+  \fi
+  \xpgla@@nextdq}%
+\def\noclassiclatin at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+}
+
+\let\xpgcla at savedvalues\empty
+\AtEndPreamble{%
+  \edef\xpgcla at savedvalues{%
+    \clubpenalty=\the\clubpenalty\space
+    \@clubpenalty=\the\@clubpenalty\space
+    \widowpenalty=\the\widowpenalty\space
+    \finalhyphendemerits=\the\finalhyphendemerits}%
+}
+
+\def\noextras at classiclatin{%
+   \lccode\string"2019=\z@
+   \noclassiclatin at shorthands
+   \noclassicuclccodes
+   \xpgcla at savedvalues
+}
+
+\def\blockextras at classiclatin{%
+   \lccode\string"2019=\string"2019
+   \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
+   \finalhyphendemerits=50000000
+   \classicuclccodes
+   \ifclassiclatin at babelshorthands\classiclatin at shorthands\fi
+}
+
+\def\inlineextras at classiclatin{%
+   \lccode\string"2019=\string"2019
+   \classicuclccodes
+   \ifclassiclatin at babelshorthands\classiclatin at shorthands\fi
+}
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%% 
+%%   Permission is hereby granted, free of charge, to any person obtaining
+%%   a copy of this software and associated documentation files
+%%   (the "Software"), to deal in the Software without restriction, including
+%%   without limitation the rights to use, copy, modify, merge, publish,
+%%   distribute, sublicense, and/or sell copies of the Software, and to permit
+%%   persons to whom the Software is furnished to do so, subject to the following
+%%   conditions:
+%% 
+%%   The above copyright notice and this permission notice shall be included in
+%%   all copies or substantial portions of the Software.
+%% 
+%%   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%%   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%%   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+%%   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%%   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%%   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+%%   IN THE SOFTWARE.
+%%
+%% End of file `gloss-classiclatin.ldf'.


Property changes on: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-classiclatin.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -1,36 +1,36 @@
 \ProvidesFile{gloss-croatian.ldf}[polyglossia: module for croatian]
 \PolyglossiaSetup{croatian}{
   hyphennames={croatian},
-  hyphenmins={2,2},
-  indentfirst=true,
-  fontsetup=true,
+  hyphenmins={2,2}, % aligned with https://ctan.org/pkg/hrhyph patterns and http://lebesgue.math.hr/~nenad/Diplomski/Maja_Ribaric_2011.pdf
+  indentfirst=false, % recommendation from Damir Bralić
+  fontsetup=true
 }
 
 \def\captionscroatian{%
-   \def\refname{Literatura}%
-   \def\abstractname{Sažetak}%
-   \def\bibname{Bibliografija}%
-   \def\prefacename{Predgovor}%
-   \def\chaptername{Poglavlje}%
-   \def\appendixname{Dodatak}%
-   \def\contentsname{Sadržaj}%
-   \def\listfigurename{Popis slika}%
-   \def\listtablename{Popis tablica}%
-   \def\indexname{Kazalo}%
-   \def\figurename{Slika}%
-   \def\tablename{Tablica}%
-   \def\partname{Dio}%
-   \def\pagename{Stranica}%
-   \def\seename{Vidjeti}%
-   \def\alsoname{Također vidjeti}%
-   \def\enclname{Prilozi}%
-   \def\ccname{Kopija}%
-   \def\headtoname{Prima}%
-   \def\proofname{Dokaz}%
-   \def\glossaryname{Pojmovnik}%
-   }
+  \def\prefacename{Predgovor}%
+  \def\refname{Literatura}%
+  \def\abstractname{Sažetak}%
+  \def\bibname{Bibliografija}%
+  \def\chaptername{Poglavlje}%
+  \def\appendixname{Dodatak}%
+  \def\contentsname{Sadržaj}%
+  \def\listfigurename{Popis slika}%
+  \def\listtablename{Popis tablica}%
+  \def\indexname{Kazalo}%
+  \def\figurename{Slika}%
+  \def\tablename{Tablica}%
+  \def\partname{Dio}%
+  \def\enclname{Prilozi}%
+  \def\ccname{Kopija}%
+  \def\headtoname{Prima}%
+  \def\pagename{Stranica}%
+  \def\seename{Vidjeti}%
+  \def\alsoname{Također vidjeti}%
+  \def\proofname{Dokaz}%
+  \def\glossaryname{Pojmovnik}%
+}
 \def\datecroatian{%
-   \def\today{\number\day.~\ifcase\month\or
+  \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.}}

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-english.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -104,7 +104,7 @@
     \if at british@locale
       \english at day\space\english at month\space\number\year
     \else
-      \english at month\space\english at day, \number\year
+      \english at month\space\english at day,\space\number\year
     \fi}%
 }
 

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-french.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -13,6 +13,8 @@
   \newluatexattribute\xpg at frpt %
   \directlua{polyglossia.load_frpt()}%
 \else
+  \newXeTeXintercharclass\french at openbrackets % ( ] {
+  \newXeTeXintercharclass\french at closebrackets % ( ] {
   \newXeTeXintercharclass\french at punctthin % ! ? ; et autres
   \newXeTeXintercharclass\french at punctthick % :
   \newXeTeXintercharclass\french at punctguillstart % « ‹
@@ -22,6 +24,30 @@
 \def\xpg at unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
 \def\xpg at nospace#1{#1}
 
+\ifx\@makefntext\undefined\else
+  \let\nofrench at makefntext\@makefntext
+  \long\def\french at makefntext#1{\parindent1em \noindent\quad\ifx\@thefnmark\empty\else\@thefnmark.\space\fi #1}
+  \let\@makefntext\french at makefntext
+  \define at boolkey{french}[french@]{frenchfootnote}[true]{%
+  	\def\@tmpa{#1}
+    \def\@tmptrue{true}
+    \ifx\@tmpa\@tmptrue
+    	\let\@makefntext\french at makefntext
+		\else 
+			\let\@makefntext\nofrench at makefntext
+    \fi
+  }
+\fi
+
+
+\newif\iffrench at automaticspacesaroundguillemets
+\define at boolkey{french}[french@]{automaticspacesaroundguillemets}[true]{%
+  %\def\tmp at true{true}%
+  %\def\@tmpa{#1}%
+  %\ifx\@tmpa\tmp at true
+}
+\french at automaticspacesaroundguillemetstrue
+
 \def\french at punctuation{%
     \lccode"2019="2019
     \ifluatex
@@ -41,19 +67,31 @@
       \XeTeXcharclass `\» \french at punctguillend
       \XeTeXcharclass `\‹ \french at punctguillstart
       \XeTeXcharclass `\› \french at punctguillend
+      \XeTeXcharclass `\( \french at openbrackets
+      \XeTeXcharclass `\) \french at closebrackets
+      \XeTeXcharclass `\] \french at openbrackets
+      \XeTeXcharclass `\[ \french at closebrackets
+      \XeTeXcharclass `\{ \french at openbrackets
+      \XeTeXcharclass `\} \french at closebrackets
       \XeTeXinterchartoks \z@ \french at punctthin = {\nobreak\thinspace}%
       \XeTeXinterchartoks \z@ \french at punctthick = {\nobreakspace}%
-      \XeTeXinterchartoks 255 \french at punctthin = {\xpg at unskip\nobreak\thinspace}%
-      \XeTeXinterchartoks 255 \french at punctthick = {\xpg at unskip\nobreakspace}%
+      \XeTeXinterchartoks \xpg at boundaryclass \french at punctthin = {\xpg at unskip\nobreak\thinspace}%
+      \XeTeXinterchartoks \xpg at boundaryclass \french at punctthick = {\xpg at unskip\nobreakspace}%
       \XeTeXinterchartoks \french at punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
   %   \XeTeXinterchartoks \z@ \french at punctguillstart = {\nobreakspace}% "a«" unchanged?
   %   \XeTeXinterchartoks \french at punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
       \XeTeXinterchartoks \z@ \french at punctguillend = {\nobreakspace}% "a»" -> "a »"
-  %   \XeTeXinterchartoks \french at punctguillstart 255 = {\nobreakspace\xpg at nospace}% "«  " -> "«~"
-  %   \XeTeXinterchartoks 255 \french at punctguillend = {\xpg at unskip\nobreakspace}% "  »" -> "~»"
+      \iffrench at automaticspacesaroundguillemets
+        \XeTeXinterchartoks \french at punctguillstart \xpg at boundaryclass = {\nobreakspace\xpg at nospace\relax}% "«  " -> "«~"
+        \XeTeXinterchartoks \xpg at boundaryclass \french at punctguillend = {\xpg at unskip\nobreakspace}% "  »" -> "~»"
+      \fi
       \XeTeXinterchartoks \french at punctguillend \french at punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
       \XeTeXinterchartoks \french at punctguillend \french at punctthick = {\nobreakspace}% "»:" -> "» :"
       \XeTeXinterchartoks \french at punctthin \french at punctguillend  = {\nobreakspace}% "?»" -> "? »"
+     \XeTeXinterchartoks \french at openbrackets \french at punctthin = {\xpg at unskip}% "(?" -> "(?" and not "( ?"      
+     \XeTeXinterchartoks \french at punctthin \french at closebrackets = {\xpg at unskip}% "?)" -> "?)" (code not need, just for symetry with previous one)
+     \XeTeXinterchartoks \french at closebrackets \french at punctthin = {\nobreak\thinspace}% ")?" -> ") ?"
+     \XeTeXinterchartoks \french at closebrackets \french at punctthick = {\nobreakspace}% "):" -> ") :"
     \fi
     }
 
@@ -104,8 +142,8 @@
    Douzième\or Treizième\or Quatorzième\or Quinzième\or
    Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or
    Vingtième\fi\space}%
-   \def\thepart{}%
-   \def\partname{\protect\@Fpt partie}%
+   \def\thepart{\@Fpt partie}%
+   \def\partname{}%
    \def\pagename{page}%
    \def\seename{\emph{voir}}%
    \def\alsoname{\emph{voir aussi}}%
@@ -154,8 +192,4 @@
 \def\mr{M.\space}
 \def\mrs{MM.\space}
 
-\ifx\@makefntext\undefined\else
-\renewcommand\@makefntext[1]{\quad\ifx\@thefnmark\empty\else\@thefnmark.\space\fi #1}
-\fi
-
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -113,6 +113,8 @@
   \declare at shorthand{german}{""}{\hskip\z at skip}%
   \declare at shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
   \declare at shorthand{german}{"=}{\penalty\@M-\hskip\z at skip}%
+  \declare at shorthand{german}{"/}{\textormath
+    {\bbl at allowhyphens\discretionary{/}{}{/}\bbl at allowhyphens}{}}%
   \def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}%
 }
 

Added: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -0,0 +1,216 @@
+\ProvidesFile{gloss-japanese.ldf}[polyglossia: module for japanese]
+\PolyglossiaSetup{japanese}{
+	script=CJK,
+	language=Japanese,
+	langtag=JAN,
+	hyphennames={nohyphenation},
+	frenchspacing=false,
+	fontsetup=true
+}
+
+\def\japanese at 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}%
+	\def\presection{第}%
+	\def\presubsection{第}%
+	\def\presubsubsection{第}%
+}
+
+\def\captionsjapanese{%
+	\def\refname{参考文献}%
+	\def\abstractname{概要}%
+	\def\bibname{文献目録}%
+	\def\prefacename{端書き}%
+	\def\chaptername##1##2{第##1##2 章}%
+	\def\appendixname{付録}%
+	\def\contentsname{目次}%
+	\def\listfigurename{図目次}%
+	\def\listtablename{表目次}%
+	\def\indexname{索引}%
+	\def\figurename{図}%
+	\def\tablename{表}%
+	\def\partname##1##2{第##1##2 部}%
+	\def\pagename##1##2{第##1##2 頁}%
+	\def\seename{参照}%
+	\def\alsoname{参照}%
+	\def\enclname{添付}%
+	\def\ccname{同報}%
+	\def\headtoname{宛先}%
+	\def\proofname{証明}%
+	\def\glossaryname{用語集}%
+ }
+
+\newif\if at WameiReki \@WameiRekifalse%
+\newif\if at WameiTosi \@WameiTosifalse%
+\newif\if at WameiTuki \@WameiTukifalse%
+\newif\if at WameiHi \@WameiHifalse%
+\newif\if at IzumoTuki \@IzumoTukifalse%
+\newcount\c at 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 九十九
+	\else
+		\@ctrerr
+	\fi\relax
+}
+
+\def\@JapaneseNum#1{
+	\c at TempJNum=#1\divide\c at TempJNum by 1000\relax%
+	\ifnum\c at TempJNum=\z@\c at TempJNum=#1%
+		\divide\c at TempJNum by 100\relax%
+		\ifnum\c at TempJNum=\z@\@JapaneseDigit{#1}\relax%
+		\else
+			\ifcase\c at TempJNum\or 百\or 二百\or 三百\or 四百\or 五百\or
+				六百\or 七百\or 八百\or 九百%
+			\fi
+			\c at TempJNum=#1\divide\c at TempJNum by 100\multiply\c at TempJNum by -100\advance\c at TempJNum#1\@JapaneseDigit\c at TempJNum\relax%
+		\fi
+	\else
+		\ifcase\c at TempJNum\or 千\or 二千\or 三千\or 四千\or 五千\or
+			六千\or 七千\or 八千\or 九千%
+		\fi
+		\c at TempJNum=#1\divide\c at TempJNum by 1000\multiply\c at TempJNum by -1000\advance\c at TempJNum#1\divide\c at TempJNum by 100\relax%
+		\ifnum\c at TempJNum=\z@\c at TempJNum=#1%
+			\divide\c at TempJNum by 100\multiply\c at TempJNum by -100\advance\c at TempJNum#1\@JapaneseDigit\c at TempJNum\relax%
+		\else
+			\ifcase\c at TempJNum\or 百\or 二百\or 三百\or 四百\or 五百\or
+				六百\or 七百\or 八百\or 九百%
+			\fi
+			\c at TempJNum=#1\divide\c at TempJNum by 100\multiply\c at TempJNum by -100\advance\c at TempJNum#1\@JapaneseDigit\c at TempJNum\relax%
+		\fi
+	\fi
+}
+
+\def\@japanesenumber#1{
+	\@tempcnta=#1%
+	\ifnum\@tempcnta=\z@{〇}%
+	\else
+		\ifnum\@tempcnta<\z@{負}%
+			\multiply\@tempcnta by -1%
+		\fi
+		\@tempcntb=\@tempcnta\divide\@tempcntb by 10000\relax%
+		\ifnum\@tempcntb=\z@\@JapaneseNum%
+			\@tempcnta%
+		\else
+			\@tempcntb=\@tempcnta\divide\@tempcntb by 100000000\relax%
+			\ifnum\@tempcntb=\z@\@tempcntb=\@tempcnta%
+				\divide\@tempcntb by 10000%
+				\@JapaneseNum\@tempcntb{万}\@tempcntb=\@tempcnta%
+				\divide\@tempcntb by 10000\multiply\@tempcntb by -10000%
+				\advance\@tempcntb\@tempcnta\relax\@JapaneseNum\@tempcntb%
+			\else
+				\@JapaneseNum\@tempcntb{億}\@tempcntb=\@tempcnta%
+				\divide\@tempcntb by 100000000\multiply\@tempcntb by -100000000%
+				\advance\@tempcntb\@tempcnta\divide\@tempcntb by 10000\relax%
+				\ifnum\@tempcntb=\z@%
+				\else
+					\@JapaneseNum\@tempcntb{万}%
+				\fi
+				\@tempcntb=\@tempcnta\divide\@tempcntb by 10000%
+				\multiply\@tempcntb by -10000\advance\@tempcntb\@tempcnta%
+				\@JapaneseNum\@tempcntb%
+			\fi
+		\fi
+	\fi
+}
+
+\def\japanesenumber#1{
+	\expandafter\@japanesenumber\csname c@#1\endcsname%
+}
+
+\def\datejapanese{
+	{
+		\ifnum\year<1868%
+			\xdef\the at WarekiCur{}%
+		\else
+			\ifnum\year<1912%
+				\xdef\the at WarekiCur{明治}\advance\year-1867\relax%
+			\else
+				\ifnum\year<1926%
+					\xdef\the at WarekiCur{大正}\advance\year-1911\relax%
+  				\else
+					\ifnum\year<1989%
+						\xdef\the at WarekiCur{昭和}\advance\year-1925\relax%
+  					\else
+						\xdef\the at WarekiCur{平成}\advance\year-1988\relax%
+					\fi
+				\fi
+			\fi
+		\fi
+		\xdef\the at 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{
+		\if at WameiReki%
+			\the at WarekiCur%
+			\if at WameiTosi%
+				\@JapaneseNum\the at WameiTosi%
+			\else
+				\,\the at WameiTosi%
+			\fi
+		\else
+			\number\year\,%
+		\fi
+		{年}%
+		\if at WameiTuki%
+			\ifcase\month\or 睦月\or 如月\or 弥生\or 卯月\or 皐月\or
+				水無月\or 文月\or 葉月\or 長月\or
+				\if at IzumoTuki 神在月\else 神無月\fi
+				\or 霜月\or 師走%
+			\fi
+		\else
+			\,\number\month\,%
+		{月}%
+		\fi
+		\if at WameiHi%
+			\@JapaneseNum\day%
+		\else
+			\,\number\day\,%
+		\fi
+		{日}
+	}
+}
+
+\def\noextras at japanese{%
+	\japanese at capsformat%
+}
+
+\def\blockextras at japanese{%
+	\japanese at capsformat%
+}
+
+\def\inlineextras at japanese{%
+	\japanese at capsformat%
+}
+% Based on contributions of Toru Inagaki, Norio Iwase, François Charette
+


Property changes on: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-japanese.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -123,7 +123,7 @@
             \XeTeXinterchartokenstate\@ne
             \XeTeXlinebreakpenalty 50
         \fi
-        \XeTeXlinebreakskip 0pt plus.1em minus .01em
+        \XeTeXlinebreakskip 0pt plus.05em minus .01em
         \XeTeXlinebreaklocale "ko"
     }
     \def\noextras at korean{%
@@ -186,9 +186,16 @@
 \protected\def\으{\xpg at make@josa \empty 으}
 \protected\def\로{\으 로}
 \protected\def\라{\xpg at make@josa 라{이라}}
+\def\xpg at make@josa at II{\xpg at make@josa\relax 이}
 \def\xpg at make@josa at I{%
-    \ifx\@let at token 라%
-        \expandafter\xpg at make@josa\expandafter\relax\expandafter 이%
+    \ifcat\@let at token\xpg at catcode@letter
+        \expandafter\expandafter\expandafter\count@\expandafter
+        \xpg at letter@to at num\meaning\@let at token\relax
+        \ifnum 0\ifnum\count@>"ABFF \ifnum\count@<"D7A4 1\fi\fi>\z@
+            \expandafter\expandafter\expandafter\xpg at make@josa at II
+        \else
+            \expandafter\expandafter\expandafter\가
+        \fi
     \else
         \expandafter\가
     \fi
@@ -277,8 +284,13 @@
 % user macro to force zero skip
 \let\inhibitglue\relax
 % initialize interchartoks and classes
-\let\XeTeXcharclassIgnore  \@cclvi
-\let\XeTeXcharclassBoundary\@cclv
+\ifdim\the\XeTeXversion\XeTeXrevision pt<0.99994pt
+    \let\XeTeXcharclassIgnore  \@cclvi
+    \let\XeTeXcharclassBoundary\@cclv
+\else
+    \chardef\XeTeXcharclassIgnore  =4096
+    \chardef\XeTeXcharclassBoundary=4095
+\fi
 \ifdefined\XeTeXcharclassID\else
     \ifdefined\xtxHanGlue
         \let\XeTeXcharclassID\@ne
@@ -288,6 +300,7 @@
         \newXeTeXintercharclass\XeTeXcharclassID
         \newXeTeXintercharclass\XeTeXcharclassOP
         \newXeTeXintercharclass\XeTeXcharclassCL
+        \global\let\XeTeXcharclassCJ\XeTeXcharclassID
         \global\let\XeTeXcharclassEX\XeTeXcharclassCL
         \global\let\XeTeXcharclassIS\XeTeXcharclassCL
         \global\let\XeTeXcharclassNS\XeTeXcharclassCL
@@ -364,10 +377,10 @@
         \advance\count@\@ne
         \repeat
     %
-    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassID{\XPGKOstartID}%
-    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassOP{\XPGKOstopAA\XPGKOstartOP}%
+    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassID{\XPGKOstopAA\XPGKOlatincjk\XPGKOstartID}%
+    \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassOP{\XPGKOstopAA\XPGKOhalfhalf\XPGKOstartOP}%
     \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassCL{\XPGKOstopAA\XPGKOstartCL}%
-    \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassMD{\XPGKOstopAA\XPGKOstartMD}%
+    \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassMD{\XPGKOstopAA\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
     \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassFS{\XPGKOstopAA\XPGKOstartFS}%
     \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassAA{\XPGKOstartAA}%
     %
@@ -377,7 +390,7 @@
     \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassMD{\XPGKOstopID\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
     \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassFS{\XPGKOstopID\XPGKOstartFS}%
     \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAO{\XPGKOstopID\XPGKOlatincjk}%
-    \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAA{\XPGKOstartAA}%
+    \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAA{\XPGKOstopID\XPGKOlatincjk\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassID{\XPGKOstopOP\XPGKOstartID}%
     \XeTeXinterchartoks\XeTeXcharclassOP\XeTeXcharclassOP{\XPGKOstopOP\XPGKOstartOP}%
@@ -395,7 +408,7 @@
     \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassEX{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}%
     \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAO{\XPGKOstopCL\XPGKOhalfhalf}%
     \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAC{\XPGKOstopCL\XPGKOnobreak\XPGKOhalfhalf}%
-    \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAA{\XPGKOstopCL\XPGKOstartAA}%
+    \XeTeXinterchartoks\XeTeXcharclassCL\XPGKOcharclassAA{\XPGKOstopCL\XPGKOhalfhalf\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassID{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartID}%
     \XeTeXinterchartoks\XPGKOcharclassMD\XeTeXcharclassOP{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartOP}%
@@ -406,7 +419,7 @@
     \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassEX{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}%
     \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAO{\XPGKOstopMD\XPGKOquarterquarter}%
     \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAC{\XPGKOstopMD\XPGKOnobreak\XPGKOquarterquarter}%
-    \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAA{\XPGKOstopMD\XPGKOstartAA}%
+    \XeTeXinterchartoks\XPGKOcharclassMD\XPGKOcharclassAA{\XPGKOstopMD\XPGKOquarterquarter\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassID{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartID}%
     \XeTeXinterchartoks\XPGKOcharclassFS\XeTeXcharclassOP{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartOP}%
@@ -417,7 +430,7 @@
     \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassEX{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}%
     \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAO{\XPGKOstopFS\XPGKOhalfzero}%
     \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAC{\XPGKOstopFS\XPGKOnobreak\XPGKOhalfzero}%
-    \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAA{\XPGKOstopFS\XPGKOstartAA}%
+    \XeTeXinterchartoks\XPGKOcharclassFS\XPGKOcharclassAA{\XPGKOstopFS\XPGKOhalfzero\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassLD\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}%
     \XeTeXinterchartoks\XPGKOcharclassLD\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
@@ -427,6 +440,7 @@
     \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
     \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAO{\XPGKOhalfhalf}%
     \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAC{\XPGKOnobreak\XPGKOhalfhalf}%
+    \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAA{\XPGKOhalfhalf\XPGKOstartAA}%
     %
     \XeTeXinterchartoks\XPGKOcharclassAO\XeTeXcharclassOP{\XPGKOnobreak\XPGKOhalfhalf\XPGKOstartOP}%
     \XeTeXinterchartoks\XPGKOcharclassAO\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}%
@@ -480,56 +494,60 @@
 \@tmpa "FE13=\XeTeXcharclassID % ︓ PRESENTATION FORM FOR VERTICAL COLON
 \@tmpa "FE14=\XeTeXcharclassID % ︔ PRESENTATION FORM FOR VERTICAL SEMICOLON
 % CJ
-\@tmpa "3041=\XeTeXcharclassID
-\@tmpa "3043=\XeTeXcharclassID
-\@tmpa "3045=\XeTeXcharclassID
-\@tmpa "3047=\XeTeXcharclassID
-\@tmpa "3049=\XeTeXcharclassID
-\@tmpa "3063=\XeTeXcharclassID
-\@tmpa "3083=\XeTeXcharclassID
-\@tmpa "3085=\XeTeXcharclassID
-\@tmpa "3087=\XeTeXcharclassID
-\@tmpa "308E=\XeTeXcharclassID
-\@tmpa "3095=\XeTeXcharclassID
-\@tmpa "3096=\XeTeXcharclassID
-\@tmpa "30A1=\XeTeXcharclassID
-\@tmpa "30A3=\XeTeXcharclassID
-\@tmpa "30A5=\XeTeXcharclassID
-\@tmpa "30A7=\XeTeXcharclassID
-\@tmpa "30A9=\XeTeXcharclassID
-\@tmpa "30C3=\XeTeXcharclassID
-\@tmpa "30E3=\XeTeXcharclassID
-\@tmpa "30E5=\XeTeXcharclassID
-\@tmpa "30E7=\XeTeXcharclassID
-\@tmpa "30EE=\XeTeXcharclassID
-\@tmpa "30F5=\XeTeXcharclassID
-\@tmpa "30F6=\XeTeXcharclassID
-\@tmpa "30FC=\XeTeXcharclassID
-\count@"31F0 \loop
-    \expandafter\@tmpa\the\count@=\XeTeXcharclassID
-    \ifnum\count@<"31FF
-    \advance\count@\@ne
-    \repeat
-\count@"FF67 \loop
-    \expandafter\@tmpa\the\count@=\XeTeXcharclassID
-    \ifnum\count@<"FF70
-    \advance\count@\@ne
-    \repeat
+\ifnum\the\XeTeXcharclass"3041=\XeTeXcharclassID \else
+    \@tmpa "3041=\XeTeXcharclassID % ぁ HIRAGANA LETTER SMALL A
+    \@tmpa "3043=\XeTeXcharclassID % ぃ HIRAGANA LETTER SMALL I
+    \@tmpa "3045=\XeTeXcharclassID % ぅ HIRAGANA LETTER SMALL U
+    \@tmpa "3047=\XeTeXcharclassID % ぇ HIRAGANA LETTER SMALL E
+    \@tmpa "3049=\XeTeXcharclassID % ぉ HIRAGANA LETTER SMALL O
+    \@tmpa "3063=\XeTeXcharclassID % っ HIRAGANA LETTER SMALL TU
+    \@tmpa "3083=\XeTeXcharclassID % ゃ HIRAGANA LETTER SMALL YA
+    \@tmpa "3085=\XeTeXcharclassID % ゅ HIRAGANA LETTER SMALL YU
+    \@tmpa "3087=\XeTeXcharclassID % ょ HIRAGANA LETTER SMALL YO
+    \@tmpa "308E=\XeTeXcharclassID % ゎ HIRAGANA LETTER SMALL WA
+    \@tmpa "3095=\XeTeXcharclassID % ゕ HIRAGANA LETTER SMALL KA
+    \@tmpa "3096=\XeTeXcharclassID % ゖ HIRAGANA LETTER SMALL KE
+    \@tmpa "30A1=\XeTeXcharclassID % ァ KATAKANA LETTER SMALL A
+    \@tmpa "30A3=\XeTeXcharclassID % ィ KATAKANA LETTER SMALL I
+    \@tmpa "30A5=\XeTeXcharclassID % ゥ KATAKANA LETTER SMALL U
+    \@tmpa "30A7=\XeTeXcharclassID % ェ KATAKANA LETTER SMALL E
+    \@tmpa "30A9=\XeTeXcharclassID % ォ KATAKANA LETTER SMALL O
+    \@tmpa "30C3=\XeTeXcharclassID % ッ KATAKANA LETTER SMALL TU
+    \@tmpa "30E3=\XeTeXcharclassID % ャ KATAKANA LETTER SMALL YA
+    \@tmpa "30E5=\XeTeXcharclassID % ュ KATAKANA LETTER SMALL YU
+    \@tmpa "30E7=\XeTeXcharclassID % ョ KATAKANA LETTER SMALL YO
+    \@tmpa "30EE=\XeTeXcharclassID % ヮ KATAKANA LETTER SMALL WA
+    \@tmpa "30F5=\XeTeXcharclassID % ヵ KATAKANA LETTER SMALL KA
+    \@tmpa "30F6=\XeTeXcharclassID % ヶ KATAKANA LETTER SMALL KE
+    \@tmpa "30FC=\XeTeXcharclassID % ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
+    \count@"31F0 \loop
+        \expandafter\@tmpa\the\count@=\XeTeXcharclassID
+        \ifnum\count@<"31FF
+        \advance\count@\@ne
+        \repeat
+    \count@"FF67 \loop
+        \expandafter\@tmpa\the\count@=\XeTeXcharclassID
+        \ifnum\count@<"FF70
+        \advance\count@\@ne
+        \repeat
+\fi
 %
-\@tmpa "28=\XPGKOcharclassAO % (
-\@tmpa "5B=\XPGKOcharclassAO % [
-\@tmpa "60=\XPGKOcharclassAO % `
-\@tmpa "7B=\XPGKOcharclassAO % {
+\@tmpa "28=\XPGKOcharclassAO % ( LEFT PARENTHESIS
+\@tmpa "5B=\XPGKOcharclassAO % [ LEFT SQUARE BRACKET
+\@tmpa "60=\XPGKOcharclassAO % ` GRAVE ACCENT
+\@tmpa "7B=\XPGKOcharclassAO % { LEFT CURLY BRACKET
+\@tmpa "AB=\XPGKOcharclassAO % « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
 %
-\@tmpa "21=\XPGKOcharclassAC % !
-\@tmpa "27=\XPGKOcharclassAC % '
-\@tmpa "29=\XPGKOcharclassAC % )
-\@tmpa "2C=\XPGKOcharclassAC % ,
-\@tmpa "2E=\XPGKOcharclassAC % .
-\@tmpa "3B=\XPGKOcharclassAC % ;
-\@tmpa "3F=\XPGKOcharclassAC % ?
-\@tmpa "5D=\XPGKOcharclassAC % ]
-\@tmpa "7D=\XPGKOcharclassAC % }
+\@tmpa "21=\XPGKOcharclassAC % ! EXCLAMATION MARK
+\@tmpa "27=\XPGKOcharclassAC % ' APOSTROPHE
+\@tmpa "29=\XPGKOcharclassAC % ) RIGHT PARENTHESIS
+\@tmpa "2C=\XPGKOcharclassAC % , COMMA
+\@tmpa "2E=\XPGKOcharclassAC % . FULL STOP
+\@tmpa "3B=\XPGKOcharclassAC % ; SEMICOLON
+\@tmpa "3F=\XPGKOcharclassAC % ? QUESTION MARK
+\@tmpa "5D=\XPGKOcharclassAC % ] RIGHT SQUARE BRACKET
+\@tmpa "7D=\XPGKOcharclassAC % } RIGHT CURLY BRACKET
+\@tmpa "BB=\XPGKOcharclassAC % » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
 %
 \@tmpa "2018=\XeTeXcharclassOP % ‘ LEFT SINGLE QUOTATION MARK
 \@tmpa "201C=\XeTeXcharclassOP % “ LEFT DOUBLE QUOTATION MARK
@@ -536,7 +554,6 @@
 %
 \@tmpa "2019=\XeTeXcharclassCL % ’ RIGHT SINGLE QUOTATION MARK
 \@tmpa "201D=\XeTeXcharclassCL % ” RIGHT DOUBLE QUOTATION MARK
-\@tmpa "FE10=\XeTeXcharclassCL % ︐ PRESENTATION FORM FOR VERTICAL COMMA
 % NS
 \@tmpa "00B7=\XPGKOcharclassMD % · MIDDLE DOT
 \@tmpa "30FB=\XPGKOcharclassMD % ・ KATAKANA MIDDLE DOT
@@ -593,76 +610,208 @@
 local glyph_id = node.id("glyph")
 local hbox_id  = node.id("hlist")
 local vbox_id  = node.id("vlist")
+local glue_id  = node.id("glue")
+local penalty_id = node.id("penalty")
+local disc_id  = node.id("disc")
 local attr_korean = luatexbase.attributes["xpg at attr@korean"]
 local attr_josa   = luatexbase.attributes["xpg at attr@autojosa"]
 local nobr_after = {
-    [0x28] = 1, [0x2D] = 1, [0x2F] = 1, [0x3C] = 1, [0x5B] = 1,
-    [0x5C] = 1, [0x60] = 1, [0x7B] = 1, [0x7E] = 1, [0x2013] = 1,
-    [0x2018] = 1, [0x201C] = 1, [0x2329] = 1, [0x3008] = 1,
-    [0x300A] = 1, [0x300C] = 1, [0x300E] = 1, [0x3010] = 1,
-    [0x3014] = 1, [0x3016] = 1, [0x3018] = 1, [0x301A] = 1,
-    [0x301D] = 1, [0xFF08] = 1, [0xFF1C] = 1, [0xFF3B] = 1,
-    [0xFF5B] = 1, [0xFF5F] = 1, [0xFF62] = 1,
+    [0x28] = 1, % ( LEFT PARENTHESIS
+    [0x3C] = 1, % < LESS-THAN SIGN
+    [0x5B] = 1, % [ LEFT SQUARE BRACKET
+    [0x60] = 1, % ` GRAVE ACCENT
+    [0x7B] = 1, % { LEFT CURLY BRACKET
+    [0xAB] = 1, % « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+    [0x2018] = 1, % ‘ LEFT SINGLE QUOTATION MARK
+    [0x201C] = 1, % “ LEFT DOUBLE QUOTATION MARK
+    [0x2329] = 1, % 〈 LEFT-POINTING ANGLE BRACKET
+    [0x3008] = 1, % 〈 LEFT ANGLE BRACKET
+    [0x300A] = 1, % 《 LEFT DOUBLE ANGLE BRACKET
+    [0x300C] = 1, % 「 LEFT CORNER BRACKET
+    [0x300E] = 1, % 『 LEFT WHITE CORNER BRACKET
+    [0x3010] = 1, % 【 LEFT BLACK LENTICULAR BRACKET
+    [0x3014] = 1, % 〔 LEFT TORTOISE SHELL BRACKET
+    [0x3016] = 1, % 〖 LEFT WHITE LENTICULAR BRACKET
+    [0x3018] = 1, % 〘 LEFT WHITE TORTOISE SHELL BRACKET
+    [0x301A] = 1, % 〚 LEFT WHITE SQUARE BRACKET
+    [0x301D] = 1, % 〝 REVERSED DOUBLE PRIME QUOTATION MARK
+    [0xFE17] = 1, % ︗ PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET
+    [0xFE35] = 1, % ︵ PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
+    [0xFE37] = 1, % ︷ PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
+    [0xFE39] = 1, % ︹ PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
+    [0xFE3B] = 1, % ︻ PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
+    [0xFE3D] = 1, % ︽ PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET
+    [0xFE3F] = 1, % ︿ PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET
+    [0xFE41] = 1, % ﹁ PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+    [0xFE43] = 1, % ﹃ PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+    [0xFE47] = 1, % ﹇ PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET
+    [0xFE59] = 1, % ﹙ SMALL LEFT PARENTHESIS
+    [0xFE5B] = 1, % ﹛ SMALL LEFT CURLY BRACKET
+    [0xFE5D] = 1, % ﹝ SMALL LEFT TORTOISE SHELL BRACKET
+    [0xFF08] = 1, % ( FULLWIDTH LEFT PARENTHESIS
+    [0xFF3B] = 1, % [ FULLWIDTH LEFT SQUARE BRACKET
+    [0xFF5B] = 1, % { FULLWIDTH LEFT CURLY BRACKET
+    [0xFF5F] = 1, % ⦅ FULLWIDTH LEFT WHITE PARENTHESIS
+    [0xFF62] = 1, % 「 HALFWIDTH LEFT CORNER BRACKET
 }
-local nobr_before = {
-    [0x21] = 1, [0x22] = 1, [0x27] = 1, [0x29] = 1, [0x2C] = 1,
-    [0x2D] = 1, [0x2E] = 1, [0x2F] = 1, [0x3A] = 1, [0x3B] = 1,
-    [0x3E] = 1, [0x3F] = 1, [0x5C] = 1, [0x5D] = 1, [0x7D] = 1,
-    [0x7E] = 1, [0xB7] = 1, [0x2013] = 1, [0x2014] = 1, [0x2015] = 1,
-    [0x2019] = 1, [0x201D] = 1, [0x2025] = 1, [0x2026] = 1,
-    [0x232A] = 1, [0x3001] = 1, [0x3002] = 1, [0x3005] = 1,
-    [0x3009] = 1, [0x300B] = 1, [0x300D] = 1, [0x300F] = 1,
-    [0x3011] = 1, [0x3015] = 1, [0x3017] = 1, [0x3019] = 1,
-    [0x301B] = 1, [0x301C] = 1, [0x301E] = 1, [0x301F] = 1,
-    [0x3035] = 1, [0x303B] = 1, [0x303C] = 1, [0x3041] = 2,
-    [0x3043] = 2, [0x3045] = 2, [0x3047] = 2, [0x3049] = 2,
-    [0x3063] = 2, [0x3083] = 2, [0x3085] = 2, [0x3087] = 2,
-    [0x308E] = 2, [0x3095] = 2, [0x3096] = 2, [0x3099] = 1,
-    [0x309A] = 1, [0x309B] = 1, [0x309C] = 1, [0x309D] = 1,
-    [0x309E] = 1, [0x30A0] = 1, [0x30A1] = 2, [0x30A3] = 2,
-    [0x30A5] = 2, [0x30A7] = 2, [0x30A9] = 2, [0x30C3] = 2,
-    [0x30E3] = 2, [0x30E5] = 2, [0x30E7] = 2, [0x30EE] = 2,
-    [0x30F5] = 2, [0x30F6] = 2, [0x30FB] = 1, [0x30FC] = 1,
-    [0x30FD] = 1, [0x30FE] = 1, [0x31F0] = 2, [0x31F1] = 2,
-    [0x31F2] = 2, [0x31F3] = 2, [0x31F4] = 2, [0x31F5] = 2,
-    [0x31F6] = 2, [0x31F7] = 2, [0x31F8] = 2, [0x31F9] = 2,
-    [0x31FA] = 2, [0x31FB] = 1, [0x31FC] = 1, [0x31FD] = 1,
-    [0x31FE] = 1, [0x31FF] = 1, [0xFF01] = 1, [0xFF09] = 1,
-    [0xFF0C] = 1, [0xFF0E] = 1, [0xFF1A] = 1, [0xFF1B] = 1,
-    [0xFF1F] = 1, [0xFF3D] = 1, [0xFF5D] = 1, [0xFF60] = 1,
-    [0xFF61] = 1, [0xFF63] = 1, [0xFF64] = 1, [0xFF65] = 1,
-    [0xFF9E] = 1, [0xFF9F] = 1,
-}
-for i=0x1160, 0x11FF do nobr_before[i] = 2 end
-for i=0xD7B0, 0xD7FB do nobr_before[i] = 2 end
-for i=0x302A, 0x302F do nobr_before[i] = 1 end
+local nobr_before = setmetatable({
+    [0x21] = 1, % ! EXCLAMATION MARK
+    [0x22] = 1, % " QUOTATION MARK
+    [0x27] = 1, % ' APOSTROPHE
+    [0x29] = 1, % ) RIGHT PARENTHESIS
+    [0x2C] = 1, % , COMMA
+    [0x2D] = 0, % - HYPHEN-MINUS
+    [0x2E] = 1, % . FULL STOP
+    [0x2F] = 0, % / SOLIDUS
+    [0x3A] = 0, % : COLON
+    [0x3B] = 1, % ; SEMICOLON
+    [0x3E] = 1, % > GREATER-THAN SIGN
+    [0x3F] = 1, % ? QUESTION MARK
+    [0x5C] = 0, % \ REVERSE SOLIDUS
+    [0x5D] = 1, % ] RIGHT SQUARE BRACKET
+    [0x7D] = 1, % } RIGHT CURLY BRACKET
+    [0x7E] = 0, % ~ TILDE
+    [0xB7] = 1, % · MIDDLE DOT
+    [0xBB] = 1, % » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+    [0x2013] = 0, % – EN DASH
+    [0x2014] = 0, % — EM DASH
+    [0x2015] = 1, % ― HORIZONTAL BAR
+    [0x2019] = 1, % ’ RIGHT SINGLE QUOTATION MARK
+    [0x201D] = 1, % ” RIGHT DOUBLE QUOTATION MARK
+    [0x2025] = 1, % ‥ TWO DOT LEADER
+    [0x2026] = 1, % … HORIZONTAL ELLIPSIS
+    [0x232A] = 1, % 〉 RIGHT-POINTING ANGLE BRACKET
+    [0x3001] = 1, % 、 IDEOGRAPHIC COMMA
+    [0x3002] = 1, % 。 IDEOGRAPHIC FULL STOP
+    [0x3005] = 1, % 々 IDEOGRAPHIC ITERATION MARK
+    [0x3009] = 1, % 〉 RIGHT ANGLE BRACKET
+    [0x300B] = 1, % 》 RIGHT DOUBLE ANGLE BRACKET
+    [0x300D] = 1, % 」 RIGHT CORNER BRACKET
+    [0x300F] = 1, % 』 RIGHT WHITE CORNER BRACKET
+    [0x3011] = 1, % 】 RIGHT BLACK LENTICULAR BRACKET
+    [0x3015] = 1, % 〕 RIGHT TORTOISE SHELL BRACKET
+    [0x3017] = 1, % 〗 RIGHT WHITE LENTICULAR BRACKET
+    [0x3019] = 1, % 〙 RIGHT WHITE TORTOISE SHELL BRACKET
+    [0x301B] = 1, % 〛 RIGHT WHITE SQUARE BRACKET
+    [0x301C] = 1, % 〜 WAVE DASH
+    [0x301E] = 1, % 〞 DOUBLE PRIME QUOTATION MARK
+    [0x301F] = 1, % 〟 LOW DOUBLE PRIME QUOTATION MARK
+    [0x3035] = 1, % 〵 VERTICAL KANA REPEAT MARK LOWER HALF
+    [0x303B] = 1, % 〻 VERTICAL IDEOGRAPHIC ITERATION MARK
+    [0x303C] = 1, % 〼 MASU MARK
+    [0x3041] = 3, % ぁ HIRAGANA LETTER SMALL A
+    [0x3043] = 3, % ぃ HIRAGANA LETTER SMALL I
+    [0x3045] = 3, % ぅ HIRAGANA LETTER SMALL U
+    [0x3047] = 3, % ぇ HIRAGANA LETTER SMALL E
+    [0x3049] = 3, % ぉ HIRAGANA LETTER SMALL O
+    [0x3063] = 3, % っ HIRAGANA LETTER SMALL TU
+    [0x3083] = 3, % ゃ HIRAGANA LETTER SMALL YA
+    [0x3085] = 3, % ゅ HIRAGANA LETTER SMALL YU
+    [0x3087] = 3, % ょ HIRAGANA LETTER SMALL YO
+    [0x308E] = 3, % ゎ HIRAGANA LETTER SMALL WA
+    [0x3095] = 3, % ゕ HIRAGANA LETTER SMALL KA
+    [0x3096] = 3, % ゖ HIRAGANA LETTER SMALL KE
+    [0x3099] = 1, %  COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
+    [0x309A] = 1, %  COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+    [0x309B] = 1, % ゛ KATAKANA-HIRAGANA VOICED SOUND MARK
+    [0x309C] = 1, % ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+    [0x309D] = 1, % ゝ HIRAGANA ITERATION MARK
+    [0x309E] = 1, % ゞ HIRAGANA VOICED ITERATION MARK
+    [0x30A0] = 1, % ゠ KATAKANA-HIRAGANA DOUBLE HYPHEN
+    [0x30A1] = 3, % ァ KATAKANA LETTER SMALL A
+    [0x30A3] = 3, % ィ KATAKANA LETTER SMALL I
+    [0x30A5] = 3, % ゥ KATAKANA LETTER SMALL U
+    [0x30A7] = 3, % ェ KATAKANA LETTER SMALL E
+    [0x30A9] = 3, % ォ KATAKANA LETTER SMALL O
+    [0x30C3] = 3, % ッ KATAKANA LETTER SMALL TU
+    [0x30E3] = 3, % ャ KATAKANA LETTER SMALL YA
+    [0x30E5] = 3, % ュ KATAKANA LETTER SMALL YU
+    [0x30E7] = 3, % ョ KATAKANA LETTER SMALL YO
+    [0x30EE] = 3, % ヮ KATAKANA LETTER SMALL WA
+    [0x30F5] = 3, % ヵ KATAKANA LETTER SMALL KA
+    [0x30F6] = 3, % ヶ KATAKANA LETTER SMALL KE
+    [0x30FB] = 1, % ・ KATAKANA MIDDLE DOT
+    [0x30FC] = 1, % ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
+    [0x30FD] = 1, % ヽ KATAKANA ITERATION MARK
+    [0x30FE] = 1, % ヾ KATAKANA VOICED ITERATION MARK
+    [0xFE30] = 1, % ︰ PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+    [0xFE31] = 1, % ︱ PRESENTATION FORM FOR VERTICAL EM DASH
+    [0xFE32] = 1, % ︲ PRESENTATION FORM FOR VERTICAL EN DASH
+    [0xFE36] = 1, % ︶ PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
+    [0xFE38] = 1, % ︸ PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
+    [0xFE3A] = 1, % ︺ PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
+    [0xFE3C] = 1, % ︼ PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
+    [0xFE3E] = 1, % ︾ PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET
+    [0xFE40] = 1, % ﹀ PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET
+    [0xFE42] = 1, % ﹂ PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+    [0xFE44] = 1, % ﹄ PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+    [0xFE48] = 1, % ﹈ PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET
+    [0xFE5A] = 1, % ﹚ SMALL RIGHT PARENTHESIS
+    [0xFE5C] = 1, % ﹜ SMALL RIGHT CURLY BRACKET
+    [0xFE5E] = 1, % ﹞ SMALL RIGHT TORTOISE SHELL BRACKET
+    [0xFF01] = 1, % ! FULLWIDTH EXCLAMATION MARK
+    [0xFF09] = 1, % ) FULLWIDTH RIGHT PARENTHESIS
+    [0xFF0C] = 1, % , FULLWIDTH COMMA
+    [0xFF0E] = 1, % . FULLWIDTH FULL STOP
+    [0xFF1A] = 1, % : FULLWIDTH COLON
+    [0xFF1B] = 1, % ; FULLWIDTH SEMICOLON
+    [0xFF1F] = 1, % ? FULLWIDTH QUESTION MARK
+    [0xFF3D] = 1, % ] FULLWIDTH RIGHT SQUARE BRACKET
+    [0xFF5D] = 1, % } FULLWIDTH RIGHT CURLY BRACKET
+    [0xFF60] = 1, % ⦆ FULLWIDTH RIGHT WHITE PARENTHESIS
+    [0xFF61] = 1, % 。 HALFWIDTH IDEOGRAPHIC FULL STOP
+    [0xFF63] = 1, % 」 HALFWIDTH RIGHT CORNER BRACKET
+    [0xFF64] = 1, % 、 HALFWIDTH IDEOGRAPHIC COMMA
+    [0xFF65] = 1, % ・ HALFWIDTH KATAKANA MIDDLE DOT
+    [0xFF9E] = 1, % ゙ HALFWIDTH KATAKANA VOICED SOUND MARK
+    [0xFF9F] = 1, % ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+}, { __index = function(_,c)
+        if c >= 0x1160  and c <= 0x11FF  then return 2 end
+        if c >= 0xD7B0  and c <= 0xD7FF  then return 2 end
+        if c >= 0x302A  and c <= 0x302F  then return 1 end
+        if c >= 0x31F0  and c <= 0x31FF  then return 3 end
+        if c >= 0xFF67  and c <= 0xFF70  then return 3 end
+        if c >= 0xFE00  and c <= 0xFE0F  then return 1 end
+        if c >= 0xFE10  and c <= 0xFE19 and not (c == 0xFE17) then return 1 end
+        if c >= 0xFE50  and c <= 0xFE58  then return 1 end
+        if c >= 0xE0100 and c <= 0xE01EF then return 1 end
+    end
+})
 local function is_cjk (c)
-    return  (c >= 0xAC00  and c <= 0xD7A3)
-    or      (c >= 0x1100  and c <= 0x115F)
-    or      (c >= 0xA960  and c <= 0xA97C)
-    or      (c >= 0x3400  and c <= 0x9FFF)
+    return  (c >= 0xAC00  and c <= 0xD7FF)
+    or      (c >= 0x1100  and c <= 0x11FF)
+    or      (c >= 0xA960  and c <= 0xA97F)
+    or      (c >= 0x2E80  and c <= 0x9FFF)
     or      (c >= 0xF900  and c <= 0xFAFF)
-    or      (c >= 0x2E80  and c <= 0x2FFF)
-    or      (c >= 0x3040  and c <= 0x30FF)
-    or      (c >= 0x20000 and c <= 0x2CEAF)
-    or      (c >= 0x2F800 and c <= 0x2FA1F)
-    or      (nobr_after[c]  and c > 0xFF)
-    or      (nobr_before[c] and c > 0xFF)
+    or      (c >= 0xFE10  and c <= 0xFE1F)
+    or      (c >= 0xFE30  and c <= 0xFE6F)
+    or      (c >= 0xFF00  and c <= 0xFFEF)
+    or      (c >= 0x1F100 and c <= 0x1F2FF)
+    or      (c >= 0x20000 and c <= 0x2FA1F)
+    or      (nobr_after[c]  and c > 0x2014)
+    or      (nobr_before[c] and c > 0x2014)
 end
 local charclass = setmetatable({
     [0x2018] = 1, [0x201C] = 1, [0x2329] = 1, [0x3008] = 1,
     [0x300A] = 1, [0x300C] = 1, [0x300E] = 1, [0x3010] = 1,
     [0x3014] = 1, [0x3016] = 1, [0x3018] = 1, [0x301A] = 1,
-    [0x301D] = 1, [0xFF08] = 1, [0xFF3B] = 1, [0xFF5B] = 1,
-    [0xFF5F] = 1, [0xFF62] = 1, [0x2019] = 2, [0x201D] = 2,
-    [0x232A] = 2, [0x3001] = 2, [0x3009] = 2, [0x300B] = 2,
-    [0x300D] = 2, [0x300F] = 2, [0x3011] = 2, [0x3015] = 2,
-    [0x3017] = 2, [0x3019] = 2, [0x301B] = 2, [0x301E] = 2,
-    [0x301F] = 2, [0xFF09] = 2, [0xFF0C] = 2, [0xFF3D] = 2,
-    [0xFF5D] = 2, [0xFF60] = 2, [0xFF63] = 2, [0xFF64] = 2,
-    [0x00B7] = 3, [0x30FB] = 3, [0xFF1A] = 3, [0xFF1B] = 3,
-    [0xFF65] = 3, [0x3002] = 4, [0xFF0E] = 4, [0xFF61] = 4,
-    [0x2015] = 5, [0x2025] = 5, [0x2026] = 5, [0xFF01] = 6,
+    [0x301D] = 1, [0xFE17] = 1, [0xFE35] = 1, [0xFE37] = 1,
+    [0xFE39] = 1, [0xFE3B] = 1, [0xFE3D] = 1, [0xFE3F] = 1,
+    [0xFE41] = 1, [0xFE43] = 1, [0xFE47] = 1, [0xFF08] = 1,
+    [0xFF3B] = 1, [0xFF5B] = 1, [0xFF5F] = 1, [0xFF62] = 1,
+    [0x2019] = 2, [0x201D] = 2, [0x232A] = 2, [0x3001] = 2,
+    [0x3009] = 2, [0x300B] = 2, [0x300D] = 2, [0x300F] = 2,
+    [0x3011] = 2, [0x3015] = 2, [0x3017] = 2, [0x3019] = 2,
+    [0x301B] = 2, [0x301E] = 2, [0x301F] = 2, [0xFE10] = 2,
+    [0xFE11] = 2, [0xFE18] = 2, [0xFE36] = 2, [0xFE38] = 2,
+    [0xFE3A] = 2, [0xFE3C] = 2, [0xFE3E] = 2, [0xFE40] = 2,
+    [0xFE42] = 2, [0xFE44] = 2, [0xFE48] = 2, [0xFF09] = 2,
+    [0xFF0C] = 2, [0xFF3D] = 2, [0xFF5D] = 2, [0xFF60] = 2,
+    [0xFF63] = 2, [0xFF64] = 2, [0x00B7] = 3, [0x30FB] = 3,
+    [0xFF1A] = 3, [0xFF1B] = 3, [0xFF65] = 3, [0x3002] = 4,
+    [0xFE12] = 4, [0xFF0E] = 4, [0xFF61] = 4, [0x2015] = 5,
+    [0x2025] = 5, [0x2026] = 5, [0xFE19] = 5, [0xFE30] = 5,
+    [0xFE31] = 5, [0xFE15] = 6, [0xFE16] = 6, [0xFF01] = 6,
     [0xFF1F] = 6,
 }, { __index = function() return 0 end })
 local intercharclass = { [0] =
@@ -679,13 +828,13 @@
     penalty.penalty = p
     return penalty
 end
-local function get_new_glue (wd, st, sh)
+local function get_new_glue (wd, st, sh, sto, sho)
     local glue = node.new("glue")
-    local spec = node.new("glue_spec")
-    spec.width   = wd
-    spec.stretch = st
-    spec.shrink  = sh
-    glue.spec = spec
+    glue.width   = wd or 0
+    glue.stretch = st or 0
+    glue.shrink  = sh or 0
+    glue.stretch_order = sto or 0
+    glue.shrink_order  = sho or 0
     return glue
 end
 local function get_font_size (fid, space)
@@ -703,9 +852,7 @@
     local size = get_font_size(g.font)
     head, curr = node.remove(head, curr)
     g.next, g.prev = nil, nil
-    local hss = get_new_glue(0, 65536, 65536)
-    hss.spec.stretch_order = 2
-    hss.spec.shrink_order  = 2
+    local hss = get_new_glue(0, 65536, 65536, 2, 2)
     if class == 1 then
         h, hss.next, g.prev = hss, g, hss
     elseif class == 2 or class == 4 then
@@ -714,6 +861,7 @@
         local hss2 = node.copy(hss)
         h, hss.next, g.prev, g.next, hss2.prev = hss, g, hss, hss2, g
     end
+    h = nodes.simple_font_handler(h)
     local box = node.hpack(h, size, "exactly")
     head, curr = node.insert_before(head, curr, box)
     return head, curr
@@ -739,11 +887,38 @@
     if x then
         glue = get_new_glue(size/2, size/4, size/8)
     else
-        glue = get_new_glue(0, size/5, size/50)
+        glue = get_new_glue(0, size/10, size/50)
     end
     head, curr = node.insert_after(head, curr, glue)
     return head, curr
 end
+local function avoid_widow_char (head)
+    local curr = node.tail(head)
+    while curr do
+        if curr.id == glyph_id then
+            local c = curr.char or 0
+            if not nobr_before[c] or nobr_before[c] == 3 then
+                local var = node.has_attribute(curr, attr_korean)
+                if var and is_cjk(c) then
+                    curr = curr.prev
+                    if curr and curr.id == glue_id then
+                        curr = curr.prev
+                        if curr then
+                            local pv = var == 1 and 500 or 1000
+                            if curr.id == penalty_id then
+                                if curr.penalty < pv then curr.penalty = pv end
+                            else
+                                node.insert_after(head, curr, get_new_penalty(pv))
+                            end
+                        end
+                    end
+                end
+                break
+            end
+        end
+        curr = curr.prev
+    end
+end
 local function korean_break (head, lb)
     local curr = head
     while curr do
@@ -750,24 +925,26 @@
         if curr.id == glyph_id then
             local var = node.has_attribute(curr, attr_korean)
             if var then
-                local c, f = curr.char, curr.font
-                local cc = charclass[c]
+                local c, f = curr.char or 0, curr.font or 0
+                local cc, cjkc = charclass[c], is_cjk(c)
                 if var > 0 and cc > 0 and cc < 5 then
                     head, curr = glyph_to_box(head, curr, cc)
                 end
                 local next = curr.next
                 if next and next.id == glyph_id then
-                    local n = next.char
+                    local n = next.char or 0
                     local nc = charclass[n]
                     local nobr = nobr_before[n] or nobr_after[c]
                     if var > 0 and intercharclass[cc][nc] then
                         head, curr = insert_cjk_penalty_glue(head, curr, f, var, cc, nc, nobr)
                     elseif not nobr then
-                        local cjkc, cjkn = is_cjk(c), is_cjk(n)
-                        if var > 0 and (cjkc or cjkn) and not (cjkc and cjkn) then
-                            head, curr = insert_penalty_glue(head, curr, f, var, true)
-                        elseif lb and (cjkc or cjkn) then
-                            head, curr = insert_penalty_glue(head, curr, f, var)
+                        local cjkn = is_cjk(n)
+                        if cjkc or cjkn then
+                            if var > 0 and not (cjkc and cjkn) and not (nobr_before[c] == 0) then
+                                head, curr = insert_penalty_glue(head, curr, f, var, true)
+                            elseif lb then
+                                head, curr = insert_penalty_glue(head, curr, f, var)
+                            end
                         end
                     end
                 end
@@ -775,6 +952,7 @@
         end
         curr = curr.next
     end
+    if lb then avoid_widow_char(head) end
     return head
 end
 local josa_table = {
@@ -834,9 +1012,9 @@
 local function get_prev_char (p)
     while p do
         if p.id == glyph_id then
-            local pc = p.char
+            local pc = p.char or 0
             if not nobr_after[pc] then
-                if not nobr_before[pc] or nobr_before[pc] == 2 then
+                if not nobr_before[pc] or nobr_before[pc] >= 2 then
                     return pc
                 end
             end
@@ -853,13 +1031,13 @@
         if curr.id == glyph_id then
             local josa = node.has_attribute(curr, attr_josa)
             if josa then
-                local cc = curr.char
+                local cc = curr.char or 0
                 if josa == 0 then
                     josa = josa_code[get_prev_char(curr.prev) or 0x30]
                 end
                 if cc == 0xC774 then
                     local n = curr.next
-                    if n and n.id == glyph_id and n.char == 0xB77C then
+                    if n and n.char and n.char >= 0xAC00 and n.char <= 0xD7A3 then
                     else
                         cc = 0xAC00
                     end
@@ -886,8 +1064,8 @@
     local curr, tone = node.tail(head)
     while curr do
         if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then
-            local c, wd = curr.char, curr.width
-            if (c == 0x302E or c == 0x302F) and wd and wd > 0 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)
@@ -916,6 +1094,24 @@
         luatexbase.add_to_callback(name, func, desc, 1)
     end
 end
+prepend_to_callback ("hyphenate",
+    function(head)
+        local in_callback = luatexbase.in_callback or luatexbase.priority_in_callback
+        if in_callback("hyphenate", "polyglossia.disable_hyphenation") then
+            return false
+        end
+        local curr = head
+        while curr do
+            if curr.id == glyph_id and node.has_attribute(curr, attr_korean) and is_cjk(curr.char or 0) then
+                if curr.subtype == 1 then
+                    curr.subtype = 0
+                end
+            end
+            curr = curr.next
+        end
+        lang.hyphenate(head)
+    end,
+    "polyglossia.lang_korean")
 prepend_to_callback ("pre_linebreak_filter",
     function(head)
         head = auto_josa(head)

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-latin.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -1,114 +1,150 @@
-% !TEX encoding = UTF-8 Unicode
-\ProvidesFile{gloss-latin.ldf}[polyglossia: module for latin]
-\PolyglossiaSetup{latin}{
-hyphennames={latin},
-%  hyphenmins={2,2},
-  frenchspacing=true,
-  fontsetup=true,
-}
+%%
+%% This is file `gloss-latin.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gloss-latin.dtx  (with options: `lamodern')
+%%   ------------------------------------------------------------------
+%%   Latin module for polyglossia
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%%   This work is distributed under the MIT License.
+%% 
+%%   See the postamble.
+%%   ------------------------------------------------------------------
+\ProvidesFile{gloss-latin.ldf}
+        [2016/09/10 v.1.03 Latin support from polyglossia]
+%%
 
 
-\define at boolkey{latin}[latin@]{babelshorthands}[true]{}
-
-
-\ifsystem at babelshorthands
-  \setkeys{latin}{babelshorthands=true}
-\else
-  \setkeys{latin}{babelshorthands=false}
-\fi
-
-
-\ifcsundef{initiate at active@char}{%
-\input{babelsh.def}%
-}{}\initiate at active@char{"}%
-
-
-
-\def\latin at shorthands{%
-  \bbl at activate{"}%
-  \def\language at group{latin}%
-  \declare at shorthand{latin}{"}{%
-    \relax\ifmmode
-      \def\xpgla at next{''}%
-    \else
-      \def\xpgla at next{\futurelet\xpgla at temp\xpgla at cwm}%
-    \fi
-  \xpgla at next}%
+\PolyglossiaSetup{latin}{%
+      hyphennames={latin},
+      hyphenmins={2,2},
+      frenchspacing=true,
+      fontsetup=true,
 }
-
-
-\def\xpgla at allowhyphens{\bbl at allowhyphens\discretionary{-}{}{}\bbl at allowhyphens}
-\newcommand*{\xpgla at cwm}{\let\xpgla@@next\relax
-  \ifcat\noexpand\xpgla at temp a%
-    \let\xpgla@@next\xpgla at allowhyphens
-  \else
-    \ifx\xpgla at temp\ae
-        \let\xpgla@@next\xpgla at allowhyphens
-    \else
-        \ifx\xpgla at temp\oe
-           \let\xpgla@@next\xpgla at allowhyphens
-        \else
-           \if\noexpand\xpgla at temp\string|%
-              \def\xpgla@@next{\xpgla at allowhyphens\@gobble}%
-           \fi
-        \fi
-    \fi
-  \fi
-  \xpgla@@next}%
-
-\def\nolatin at shorthands{%
-  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
-}
-
-
-% set modern as default
-\def\latin at variant{\l at latin}%
-\ifluatex\xpg at set@language at luatex@iv{latin}\fi
-\def\captionslatin{\modernlatincaptions}%
-\def\datelatin{\modernlatindate}%
 \def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V}
-
+\def\noclassicuclccodes{\lccode`\V=`\v \uccode`\u=`\U}
 \def\tmp at modern{modern}
 \def\tmp at medieval{medieval}
-\def\tmp at classic{classic}
+\unless\ifluatex
+  \def\tmp at classic{classic}
+  \def\tmp at liturgical{liturgical}
+\fi
+\newif\ifmedieval\medievalfalse
+\newif\ifclassic\classicfalse
+\define at boolkey{latin}[latin@]{ecclesiastic}[true]{}
 
+\let\latin at variant\l at latin
+\ifluatex
+  \ifcsname l at latin\endcsname\xpg at set@language at luatex@ii{latin}\fi
+\fi
+\def\captionslatin{\latincaptions}%
+\def\datelatin{\latindate}%
 \define at key{latin}{variant}[modern]{%
 \def\@tempa{#1}%
 \ifx\@tempa\tmp at medieval
-  \def\latin at variant{\l at latin}%
-  \xpg at set@language at luatex@iv{latin}
-  \def\captionslatin{\medievallatincaptions}%
-  \def\datelatin{\classiclatindate}% 
+  \ifluatex
+    \ifcsname l at latin\endcsname\xpg at set@language at luatex@ii{latin}\fi
+  \fi
+  \let\latin at variant\l at latin
+  \xpg at set@language at luatex@ii{latin}
+  \medievaltrue \classictrue
   \classicuclccodes
   \xpg at info{Option: Medieval Latin}%
 \else
   \ifx\@tempa\tmp at classic
-    \xpg at ifdefined{classiclatin}{%
-      \def\latin at variant{\l at classiclatin}%
-      \xpg at set@language at luatex@iv{classiclatin}%
-    }{%
-       \xpg at nopatterns{Classic Latin}%
-       \adddialect\l at classiclatin\l at latin
-       \def\latin at variant{\l at latin}%
-    }%
-    \def\captionslatin{\modernlatincaptions}%
-    \def\datelatin{\classiclatindate}%
-    \classicuclccodes
+    \unless\ifluatex
+      \unless\ifcsname l at classiclatin\endcsname
+         \xpg at nopatterns{Classic Latin}%
+         \adddialect\l at classiclatin\l at latin
+         \let\latin at variant\l at latin
+      \else
+         \let\latin at variant\l at classiclatin
+      \fi
+    \fi
+    \medievalfalse\classictrue\classicuclccodes
     \xpg at info{Option: Classic Latin}%
   \else
-    \def\latin at variant{\l at latin}%
-    \xpg at set@language at luatex@iv{latin}
-    \def\captionslatin{\modernlatincaptions}%
-    \def\datelatin{\modernlatindate}%
-    \xpg at info{Option: Modern Latin}%
+   \ifx\@tempa\tmp at liturgical\unless\ifluatex
+      \unless\ifcsname l at liturgicallatin\endcsname
+         \xpg at nopatterns{Liturgical Latin}%
+         \adddialect\l at liturgicallatin\l at latin
+         \def\latin at variant{\l at latin}%
+      \else
+         \let\latin at variant\l at liturgicallatin
+      \fi
+        \medievaltrue\classicfalse
+        \xpg at info{Option: Liturgical Latin}\fi
+   \else
+      \ifx\@tempa\tmp at modern
+        \let\latin at variant\l at latin
+        \ifluatex\xpg at set@language at luatex@ii{latin}\fi
+        \xpg at info{Option: Modern Latin}%
+      \else
+        \def\latin at variant{\l at nohyphenation}%
+        \PackageWarning{polyglossia}{%
+          *******************\MessageBreak
+          No hyphenation set for \@tempa
+          *******************\MessageBreak
+        }{}%
+      \fi
+    \fi
   \fi
 \fi
 }
 
 \def\latin at language{\language=\latin at variant}%
+\ifluatex
+       \PackageWarning{polyglossia}{\MessageBreak\MessageBreak
+       *****************\MessageBreak
+       The ecclesiastic option is not active\MessageBreak
+       when typesetting with LuaLaTeX\MessageBreak
+       *****************\MessageBreak
+       \MessageBreak}{}
+  \else
+   \def\ecclesiasticlatin at punctuation{%
+      \def\xpg at unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
+      \lccode\string"2019=\string"2019
+      \newXeTeXintercharclass\ecclesiasticlatin at punctthin
+      \newXeTeXintercharclass\ecclesiasticlatin at punctguillstart
+      \newXeTeXintercharclass\ecclesiasticlatin at punctguillend
+      \XeTeXinterchartokenstate=1
+      \XeTeXcharclass `\! \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\? \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\; \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\: \ecclesiasticlatin at punctthin
+      \XeTeXcharclass `\« \ecclesiasticlatin at punctguillstart
+      \XeTeXcharclass `\» \ecclesiasticlatin at punctguillend
+      \XeTeXinterchartoks \z@ \ecclesiasticlatin at punctthin = {\penalty\@M
+      \hskip.2\fontdimen2\font \@plus\z@\@minus\z@}%
+      \XeTeXinterchartoks 255 \ecclesiasticlatin at punctthin = {\xpg at unskip}
+      \XeTeXinterchartoks \ecclesiasticlatin at punctguillstart \z@ = {\penalty\@M
+      \hskip.2\fontdimen2\font \@plus\z@\@minus\z@\ignorespaces}
+      \XeTeXinterchartoks \z@ \ecclesiasticlatin at punctguillend = {\xpg at unskip
+      \penalty\@M\hskip.2\fontdimen2\font \@plus\z@\@minus\z@}
+    }
 
-\def\modernlatincaptions{%
-   \def\prefacename{Praefatio}%
+   \def\noecclesiasticlatin at punctuation{%
+      \lccode\string"2019=\z@
+        \XeTeXcharclass `\! \z@
+        \XeTeXcharclass `\? \z@
+        \XeTeXcharclass `\; \z@
+        \XeTeXcharclass `\: \z@
+        \XeTeXcharclass `\« \z@
+        \XeTeXcharclass `\» \z@
+        \XeTeXinterchartokenstate=0
+      }
+    \let\latin at original@makefntext\@makefntext
+    \newcommand\latin at ecclesiastic@makefntext[1]{%
+        \parindent 1em \noindent
+        \latin at Makefnmark{\enspace #1}}
+    \newcommand\latin at Makefnmark{\hbox{\normalfont\@thefnmark.}}
+\fi
+\setkeys{latin}{variant,ecclesiastic=false}
+\def\latincaptions{%
+   \def\prefacename{\ifmedieval Præfatio\else Praefatio\fi}%
    \def\refname{Conspectus librorum}%
    \def\abstractname{Summarium}%
    \def\bibname{Conspectus librorum}%
@@ -130,49 +166,93 @@
    \def\proofname{Demonstratio}%
    \def\glossaryname{Glossarium}%
    }
-      
-\def\medievallatincaptions{%
-   \def\prefacename{Præfatio}%
-   \def\refname{Conspectus librorum}%
-   \def\abstractname{Summarium}%
-   \def\bibname{Conspectus librorum}%
-   \def\chaptername{Caput}%
-   \def\appendixname{Additamentum}%
-   \def\contentsname{Index}%
-   \def\listfigurename{Conspectus descriptionum}%
-   \def\listtablename{Conspectus tabularum}%
-   \def\indexname{Index rerum notabilium}%
-   \def\figurename{Descriptio}%
-   \def\tablename{Tabula}%
-   \def\partname{Pars}%
-   \def\enclname{Additur}%
-   \def\ccname{Exemplar}%
-   \def\headtoname{\ignorespaces}%
-   \def\pagename{charta}%
-   \def\seename{cfr.}%
-   \def\alsoname{cfr.}%
-   \def\proofname{Demonstratio}%
-   \def\glossaryname{Glossarium}%
-   }
 
-\def\modernlatindate{%   
+\def\latindate{%
    \def\today{\uppercase\expandafter{\romannumeral\day}%
       \space \ifcase\month%
-      \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or Junii\or%
-      Julii\or Augusti\or Septembris\or Octobris\or Novembris\or%
-      Decembris\fi%
+      \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or
+      Junii\or Julii\or Augusti\or Septembris\or Octobris\or
+        \ifclassic Nouembris\else Novembris\fi
+      \or Decembris\fi%
       \space \uppercase\expandafter{\romannumeral\year}}}
+%%%%%%%%% Latin shorthands
 
-\def\classiclatindate{%   
-   \def\today{\uppercase\expandafter{\romannumeral\day}%
-      \space \ifcase\month
-      \or Januarii\or Februarii\or Martii\or Aprilis\or Maii\or Junii\or
-      Julii\or Augusti\or Septembris\or Octobris\or Nouembris\or
-      Decembris\fi
-      \space \uppercase\expandafter{\romannumeral\year}}}
-      
+\define at boolkey{latin}[latin@]{babelshorthands}[true]{}
+
+\ifsystem at babelshorthands
+  \setkeys{latin}{babelshorthands=true}
+\else
+  \setkeys{latin}{babelshorthands=false}
+\fi
+\ifcsundef{initiate at active@char}{%
+\input{babelsh.def}%
+\initiate at active@char{"}%
+\initiate at active@char{'}%
+}{}
+\def\latin at shorthands{%
+  \def\language at group{latin}%
+  \bbl at activate{"}%
+  \declare at shorthand{latin}{"}{\relax
+    \ifmmode
+      \def\xpgla at nextdq{''}%
+    \else
+      \def\xpgla at nextdq{\futurelet\xpgla at temp\xpgla at cwm}%
+    \fi
+  \xpgla at nextdq}%
+  \bbl at activate{'}%
+  \declare at shorthand{latin}{'}{\relax
+    \ifmmode
+      \def\xpgla at nextsq{'}%
+    \else
+      \def\xpgla at nextsq{\futurelet\xpgla at temp@A\xpgla at putacute}%
+    \fi
+  \xpgla at nextsq}%
+}
+\def\xpgla at allowhyphens{\bbl at allowhyphens
+        \discretionary{-}{}{}\bbl at allowhyphens}
+\newcommand*{\xpgla at cwm}{\let\xpgla@@nextdq\relax
+  \ifcat\noexpand\xpgla at temp a%
+    \let\xpgla@@nextdq\xpgla at allowhyphens
+  \else
+    \ifx\xpgla at temp\ae
+        \let\xpgla@@nextdq\xpgla at allowhyphens
+    \else
+        \ifx\xpgla at temp\oe
+           \let\xpgla@@nextdq\xpgla at allowhyphens
+        \else
+           \if\noexpand\xpgla at temp\string|%
+              \def\xpgla@@nextdq{\xpgla at allowhyphens\@gobble}%
+           \fi
+        \fi
+    \fi
+  \fi
+  \xpgla@@nextdq}%
+\def\xpgla at putacute#1{\let\xpgla at nextsq\relax%
+\if a\xpgla at temp@A
+  æ\kern-0.175em^^^^0301\kern0.175em\xpgla at allowhyphens
+\else
+\if o\xpgla at temp@A
+  œ\kern-0.175em^^^^0301\kern0.175em\xpgla at allowhyphens
+\else
+  \if æ\xpgla at temp@A
+    æ^^^^0301%
+  \else
+    \if œ\xpgla at temp@A
+      œ^^^^0301%
+    \else
+      \string'%
+    \fi
+  \fi
+\fi
+\fi}%
+
+\def\nolatin at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{'}}%
+}
+
 \let\xpgla at savedvalues\empty
-\AtEndPreamble{% the user or the class might define different values
+\AtEndPreamble{%
   \edef\xpgla at savedvalues{%
     \clubpenalty=\the\clubpenalty\space
     \@clubpenalty=\the\@clubpenalty\space
@@ -179,12 +259,15 @@
     \widowpenalty=\the\widowpenalty\space
     \finalhyphendemerits=\the\finalhyphendemerits}
 }
-
-
 \def\noextras at latin{%
    \lccode\string"2019=\z@
    \nolatin at shorthands
    \xpgla at savedvalues
+   \noclassicuclccodes
+  \iflatin at ecclesiastic
+    \unless\ifluatex\noecclesiasticlatin at punctuation
+    \let\@makefntext\latin at original@makefntext\fi
+  \fi
 }
 
 \def\blockextras at latin{%
@@ -192,11 +275,39 @@
    \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
    \finalhyphendemerits=50000000
    \iflatin at babelshorthands\latin at shorthands\fi
+   \iflatin at ecclesiastic\unless\ifluatex\ecclesiasticlatin at punctuation
+   \let\@makefntext\latin at ecclesiastic@makefntext\fi
+   \fi
 }
 
 \def\inlineextras at latin{%
    \lccode\string"2019=\string"2019
    \iflatin at babelshorthands\latin at shorthands\fi
+   \iflatin at ecclesiastic
+      \unless\ifluatex\ecclesiasticlatin at punctuation
+      \let\@makefntext\latin at ecclesiastic@makefntext\fi
+   \fi
 }
-
-\endinput
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%% 
+%%   Permission is hereby granted, free of charge, to any person obtaining
+%%   a copy of this software and associated documentation files
+%%   (the "Software"), to deal in the Software without restriction, including
+%%   without limitation the rights to use, copy, modify, merge, publish,
+%%   distribute, sublicense, and/or sell copies of the Software, and to permit
+%%   persons to whom the Software is furnished to do so, subject to the following
+%%   conditions:
+%% 
+%%   The above copyright notice and this permission notice shall be included in
+%%   all copies or substantial portions of the Software.
+%% 
+%%   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%%   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%%   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+%%   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%%   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%%   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+%%   IN THE SOFTWARE.
+%%
+%% End of file `gloss-latin.ldf'.

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -1,11 +1,10 @@
 % Translated by Paulius Sladkevičius <komsas at gmail.com>
-% See also http://github.com/fc7/polyglossia/issues#issue/6
 
 \ProvidesFile{gloss-lithuanian.ldf}[polyglossia: module for lithuanian]
 \PolyglossiaSetup{lithuanian}{
   hyphennames={lithuanian},
   hyphenmins={2,2},
-  fontsetup=true,
+  fontsetup=true
 }
 
 \def\captionslithuanian{%
@@ -21,7 +20,6 @@
    \def\indexname{Rodyklė}%
    \def\figurename{pav.}%
    \def\tablename{lentelė}%
-   %\def\thepart{}% Roman numerals are fine
    \def\partname{Dalis}%
    \def\pagename{puslapis}%
    \def\seename{žiūrėk}%
@@ -32,6 +30,7 @@
    \def\proofname{Įrodymas}%
    \def\glossaryname{Terminų žodynas}%
 }
+
 \def\datelithuanian{%
    \def\lithuanianmonth{\ifcase\month\or
       sausio\or
@@ -45,18 +44,18 @@
       rugsėjo\or
       spalio\or
       lapkričio\or
-      gruodžio\fi}
+      gruodžio\fi}%
    \def\today{\number\year~m.~\lithuanianmonth~\number\day~d.}%
 }
 
 \def\blockextras at lithuanian{%
   \let\fnum at figure@orig\fnum at figure
+  \def\fnum at figure{\thefigure\nobreakspace\figurename}%
   \let\fnum at table@orig\fnum at table
-  \def\fnum at figure{\thefigure\nobreakspace\figurename}%
   \def\fnum at table{\thetable\nobreakspace\tablename}%
 }
 
-\def\noblockextras at lithuanian{%
+\def\noextras at lithuanian{%
   \let\fnum at figure\fnum at figure@orig
   \let\fnum at table\fnum at table@orig
 }

Added: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-liturgicallatin.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-liturgicallatin.ldf	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-liturgicallatin.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -0,0 +1,185 @@
+%%
+%% This is file `gloss-liturgicallatin.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gloss-latin.dtx  (with options: `laliturgic')
+%%   ------------------------------------------------------------------
+%%   Latin module for polyglossia
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%%   This work is distributed under the MIT License.
+%% 
+%%   See the postamble.
+%%   ------------------------------------------------------------------
+\ProvidesFile{gloss-liturgiclatin.ldf}
+        [2016/09/10 v.1.03 Latin support from polyglossia]
+%%
+
+
+\PolyglossiaSetup{liturgicallatin}{%
+      hyphennames={liturgicallatin},
+      hyphenmins={2,2},
+      frenchspacing=true,
+      fontsetup=true,
+}
+\def\liturgicallatincaptions{%
+   \def\prefacename{Præfatio}%
+   \def\refname{Conspectus librorum}%
+   \def\abstractname{Summarium}%
+   \def\bibname{Conspectus librorum}%
+   \def\chaptername{Caput}%
+   \def\appendixname{Additamentum}%
+   \def\contentsname{Index}%
+   \def\listfigurename{Conspectus descriptionum}%
+   \def\listtablename{Conspectus tabularum}%
+   \def\indexname{Index rerum notabilium}%
+   \def\figurename{Descriptio}%
+   \def\tablename{Tabula}%
+   \def\partname{Pars}%
+   \def\enclname{Additur}%
+   \def\ccname{Exemplar}%
+   \def\headtoname{\ignorespaces}%
+   \def\pagename{charta}%
+   \def\seename{cfr.}%
+   \def\alsoname{cfr.}%
+   \def\proofname{Demonstratio}%
+   \def\glossaryname{Glossarium}%
+   }
+
+\def\liturgicallatindate{%
+   \def\today{\uppercase\expandafter{\romannumeral\day}%
+      \space \ifcase\month%
+      \or Januarii\or Februarii\or Martii\or Aprilis\or Maji\or Junii\or%
+      Julii\or Augusti\or Septembris\or Octobris\or Novembris\or%
+      Decembris\fi%
+      \space \uppercase\expandafter{\romannumeral\year}}}
+
+\define at boolkey{liturgicallatin}[liturgicallatin@]{babelshorthands}[true]{}
+
+\ifsystem at babelshorthands
+  \setkeys{liturgicallatin}{babelshorthands=true}
+\else
+  \setkeys{liturgicallatin}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+    \input{babelsh.def}%
+    \initiate at active@char{"}%
+    \initiate at active@char{'}%
+}{}
+
+\def\liturgicallatin at shorthands{%
+  \def\language at group{liturgicallatin}%
+  \bbl at activate{"}%
+  \declare at shorthand{liturgicallatin}{"}{\relax
+    \ifmmode
+      \def\xpglla at next{''}%
+    \else
+      \def\xpglla at nextdq{\futurelet\xpglla at temp\xpglla at cwm}%
+    \fi
+  \xpglla at nextdq}%
+  \bbl at activate{'}%
+  \declare at shorthand{liturgicallatin}{'}{\relax
+    \ifmmode
+      \def\xpglla at nextsq{'}%
+    \else
+      \def\xpglla at nextsq{\futurelet\temp at A\xpglla at putacute}%
+    \fi
+  \xpgla at nextsq}%
+}
+
+\def\xpglla at allowhyphens{\bbl at allowhyphens
+     \discretionary{-}{}{}\bbl at allowhyphens}
+
+\newcommand*{\xpglla at cwm}{\let\xpglla@@nextdq\relax
+  \ifcat\noexpand\xpglla at temp a%
+    \let\xpglla@@nextdq\xpglla at allowhyphens
+  \else
+    \ifx\xpglla at temp\ae
+        \let\xpglla@@nextdq\xpglla at allowhyphens
+    \else
+        \ifx\xpglla at temp\oe
+           \let\xpglla@@nextdq\xpglla at allowhyphens
+        \else
+           \if\noexpand\xpglla at temp\string|%
+              \def\xpglla@@nextdq{\xpglla at allowhyphens\@gobble}%
+           \fi
+        \fi
+    \fi
+  \fi
+  \xpglla@@nextdq}%
+
+\def\xpglla at putacute#1{\let\xpglla at nextsq\relax%
+\if a\xpglla at temp@A
+  æ\kern-0.175em^^^^0301\kern0.175em\xpglla at allowhyphens
+\else
+\if o\xpglla at temp@A
+  œ\kern-0.175em^^^^0301\kern0.175em\xpglla at allowhyphens
+\else
+  \if æ\xpglla at temp@A
+    æ^^^^0301%
+  \else
+    \if œ\xpglla at temp@A
+      œ^^^^0301%
+    \else
+      \string'%
+    \fi
+  \fi
+\fi
+\fi}%
+\def\noliturgicallatin at shorthands{%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+  \@ifundefined{initiate at active@char}{}{\bbl at deactivate{'}}%
+}
+
+\let\xpglla at savedvalues\empty
+\AtEndPreamble{%
+  \edef\xpglla at savedvalues{%
+    \clubpenalty=\the\clubpenalty\space
+    \@clubpenalty=\the\@clubpenalty\space
+    \widowpenalty=\the\widowpenalty\space
+    \finalhyphendemerits=\the\finalhyphendemerits}%
+}
+
+\def\noextras at liturgicallatin{%
+   \lccode\string"2019=\z@
+   \noliturgicallatin at shorthands
+   \xpglla at savedvalues
+}
+
+\def\blockextras at liturgicallatin{%
+   \lccode\string"2019=\string"2019
+   \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
+   \finalhyphendemerits=50000000
+   \ifliturgicallatin at babelshorthands\liturgicallatin at shorthands\fi
+}
+
+\def\inlineextras at liturgicallatin{%
+   \lccode\string"2019=\string"2019
+   \ifliturgicallatin at babelshorthands\liturgicallatin at shorthands\fi
+}
+%%   Copyright (C) Claudio Beccari 2013-2016
+%%   Copyright (C) Élie Roux 2016
+%% 
+%%   Permission is hereby granted, free of charge, to any person obtaining
+%%   a copy of this software and associated documentation files
+%%   (the "Software"), to deal in the Software without restriction, including
+%%   without limitation the rights to use, copy, modify, merge, publish,
+%%   distribute, sublicense, and/or sell copies of the Software, and to permit
+%%   persons to whom the Software is furnished to do so, subject to the following
+%%   conditions:
+%% 
+%%   The above copyright notice and this permission notice shall be included in
+%%   all copies or substantial portions of the Software.
+%% 
+%%   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%%   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%%   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+%%   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%%   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%%   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+%%   IN THE SOFTWARE.
+%%
+%% End of file `gloss-liturgicallatin.ldf'.


Property changes on: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-liturgicallatin.ldf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-magyar.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -5,6 +5,16 @@
   fontsetup=true,
 }
 
+\frenchspacing
+
+% change 'táblázat x.x' to 'x.x. táblázat'
+\newcommand{\@magyar at fnum@table}{\thetable.~\tablename}
+\let\fnum at table\@magyar at fnum@table
+
+% change 'ábra x.x' to 'x.x. ábra'
+\newcommand{\@magyar at fnum@figure}{\thefigure.~\figurename}
+\let\fnum at figure\@magyar at fnum@figure
+
 \def\captionsmagyar{%
    \def\refname{Hivatkozások}%
    \def\abstractname{Kivonat}%

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-marathi.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -11,7 +11,7 @@
 \RequirePackage{devanagaridigits}
 
 \PolyglossiaSetup{marathi}{
-  script=Devaganari,
+  script=Devanagari,
   scripttag=deva,
   langtag=MAR,
   hyphennames={marathi},

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -169,9 +169,18 @@
 
 % The following is based on some ideas from ruscor.sty
 \def\russian at capsformat{%
-   \def\@seccntformat##1{\csname pre##1\endcsname%
-      \csname the##1\endcsname%
-      \csname post##1\endcsname}%
+   \ifdef{\KOMAScript}{%
+      \renewcommand{\chapterformat}{\prechapter\thechapter\postchapter}%
+      \renewcommand{\sectionformat}{\presection\thesection\postsection}%
+      \renewcommand{\subsectionformat}{\presubsection\thesubsection\postsubsection}%
+      \renewcommand{\subsubsectionformat}{\presubsubsection\thesubsubsection\postsubsubsection}%
+      \renewcommand{\paragraphformat}{\preparagraph\theparagraph\postparagraph}%
+      \renewcommand{\subparagraphformat}{\presubparagraph\thesubparagraph\postsubparagraph}%
+   }{%
+      \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}%
@@ -214,7 +223,16 @@
 }
 
 \def\noextras at russian{%
-   \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+   \ifdef{\KOMAScript}{%
+      \renewcommand{\chapterformat}{\thechapter\autodot\enskip}%
+      \renewcommand{\sectionformat}{\thesection\autodot\enskip}%
+      \renewcommand{\subsectionformat}{\thesubsection\autodot\enskip}%
+      \renewcommand{\subsubsectionformat}{\thesubsubsection\autodot\enskip}%
+      \renewcommand{\paragraphformat}{\theparagraph\autodot\enskip}%
+      \renewcommand{\subparagraphformat}{\thesubparagraph\autodot\enskip}%
+   }{%
+      \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+   }%
    \ifcyrillic at numerals\norussian at numbers\fi
    \norussian at shorthands%
 }

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-sanskrit.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -36,6 +36,11 @@
 \def\fontsetup at sanskrit@Telugu{%
   \def\xpg at scripttag@sanskrit{telu}%
   \xpg at fontsetup@nonlatin{sanskrit}}
+%% DW
+\def\fontsetup at sanskrit@Latin{%
+    \def\xpg at scripttag@sanskrit{latn}%
+    \xpg at fontsetup@latin{sanskrit}}
+%% DW
 
 \setkeys{sanskrit}{Script} %sets the default for Devanagari
 

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-ukrainian.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -13,6 +13,70 @@
   %TODO localalph
 }
 
+\newif\ifcyrillic at numerals
+\define at key{ukrainian}{numerals}[latin]{%
+\ifstrequal{#1}{cyrillic}%
+{\cyrillic at numeralstrue}
+{\cyrillic at numeralsfalse}%
+}
+
+\define at boolkey{ukrainian}[ukrainian@]{babelshorthands}[false]{}
+
+\setkeys{ukrainian}{numerals}
+
+\ifsystem at babelshorthands
+\setkeys{ukrainian}{babelshorthands=true}
+\else
+\setkeys{ukrainian}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate at active@char}{%
+\input{babelsh.def}%
+\initiate at active@char{"}%
+}{}
+
+\def\ukrainian at shorthands{%
+\bbl at activate{"}%
+\def\language at group{ukrainian}%
+%  \declare at shorthand{ukrainian}{"`}{„}%
+%  \declare at shorthand{ukrainian}{"'}{“}%
+%  \declare at shorthand{ukrainian}{"<}{«}%
+%  \declare at shorthand{ukrainian}{">}{»}%
+\declare at shorthand{ukrainian}{""}{\hskip\z at skip}%
+\declare at shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+\declare at shorthand{ukrainian}{"=}{\nobreak-\hskip\z at skip}%
+\declare at shorthand{ukrainian}{"|}{\textormath{\nobreak\discretionary{-}{}{\kern.03em}\allowhyphens}{}}%
+\declare at shorthand{ukrainian}{"-}{%
+\def\ukrainian at sh@tmp{%
+\if\ukrainian at sh@next-\expandafter\ukrainian at sh@emdash
+\else\expandafter\ukrainian at sh@hyphen\fi
+}%
+\futurelet\ukrainian at sh@next\ukrainian at sh@tmp}%
+\def\ukrainian at sh@hyphen{%
+\nobreak\-\bbl at allowhyphens}%
+\def\ukrainian at 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 at skip\ignorespaces}%
+\def\@Ccdash{\leavevmode
+\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
+\ifx\cyrdash\undefined
+\def\cyrdash{\hbox to.8em{--\hss--}}
+\fi
+\declare at shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}%
+}
+
+\def\noukrainian at shorthands{%
+\@ifundefined{initiate at active@char}{}{\bbl at deactivate{"}}%
+}
+
 \def\captionsukrainian{%
    \def\refname{Література}%
    \def\abstractname{Анотація}%
@@ -54,6 +118,25 @@
     грудня\fi%
     \space\number\year~р.}}
 
+% The following is based on some ideas from ruscor.sty
+\def\ukrainian at 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 at Alph\csname c@#1\endcsname}
 \def\ukrainian at Alph#1{\ifcase#1\or
    А\or Б\or В\or Г\or Д\or Е\or Є\or Ж\or
@@ -79,9 +162,24 @@
    \let\@alph\latin at alph%
 }
 
-\endinput
+\def\noextras at ukrainian{%
+\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+\ifcyrillic at numerals\noukrainian at numbers\fi
+\noukrainian at shorthands%
+}
 
-%TODO? stuff from Babel
+\def\blockextras at ukrainian{%
+\ukrainian at capsformat%
+\ifcyrillic at numerals\ukrainian at numbers\fi
+\ifukrainian at babelshorthands\ukrainian at shorthands\fi
+}
+
+\def\inlineextras at ukrainian{%
+\ifukrainian at babelshorthands\ukrainian at shorthands\fi%
+}
+
+%%% stuff from Babel
+% make it optional?
 \def\sh{\mathop{\operator at font sh}\nolimits}
 \def\ch{\mathop{\operator at font ch}\nolimits}
 \def\tg{\mathop{\operator at font tg}\nolimits}
@@ -96,8 +194,10 @@
 \def\nsk{\mathop{\mathrm{н.с.к.}}\nolimits}
 \def\NSD{\mathop{\mathrm{НСД}}\nolimits}
 \def\NSK{\mathop{\mathrm{НСК}}\nolimits}
-\def\nod{\mathop{\mathrm{н.о.д.}}\nolimits}    % ??????
-\def\nok{\mathop{\mathrm{н.о.к.}}\nolimits}    % ??????
-\def\NOD{\mathop{\mathrm{НОД}}\nolimits}       % ??????
-\def\NOK{\mathop{\mathrm{НОК}}\nolimits}       % ??????
+\def\nod{\mathop{\mathrm{н.о.д.}}\nolimits}
+\def\nok{\mathop{\mathrm{н.о.к.}}\nolimits}
+\def\NOD{\mathop{\mathrm{НОД}}\nolimits}
+\def\NOK{\mathop{\mathrm{НОК}}\nolimits}
 \def\Proj{\mathop{\mathrm{пр}}\nolimits}
+
+\endinput

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/gloss-vietnamese.ldf	2018-04-07 20:58:18 UTC (rev 47358)
@@ -18,10 +18,10 @@
   \def\appendixname{Phụ lục}%
   \def\contentsname{Mục lục}%
   \def\listfigurename{Danh sách hình vẽ}%
-  \def\listtablename{Danh sách bẳng}%
+  \def\listtablename{Danh sách bảng}%
   \def\indexname{Chỉ mục}%
   \def\figurename{Hình}%
-  \def\tablename{Bẳng}%
+  \def\tablename{Bảng}%
   \def\partname{Phần}%
   \def\pagename{Trang}%
   \def\seename{Xem}%

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua	2018-04-07 20:58:18 UTC (rev 47358)
@@ -3,8 +3,9 @@
 local luatexhyphen = luatexhyphen
 local byte = unicode.utf8.byte
 
+local module_name = "polyglossia"
 local polyglossia_module = {
-    name          = "polyglossia",
+    name          = module_name,
     version       = 1.3,
     date          = "2013/05/11",
     description   = "Polyglossia",
@@ -13,9 +14,15 @@
     license       = "CC0"
 }
 
-local error, warning, info, log =
-    luatexbase.provides_module(polyglossia_module)
+luatexbase.provides_module(polyglossia_module)
 
+local log_info = function(message)
+	luatexbase.module_info(module_name, message)
+end
+local log_warning = function(message)
+	luatexbase.module_warning(module_name, message)
+end
+
 polyglossia = polyglossia or {}
 local polyglossia = polyglossia
 
@@ -103,7 +110,7 @@
 local function newloader(langentry)
     loaded_language = polyglossia.newloader_loaded_languages[langentry]
     if loaded_language then
-        texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language))
+        log_info('Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language))
         -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. tostring(loaded_language) .. '; id is ' .. lang.id(loaded_language))
         -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. loaded_language['patterns'] .. '; id is ' .. lang.id(loaded_language))
         return lang.id(loaded_language)
@@ -112,15 +119,16 @@
         if langdata and langdata['special'] == 'language0' then return 0 end
 
         if langdata then
-            print("Language data for " .. langentry)
+            local s = "Language data for " .. langentry
             for k, v in pairs(langdata) do
-                print(k, tostring(v))
+				s = s .. "\n" .. k .. "\t" .. tostring(v)
             end
             polyglossia.newloader_max_langid = polyglossia.newloader_max_langid + 1
             -- langobject = lang.new(newloader_max_langid)
             lang.new(); lang.new(); lang.new()
             langobject = lang.new()
-            texio.write_nl('term and log', langdata.patterns)
+			s = s .. "\npatterns: " .. langdata.patterns
+			log_info(s)
             if langdata.patterns and langdata.patterns ~= '' then
                 pattfilepath = kpse.find_file(langdata.patterns)
                 if pattfilepath then
@@ -139,10 +147,10 @@
             end
             polyglossia.newloader_loaded_languages[langentry] = langobject
 
-            texio.write_nl('term and log', 'Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject))
+            log_info('Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject))
             return lang.id(langobject)
         else
-            texio.write_nl('term and log', 'Language ' .. langentry .. ' not found in language.dat.lua')
+            log_warning('Language ' .. langentry .. ' not found in language.dat.lua')
             return 255
         end
     end

Modified: trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty	2018-04-07 20:57:48 UTC (rev 47357)
+++ trunk/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty	2018-04-07 20:58:18 UTC (rev 47358)
@@ -1,5 +1,5 @@
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2015/03/25 v1.42.4
+\ProvidesPackage{polyglossia}[2018/04/07 v1.43
   Alternative to Babel for XeLaTeX and LuaLaTeX]
 \RequirePackage{etoolbox}
 \RequirePackage{makecmds}
@@ -26,6 +26,11 @@
   \RequireLuaModule{polyglossia}
 \fi
 
+% Which version of XeTeX do we use? What is the boudary class? 4095 or 255
+\@ifundefined{e at alloc@intercharclass at top}
+  {\chardef\xpg at boundaryclass=\@cclv}
+  {\let\xpg at boundaryclass=\e at alloc@intercharclass at top}
+
 % Useful for getting list of loaded languages and variants. Like babel's bbl at loaded
 \let\xpg at loaded\@empty
 \let\xpg at vloaded\@empty
@@ -70,14 +75,15 @@
 
 %% Used by the language definitions files for right-to-left languages
 \def\RequireBidi{%
-  \ifxetex
-    \RequirePackage{bidi}
-  \else\ifluatex
-    \RequirePackage{luabidi}
-  \else
-    \xpg at warning{You’re running a TeX engine that is not LuaTeX or XeTeX.\MessageBreak
-That is almost guaranteed to cause problems.}
-  \fi\fi}
+  \AtBeginDocument{%
+    \ifxetex
+      \RequirePackage{bidi}
+    \else\ifluatex
+      \RequirePackage{luabidi}
+    \else
+      \xpg at warning{You’re running a TeX engine that is not LuaTeX or XeTeX.\MessageBreak
+  That is almost guaranteed to cause problems.}
+    \fi\fi}}
 
 %% compatibility with babel
 \let\addto\gappto% gappto is defined in etoolbox



More information about the tex-live-commits mailing list