diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-06 21:33:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-06 21:33:45 +0000 |
commit | 588be4d1b7e254f46ac3c678ef1b3f38833f6491 (patch) | |
tree | c73b58d23db18c19737ff12c67e208fd7a89c4c6 /Master/texmf-dist/source/latex/base/ltfinal.dtx | |
parent | c436d9d03043bac0aac83254a8f1a2a45e4aaafd (diff) |
latex2e (6apr18)
git-svn-id: svn://tug.org/texlive/trunk@47330 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltfinal.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/ltfinal.dtx | 200 |
1 files changed, 187 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltfinal.dtx b/Master/texmf-dist/source/latex/base/ltfinal.dtx index 2faecc09ede..0d53743d0fb 100644 --- a/Master/texmf-dist/source/latex/base/ltfinal.dtx +++ b/Master/texmf-dist/source/latex/base/ltfinal.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1993-2017 +% Copyright 1993-2018 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -11,7 +11,7 @@ % conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in -% http://www.latex-project.org/lppl.txt +% https://www.latex-project.org/lppl.txt % and version 1.3c or later is part of all distributions of LaTeX % version 2005/12/01 or later. % @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltfinal.dtx} - [2017/03/09 v2.0t LaTeX Kernel (Final Settings)] + [2018/04/06 v2.1b LaTeX Kernel (Final Settings)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltfinal.dtx} @@ -541,6 +541,189 @@ % % \subsection{Input encoding} % +% \changes{v2.1a}{2018/03/25}{default to UTF-8} +% Starting with the 2018 \LaTeX\ release default the inputencoding +% to UTF-8. Unless the format is being used with luatex, xetex, enctex or mltex. +% +% This is done in a way largely compatible with older releases: |utf8.def| is input just as if\\ +% |\usepackage[utf8]{inputenc}|\\ +% had been used, however rather than input the whole package a minimal core part just enough to support +% loading the UTF-8 encoding iles is defined here. +% +% If a document re-specifies UTF-8 this is silently ignored. +% +% \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +% \end{macrocode} +% +% Check that a classic 8-bit tex engine is being used (LaTeX or PDFLaTeX). +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2018/04/01}% +%<latexrelease> {\UTFviii@invalid}{UTF-8 default}% +% \end{macrocode} +% +% +% Skip this section in Unicode TeX, or if MLTeX and EncTeX are enabled. +% \begin{macrocode} +\ifnum0% + \ifx\Umathchar\@undefined\else 1\fi + \ifx\mubyte\@undefined\else 1\fi + \ifx\charsubdef\@undefined\else 1\fi + =\z@ +% \end{macrocode} +% +% \begin{macrocode} +\def\saved@space@catcode{10} +\let\@inpenc@test\relax +\def\IeC{% + \ifx\protect\@typeset@protect + \expandafter\@firstofone + \else + \noexpand\IeC + \fi +} +% \end{macrocode} +% +% Make characters active for UTF-8 input formats +% \begin{macrocode} +\@tempcnta=1 +\loop + \catcode\@tempcnta=13 % + \advance\@tempcnta\@ne % +\ifnum\@tempcnta<32 % +\repeat % +\catcode0=15 % null +\catcode9=10 % tab +\catcode10=12 % ctrl J +\catcode12=13 % ctrl L +\catcode13=5 % newline +\@tempcnta=128 +\loop + \catcode\@tempcnta=13 + \advance\@tempcnta\@ne +\ifnum\@tempcnta<256 +\repeat +% \end{macrocode} +% +% \begin{macro}{\UseRawInputEncoding} +% \changes{v2.1a}{2018/03/25}{Macro added} +% Reset 8 bit characters to catcode 12 so the input endcoing matches the ``Raw'' +% font encoding. +% Useful for special behaviours, or for compatibility with older \LaTeX\ formats. +% \changes{v2.1b}{2018/04/06}{Undo changes to \cs{DeclareFontEncoding@} and +% definition of \cs{DeclareUnicodeCharacter}} +% \begin{macrocode} +\def\UseRawInputEncoding{% +\let\DeclareFontEncoding@\DeclareFontEncoding@saved % revert +\let\DeclareUnicodeCharacter\@undefined % revert +\@tempcnta=1 +\loop + \catcode\@tempcnta=15 % + \advance\@tempcnta\@ne % +\ifnum\@tempcnta<32 % +\repeat % +\catcode0=15 % null +\catcode9=10 % tab +\catcode10=12 % ctrl J +\catcode12=13 % ctrl L +\catcode13=5 % newline +\@tempcnta=128 +\loop + \catcode\@tempcnta=12 + \advance\@tempcnta\@ne +\ifnum\@tempcnta<256 +\repeat +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareFontEncoding@saved} +% Saved version of |\DeclareFontEncoding@| before \texttt{utf8.def} +% modifies it for use in |\UseRawInputEncoding| above. +% \begin{macrocode} +\let\DeclareFontEncoding@saved\DeclareFontEncoding@ +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\edef\inputencodingname{utf8}% +\input{utf8.def} +\let\@inpenc@test\@undefined +\let\saved@space@catcode\@undefined +% \end{macrocode} +% +% For formats not set up for UTF-8 default, set the C0 controls to catcode 15. +% \begin{macrocode} +\else +\@tempcnta=0 +\loop + \catcode\@tempcnta=15 % + \advance\@tempcnta\@ne % +\ifnum\@tempcnta<32 % +\repeat % +\catcode0=15 % null +\catcode9=10 % tab +\catcode10=12 % ctrl J +\catcode12=13 % ctrl L +\catcode13=5 % newline +% \end{macrocode} +% +% \begin{macrocode} +\let\UseRawInputEncoding\relax +% \end{macrocode} +% +% \begin{macrocode} +\fi +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\UTFviii@invalid}{UTF-8 default}% +% \end{macrocode} +% +% \begin{macrocode} +%<latexrelease>\@tempcnta=0 +%<latexrelease>\loop +%<latexrelease> \catcode\@tempcnta=15 +%<latexrelease> \advance\@tempcnta\@ne +%<latexrelease>\ifnum\@tempcnta<32 +%<latexrelease>\repeat % +%<latexrelease>\catcode9=10 % tab +%<latexrelease>\catcode10=12 % ctrl J +%<latexrelease>\catcode12=13 % ctrl L +%<latexrelease>\catcode13=5 % newline +%<latexrelease>\@tempcnta=128 +%<latexrelease>\loop +%<latexrelease>\catcode\@tempcnta=12 +%<latexrelease>\advance\@tempcnta\@ne +%<latexrelease>\ifnum\@tempcnta<256 +%<latexrelease>\repeat +%<latexrelease>\let\IeC\@undefined +%<latexrelease>\def\DeclareFontEncoding@#1#2#3{% +%<latexrelease> \expandafter +%<latexrelease> \ifx\csname T@#1\endcsname\relax +%<latexrelease> \def\cdp@elt{\noexpand\cdp@elt}% +%<latexrelease> \xdef\cdp@list{\cdp@list\cdp@elt{#1}% +%<latexrelease> {\default@family}{\default@series}% +%<latexrelease> {\default@shape}}% +%<latexrelease> \expandafter\let\csname#1-cmd\endcsname\@changed@cmd +%<latexrelease> \else +%<latexrelease> \@font@info{Redeclaring font encoding #1}% +%<latexrelease> \fi +%<latexrelease> \global\@namedef{T@#1}{#2}% +%<latexrelease> \global\@namedef{M@#1}{\default@M#3}% +%<latexrelease> \xdef\LastDeclaredEncoding{#1}% +%<latexrelease> } +%<latexrelease> \let\UseRawInputEncoding\@undefined +%<latexrelease> \let\DeclareFontEncoding@saved\@undefined +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% \begin{macrocode} +%<*2ekernel> +% \begin{macrocode} +% % We temporarily define |\reserved@a| to apply |\reserved@c| to all the % numbers in the range of its arguments. % \begin{macrocode} @@ -605,15 +788,6 @@ % All the characters in the range 0--31 and 127--255 are illegal, % \emph{except} tab (|^^I|), nl (|^^J|), ff (|^^L|) and cr (|^^M|). % -% Now allow 8-bit characters, although their use in this way is -% strongly discouraged. See |inputenc.dtx| for a supported mechanism -% for 8-bit input. -% \begin{macrocode} -\def\reserved@c#1{\catcode#1=15\relax} -\reserved@a{0}{`\^^H} -\reserved@c{`\^^K} -\reserved@a{`\^^N}{31} -% \end{macrocode} % % \subsection{Lccodes and uccodes} % @@ -891,4 +1065,4 @@ % \end{macrocode} % % \Finale -%
\ No newline at end of file +% |