ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Question about building an array of values with Lua
@ 2023-08-23 17:28 Fabrice Couvreur
  2023-08-23 15:48 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Fabrice Couvreur @ 2023-08-23 17:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1289 bytes --]

Hi,
I'm trying to fill an array using lua. So far it works but then I don't
know if it's possible.
Thanks
Fabrice

 \startluacode

context.startxtable({"align={middle,lohi},bodyfont=9pt,framecolor=black"})
              context.startxrow({"background=color,
backgroundcolor=lightgray"})
              context.startxcell({"nx=4"})
              context("Units digit of")
              context.stopxcell()
              context.stopxrow()
              context.startxrow()
              context.startxcell({"width=1cm"})
              context("\\im{a}")
              context.stopxcell()
              context.startxcell({"width=1cm"})
              context("\\im{a²}")
              context.stopxcell()
              context.startxcell({"width=1cm"})
              context("\\im{b}")
              context.stopxcell()
              context.startxcell({"width=1cm"})
              context("\\im{2b²}")
              context.stopxcell()
              context.stopxrow()
              for i = 0, 9 do
                  context.startxrow()
                  context.startxcell()
                  context(i)
                  context.stopxcell()
                  context.stopxrow()
              end
              context.stopxtable()
     \stopluacode

[-- Attachment #1.2: Type: text/html, Size: 2086 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-25 10:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 17:28 [NTG-context] Question about building an array of values with Lua Fabrice Couvreur
2023-08-23 15:48 ` [NTG-context] " Wolfgang Schuster
2023-08-23 23:04   ` Otared Kavian
2023-08-24  4:03     ` Wolfgang Schuster
2023-08-24 10:50       ` Otared Kavian
2023-08-24 19:43         ` Wolfgang Schuster
2023-08-25 12:47           ` Fabrice Couvreur
2023-08-24 11:15       ` Fabrice Couvreur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).