From 4776da14c604f45e9c7a51a4efb48e9e97ec3dd1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 13 Nov 2012 23:35:53 +0000 Subject: newunicodechar (13nov12) git-svn-id: svn://tug.org/texlive/trunk@28253 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/newunicodechar/newunicodechar.sty | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Master/texmf-dist/tex/latex/newunicodechar') diff --git a/Master/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty b/Master/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty index c5bd3520055..6a9e4f7cf32 100644 --- a/Master/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty +++ b/Master/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2008/04/05] \ProvidesPackage{newunicodechar} - [2011/02/18 v1.0 Defining Unicode characters] + [2012/11/12 v1.1 Defining Unicode characters] \@ifundefined{eTeXversion} {\PackageError{newunicodechar}{LaTeX engine too old, aborting} {Please upgrade your TeX system}\@@end}{} @@ -78,28 +78,29 @@ \fi % End of code for Unicode engines \def\nuc@stop{\PackageWarningNoLine{newunicodechar} {This package won't work without loading\MessageBreak - `inputenc' with the `utf8' option}% + `inputenc' or `inputenx' with the `utf8' option}% \let\newunicodechar\@gobbletwo\endinput} - -\@ifpackageloaded{inputenc}{}{\nuc@stop} -\@ifpackagewith{inputenc}{utf8}{}{\nuc@stop} -\@ifpackagewith{inputenc}{utf8x}{\nuc@stop}{} +\@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}{} \def\newunicodechar#1#2{% \@tempswafalse - \edef\@tempa{\detokenize{#1}}% - \if\relax\@tempa\relax + \edef\nuc@tempa{\detokenize{#1}}% + \if\relax\nuc@tempa\relax \nuc@emptyargerr \else - \edef\@tempb{\expandafter\@car\@tempa\@nil}% + \edef\@tempb{\expandafter\@car\nuc@tempa\@nil}% \nuc@check \if@tempswa - \@ifundefined{u8:\@tempa}{} + \@ifundefined{u8:\nuc@tempa}{} {\PackageWarning{newunicodechar} {Redefining Unicode character\ifdefined\nuc@verbose; it meant\MessageBreak ***\space\space\nuc@meaning\space\space***\MessageBreak before your redefinition\fi}}% - \@namedef{u8:\@tempa}{#2}% + \@namedef{u8:\nuc@tempa}{#2}% \fi \fi } @@ -111,10 +112,10 @@ \fi} \ifdefined\nuc@verbose \def\nuc@meaning{\expandafter\expandafter\expandafter - \strip@prefix\expandafter\meaning\csname u8:\@tempa\endcsname} + \strip@prefix\expandafter\meaning\csname u8:\nuc@tempa\endcsname} \fi \def\nuc@check{% - \ifcase\numexpr0\expandafter\nuc@getlength\@tempa\@nil + \ifcase\numexpr0\expandafter\nuc@getlength\nuc@tempa\@nil \or %0 \nuc@onebyteerr\or %1 \nuc@ch@ck{192}\or %2 -- cgit v1.2.3