Ticket #4076 (closed defect: fixed)

Opened 3 months ago

Last modified 1 month ago

[with patch, positive review] notebook -- <$> ... </$> and <$$> ... </$$> don't work in the notebook as the help page claims

Reported by: TimothyClemans Assigned to: boothby
Priority: major Milestone: sage-3.2
Component: notebook Keywords:
Cc:

Description

Help page claims:

Begin an input block with %html and it will be output as HTML. Use the <sage>...</sage> tag to do computations in an HTML block and have the typeset output inserted. Use <$>...</$> and <$$>...</$$> to insert typeset math in the HTML block. This does not require latex.

The html function clearly doesn't properly deal with the < and >.

sage: html(r'let <$>K = \mathbb{Q} 17 (\sqrt{-2})</$>')
<html><font color='black'>let <<span class="math">>K = \mathbb{Q} 17 (\sqrt{-2})</</span>></font></html>

sage: html(r'let <$$>K = \mathbb{Q} 17 (\sqrt{-2})</$$>')
<html><font color='black'>let <<div class="math">>K = \mathbb{Q} 17 (\sqrt{-2})</</div>></font></html>

The output should be the same as

sage: html(r'let $K = \mathbb{Q} 17 (\sqrt{-2})$')
<html><font color='black'>let <span class="math">K = \mathbb{Q} 17 (\sqrt{-2})</span></font></html>

sage: html(r'let $$K = \mathbb{Q} 17 (\sqrt{-2})$$')
<html><font color='black'>let <div class="math">K = \mathbb{Q} 17 (\sqrt{-2})</div></font></html>

This is based on the bug report given on 8/25/08 by john.perry@usm.edu available at http://spreadsheets.google.com/pub?key=pCwvGVwSMxTzT6E2xNdo5fA

Attachments

sage-4076_1.patch (1.5 kB) - added by TimothyClemans on 09/08/2008 06:27:15 AM.
sage-4076_2.patch (1.8 kB) - added by TimothyClemans on 09/09/2008 07:03:16 AM.

Change History

09/08/2008 06:27:15 AM changed by TimothyClemans

  • attachment sage-4076_1.patch added.

09/08/2008 06:28:00 AM changed by TimothyClemans

  • summary changed from notebook -- <$> ... </$> and <$$> ... </$$> don't work in the notebook as the help page claims to [with patch, needs review] notebook -- <$> ... </$> and <$$> ... </$$> don't work in the notebook as the help page claims.

09/08/2008 07:10:05 AM changed by mhansen

Isn't the right fix to correct the documentation instead? I don't see why we'd want to support <$>, etc.

09/08/2008 11:04:12 AM changed by TimothyClemans

I thought about that doing that, but decided to be back compatible with old documentation.

09/08/2008 06:41:27 PM changed by mhansen

I think the documentation fix is the correct one since there's no real reason to support <$> and <$$> and it's just more cruft to carry around.

09/09/2008 07:03:16 AM changed by TimothyClemans

  • attachment sage-4076_2.patch added.

09/09/2008 07:03:47 AM changed by TimothyClemans

Patch sage-4076_2.patch fixes the documentation.

10/17/2008 04:08:00 PM changed by jhpalmieri

I'm confused; am I just supposed to use sage-4076_2.patch and ignore sage-4076_1.patch? If so, this gets a positive review -- it's a simple change to the notebook help page.

10/24/2008 10:29:09 AM changed by jhpalmieri

  • summary changed from [with patch, needs review] notebook -- <$> ... </$> and <$$> ... </$$> don't work in the notebook as the help page claims to [with patch, positive review] notebook -- <$> ... </$> and <$$> ... </$$> don't work in the notebook as the help page claims.

I'm giving sage-4076_2.patch a positive review; it should be merged. As far as I can tell, sage-4076_1.patch is not needed, and should be discarded.

10/26/2008 06:41:56 AM changed by mabshoff

I think sage-4076_1.patch is still needed.

Timothy: can you comment?

Cheers,

Michael

10/26/2008 11:47:51 AM changed by TimothyClemans

I don't think the first one is needed.

10/26/2008 07:11:25 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from sage-3.2.1 to sage-3.2.

Merged in Sage 3.2.alpha1