ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Fabrice Couvreur <fabrice1.couvreur@gmail.com>
Subject: [NTG-context] Re: Question about building an array of values with Lua
Date: Wed, 23 Aug 2023 17:48:07 +0200	[thread overview]
Message-ID: <fc0ca692-0774-3586-17c3-769ec1351cad@gmail.com> (raw)
In-Reply-To: <CACyK-erbD7=2DYotgZFfGA_N2NKBOWiPuUQgeNXGTe=7peeMGw@mail.gmail.com>


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

Fabrice Couvreur schrieb am 23.08.2023 um 19:28:
> Hi,
> I'm trying to fill an array using lua. So far it works but then I 
> don't know if it's possible.

Where do you have problems (look into cld-mkiv.pdf for hins)?

\starttext

\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^2")
         context.stopxcell()
         context.startxcell{ width = "1cm" }
             context.im("b")
         context.stopxcell()
         context.startxcell{ width = "1cm" }
             context.im("2b^2")
         context.stopxcell()
     context.stopxrow()
     for i = 0,9 do
         context.startxrow()
             for j = 1,4 do
                 context.startxcell()
                     if j == 1 then
                         context(i)
                     end
                 context.stopxcell()
             end
         context.stopxrow()
     end
context.stopxtable()
\stopluacode

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 2246 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
___________________________________________________________________________________

  reply	other threads:[~2023-08-23 15:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 17:28 [NTG-context] " Fabrice Couvreur
2023-08-23 15:48 ` Wolfgang Schuster [this message]
2023-08-23 23:04   ` [NTG-context] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc0ca692-0774-3586-17c3-769ec1351cad@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=fabrice1.couvreur@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).