texlive[53292] Master/texmf-dist: sanitize-umlaut (1jan20)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 1 22:51:17 CET 2020


Revision: 53292
          http://tug.org/svn/texlive?view=revision&revision=53292
Author:   karl
Date:     2020-01-01 22:51:17 +0100 (Wed, 01 Jan 2020)
Log Message:
-----------
sanitize-umlaut (1jan20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/README
    trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.doc.sty
    trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.pdf
    trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.tex
    trunk/Master/texmf-dist/tex/latex/sanitize-umlaut/sanitize-umlaut.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/CHANGES

Added: trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/CHANGES	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/CHANGES	2020-01-01 21:51:17 UTC (rev 53292)
@@ -0,0 +1,27 @@
+%% The LaTeX package sanitize-umlaut - version 1.10 (2020/01/01)
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% 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
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+
+version 1.00 (2016/05/27): initial public release
+
+version 1.10 (2020/01/01):
+- implementation changed to adapt for LaTeX/inputenc UTF-8 changes
+  (see documentation):
+  version 1.00 is only compatible to older LaTeX/inputenc UTF-8
+  version 1.10 is only compatible to recent LaTeX/inputenc UTF-8
+- utf8-2018 is a new supported encoding

Modified: trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/README	2020-01-01 21:50:58 UTC (rev 53291)
+++ trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/README	2020-01-01 21:51:17 UTC (rev 53292)
@@ -1,8 +1,8 @@
-%% The LaTeX package sanitize-umlaut - version 1.00 (2016/05/28)
+%% The LaTeX package sanitize-umlaut - version 1.10 (2020/01/01)
 %%
-%% --------------------------------------------------------------------------------------
-%% Copyright (c) 2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
-%% --------------------------------------------------------------------------------------
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
 %% This work consists of all files listed in README
 %%
 
-The packages sanitizes umlauts to be used directly in index entries for
+The package sanitizes umlauts to be used directly in index entries for
 MakeIndex and friends with pdflatex. This means, that inside '\index' an umlaut
 can be used as "U or directly. In both cases, the letter is written as "U into
 the raw index file for correct processing with MakeIndex and pdflatex.

Modified: trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.doc.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.doc.sty	2020-01-01 21:50:58 UTC (rev 53291)
+++ trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.doc.sty	2020-01-01 21:51:17 UTC (rev 53292)
@@ -69,7 +69,7 @@
 \urlstyle{sf}
 
 \newtcblisting{fullexample}[1]{docexample,minted style=colorful,
-  listing and comment,pdf comment,compilable listing,#1}
+  listing and comment,pdf comment,freeze pdf,compilable listing,#1}
 
 \DeclareTotalTCBox{\myverb}{ O{} v }{tile,fontupper=\ttfamily,nobeforeafter,
   tcbox raise base,boxsep=0.5mm,top=0pt,bottom=0pt,left=0pt,right=0pt,boxrule=0.3mm,

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

Modified: trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.tex	2020-01-01 21:50:58 UTC (rev 53291)
+++ trunk/Master/texmf-dist/doc/latex/sanitize-umlaut/sanitize-umlaut.tex	2020-01-01 21:51:17 UTC (rev 53292)
@@ -2,12 +2,12 @@
 % !TeX encoding=UTF-8
 % !TeX spellcheck=en_US
 %%
-%% The LaTeX package sanitize-umlaut - version 1.00 (2016/05/28)
+%% The LaTeX package sanitize-umlaut - version 1.10 (2020/01/01)
 %% sanitize-umlaut.tex: Manual
 %%
-%% --------------------------------------------------------------------------------------
-%% Copyright (c) 2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
-%% --------------------------------------------------------------------------------------
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
@@ -27,8 +27,8 @@
 \usepackage{%
   sanitize-umlaut}
 
-\def\version{1.00}%
-\def\datum{2016/05/28}%
+\def\version{1.10}%
+\def\datum{2020/01/01}%
 
 \hypersetup{
   pdftitle={Manual for the sanitize-umlaut package},
@@ -87,7 +87,7 @@
 
 \clearpage
 \section{Purpose of the Package}%
-The packages sanitizes umlauts to be used directly in index entries for
+The package sanitizes umlauts to be used directly in index entries for
 |makeindex| and friends with |pdflatex|. This means, that inside |\index| an umlaut can
 be used as \myverb{"U} or \myverb{Ü}. In both cases, the letter is written
 as \myverb{"U} into the raw index file for correct processing with |makeindex|
@@ -95,7 +95,7 @@
 
 The package is intended
 \begin{itemize}
-\item for documents in german language using the babel package with a setting
+\item for documents in German language using the babel package with a setting
   identical or similar to \myverb{\usepackage[ngerman]{babel}}.
 \item for documents which are processed by |latex| or |pdflatex| (not |lualatex| or |xelatex|).
 \item for documents with an index which is processed using the
@@ -113,16 +113,52 @@
 processor.
 
 
+\section{Important Compatibility Informations}%
+
+\subsection{Past}
+Until 2018, the default encoding for \LaTeX\ files was 7-bit ASCII.
+For other encodings, packages like |inputenc| had to be loaded.
+Also, |inputenc| used to expand characters like umlauts during |\index| output.
+The package |sanitize-umlaut| version 1.00 replaced this expansion code
+for |\index| output to get \myverb{"U} instead of \myverb{Ü}, etc.
+
+\subsection{Present}
+Since April 2018, the default encoding for \LaTeX\ files has been changed to UTF-8.
+This is done by preloading the UTF-8 settings of the package |inputenc|
+by default \LaTeX, i.e. if you want to use UTF-8 (recommended!), you do not
+longer need to load |inputenc| inside your preamble.
+But, also the implementation of |inputenc| changed for UTF-8 (October 2019?).
+Nowadays, characters like umlauts are not longer expanded during |\index| output,
+but are preserved as is.
+Therefore, |sanitize-umlaut| version 1.00 \textbf{is not compatible} to
+|inputenc| with UTF-8 dating from 2019 or newer.
+
+|sanitize-umlaut| version 1.10 (or newer) patches some UTF-8 code of
+\LaTeX/|inputenc| to return and replace character expansion during |\index| output.
+This patch \textbf{is not compatible} to older versions of \LaTeX/|inputenc| (before October 2019).
+Therefore, if your \LaTeX\ distribution is not reasonable up to date, you
+should stay at version 1.00 of |sanitize-umlaut|.
+
+\subsection{Future}
+As always, the future is dark and difficult to see. Further changes of
+|inputenc| implementation may force further changes of |sanitize-umlaut|.
+Hopefully, this will not happen too soon or too often.
+Also, if some miracle happens, MakeIndex may be updated one day to
+recognize UTF-8 properly to make |sanitize-umlaut| superfluous.
+
+
 \section{Package Usage}%
 
 \subsection{Prerequisites}
-The source document needs some encoding by |inputenc| since |pdflatex|
+The source document may need some encoding by |inputenc| since |pdflatex|
 is assumed as engine. For example:
 
 \begin{dispListing}
-\usepackage[utf8]{inputenc}
+\usepackage[latin1]{inputenc}
 \end{dispListing}
 
+For |utf8| (UTF-8), modern \LaTeX\ does not need this package inclusion any more!
+
 Just some few encodings are supported by |sanitize-umlaut|.
 These are the most important for German language texts:
 
@@ -129,6 +165,7 @@
 \tcbox[center,size=minimal,enhanced,frame hidden,colback=red!10]{\begin{tabular}{>{\ttfamily}l>{\ttfamily}l}\toprule
 \textnormal{\bfseries encoding} & \textnormal{\bfseries recognized as}\\\midrule
 utf8 & utf8\\
+utf8-2018 & utf8-2018\\
 latin1, ansinew, cp1252 & latin1\\
 applemac & applemac\\\bottomrule
 \end{tabular}}
@@ -169,7 +206,7 @@
 
 \subsection{Technical Information}
 
-The package uses \myverb{\inputencodingname} (set by the |inputencoding| package)
+The package uses \myverb{\inputencodingname} (set by \LaTeX\ and the |inputencoding| package)
 to determine the current encoding.
 
 The package redefines the \myverb{\@sanitize} macro at the begin of the
@@ -193,7 +230,7 @@
 % arara: pdflatex
 \documentclass[a4paper,12pt]{article}
 \usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+%\usepackage[utf8]{inputenc}   % utf8 is default now
 \usepackage[ngerman]{babel}
 \usepackage{makeidx}
 \usepackage{sanitize-umlaut}
@@ -218,7 +255,7 @@
 % arara: pdflatex
 \documentclass[a4paper,12pt]{article}
 \usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+%\usepackage[utf8]{inputenc}   % utf8 is default now
 \usepackage[ngerman]{babel}
 \usepackage{makeidx}
 \usepackage{sanitize-umlaut}
@@ -242,7 +279,7 @@
 % arara: pdflatex
 \documentclass[a4paper,12pt]{article}
 \usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+%\usepackage[utf8]{inputenc}   % utf8 is default now
 \usepackage[ngerman]{babel}
 \usepackage[makeindex]{imakeidx}
 \makeindex[options=-s german.ist -g]
@@ -265,7 +302,7 @@
 % arara: pdflatex
 \documentclass[a4paper,12pt]{article}
 \usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+%\usepackage[utf8]{inputenc}   % utf8 is default now
 \usepackage[ngerman]{babel}
 \usepackage[makeindex]{imakeidx}
 \makeindex[options=-s german.ist -g]
@@ -289,7 +326,7 @@
 % arara: pdflatex
 \documentclass[a4paper,12pt]{article}
 \usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+%\usepackage[utf8]{inputenc}   % utf8 is default now
 \usepackage[ngerman]{babel}
 \usepackage[makeindex]{imakeidx}
 \indexsetup{level=\section*,noclearpage}

Modified: trunk/Master/texmf-dist/tex/latex/sanitize-umlaut/sanitize-umlaut.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sanitize-umlaut/sanitize-umlaut.sty	2020-01-01 21:50:58 UTC (rev 53291)
+++ trunk/Master/texmf-dist/tex/latex/sanitize-umlaut/sanitize-umlaut.sty	2020-01-01 21:51:17 UTC (rev 53292)
@@ -1,9 +1,9 @@
-%% The LaTeX package sanitize-umlaut - version 1.00 (2016/05/28)
+%% The LaTeX package sanitize-umlaut - version 1.10 (2020/01/01)
 %% sanitize-umlaut.sty: Sanitize umlauts for makeindex
 %%
-%% --------------------------------------------------------------------------------------
-%% Copyright (c) 2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
-%% --------------------------------------------------------------------------------------
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
@@ -18,25 +18,44 @@
 %% This work consists of all files listed in README
 %%
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{sanitize-umlaut}[2016/05/28 version 1.00 sanitize umlauts]
+\ProvidesPackage{sanitize-umlaut}[2020/01/01 version 1.10 sanitize umlauts]
 
-\def\define at unicode@char#1#2{%
+\def\sanitize at unicode@char#1#2{%
   \@namedef{u8:\detokenize{#1}}{#2}%
 }
 
+\long\def\sanitize at umlaut@UTFviii at two@octets{% patch for 'utf8.def'
+  \ifincsname
+    \expandafter \UTF at two@octets at string
+  \else
+  \fi
+  \UTFviii at two@octets at combine
+}
+
 \begingroup
 \catcode`\"=12
 
 \gdef\sanitize at umlaut@utfviii{%
-  \define at unicode@char{^^c3^^a4}{"a}%
-  \define at unicode@char{^^c3^^b6}{"o}%
-  \define at unicode@char{^^c3^^bc}{"u}%
-  \define at unicode@char{^^c3^^84}{"A}%
-  \define at unicode@char{^^c3^^96}{"O}%
-  \define at unicode@char{^^c3^^9c}{"U}%
-  \define at unicode@char{^^c3^^9f}{"s}%
+  \let\UTFviii at two@octets\sanitize at umlaut@UTFviii at two@octets%
+  \sanitize at unicode@char{^^c3^^a4}{"a}%
+  \sanitize at unicode@char{^^c3^^b6}{"o}%
+  \sanitize at unicode@char{^^c3^^bc}{"u}%
+  \sanitize at unicode@char{^^c3^^84}{"A}%
+  \sanitize at unicode@char{^^c3^^96}{"O}%
+  \sanitize at unicode@char{^^c3^^9c}{"U}%
+  \sanitize at unicode@char{^^c3^^9f}{"s}%
 }
 
+\gdef\sanitize at umlaut@utfviii at old{%
+  \sanitize at unicode@char{^^c3^^a4}{"a}%
+  \sanitize at unicode@char{^^c3^^b6}{"o}%
+  \sanitize at unicode@char{^^c3^^bc}{"u}%
+  \sanitize at unicode@char{^^c3^^84}{"A}%
+  \sanitize at unicode@char{^^c3^^96}{"O}%
+  \sanitize at unicode@char{^^c3^^9c}{"U}%
+  \sanitize at unicode@char{^^c3^^9f}{"s}%
+}
+
 \gdef\sanitize at umlaut@latini{%
   \DeclareInputText{228}{"a}%
   \DeclareInputText{246}{"o}%
@@ -64,6 +83,9 @@
   \def\@tempa{utf8}\ifx\inputencodingname\@tempa
     \let\sanitize at umlaut\sanitize at umlaut@utfviii
     \PackageInfo{sanitize-umlaut}{encoding utf8 selected}
+  \else\def\@tempa{utf8-2018}\ifx\inputencodingname\@tempa
+    \let\sanitize at umlaut\sanitize at umlaut@utfviii at old
+    \PackageInfo{sanitize-umlaut}{encoding utf8-2018 selected}
   \else\def\@tempa{latin1}\ifx\inputencodingname\@tempa
     \let\sanitize at umlaut\sanitize at umlaut@latini
     \PackageInfo{sanitize-umlaut}{encoding latin1 selected}
@@ -79,7 +101,7 @@
   \else
     \def\sanitize at umlaut{}%
     \PackageWarning{sanitize-umlaut}{encoding \inputencodingname\space is not supported}
-  \fi\fi\fi\fi\fi
+  \fi\fi\fi\fi\fi\fi
 \else
   \let\sanitize at umlaut\sanitize at umlaut@utfviii
   \PackageWarning{sanitize-umlaut}{encoding unknown. utf8 is selected as fallback (possibly nonsense)}



More information about the tex-live-commits mailing list