Ticket #4714: trac_4714-sagenb_hard_code_macros.patch

File trac_4714-sagenb_hard_code_macros.patch, 1.5 KB (added by mpatel, 11 years ago)

Hard-code jsMath macros. Apply to sagenb repository.

  • sagenb/misc/misc.py

    # HG changeset patch
    # User Mitesh Patel <qed777@gmail.com>
    # Date 1256272715 25200
    # Node ID 0990301d58fd7bafdfb580eefddf0acde9b810c9
    # Parent  26723c6583858134ddeb44512d6b5cf885c0e692
    #4714/sagenb: Temporarily hard-code jsMath macros
    
    diff --git a/sagenb/misc/misc.py b/sagenb/misc/misc.py
    a b try: 
    180180    import sage.all
    181181    from sage.misc.latex_macros import sage_jsmath_macros
    182182except ImportError:
    183     sage_jsmath_macros = []
     183#    sage_jsmath_macros = []
     184    sage_jsmath_macros = [
     185        "jsMath.Macro('ZZ','\\\\Bold{Z}');",
     186        "jsMath.Macro('RR','\\\\Bold{R}');",
     187        "jsMath.Macro('CC','\\\\Bold{C}');",
     188        "jsMath.Macro('QQ','\\\\Bold{Q}');",
     189        "jsMath.Macro('QQbar','\\\\overline{\\\\QQ}');",
     190        "jsMath.Macro('GF','\\\\Bold{F}_{#1}',1);",
     191        "jsMath.Macro('Zp','\\\\ZZ_{#1}',1);",
     192        "jsMath.Macro('Qp','\\\\QQ_{#1}',1);",
     193        "jsMath.Macro('Zmod','\\\\ZZ/#1\\\\ZZ',1);",
     194        "jsMath.Macro('CDF','\\\\texttt{Complex Double Field}');",
     195        "jsMath.Macro('CIF','\\\\Bold{C}');",
     196        "jsMath.Macro('CLF','\\\\Bold{C}');",
     197        "jsMath.Macro('RDF','\\\\Bold{R}');",
     198        "jsMath.Macro('RIF','\\\\Bold{I} \\\\Bold{R}');",
     199        "jsMath.Macro('RLF','\\\\Bold{R}');",
     200        "jsMath.Macro('CFF','\\\\Bold{CFF}');",
     201        "jsMath.Macro('Bold','\\\\mathbf{#1}',1);"
     202        ]
    184203
    185204try:
    186205    from sage.misc.session import init as session_init