Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t73B8d46004855 for ; Mon, 3 Aug 2015 13:08:40 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx103) with ESMTPS (Nemesis) id 0MUld2-1ZNITd00IW-00YE6A for ; Mon, 03 Aug 2015 13:08:33 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t73B6v8q001792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Aug 2015 13:06:57 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t73400Vm010249; Mon, 3 Aug 2015 13:06:57 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12492521 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 3 Aug 2015 13:06:56 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t73B6u2s009763 for ; Mon, 3 Aug 2015 13:06:56 +0200 Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0112.outbound.protection.outlook.com [157.56.112.112]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t73B6pkI005209 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL) for ; Mon, 3 Aug 2015 13:06:54 +0200 Received: from [192.156.217.146] (62.254.111.82) by DB5PR05MB1238.eurprd05.prod.outlook.com (10.161.245.13) with Microsoft SMTP Server (TLS) id 15.1.225.19; Mon, 3 Aug 2015 11:06:50 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 References: <1438598845.15593.28.camel@sipsolutions.net> Content-Type: text/plain; charset="utf-8"; format=flowed X-Originating-IP: [62.254.111.82] X-ClientProxiedBy: AM3PR02CA0072.eurprd02.prod.outlook.com (25.163.180.40) To DB5PR05MB1238.eurprd05.prod.outlook.com (25.161.245.13) X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1238;2:1e99uNXaI61sYqQC8iP3usM6YEYH1v6isBTx2vIyNfBCF89rj1cMO1sDtqm7FFnznvyBCo5wBlAN4IJGMB02gqsBgB9oZ8DDa9r7QXoE5VFaUWK65PT9Pl3QKKmgB1AnBqVycLxGXrntqFq90Trm7eBQ3qbFaKE9SZiJ92SCarc=;3:RXOORmYodugh+5mIjCkvWDmyBZhO/PFGR7fxBdOCr+qxaPIzXRUdDfh64n8ANWqhcVYHXcJLbUo7BKNCOs5/P8sDRZmP8a4VfwGYnWwN7LVsz1HBKOkSj4oOQcejJiw9m+B2EKg0SspKv9vdM0tJ2w==;25:6ps1F+j+lz19TjeB2gA/RxXOkrPO6nyOiap7PK7CuURh82T2KtSOSdiL/HDRYoQCYQ7vIS5YM15mNTaPj7QV8Prtx2iU0OPySbPcUBgo4lm6E0HktX8eQLdu+wQwKM4zs9qChrGCu740Te5C5rIV+2WtNP5y2EPJO0WOq3lLUeIvLMVwyCRhIALE2sLuAFkx0dSPucHx9uQQxagzb0np0wrhKt/RrSf9Vzdjgwp+ndfi1GAzdVRVdfLJuUe0S35Ulpnaipwkf73MJDCeY+NA0A==;20:eFtAxByEqRgATEEcTiR+yZeyh3cSylM62mEbb33oRWXj5/iwJlS2bYosgFz3Pw02QTH7PyK4VUrRYKfbwblZ6j6Cuh3K1+TAmVwcSrzEh9OaC9frWbPVWaGzeDi4C8vt4VGuGbEv9uPjTJ61h0eCynC1LnQo0WhR+Rag99qGrkA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1238; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DB5PR05MB1238;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1238; X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1238;4:aWq3nWd4eQM8LqUqvAZ6BVqaQvMbnibhv9Rais2uDPDKDy99gHh7GkmaA32QJTt30wLF+jBGL6s/pivL/jkUrKLXJmEn4NyFvHKXCh57WHpdO9eNEVNHlXyw1ly4l6ypEs9nN4gCTmJLOCwDNk5F7RWQ3Kgd6qPh71j7HD8oDC8pLzRLSXLJ2Rea22bKP++3t70LONm+xTecg1ZgHjtD3rSuGdmLik4ZyXVQPFk4iqkWhYbJA4JYzjvxIHMrpyiaf8UzlHHCWFs/Hm+BLCLeUhjS6QAePfG6yYDoDppeyGk= X-Forefront-PRVS: 0657D528EC X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(52044002)(479174004)(24454002)(36756003)(77156002)(450100001)(50466002)(62966003)(92566002)(110136002)(107886002)(5001960100002)(74826001)(122386002)(40100003)(5890100001)(189998001)(4001350100001)(54356999)(76176999)(77096005)(2950100001)(42186005)(74482002)(46102003)(66066001)(65806001)(83506001)(65956001)(80316001)(23676002)(33656002)(47776003)(50986999);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR05MB1238;H:[192.156.217.146];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjVQUjA1TUIxMjM4OzIzOkZ4amxySjFJRmN3ZHZKQWRiRXI0ZURhMjZx?= =?utf-8?B?cnJZZTE4NjFxSHJMQnRiR3JNRXFJTUFhQ3hpZ3NFN2JucU91ZFhrN2JTYWN2?= =?utf-8?B?TFFZWHZBbzdMb2MzcE9XQWdVL1ljZ0U0QzRRZlZxWDgrUEw2Q2NrWUl5Z0hT?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RQU00emQ2OHA4YTlQeHVaSG9sTnhz?= =?utf-8?B?a3NWZ2lnOFRzTWtvZEp0cGlmLy81emwxVUhMS3phMlR6djZFc1VJMlk4dmpu?= =?utf-8?B?bmVIWWp0dG1URkQzS0MxYWw1SHNjbXIrQlVHVkU0MVcwQ2NRem43ZG4xcHRv?= =?utf-8?B?b2hOa0trUlU0YlJpYU5wTUhFVGJ6Y2c4dTBRRHJ6V3UwV1FsZ1dWOXRzQ1Y5?= =?utf-8?B?bkRoNC90cnFaKy9SUHpyTDRNcVYrR2VmSHN1MWQwNjNCVXdNMWkxOTFBRFY1?= =?utf-8?B?c2R5QkU0cmtSd0E9PQ==?= X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1238;5:XLsFCqWDkjRcWYFJ481QfMqb09R3RgofA8EPQE0G23tEza/WPgtMQpvrEQQz2pkUmF1Pl36+FPnlQt46I7TKqBqVamj5GB3pqd0Mb6chm638BQ81aUFaRmS6d34LAlVn8OQ4wny03z9GuYBbL4WzEA==;24:eCBQIX/mCMQhs70QTnE6oW+EQBhiLJwSGyIfvrRrefTUTpHl8fbKBmsJm3nzc7xvcecEBNsT9n0Sr9cECEzqBElBe9/WoaLeqtv3SwnNddg=;20:6p+mF0GgOn0f1U1F7OEPAxEGD84i3OWFyAp9iiVKH4/Piz7IEMrkyWrOSRyCQcA9DBNmBxCbN2jLLQw13q9iRAVGjjZu91MKSAknZ5OyRwygeSIT6hSdF2cLsn2lQSWmF1ZVLfo/zm2rsHMhA+Xeb1ppoKwsry7fw/g8mhWPE6Q= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nag.co.uk X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2015 11:06:50.3799 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1238 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id t73B6u2s009764 Message-ID: <55BF4AAE.5010002@nag.co.uk> Date: Mon, 3 Aug 2015 12:04:14 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: David Carlisle Subject: Re: Difference between \addtocounter and \int_gincr inside tabularx To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <1438598845.15593.28.camel@sipsolutions.net> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:c7YCGUu1Gig=:JqaPCg/NZ8jAavUrzfKtw20bT0 K3rSCk9EuobdSsumtDzDcoGdviDG1oZCsJaApPeIjA+kj5KjZMV8DHQA4nCQCpbEexK5SRdpB jysqM25KFGY2iZLmW/n6up36mHsvJ0XQsJo3r5M6FRaK/F9FQMrOQYX59Qi6QaboHz2peC4Yb OnuWkxnRFQhpgoQH8kwr/hoLkRib9hIGGCIIvcjbCCrUNnaC7YxE7kxmNUQf/TVi/fFQqw9cd qoTZSGxDDdnJuMDnTsRLE2L/9jYhdArf5HY/6Nwcuqp6fSr4KbaUKSSOD5lFbeHrVBtTLwHSM qzg3L4CqGPN4jP8paz5KAjGlOsWbm69BTMkr2R8ibal56ROCqy3m2U2mrE6fYDoyh0irwj6H0 c7nS4Eeo3PIZ/nKGchMWvdhgFWQa7y9T0stAU5Cb1XfcOaInY7VoXDHDVQQiRkG4oPowmprXS af3Cr/DK/ze5db5xJsiaPQN9k9t4VyghieCXVKlYIHycI70ckBFaCfGf9IboUmTHEiYLSmyHj yGLW5XUblyfXTdhB6fPtdy/Lk0y2OC20yfvgw13P3iBZowmQagosktADFI1id/lr7VLxglkVx rdHLIxxNGQEhY8hWNcvanSFaYVIOpucbE/3Gf8MYGsa7AZWCxY3jJdWsaUJ6KUXt0IOYMK9rC WLDaBUyNTBgw3DdMrs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NA4IsZbc44/FD8nuM5JrziYMsOh1X4yPyDd5C8bzROllDT6XeTDzV UpjAwIOdzo5T4k9tmnbL3ng1d5zjTmWlQC81GNxnA3zHyqBeR+eAIjLv/Hb00dnIY/sIvRmiv IsRUfNLyTB9GrBUp60krUlqozeVsXwLIcKHO8ebeYSAhQsc3XioQu3EqCIi5i+/MMBoaZ84M1 UczRuGo3vjtk21MVw29AenZTtPlkuFub7V2rt+usMQaKOkMifzy39rstRT+/mvwx9rVIBw9cJ h3Bm0z1EDn2KS/FqrwsxO/LFDB+5s0twgizXfDRQ7tkO/BeDfYn7ZhJhrF+NlIb37cQwY/CMc RrXBqFeIK8keZ1J27cXckjcU722zJQSb/x5h1VXsJm4vfLFnQOi+ X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7811 On 03/08/2015 11:47, Benjamin Berg wrote: > Hi, > > I am having trouble to understand what the difference between > \addtocounter and \int_gincr:N is. When used inside a tabularx > environment, the \int_* functions do not work correctly, but the normal > LaTeX counters do. > > Maybe the idea of even using counters in a tabularx environment like > this is totally wrong[1], but it feels to me like the two commands > should behave in the same way. So either I am not grasping some > concepts (feel free to just point me to an explanation) or there might > even be a small bug. > > So, the attached document will print two tables. For each cell the > output of "\int_use:N \g_test_int,~\thetestcount" is displayed. The > counter is behaving as I expect while the \g_test_int has different > values inside tabularx. > > > tabularx: > 3, 1 4, 2 1, 3 2, 4 > 3, 1 4, 2 > > and tabular: > 1, 1 2, 2 3, 3 4, 4 > 1, 1 2, 2 > > It looks like this has to do with the fact that in the second row there > are empty cells. But it still baffles me, that the latex counters > behave correctly, while latex 3 integers do not. > > Regards, > Benjamin > > [1] It is very likely that I will drop the tabularx anyways. > tabularx typesets its body multiple times with trial settings to find the right widths. So in general any command that is doing anything with global side effects like incrementing a counter will increment multiple times. You would see the same with plain tex syntax \newcounter\foo.... if you use \global\advance\foo 1 inside tabularx. latex counters have a reset mechanism (designed for use with restoring counters after \include, mostly) tabularx uses this to restore all counters at the start of every trial setting. \hfuzz is \maxdimen in trials so you can avoid incremengting counters during trials with \ifdim\hfuzz<\maxdimen ... but sometimes your code needs to increment and then restore, which is a bit more work. David David ________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Microsoft Office 365. ________________________________