diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-08 20:06:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-08 20:06:28 +0000 |
commit | 65a6cc78ea8d1397df8fd68fb8379d54ce8d63b9 (patch) | |
tree | 99e6a6928f7c03906d0f93fb8ea6dd2c7dd86a90 /Master/texmf-dist/source/latex | |
parent | c6208e4a8a2515a9151a24fc5327db290e85321c (diff) |
newunicodechar (8apr18)
git-svn-id: svn://tug.org/texlive/trunk@47382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/newunicodechar/newunicodechar.dtx | 40 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/newunicodechar/newunicodechar.ins | 12 |
2 files changed, 29 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.dtx b/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.dtx index 75e06376619..3875a206af0 100644 --- a/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.dtx +++ b/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.dtx @@ -1,9 +1,9 @@ % \iffalse meta-comment % -% Copyright (C) 2011-2012 by Enrico Gregorio +% Copyright (C) 2011-2018 by Enrico Gregorio % <Enrico dot Gregorio at univr dot it> % ------------------------------------------------------- -% +% % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3c of this license or (at your option) any @@ -13,11 +13,11 @@ % of LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. -% +% % The Current Maintainer of this work is Enrico Gregorio. % % This work consists of the files -% newunicodechar.dtx +% newunicodechar.dtx % newunicodechar.ins % and the derived file newunicodechar.sty. % @@ -27,10 +27,10 @@ %<*driver> \ProvidesFile{newunicodechar.dtx} %</driver> -%<package>\NeedsTeXFormat{LaTeX2e}[2008/04/05] +%<package>\NeedsTeXFormat{LaTeX2e}[2018/04/01] %<package>\ProvidesPackage{newunicodechar} %<*package> - [2012/11/12 v1.1 Defining Unicode characters] + [2018/04/08 v1.2 Defining Unicode characters] %</package> % %<*driver> @@ -48,7 +48,7 @@ %</driver> % \fi % -% \CheckSum{200} +% \CheckSum{201} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -66,7 +66,7 @@ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% +% \changes{v1.2}{2018/04/08}{Now utf8 is default} % \changes{v1.1}{2012/11/12}{Added support for \mbox{\textsf{inputenx}}} % \changes{v1.0}{2011/02/15}{Initial version} % @@ -124,7 +124,7 @@ % for \texttt{\u{o}}, \texttt{\={o}}, and \texttt{\u{u}}. As a matter % of fact, only \texttt{\u{a}} and \texttt{\u{A}} are defined, as they % are used in the Romanian language. -% +% % One might resort to |\DeclareUnicodeCharacter| in the document's % preamble, but this requires looking up at the (long) list of Unicode % characters and jotting down the relevant numbers. For example, @@ -147,6 +147,11 @@ % |\usepackage{wasysym}|\\ % |\newunicodechar{|\eighthnote|}{\eighthnote}| % \end{flushleft} +% Important note: the package will not work if the \textsf{inputenc} package +% is called with an option different from \texttt{utf8}. As of April 2018, +% this encoding is assumed by default in 8~bit \TeX{} engines when running +% \LaTeX. However one can still load \textsf{inputenc} or \textsf{inputenx} +% with the \texttt{utf8} option (not \texttt{utf8x}). % % A similar problem may arise even with \XeLaTeX{}. A frequently asked % question on mailing lists or discussion groups is how to print some @@ -369,17 +374,18 @@ % right option, otherwise we define |\newunicodechar| to swallow its % arguments, after a warning. We need to first check for % \textsf{inputenx} because it loads \textsf{inputenc}. +% \changes{v1.2}{2018/04/08}{Now utf8 is default} % \changes{v1.1}{2012/11/12}{Added support for \mbox{\textsf{inputenx}}} % \begin{macrocode} \def\nuc@stop{\PackageWarningNoLine{newunicodechar} - {This package won't work without loading\MessageBreak - `inputenc' or `inputenx' with the `utf8' option}% + {This package only works if the document\MessageBreak + encoding is `utf8'}% \let\newunicodechar\@gobbletwo\endinput} -\@ifpackageloaded{inputenx} - {\def\nuc@tempa{inputenx}} - {\@ifpackageloaded{inputenc}{\def\nuc@tempa{inputenc}}{\nuc@stop}} -\@ifpackagewith{\nuc@tempa}{utf8}{}{\nuc@stop} -\@ifpackagewith{\nuc@tempa}{utf8x}{\nuc@stop}{} +\edef\@tempa{\detokenize{utf8}} +\edef\@tempb{\detokenize\expandafter{\inputencodingname}} +\ifx\@tempb\@tempa\else + \nuc@stop +\fi % \end{macrocode} % \begin{macro}{\newunicodechar} % The main macro. We set the temporary switch to false and put in @@ -405,7 +411,7 @@ \if@tempswa \@ifundefined{u8:\nuc@tempa}{} {\PackageWarning{newunicodechar} - {Redefining Unicode character\ifdefined\nuc@verbose; + {Redefining Unicode character\ifdefined\nuc@verbose; it meant\MessageBreak ***\space\space\nuc@meaning\space\space***\MessageBreak before your redefinition\fi}}% diff --git a/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.ins b/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.ins index 6352c94d153..94c70ef0a44 100644 --- a/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.ins +++ b/Master/texmf-dist/source/latex/newunicodechar/newunicodechar.ins @@ -1,7 +1,7 @@ -% Copyright (C) 2011-2012 by Enrico Gregorio +% Copyright (C) 2011-2018 by Enrico Gregorio % <Enrico dot Gregorio at univr dot it> % ------------------------------------------------------- -% +% % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3c of this license or (at your option) any @@ -11,11 +11,11 @@ % of LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. -% +% % The Current Maintainer of this work is Enrico Gregorio. % % This work consists of the files -% newunicodechar.dtx +% newunicodechar.dtx % newunicodechar.ins % and the derived file newunicodechar.sty. @@ -28,7 +28,7 @@ This is a generated file. -Copyright (C) 2011-2012 by Enrico Gregorio +Copyright (C) 2011-2018 by Enrico Gregorio <Enrico dot Gregorio at univr dot it> ------------------------------------------------------- @@ -45,7 +45,7 @@ This work has the LPPL maintenance status `maintained'. The Current Maintainer of this work is Enrico Gregorio. This work consists of the files - newunicodechar.dtx + newunicodechar.dtx newunicodechar.ins and the derived file newunicodechar.sty. |