;;; ulem.el --- AUCTeX style for `ulem.sty' ;; Author: Mads Jensen ;; Keywords: tex ;;; 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" 0) '("ULdepth" 0) ;; custom commands can be defined with these commands; see the ;; documentation for an example '("ULon" 0) '("markoverwith" 0) ;; \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-macro TeX-arg-macro)) ;; 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" "{{{") '("uline" "{") '("uwave" "{") '("sout" "{") '("xout" "{")) 'function) (setq font-lock-set-defaults nil) (font-lock-set-defaults)))) (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 '("\\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