Initial Commit
[packages] / xemacs-packages / auctex / style / kpfonts.el
1 ;;; kpfonts.el --- AUCTeX style for `kpfonts.sty' version 3.31.
2
3 ;; Copyright (C) 2013 Free Software Foundation, Inc.
4
5 ;; Maintainer: auctex-devel@gnu.org
6 ;; Author: Mosè Giordano <giordano.mose@libero.it>
7 ;; Keywords: tex
8
9 ;; This file is part of AUCTeX.
10
11 ;; AUCTeX is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 3, or (at your option)
14 ;; any later version.
15
16 ;; AUCTeX is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with AUCTeX; see the file COPYING.  If not, write to the Free
23 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 ;; 02110-1301, USA.
25
26 ;;; Commentary:
27
28 ;; This file adds support for `kpfonts.sty' version 3.31.
29
30 ;;; Code:
31
32 ;;; Kpfonts Minor Mode (heavily based on LaTeX Math Minor Mode code)
33
34 (defconst LaTeX-kpfonts-default
35   '(;; Other Greek Lowercase
36     ("o a" "otheralpha" "Other Greek Lowercase" 945) ;; #X03B1
37     ("o b" "otherbeta" "Other Greek Lowercase" 946) ;; #X03B2
38     ("o g" "othergamma" "Other Greek Lowercase" 947) ;; #X03B3
39     ("o d" "otherdelta" "Other Greek Lowercase" 948) ;; #X03B4
40     ("o e" "otherepsilon" "Other Greek Lowercase" 1013) ;; #X03F5
41     ("o z" "otherzeta" "Other Greek Lowercase" 950) ;; #X03B6
42     ("o h" "othereta" "Other Greek Lowercase" 951) ;; #X03B7
43     ("o j" "othertheta" "Other Greek Lowercase" 952) ;; #X03B8
44     (nil "otheriota" "Other Greek Lowercase" 953) ;; #X03B9
45     ("o k" "otherkappa" "Other Greek Lowercase" 954) ;; #X03BA
46     ("o l" "otherlambda" "Other Greek Lowercase" 955) ;; #X03BB
47     ("o m" "othermu" "Other Greek Lowercase" 956) ;; #X03BC
48     ("o n" "othernu" "Other Greek Lowercase" 957) ;; #X03BD
49     ("o x" "otherxi" "Other Greek Lowercase" 958) ;; #X03BE
50     ("o p" "otherpi" "Other Greek Lowercase" 960) ;; #X03C0
51     ("o r" "otherrho" "Other Greek Lowercase" 961) ;; #X03C1
52     ("o s" "othersigma" "Other Greek Lowercase" 963) ;; #X03C3
53     ("o t" "othertau" "Other Greek Lowercase" 964) ;; #X03C4
54     ("o u" "otherupsilon" "Other Greek Lowercase" 965) ;; #X03C5
55     ("o f" "otherphi" "Other Greek Lowercase" 981) ;; #X03D5
56     ("o q" "otherchi" "Other Greek Lowercase" 967) ;; #X03C7
57     ("o y" "otherpsi" "Other Greek Lowercase" 968) ;; #X03C8
58     ("o w" "otheromega" "Other Greek Lowercase" 969) ;; #X03C9
59     ("o v e" "othervarepsilon" "Other Greek Lowercase" 949) ;; #X03B5
60     ("o v j" "othervartheta" "Other Greek Lowercase" 977) ;; #X03D1
61     ("o v p" "othervarpi" "Other Greek Lowercase" 982) ;; #X03D6
62     ("o v r" "othervarrho" "Other Greek Lowercase" 1009) ;; #X03F1
63     ("o v s" "othervarsigma" "Other Greek Lowercase" 962) ;; #X03C2
64     ("o v f" "othervarphi" "Other Greek Lowercase" 966) ;; #X03C6
65     ;; Slanted Greek Lowercase
66     (nil "alphasl" "Slanted Greek Lowercase" 120572) ;; #X1D6FC
67     (nil "betasl" "Slanted Greek Lowercase" 120573) ;; #X1D6FD
68     (nil "gammasl" "Slanted Greek Lowercase" 120574) ;; #X1D6FE
69     (nil "deltasl" "Slanted Greek Lowercase" 120575) ;; #X1D6FF
70     (nil "epsilonsl" "Slanted Greek Lowercase" 120598) ;; #X1D716
71     (nil "zetasl" "Slanted Greek Lowercase" 120577) ;; #X1D701
72     (nil "etasl" "Slanted Greek Lowercase" 120578) ;; #X1D702
73     (nil "thetasl" "Slanted Greek Lowercase" 120579) ;; #X1D703
74     (nil "iotasl" "Slanted Greek Lowercase" 120580) ;; #X1D704
75     (nil "kappasl" "Slanted Greek Lowercase" 120581) ;; #X1D705
76     (nil "lambdasl" "Slanted Greek Lowercase" 120582) ;; #X1D706
77     (nil "musl" "Slanted Greek Lowercase" 120583) ;; #X1D707
78     (nil "nusl" "Slanted Greek Lowercase" 120584) ;; #X1D708
79     (nil "xisl" "Slanted Greek Lowercase" 120585) ;; #X1D709
80     (nil "pisl" "Slanted Greek Lowercase" 120587) ;; #X1D70B
81     (nil "rhosl" "Slanted Greek Lowercase" 120588) ;; #X1D70C
82     (nil "sigmasl" "Slanted Greek Lowercase" 120590) ;; #X1D70E
83     (nil "tausl" "Slanted Greek Lowercase" 120591) ;; #X1D70F
84     (nil "upsilonsl" "Slanted Greek Lowercase" 120592) ;; #X1D710
85     (nil "phisl" "Slanted Greek Lowercase" 120601) ;; #X1D719
86     (nil "chisl" "Slanted Greek Lowercase" 120594) ;; #X1D712
87     (nil "psisl" "Slanted Greek Lowercase" 120595) ;; #X1D713
88     (nil "omegasl" "Slanted Greek Lowercase" 120596) ;; #X1D714
89     (nil "varepsilonsl" "Slanted Greek Lowercase" 120576) ;; #X1D700
90     (nil "varthetasl" "Slanted Greek Lowercase" 120599) ;; #X1D717
91     (nil "varpisl" "Slanted Greek Lowercase" 120603) ;; #X1D71B
92     (nil "varrhosl" "Slanted Greek Lowercase" 120602) ;; #X1D71A
93     (nil "varsigmasl" "Slanted Greek Lowercase" 120589) ;; #X1D70D
94     (nil "varphisl" "Slanted Greek Lowercase" 120593) ;; #X1D711
95     ;; Upright Greek Lowercase
96     (nil "alphaup" "Upright Greek Lowercase" 945) ;; #X03B1
97     (nil "betaup" "Upright Greek Lowercase" 946) ;; #X03B2
98     (nil "gammaup" "Upright Greek Lowercase" 947) ;; #X03B3
99     (nil "deltaup" "Upright Greek Lowercase" 948) ;; #X03B4
100     (nil "epsilonup" "Upright Greek Lowercase" 1013) ;; #X03F5
101     (nil "zetaup" "Upright Greek Lowercase" 950) ;; #X03B6
102     (nil "etaup" "Upright Greek Lowercase" 951) ;; #X03B7
103     (nil "thetaup" "Upright Greek Lowercase" 952) ;; #X03B8
104     (nil "iotaup" "Upright Greek Lowercase" 953) ;; #X03B9
105     (nil "kappaup" "Upright Greek Lowercase" 954) ;; #X03BA
106     (nil "lambdaup" "Upright Greek Lowercase" 955) ;; #X03BB
107     (nil "muup" "Upright Greek Lowercase" 956) ;; #X03BC
108     (nil "nuup" "Upright Greek Lowercase" 957) ;; #X03BD
109     (nil "xiup" "Upright Greek Lowercase" 958) ;; #X03BE
110     (nil "piup" "Upright Greek Lowercase" 960) ;; #X03C0
111     (nil "rhoup" "Upright Greek Lowercase" 961) ;; #X03C1
112     (nil "sigmaup" "Upright Greek Lowercase" 963) ;; #X03C3
113     (nil "tauup" "Upright Greek Lowercase" 964) ;; #X03C4
114     (nil "upsilonup" "Upright Greek Lowercase" 965) ;; #X03C5
115     (nil "phiup" "Upright Greek Lowercase" 981) ;; #X03D5
116     (nil "chiup" "Upright Greek Lowercase" 967) ;; #X03C7
117     (nil "psiup" "Upright Greek Lowercase" 968) ;; #X03C8
118     (nil "omegaup" "Upright Greek Lowercase" 969) ;; #X03C9
119     (nil "varepsilonup" "Upright Greek Lowercase" 949) ;; #X03B5
120     (nil "varthetaup" "Upright Greek Lowercase" 977) ;; #X03D1
121     (nil "varpiup" "Upright Greek Lowercase" 982) ;; #X03D6
122     (nil "varrhoup" "Upright Greek Lowercase" 1009) ;; #X03F1
123     (nil "varsigmaup" "Upright Greek Lowercase" 962) ;; #X03C2
124     (nil "varphiup" "Upright Greek Lowercase" 966) ;; #X03C6
125     ;; Other Greek Uppercase
126     ("o G" "otherGamma" "Other Greek Uppercase" 120548) ;; #X1D6E4
127     ("o D" "otherDelta" "Other Greek Uppercase" 120549) ;; #X1D6E5
128     ("o J" "otherTheta" "Other Greek Uppercase" 120553) ;; #X1D6E9
129     ("o L" "otherLambda" "Other Greek Uppercase" 120556) ;; #X1D6EC
130     ("o X" "otherXi" "Other Greek Uppercase" 120559) ;; #X1D6EF
131     ("o P" "otherPi" "Other Greek Uppercase" 120561) ;; #X1D6F1
132     ("o S" "otherSigma" "Other Greek Uppercase" 120564) ;; #X1D6F4
133     ("o U" "otherUpsilon" "Other Greek Uppercase" 120566) ;; #X1D6F6
134     ("o F" "otherPhi" "Other Greek Uppercase" 120567) ;; #X1D6F7
135     ("o Y" "otherPsi" "Other Greek Uppercase" 120569) ;; #X1D6F9
136     ("o W" "otherOmega" "Other Greek Uppercase" 120570) ;; #X1D6FA
137     ;; Slanted Greek Uppercase
138     (nil "Gammasl" "Slanted Greek Uppercase" 120548) ;; #X1D6E4
139     (nil "Deltasl" "Slanted Greek Uppercase" 120549) ;; #X1D6E5
140     (nil "Thetasl" "Slanted Greek Uppercase" 120553) ;; #X1D6E9
141     (nil "Lambdasl" "Slanted Greek Uppercase" 120556) ;; #X1D6EC
142     (nil "Xisl" "Slanted Greek Uppercase" 120559) ;; #X1D6EF
143     (nil "Pisl" "Slanted Greek Uppercase" 120561) ;; #X1D6F1
144     (nil "Sigmasl" "Slanted Greek Uppercase" 120564) ;; #X1D6F4
145     (nil "Upsilonsl" "Slanted Greek Uppercase" 120566) ;; #X1D6F6
146     (nil "Phisl" "Slanted Greek Uppercase" 120567) ;; #X1D6F7
147     (nil "Psisl" "Slanted Greek Uppercase" 120569) ;; #X1D6F9
148     (nil "Omegasl" "Slanted Greek Uppercase" 120570) ;; #X1D6FA
149     ;; Upright Greek Uppercase
150     (nil "Gammaup" "Upright Greek Uppercase" 915) ;; #X0393
151     (nil "Deltaup" "Upright Greek Uppercase" 916) ;; #X0394
152     (nil "Thetaup" "Upright Greek Uppercase" 920) ;; #X0398
153     (nil "Lambdaup" "Upright Greek Uppercase" 923) ;; #X039B
154     (nil "Xiup" "Upright Greek Uppercase" 926) ;; #X039E
155     (nil "Piup" "Upright Greek Uppercase" 928) ;; #X03A0
156     (nil "Sigmaup" "Upright Greek Uppercase" 931) ;; #X03A3
157     (nil "Upsilonup" "Upright Greek Uppercase" 978) ;; #X03D2
158     (nil "Phiup" "Upright Greek Uppercase" 934) ;; #X03A6
159     (nil "Psiup" "Upright Greek Uppercase" 936) ;; #X03A8
160     (nil "Omegaup" "Upright Greek Uppercase" 937) ;; #X03A9
161     ;; Integrals
162     (nil "varint" "Integrals" nil)
163     (nil "variint" "Integrals" nil)
164     (nil "variiint" "Integrals" nil)
165     (nil "variiiint" "Integrals" nil)
166     (nil "varidotsint" "Integrals" nil)
167     (nil "oiint" "Integrals" 8751) ;; #X222F
168     (nil "ointctrclockwise" "Integrals" 8755) ;; #X2233
169     (nil "ointclockwise" "Integrals" nil)
170     (nil "sqint" "Integrals" 10774) ;; #X2A16
171     (nil "idotsint" "Integrals" nil)
172     (nil "oiiint" "Integrals" 8752) ;; #X2230
173     (nil "varointctrclockwise" "Integrals" nil)
174     (nil "varointclockwise" "Integrals" 8754) ;; #X2232
175     (nil "fint" "Integrals" 10767) ;; #X2A0F
176     (nil "oiintctrclockwise" "Integrals" nil)
177     (nil "varoiintclockwise" "Integrals" nil)
178     (nil "oiiintctrclockwise" "Integrals" nil)
179     (nil "varoiiintclockwise" "Integrals" nil)
180     (nil "oiintclockwise" "Integrals" nil)
181     (nil "varoiintctrclockwise" "Integrals" nil)
182     (nil "oiiintclockwise" "Integrals" nil)
183     (nil "varoiiintctrclockwise" "Integrals" nil)
184     (nil "sqiint" "Integrals" nil)
185     (nil "sqiiint" "Integrals" nil)
186     ;; Mapping
187     (nil "mappedfrom" "Mapping" 8612) ;; #X21A4
188     (nil "longmappedfrom" "Mapping" 10235) ;; #X27FB
189     (nil "Mapsto" "Mapping" 10503) ;; #X2907
190     (nil "Longmapsto" "Mapping" 10238) ;; #X27FE
191     (nil "Mappedfrom" "Mapping" 10502) ;; #X2906
192     (nil "Longmappedfrom" "Mapping" 10237) ;; #X27FD
193     (nil "mmapsto" "Mapping" nil)
194     (nil "longmmapsto" "Mapping" nil)
195     (nil "mmappedfrom" "Mapping" nil)
196     (nil "longmmappedfrom" "Mapping" nil)
197     (nil "Mmapsto" "Mapping" nil)
198     (nil "Longmmapsto" "Mapping" nil)
199     (nil "Mmappedfrom" "Mapping" nil)
200     (nil "Longmmappedfrom" "Mapping" nil)
201     ;; Arrows
202     (nil "dashleftarrow" "Arrows" 10510) ;; #X290E
203     (nil "dashrightarrow" "Arrows" 10511) ;; #X290F
204     (nil "dashleftrightarrow" "Arrows" nil)
205     (nil "leftsquigarrow" "Arrows" 8668) ;; #X21DC
206     (nil "Nearrow" "Arrows" 8663) ;; #X21D7
207     (nil "Searrow" "Arrows" 8664) ;; #X21D8
208     (nil "Nwarrow" "Arrows" 8662) ;; #X21D6
209     (nil "Swarrow" "Arrows" 8665) ;; #X21D9
210     (nil "leadstoext" "Arrows" 12316) ;; #X301C
211     (nil "leadsto" "Arrows" 10547) ;; #X2933
212     (nil "boxright" "Arrows" nil)
213     (nil "Diamondright" "Arrows" nil)
214     (nil "circleright" "Arrows" nil)
215     (nil "boxleft" "Arrows" nil)
216     (nil "Diamondleft" "Arrows" nil)
217     (nil "circleleft" "Arrows" nil)
218     (nil "boxdotright" "Arrows" nil)
219     (nil "Diamonddotright" "Arrows" nil)
220     (nil "circledotright" "Arrows" nil)
221     (nil "boxdotleft" "Arrows" nil)
222     (nil "Diamonddotleft" "Arrows" nil)
223     (nil "circledotleft" "Arrows" nil)
224     (nil "boxRight" "Arrows" nil)
225     (nil "boxLeft" "Arrows" nil)
226     (nil "boxdotRight" "Arrows" nil)
227     (nil "boxdotLeft" "Arrows" nil)
228     (nil "DiamondRight" "Arrows" nil)
229     (nil "DiamondLeft" "Arrows" nil)
230     (nil "DiamonddotRight" "Arrows" nil)
231     (nil "DiamonddotLeft" "Arrows" nil)
232     ;; Neg Arrows
233     (nil "ntwoheadrightarrow" "Neg Arrows" 10496) ;; #X2900
234     (nil "ntwoheadleftarrow" "Neg Arrows" 11060) ;; #X2B34
235     ;; Binary Op
236     (nil "multimap" "Binary Op" 8888) ;; #X22B8
237     (nil "multimapinv" "Binary Op" 10204) ;; #X27DC
238     (nil "multimapboth" "Binary Op" 10719) ;; #X29DF
239     (nil "multimapdot" "Binary Op" nil)
240     (nil "multimapdotinv" "Binary Op" nil)
241     (nil "multimapdotboth" "Binary Op" nil)
242     (nil "multimapdotbothA" "Binary Op" 8886) ;; #X22B6
243     (nil "multimapdotbothB" "Binary Op" 8887) ;; #X22B7
244     (nil "multimapbothvert" "Binary Op" nil)
245     (nil "multimapdotbothvert" "Binary Op" nil)
246     (nil "multimapdotbothAvert" "Binary Op" nil)
247     (nil "multimapdotbothBvert" "Binary Op" nil)
248     (nil "Wr" "Binary Op" nil)
249     (nil "sqcupplus" "Binary Op" nil)
250     (nil "sqcapplus" "Binary Op" nil)
251     (nil "medcirc" "Binary Op" 9898) ;; #X26AA
252     (nil "medbullet" "Binary Op" 9899) ;; #X26AB
253     (nil "invamp" "Binary Op" 8523) ;; #X214B
254     (nil "Diamonddot" "Binary Op" 10192) ;; #X27D0
255     (nil "Diamond" "Binary Op" 9671) ;; #X25C7
256     (nil "Diamondblack" "Binary Op" 9670) ;; #X25C6
257     (nil "strictif" "Binary Op" 8880) ;; #X22B0
258     (nil "strictfi" "Binary Op" 8881) ;; #X22B1
259     (nil "strictiff" "Binary Op" nil)
260     (nil "circledless" "Binary Op" 10688) ;; #X29C0
261     (nil "circledgtr" "Binary Op" 10689) ;; #X29C1
262     (nil "circledwedge" "Binary Op" nil)
263     (nil "circledvee" "Binary Op" nil)
264     (nil "circledbar" "Binary Op" 10678) ;; #X29B6
265     (nil "circledbslash" "Binary Op" 10680) ;; #X29B8
266     (nil "bignplus" "Binary Op" nil)
267     (nil "bigsqcupplus" "Binary Op" nil)
268     (nil "bigsqcapplus" "Binary Op" nil)
269     (nil "bigsqcap" "Binary Op" 10757) ;; #X2A05
270     (nil "varprod" "Binary Op" 10761) ;; #X2A09
271     ;; Relational
272     (nil "doteq" "Relational" 8784) ;; #X2250
273     (nil "VDash" "Relational" 8875) ;; #X22AB
274     (nil "VvDash" "Relational" nil)
275     (nil "cong" "Relational" 8773) ;; #X2245
276     (nil "preceqq" "Relational" 10931) ;; #X2AB3
277     (nil "succeqq" "Relational" 10932) ;; #X2AB4
278     (nil "coloneqq" "Relational" nil)
279     (nil "varparallel" "Relational" 11005) ;; #X2AFD
280     (nil "nvarparallel" "Relational" nil)
281     (nil "varparallelinv" "Relational" nil)
282     (nil "nvarparallelinv" "Relational" nil)
283     (nil "colonapprox" "Relational" nil)
284     (nil "colonsim" "Relational" nil)
285     (nil "Colonapprox" "Relational" nil)
286     (nil "Colonsim" "Relational" nil)
287     (nil "eqqcolon" "Relational" 8789) ;; #X2255
288     (nil "coloneq" "Relational" nil)
289     (nil "eqcolon" "Relational" 8761) ;; #X2239
290     (nil "Coloneqq" "Relational" 10868) ;; #X2A74
291     (nil "Eqqcolon" "Relational" nil)
292     ;; Neg Rel
293     (nil "nprecsim" "Neg Rel" nil)
294     (nil "nsuccsim" "Neg Rel" nil)
295     (nil "nlesssim" "Neg Rel" 8820) ;; #X2274
296     (nil "ngtrsim" "Neg Rel" 8821) ;; #X2275
297     (nil "nlessapprox" "Neg Rel" nil)
298     (nil "ngtrapprox" "Neg Rel" nil)
299     (nil "npreccurlyeq" "Neg Rel" 8928) ;; #X22E0
300     (nil "nsucccurlyeq" "Neg Rel" 8929) ;; #X22E1
301     (nil "ngtrless" "Neg Rel" 8825) ;; #X2279
302     (nil "nlessgtr" "Neg Rel" 8824) ;; #X2278
303     (nil "nbumpeq" "Neg Rel" nil)
304     (nil "nBumpeq" "Neg Rel" nil)
305     (nil "nbacksim" "Neg Rel" nil)
306     (nil "nbacksimeq" "Neg Rel" nil)
307     (nil "nasymp" "Neg Rel" 8813) ;; #X226D
308     (nil "nequiv" "Neg Rel" 8802) ;; #X2262
309     (nil "nsim" "Neg Rel" 8769) ;; #X2241
310     (nil "napprox" "Neg Rel" 8777) ;; #X2249
311     (nil "nsubset" "Neg Rel" 8836) ;; #X2284
312     (nil "nsupset" "Neg Rel" 8837) ;; #X2285
313     (nil "nll" "Neg Rel" nil)
314     (nil "ngg" "Neg Rel" nil)
315     (nil "nthickapprox" "Neg Rel" 8777) ;; #X2249
316     (nil "napproxeq" "Neg Rel" nil)
317     (nil "nprecapprox" "Neg Rel" nil)
318     (nil "nsuccapprox" "Neg Rel" nil)
319     (nil "npreceqq" "Neg Rel" nil)
320     (nil "nsucceqq" "Neg Rel" nil)
321     (nil "nsimeq" "Neg Rel" 8772) ;; #X2244
322     (nil "notin" "Neg Rel" 8713) ;; #X2209
323     (nil "notni" "Neg Rel" 8716) ;; #X220C
324     (nil "nSubset" "Neg Rel" nil)
325     (nil "nSupset" "Neg Rel" nil)
326     (nil "nsqsubseteq" "Neg Rel" 8930) ;; #X22E2
327     (nil "nsqsupseteq" "Neg Rel" 8931) ;; #X22E3
328     (nil "nsqsubset" "Neg Rel" nil)
329     (nil "nsqsupset" "Neg Rel" nil)
330     ;; Delimeters
331     (nil "Lbag" "Delimeters" 10181) ;; #X27C5
332     (nil "Rbag" "Delimeters" 10182) ;; #X27C6
333     (nil "llbracket" "Delimeters" 10214) ;; #X27E6
334     (nil "rrbracket" "Delimeters" 10215) ;; #X27E7
335     ;; Accents
336     (nil "widearc" "Accents" 8978) ;; #X2312
337     (nil "widearcarrow" "Accents" 8405) ;; #X20D5
338     (nil "wideOarc" "Accents" 8405) ;; #X20D5
339     (nil "wideparen" "Accents" 9180) ;; #X23DC
340     (nil "widering" "Accents" nil)
341     ;; Misc
342     ("v 0" "varemptyset" "Misc" 8709) ;; #X2205
343     (nil "lJoin" "Misc" 8905) ;; #X22C9
344     (nil "rJoin" "Misc" 8906) ;; #X22CA
345     (nil "Join" "Misc" 8904) ;; #X22C8
346     (nil "openJoin" "Misc" nil)
347     (nil "lrtimes" "Misc" nil)
348     (nil "opentimes" "Misc" nil)
349     (nil "nplus" "Misc" nil)
350     (nil "Top" "Misc" 10986) ;; #X2AEA
351     (nil "Bot" "Misc" 10987) ;; #X2AEB
352     (nil "Perp" "Misc" 10987) ;; #X2AEB
353     (nil "boxast" "Misc" nil)
354     (nil "boxbslash" "Misc" nil)
355     (nil "boxbar" "Misc" nil)
356     (nil "boxslash" "Misc" nil)
357     (nil "lambdaslash" "Misc" 411) ;; #X019B
358     (nil "lambdabar" "Misc" 411) ;; #X019B
359     (nil "varclubsuit" "Misc" 9831) ;; #X2667
360     (nil "vardiamondsuit" "Misc" 9830) ;; #X2666
361     (nil "varheartsuit" "Misc" 9829) ;; #X2665
362     (nil "varspadesuit" "Misc" 9828)) ;; #X2664
363   "Alist of kpfonts symbols.
364
365 Each entry should be a list with upto four elements, KEY, VALUE,
366 MENU and CHARACTER.
367
368 KEY is the key (after `LaTeX-kpfonts-abbrev-prefix') to be
369 redefined in kpfonts minor mode.  If KEY is nil, the symbol has
370 no associated keystroke \(it is available in the menu, though\).
371
372 VALUE can be a string with the name of the macro to be inserted,
373 or a function to be called.  The macro must be given without the
374 leading backslash.
375
376 The third element MENU is the name of the submenu where the
377 command should be added.  MENU can be either a string
378 \(e.g. \"greek\"\), a list (e.g. \(\"AMS\" \"Delimiters\"\)\) or
379 nil.  If MENU is nil, no menu item will be created.
380
381 The fourth element CHARACTER is a Unicode character position for
382 menu display.  When nil, no character is shown.
383
384 See also `LaTeX-kpfonts-menu'.")
385
386 (defvar LaTeX-kpfonts-abbrev-prefix LaTeX-math-abbrev-prefix
387   "Prefix key for use in `LaTeX-kpfonts-mode'.
388 This has to be a string representing a key sequence in a format
389 understood by the `kbd' macro.  This corresponds to the syntax
390 usually used in the Emacs and Elisp manuals.")
391
392 (defun LaTeX-kpfonts-abbrev-prefix ()
393   "Make a key definition from the variable `LaTeX-kpfonts-abbrev-prefix'."
394   (if (stringp LaTeX-kpfonts-abbrev-prefix)
395       (read-kbd-macro LaTeX-kpfonts-abbrev-prefix)
396     LaTeX-kpfonts-abbrev-prefix))
397
398 (defvar LaTeX-kpfonts-keymap (make-sparse-keymap)
399   "Keymap used for `LaTeX-kpfonts-mode' commands.")
400
401 (defvar LaTeX-kpfonts-menu nil
402   "Menu containing commands provided by kpfonts LaTeX package.
403 The menu entries will be generated dynamically, but you can specify
404 the sequence by initializing this variable.")
405
406 ;; We set `LaTeX-kpfonts-menu' after its definition because otherwise, resetting
407 ;; AUCTeX with `C-u C-c C-n' would create duplicate entries in menu.
408 (setq LaTeX-kpfonts-menu
409       '("Kpfonts"
410         ("Insert Font"
411          ["Math Upright"             (TeX-font nil ?\C-h) :keys "C-c C-f C-h"]
412          ["Math Fraktur"             (TeX-font nil ?\C-k) :keys "C-c C-f C-k"]
413          ["Math Script"              (TeX-font nil ?\C-p) :keys "C-c C-f C-p"]
414          ["Slanted Small Caps"       (TeX-font nil ?\C-l) :keys "C-c C-f C-l"]
415          ["Other Small Caps"         (TeX-font nil ?\C-o) :keys "C-c C-f C-o"]
416          ["Other Slanted Small Caps" (TeX-font nil ?\C-q) :keys "C-c C-f C-q"])
417         ("Replace Font"
418          ["Math Upright"             (TeX-font t ?\C-h) :keys "C-u C-c C-f C-h"]
419          ["Math Fraktur"             (TeX-font t ?\C-k) :keys "C-u C-c C-f C-k"]
420          ["Math Script"              (TeX-font t ?\C-p) :keys "C-u C-c C-f C-p"]
421          ["Slanted Small Caps"       (TeX-font t ?\C-l) :keys "C-u C-c C-f C-l"]
422          ["Other Small Caps"         (TeX-font t ?\C-o) :keys "C-u C-c C-f C-o"]
423          ["Other Slanted Small Caps" (TeX-font t ?\C-q) :keys "C-u C-c C-f C-q"])
424         ["Delete Font"              (TeX-font t ?\C-d) :keys "C-c C-f C-d"]
425         "-"
426         ("Other Greek Lowercase") ("Slanted Greek Lowercase")
427         ("Upright Greek Lowercase") ("Other Greek Uppercase")
428         ("Slanted Greek Uppercase") ("Upright Greek Uppercase") ("Integrals")
429         ("Mapping") ("Arrows") ("Neg Arrows") ("Binary Op") ("Relational")
430         ("Neg Rel") ("Delimeters") ("Accents") ("Misc")))
431
432 (let ((math (reverse LaTeX-kpfonts-default))
433       (map LaTeX-kpfonts-keymap)
434       (unicode (and LaTeX-math-menu-unicode (fboundp 'decode-char))))
435   (while math
436     (let* ((entry (car math))
437            (key (nth 0 entry))
438            (prefix
439             (and unicode
440                  (nth 3 entry)))
441            value menu name)
442       (setq math (cdr math))
443       (if (and prefix
444                (setq prefix (decode-char 'ucs (nth 3 entry))))
445           (setq prefix (concat (string prefix) " \\"))
446         (setq prefix "\\"))
447       (if (listp (cdr entry))
448           (setq value (nth 1 entry)
449                 menu (nth 2 entry))
450         (setq value (cdr entry)
451               menu nil))
452       (if (stringp value)
453           (progn
454             (setq name (intern (concat "LaTeX-kpfonts-" value)))
455             (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
456                              (list 'LaTeX-math-insert value 'arg))))
457         (setq name value))
458       (if key
459           (progn
460             (setq key (cond ((numberp key) (char-to-string key))
461                             ((stringp key) (read-kbd-macro key))
462                             (t (vector key))))
463             (define-key map key name)))
464       (if menu
465           (let ((parent LaTeX-kpfonts-menu))
466             (if (listp menu)
467                 (progn
468                   (while (cdr menu)
469                     (let ((sub (assoc (car menu) LaTeX-kpfonts-menu)))
470                       (if sub
471                           (setq parent sub)
472                         (setcdr parent (cons (list (car menu)) (cdr parent))))
473                       (setq menu (cdr menu))))
474                   (setq menu (car menu))))
475             (let ((sub (assoc menu parent)))
476               (if sub
477                   (if (stringp value)
478                       (setcdr sub (cons (vector (concat prefix value)
479                                                 name t)
480                                         (cdr sub)))
481                     (error "Cannot have multiple special kpfonts menu items"))
482                 (setcdr parent
483                         (cons (if (stringp value)
484                                   (list menu (vector (concat prefix value)
485                                                      name t))
486                                 (vector menu name t))
487                               (cdr parent)))))))))
488   ;; Make the kpfonts prefix char available if it has not been used as a prefix.
489   (unless (lookup-key map (LaTeX-kpfonts-abbrev-prefix))
490     (define-key map (LaTeX-kpfonts-abbrev-prefix) 'self-insert-command)))
491
492 (define-minor-mode LaTeX-kpfonts-mode
493   "A minor mode with easy access to kpfonts macros.
494
495 Easy insertion of kpfonts symbols.  If you give a prefix
496 argument, the symbols will be surrounded by dollar signs.  The
497 following commands are defined:
498
499 \\{LaTeX-kpfonts-mode-map}"
500   nil nil (list (cons (LaTeX-kpfonts-abbrev-prefix) LaTeX-kpfonts-keymap))
501   (if LaTeX-kpfonts-mode
502       (easy-menu-add LaTeX-kpfonts-mode-menu LaTeX-kpfonts-mode-map)
503     (easy-menu-remove LaTeX-kpfonts-mode-menu))
504   (TeX-set-mode-name))
505
506 (easy-menu-define LaTeX-kpfonts-mode-menu
507   LaTeX-kpfonts-mode-map
508   "Menu used in kpfonts minor mode."
509   LaTeX-kpfonts-menu)
510
511 (defvar LaTeX-kpfonts-mode-enable LaTeX-math-mode
512   "If non-nil, enable kpfonts minor mode by default.")
513
514 (if LaTeX-kpfonts-mode-enable
515     (LaTeX-kpfonts-mode))
516 ;;; Kpfonts Minor Mode ends here
517
518 ;; New fonts by `kpfonts'.
519 (setq TeX-font-list
520       (append
521        TeX-font-list
522        '(;; Math fonts
523          (?\C-h "" "" "\\mathup{"   "}")
524          (?\C-k "" "" "\\mathfrak{" "}")
525          (?\C-p "" "" "\\mathscr{"  "}")
526          ;; Text fonts
527          (?\C-l "\\textscsl{"      "}")
528          (?\C-o "\\textothersc{"   "}")
529          (?\C-q "\\textotherscsl{" "}"))))
530
531 (TeX-add-style-hook
532  "kpfonts"
533  (lambda ()
534    (unless (LaTeX-provided-package-options-member "kpfonts" "notextcomp")
535      (TeX-run-style-hooks "textcomp"))
536    (unless (LaTeX-provided-package-options-member "kpfonts" "noamsmath")
537      (TeX-run-style-hooks "amsmath"))
538    (TeX-add-symbols
539     ;; Text fonts options
540     '("classicstylenums" 1)
541     ;; New text commands
542     '("scslshape" 0)
543     '("otherscshape" 0)
544     '("otherscslshape" 0)
545     "othertailQ"
546     "othertailscq"
547     "othertailscslq"
548     ;; Variant integrate symbols
549     '("D" 1)
550     ;; New extensive symbols
551     '("widearc" 1)
552     '("widearcarrow" 1)
553     '("wideOarc" 1)
554     '("wideparen" 1)
555     '("widering" 1))
556
557    ;; Fontification
558    (when (and (featurep 'font-latex)
559               (eq TeX-install-font-lock 'font-latex-setup))
560      (font-latex-add-keywords '(("textscsl" "{")
561                                 ("textothersc" "{")
562                                 ("textotherscsl" "{"))
563                               'bold-command)
564      (font-latex-add-keywords '(("textscsl" "{")
565                                 ("textotherscsl" "{"))
566                               'italic-command)
567      (font-latex-add-keywords '(("scslshape")
568                                 ("otherscshape")
569                                 ("otherscslshape"))
570                               'bold-declaration)
571      (font-latex-add-keywords '(("scslshape")
572                                 ("otherscslshape"))
573                               'italic-declaration)))
574  LaTeX-dialect)
575
576 (defvar LaTeX-kpfonts-package-options
577   '(;; Main global options
578     "light" "fulloldstylenums" "fulloldstyle" "fullveryoldstyle"
579     ;; Other global options
580     "nomath" "notext" "nosf" "nott" "onlyrm" "noamsmath" "notextcomp"
581     ;; Text fonts options
582     "lighttext" "oldstylenums" "oldstyle" "veryoldstyle" "rmx" "largesmallcaps"
583     "easyscsl" "nofligatures" "lightmath"
584     ;; Math typesetting options
585     "sfmath" "sfmathbb" "rmmathbb" "nomathscript" "mathcalasscript" "classicReIm"
586     "uprightRoman" "frenchstyle" "upright" "oldstylenumsmath" "oldstylemath"
587     "veryoldstylemath" "narrowiints" "partialup" "widermath" "noDcommand"
588     ;; Position of subscripts and superscripts
589     "intlimits" "fullintlimits" "nointlimits" "sumlimits" "fullsumlimits"
590     "nosumlimits"
591     ;; Greek letters in math mode, options
592     "uprightgreeks" "slantedGreeks"
593     ;; Other `amsmath' options
594     "namelimits" "nonamelimits" "leqno" "reqno" "centertags" "tbtags"
595     ;; Misc
596     "nowarning")
597   "Package options for the kpfonts package.")
598
599 ;; kpfonts.el ends here