[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 065b1e8 09/35: Improve style/amsthm.el
From: |
Tassilo Horn |
Subject: |
[elpa] elpa 065b1e8 09/35: Improve style/amsthm.el |
Date: |
Sun, 31 Jan 2016 16:05:35 +0000 |
branch: elpa
commit 065b1e8d1c31b0be77b090ab0f59b5bdbca7dd1a
Author: Arash Esbati <address@hidden>
Commit: Tassilo Horn <address@hidden>
Improve style/amsthm.el
* style/amsthm.el (LaTeX-amsthm-fontdecl): Cover all font changing
declarations.
("amsthm"): Overrule the defintion for \newtheorem in `latex.el'.
("amsthm"): Use `TeX-completing-read-multiple' for font related
queries.
---
style/amsthm.el | 48 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/style/amsthm.el b/style/amsthm.el
index 8bc33d4..a01cfe3 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -41,9 +41,18 @@ defined with \"\\newtheoremstyle\".")
(defvar LaTeX-amsthm-fontdecl
(mapcar (lambda (elt) (concat TeX-esc elt))
- '("itshape" "bfseries" "scshape"
- "ttfamily" "upshape" "mdseries"
- "rmfamily" "sffamily" "slshape"))
+ '(;; family
+ "rmfamily" "sffamily" "ttfamily"
+ ;; series
+ "mdseries" "bfseries"
+ ;; shape
+ "upshape" "itshape" "slshape" "scshape"
+ ;; size
+ "tiny" "scriptsize" "footnotesize"
+ "small" "normalsize" "large"
+ "Large" "LARGE" "huge" "Huge"
+ ;; reset macro
+ "normalfont"))
"List of font declaration commands for \"\\newtheoremstyle\".")
(defun LaTeX-amsthm-env-label (environment)
@@ -106,6 +115,23 @@ make them available as new environments. Update
(LaTeX-add-environments
'("proof" LaTeX-amsthm-env-label))
(TeX-add-symbols
+ ;; Overrule the defintion in `latex.el':
+ '("newtheorem"
+ (TeX-arg-eval
+ (lambda ()
+ (let ((nthm (TeX-read-string
+ (TeX-argument-prompt nil nil "Environment"))))
+ (LaTeX-add-amsthm-newtheorems nthm)
+ (LaTeX-add-environments (list nthm 'LaTeX-theorem-env-label))
+ (format "%s" nthm))))
+ [ TeX-arg-environment "Numbered like" ]
+ t [ (TeX-arg-eval progn (if (eq (save-excursion
+ (backward-char 2)
+ (preceding-char)) ?\])
+ ()
+ (TeX-arg-counter t "Within counter"))
+ "") ])
+
'("newtheorem*"
(TeX-arg-eval
(lambda ()
@@ -119,8 +145,7 @@ make them available as new environments. Update
(format "%s" heading)))))
'("theoremstyle"
- (TeX-arg-eval completing-read
- "Style: "
+ (TeX-arg-eval completing-read "Style: "
LaTeX-amsthm-theoremstyle-list))
"qedhere"
"swapnumbers"
@@ -136,11 +161,16 @@ make them available as new environments. Update
(format "%s" nthmstyle))))
(TeX-arg-length "Space above")
(TeX-arg-length "Space below")
- (TeX-arg-eval completing-read
- "Body font: " LaTeX-amsthm-fontdecl)
+ (TeX-arg-eval mapconcat 'identity
+ (TeX-completing-read-multiple
+ "Body font: "
+ LaTeX-amsthm-fontdecl) "")
"Indent amount"
- (TeX-arg-eval completing-read
- "Theorem head font: " LaTeX-amsthm-fontdecl)
+ (TeX-arg-eval mapconcat 'identity
+ (TeX-completing-read-multiple
+ "Theorem head font: "
+ LaTeX-amsthm-fontdecl) "")
+
"Punctuation after head"
(TeX-arg-length "Space after head")
"Theorem head spec"))
- [elpa] branch elpa created (now 0a99c11), Tassilo Horn, 2016/01/31
- [elpa] elpa 43cbc5f 04/35: Remove support to "Master:" line, Tassilo Horn, 2016/01/31
- [elpa] elpa e4cde66 02/35: Determine AUCTEXDATE and AUCTEXVERSION from git, Tassilo Horn, 2016/01/31
- [elpa] elpa c2fbb9c 01/35: Fix error in autogen.sh, configure, and Makefile, Tassilo Horn, 2016/01/31
- [elpa] elpa fac521d 05/35: Fix bug in TeX-command-sequence, Tassilo Horn, 2016/01/31
- [elpa] elpa 4ed66ee 03/35: Activate RefTeX reference styles, Tassilo Horn, 2016/01/31
- [elpa] elpa 8334cde 08/35: ; Fix a typo in header, Tassilo Horn, 2016/01/31
- [elpa] elpa 065b1e8 09/35: Improve style/amsthm.el,
Tassilo Horn <=
- [elpa] elpa 68d9b03 07/35: Rename TeX-after-TeX-LaTeX-command-finished-hook, Tassilo Horn, 2016/01/31
- [elpa] elpa 2880b62 13/35: Fix regex in texmathp, Tassilo Horn, 2016/01/31
- [elpa] elpa 63ea223 06/35: Convert Elisp source files to UTF-8, Tassilo Horn, 2016/01/31
- [elpa] elpa 5940550 10/35: Add new style/theorem.el, Tassilo Horn, 2016/01/31
- [elpa] elpa 15ebec9 12/35: Rename TeX-after-compilation-finished-hook to -functions, Tassilo Horn, 2016/01/31
- [elpa] elpa 23612ac 15/35: Delete .cvsignore, Tassilo Horn, 2016/01/31
- [elpa] elpa 8cd9b0d 14/35: Fix query prompt, Tassilo Horn, 2016/01/31
- [elpa] elpa 2ebd71d 16/35: Fix bug in `preview-LaTeX-disable-pdfoutput', Tassilo Horn, 2016/01/31
- [elpa] elpa d2c7bb3 19/35: Fix bug in subfigure style file, Tassilo Horn, 2016/01/31
- [elpa] elpa 4f618ec 18/35: Add some AMS arrows to LaTeX-math-default, Tassilo Horn, 2016/01/31