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: Mosè Giordano
Subject: Re: [AUCTeX-devel] Small patch for MinionPro.el
Date: Sun, 12 Oct 2014 22:12:16 +0200

Hi Arash,

2014-10-12 12:13 GMT+02:00 Arash Esbati <address@hidden>:
> 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'.

Thank you!

>> 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---

It looks good (there is also the new dialect argument, great!) but
I'll look more thoroughly later.  Since this package is loaded by
MinionPro.sty, you should also add an appropriate hook in
MinionPro.el, and remove from that style file the macros defined in
fontaxes.el.  Since this is a new style file, you should also add the
header (copyright notice and a short description of the file).

Do you want to license your contribution under the terms of GPL?  If
so, AUCTeX is a GNU project and you need to assign the copyright to
the FSF, and then we'll be able to install your patch.

Bye,
Mosè



reply via email to

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