| 1 | initial version |
Since the show command uses LaTeX to typeset, you can use the ~ LaTeX command. Try this:
reset()
var('x t')
sp = LatexExpr('~')
Psi = function('Psi')(x, t)
V = function('V')(x)
show('Plug', sp, Psi, ', ', diff(Psi, t), ', ', diff(Psi, x, x), sp, 'into', sp, V)
The result is $\newcommand{\Bold}[1]{\mathbf{#1}}\verb|Plug| ~ \Psi\left(x, t\right) \verb|,| \frac{\partial}{\partial t}\Psi\left(x, t\right) \verb|,| \frac{\partial^{2}}{(\partial x)^{2}}\Psi\left(x, t\right) ~ \verb|into| ~ V\left(x\right)$
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.