"Fossies" - the Fresh Open Source Software Archive

Member "auctex-12.3/style/kpfonts.el" (18 Oct 2020, 25978 Bytes) of package /linux/misc/auctex-12.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lisp source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "kpfonts.el": 12.2_vs_12.3.

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