emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 12/299: * style/siunitx.el (LaTeX-siunitx-package-options): New v


From: Stefan Monnier
Subject: [elpa] 12/299: * style/siunitx.el (LaTeX-siunitx-package-options): New variable. ("siunitx"): Use it. * style/hyperref.el (LaTeX-hyperref-href-options): New variable. (LaTeX-hyperref-package-options, "hyperref"): Use it.
Date: Sun, 02 Nov 2014 03:09:52 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit e5d043ed7d4371a75e55e7240f98a695ac89888d
Author: Tassilo Horn <address@hidden>
Date:   Thu Dec 27 19:59:45 2012 +0000

    * style/siunitx.el (LaTeX-siunitx-package-options): New variable.
    ("siunitx"): Use it.
    * style/hyperref.el (LaTeX-hyperref-href-options): New variable.
    (LaTeX-hyperref-package-options, "hyperref"): Use it.
---
 ChangeLog         |    8 ++
 style/hyperref.el |  159 ++++++++++++++++++++++++++++++++++++--------
 style/siunitx.el  |  192 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 321 insertions(+), 38 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 58f945e..be22c47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-12-27  Mos� Giordano  <address@hidden>
+
+       * style/siunitx.el (LaTeX-siunitx-package-options): New variable.
+       ("siunitx"): Use it.
+
+       * style/hyperref.el (LaTeX-hyperref-href-options): New variable.
+       (LaTeX-hyperref-package-options, "hyperref"): Use it.
+
 2012-12-27  Tassilo Horn  <address@hidden>
 
        * style/mflogo.el: New style by Mads Jensen <address@hidden>.
diff --git a/style/hyperref.el b/style/hyperref.el
index 1f703f7..d4a7117 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -1,4 +1,4 @@
-;;; hyperref.el --- AUCTeX style for the hyperref class.
+;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m
 
 ;; Copyright (C) 2008 Free Software Foundation, Inc.
 
@@ -31,38 +31,136 @@
 ;;; Code:
 
 (defvar LaTeX-hyperref-package-options
-  '("a4paper" "a5paper" "anchorcolor" "b5paper" "backref" "baseurl"
-    "bookmarks" "bookmarksnumbered" "bookmarksopen"
-    "bookmarksopenlevel \maxdimen" "bookmarkstype" "breaklinks"
-    "CJKbookmarks" "citebordercolor" "citecolor" "colorlinks" "debug"
-    "draft" "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsone"
-    "dviwindo" "encap" "executivepaper" "extension" "filebordercolor"
-    "filecolor" "final" "frenchlinks" "hyperfigures" "hyperfootnotes"
-    "hyperindex" "hypertex" "hypertexnames" "implicit" "latex2html"
-    "legalpaper" "letterpaper" "linkbordercolor" "linkcolor"
-    "linktocpage" "menubordercolor" "menucolor" "nativepdf"
-    "naturalnames" "nesting" "pageanchor" "pagebackref"
-    "pagebordercolor" "pagecolor" "pdfauthor" "pdfborder"
-    "pdfcenterwindow" "pdfcreator" "pdfdirection" "pdfdisplaydoctitle"
-    "pdfduplex" "pdffitwindow" "pdfhighlight" "pdfkeywords" "pdflang"
-    "pdfmark" "pdfmenubar" "pdfnewwindow" "pdfnonfullscreenpagemode"
-    "pdfnumcopies" "pdfpagelayout" "pdfpagemode" "pdfpagelabels"
-    "pdfpagescrop" "pdfpagetransition" "pdfpicktrackbypdfsize"
-    "pdfprintarea" "pdfprintclip" "pdfprintpagerange"
-    "pdfprintscaling" "pdfproducer" "pdfstartpage" "pdfstartview"
-    "pdfsubject" "pdftex" "pdftitle" "pdftoolbar" "pdfview"
-    "pdfviewarea" "pdfviewclip" "pdfwindowui" "plainpages" "ps2pdf"
-    "raiselinks" "runbordercolor" "setpagesize" "tex4ht" "textures"
-    "unicode" "urlbordercolor" "urlcolor" "verbose" "vtex" "xetex")
+  '(;; See http://www.tug.org/applications/hyperref/manual.html#x1-40003
+    ;; General options
+    ("draft" ("true" "false"))
+    ("final" ("true" "false"))
+    ("debug" ("true" "false"))
+    ("verbose" ("true" "false"))
+    ("implicit" ("true" "false"))
+    ("setpagesize" ("true" "false"))
+    ;; Options for destination names
+    ("destlabel" ("true" "false"))
+    ("hypertexnames" ("true" "false"))
+    ("naturalnames" ("true" "false"))
+    ("plainpages" ("true" "false"))
+    ;; Configuration options
+    ("raiselinks" ("true" "false"))
+    ("breaklinks" ("true" "false"))
+    ("pageanchor" ("true" "false"))
+    ("nesting" ("true" "false"))
+    ;; Backend drivers
+    ("driverfallback")
+    ("dvipdfm")
+    ("dvipdfmx")
+    ("dvips")
+    ("dvipsone")
+    ("dviwindo")
+    ("hypertex")
+    ("latex2html")
+    ("nativepdf")
+    ("pdfmark")
+    ("pdftex")
+    ("ps2pdf")
+    ("tex4ht")
+    ("textures")
+    ("vtex")
+    ("vtexpdfmark")
+    ("xetex")
+    ;;  Extension options
+    ("extension")
+    ("hyperfigures" ("true" "false"))
+    ("backref" ("section" "slide" "page" "none" "false"))
+    ("pagebackref" ("true" "false"))
+    ("hyperindex" ("true" "false"))
+    ("hyperfootnotes" ("true" "false"))
+    ("encap")
+    ("linktocpage" ("true" "false"))
+    ("breaklinks" ("true" "false"))
+    ("colorlinks" ("true" "false"))
+    ("linkcolor")
+    ("anchorcolor")
+    ("citecolor")
+    ("filecolor")
+    ("menucolor")
+    ("runcolor")
+    ("urlcolor")
+    ("allcolors")
+    ("frenchlinks" ("true" "false"))
+    ("hidelinks")
+    ;; PDF-specific display options
+    ("bookmarks" ("true" "false"))
+    ("bookmarksopen" ("true" "false"))
+    ("bookmarksopenlevel")
+    ("bookmarksnumbered" ("true" "false"))
+    ("bookmarkstype")
+    ("CJKbookmarks" ("true" "false"))
+    ("pdfhighlight" ("/I" "/N" "/O" "/P"))
+    ("citebordercolor")
+    ("filebordercolor")
+    ("linkbordercolor")
+    ("menubordercolor")
+    ("runbordercolor")
+    ("urlbordercolor")
+    ("allbordercolors")
+    ("pdfborder")
+    ;; PDF display and information options
+    ("baseurl")
+    ("pdfpagemode" ("UseOutlines" "UseThumbs" "FullScreen" "UseOC" 
"UseAttachments"))
+    ("pdftitle")
+    ("pdfauthor")
+    ("pdfsubject")
+    ("pdfcreator")
+    ("pdfproducer")
+    ("pdfkeywords")
+    ("pdftrapped" ("True" "False" "Unknown"))
+    ("pdfinfo")
+    ("pdfview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" "FitBV"))
+    ("pdfstartpage")
+    ("pdfstartview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" "FitBV"))
+    ("pdfremotestartview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" 
"FitBV"))
+    ("pdfpagescrop")
+    ("pdfcenterwindow" ("true" "false"))
+    ("pdfdirection" ("L2R" "R2L"))
+    ("pdfdisplaydoctitle" ("true" "false"))
+    ("pdfduplex" ("Simplex" "DuplexFlipShortEdge" "DuplexFlipLongEdge"))
+    ("pdffitwindow" ("true" "false"))
+    ("pdflang")
+    ("pdfmenubar" ("true" "false"))
+    ("pdfnewwindow" ("true" "false"))
+    ("pdfnonfullscreenpagemode" ("UseNone" "UseOutlines" "UseThumbs" 
"FullScreen" "UseOC" "UseAttachments"))
+    ("pdfnumcopies")
+    ("pdfpagelayout" ("SinglePage" "OneColumn" "TwoColumnLeft" 
"TwoColumnRight" "TwoPageLeft" "TwoPageRight"))
+    ("pdfpagelabels" ("true" "false"))
+    ("pdfpagetransition" ("Blinds" "Box" "Dissolve" "Glitter" "Split" "Wipe"))
+    ("pdfpicktraybypdfsize" ("true" "false"))
+    ("pdfprintarea" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox"))
+    ("pdfprintclip" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox"))
+    ("pdfprintpagerange")
+    ("pdfprintscaling" ("AppDefault" "None"))
+    ("pdftoolbar" ("true" "false"))
+    ("pdfviewarea" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox"))
+    ("pdfviewclip" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox"))
+    ("pdfwindowui" ("true" "false"))
+    ("unicode" ("true" "false")))
   "Package options for the hyperref package.")
 
+(defvar LaTeX-hyperref-href-options
+  '(("pdfremotestartview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" 
"FitBV"))
+    ("pdfnewwindow" ("true" "false"))
+    ("page")
+    ("ismap" ("true" "false"))
+    ("nextactionraw"))
+  "Key=value options for href macro of the hyperref package.")
+
 (TeX-add-style-hook
  "hyperref"
  (lambda ()
    ;; hyperref.sty loads url.sty
    (TeX-run-style-hooks "url")
    (TeX-add-symbols
-    '("href" "URL" "Text")
+    '("hypersetup" (TeX-arg-key-val LaTeX-hyperref-package-options))
+    '("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ] "URL" "Text")
     '("nolinkurl" t)
     '("hyperbaseurl" t)
     '("hyperimage" "Image URL" "Text")
@@ -74,7 +172,13 @@
     '("autoref" TeX-arg-ref)
     '("ref*" TeX-arg-ref)
     '("pageref*" TeX-arg-ref)
+    '("autopageref" TeX-arg-ref)
+    '("autopageref*" TeX-arg-ref)
     '("pdfstringdef" "Macro name" "TeX string")
+    '("pdfbookmark" [ "Level" ] "Text" "name")
+    '("currentpdfbookmark" "Text" "Name")
+    '("subpdfbookmark" "Text" "Name")
+    '("belowpdfbookmark" "Text" "Name")
     '("texorpdfstring" "TeX string" "PDF string")
     '("hypercalcbp" t)
     '("Acrobatmenu" "Menu option" "Text")
@@ -102,7 +206,7 @@
    (when (and (fboundp 'font-latex-add-keywords)
              (fboundp 'font-latex-set-syntactic-keywords)
              (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("href" "{{")
+     (font-latex-add-keywords '(("href" "[{{")
                                ("nolinkurl" "{")
                                ("hyperbaseurl" "{")
                                ("hyperimage" "{{")
@@ -112,7 +216,8 @@
                                ("hypertarget" "{{")
                                ("autoref" "{")
                                ("ref" "*{")
-                               ("pageref" "*{"))
+                               ("pageref" "*{")
+                               ("autopageref" "*{"))
                              'reference)
      ;; For syntactic fontification, e.g. verbatim constructs.
      (font-latex-set-syntactic-keywords))
diff --git a/style/siunitx.el b/style/siunitx.el
index 8ba6dce..eeb5466 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -29,25 +29,195 @@
 
 ;;; Code:
 
+(defvar LaTeX-siunitx-package-options
+  '(;; Detecting fonts
+    ("detect-all")
+    ("detect-display-math" ("true" "false"))
+    ("detect-family" ("true" "false"))
+    ("detect-inline-family" ("math" "text"))
+    ("detect-inline-weight" ("math" "text"))
+    ("detect-mode" ("true" "false"))
+    ("detect-none")
+    ("detect-shape" ("true" "false"))
+    ("detect-weight" ("true" "false"))
+    ;; Font settings
+    ("color")
+    ("math-rm")
+    ("math-sf")
+    ("math-tt")
+    ("mode" ("math" "text"))
+    ("number-color")
+    ("text-rm")
+    ("text-sf")
+    ("text-tt")
+    ("unit-color")
+    ;;  Parsing numbers
+    ("input-close-uncertainty")
+    ("input-comparators")
+    ("input-complex-roots")
+    ("input-decimal-markers")
+    ("input-digits")
+    ("input-exponent-markers")
+    ("input-ignore")
+    ("input-open-uncertainty")
+    ("input-protect-tokens")
+    ("input-signs")
+    ("input-uncertainty-signs")
+    ("input-symbols")
+    ("parse-numbers" ("true" "false"))
+    ;;  Post-processing numbers
+    ("add-decimal-zero" ("true" "false"))
+    ("add-integer-zero" ("true" "false"))
+    ("explicit-sign")
+    ("fixed-exponent")
+    ("minimum-integer-digits")
+    ("omit-uncertainty" ("true" "false"))
+    ("retain-explicit-plus" ("true" "false"))
+    ("retain-unity-mantissa" ("true" "false"))
+    ("retain-zero-exponent" ("true" "false"))
+    ("round-half" ("up" "even"))
+    ("round-integer-to-decimal" ("true" "false"))
+    ("round-minimum")
+    ("round-mode" ("off" "figures" "places"))
+    ("round-precision")
+    ("scientific-notation" ("true" "false" "fixed" "engineering"))
+    ("zero-decimal-to-integer" ("true" "false"))
+    ;;  Printing numbers
+    ("bracket-negative-numbers" ("true" "false"))
+    ("bracket-numbers" ("true" "false"))
+    ("close-bracket")
+    ("complex-root-position" ("after-number" "before-number"))
+    ("copy-complex-root")
+    ("copy-decimal-marker")
+    ("exponent-base")
+    ("exponent-product")
+    ("group-digits" ("true" "false" "decimal" "integer"))
+    ("group-minimum-digits")
+    ("group-separator")
+    ("negative-color")
+    ("open-bracket")
+    ("output-close-uncertainty")
+    ("output-complex-root")
+    ("output-decimal-marker")
+    ("output-exponent-marker")
+    ("output-open-uncertainty")
+    ("separate-uncertainty" ("true" "false"))
+    ("tight-spacing" ("true" "false"))
+    ("uncertainty-separator")
+    ;; Multi-part numbers
+    ("fraction-function")
+    ("input-product")
+    ("input-quotient")
+    ("output-product")
+    ("output-quotient")
+    ("quotient-mode" ("symbol" "fraction"))
+    ;; Lists and ranges of numbers
+    ("list-final-separator")
+    ("list-pair-separator")
+    ("list-separator")
+    ("range-phrase")
+    ;; Angles
+    ("add-arc-degree-zero" ("true" "false"))
+    ("add-arc-minute-zero" ("true" "false"))
+    ("add-arc-second-zero" ("true" "false"))
+    ("angle-symbol-over-decimal" ("true" "false"))
+    ("arc-separator")
+    ("number-angle-product")
+    ;; Creating units
+    ("free-standing-units" ("true" "false"))
+    ("overwrite-functions" ("true" "false"))
+    ("space-before-unit" ("true" "false"))
+    ("unit-optional-argument" ("true" "false"))
+    ("use-xspace" ("true" "false"))
+    ;; Loading additional units
+    ("abbreviations" ("true" "false"))
+    ("binary-units" ("true" "false"))
+    ("version-1-compatibility" ("true" "false"))
+    ;; Using units
+    ("bracket-unit-denominator" ("true" "false"))
+    ("forbid-literal-units" ("true" "false"))
+    ("literal-superscript-as-power" ("true" "false"))
+    ("inter-unit-product")
+    ("parse-units" ("true" "false"))
+    ("per-mode" ("reciprocal" "fraction" "reciprocal-positive-first" "symbol" 
"repeated-symbol" "symbol-or-fraction"))
+    ("per-symbol")
+    ("power-font" ("number" "unit"))
+    ("prefixes-as-symbols" ("true" "false"))
+    ("qualifier-mode" ("subscript" "brackets" "phrase" "space" "text"))
+    ("qualifier-phrase")
+    ("sticky-per" ("true" "false"))
+    ;; Numbers with units
+    ("allow-number-unit-breaks" ("true" "false"))
+    ("exponent-to-prefix" ("true" "false"))
+    ("list-units" ("brackets" "repeat" "single"))
+    ("multi-part-units" ("brackets" "repeat" "single"))
+    ("number-unit-product")
+    ("product-units" ("repeat" "brackets" "brackets-power" "power" "repeat" 
"single"))
+    ("range-units" ("brackets" "repeat" "single"))
+    ;;  Tabular material
+    ("table-align-comparator" ("true" "false"))
+    ("table-align-exponent" ("true" "false"))
+    ("table-align-text-pre" ("true" "false"))
+    ("table-align-text-post" ("true" "false"))
+    ("table-align-uncertainty" ("true" "false"))
+    ("table-alignment" ("center" "left" "right"))
+    ("table-auto-round" ("true" "false"))
+    ("table-column-width")
+    ("table-comparator" ("true" "false"))
+    ("table-figures-decimal")
+    ("table-figures-exponent")
+    ("table-figures-integer")
+    ("table-figures-uncertainty")
+    ("table-format")
+    ("table-number-alignment" ("center-decimal-marker" "center" "left" 
"right"))
+    ("table-parse-only" ("true" "false"))
+    ("table-omit-exponent" ("true" "false"))
+    ("table-space-text-pre")
+    ("table-space-text-post")
+    ("table-sign-exponent" ("true" "false"))
+    ("table-sign-mantissa" ("true" "false"))
+    ("table-text-alignment" ("center" "left" "right"))
+    ("table-unit-alignment" ("center" "left" "right"))
+    ;; Symbols
+    ("math-angstrom")
+    ("math-arcminute")
+    ("math-arcsecond")
+    ("math-celsius")
+    ("math-degree")
+    ("math-micro")
+    ("math-ohm")
+    ("redefine-symbols" ("true" "false"))
+    ("text-angstrom")
+    ("text-arcminute")
+    ("text-arcsecond")
+    ("text-celsius")
+    ("text-degree")
+    ("text-micro")
+    ("text-ohm")
+    ;; Other options
+    ("locale" ("FR" "DE" "UK" "US" "ZA"))
+    ("strict"))
+  "Package options for the siunitx package.")
+
 (TeX-add-style-hook "siunitx"
  (lambda ()
    (TeX-add-symbols
     ;; Numbers
-    '("ang" [ "Options" ] "Angle")
-    '("num" [ "Options" ] "Number")
-    '("numlist" [ "Options" ] "Numbers")
-    '("numrange" [ "Options" ] "Number 1" "Number 2")
+    '("ang" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Angle")
+    '("num" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Number")
+    '("numlist" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Numbers")
+    '("numrange" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Number 
1" "Number 2")
     ;; Units
-    '("si" [ "Options" ] "Unit")
-    '("SI" [ "Options" ] "Value" [ "Pre-unit"] "Unit")
-    '("SIlist" [ "Options" ] "Values" "Unit")
-    '("SIrange" [ "Options" ] "Value 1" "Value 2" "Unit")
+    '("si" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Unit")
+    '("SI" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Value" [ 
"Pre-unit"] "Unit")
+    '("SIlist" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Values" 
"Unit")
+    '("SIrange" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Value 1" 
"Value 2" "Unit")
     ;; Settings
-    '("sisetup" "Options")
+    '("sisetup" (TeX-arg-key-val LaTeX-siunitx-package-options))
     ;; Tabular material
-    '("tablenum" [ "Options" ] "Number")
+    '("tablenum" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Number")
     ;; Creating new macros (`DeclareSIUnitWithOptions' macro is deprecated)
-    '("DeclareSIUnit" [ "Options" ] (TeX-arg-define-macro "Unit: \\") "Symbol")
+    '("DeclareSIUnit" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] 
(TeX-arg-define-macro "Unit: \\") "Symbol")
     '("DeclareSIPrefix" (TeX-arg-define-macro "Prefix: \\") "Symbol" "Powers 
of 10")
     '("DeclareBinaryPrefix" (TeX-arg-define-macro "Prefix: \\") "Symbol" 
"Powers of 2")
     '("DeclareSIPostPower" (TeX-arg-define-macro "Name: \\") "Power")



reply via email to

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