Hi, I uploaded a new version of lmtx: a next step in this matrix and such graphic part ... (also bTABLE done). The matrix bit has a high level MP interface, also because it's a nice example of implementing one (not much code needed actually). Support in bTABLE .. eTABLE is kind of interesting as it separates the ornamental part from the text part. The sxample only shows some simple stuff. I'll probably also add this to the other table mechanisms. (Not hard but I don't want to impact performance when it's not used.) The \startoverlayMPgraphic{mp:whatever-6} is new and automatically defines the overlay so that saves some code. \startMPoverlaydata is just a collector that can be flushed in-line (which wilkl also reset it). All this is probably mostly useful in an educational setting. We'll see. Hans ------------------------------------------------------------ examples ------------------------------------------------------------ \starttext \startoverlayMPgraphic{mp:whatever-6} fill OverlayBox withcolor "darkgray" ; draw matrixbox (1, 1) (2, 1) enlarged OverlayOffset shifted paired(OverlayOffset) withpen pencircle scaled 1pt withcolor "blue" ; draw matrixbox (2, 2) (4, 4) enlarged OverlayOffset shifted paired(OverlayOffset) withpen pencircle scaled 1pt withcolor "red" ; \stopoverlayMPgraphic \framed [synchronize=background, align=normal, frame=off, background=mp:whatever-6, backgroundoffset=.5ex, foregroundcolor=white] {\setmathmatrixanchoring[yes]% left|right|both|yes \startmathmatrix \NC a_1 \NC a \NC b \NC c\NR \NC a_2 \NC a \NC b \NC c\NR \NC a_3 \NC a^2 \NC b \NC c\NR \NC a_4 \NC a \NC b_2 \NC c\NR \NC a_5 \NC a \NC b \NC c\NR \NC a_6 \NC a \NC b \NC c\NR \stopmathmatrix} % \blank % This can also be done by Alans node module. \startoverlayMPgraphic{mp:whatever-7} fill OverlayBox withcolor "darkgray" ; draw lmt_matrix [ from = (1, 1), to = (5, 4), connect = { "bottom", "left" }, color = "blue", linewidth = 1pt, arrowoffset = 2pt, label = [ text = "$\white \scriptscriptstyle x =1$", offset = ExHeight/2, anchor = "lft", fraction = .25 ], ] ; draw lmt_matrix [ from = (4, 1), to = (1, 5), connect = { "bottom", "right" } colors = { "green", "magenta" }, arrowcolor = "white", linewidth = 1pt, ] ; draw lmt_matrix [ cell = (2, 2), shape = "circle" color = "red", linewidth = 1pt, ] ; draw lmt_matrix [ cell = (4, 6), shape = "round", radius = ExHeight/2, color = "red", linewidth = 1pt, ] ; draw lmt_matrix [ cell = (2, 6), shape = "path", path = fulldiamond xscaled 3EmWidth yscaled 4ExHeight, color = "red", linewidth = 1pt, ] ; draw lmt_matrix [ cell = (2, 6), shape = "scaledpath", offset = .5ExHeight, path = fulldiamond, color = "yellow", linewidth = 1pt, ] ; \stopoverlayMPgraphic \blank \framed [synchronize=background, align=normal, frame=off, offset=overlay, background=mp:whatever-7, foregroundcolor=white] {\setmathmatrixanchoring[both]% \startmathmatrix \NC a \NC \NC \quad \NC b \NC \NR \NC \NC c \NC \quad \NC \NC \NR \NC \NC \NC \quad \NC \NC \NR \NC \NC \NC \quad \NC \NC d \NR \NC e \NC \NC \quad \NC \NC \NR \NC \NC f \NC \quad \NC g \NC \NR \stopmathmatrix} \blank \startoverlayMPgraphic{whatever-9} fill anchorspan (1, 1) (1, 3) withcolor "blue" ; fill anchorspan (2, 1) (3, 3) withcolor "yellow" ; fill anchorspan (3, 1) (3, 3) withcolor "green" ; path p ; p := anchorcell (2, 2) ; fill p withcolor "red" ; % now some weird stuff: picture q ; q := externalfigure "t:/sources/cow.pdf" ; q := q xysized (bbwidth(p), bbheight(p)) ; draw q shifted - center q shifted center p ; % and some even weirder stuff: \includeMPoverlaydata \stopoverlayMPgraphic \enabletrackers[localanchor] \bTABLE[frame=off,synchronize=background,background=whatever-9] \bTR \bTD[foregroundcolor=white] \startMPoverlaydata fill anchorcell (\xanchor,\yanchor) enlarged -.25ExHeight withcolor "darkgray" ; \stopMPoverlaydata test \eTD \bTD test test \eTD \bTD test test test \eTD \eTD \bTR \bTD[foregroundcolor=white] test test \eTD \bTD[nx=2,align=middle,foregroundstyle=bold,foregroundcolor=white] test \eTD \eTD \bTR \bTD[foregroundcolor=white] test test test \eTD \bTD test test \eTD \bTD test \eTD \eTD \eTABLE \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 6/4/21 5:46 PM, Hans Hagen wrote:
Hi,
I uploaded a new version of lmtx [...] Hans,
at least on Linux64, if I compile a source file named "mwe.tex", I get an extra "mwe-pdf-keep.pdf", either with or without invoking the option "--purgeall". This happens both with MkIV (LuaTeX 1.13 7420 + ConTeXt MkIV 2021.06.04 17:28) and LMTX (LuaMetaTeX 2.09 20210531 + ConTeXt LMTX 2021.06.04 17:28). Contents seem to be irrelevant, but actual contents of "mwe.tex" read: \starttext \input zapf \stoptext I’m afraid that this might be a bug. Many thanks for your help, Pablo -- http://www.ousia.tk
On 6/4/2021 6:18 PM, Pablo Rodriguez wrote:
On 6/4/21 5:46 PM, Hans Hagen wrote:
Hi,
I uploaded a new version of lmtx [...] Hans,
at least on Linux64, if I compile a source file named "mwe.tex", I get an extra "mwe-pdf-keep.pdf", either with or without invoking the option "--purgeall".
This happens both with MkIV (LuaTeX 1.13 7420 + ConTeXt MkIV 2021.06.04 17:28) and LMTX (LuaMetaTeX 2.09 20210531 + ConTeXt LMTX 2021.06.04 17:28).
Contents seem to be irrelevant, but actual contents of "mwe.tex" read:
\starttext \input zapf \stoptext
I’m afraid that this might be a bug.
more an incomplete feature (should normally not be done) ... there is an % keeppdf (first line) feature for something Aditya and I are trying no fix-upload today (not for a one line fix) thanks for noticing, Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 6/4/21 7:43 PM, Hans Hagen wrote:
On 6/4/2021 6:18 PM, Pablo Rodriguez wrote:
On 6/4/21 5:46 PM, Hans Hagen wrote:
Hi,
I uploaded a new version of lmtx [...] Hans,
at least on Linux64, if I compile a source file named "mwe.tex", I get an extra "mwe-pdf-keep.pdf", either with or without invoking the option "--purgeall". [...] I’m afraid that this might be a bug.
more an incomplete feature (should normally not be done) [...] no fix-upload today (not for a one line fix)
thanks for noticing,
Many thanks for the fast reply, Hans. Fine for me, this is not that important. Pablo -- http://www.ousia.tk
participants (2)
-
Hans Hagen
-
Pablo Rodriguez