[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex cb6bc11 07/36: Add support for style/bicaption.e
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex cb6bc11 07/36: Add support for style/bicaption.el to style/caption.el |
Date: |
Thu, 22 Dec 2016 13:08:11 +0000 (UTC) |
branch: externals/auctex
commit cb6bc118ee622257d0152ca8637b60fbf1d7c6ca
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Add support for style/bicaption.el to style/caption.el
* style/caption.el (LaTeX-caption-supported-float-types): Add
supported caption types available with bicaption.el.
("caption"): Append key=vals from bicaption.el to
`LaTeX-caption-key-val-options-local'.
("caption"): Query for a second optional argument with
\captionsetup*? if bicaption.el is loaded. Same for
fontification.
---
style/caption.el | 37 ++++++++++++++++++++++++++++++-------
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/style/caption.el b/style/caption.el
index 87d9f82..a9fdec4 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -106,6 +106,7 @@
(defvar LaTeX-caption-supported-float-types
'("figure" "table" "ContinuedFloat" ; Standard caption.sty
"sub" "subtable" "subfigure" ; subcaption.sty
+ "bi" "bi-first" "bi-second" ; bicaption.sty
"ruled" "boxed" ; float.sty
"floatingfigure" "floatingtable" ; floatflt.sty
"lstlisting" ; listings.sty
@@ -213,8 +214,9 @@ suffix of the command."
;; entry to the list of figures or tables.
;; The first mandatory argument {<heading>} contains the caption text
-;; and the label. We use `TeX-insert-macro' to do the job. (Thanks to
-;; M. Giordano for his valuable comments on this!)
+;; and the label. We used to use `TeX-insert-macro' to do the job
+;; (Thanks to M. Giordano for his valuable comments on this!), but now
+;; moved to `LaTeX-label'.
;; Syntax:
;; \captionbox[<list entry>]{<heading>}[<width>][<inner-pos>]{<contents>}
@@ -266,6 +268,21 @@ caption, insert only a caption."
(setq LaTeX-caption-key-val-options-local
(copy-alist LaTeX-caption-key-val-options))
+ ;; Append key=vals from bicaption.sty if loaded: "language" key
+ ;; depends on the active languages, it is appended extra where main
+ ;; language is removed from the list:
+ (when (and (member "bicaption" (TeX-style-list))
+ ;; Make sure that one of these packages is loaded:
+ (or (fboundp 'LaTeX-babel-active-languages)
+ (fboundp 'LaTeX-polyglossia-active-languages)))
+ (setq LaTeX-caption-key-val-options-local
+ (append
+ `(,(list "language"
+ (or (butlast (LaTeX-babel-active-languages))
+ (butlast (LaTeX-polyglossia-active-languages)))))
+ LaTeX-bicaption-key-val-options
+ LaTeX-caption-key-val-options-local)))
+
;; Caption commands:
(TeX-add-symbols
'("caption*" t)
@@ -286,13 +303,19 @@ caption, insert only a caption."
t)
'("captionsetup"
- [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
- LaTeX-caption-supported-float-types]
+ (TeX-arg-conditional (member "bicaption" (TeX-style-list))
+ ([LaTeX-arg-bicaption-captionsetup])
+ ([TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Float type")
+ LaTeX-caption-supported-float-types]))
(LaTeX-arg-caption-command))
'("captionsetup*"
- [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
- LaTeX-caption-supported-float-types]
+ (TeX-arg-conditional (member "bicaption" (TeX-style-list))
+ ([LaTeX-arg-bicaption-captionsetup])
+ ([TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Float type")
+ LaTeX-caption-supported-float-types]))
(LaTeX-arg-caption-command))
'("clearcaptionsetup"
@@ -362,7 +385,7 @@ caption, insert only a caption."
("captionof" "*{[{")
("captionbox" "*[{[["))
'textual)
- (font-latex-add-keywords '(("captionsetup" "*[{")
+ (font-latex-add-keywords '(("captionsetup" "*[[{")
("clearcaptionsetup" "*[{")
("DeclareCaptionFont" "{{")
("DeclareCaptionFormat" "*{{")
- [elpa] externals/auctex updated (1b5875c -> 2e7ca50), Tassilo Horn, 2016/12/22
- [elpa] externals/auctex b59075b 06/36: Do not insert a new line if \label is omitted, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex cb6bc11 07/36: Add support for style/bicaption.el to style/caption.el,
Tassilo Horn <=
- [elpa] externals/auctex c5d1d02 13/36: Append entry to `LaTeX-label-alist' for new "verbatim" floats, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex c265fc9 02/36: Add new style/FiraMono.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 2f75f51 17/36: Add support for LaTeX core command \textsubscript, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 6ec185e 16/36: Do not spell-check arguments of \LTXtable, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 94db238 05/36: Improve caption and label insertion in style/caption.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex eb748ea 18/36: Fix query for defined colors in style/ntheorem.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 8a14439 11/36: Add style file for subfiles package., Tassilo Horn, 2016/12/22
- [elpa] externals/auctex d6890e8 04/36: Improve caption and label insertion in style/subcaption.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 42dd1f1 22/36: Support RefTeX with `reftex-add-index-macros' in style/splitidx.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 945035c 24/36: Append tabular[xy] to `LaTeX-item-list', Tassilo Horn, 2016/12/22