From a3b3374c9b4bd141d324dae5eacf29319c0a2bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Thu, 6 Jul 2017 11:11:54 +0200 Subject: [PATCH] Allow $ and 16601 to take zero arguments. --- dollar.rkt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dollar.rkt b/dollar.rkt index 080f51591..52fb12e0e 100644 --- a/dollar.rkt +++ b/dollar.rkt @@ -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])))