>From 94e1b7c7f28f94250d361bdd2772512b17eac6b8 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Sat, 11 Apr 2015 12:31:02 +0200 Subject: [PATCH 1/2] Improve/update styles. * style/fbb.el: Update style to LaTeX package v1.07 from 2015/04/06. * style/erewhon.el ("erewhon"): Update style to LaTeX package v1.04 from 2015/04/07. * style/baskervaldx.el ("baskervaldx"): Update style to LaTeX package v1.07 from 2015/04/06. * style/newtxtext.el ("newtxtext"): Update style to LaTeX package v1.434 from 2015/04/07. * style/enumitem.el ("enumitem"): Fix typos. * style/everysel.el ("everysel"): Fix typo (AtNextSelect_f_ont). * style/color.el: Replace `read-string' with `TeX-read-string'. * style/currvita.el: Replace `read-string' with `TeX-read-string'. * style/wrapfig.el: Replace `read-string' with `TeX-read-string'. * style/MyriadPro.el ("MyriadPro"): Add missing lenghts `MdSlantfracSpacingBeforeSlash' and `MdSlantfracSpacingAfterSlash'. * style/caption.el (LaTeX-caption-key-val-options): Delete wrong values for `margin'-key. (LaTeX-arg-caption-command): Use `TeX-argument-insert' and do not rely on `TeX-arg-eval' anymore. (LaTeX-arg-caption-DeclareCaption): Ditto. --- ChangeLog | 33 ++++++++++++++++++++++++++ style/MyriadPro.el | 18 ++++++++------ style/baskervaldx.el | 19 +++++++++++---- style/caption.el | 55 ++++++++++++++++++++++--------------------- style/color.el | 66 ++++++++++++++++++++++++++-------------------------- style/currvita.el | 2 +- style/enumitem.el | 4 ++-- style/erewhon.el | 30 +++++++++++++++++------- style/everysel.el | 4 ++-- style/fbb.el | 28 +++++++++++++++------- style/newtxtext.el | 40 +++++++++++++++++++++++++++---- style/wrapfig.el | 20 ++++++++-------- 12 files changed, 210 insertions(+), 109 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21d6ce2..660d3e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2015-04-11 Arash Esbati + + * style/fbb.el: Update style to LaTeX package v1.07 from + 2015/04/06. + + * style/erewhon.el ("erewhon"): Update style to LaTeX package + v1.04 from 2015/04/07. + + * style/baskervaldx.el ("baskervaldx"): Update style to LaTeX + package v1.07 from 2015/04/06. + + * style/newtxtext.el ("newtxtext"): Update style to LaTeX package + v1.434 from 2015/04/07. + + * style/enumitem.el ("enumitem"): Fix typos. + + * style/everysel.el ("everysel"): Fix typo (AtNextSelect_f_ont). + + * style/color.el: Replace `read-string' with `TeX-read-string'. + + * style/currvita.el: Replace `read-string' with `TeX-read-string'. + + * style/wrapfig.el: Replace `read-string' with `TeX-read-string'. + + * style/MyriadPro.el ("MyriadPro"): Add missing lenghts + `MdSlantfracSpacingBeforeSlash' and `MdSlantfracSpacingAfterSlash'. + + * style/caption.el (LaTeX-caption-key-val-options): Delete wrong + values for `margin'-key. + (LaTeX-arg-caption-command): Use `TeX-argument-insert' and do not + rely on `TeX-arg-eval' anymore. + (LaTeX-arg-caption-DeclareCaption): Ditto. + 2015-04-02 Mosè Giordano * doc/auctex.texi (Indenting): Document indentation of "\[...\]". diff --git a/style/MyriadPro.el b/style/MyriadPro.el index 09feb1f..2ca0cc2 100644 --- a/style/MyriadPro.el +++ b/style/MyriadPro.el @@ -46,22 +46,26 @@ '("slantfrac" "Numerator" "Denominator") '("boldsymbol" "Symbol")) + ;; More control over spacing in `\slantfrac': + (LaTeX-add-lengths "MdSlantfracSpacingBeforeSlash" + "MdSlantfracSpacingAfterSlash") + ;; `\mathversion' is available with sansmath option (when (LaTeX-provided-package-options-member "MyriadPro" "sansmath") (TeX-add-symbols '("mathversion" - (TeX-arg-eval completing-read "Math version: " - '(("sans") ("sansbold") - ("sanstabular") ("sansboldtabular")))))) + (TeX-arg-eval completing-read "Math version: " + '(("sans") ("sansbold") + ("sanstabular") ("sansboldtabular")))))) ;; Fontification (when (and (featurep 'font-latex) - (eq TeX-install-font-lock 'font-latex-setup)) + (eq TeX-install-font-lock 'font-latex-setup)) (font-latex-add-keywords '(("smallfrac" "{{") - ("slantfrac" "{{")) - 'textual) + ("slantfrac" "{{")) + 'textual) (font-latex-add-keywords '(("mathversion" "{")) - 'variable))) + 'variable))) LaTeX-dialect) (defvar LaTeX-MyriadPro-package-options diff --git a/style/baskervaldx.el b/style/baskervaldx.el index 692e632..ce44d60 100644 --- a/style/baskervaldx.el +++ b/style/baskervaldx.el @@ -1,6 +1,6 @@ -;;; baskervaldx.el --- AUCTeX style for `baskervaldx.sty' (v1.04) +;;; baskervaldx.el --- AUCTeX style for `baskervaldx.sty' (v1.07) -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: address@hidden @@ -26,7 +26,7 @@ ;;; Commentary: -;; This file adds support for `baskervaldx.sty' (v1.04) from 2014/04/27. +;; This file adds support for `baskervaldx.sty' (v1.07) from 2015/04/06. ;; `baskervaldx.sty' is part of TeXLive. ;;; Code: @@ -45,6 +45,11 @@ '("useosf" 0) ;; Text commands + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sufigures" -1) ; superior figures declaration '("textlf" t) ; proportional lining figures '("texttlf" t) ; tabular lining figures '("textosf" t) ; proportional oldstyle figures @@ -61,12 +66,18 @@ ("texttosf" "{") ("textsu" "{")) 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sufigures" "")) + 'type-declaration) (font-latex-add-keywords '(("swshape" "")) 'bold-declaration))) LaTeX-dialect) (defvar LaTeX-baskervaldx-package-options - '("lining" "lf" "oldstyle" "osf" "tabular" "proportional" + '("lining" "lf" "oldstyle" "osf" "tabular" "proportional" "p" "scale" "scaled" "sups" "swash") "Package options for the baskervaldx package.") diff --git a/style/caption.el b/style/caption.el index ddefb5b..0ec6c29 100644 --- a/style/caption.el +++ b/style/caption.el @@ -70,7 +70,7 @@ ("labelsep" ("none" "colon" "period" "space" "quad" "newline" "endash")) ("list" ("false" "no" "off" "0" "true" "yes" "on" "1")) ("listformat" ("empty" "simple" "paren" "subsimple" "subparens")) - ("margin" ("type*" "width")) + ("margin") ("margin*") ("maxmargin") ("minmargin") @@ -166,28 +166,29 @@ in `caption'-completions." (pushnew (list key (list val)) opts :test #'equal))) (setq LaTeX-caption-key-val-options-local (copy-alist opts))))) -(defun LaTeX-arg-caption-command (&optional optional prompt) - "Insert caption-commands from `caption.sty'. If OPTIONAL is non-nil, -indicate `(Optional)' while reading key=val. PROMPT replaces the -standard one." +(defun LaTeX-arg-caption-command (optional &optional prompt) + "Insert caption-commands from `caption.sty'. If OPTIONAL, +indicate `(Optional)' while reading key=val and insert it in +square brackets. PROMPT replaces the standard one." (LaTeX-caption-update-key-val-options) (let ((opts (TeX-read-key-val optional LaTeX-caption-key-val-options-local prompt))) - (format "%s" opts))) + (TeX-argument-insert opts optional))) ;; In `LaTeX-caption-DeclareCaption-regexp', we match (0 1 2). When ;; adding a new `Name', we need something unique for `0'-match until ;; the next `C-c C-n'. We mimic that regex-match bei concat'ing the ;; elements. It will vanish upon next `C-c C-n'. -(defun LaTeX-arg-caption-DeclareCaption (format) - "Insert various `\\DeclareCaptionFORMAT' commands. FORMAT is -the suffix of the command." +(defun LaTeX-arg-caption-DeclareCaption (optional format) + "Insert various `\\DeclareCaptionFORMAT' commands. If +OPTIONAL, insert argument in square brackets. FORMAT is the +suffix of the command." (let ((name (TeX-read-string "Name: "))) (LaTeX-add-caption-DeclareCaptions (list (concat "\\DeclareCaption" format "{" name "}") format name)) - (format "%s" name))) + (TeX-argument-insert name optional))) (TeX-add-style-hook "caption" @@ -222,59 +223,59 @@ the suffix of the command." '("captionsetup" [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type") LaTeX-caption-supported-float-types] - (TeX-arg-eval LaTeX-arg-caption-command)) + (LaTeX-arg-caption-command)) '("captionsetup*" [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type") LaTeX-caption-supported-float-types] - (TeX-arg-eval LaTeX-arg-caption-command)) + (LaTeX-arg-caption-command)) '("clearcaptionsetup" - [TeX-arg-eval LaTeX-arg-caption-command t "Single key"] + [LaTeX-arg-caption-command "Single key"] (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type") LaTeX-caption-supported-float-types)) '("clearcaptionsetup*" - [TeX-arg-eval LaTeX-arg-caption-command t "Single key"] + [LaTeX-arg-caption-command "Single key"] (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type") LaTeX-caption-supported-float-types)) '("ContinuedFloat" 0) '("DeclareCaptionFont" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Font") t) + (LaTeX-arg-caption-DeclareCaption "Font") t) '("DeclareCaptionFormat" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Format") t) + (LaTeX-arg-caption-DeclareCaption "Format") t) '("DeclareCaptionFormat*" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Format") t) + (LaTeX-arg-caption-DeclareCaption "Format") t) '("DeclareCaptionJustification" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Justification") t) + (LaTeX-arg-caption-DeclareCaption "Justification") t) '("DeclareCaptionLabelFormat" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "LabelFormat") t) + (LaTeX-arg-caption-DeclareCaption "LabelFormat") t) '("DeclareCaptionLabelSeparator" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "LabelSeparator") t) + (LaTeX-arg-caption-DeclareCaption "LabelSeparator") t) '("DeclareCaptionLabelSeparator*" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "LabelSeparator") t) + (LaTeX-arg-caption-DeclareCaption "LabelSeparator") t) '("DeclareCaptionListFormat" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "ListFormat") t) + (LaTeX-arg-caption-DeclareCaption "ListFormat") t) '("DeclareCaptionOption" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Option") t) + (LaTeX-arg-caption-DeclareCaption "Option") t) '("DeclareCaptionStyle" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "Style") - [TeX-arg-eval LaTeX-arg-caption-command t "Additional options"] - (TeX-arg-eval LaTeX-arg-caption-command nil "Options")) + (LaTeX-arg-caption-DeclareCaption "Style") + [LaTeX-arg-caption-command "Additional options"] + (LaTeX-arg-caption-command "Options")) '("DeclareCaptionTextFormat" - (TeX-arg-eval LaTeX-arg-caption-DeclareCaption "TextFormat") t) + (LaTeX-arg-caption-DeclareCaption "TextFormat") t) '("bothIfFirst" 2) diff --git a/style/color.el b/style/color.el index 2af29f6..9d008b7 100644 --- a/style/color.el +++ b/style/color.el @@ -98,7 +98,7 @@ package.") "Insert arguments of `\\definecolor' from `color.sty'." ;; \definecolor{}{}{} ;; Ask for , add to our list and insert it - (let ((colorname (read-string "Color name: "))) + (let ((colorname (TeX-read-string "Color name: "))) (LaTeX-add-color-definecolors colorname) (TeX-argument-insert colorname optional)) ;; Ask and insert @@ -112,22 +112,22 @@ package.") ;; Depending on , ask for and insert it (cond (;; model (string-equal model "cmyk") - (let ((cyan (read-string "Value Cyan (between 0,1): ")) - (magenta (read-string "Value Magenta (between 0,1): ")) - (yellow (read-string "Value Yellow (between 0,1): ")) - (black (read-string "Value Black (between 0,1): "))) + (let ((cyan (TeX-read-string "Value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Value Yellow (between 0,1): ")) + (black (TeX-read-string "Value Black (between 0,1): "))) (TeX-argument-insert (concat cyan "," magenta "," yellow "," black) optional))) ;; model ((string-equal model "rgb") - (let ((red (read-string "Value Red (between 0,1): ")) - (green (read-string "Value Green (between 0,1): ")) - (blue (read-string "Value Blue (between 0,1): "))) + (let ((red (TeX-read-string "Value Red (between 0,1): ")) + (green (TeX-read-string "Value Green (between 0,1): ")) + (blue (TeX-read-string "Value Blue (between 0,1): "))) (TeX-argument-insert (concat red "," green "," blue) optional))) ;; model ((string-equal model "gray") - (let ((grayness (read-string "Value Gray (between 0,1): "))) + (let ((grayness (TeX-read-string "Value Gray (between 0,1): "))) (TeX-argument-insert grayness optional))) ;; model takes the dvipsnames ((string-equal model "named") @@ -156,22 +156,22 @@ package.") (insert (concat LaTeX-optop model LaTeX-optcl)) (cond (;; model (string-equal model "cmyk") - (let ((cyan (read-string "Value Cyan (between 0,1): ")) - (magenta (read-string "Value Magenta (between 0,1): ")) - (yellow (read-string "Value Yellow (between 0,1): ")) - (black (read-string "Value Black (between 0,1): "))) + (let ((cyan (TeX-read-string "Value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Value Yellow (between 0,1): ")) + (black (TeX-read-string "Value Black (between 0,1): "))) (TeX-argument-insert (concat cyan "," magenta "," yellow "," black) optional))) ;; model ((string-equal model "rgb") - (let ((red (read-string "Value Red (between 0,1): ")) - (green (read-string "Value Green (between 0,1): ")) - (blue (read-string "Value Blue (between 0,1): "))) + (let ((red (TeX-read-string "Value Red (between 0,1): ")) + (green (TeX-read-string "Value Green (between 0,1): ")) + (blue (TeX-read-string "Value Blue (between 0,1): "))) (TeX-argument-insert (concat red "," green "," blue) optional))) ;; model ((string-equal model "gray") - (let ((grayness (read-string "Value Gray (between 0,1): "))) + (let ((grayness (TeX-read-string "Value Gray (between 0,1): "))) (TeX-argument-insert grayness optional))) ;; model; allowed are dvipsnames. ((string-equal model "named") @@ -204,35 +204,35 @@ package.") (insert (concat LaTeX-optop model LaTeX-optcl)) (cond (;; model (string-equal model "cmyk") - (let ((cyan (read-string "Frame value Cyan (between 0,1): ")) - (magenta (read-string "Frame value Magenta (between 0,1): ")) - (yellow (read-string "Frame value Yellow (between 0,1): ")) - (black (read-string "Frame value Black (between 0,1): "))) + (let ((cyan (TeX-read-string "Frame value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Frame value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Frame value Yellow (between 0,1): ")) + (black (TeX-read-string "Frame value Black (between 0,1): "))) (TeX-argument-insert (concat cyan "," magenta "," yellow "," black) optional)) - (let ((cyan (read-string "Box value Cyan (between 0,1): ")) - (magenta (read-string "Box value Magenta (between 0,1): ")) - (yellow (read-string "Box value Yellow (between 0,1): ")) - (black (read-string "Box value Black (between 0,1): "))) + (let ((cyan (TeX-read-string "Box value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Box value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Box value Yellow (between 0,1): ")) + (black (TeX-read-string "Box value Black (between 0,1): "))) (TeX-argument-insert (concat cyan "," magenta "," yellow "," black) optional))) ;; model ((string-equal model "rgb") - (let ((red (read-string "Frame value Red (between 0,1): ")) - (green (read-string "Frame value Green (between 0,1): ")) - (blue (read-string "Frame value Blue (between 0,1): "))) + (let ((red (TeX-read-string "Frame value Red (between 0,1): ")) + (green (TeX-read-string "Frame value Green (between 0,1): ")) + (blue (TeX-read-string "Frame value Blue (between 0,1): "))) (TeX-argument-insert (concat red "," green "," blue) optional)) - (let ((red (read-string "Box value Red (between 0,1): ")) - (green (read-string "Box value Green (between 0,1): ")) - (blue (read-string "box value Blue (between 0,1): "))) + (let ((red (TeX-read-string "Box value Red (between 0,1): ")) + (green (TeX-read-string "Box value Green (between 0,1): ")) + (blue (TeX-read-string "box value Blue (between 0,1): "))) (TeX-argument-insert (concat red "," green "," blue) optional))) ;; model ((string-equal model "gray") - (let ((grayness (read-string "Frame value Gray (between 0,1): "))) + (let ((grayness (TeX-read-string "Frame value Gray (between 0,1): "))) (TeX-argument-insert grayness optional)) - (let ((grayness (read-string "Box value Gray (between 0,1): "))) + (let ((grayness (TeX-read-string "Box value Gray (between 0,1): "))) (TeX-argument-insert grayness optional))) ;; model; allowed are dvipsnames. ((string-equal model "named") diff --git a/style/currvita.el b/style/currvita.el index f2a1d55..3da2738 100644 --- a/style/currvita.el +++ b/style/currvita.el @@ -36,7 +36,7 @@ "Insert ENV, a mandatory label and the first item." (LaTeX-insert-environment env - (let ((heading (read-string "Heading of list: "))) + (let ((heading (TeX-read-string "Heading of list: "))) (format "{%s}" heading))) (if (TeX-active-mark) (progn diff --git a/style/enumitem.el b/style/enumitem.el index 8ea4545..b9d88e4 100644 --- a/style/enumitem.el +++ b/style/enumitem.el @@ -369,7 +369,7 @@ in `enumitem'-completions." ("itemize*") ("enumerate*") ("description*"))) "Max-depth") - ;; \setlist{}{} + ;; \setlist[]{} '("setlist" [TeX-arg-eval mapconcat 'identity (TeX-completing-read-multiple @@ -382,7 +382,7 @@ in `enumitem'-completions." (let ((opts (TeX-read-key-val nil LaTeX-enumitem-key-val-options-local))) (format "%s" opts))))) - ;; \setlist*{}{} + ;; \setlist*[]{} '("setlist*" [TeX-arg-eval mapconcat 'identity (TeX-completing-read-multiple diff --git a/style/erewhon.el b/style/erewhon.el index eaa8e67..f2ca6d4 100644 --- a/style/erewhon.el +++ b/style/erewhon.el @@ -1,6 +1,6 @@ -;;; erewhon.el --- AUCTeX style for `erewhon.sty' (v1.0) +;;; erewhon.el --- AUCTeX style for `erewhon.sty' (v1.04) -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: address@hidden @@ -26,7 +26,7 @@ ;;; Commentary: -;; This file adds support for `erewhon.sty' (v1.0) from 2014/09/08. +;; This file adds support for `erewhon.sty' (v1.04) from 2015/04/07. ;; `erewhon.sty' is part of TeXLive. ;;; Code: @@ -43,8 +43,14 @@ ;; Only preamble commands '("useosf" 0) + '("useproportional" 0) ;; Text commands + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sufigures" -1) ; superior figures declaration '("textlf" t) ; proportional lining figures '("texttlf" t) ; tabular lining figures '("textosf" t) ; proportional oldstyle figures @@ -57,18 +63,24 @@ ;; Fontification (when (and (featurep 'font-latex) - (eq TeX-install-font-lock 'font-latex-setup)) + (eq TeX-install-font-lock 'font-latex-setup)) (font-latex-add-keywords '(("textlf" "{") - ("texttlf" "{") - ("textosf" "{") - ("texttosf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") ("textsu" "{") ("textin" "{") ("textnu" "{") ("textde" "{")) - 'type-command) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sufigures" "")) + 'type-declaration) (font-latex-add-keywords '(("textfrac" "{{")) - 'textual))) + 'textual))) LaTeX-dialect) (defvar LaTeX-erewhon-package-options diff --git a/style/everysel.el b/style/everysel.el index da6101d..05c1432 100644 --- a/style/everysel.el +++ b/style/everysel.el @@ -1,6 +1,6 @@ ;;; everysel.el --- AUCTeX style for `everysel.sty' -;; Copyright (C) 2012 Free Software Foundation, Inc. +;; Copyright (C) 2012, 2015 Free Software Foundation, Inc. ;; Author: Mads Jensen ;; Created: 2012-12-25 @@ -36,7 +36,7 @@ ;; adds a hook (the argument code) to be called after \\selectfont '("EverySelectfont" 1) ;; adds a hook to be called after the next \\selectfont - '("AtNextSelectont" 1))) + '("AtNextSelectfont" 1))) LaTeX-dialect) (defvar LaTeX-everysel-package-options nil diff --git a/style/fbb.el b/style/fbb.el index 220da8f..1e4baba 100644 --- a/style/fbb.el +++ b/style/fbb.el @@ -1,6 +1,6 @@ -;;; fbb.el --- AUCTeX style for `fbb.sty' (v1.06) +;;; fbb.el --- AUCTeX style for `fbb.sty' (v1.07) -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: address@hidden @@ -26,7 +26,7 @@ ;;; Commentary: -;; This file adds support for `fbb.sty' (v1.06) from 2014/09/09. +;; This file adds support for `fbb.sty' (v1.07) from 2015/04/06. ;; `fbb.sty' is part of TeXLive. ;;; Code: @@ -41,11 +41,15 @@ ;; New symbols (TeX-add-symbols - ;; Only preamble commands + ;; Only preamble command '("useosf" 0) - '("usetosf" 0) ;; Text commands + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sufigures" -1) ; superior figures declaration '("textlf" t) ; proportional lining figures '("texttlf" t) ; tabular lining figures '("textosf" t) ; proportional oldstyle figures @@ -54,13 +58,19 @@ ;; Fontification (when (and (featurep 'font-latex) - (eq TeX-install-font-lock 'font-latex-setup)) + (eq TeX-install-font-lock 'font-latex-setup)) (font-latex-add-keywords '(("textlf" "{") ("texttlf" "{") - ("textosf" "{") - ("texttosf" "{") + ("textosf" "{") + ("texttosf" "{") ("textsu" "{")) - 'type-command))) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sufigures" "")) + 'type-declaration))) LaTeX-dialect) (defvar LaTeX-fbb-package-options diff --git a/style/newtxtext.el b/style/newtxtext.el index 801c3f0..7fb6e76 100644 --- a/style/newtxtext.el +++ b/style/newtxtext.el @@ -1,6 +1,6 @@ -;;; newtxtext.el --- AUCTeX style for `newtxtext.sty' (v1.321) +;;; newtxtext.el --- AUCTeX style for `newtxtext.sty' (v1.434) -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: address@hidden @@ -26,7 +26,7 @@ ;;; Commentary: -;; This file adds support for `newtxtext.sty' (v1.321) from 2014/11/16. +;; This file adds support for `newtxtext.sty' (v1.434) from 2015/04/07. ;; `newtxtext.sty' is part of TeXLive. ;;; Code: @@ -40,11 +40,41 @@ ;; New symbols (TeX-add-symbols - '("useosf" 0))) ; Only preamble command + '("useosf" 0) ; Only preamble command + '("useproportional" 0) ; Only preamble command + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sustyle" -1) ; sup style declaration + '("textlf" t) ; lf command + '("texttlf" t) ; tlf command + '("textosf" t) ; osf command + '("texttosf" t) ; tosf command + '("textsu" t)) ; sup style command + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textsu" "{")) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sustyle" "")) + 'type-declaration))) LaTeX-dialect) (defvar LaTeX-newtxtext-package-options - '("defaultsups" "helvratio" "osf" "scaled" "scosf") + '("defaultsups" "helvratio" "osf" "scaled" "scosf" + ;; New options since 1.4 + "largesc" "adobesc" "theoremfont" + "lining" "lf" "oldstyle" "tabular" "p" "proportional") "Package options for the newtxtext package.") ;;; newtxtext.el ends here diff --git a/style/wrapfig.el b/style/wrapfig.el index bcb90c2..097e5ad 100644 --- a/style/wrapfig.el +++ b/style/wrapfig.el @@ -40,14 +40,14 @@ (lambda (env &rest ignore) (LaTeX-insert-environment env - (let ((narrow (read-string "(Optional) Number of narrow lines: ")) + (let ((narrow (TeX-read-string "(Optional) Number of narrow lines: ")) (placement (completing-read "Placement: " '(("r") ("R") ("l") ("L") ("i") ("I") ("o") ("O")))) - (overhang (read-string "(Optional) Overhang: ")) - (width (read-string "Width: "))) + (overhang (TeX-read-string "(Optional) Overhang: ")) + (width (TeX-read-string "Width: "))) (concat (unless (string= narrow "") (format "[%s]" narrow)) @@ -61,14 +61,14 @@ (lambda (env &rest ignore) (LaTeX-insert-environment env - (let ((narrow (read-string "(Optional) Number of narrow lines: ")) + (let ((narrow (TeX-read-string "(Optional) Number of narrow lines: ")) (placement (completing-read "Placement: " '(("r") ("R") ("l") ("L") ("i") ("I") ("o") ("O")))) - (overhang (read-string "(Optional) Overhang: ")) - (width (read-string "Width: "))) + (overhang (TeX-read-string "(Optional) Overhang: ")) + (width (TeX-read-string "Width: "))) (concat (unless (string= narrow "") (format "[%s]" narrow)) @@ -82,15 +82,15 @@ (lambda (env &rest ignore) (LaTeX-insert-environment env - (let ((floattype (read-string "Float type: ")) - (narrow (read-string "(Optional) Number of narrow lines: ")) + (let ((floattype (TeX-read-string "Float type: ")) + (narrow (TeX-read-string "(Optional) Number of narrow lines: ")) (placement (completing-read "Placement: " '(("r") ("R") ("l") ("L") ("i") ("I") ("o") ("O")))) - (overhang (read-string "(Optional) Overhang: ")) - (width (read-string "Width: "))) + (overhang (TeX-read-string "(Optional) Overhang: ")) + (width (TeX-read-string "Width: "))) (concat (format "{%s}" floattype) (unless (string= narrow "") -- 2.3.5