Hi Pablo, Thanks for your answer: actually I did not know that it is possible to concatenate so easily in lua… Your solution is indeed simpler than what I did and solves also the problem of the spurious space before the closing parenthesis.
Best regards: OK > On 19 Mar 2017, at 16:56, Pablo Rodriguez <oi...@gmx.es> wrote: > > On 03/19/2017 04:30 PM, Otared Kavian wrote: >> Hi, >> >> I would like to print in a text the values of a array computed in a >> \startluacode …. \stopluacode combination. >> How can I do it properly? Please have a look at the example below >> and its output, which is not satisfactory because the right parenthesis is >> separated from the number by a space. How can I suppress this unwanted >> space? >> For instance I get (1, 103 ) instead of (1, 103). > > Hi Otared, > > is there any reason not to use the following instead of your way below? > > for i = 1,n do > tex.print("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par") > end > >> for i = 1,n do >> context("(") >> tex.print(vecteurX[i]) >> context(", ") >> tex.print(vecteurY[i]) >> tex.print(")") >> context.par() >> end > > I think this is shorter and clearer (to me, at least). > > Just in case it helps, > > Pablo > -- > http://www.ousia.tk > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : firstname.lastname@example.org / 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : email@example.com / 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 ___________________________________________________________________________________