add in the rest of the double barred chars (╬ and company)

and adjust the existing ones a little

original commit: d5ffb1e3c01e5f280bafc6e69c2c3eb0f30622ca
This commit is contained in:
Robby Findler 2013-02-15 21:52:09 -06:00
parent f53ec1f67f
commit a9141a3c3d

View File

@ -1055,7 +1055,8 @@
(define (combine . args) (define (combine . args)
(apply string-append (apply string-append
"\\setlength{\\unitlength}{0.05em}" "\\setlength{\\unitlength}{0.05em}"
(filter (λ (x) (not (regexp-match #rx"^[ \n]*$" x))) args))) (filter (λ (x) (not (regexp-match #rx"^[ \n]*$" x)))
(flatten args))))
(define (adjust % v) (define (adjust % v)
(define num (* % (/ v 10) 10)) (define num (* % (/ v 10) 10))
(define i-part (floor num)) (define i-part (floor num))
@ -1063,79 +1064,83 @@
(format "~a.~a" i-part d-part)) (format "~a.~a" i-part d-part))
(define (x v) (adjust 1 v)) (define (x v) (adjust 1 v))
(define (y v) (adjust 6/4 v)) (define (y v) (adjust 6/4 v))
(define upper-horizontal @list{\put(@x[0],@y[6]){\line(1,0){@x[10]}}})
(define lower-horizontal @list{\put(@x[0],@y[4]){\line(1,0){@x[10]}}})
(define righter-vertical @list{\put(@x[6],@y[10]){\line(0,-1){@y[10]}}})
(define lefter-vertical @list{\put(@x[4],@y[10]){\line(0,-1){@y[10]}}})
(define bottom-right @list{\put(@x[6],@y[4]){\line(1,0){@x[4]}}
\put(@x[6],@y[0]){\line(0,1){@y[4]}}})
(define bottom-left @list{\put(@x[0],@y[4]){\line(1,0){@x[4]}}
\put(@x[4],@y[0]){\line(0,1){@y[4]}}})
(define upper-right @list{\put(@x[6],@y[6]){\line(1,0){@x[4]}}
\put(@x[6],@y[10]){\line(0,-1){@y[4]}}})
(define upper-left @list{\put(@x[0],@y[6]){\line(1,0){@x[4]}}
\put(@x[4],@y[10]){\line(0,-1){@y[4]}}})
(define header @list{\begin{picture}(@x[10],@y[10])(0,0)})
(define footer @list{\end{picture}})
(case c (case c
[(#\╔) @combine{\begin{picture}(@x[10],@y[10])(0,0) [(#\╔)
\put(@x[4],@y[6]){\line(1,0){@x[6]}} @combine{@header
\put(@x[6],@y[4]){\line(1,0){@x[6]}} \put(@x[4],@y[6]){\line(1,0){@x[6]}}
\put(@x[4],@y[0]){\line(0,1){@y[6]}} \put(@x[4],@y[0]){\line(0,1){@y[6]}}
\put(@x[6],@y[0]){\line(0,1){@y[4]}} @bottom-right
\end{picture}}] @footer}]
[(#\═) @combine{\begin{picture}(@x[10],@y[10])(0,0) [(#\═) @combine{@header
\put(@x[0],@y[6]){\line(1,0){@x[10]}} @upper-horizontal
\put(@x[0],@y[4]){\line(1,0){@x[10]}} @lower-horizontal
\end{picture}}] @footer}]
[(#\╦) @combine{\begin{picture}(@x[10],@y[10])(0,0) [(#\╗) @combine{@header
\put(@x[0],@y[6]){\line(1,0){@x[10]}} \put(@x[0],@y[6]){\line(1,0){@x[6]}}
\put(@x[0],@y[4]){\line(1,0){@x[4]}} \put(@x[6],@y[0]){\line(0,1){@y[6]}}
\put(@x[4],@y[0]){\line(0,1){@y[4]}} @bottom-left
\put(@x[6],@y[0]){\line(0,1){@y[4]}} @footer}]
\put(@x[6],@y[4]){\line(1,0){@x[4]}} [(#\║) @combine{@header
\end{picture}}] @lefter-vertical
[(#\╩) @combine{\begin{picture}(@x[10],@y[10])(0,0) @righter-vertical
\put(@x[0],@y[4]){\line(1,0){@x[10]}} @footer}]
\put(@x[0],@y[6]){\line(1,0){@x[4]}} [(#\╚) @combine{@header
\put(@x[4],@y[6]){\line(0,1){@y[4]}} @upper-right
\put(@x[6],@y[6]){\line(0,1){@y[4]}} \put(@x[4],@y[4]){\line(1,0){@x[6]}}
\put(@x[6],@y[6]){\line(1,0){@x[4]}} \put(@x[4],@y[10]){\line(0,-1){@y[6]}}
\end{picture}}] @footer}]
[(#\╣) @combine{\begin{picture}(@x[10],@y[10])(0,0) [(#\╝)
\put(@x[6],@y[0]){\line(0,1){@y[10]}} @combine{@header
\put(@x[4],@y[0]){\line(0,1){@y[4]}} @upper-left
\put(@x[0],@y[4]){\line(1,0){@x[4]}} \put(@x[0],@y[4]){\line(1,0){@x[6]}}
\put(@x[0],@y[6]){\line(1,0){@x[4]}} \put(@x[6],@y[10]){\line(0,-1){@y[6]}}
\put(@x[4],@y[6]){\line(0,1){@y[4]}} @footer}]
\end{picture}}] [(#\╣)
[(#\╠) @combine{\begin{picture}(@x[10],@y[10])(0,0) @combine{@header
\put(@x[4],@y[0]){\line(0,1){@y[10]}} @upper-left
\put(@x[6],@y[0]){\line(0,1){@y[4]}} @bottom-left
\put(@x[6],@y[4]){\line(1,0){@x[4]}} @righter-vertical
\put(@x[6],@y[6]){\line(1,0){@x[4]}} @footer}]
\put(@x[6],@y[6]){\line(0,1){@y[4]}} [(#\╠)
\end{picture}}] @combine{@header
[(#\╬) @combine{\begin{picture}(@x[10],@y[10])(0,0) @upper-right
\put(@x[4],@y[0]){\line(0,1){@y[4]}} @bottom-right
\put(@x[0],@y[4]){\line(1,0){@x[4]}} @lefter-vertical
\put(@x[0],@y[6]){\line(1,0){@x[4]}} @footer}]
\put(@x[4],@y[6]){\line(0,1){@y[4]}} [(#\╩)
\put(@x[6],@y[0]){\line(0,1){@y[4]}} @combine{@header
\put(@x[6],@y[4]){\line(1,0){@x[4]}} @upper-right
\put(@x[6],@y[6]){\line(1,0){@x[4]}} @upper-left
\put(@x[6],@y[6]){\line(0,1){@y[4]}} @lower-horizontal
\end{picture}}] @footer}]
[(#\╗) @combine{\begin{picture}(@x[10],@y[10])(0,0) [(#\╦)
\put(@x[0],@y[6]){\line(1,0){@x[6]}} @combine{@header
\put(@x[0],@y[4]){\line(1,0){@x[4]}} @bottom-right
\put(@x[6],@y[0]){\line(0,1){@y[6]}} @bottom-left
\put(@x[4],@y[0]){\line(0,1){@y[4]}} @upper-horizontal
\end{picture}}] @footer}]
[(#\║) @combine{\begin{picture}(@x[10],@y[10])(0,0) [(#\╬)
\put(@x[4],@y[10]){\line(0,-1){@y[10]}} @combine{@header
\put(@x[6],@y[10]){\line(0,-1){@y[10]}} @upper-left
\end{picture}}] @bottom-left
[(#\╚) @combine{\begin{picture}(@x[10],@y[10])(0,0) @upper-right
\put(@x[4],@y[4]){\line(1,0){@x[6]}} @bottom-right
\put(@x[6],@y[6]){\line(1,0){@x[4]}} @footer}]))
\put(@x[4],@y[10]){\line(0,-1){@y[6]}}
\put(@x[6],@y[10]){\line(0,-1){@y[4]}}
\end{picture}}]
[(#\╝) @combine{\begin{picture}(@x[10],@y[10])(0,0)
\put(@x[0],@y[4]){\line(1,0){@x[6]}}
\put(@x[0],@y[6]){\line(1,0){@x[4]}}
\put(@x[4],@y[10]){\line(0,-1){@y[4]}}
\put(@x[6],@y[10]){\line(0,-1){@y[6]}}
\end{picture}}]))
;; ---------------------------------------- ;; ----------------------------------------