Skip to content

Commit

Permalink
\the\currentgrouplevel for lualatex#63
Browse files Browse the repository at this point in the history
  • Loading branch information
dohyunkim committed Mar 31, 2016
1 parent 076982e commit f5ff48e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions luamplib.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1792,13 +1792,13 @@ luamplib.colorconverter = colorconverter
\long\def\mplibdocode#1\endmplibcode{%
\endgroup
\ifdefined\mplibverbatimYes
\directlua{luamplib.tempdata = luamplib.protecttextextVerbatim([===[\detokenize{#1}]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\directlua{luamplib.tempdata\the\currentgrouplevel=luamplib.protecttextextVerbatim([===[\detokenize{#1}]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata\the\currentgrouplevel)}%
\else
\edef\mplibtemp{\directlua{luamplib.protecttextext([===[\unexpanded{#1}]===])}}%
\directlua{ tex.sprint(luamplib.mpxcolors) }%
\directlua{luamplib.tempdata = luamplib.makeTEXboxes([===[\mplibtemp]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\directlua{luamplib.tempdata\the\currentgrouplevel=luamplib.makeTEXboxes([===[\mplibtemp]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata\the\currentgrouplevel)}%
\fi
\endgroup
\ifnum\mplibstartlineno<\inputlineno\expandafter\mplibreplacenewlinecs\fi
Expand All @@ -1824,13 +1824,13 @@ luamplib.colorconverter = colorconverter
\toks@\expandafter{\the\toks@#1}%
\def\mplibtemp@a{#2}\ifx\mplib@mplibcode\mplibtemp@a
\ifdefined\mplibverbatimYes
\directlua{luamplib.tempdata = luamplib.protecttextextVerbatim([===[\the\toks@]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\directlua{luamplib.tempdata\the\currentgrouplevel=luamplib.protecttextextVerbatim([===[\the\toks@]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata\the\currentgrouplevel)}%
\else
\edef\mplibtemp{\directlua{luamplib.protecttextext([===[\the\toks@]===])}}%
\directlua{ tex.sprint(luamplib.mpxcolors) }%
\directlua{luamplib.tempdata=luamplib.makeTEXboxes([===[\mplibtemp]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\directlua{luamplib.tempdata\the\currentgrouplevel=luamplib.makeTEXboxes([===[\mplibtemp]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata\the\currentgrouplevel)}%
\fi
\end{mplibcode}%
\ifnum\mplibstartlineno<\inputlineno
Expand Down

0 comments on commit f5ff48e

Please sign in to comment.