#8633 closed defect (fixed)
remove more instances of 'texttt' from jsmath output
Reported by: | jhpalmieri | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-4.4 |
Component: | misc | Keywords: | |
Cc: | Merged in: | sage-4.4.alpha0 | |
Authors: | John Palmieri | Reviewers: | Andrey Novoseltsev |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Try this in the notebook with the "Typeset" box checked:
random_matrix(ZZ, 5, 5).eigenvalues()
You will see a box saying "Unknown control sequence '\texttt'". The attached patch fixes this by replacing "\texttt" with "\hbox" before processing the LaTeX string with jsMath.
This was reported on sage-support.
Attachments (1)
Change History (9)
Changed 11 years ago by
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
- Status changed from new to needs_review
Yes, it's ready for review.
comment:3 Changed 11 years ago by
- Status changed from needs_review to positive_review
comment:4 Changed 11 years ago by
- Reviewers set to Andrey Novoseltsev
comment:5 Changed 11 years ago by
- Merged in set to sage-4.4.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
Merged "trac_8633-texttt.patch" in 4.4.alpha0.
comment:6 Changed 11 years ago by
I get the same problem on 4.4.2 with
html.table([random_matrix(ZZ, 5, 5).eigenvalues()])
even though the example in this ticket does work.
comment:7 Changed 11 years ago by
I think that the two calls to latex
in sage/misc/html.py need to be changed from
latex(XXX)
to
latex(XXX).replace('\\texttt','\\hbox')
Open another ticket, cc me, and post a patch.
comment:8 Changed 11 years ago by
(Oh, and add a doctest in the patch.)
Note: See
TracTickets for help on using
tickets.
Works for me (I had another case of \texttt - thank you for providing such a timely patch!) and for the given code.
Is it ready for review? The patch does not add any doctests, but I am not sure if it is possible to test such an issue in doctests. At least it does not break any existing ones.