Dear Gesang and Hans, Your solution is working nicely. I may use lua to simplify my other work. I'd like to ask you one more thing. I tried to write a matrix using MetaFun to add some graphics as following: label(btex $a_{11}$ etex, ( , )); label(btex $a_{12}$ etex, ( , )); label(btex $a_{13}$ etex, ( , )); … label(btex $a_{3,3}$ etex, ( , )); Since the same command is repeated, I tested to use "for" iteration. But I couldn't succeed. It is OK to use the variable as a text but I couldn't find a way to use a variable as a subscript. For example, for i=1 unto 3: label(btex decimal(i) etex, (x,y)); endfor; is OK. But, for i=1 upto 3: label(btex $a_{i}$ etex, (x,y)); endfor; or for i=1 upto 3: label(btex $a_{deciaml(i)}$ etex, (x,y)); endfor; are not working as I wanted. Is there a way to use variable as a subscript in "label"? Thank you again. Best regards, Dalyoung