[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 07/299: * style/ulem.el: New style by Mads Jensen <address@hidden
From: |
Stefan Monnier |
Subject: |
[elpa] 07/299: * style/ulem.el: New style by Mads Jensen <address@hidden>. |
Date: |
Sun, 02 Nov 2014 03:09:49 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 8a68ba9ce398723f2639833476a3bfd9a737bb42
Author: Tassilo Horn <address@hidden>
Date: Tue Dec 25 18:52:03 2012 +0000
* style/ulem.el: New style by Mads Jensen <address@hidden>.
---
ChangeLog | 4 ++
style/ulem.el | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 110 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 952d800..f0f8060 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-25 Tassilo Horn <address@hidden>
+
+ * style/ulem.el: New style by Mads Jensen <address@hidden>.
+
2012-12-25 Ikumi Keita <address@hidden>
* latex.el (LaTeX-math-default): Added unicode character position
diff --git a/style/ulem.el b/style/ulem.el
new file mode 100644
index 0000000..ea6422c
--- /dev/null
+++ b/style/ulem.el
@@ -0,0 +1,106 @@
+;;; ulem.el --- AUCTeX style for `ulem.sty'
+
+;; Copyright (C) 2012 Free Software Foundation, Inc.
+
+;; Author: Mads Jensen <address@hidden>
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `ulem.sty'.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "ulem"
+ (lambda ()
+ (TeX-add-symbols
+ '("uline" 1)
+ '("uuline" 1)
+ '("uwave" 1)
+ '("sout" 1)
+ '("xout" 1)
+ ;; can be used with \renewcommand or \setlength
+ "ULthickness"
+ "ULdepth"
+ ;; custom commands can be defined with these commands; see the
+ ;; documentation for an example
+ "ULon"
+ "markoverwith"
+ ;; \useunder {underline_command}{font_declaration}{font_command}
+ ;; replaces occurences of font_declaration and font_command with the
+ ;; underline_command
+ '("useunder" TeX-arg-ulem-useunder
+ TeX-arg-ulem-fontdecl TeX-arg-ulem-fontcmd))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ ;; Tell font-lock about the update.
+ (font-latex-add-keywords '(("useunder" "{{{")) 'function)
+ (font-latex-add-keywords '(("uline" "{")
+ ("uwave" "{")
+ ("sout" "{")
+ ("xout" "{")) 'textual))))
+
+(defvar LaTeX-arg-fontdecl
+ '(mapcar (concat (lambda (str) (concat "\\" str)))
+ '("itshape" "bfseries" "scshape"
+ "ttfamily" "upshape" "mdseries"
+ "rmfamily" "sffamily" "slshape"))
+ "List of font declaration commands in LaTeX")
+
+(defvar LaTeX-arg-fontcmd
+ '(mapcar (concat (lambda (str) (concat "\\" str)))
+ '("textit" "textbf" "textsc"
+ "texttt" "textup" "textmd"
+ "textrm" "textsf" "textsl"))
+ "List of font commands in LaTeX")
+
+(defun TeX-arg-ulem-fontdecl (optional &optional prompt)
+ "Prompt for the font-declaration un \\useunder"
+ (TeX-argument-insert
+ (completing-read (TeX-argument-prompt
+ optional prompt "Font declaration")
+ LaTeX-arg-fontdecl nil t) optional))
+
+(defun TeX-arg-ulem-fontcmd (optional &optional prompt)
+ "Prompt for the font-declaration un \\useunder"
+ (TeX-argument-insert
+ (completing-read (TeX-argument-prompt
+ optional prompt "Font command")
+ LaTeX-arg-fontcmd nil t) optional))
+
+;; adapted from url.el:TeX-arg-urlstyle
+(defun TeX-arg-ulem-useunder (optional &optional prompt)
+ "Prompt for underline command used in \\useunder"
+ (TeX-argument-insert
+ (completing-read (TeX-argument-prompt optional prompt "Underline command")
+ (mapcar 'list
+ (mapcar (lambda (str) (concat "\\" str))
+ '("uline" "uuline"
+ "uwave" "sout" "xout")))
+ nil t) optional))
+
+(defvar LaTeX-ulem-package-options
+ '("UWforbf" "ULforem" "normalbf" "normalem")
+ "Package options for the ulem package.")
+
+;;; ulem.el ends here
- [elpa] branch externals/auctex updated (ca06d68 -> 9705600), Stefan Monnier, 2014/11/01
- [elpa] 01/299: * tex-bar.el (TeX-bar-TeX-button-alist, TeX-bar-TeX-buttons): Add `spell' button to run spell-checker., Stefan Monnier, 2014/11/01
- [elpa] 07/299: * style/ulem.el: New style by Mads Jensen <address@hidden>.,
Stefan Monnier <=
- [elpa] 09/299: * style/lscape.el: New style by Mads Jensen <address@hidden>. * style/amssymb.el: Ditto., Stefan Monnier, 2014/11/01
- [elpa] 11/299: * style/mflogo.el: New style by Mads Jensen <address@hidden>. * style/epigraph.el: Ditto., Stefan Monnier, 2014/11/01
- [elpa] 13/299: Fix email address., Stefan Monnier, 2014/11/01
- [elpa] 14/299: * style/multirow.el: New style by Mads Jensen <address@hidden>., Stefan Monnier, 2014/11/01
- [elpa] 15/299: * doc/tex-ref.tex: Fix apparent errors and add keybind entries for C-c ? and `:' (in math mode)., Stefan Monnier, 2014/11/01
- [elpa] 02/299: * images/spell.xpm: New image, copied from Emacs., Stefan Monnier, 2014/11/01
- [elpa] 05/299: * style/footmisc.el: New style by Mads Jensen <address@hidden>., Stefan Monnier, 2014/11/01
- [elpa] 17/299: * style/everysel.el: Fix typos., Stefan Monnier, 2014/11/01
- [elpa] 18/299: * style/afterpage.el: New style by Mads Jensen <address@hidden>., Stefan Monnier, 2014/11/01
- [elpa] 10/299: * amsmath.el ("amsmath"): Add support for the alignedat and subarray environments. Also, add support for the shoveright and shoveleft macros. * font-latex.el (font-latex-math-environments): Add "xxalignat" and "flalign"., Stefan Monnier, 2014/11/01