From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id DFF552D629 for ; Tue, 15 Oct 2024 11:04:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 375194855D6 for ; Tue, 15 Oct 2024 11:02:22 +0200 (CEST) Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=ntg.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntg.nl; h= content-transfer-encoding:content-type:content-type:from:from :list-unsubscribe:list-subscribe:list-post:list-owner:list-help :list-archive:archived-at:list-id:subject:subject:reply-to :precedence:content-language:mime-version:date:date:message-id :received:received:received:received:received:received; s=cgl; t=1728982941; x=1731574942; bh=Pmn4nPS963zXRpvVwRginvNlx3GsTTYl DMvCSJgOUIE=; b=UZznJFY8NFvgJiwOOk4eTm1bZCPHlcguIcXBVq7ZhZwMTv+d SyDlb0UuVmzYD0RLOHRWg5EKJ7chlx5UiLU4PE5dRXJF6Mgf02Hf+6DXRzxqws/2 /REdRNknaXddD8yAsrwWsjvBeoTwGkmJE3Z+vwa5SLCFKNI4q5tNP6M/ZIU= X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=mailbox.org 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 1wrMkwZKAdL9 for ; Tue, 15 Oct 2024 11:02:21 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 76AF34857FF for ; Tue, 15 Oct 2024 11:00:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id E12D0485453 for ; Tue, 15 Oct 2024 10:59:59 +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 jOyLDTPfdMU5 for ; Tue, 15 Oct 2024 10:59:59 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=80.241.56.172; helo=mout-p-202.mailbox.org; envelope-from=juh+ntg-context@mailbox.org; receiver= Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 87BA3485451 for ; Tue, 15 Oct 2024 10:59:59 +0200 (CEST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4XSSj91Sgjz9tWQ for ; Tue, 15 Oct 2024 10:59:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1728982797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uSdbndObomCayJYlKoWLtAj5vzVZXtUY6rMy/402imU=; b=CgVP0yWV0VVs9W+puah+n0ebSTzJJb0WyZwK5qM9W/UehqqapgB0M+wdfYHPglCD/Q2jH6 s/ImiifH5Li/lPnZyrdpA58f+u0zVopTbWoaKDVK+xPSJtZh8hVeoE01j+ujjlxb2DwCtq 8r0m9AcOSfH4EwvC4S2FyFxqgUxndhnyyxlJdbVXFS2o+1xKAlLS7gcERKzpOwDaK6MFZU b+tzS7jwp3JzRI7Wy7YQU1ldA76namkLuXInlRAyLuEybKAbBnkM1+hb9TOqTizxOYN7gq 3eCghKZjpuqykbqXjheZpelHfY/NkkVMpSX+tsMFK1V09UTLxWNs+r1r5TbWzQ== Message-ID: <8291d068-6311-422d-a6d2-eaadba2a2a9a@mailbox.org> Date: Tue, 15 Oct 2024 10:59:55 +0200 MIME-Version: 1.0 Content-Language: de-DE To: mailing list for ConTeXt users X-MBO-RS-ID: f636c212faa407914d7 X-MBO-RS-META: cocsuyq8qp5di8q7zgfub4hs9wh6gnwq Message-ID-Hash: OELUVTEJMIHJ6R2TPD3EGS4CZCF267YZ X-Message-ID-Hash: OELUVTEJMIHJ6R2TPD3EGS4CZCF267YZ X-MailFrom: juh+ntg-context@mailbox.org 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.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] max function in spreadsheettable List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: juh+ntg-context--- via ntg-context Cc: juh+ntg-context@mailbox.org Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit Dear all, I have a cell that calculates a value that may not be a negative value. If it is a negatiive value the cell should show zero. \startcell[style=normal] @ "0.2f EUR" $pauschale.eintag$ - ((D[row] * (0.2 * $pauschale.vororttag$)) + (E[row] * (0.4 * $pauschale.vororttag$)) + (F[row] * (0.4 * $pauschale.vororttag$))) \stopcell The $-variables will get resolved by Pandoc before ConTeXt comes into play. As far as I understood the handdbook spreadsheets-mkiv.pdf it is possible to define lua functions inside a cell. Who would you implement a max function that sets the value to 0 if it is negative? TIA juh P.S. For German speakers: We try to implement a Reisekostenformular. ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________