www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README

math.rkt (850B)


      1 #lang racket
      2 
      3 ;; This file is derived from the one which can be found at:
      4 ;; https://github.com/soegaard/bracket/blob/master/docs/pr-math.rkt
      5 
      6 (require "math-scribble/math-scribble.rkt")
      7 
      8 (provide mathjax-source setup-math
      9          (all-from-out "math-scribble/math-scribble.rkt"))
     10 
     11 (require scribble/html-properties
     12          scribble/base
     13          scribble/core)
     14 
     15 (define mathjax-source
     16   "MathJax/MathJax.js"
     17   ;"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
     18   ; "http://c328740.r40.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=default"
     19   ;"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-HTML"
     20   )
     21 
     22 (define setup-math
     23   (paragraph 
     24    (style 
     25     #f (list (alt-tag "script")
     26              (attributes `((type . "text/javascript")
     27                            (src . ,mathjax-source )))))
     28    '()))