LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Benjamin Berg <[log in to unmask]>
Date:
Mon, 3 Aug 2015 12:47:25 +0200
Message-ID:
Content-Type:
multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-AKZWW0+WtWnGHDCnPtHf"
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (1085 bytes) , tabularcount.tex (935 bytes) , signature.asc (180 bytes)
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.

ATOM RSS1 RSS2