[NTG-context] xtable headers and handlecsv loop
Geert Dobbels
dobbels.geert at googlemail.com
Fri Apr 3 15:16:19 CEST 2020
Pablo,
Gracias, your suggestion with \rownums works. I will try this one too,
since it is a simpler solution. By the way, All information I have
about handlecsv comes from the PDF file you wrote. \rownums and \lineno
are not explained in this document. Do you know of documentation that
describes those aspects ?
Geert
On 03/04/2020 13:34, Pablo Rodriguez wrote:
> On 4/3/20 12:31 PM, Pablo Rodriguez wrote:
>> On 4/3/20 11:57 AM, Geert Dobbels wrote:
>>> [...]
>>> So in my second \doloopfromto I give the second argument a number
>>> high enough to be sure it reads all the lines. It works fine, but I
>>> would like to know if there is a way to read the number of lines in
>>> the csv file to use the exact number of lines, instead of guessing.
>> If \numrows doesn’t fit your needs, please provide a CSV file with fake
>> data. I cannot guess why a second loop might be required.
> Hi Geert,
>
> this approach is simpler:
>
> \starttext
> \startxtable
> \startxtablehead[head]
> \doloopif{\lineno}{<}{2}{\getbuffer[loop]}
> \stopxtablehead
> \startxtablebody
> \doloopif{\lineno}{>}{1}{\getbuffer[loop]}
> \stopxtablebody
> \stopxtable
> \stoptext
>
> Only loop header with CSV lines numbered below 2, and loop boody with
> CSV lines numbered above 1.
>
> Pablo
> --
> http://www.ousia.tk
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
More information about the ntg-context
mailing list