1 | initial version |
I'm putting this in a different answer spot because I think you have a different question than I first thought.
What is your use case? Here are two ways to get nice-looking TeX-ish code in the notebook.
$xyz$
or $$xyz$$
will end up looking like $xyz$ or $$xyz\; .$$ This is how I usually get nicely TeXed stuff.html()
command. You can often get good stuff from that - such as html("I like the number $%s$"%5)
becomes "I like the number $5$." This requires a little use of string formatting if you want to have a variable input, but otherwise should behave normally with respect to LaTeX. I use this in interactive cells a lot.I do not know why the %latex
gives such unsatisfactory results, but my guess is that it's using some inferior font in the browser, as opposed to the jsmath fonts, which the two solutions above will use. I really don't know why sws2tex would have problems with this, but remember that sws2tex isn't necessarily about converting percent directives, but just normal Sage input. In any case, I don't think you need %latex
, given the two options above - but if you do, please reply!