summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luamplib/luamplib.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.sty31
1 files changed, 20 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
index be09b7aa3a1..3cfeb24912b 100644
--- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
+++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
@@ -10,16 +10,25 @@
%%
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname selectfont\endcsname\relax
- \input luatexbase-modutils.sty
+ \input ltluatex
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2015/10/02 v2.11.1 mplib package for LuaTeX]
- \RequirePackage{luatexbase-modutils}
+ [2016/01/02 v2.11.2 mplib package for LuaTeX]
+ \ifx\newluafunction\@undefined
+ \input ltluatex
+ \fi
+\fi
+\directlua{require("luamplib")}
+\ifx\scantextokens\undefined
+ \let\scantextokens\luatexscantextokens
+\fi
+\ifx\pdfoutput\undefined
+ \let\pdfoutput\outputmode
+ \protected\def\pdfliteral{\pdfextension literal}
\fi
-\RequireLuaModule{luamplib}
-\def\mplibsetformat#1{%
- \directlua{luamplib.setformat("\luatexluaescapestring{#1}")}}
+
+\def\mplibsetformat#1{\directlua{luamplib.setformat("#1")}}
\ifnum\pdfoutput>0
\let\mplibtoPDF\pdfliteral
\else
@@ -27,9 +36,9 @@
\ifcsname PackageWarning\endcsname
\PackageWarning{luamplib}{take dvipdfmx path, no support for other dvi tools currently.}
\else
- \write16{}
- \write16{luamplib Warning: take dvipdfmx path, no support for other dvi tools currently.}
- \write16{}
+ \write128{}
+ \write128{luamplib Warning: take dvipdfmx path, no support for other dvi tools currently.}
+ \write128{}
\fi
\fi
\def\mplibsetupcatcodes{%
@@ -44,13 +53,13 @@
\def\mplibreplacenewlinebr{%
\begingroup \mplibpostmpcatcodes \mplibdoreplacenewlinebr}
\begingroup\lccode`\~=`\^^M \lowercase{\endgroup
- \def\mplibdoreplacenewlinebr#1^^J{\endgroup\luatexscantextokens{{}#1~}}}
+ \def\mplibdoreplacenewlinebr#1^^J{\endgroup\scantextokens{{}#1~}}}
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname selectfont\endcsname\relax
\def\mplibreplacenewlinecs{%
\begingroup \mplibpostmpcatcodes \mplibdoreplacenewlinecs}
\begingroup\lccode`\~=`\^^M \lowercase{\endgroup
- \def\mplibdoreplacenewlinecs#1^^J{\endgroup\luatexscantextokens{\relax#1~}}}
+ \def\mplibdoreplacenewlinecs#1^^J{\endgroup\scantextokens{\relax#1~}}}
\def\mplibcode{%
\mplibstartlineno\inputlineno
\begingroup