Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove more instances of 'texttt' from jsmath output #8633

Closed
jhpalmieri opened this issue Mar 30, 2010 · 8 comments
Closed

remove more instances of 'texttt' from jsmath output #8633

jhpalmieri opened this issue Mar 30, 2010 · 8 comments

Comments

@jhpalmieri
Copy link
Member

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.

Component: misc

Author: John Palmieri

Reviewer: Andrey Novoseltsev

Merged: sage-4.4.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8633

@jhpalmieri jhpalmieri added this to the sage-4.4 milestone Mar 30, 2010
@novoselt
Copy link
Member

novoselt commented Apr 1, 2010

comment:1

Attachment: trac_8633-texttt.patch.gz

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.

@jhpalmieri
Copy link
Member Author

comment:2

Yes, it's ready for review.

@novoselt
Copy link
Member

novoselt commented Apr 1, 2010

Reviewer: Andrey Novoseltsev

@jhpalmieri
Copy link
Member Author

Merged: sage-4.4.alpha0

@jhpalmieri
Copy link
Member Author

comment:5

Merged "trac_8633-texttt.patch" in 4.4.alpha0.

@jasongrout
Copy link
Member

comment:6

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.

@jhpalmieri
Copy link
Member Author

comment:7

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.

@jhpalmieri
Copy link
Member Author

comment:8

(Oh, and add a doctest in the patch.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants