MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

MakeExpression on a list

  • To: mathgroup at
  • Subject: [mg132141] MakeExpression on a list
  • From: Yi Wang <tririverwangyi at>
  • Date: Tue, 24 Dec 2013 02:18:29 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Dear all, 

I was trying to use MakeExpression to translate 

Subscript[f, \[FilledSmallSquare]]



Currently, I can do it with


    := MakeExpression[RowBox[
        {f, "[",Sequence@@Riffle[Map[ToBoxes[#,form]&,X],","],"]"}],form]

However, I was wondering if there are simpler ways (using Riffle to make a sequence of strings seems stupid). Especially, why the following doesn't work:

    := MakeExpression[f,form][x,y,z,t]

Thank you very much in advance!


I know I could use the Notation package, or directly write

    := MakeExpression[RowBox[{f, "[x,y,z,t]"}],form]

However, I would like to be able to change coordinate, say X={x,y,z,t} into X={r, theta, phi, t} and use the same code to parse input. Thus I don't want to hard code "[x,y,z,t]". Also the Notation package doesn't seem to provide such flexibility. 

Merry Christmas and happy new year!

  • Prev by Date: Why are only the cuboids near the surfaces visible?
  • Next by Date: Re: Mathworld Utility Packages
  • Previous by thread: Why are only the cuboids near the surfaces visible?
  • Next by thread: Re: MakeExpression on a list