diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-18 22:52:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-18 22:52:45 +0000 |
commit | 16aa5a7c87f18a2483d0d61795899f886781b51c (patch) | |
tree | 1d72f00b2a4185425393598402fe055c61d1de58 /Master/texmf-dist/tex/context/base/mlib-pdf.mkiv | |
parent | e68dc4d5506d46bf72823234f902bc76d1f70352 (diff) |
context, from www.pragma-ade.com/context/beta/cont-tmf.zip (18apr15)
git-svn-id: svn://tug.org/texlive/trunk@36923 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mlib-pdf.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mlib-pdf.mkiv | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv b/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv index 0913b3699ae..92bf86ea9f1 100644 --- a/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv +++ b/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv @@ -88,7 +88,7 @@ % MPLIB specific: -\def\MPLIBtoPDF#1{\ctxlua{metapost.flushliteral(#1)}} +\def\MPLIBtoPDF{\clf_mpflushliteral} \def\startMPLIBtoPDF#1#2#3#4% {\meta_process_graphic_figure_start @@ -109,7 +109,7 @@ \meta_process_graphic_figure_stop} \def\MPLIBflushreset % This can (will) move to the Lua end. - {\ctxlua{metapost.flushreset()}} + {\clf_mpflushreset} %D Kind of special: % @@ -134,27 +134,50 @@ \unexpanded\def\directMPgraphic {\dodoublegroupempty\mlib_direct_graphic} +% \def\mlib_direct_graphic#1#2% makes pages (todo: make boxes) +% {\meta_begin_graphic_group{#1}% +% \let\startMPLIBtoPDF\directstartMPLIBtoPDF +% \let\stopMPLIBtoPDF \directstopMPLIBtoPDF +% \meta_start_current_graphic +% \forgetall +% \edef\p_extensions{\MPinstanceparameter\s!extensions}% +% \normalexpanded{\noexpand\ctxlua{metapost.graphic { +% instance = "\currentMPinstance", +% format = "\currentMPformat", +% data = \!!bs#2;\!!es, +% initializations = \!!bs\meta_flush_current_initializations\!!es, +% % useextensions = "\MPinstanceparameter\s!extensions", +% \ifx\p_extensions\v!yes +% extensions = \!!bs\clf_getmpextensions{\currentMPinstance}\!!es, +% \fi +% inclusions = \!!bs\meta_flush_current_inclusions\!!es, +% definitions = \!!bs\meta_flush_current_definitions\!!es, +% figure = "all", +% method = "\MPinstanceparameter\c!method", +% }}}% +% \meta_stop_current_graphic +% \meta_end_graphic_group} + \def\mlib_direct_graphic#1#2% makes pages (todo: make boxes) {\meta_begin_graphic_group{#1}% \let\startMPLIBtoPDF\directstartMPLIBtoPDF \let\stopMPLIBtoPDF \directstopMPLIBtoPDF \meta_start_current_graphic - \forgetall - \edef\p_extensions{\MPinstanceparameter\s!extensions}% - \normalexpanded{\noexpand\ctxlua{metapost.graphic { - instance = "\currentMPinstance", - format = "\currentMPformat", - data = \!!bs#2;\!!es, - initializations = \!!bs\meta_flush_current_initializations\!!es, -% useextensions = "\MPinstanceparameter\s!extensions", -\ifx\p_extensions\v!yes - extensions = \!!bs\ctxcommand{getmpextensions("\currentMPinstance")}\!!es, -\fi - inclusions = \!!bs\meta_flush_current_inclusions\!!es, - definitions = \!!bs\meta_flush_current_definitions\!!es, - figure = "all", - method = "\MPinstanceparameter\c!method", - }}}% + \forgetall + \edef\p_extensions{\MPinstanceparameter\s!extensions}% + \normalexpanded{\noexpand\clf_mpgraphic + instance {\currentMPinstance}% + format {\currentMPformat}% + data {#2;}% + initializations {\meta_flush_current_initializations}% + \ifx\p_extensions\v!yes + extensions {\clf_getmpextensions{\currentMPinstance}}% + \fi + inclusions {\meta_flush_current_inclusions}% + definitions {\meta_flush_current_definitions}% + figure {all}% + method {\MPinstanceparameter\c!method}% + \relax}% \meta_stop_current_graphic \meta_end_graphic_group} |