summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-12-08 21:06:26 +0000
committerKarl Berry <karl@freefriends.org>2024-12-08 21:06:26 +0000
commitc42b9b58ff81b87924c6a7a7dbca1f32d8a66ea8 (patch)
tree8c4c3c1c1ba4885800328f9661c88bc1a636dc7d /Master/texmf-dist/doc/luatex
parentb008538697463e0aa600a60808691033e0523abc (diff)
luamplib (8dec24)
git-svn-id: svn://tug.org/texlive/trunk@73073 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/NEWS13
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/luamplib.pdfbin279669 -> 290015 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex46
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex42
4 files changed, 66 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS
index e1de5eae99d..5f3b4a8a4cc 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/NEWS
+++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS
@@ -1,5 +1,18 @@
History of the luamplib package
+2024/12/08 2.36.0
+ * <path>|<textual picture> withshadingmethod <string>,
+ where <string> shall be "linear" or "circular", gives shading effect to
+ the <path> or <textual picture> with plain format as well as metafun.
+ See the documentation.
+
+ * withtransparency (<number>|<string>, <number>)
+ gives transparency effect with plain format as well. See the documentation.
+
+ * added 'dir TLT' to usemplibgroup boxes
+
+ * removed 'tag=artifact' option. Use 'artifact' instead.
+
2024/11/28 2.35.2
* fix height/depth of boxes made by \mplibgroup command
* enhanced tagging of \usemplibgroup
diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
index a2aa4a70e33..fded98abd7e 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 8435ee070ca..71a87ae02e9 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex
@@ -185,25 +185,26 @@ draw p scaled 3 shifted (40,0);
endfig;
\end{mplibcode}%
\par
-\mplibsetformat{metafun}%
+%\mplibsetformat{metafun}%
\begin{mplibcode}
beginfig(1)
-fill unitsquare xyscaled (\mpdim\textwidth,1cm)
- withshademethod "linear"
- withshadevector (0,1)
- withshadestep (
- withshadefraction .5
- withshadecolors (red,"blue!50")
+fill unitsquare xscaled \mpdim\textwidth yscaled 1cm
+ withshadingmethod "linear"
+ withshadingvector (0,1)
+ withshadingstep (
+ withshadingfraction .5
+ withshadingcolors (red,"blue!50")
)
- withshadestep (
- withshadefraction 1
- withshadecolors ("blue!50",green)
+ withshadingstep (
+ withshadingfraction 1
+ withshadingcolors ("blue!50",green)
)
;
endfig;
\end{mplibcode}%
\leavevmode
\mpfig
+color yellow; yellow = (1,1,0);
picture Q, u, e;
Q := mplibglyph "Q" of "texgyrepagella-bolditalic.otf" scaled .1;
u := mplibglyph "u" of "texgyrepagella-bolditalic.otf" scaled .1 shifted lrcorner Q;
@@ -217,9 +218,9 @@ for pic=Q, u, e:
if i < totallen: withpostscript "collect"; fi
endfor
endfor
- withshademethod "linear"
- withshadedirection (0.5,2.5)
- withshadecolors (.7red,.7yellow)
+ withshadingmethod "linear"
+ withshadingdirection (0.5,2.5)
+ withshadingcolors (.7red,.7yellow)
;
\endmpfig
\everymplib[@mpfig]{ drawoptions(withcolor mplibrgbtexcolor "olive"); }%
@@ -238,9 +239,9 @@ draw mpliboutlinetext.b ("$\displaystyle\frac{1}{1-x^2}$")
("Question")
( withpen pencircle scaled .3 )
(
- withshademethod "linear"
- withshadedirection (2.5, 0.5)
- withshadecolors(red, blue)
+ withshadingmethod "linear"
+ withshadingdirection (2.5, 0.5)
+ withshadingcolors(red, blue)
)
scaled 4;
\endmpfig
@@ -305,8 +306,8 @@ draw fullcircle scaled 100 withpattern "mypatt" withpen pencircle scaled 1
\def\test#1{%
\mpfig
fill unitsquare shifted -center unitsquare scaled 200
- withshademethod "linear"
- withshadecolors (.3[red,white], .3[blue,white])
+ withshadingmethod "linear"
+ withshadingcolors (.3[red,white], .3[blue,white])
;
label( btex MetaPost etex scaled 3, origin) ;
draw image(
@@ -343,6 +344,15 @@ draw fullcircle scaled 100 withpattern "mypatt" withpen pencircle scaled 1
fakebold 1 fillcolor "red!70" drawcolor .7red scaled 7;
draw test withpattern "mypatt" ;
\endmpfig
+\mpfig
+ picture tex;
+ tex = mplibgraphictext "\bfseries\TeX" rotated 30 scaled 4;
+ draw tex
+ withshadingmethod "linear"
+ withshadingvector (3,0)
+ withshadingcolors (red,blue)
+ ;
+\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 05c2f8138d5..2f8854c6f37 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex
@@ -178,25 +178,26 @@ draw p scaled 3 shifted (40,0);
endfig;
\endmplibcode
\par
-\mplibsetformat{metafun}%
+%\mplibsetformat{metafun}%
\mplibcode
beginfig(1)
-fill unitsquare xyscaled (\mpdim\hsize, 1cm)
- withshademethod "linear"
- withshadevector (0,1)
- withshadestep (
- withshadefraction .5
- withshadecolors (red,blue)
+fill unitsquare xscaled \mpdim\hsize yscaled 1cm
+ withshadingmethod "linear"
+ withshadingvector (0,1)
+ withshadingstep (
+ withshadingfraction .5
+ withshadingcolors (red,blue)
)
- withshadestep (
- withshadefraction 1
- withshadecolors (blue,green)
+ withshadingstep (
+ withshadingfraction 1
+ withshadingcolors (blue,green)
)
;
endfig;
\endmplibcode
\leavevmode
\mpfig
+color yellow; yellow = (1,1,0);
picture Q, u, e;
Q := mplibglyph "Q" of "texgyrepagella-bolditalic.otf" scaled .1;
u := mplibglyph "u" of "texgyrepagella-bolditalic.otf" scaled .1 shifted lrcorner Q;
@@ -210,9 +211,9 @@ for pic=Q, u, e:
if i < totallen: withpostscript "collect"; fi
endfor
endfor
- withshademethod "linear"
- withshadedirection (0.5,2.5)
- withshadecolors (.7red,.7yellow)
+ withshadingmethod "linear"
+ withshadingdirection (0.5,2.5)
+ withshadingcolors (.7red,.7yellow)
;
\endmpfig
\everymplib[@mpfig]{ drawoptions(withcolor mplibrgbtexcolor"orange"); }%
@@ -231,9 +232,9 @@ draw mpliboutlinetext.b ("$\overbrace{x+\cdots+x}^k$")
("Question")
( withpen pencircle scaled .3 )
(
- withshademethod "linear"
- withshadedirection (2.5, 0.5)
- withshadecolors(red, blue)
+ withshadingmethod "linear"
+ withshadingdirection (2.5, 0.5)
+ withshadingcolors(red, blue)
)
scaled 4;
\endmpfig
@@ -296,7 +297,7 @@ draw image(
)
asgroup ""
withgroupname "testTRgroup"
- withprescript "tr_transparency=.3"
+ withtransparency (1, .3)
;
\endmpfig
\mpfig
@@ -318,6 +319,13 @@ usemplibgroup "testTRgroup"
fakebold 1 fillcolor .7[white,blue] drawcolor .7blue scaled 7;
draw test withpattern "pattuncolored" ;
\endmpfig
+\mpfig
+ draw btex \bf\TeX etex rotated 30 scaled 3
+ withshadingmethod "linear"
+ withshadingcolors (red,blue)
+ withshadingvector (0,1)
+ ;
+\endmpfig
\tracingcommands0
\vskip 2\baselineskip