Ticket #11498 (closed enhancement: fixed)
Improve LaTeXing of strings
|Reported by:||novoselt||Owned by:||jason, mpatel, was|
|Cc:||kcrisman, jhpalmieri||Work issues:|
|Report Upstream:||N/A||Reviewers:||John Palmieri|
|Authors:||Andrey Novoseltsev||Merged in:||sage-4.7.2.alpha0|
Description (last modified by novoselt) (diff)
See the attached PDF for an example of a class that has no _latex_. All commands are repeated twice, one with Sage-4.7 and the second one with the patch applied. In both cases typeset checkbox on the top of the worksheet was tuned on.
Also, I invite you to try
in the notebook with typeset mode on before and after the patch - such situations are precisely the ones that I wanted to solve (they are so bad, that printout does not reflect them accurately).
It is possible that user classes will not have customized latex method and there are some standard classes that use their string representation. If this representation includes multiple lines, the result in most cases is not very good and sometimes quite horrible, making it unpleasant to use the notebook in typeset mode. The patch aims to fix this situation and clean up latex module along the way.
The major change is in sage.latex.str_function. Also sage.latex.JSMath.eval is simplified a bit and does not alter the code almost at all anymore. The rest are mostly doctest adjustments and some code clean-up and simplifications which happened while I was going through it to understand how it works.
- Status changed from new to needs_review
- Description modified (diff)
comment:13 Changed 22 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-4.7.2.alpha0