From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8373 invoked from network); 23 Aug 2023 15:49:49 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 23 Aug 2023 15:49:49 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id E40A5482DD2 for ; Wed, 23 Aug 2023 17:49:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BBCxOmXAwKye for ; Wed, 23 Aug 2023 17:49:21 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id BBCE0482CAF for ; Wed, 23 Aug 2023 17:48:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 9A26B482958 for ; Wed, 23 Aug 2023 17:48:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NyO6pvIfYbnm for ; Wed, 23 Aug 2023 17:48:36 +0200 (CEST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 48F8348271E for ; Wed, 23 Aug 2023 17:48:36 +0200 (CEST) Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2bbac8ec902so89348981fa.1 for ; Wed, 23 Aug 2023 08:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692805715; x=1693410515; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:from:to:cc:subject:date :message-id:reply-to; bh=RlSD2sOPyMBqNGaAPMhf4M/AGjRbNMGInTKXPfP9yIc=; b=me6WXiW8nMdQq2/lqk2NVon7V2LfUevWyraPsFYyUUPI6I8LnPrZ7u342DIA+fihku rlALVtZjRucv5UmMB15WBznDBYsdAfsT5ZCGSjZoukHh81hAEtldFWrl/RIuT5NBaTdC Mvgt1wAWK9ku1KWCu/d8oJQxjsFgbrm1YGiaW7vmdSA11Cl+KXVGBJ0tTdjBdQPkVxBn +FcCslpwDWEQoURNFTrGKLkwWKZNxCcE3lKpBxLD6N6H82fePf4j/1lAAxUyI3ZpR/mZ kaOz0O2fetL0VqRqyhyrdhLnAEsEtUgV4McSn5WVkI++Yr0kQcB2af1dtorNkr4Ln6pr zlFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692805715; x=1693410515; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RlSD2sOPyMBqNGaAPMhf4M/AGjRbNMGInTKXPfP9yIc=; b=hBNeLX7OZj5ZjjMQqOZ6Q3XKPLGdyi2i5ec7Eiky/Lf7fK9Nrqfd5N99gqdDtueIlE 6/WzKoQdIGTafzCkoiJo2hxAOBdWrrdrKwgA10cwkweiHQDOD9gC2zqc7ku+wrtIRUWF MhEcMLMoWH0NFA5/NtY7Bw0fBdPYIgW5GIEcufTN1M0qF/9e80EnRjIaASZgEx/SwZ9M 2sPDkerNCCJmBQQolMo+DY7BH3DvsUX4wtKPRygrmmPC/JijvaGKq5BdPPtsy4il4PZm oBcN2Vl0VwlOtQkta+Am8tdun7Tckfm0ZPMmyEw4e2nh4fcCxPFGBiTwq7LRUMTjl6ok FPaA== X-Gm-Message-State: AOJu0YzK8YnKRuDSolRFzYBw1GXl467L6zuHnEhtzVeJX/my95peuGro HCm6KGhHrprQCq4QBhwIxU4= X-Google-Smtp-Source: AGHT+IFhmKmx/NOuuXvIiiqpmqvyOJuSuGnLzsitcBuJQksV4ugmh2eXJQIV9IfNevIZkGr3J/6h+g== X-Received: by 2002:a2e:320c:0:b0:2b9:e93e:65e6 with SMTP id y12-20020a2e320c000000b002b9e93e65e6mr9723473ljy.35.1692805715267; Wed, 23 Aug 2023 08:48:35 -0700 (PDT) Received: from ?IPv6:2a02:810d:a8bf:fe08:7cb7:5ae6:54a7:32a1? ([2a02:810d:a8bf:fe08:7cb7:5ae6:54a7:32a1]) by smtp.gmail.com with ESMTPSA id b8-20020a170906038800b009786c8249d6sm10015544eja.175.2023.08.23.08.48.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Aug 2023 08:48:34 -0700 (PDT) To: mailing list for ConTeXt users , Fabrice Couvreur References: From: Wolfgang Schuster Message-ID: Date: Wed, 23 Aug 2023 17:48:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.60 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Message-ID-Hash: T7SNWBZR75N57ALICUWG6GKCVS65XIGN X-Message-ID-Hash: T7SNWBZR75N57ALICUWG6GKCVS65XIGN X-MailFrom: wolfgang.schuster.lists@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Question about building an array of values with Lua List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============9127540864547779592==" This is a multi-part message in MIME format. --===============9127540864547779592== Content-Type: multipart/alternative; boundary="------------D026AB9930ADC7A90CA779F2" Content-Language: en-US This is a multi-part message in MIME format. --------------D026AB9930ADC7A90CA779F2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------D026AB9930ADC7A90CA779F2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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

--------------D026AB9930ADC7A90CA779F2-- --===============9127540864547779592== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============9127540864547779592==--