#18292: Fix HTML output
------------------------+----------------------------
   Reporter:  vbraun    |            Owner:
       Type:  defect    |           Status:  new
   Priority:  major     |        Milestone:  sage-6.7
  Component:  notebook  |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 Html output also suffers from the EMBEDDED_MODE syndrome, it should
 actually return html expressions (instead of the empty string) and not
 rely on print()ing HTML to the screen doing anything.

 The current behavior is:
 {{{
 sage: n=7
 sage: L = map(None,[p for p in prime_range(n+1) if p%4==1],[p for p in
 prime_range(n+1) if p%4==3])
 sage: L = [['',l[1]] if l[0] is None else l for l in L]
 sage: T = [['$p\equiv 1\\text{ mod }(4)$','$p\equiv 3\\text{ mod }(4)$']]
 sage: output = html(table(T+L,header_row=True))   # print() to stdout???
 <html>
 <div class="notruncate">
 <table  class="table_form">
 <tbody>
 <tr>
 <th><script type="math/tex">p\equiv 1\text{ mod }(4)</script></th>
 <th><script type="math/tex">p\equiv 3\text{ mod }(4)</script></th>
 </tr>
 <tr class ="row-a">
 <td><script type="math/tex">5</script></td>
 <td><script type="math/tex">3</script></td>
 </tr>
 <tr class ="row-b">
 <td></td>
 <td><script type="math/tex">7</script></td>
 </tr>
 </tbody>
 </table>
 </div>
 </html>
 sage: repr(output)     # what?
 ''
 sage: type(output)
 <class 'sage.misc.html.HTMLExpr'>
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18292>
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.

Reply via email to