Fixed MathJax support, I'm definitely sure I had tested it at some point, but it seems that it was broken due to several factors!
This commit is contained in:
parent
e2ac677fa5
commit
c3f96e43a7
2
MathJax/config/default.js
vendored
2
MathJax/config/default.js
vendored
|
@ -341,7 +341,7 @@ MathJax.Hub.Config({
|
||||||
// restart processing within an element that has been marked as
|
// restart processing within an element that has been marked as
|
||||||
// ignored above.
|
// ignored above.
|
||||||
//
|
//
|
||||||
processClass: "texMath" //"tex2jax_process",
|
processClass: "texMath", //"tex2jax_process",
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set to "true" to allow \$ to produce a dollar without starting in-line
|
// Set to "true" to allow \$ to produce a dollar without starting in-line
|
||||||
|
|
48
dollar.rkt
48
dollar.rkt
|
@ -216,28 +216,30 @@ EOTEX
|
||||||
(void))
|
(void))
|
||||||
|
|
||||||
(define ($ s . strs)
|
(define ($ s . strs)
|
||||||
(cond-element
|
(let ([$- ($-html-handler)])
|
||||||
[html (($-html-handler) `(,s . ,strs))]
|
(cond-element
|
||||||
[latex `("$" ,s ,@strs "$")]
|
[html ($- `(,s . ,strs))]
|
||||||
;; TODO: use a unicode representation of math, e.g. x^2 becomes x²
|
[latex `("$" ,s ,@strs "$")]
|
||||||
[else `(,s . ,strs)]))
|
;; TODO: use a unicode representation of math, e.g. x^2 becomes x²
|
||||||
|
[else `(,s . ,strs)])))
|
||||||
|
|
||||||
(define ($$ s . strs)
|
(define ($$ s . strs)
|
||||||
(cond-element
|
(let ([$$- ($$-html-handler)])
|
||||||
[html (($$-html-handler) `(,s . ,strs))]
|
(cond-element
|
||||||
[latex `("\\[" ,s ,@strs "\\]")]
|
[html ($$- `(,s . ,strs))]
|
||||||
;; TODO: use a spatial representation of display math, e.g.
|
[latex `("\\[" ,s ,@strs "\\]")]
|
||||||
;; \sum_{i=0}^n x_i^2
|
;; TODO: use a spatial representation of display math, e.g.
|
||||||
;; becomes:
|
;; \sum_{i=0}^n x_i^2
|
||||||
;; n
|
;; becomes:
|
||||||
;; ───
|
;; n
|
||||||
;; ╲ 2
|
;; ───
|
||||||
;; 〉 x
|
;; ╲ 2
|
||||||
;; ╱ i
|
;; 〉 x
|
||||||
;; ───
|
;; ╱ i
|
||||||
;; i=0
|
;; ───
|
||||||
;; Or use a spatial unicode representation, so that the above becomes:
|
;; i=0
|
||||||
;; n
|
;; Or use a spatial unicode representation, so that the above becomes:
|
||||||
;; ∑ xᵢ²
|
;; n
|
||||||
;; i=0
|
;; ∑ xᵢ²
|
||||||
[else `(,s . ,strs)]))
|
;; i=0
|
||||||
|
[else `(,s . ,strs)])))
|
||||||
|
|
|
@ -91,5 +91,9 @@
|
||||||
[∀ "\\forall"]
|
[∀ "\\forall"]
|
||||||
[∃ "\\exists"]
|
[∃ "\\exists"]
|
||||||
[≡ "\\equiv"]
|
[≡ "\\equiv"]
|
||||||
[≢ "\not\\equiv"]))
|
[≢ "\not\\equiv"]
|
||||||
|
[… "\\ldots"]
|
||||||
|
[⋯ "\\cdots"]
|
||||||
|
[⋰ "\\uddots"] ;; or \iddots from package mathdots, see http://tex.stackexchange.com/a/17650
|
||||||
|
[⋱ "\\ddots"]))
|
||||||
str))
|
str))
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
@title[#:style (with-html5 manual-doc-style)]{@racketmodname[scribble-math]}
|
@title[#:style (with-html5 manual-doc-style)]{@racketmodname[scribble-math]}
|
||||||
@author[
|
@author[
|
||||||
@author+email["Georges Dupéron" "georges.duperon@gmail.com"]
|
@author+email["Jens Axel Søgaard" "jensaxel@soegaard.net"]
|
||||||
@author+email["Jens Axel Søgaard" "jensaxel@soegaard.net"]]
|
@author+email["Georges Dupéron" "georges.duperon@gmail.com"]]
|
||||||
|
|
||||||
@defmodule[scribble-math]
|
@defmodule[scribble-math]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user