From 70a9a637489e651f4aee19179e792b79d7ab79f6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Jan 2014 23:18:15 +0000 Subject: luamplib (20jan14) git-svn-id: svn://tug.org/texlive/trunk@32739 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/luatex/luamplib/NEWS | 9 +++++++++ Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf | Bin 111854 -> 114244 bytes .../doc/luatex/luamplib/test-luamplib-latex.tex | 22 +++++++++++++++++++-- .../doc/luatex/luamplib/test-luamplib-plain.tex | 21 ++++++++++++++++++-- 4 files changed, 48 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS index 12deaf389a5..fb51e6062cc 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/NEWS +++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS @@ -1,5 +1,14 @@ History of the luamplib package +2014/01/20 2.3 + * \everymplib, \everyendmplib: macros that redefine token lists + \everymplibtoks and \everyendmplibtoks. These will be + automatically inserted at the beginning and ending (respectively) + of each and every mplib code. + * naked TeX codes, includig \mpdim{...}, are allowed inside + mplibcode environment. Refer the manual of gmp package for + details. + 2013/12/30 2.2 * start to support transparency/shading under metafun format. * verbatimtex ... etex just before beginfig() is not ignored. diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf index 7f914758345..0ef953f2d82 100644 Binary files a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf and b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf differ diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex index 9df70dd7869..211667504bb 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex @@ -1,5 +1,7 @@ \documentclass{article} \usepackage{luamplib} +\everymplib{ beginfig(0); } +\everyendmplib{ endfig; } \begin{document} \tracingcommands1 A% @@ -15,11 +17,10 @@ A% %% % / 9 C M W a k u DEL %% & 0 : D N X b l v %% ´ 1 ; E O Y c m w -beginfig(1); fill fullcircle scaled 20; %% actual to make sure it works -endfig; \end{mplibcode}% B\par +\everymplib{}\everyendmplib{}% reset toks A% \begin{mplibcode} verbatimtex \lower.2em etex @@ -74,4 +75,21 @@ circular_shade(bbox p,0,blue,.7white); draw p withcolor white; endfig; \end{mplibcode}% + +\newbox\mympbox +\begin{mplibcode} +verbatimtex \global\setbox\mympbox etex +beginfig(0); +breadth=.667\mpdim\linewidth; +height=2pt; +x1=0; x2=x6=.333x4; x5=x3=.667x4; +x4=breadth; +y1=y4=height/2; y2=y3=height; y5=y6=0; +fill z1--z2--z3--z4--z5--z6--cycle; +endfig; +\end{mplibcode}% +\copy\mympbox +\copy\mympbox +\copy\mympbox +\copy\mympbox \end{document} diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex index 52b300dce95..f2262d91e39 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex @@ -1,4 +1,5 @@ \input luamplib.sty +\everymplib{ beginfig(0); }\everyendmplib{ endfig; } \tracingcommands1 A% \mplibcode @@ -13,11 +14,10 @@ A% %% % / 9 C M W a k u DEL %% & 0 : D N X b l v %% ´ 1 ; E O Y c m w -beginfig(1); fill fullcircle scaled 20; -endfig; \endmplibcode B\par +\everymplib{}\everyendmplib{}% reset toks A% \mplibcode verbatimtex \lower.2em etex @@ -72,4 +72,21 @@ circular_shade(bbox p,0,blue,.7white); draw p withcolor white; endfig; \endmplibcode + +\newbox\mympbox +\mplibcode +verbatimtex \global\setbox\mympbox etex +beginfig(0); +breadth=.667\mpdim\hsize; +height=2pt; +x1=0; x2=x6=.333x4; x5=x3=.667x4; +x4=breadth; +y1=y4=height/2; y2=y3=height; y5=y6=0; +fill z1--z2--z3--z4--z5--z6--cycle; +endfig; +\endmplibcode +\copy\mympbox +\copy\mympbox +\copy\mympbox +\copy\mympbox \bye -- cgit v1.2.3