summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-16 00:07:34 +0000
committerKarl Berry <karl@freefriends.org>2007-09-16 00:07:34 +0000
commitd85f248e3b38ea0ecda38c5340e3cadd08d65346 (patch)
tree52e17f32b395006895b3917bc7729c7ac1514ae3 /Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty
parent2389552f283181e0d8c610037712ade989112da3 (diff)
oberdiek update (14sep07)
git-svn-id: svn://tug.org/texlive/trunk@4947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty70
1 files changed, 36 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty b/Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty
index 985e0f2c24f..337c582dc75 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/pdfescape.sty
@@ -26,32 +26,8 @@
%% and the derived files
%% pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv,
%% pdfescape-test1.tex, pdfescape-test2.tex,
-%% pdfescape-test3.tex.
+%% pdfescape-test3.tex, pdfescape-test4.tex.
%%
-\expandafter\edef\csname PE@AtEnd\endcsname{%
- \catcode64 \the\catcode64\relax
-}
-\catcode64 11 % @
-\def\PE@EnsureCode#1#2#3{%
- \edef\PE@AtEnd{%
- \PE@AtEnd
- #1#2 \the#1#2\relax
- }%
- #1#2 #3\relax
-}
-\PE@EnsureCode\catcode{0}{12}% ^^@
-\PE@EnsureCode\catcode{34}{12}% "
-\PE@EnsureCode\catcode{42}{12}% *
-\PE@EnsureCode\catcode{45}{12}% -
-\PE@EnsureCode\catcode{46}{12}% .
-\PE@EnsureCode\catcode{60}{12}% <
-\PE@EnsureCode\catcode{61}{12}% =
-\PE@EnsureCode\catcode{62}{12}% >
-\PE@EnsureCode\catcode{94}{7}% ^
-\PE@EnsureCode\catcode{96}{12}% `
-\PE@EnsureCode\uccode{34}{0}% "
-\PE@EnsureCode\uccode{48}{0}% 0
-\PE@EnsureCode\uccode{61}{0}% =
\begingroup
\catcode44 12 % ,
\catcode45 12 % -
@@ -104,10 +80,35 @@
\fi
\expandafter\x\csname ver@pdfescape.sty\endcsname
\ProvidesPackage{pdfescape}%
- [2007/04/21 v1.4 Provides hex, PDF name and string conversions (HO)]
+ [2007/09/09 v1.6 Provides hex, PDF name and string conversions (HO)]
+\expandafter\edef\csname PE@AtEnd\endcsname{%
+ \catcode64 \the\catcode64\relax
+}
+\catcode64 11 % @
+\def\TMP@EnsureCode#1#2#3{%
+ \edef\PE@AtEnd{%
+ \PE@AtEnd
+ #1#2 \the#1#2\relax
+ }%
+ #1#2 #3\relax
+}
+\TMP@EnsureCode\catcode{0}{12}% ^^@
+\TMP@EnsureCode\catcode{34}{12}% "
+\TMP@EnsureCode\catcode{39}{12}% '
+\TMP@EnsureCode\catcode{42}{12}% *
+\TMP@EnsureCode\catcode{45}{12}% -
+\TMP@EnsureCode\catcode{46}{12}% .
+\TMP@EnsureCode\catcode{60}{12}% <
+\TMP@EnsureCode\catcode{61}{12}% =
+\TMP@EnsureCode\catcode{62}{12}% >
+\TMP@EnsureCode\catcode{94}{7}% ^
+\TMP@EnsureCode\catcode{96}{12}% `
+\TMP@EnsureCode\uccode{34}{0}% "
+\TMP@EnsureCode\uccode{48}{0}% 0
+\TMP@EnsureCode\uccode{61}{0}% =
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname detokenize\endcsname\relax
- \long\def\PE@sanitize#1#2{%
+ \long\def\EdefSanitize#1#2{%
\begingroup
\csname @safe@activestrue\endcsname
\edef#1{#2}%
@@ -125,7 +126,7 @@
\let\PE@onelevel@sanitize\@onelevel@sanitize
\fi
\else
- \long\def\PE@sanitize#1#2{%
+ \long\def\EdefSanitize#1#2{%
\begingroup
\csname @safe@activestrue\endcsname
\edef#1{#2}%
@@ -137,6 +138,7 @@
\edef#1{\detokenize\expandafter{#1}}%
}%
\fi
+\let\PE@sanitize\EdefSanitize
\begingroup
\catcode`\ =12\relax%
\def\x{\endgroup\def\PE@space@other{ }}\x\relax
@@ -156,7 +158,7 @@
}
\long\def\@ReturnAfterFi#1\fi{\fi#1}
\def\EdefUnescapeName#1#2{%
- \PE@sanitize#1{#2}%
+ \EdefSanitize#1{#2}%
\PE@SanitizeSpaceOther#1%
\PE@UnescapeName#1%
\PE@onelevel@sanitize#1%
@@ -256,7 +258,7 @@
\fi
}
\def\EdefUnescapeString#1#2{%
- \PE@sanitize#1{#2}%
+ \EdefSanitize#1{#2}%
\PE@SanitizeSpaceOther#1%
\PE@NormalizeLineEnd#1%
\PE@UnescapeString#1%
@@ -390,21 +392,21 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfescapehex\endcsname\relax
\long\def\EdefEscapeHex#1#2{%
- \PE@sanitize#1{#2}%
+ \EdefSanitize#1{#2}%
\PE@SanitizeSpaceOther#1%
\PE@EscapeHex#1%
}%
\def\EdefUnescapeHex#1#2{%
- \PE@sanitize#1{#2}%
+ \EdefSanitize#1{#2}%
\PE@UnescapeHex#1%
}%
\long\def\EdefEscapeName#1#2{%
- \PE@sanitize#1{#2}%
+ \EdefSanitize#1{#2}%
\PE@SanitizeSpaceOther#1%
\PE@EscapeName#1%
}%
\long\def\EdefEscapeString#1#2{%
- \PE@sanitize#1{#2}%
+ \EdefSanitize#1{#2}%
\PE@SanitizeSpaceOther#1%
\PE@EscapeString#1%
}%