-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.rules
executable file
·37 lines (32 loc) · 1.13 KB
/
default.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(use xmltex.latex)
(define accented-chars
(append-map (lambda (h)
(map (lambda (t)
(cons (string->symbol (string-append h (car t)))
(list 'tex (string-append "\\" (cdr t) "{" h "}"))))
'(("acute" . "'")
("uml" . "\"")
("circ" . "^")
("caron" . "v")
("grave" . "`")
("tilde" . "~")
("ring" . "r")
("cedil" . "c"))))
'("a" "e" "i" "u" "o" "n" "c" "y" "A" "E" "I" "U" "O" "N" "C" "Y")))
(define xml-entities
`((amp . "&") (nbsp . ,(list 'tex "\\hbox to1em{\\rule{0pt}{0.5ex}}"))
(lt . "<") (gt . ">")
(plusmn . "±")
(quot . "\"") (rsquo . "'") (lsquo . "`") (rdquo . "''") (ldquo . "``")
(ndash . " -- ") (mdash . " --- ") (bull . "・") (thinsp . " ")
,@accented-chars
))
(define-tag *PI* (ignore))
(define-tag tex (through))
(define-tag *TOP*
(define-rule
(list (doc-class "book")
(latex-packages "alltt"))
values
'()
))