From af7bc18edca6890fb1addbeb6a34672275532e3b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 2 Jan 2020 03:02:24 +0000 Subject: CTAN sync 202001020302 --- macros/latex/contrib/sanitize-umlaut/CHANGES | 27 ++++++++ macros/latex/contrib/sanitize-umlaut/README | 10 +-- .../sanitize-umlaut/sanitize-umlaut.doc.sty | 2 +- .../contrib/sanitize-umlaut/sanitize-umlaut.pdf | Bin 414201 -> 419322 bytes .../contrib/sanitize-umlaut/sanitize-umlaut.sty | 50 ++++++++++----- .../contrib/sanitize-umlaut/sanitize-umlaut.tex | 69 ++++++++++++++++----- 6 files changed, 122 insertions(+), 36 deletions(-) create mode 100644 macros/latex/contrib/sanitize-umlaut/CHANGES (limited to 'macros/latex/contrib/sanitize-umlaut') diff --git a/macros/latex/contrib/sanitize-umlaut/CHANGES b/macros/latex/contrib/sanitize-umlaut/CHANGES new file mode 100644 index 0000000000..2c22512ce1 --- /dev/null +++ b/macros/latex/contrib/sanitize-umlaut/CHANGES @@ -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 +%% ------------------------------------------------------------------------------------------- +%% +%% 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 diff --git a/macros/latex/contrib/sanitize-umlaut/README b/macros/latex/contrib/sanitize-umlaut/README index 3ec7151a8c..2285acf34d 100644 --- a/macros/latex/contrib/sanitize-umlaut/README +++ b/macros/latex/contrib/sanitize-umlaut/README @@ -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 -%% -------------------------------------------------------------------------------------- +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm +%% ------------------------------------------------------------------------------------------- %% %% 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. diff --git a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.doc.sty b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.doc.sty index 6d99b4ddc0..dceeea044a 100644 --- a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.doc.sty +++ b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.doc.sty @@ -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, diff --git a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.pdf b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.pdf index 732f109560..0d9216b6d9 100644 Binary files a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.pdf and b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.pdf differ diff --git a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.sty b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.sty index d48a86874a..86918c3baa 100644 --- a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.sty +++ b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.sty @@ -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 -%% -------------------------------------------------------------------------------------- +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm +%% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -18,23 +18,42 @@ %% 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@unicode@char#1#2{% +\def\sanitize@unicode@char#1#2{% \@namedef{u8:\detokenize{#1}}{#2}% } +\long\def\sanitize@umlaut@UTFviii@two@octets{% patch for 'utf8.def' + \ifincsname + \expandafter \UTF@two@octets@string + \else + \fi + \UTFviii@two@octets@combine +} + \begingroup \catcode`\"=12 \gdef\sanitize@umlaut@utfviii{% - \define@unicode@char{^^c3^^a4}{"a}% - \define@unicode@char{^^c3^^b6}{"o}% - \define@unicode@char{^^c3^^bc}{"u}% - \define@unicode@char{^^c3^^84}{"A}% - \define@unicode@char{^^c3^^96}{"O}% - \define@unicode@char{^^c3^^9c}{"U}% - \define@unicode@char{^^c3^^9f}{"s}% + \let\UTFviii@two@octets\sanitize@umlaut@UTFviii@two@octets% + \sanitize@unicode@char{^^c3^^a4}{"a}% + \sanitize@unicode@char{^^c3^^b6}{"o}% + \sanitize@unicode@char{^^c3^^bc}{"u}% + \sanitize@unicode@char{^^c3^^84}{"A}% + \sanitize@unicode@char{^^c3^^96}{"O}% + \sanitize@unicode@char{^^c3^^9c}{"U}% + \sanitize@unicode@char{^^c3^^9f}{"s}% +} + +\gdef\sanitize@umlaut@utfviii@old{% + \sanitize@unicode@char{^^c3^^a4}{"a}% + \sanitize@unicode@char{^^c3^^b6}{"o}% + \sanitize@unicode@char{^^c3^^bc}{"u}% + \sanitize@unicode@char{^^c3^^84}{"A}% + \sanitize@unicode@char{^^c3^^96}{"O}% + \sanitize@unicode@char{^^c3^^9c}{"U}% + \sanitize@unicode@char{^^c3^^9f}{"s}% } \gdef\sanitize@umlaut@latini{% @@ -64,6 +83,9 @@ \def\@tempa{utf8}\ifx\inputencodingname\@tempa \let\sanitize@umlaut\sanitize@umlaut@utfviii \PackageInfo{sanitize-umlaut}{encoding utf8 selected} + \else\def\@tempa{utf8-2018}\ifx\inputencodingname\@tempa + \let\sanitize@umlaut\sanitize@umlaut@utfviii@old + \PackageInfo{sanitize-umlaut}{encoding utf8-2018 selected} \else\def\@tempa{latin1}\ifx\inputencodingname\@tempa \let\sanitize@umlaut\sanitize@umlaut@latini \PackageInfo{sanitize-umlaut}{encoding latin1 selected} @@ -79,7 +101,7 @@ \else \def\sanitize@umlaut{}% \PackageWarning{sanitize-umlaut}{encoding \inputencodingname\space is not supported} - \fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi \else \let\sanitize@umlaut\sanitize@umlaut@utfviii \PackageWarning{sanitize-umlaut}{encoding unknown. utf8 is selected as fallback (possibly nonsense)} diff --git a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.tex b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.tex index 653bb72f00..cdeac7add0 100644 --- a/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.tex +++ b/macros/latex/contrib/sanitize-umlaut/sanitize-umlaut.tex @@ -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 -%% -------------------------------------------------------------------------------------- +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2016-2020 by Prof. Dr. Dr. Thomas F. Sturm +%% ------------------------------------------------------------------------------------------- %% %% 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 @@ and |pdflatex|. 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,22 +113,59 @@ Another alternative is to replace MakeIndex by Xindy or another index 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: \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 @@ which are written to the \myverb{.idx} file. \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 @@ outside \myverb{\index}, strange things may happen. % 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 @@ Test äöüÄÖÜß. % 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 @@ Test äöüÄÖÜß. % 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 @@ Test äöüÄÖÜß. % 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 @@ Test äöüÄÖÜß. % 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} -- cgit v1.2.3