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=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 2C1752735B for ; Thu, 23 May 2024 14:34:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id C3823484660 for ; Thu, 23 May 2024 14:33:49 +0200 (CEST) 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=gmail.com 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 JnPnrW0Rxj52 for ; Thu, 23 May 2024 14:33:49 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 96B0C4846D6 for ; Thu, 23 May 2024 14:32:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id C83A14844D9 for ; Thu, 23 May 2024 14:32:11 +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 SJlqPjEpXGu0 for ; Thu, 23 May 2024 14:32:11 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.47; helo=mail-ed1-f47.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 226764844D7 for ; Thu, 23 May 2024 14:32:11 +0200 (CEST) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-56e69888a36so12728307a12.3 for ; Thu, 23 May 2024 05:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716467531; x=1717072331; darn=ntg.nl; h=content-transfer-encoding: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=C+LBonoSq1+mLwINJgbUT5Vc3H5ISFDoALXi65c4d/E=; b=nZ92OYWpg25GkgXZPmWGL8WKXFC3dDHrU1T2qR+LjZLl2biJ7G/j9ult7FYURzRgGm Mgb5XRwET+Zw+STzHqy7yPusJ+PpJE7gZDEBTruKmxK/jr+ouRpSIPxIU2/x877t54/A HNFBUjWgNrNo+dtzhvsDvWOEwmjm7qRdUXdSaEhT/JyWgfsL7gXYu4u3W6khBz09eVpM UBoQs/jiuwbto9qhh40N5qBswTpZwEEXf5Kt/HefvrE4KVYTJ6mSir+nbxEiG1BpY9ZH pSO1s9OIVuevCZjcWsnBXme5sPX/e3c1GXZmMkwVSYc7B5BWHh9K+ga7FP8OBn1BhCU0 I5bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716467531; x=1717072331; h=content-transfer-encoding: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=C+LBonoSq1+mLwINJgbUT5Vc3H5ISFDoALXi65c4d/E=; b=m375RRXldY8vh7kXPjvOiKi2sNkMefyCP7Gxrzi2XgBAq1z1VxseigTzN9lBXPpFzj iydhNtMbvjeOL2GO9h5HdfAI303m2vcnRQ4oW3HVK7XMkNzlYzZFqbR9EVENxsp2yH78 J+uVhA1uFvWTPEcoev++8d1Z5EMU/JfctZnmGoa0Ex+bVwBHTiNZ9Yh7LxAHJZjfPhRK OQw3oLHwj2pi20s2qWQbqEYI7IHmf49t3Lfj77SYc5loy0D/iiOhUrARkwDZOVoJwc0R 95zjfnDQgKBUUsd9FDJdbKawR/momo6GPGCXK8gXamcADaMMjxshTLc1TJU4AptyX4pa OSNw== X-Gm-Message-State: AOJu0YzFOiCAqJx8WPOqEZ3xVPF/so0Tl1OPFqucyLMb8RvfqCWp8dk7 PSXtUWK7D/B4ZkoS7dU8hdS7mYV4tPXfMY5xMB/57HtB84c4FrYcwFSCIg== X-Google-Smtp-Source: AGHT+IHDWbBDX4i4szcdx1fIQ9VPMeTNKqYLz1BMBq11ImZTAVZsWOESTne5Co0lAeeQHfYN6WEj/w== X-Received: by 2002:a17:906:6148:b0:a59:c963:82b with SMTP id a640c23a62f3a-a62280b4751mr309238566b.33.1716467530382; Thu, 23 May 2024 05:32:10 -0700 (PDT) Received: from ?IPv6:2a02:810d:a8bf:dc10:d0a8:398f:dc49:5b2a? ([2a02:810d:a8bf:dc10:d0a8:398f:dc49:5b2a]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781d4b2sm1912597366b.27.2024.05.23.05.32.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2024 05:32:09 -0700 (PDT) To: mailing list for ConTeXt users , seyal.zavira@gmail.com References: <171646641815.1997.9521866576077009674@cgl.ntg.nl> From: Wolfgang Schuster Message-ID: Date: Thu, 23 May 2024 14:32:06 +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: <171646641815.1997.9521866576077009674@cgl.ntg.nl> Content-Language: en-US Message-ID-Hash: ZMYBRYLOO4JKM72VYHRRXRFCPJQW5KYN X-Message-ID-Hash: ZMYBRYLOO4JKM72VYHRRXRFCPJQW5KYN 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: simplify side by side Poems List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit seyal.zavira@gmail.com schrieb am 23.05.2024 um 14:13: > Hi all, > > i want to use tables for constructing poems structure > this snippet of code works well: > > \startsetups tablepoem > \setupTABLE[column][each][width=5cm] > \stopsetups > \starttext > \bTABLE[setups=tablepoem] > \bTR \bTD One one ons ksl \eTD \bTD two gfjgfd oski kwo \eTD \eTR > \bTR \bTD One wer s dft tgf \eTD \bTD two gfkdsjg dfs we \eTD \eTR > \eTABLE > \stoptext > > but when i use this code for simplifying of changing cells I get an error: > > \startsetups tablepoem > \setupTABLE[column][each][width=5cm] > \stopsetups > > \def\Poemstart{\bTABLE[setups=tablepoem] \bTR \bTD} > \def\Mesra{\eTD \bTD} > \def\nextBeyt{\eTD\eTR\bTR\bTD} > \def\Poemstop{\eTD\eTR\eTABLE} > > \starttext > \Poemstart > One one ons ksl \Mesra two gfjgfd oski kwo \nextBeyt > One wer s dft tgf \Mesra two gfkdsjg dfs we > \Poemstop > \stoptext > > what is the problem? The table environment collects the content of the table cell-wise which means when TeX sees a \bTD in the input it reads the following text until it finds the corresponding \eTD. When you put the \eTD in the definition of another command the scanner will never find the end of a cell and you either run out of memory or reach the end of the file etc. Below are a few alternative solutions to simplify the input, one of them is an alternative version of input (\startTABLE) for natural tables which uses the same commands to separate columns as tabulate does. %%%% begin example \starttext \startTABLE[width=5cm] \NC One one ons ksl \NC two gfjgfd oski kwo \NC\NR \NC One wer s dft tgf \NC two gfkdsjg dfs we \NC\NR \stopTABLE \starttabulate[|*{2}{k{0}lw(5cm)|}] \NC One one ons ksl \NC two gfjgfd oski kwo \NC\NR \NC One wer s dft tgf \NC two gfkdsjg dfs we \NC\NR \stoptabulate \defineparagraphs[poem][n=2,width=5cm] \setupparagraphs[poem][each][width=5cm,distance=0pt] \startpoem \startlines One one ons ksl One wer s dft tgf \stoplines \nextpoem \startlines two gfjgfd oski kwo two gfkdsjg dfs we \stoplines \stoppoem \stoptext %%%% end example Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________