Skip to Content.
Sympa Menu

texmacs-users - Re: convert list into table

Subject: mailing-list for TeXmacs Users

List archive

Re: convert list into table


Chronological Thread 
  • From: vincent douce <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: Re: convert list into table
  • Date: Sun, 3 Mar 2024 10:56:00 +0100

hello Giovanni
thanks for your response
i dont really know how to find your tm-forge
i am interseted in using Scheme to transform my list
but i would need a little step-to-step
i know how to write Scheme in my-init-texmacs but not in a texmacs file itself
that’s just the point i am missing…
Vinz

> Le 3 mars 2024 à 10:51, Giovanni Piredda <address@hidden> a écrit :
>
> I put on tm-forge a plugin that _almost_ does what you want. It is called
> csv-table.
>
> I am planning to improve it in the next few weeks, making it adherent to
> the csv format specifications, but I still have the impression that it will
> do something slightly different from what you ask. I can send you the code
> for the improved version; I think it works, I need to test it once more and
> to improve the documentation before putting it on tm-forge (and maybe
> something that I am forgetting).
>
> On to the (IMO) important detail, what would you like to do with the list
> in brackets (square parentheses)? Should it go in a single cell, or each
> element in its own cell?
>
> Finally, with Scheme it is pretty straightforward to transform your
> collection of lists into a table; you have to
>
> - process the brackets so that they are transformed into something that
> Scheme deals with easily
>
> - add a cell tag in front of each element, a row tag in front of each row,
> a table tag in front of the collection.
>
> This would make something that works for the lists you posted and may not
> work for other lists.
>
> Let me know.
>
> Giovanni
>
> On 02/03/24 17:28, vincent douce wrote:
>> hello
>> i’v got this list from python
>>
>> (3388, 490, 14, [448, 42, 28, 14])
>> (588, 77, 7, [49, 28, 21, 14, 7])
>> (4410, 154, 14, [98, 56, 42, 28, 14])
>> (2772, 1815, 33, [957, 858, 99, 33])
>> (2205, 165, 15, [60, 45, 30, 15])
>> (21175, 7986, 121, [5203, 2783, 2420, 726])
>> (198, 121, 11, [77, 44, 33, 22, 11])
>> (630, 396, 18, [234, 162, 72, 36])
>> (7350, 539, 49, [343, 196, 147, 98, 49])
>> (3675, 990, 15, [705, 285, 135, 45])
>> (140, 11, 1, [8, 3, 2, 1])
>> (6468, 3630, 66, [2838, 792, 462, 396, 66])
>> (847, 495, 11, [352, 143, 66, 33])
>> (220, 175, 5, [45, 40, 15, 10, 5])
>>
>> that’s exercises for arithmetic
>>
>> i want to present them into a TeXmacs’ table or tabular
>> is there an automatic way to do it ?
>>
>> Vinz




Archive powered by MHonArc 2.6.24.

Top of Page