[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 2d35adf 12/43: Update style/bidi.el to package v
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 2d35adf 12/43: Update style/bidi.el to package version 31.7 |
Date: |
Tue, 20 Mar 2018 11:34:07 -0400 (EDT) |
branch: externals/auctex
commit 2d35adf63fdb464ee0ef3bc98723ba5e5d1cfa20
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Update style/bidi.el to package version 31.7
* style/bidi.el (LaTeX-bidi-package-options): Add
"extrafootnotefeatures" option.
(LaTeX-env-bidi-bib): New function.
("bidi"): Add missing macros and environments. Add fontification
support.
---
style/bidi.el | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 141 insertions(+), 13 deletions(-)
diff --git a/style/bidi.el b/style/bidi.el
index 095eb14..1e4fd6e 100644
--- a/style/bidi.el
+++ b/style/bidi.el
@@ -1,6 +1,6 @@
;;; bidi.el --- AUCTeX style for the (XeLaTeX) bidi package
-;; Copyright (C) 2016 Free Software Foundation, Inc.
+;; Copyright (C) 2016, 2017 Free Software Foundation, Inc.
;; Author: Uwe Brauer <address@hidden>
;; Created: 2016-03-06
@@ -25,35 +25,163 @@
;;; Commentary:
-;; This file adds support for the bidi package.
+;; This file adds support for the bidi package version 31.7
;;; Code:
-(defvar LaTeX-bidi-package-options '("RTLdocument" "rldocument")
+(defvar LaTeX-bidi-package-options
+ '("RTLdocument" "rldocument" "extrafootnotefeatures")
"Package options for the bidi package.")
+(defun LaTeX-env-bidi-bib (environment)
+ "Insert bidi-ENVIRONMENT and a bibitem."
+ (LaTeX-insert-environment environment)
+ (end-of-line 0)
+ (delete-char 1)
+ (delete-horizontal-space)
+ (LaTeX-insert-item))
+
(TeX-add-style-hook
"bidi"
(lambda ()
+ ;; bidi.sty requires xelatex, so set the engine
(TeX-check-engine-add-engines 'xetex)
- (LaTeX-add-environments
- "LTR"
- "RTL")
- ;; Fontification
+
+ ;; 1.4 Turning TeX--XeT features on and off
+ (TeX-add-symbols
+ '("TeXXeTOn" 0)
+ '("TeXXeTOff" 0))
+
+ ;; 1.5 Options of The Package: These macros rely on package option
+ ;; "extrafootnotefeatures". So check for it first
+ (when (LaTeX-provided-package-options-member "bidi" "extrafootnotefeatures")
+ (TeX-add-symbols
+ '("normalfootnotes" 0)
+ '("twocolumnfootnotes" 0)
+ '("threecolumnfootnotes" 0)
+ '("fourcolumnfootnotes" 0)
+ '("fivecolumnfootnotes" 0)
+ '("sixcolumnfootnotes" 0)
+ '("sevencolumnfootnotes" 0)
+ '("eightcolumnfootnotes" 0)
+ '("ninecolumnfootnotes" 0)
+ '("tencolumnfootnotes" 0)
+ '("RTLcolumnfootnotes" 0)
+ '("LTRcolumnfootnotes" 0)
+ '("paragraphfootnotes" 0)
+ '("setLTRparagraphfootnotes" 0)
+ '("setRTLparagraphfootnotes" 0)))
+
(TeX-add-symbols
+ ;; 1.6 Paragraph Switching Commands
+ '("setLTR" 0)
+ '("setRTL" 0)
+ '("setLR" 0)
'("setRL" 0)
'("unsetRL" 0)
- '("setRTL" 0)
'("unsetRTL" 0)
- '("setLR" 0)
- '("unsetLR" 0)
- '("setLTR" 0)
'("unsetLTR" 0)
+
+ ;; 1.8 Typesetting Short LTR and RTL Texts
'("LR" 1)
'("LRE" 1)
'("RLE" 1)
- '("RL" 1)))
- LaTeX-dialect)
+ '("RL" 1)
+ ;; 1.9 Footnotes
+ '("LTRfootnote"
+ (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
+ t)
+ '("RTLfootnote"
+ (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
+ t)
+ '("setfootnoteRL" 0)
+ '("setfootnoteLR" 0)
+ '("unsetfootnoteRL" 0)
+ '("LTRthanks" 1)
+ '("RTLthanks" 1)
+ '("LTRfootnotetext"
+ (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
+ t)
+ '("RTLfootnotetext"
+ (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
+ t)
+
+ ;; 1.9.1 Footnote Rule
+ '("autofootnoterule" 0)
+ '("rightfootnoterule" 0)
+ '("leftfootnoterule" 0)
+ '("LRfootnoterule" 0)
+ '("textwidthfootnoterule" 0)
+ '("SplitFootnoteRule" 0)
+ '("debugfootnotedirection" 0)
+
+ ;; 1.10 Two Column Typesetting
+ '("RTLdblcol" 0)
+ '("LTRdblcol" 0)
+
+ ;; 1.11 RTL cases
+ '("RTLcases" t)
+
+ ;; 1.12 Typesetting Logos
+ '("XeTeX" 0)
+ '("XeLaTeX" 0)
+
+ ;; 1.13 Separation Mark
+ '("SepMark" "Mark")
+
+ ;; 1.20 \setLTRbibitems, \setRTLbibitems, and \setdefaultbibitems
+ ;; commands
+ '("setLTRbibitems" 0)
+ '("setRTLbibitems" 0)
+ '("setdefaultbibitems" 0)
+
+ ;; 1.21 Typesetting margin par
+ '("setRTLmarginpar" 0)
+ '("setLTRmarginpar" 0)
+ '("setdefaultmarginpar" 0)
+ '("LTRmarginpar" [ "Left margin text" ] "Text")
+ '("RTLmarginpar" [ "Left margin text" ] "Text"))
+
+ (LaTeX-add-environments
+ ;; 1.7 Pargraph Switching Environments
+ "LTR"
+ "RTL"
+
+ ;; 1.18 LTRitems and RTLitems Environments
+ '("RTLitems" LaTeX-env-item)
+ '("LTRitems" LaTeX-env-item)
+
+ ;; 1.19 LTRbibitems and RTLbibitems Environments
+ '("LTRbibitems" LaTeX-env-bidi-bib)
+ '("RTLbibitems" LaTeX-env-bidi-bib))
+
+ ;; Append "LTRbibitems" & "RTLbibitems" to `LaTeX-item-list':
+ (make-local-variable 'LaTeX-item-list)
+ (dolist (env '("LTRbibitems" "RTLbibitems"))
+ (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-bib) t))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("LR" "{")
+ ("LRE" "{")
+ ("RLE" "{")
+ ("RL" "{")
+ ("LTRthanks" "{")
+ ("RTLthanks" "{"))
+ 'textual)
+ (font-latex-add-keywords '(("LTRfootnote" "[{")
+ ("RTLfootnote" "[{")
+ ("LTRfootnotetext" "[{")
+ ("RTLfootnotetext" "[{")
+ ("LTRmarginpar" "[{")
+ ("RTLmarginpar" "[{"))
+ 'reference)
+ (font-latex-add-keywords '(("XeTeX" "")
+ ("XeLaTeX" "")
+ ("SepMark" "{"))
+ 'function)))
+ LaTeX-dialect)
;;; bidi.el ends here
- [elpa] externals/auctex 3d08a92 22/43: Restore some code erroneously removed from font-latex.el, (continued)
- [elpa] externals/auctex 3d08a92 22/43: Restore some code erroneously removed from font-latex.el, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex e769c3c 25/43: Make sure `process-environment' is recovered after temporal setenv, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 3e57fbe 26/43: ; * texmathp.el: Update comment header., Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 06f704f 31/43: Explicitly require Emacs 24, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex bd21b34 17/43: Remove code for compatibility with very old emacsens in bib-cite.el, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 4dfb98c 01/43: Remove XEmacs compatibility code in tex-buf.el, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 73cd17c 11/43: Add fontification for some core macros, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 688fae2 37/43: Remove cl from AUCTeX, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 4106f92 24/43: Add fontification for some core macros, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 8d2e9db 38/43: Add new function `TeX-arg-verb-delim-or-brace', Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 2d35adf 12/43: Update style/bidi.el to package version 31.7,
Tassilo Horn <=
- [elpa] externals/auctex ed54fb1 36/43: Refine how we setup flymake backend function, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex fad256b 34/43: * Makefile.in (AUCSRC): Add new file latex-flymake.el., Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 085a310 29/43: Replace cl with cl-lib, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 0011b68 43/43: Merge from master, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex d563566 42/43: Merge branch 'master' into externals/auctex, Tassilo Horn, 2018/03/20