[NTG-context] Strange backgroundcolors with showgrid and luacode
Otared Kavian
otared at gmail.com
Fri Apr 26 14:10:12 CEST 2019
Dear all,
When typesetting an old list of exercises, I noticed that when \showgrid is active and a luafunction is called, there is some unwanted and strange background colors (gray and blue, or yellow and blue). Thes background colors seems to show up on an unfilled page when a lua function is used, and I could come up with the following minimal example which gives the attached PDF.
Could someone, please, tell me what I am doing wrong?
Best regards: OK
%%%% begin test-strange.tex
\showgrid
%\setuplayout[grid=yes]
\startluacode
AdditionTest = function(nn)
local a = {}
local b = {}
for i = 1,nn do
a[i] = i
b[i] = nn - i
end
context.midaligned("\\bfa Exercises")
context.blank()
context.startcolumns { n = 3 }
context.starttabulate { "|r|c|r|c|r|" }
for i=1,nn do
context.NC()
context(a[i])
context.NC()
context.mathematics("*")
context.NC()
context(b[i])
context.NC()
context("=")
context.NR()
end
context.stoptabulate()
context.stopcolumns()
context.page()
end
\stopluacode
\starttext
\ctxlua{AdditionTest(12)} % the background colors, gray and blue, show up when a lua function is called
% \ctxlua{AdditionTest(120)} % the background colors, yellow and blue, show up when a lua function is called
% \input knuth % the background colors do not show up here
\stoptext
%%%% end test-strange.tex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-strange.pdf
Type: application/pdf
Size: 14371 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190426/b83e94b2/attachment-0001.pdf>
More information about the ntg-context
mailing list