Ticket #11632 (closed defect: fixed)
conf.py in thematic_tutorials overwrites jsmath macros
| Reported by: | jhpalmieri | Owned by: | mvngu |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-4.7.2 |
| Component: | documentation | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Jeroen Demeyer |
| Authors: | John Palmieri | Merged in: | sage-4.7.2.alpha4 |
| Dependencies: | Stopgaps: |
Description (last modified by leif) (diff)
Because of the line
html_theme_options['jsmath_macros'] = ["mathfrak : ['\\\\mathbf{#1}', 1]"]
in thematic_tutorials/conf.py, 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.
Attachments
Change History
comment:1 Changed 22 months 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/conf.py", 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: ↓ 3 Changed 22 months 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/conf.py
diff --git a/doc/en/thematic_tutorials/conf.py b/doc/en/thematic_tutorials/conf.py
a b htmlhelp_basename = "thematic_tutorials" 32 32 # following line turns it into bold face only when using jsMath, thus 33 33 # avoiding the errors, while keeping the nice mathfrak fonts when not 34 34 # using jsMath. 35 html_theme_options['jsmath_macros'] = ["mathfrak : ['\\\\mathbf{#1}', 1]"] 35 try: 36 html_theme_options['jsmath_macros'].append("mathfrak : ['\\\\mathbf{#1}', 1]") 37 except KeyError: 38 html_theme_options['jsmath_macros'] = ["mathfrak : ['\\\\mathbf{#1}', 1]"] 36 39 37 40 # Grouping the document tree into LaTeX files. List of tuples 38 41 # (source start file, target name, title, author,
if you think that would be a good idea.
comment:3 in reply to: ↑ 2 Changed 20 months 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 20 months ago by jhpalmieri
- Status changed from needs_work to needs_review
- Description modified (diff)
Okay, here's the new version.

