diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-13 23:35:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-13 23:35:53 +0000 |
commit | 4776da14c604f45e9c7a51a4efb48e9e97ec3dd1 (patch) | |
tree | 14f7b73e7ca63d86636e038beb0e2680f4693b20 /Master/texmf-dist/tex/latex | |
parent | 2bd3a97e68ab7bbf790cb6cfcc49c2d9dae3e51d (diff) |
newunicodechar (13nov12)
git-svn-id: svn://tug.org/texlive/trunk@28253 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty | 27 |
1 files changed, 14 insertions, 13 deletions
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 |