[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: roll back utf8 change for pTeX (until \ifincsname is provided) avoid side effects with \DeclarErrorFont clarify some of the fntguide documentation (ea254ee6)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Jul 10 14:46:46 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/ea254ee6ae2b52ab18852e113bf5d87a83c0d145

>---------------------------------------------------------------

commit ea254ee6ae2b52ab18852e113bf5d87a83c0d145
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Jul 10 14:46:46 2019 +0200

    roll back utf8 change for pTeX (until \ifincsname is provided)
    avoid side effects with \DeclarErrorFont
    clarify some of the fntguide documentation


>---------------------------------------------------------------

ea254ee6ae2b52ab18852e113bf5d87a83c0d145
 base/changes.txt                                   |  17 ++
 base/inputenc.ins                                  |   5 +-
 base/ltclass.dtx                                   |   6 +-
 base/ltfiles.dtx                                   |   6 +-
 base/ltfinal.dtx                                   |   2 +-
 base/ltfssbas.dtx                                  |  38 ++-
 base/ltfssini.dtx                                  |  14 +-
 base/slifonts.fdd                                  |  18 +-
 base/utf8ienc.dtx                                  | 303 ++++++++++++++++++++-
 doc/fntguide.tex                                   |  56 +++-
 doc/ltnews30.tex                                   |  65 ++++-
 required/amsmath/amsmath.dtx                       |   2 +-
 required/amsmath/config-TU.lua                     |   1 +
 .../amsmath/testfiles-TU/tlb-utex-004.luatex.tlg   |   3 +-
 required/amsmath/testfiles-TU/tlb-utex-004.lvt     |   2 +
 required/amsmath/testfiles-TU/tlb-utex-004.tlg     |   4 -
 .../amsmath/testfiles-TU/tlb-utex-004.xetex.tlg    |   3 +-
 .../amsmath/testfiles-TU/tlb-utex-005.luatex.tlg   |   3 +-
 required/amsmath/testfiles-TU/tlb-utex-005.lvt     |   2 +
 required/amsmath/testfiles-TU/tlb-utex-005.tlg     |   4 -
 .../amsmath/testfiles-TU/tlb-utex-005.xetex.tlg    |   3 +-
 required/tools/changes.txt                         |   2 +-
 22 files changed, 505 insertions(+), 54 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 1eee1152..e002cdd0 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,23 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2019-07-09  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* utf8ienc.dtx (subsection{Housekeeping}):
+	Temp rollback fix for e-pTeX as that engines doesn't yet know
+	\ifincsname (so now features are unavailable there)
+
+	* ltfssbas.dtx (subsection{Macros for loading fonts}):
+	Don't set any \f at ... macros in \DeclareErrorFont as this side
+	effect is wrong! (pr/4399)
+
+	* ltfssini.dtx (subsection{Miscellaneous}):
+	Explicitly set some defaults for NFSS
+	(because of change to \DeclareErrorFont)
+
+	* slifonts.fdd: Explicitly set some defaults for NFSS
+	(because of change to \DeclareErrorFont)
+
 2019-07-01  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltfiles.dtx (section{File Handling}):
diff --git a/base/inputenc.ins b/base/inputenc.ins
index 46df8cf4..80993e28 100644
--- a/base/inputenc.ins
+++ b/base/inputenc.ins
@@ -3,7 +3,7 @@
 %% driver files from the doc files in this package when run through
 %% LaTeX or TeX.
 %%
-%% Copyright 1993-2017
+%% Copyright 1993-2019
 %% The LaTeX3 Project and any individual authors listed elsewhere
 %% in this file. 
 %% 
@@ -152,7 +152,8 @@ extension .ins) which are part of the distribution.
           \file{ot1enc.dfu}{\from{utf8ienc.dtx}{ot1}}
           \file{ot2enc.dfu}{\from{utf8ienc.dtx}{ot2}}
           \file{t1enc.dfu}{\from{utf8ienc.dtx}{t1}}
-         }
+          \file{utf8-2018.def}{\from{utf8ienc.dtx}{utf8-2018}}
+}
 \generate{\file{t2aenc.dfu}{\from{utf8ienc.dtx}{t2a}}
           \file{t2benc.dfu}{\from{utf8ienc.dtx}{t2b}}
           \file{t2cenc.dfu}{\from{utf8ienc.dtx}{t2c}}
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 4f6da0c6..b3a23310 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2019/07/01 v1.3a LaTeX Kernel (Class & Package Interface)]
+             [2019/07/09 v1.3a LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -1710,7 +1710,7 @@
 %</2ekernel>
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease>                 {\filec at ntents}{UTF8 in file names}%
+%<latexrelease>                 {\filec at ntents}{Spaces in file names}%
 \begingroup%
 \@tempcnta=1
 \loop
@@ -1848,7 +1848,7 @@
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease>                 {\filec at ntents}{UTF8 in file names}%
+%<latexrelease>                 {\filec at ntents}{Spaces in file names}%
 %<latexrelease>\begingroup%
 %<latexrelease>\@tempcnta=1
 %<latexrelease>\loop
diff --git a/base/ltfiles.dtx b/base/ltfiles.dtx
index 707996cb..7d628f52 100644
--- a/base/ltfiles.dtx
+++ b/base/ltfiles.dtx
@@ -546,7 +546,7 @@
 %</2ekernel>
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease>                 {\includeonly}{UTF8 in file names}%
+%<latexrelease>                 {\includeonly}{Spaces in file names}%
 \def\includeonly#1{%
   \@partswtrue
   \set at curr@file{\zap at space#1 \@empty}%
@@ -588,7 +588,7 @@
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease>                 {\includeonly}{UTF8 in file names}%
+%<latexrelease>                 {\includeonly}{Spaces in file names}%
 %<latexrelease>\def\includeonly#1{%
 %<latexrelease>  \@partswtrue
 %<latexrelease>  \edef\@partlist{\zap at space#1 \@empty}}
@@ -723,7 +723,6 @@
 %  \end{macro}
 %
 %
-
 %  \begin{macro}{\quote at name}
 %  \begin{macro}{\quote@@name}
 %  \begin{macro}{\unquote at name}
@@ -744,6 +743,7 @@
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
+%  \end{macro}
 %
 %
 %
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index ad1406a1..db98a9cb 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -732,7 +732,7 @@
 %<latexrelease>  \let\UTFviii at four@octets at noexpand\@undefined
 %    \end{macrocode}
 %
-%    \end{macrocode}
+%    \begin{macrocode}
 %<latexrelease>\@tempcnta=0
 %<latexrelease>\loop
 %<latexrelease>  \catcode\@tempcnta=15
diff --git a/base/ltfssbas.dtx b/base/ltfssbas.dtx
index cca10464..11abbae1 100644
--- a/base/ltfssbas.dtx
+++ b/base/ltfssbas.dtx
@@ -35,7 +35,7 @@
 %
 %
 \ProvidesFile{ltfssbas.dtx}
-             [2019/02/07 v3.2b LaTeX Kernel (NFSS Basic Macros)]
+             [2019/07/09 v3.2c LaTeX Kernel (NFSS Basic Macros)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -1285,6 +1285,10 @@
 %    one macro name if the assumption is false. But at least the font
 %    should be there!
 %    \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease>                 {\DeclareErrorFont}{No side effects please}%
 \def\DeclareErrorFont#1#2#3#4#5{%
       \xdef\error at fontshape{%
           \noexpand\expandafter\noexpand\split at name\noexpand\string
@@ -1298,19 +1302,39 @@
 %    We definitely don't want to set |\f at encoding|; we can set all the
 %    others since if they are left ``blank'' any selection would grap
 %    ``error default values'' as well. However, this probably should
-%    go also.
+%    go also---and now it did.
 % \changes{v2.1n}{1994/05/14}{Don't set \cs{f at encoding}}
+% \changes{v3.2c}{2019/07/09}{Don't set any \cs{f at ...} macros}
 %    \begin{macrocode}
 %      \gdef\f at encoding{#1}%
       \gdef\default at family{#2}%
       \gdef\default at series{#3}%
       \gdef\default at shape{#4}%
-      \global\let\f at family\default at family
-      \global\let\f at series\default at series
-      \global\let\f at shape\default at shape
-      \gdef\f at size{#5}%
-      \gdef\f at baselineskip{#5pt}%
 }
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\DeclareErrorFont}{No side effects please}%
+%<latexrelease>
+%<latexrelease>\def\DeclareErrorFont#1#2#3#4#5{%
+%<latexrelease>      \xdef\error at fontshape{%
+%<latexrelease>          \noexpand\expandafter\noexpand\split at name\noexpand\string
+%<latexrelease>          \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname
+%<latexrelease>          \noexpand\@nil}%
+%<latexrelease>      \gdef\default at family{#2}%
+%<latexrelease>      \gdef\default at series{#3}%
+%<latexrelease>      \gdef\default at shape{#4}%
+%<latexrelease>      \global\let\f at family\default at family
+%<latexrelease>      \global\let\f at series\default at series
+%<latexrelease>      \global\let\f at shape\default at shape
+%<latexrelease>      \gdef\f at size{#5}%
+%<latexrelease>      \gdef\f at baselineskip{#5pt}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
 \@onlypreamble\DeclareErrorFont
 %    \end{macrocode}
 %  \end{macro}
diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx
index 8ce5bf73..4d545f22 100644
--- a/base/ltfssini.dtx
+++ b/base/ltfssini.dtx
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright 1993-2016
+% Copyright 1993-2019
 % The LaTeX3 Project and any individual authors listed elsewhere
 % in this file.
 %
@@ -36,7 +36,7 @@
 %
 %
 \ProvidesFile{ltfssini.dtx}
-             [2016/10/15 v3.1b LaTeX Kernel (NFSS Initialisation)]
+             [2019/07/09 v3.1c LaTeX Kernel (NFSS Initialisation)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -488,6 +488,16 @@
                                        %% overwrite it in fontdef.cfg
                                        %% if necessary
 %    \end{macrocode}
+%    We also set some default values for |\f at family| etc. Note that we
+%    don't yet have any encodings that comes later. In the past this
+%    was implicitly done by |\DeclareErrorFont|.
+% \changes{v3.1c}{2019/07/09}{Explicitly set some defaults}
+%    \begin{macrocode}
+\fontfamily{cmr}
+\fontseries{m}
+\fontshape{n}
+\fontsize{10}{10}
+%    \end{macrocode}
 %
 %
 %
diff --git a/base/slifonts.fdd b/base/slifonts.fdd
index 304b521c..5a0a4ee2 100644
--- a/base/slifonts.fdd
+++ b/base/slifonts.fdd
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright 1993-2016
+% Copyright 1993-2019
 % The LaTeX3 Project and any individual authors listed elsewhere
 % in this file. 
 % 
@@ -45,7 +45,7 @@
 %<*driver, >
             \ProvidesFile{sfonts.drv}
 %</driver, >
-        [1998/06/12 v2.2e Standard LaTeX slide font definitions]
+        [2019/07/09 v2.2f Standard LaTeX slide font definitions]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -65,8 +65,6 @@
 %
 %\fi
 %
-% \CheckSum{78}
-%
 %
 % \changes{v2.2c}{1997/05/26}{Removed spaces in and around arguments
 %    to \cs{DeclareFontShape} and \cs{EC at family}.}
@@ -456,6 +454,18 @@
 \DeclareErrorFont{OT1}{lcmss}{m}{n}{19.907}
 \DeclareFontSubstitution{OT1}{lcmss}{m}{n}
 \input ot1lcmss.fd
+%    \end{macrocode}
+%    
+%    Ensure some suitable starting values but don't load any font
+%    yet. In the past this was implicitly done as part of
+%    \cs{DeclareErrorFont} but not any longer.
+% \changes{v2.2f}{2019/07/09}{Explicitly set some defaults}
+%    \begin{macrocode}
+\fontencoding{OT1}
+\fontfamily{lcmss}
+\fontseries{m}
+\fontshape{n}
+\fontsize{19.907}{19.907}
 %</main>
 %    \end{macrocode}
 %
diff --git a/base/utf8ienc.dtx b/base/utf8ienc.dtx
index 3e586dd0..1ef560c3 100644
--- a/base/utf8ienc.dtx
+++ b/base/utf8ienc.dtx
@@ -216,11 +216,27 @@
 %<+ts1> \ProvidesFile{ts1enc.dfu}
 %<+x2>  \ProvidesFile{x2enc.dfu}
 %<+all> \ProvidesFile{utf8enc.dfu}
-   [2019/02/07 v1.2h UTF-8 support for inputenc]
+%<-utf8-2018>   [2019/07/09 v1.2i UTF-8 support for inputenc]
 %    \end{macrocode}
 %
 %    \begin{macrocode}
 %<*utf8>
+%    \end{macrocode}
+%    This is a temporary fix for the e-p\TeX{} / e-up\TeX{} engines that do not yet
+%    have a |\ifincsname| primitive. Once this is available the the extra file will
+%    be dropped.
+% \changes{v1.2h}{2019/07/09}{Temp rollback fix for e-pTeX}
+%    \begin{macrocode}
+\ifx\ifincsname\@undefined  % old e-pTeX or e-upTeX engines
+  \input utf8-2018.def
+  \expandafter\@firstofone
+\else
+  \expandafter\@gobble
+\fi
+  \endinput
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
 \makeatletter
 %    \end{macrocode}
 %    We restore the |\catcode| of space (which is set to ignore in
@@ -1896,6 +1912,291 @@
 %</utf8>
 %    \end{macrocode}
 %    
+% \subsection{Old \texttt{utf8.def} file as a temp fix for p\TeX{} and friends}
+%
+%
+% \changes{v1.2h}{2019/07/09}{Temp rollback fix for e-pTeX}
+%    \begin{macrocode}
+%<*utf8-2018>
+\ProvidesFile{utf8.def}
+   [2018/10/05 v1.2f UTF-8 support for inputenc]
+\makeatletter
+\catcode`\ \saved at space@catcode
+\long\def\UTFviii at two@octets#1#2{\expandafter
+    \UTFviii at defined\csname u8:#1\string#2\endcsname}
+\long\def\UTFviii at three@octets#1#2#3{\expandafter
+    \UTFviii at defined\csname u8:#1\string#2\string#3\endcsname}
+\long\def\UTFviii at four@octets#1#2#3#4{\expandafter
+    \UTFviii at defined\csname u8:#1\string#2\string#3\string#4\endcsname}
+\def\UTFviii at defined#1{%
+  \ifx#1\relax
+     \if\relax\expandafter\UTFviii at checkseq\string#1\relax\relax
+      \UTFviii at undefined@err{#1}%
+     \else
+      \PackageError{inputenc}{Invalid UTF-8 byte sequence}%
+                             \UTFviii at invalid@help
+     \fi
+  \else\expandafter
+    #1%
+  \fi
+}
+\def\UTFviii at invalid@err#1{%
+ \PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii at hexnumber{`#1}}%
+                        \UTFviii at invalid@help}
+\def\UTFviii at invalid@help{%
+   The document does not appear to be in UTF-8 encoding.\MessageBreak
+   Try adding \noexpand\UseRawInputEncoding as the first line of the file\MessageBreak
+   or specify an encoding such as \noexpand\usepackage[latin1]{inputenc}\MessageBreak
+   in the document preamble.\MessageBreak
+   Alternatively, save the file in UTF-8 using your editor or another tool}
+\def\UTFviii at undefined@err#1{%
+  \PackageError{inputenc}{Unicode character \expandafter
+                          \UTFviii at splitcsname\string#1\relax
+                          \MessageBreak
+                          not set up for use with LaTeX}%
+                         {You may provide a definition with\MessageBreak
+                          \noexpand\DeclareUnicodeCharacter}%
+   }
+\def\UTFviii at checkseq#1:#2#3{%
+ \ifnum`#2<"80 %
+   \ifx\relax#3\else1\fi
+ \else
+   \ifnum`#2<"C0 %
+     1 %
+   \else
+     \expandafter\expandafter\expandafter\UTFviii at check@continue
+     \expandafter\expandafter\expandafter#3%
+   \fi
+  \fi}
+\def\UTFviii at check@continue#1{%
+  \ifx\relax#1%
+  \else
+  \ifnum`#1<"80 1\else\ifnum`#1>"BF 1\fi\fi
+  \expandafter\UTFviii at check@continue
+  \fi
+}
+\begingroup
+\catcode`\~13
+\catcode`\"12
+\def\UTFviii at loop{%
+  \uccode`\~\count@
+  \uppercase\expandafter{\UTFviii at tmp}%
+  \advance\count@\@ne
+  \ifnum\count@<\@tempcnta
+  \expandafter\UTFviii at loop
+  \fi}
+    \def\UTFviii at tmp{\xdef~{\noexpand\UTFviii at undefined@err{:\string~}}}
+    \count@"1
+    \@tempcnta9
+\UTFviii at loop
+    \count at 11
+    \@tempcnta12
+\UTFviii at loop
+    \count at 14
+    \@tempcnta32
+\UTFviii at loop
+    \count@"80
+    \@tempcnta"C2
+    \def\UTFviii at tmp{\xdef~{\noexpand\UTFviii at invalid@err\string~}}
+\UTFviii at loop
+    \count@"C2
+    \@tempcnta"E0
+    \def\UTFviii at tmp{\xdef~{\noexpand\UTFviii at two@octets\string~}}
+\UTFviii at loop
+    \count@"E0
+    \@tempcnta"F0
+    \def\UTFviii at tmp{\xdef~{\noexpand\UTFviii at three@octets\string~}}
+\UTFviii at loop
+    \count@"F0
+    \@tempcnta"F5
+    \def\UTFviii at tmp{\xdef~{\noexpand\UTFviii at four@octets\string~}}
+\UTFviii at loop
+    \count@"F5
+    \@tempcnta"100
+    \def\UTFviii at tmp{\xdef~{\noexpand\UTFviii at invalid@err\string~}}
+\UTFviii at loop
+\endgroup
+\@inpenc at test
+\ifx\@begindocumenthook\@undefined
+  \makeatother
+  \endinput \fi
+\begingroup
+\catcode`\"=12
+\catcode`\<=12
+\catcode`\.=12
+\catcode`\,=12
+\catcode`\;=12
+\catcode`\!=12
+\catcode`\~=13
+\gdef\DeclareUnicodeCharacter#1#2{%
+  \count@"#1\relax
+  \wlog{ \space\space defining Unicode char U+#1 (decimal \the\count@)}%
+  \begingroup
+    \parse at XML@charref
+    \def\UTFviii at two@octets##1##2{\csname u8:##1\string##2\endcsname}%
+    \def\UTFviii at three@octets##1##2##3{\csname u8:##1%
+                                     \string##2\string##3\endcsname}%
+    \def\UTFviii at four@octets##1##2##3##4{\csname u8:##1%
+                           \string##2\string##3\string##4\endcsname}%
+    \expandafter\expandafter\expandafter
+    \expandafter\expandafter\expandafter
+    \expandafter
+     \gdef\UTFviii at tmp{\IeC{#2}}%
+   \endgroup
+}
+\gdef\parse at XML@charref{%
+  \ifnum\count@<"A0\relax
+    \ifnum\catcode\count@=13
+      \uccode`\~=\count@\uppercase{\def\UTFviii at tmp{\@empty\@empty~}}%
+    \else
+      \PackageError{inputenc}%
+                   {Cannot define non-active Unicode char value < 00A0}%
+                   \@eha
+      \def\UTFviii at tmp{\UTFviii at tmp}%
+    \fi
+  \else\ifnum\count@<"800\relax
+     \parse at UTFviii@a,%
+     \parse at UTFviii@b C\UTFviii at two@octets.,%
+  \else\ifnum\count@<"10000\relax
+     \parse at UTFviii@a;%
+     \parse at UTFviii@a,%
+     \parse at UTFviii@b E\UTFviii at three@octets.{,;}%
+   \else
+     \ifnum\count@>"10FFFF\relax
+           \PackageError{inputenc}%
+                {\UTFviii at hexnumber\count@\space too large for Unicode}%
+                {Values between 0 and 10FFFF are permitted}%
+      \fi
+     \parse at UTFviii@a;%
+     \parse at UTFviii@a,%
+     \parse at UTFviii@a!%
+     \parse at UTFviii@b F\UTFviii at four@octets.{!,;}%
+    \fi
+    \fi
+  \fi
+}
+\gdef\parse at UTFviii@a#1{%
+     \@tempcnta\count@
+     \divide\count@ 64
+     \@tempcntb\count@
+     \multiply\count@ 64
+     \advance\@tempcnta-\count@
+     \advance\@tempcnta 128
+     \uccode`#1\@tempcnta
+     \count@\@tempcntb}
+\gdef\parse at UTFviii@b#1#2#3#4{%
+     \advance\count@ "#10\relax
+     \uccode`#3\count@
+     \uppercase{\gdef\UTFviii at tmp{#2#3#4}}}
+\ifx\numexpr\@undefined
+\gdef\decode at UTFviii#1{0}
+\else
+\gdef\decode at UTFviii#1\relax{%
+  \expandafter\UTFviii at cleanup
+    \the\numexpr\dec at de@UTFviii#1\relax)))))\@empty}
+\gdef\UTFviii at cleanup#1)#2\@empty{#1}
+\gdef\dec at de@UTFviii#1{%
+\ifx\relax#1%
+\else
+  \ifnum`#1>"EF
+    ((((`#1-"F0)%
+  \else
+    \ifnum`#1>"DF
+      (((`#1-"E0)%
+    \else
+      \ifnum`#1>"BF
+        ((`#1-"C0)%
+      \else
+        \ifnum`#1>"7F
+        )*64+(`#1-"80)%
+        \else
+        +`#1 %
+        \fi
+      \fi
+    \fi
+  \fi
+  \expandafter\dec at de@UTFviii
+\fi}
+\fi
+\ifx\numexpr\@undefined
+\global\let\UTFviii at hexnumber\@firstofone
+\global\UTFviii at hexdigit\hexnumber@
+\else
+\gdef\UTFviii at hexnumber#1{%
+\ifnum#1>15 %
+\expandafter\UTFviii at hexnumber\expandafter{\the\numexpr(#1-8)/16\relax}%
+\fi
+\UTFviii at hexdigit{\numexpr#1\ifnum#1>0-((#1-8)/16)*16\fi\relax}%
+}
+\gdef\UTFviii at hexdigit#1{\ifcase\numexpr#1\relax
+  0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or
+  A\or B\or C\or D\or E\or F\fi}
+\fi
+\gdef\UTFviii at hexcodepoint#1{U+%
+ \ifnum#1<16 0\fi
+ \ifnum#1<256 0\fi
+ \ifnum#1<4096 0\fi
+ \UTFviii at hexnumber{#1}%
+}%
+\gdef\UTFviii at splitcsname#1:#2\relax{%
+#2 (\expandafter\UTFviii at hexcodepoint\expandafter{%
+                     \the\numexpr\decode at UTFviii#2\relax})%
+}
+\endgroup
+\@onlypreamble\DeclareUnicodeCharacter
+\@onlypreamble\parse at XML@charref
+\@onlypreamble\parse at UTFviii@a
+\@onlypreamble\parse at UTFviii@b
+\begingroup
+  \def\cdp at elt#1#2#3#4{%
+    \wlog{Now handling font encoding #1 ...}%
+    \lowercase{%
+        \InputIfFileExists{#1enc.dfu}}%
+           {\wlog{... processing UTF-8 mapping file for font %
+                     encoding #1}%
+            \catcode`\ 9\relax}%
+          {\wlog{... no UTF-8 mapping file for font encoding #1}}%
+  }
+  \cdp at list
+\endgroup
+\def\DeclareFontEncoding@#1#2#3{%
+  \expandafter
+  \ifx\csname T@#1\endcsname\relax
+    \def\cdp at elt{\noexpand\cdp at elt}%
+    \xdef\cdp at list{\cdp at list\cdp at elt{#1}%
+                    {\default at family}{\default at series}%
+                    {\default at shape}}%
+    \expandafter\let\csname#1-cmd\endcsname\@changed at cmd
+    \begingroup
+      \wlog{Now handling font encoding #1 ...}%
+      \lowercase{%
+        \InputIfFileExists{#1enc.dfu}}%
+           {\wlog{... processing UTF-8 mapping file for font %
+                      encoding #1}}%
+           {\wlog{... no UTF-8 mapping file for font encoding #1}}%
+    \endgroup
+  \else
+     \@font at info{Redeclaring font encoding #1}%
+  \fi
+  \global\@namedef{T@#1}{#2}%
+  \global\@namedef{M@#1}{\default at M#3}%
+  \xdef\LastDeclaredEncoding{#1}%
+  }
+\DeclareUnicodeCharacter{00A9}{\textcopyright}
+\DeclareUnicodeCharacter{00AA}{\textordfeminine}
+\DeclareUnicodeCharacter{00AE}{\textregistered}
+\DeclareUnicodeCharacter{00BA}{\textordmasculine}
+\DeclareUnicodeCharacter{02C6}{\textasciicircum}
+\DeclareUnicodeCharacter{02DC}{\textasciitilde}
+\DeclareUnicodeCharacter{200C}{\textcompwordmark}
+\DeclareUnicodeCharacter{2026}{\textellipsis}
+\DeclareUnicodeCharacter{2122}{\texttrademark}
+\DeclareUnicodeCharacter{2423}{\textvisiblespace}
+\DeclareUnicodeCharacter{FEFF}{\ifhmode\nobreak\fi}
+\endinput
+</utf8-2018>
+%    \end{macrocode}
+%
 %
 % \section{A test document}
 %
diff --git a/doc/fntguide.tex b/doc/fntguide.tex
index 9c98de31..92dd6d1a 100644
--- a/doc/fntguide.tex
+++ b/doc/fntguide.tex
@@ -38,7 +38,7 @@
 \author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
    All rights reserved.}
  
-\date{8 March 2019}
+\date{July 2019}
  
 \begin{document}
  
@@ -212,7 +212,7 @@ The possible values for these attributes are given short acronyms by
 \end{minipage}
 \end{center}
 The `local' encodings are intended for font encodings which are only
-locally available, for example a font containing an organisation's
+locally available, for example a font containing an organization's
 logo in various sizes.
  
 There are far too many font families to list them all, but some common
@@ -232,9 +232,10 @@ ones are:
    \end{tabular}
 \end{minipage}
 \end{center}
+\NEWdescription{2019/07/10}
 The font series is denoting a combination of the weight (boldness) and
-the width (amount of expansion).  The standard supported for weights and widths
-are:
+the width (amount of expansion).  The standard supported for weights
+and widths are:
 \begin{center}
 %\begin{minipage}{.7\linewidth}
    \begin{tabular}{rl}
@@ -261,7 +262,7 @@ are:
        |ux|  &       Ultra Expanded   &  200\%   \\
    \end{tabular}
 \end{center}
-These are concatinated to a single series value except that |m| is
+These are concatenated to a single series value except that |m| is
 dropped unless both weight and width are medium in which case a single
 |m| is used.
 
@@ -280,12 +281,13 @@ Examples for series values are then:
    \end{tabular}
 \end{minipage}
 \end{center}
-Note that there are a large varity of names floating around like
+\NEWdescription{2019/07/10}
+Note, that there are a large variety of names floating around like
 ``regular'', ``black'', ``demi-bold'', ``thin'', ``heavy'' and many
 more. If at all possible they should be matched into the standard
 naming scheme to allow for sensible default substitutions if
 necessary, e.g., ``demi-bold'' is normally just another name for
-``semi-bold'', so should get |sb| asigned, etc.
+``semi-bold'', so should get |sb| assigned, etc.
 
 The most common values for the font shape are:
 \begin{center}
@@ -714,7 +716,7 @@ mode.  For example, |\boldmath| is defined to be |\mathversion{bold}|.
  
 Defines \m{version} to be a math version.
  
-The newly declared version is initialised with the defaults for all
+The newly declared version is initialized with the defaults for all
 symbol fonts and math alphabets declared so far (see the commands
 |\DeclareSymbolFont| and |\DeclareMathAlphabet|).
  
@@ -933,7 +935,7 @@ as a math symbol.
 \NEWdescription{1998/06/01}
 In case \m{cmd} is a single character such as `|[|', the same syntax is
 used.  Previously the \arg{type} argument was not present (and thus the
-corresponding math symbol declaration had to be provided seperately).
+corresponding math symbol declaration had to be provided separately).
  
 Example:
 \begin{verbatim}
@@ -1124,7 +1126,7 @@ whilst maintaining the correct value for all fonts.
 \subsection{Font file loading information}
 \label{sec:loadinfo}
  
-The information which tells \LaTeX{} exactly which font ({\tt .tfm})
+The information which tells \LaTeX{} exactly which font (\texttt{.tfm})
 files to load is contained in the \m{loading-info} part of a
 |\DeclareFontShape| declaration. This part consists of one or more
 \m{fontshape-decl}s, each of which has the following form:
@@ -1306,12 +1308,26 @@ that selects the fonts \emph{before} loading \texttt{fontenc} (this
 prevents the system from attempting to load any |T1|-encoded fonts from
 the `cmr' family).
 
+
+
 \subsection{Encoding definition file commands}
 \label{Sec:encode.def}
  
 \emph{Note}: An encoding definition file should contain only commands
 from this subsection.
 
+\NEWdescription{2019/07/10}
+As an exception it may also contain a |\DeclareFontsubstitution|
+declaration (described in \ref{sec:encoding-defaults}) to specify how
+font substitution for this encoding should be handled.  In that case
+it is important that the values used point to a font that is guaranteed
+to be available on all \LaTeX{} installations.\footnote{If the font
+  encoding file is made available as part of a CTAN bundle, that could
+  be a font that is provided together with that bundle, but it should
+  not point to font which requires further installation steps and
+  therefore may or may not be installed.}
+
+
 \NEWdescription{1997/12/01}
 As with the font definition file commands, it is also possible
 (although normally not necessary) to use these declarations directly
@@ -1536,7 +1552,7 @@ a package might give a fake definition of |\textonequarter| by saying:
    \ProvideTextCommandDefault{\textonequarter}{$\m at th\frac14$}
 \end{verbatim}
  
- \subsection{Encoding defaults}
+ \subsection{Encoding defaults} \label{sec:encoding-defaults}
  
 \begin{decl}
 |\DeclareFontEncodingDefaults| \arg{text-settings} \arg{math-settings}
@@ -1571,6 +1587,11 @@ These substitutions are local to the encoding scheme because the
 encoding scheme is never substituted!  They are tried in the order
 \m{shape} then  \m{series} and finally \m{family}.
 
+\NEWdescription{2019/07/10}
+This declaration is normally done in an encoding definition file
+(see~\ref{Sec:encode.def}), but can also be used in a class file or
+the document preamble to alter the default for a specific encoding.
+ 
 If no defaults are set up for an encoding, the values given by
 |\DeclareErrorFont| are used.
  
@@ -1642,6 +1663,13 @@ Example:
    \DeclareErrorFont{OT1}{cmr}{m}{n}{10}
 \end{verbatim}
 
+\NEWdescription{2019/07/10}
+This declaration is a system wide fallback and it should normally not
+be changed, in particular it does not belong into font encoding
+definition files but rather into the \LaTeX{} format. It is normally
+set up in \texttt{fonttext.cfg}. Adjustments on a per encoding base
+should be made through |\DeclareFontSubstitution| instead!
+ 
  
 \begin{decl}
 |\fontsubfuzz|
@@ -1676,6 +1704,10 @@ Example:
    \DeclarePreloadSizes{OT1}{cmr}{m}{sl}{10,10.95,12}
 \end{verbatim}
  
+\NEWdescription{2019/07/10}
+Preloading is really an artifact of the days when loading fonts while
+processing a document contributed substantially to the processing
+time. These days it is usually best not to use this mechanism any more.
 
 \subsection{Accented characters}
 
@@ -1827,7 +1859,7 @@ The package accepts the following options:
   terminal.
 
 \item[warningshow]  Show all font warnings on the terminal. This
-  setting corresponds to the default behaviour when this
+  setting corresponds to the default behavior when this
   \texttt{tracefnt} package is \emph{not} used!
 
 \item[infoshow]  Show all font warnings and all font info messages
diff --git a/doc/ltnews30.tex b/doc/ltnews30.tex
index a9b11449..083533a7 100644
--- a/doc/ltnews30.tex
+++ b/doc/ltnews30.tex
@@ -60,6 +60,14 @@
      \quad\penalty500\strut\nobreak\hfill
      \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
 
+\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
+     \quad\penalty500\strut\nobreak\hfill
+     \mbox{\small\slshape(%
+       \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F#2}%
+          	    {gnats issue #1/#2}%
+           )}%
+     \par}
+
 \let\cls\pkg
 \providecommand\env[1]{\texttt{#1}}
 
@@ -121,9 +129,46 @@
 This document is under construction \ldots
 
 
+\section{Improving Unicode handling in \pdfTeX{}}
+
+The perhaps most important improvement in this release is an even
+better support for UTF-8 characters when using \pdfTeX{}.\footnote{The
+  Japanese engines e-p\TeX{} and e-up\TeX{} can't use these features
+  yet as they don't support the primitive \cs{ifincsname}. Work is
+  under way to resolve this in the engines.}
+
+In Unicode engines any Unicode character (that is not acting as a
+command, i.e., is \enquote{active}) can be used as part of the
+\cs{label}/\cs{ref} mechanism or can be displayed in a message or
+written to a file. In 8-bit engines, however, this was severely
+restricted, essentially you had to limit yourself to using
+\acro{ascii} letters, digits and a few punctuation symbols.  With the
+new release most of these restrictions have been removed and you now
+can write labels such as
+\begin{verbatim}
+  \label{eq:größer}
+\end{verbatim}
+or use accented characters, etc.\ as part of a \cs{typeout} message.
+The only requirement remaining is that only those UTF-8 characters
+that are also available for typesetting can be used, i.e., only those
+which which adequate font support is loaded. Otherwise you will get an
+error message stating that a particular Unicode character is not set
+up for use with \LaTeX{}.
+
+What is not possible with an 8-bit engine such as \pdfTeX{} is to use
+characters other than \acro{ascii} letters as part of a command
+name. This is due to the fact that all other characters in such
+engines are not single character tokens, but in fact consist of a
+sequence of bytes and this is not supported in command names.
+
+\section{Improving file name handling in \pdfTeX{}}
+
+A related change is that file names used as part of \cs{input},  \cs{includegraphics}, etc.\ can now contain Unicode characters as well as spaces. In this case even characters that can't be typeset because of missing font support can be used.
+
 
 
-\section{Changes to the \LaTeX{} kernel}
+
+\section{Other changes to the \LaTeX{} kernel}
 
 
 \subsection{Guard against \cs{unskip} at the start of a tabular cell}
@@ -131,8 +176,8 @@ This document is under construction \ldots
 If a \env{tabular} or \env{array} cell started with command that
 issued an \cs{unskip} as its first action centering the column got
 broken because the space on the left got removed. This got corrected
-by adding a minusule additional space after the stretching space that
-could be safely removed in such a case without beig noticable.
+by adding a minuscule additional space after the stretching space that
+could be safely removed in such a case without being noticeable.
 
 This change was also applied in the \pkg{array} package.
 
@@ -154,7 +199,7 @@ the Unicode slots \texttt{27E8} and \texttt{27E9} have been mapped to
 \subsection{Improve \cs{InputIfFileExists}'s handling of fie names}
 
 In rare circumstances it was possible that \cs{InputIfFileExists}
-would work incorrectly, e.g., a cnstruction such as
+would work incorrectly, e.g., a construction such as
 \begin{verbatim}
 \InputIfFileExists{foo}{\input{bar}}{}
 \end{verbatim}
@@ -166,9 +211,19 @@ would load \texttt{foo.tex} twice. This has been corrected.
 
 \subsection{Improve wording of a warning message}
 
+\emph{write}
+
 \githubissue{107}
 
 
+\subsection{Avoid \cs{DeclareErrorFont} side effects}
+
+\emph{write}
+
+\gnatsissue{latex}{4399}
+
+
+
 \subsection{\pkg{nfssfont}: Generate a font table as the default action}
 
 With the small file \texttt{nfssfont.tex} it is possible to produce
@@ -196,7 +251,7 @@ distribution of \texttt{2+1+0} lines and if set it to three, the result
 would have been \texttt{3+0+0} instead of the default \texttt{1+1+1}.
 
 What is most appropriate really depends on the circumstances, but this
-now gives you the tools to make local or global adjustements.
+now gives you the tools to make local or global adjustments.
 
 
         
diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index d9f56246..ca55fb9a 100644
--- a/required/amsmath/amsmath.dtx
+++ b/required/amsmath/amsmath.dtx
@@ -81,7 +81,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
 \providecommand\DeclareRelease[3]{}
 \providecommand\DeclareCurrentRelease[2]{}
 %
-\DeclareRelease{}{2018-12-01}{amsmath-20128-12-01.sty}
+\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
 \DeclareCurrentRelease{}{2019-04-01}
 %    \end{macrocode}
 %
diff --git a/required/amsmath/config-TU.lua b/required/amsmath/config-TU.lua
index 69a17f8b..29b2f59b 100644
--- a/required/amsmath/config-TU.lua
+++ b/required/amsmath/config-TU.lua
@@ -1,4 +1,5 @@
 -- Tests for TU encoding
 
+checkengines = {"xetex", "luatex"}
 checksearch  = true
 testfiledir  = "testfiles-TU"
diff --git a/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg b/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg
index 5a98826c..2bf3d73f 100644
--- a/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg
+++ b/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg
@@ -1,5 +1,6 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+This test has error at begin document due to the special font setup in the test suite
+Missing character: There is no − (U+2212) in font cmr10!
 [1
 ] (tlb-utex-004.aux)
-LaTeX Font Warning: Some font shapes were not available, defaults substituted.
diff --git a/required/amsmath/testfiles-TU/tlb-utex-004.lvt b/required/amsmath/testfiles-TU/tlb-utex-004.lvt
index c8a81918..dcee1449 100644
--- a/required/amsmath/testfiles-TU/tlb-utex-004.lvt
+++ b/required/amsmath/testfiles-TU/tlb-utex-004.lvt
@@ -20,6 +20,8 @@
 $ $
 \TIMO
 
+\typeout{This test has error at begin document due to the special font setup in the test suite}
+
 foo-bar
 
 $\phi -\foobar \phi$
diff --git a/required/amsmath/testfiles-TU/tlb-utex-004.tlg b/required/amsmath/testfiles-TU/tlb-utex-004.tlg
deleted file mode 100644
index 1779d5bb..00000000
--- a/required/amsmath/testfiles-TU/tlb-utex-004.tlg
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a generated file for the LaTeX2e validation system.
-Don't change this file in any respect.
-[1
-] (tlb-utex-004.aux)
diff --git a/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg b/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg
index 5a98826c..5a7f3e7e 100644
--- a/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg
+++ b/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg
@@ -1,5 +1,6 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+This test has error at begin document due to the special font setup in the test suite
+Missing character: There is no − in font cmr10!
 [1
 ] (tlb-utex-004.aux)
-LaTeX Font Warning: Some font shapes were not available, defaults substituted.
diff --git a/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg b/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg
index 93a59032..7a1e67c9 100644
--- a/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg
+++ b/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg
@@ -1,5 +1,6 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+This test has error at begin document due to the special font setup in the test suite
+Missing character: There is no − (U+2212) in font cmr10!
 [1
 ] (tlb-utex-005.aux)
-LaTeX Font Warning: Some font shapes were not available, defaults substituted.
diff --git a/required/amsmath/testfiles-TU/tlb-utex-005.lvt b/required/amsmath/testfiles-TU/tlb-utex-005.lvt
index 37dac5cd..f58669eb 100644
--- a/required/amsmath/testfiles-TU/tlb-utex-005.lvt
+++ b/required/amsmath/testfiles-TU/tlb-utex-005.lvt
@@ -22,6 +22,8 @@
 $ $
 \TIMO
 
+\typeout{This test has error at begin document due to the special font setup in the test suite}
+
 foo-bar
 
 $\phi -\foobar \phi$
diff --git a/required/amsmath/testfiles-TU/tlb-utex-005.tlg b/required/amsmath/testfiles-TU/tlb-utex-005.tlg
deleted file mode 100644
index 9a0d6493..00000000
--- a/required/amsmath/testfiles-TU/tlb-utex-005.tlg
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a generated file for the LaTeX2e validation system.
-Don't change this file in any respect.
-[1
-] (tlb-utex-005.aux)
diff --git a/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg b/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg
index 93a59032..2a1dd779 100644
--- a/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg
+++ b/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg
@@ -1,5 +1,6 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+This test has error at begin document due to the special font setup in the test suite
+Missing character: There is no − in font cmr10!
 [1
 ] (tlb-utex-005.aux)
-LaTeX Font Warning: Some font shapes were not available, defaults substituted.
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index 9a9cef3d..54013f85 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -421,7 +421,7 @@ are not part of the distribution.
 2005-11-26 Frank Mittelbach <latex-bugs at latex-project.org>
 
 	* varioref.dtx: Single hyphen rather than -- in range for spanish
-	an galician.
+	and galician.
 
 2005-11-10 Frank Mittelbach <latex-bugs at latex-project.org>
 





More information about the latex3-commits mailing list