Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Substituting numerical values without partial evaluation.

Given an expression of the form:

   var('x y')
   e = x*y + 1
   

I would like to be able to substitute numerical values into an expression without it being simplified. I'm not too concerned about seeing it in the notebook, but I would like the latex display to be affected. In other words, I would like the equivalent of:

   latex(e(x=5,y=6))   =>   "5 \times 6 + 1"
   

Any hope of doing this? I could substitute into the text of the latex, but then I would get "5 6 + 1".