MathGroup Archive 2003

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

Search the Archive

Manipulating "non-meaningful" expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39522] Manipulating "non-meaningful" expressions
  • From: matija at scientist.com (Matija Pretnar)
  • Date: Fri, 21 Feb 2003 04:07:58 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I am writing a program in Mathematica that would allow TeX-macro-like
typesetting functions in front-end.
I would for example enter
defineMacro[list[item_], {item/.i->1, item/.i->2, ..., item/.i->n]
and that would allow me to evaluate list[x_i,i] in place and to
recieve
{x_1, x_2, ..., x_n}, which would speed up typing a lot.

This case works, because Mathematica understands {...} as a list. On
the other hand, I would like to define vec[x] to be (x_1, x_2, ...,
x_n). But I can not convince Mathematica to process this kind of
expression, although I would only like to manipulate boxes and not to
evaluate their contents.

I can not simply do a string replace, because I would not enter my
input pattern (item in list[item_]) as a string but as a collection of
boxes.

Any ideas?

Matija



  • Prev by Date: Re: series expansions in two variables problem
  • Next by Date: TimeConstrained & Power cause segmentation fault
  • Previous by thread: Re: Re: DigitBlock problem
  • Next by thread: Re: Manipulating "non-meaningful" expressions