Skip to content
  • Alexander Rieder's avatar
    fix typesetting for newer sage versions · 9ae29115
    Alexander Rieder authored
    Since version 4.12 sage doesn't support the command sage.misc.latex.pretty_print_default anymore.
    Instead we use the %display ipython magic. In order to keep the code clean the
    specific commands have moved to a dedicated python function "__cantor_enable_typesetting(enable)"
    that gets declared on init and called by the backend when needed.
    This patch also introduces a finer handling of version numbers instead of just having a simple
    "legacy mode".
    
    Tested with Sage versions 5.10 (old commands) and 5.12 (new command)
    
    CCBUG: 327259
    FIXED-IN: 4.12
    (cherry picked from commit c3626842)
    9ae29115