-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconstructions.lisp
54 lines (43 loc) · 1.22 KB
/
constructions.lisp
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
;;;; constructions.lisp
;;;;
;;;; Copyright (c) 2013-2014 Robert Smith
;;;;
;;;; Various constructions based off of primitive constructions.
(in-package #:formulador)
(defun glue (&rest items)
"Glue together (horizontally) all of ITEMS."
(row-box items))
(defun tape (&rest items)
"Tape together (horizontally) all of ITEMS."
(row-box items :padding 1))
(defvar +center-dot+ (freeze (box (code-char #xB7))))
(defvar +cdots+ (freeze (glue +center-dot+
+center-dot+
+center-dot+)))
(defvar +partial+ (freeze (box (code-char #x2202))))
(defvar +sigma+
(freeze
(picture-box '("==="
"\\"
" >"
"/"
"===")
:baseline 2))
"The capital sigma symbol used for summation.")
(defvar +integral+
(freeze
(picture-box '("/"
"|"
"|"
"|"
"/")
:baseline 2))
"A standard integral symbol.")
(defvar +double-integral+
(freeze
(glue +integral+ +integral+))
"A double integral symbol.")
(defvar +triple-integral+
(freeze
(glue +integral+ +integral+ +integral+))
"A triple integral symbol.")