#18292: Fix HTML output
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner:
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.7
Component: notebook | Resolution:
Keywords: | Merged in:
Authors: Volker Braun | Reviewers: Andrey Novoseltsev
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vbraun/fix_html_output | 6def164370b96868c373f85ed81fe861cc2e336e
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by novoselt):
Replying to [comment:55 kcrisman]:
> Would `show(html(*args, **kwds))` do the same thing as
`pretty_print(HTMLFragment(*args, **kwds))`? I can't imagine someone
stumbling upon the latter without a full training course or an incredible
dedication to reading docs.
Eventually `html(x)` should produce in a smart way an HTML representation
of x and RETURN it, so that it can be manipulated/displayed later. Right
now we have
{{{
sage: r = html(x^2)
<html><font color='black'>x^2</font></html>
}}}
which is neither a good representation, nor something returned. However,
`html("some text")` was useful so far to take a string of HTML code and
show it. I propose to keep this behaviour for backward compatibility, but
show a deprecation and instruct users to call
`pretty_print(HTMLFragment("some text"))` instead. In a year `html(x^2)`
will return a string `$x^2$` which actually has a proper type so that it
is inserted into HTML output and rendred using MathJax.
--
Ticket URL: <http://trac.sagemath.org/ticket/18292#comment:56>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.