sagemath / sage-shell-mode

Emacs front end for SageMath
GNU General Public License v3.0
102 stars 16 forks source link

Fix the sage-shell-view-mode #70

Closed aikrahguzar closed 1 year ago

aikrahguzar commented 1 year ago

I think this should fix #61

I haven't tested this. @EmmanuelCharpentier can you try if you have time?

It would be better to change supported_output to add OutputHtml to the supported_output of the parent class. And even better to raise the issue in sage-repository so that OutputHtml is not required to use OutputLatex.

apresta commented 1 year ago

I tried applying these changes and still ran into issues. First I had to add a missing import:

from sage.repl.rich_output.output_basic import OutputPlainText

Now I get this error: https://pastebin.com/pNL7yxNt

Looks like there are some problems with the generated LaTex code.

aikrahguzar commented 1 year ago

I tried applying these changes and still ran into issues. First I had to add a missing import:

from sage.repl.rich_output.output_basic import OutputPlainText

Now I get this error: https://pastebin.com/pNL7yxNt

Looks like there are some problems with the generated LaTex code.

@apresta seems like there were changes in the LaTeX code generated by sage that broke the assumptions made by the sage-shell-view-mode. Maybe it is something simple which you can figure out by looking at the tex file mentioned in the error log you attached and then modify the latex generation in sage-shell-view-mode accordingly.

I will close this pr since it doesn't work but if you fix the problem, please open another one.