summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex/luamplib
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/luatex/luamplib')
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/NEWS66
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/luamplib.pdfbin213718 -> 274674 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex108
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex68
4 files changed, 207 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS
index 81f07ac38fa..f53e2b36029 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/NEWS
+++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS
@@ -1,5 +1,71 @@
History of the luamplib package
+2024/11/12 2.35.0
+ * even under \mplibtextextlabel{true}, the original 'infont' operator will
+ be used when the character slot of the text argument is less than 32, or is
+ equal to 35, 36, 37, 38, 92, 94, 95, 123, 125, 126 or 127.
+
+ * \mplibforcehmode will have effects on \usemplibgroup as well as ordinary
+ metapost figures.
+
+ * support tagged PDF when tagpdf package is activated. The related code is
+ currently in experimental stage. See the documentation for details.
+
+2024/08/03 2.34.5
+ * provide 'withgroupbbox' macro for transparency group to enable users to
+ control the bounding box
+
+ * write down the width/height/depth values of mplibgroup to the log file
+
+2024/07/31 2.34.4
+ * 'withpattern' operator accepts a <textual picture> as well as a <path>
+ for its operand. Thus users can give pattern effect to the result of btex
+ command or infont operator.
+
+ * fix regarding line width in mplibgraphictext
+
+2024/07/27 2.34.3
+ * in DVI mode, use LaTeX's shipout hooks to generate new XObjects
+ or to put resources to pageresources. (in plain, load atbegshi.sty)
+
+ * fix shading to allow the even-odd rule
+
+2024/07/24 2.34.2
+ * With the newly introduced macros, \mplibgroup ... \endmplibgroup, users
+ can define a transparency group or a normal form XObject from TeX side.
+ The LaTeX environment 'mplibgroup' is identical to this pair of macros.
+ See the document for details.
+
+ * document: be more precise about the color effect of a transparency group
+
+ * remove trailing zeros from numeric objects to get smaller PDF
+
+2024/07/19 2.34.1
+ * transparency group is available with plain format as well.
+ * transparency group once used is reusable in the TeX code or
+ in other MetaPost code chunks. see the document for details.
+
+2024/07/17 2.34.0
+ * support transparency group with metafun format
+ * fix regarding default value in circular fading mode
+ * fix regarging the scope of graphics state
+
+2024/07/14 2.33.1
+ * refactor the manual, including some minor items undocumented so far
+ * improve fading routine to get possibly smaller pdf file
+
+2024/07/08 2.33.0
+ * provide a new metapost operator 'withfademethod' and related macros,
+ which make the color of an object gradiently transparent. see luamplib
+ document for details.
+
+ * fix spot-color shading routine to support user-defined colorspace
+
+2024/07/03 2.32.4
+ * make the variable 'patterns' local
+ * 'math.randomseed' on plain TeX
+ * remove redundant code 'fullcircle scaled 0'
+
2024/06/21 2.32.3
* 'coloured' is a synonym of the option 'colored' in pattern definition.
diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
index e51324ffe40..a6f7e5c362a 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
+++ b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
Binary files 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 c2d8cb498bf..8435ee070ca 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex
@@ -7,7 +7,7 @@
\usepackage{fontspec}
\setmainfont{latin modern roman}
\usepackage{luamplib}
-\usepackage{xcolor}
+\usepackage{graphicx,xcolor}
\everymplib{ beginfig(0); }
\everyendmplib{ endfig; }
\mpliblegacybehavior{true}%
@@ -246,19 +246,19 @@ draw mpliboutlinetext.b ("$\displaystyle\frac{1}{1-x^2}$")
\endmpfig
\par\leavevmode
\mppattern{mypatt}
- \mpfig
- picture q;
- q := btex Q etex;
- fill bbox q withcolor .8[red,white];
- draw q withcolor .8red;
- \endmpfig
+[
+ xstep = 5, ystep = 6,
+ matrix = "rotated 90 scaled .75",
+]
+\mpfig
+draw (origin--right+up) scaled 5 withcolor 1/3[blue,white] ;
+draw (up--right) scaled 5 withcolor 1/3[red,white] ;
+\endmpfig
\endmppattern
\mpfig
- fill fullcircle scaled 100 withpostscript "collect";
- draw unitsquare shifted - center unitsquare scaled 45
- withpattern "mypatt"
- withpostscript "evenodd"
- ;
+draw unitsquare shifted -center unitsquare scaled 45 withpostscript "collect" ;
+draw fullcircle scaled 100 withpattern "mypatt" withpen pencircle scaled 1
+ withcolor \mpcolor{red!50!blue!50} withpostscript "evenodd" ;
\endmpfig
\begin{mppattern}{pattuncolored}
[
@@ -268,19 +268,81 @@ draw mpliboutlinetext.b ("$\displaystyle\frac{1}{1-x^2}$")
\tiny\TeX
\end{mppattern}\relax
\mpfig
- picture tex; tex := mpliboutlinetext.p ("\bfseries \TeX");
- i:=0;
- for item within tex:
- i:=i+1;
- if i < length tex:
- fill pathpart item scaled 10 withpostscript "collect";
- else:
- draw pathpart item scaled 10 withpattern "pattuncolored"
- withpen pencircle scaled 1/2
- withcolor 0.7 blue;
- fi
+ picture tex;
+ tex = mpliboutlinetext.p ("\bfseries \TeX");
+ for i=1 upto mpliboutlinenum:
+ draw image(
+ j:=0;
+ for item within mpliboutlinepic[i]:
+ j:=j+1;
+ draw pathpart item scaled 10
+ if j < length mpliboutlinepic[i]:
+ withpostscript "collect"
+ else:
+ withpattern "pattuncolored"
+ withpen pencircle scaled 1/2
+ withcolor (i/4)[red,blue]
+ fi;
+ endfor
+ )
+ withfademethod "linear"
+ ;
endfor
\endmpfig
+\par\leavevmode
+\mpfig
+ picture mill; mill = btex \includegraphics[width=100bp]{mill} etex;
+ draw mill;
+ mill := mill shifted 125right;
+ draw mill
+ withfademethod "circular"
+ withfadecenter (center mill, center mill)
+ withfaderadius (30, abs(lrcorner mill - llcorner mill)/2)
+ withfadeopacity (1, 0)
+ ;
+\endmpfig
+\par
+\def\test#1{%
+ \mpfig
+ fill unitsquare shifted -center unitsquare scaled 200
+ withshademethod "linear"
+ withshadecolors (.3[red,white], .3[blue,white])
+ ;
+ label( btex MetaPost etex scaled 3, origin) ;
+ draw image(
+ fill fullcircle scaled 100 shifted 25left
+ withcolor .8white
+ withtransparency (2,1)
+ ;
+ fill fullcircle scaled 100 shifted 25right
+ withcolor .8white
+ withtransparency (2,1)
+ ;
+ )
+ asgroup "#1"
+ withgroupname "test:#1"
+ withtransparency (1,.5)
+ ;
+ currentpicture := currentpicture scaled 2/3;
+ \endmpfig
+}%
+\hbox{\test{isolated,knockout}\,\test{isolated}\vbox to\MPheight{\vss\hbox{~isolated}\vss}}%
+\hbox{\test{knockout}\,\test{}}%
+\hbox to\MPwidth{\hss knockout\hss}%
+\leavevmode
+\mpfig usemplibgroup "test:isolated,knockout" scaled 2/3 rotated 15 ; \endmpfig
+\usemplibgroup{test:isolated,knockout}%
+\begin{mplibgroup}{mytex}[matrix="rotated 15"] \TeX \end{mplibgroup}%
+\hbox to0pt{\hss\vrule width.5pt height5pt depth5pt\hss}%
+\hbox to0pt{\hss\vrule width10pt height.25pt depth.25pt\hss}%
+\usemplibgroup{mytex}%
+\mpfig usemplibgroup "mytex"; draw (left--right) scaled 5; draw (up--down) scaled 5; \endmpfig
+\par
+\mpfig
+ picture test; test = mplibgraphictext "\textbf{MPLIB}"
+ fakebold 1 fillcolor "red!70" drawcolor .7red scaled 7;
+ draw test withpattern "mypatt" ;
+\endmpfig
\tracingcommands0
\vskip 2\baselineskip
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 c178acb31a7..05c2f8138d5 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,4 @@
-\input luaotfload.sty
+%\input luaotfload.sty
\input miniltx
\input color
\definecolor{orange}{cmyk}{0,.5,1,0}
@@ -261,18 +261,62 @@ draw mpliboutlinetext.b ("$\overbrace{x+\cdots+x}^k$")
\fiverm\TeX
\endmppattern
\mpfig
- picture tex; tex := mpliboutlinetext.p ("\bf \TeX");
- i:=0;
- for item within tex:
- i:=i+1;
- if i < length tex:
- fill pathpart item scaled 10 withpostscript "collect";
- else:
- draw pathpart item scaled 10 withpattern "pattuncolored"
- withpen pencircle scaled 1/2
- withcolor 0.7 blue;
- fi
+ picture tex;
+ tex = mpliboutlinetext.p ("\bf \TeX");
+ draw image(
+ for i=1 upto mpliboutlinenum:
+ j:=0;
+ for item within mpliboutlinepic[i]:
+ j:=j+1;
+ draw pathpart item scaled 10
+ if j < length mpliboutlinepic[i]:
+ withpostscript "collect"
+ else:
+ withpattern "pattuncolored"
+ withpen pencircle scaled 1/2
+ withcolor (i/4)[red,blue]
+ fi;
+ endfor
endfor
+ )
+ withfademethod "linear"
+ ;
+\endmpfig
+\par\leavevmode
+\mpfig
+fill fullcircle scaled 125 withcolor 2/3[blue,white];
+fill fullcircle scaled 80 withcolor 2/3[red,white];
+draw image(
+ draw (left--right) rotated 45 scaled 50
+ withpen pencircle scaled 20
+ ;
+ draw (left--right) rotated -45 scaled 50
+ withpen pencircle scaled 20
+ ;
+ )
+ asgroup ""
+ withgroupname "testTRgroup"
+ withprescript "tr_transparency=.3"
+ ;
+\endmpfig
+\mpfig
+fill fullcircle scaled 125 withcolor 2/3[red,white];
+fill fullcircle scaled 80 withcolor 2/3[blue,white];
+usemplibgroup "testTRgroup"
+ withfademethod "circular"
+ withfaderadius (0,60)
+ ;
+\endmpfig
+\mplibgroup{mytex}[matrix="rotated 15"] \TeX \endmplibgroup
+\hbox to0pt{\hss\vrule width.5pt height5pt depth5pt\hss}%
+\hbox to0pt{\hss\vrule width10pt height.25pt depth.25pt\hss}%
+\usemplibgroup{mytex}%
+\mpfig usemplibgroup "mytex"; draw (left--right) scaled 5; draw (up--down) scaled 5; \endmpfig
+\par
+\mpfig
+ picture test; test = mplibgraphictext "\bf MPLIB"
+ fakebold 1 fillcolor .7[white,blue] drawcolor .7blue scaled 7;
+ draw test withpattern "pattuncolored" ;
\endmpfig
\tracingcommands0