luigi scarso wrote:
The following macro is wrong: \def\TestC{% \directlua0{% \obeyspaces \obeylines
hm, you want to expand this kin dof stuff inside the directlua?
code =[[ class Test(object): def __init__(self): self.a=[0,3,81,2,-1] self.b=self.a[:] self.a.sort()
def get(self): return self.a,self.b ]] }}
! LuaTeX error [string "luas[0]"]:1: unexpected symbol near '\'. \TestC ...def get(self): return self.a,self.b ]] }
I must preserve spaces and newlines.
Any idea ?
just use \startluacode \stopluacode ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------