On Jan 25, 10:44 pm, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote:
> On 25 led, 21:40, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
> > sage: 'x^2'
> > sage: type(factor)
>
> > both work fine.
>
> A similar problem:
> sage:'x_2'  (with checked Typeset button)
> and
> sage: view('x_2')
> produce unwanted backslash (but the TeX code "\hbox{x\_2}" is O.K. and
> jsmath should not include the backslash)

Try the patch at <http://trac.sagemath.org/sage_trac/ticket/8084>.
The underscore issue is still present to some degree, mainly because
'x_2' is not valid LaTeX (as opposed to '$x_2$').  I think it looks
okay in the notebook now, but view('x_2') looks bad from the command
line.  But this is to be expected, I think: from the command line,
"view" creates a file containing the string and runs LaTeX on it, so
if you pass it bad LaTeX, it will produce bad output.

Things to test before and after the patch, from the command-line and
from the notebook:

sage: view(type(factor))
sage: view(type(Sq(3)))    # to make sure types with underscores in
their name look okay
sage: view('x^2')  # invalid LaTeX, looks bad from the command line
sage: view('$x^2$')
sage: view('x_2')  # invalide LaTeX
sage: view('$x_2$')

and the same things with "show" instead of "view".  Also, probably the
same kinds of things but just evaluating the strings with the Typeset
button checked.  What else should be tested?

--
John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to