On 3/19/2017 5:56 PM, Wolfgang Schuster wrote:
Otared Kavian mailto:otared@gmail.com 19. März 2017 um 17:46via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach Hi Aditya,
Thanks, as Thomas, Pablo and you mentioned the right way is to use context() instead of tex.print() Actually I just saw that one can also concatenate with context() as in:
context("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par")
which is equivalent to tex.print("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par") You can use the string.formatters function for this.
\starttext
\startluacode
local string_a = "12" local string_b = "23"
context(string.formatters["(%s,%s)"](string_a,string_b))
\stopluacode
\stoptext
\starttext \startluacode local string_a = "12" local string_b = "23" context("(%s,%s)",string_a,string_b) context.formatted.bold("(%s,%s)",string_a,string_b) \stopluacode \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------