From 07aaa313db3abb8f932308307c9ca78bb1c3054d Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 31 Jan 2016 23:48:08 +0000
Subject: latex2e 2016/02/01

git-svn-id: svn://tug.org/texlive/trunk@39528 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/base/latex.ltx | 94 +++++++++++++++++++++++++-----
 1 file changed, 78 insertions(+), 16 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/base/latex.ltx')

diff --git a/Master/texmf-dist/tex/latex/base/latex.ltx b/Master/texmf-dist/tex/latex/base/latex.ltx
index 2689404ea65..afaa50e1839 100644
--- a/Master/texmf-dist/tex/latex/base/latex.ltx
+++ b/Master/texmf-dist/tex/latex/base/latex.ltx
@@ -49,7 +49,7 @@
 %% (but please observe conditions on bug reports sent to that address!)
 %% 
 %% 
-%% Copyright 1993-2015
+%% Copyright 1993-2016
 %% The LaTeX3 Project and any individual authors listed elsewhere
 %% in this file.
 %% 
@@ -332,8 +332,17 @@
                    \fi}
                                         {\count14}\insc@unt\float@count}
 \def\newtoks  {\e@alloc\toks \toksdef{\count15}\m@ne\e@alloc@top}
-\def\newread      {\e@alloc\read     \chardef{\count16}\m@ne\sixt@@n}
-\def\newwrite     {\e@alloc\write    \chardef{\count17}\m@ne\sixt@@n}
+\def\newread  {\e@alloc\read \chardef{\count16}\m@ne\sixt@@n}
+\ifx\directlua\@undefined
+  \def\newwrite   {\e@alloc\write \chardef{\count17}\m@ne\sixt@@n}
+\else
+  \def\newwrite   {\e@alloc\write
+                   {\ifnum\allocationnumber=18 \allocationnumber19\fi
+                     \global\chardef}%
+                   {\count17}%
+                   \m@ne
+                   {128}}
+\fi
 \def\new@mathgroup
   {\e@alloc\mathgroup\chardef{\count18}\m@ne\e@mathgroup@top}
 \def\newlanguage  {\e@alloc\language \chardef{\count19}\m@ne\@cclvi}
@@ -694,8 +703,8 @@
 %%% From File: ltvers.dtx
 \def\fmtname{LaTeX2e}
 \edef\fmtversion
-   {2015/10/01}
-\def\patch@level{2}
+   {2016/02/01}
+\def\patch@level{0}
 \iffalse
 \def\reserved@a#1/#2/#3\@nil{%
   \count@\year
@@ -1431,7 +1440,9 @@ Type  H <return>  for immediate help.}%
   \ifhmode
     \spacefactor\@savsf
     \ifdim\@savsk>\z@
-      \nobreak \hskip\z@skip
+      \ifdim\lastskip=\z@
+        \nobreak \hskip\z@skip
+      \fi
       \ignorespaces
     \fi
   \fi}%
@@ -2068,6 +2079,18 @@ Type  H <return>  for immediate help.}%
   {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
    \hbox{\check@mathfonts\fontsize\ssf@size\z@
    \math@fontsfalse\selectfont,}\hidewidth}\egroup}
+\DeclareTextCommandDefault\textcommaabove[1]{%
+  \hmode@bgroup
+  \ooalign{%
+    \hidewidth
+    \raise.7ex\hbox{%
+      \check@mathfonts\fontsize\ssf@size\z@\math@fontsfalse\selectfont`%
+    }%
+   \hidewidth\crcr
+   \null#1\crcr
+  }%
+  \egroup
+}
 %%% From File: ltcounts.dtx
 \def\setcounter#1#2{%
   \@ifundefined{c@#1}%
@@ -8007,13 +8030,49 @@ Type  H <return>  for immediate help.}%
 \newcatcodetable\catcodetable@latex
 \newcatcodetable\catcodetable@atletter
 \begingroup
-  \let\ENDGROUP\endgroup
-  \let\begingroup\relax
-  \let\endgroup\relax
-  \let\global\relax
-  \let\gdef\def
-  \input{unicode-letters.def}%
-  \let\endgroup\ENDGROUP
+  \def\parseunicodedataI#1;#2;#3;#4\relax{%
+    \parseunicodedataII#1;#3;#2 First>\relax
+  }%
+  \def\parseunicodedataII#1;#2;#3 First>#4\relax{%
+    \ifx\relax#4\relax
+      \expandafter\parseunicodedataIII
+    \else
+      \expandafter\parseunicodedataIV
+    \fi
+      {#1}#2\relax%
+  }%
+  \def\parseunicodedataIII#1#2#3\relax{%
+    \ifnum 0%
+      \if L#21\fi
+      \if M#21\fi
+      >0 %
+      \catcode"#1=11 %
+    \fi
+  }%
+  \def\parseunicodedataIV#1#2#3\relax{%
+    \read\unicoderead to \unicodedataline
+    \if L#2%
+      \count0="#1 %
+      \expandafter\parseunicodedataV\unicodedataline\relax
+    \fi
+  }%
+  \def\parseunicodedataV#1;#2\relax{%
+    \loop
+      \unless\ifnum\count0>"#1 %
+        \catcode\count0=11 %
+        \advance\count0 by 1 %
+    \repeat
+  }%
+  \def\storedpar{\par}%
+  \chardef\unicoderead=\numexpr\count16 + 1\relax
+  \openin\unicoderead=UnicodeData.txt %
+  \loop\unless\ifeof\unicoderead %
+    \read\unicoderead to \unicodedataline
+    \unless\ifx\unicodedataline\storedpar
+      \expandafter\parseunicodedataI\unicodedataline\relax
+    \fi
+  \repeat
+  \closein\unicoderead
   \@firstofone{%
     \catcode64=12 %
     \savecatcodetable\catcodetable@latex
@@ -8082,11 +8141,14 @@ Type  H <return>  for immediate help.}%
 \fi
 \ifx\XeTeXcharclass\@undefined
 \else
-\countdef\xe@alloc@intercharclass=257
-\xe@alloc@intercharclass=\thr@@
 \def\newXeTeXintercharclass{%
  \e@alloc\XeTeXcharclass\chardef\xe@alloc@intercharclass\m@ne\@cclv}
 \fi
+\ifx\XeTeXcharclass\@undefined
+\else
+  \countdef\xe@alloc@intercharclass=257
+  \xe@alloc@intercharclass=\z@
+\fi
 \unitlength = 1pt
 \fboxsep = 3pt
 \fboxrule = .4pt
@@ -8102,7 +8164,7 @@ Type  H <return>  for immediate help.}%
   \ifx\XeTeXmathcode\@undefined\else 1\fi
   >\z@
   \message{ Unicode character data,}
-  \input{unicode-letters.def}
+  \input{load-unicode-data}
   \lccode`\- =`\- % default hyphen char
 \else
 \def\reserved@a#1#2{%
-- 
cgit v1.2.3

