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