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