aboutsummaryrefslogtreecommitdiff
path: root/examples/slide/skr/local.skr
blob: 2802a5374df230873efa50c934340ca0e47b5667 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
;*=====================================================================*/
;*    serrano/prgm/project/skribe/examples/slide/skr/local.skr         */
;*    -------------------------------------------------------------    */
;*    Author      :  Manuel Serrano                                    */
;*    Creation    :  Mon Jun  3 15:32:25 2002                          */
;*    Last change :  Wed Oct  8 16:22:42 2003 (serrano)                */
;*    Copyright   :  2002-03 Manuel Serrano                            */
;*    -------------------------------------------------------------    */
;*    The local style of the presentation                              */
;*=====================================================================*/

;* {*---------------------------------------------------------------------*} */
;* {*    fg ...                                                           *} */
;* {*---------------------------------------------------------------------*} */
;* (define (fg c . body)                                               */
;*    (apply color :fg c body))                                        */
;*                                                                     */
;* {*---------------------------------------------------------------------*} */
;* {*    bg ...                                                           *} */
;* {*---------------------------------------------------------------------*} */
;* (define (bg c . body)                                               */
;*    (apply color :bg c body))                                        */
;*                                                                     */
;*---------------------------------------------------------------------*/
;*    colors ...                                                       */
;*---------------------------------------------------------------------*/
(define (green body)
   (fg "darkgreen" body))
(define (red body)
   (fg "red" body))
(define (blue body)
   (bold (fg "darkblue" body)))
(define (magenta body)
   (fg "darkmagenta" body))
(define (orange body)
   (fg "darkorange" body))

;*---------------------------------------------------------------------*/
;*    em ...                                                           */
;*---------------------------------------------------------------------*/
(define (em body)
   (bold (magenta body)))

;*---------------------------------------------------------------------*/
;*    st ...                                                           */
;*---------------------------------------------------------------------*/
(define (st body)
   (sf (red body)))

;*---------------------------------------------------------------------*/
;*    citem ...                                                        */
;*---------------------------------------------------------------------*/
(define-markup (citem #!rest opt #!key (color "black") (shape (math 'bullet)))
   (item (list (fg color shape) " " (the-body opt))))

;*---------------------------------------------------------------------*/
;*    skribe-prgm ...                                                  */
;*---------------------------------------------------------------------*/
(define-markup (skribe-prgm #!rest opt #!key file definition)
   (cond
      ((and definition file)
       (font :size -4
	     (color :bg "#ccffcc" (prog (source :language skribe
						:file file
						:definition definition)))))
      (file
       (font :size -4
	     (color :bg "#ccffcc" (prog (source :language skribe
						:file file)))))
      (else
       (font :size -4
	     (color :bg "#ccffcc" (prog (source :language skribe
						(the-body opt))))))))