sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.16k stars 211 forks source link

syntax highlighting in sagews print (to html) is wrong #2560

Open williamstein opened 6 years ago

williamstein commented 6 years ago
  1. Put this in a Sage worksheet:
    
    %r

Square <- function(x) { return(x^2) }


2. Notice that "function" is colored.
3. Click print to pdf icon in upper right and open.
4. Notice that "function" is black.

Thus the syntax highlighting is wrong -- it is just using python mode always.

I noticed this partly because I just implemented this properly for the share server, where function will look right in our sage worksheet.
williamstein commented 2 weeks ago

Tagging this as wontfix, because it will be fixed indirectly by creating a sage worksheet style mode (and kernel) for Jupyter notebooks. That will be https://github.com/sagemathinc/cocalc/issues/6374.

With https://github.com/sagemathinc/cocalc/issues/6374 printing will be via Jupyter / nbconvert as usual.