summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luamplib/test-luamplib-latex.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-11 03:01:02 +0000
committerNorbert Preining <norbert@preining.info>2024-05-11 03:01:02 +0000
commitf04305edb464261c7040b9ba9c1ebf0747536190 (patch)
treeac7ffc7f15902e0805161fb67f9503e0d10bc711 /macros/luatex/generic/luamplib/test-luamplib-latex.tex
parent889ef8595dafee235cb1106ec4efbdd3169481c2 (diff)
CTAN sync 202405110301
Diffstat (limited to 'macros/luatex/generic/luamplib/test-luamplib-latex.tex')
-rw-r--r--macros/luatex/generic/luamplib/test-luamplib-latex.tex34
1 files changed, 29 insertions, 5 deletions
diff --git a/macros/luatex/generic/luamplib/test-luamplib-latex.tex b/macros/luatex/generic/luamplib/test-luamplib-latex.tex
index 52af10d72b..faa516f25f 100644
--- a/macros/luatex/generic/luamplib/test-luamplib-latex.tex
+++ b/macros/luatex/generic/luamplib/test-luamplib-latex.tex
@@ -1,5 +1,9 @@
%\DocumentMetadata{ uncompress }
-\documentclass{article}
+\ifnum\outputmode > 0
+ \documentclass{article}
+\else
+ \documentclass[dvipdfmx]{article}
+\fi
\usepackage{fontspec}
\setmainfont{latin modern roman}
\usepackage{luamplib}
@@ -172,14 +176,15 @@ diameter:\Dia bp.%
\begin{mplibcode}
beginfig(1)
draw mplibgraphictext "\bfseries Funny"
- fakebold 2 scale 2 % fontspec options
- drawcolor "blue" fillcolor "red!50" % l3color expressions
- scaled 2 rotated 30 ;
+ fakebold 2 % fontspec option
+ drawcolor blue fillcolor "red!50" % l3color expression
+ scaled 3 rotated 30 ;
picture p;
p:=mplibgraphictext "\bfseries\itshape xyz";
draw p scaled 3 shifted (40,0);
endfig;
\end{mplibcode}%
+\par
\mplibsetformat{metafun}%
\begin{mplibcode}
beginfig(1)
@@ -198,7 +203,26 @@ fill unitsquare xyscaled (\mpdim\textwidth,1cm)
endfig;
\end{mplibcode}%
\leavevmode
-\everymplib[@mpfig]{ drawoptions(withcolor red); }%
+\mpfig
+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;
+e := mplibglyph "e" of "texgyrepagella-bolditalic.otf" scaled .1 shifted lrcorner u;
+i:=0;
+totallen := length Q + length u + length e;
+for pic=Q, u, e:
+ for item within pic:
+ i:=i+1;
+ fill pathpart item
+ if i < totallen: withpostscript "collect"; fi
+ endfor
+endfor
+ withshademethod "linear"
+ withshadedirection (0.5,2.5)
+ withshadecolors (.7red,.7yellow)
+ ;
+\endmpfig
+\everymplib[@mpfig]{ drawoptions(withcolor mplibrgbtexcolor "olive"); }%
\mpfig* input boxes \endmpfig
\mpfig circleit.a(btex\tracingcommands0 Box 1 etex); drawboxed(a); \endmpfig
\tracingcommands0