summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-24 00:10:23 +0000
committerKarl Berry <karl@freefriends.org>2009-09-24 00:10:23 +0000
commit49446840dadda778fc810d2019c83229810fbe08 (patch)
treea3f92372a718524547b4c28588ae23a0461f5e20 /Master/texmf-dist/tex
parent3f39a4fbdf08fa724e5047b82e3437ddf9b83bf4 (diff)
oberdiek update (23sep09)
git-svn-id: svn://tug.org/texlive/trunk@15438 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty56
1 files changed, 55 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty b/Master/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
index 62e976e64ec..39dca4580a2 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
@@ -25,6 +25,7 @@
%% This work consists of the main source file pdftexcmds.dtx
%% and the derived files
%% pdftexcmds.sty, pdftexcmds.pdf, pdftexcmds.ins, pdftexcmds.drv,
+%% pdftexcmds-test1.tex, pdftexcmds-test2.tex,
%% oberdiek.pdftexcmds.lua, pdftexcmds.lua.
%%
\begingroup
@@ -87,7 +88,7 @@
\fi
\expandafter\x\csname ver@pdftexcmds.sty\endcsname
\ProvidesPackage{pdftexcmds}%
- [2009/09/22 v0.5 LuaTeX support for pdfTeX utility functions (HO)]
+ [2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions (HO)]
\begingroup
\catcode123 1 % {
\catcode125 2 % }
@@ -140,9 +141,11 @@
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input infwarerr.sty\relax
\input ifluatex.sty\relax
+ \input ltxcmds.sty\relax
\else
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{ifluatex}[2009/04/10]%
+ \RequirePackage{ltxcmds}%
\fi
\ifluatex
\else
@@ -211,6 +214,7 @@
\pdftexcmds@directlua{%
if tex.enableprimitives then
tex.enableprimitives('pdf@', {'primitive', 'ifprimitive'})
+ tex.enableprimitives('', {'luaescapestring'})
end
}%
\endgroup %
@@ -293,8 +297,57 @@
}%
\pdftexcmds@temp{shellescape}%
\pdftexcmds@temp{strcmp}%
+\def\pdf@isprimitive{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdf@strcmp\endcsname\relax
+ \long\def\pdf@isprimitive##1{%
+ \expandafter\pdftexcmds@isprimitive\expandafter{\meaning##1}%
+ }%
+ \long\def\pdftexcmds@isprimitive##1##2{%
+ \expandafter\pdftexcmds@@isprimitive\expandafter{\string##2}{##1}%
+ }%
+ \def\pdftexcmds@@isprimitive##1##2{%
+ \ifnum0\pdftexcmds@equal##1\delimiter##2\delimiter=1 %
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+ }%
+ \def\pdftexcmds@equal##1##2\delimiter##3##4\delimiter{%
+ \ifx##1##3%
+ \ifx\relax##2##4\relax
+ 1%
+ \else
+ \ifx\relax##2\relax
+ \else
+ \ifx\relax##4\relax
+ \else
+ \pdftexcmds@equalcont{##2}{##4}%
+ \fi
+ \fi
+ \fi
+ \fi
+ }%
+ \def\pdftexcmds@equalcont##1{%
+ \def\pdftexcmds@equalcont####1####2##1##1##1##1{%
+ ##1##1##1##1%
+ \pdftexcmds@equal####1\delimiter####2\delimiter
+ }%
+ }%
+ \expandafter\pdftexcmds@equalcont\csname fi\endcsname
+ \else
+ \long\def\pdf@isprimitive##1##2{%
+ \ifnum\pdf@strcmp{\meaning##1}{\string##2}=0 %
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+ }%
+ \fi
+}
\ifluatex
\else
+ \pdf@isprimitive
\pdftexcmds@AtEnd
\expandafter\endinput
\fi
@@ -323,6 +376,7 @@
"\luaescapestring{#2}")%
}%
}%
+\pdf@isprimitive
\long\def\pdf@escapehex#1{%
\directlua0{%
oberdiek.pdftexcmds.escapehex("\luaescapestring{#1}", "byte")%