[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex b84ab02 42/43: Merge branch 'master' into extern
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex b84ab02 42/43: Merge branch 'master' into externals/auctex |
Date: |
Sat, 11 Apr 2020 15:05:26 -0400 (EDT) |
branch: externals/auctex
commit b84ab029fe929a5266bf601a0379ba6545228bec
Merge: 817b1c4 fb1fdc4
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Merge branch 'master' into externals/auctex
---
Makefile.in | 16 ++-
admin/release-process.org | 84 ++++++++++++
doc/Makefile.in | 5 +-
doc/auctex.texi | 22 +++-
doc/changes.texi | 32 ++++-
font-latex.el | 129 ++++--------------
latex.el | 326 ++++++++++++++++++++++++++++++++++++++--------
latex/Makefile.in | 23 ++--
preview.el | 2 +-
style/bicaption.el | 3 +-
style/caption.el | 27 ++--
style/exam.el | 19 ++-
style/fbox.el | 54 ++++++++
style/fontaxes.el | 31 ++---
style/listings.el | 4 +-
style/ltugboat.el | 12 +-
style/ltxguide.el | 123 +++++++++++++++++
style/minted.el | 15 ++-
style/overpic.el | 121 +++++++++++++++++
style/prosper.el | 93 +++++++------
style/revtex4-2.el | 264 +++++++++++++++++++++++++++++++++++++
style/shortvrb.el | 33 +----
style/subcaption.el | 6 +-
style/tex-live.el | 177 +++++++++++++++++++++++++
style/textcomp.el | 146 ++-------------------
tests/latex/latex-test.el | 218 ++++++++++++++++++++++++++++++-
tex-buf.el | 28 ++--
tex-style.el | 76 ++++++++---
tex-wizard.el | 4 +-
tex.el | 3 +-
30 files changed, 1614 insertions(+), 482 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 95bc0eb..6e599c3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
# Maintainer: address@hidden
-# Copyright (C) 2003-2008, 2010, 2013-2015, 2018 Free Software
+# Copyright (C) 2003-2008, 2010, 2013-2015, 2018-2019 Free Software
# Foundation, Inc.
# This file is part of AUCTeX.
@@ -170,7 +170,9 @@ STYLESRC = style/prosper.el \
style/ocg-p.el style/ocgx.el style/thm-restate.el \
style/pythontex.el style/dashundergaps.el style/beamerarticle.el \
style/changelog.el style/ltugboat.el style/beamerswitch.el \
- style/multitoc.el style/xkcdcolors.el
+ style/multitoc.el style/fbox.el style/xkcdcolors.el \
+ style/ltxguide.el style/revtex4-2.el style/overpic.el \
+ style/tex-live.el
STYLEELC = $(STYLESRC:.el=.elc)
@@ -360,19 +362,23 @@ uninstall:
.el.elc:
$(ELCC) -f batch-byte-compile $<
-clean: doc/Makefile
+clean: doc/Makefile latex/Makefile
rm -f $(CLEANFILES)
cd doc && $(MAKE) clean
+ cd latex && $(MAKE) clean
-distclean: doc/Makefile
+distclean: doc/Makefile latex/Makefile
rm -f $(CLEANFILES) $(DISTCLEANFILES)
cd doc && $(MAKE) distclean
+ cd latex && $(MAKE) distclean
-maintainer-clean: doc/Makefile
+maintainer-clean: doc/Makefile latex/Makefile
rm -f $(DISTTEXTS)
rm -rf autom4te.cache
rm -f $(CLEANFILES) $(DISTCLEANFILES)
cd doc && $(MAKE) maintainer-clean
+ cd latex && $(MAKE) distclean
+ cd tests && $(MAKE) clean
extraclean: maintainer-clean
rm -f *~ \#*\#
diff --git a/admin/release-process.org b/admin/release-process.org
index dd5d305..4807855 100644
--- a/admin/release-process.org
+++ b/admin/release-process.org
@@ -123,3 +123,87 @@ should be something like (adapt as necessary)
#+END_SRC
The content of the email is simply the content of the =RELEASE= file.
+
+** ELPA Release
+
+*** One-time setup
+
+GNU AUCTeX is hosted as a so-called "externals" package in the GNU ELPA Git
+repository. So the first step is to add the GNU ELPA Git repository as an
+additional remote to your AUCTeX Git repository. In the following example, the
+remote name is "elpa".
+
+#+BEGIN_SRC sh
+ git remote add elpa ssh://<user>@git.savannah.gnu.org/srv/git/emacs/elpa.git
+#+END_SRC
+
+AUCTeX is kept in the ~externals/auctex~ branch of the ELPA repository.
+
+*** Making an ELPA release
+
+1. Switch to the ~externals/auctex~ branch by issuing ~git checkout
+ externals/auctex~.
+2. Ensure you are up-to-date using ~git pull~ and ~git fetch --all~.
+3. Merge the commits which have taken place in the normal auctex development on
+ the ~master~ branch using ~git merge origin/master~.
+4. In case of conflicts, edit, and commit.
+5. Check that everything compiles by running ~make -f GNUMakefile~.
+6. Push your changes to the elpa remote (~git push~).
+
+Just updating the ~externals/auctex~ branch by merging in the changes from the
+AUCTeX ~master~ branch won't have any effect on the version one can get in
+Emacs' package manager. To do an actual release which will be published, you
+have to do the following steps in addition.
+
+7. Edit the line ~;; Version: X.Y.Z~ in the file ~auctex.el~. For ELPA
+ releases, Y and Y match the latest AUCTeX version and Z is incremented for
+ every ELPA release of that AUCTeX version. Z starts with 0, so AUCTeX
+ 12.2.0 should be (almost) identical to the AUCTeX release 12.2.
+8. Commit that change with this Git commit message (but do not push yet!). The
+ ChangeLog formatted line must be written in exactly this way for the next
+ step!
+
+#+BEGIN_EXAMPLE
+Release GNU AUCTeX X.Y.Z
+
+* GNU AUCTeX Version X.Y.Z released.
+#+END_EXAMPLE
+
+9. Run ~make -f GNUMakefile~ again. In the output you should see that the
+ above version is inserted into several files, e.g., the info documentation.
+ The version change is gotten from the current HEAD of the branch. That's
+ the reason the commit message has to be in exactly this format.
+10. Commit again to have the version changes captured (but don't push).
+11. Now our commit from step 8 announces the release but only the commit after
+ that captures the version changes. Therefore, we "fixup" the commit from
+ step 10 into that of step 8 using ~git rebase --interactive HEAD^^~ and
+ changing the "pick" to "fixup" for the commit of step 10. Save and exit.
+ Now the commit of step 8 includes the one of step 10.
+12. Now push your changes, and the new GNU AUCTeX ELPA release will hopefully
+ be available within a few hours.
+
+*** Caveats
+
+It has happened in the past that a new GNU AUCTeX ELPA release didn't really
+appear although all steps in the previous section have been performed. The
+reason was that there has been a new style file whose copyright header didn't
+have the correct format, and ELPA's tooling is pretty strict about that.
+
+In order to check that all copyrights are ok, clone/checkout the master branch
+of the ELPA Git repository.
+
+#+BEGIN_SRC sh
+ # Clone if not done before.
+ git clone ssh://<user>@git.savannah.gnu.org/srv/git/emacs/elpa.git
+ # Otherwise checkout the master brach
+ git checkout master
+ # Get the latest changes
+ git pull
+#+END_SRC
+
+To update the external packages (such as AUCTeX), run ~make externals~ in the
+root directory of the ELPA repository. Then run ~make check_copyrights~ which
+looks for all files without FSF-copyright line which are not listed in a
+special copyright_exceptions file. As result, it spits out a diff between the
+actual and expected copyright exceptions. If the diff is empty (or at least
+doesn't mention an AUCTeX file), everything is fine.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 6f40d82..21cc2e9 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -2,7 +2,7 @@
# Maintainer: address@hidden
-# Copyright (C) 2003-2008, 2013-2015, 2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2008, 2013-2015, 2018-2019 Free Software Foundation, Inc.
# This file is part of AUCTeX.
@@ -208,5 +208,4 @@ distclean: clean
rm -f Makefile
maintainer-clean: distclean
- rm -f INSTALL.windows README CHANGES HISTORY TODO FAQ \
- preview-dtxdoc.texi version.texi $(DISTTEXTS) *.info *.info-*
+ rm -f preview-dtxdoc.texi version.texi $(DISTTEXTS) *.info *.info-*
diff --git a/doc/auctex.texi b/doc/auctex.texi
index e8a99b4..d91889c 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -605,6 +605,11 @@ will be inserted.
@cindex @code{\textbf}
Insert @b{bold face} @samp{\textbf@{@point{}@}} text.
+@item C-c C-f C-m
+@kindex C-c C-f C-m
+@cindex @code{\textmd}
+Insert @r{medium face} @samp{\textmd@{@point{}@}} text.
+
@item C-c C-f C-i
@kindex C-c C-f C-i
@cindex @code{\textit}
@@ -623,7 +628,7 @@ Insert @i{slanted} @samp{\textsl@{@point{}@}} text.
@item C-c C-f C-r
@kindex C-c C-f C-r
@cindex @code{\textrm}
-Insert roman @r{\textrm@{@point{}@}} text.
+Insert roman @samp{\textrm@{@point{}@}} text.
@item C-c C-f C-f
@kindex C-c C-f C-f
@@ -640,6 +645,21 @@ Insert @t{typewriter} @samp{\texttt@{@point{}@}} text.
@cindex @code{\textsc}
Insert @sc{small caps} @samp{\textsc@{@point{}@}} text.
+@item C-c C-f C-l
+@kindex C-c C-f C-l
+@cindex @code{\textulc}
+Insert upper lower case @samp{\textulc@{@point{}@}} text.
+
+@item C-c C-f C-w
+@kindex C-c C-f C-w
+@cindex @code{\textsw}
+Insert @sc{swash} @samp{\textsw@{@point{}@}} text.
+
+@item C-c C-f C-n
+@kindex C-c C-f C-n
+@cindex @code{\textnormal}
+Insert normal @samp{\textnormal@{@point{}@}} text.
+
@item C-c C-f C-d
@kindex C-c C-f C-c
@cindex Deleting fonts
diff --git a/doc/changes.texi b/doc/changes.texi
index 47e1a06..70de34d 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -1,5 +1,5 @@
@c This is part of the AUCTeX manual.
-@c Copyright (C) 1994-2002, 2004-2010, 2012-2019 Free Software
+@c Copyright (C) 1994-2002, 2004-2010, 2012-2020 Free Software
@c Foundation, Inc.
@c See file auctex.texi for copying conditions.
@include macros.texi
@@ -8,11 +8,39 @@
@end ifset
+@heading News in 12.3
+
+@itemize @bullet
+@item
+@AUCTeX{} tracks changes in @LaTeX{}2e 2020-02-02 release. @AUCTeX{}
+supports the improvements to @LaTeX{} font selection mechanism (NFSS).
+New macros like @samp{\textsw} or @samp{\textulc} are added to font
+insertion keyboard commands.
+@ifset rawfile
+See the section for inserting font specifiers for details.
+@end ifset
+@ifclear rawfile
+@xref{Font Specifiers}, for details.
+@end ifclear
+Further, the entries in the menu LaTeX, Insert Font are reorganized and
+adjusted accordingly.
+
+Macros previously provided by @file{textcomp.sty} are now part of
+@LaTeX{} kernel. @AUCTeX{} tracks this change as well and support for
+the new macro @samp{\legacyoldstylenums} is added.
+
+@item
+Insertion of environments in @LaTeX{} documents (i.e. @kbd{C-c C-e}) was
+improved. The former code had a few bugs, which sometimes resulted in
+either spurious empty line or spurious comment prefix, or both,
+especially when the region is active. Those bugs are now fixed.
+@end itemize
+
@heading News in 12.2
@itemize @bullet
@item
-@AUCTeX{} reflects the changes in LaTeX2e 2019-10-01 release.
+@AUCTeX{} reflects the changes in @LaTeX{}2e 2019-10-01 release.
@samp{filecontents} environment now takes an optional argument and can
be used anywhere in a document. The macros @samp{\Ref} and
@samp{\labelformat} are moved from @file{varioref.sty} to @LaTeX{}
diff --git a/font-latex.el b/font-latex.el
index 4df9526..2cfa98c 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1,6 +1,6 @@
;;; font-latex.el --- LaTeX fontification for Font Lock mode.
-;; Copyright (C) 1996-2019 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2020 Free Software Foundation, Inc.
;; Authors: Peter S. Galbraith <address@hidden>
;; Simon Marshall <address@hidden>
@@ -31,11 +31,6 @@
;; font-lock mode is a minor mode that causes your comments to be
;; displayed in one face, strings in another, reserved words in
;; another, and so on.
-;;
-;; ** Infinite loops !? **
-;; If you get an infinite loop, send a bug report!
-;; Then set the following in your ~/.emacs file to keep on working:
-;; (setq font-latex-do-multi-line nil)
;;; Code:
@@ -363,7 +358,8 @@ variable `font-latex-fontify-sectioning'." ',num)
;; separate category with 'noarg instead of 'command handling?
("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "")
("centering" "") ("raggedright" "") ("raggedleft" "")
- ("TeX" "") ("LaTeX" "") ("LaTeXe" ""))
+ ("TeX" "") ("LaTeX" "") ("LaTeXe" "")
+ ("normalfont" "") ("normalshape" ""))
font-lock-function-name-face 2 command)
("sectioning-0"
(("part" "*[{"))
@@ -409,8 +405,8 @@ variable `font-latex-fontify-sectioning'." ',num)
("textsuperscript" "{") ("textsubscript" "{") ("verb" "*"))
font-lock-type-face 2 command)
("bold-command"
- (("textbf" "{") ("textsc" "{") ("textup" "{") ("boldsymbol" "{")
- ("pmb" "{"))
+ (("textbf" "{") ("textsc" "{") ("textssc" "{") ("textulc" "{")
+ ("textup" "{") ("textsw" "{") ("boldsymbol" "{") ("pmb" "{"))
font-latex-bold-face 1 command)
("italic-command"
(("emph" "{") ("textit" "{") ("textsl" "{"))
@@ -419,10 +415,11 @@ variable `font-latex-fontify-sectioning'." ',num)
(("ensuremath" "|{\\"))
font-latex-math-face 1 command)
("type-command"
- (("texttt" "{") ("textsf" "{") ("textrm" "{") ("textmd" "{")
("oldstylenums" "{"))
+ (("texttt" "{") ("textsf" "{") ("textrm" "{") ("textmd" "{")
+ ("textnormal" "{") ("oldstylenums" "{") ("legacyoldstylenums" "{"))
font-lock-type-face 1 command)
("bold-declaration"
- ("bf" "bfseries" "sc" "scshape" "upshape")
+ ("bf" "bfseries" "sc" "scshape" "sscshape" "ulcshape" "upshape" "swshape")
font-latex-bold-face 1 declaration)
("italic-declaration"
("em" "it" "itshape" "sl" "slshape")
@@ -1225,9 +1222,6 @@ have changed."
;;; Setup
-(defvar font-lock-comment-start-regexp nil
- "Regexp to match the start of a comment.")
-
(defvar font-latex-extend-region-functions nil
"List of functions extending the region for multiline constructs.
@@ -1261,26 +1255,9 @@ triggers Font Lock to recognize the change."
(defun font-latex-setup ()
"Setup this buffer for LaTeX font-lock. Usually called from a hook."
(font-latex-set-syntactic-keywords)
- ;; Trickery to make $$ fontification be in `font-latex-math-face' while
- ;; strings get whatever `font-lock-string-face' has been set to.
- (when (fboundp 'built-in-face-specifiers)
- ;; Cool patch from Christoph Wedler...
- (let (instance)
- (mapc (lambda (property)
- (setq instance
- (face-property-instance 'font-latex-math-face property
- nil 0 t))
- (if (numberp instance)
- (setq instance
- (face-property-instance 'default property nil 0)))
- (or (numberp instance)
- (set-face-property 'font-lock-string-face property
- instance (current-buffer))))
- (built-in-face-specifiers))))
-
- ;; Activate multi-line fontification facilities if available.
- (when (boundp 'font-lock-multiline)
- (set (make-local-variable 'font-lock-multiline) t))
+
+ ;; Activate multi-line fontification facilities.
+ (set (make-local-variable 'font-lock-multiline) t)
;; Functions for extending the region.
(dolist (elt '(font-latex-extend-region-backwards-command-with-args
@@ -1302,8 +1279,7 @@ triggers Font Lock to recognize the change."
`((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2)
nil nil ,font-latex-syntax-alist nil))
(variables
- '((font-lock-comment-start-regexp . "%")
- (font-lock-mark-block-function . mark-paragraph)
+ '((font-lock-mark-block-function . mark-paragraph)
(font-lock-fontify-region-function
. font-latex-fontify-region)
(font-lock-unfontify-region-function
@@ -1392,11 +1368,6 @@ If optional argument is non-nil, print status messages."
(defun font-latex-unfontify-region (beg end &rest ignored)
"Unfontify region from BEG to END."
(font-lock-default-unfontify-region beg end)
- ;; XEmacs does not provide `font-lock-extra-managed-props', so
- ;; remove the `font-latex-multiline' property manually. (The
- ;; property is only added if `font-lock-multiline' is bound.)
- (unless (boundp 'font-lock-multiline)
- (remove-text-properties beg end '(font-latex-multiline)))
(remove-text-properties beg end '(script-level))
(let ((start beg))
(while (< beg end)
@@ -1405,32 +1376,7 @@ If optional argument is non-nil, print status messages."
(if (and (eq (car-safe prop) 'raise)
(null (cddr prop)))
(put-text-property beg next 'display nil))
- (setq beg next)))
- (remove-text-properties start end '(invisible))))
-
-(defadvice font-lock-after-change-function (before font-latex-after-change
- activate)
- "Extend region for fontification of multiline constructs.
-This is only necessary if the editor does not provide multiline
-fontification facilities like `font-lock-multiline' itself."
- (unless (boundp 'font-lock-multiline)
- (let ((ad-beg (ad-get-arg 0))
- (ad-end (ad-get-arg 1)))
- (save-excursion
- (goto-char ad-beg)
- (beginning-of-line)
- (when (get-text-property (point) 'font-latex-multiline)
- (setq ad-beg (previous-single-property-change (point)
- 'font-latex-multiline))
- (when (numberp ad-beg)
- (ad-set-arg 0 ad-beg)))
- (goto-char ad-end)
- (end-of-line)
- (when (get-text-property (point) 'font-latex-multiline)
- (setq ad-end (next-single-property-change (point)
- 'font-latex-multiline))
- (when (numberp ad-end)
- (ad-set-arg 1 ad-end)))))))
+ (setq beg next)))))
(defun font-latex-after-hacking-local-variables ()
"Refresh fontification if required by updates of file-local variables.
@@ -1548,16 +1494,6 @@ In docTeX mode \"%\" at the start of a line will be
treated as whitespace."
t))
(forward-comment 1)))
-(defun font-latex-put-multiline-property-maybe (beg end)
- "Add a multiline property if no equivalent is provided by the editor.
-The text property is used to find the start or end of a multiline
-construct when unfontifying a region. Emacs adds such a text
-property automatically if `font-lock-multiline' is set to t and
-extends the region to be unfontified automatically as well."
- (unless (boundp 'font-lock-multiline)
- (put-text-property beg end 'font-latex-multiline t)))
-
-
;;; Match functions
(defvar font-latex-matched-faces nil
@@ -1677,7 +1613,6 @@ Returns nil if none of KEYWORDS is found."
(1+ error-indicator-pos))
match-data))
(push 'font-latex-warning-face font-latex-matched-faces))
- (font-latex-put-multiline-property-maybe beg end)
(store-match-data match-data)
(throw 'match t))))))
@@ -1730,11 +1665,9 @@ Returns nil if no command is found."
(narrow-to-region (point-min) limit)
(forward-char -1) ; Move on the opening bracket
(if (font-latex-find-matching-close ?\{ ?\})
- (progn
- (font-latex-put-multiline-property-maybe beg (1- (point)))
- (store-match-data (list kbeg kbeg
- kbeg kend
- beg (1- (point)))))
+ (store-match-data (list kbeg kbeg
+ kbeg kend
+ beg (1- (point))))
(goto-char kend)
(store-match-data (list (1- kbeg) kbeg
kbeg kend
@@ -1836,9 +1769,7 @@ Used for patterns like:
limit 'move)
(string= (match-string 1) close-tag))
;; Found closing tag.
- (progn
- (font-latex-put-multiline-property-maybe beg (point))
- (store-match-data (list beg beg beg (point))))
+ (store-match-data (list beg beg beg (point)))
;; Did not find closing tag.
(goto-char (+ beg 2))
(store-match-data (list beg (point) (point) (point))))
@@ -1906,7 +1837,6 @@ The \\begin{equation} incl. arguments in the same line and
(setq end (match-beginning 0))
(goto-char beg)
(setq end beg))
- (font-latex-put-multiline-property-maybe beg end)
(store-match-data (list beg end))
t)))
@@ -1999,7 +1929,6 @@ set to french, and >>german<< (and 8-bit) are used if set
to german."
(progn
(goto-char after-beg)
(store-match-data (list after-beg after-beg beg after-beg)))
- (font-latex-put-multiline-property-maybe beg (point))
(store-match-data (list beg (point) (point) (point))))
(throw 'match t)))))))
@@ -2125,27 +2054,15 @@ END marks boundaries for searching for quotation ends."
(while (eq (char-before pos) ?\\)
(setq pos (1- pos) odd (not odd)))
odd)))
- ;; Adding other text properties than `face' is supported by
- ;; `font-lock-apply-highlight' in CVS Emacsen since 2001-10-28.
- ;; With the introduction of this feature the variable
- ;; `font-lock-extra-managed-props' was introduced and serves here
- ;; for feature checking.
- (let ((extra-props-flag (boundp 'font-lock-extra-managed-props)))
- (if (eq (char-after pos) ?_)
- (if extra-props-flag
- (font-latex--get-script-props pos :sub)
- 'font-latex-subscript-face)
- (if extra-props-flag
- (font-latex--get-script-props pos :super)
- 'font-latex-superscript-face)))))
+ (if (eq (char-after pos) ?_)
+ (font-latex--get-script-props pos :sub)
+ (font-latex--get-script-props pos :super))))
(defun font-latex-script-char (pos)
"Return face and display spec for subscript and superscript character at
POS."
- (if (boundp 'font-lock-extra-managed-props)
- `(face font-latex-script-char-face
- ,@(when (eq font-latex-fontify-script 'invisible)
- '(invisible t)))
- 'font-latex-script-char-face))
+ `(face font-latex-script-char-face
+ ,@(when (eq font-latex-fontify-script 'invisible)
+ '(invisible t))))
;;; docTeX
diff --git a/latex.el b/latex.el
index aaa4a1f..1b6699e 100644
--- a/latex.el
+++ b/latex.el
@@ -1,6 +1,6 @@
;;; latex.el --- Support for LaTeX documents.
-;; Copyright (C) 1991, 1993-2019 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993-2020 Free Software Foundation, Inc.
;; Maintainer: address@hidden
;; Keywords: tex
@@ -668,41 +668,91 @@ environment just inserted, the buffer position just before
(concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)+[ \t]*"))
(setq prefix (match-string 0))))
;; What to do with the line containing point.
- (cond ((save-excursion (beginning-of-line)
+ ;; - Open a new empty line for later insertion of "\begin{foo}" and
+ ;; put the point there.
+ ;; - If there were at first any non-whitespace texts between the
+ ;; point and EOL, send them into their new own line with possible
+ ;; comment prefix.
+ (cond (;; When the entire line consists of whitespaces except
+ ;; possible prefix...
+ (save-excursion (beginning-of-line)
(looking-at (concat prefix "[ \t]*$")))
+ ;; ...make the line empty and put the point there.
(delete-region (match-beginning 0) (match-end 0)))
- ((TeX-looking-at-backward (concat "^" prefix "[ \t]*")
+ (;; When there are only whitespaces except possible prefix
+ ;; between the point and BOL (including the case the point
+ ;; is at BOL)...
+ (TeX-looking-at-backward (if prefix
+ (concat "^\\(" prefix "\\)?[ \t]*")
+ "^[ \t]*")
(line-beginning-position))
+ ;; ...in this case, we have non-whitespace texts between
+ ;; the point and EOL, so send the entire line into a new
+ ;; next line and put the point on the empty line just
+ ;; created.
(beginning-of-line)
(newline)
(beginning-of-line 0))
- ((bolp)
+ (;; In all other cases...
+ t
+ ;; ...insert a new empty line after deleting all
+ ;; whitespaces around the point, put the point there...
(delete-horizontal-space)
- (newline)
- (beginning-of-line 0))
- (t
- (delete-horizontal-space)
- (newline 2)
- (when prefix (insert prefix))
- (beginning-of-line 0)))
+ (if (eolp)
+ (newline)
+ ;; ...and if there were at first any non-whitespace texts
+ ;; between (the original position of) the point and EOL,
+ ;; send them into a new next line with possible comment
+ ;; prefix.
+ (newline 2)
+ (when prefix (insert prefix))
+ (beginning-of-line 0))))
;; What to do with the line containing mark.
+ ;; If there is active region...
(when active-mark
+ ;; - Open a new empty line for later insertion of "\end{foo}"
+ ;; and put the mark there.
+ ;; - If there were at first any non-whitespace texts between the
+ ;; mark and EOL, pass them over the empty line and put them on
+ ;; their own line with possible comment prefix.
(save-excursion
(goto-char (mark))
- (cond ((save-excursion (beginning-of-line)
- (or (looking-at (concat prefix "[ \t]*$"))
- (looking-at "[ \t]*$")))
+ (cond (;; When the entire line consists of whitespaces except
+ ;; possible prefix...
+ (save-excursion (beginning-of-line)
+ (looking-at
+ (if prefix
+ (concat "\\(" prefix "\\)?[ \t]*$")
+ "[ \t]*$")))
+ ;; ...make the line empty and put the mark there.
(delete-region (match-beginning 0) (match-end 0)))
- ((TeX-looking-at-backward (concat "^" prefix "[ \t]*")
+ (;; When there are only whitespaces except possible prefix
+ ;; between the mark and BOL (including the case the mark
+ ;; is at BOL)...
+ (TeX-looking-at-backward (if prefix
+ (concat "^\\(" prefix "\\)?[ \t]*")
+ "^[ \t]*")
(line-beginning-position))
+ ;; ...in this case, we have non-whitespace texts
+ ;; between the mark and EOL, so send the entire line
+ ;; into a new next line and put the mark on the empty
+ ;; line just created.
(beginning-of-line)
- (newline)
- (beginning-of-line 0))
- (t
+ (set-mark (point))
+ (newline))
+ (;; In all other cases...
+ t
+ ;; ...make a new empty line after deleting all
+ ;; whitespaces around the mark, put the mark there...
(delete-horizontal-space)
(insert-before-markers "\n")
- (newline)
- (when prefix (insert prefix))))))
+ ;; ...and if there were at first any non-whitespace
+ ;; texts between (the original position of) the mark
+ ;; and EOL, send them into a new next line with
+ ;; possible comment prefix.
+ (unless (eolp)
+ (newline)
+ (when prefix (insert prefix)))))))
;; Now insert the environment.
(when prefix (insert prefix))
(setq env-start (point))
@@ -1520,7 +1570,7 @@ right number."
\\(\\[\\(\\([^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}"
(3 5 1) LaTeX-auto-style)
- ("\\\\use\\(package\\)\\(\\[\\([^\]\\]*\\)\\]\\)?\
+ ("\\\\use\\(package\\)\\(\\[\\([^]]*\\)\\]\\)?\
{\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}"
(3 4 1) LaTeX-auto-style))
"Minimal list of regular expressions matching LaTeX macro definitions.")
@@ -1538,14 +1588,14 @@ This is necessary since index entries may contain
commands and stuff.")
(defvar LaTeX-auto-class-regexp-list
'(;; \RequirePackage[<options>]{<package>}[<date>]
- ("\\\\Require\\(Package\\)\\(\\[\\([^\]\\]*\\)\\]\\)?\
+ ("\\\\Require\\(Package\\)\\(\\[\\([^]]*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}"
(3 4 1) LaTeX-auto-style)
;; \RequirePackageWithOptions{<package>}[<date>],
("\\\\Require\\(Package\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
(2 3 1) LaTeX-auto-style)
;; \LoadClass[<options>]{<package>}[<date>]
- ("\\\\Load\\(Class\\)\\(\\[\\([^\]\\]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
+ ("\\\\Load\\(Class\\)\\(\\[\\([^]]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
(3 4 1) LaTeX-auto-style)
;; \LoadClassWithOptions{<package>}[<date>]
("\\\\Load\\(Class\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
@@ -5706,25 +5756,41 @@ regenerated by the respective menu filter."
:help "Insert a new \\item into current environment"]
"-"
("Insert Font"
- ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"]
- ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"]
- ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"]
- ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"]
- ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"]
- ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"]
- ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"]
- ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"]
- ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"])
+ ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"]
+ "-"
+ ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"]
+ ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"]
+ ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"]
+ "-"
+ ["Medium" (TeX-font nil ?\C-m) :keys "C-c C-f C-m"]
+ ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"]
+ "-"
+ ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"]
+ ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"]
+ ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"]
+ ["Swash" (TeX-font nil ?\C-w) :keys "C-c C-f C-w"]
+ ["Upper Lower" (TeX-font nil ?\C-l) :keys "C-c C-f C-l"]
+ "-"
+ ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]
+ ["Normal" (TeX-font nil ?\C-n) :keys "C-c C-f C-n"])
("Replace Font"
- ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"]
- ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"]
- ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"]
- ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"]
- ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"]
- ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"]
- ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"]
- ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"]
- ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"])
+ ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"]
+ "-"
+ ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"]
+ ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"]
+ ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"]
+ "-"
+ ["Medium" (TeX-font t ?\C-m) :keys "C-u C-c C-f C-m"]
+ ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"]
+ "-"
+ ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"]
+ ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"]
+ ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"]
+ ["Swash" (TeX-font t ?\C-w) :keys "C-u C-c C-f C-w"]
+ ["Upper Lower" (TeX-font t ?\C-l) :keys "C-u C-c C-f C-l"]
+ "-"
+ ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]
+ ["Normal" (TeX-font t ?\C-n) :keys "C-u C-c C-f C-n"])
["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"]
"-"
["Comment or Uncomment Region"
@@ -5768,26 +5834,28 @@ regenerated by the respective menu filter."
(?\C-e "\\emph{" "}")
(?\C-f "\\textsf{" "}" "\\mathsf{" "}")
(?\C-i "\\textit{" "}" "\\mathit{" "}")
+ (?\C-l "\\textulc{" "}")
(?\C-m "\\textmd{" "}")
(?\C-n "\\textnormal{" "}" "\\mathnormal{" "}")
(?\C-r "\\textrm{" "}" "\\mathrm{" "}")
(?\C-s "\\textsl{" "}" "\\mathbb{" "}")
(?\C-t "\\texttt{" "}" "\\mathtt{" "}")
(?\C-u "\\textup{" "}")
+ (?\C-w "\\textsw{" "}")
(?\C-d "" "" t))
"Font commands used with LaTeX2e. See `TeX-font-list'."
:group 'LaTeX-macro
:type '(repeat
- (group
- :value (?\C-a "" "")
- (character :tag "Key")
- (string :tag "Prefix")
- (string :tag "Suffix")
- (option (group
- :inline t
- (string :tag "Math Prefix")
- (string :tag "Math Suffix")))
- (option (sexp :format "Replace\n" :value t)))))
+ (group
+ :value (?\C-a "" "")
+ (character :tag "Key")
+ (string :tag "Prefix")
+ (string :tag "Suffix")
+ (option (group
+ :inline t
+ (string :tag "Math Prefix")
+ (string :tag "Math Suffix")))
+ (option (sexp :format "Replace\n" :value t)))))
;;; Simple Commands
@@ -6183,7 +6251,7 @@ function would return non-nil and `(match-string 1)'
would return
;; The following have no special support, but are included in
;; case the auto files are missing.
- "sloppypar" "picture" "tabbing" "verbatim" "verbatim*"
+ "sloppypar" "tabbing" "verbatim" "verbatim*"
"flushright" "flushleft" "displaymath" "math" "quote" "quotation"
"center" "titlepage" "verse" "eqnarray*"
@@ -6413,6 +6481,8 @@ function would return non-nil and `(match-string 1)'
would return
'("normalsize" -1) '("large" -1) '("Large" -1) '("LARGE" -1) '("huge" -1)
'("Huge" -1)
'("oldstylenums" "Numbers")
+ ;; The next macro is provided by LaTeX2e 2020-02-02 release:
+ '("legacyoldstylenums" "Numbers")
"pounds" "copyright"
"hfil" "hfill" "vfil" "vfill" "hrulefill" "dotfill"
"indent" "noindent" "today"
@@ -6441,13 +6511,155 @@ function would return non-nil and `(match-string 1)'
would return
"textcompwordmark" "textvisiblespace" "textemdash" "textendash"
"textexclamdown" "textquestiondown" "textquotedblleft"
"textquotedblright" "textquoteleft" "textquoteright"
- "textbullet" "textperiodcentered" "textasteriskcentered"
"textbackslash" "textbar" "textless" "textgreater"
"textasciicircum" "textasciitilde"
- "textregistered" "texttrademark"
- "rmfamily" "sffamily" "ttfamily" "mdseries" "bfseries"
- "itshape" "slshape" "upshape" "scshape"
- "eminnershape"))
+
+ ;; With the advent of LaTeX2e release 2020-02-02, all symbols
+ ;; provided by textcomp.sty are available out of the box by the
+ ;; kernel. The next block is moved here from textcomp.el:
+ '("capitalgrave" 0) ; Type: Accent -- Slot: 0
+ '("capitalacute" 0) ; Type: Accent -- Slot: 1
+ '("capitalcircumflex" 0) ; Type: Accent -- Slot: 2
+ '("capitaltilde" 0) ; Type: Accent -- Slot: 3
+ '("capitaldieresis" 0) ; Type: Accent -- Slot: 4
+ '("capitalhungarumlaut" 0) ; Type: Accent -- Slot: 5
+ '("capitalring" 0) ; Type: Accent -- Slot: 6
+ '("capitalcaron" 0) ; Type: Accent -- Slot: 7
+ '("capitalbreve" 0) ; Type: Accent -- Slot: 8
+ '("capitalmacron" 0) ; Type: Accent -- Slot: 9
+ '("capitaldotaccent" 0) ; Type: Accent -- Slot: 10
+ '("textquotestraightbase" 0) ; Type: Symbol -- Slot: 13
+ '("textquotestraightdblbase" 0) ; Type: Symbol -- Slot: 18
+ '("texttwelveudash" 0) ; Type: Symbol -- Slot: 21
+ '("textthreequartersemdash" 0) ; Type: Symbol -- Slot: 22
+ '("textcapitalcompwordmark" 0) ; Type: Symbol -- Slot: 23
+ '("textleftarrow" 0) ; Type: Symbol -- Slot: 24
+ '("textrightarrow" 0) ; Type: Symbol -- Slot: 25
+ '("t" 0) ; Type: Accent -- Slot: 26
+ '("capitaltie" 0) ; Type: Accent -- Slot: 27
+ '("newtie" 0) ; Type: Accent -- Slot: 28
+ '("capitalnewtie" 0) ; Type: Accent -- Slot: 29
+ '("textascendercompwordmark" 0) ; Type: Symbol -- Slot: 31
+ '("textblank" 0) ; Type: Symbol -- Slot: 32
+ '("textdollar" 0) ; Type: Symbol -- Slot: 36
+ '("textquotesingle" 0) ; Type: Symbol -- Slot: 39
+ '("textasteriskcentered" 0) ; Type: Symbol -- Slot: 42
+ '("textdblhyphen" 0) ; Type: Symbol -- Slot: 45
+ '("textfractionsolidus" 0) ; Type: Symbol -- Slot: 47
+ '("textzerooldstyle" 0) ; Type: Symbol -- Slot: 48
+ '("textoneoldstyle" 0) ; Type: Symbol -- Slot: 49
+ '("texttwooldstyle" 0) ; Type: Symbol -- Slot: 50
+ '("textthreeoldstyle" 0) ; Type: Symbol -- Slot: 51
+ '("textfouroldstyle" 0) ; Type: Symbol -- Slot: 52
+ '("textfiveoldstyle" 0) ; Type: Symbol -- Slot: 53
+ '("textsixoldstyle" 0) ; Type: Symbol -- Slot: 54
+ '("textsevenoldstyle" 0) ; Type: Symbol -- Slot: 55
+ '("texteightoldstyle" 0) ; Type: Symbol -- Slot: 56
+ '("textnineoldstyle" 0) ; Type: Symbol -- Slot: 57
+ '("textlangle" 0) ; Type: Symbol -- Slot: 60
+ '("textminus" 0) ; Type: Symbol -- Slot: 61
+ '("textrangle" 0) ; Type: Symbol -- Slot: 62
+ '("textmho" 0) ; Type: Symbol -- Slot: 77
+ '("textbigcircle" 0) ; Type: Symbol -- Slot: 79
+ '("textohm" 0) ; Type: Symbol -- Slot: 87
+ '("textlbrackdbl" 0) ; Type: Symbol -- Slot: 91
+ '("textrbrackdbl" 0) ; Type: Symbol -- Slot: 93
+ '("textuparrow" 0) ; Type: Symbol -- Slot: 94
+ '("textdownarrow" 0) ; Type: Symbol -- Slot: 95
+ '("textasciigrave" 0) ; Type: Symbol -- Slot: 96
+ '("textborn" 0) ; Type: Symbol -- Slot: 98
+ '("textdivorced" 0) ; Type: Symbol -- Slot: 99
+ '("textdied" 0) ; Type: Symbol -- Slot: 100
+ '("textleaf" 0) ; Type: Symbol -- Slot: 108
+ '("textmarried" 0) ; Type: Symbol -- Slot: 109
+ '("textmusicalnote" 0) ; Type: Symbol -- Slot: 110
+ '("texttildelow" 0) ; Type: Symbol -- Slot: 126
+ '("textdblhyphenchar" 0) ; Type: Symbol -- Slot: 127
+ '("textasciibreve" 0) ; Type: Symbol -- Slot: 128
+ '("textasciicaron" 0) ; Type: Symbol -- Slot: 129
+ '("textacutedbl" 0) ; Type: Symbol -- Slot: 130
+ '("textgravedbl" 0) ; Type: Symbol -- Slot: 131
+ '("textdagger" 0) ; Type: Symbol -- Slot: 132
+ '("textdaggerdbl" 0) ; Type: Symbol -- Slot: 133
+ '("textbardbl" 0) ; Type: Symbol -- Slot: 134
+ '("textperthousand" 0) ; Type: Symbol -- Slot: 135
+ '("textbullet" 0) ; Type: Symbol -- Slot: 136
+ '("textcelsius" 0) ; Type: Symbol -- Slot: 137
+ '("textdollaroldstyle" 0) ; Type: Symbol -- Slot: 138
+ '("textcentoldstyle" 0) ; Type: Symbol -- Slot: 139
+ '("textflorin" 0) ; Type: Symbol -- Slot: 140
+ '("textcolonmonetary" 0) ; Type: Symbol -- Slot: 141
+ '("textwon" 0) ; Type: Symbol -- Slot: 142
+ '("textnaira" 0) ; Type: Symbol -- Slot: 143
+ '("textguarani" 0) ; Type: Symbol -- Slot: 144
+ '("textpeso" 0) ; Type: Symbol -- Slot: 145
+ '("textlira" 0) ; Type: Symbol -- Slot: 146
+ '("textrecipe" 0) ; Type: Symbol -- Slot: 147
+ '("textinterrobang" 0) ; Type: Symbol -- Slot: 148
+ '("textinterrobangdown" 0) ; Type: Symbol -- Slot: 149
+ '("textdong" 0) ; Type: Symbol -- Slot: 150
+ '("texttrademark" 0) ; Type: Symbol -- Slot: 151
+ '("textpertenthousand" 0) ; Type: Symbol -- Slot: 152
+ '("textpilcrow" 0) ; Type: Symbol -- Slot: 153
+ '("textbaht" 0) ; Type: Symbol -- Slot: 154
+ '("textnumero" 0) ; Type: Symbol -- Slot: 155
+ '("textdiscount" 0) ; Type: Symbol -- Slot: 156
+ '("textestimated" 0) ; Type: Symbol -- Slot: 157
+ '("textopenbullet" 0) ; Type: Symbol -- Slot: 158
+ '("textservicemark" 0) ; Type: Symbol -- Slot: 159
+ '("textlquill" 0) ; Type: Symbol -- Slot: 160
+ '("textrquill" 0) ; Type: Symbol -- Slot: 161
+ '("textcent" 0) ; Type: Symbol -- Slot: 162
+ '("textsterling" 0) ; Type: Symbol -- Slot: 163
+ '("textcurrency" 0) ; Type: Symbol -- Slot: 164
+ '("textyen" 0) ; Type: Symbol -- Slot: 165
+ '("textbrokenbar" 0) ; Type: Symbol -- Slot: 166
+ '("textsection" 0) ; Type: Symbol -- Slot: 167
+ '("textasciidieresis" 0) ; Type: Symbol -- Slot: 168
+ '("textcopyright" 0) ; Type: Symbol -- Slot: 169
+ '("textordfeminine" 0) ; Type: Symbol -- Slot: 170
+ '("textcopyleft" 0) ; Type: Symbol -- Slot: 171
+ '("textlnot" 0) ; Type: Symbol -- Slot: 172
+ '("textcircledP" 0) ; Type: Symbol -- Slot: 173
+ '("textregistered" 0) ; Type: Symbol -- Slot: 174
+ '("textasciimacron" 0) ; Type: Symbol -- Slot: 175
+ '("textdegree" 0) ; Type: Symbol -- Slot: 176
+ '("textpm" 0) ; Type: Symbol -- Slot: 177
+ '("texttwosuperior" 0) ; Type: Symbol -- Slot: 178
+ '("textthreesuperior" 0) ; Type: Symbol -- Slot: 179
+ '("textasciiacute" 0) ; Type: Symbol -- Slot: 180
+ '("textmu" 0) ; Type: Symbol -- Slot: 181
+ '("textparagraph" 0) ; Type: Symbol -- Slot: 182
+ '("textperiodcentered" 0) ; Type: Symbol -- Slot: 183
+ '("textreferencemark" 0) ; Type: Symbol -- Slot: 184
+ '("textonesuperior" 0) ; Type: Symbol -- Slot: 185
+ '("textordmasculine" 0) ; Type: Symbol -- Slot: 186
+ '("textsurd" 0) ; Type: Symbol -- Slot: 187
+ '("textonequarter" 0) ; Type: Symbol -- Slot: 188
+ '("textonehalf" 0) ; Type: Symbol -- Slot: 189
+ '("textthreequarters" 0) ; Type: Symbol -- Slot: 190
+ '("texteuro" 0) ; Type: Symbol -- Slot: 191
+ '("texttimes" 0) ; Type: Symbol -- Slot: 214
+ '("textdiv" 0) ; Type: Symbol -- Slot: 246
+ '("textcircled" 1) ; Type: Command -- Slot: N/A
+ '("capitalcedilla" 1) ; Type: Command -- Slot: N/A
+ '("capitalogonek" 1) ; Type: Command -- Slot: N/A
+
+ "rmfamily" "sffamily" "ttfamily"
+ '("mdseries" -1) '("bfseries" -1)
+ '("itshape" -1) '("slshape" -1)
+ '("upshape" -1) '("scshape" -1)
+ '("eminnershape" -1)
+ ;; The next 3 were added to LaTeX kernel with 2020-02-02 release:
+ '("sscshape" -1) '("swshape" -1) '("ulcshape" -1)
+ ;; These are for the default settings:
+ "sscdefault" "swdefault" "ulcdefault"
+ ;; This macro is for `spaced small caps'. Currently, only some
+ ;; commercial fonts offer this. It should be moved into
+ ;; `LaTeX-font-list' once it is needed more frequently.
+ '("textssc" t)
+ ;; User level reset macros:
+ '("normalfont" -1) '("normalshape" -1)))
(TeX-run-style-hooks "LATEX")
diff --git a/latex/Makefile.in b/latex/Makefile.in
index afb0a62..ab63647 100644
--- a/latex/Makefile.in
+++ b/latex/Makefile.in
@@ -2,7 +2,7 @@
# Maintainer: address@hidden
-# Copyright (C) 2002-2006, 2008, 2014, 2015 Free Software Foundation,
+# Copyright (C) 2002-2006, 2008, 2014, 2015, 2019 Free Software Foundation,
# Inc.
# This file is part of AUCTeX.
@@ -42,9 +42,9 @@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = ../mkinstalldirs
-.PHONY: all install install-texmf install-texmf-doc uninstall clean
+.PHONY: all install install-texmf install-texmf-doc uninstall clean distclean
-all: $(TEXMFGEN) preview.drv preview-mk.ins preview.dvi preview.pdf
+all: $(TEXMFGEN) preview.drv preview-mk.ins preview.pdf
install: install-texmf install-texmf-doc
@@ -63,12 +63,12 @@ install-texmf: $(TEXMFGEN)
sleep 2; \
fi
-install-texmf-doc: preview.dvi
+install-texmf-doc: preview.pdf
$(MKINSTALLDIRS) $(DESTDIR)$(previewdocdir)
- $(INSTALL_DATA) preview.dvi $(DESTDIR)$(previewdocdir)
+ $(INSTALL_DATA) preview.pdf $(DESTDIR)$(previewdocdir)
uninstall:
- rm -rf $(DESTDIR)$(previewdocdir)/preview.dvi
$(DESTDIR)$(previewtexmfdir)
+ rm -rf $(DESTDIR)$(previewdocdir)/preview.dvi
$(DESTDIR)$(previewdocdir)/preview.pdf $(DESTDIR)$(previewtexmfdir)
preview-mk.ins: preview.dtx bootstrap.ins
$(TEX) '\nonstopmode \input bootstrap.ins'
@@ -88,10 +88,13 @@ preview.dvi: preview.drv preview.dtx preview.sty
$(LATEX) '\nonstopmode \input preview.drv'
preview.pdf: preview.drv preview.dtx preview.sty
- $(PDFLATEX) '\nonstopmode
\AtBeginDocument{\OnlyDescription}\input{preview.drv}'
- $(PDFLATEX) '\nonstopmode
\AtBeginDocument{\OnlyDescription}\input{preview.drv}'
- $(PDFLATEX) '\nonstopmode
\AtBeginDocument{\OnlyDescription}\input{preview.drv}'
+ $(PDFLATEX) '\nonstopmode \input{preview.drv}'
+ $(PDFLATEX) '\nonstopmode \input{preview.drv}'
+ $(PDFLATEX) '\nonstopmode \input{preview.drv}'
clean:
- rm -f *~ *.aux *.dvi *.drv *.log
+ rm -f *~ *.aux *.dvi *.drv *.log preview.pdf
rm -f $(TEXMFGEN) preview.ins preview-mk.ins
+
+distclean: clean
+ rm -f Makefile
diff --git a/preview.el b/preview.el
index e9f7101..a0aaf72 100644
--- a/preview.el
+++ b/preview.el
@@ -787,7 +787,7 @@ stopped{handleerror quit}if \
;; heuristic here.
(with-current-buffer TeX-command-buffer
(and TeX-PDF-mode
- (not TeX-PDF-from-DVI)))))))
+ (not (TeX-PDF-from-DVI))))))))
(preview-gs-queue-empty)
(preview-parse-messages (or setup #'preview-gs-dvips-process-setup))))
diff --git a/style/bicaption.el b/style/bicaption.el
index 7bc0a35..8622cd5 100644
--- a/style/bicaption.el
+++ b/style/bicaption.el
@@ -1,6 +1,6 @@
;;; bicaption.el --- AUCTeX style for `bicaption.sty' (v1.1-158)
-;; Copyright (C) 2016--2019 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2020 Free Software Foundation, Inc.
;; Author: Arash Esbati <address@hidden>
;; Maintainer: address@hidden
@@ -189,6 +189,7 @@ square brackets."
(defun LaTeX-bicaption-package-options ()
"Prompt for package options for the bicaption package."
+ (TeX-load-style "caption")
(TeX-read-key-val t
(append
`(,(list "language"
diff --git a/style/caption.el b/style/caption.el
index 60e6e5a..fb9ddbe 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -1,4 +1,4 @@
-;;; caption.el --- AUCTeX style for `caption.sty' (v3.3-111)
+;;; caption.el --- AUCTeX style for `caption.sty' (v3.4a)
;; Copyright (C) 2015--2019 Free Software Foundation, Inc.
@@ -26,7 +26,7 @@
;;; Commentary:
-;; This file adds support for `caption.sty' (v3.3-111) from 2015/09/17.
+;; This file adds support for `caption.sty' (v3.4a) from 2019/10/18.
;; `caption.sty' is part of TeXLive.
;; If things do not work or when in doubt, press `C-c C-n'. Comments
@@ -79,7 +79,8 @@
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
- ("labelformat" ("default" "empty" "simple" "brace" "parens"))
+ ("labelformat" ("default" "empty" "simple" "brace" "parens"
+ "autodot" "unnumbered"))
("labelsep" ("none" "colon" "period" "space" "quad" "newline"
"endash"))
("list" ("false" "no" "off" "0" "true" "yes" "on" "1"))
("listformat" ("empty" "simple" "paren" "subsimple" "subparens"))
@@ -107,8 +108,8 @@
"stretch" "normalcolor" "color" "normal"))
("textformat" ("empty" "simple" "period"))
("twoside")
- ("type" ("figure" "table" "ContinuedFloat"))
- ("type*" ("figure" "table" "ContinuedFloat"))
+ ("type" ("figure" "table"))
+ ("type*" ("figure" "table"))
("width"))
"Key=value options for caption macros.")
@@ -373,17 +374,17 @@ STAR is non-nil, do not query for a short-caption and a
label."
'("captionsetup"
(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]))
+ ([TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Float
type")
+ LaTeX-caption-supported-float-types]))
(LaTeX-arg-caption-command))
'("captionsetup*"
(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]))
+ ([TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Float
type")
+ LaTeX-caption-supported-float-types]))
(LaTeX-arg-caption-command))
'("clearcaptionsetup"
@@ -400,9 +401,6 @@ STAR is non-nil, do not query for a short-caption and a
label."
'("captionbox*" (LaTeX-arg-caption-captionbox t) t)
- '("ContinuedFloat" 0)
- '("ContinuedFloat*" 0)
-
'("continuedfloat" 0)
'("continuedfloat*" 0)
@@ -458,6 +456,7 @@ STAR is non-nil, do not query for a short-caption and a
label."
'textual)
(font-latex-add-keywords '(("captionsetup" "*[[{")
("clearcaptionsetup" "*[{")
+ ("continuedfloat" "")
("DeclareCaptionFont" "{{")
("DeclareCaptionFormat" "*{{")
("DeclareCaptionJustification" "{{")
diff --git a/style/exam.el b/style/exam.el
index be8126d..3ecc38d 100644
--- a/style/exam.el
+++ b/style/exam.el
@@ -1,6 +1,6 @@
;;; exam.el --- AUCTeX style for the (LaTeX) exam class
-;; Copyright (C) 2016--2018 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2020 Free Software Foundation, Inc.
;; Author: Uwe Brauer <address@hidden>
;; Created: 2016-03-06
@@ -60,6 +60,9 @@ Item inserted depends on the environment."
"subpart")
((string= environment "subsubparts")
"subsubpart")
+ ((member environment '("choices" "oneparchoices"
+ "checkboxes" "oneparcheckboxes"))
+ "choice")
;; Fallback
(t "item"))))
@@ -94,6 +97,10 @@ Arguments NAME and TYPE are the same as for the function
(LaTeX-add-environments
'("solution" [ "Height" ])
'("select")
+ '("choices" LaTeX-env-item)
+ '("oneparchoices" LaTeX-env-item)
+ '("checkboxes" LaTeX-env-item)
+ '("oneparcheckboxes" LaTeX-env-item)
'("solutionorbox" [ "Height" ])
'("solutionorlines" [ "Height" ])
'("solutionordottedlines" [ "Height" ])
@@ -104,10 +111,14 @@ Arguments NAME and TYPE are the same as for the function
'("subsubparts" LaTeX-env-item))
;; Tell AUCTeX about special environments:
- (let ((envs '("questions" "parts" "subparts" "subsubparts")))
+ (let ((envs '("questions"
+ "parts" "subparts" "subsubparts"
+ "choices" "oneparchoices"
+ "checkboxes" "oneparcheckboxes")))
(dolist (env envs)
(add-to-list 'LaTeX-item-list
- (cons env 'LaTeX-exam-insert-item))))
+ (cons env 'LaTeX-exam-insert-item)
+ t)))
;; Append us only once:
(unless (and (string-match "question" LaTeX-item-regexp)
@@ -229,7 +240,7 @@ Arguments NAME and TYPE are the same as for the function
'("checkboxchar" 1)
'("checkboxeshook" 0)
'("checkedchar" 1)
- '("choice" 0)
+ '("choice" (TeX-arg-literal " "))
'("choicelabel" 0)
'("choiceshook" 0)
'("chpgword" 1)
diff --git a/style/fbox.el b/style/fbox.el
new file mode 100644
index 0000000..1ff1b69
--- /dev/null
+++ b/style/fbox.el
@@ -0,0 +1,54 @@
+;;; fbox.el --- AUCTeX style for `fbox.sty' (v0.04)
+
+;; Copyright (C) 2019--2020 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2019-11-08
+;; 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 `fbox.sty' (v0.04) from 2020/01/03.
+;; `fbox.sty' is part of TeXLive.
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+
+(TeX-add-style-hook
+ "fbox"
+ (lambda ()
+ (TeX-add-symbols
+ '("fbox" [ "Frame parts (combination of lrtb)" ] t)
+ '("fbox*" [ "Frame parts (combination of lrtb)" ] t)
+ '("fparbox" [ "Frame parts (combination of lrtb)" ] t)
+ '("fparbox*" [ "Frame parts (combination of lrtb)" ] t))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("fbox" "*[{")
+ ("fparbox" "*[{"))
+ 'function)))
+ LaTeX-dialect)
+
+;;; fbox.el ends here
diff --git a/style/fontaxes.el b/style/fontaxes.el
index 6524a5a..232dd18 100644
--- a/style/fontaxes.el
+++ b/style/fontaxes.el
@@ -1,6 +1,6 @@
;;; fontaxes.el --- AUCTeX style for `fontaxes.sty' version v1.0d
-;; Copyright (C) 2014, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc.
;; Author: Arash Esbati <address@hidden>
;; Maintainer: address@hidden
@@ -43,18 +43,19 @@
"fontaxes"
(lambda ()
(TeX-add-symbols
- ;; Various font shapes
- '("swshape" -1) ; swash shape
- '("sscshape" -1) ; spaced small caps
+ ;; Various font shapes:
+ ;; These macros are now part of LaTeX kernel 2020-02-02
+ ;; '("swshape" -1) ; swash shape
+ ;; '("sscshape" -1) ; spaced small caps
+ ;; '("swdefault" 0)
+ ;; '("sscdefault" 0)
+ ;; '("ulcdefault" 0)
'("fontprimaryshape" t)
'("fontsecondaryshape" t)
- '("swdefault" t)
- '("sscdefault" t)
- '("ulcdefault" t)
;; Figure versions
'("figureversion"
- (TeX-arg-eval mapconcat 'identity
+ (TeX-arg-eval mapconcat #'identity
(TeX-completing-read-multiple
"Style, alignment: "
'(("text") ("osf")
@@ -86,9 +87,10 @@
'(("tabular") ("proportional"))))
;; Additional commands
- '("textsw" t)
- '("textssc" t)
- '("textulc" t)
+ ;; These macros are now part of LaTeX kernel 2020-02-02
+ ;; '("textsw" t)
+ ;; '("textssc" t)
+ ;; '("textulc" t)
'("textfigures" t)
'("liningfigures" t)
'("tabularfigures" t)
@@ -102,13 +104,6 @@
("tabularfigures" "{")
("proportionalfigures" "{"))
'type-command)
- (font-latex-add-keywords '(("textsw" "{")
- ("textssc" "{")
- ("textulc" "{"))
- 'bold-command)
- (font-latex-add-keywords '(("swshape" "")
- ("sscshape" ""))
- 'bold-declaration)
(font-latex-add-keywords '(("figureversion" "{"))
'variable)))
LaTeX-dialect)
diff --git a/style/listings.el b/style/listings.el
index 5c20308..dffbf30 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -75,6 +75,7 @@
("firstline")
("lastline")
("linerange")
+ ("consecutivenumbers" ("true" "false"))
("showlines" ("true" "false"))
("emptylines")
("gobble")
@@ -420,7 +421,8 @@ caption key is found, an error is issued."
'("lstDeleteShortInline" "Character")
"lstgrinddeffile" "lstaspectfiles" "lstlanguagefiles"
- "lstlistingname" "lstlistlistingname")
+ "lstlistingname" "lstlistingnamestyle" "thelstlisting"
+ "lstlistlistingname")
;; New environments
(LaTeX-add-environments
diff --git a/style/ltugboat.el b/style/ltugboat.el
index 4f9e9f6..5521487 100644
--- a/style/ltugboat.el
+++ b/style/ltugboat.el
@@ -1,4 +1,4 @@
-;;; ltugboat.el --- AUCTeX style for `ltugboat.cls' (v2.21)
+;;; ltugboat.el --- AUCTeX style for `ltugboat.cls' (v2.22)
;; Copyright (C) 2019 Free Software Foundation, Inc.
@@ -26,7 +26,7 @@
;;; Commentary:
-;; This file adds support for `ltugboat.cls' (v2.21) from 2018/12/14.
+;; This file adds support for `ltugboat.cls' (v2.22) from 2019/11/09.
;; `ltugboat.cls' is part of TeXLive.
;;; Code:
@@ -147,6 +147,7 @@
"Hawaii"
"HTML"
"HTTP"
+ "iOS"
"IDE"
"IEEE"
"ISBN"
@@ -157,7 +158,12 @@
"JoT"
"KOMAScript"
"LAMSTeX"
+ "LuaHBTeX"
+ "LuaHBLaTeX"
+ "LuaLaTeX"
+ "LuaTeX"
"LyX"
+ "macOS"
"MacOSX"
"MathML"
"mf"
@@ -176,6 +182,8 @@
"pcMF"
"PCteX"
"pcTeX"
+ "pdflatex"
+ "pdftex"
"PDF"
"PGF"
"PHP"
diff --git a/style/ltxguide.el b/style/ltxguide.el
new file mode 100644
index 0000000..437e2be
--- /dev/null
+++ b/style/ltxguide.el
@@ -0,0 +1,123 @@
+;;; ltxguide.el --- AUCTeX style for `ltxguide.cls' (2001/05/28)
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2020-01-05
+;; 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 `ltxguide.cls' from 2001/05/28.
+;; `ltxguide.cls' is part of TeXLive.
+
+;;; Code:
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+(defvar LaTeX-article-class-options)
+
+(defun LaTeX-item-ltxguide-decl ()
+ "Insert line break macro on the previous line.
+For decl environment provided by ltxguide.cls."
+ (save-excursion
+ (end-of-line 0)
+ (just-one-space)
+ (TeX-insert-macro "\\")))
+
+(TeX-add-style-hook
+ "ltxguide"
+ (lambda ()
+
+ ;; ltxguide.cls loads shortvrb.sty and sets | as a shorthand.
+ ;; Append it to a local version of `LaTeX-shortvrb-chars' before
+ ;; running the style hook for `shortvrb':
+ (add-to-list (make-local-variable 'LaTeX-shortvrb-chars) ?| t)
+
+ ;; Run style hooks for packages loaded by default:
+ (TeX-run-style-hooks "shortvrb" "article")
+
+ (TeX-add-symbols
+ "clsguide"
+ "usrguide"
+ "fntguide"
+ "cfgguide"
+ "cyrguide"
+ "modguide"
+ "sourcecode"
+ "LaTeXbook"
+ "LaTeXcomp"
+ "LaTeXGcomp"
+ "LaTeXWcomp"
+ "babel"
+ "ctan"
+ "eg"
+ "ie"
+ "SLiTeX"
+ '("m" "Argument")
+ '("arg" "Argument")
+ '("oarg" "Argument")
+ "NFSS"
+ "AmSLaTeX"
+ '("URL" "URL")
+ '("NEWdescription" TeX-arg-date)
+ '("NEWfeature" TeX-arg-date))
+
+ (LaTeX-add-environments
+ '("decl" LaTeX-env-args [ "Date" ]))
+
+ ;; Enable `LaTeX-insert-item' in decl-environments:
+ (add-to-list 'LaTeX-item-list
+ '("decl" . LaTeX-item-ltxguide-decl)
+ t)
+
+ ;; Make the next 2 macros stay in their own line:
+ (LaTeX-paragraph-commands-add-locally '("NEWdescription"
+ "NEWfeature"))
+
+ ;; Verbatim-like macros with braces as delimiters:
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "URL")
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup)
+ (fboundp 'font-latex-update-font-lock))
+ (font-latex-add-keywords '(("m" "{")
+ ("arg" "{")
+ ("oarg" "{")
+ ("NEWfeature" "{")
+ ("NEWdescription" "{"))
+ 'textual)
+ (font-latex-add-keywords '(("URL" ""))
+ 'reference)
+ ;; Tell font-lock about the update.
+ (font-latex-update-font-lock t)))
+ LaTeX-dialect)
+
+(defvar LaTeX-ltxguide-class-options
+ (progn
+ (TeX-load-style "article")
+ LaTeX-article-class-options)
+ "Options for the ltxguide document class.")
+
+;;; ltxguide.el ends here
diff --git a/style/minted.el b/style/minted.el
index 24005c2..55cdfa3 100644
--- a/style/minted.el
+++ b/style/minted.el
@@ -132,11 +132,16 @@
;; in a .tex file, Emacs asks to apply a variable which is not
;; safe and does not restore the frame; the splitted frame
;; remains. I couldn't figure out why, so for now, I add the
- ;; styles from Pygments version 2.1.3 here.
- ("style" ("colorful" "default" "emacs" "friendly" "fruity" "igor"
- "lovelace" "manni" "monokai" "murphy" "native"
- "paraiso-dark" "paraiso-light" "pastie" "perldoc"
- "rrt" "tango" "trac" "vim" "vs" "xcode"))
+ ;; styles from Pygments version 2.5.2 here.
+ ("style" ("abap" "algol" "algol_nu" "arduino" "autumn"
+ "borland" "bw" "colorful" "default" "emacs"
+ "friendly" "fruity" "igor" "inkpot" "lovelace"
+ "manni" "monokai" "murphy" "native" "paraiso-dark"
+ "paraiso-light" "pastie" "perldoc"
+ "rainbow_dash" "rrt" "sas"
+ "solarized-dark" "solarized-light" "stata"
+ "stata-dark" "stata-light"
+ "tango" "trac" "vim" "vs" "xcode"))
("stepnumber")
("stepnumberfromfirst")
("stepnumberoffsetvalues" ("true" "false"))
diff --git a/style/overpic.el b/style/overpic.el
new file mode 100644
index 0000000..b44e8d1
--- /dev/null
+++ b/style/overpic.el
@@ -0,0 +1,121 @@
+;;; overpic.el --- AUCTeX style for `overpic.sty' (v1.3)
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2020-02-23
+;; 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 `overpic.sty' (v1.3) from 2020/02/22.
+;; `overpic.sty' is part of TeXLive.
+
+;;; Code:
+
+;; Silence the compiler
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+(defvar LaTeX-graphicx-key-val-options)
+(defvar LaTeX-graphicx-package-options)
+
+(defvar LaTeX-overpic-key-val-options
+ '(("abs" ("true" "false"))
+ ("percent" ("true" "false"))
+ ("permil" ("true" "false"))
+ ("rel")
+ ("grid" ("true" "false"))
+ ("tics")
+ ("unit"))
+ "Key=value options for overpic macro and environments.")
+
+(defun LaTeX-arg-overpic-key-val (optional)
+ "Insert key-val for optional argument of overpic environments.
+If OPTIONAL is non-nil, insert argument in square brackets.
+
+This function is an variation of
+`LaTeX-arg-graphicx-includegraphics-key-val' where the key-val's
+in `LaTeX-overpic-key-val-options' are offered in addition to the
+ones provided by `LaTeX-graphicx-key-val-options'."
+ (let ((crm-local-completion-map
+ (remove (assoc 32 crm-local-completion-map)
+ crm-local-completion-map))
+ (minibuffer-local-completion-map
+ (remove (assoc 32 minibuffer-local-completion-map)
+ minibuffer-local-completion-map)))
+ (TeX-argument-insert
+ (TeX-read-key-val optional
+ (if (and (or (and (eq TeX-engine 'default)
+ (not (TeX-PDF-from-DVI)))
+ (eq TeX-engine 'luatex))
+ TeX-PDF-mode)
+ (append '(("page")
+ ("pagebox" ("mediabox"
+ "cropbox"
+ "bleedbox"
+ "trimbox"
+ "artbox")))
+ LaTeX-overpic-key-val-options
+ LaTeX-graphicx-key-val-options)
+ (append
+ LaTeX-overpic-key-val-options
+ LaTeX-graphicx-key-val-options)))
+ optional)))
+
+
+(TeX-add-style-hook
+ "overpic"
+ (lambda ()
+
+ ;; overpic.sty loads graphicx.sty
+ (TeX-run-style-hooks "graphicx")
+
+ (TeX-add-symbols
+ '("setOverpic" (TeX-arg-key-val LaTeX-overpic-key-val-options)))
+
+ (LaTeX-add-environments
+ '("overpic" LaTeX-env-args
+ [ LaTeX-arg-overpic-key-val ]
+ LaTeX-arg-includegraphics)
+
+ '("Overpic" LaTeX-env-args
+ [ LaTeX-arg-overpic-key-val ]
+ (TeX-arg-literal "{" "}")))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("setOverpic" "{"))
+ 'function)))
+ LaTeX-dialect)
+
+(defvar LaTeX-overpic-package-options
+ (progn
+ (TeX-load-style "graphicx")
+ (append
+ LaTeX-graphicx-package-options
+ '("abs"
+ "percent"
+ "permil")))
+ "Package options for the overpic package.")
+
+;;; overpic.el ends here
diff --git a/style/prosper.el b/style/prosper.el
index 5e0c6d8..cfc9797 100644
--- a/style/prosper.el
+++ b/style/prosper.el
@@ -1,6 +1,6 @@
;;; prosper.el --- Prosper style file for AUCTeX
-;; Copyright (C) 2001, 2002, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2014, 2020 Free Software Foundation, Inc.
;; Authors: Phillip Lord<address@hidden>
;; Nevin Kapur <address@hidden>
@@ -132,7 +132,7 @@
(insert "]"))
(defun LaTeX-prosper-insert-slide (_environment)
- (if (y-or-n-p "Surround with overlay ?")
+ (if (y-or-n-p "Surround with overlay? ")
(progn (TeX-insert-macro "overlays")
(if (search-backward "{" 0 t)
(progn
@@ -141,52 +141,49 @@
(let ((title (TeX-read-string "Title: ")))
(LaTeX-insert-environment "slide" (concat TeX-grop title TeX-grcl))))
-
-
;; AUCTeX configuration
-(TeX-add-style-hook "prosper"
- (function
- (lambda ()
- (LaTeX-add-environments
- '("slide" LaTeX-prosper-insert-slide)
- '("itemstep" LaTeX-env-item)
- '("Itemize" LaTeX-env-item))
- (TeX-add-symbols
- '("documentclass"
- LaTeX-prosper-insert-options
- LaTeX-prosper-insert-title)
- '("title" "Title of the presentation")
- '("subtitle" "Subtitle of the presentation")
- '("author" "Author name")
- '("email" "Author email")
- '("institution" "Author institution")
- '("slideCaption" "Caption for slide")
- '("Logo" "Logo")
- '("displayVersion" TeX-arg-free)
- '("DefaultTransition"
- LaTeX-prosper-arg-pdftransition)
- '("NoFrenchBabelItemize" TeX-arg-free)
- '("part" LaTeX-prosper-arg-part)
- '("overlays" "Number of overlays" t)
- '("FontTitle" "Color slides" "Black & White Slides")
- '("FontText" "Color slides" "Black & White Slides")
- '("fontTitle" "Text")
- '("fontText" "Text")
- '("ColorFoot" "Color")
- '("PDFtransition" LaTeX-prosper-arg-pdftransition)
- '("myitem" "Level" "Definition")
- '("fromSlide" "Number" t)
- '("fromSlide*" "Number" t)
- '("onlySlide" "Number" t)
- '("onlySlide*" "Number" t)
- '("OnlySlide" "Number")
- '("UntilSlide" "Number")
- '("untilSlide*" "Number")
- '("PDForPS" TeX-arg-conditional)
- '("onlyInPS" t)
- '("onlyInPDF" t)
- '("FromSlide" "Number"))))
- LaTeX-dialect)
-
+(TeX-add-style-hook
+ "prosper"
+ (lambda ()
+ (LaTeX-add-environments
+ '("slide" LaTeX-prosper-insert-slide)
+ '("itemstep" LaTeX-env-item)
+ '("Itemize" LaTeX-env-item))
+ (TeX-add-symbols
+ '("documentclass"
+ LaTeX-prosper-insert-options
+ LaTeX-prosper-insert-title)
+ '("title" "Title of the presentation")
+ '("subtitle" "Subtitle of the presentation")
+ '("author" "Author name")
+ '("email" "Author email")
+ '("institution" "Author institution")
+ '("slideCaption" "Caption for slide")
+ '("Logo" "Logo")
+ '("displayVersion" TeX-arg-free)
+ '("DefaultTransition"
+ LaTeX-prosper-arg-pdftransition)
+ '("NoFrenchBabelItemize" TeX-arg-free)
+ '("part" LaTeX-prosper-arg-part)
+ '("overlays" "Number of overlays" t)
+ '("FontTitle" "Color slides" "Black & White Slides")
+ '("FontText" "Color slides" "Black & White Slides")
+ '("fontTitle" "Text")
+ '("fontText" "Text")
+ '("ColorFoot" "Color")
+ '("PDFtransition" LaTeX-prosper-arg-pdftransition)
+ '("myitem" "Level" "Definition")
+ '("fromSlide" "Number" t)
+ '("fromSlide*" "Number" t)
+ '("onlySlide" "Number" t)
+ '("onlySlide*" "Number" t)
+ '("OnlySlide" "Number")
+ '("UntilSlide" "Number")
+ '("untilSlide*" "Number")
+ '("PDForPS" TeX-arg-conditional)
+ '("onlyInPS" t)
+ '("onlyInPDF" t)
+ '("FromSlide" "Number")))
+ LaTeX-dialect)
;;; prosper.el ends here
diff --git a/style/revtex4-2.el b/style/revtex4-2.el
new file mode 100644
index 0000000..2c9a524
--- /dev/null
+++ b/style/revtex4-2.el
@@ -0,0 +1,264 @@
+;;; revtex4-2.el --- AUCTeX style for `revtex4-2.cls' (v4.2c)
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2019-12-29
+;; 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 `revtex4-2.cls' (v4.2c) from 2019/01/18.
+;; `revtex4-2.cls' is part of TeXLive.
+
+;;; Code:
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+(defvar LaTeX-natbib-package-options)
+(defvar LaTeX-url-package-options)
+
+(defun LaTeX-env-revtex4-2-video (environment)
+ "Create ENVIRONMENT with \\caption and \\label commands.
+This function is meant to be used for \"video\" environment
+provided by REVTeX class."
+ (let* ((float (and LaTeX-float ; LaTeX-float can be nil, i.e. do not prompt
+ (TeX-read-string
+ (TeX-argument-prompt t nil "Float position")
+ LaTeX-float)))
+ (caption (TeX-read-string
+ (TeX-argument-prompt nil nil "Caption")))
+ (short-caption (when (>= (length caption)
LaTeX-short-caption-prompt-length)
+ (TeX-read-string
+ (TeX-argument-prompt t nil "Short caption")))))
+ (setq LaTeX-float float)
+ (LaTeX-insert-environment environment
+ (unless (zerop (length float))
+ (concat LaTeX-optop float LaTeX-optcl)))
+ ;; Save the place where we've started:
+ (save-excursion
+ ;; Add a new line and add the \setfloatlink macro:
+ (LaTeX-newline)
+ (indent-according-to-mode)
+ (TeX-insert-macro "setfloatlink")
+ ;; Insert caption and ask for a label, do nothing if user skips
+ ;; caption:
+ (when (and caption (not (string= caption "")))
+ (LaTeX-newline)
+ (indent-according-to-mode)
+ (insert (LaTeX-compose-caption-macro caption short-caption))
+ ;; If `auto-fill-mode' is active, fill the caption.
+ (when auto-fill-function (LaTeX-fill-paragraph))
+ (LaTeX-newline)
+ (indent-according-to-mode)
+ ;; Ask for a label and indent only if it is inserted:
+ (when (LaTeX-label environment 'environment)
+ (indent-according-to-mode))))))
+
+(TeX-add-style-hook
+ "revtex4-2"
+ (lambda ()
+
+ ;; Add standard stuff taken from `article.el':
+ (LaTeX-largest-level-set "section")
+ (LaTeX-add-counters "part" "section" "subsection" "subsubsection"
+ "paragraph" "subparagraph" "figure" "table")
+ (LaTeX-add-environments "abstract")
+
+ ;; Run style hooks for packages loaded by default:
+ (TeX-run-style-hooks "url" "natbib")
+
+ ;; Check for other class options and load AUCTeX style
+ ;; respectively. car of the cons is the REVTeX class option, cdr
+ ;; the name of AUCTeX style:
+ (let ((opt-style '(("amsfonts" . "amsfonts")
+ ("amsmath" . "amsmath")
+ ("linenumbers" . "lineno")))
+ (opt-cls (cdar LaTeX-provided-class-options)))
+ (dolist (opt opt-style)
+ (when (member (car opt) opt-cls)
+ (TeX-run-style-hooks (cdr opt)))))
+
+ (TeX-add-symbols
+ ;; IV.3. Specifying authors and affiliations
+ '("affiliation" "Affliation")
+ '("noaffiliation")
+ ;; Because collaborations don't normally have affiiations, one
+ ;; needs to follow the \collaboration with \noaffiliation:
+ '("collaboration" "Collaboration"
+ (TeX-arg-literal "\n")
+ (TeX-arg-literal "\\noaffiliation"))
+ '("email" ["Text"] "E-Mail Address")
+ '("homepage" ["Text"] "URL")
+ '("altaffiliation" ["Text"] "Affliation")
+ ;; Specifying first names and surnames
+ '("surname" "Surname")
+
+ ;; IV.6. Keywords
+ '("keywords" t)
+
+ ;; IV.7. Institutional report numbers
+ '("preprint" 0)
+
+ ;; V.3. One-column vs. two-column layouts
+ '("onecolumngrid" 0)
+ '("twocolumngrid" 0)
+
+ ;; V.6. Appendices
+ '("appendix*" 0)
+
+ ;; VIII.1. Citing a reference
+ '("onlinecite"
+ (TeX-arg-conditional TeX-arg-cite-note-p ([LaTeX-arg-natbib-notes]) nil)
+ TeX-arg-cite)
+ '("textcite"
+ (TeX-arg-conditional TeX-arg-cite-note-p ([LaTeX-arg-natbib-notes]) nil)
+ TeX-arg-cite)
+
+ ;; IX.2 video environment
+ '("setfloatlink" "URL")
+
+ ;; X.3. Dealing with Long Tables
+ '("squeezetable" 0)
+
+ ;; XI. Placement of Figures, Tables, and other floats
+ '("printtables" 0)
+ '("printtables*" 0)
+ '("printfigures" 0)
+ '("printfigures*" 0))
+
+ ;; V.3. One-column vs. two-column layouts
+ (LaTeX-add-environments
+ '("widetext")
+ '("acknowledgments")
+
+ ;; IX.2. video environment
+ '("video" LaTeX-env-revtex4-2-video)
+
+ ;; X. Tables
+ '("ruledtabular")
+
+ ;; XII. Rotating Floats
+ '("turnpage"))
+
+ ;; Append entry for `video' to `LaTeX-label-alist':
+ (add-to-list 'LaTeX-label-alist
+ (cons "video" 'LaTeX-revtex4-2-video-label)
+ t)
+
+ ;; Tell RefTeX about `video' environment:
+ (when (fboundp 'reftex-add-label-environments)
+ (reftex-add-label-environments
+ `(("video"
+ ,LaTeX-revtex4-2-video-reftex-quick-id-key
+ ,LaTeX-revtex4-2-video-label
+ "~\\ref{%s}" caption))))
+
+ ;; X.3. Dealing with Long Tables
+ (when (member "longtable" (TeX-style-list))
+ (LaTeX-add-environments
+ '("longtable*" LaTeX-env-longtable)))
+
+ ;; Verbatim-like macros with braces as delimiters:
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "email")
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "homepage")
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "setfloatlink")
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup)
+ (fboundp 'font-latex-update-font-lock))
+ (font-latex-add-keywords '(("fbox" "*[{")
+ ("keywords" "{")
+ ("preprint" "")
+ ("onecolumngrid" "")
+ ("twocolumngrid" "")
+ ("squeezetable" "")
+ ("printtables" "*")
+ ("printfigures" "*"))
+ 'function)
+ (font-latex-add-keywords '(("affiliation" "{")
+ ("noaffiliation" "")
+ ("collaboration" "{")
+ ("altaffiliation" "[{"))
+ 'textual)
+ (font-latex-add-keywords '(("email" "[")
+ ("homepage" "[")
+ ("onlinecite" "[[{")
+ ("textcite" "[[{")
+ ("setfloatlink" ""))
+ 'reference)
+ (font-latex-add-keywords '(("appendix*" ""))
+ 'warning)
+
+ ;; Tell font-lock about the update.
+ (font-latex-update-font-lock t)))
+ LaTeX-dialect)
+
+(defvar LaTeX-revtex4-2-class-options
+ (progn
+ (TeX-load-style "natbib")
+ (TeX-load-style "url")
+ (append
+ LaTeX-natbib-package-options
+ LaTeX-url-package-options
+ '("aps" "aip" "aapm" "sor"
+ "prl" "pra" "prb" "prc" "prd" "pre"
+ "prab" "prper" "prx" "prapplied" "prfluids"
+ "prmaterials" "physrev" "rmp"
+ "apl" "bmf" "cha" "jap" "jcp" "jmp" "rse"
+ "pof" "pop" "rsi" "apm" "adv" "sd"
+ "mph" "jor"
+ "10pt" "11pt" "12pt"
+ "groupedaddress" "superscriptaddress"
+ "draft" "linenumbers" "longbibliography"
+ "amsfonts" "noamsfonts"
+ "amssymb" "noamssymb"
+ "amsmath" "noamsmath"
+ "preprintnumbers" "nopreprintnumbers"
+ "floatfix"
+ "bibnotes" "nobibnotes"
+ "footinbib" "nofootinbib"
+ "eprint" "noeprint"
+ "altaffilletter" "altaffillsymbol"
+ "unsortedaddress"
+ "runinaddress"
+ "showkeys" "noshowkeyws"
+ "tightenlines"
+ "floats"
+ "endfloats"
+ "endfloats*"
+ "titlepage" "notitlepage"
+ "final"
+ "letterpaper" "a4paper" "a5paper"
+ "oneside" "twoside"
+ "fleqn"
+ "eqsecnum"
+ "balancelastpage" "nobalancelastpage"
+ "raggedbottom" "flushbottom"
+ "raggedfooter" "noraggedfooter"
+ "byrevtex"
+ "citeautoscript" "galley" "nomerge")))
+ "Options for the revtex4-2 document class.")
+
+;;; revtex4-2.el ends here
diff --git a/style/shortvrb.el b/style/shortvrb.el
index b0d8be4..a8cf2a1 100644
--- a/style/shortvrb.el
+++ b/style/shortvrb.el
@@ -1,6 +1,6 @@
;;; shortvrb.el --- AUCTeX style for `shortvrb.sty'
-;; Copyright (C) 2009, 2014, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2014, 2018, 2020 Free Software Foundation, Inc.
;; Author: Ralf Angeli <address@hidden>
;; Maintainer: address@hidden
@@ -46,43 +46,16 @@
"font-latex"
(list))
-(defcustom LaTeX-shortvrb-chars nil
- "List of characters toggling verbatim mode.
-When your document uses the shortvrb style and you have a
-\\MakeShortVrb{\\|} in your file to write verbatim text as
-|text|, then set this variable to the list (?|). Then AUCTeX
-fontifies |text| as verbatim.
-
-Preferably, you should do this buffer-locally using a file
-variable near the end of your document like so:
-
- %% Local Variables:
- %% LaTeX-shortvrb-chars: (?|)
- %% End:
-
-When you customize this variable to a non-nil value, then it
-becomes the default value meaning that verbatim fontification is
-always performed for the characters in the list, no matter if
-your document actually defines shortvrb chars using
-\\MakeShortVrb."
- :group 'LaTeX-style
- :type '(repeat character))
-(put 'LaTeX-shortvrb-chars 'safe-local-variable 'listp)
-
(TeX-add-style-hook
"shortvrb"
(lambda ()
;; Fontification
(when (and LaTeX-shortvrb-chars
- (fboundp 'font-latex-set-syntactic-keywords)
+ (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-to-syntax-alist
(mapcar (lambda (char) (cons char "|"))
- LaTeX-shortvrb-chars))))
+ LaTeX-shortvrb-chars))))
LaTeX-dialect)
-;; Don't look for file-local variables before this line, so that the example in
-;; the docstring isn't picked up.
-
-
;;; shortvrb.el ends here
diff --git a/style/subcaption.el b/style/subcaption.el
index 1914a14..4a2beab 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -188,8 +188,8 @@ caption, insert only a caption."
(defun LaTeX-subcaption-package-options ()
"Prompt for package options for the subcaption package."
- (TeX-read-key-val t
- (append LaTeX-subcaption-key-val-options
- LaTeX-caption-key-val-options)))
+ (TeX-load-style "caption")
+ (TeX-read-key-val t (append LaTeX-subcaption-key-val-options
+ LaTeX-caption-key-val-options)))
;;; subcaption.el ends here
diff --git a/style/tex-live.el b/style/tex-live.el
new file mode 100644
index 0000000..6b059cf
--- /dev/null
+++ b/style/tex-live.el
@@ -0,0 +1,177 @@
+;;; tex-live.el --- AUCTeX style for `tex-live.sty'
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <address@hidden>
+;; Maintainer: address@hidden
+;; Created: 2020-03-29
+;; 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 `tex-live.sty' from 2019/08/14.
+;; `tex-live.sty' is part of TeXLive.
+
+;; Chances are high that this style is not feature complete, and
+;; fontification is not ideal. But this might be a starting point for
+;; TeXLive documentation editors who use AUCTeX.
+
+;; Silence the compiler:
+(declare-function LaTeX-add-fancyvrb-environments
+ "fancyvrb"
+ (&rest fancyvrb-environments))
+
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+
+(declare-function font-latex-update-font-lock
+ "font-latex"
+ (&optional syntactic-kws))
+
+(TeX-add-style-hook
+ "tex-live"
+ (lambda ()
+
+ ;; Run hooks for required packages:
+ (TeX-run-style-hooks "geometry"
+ "alltt"
+ "array"
+ "colortbl"
+ "comment"
+ "float"
+ "graphicx"
+ "longtable"
+ "ulem"
+ "url"
+ "xspace"
+ "relsize"
+ "fancyvrb")
+
+ ;; Add | to a local version of `LaTeX-shortvrb-chars' before
+ ;; running the style hook `shortvrb.el':
+ (add-to-list (make-local-variable 'LaTeX-shortvrb-chars) ?|)
+ (TeX-run-style-hooks "shortvrb")
+
+ ;; Add support for custom environments defined with `fancyvrb.sty':
+ (LaTeX-add-fancyvrb-environments
+ '("verbatim" "Verbatim")
+ '("sverbatim" "Verbatim")
+ '("fverbatim" "Verbatim")
+ '("boxedverbatim" "Verbatim"))
+
+ (TeX-add-symbols
+ '("verbatiminput" LaTeX-fancyvrb-arg-file-relative)
+ '("boxedverbatiminput" LaTeX-fancyvrb-arg-file-relative)
+ '("listinginput"
+ (TeX-arg-eval completing-read
+ (TeX-argument-prompt optional nil "Value of firstnumber
key")
+ (cadr (assoc "firstnumber"
LaTeX-fancyvrb-key-val-options-local)))
+ LaTeX-fancyvrb-arg-file-relative)
+
+ ;; Various sorts of names:
+ '("pkgname" "Package")
+ '("optname" "Option")
+ '("cmdname" "Command")
+ '("colname" "Collection")
+ '("dirname" "Directory")
+ '("filename" "Directory")
+ '("envname"
+ (TeX-arg-eval completing-read
+ (TeX-argument-prompt optional nil "Environment")
+ '("TEXMFCACHE"
+ "TEXMFCNF"
+ "TEXMFCONFIG"
+ "TEXMFDIST"
+ "TEXMFHOME"
+ "TEXMFLOCAL"
+ "TEXMFMAIN"
+ "TEXMFOUTPUT"
+ "TEXMFSYSCONFIG"
+ "TEXMFSYSVAR"
+ "TEXMFVAR"
+ "TEXINPUTS"
+ "TEXFONTMAPS"
+ "ENCFONTS"
+ "PATH" "MANPATH" "INFOPATH" "DISPLAY")))
+ '("code" "Code")
+ '("file" "File")
+ '("prog" "Program")
+ '("samp" "Sample")
+ '("var" "Variable")
+ '("ttbar" "Variable (typewriter)")
+
+ '("Ucom" "Command (bold)")
+
+ ;; Special names:
+ '("dpi" 0)
+ '("bs" 0)
+ '("cs" TeX-arg-macro))
+
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "dirname")
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "filename")
+
+ (LaTeX-add-environments
+ '("ttdescription" LaTeX-env-item)
+ '("cmddescription" LaTeX-env-item)
+ '("itemize*" LaTeX-env-item)
+ '("enumerate*" LaTeX-env-item)
+ '("warningbox")
+ '("lrBox"))
+
+ ;; `tex-live.sty' adds one new column specification letter P:
+ (set (make-local-variable 'LaTeX-array-column-letters)
+ (concat LaTeX-array-column-letters "P"))
+
+ ;; Custom env's where \item takes an opt. argument:
+ (let ((envs '("ttdescription" "cmddescription")))
+ (dolist (env envs)
+ (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument) t)))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("verbatiminput" "{")
+ ("boxedverbatiminput" "{")
+ ("listinginput" "{{")
+ ("pkgname" "{")
+ ("optname" "{")
+ ("cmdname" "{")
+ ("colname" "{")
+ ("dirname" "")
+ ("filename" "")
+ ("envname" "{")
+ ("cs" "{"))
+ 'reference)
+ (font-latex-add-keywords '(("code" "{")
+ ("file" "{")
+ ("prog" "{")
+ ("samp" "{")
+ ("ttvar" "{"))
+ 'type-command)
+ (font-latex-add-keywords '(("var" "{") )
+ 'italic-command)
+ (font-latex-add-keywords '(("Ucom" "{"))
+ 'bold-command)
+ ;; Tell font-lock about the update.
+ (font-latex-update-font-lock t)))
+ LaTeX-dialect)
+
+;;; tex-live.el ends here
diff --git a/style/textcomp.el b/style/textcomp.el
index 3f0feb0..17d0a0d 100644
--- a/style/textcomp.el
+++ b/style/textcomp.el
@@ -1,6 +1,6 @@
-;;; textcomp.el --- AUCTeX style for `textcomp.sty' (v1.99g)
+;;; textcomp.el --- AUCTeX style for `textcomp.sty' (v2.0n)
-;; Copyright (C) 2014, 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2017, 2020 Free Software Foundation, Inc.
;; Author: Arash Esbati <address@hidden>
;; Maintainer: address@hidden
@@ -26,146 +26,16 @@
;;; Commentary:
-;; This file adds support for `textcomp.sty' (v1.99g) from 2005/09/27.
-;; `textcomp.sty' is a standard LaTeX package and part of TeXLive.
+;; This file adds support for `textcomp.sty' (v2.0n) from 2020/02/02.
+;; With this version, the package mainly no-op as the macros are moved
+;; into LaTeX kernel. `textcomp.sty' is a standard LaTeX package and
+;; part of TeXLive.
;;; Code:
-(TeX-add-style-hook
- "textcomp"
- (lambda ()
- (TeX-add-symbols
- '("capitalgrave" 0) ; Type: Accent -- Slot: 0
- '("capitalacute" 0) ; Type: Accent -- Slot: 1
- '("capitalcircumflex" 0) ; Type: Accent -- Slot: 2
- '("capitaltilde" 0) ; Type: Accent -- Slot: 3
- '("capitaldieresis" 0) ; Type: Accent -- Slot: 4
- '("capitalhungarumlaut" 0) ; Type: Accent -- Slot: 5
- '("capitalring" 0) ; Type: Accent -- Slot: 6
- '("capitalcaron" 0) ; Type: Accent -- Slot: 7
- '("capitalbreve" 0) ; Type: Accent -- Slot: 8
- '("capitalmacron" 0) ; Type: Accent -- Slot: 9
- '("capitaldotaccent" 0) ; Type: Accent -- Slot: 10
- '("t" 0) ; Type: Accent -- Slot: 26
- '("capitaltie" 0) ; Type: Accent -- Slot: 27
- '("newtie" 0) ; Type: Accent -- Slot: 28
- '("capitalnewtie" 0) ; Type: Accent -- Slot: 29
- '("textcapitalcompwordmark" 0) ; Type: Symbol -- Slot: 23
- '("textascendercompwordmark" 0) ; Type: Symbol -- Slot: 31
- '("textquotestraightbase" 0) ; Type: Symbol -- Slot: 13
- '("textquotestraightdblbase" 0) ; Type: Symbol -- Slot: 18
- '("texttwelveudash" 0) ; Type: Symbol -- Slot: 21
- '("textthreequartersemdash" 0) ; Type: Symbol -- Slot: 22
- '("textleftarrow" 0) ; Type: Symbol -- Slot: 24
- '("textrightarrow" 0) ; Type: Symbol -- Slot: 25
- '("textblank" 0) ; Type: Symbol -- Slot: 32
- '("textdollar" 0) ; Type: Symbol -- Slot: 36
- '("textquotesingle" 0) ; Type: Symbol -- Slot: 39
- '("textasteriskcentered" 0) ; Type: Symbol -- Slot: 42
- '("textdblhyphen" 0) ; Type: Symbol -- Slot: 45
- '("textfractionsolidus" 0) ; Type: Symbol -- Slot: 47
- '("textzerooldstyle" 0) ; Type: Symbol -- Slot: 48
- '("textoneoldstyle" 0) ; Type: Symbol -- Slot: 49
- '("texttwooldstyle" 0) ; Type: Symbol -- Slot: 50
- '("textthreeoldstyle" 0) ; Type: Symbol -- Slot: 51
- '("textfouroldstyle" 0) ; Type: Symbol -- Slot: 52
- '("textfiveoldstyle" 0) ; Type: Symbol -- Slot: 53
- '("textsixoldstyle" 0) ; Type: Symbol -- Slot: 54
- '("textsevenoldstyle" 0) ; Type: Symbol -- Slot: 55
- '("texteightoldstyle" 0) ; Type: Symbol -- Slot: 56
- '("textnineoldstyle" 0) ; Type: Symbol -- Slot: 57
- '("textlangle" 0) ; Type: Symbol -- Slot: 60
- '("textminus" 0) ; Type: Symbol -- Slot: 61
- '("textrangle" 0) ; Type: Symbol -- Slot: 62
- '("textmho" 0) ; Type: Symbol -- Slot: 77
- '("textbigcircle" 0) ; Type: Symbol -- Slot: 79
- '("textohm" 0) ; Type: Symbol -- Slot: 87
- '("textlbrackdbl" 0) ; Type: Symbol -- Slot: 91
- '("textrbrackdbl" 0) ; Type: Symbol -- Slot: 93
- '("textuparrow" 0) ; Type: Symbol -- Slot: 94
- '("textdownarrow" 0) ; Type: Symbol -- Slot: 95
- '("textasciigrave" 0) ; Type: Symbol -- Slot: 96
- '("textborn" 0) ; Type: Symbol -- Slot: 98
- '("textdivorced" 0) ; Type: Symbol -- Slot: 99
- '("textdied" 0) ; Type: Symbol -- Slot: 100
- '("textleaf" 0) ; Type: Symbol -- Slot: 108
- '("textmarried" 0) ; Type: Symbol -- Slot: 109
- '("textmusicalnote" 0) ; Type: Symbol -- Slot: 110
- '("texttildelow" 0) ; Type: Symbol -- Slot: 126
- '("textdblhyphenchar" 0) ; Type: Symbol -- Slot: 127
- '("textasciibreve" 0) ; Type: Symbol -- Slot: 128
- '("textasciicaron" 0) ; Type: Symbol -- Slot: 129
- '("textacutedbl" 0) ; Type: Symbol -- Slot: 130
- '("textgravedbl" 0) ; Type: Symbol -- Slot: 131
- '("textdagger" 0) ; Type: Symbol -- Slot: 132
- '("textdaggerdbl" 0) ; Type: Symbol -- Slot: 133
- '("textbardbl" 0) ; Type: Symbol -- Slot: 134
- '("textperthousand" 0) ; Type: Symbol -- Slot: 135
- '("textbullet" 0) ; Type: Symbol -- Slot: 136
- '("textcelsius" 0) ; Type: Symbol -- Slot: 137
- '("textdollaroldstyle" 0) ; Type: Symbol -- Slot: 138
- '("textcentoldstyle" 0) ; Type: Symbol -- Slot: 139
- '("textflorin" 0) ; Type: Symbol -- Slot: 140
- '("textcolonmonetary" 0) ; Type: Symbol -- Slot: 141
- '("textwon" 0) ; Type: Symbol -- Slot: 142
- '("textnaira" 0) ; Type: Symbol -- Slot: 143
- '("textguarani" 0) ; Type: Symbol -- Slot: 144
- '("textpeso" 0) ; Type: Symbol -- Slot: 145
- '("textlira" 0) ; Type: Symbol -- Slot: 146
- '("textrecipe" 0) ; Type: Symbol -- Slot: 147
- '("textinterrobang" 0) ; Type: Symbol -- Slot: 148
- '("textinterrobangdown" 0) ; Type: Symbol -- Slot: 149
- '("textdong" 0) ; Type: Symbol -- Slot: 150
- '("texttrademark" 0) ; Type: Symbol -- Slot: 151
- '("textpertenthousand" 0) ; Type: Symbol -- Slot: 152
- '("textpilcrow" 0) ; Type: Symbol -- Slot: 153
- '("textbaht" 0) ; Type: Symbol -- Slot: 154
- '("textnumero" 0) ; Type: Symbol -- Slot: 155
- '("textdiscount" 0) ; Type: Symbol -- Slot: 156
- '("textestimated" 0) ; Type: Symbol -- Slot: 157
- '("textopenbullet" 0) ; Type: Symbol -- Slot: 158
- '("textservicemark" 0) ; Type: Symbol -- Slot: 159
- '("textlquill" 0) ; Type: Symbol -- Slot: 160
- '("textrquill" 0) ; Type: Symbol -- Slot: 161
- '("textcent" 0) ; Type: Symbol -- Slot: 162
- '("textsterling" 0) ; Type: Symbol -- Slot: 163
- '("textcurrency" 0) ; Type: Symbol -- Slot: 164
- '("textyen" 0) ; Type: Symbol -- Slot: 165
- '("textbrokenbar" 0) ; Type: Symbol -- Slot: 166
- '("textsection" 0) ; Type: Symbol -- Slot: 167
- '("textasciidieresis" 0) ; Type: Symbol -- Slot: 168
- '("textcopyright" 0) ; Type: Symbol -- Slot: 169
- '("textordfeminine" 0) ; Type: Symbol -- Slot: 170
- '("textcopyleft" 0) ; Type: Symbol -- Slot: 171
- '("textlnot" 0) ; Type: Symbol -- Slot: 172
- '("textcircledP" 0) ; Type: Symbol -- Slot: 173
- '("textregistered" 0) ; Type: Symbol -- Slot: 174
- '("textasciimacron" 0) ; Type: Symbol -- Slot: 175
- '("textdegree" 0) ; Type: Symbol -- Slot: 176
- '("textpm" 0) ; Type: Symbol -- Slot: 177
- '("texttwosuperior" 0) ; Type: Symbol -- Slot: 178
- '("textthreesuperior" 0) ; Type: Symbol -- Slot: 179
- '("textasciiacute" 0) ; Type: Symbol -- Slot: 180
- '("textmu" 0) ; Type: Symbol -- Slot: 181
- '("textparagraph" 0) ; Type: Symbol -- Slot: 182
- '("textperiodcentered" 0) ; Type: Symbol -- Slot: 183
- '("textreferencemark" 0) ; Type: Symbol -- Slot: 184
- '("textonesuperior" 0) ; Type: Symbol -- Slot: 185
- '("textordmasculine" 0) ; Type: Symbol -- Slot: 186
- '("textsurd" 0) ; Type: Symbol -- Slot: 187
- '("textonequarter" 0) ; Type: Symbol -- Slot: 188
- '("textonehalf" 0) ; Type: Symbol -- Slot: 189
- '("textthreequarters" 0) ; Type: Symbol -- Slot: 190
- '("texteuro" 0) ; Type: Symbol -- Slot: 191
- '("texttimes" 0) ; Type: Symbol -- Slot: 214
- '("textdiv" 0) ; Type: Symbol -- Slot: 246
- '("textcircled" 1) ; Type: Command -- Slot: N/A
- '("capitalcedilla" 1) ; Type: Command -- Slot: N/A
- '("capitalogonek" 1))) ; Type: Command -- Slot: N/A
- LaTeX-dialect)
-
(defvar LaTeX-textcomp-package-options
- '("full" "almostfull" "euro" "safe" "force" "warn")
+ '("full" "almostfull" "euro" "safe" "error"
+ "warn" "info" "quiet" "force")
"Package options for the textcomp package.")
;;; textcomp.el ends here
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index b198eae..c8ecff7 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -1,6 +1,6 @@
;;; latex-test.el --- tests for LaTeX mode
-;; Copyright (C) 2014--2018 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2019 Free Software Foundation, Inc.
;; This file is part of AUCTeX.
@@ -320,4 +320,220 @@ backend=biber % here is a comment
(should (not TeX-PDF-mode))
(should (not (member "psfrag" TeX-active-styles))))))
+(ert-deftest LaTeX-insert-environment-with-active-region ()
+ "Check environment is inserted correctly with active region."
+ ;; The former codes of `LaTeX-insert-environment' had problems about
+ ;; the management of the point and the mark, which sometimes
+ ;; resulted in additional empty line, spurious insertion of comment
+ ;; prefix, or both.
+ (with-temp-buffer
+ (let ((transient-mark-mode t)
+ (LaTeX-insert-into-comments t))
+ (latex-mode)
+ (auto-fill-mode 1)
+
+ ;; test 1: for bug#35284
+ ;; test 1-1
+ (insert "\\begin{document}
+% This is a comment
+\\def\\foo#1{foo}
+% another comment
+\\end{document}
+")
+ (set-mark (line-beginning-position 0)) ; just before \end{document}.
+ (goto-char (point-min))
+ (beginning-of-line 2) ; just before the first "%".
+ (LaTeX-insert-environment "verbatim")
+ (should (string=
+ (buffer-string)
+ "\\begin{document}
+% \\begin{verbatim}
+% This is a comment
+\\def\\foo#1{foo}
+% another comment
+% \\end{verbatim}
+\\end{document}
+"))
+
+ ;; test 1-2
+ (erase-buffer)
+ (insert "\\begin{document}
+% This is a comment
+\\def\\foo#1{foo}
+% another comment
+\\end{document}
+")
+ (set-mark (line-end-position -1)) ; just after "another comment"
+ (goto-char (point-min))
+ (beginning-of-line 2) ; just before the first "%".
+ (LaTeX-insert-environment "verbatim")
+ (should (string=
+ (buffer-string)
+ "\\begin{document}
+% \\begin{verbatim}
+% This is a comment
+\\def\\foo#1{foo}
+% another comment
+% \\end{verbatim}
+\\end{document}
+"))
+
+ (setq LaTeX-insert-into-comments nil)
+
+ ;; test 1-3
+ (erase-buffer)
+ (insert "\\begin{document}
+% This is a comment
+\\def\\foo#1{foo}
+% another comment
+\\end{document}
+")
+ (set-mark (line-beginning-position 0)) ; just before \end{document}
+ (goto-char (point-min))
+ (beginning-of-line 2) ; just before the first "%".
+ (LaTeX-insert-environment "verbatim")
+ (should (string=
+ (buffer-string)
+ "\\begin{document}
+\\begin{verbatim}
+% This is a comment
+\\def\\foo#1{foo}
+% another comment
+\\end{verbatim}
+\\end{document}
+"))
+ ;; test 2: for
+ ;; https://lists.gnu.org/archive/html/auctex/2019-11/msg00009.html
+
+ (setq LaTeX-insert-into-comments t)
+
+ ;; test 2-1
+ (erase-buffer)
+ (insert "abc def ghi")
+ (set-mark 5) ; just before "def"
+ (goto-char 8) ; just after "def"
+ (LaTeX-insert-environment "center")
+ (should (string=
+ (buffer-string)
+ "abc
+\\begin{center}
+ def
+\\end{center}
+ghi"))
+
+ ;; test 2-2
+ (erase-buffer)
+ (insert "abc
+def
+ghi")
+ (beginning-of-line 0) ; just before "def"
+ (set-mark (line-end-position)) ; just after "def"
+ (LaTeX-insert-environment "center")
+ (should (string=
+ (buffer-string)
+ "abc
+\\begin{center}
+ def
+\\end{center}
+ghi"))
+
+ ;; test 2-3
+ (erase-buffer)
+ (insert "\\begin{quote}
+ % abc
+ % def
+ % ghi
+\\end{quote}
+")
+ (set-mark (line-beginning-position 0)) ; just before \end{quote}
+ (goto-char (point-min))
+ (beginning-of-line 2) ; just before the first "%"
+ (LaTeX-insert-environment "center")
+ (should (string=
+ (buffer-string)
+ "\\begin{quote}
+ % \\begin{center}
+ % abc
+ % def
+ % ghi
+ % \\end{center}
+\\end{quote}
+"))
+
+ ;; test 2-4
+ (erase-buffer)
+ (insert "\\begin{quote}
+ %\s
+ % abc
+ % def
+ % ghi
+ %\s
+\\end{quote}
+")
+ (set-mark (line-end-position -1)) ; just after the last "% "
+ (goto-char (point-min))
+ (beginning-of-line 2) ; just before the first " %"
+ (LaTeX-insert-environment "center")
+ (should (string=
+ (buffer-string)
+ "\\begin{quote}
+ % \\begin{center}
+ % abc
+ % def
+ % ghi
+ % \\end{center}
+\\end{quote}
+"))
+
+ ;; test 2-5
+ (erase-buffer)
+ (insert "\\begin{quote}
+ %\s
+ % abc
+ % def
+ % ghi
+ %\s
+\\end{quote}
+")
+ (set-mark (1- (line-end-position -1))) ; just after the last "%"
+ (goto-char (point-min))
+ (beginning-of-line 2)
+ (forward-char 2) ; just before the first "%"
+ (LaTeX-insert-environment "center")
+ (should (string=
+ (buffer-string)
+ "\\begin{quote}
+ % \\begin{center}
+ % abc
+ % def
+ % ghi
+ % \\end{center}
+\\end{quote}
+"))
+
+ (setq LaTeX-insert-into-comments nil)
+
+ ;; test 2-6
+ (erase-buffer)
+ (insert "\\begin{quote}
+ % abc
+ % def
+ % ghi
+\\end{quote}
+")
+ (set-mark (line-beginning-position 0)) ; just before \end{quote}
+ (goto-char (point-min))
+ (beginning-of-line 2) ; just before the first " %"
+ (LaTeX-insert-environment "center")
+ (should (string=
+ (buffer-string)
+ "\\begin{quote}
+ \\begin{center}
+ % abc
+ % def
+ % ghi
+ \\end{center}
+\\end{quote}
+")))))
+
;;; latex-test.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 9aaa585..5f53661 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1,6 +1,6 @@
;;; tex-buf.el --- External commands for AUCTeX.
-;; Copyright (C) 1991-1999, 2001-2019 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1999, 2001-2020 Free Software Foundation, Inc.
;; Maintainer: address@hidden
;; Keywords: tex, wp
@@ -422,11 +422,11 @@ to be run."
((= length 1)
(setq engine (car TeX-check-engine-list))
(y-or-n-p (format "%s is required to build this document.
-Do you want to use this engine?" (cdr (assoc engine name-alist)))))
+Do you want to use this engine? " (cdr (assoc engine name-alist)))))
;; More than one engine is allowed.
((> length 1)
(if (y-or-n-p (format "It appears %s are required to build this
document.
-Do you want to select one of these engines?"
+Do you want to select one of these engines? "
(mapconcat
(lambda (elt) (cdr (assoc elt name-alist)))
TeX-check-engine-list ", ")))
@@ -449,7 +449,7 @@ Do you want to select one of these engines?"
(setq TeX-check-engine-list nil))))
(TeX-engine-set engine)
(when (and (fboundp 'add-file-local-variable)
- (y-or-n-p "Do you want to remember the choice?"))
+ (y-or-n-p "Do you want to remember the choice? "))
(add-file-local-variable 'TeX-engine engine)
(save-buffer))))))
@@ -1134,8 +1134,7 @@ Return the new process."
(setq compilation-in-progress (cons process compilation-in-progress))
process)
(setq mode-line-process ": run")
- (set-buffer-modified-p (buffer-modified-p))
- (sit-for 0) ; redisplay
+ (force-mode-line-update)
(call-process TeX-shell nil buffer nil
TeX-shell-command-option command))))
@@ -1444,7 +1443,7 @@ reasons. Use `TeX-run-function' instead."
(apply TeX-sentinel-function nil name nil)
;; Force mode line redisplay soon
- (set-buffer-modified-p (buffer-modified-p)))))
+ (force-mode-line-update))))
(defun TeX-command-sentinel (process msg)
"Process TeX command output buffer after the process dies."
@@ -1480,10 +1479,15 @@ reasons. Use `TeX-run-function' instead."
;; If buffer and mode line will show that the process
;; is dead, we can delete it now. Otherwise it
;; will stay around until M-x list-processes.
- (delete-process process)
+ (delete-process process))
+
+ ;; Force mode line redisplay soon
+ ;; Do this in the command buffer so that "Next Error" item
+ ;; will appear in the menu bar just after compilation.
+ ;; (bug#38058)
+ (with-current-buffer TeX-command-buffer
+ (force-mode-line-update)))))
- ;; Force mode line redisplay soon
- (set-buffer-modified-p (buffer-modified-p))))))
(setq compilation-in-progress (delq process compilation-in-progress)))
@@ -1944,7 +1948,7 @@ command."
"Format the mode line for a buffer containing output from PROCESS."
(setq mode-line-process (concat ": "
(symbol-name (process-status process))))
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
(defun TeX-command-filter (process string)
"Filter to process normal output."
@@ -1963,7 +1967,7 @@ command."
"Format the mode line for a buffer containing TeX output from PROCESS."
(setq mode-line-process (concat " " TeX-current-page ": "
(symbol-name (process-status process))))
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
(defun TeX-format-filter (process string)
"Filter to process TeX output."
diff --git a/tex-style.el b/tex-style.el
index b1c32a4..4a9eeb7 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -1,7 +1,6 @@
;;; tex-style.el --- Customizable variables for AUCTeX style files
-;; Copyright (C) 2005, 2007, 2009, 2012-2017
-;; Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007, 2009, 2012-2020 Free Software Foundation, Inc.
;; Author: Reiner Steib <address@hidden>
;; Keywords: tex, wp, convenience
@@ -271,8 +270,8 @@ and `LaTeX-csquotes-close-quote' are non-empty strings."
;; style/emp.el
(defcustom LaTeX-write18-enabled-p t
- "*If non-nil, insert automatically the \\write18 calling metapost.
-When disabled, you have to use mpost on the mp files automatically
+ "If non-nil, insert automatically the \\write18 calling metapost.
+When disabled, you have to use mpost on the mp files automatically
produced by emp.sty and then re-LaTeX the document."
:type 'boolean
:group 'LaTeX-style)
@@ -283,8 +282,8 @@ produced by emp.sty and then re-LaTeX the document."
"Unique letter identifying exam class macros in RefTeX.
A character argument for quick identification when RefTeX inserts
-new labels with `reftex-label'. It must be unique. It is
-initialized to ?x."
+new references with `reftex-reference'. It must be unique. It
+is initialized to ?x."
:group 'LaTeX-style
:type 'character)
@@ -356,16 +355,16 @@ files.
Inserting the subdirectory in the filename (as
`LaTeX-includegraphics-read-file-relative') is discouraged by
`epslatex.ps'."
-;; ,----[ epslatex.ps; Section 12; (page 26) ]
-;; | Instead of embedding the subdirectory in the filename, there are two
-;; | other options
-;; | 1. The best method is to modify the TeX search path [...]
-;; | 2. Another method is to specify sub/ in a \graphicspath command
-;; | [...]. However this is much less efficient than modifying the
-;; | TeX search path
-;; `----
-;; See "Inefficiency" and "Unportability" in the same section for more
-;; information.
+ ;; ,----[ epslatex.ps; Section 12; (page 26) ]
+ ;; | Instead of embedding the subdirectory in the filename, there are two
+ ;; | other options
+ ;; | 1. The best method is to modify the TeX search path [...]
+ ;; | 2. Another method is to specify sub/ in a \graphicspath command
+ ;; | [...]. However this is much less efficient than modifying the
+ ;; | TeX search path
+ ;; `----
+ ;; See "Inefficiency" and "Unportability" in the same section for more
+ ;; information.
:group 'LaTeX-style
:type '(choice (const :tag "TeX" LaTeX-includegraphics-read-file-TeX)
(const :tag "relative"
@@ -376,6 +375,47 @@ Inserting the subdirectory in the filename (as
(TeX-master-directory))))
(function :tag "other")))
+;; style/revtex4-2.el
+
+(defcustom LaTeX-revtex4-2-video-label "vid:"
+ "Default prefix to labels in video environments of REVTeX4-2 class."
+ :group 'LaTeX-label
+ :type 'string)
+
+(defcustom LaTeX-revtex4-2-video-reftex-quick-id-key ?v
+ "Unique letter identifying \"video\" environment in RefTeX.
+
+A character argument for quick identification when RefTeX inserts
+new references with `reftex-reference'. It must be unique. It
+is initialized to ?v."
+ :group 'LaTeX-style
+ :type 'character)
+
+;; style/shortvrb.el
+
+(defcustom LaTeX-shortvrb-chars nil
+ "List of characters toggling verbatim mode.
+When your document uses the shortvrb style and you have a
+\\MakeShortVrb{\\|} in your file to write verbatim text as
+|text|, then set this variable to the list (?|). Then AUCTeX
+fontifies |text| as verbatim.
+
+Preferably, you should do this buffer-locally using a file
+variable near the end of your document like so:
+
+ %% Local Variables:
+ %% LaTeX-shortvrb-chars: (?|)
+ %% End:
+
+When you customize this variable to a non-nil value, then it
+becomes the default value meaning that verbatim fontification is
+always performed for the characters in the list, no matter if
+your document actually defines shortvrb chars using
+\\MakeShortVrb."
+ :group 'LaTeX-style
+ :type '(repeat character))
+(put 'LaTeX-shortvrb-chars 'safe-local-variable 'listp)
+
;; style/splitidx.el
(defcustom LaTeX-splitidx-sindex-reftex-quick-id-key ?s
@@ -388,6 +428,10 @@ must be unique. It is initialized to ?s when added to
:group 'LaTeX-style
:type 'character)
+;; Don't look for file-local variables before this line, so that the
+;; example in the docstring of `LaTeX-shortvrb-chars' isn't picked up.
+
+
(provide 'tex-style)
;;; tex-style.el ends here
diff --git a/tex-wizard.el b/tex-wizard.el
index b51c03a..97c7628 100644
--- a/tex-wizard.el
+++ b/tex-wizard.el
@@ -1,6 +1,6 @@
;;; tex-wizard.el --- Check the TeX configuration
-;; Copyright (C) 2003, 2006, 2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2006, 2016, 2020 Free Software Foundation, Inc.
;; Author: David Kastrup <address@hidden>
;; Keywords: tex, wp, convenience
@@ -43,7 +43,7 @@ major mode for editing TeX/LaTeX files.\n")
(error (select-window wizwin)
(switch-to-buffer wizbuf)
(insert-before-markers "(I am unable to find AUCTeX's info
file.)\n")))
- (if (prog1 (y-or-n-p "Should I try enabling AUCTeX now?")
+ (if (prog1 (y-or-n-p "Should I try enabling AUCTeX now? ")
(select-window wizwin)
(switch-to-buffer wizbuf))
(condition-case nil
diff --git a/tex.el b/tex.el
index 95448d8..e8b9e72 100644
--- a/tex.el
+++ b/tex.el
@@ -5846,8 +5846,7 @@ sign. With optional ARG, insert that many dollar signs."
(t
;; Math mode was not entered with dollar - we cannot finish it with one.
(message "Math mode started with `%s' cannot be closed with dollar"
- (car texmathp-why))
- (insert "$"))))
+ (car texmathp-why)))))
(t
;; Just somewhere in the text.
(cond
- [elpa] externals/auctex 4894e78 27/43: Move customizable variable into tex-style.el, (continued)
- [elpa] externals/auctex 4894e78 27/43: Move customizable variable into tex-style.el, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex ae89690 28/43: * doc/auctex.texi (Font Specifiers): Document new font macros., Tassilo Horn, 2020/04/11
- [elpa] externals/auctex 0d79074 30/43: Add support for some missing environments, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex cc3f860 32/43: Fix regexp for parsing optional arguments, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex 811c52a 34/43: Update style/listings.el, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex 0d3393d 36/43: * preview.el.in (preview-gs-open): Use wrapper function., Tassilo Horn, 2020/04/11
- [elpa] externals/auctex 0dee720 35/43: Add new style/tex-live.el, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex 240476c 40/43: * doc/changes.texi: Document latest changes., Tassilo Horn, 2020/04/11
- [elpa] externals/auctex f571914 43/43: Compile after merge from master, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex 1f04541 39/43: Track LaTeX kernel changes for textcomp package, Tassilo Horn, 2020/04/11
- [elpa] externals/auctex b84ab02 42/43: Merge branch 'master' into externals/auctex,
Tassilo Horn <=