www

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

math.rkt (774B)


      1 #lang at-exp racket
      2 
      3 (provide setup-math)
      4 
      5 (require scribble/html-properties
      6          scribble/latex-properties
      7          scribble/base
      8          scribble/core)
      9 
     10 (require scriblib/render-cond)
     11 
     12 (require "unicode-chars.sty.rkt")
     13 
     14 (define setup-math
     15   (cond-element
     16    [(and (or html))
     17     (elem #:style (style #f (list)) '())]
     18    [latex
     19     (elem #:style (style
     20                    #f (list (tex-addition (string->bytes/utf-8 @string-append{
     21 %\overfullrule=2cm
     22 \usepackage[scaled=0.7]{beramono}
     23 \usepackage{newunicodechar}
     24 %\newunicodechar{ᵢ}{\ensuremath{_1}}
     25 
     26 \usepackage{xcolor}
     27 \hypersetup{
     28  unicode=true,
     29  colorlinks=true,
     30  linkcolor={red!50!white!50!black},
     31  citecolor={blue!50!black},
     32  urlcolor={blue!80!black},
     33 }
     34 
     35 @unicode-chars
     36 }))))
     37           "")]
     38    [else (elem)]))