Ticket #4076 (closed defect: fixed)
[with patch, positive review] notebook -- <$> ... </$> and <$$> ... </$$> don't work in the notebook as the help page claims
| Reported by: | TimothyClemans | Owned by: | boothby |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.2 |
| Component: | notebook | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
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@… available at http://spreadsheets.google.com/pub?key=pCwvGVwSMxTzT6E2xNdo5fA
Attachments
Change History
comment:1 Changed 5 years ago 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
comment:2 Changed 5 years ago by mhansen
Isn't the right fix to correct the documentation instead? I don't see why we'd want to support <$>, etc.
comment:3 Changed 5 years ago by TimothyClemans
I thought about that doing that, but decided to be back compatible with old documentation.
comment:4 Changed 5 years ago 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.
comment:6 Changed 5 years ago 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.
comment:7 Changed 5 years ago 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.
comment:8 Changed 5 years ago by mabshoff
I think sage-4076_1.patch is still needed.
Timothy: can you comment?
Cheers,
Michael
comment:10 Changed 5 years ago 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

