Allow $ and 16601 to take zero arguments.

This commit is contained in:
Georges Dupéron 2017-07-06 11:11:54 +02:00
parent 8b439678f3
commit a3b3374c9b

View File

@ -314,19 +314,19 @@ EOTEX
($$-html-handler $$-mathjax)
(void))
(define ($ s . strs)
(define ($ . strs)
(let ([$- ($-html-handler)])
(cond-element
[html ($- `(,s . ,strs))]
[latex (elem #:style math-inline-style-latex `(,s ,@strs))]
[html ($- strs)]
[latex (elem #:style math-inline-style-latex strs)]
;; TODO: use a unicode representation of math, e.g. x^2 becomes x²
[else `(,s . ,strs)])))
[else strs])))
(define ($$ s . strs)
(define ($$ . strs)
(let ([$$- ($$-html-handler)])
(cond-element
[html ($$- `(,s . ,strs))]
[latex (elem #:style math-display-style-latex `(,s ,@strs))]
[html ($$- strs)]
[latex (elem #:style math-display-style-latex strs)]
;; TODO: use a spatial representation of display math, e.g.
;; \sum_{i=0}^n x_i^2
;; becomes:
@ -341,4 +341,4 @@ EOTEX
;; n
;; ∑ xᵢ²
;; i=0
[else `(,s . ,strs)])))
[else strs])))