auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Small patch for MinionPro.el


From: Arash Esbati
Subject: Re: [AUCTeX-devel] Small patch for MinionPro.el
Date: Sun, 12 Oct 2014 12:13:46 +0200

Hi Mosè,

"Mosè Giordano" <address@hidden> writes:

> May I ask you where this feature is described?  The package
> documentation is not so clear to me about this and I don't have to
> package to test with it.

Indeed, the documentation of MinionPro is not very clear here.  \figureversion 
is provided by fontaxes.sty, try `texdoc fontaxes' and check section `2.4 
Additional commands'.

> IMHO, in this case `TeX-completing-read-multiple' is more 
> appropriate than `TeX-arg-key-val' as there is no key-val here

Thanks for your suggestion and the code.  I wrote a fontaxes.el for my own 
purposes, it seems to work.  I can send you a patch against MinionPro.el to use 
fontaxes.el.  Please have a look at this code (my lisp knowledge is very 
limited) and give me a note how you like to proceed.

Best, Arash


--8<---------------cut here---------------start------------->8---
(TeX-add-style-hook
 "fontaxes"
 (lambda ()
   (TeX-add-symbols
    ;; Various font shapes
    '("swshape"           -1)  ; swash shape
    '("sscshape"          -1)  ; spaced small caps
    '("fontprimaryshape"   t)
    '("fontsecondaryshape" t)
    '("swdefault"          t)
    '("sscdefault"         t)
    '("ulcdefault"         t)
 
    ;; Figure versions 
    '("figureversion"  ; (Thanks to Mosè Giordano for his comments)
      (TeX-arg-eval mapconcat 'identity 
                    (TeX-completing-read-multiple
                     "Style, alignment: "
                     '(("text") ("osf")
                       ("lining") ("lf")
                       ("tabular") ("tab")
                       ("proportional") ("prop"))) ","))
    '("txfigures" -1)  ; style: text figures (osf)
    '("lnfigures" -1)  ; style: lining figures
    '("tbfigures" -1)  ; alignment: tabular figures
    '("prfigures" -1)  ; alignment: proportional figures
    '("fontfigurestyle"
      (TeX-arg-eval completing-read "Style: "
                     '(("text") ("lining"))))
    '("fontfigurealignment"
      (TeX-arg-eval completing-read "Alignment: "
                     '(("tabular") ("proportional"))))
    '("fontbasefamily" t)

    ;; Math versions
    '("boldmath"         -1)  ; math weight
    '("unboldmath"       -1)  ; 
    '("tabularmath"      -1)  ; math figure alignment
    '("proportionalmath" -1)  ; 
    '("mathweight"
      (TeX-arg-eval completing-read "Math weight: "
                     '(("bold") ("normal"))))
    '("mathfigurealignment"
      (TeX-arg-eval completing-read "Math figure alignment: "
                     '(("tabular") ("proportional"))))

    ;; Additional commands
    '("textsw"              t)
    '("textssc"             t)
    '("textulc"             t)
    '("textfigures"         t)
    '("liningfigures"       t)
    '("tabularfigures"      t)
    '("proportionalfigures" t))

    ;; Fontification
   (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-add-keywords '(("textfigures"         "{")
                                ("liningfigures"       "{")
                                ("tabularfigures"      "{")
                                ("proportionalfigures" "{"))
                              'textual)
     (font-latex-add-keywords '(("textsw"              "{")
                                ("textssc"             "{")
                                ("textulc"             "{"))
                              'bold-command)
     (font-latex-add-keywords '(("swshape"             "")
                                ("sscshape"            ""))
                              'bold-declaration)
     (font-latex-add-keywords '(("figureversion"       "{"))
                              'variable)))
 LaTeX-dialect)

(defvar LaTeX-fontaxes-package-options nil
  "Package options for the fontaxes package.")

;;; fontaxes.el ends here
--8<---------------cut here---------------end--------------->8---



reply via email to

[Prev in Thread] Current Thread [Next in Thread]