From 11b6094d3889a77c84b64b59d37023364339c842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 9 Aug 2017 19:02:26 +0200 Subject: [PATCH] Added unofficial #:latex-style option --- dollar.rkt | 4 ++-- katex-convert-unicode.rkt | 2 ++ mathjax-convert-unicode.rkt | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dollar.rkt b/dollar.rkt index 5c1836d03..607113f3b 100644 --- a/dollar.rkt +++ b/dollar.rkt @@ -321,11 +321,11 @@ EOTEX ;; TODO: use a unicode representation of math, e.g. x^2 becomes x² [else strs]))) -(define ($$ . strs) +(define ($$ #:latex-style [latex-style math-display-style-latex] . strs) (let ([$$- ($$-html-handler)]) (cond-element [html ($$- strs)] - [latex (elem #:style math-display-style-latex strs)] + [latex (elem #:style latex-style strs)] ;; TODO: use a spatial representation of display math, e.g. ;; \sum_{i=0}^n x_i^2 ;; becomes: diff --git a/katex-convert-unicode.rkt b/katex-convert-unicode.rkt index 11f606c9a..0e43824df 100644 --- a/katex-convert-unicode.rkt +++ b/katex-convert-unicode.rkt @@ -101,6 +101,7 @@ [⋱ "\\ddots{}"] [∌ "\\notni{}"] [ℰ "\\mathcal{E}"] + [𝒮 "\\mathcal{S}"] [• "\\bullet{}"] [|'| "{}'"] [′ "{}'"] @@ -117,6 +118,7 @@ [≟ "\\stackrel{?}{=}"] [≛ "\\stackrel{*}{=}"] [≝ "\\stackrel{\\scriptscriptstyle\\mathsf{def}}{=}"] + [∃ "\\exists{}"] )) (if (string? str) (string-replace* diff --git a/mathjax-convert-unicode.rkt b/mathjax-convert-unicode.rkt index e9d9bfde0..04e89c959 100644 --- a/mathjax-convert-unicode.rkt +++ b/mathjax-convert-unicode.rkt @@ -19,5 +19,7 @@ [❳ "\\ifmathjax{\\unicode{x2773}}\\iflatex{❳}"] [φ "\\phi"] [▷ "\\triangleright"] + [∄ "\\nexists"] + [≠ "\\neq"] )) (katex-convert-unicode str* mathmode? more-sym→*)) \ No newline at end of file