Backgrounds has changed in latest lmtx
Hi everybody, With the latest lmtx, my page backgrounds don’t work any more. I think Otared mentioned that the simpleslides module is having problems. I’m trying to figure out what is happening, but I don’t see any warnings or errors, just unexpected results (which is not a good thing). I’m starting with the fundamentals. Here is a fairly minimal example: compile with context --luatex to see the expected result and with lmtx to see what is wrong. All best Thomas \setuppapersize[A6,landscape][A6,landscape] \setuplayout[backspace=1cm, topspace=0.4cm, marking=off, width=13cm, height=9.7cm, header=0.6cm, footer=0cm, ] \startreusableMPgraphic{card} StartPage ; save p ; path p[] ; p[0] = ulcorner Page -- urcorner Page ; p[0] := p[0] shifted (0, -0.97cm) ; for i = 1 upto 18 : p[i] = p[i-1] shifted (0, -14.42pt) ; draw p[i] withcolor (0.5,0.5,0.5) ; endfor ; pickup pencircle scaled 2pt ; draw p[0] withcolor red ; StopPage ; \stopreusableMPgraphic \defineoverlay[Card][\reuseMPgraphic{card}] \setupbackgrounds[page] [state=repeat, background={Card}] \starttext Test \stoptext
Hi Thomas, Your example does indeed show the issue I had reported on with Simpleslides: the backgrounds of the slides are not as expected. So it seems that beginning with version 2022-10-15 something has changed with Metapost or the background mechanism. Best regards: Otared
On 21 Oct 2022, at 11:32, Thomas A. Schmitz via ntg-context
wrote: Hi everybody,
With the latest lmtx, my page backgrounds don’t work any more. I think Otared mentioned that the simpleslides module is having problems. I’m trying to figure out what is happening, but I don’t see any warnings or errors, just unexpected results (which is not a good thing). I’m starting with the fundamentals. Here is a fairly minimal example: compile with context --luatex to see the expected result and with lmtx to see what is wrong.
All best
Thomas
\setuppapersize[A6,landscape][A6,landscape]
\setuplayout[backspace=1cm, topspace=0.4cm, marking=off, width=13cm, height=9.7cm, header=0.6cm, footer=0cm, ]
\startreusableMPgraphic{card} StartPage ; save p ; path p[] ; p[0] = ulcorner Page -- urcorner Page ; p[0] := p[0] shifted (0, -0.97cm) ; for i = 1 upto 18 : p[i] = p[i-1] shifted (0, -14.42pt) ; draw p[i] withcolor (0.5,0.5,0.5) ; endfor ; pickup pencircle scaled 2pt ; draw p[0] withcolor red ; StopPage ; \stopreusableMPgraphic
\defineoverlay[Card][\reuseMPgraphic{card}]
\setupbackgrounds[page] [state=repeat, background={Card}]
\starttext
Test
\stoptext ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Otared Kavian e-mail: otared@gmail.com Phone: +33 6 88 26 70 95
Here comes another one that works with the switch --luatex but not in lmtx: \setuppapersize[A6,landscape][A6,landscape] \startuseMPgraphic{ornament} StartPage ; save diff ;numeric diff; diff = .3cm ; save w; numeric w; w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff ; save factor; numeric factor; if NOfPages <= 1 : factor = w ; else : factor = w/(NOfPages - 1) ; fi ; save p; path p ; p = unitsquare xyscaled (diff,diff) shifted (xpart llcorner Field[Text][Text],0.85cm) ; for i = 1 upto NOfPages: if RealPageNumber = i: fill p xyscaled (0,2) shifted ( (i-1)*factor,-diff-0.85cm) withcolor blue ; else : fill p shifted ( (i-1)*factor, 0) withcolor red ; fi ; endfor ; StopPage ; \stopuseMPgraphic \defineoverlay [Ornament] [\useMPgraphic{ornament}] \setupbackgrounds[page] [state=repeat, background={Ornament}] \starttext \dorecurse {10} {Test \page} \stoptext All best Thomas
participants (2)
-
Otared Kavian
-
Thomas A. Schmitz