2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4
;; MODULE : format-prog-menu.scm
5
;; DESCRIPTION : local text formatting properties in prog mode
6
;; COPYRIGHT : (C) 1999 Joris van der Hoeven
8
;; This software falls under the GNU general public license version 3 or later.
9
;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10
;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
(texmacs-module (dynamic format-prog-menu)
15
(:use (generic format-edit)))
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18
;; The Font submenu in prog mode
19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21
(menu-bind prog-font-menu
23
("roman" (make-with "prog-font" "roman"))
24
(if (url-exists-in-tex? "ccr10.mf")
25
("concrete" (make-with "prog-font" "concrete")))
26
(if (url-exists-in-tex? "pnr10.mf")
27
("pandora" (make-with "prog-font" "pandora"))))
29
("Roman" (make-with "prog-font-family" "rm"))
30
("Typewriter" (make-with "prog-font-family" "tt"))
31
("Sans serif" (make-with "prog-font-family" "ss")))
33
("Medium" (make-with "prog-font-series" "medium"))
34
("Bold" (make-with "prog-font-series" "bold")))
36
("Default" (make-with "prog-font-shape" "normal"))
37
("Right" (make-with "prog-font-shape" "right"))
38
("Slanted" (make-with "prog-font-shape" "slanted"))
39
("Italic" (make-with "prog-font-shape" "italic")))
40
(-> "Size" (link font-size-menu)))
42
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
43
;; The main Format menu
44
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
46
(menu-bind prog-format-menu
49
(-> "Color" (link color-menu))
50
(-> "Scripts" (link local-supported-scripts-menu)))
52
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
;; Icons for modifying text properties
54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56
(menu-bind prog-format-icons
57
((balloon (icon "tm_italic.xpm") "Write italic text#(A-C-i)")
58
(make-with "prog-font-shape" "italic"))
59
((balloon (icon "tm_bold.xpm") "Write bold text#(A-C-b)")
60
(make-with "prog-font-series" "bold"))
61
((balloon (icon "tm_sansserif.xpm") "Use a sans serif font#(A-C-s)")
62
(make-with "prog-font-family" "ss"))
63
(if (not (in-graphics?))
64
(=> (balloon (icon "tm_color.xpm") "Select a foreground color")