Opened 11 years ago

Last modified 11 years ago

#11632 closed defect in thematics tutorial overwrites jsmath macros — at Version 4

Reported by: jhpalmieri Owned by: mvngu
Priority: minor Milestone: sage-4.7.2
Component: documentation Keywords:
Cc: Merged in:
Authors: John Palmieri Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jhpalmieri)

Because of the line

html_theme_options['jsmath_macros'] = ["mathfrak : ['\\\\mathbf{#1}', 1]"]

in thematics_tutorials/, existing jsmath macros are overwritten, so Sage-specific macros like \QQ don't work. The attached patch fixes this.

Apply trac_11632-thematic-conf.v2.patch to the main Sage repository.

Change History (6)

Changed 11 years ago by jhpalmieri

comment:1 Changed 11 years ago by hivert

Hi john,

Is there any missing dependencies ? On

popcorn-*evel/sage-review $ sage -version
| Sage Version 4.7, Release Date: 2011-05-23                         |

with just the patch applied I get:

Exception occurred:
  File "/home/florent/src/Sage/sage/devel/sage/doc/en/thematic_tutorials/", line 35, in <module>
    html_theme_options['jsmath_macros'].append("mathfrak : ['\\\\mathbf{#1}', 1]")
KeyError: 'jsmath_macros'
The full traceback has been saved in /tmp/sphinx-err-IGtEC6.log, if you want to report the issue to the developers.

Or should it be applied on some dev version ?

comment:2 follow-up: Changed 11 years ago by jhpalmieri

  • Status changed from new to needs_review

I can't reproduce this; I've tried on two different machines with vanilla versions of Sage 4.7. (I wrote the patch based on 4.7.1.rc0, but I don't think anything relevant has changed since 4.7.) I can change the patch to

  • doc/en/thematic_tutorials/

    diff --git a/doc/en/thematic_tutorials/ b/doc/en/thematic_tutorials/
    a b htmlhelp_basename = "thematic_tutorials" 
    3232# following line turns it into bold face only when using jsMath, thus
    3333# avoiding the errors, while keeping the nice mathfrak fonts when not
    3434# using jsMath.
    35 html_theme_options['jsmath_macros'] = ["mathfrak : ['\\\\mathbf{#1}', 1]"]
     36    html_theme_options['jsmath_macros'].append("mathfrak : ['\\\\mathbf{#1}', 1]")
     37except KeyError:
     38    html_theme_options['jsmath_macros'] = ["mathfrak : ['\\\\mathbf{#1}', 1]"]
    3740# Grouping the document tree into LaTeX files. List of tuples
    3841# (source start file, target name, title, author,

if you think that would be a good idea.

comment:3 in reply to: ↑ 2 Changed 11 years ago by jdemeyer

  • Status changed from needs_review to needs_work

Replying to jhpalmieri:

if you think that would be a good idea.

Yes, please do it. The problem mentioned by hivert is reproducible with sage-4.7.2.alpha3 (note you need to delete the devel/sage/doc/output directory before testing).

comment:4 Changed 11 years ago by jhpalmieri

  • Description modified (diff)
  • Status changed from needs_work to needs_review

Okay, here's the new version.

Changed 11 years ago by jhpalmieri

Note: See TracTickets for help on using tickets.