[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 206/299: New style files and a fix to imakeidx.el.
From: |
Stefan Monnier |
Subject: |
[elpa] 206/299: New style files and a fix to imakeidx.el. |
Date: |
Sun, 02 Nov 2014 03:11:28 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit cddd3c1d4b8d7c92c07650f97c74b15c0f4f5f8e
Author: Mosè Giordano <address@hidden>
Date: Fri Dec 20 17:00:35 2013 +0100
New style files and a fix to imakeidx.el.
* style/imakeidx.el ("imakeidx"): Move addition of options to
`LaTeX-imakeidx-indexsetup-options' inside the hook.
* Makefile.in (STYLESRC): Activate new styles.
* style/fontspec.el: New style.
* style/luacode.el: Ditto.
* style/metalogo.el: Ditto.
* style/unicode-math.el: Ditto.
---
ChangeLog | 15 ++++
Makefile.in | 13 ++--
style/fontspec.el | 202 +++++++++++++++++++++++++++++++++++++++++++++++++
style/imakeidx.el | 21 +++---
style/luacode.el | 62 +++++++++++++++
style/metalogo.el | 84 ++++++++++++++++++++
style/unicode-math.el | 73 ++++++++++++++++++
7 files changed, 454 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 771fb6a..63945c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-12-20 Mos� Giordano <address@hidden>
+
+ * style/imakeidx.el ("imakeidx"): Move addition of options to
+ `LaTeX-imakeidx-indexsetup-options' inside the hook.
+
+ * Makefile.in (STYLESRC): Activate new styles.
+
+ * style/fontspec.el: New style.
+
+ * style/luacode.el: Ditto.
+
+ * style/metalogo.el: Ditto.
+
+ * style/unicode-math.el: Ditto.
+
2013-12-18 Tassilo Horn <address@hidden>
* tex-buf.el (TeX-parse-error): Don't confuse ) in package
diff --git a/Makefile.in b/Makefile.in
index 6bad6f9..730a3e2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -132,7 +132,8 @@ STYLESRC = style/prosper.el \
style/fancynum.el style/fancyhdr.el style/filecontents.el \
style/array.el style/kpfonts.el style/acro.el \
style/acronym.el style/xparse.el style/fancyvrb.el \
- style/tabulary.el
+ style/tabulary.el style/fontspec.el style/unicode-math.el \
+ style/luacode.el style/metalogo.el
STYLEELC = $(STYLESRC:.el=.elc)
CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)
@@ -328,13 +329,13 @@ wc:
# intended to be used only by the maintainers.
# Steps for making a release:
-#
+#
# 1) release-commit TAG=<tag> COMMITTER=<committer>
# Tag the release.
# Pass `COMMITTER=<committer>' argument only if it is different from
# your git name and email. `<committer>' should be in the form
# "John Doe <address@hidden>"
-#
+#
# 2) dist TAG=<tag>
# Create the tar ball and other release files and put them into $FTPDIR.
#
@@ -344,16 +345,16 @@ wc:
# 4) windows-package WEMACSVER=<emacs-version> TAG=<tag>
# Create the precompiled AUCTeX package for Windows.
# This requires a compiled Emacs of the same version at location $WEMACS.
-#
+#
# 5) release-sign TAG=<tag>
# Sign the tar ball and create directive files for upload.
-#
+#
# 6) release-upload
# Upload files to GNU FTP server.
#
# 7) www-doc TAG=<tag> GENDOCSPATCH=<patch-file>
# Create documentation for AUCTeX home page.
-#
+#
# 8) preview-ball TAG=<tag>
# Create preview package. (Not for GNU FTP server but for CTAN.)
diff --git a/style/fontspec.el b/style/fontspec.el
new file mode 100644
index 0000000..90286b5
--- /dev/null
+++ b/style/fontspec.el
@@ -0,0 +1,202 @@
+;;; fontspec.el --- AUCTeX style for `fontspec.sty' version 2.3c.
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Author: Mosè Giordano <address@hidden>
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `fontspec.sty' version 2.3c.
+
+;;; Code:
+
+(defvar LaTeX-fontspec-font-features
+ '(;; More control over font shape selection
+ ("BoldFont")
+ ("ItalicFont")
+ ("BoldItalicFont")
+ ("SlantedFont")
+ ("BoldSlantedFont")
+ ("SmallCapsFont")
+ ;; Different features for different font shapes
+ ("BoldFeatures")
+ ("ItalicFeatures")
+ ("BoldItalicFeatures")
+ ("SlantedFeatures")
+ ("BoldSlantedFeatures")
+ ("SmallCapsFeatures")
+ ;; Different features for different font sizes
+ ("SizeFeatures")
+ ;; Font independent options
+ ("Color")
+ ("Scale" ("MatchLowercase" "MatchUppercase"))
+ ("WordSpace")
+ ("PunctuationSpace")
+ ("HyphenChar")
+ ("OpticalSize")
+ ;; OpenType options
+ ("Ligatures" ("Required"
+ "NoRequired"
+ "Common"
+ "NoCommon"
+ "Contextual"
+ "NoContextual"
+ "Rare"
+ "Historic"
+ "TeX"))
+ ("Letters" ("Uppercase"
+ "SmallCaps"
+ "PetiteCaps"
+ "UppercaseSmallCaps"
+ "UppercasePetiteCaps"
+ "Unicase"))
+ ("Numbers" ("Lining"
+ "OldStyle"
+ "Proportional"
+ "Monospaced"
+ "SlashedZero"
+ "Arabic"))
+ ("Contextuals" ("Swash"
+ "Alternate"
+ "WordInitial"
+ "WordFinal"
+ "LineFinal"
+ "Inner"))
+ ("VerticalPosition" ("Superior"
+ "Inferior"
+ "Numerator"
+ "Denominator"
+ "ScientificInferior"
+ "Ordinal"))
+ ("Fraction" ("On" "Alternate"))
+ ("StylisticSet")
+ ("CharacterVariants")
+ ("Alternate")
+ ("Style" ("Alternate"
+ "Italic"
+ "Ruby"
+ "Swash"
+ "Historic"
+ "TitlingCaps"
+ "HorizontalKana"
+ "VerticalKana"))
+ ("Diacritics" ("MarkToBase"
+ "NoMarkToBase"
+ "MarkToMark"
+ "NoMarkToMark"
+ "AboveBase"
+ "NoAboveBase"
+ "BelowBase"
+ "NoBelowBase"))
+ ("Kerning" ("Uppercase" "On" "Off"))
+ ("AutoFakeBold")
+ ("AutoFakeSlant")
+ ("FakeSlant")
+ ("FakeStretch")
+ ("FakeBold")
+ ("Annotation")
+ ("CJKShape" ("Traditional"
+ "Simplified"
+ "JIS1978"
+ "JIS1983"
+ "JIS1990"
+ "Expert"
+ "NLC"))
+ ("CharacterWidth" ("Proportional"
+ "Full"
+ "Half"
+ "Third"
+ "Quarter"
+ "AlternateProportional"
+ "AlternateHalf"))
+ ("Vertical" ("RotatedGlyphs")))
+ "Font features options for macros of the fontspec package.")
+
+(TeX-add-style-hook
+ "fontspec"
+ (lambda ()
+ (TeX-run-style-hooks "expl3" "xparse")
+ (TeX-add-symbols
+ ;; Font selection
+ '("fontspec" [TeX-arg-key-val LaTeX-fontspec-font-features "Font features"]
+ "Font name")
+ ;; Default font families
+ '("setmainfont"
+ [TeX-arg-key-val LaTeX-fontspec-font-features "Font features"]
+ "Main font name")
+ '("setsansfont"
+ [TeX-arg-key-val LaTeX-fontspec-font-features "Font features"]
+ "Sans font name")
+ '("setmonofont"
+ [TeX-arg-key-val LaTeX-fontspec-font-features "Font features"]
+ "Mono font name")
+ ;; New commands to select font families
+ '("newfontfamily" TeX-arg-define-macro
+ [TeX-arg-key-val LaTeX-fontspec-font-features "Font features"]
+ "Font name")
+ '("newfontface" TeX-arg-define-macro
+ [TeX-arg-key-val LaTeX-fontspec-font-features "Font features"]
+ "Font name")
+ ;; Math(s) fonts
+ '("setmathrm" [ "Font features" ] "Font name")
+ '("setmathsf" [ "Font features" ] "Font name")
+ '("setmathtt" [ "Font features" ] "Font name")
+ '("setboldmathrm" [ "Font features" ] "Font name")
+ ;; Emphasis and nested emphasis
+ "emshape"
+ "eminnershape"
+ ;; Default settings
+ '("defaultfontfeatures" [ "Font name" ]
+ (TeX-arg-key-val LaTeX-fontspec-font-features "Font features"))
+ ;; Changing the currently selected features
+ '("addfontfeatures"
+ (TeX-arg-key-val LaTeX-fontspec-font-features "Font features"))
+ ;; Defining new scripts and languages
+ '("newfontscript" "Script name" "OpenType tag")
+ '("newfontlanguage" "Language name" "OpenType tag"))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("fontspec" "[{")
+ ("setmainfont" "[{")
+ ("setsansfont" "[{")
+ ("setmonofont" "[{")
+ ("newfontfamily" "{[{")
+ ("newfontface" "{[{")
+ ("setmathrm" "[{")
+ ("setmathsf" "[{")
+ ("setmathtt" "[{")
+ ("setboldmathrm" "[{")
+ ("emshape")
+ ("eminnershape")
+ ("defaultfontfeatures" "[{")
+ ("addfontfeature" "{")
+ ("newfontscript" "{{")
+ ("newfontlanguage" "{{"))
+ 'function))))
+
+(defvar LaTeX-fontspec-package-options
+ '("math" "no-math" "config" "no-config" "quiet" "silent")
+ "Package options for the fontspec package.")
+
+;;; fontspec.el ends here
diff --git a/style/imakeidx.el b/style/imakeidx.el
index 5c0eb41..f82d335 100644
--- a/style/imakeidx.el
+++ b/style/imakeidx.el
@@ -49,17 +49,18 @@
"Key=value options for indexsetup macro of the imakeidx package.")
(make-variable-buffer-local 'LaTeX-imakeidx-indexsetup-options)
-;; `firstpagestyle' and `headers' options for `indexsetup' macro are
-;; available only if `fancyhdr' is not loaded. The following code
-;; works only if `imakeidx' is loaded before `fancyhdr'
-(unless (member "fancyhdr" TeX-active-styles)
- (setq LaTeX-imakeidx-indexsetup-options
- (append LaTeX-imakeidx-indexsetup-options
- `(("firstpagestyle" ,(LaTeX-pagestyle-list)))
- '(("headers")))))
-
-(TeX-add-style-hook "imakeidx"
+(TeX-add-style-hook
+ "imakeidx"
(lambda ()
+ ;; `firstpagestyle' and `headers' options for `indexsetup' macro are
+ ;; available only if `fancyhdr' is not loaded. The following code works
only
+ ;; if `imakeidx' is loaded after `fancyhdr'.
+ (unless (member "fancyhdr" TeX-active-styles)
+ (setq LaTeX-imakeidx-indexsetup-options
+ (append LaTeX-imakeidx-indexsetup-options
+ `(("firstpagestyle" ,(LaTeX-pagestyle-list)))
+ '(("headers")))))
+
(TeX-add-symbols
'("makeindex" [ (TeX-arg-key-val LaTeX-imakeidx-makeindex-options) ])
'("indexsetup" (TeX-arg-key-val LaTeX-imakeidx-indexsetup-options))
diff --git a/style/luacode.el b/style/luacode.el
new file mode 100644
index 0000000..a43c1d9
--- /dev/null
+++ b/style/luacode.el
@@ -0,0 +1,62 @@
+;;; luacode.el --- AUCTeX style for `luacode.sty' version 1.2a.
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Author: Mosè Giordano <address@hidden>
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `luacode.sty' 1.2a.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "luacode"
+ (lambda ()
+ (TeX-add-symbols
+ '("luadirect" 1)
+ '("luaexec" 1)
+ '("luastring" 1)
+ '("luastringN" 1)
+ '("luastringO" 1)
+ '("LuaCodeDebugOn" 0)
+ '("LuaCodeDebugOff" 0))
+ (LaTeX-add-environments
+ '("luacode")
+ '("luacode*"))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("luadirect" "{")
+ ("luaexec" "{")
+ ("luastring" "{")
+ ("luastringN" "{")
+ ("luastringO" "{")
+ ("LuaCodeDebugOn")
+ ("LuaCodeDebugOff"))
+ 'function))))
+
+(defvar LaTeX-luacode-package-options nil
+ "Package options for the luacode package.")
+
+;;; luacode.el ends here
diff --git a/style/metalogo.el b/style/metalogo.el
new file mode 100644
index 0000000..1cec81e
--- /dev/null
+++ b/style/metalogo.el
@@ -0,0 +1,84 @@
+;;; metalogo.el --- AUCTeX style for `metalogo.sty' version 0.12.
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Author: Mosè Giordano <address@hidden>
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for the `metalogo.sty' version 0.12.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "metalogo"
+ (lambda ()
+ (TeX-add-symbols
+ ;; Logos
+ '("LaTeXe")
+ '("XeTeX")
+ '("XeLaTeX")
+ '("LuaTeX")
+ '("LuaLaTeX")
+ ;; Commands
+ '("setlogokern"
+ (TeX-arg-eval completing-read "Kern parameters: "
+ '(("Te") ("eX") ("La") ("aT") ("Xe") ("eT") ("eL") ("X2")))
+ (TeX-arg-length "Dimension"))
+ '("setlogodrop"
+ [TeX-arg-eval completing-read "Drop parameters: "
+ '(("TeX") ("Xe") ("XeTeX"))]
+ (TeX-arg-length "Dimension"))
+ '("setLaTeXa" 1)
+ '("setLaTeXee" 1)
+ '("seteverylogo" 1)
+ '("everylogo" 1))
+
+ ;; The main macros of this package are the logos, while fine-tuning commands
+ ;; probably will be used only by expert users.
+ (TeX-declare-expert-macros
+ "metalogo"
+ "setlogokern" "setlogodrop" "setLaTeXa" "setLaTeXee"
+ "seteverylogo" "everylogo")
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '( ;; Logos
+ ("LaTeXe")
+ ("XeTeX")
+ ("XeLaTeX")
+ ("LuaTeX")
+ ("LuaLaTeX")
+ ;; Commands
+ ("setlogokern" "{{")
+ ("setlogodrop" "[{")
+ ("setLaTeXa" "{")
+ ("setLaTeXee" "{")
+ ("seteverylogo" "{")
+ ("everylogo" "{"))
+ 'function))))
+
+(defvar LaTeX-metalogo-package-options nil
+ "Package options for the metalogo package.")
+
+;;; metalogo.el ends here
diff --git a/style/unicode-math.el b/style/unicode-math.el
new file mode 100644
index 0000000..87943f7
--- /dev/null
+++ b/style/unicode-math.el
@@ -0,0 +1,73 @@
+;;; unicode-math.el --- AUCTeX style for `unicode-math.sty' version 0.7e.
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Author: Mosè Giordano <address@hidden>
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `unicode-math.sty' version 0.7e.
+
+;;; Code:
+
+(defvar LaTeX-unicode-math-package-options-list
+ '(("math-style" ("ISO" "TeX" "french" "upright" "literal"))
+ ("bold-style" ("ISO" "TeX" "upright" "literal"))
+ ("sans-style" ("italic" "upright" "literal"))
+ ("nabla" ("italic" "upright" "literal"))
+ ("partial" ("upright" "italic" "literal"))
+ ("vargreek-shape" ("unicode" "TeX"))
+ ("colon" ("literal" "TeX"))
+ ("slash-delimiter" ("ascii" "frac" "div")))
+ "Package options for the unicode-math package.")
+
+(defvar LaTeX-unicode-math-setmathfont-options
+ (append LaTeX-unicode-math-package-options-list
+ '(("range")
+ ("script-font")
+ ("script-features")
+ ("sscript-font")
+ ("sscript-features")))
+ "Options for the setmathfont macro of the unicode-math package.")
+
+(TeX-add-style-hook
+ "unicode-math"
+ (lambda ()
+ (TeX-run-style-hooks "ifxetex" "ifluatex" "expl3" "xparse" "l3keys2e"
+ "fontspec" "catchfile" "fix-cm" "filehook")
+ (TeX-add-symbols
+ '("setmathfont" [TeX-arg-key-val LaTeX-unicode-math-setmathfont-options]
+ "Math font name")
+ '("unimathsetup" (TeX-arg-key-val
LaTeX-unicode-math-package-options-list)))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("setmathfont" "[{")
+ ("unimathsetup" "{"))
+ 'function))))
+
+(defun LaTeX-unicode-math-package-options ()
+ "Prompt for package options for the unicode-math package."
+ (TeX-read-key-val t LaTeX-unicode-math-package-options-list))
+
+;;; unicode-math.el ends here
- [elpa] 195/299: Better signature of expert declaration functions., (continued)
- [elpa] 195/299: Better signature of expert declaration functions., Stefan Monnier, 2014/11/01
- [elpa] 204/299: Revert "Skip comment or file in parens in output.", Stefan Monnier, 2014/11/01
- [elpa] 201/299: Disable electric-pair-mode., Stefan Monnier, 2014/11/01
- [elpa] 191/299: Distinguish common and advanced macros/envs., Stefan Monnier, 2014/11/01
- [elpa] 207/299: Add font name completion in fontspec.el., Stefan Monnier, 2014/11/01
- [elpa] 202/299: Disable electric-pair-mode conditionally., Stefan Monnier, 2014/11/01
- [elpa] 205/299: Handle package messages with parenthesized text., Stefan Monnier, 2014/11/01
- [elpa] 208/299: Use TeX-electric-math in LaTeX-math-insert/cal., Stefan Monnier, 2014/11/01
- [elpa] 199/299: Fix bindings of narrowing functions., Stefan Monnier, 2014/11/01
- [elpa] 209/299: Fix a bug with reftex where tex-info and LaTeX interferred., Stefan Monnier, 2014/11/01
- [elpa] 206/299: New style files and a fix to imakeidx.el.,
Stefan Monnier <=
- [elpa] 203/299: Skip comment or file in parens in output., Stefan Monnier, 2014/11/01
- [elpa] 211/299: Adapt style/babel.el to babel 3.9., Stefan Monnier, 2014/11/01
- [elpa] 210/299: Make search for \begin and \end case sensitive., Stefan Monnier, 2014/11/01
- [elpa] 214/299: Fix syntactic fontification., Stefan Monnier, 2014/11/01
- [elpa] 215/299: Declare LaTeX-shortvrb-chars as safe local variable., Stefan Monnier, 2014/11/01
- [elpa] 212/299: Distinguish between numbered and unnumbered sections., Stefan Monnier, 2014/11/01
- [elpa] 216/299: Add a ^L so that the file local variable example isn't picked up., Stefan Monnier, 2014/11/01
- [elpa] 217/299: Use default parameter of completing-read., Stefan Monnier, 2014/11/01
- [elpa] 218/299: Use default parameter of `completing-read'., Stefan Monnier, 2014/11/01
- [elpa] 213/299: *** empty log message ***, Stefan Monnier, 2014/11/01