force update packages ; add lsp-mode, lsp-ui, helm-lsp
This commit is contained in:
parent
ee6401529a
commit
d388672a3f
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1 +0,0 @@
|
|||
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2022-10-20T17:05:02-0400 using RSA
|
|
@ -1,229 +0,0 @@
|
|||
Release notes for AUCTeX 13.1 with preview-latex
|
||||
================================================
|
||||
|
||||
AUCTeX provides by far the most wide-spread and sophisticated
|
||||
environment for editing LaTeX, TeX, ConTeXt and Texinfo documents with
|
||||
Emacs. Combined with packages like RefTeX, flyspell and others it is
|
||||
pretty much without peer as a comprehensive authoring solution for a
|
||||
large variety of operating system platforms and TeX distributions. It
|
||||
supports document-dependent completion and syntax highlighting, easily
|
||||
accessible menus, jumping to error locations in the source file, a
|
||||
number of editing shortcuts, intelligent indentation and filling of
|
||||
text during entry, and WYSIWYG previews of graphical elements like
|
||||
math formulas right in the Emacs source buffer, by virtue of its
|
||||
preview-latex component.
|
||||
|
||||
One part of the preview-latex subsystem is the central `preview.sty'
|
||||
file that is independently useful for a number of applications and is
|
||||
available in unbundled form from CTAN.[1]
|
||||
|
||||
AUCTeX needs volunteers in particular for non-programming tasks:
|
||||
documentation writing, tutorials, translations, reference material,
|
||||
sleuth work, testing.
|
||||
|
||||
New features and fixed bugs in this release
|
||||
-------------------------------------------
|
||||
|
||||
In math environments 'gather', 'gather*', 'gathered', 'multline'
|
||||
and 'multline*', fill commands such as 'M-q' and 'C-c C-q C-e' are
|
||||
disabled. This sorts out the inconsistency between those and
|
||||
'equation', 'displaymath' environments, in latter of which filling
|
||||
is already disabled.
|
||||
|
||||
If you want filling in such environments, customize
|
||||
'LaTeX-indent-environment-list' to remove them.
|
||||
|
||||
Auto fill continues to work in such environment anyway.
|
||||
|
||||
In addition, AUCTeX adds support of alignment at '&' sign in
|
||||
'align'-like environments such as 'alignat', 'aligned' and so on,
|
||||
as well as 'matrix'-like environments such as 'pmatrix', 'bmatrix'
|
||||
and so on.
|
||||
|
||||
Now two commands 'Texindex' and 'Texi2dvi' are available when you
|
||||
type 'C-c C-c' in Texinfo mode. The command 'Texindex' runs
|
||||
'texindex' on index files and 'Texi2dvi' runs 'pdftexi2dvi' or
|
||||
'texi2dvi' according to the value of 'TeX-PDF-mode'.
|
||||
|
||||
So you can typeset Texinfo documents into PDF or DVI format from
|
||||
within AUCTeX.
|
||||
|
||||
AUCTeX's own help messages for LaTeX errors are now shown only for
|
||||
LaTeX runs. AUCTeX shows raw error/warning messages found in
|
||||
'.log' files for runs of formats other than LaTeX, such as plain
|
||||
TeX, ConTeXt and Texinfo, as it does even for LaTeX runs when it
|
||||
can't find a matching entry in its own help message catalogue.
|
||||
|
||||
Due to this change, customize option 'TeX-error-description-list'
|
||||
can no longer have a fallback entry that matches any error. If
|
||||
your customized value includes such entry, typically '(".*" . "No
|
||||
help available")', please remove it.
|
||||
|
||||
Two functions 'TeX-split-string' and 'TeX-assoc' are now obsolete
|
||||
and will be removed in future release. If your personal code uses
|
||||
these functions, use 'split-string' and 'assoc-string' instead.
|
||||
|
||||
The function 'TeX-read-key-val' now accepts a function call as
|
||||
second argument. This change should help AUCTeX style writers who
|
||||
use 'TeX-arg-key-val' and have to deal with dynamic key-values.
|
||||
Example of usage:
|
||||
(TeX-add-style-hook "foo"
|
||||
(lambda ()
|
||||
(TeX-add-symbols
|
||||
'("bar" (TeX-arg-key-val (function-returning-key-val))))))
|
||||
|
||||
Since AUCTeX 12.2, 'C-x C-w' accidentally disabled the parse on
|
||||
save in that buffer, even when you enabled 'TeX-auto-save' option.
|
||||
This bug was fixed.
|
||||
|
||||
AUCTeX now requires GNU Emacs 24.3 or higher.
|
||||
|
||||
Old implementations for viewers were discarded, as announced long
|
||||
before. The variables 'TeX-output-view-style' and 'TeX-view-style'
|
||||
have no effect now. The former placeholders '%v' and '%vv' in
|
||||
'TeX-command-list' are ignored.
|
||||
|
||||
AUCTeX now uses lexical binding which has been introduced in Emacs
|
||||
24. This change should have no user-visible effect and require no
|
||||
manual adaptions except in the following cases.
|
||||
|
||||
- Entries added to the customization variable 'TeX-expand-list'
|
||||
also had access to variables 'command' and 'pos'. Those are
|
||||
now properly declared and named 'TeX-expand-command' and
|
||||
'TeX-expand-pos'.
|
||||
|
||||
- Entries added to the customization variable 'TeX-expand-list'
|
||||
had access to a variable 'file' which was bound to
|
||||
'TeX-active-master', i.e., it evaluated to either the master
|
||||
or region file. This usage must be replaced with either
|
||||
'TeX-active-master' or 'TeX-active-master-with-quotes'.
|
||||
|
||||
- Viewer entries in 'TeX-view-program-list' also had access to a
|
||||
variable 'file' which was bound to the name of the master or
|
||||
region file without extension. Instead, the function
|
||||
'TeX-active-master' has to be used now.
|
||||
|
||||
- Macro argument parsing functions could set a variable
|
||||
'exit-mark' to the buffer position where point should be left
|
||||
after all arguments have been read. This variable is now
|
||||
named 'TeX-exit-mark'.
|
||||
|
||||
- The functions in 'LaTeX-section-hook' had access or modified
|
||||
the previously undeclared variables 'title', 'name', 'level',
|
||||
'done-mark', and 'toc'. These variables are now properly
|
||||
declared and have the 'LaTeX-' prefix, e.g.,
|
||||
'LaTeX-done-mark'.
|
||||
|
||||
- The functions in 'ConTeXt-numbered-section-hook' and
|
||||
'ConTeXt-unnumbered-section-hook' had access or modified the
|
||||
previously undeclared variables 'title', 'name', 'level',
|
||||
'done-mark', and 'reference'. These variables are now
|
||||
properly declared and have the 'ConTeXt-' prefix, e.g.,
|
||||
'ConTeXt-title'.
|
||||
|
||||
- The functions in 'TeX-translate-location-hook' could access
|
||||
and modify the free variables 'file', 'line', 'error',
|
||||
'offset', 'context', and 'string'. Those are now properly
|
||||
declared variables with the prefix 'TeX-translate-location-',
|
||||
e.g., 'TeX-translate-location-file'.
|
||||
|
||||
The constant 'LaTeX-dialect' has been renamed to 'TeX-dialect' and
|
||||
moved from 'latex.el' to 'tex.el'. 'LaTeX-dialect' now is an
|
||||
obsolete alias.
|
||||
|
||||
The style 'latexinfo.el' is removed from AUCTeX. 'latexinfo.el'
|
||||
was meant to support latexinfo which in return was a LaTeX-2.09
|
||||
extension of Texinfo, but didn't manage to replace Texinfo.
|
||||
|
||||
The style 'siunitx.el' is updated to support package version 3.
|
||||
Key-value options provided by older package versions are removed,
|
||||
deprecated macros and units are not supported anymore.
|
||||
|
||||
AUCTeX has preliminary support for LaTeX-hooks. Hooks provided by
|
||||
LaTeX kernel are known and available for completion in
|
||||
'\AddToHook', '\RemoveFromHook' and '\AddToHookNext'.
|
||||
|
||||
AUCTeX is now able to place all generated output files, including
|
||||
those that are produced by applications running under AUCTeX,
|
||||
temporary files related to region processing and preview-latex
|
||||
files, in an output directory. To use this feature, set the new
|
||||
user option 'TeX-output-dir' to the absolute path of the output
|
||||
directory or a relative path which would be interpreted as being
|
||||
relative to the master file in a multifile document.
|
||||
|
||||
Note that this feature doesn't work if the document includes sub
|
||||
file placed in sub directory below the main file via '\include'
|
||||
command.
|
||||
|
||||
Many other bugs were fixed.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
It is required that you use at least GNU Emacs 24.3.
|
||||
|
||||
The preview-latex subsystem requires image support.
|
||||
|
||||
You'll also need a working LaTeX installation and Ghostscript.
|
||||
dvipng[2] (version 1.4 or later), a very fast DVI converter, can be
|
||||
used to speed up the conversion.
|
||||
|
||||
Availability
|
||||
------------
|
||||
|
||||
The easiest way for getting AUCTeX is installing it with GNU ELPA, see
|
||||
<URL:https://elpa.gnu.org/packages/auctex.html> for more information.
|
||||
Other download options are available at
|
||||
<URL:https://ftp.gnu.org/gnu/auctex/>. At release time, we provide the
|
||||
source tarball. You can also use versions of Emacs that already
|
||||
include AUCTeX or a software package management system for your
|
||||
operating system which provides you with the latest release.
|
||||
|
||||
A separate directory for each release contains some stuff from the
|
||||
tarball, such as ChangeLog, printable manuals, and a reference sheet.
|
||||
The download area is mirrored to the directory support/auctex on CTAN.
|
||||
AUCTeX is licensed under the GNU General Public License version 3.
|
||||
|
||||
You'll find more information at the web site of AUCTeX
|
||||
<URL:https://www.gnu.org/software/auctex/>, including its mailing list
|
||||
addresses.
|
||||
|
||||
Future development and additional information
|
||||
---------------------------------------------
|
||||
|
||||
AUCTeX is proceeding as a GNU project with the long-term intent of
|
||||
merging it into Emacs. For that reason, all new contributors need to
|
||||
assign copyright to their contributions to the FSF (the usual
|
||||
procedure for Emacs contributors). The same holds for past
|
||||
contributors. The principal authors and maintainers have already done
|
||||
so, but it would require a diligent and diplomatic volunteer to find
|
||||
and ask the rest.
|
||||
|
||||
Current AUCTeX managers are Arash Esbati, Mosè Giordano, and Tassilo
|
||||
Horn. Everybody is welcome to contribute to the project by reporting
|
||||
bugs and suggesting improvements, but the most effective way of
|
||||
helping AUCTeX development remains volunteering for tasks.
|
||||
|
||||
The following people contributed to this release series (in
|
||||
alphabetical order): Ivan Andrus, Ralf Angeli, Masayuki Ataka,
|
||||
Mohammad Hossein Bateni, Fabrice Ben Hamouda, Thomas Baumann, Vincent
|
||||
Belaïche, Berend de Boer, Alex Branham, Uwe Brauer, Ken Brown, Joshua
|
||||
Buhl, Jean-François Burnol, Patrice Dumas, Arash Esbati, Werner Fink,
|
||||
Miguel Frasson, Peter S. Galbraith, Mosè Giordano, Andrea Greselin,
|
||||
Patrick Gundlach, Abdul-Lateef Haji-Ali, Jobst Hoffmann, Tassilo Horn,
|
||||
Yvon Hevel, Orlando Iovino, Mads Jensen, Arne Jørgensen, Philip
|
||||
Kaludercic, David Kastrup, Ikumi Keita, Philip Kime, Oleh Krehel,
|
||||
Joost Kremers, Frank Küster, Jan-Åke Larsson, Matthew Leach, Brian
|
||||
Leung, Antoine Levitt, Leo Liu, Vladimir Lomov, Stefan Monnier, Dan
|
||||
Nicolaescu, Piet van Oostrum, Pieter Pareit, Nicolas Richard, Augusto
|
||||
Ritter Stoffel, Florent Rougon, Santiago Saavedra, Davide
|
||||
G. M. Salvetti, Rüdiger Sonderfeld, Holger Sparr, Mike Sperber, Reiner
|
||||
Steib, Christian Schlauer, Shiro Takeda, Mark Trettin (Please accept
|
||||
our apologies if we forgot somebody.)
|
||||
|
||||
Footnotes:
|
||||
|
||||
[1] <URL:https://www.ctan.org/pkg/preview>
|
||||
|
||||
[2] dvipng is available via its project page
|
||||
<URL:https://savannah.nongnu.org/projects/dvipng> and from CTAN.
|
|
@ -1,2 +0,0 @@
|
|||
;; Generated package description from auctex.el -*- no-byte-compile: t -*-
|
||||
(define-package "auctex" "13.1.5" "Integrated environment for *TeX*" '((emacs "25.1")) :commit "c569c7d486624ac7a5bb924ca92c41e80a58091f" :maintainer '(nil . "auctex-devel@gnu.org") :keywords '("tex" "latex" "texinfo" "context" "doctex" "preview-latex") :url "https://www.gnu.org/software/auctex/")
|
|
@ -1,97 +0,0 @@
|
|||
;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.094) -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2014, 2017, 2018, 2020 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Arash Esbati <arash@gnu.org>
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
;; Created: 2014-10-30
|
||||
;; 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 `XCharter.sty' (v1.094) from 2017/08/08.
|
||||
;; `XCharter.sty' is part of TeXLive.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tex)
|
||||
|
||||
;; Silence the compiler:
|
||||
(declare-function font-latex-add-keywords
|
||||
"font-latex"
|
||||
(keywords class))
|
||||
|
||||
(TeX-add-style-hook
|
||||
"XCharter"
|
||||
(lambda ()
|
||||
|
||||
;; Run style hook for various packages loaded by XCharter
|
||||
(TeX-run-style-hooks "textcomp" "fontaxes")
|
||||
|
||||
;; New symbols
|
||||
(TeX-add-symbols
|
||||
|
||||
;; Only preamble commands
|
||||
'("useosf" 0)
|
||||
'("useosfI" 0)
|
||||
|
||||
;; Text commands
|
||||
'("textsu" t) ; superior figures
|
||||
'("sustyle" -1) ;
|
||||
'("textin" t) ; inferior figures
|
||||
'("instyle" -1) ;
|
||||
'("textlf" t) ; lining figures
|
||||
'("lfstyle" -1) ;
|
||||
'("textosf" t) ; oldstyle figures
|
||||
'("textosfI" t) ; oldstyle figures alternate
|
||||
'("osfstyle" -1) ; whatever oldstyle option is in force
|
||||
'("textnumerator" t) ; numerators
|
||||
'("textnu" t) ;
|
||||
'("textdenominator" t) ; denominators
|
||||
'("textde" t) ;
|
||||
'("textfrac" 2))
|
||||
|
||||
;; Fontification
|
||||
(when (and (featurep 'font-latex)
|
||||
(eq TeX-install-font-lock 'font-latex-setup))
|
||||
(font-latex-add-keywords '(("textsu" "{")
|
||||
("textin" "{")
|
||||
("textlf" "{")
|
||||
("textosf" "{")
|
||||
("textosfI" "{")
|
||||
("textnumerator" "{")
|
||||
("textnu" "{")
|
||||
("textdenominator" "{")
|
||||
("textde" "{")
|
||||
("textfrac" "{{"))
|
||||
'type-command)
|
||||
(font-latex-add-keywords '(("sustyle" "")
|
||||
("instyle" "")
|
||||
("lfstyle" "")
|
||||
("osfstyle" ""))
|
||||
'type-declaration)))
|
||||
TeX-dialect)
|
||||
|
||||
(defvar LaTeX-XCharter-package-options
|
||||
'("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI"
|
||||
"scaled" "sups" "scosf")
|
||||
"Package options for the XCharter package.")
|
||||
|
||||
;;; XCharter.el ends here
|
|
@ -1,201 +0,0 @@
|
|||
;;; amsthm.el --- Style hook for the AMS-LaTeX amsthm package. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1997, 2013--2015, 2018, 2020 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
|
||||
;; 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:
|
||||
|
||||
;; The style provides the function `LaTeX-amsthm-env-label' which
|
||||
;; enables new defined environments with "\newtheoreom" to interact
|
||||
;; with AUCTeX and RefTeX mechanisms for inserting labels. Check
|
||||
;; docstring of `LaTeX-amsthm-env-label' for instructions.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tex)
|
||||
(require 'latex)
|
||||
|
||||
;; Silence the compiler:
|
||||
(declare-function font-latex-add-keywords
|
||||
"font-latex"
|
||||
(keywords class))
|
||||
|
||||
(defvar LaTeX-amsthm-package-options nil
|
||||
"Package options for the amsthm package.")
|
||||
|
||||
(defvar LaTeX-amsthm-fontdecl
|
||||
'(;; family
|
||||
"rmfamily" "sffamily" "ttfamily"
|
||||
;; series
|
||||
"mdseries" "bfseries"
|
||||
;; shape
|
||||
"upshape" "itshape" "slshape" "scshape"
|
||||
;; size
|
||||
"tiny" "scriptsize" "footnotesize"
|
||||
"small" "normalsize" "large"
|
||||
"Large" "LARGE" "huge" "Huge"
|
||||
;; reset macro
|
||||
"normalfont")
|
||||
"List of font declaration commands for \"\\newtheoremstyle\".")
|
||||
|
||||
(defun LaTeX-arg-amsthm-fontdecl (optional &optional prompt)
|
||||
"Prompt for font declaration commands in \"\\newtheoremstyle\".
|
||||
If OPTIONAL is non-nil, insert the resulting value as an optional
|
||||
argument. Use PROMPT as the prompt string."
|
||||
(let* ((crm-separator (regexp-quote TeX-esc))
|
||||
(fontdecl (mapconcat #'identity
|
||||
(TeX-completing-read-multiple
|
||||
(TeX-argument-prompt optional prompt "Font: \\" t)
|
||||
LaTeX-amsthm-fontdecl)
|
||||
TeX-esc)))
|
||||
(TeX-argument-insert fontdecl
|
||||
optional
|
||||
(when (and fontdecl (not (string= fontdecl "")))
|
||||
TeX-esc))))
|
||||
|
||||
(defun LaTeX-amsthm-env-label (environment)
|
||||
"Insert ENVIRONMENT, query for an optional argument and prompt
|
||||
for label. AUCTeX users should add ENVIRONMENT to
|
||||
`LaTeX-label-alist' via customize or in init-file with:
|
||||
|
||||
(add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
|
||||
|
||||
RefTeX users should customize or add ENVIRONMENT to
|
||||
`LaTeX-label-alist' and `reftex-label-alist', for example
|
||||
|
||||
(add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
|
||||
(add-to-list \\='reftex-label-alist
|
||||
\\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
|
||||
nil (\"Lemma\" \"lemma\") nil))"
|
||||
(let ((opthead (TeX-read-string
|
||||
(TeX-argument-prompt t nil "Heading"))))
|
||||
(LaTeX-insert-environment environment
|
||||
(when (and opthead
|
||||
(not (string= opthead "")))
|
||||
(format "[%s]" opthead))))
|
||||
(when (LaTeX-label environment 'environment)
|
||||
(LaTeX-newline)
|
||||
(indent-according-to-mode)))
|
||||
|
||||
;; Setup parsing for \newtheorem
|
||||
(TeX-auto-add-type "amsthm-newtheorem" "LaTeX")
|
||||
|
||||
;; Setup parsing for \newtheoremstyle
|
||||
(TeX-auto-add-type "amsthm-newtheoremstyle" "LaTeX")
|
||||
|
||||
(defun LaTeX-amsthm-auto-prepare ()
|
||||
"Clear `LaTeX-auto-amsthm-newtheorem' and
|
||||
`LaTeX-auto-amsthm-newtheoremstyle' before parsing."
|
||||
(setq LaTeX-auto-amsthm-newtheorem nil)
|
||||
(setq LaTeX-auto-amsthm-newtheoremstyle nil))
|
||||
|
||||
(defun LaTeX-amsthm-auto-cleanup ()
|
||||
"Move parsed results from `LaTeX-auto-amsthm-newtheorem' and
|
||||
make them available as new environments."
|
||||
(dolist (newthm (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
|
||||
(LaTeX-add-environments (list newthm #'LaTeX-amsthm-env-label))))
|
||||
|
||||
(add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-prepare t)
|
||||
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-amsthm-auto-cleanup t)
|
||||
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
|
||||
|
||||
(TeX-add-style-hook
|
||||
"amsthm"
|
||||
(lambda ()
|
||||
;; Add the pre-defined styles:
|
||||
(LaTeX-add-amsthm-newtheoremstyles "definition"
|
||||
"plain"
|
||||
"remark")
|
||||
|
||||
(LaTeX-add-environments
|
||||
'("proof" LaTeX-amsthm-env-label))
|
||||
|
||||
(TeX-add-symbols
|
||||
;; Overrule the defintion in `latex.el':
|
||||
'("newtheorem"
|
||||
(TeX-arg-eval
|
||||
(lambda ()
|
||||
(let ((nthm (TeX-read-string
|
||||
(TeX-argument-prompt nil nil "Environment"))))
|
||||
(LaTeX-add-amsthm-newtheorems nthm)
|
||||
(LaTeX-add-environments (list nthm #'LaTeX-amsthm-env-label))
|
||||
(format "%s" nthm))))
|
||||
[ TeX-arg-environment "Numbered like" ]
|
||||
t [ (TeX-arg-eval progn (if (eq (save-excursion
|
||||
(backward-char 2)
|
||||
(preceding-char)) ?\])
|
||||
()
|
||||
(TeX-arg-counter t "Within counter"))
|
||||
"") ])
|
||||
|
||||
'("newtheorem*"
|
||||
(TeX-arg-eval
|
||||
(lambda ()
|
||||
(let ((nthm (TeX-read-string
|
||||
(TeX-argument-prompt nil nil "Environment")))
|
||||
(heading (TeX-read-string
|
||||
(TeX-argument-prompt nil nil "Heading"))))
|
||||
(LaTeX-add-amsthm-newtheorems nthm)
|
||||
(LaTeX-add-environments (list nthm #'LaTeX-amsthm-env-label))
|
||||
(insert (concat TeX-grop nthm TeX-grcl))
|
||||
(format "%s" heading)))))
|
||||
|
||||
'("theoremstyle"
|
||||
(TeX-arg-eval completing-read
|
||||
(TeX-argument-prompt nil nil "Style")
|
||||
(LaTeX-amsthm-newtheoremstyle-list)))
|
||||
"qedhere"
|
||||
"swapnumbers"
|
||||
|
||||
'("newtheoremstyle"
|
||||
(TeX-arg-eval
|
||||
(lambda ()
|
||||
(let ((nthmstyle (TeX-read-string
|
||||
(TeX-argument-prompt nil nil "Style name"))))
|
||||
(LaTeX-add-amsthm-newtheoremstyles nthmstyle)
|
||||
(format "%s" nthmstyle))))
|
||||
(TeX-arg-length "Space above")
|
||||
(TeX-arg-length "Space below")
|
||||
(LaTeX-arg-amsthm-fontdecl "Body font: \\")
|
||||
"Indent amount"
|
||||
(LaTeX-arg-amsthm-fontdecl "Theorem head font: \\")
|
||||
"Punctuation after head"
|
||||
(TeX-arg-length "Space after head")
|
||||
"Theorem head spec"))
|
||||
|
||||
(TeX-auto-add-regexp
|
||||
`(,(concat "\\\\newtheorem\\*?{\\(" TeX-token-char "+\\)}")
|
||||
1 LaTeX-auto-amsthm-newtheorem))
|
||||
(TeX-auto-add-regexp
|
||||
`(,(concat "\\\\newtheoremstyle{\\(" TeX-token-char "+\\)}")
|
||||
1 LaTeX-auto-amsthm-newtheoremstyle))
|
||||
|
||||
;; Fontification
|
||||
(when (and (featurep 'font-latex)
|
||||
(eq TeX-install-font-lock 'font-latex-setup))
|
||||
(font-latex-add-keywords '(("newtheorem" "*{[{[")
|
||||
("theoremstyle" "{")
|
||||
("newtheoremstyle" "{{{{{{{{{"))
|
||||
'function)))
|
||||
TeX-dialect)
|
||||
|
||||
;;; amsthm.el ends here
|
|
@ -1,381 +0,0 @@
|
|||
;;; beamer.el --- AUCTeX style for the latex-beamer class -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Thomas Baumann <thomas.baumann@ch.tum.de>
|
||||
;; Created: 2003-12-20
|
||||
;; 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 the latex-beamer class.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tex)
|
||||
(require 'latex)
|
||||
|
||||
;; Silence the compiler:
|
||||
(declare-function font-latex-add-keywords
|
||||
"font-latex"
|
||||
(keywords class))
|
||||
|
||||
(defun LaTeX-beamer-after-insert-env (env start _end)
|
||||
"Do beamer-specific stuff after the insertion of an environment."
|
||||
;; Add `fragile' as an optional argument to the frame environment if
|
||||
;; a verbatim environment is inserted.
|
||||
(when (and (TeX-member env (LaTeX-verbatim-environments) #'string-equal)
|
||||
(save-excursion
|
||||
(goto-char start)
|
||||
(string-equal (LaTeX-current-environment) "frame")))
|
||||
(save-excursion
|
||||
(when (re-search-backward "\\\\begin[ \t]*{frame}" nil t)
|
||||
(let ((end-of-begin (match-end 0)))
|
||||
(goto-char end-of-begin)
|
||||
(while (forward-comment 1))
|
||||
(if (eq (char-after) (string-to-char LaTeX-optop))
|
||||
(progn
|
||||
(forward-char)
|
||||
(insert "fragile")
|
||||
(unless (looking-at (concat "[ \t]*" LaTeX-optcl))
|
||||
(insert ",")))
|
||||
(goto-char end-of-begin)
|
||||
(insert "[fragile]")))))))
|
||||
|
||||
(defvar LaTeX-beamer-frametitle-history nil
|
||||
"History of frame titles in beamer.")
|
||||
|
||||
(TeX-add-style-hook
|
||||
"beamer"
|
||||
(lambda ()
|
||||
(add-hook 'LaTeX-after-insert-env-hook #'LaTeX-beamer-after-insert-env nil t)
|
||||
|
||||
(TeX-run-style-hooks "amsmath" "amssymb" "amsthm" "color" "geometry"
|
||||
"hyperref" "inputenc" "translator" "xcolor")
|
||||
|
||||
(unless LaTeX-beamer-section-labels-flag
|
||||
(make-local-variable 'LaTeX-section-hook)
|
||||
(setq LaTeX-section-hook
|
||||
'(LaTeX-section-heading
|
||||
LaTeX-section-title
|
||||
LaTeX-section-section)))
|
||||
|
||||
(setq LaTeX-item-list
|
||||
(append '(("itemize" . LaTeX-item-beamer)
|
||||
("enumerate" . LaTeX-item-beamer))
|
||||
LaTeX-item-list))
|
||||
|
||||
(setq LaTeX-default-document-environment "frame")
|
||||
|
||||
(LaTeX-paragraph-commands-add-locally "frametitle")
|
||||
|
||||
(TeX-add-symbols
|
||||
'("alert" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("alt" [ TeX-arg-beamer-overlay-spec ] 2)
|
||||
'("beamerbutton" 1)
|
||||
'("beamergotobutton" 1)
|
||||
'("beamerreturnbutton" 1)
|
||||
'("beamerskipbutton" 1)
|
||||
'("frame" TeX-arg-beamer-frametitle)
|
||||
'("frametitle"
|
||||
(TeX-arg-eval TeX-read-string "Title: " nil 'LaTeX-beamer-frametitle-history))
|
||||
'("hyperlink" [ TeX-arg-beamer-overlay-spec ] 2)
|
||||
'("hyperlinkslideprev" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkslidenext" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkframestart" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkframeend" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkframestartnext" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkframeendprev" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkpresentationstart" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkpresentationend" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkappendixstart" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkappendixend" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkdocumentstart" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hyperlinkdocumentend" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("hypertarget" [ TeX-arg-beamer-overlay-spec ] 2)
|
||||
'("institute" 1)
|
||||
'("invisible" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("label" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("logo" 1)
|
||||
'("note" TeX-arg-beamer-note 1)
|
||||
'("only" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("onslide" [ TeX-arg-beamer-overlay-spec ])
|
||||
'("partpage")
|
||||
'("pause" ["Slide number"])
|
||||
'("structure" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("temporal" [ TeX-arg-beamer-overlay-spec ] 3)
|
||||
'("titlepage")
|
||||
'("titlegraphic" 1)
|
||||
'("uncover" [ TeX-arg-beamer-overlay-spec ] 1)
|
||||
'("usetheme" LaTeX-arg-beamer-theme)
|
||||
'("useinnertheme" LaTeX-arg-beamer-inner-theme)
|
||||
'("useoutertheme" LaTeX-arg-beamer-outer-theme)
|
||||
'("usecolortheme" LaTeX-arg-beamer-color-theme)
|
||||
'("usefonttheme" LaTeX-arg-beamer-font-theme)
|
||||
'("usetheme" LaTeX-arg-beamer-theme)
|
||||
'("visible" [ TeX-arg-beamer-overlay-spec ] 1))
|
||||
|
||||
(LaTeX-add-environments
|
||||
'("actionenv")
|
||||
'("alertblock" 1)
|
||||
'("beamerboxesrounded" 1)
|
||||
'("block" (lambda (env &rest ignore)
|
||||
(LaTeX-insert-environment
|
||||
env (format "{%s}" (TeX-read-string "Title: ")))))
|
||||
'("column" "Width")
|
||||
"columns"
|
||||
"columnsonlytextwidth"
|
||||
'("exampleblock" 1)
|
||||
'("frame" (lambda (env &rest ignore)
|
||||
(let ((title (TeX-read-string "(Optional) Title: " nil
|
||||
'LaTeX-beamer-frametitle-history)))
|
||||
(LaTeX-insert-environment env)
|
||||
(unless (zerop (length title))
|
||||
(save-excursion
|
||||
(LaTeX-find-matching-begin)
|
||||
(end-of-line)
|
||||
(LaTeX-newline)
|
||||
;; Indent the next macro insertion and don't
|
||||
;; rely on the fill-function to do it:
|
||||
(indent-according-to-mode)
|
||||
(insert (format "\\frametitle{%s}" title))
|
||||
;; This works because \frametitle is a
|
||||
;; paragraph command.
|
||||
(when auto-fill-function
|
||||
(backward-char)
|
||||
(LaTeX-fill-paragraph)))))))
|
||||
'("onlyenv" (lambda (env &rest ignore)
|
||||
(LaTeX-insert-environment
|
||||
env
|
||||
(let ((overlay (TeX-read-string "(Optional) Overlay: ")))
|
||||
(unless (zerop (length overlay))
|
||||
(format "<%s>" overlay))))))
|
||||
'("overlayarea" "Area width" "Area height")
|
||||
'("overprint" (lambda (env &rest ignore)
|
||||
(LaTeX-insert-environment
|
||||
env
|
||||
(let ((width (TeX-read-string "(Optional) Area width: ")))
|
||||
(unless (zerop (length width))
|
||||
(format "[%s]" width))))))
|
||||
"semiverbatim")
|
||||
|
||||
(LaTeX-largest-level-set "section")
|
||||
(LaTeX-add-counters "lecture" "part" "section" "subsection" "subsubsection"
|
||||
"subsectionslide" "framenumber" "figure" "table"
|
||||
"beamerpauses")
|
||||
(LaTeX-add-pagestyles "navigation")
|
||||
(add-to-list (make-local-variable 'LaTeX-indent-environment-list)
|
||||
'("semiverbatim" current-indentation) t)
|
||||
(add-to-list 'LaTeX-verbatim-environments-local "semiverbatim")
|
||||
|
||||
;; Fontification
|
||||
(when (and (featurep 'font-latex)
|
||||
(eq TeX-install-font-lock 'font-latex-setup))
|
||||
(font-latex-add-keywords '(("title" "[{")
|
||||
("subtitle" "[{")
|
||||
("author" "[{")
|
||||
("date" "[{")
|
||||
("frametitle" "<[{")) 'slide-title)))
|
||||
TeX-dialect)
|
||||
|
||||
(defun TeX-arg-beamer-overlay-spec (optional &optional prompt)
|
||||
"Prompt for overlay specification.
|
||||
If OPTIONAL is non-nil, insert the specification only if
|
||||
non-empty and enclosed in \"<>\". PROMPT replaces the standard
|
||||
one."
|
||||
(let ((TeX-arg-opening-brace "<")
|
||||
(TeX-arg-closing-brace ">"))
|
||||
(TeX-argument-insert
|
||||
(TeX-read-string
|
||||
(TeX-argument-prompt optional prompt "Overlay"))
|
||||
optional)
|
||||
(indent-according-to-mode)))
|
||||
|
||||
(defun TeX-arg-beamer-frametitle (_optional &optional _prompt)
|
||||
"Prompt for the frametitle."
|
||||
(let ((title (TeX-read-string "Title: " nil 'LaTeX-beamer-frametitle-history)))
|
||||
(if (not (zerop (length title)))
|
||||
(insert TeX-grop TeX-esc "frametitle" TeX-grop
|
||||
title TeX-grcl TeX-grcl)
|
||||
(insert TeX-grop TeX-grcl))))
|
||||
|
||||
(defun LaTeX-item-beamer ()
|
||||
"Insert a new item with an optional overlay argument. You
|
||||
can turn off the prompt for the overlay argument by setting
|
||||
`LaTeX-beamer-item-overlay-flag' to nil. Calling the function
|
||||
with a prefix argument prompts for the overlay specification
|
||||
unconditionally."
|
||||
(if (listp current-prefix-arg)
|
||||
(setq current-prefix-arg (car current-prefix-arg))
|
||||
current-prefix-arg)
|
||||
(TeX-insert-macro "item")
|
||||
(delete-horizontal-space)
|
||||
(if (or current-prefix-arg LaTeX-beamer-item-overlay-flag)
|
||||
(TeX-arg-beamer-overlay-spec 0))
|
||||
(insert " ")
|
||||
(indent-according-to-mode))
|
||||
|
||||
(defun TeX-arg-beamer-note (_optional &optional _prompt)
|
||||
"Prompt for overlay specification and optional argument."
|
||||
(let ((overlay (TeX-read-string "(Optional) Overlay: "))
|
||||
(options (TeX-read-string "(Optional) Options: ")))
|
||||
(unless (zerop (length overlay))
|
||||
(insert "<" overlay ">"))
|
||||
(unless (zerop (length options))
|
||||
(insert "[" options "]"))
|
||||
(indent-according-to-mode)))
|
||||
|
||||
(defun LaTeX-beamer-search-themes (&optional regexp extensions length)
|
||||
"Search for beamer themes matching REGEXP with EXTENSIONS.
|
||||
The function removes the first LENGTH characters and the
|
||||
extension of the file and returns a list of strings. LENGTH may
|
||||
also be a string. Then the length of the string is used."
|
||||
(let* ((match (or regexp "^beamertheme[A-Z]"))
|
||||
(exts (or extensions '("tex" "sty")))
|
||||
(chars (cond ((integerp length)
|
||||
length)
|
||||
((stringp length)
|
||||
(string-width length))
|
||||
;; Try some DWIM magic...
|
||||
((and (not length)
|
||||
(string-match "beamer[A-Za-z0-9]*theme" match))
|
||||
(- (match-end 0) (match-beginning 0)))
|
||||
(t (error "Invalid length: `%s'" length)))))
|
||||
;; (message "match=`%s' chars=`%s'" match chars)
|
||||
(TeX-delete-duplicate-strings
|
||||
(delete nil
|
||||
(mapcar
|
||||
(lambda (file)
|
||||
(let ((case-fold-search nil))
|
||||
(and (numberp (string-match match file))
|
||||
(substring file chars))))
|
||||
(TeX-search-files nil exts t t))))))
|
||||
|
||||
(defun LaTeX-arg-beamer-theme (&rest _ignore)
|
||||
"Prompt for beamer theme with completion."
|
||||
(TeX-argument-insert
|
||||
(completing-read
|
||||
(TeX-argument-prompt nil nil "Theme")
|
||||
(mapcar #'list
|
||||
(cond ((eq LaTeX-beamer-themes 'local)
|
||||
(set (make-local-variable 'LaTeX-beamer-themes)
|
||||
(LaTeX-beamer-search-themes)))
|
||||
((functionp LaTeX-beamer-themes)
|
||||
(funcall LaTeX-beamer-themes))
|
||||
((listp LaTeX-beamer-themes)
|
||||
LaTeX-beamer-themes)
|
||||
(t (error
|
||||
"`LaTeX-beamer-themes' should be a list: `%s'"
|
||||
LaTeX-beamer-themes))))
|
||||
nil nil nil)
|
||||
t))
|
||||
|
||||
(defun LaTeX-arg-beamer-inner-theme (&rest _ignore)
|
||||
"Prompt for beamer inner theme with completion."
|
||||
(TeX-argument-insert
|
||||
(completing-read
|
||||
(TeX-argument-prompt nil nil "Theme")
|
||||
(mapcar #'list
|
||||
(cond ((eq LaTeX-beamer-inner-themes 'local)
|
||||
(set (make-local-variable 'LaTeX-beamer-inner-themes)
|
||||
(LaTeX-beamer-search-themes "^beamerinnertheme")))
|
||||
((functionp LaTeX-beamer-inner-themes)
|
||||
(funcall LaTeX-beamer-inner-themes))
|
||||
((listp LaTeX-beamer-inner-themes)
|
||||
LaTeX-beamer-inner-themes)
|
||||
(t (error
|
||||
"`LaTeX-beamer-inner-themes' should be a list: `%s'"
|
||||
LaTeX-beamer-inner-themes))))
|
||||
nil nil nil)
|
||||
t))
|
||||
|
||||
(defun LaTeX-arg-beamer-outer-theme (&rest _ignore)
|
||||
"Prompt for beamer outer theme with completion."
|
||||
(TeX-argument-insert
|
||||
(completing-read
|
||||
(TeX-argument-prompt nil nil "Theme")
|
||||
(mapcar #'list
|
||||
(cond ((eq LaTeX-beamer-outer-themes 'local)
|
||||
(set (make-local-variable 'LaTeX-beamer-outer-themes)
|
||||
(LaTeX-beamer-search-themes "^beameroutertheme")))
|
||||
((functionp LaTeX-beamer-outer-themes)
|
||||
(funcall LaTeX-beamer-outer-themes))
|
||||
((listp LaTeX-beamer-outer-themes)
|
||||
LaTeX-beamer-outer-themes)
|
||||
(t (error
|
||||
"`LaTeX-beamer-outer-themes' should be a list: `%s'"
|
||||
LaTeX-beamer-outer-themes))))
|
||||
nil nil nil)
|
||||
t))
|
||||
|
||||
(defun LaTeX-arg-beamer-color-theme (&rest _ignore)
|
||||
"Prompt for beamer color theme with completion."
|
||||
(TeX-argument-insert
|
||||
(completing-read
|
||||
(TeX-argument-prompt nil nil "Theme")
|
||||
(mapcar #'list
|
||||
(cond ((eq LaTeX-beamer-color-themes 'local)
|
||||
(set (make-local-variable 'LaTeX-beamer-color-themes)
|
||||
(LaTeX-beamer-search-themes "^beamercolortheme")))
|
||||
((functionp LaTeX-beamer-color-themes)
|
||||
(funcall LaTeX-beamer-color-themes))
|
||||
((listp LaTeX-beamer-color-themes)
|
||||
LaTeX-beamer-color-themes)
|
||||
(t (error
|
||||
"`LaTeX-beamer-color-themes' should be a list: `%s'"
|
||||
LaTeX-beamer-color-themes))))
|
||||
nil nil nil)
|
||||
t))
|
||||
|
||||
(defun LaTeX-arg-beamer-font-theme (&rest _ignore)
|
||||
"Prompt for beamer font theme with completion."
|
||||
(TeX-argument-insert
|
||||
(completing-read
|
||||
(TeX-argument-prompt nil nil "Theme")
|
||||
(mapcar #'list
|
||||
(cond ((eq LaTeX-beamer-font-themes 'local)
|
||||
(set (make-local-variable 'LaTeX-beamer-font-themes)
|
||||
(LaTeX-beamer-search-themes "^beamerfonttheme")))
|
||||
((functionp LaTeX-beamer-font-themes)
|
||||
(funcall LaTeX-beamer-font-themes))
|
||||
((listp LaTeX-beamer-font-themes)
|
||||
LaTeX-beamer-font-themes)
|
||||
(t (error
|
||||
"`LaTeX-beamer-font-themes' should be a list: `%s'"
|
||||
LaTeX-beamer-font-themes))))
|
||||
nil nil nil)
|
||||
t))
|
||||
|
||||
(defun LaTeX-beamer-class-options ()
|
||||
"Read the beamer class options from the user."
|
||||
(TeX-load-style "hyperref")
|
||||
(TeX-read-key-val t '(("usepdftitle" ("false")) ("envcountsect")
|
||||
("notheorems") ("noamsthm") ("compress") ("t") ("c")
|
||||
("leqno") ("fleqn") ("handout") ("trans") ("pdftex")
|
||||
("nativepdf") ("pdfmark") ("dvips") ("dviwindo")
|
||||
("dvipsone") ("vtex") ("ps2pdf") ("ignorenonframetext")
|
||||
("noamssymb") ("bigger") ("smaller") ("8pt") ("9pt")
|
||||
("10pt") ("11pt") ("12pt") ("14pt") ("17pt") ("20pt")
|
||||
("draft") ("CJK") ("cjk") ("pgf")
|
||||
("hyperref" LaTeX-hyperref-package-options-list)
|
||||
("color") ("xcolor") ("ucs") ("utf8x") ("utf8")
|
||||
("aspectratio" ("1610" "169" "149" "54" "43" "32")))))
|
||||
|
||||
;;; beamer.el ends here
|
|
@ -1,63 +0,0 @@
|
|||
;;; expl3.el --- AUCTeX style for `expl3.sty' -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2015, 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Tassilo Horn <tsdh@gnu.org>
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
;; Created: 2015-02-22
|
||||
;; 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 `expl3.sty'.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tex)
|
||||
(require 'latex)
|
||||
|
||||
(defvar font-latex-match-simple-include-list)
|
||||
|
||||
(defvar LaTeX-expl3-syntax-table
|
||||
(let ((st (copy-syntax-table LaTeX-mode-syntax-table)))
|
||||
;; Make _ and : symbol chars
|
||||
(modify-syntax-entry ?\_ "_" st)
|
||||
(modify-syntax-entry ?\: "_" st)
|
||||
st))
|
||||
|
||||
(TeX-add-style-hook
|
||||
"expl3"
|
||||
(lambda ()
|
||||
(set-syntax-table LaTeX-expl3-syntax-table)
|
||||
(when (and (eq TeX-install-font-lock 'font-latex-setup))
|
||||
;; Fontify _ and : as part of macros.
|
||||
(add-to-list 'font-latex-match-simple-include-list "_" t)
|
||||
(add-to-list 'font-latex-match-simple-include-list ":" t)))
|
||||
TeX-dialect)
|
||||
|
||||
(defun LaTeX-expl3-package-options ()
|
||||
"Read the expl3 package options from the user."
|
||||
(TeX-read-key-val t '(("check-declarations" ("true" "false"))
|
||||
("log-functions" ("true" "false"))
|
||||
("driver" ("auto" "latex2e"
|
||||
"dvips" "dvipdfmx"
|
||||
"pdfmode" "xdvipdfmx")))))
|
||||
|
||||
;;; expl3.el ends here
|
|
@ -1,237 +0,0 @@
|
|||
;;; hologo.el --- AUCTeX style for `hologo.sty' (v1.10) -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Arash Esbati <arash@gnu.org>
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
;; Created: 2015-10-31
|
||||
;; 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 `hologo.sty' (v1.10) from 2012/04/26.
|
||||
;; `hologo.sty' is part of TeXLive.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tex)
|
||||
|
||||
;; Silence the compiler:
|
||||
(declare-function font-latex-add-keywords
|
||||
"font-latex"
|
||||
(keywords class))
|
||||
|
||||
(defvar LaTeX-hologo-logo-names
|
||||
'("(La)TeX"
|
||||
"AmSLaTeX"
|
||||
"AmSTeX"
|
||||
"biber"
|
||||
"BibTeX"
|
||||
"BibTeX8"
|
||||
"ConTeXt"
|
||||
"emTeX"
|
||||
"eTeX"
|
||||
"ExTeX"
|
||||
"HanTheThanh"
|
||||
"iniTeX"
|
||||
"KOMAScript"
|
||||
"La"
|
||||
"LaTeX"
|
||||
"LaTeX2e"
|
||||
"LaTeX3"
|
||||
"LaTeXe"
|
||||
"LaTeXML"
|
||||
"LaTeXTeX"
|
||||
"LuaLaTeX"
|
||||
"LuaTeX"
|
||||
"LyX"
|
||||
"METAFONT"
|
||||
"MetaFun"
|
||||
"METAPOST"
|
||||
"MetaPost"
|
||||
"MiKTeX"
|
||||
"NTS"
|
||||
"OzMF"
|
||||
"OzMP"
|
||||
"OzTeX"
|
||||
"OzTtH"
|
||||
"PCTeX"
|
||||
"pdfTeX"
|
||||
"pdfLaTeX"
|
||||
"PiC"
|
||||
"PiCTeX"
|
||||
"plainTeX"
|
||||
"SageTeX"
|
||||
"SLiTeX"
|
||||
"SliTeX"
|
||||
"teTeX"
|
||||
"TeX"
|
||||
"TeX4ht"
|
||||
"TTH"
|
||||
"virTeX"
|
||||
"VTeX"
|
||||
"Xe"
|
||||
"XeLaTeX"
|
||||
"XeTeX")
|
||||
"List of logos provided by \"hologo.sty\".")
|
||||
|
||||
(defvar LaTeX-hologo-key-val-options-global
|
||||
'(("break" ("true" "false"))
|
||||
("hyphenbreak" ("true" "false"))
|
||||
("spacebreak" ("true" "false"))
|
||||
("discretionarybreak" ("true" "false")))
|
||||
"Global key=value options for hologo macros.")
|
||||
|
||||
(defvar LaTeX-hologo-key-val-options-local
|
||||
'(("variant" ("sf" "sc" ; BibTeX
|
||||
"lift" ; SliTeX
|
||||
"narrow" "simple" ; SliTeX, ConTeXt
|
||||
"space" "hyphen" "runtogether"))) ; plainTeX
|
||||
"Local key=value options for hologo macros.")
|
||||
|
||||
(defun LaTeX-hologo--arg-use-region-or-query-logo-name (optional)
|
||||
(if (and (use-region-p)
|
||||
(member (buffer-substring (region-beginning) (region-end))
|
||||
LaTeX-hologo-logo-names))
|
||||
(progn
|
||||
(insert TeX-grop)
|
||||
(goto-char (region-end))
|
||||
(insert TeX-grcl))
|
||||
(TeX-argument-insert
|
||||
(completing-read "Logo name: " LaTeX-hologo-logo-names)
|
||||
optional)))
|
||||
|
||||
(TeX-add-style-hook
|
||||
"hologo"
|
||||
(lambda ()
|
||||
(TeX-add-symbols
|
||||
|
||||
;; Insert logo macros
|
||||
'("hologo" LaTeX-hologo--arg-use-region-or-query-logo-name)
|
||||
'("Hologo" LaTeX-hologo--arg-use-region-or-query-logo-name)
|
||||
|
||||
;; Setup macros
|
||||
'("hologoSetup" (TeX-arg-key-val LaTeX-hologo-key-val-options-global))
|
||||
|
||||
'("hologoLogoSetup"
|
||||
(TeX-arg-eval
|
||||
(lambda ()
|
||||
(let* ((logo (completing-read "Logo name: " LaTeX-hologo-logo-names))
|
||||
(keyval (TeX-read-key-val
|
||||
nil
|
||||
(cond ((string= logo "BibTeX")
|
||||
(append '(("variant" ("sf" "sc")))
|
||||
LaTeX-hologo-key-val-options-global))
|
||||
((string= logo "ConTeXt")
|
||||
(append '(("variant" ("narrow" "simple")))
|
||||
LaTeX-hologo-key-val-options-global))
|
||||
((string= logo "plainTeX")
|
||||
(append '(("variant" ("space" "hyphen" "runtogether")))
|
||||
LaTeX-hologo-key-val-options-global))
|
||||
((or (string= logo "SLiTeX")
|
||||
(string= logo "SliTeX"))
|
||||
(append '(("variant" ("lift" "narrow" "lift")))
|
||||
LaTeX-hologo-key-val-options-global))
|
||||
(t
|
||||
LaTeX-hologo-key-val-options-global)))))
|
||||
(TeX-argument-insert logo nil)
|
||||
(format "%s" keyval)))))
|
||||
|
||||
'("hologoDriverSetup" (TeX-arg-eval completing-read
|
||||
"Driver: "
|
||||
'("pdftex" "luatex"
|
||||
"dvipdfm" "dvipdfmx"
|
||||
"dvips" "dvipsone" "xdvi"
|
||||
"xetex" "vtex" "driverfallback")))
|
||||
|
||||
'("hologoFontSetup"
|
||||
(TeX-arg-key-val (("general") ("bibsf")
|
||||
("rm") ("sc") ("sf") ("sy") ("logo"))))
|
||||
|
||||
'("hologoLogoFontSetup"
|
||||
(TeX-arg-eval
|
||||
(lambda ()
|
||||
(let* ((logo (completing-read "Logo name: "
|
||||
'("BibTeX"
|
||||
"ExTeX"
|
||||
"SliTeX"
|
||||
"AmS"
|
||||
"NTS"
|
||||
"KOMAScript"
|
||||
"METAFONT"
|
||||
"METAPOST")))
|
||||
(keyval (TeX-read-key-val
|
||||
nil
|
||||
(cond ((string= logo "BibTeX")
|
||||
'(("bibsf") ("sc")))
|
||||
((string= logo "ExTeX")
|
||||
'(("rm") ("sy")))
|
||||
((string= logo "SliTeX")
|
||||
'(("rm") ("sc")))
|
||||
((or (string= logo "AmS")
|
||||
(string= logo "NTS"))
|
||||
'(("sy")))
|
||||
((string= logo "KOMAScript")
|
||||
'(("sf")))
|
||||
((or (string= logo "METAFONT")
|
||||
(string= logo "METAPOST"))
|
||||
'(("logo")))
|
||||
(t
|
||||
nil)))))
|
||||
(TeX-argument-insert logo nil)
|
||||
(format "%s" keyval)))))
|
||||
|
||||
;; Additional user macros
|
||||
`("hologoVariant"
|
||||
LaTeX-hologo--arg-use-region-or-query-logo-name
|
||||
(TeX-arg-key-val ,(append LaTeX-hologo-key-val-options-local
|
||||
LaTeX-hologo-key-val-options-global)))
|
||||
|
||||
`("HologoVariant"
|
||||
LaTeX-hologo--arg-use-region-or-query-logo-name
|
||||
(TeX-arg-key-val ,(append LaTeX-hologo-key-val-options-local
|
||||
LaTeX-hologo-key-val-options-global)))
|
||||
|
||||
'("hologoList" 0)
|
||||
|
||||
'("hologoEntry" "Logo name" "Variant" "Since"))
|
||||
|
||||
;; Fontification
|
||||
(when (and (featurep 'font-latex)
|
||||
(eq TeX-install-font-lock 'font-latex-setup))
|
||||
(font-latex-add-keywords '(("hologo" "{")
|
||||
("Hologo" "{"))
|
||||
'textual)
|
||||
(font-latex-add-keywords '(("hologoSetup" "{")
|
||||
("hologoLogoSetup" "{{")
|
||||
("hologoDriverSetup" "{")
|
||||
("hologoFontSetup" "{")
|
||||
("hologoLogoFontSetup" "{{")
|
||||
("hologoVariant" "{{")
|
||||
("HologoVariant" "{{")
|
||||
("hologoList" "")
|
||||
("hologoEntry" "{{{"))
|
||||
'function)))
|
||||
TeX-dialect)
|
||||
|
||||
(defvar LaTeX-hologo-package-options nil
|
||||
"Package options for the hologo package.")
|
||||
|
||||
;;; hologo.el ends here
|
|
@ -1,180 +0,0 @@
|
|||
;;; theorem.el --- AUCTeX style for `theorem.sty' (v2.2c) -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Arash Esbati <arash@gnu.org>
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
;; Created: 2015-10-31
|
||||
;; 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 `theorem.sty' (v2.2c) from 2014/10/28.
|
||||
;; `theorem.sty' is a standard LaTeX package and part of TeXLive.
|
||||
|
||||
;; The style provides the function `LaTeX-theorem-env-label' which
|
||||
;; enables new defined environments with "\newtheoreom" to interact
|
||||
;; with AUCTeX and RefTeX mechanisms for inserting labels. Check
|
||||
;; docstring of `LaTeX-theorem-env-label' for instructions.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'crm)
|
||||
(require 'tex)
|
||||
(require 'latex)
|
||||
|
||||
;; Silence the compiler:
|
||||
(declare-function font-latex-add-keywords
|
||||
"font-latex"
|
||||
(keywords class))
|
||||
|
||||
(defvar LaTeX-theorem-theoremstyle-list
|
||||
'(("plain") ("break") ("margin") ("change")
|
||||
("marginbreak") ("changebreak"))
|
||||
"List of theorem styles provided by `theorem.sty'.")
|
||||
|
||||
(defvar LaTeX-theorem-fontdecl
|
||||
'(;; family
|
||||
"rmfamily" "sffamily" "ttfamily"
|
||||
;; series
|
||||
"mdseries" "bfseries"
|
||||
;; shape
|
||||
"upshape" "itshape" "slshape" "scshape"
|
||||
;; size
|
||||
"tiny" "scriptsize" "footnotesize"
|
||||
"small" "normalsize" "large"
|
||||
"Large" "LARGE" "huge" "Huge"
|
||||
;; reset macro
|
||||
"normalfont")
|
||||
"List of font declaration commands for \"\\theorem(body|header)font\".")
|
||||
|
||||
(defun LaTeX-arg-theorem-fontdecl (optional &optional prompt)
|
||||
"Prompt for font declaration commands in \"\\theorem(body|header)font\".
|
||||
If OPTIONAL is non-nil, insert the resulting value as an optional
|
||||
argument. Use PROMPT as the prompt string."
|
||||
;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
|
||||
;; is hard-coded to `TeX-esc'.
|
||||
(let* ((crm-separator (regexp-quote TeX-esc))
|
||||
(fontdecl (mapconcat #'identity
|
||||
(TeX-completing-read-multiple
|
||||
(TeX-argument-prompt optional prompt "Font")
|
||||
LaTeX-theorem-fontdecl nil nil TeX-esc)
|
||||
TeX-esc)))
|
||||
(TeX-argument-insert fontdecl optional)))
|
||||
|
||||
(defun LaTeX-theorem-env-label (environment)
|
||||
"Insert ENVIRONMENT, query for an optional argument and prompt
|
||||
for label. AUCTeX users should add ENVIRONMENT to
|
||||
`LaTeX-label-alist' via customize or in init-file with:
|
||||
|
||||
(add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
|
||||
|
||||
RefTeX users should customize or add ENVIRONMENT to
|
||||
`LaTeX-label-alist' and `reftex-label-alist', for example
|
||||
|
||||
(add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
|
||||
(add-to-list \\='reftex-label-alist
|
||||
\\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
|
||||
nil (\"Lemma\" \"lemma\") nil))"
|
||||
(let ((opthead (TeX-read-string
|
||||
(TeX-argument-prompt t nil "Heading"))))
|
||||
(LaTeX-insert-environment environment
|
||||
(when (and opthead
|
||||
(not (string= opthead "")))
|
||||
(format "[%s]" opthead))))
|
||||
(when (LaTeX-label environment 'environment)
|
||||
(LaTeX-newline)
|
||||
(indent-according-to-mode)))
|
||||
|
||||
;; Setup parsing for \newtheorem
|
||||
(TeX-auto-add-type "theorem-newtheorem" "LaTeX")
|
||||
|
||||
(defun LaTeX-theorem-auto-prepare ()
|
||||
"Clear `LaTeX-auto-theorem-newtheorem' before parsing."
|
||||
(setq LaTeX-auto-theorem-newtheorem nil))
|
||||
|
||||
(defun LaTeX-theorem-auto-cleanup ()
|
||||
"Move parsed results from `LaTeX-auto-theorem-newtheorem' and
|
||||
make them available as new environments."
|
||||
(dolist (newthm (mapcar #'car (LaTeX-theorem-newtheorem-list)))
|
||||
(LaTeX-add-environments (list newthm #'LaTeX-theorem-env-label))))
|
||||
|
||||
(add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-prepare t)
|
||||
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-theorem-auto-cleanup t)
|
||||
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
|
||||
|
||||
(TeX-add-style-hook
|
||||
"theorem"
|
||||
(lambda ()
|
||||
|
||||
(TeX-auto-add-regexp
|
||||
`(,(concat "\\\\newtheorem{\\(" TeX-token-char "+\\)}")
|
||||
1 LaTeX-auto-theorem-newtheorem))
|
||||
|
||||
(TeX-add-symbols
|
||||
;; Overrule the defintion in `latex.el':
|
||||
'("newtheorem"
|
||||
(TeX-arg-eval
|
||||
(lambda ()
|
||||
(let ((nthm (TeX-read-string
|
||||
(TeX-argument-prompt nil nil "Environment"))))
|
||||
(LaTeX-add-theorem-newtheorems nthm)
|
||||
(LaTeX-add-environments (list nthm #'LaTeX-theorem-env-label))
|
||||
(format "%s" nthm))))
|
||||
[ TeX-arg-environment "Numbered like" ]
|
||||
t [ (TeX-arg-eval progn (if (eq (save-excursion
|
||||
(backward-char 2)
|
||||
(preceding-char)) ?\])
|
||||
()
|
||||
(TeX-arg-counter t "Within counter"))
|
||||
"") ])
|
||||
|
||||
'("theoremstyle"
|
||||
(TeX-arg-eval completing-read
|
||||
"Style: "
|
||||
LaTeX-theorem-theoremstyle-list))
|
||||
|
||||
'("theorembodyfont"
|
||||
(LaTeX-arg-theorem-fontdecl "Body font"))
|
||||
|
||||
'("theoremheaderfont"
|
||||
(LaTeX-arg-theorem-fontdecl "Header font"))
|
||||
|
||||
'("theorempreskipamount"
|
||||
(TeX-arg-length "Skip before theorem"))
|
||||
|
||||
'("theorempostskipamount"
|
||||
(TeX-arg-length "Skip after theorem")))
|
||||
|
||||
;; Fontification
|
||||
(when (and (featurep 'font-latex)
|
||||
(eq TeX-install-font-lock 'font-latex-setup))
|
||||
(font-latex-add-keywords '(("theoremstyle" "{")
|
||||
("theorembodyfont" "{")
|
||||
("theoremheaderfont" "{")
|
||||
("theorempreskipamount" "{")
|
||||
("theorempostskipamount" "{"))
|
||||
'function)))
|
||||
TeX-dialect)
|
||||
|
||||
(defvar LaTeX-theorem-package-options nil
|
||||
"Package options for the theorem package.")
|
||||
|
||||
;;; theorem.el ends here
|
|
@ -1,121 +0,0 @@
|
|||
;;; wrapfig.el --- AUCTeX style for `wrapfig.sty' version v3.6 -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Arash Esbati <arash@gnu.org>
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
;; Created: 2014-12-13
|
||||
;; 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 `wrapfig.sty' version v3.6 from
|
||||
;; 2003/01/31. `wrapfig.sty' is part of TeXLive.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'tex)
|
||||
(require 'latex)
|
||||
|
||||
(TeX-add-style-hook
|
||||
"wrapfig"
|
||||
(lambda ()
|
||||
(LaTeX-add-environments
|
||||
;; \begin{wrapfigure}[No.lines]{Placement}[Overhang]{Width} ... \end{wrapfigure}
|
||||
'("wrapfigure"
|
||||
(lambda (env &rest ignore)
|
||||
(LaTeX-insert-environment
|
||||
env
|
||||
(let ((narrow (TeX-read-string "(Optional) Number of narrow lines: "))
|
||||
(placement (completing-read
|
||||
"Placement: " '(("r") ("R")
|
||||
("l") ("L")
|
||||
("i") ("I")
|
||||
("o") ("O"))))
|
||||
(overhang (TeX-read-string "(Optional) Overhang: "))
|
||||
(width (TeX-read-string "Width: ")))
|
||||
(concat
|
||||
(unless (string= narrow "")
|
||||
(format "[%s]" narrow))
|
||||
(format "{%s}" placement)
|
||||
(unless (string= overhang "")
|
||||
(format "[%s]" overhang))
|
||||
(format "{%s}" width))))))
|
||||
;;
|
||||
;; \begin{wraptable}[No.lines]{Placement}[Overhang]{Width} ... \end{wraptable}
|
||||
'("wraptable"
|
||||
(lambda (env &rest ignore)
|
||||
(LaTeX-insert-environment
|
||||
env
|
||||
(let ((narrow (TeX-read-string "(Optional) Number of narrow lines: "))
|
||||
(placement (completing-read
|
||||
"Placement: " '(("r") ("R")
|
||||
("l") ("L")
|
||||
("i") ("I")
|
||||
("o") ("O"))))
|
||||
(overhang (TeX-read-string "(Optional) Overhang: "))
|
||||
(width (TeX-read-string "Width: ")))
|
||||
(concat
|
||||
(unless (string= narrow "")
|
||||
(format "[%s]" narrow))
|
||||
(format "{%s}" placement)
|
||||
(unless (string= overhang "")
|
||||
(format "[%s]" overhang))
|
||||
(format "{%s}" width))))))
|
||||
;;
|
||||
;; \begin{wrapfloat}{<Type>}[No.lines]{Placement}[Overhang]{Width} ... \end{wrapfloat}
|
||||
;;
|
||||
;; <Type> can be a new floating environment defined with
|
||||
;; "\DeclareFloatingEnvironment" from newfloat.el. We check if
|
||||
;; the function `LaTeX-newfloat-DeclareFloatingEnvironment-list'
|
||||
;; is bound and returns non-nil before offering environment for
|
||||
;; completion. Otherwise, just ask user without completion.
|
||||
'("wrapfloat"
|
||||
(lambda (env &rest ignore)
|
||||
(LaTeX-insert-environment
|
||||
env
|
||||
(let ((floattype (if (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
|
||||
(LaTeX-newfloat-DeclareFloatingEnvironment-list))
|
||||
(completing-read
|
||||
"Float type: "
|
||||
(mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
|
||||
(TeX-read-string "Float type: ")))
|
||||
(narrow (TeX-read-string "(Optional) Number of narrow lines: "))
|
||||
(placement (completing-read
|
||||
"Placement: " '(("r") ("R")
|
||||
("l") ("L")
|
||||
("i") ("I")
|
||||
("o") ("O"))))
|
||||
(overhang (TeX-read-string "(Optional) Overhang: "))
|
||||
(width (TeX-read-string "Width: ")))
|
||||
(concat
|
||||
(format "{%s}" floattype)
|
||||
(unless (string= narrow "")
|
||||
(format "[%s]" narrow))
|
||||
(format "{%s}" placement)
|
||||
(unless (string= overhang "")
|
||||
(format "[%s]" overhang))
|
||||
(format "{%s}" width))))))))
|
||||
TeX-dialect)
|
||||
|
||||
(defvar LaTeX-wrapfig-package-options '("verbose")
|
||||
"Package options for the wrapfig package.")
|
||||
|
||||
;;; wrapfig.el ends here
|
|
@ -1,3 +1,7 @@
|
|||
2023-04-23 Mosè Giordano <mose@gnu.org>
|
||||
|
||||
* Version 13.2 released.
|
||||
|
||||
2022-02-20 Mosè Giordano <mose@gnu.org>
|
||||
|
||||
* Version 13.1 released.
|
File diff suppressed because it is too large
Load Diff
|
@ -34,18 +34,18 @@ several files.
|
|||
|
||||
One component of AUCTeX that LaTeX users will find attractive is
|
||||
preview-latex, a combination of folding and in-source previewing that
|
||||
provides true "What You See Is What You Get" experience in your
|
||||
provides true “What You See Is What You Get” experience in your
|
||||
sourcebuffer, while letting you retain full control. For more
|
||||
information, see further below.
|
||||
|
||||
More detailed information about the features and usage of AUCTeX can be
|
||||
found in the AUCTeX manual. You can access it from within Emacs by
|
||||
typing 'C-h i d m auctex <RET>'. If you prefer the standalone info
|
||||
reader, issue the command 'info auctex' in a terminal.
|
||||
typing ‘C-h i d m auctex <RET>’. If you prefer the standalone info
|
||||
reader, issue the command ‘info auctex’ in a terminal.
|
||||
|
||||
AUCTeX is written entirely in Emacs Lisp, and hence you can easily add
|
||||
new features for your own needs. It is a GNU project and distributed
|
||||
under the 'GNU General Public License Version 3'.
|
||||
under the ‘GNU General Public License Version 3’.
|
||||
|
||||
The most recent version is always available at
|
||||
<https://ftp.gnu.org/pub/gnu/auctex/>.
|
||||
|
@ -54,20 +54,20 @@ WWW users may want to check out the AUCTeX page at
|
|||
<https://www.gnu.org/software/auctex/>.
|
||||
|
||||
For comprehensive information about how to install AUCTeX read the file
|
||||
'INSTALL' or 'INSTALL.windows', respectively.
|
||||
‘INSTALL’ or ‘INSTALL.windows’, respectively.
|
||||
|
||||
If you are considering upgrading AUCTeX, the recent changes are
|
||||
described in the 'CHANGES' file.
|
||||
described in the ‘CHANGES’ file.
|
||||
|
||||
If you want to discuss AUCTeX with other users or its developers, there
|
||||
are several mailing lists you can use.
|
||||
|
||||
Send a mail with the subject "subscribe" to <auctex-request@gnu.org> in
|
||||
Send a mail with the subject “subscribe” to <auctex-request@gnu.org> in
|
||||
order to join the general discussion list for AUCTeX. Articles should
|
||||
be sent to <auctex@gnu.org>. In a similar way, you can subscribe to the
|
||||
<info-auctex@gnu.org> list for just getting important announcements
|
||||
about AUCTeX. The list <bug-auctex@gnu.org> is for bug reports which
|
||||
you should usually file with the 'M-x TeX-submit-bug-report <RET>'
|
||||
you should usually file with the ‘M-x TeX-submit-bug-report <RET>’
|
||||
command. If you want to address the developers of AUCTeX themselves
|
||||
with technical issues, they can be found on the discussion list
|
||||
<auctex-devel@gnu.org>.
|
||||
|
@ -88,19 +88,19 @@ between source and image representation.
|
|||
WYSIWYG (what you see is what you get) sometimes is considered all the
|
||||
rage, sometimes frowned upon. Do we really want it? Wrong question.
|
||||
The right question is _what_ we want from it. Except when finetuning
|
||||
the layout, we don't want to use printer fonts for on-screen text
|
||||
the layout, we don’t want to use printer fonts for on-screen text
|
||||
editing. The low resolution and contrast of a computer screen render
|
||||
all but the coarsest printer fonts (those for low-quality newsprint)
|
||||
unappealing, and the margins and pagination of the print are not wanted
|
||||
on the screen, either. On the other hand, more complex visual
|
||||
compositions like math formulas and tables can't easily be taken in when
|
||||
compositions like math formulas and tables can’t easily be taken in when
|
||||
seen only in the source. preview-latex strikes a balance: it only uses
|
||||
graphic renditions of the output for certain, configurable constructs,
|
||||
does this only when told, and then right in the source code. Switching
|
||||
back and forth between the source and preview is easy and natural and
|
||||
can be done for each image independently. Behind the scenes of
|
||||
preview-latex, a sophisticated framework of other programs like
|
||||
'dvipng', Dvips and Ghostscript are employed together with a special
|
||||
‘dvipng’, Dvips and Ghostscript are employed together with a special
|
||||
LaTeX style file for extracting the material of interest in the
|
||||
background and providing fast interactive response.
|
||||
|
||||
|
@ -116,22 +116,22 @@ The usual activation (if it is not done automatically) would be
|
|||
|
||||
(load "preview-latex.el" nil t t)
|
||||
|
||||
If you still don't get a "Preview" menu in LaTeX mode in spite of AUCTeX
|
||||
showing its "Command", your installation is broken. One possible cause
|
||||
are duplicate Lisp files that might be detectable with 'M-x
|
||||
list-load-path-shadows <RET>'.
|
||||
If you still don’t get a “Preview” menu in LaTeX mode in spite of AUCTeX
|
||||
showing its “Command”, your installation is broken. One possible cause
|
||||
are duplicate Lisp files that might be detectable with ‘M-x
|
||||
list-load-path-shadows <RET>’.
|
||||
|
||||
3 Getting started
|
||||
*****************
|
||||
|
||||
Once activated, preview-latex and its documentation will be accessible
|
||||
via its menus (note that preview-latex requires AUCTeX to be loaded).
|
||||
When you have loaded a LaTeX document (a sample document 'circ.tex' is
|
||||
When you have loaded a LaTeX document (a sample document ‘circ.tex’ is
|
||||
included in the distribution, but most documents including math and/or
|
||||
figures should do), you can use its menu or 'C-c C-p C-d' (for
|
||||
'Preview/Document'). Previews will now be generated for various objects
|
||||
figures should do), you can use its menu or ‘C-c C-p C-d’ (for
|
||||
‘Preview/Document’). Previews will now be generated for various objects
|
||||
in your document. You can use the time to take a short look at the
|
||||
other menu entries and key bindings in the 'Preview' menu. You'll see
|
||||
other menu entries and key bindings in the ‘Preview’ menu. You’ll see
|
||||
the previewed objects change into a roadworks sign when preview-latex
|
||||
has determined just what it is going to preview. Note that you can
|
||||
freely navigate the buffer while this is going on. When the process is
|
||||
|
@ -142,24 +142,24 @@ appear, since that is the moment when the correlation between the
|
|||
original text and the buffer locations gets established. If the buffer
|
||||
changes before that point of time, the previews will not be placed where
|
||||
they belong. If you do want to change some obvious error you just
|
||||
spotted, we recommend you stop the background process by pressing 'C-c
|
||||
C-k'.
|
||||
spotted, we recommend you stop the background process by pressing ‘C-c
|
||||
C-k’.
|
||||
|
||||
To see/edit the LaTeX code for a specific object, put the point (the
|
||||
cursor) on it and press 'C-c C-p C-p' (for 'Preview/at point'). It will
|
||||
cursor) on it and press ‘C-c C-p C-p’ (for ‘Preview/at point’). It will
|
||||
also do to click with the middle mouse button on the preview. Now you
|
||||
can edit the code, and generate a new preview by again pressing 'C-c C-p
|
||||
C-p' (or by clicking with the middle mouse button on the icon before the
|
||||
can edit the code, and generate a new preview by again pressing ‘C-c C-p
|
||||
C-p’ (or by clicking with the middle mouse button on the icon before the
|
||||
edited text).
|
||||
|
||||
If you are using the 'desktop' package, previews will remain from one
|
||||
session to the next as long as you don't kill your buffer.
|
||||
If you are using the ‘desktop’ package, previews will remain from one
|
||||
session to the next as long as you don’t kill your buffer.
|
||||
|
||||
4 Basic modes of operation
|
||||
**************************
|
||||
|
||||
preview-latex has a number of methods for generating its graphics. Its
|
||||
default operation is equivalent to using the 'LaTeX' command from
|
||||
default operation is equivalent to using the ‘LaTeX’ command from
|
||||
AUCTeX. If this happens to be a call of PDFLaTeX generating PDF output
|
||||
(you need at least AUCTeX 11.51 for this), then Ghostscript will be
|
||||
called directly on the resulting PDF file. If a DVI file gets produced,
|
||||
|
@ -169,10 +169,10 @@ The image type to be generated by Ghostscript can be configured with
|
|||
|
||||
M-x customize-option <RET> preview-image-type <RET>
|
||||
|
||||
The default is 'png' (the most efficient image type). A special setting
|
||||
is 'dvipng' in case you have the 'dvipng' program installed. In this
|
||||
case, 'dvipng' will be used for converting DVI files and Ghostscript
|
||||
(with a 'PNG' device) for converting PDF files. 'dvipng' is much faster
|
||||
The default is ‘png’ (the most efficient image type). A special setting
|
||||
is ‘dvipng’ in case you have the ‘dvipng’ program installed. In this
|
||||
case, ‘dvipng’ will be used for converting DVI files and Ghostscript
|
||||
(with a ‘PNG’ device) for converting PDF files. ‘dvipng’ is much faster
|
||||
than the combination of Dvips and Ghostscript. You can get downloads,
|
||||
access to its CVS archive and further information from its project site
|
||||
(https://savannah.nongnu.org/projects/dvipng).
|
||||
|
@ -185,15 +185,15 @@ be available. You can access it with the standalone info reader with
|
|||
|
||||
info preview-latex
|
||||
|
||||
or by pressing 'C-h i d m preview-latex <RET>' in Emacs. Once
|
||||
preview-latex is activated, you can instead use 'C-c C-p <TAB>' (or the
|
||||
menu entry 'Preview/Read documentation').
|
||||
or by pressing ‘C-h i d m preview-latex <RET>’ in Emacs. Once
|
||||
preview-latex is activated, you can instead use ‘C-c C-p <TAB>’ (or the
|
||||
menu entry ‘Preview/Read documentation’).
|
||||
|
||||
Depending on your installation, a printable manual may also be available
|
||||
in the form of 'preview-latex.pdf'.
|
||||
in the form of ‘preview-latex.pdf’.
|
||||
|
||||
Detailed documentation for the LaTeX style used for extracting the
|
||||
preview images is placed in 'preview.pdf' in a suitable directory during
|
||||
preview images is placed in ‘preview.pdf’ in a suitable directory during
|
||||
installation; on typical TeX Live-based systems,
|
||||
|
||||
texdoc preview
|
||||
|
@ -218,7 +218,7 @@ interface.
|
|||
7 Contacts
|
||||
**********
|
||||
|
||||
Bug reports should be sent by using 'M-x preview-report-bug <RET>', as
|
||||
Bug reports should be sent by using ‘M-x preview-report-bug <RET>’, as
|
||||
this will fill in a lot of information interesting to us. If the
|
||||
installation fails (but this should be a rare event), report bugs to
|
||||
<bug-auctex@gnu.org>.
|
||||
|
@ -226,15 +226,15 @@ installation fails (but this should be a rare event), report bugs to
|
|||
There is a general discussion list for AUCTeX which also covers
|
||||
preview-latex, look at <https://lists.gnu.org/mailman/listinfo/auctex>.
|
||||
For more information on the mailing list, send a message with just the
|
||||
word "help" as subject or body to <auctex-request@gnu.org>. For the
|
||||
word “help” as subject or body to <auctex-request@gnu.org>. For the
|
||||
developers, there is the <auctex-devel@gnu.org> list; it would probably
|
||||
make sense to direct feature requests and questions about internal
|
||||
details there. There is a low-volume read-only announcement list
|
||||
available to which you can subscribe by sending a mail with "subscribe"
|
||||
available to which you can subscribe by sending a mail with “subscribe”
|
||||
in the subject to <info-auctex-request@gnu.org>.
|
||||
|
||||
Offers to support further development will be appreciated. If you want
|
||||
to show your appreciation with a donation to the main developer, you can
|
||||
do so via PayPal to <dak@gnu.org>, and of course you can arrange for
|
||||
service contracts or for added functionality. Take a look at the 'TODO'
|
||||
service contracts or for added functionality. Take a look at the ‘TODO’
|
||||
list for suggestions in that area.
|
|
@ -0,0 +1,171 @@
|
|||
Release notes for AUCTeX 13.2 with preview-latex
|
||||
================================================
|
||||
|
||||
AUCTeX provides by far the most wide-spread and sophisticated
|
||||
environment for editing LaTeX, TeX, ConTeXt and Texinfo documents with
|
||||
Emacs. Combined with packages like RefTeX, flyspell and others it is
|
||||
pretty much without peer as a comprehensive authoring solution for a
|
||||
large variety of operating system platforms and TeX distributions. It
|
||||
supports document-dependent completion and syntax highlighting, easily
|
||||
accessible menus, jumping to error locations in the source file, a
|
||||
number of editing shortcuts, intelligent indentation and filling of
|
||||
text during entry, and WYSIWYG previews of graphical elements like
|
||||
math formulas right in the Emacs source buffer, by virtue of its
|
||||
preview-latex component.
|
||||
|
||||
One part of the preview-latex subsystem is the central `preview.sty'
|
||||
file that is independently useful for a number of applications and is
|
||||
available in unbundled form from CTAN.[1]
|
||||
|
||||
AUCTeX needs volunteers in particular for non-programming tasks:
|
||||
documentation writing, tutorials, translations, reference material,
|
||||
sleuth work, testing.
|
||||
|
||||
New features and fixed bugs in this release
|
||||
-------------------------------------------
|
||||
|
||||
AUCTeX no longer refuses to insert dollar sign when you type ‘$’ at
|
||||
point where AUCTeX thinks the current math mode didn’t start with
|
||||
dollar(s). AUCTeX assumes the user knows that it isn’t in math
|
||||
mode actually.
|
||||
|
||||
You can keep the former behavior by enabling the new customize
|
||||
option ‘TeX-refuse-unmatched-dollar’.
|
||||
|
||||
AUCTeX supports completion-at-point of macro and environment
|
||||
arguments in LaTeX buffers. The responsible function recognizes
|
||||
the argument position and extracts the corresponding candidates
|
||||
from the variables ‘TeX-symbol-list’ and ‘LaTeX-environment-list’.
|
||||
|
||||
AUCTeX underlines the argument of macros which produce underlined
|
||||
text in the final product with ‘font-latex-underline-face’. The
|
||||
corresponding keyword class is called ‘underline-command’. See the
|
||||
section for fontification of macros if you dislike this feature and
|
||||
wish to deactivate it.
|
||||
|
||||
Support for the Sioyek document viewer is added.
|
||||
|
||||
AUCTeX now requires GNU Emacs 25.1 or higher.
|
||||
|
||||
AUCTeX tracks the change in Emacs where initial inputs in the
|
||||
minibuffer during queries are getting phased out. Queries for the
|
||||
mandatory arguments of macros and environments are adjusted where
|
||||
applicable. The value which will be used after hitting ‘RET’
|
||||
without other input is shown in the prompt in parentheses prefixed
|
||||
with ‘default’. For this change the signature of the function
|
||||
‘TeX-arg-length’ is altered. The old argument list was:
|
||||
(defun TeX-arg-length (optional &optional prompt
|
||||
initial-input definition default)
|
||||
|
||||
whereas the new one is:
|
||||
(defun TeX-arg-length (optional &optional prompt
|
||||
default initial-input definition)
|
||||
|
||||
Note the position change of ‘DEFAULT’.
|
||||
|
||||
Indenting of conditionals is improved. Code inside constructs like
|
||||
‘\ifx . \else . \fi’ is correctly indented. An interface for style
|
||||
files is also introduced which can add their macros to the
|
||||
indentation engine. Check the file ‘algpseudocode.el’ for an
|
||||
example.
|
||||
|
||||
You can optionally enable indent inside square brackets ‘[]’ by new
|
||||
user options ‘TeX-indent-open-delimiters’ and
|
||||
‘TeX-indent-close-delimiters’.
|
||||
|
||||
Now ‘tex-buf.el’ is merged into ‘tex.el’ and no longer exists. If
|
||||
your personal code has ‘(require 'tex-buf)’, one of the following
|
||||
prescriptions would serve.
|
||||
1. Remove ‘(require 'tex-buf)’.
|
||||
2. Replace it with ‘(require 'tex)’.
|
||||
3. Replace it with ‘(require 'latex)’.
|
||||
|
||||
When you edit a document divided into multiple files, auto parsed
|
||||
information for all sub files are saved under ‘auto’ subdirectory
|
||||
at master directory when ‘TeX-parse-self’ and ‘TeX-auto-save’
|
||||
options are enabled. Now you can have support ‘.el’ file saved
|
||||
under ‘auto’ subdirectory of each directory of the sub file when
|
||||
the sub files aren’t located at the master directory.
|
||||
|
||||
To achieve that, set new user option ‘TeX-auto-save-aggregate’ to
|
||||
‘nil’.
|
||||
|
||||
There was another hook where former dynamic free variables could be
|
||||
used. The usage was invalidated at version 13.1, by introduction
|
||||
of lexical binding over AUCTeX.
|
||||
|
||||
The functions in ‘TeX-region-hook’ could access the free variables
|
||||
‘master-buffer’ and ‘orig-buffer’. Those are now named
|
||||
‘TeX-region-master-buffer’ and ‘TeX-region-orig-buffer’,
|
||||
respectively.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
It is required that you use at least GNU Emacs 26.1.
|
||||
|
||||
The preview-latex subsystem requires image support.
|
||||
|
||||
You'll also need a working LaTeX installation and Ghostscript.
|
||||
dvipng[2] (version 1.4 or later), a very fast DVI converter, can be
|
||||
used to speed up the conversion.
|
||||
|
||||
Availability
|
||||
------------
|
||||
|
||||
The easiest way for getting AUCTeX is installing it with GNU ELPA, see
|
||||
<URL:https://elpa.gnu.org/packages/auctex.html> for more information.
|
||||
Other download options are available at
|
||||
<URL:https://ftp.gnu.org/gnu/auctex/>. At release time, we provide the
|
||||
source tarball. You can also use versions of Emacs that already
|
||||
include AUCTeX or a software package management system for your
|
||||
operating system which provides you with the latest release.
|
||||
|
||||
A separate directory for each release contains some stuff from the
|
||||
tarball, such as ChangeLog, printable manuals, and a reference sheet.
|
||||
The download area is mirrored to the directory support/auctex on CTAN.
|
||||
AUCTeX is licensed under the GNU General Public License version 3.
|
||||
|
||||
You'll find more information at the web site of AUCTeX
|
||||
<URL:https://www.gnu.org/software/auctex/>, including its mailing list
|
||||
addresses.
|
||||
|
||||
Future development and additional information
|
||||
---------------------------------------------
|
||||
|
||||
AUCTeX is proceeding as a GNU project with the long-term intent of
|
||||
merging it into Emacs. For that reason, all new contributors need to
|
||||
assign copyright to their contributions to the FSF (the usual
|
||||
procedure for Emacs contributors). The same holds for past
|
||||
contributors. The principal authors and maintainers have already done
|
||||
so, but it would require a diligent and diplomatic volunteer to find
|
||||
and ask the rest.
|
||||
|
||||
Current AUCTeX managers are Arash Esbati, Mosè Giordano, and Tassilo
|
||||
Horn. Everybody is welcome to contribute to the project by reporting
|
||||
bugs and suggesting improvements, but the most effective way of
|
||||
helping AUCTeX development remains volunteering for tasks.
|
||||
|
||||
The following people contributed to this release series (in
|
||||
alphabetical order): Ivan Andrus, Ralf Angeli, Masayuki Ataka,
|
||||
Mohammad Hossein Bateni, Fabrice Ben Hamouda, Thomas Baumann, Vincent
|
||||
Belaïche, Berend de Boer, Alex Branham, Uwe Brauer, Ken Brown, Joshua
|
||||
Buhl, Jean-François Burnol, Patrice Dumas, Arash Esbati, Werner Fink,
|
||||
Miguel Frasson, Peter S. Galbraith, Mosè Giordano, Andrea Greselin,
|
||||
Patrick Gundlach, Abdul-Lateef Haji-Ali, Jobst Hoffmann, Tassilo Horn,
|
||||
Yvon Hevel, Orlando Iovino, Mads Jensen, Arne Jørgensen, Philip
|
||||
Kaludercic, David Kastrup, Ikumi Keita, Philip Kime, Oleh Krehel,
|
||||
Joost Kremers, Frank Küster, Jan-Åke Larsson, Matthew Leach, Brian
|
||||
Leung, Antoine Levitt, Leo Liu, Vladimir Lomov, Stefan Monnier, Dan
|
||||
Nicolaescu, Piet van Oostrum, Pieter Pareit, Nicolas Richard, Augusto
|
||||
Ritter Stoffel, Florent Rougon, Santiago Saavedra, Davide
|
||||
G. M. Salvetti, Rüdiger Sonderfeld, Holger Sparr, Mike Sperber, Reiner
|
||||
Steib, Christian Schlauer, Shiro Takeda, Mark Trettin (Please accept
|
||||
our apologies if we forgot somebody.)
|
||||
|
||||
Footnotes:
|
||||
|
||||
[1] <URL:https://www.ctan.org/pkg/preview>
|
||||
|
||||
[2] dvipng is available via its project page
|
||||
<URL:https://savannah.nongnu.org/projects/dvipng> and from CTAN.
|
|
@ -20,7 +20,7 @@ runs `bib-find', and [mouse-3] runs `bib-display'.
|
|||
(autoload 'turn-on-bib-cite "bib-cite" "\
|
||||
Unconditionally turn on Bib Cite mode." nil nil)
|
||||
|
||||
(register-definition-prefixes "bib-cite" '("LaTeX-" "bib-" "create-alist-from-list" "member-cis" "psg-" "search-directory-tree"))
|
||||
(register-definition-prefixes "bib-cite" '("LaTeX-find-label-hist-alist" "bib-" "create-alist-from-list" "member-cis" "psg-" "search-directory-tree"))
|
||||
|
||||
;;;***
|
||||
|
||||
|
@ -146,9 +146,13 @@ are the arguments to `completing-read'. See that.
|
|||
(autoload 'multi-prompt-key-value "multi-prompt" "\
|
||||
Read multiple strings, with completion and key=value support.
|
||||
PROMPT is a string to prompt with, usually ending with a colon
|
||||
and a space. TABLE is an alist. The car of each element should
|
||||
be a string representing a key and the optional cdr should be a
|
||||
list with strings to be used as values for the key.
|
||||
and a space.
|
||||
|
||||
TABLE is an alist where each entry is a list. The first element
|
||||
of each list is a string representing a key and the optional
|
||||
second element is a list with strings to be used as values for
|
||||
the key. The second element can also be a variable returning a
|
||||
list of strings.
|
||||
|
||||
See the documentation for `completing-read' for details on the
|
||||
other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST,
|
||||
|
@ -348,14 +352,14 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'." t nil)
|
|||
;;; Generated autoloads from tex-site.el
|
||||
(require 'tex-site)
|
||||
|
||||
(register-definition-prefixes "tex-site" '("AUCTeX-" "TeX-" "preview-TeX-style-dir"))
|
||||
(register-definition-prefixes "tex-site" '("AUCTeX-" "TeX-" "preview-TeX-style-dir" "tex-site-unload-function"))
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "tex-style" "tex-style.el" (0 0 0 0))
|
||||
;;; Generated autoloads from tex-style.el
|
||||
|
||||
(register-definition-prefixes "tex-style" '("LaTeX-"))
|
||||
(register-definition-prefixes "tex-style" '("LaTeX-" "TeX-TikZ-point-name-regexp"))
|
||||
|
||||
;;;***
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
;; Generated package description from auctex.el -*- no-byte-compile: t -*-
|
||||
(define-package "auctex" "13.2.1" "Integrated environment for *TeX*" '((emacs "25.1")) :commit "1c3360b1621a524e14fa0067dc7e138630c2267f" :maintainer '(nil . "auctex-devel@gnu.org") :keywords '("tex" "latex" "texinfo" "context" "doctex" "preview-latex") :url "https://www.gnu.org/software/auctex/")
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
|
||||
|
||||
;; Version: 13.1.5
|
||||
;; Version: 13.2.1
|
||||
;; URL: https://www.gnu.org/software/auctex/
|
||||
;; Maintainer: auctex-devel@gnu.org
|
||||
;; Notifications-To: auctex-diffs@gnu.org
|
File diff suppressed because it is too large
Load Diff
|
@ -1570,8 +1570,6 @@ Does not save excursion."
|
|||
"Sorry, could not find an environment or section declaration")))))
|
||||
|
||||
(defvar LaTeX-find-label-hist-alist nil "History list for LaTeX-find-label.")
|
||||
(defvar LaTeX-label-list nil "Used by AUCTeX to store label names.")
|
||||
|
||||
|
||||
(defun create-alist-from-list (the-list)
|
||||
"Return a single list from a THE-LIST that may contain either items or lists.
|
|
@ -1,7 +1,7 @@
|
|||
;;; context-en.el --- Support for the ConTeXt english interface. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2003-2004, 2006, 2008
|
||||
;; 2010, 2014, 2020, 2021 Free Software Foundation, Inc.
|
||||
;; 2010, 2014, 2020-2023 Free Software Foundation, Inc.
|
||||
|
||||
;; Maintainer: Berend de Boer <berend@pobox.com>
|
||||
;; Keywords: tex
|
||||
|
@ -188,6 +188,8 @@ That is, besides the section(-block) commands.")
|
|||
|
||||
(defun ConTeXt-en-mode-initialization ()
|
||||
"ConTeXt english interface specific initialization."
|
||||
;; FIXME: Move to `ConTeXt-mode-common-initialization' replacing
|
||||
;; `ConTeXt-environment-list-en' with `ConTeXt-environment-list'?
|
||||
(mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-en))
|
||||
|
||||
(TeX-add-symbols
|
|
@ -1,7 +1,7 @@
|
|||
;;; context-nl.el --- Support for the ConTeXt dutch interface. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2003, 2004, 2006, 2010,
|
||||
;; 2015, 2020, 2021 Free Software Foundation, Inc.
|
||||
;; 2015, 2020-2023 Free Software Foundation, Inc.
|
||||
|
||||
;; Maintainer: Berend de Boer <berend@pobox.com>
|
||||
;; Keywords: tex
|
||||
|
@ -163,6 +163,8 @@ That is, besides the section(-block) commands.")
|
|||
|
||||
(defun ConTeXt-nl-mode-initialization ()
|
||||
"ConTeXt dutch interface specific initialization."
|
||||
;; FIXME: Move to `ConTeXt-mode-common-initialization' replacing
|
||||
;; `ConTeXt-environment-list-nl' with `ConTeXt-environment-list'?
|
||||
(mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-nl))
|
||||
|
||||
(TeX-add-symbols
|
|
@ -1,6 +1,6 @@
|
|||
;;; context.el --- Support for ConTeXt documents. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2003-2023 Free Software Foundation, Inc.
|
||||
|
||||
;; Maintainer: Berend de Boer <berend@pobox.com>
|
||||
;; Keywords: tex
|
||||
|
@ -309,13 +309,20 @@ The following variables can be set to customize:
|
|||
|
||||
;; LaTeX has a max function here, which makes no sense.
|
||||
;; I think you want to insert a section that is max ConTeXt-largest-level
|
||||
;; (May 3, 2023) The above comment is wrong. Here "large" refers to
|
||||
;; coarseness of document structure grouping. That is, "chapter" is
|
||||
;; larger than "section", "section" is larger than "subsection" etc.
|
||||
;; On the ohter hand, the corresponding levels are numbered in the
|
||||
;; reversed order. That is, "chapter" is level 1, "section" is level
|
||||
;; 2 etc. Hence the largest _section_ has the smallest _level_.
|
||||
;; That's the reason we use `max' rather than `min' here.
|
||||
(defun ConTeXt-current-section ()
|
||||
"Return the level of the section that contain point.
|
||||
See also `ConTeXt-section' for description of levels."
|
||||
(save-excursion
|
||||
(min (ConTeXt-largest-level)
|
||||
(max (ConTeXt-largest-level)
|
||||
(if (re-search-backward outline-regexp nil t)
|
||||
(+ 1 (- (ConTeXt-outline-level) (ConTeXt-outline-offset)))
|
||||
(- (ConTeXt-outline-level) (ConTeXt-outline-offset))
|
||||
(ConTeXt-largest-level)))))
|
||||
|
||||
(defun ConTeXt-down-section ()
|
||||
|
@ -363,35 +370,19 @@ section."
|
|||
|
||||
(defun ConTeXt-numbered-section-name (level)
|
||||
"Return the name of the section corresponding to LEVEL."
|
||||
(let ((entry (TeX-member level ConTeXt-numbered-section-list
|
||||
(function (lambda (a b) (equal a (nth 1 b)))))))
|
||||
(if entry
|
||||
(nth 0 entry)
|
||||
nil)))
|
||||
(car (rassoc (list level) ConTeXt-numbered-section-list)))
|
||||
|
||||
(defun ConTeXt-unnumbered-section-name (level)
|
||||
"Return the name of the section corresponding to LEVEL."
|
||||
(let ((entry (TeX-member level ConTeXt-unnumbered-section-list
|
||||
(function (lambda (a b) (equal a (nth 1 b)))))))
|
||||
(if entry
|
||||
(nth 0 entry)
|
||||
nil)))
|
||||
(car (rassoc (list level) ConTeXt-unnumbered-section-list)))
|
||||
|
||||
(defun ConTeXt-numbered-section-level (name)
|
||||
"Return the level of the section NAME."
|
||||
(let ((entry (TeX-member name ConTeXt-numbered-section-list
|
||||
(function (lambda (a b) (equal a (nth 0 b)))))))
|
||||
(if entry
|
||||
(nth 1 entry)
|
||||
nil)))
|
||||
(cadr (assoc name ConTeXt-numbered-section-list)))
|
||||
|
||||
(defun ConTeXt-unnumbered-section-level (name)
|
||||
"Return the level of the section NAME."
|
||||
(let ((entry (TeX-member name ConTeXt-unnumbered-section-list
|
||||
(function (lambda (a b) (equal a (nth 0 b)))))))
|
||||
(if entry
|
||||
(nth 1 entry)
|
||||
nil)))
|
||||
(cadr (assoc name ConTeXt-unnumbered-section-list)))
|
||||
|
||||
|
||||
;;; Section Hooks.
|
||||
|
@ -411,32 +402,34 @@ The following variables are set before the hooks are run
|
|||
`ConTeXt-level'.
|
||||
`ConTeXt-title' - The title of the section, default to an empty
|
||||
string.
|
||||
`ConTeXt-reference' - Comma separated list of reference.
|
||||
`ConTeXt-done-mark' - Position of point afterwards, default nil
|
||||
(meaning end).
|
||||
|
||||
The following standard hooks exist -
|
||||
|
||||
ConTeXt-numbered-section-heading: Query the user about the name
|
||||
`ConTeXt-numbered-section-heading': Query the user about the name
|
||||
of the sectioning command. Modifies `ConTeXt-level' and
|
||||
`ConTeXt-name'.
|
||||
|
||||
ConTeXt-section-title: Query the user about the title of the
|
||||
`ConTeXt-section-title': Query the user about the title of the
|
||||
section. Modifies `ConTeXt-title'.
|
||||
|
||||
ConTeXt-section-section: Insert ConTeXt section command according
|
||||
`ConTeXt-section-section': Insert ConTeXt section command according
|
||||
to `ConTeXt-name', `ConTeXt-title', and `ConTeXt-reference'. If
|
||||
`ConTeXt-title' is an empty string, `ConTeXt-done-mark' will be
|
||||
placed at the point they should be inserted.
|
||||
|
||||
ConTeXt-section-ref: Insert a reference for this section command.
|
||||
`ConTeXt-section-ref': Query the user about a reference for this
|
||||
section command. Modifies `ConTeXt-reference'.
|
||||
|
||||
To get a full featured `ConTeXt-section' command, insert
|
||||
|
||||
(setq ConTeXt-numbered-section-hook
|
||||
\\='(ConTeXt-numbered-section-heading
|
||||
ConTeXt-section-title
|
||||
ConTeXt-section-section
|
||||
ConTeXt-section-ref))
|
||||
ConTeXt-section-ref
|
||||
ConTeXt-section-section))
|
||||
|
||||
in your init file such as .emacs.d/init.el or .emacs."
|
||||
:group 'ConTeXt-macro
|
||||
|
@ -463,32 +456,34 @@ The following variables are set before the hooks are run
|
|||
`ConTeXt-level'.
|
||||
`ConTeXt-title' - The title of the section, default to an empty
|
||||
string.
|
||||
`ConTeXt-reference' - Comma separated list of reference.
|
||||
`ConTeXt-done-mark' - Position of point afterwards, default nil
|
||||
(meaning end).
|
||||
|
||||
The following standard hooks exist -
|
||||
|
||||
ConTeXt-unnumbered-section-heading: Query the user about the name
|
||||
`ConTeXt-unnumbered-section-heading': Query the user about the name
|
||||
of the sectioning command. Modifies `ConTeXt-level' and
|
||||
`ConTeXt-name'.
|
||||
|
||||
ConTeXt-section-title: Query the user about the title of the
|
||||
`ConTeXt-section-title': Query the user about the title of the
|
||||
section. Modifies `ConTeXt-title'.
|
||||
|
||||
ConTeXt-section-section: Insert ConTeXt section command according
|
||||
`ConTeXt-section-section': Insert ConTeXt section command according
|
||||
to `ConTeXt-name', `ConTeXt-title', and `ConTeXt-reference'. If
|
||||
`ConTeXt-title' is an empty string, `ConTeXt-done-mark' will be
|
||||
placed at the point they should be inserted.
|
||||
|
||||
ConTeXt-section-ref: Insert a reference for this section command.
|
||||
`ConTeXt-section-ref': Query the user about a reference for this
|
||||
section command. Modifies `ConTeXt-reference'.
|
||||
|
||||
To get a full featured `ConTeXt-section' command, insert
|
||||
|
||||
(setq ConTeXt-unnumbered-section-hook
|
||||
\\='(ConTeXt-unnumbered-section-heading
|
||||
ConTeXt-section-title
|
||||
ConTeXt-section-section
|
||||
ConTeXt-section-ref))
|
||||
ConTeXt-section-ref
|
||||
ConTeXt-section-section))
|
||||
|
||||
in your init file such as .emacs.d/init.el or .emacs."
|
||||
:group 'ConTeXt-macro
|
||||
|
@ -561,7 +556,7 @@ assumes the section already is inserted."
|
|||
(newline)
|
||||
;; If RefTeX is available, tell it that we've just made a new section
|
||||
(and (fboundp 'reftex-notice-new-section)
|
||||
(funcall (symbol-function 'reftex-notice-new-section))))
|
||||
(reftex-notice-new-section)))
|
||||
|
||||
(defun ConTeXt-section-ref ()
|
||||
"Hook to insert a reference after the sectioning command.
|
||||
|
@ -598,7 +593,7 @@ for a label to be inserted after the sectioning command."
|
|||
(cond ((TeX-TeX-sentinel-check process name))
|
||||
((save-excursion
|
||||
;; in a full ConTeXt run there will multiple texutil
|
||||
;; outputs. Just looking for "another run needed" would
|
||||
;; outputs. Just looking for "another run needed" would
|
||||
;; find the first occurence
|
||||
(goto-char (point-max))
|
||||
(re-search-backward "TeXUtil " nil t)
|
||||
|
@ -680,14 +675,14 @@ With optional ARG, modify current environment."
|
|||
(t ConTeXt-default-environment)))
|
||||
(environment
|
||||
(completing-read (concat "Environment type (default " default "): ")
|
||||
ConTeXt-environment-list nil nil nil
|
||||
(ConTeXt-environment-list) nil nil nil
|
||||
'ConTeXt-environment-history default)))
|
||||
;; Use `environment' as default for the next time only if it is different
|
||||
;; from the current default.
|
||||
(unless (equal environment default)
|
||||
(setq ConTeXt-default-environment environment))
|
||||
|
||||
(let ((entry (assoc environment ConTeXt-environment-list)))
|
||||
(let ((entry (assoc environment (ConTeXt-environment-list))))
|
||||
(if (null entry)
|
||||
(ConTeXt-add-environments (list environment)))
|
||||
|
||||
|
@ -717,7 +712,7 @@ With optional ARG, modify current environment."
|
|||
|
||||
(defun ConTeXt-environment-menu (environment)
|
||||
"Insert ENVIRONMENT around point or region."
|
||||
(let ((entry (assoc environment ConTeXt-environment-list)))
|
||||
(let ((entry (assoc environment (ConTeXt-environment-list))))
|
||||
(cond ((not (and entry (nth 1 entry)))
|
||||
(ConTeXt-insert-environment environment))
|
||||
((numberp (nth 1 entry))
|
||||
|
@ -727,16 +722,19 @@ With optional ARG, modify current environment."
|
|||
(setq args (concat args TeX-grop TeX-grcl))
|
||||
(setq count (- count 1)))
|
||||
(ConTeXt-insert-environment environment args)))
|
||||
((stringp (nth 1 entry))
|
||||
((or (stringp (nth 1 entry)) (vectorp (nth 1 entry)))
|
||||
(let ((prompts (cdr entry))
|
||||
(args ""))
|
||||
(while prompts
|
||||
(setq args (concat args
|
||||
TeX-grop
|
||||
(read-from-minibuffer
|
||||
(concat (car prompts) ": "))
|
||||
TeX-grcl))
|
||||
(setq prompts (cdr prompts)))
|
||||
(dolist (elt prompts)
|
||||
(let* ((optional (vectorp elt))
|
||||
(elt (if optional (elt elt 0) elt))
|
||||
(arg (TeX-read-string
|
||||
(TeX-argument-prompt optional elt nil))))
|
||||
(setq args (concat args
|
||||
(cond ((and optional (> (length arg) 0))
|
||||
(concat ConTeXt-optop arg ConTeXt-optcl))
|
||||
((not optional)
|
||||
(concat TeX-grop arg TeX-grcl)))))))
|
||||
(ConTeXt-insert-environment environment args)))
|
||||
(t
|
||||
(apply (nth 1 entry) environment (nthcdr 2 entry))))))
|
||||
|
@ -756,45 +754,156 @@ With optional ARG, modify current environment."
|
|||
(end-of-line)
|
||||
(newline))
|
||||
|
||||
(defvar ConTeXt-after-insert-env-hook nil
|
||||
"List of functions to be run at the end of `ConTeXt-insert-environment'.
|
||||
Each function is called with three arguments: the name of the
|
||||
environment just inserted, the buffer position just before
|
||||
\\start... and the position just before \\stop....")
|
||||
|
||||
;;; Copy and adaptation of `LaTeX-insert-environment'. (2022-08-13)
|
||||
(defun ConTeXt-insert-environment (environment &optional extra)
|
||||
"Insert ENVIRONMENT, with optional argument EXTRA."
|
||||
(if (and (TeX-active-mark)
|
||||
(not (eq (mark) (point))))
|
||||
"Insert ConTeXt ENVIRONMENT with optional argument EXTRA."
|
||||
(let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point)))))
|
||||
content-start env-start env-end additional-indent)
|
||||
(when (and active-mark (< (mark) (point))) (exchange-point-and-mark))
|
||||
;; What to do with the line containing point.
|
||||
;; - Open a new empty line for later insertion of "\startfoo" 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.
|
||||
(cond (;; When the entire line consists of whitespaces...
|
||||
(save-excursion (beginning-of-line)
|
||||
(looking-at "[ \t]*$"))
|
||||
;; ...make the line empty and put the point there.
|
||||
(delete-region (match-beginning 0) (match-end 0)))
|
||||
(;; When there are only whitespaces between the point and
|
||||
;; BOL (including the case the point is at BOL)...
|
||||
(TeX-looking-at-backward "^[ \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)
|
||||
;; Take note that there are texts to be indented later
|
||||
;; unless the region is activated.
|
||||
(unless active-mark
|
||||
(setq additional-indent t)))
|
||||
(;; In all other cases...
|
||||
t
|
||||
;; ...insert a new empty line after deleting all
|
||||
;; whitespaces around the point, put the point there...
|
||||
(delete-horizontal-space)
|
||||
(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.
|
||||
(newline 2)
|
||||
(beginning-of-line 0)
|
||||
;; Take note that there are texts to be indented later
|
||||
;; unless the region is activated.
|
||||
(unless active-mark
|
||||
(setq additional-indent t)))))
|
||||
;; 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 "\stopfoo"
|
||||
;; 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.
|
||||
(save-excursion
|
||||
(if (< (mark) (point))
|
||||
(exchange-point-and-mark))
|
||||
(insert TeX-esc (ConTeXt-environment-start-name) environment)
|
||||
(newline)
|
||||
(forward-line -1)
|
||||
(indent-according-to-mode)
|
||||
(if extra (insert extra))
|
||||
(goto-char (mark))
|
||||
(or (TeX-looking-at-backward "^[ \t]*")
|
||||
(newline))
|
||||
(insert TeX-esc (ConTeXt-environment-stop-name) environment)
|
||||
(newline)
|
||||
(forward-line -1)
|
||||
(indent-according-to-mode)
|
||||
;;(goto-char (point))
|
||||
)
|
||||
(or (TeX-looking-at-backward "^[ \t]*")
|
||||
(newline))
|
||||
(cond (;; When the entire line consists of whitespaces...
|
||||
(save-excursion (beginning-of-line)
|
||||
(looking-at "[ \t]*$"))
|
||||
;; ...make the line empty and put the mark there.
|
||||
(delete-region (match-beginning 0) (match-end 0)))
|
||||
(;; When there are only whitespaces between the mark and
|
||||
;; BOL (including the case the mark is at BOL)...
|
||||
(TeX-looking-at-backward "^[ \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)
|
||||
(set-mark (point))
|
||||
(newline)
|
||||
;; Take note that there are texts to be indented later.
|
||||
(setq additional-indent t))
|
||||
(;; 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")
|
||||
;; ...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.
|
||||
(unless (eolp)
|
||||
(newline)
|
||||
;; Take note that there are texts to be indented
|
||||
;; later.
|
||||
(setq additional-indent t))))))
|
||||
;; Now insert the environment.
|
||||
(setq env-start (point))
|
||||
(insert TeX-esc (ConTeXt-environment-start-name) environment)
|
||||
(indent-according-to-mode)
|
||||
(if extra (insert extra))
|
||||
(end-of-line)
|
||||
(newline-and-indent)
|
||||
(newline)
|
||||
(when extra (insert extra))
|
||||
(setq content-start (line-beginning-position 2))
|
||||
(unless active-mark
|
||||
(newline)
|
||||
(newline))
|
||||
(when active-mark (goto-char (mark)))
|
||||
(insert TeX-esc (ConTeXt-environment-stop-name) environment)
|
||||
(or (looking-at "[ \t]*$")
|
||||
(save-excursion (newline-and-indent)))
|
||||
(indent-according-to-mode)
|
||||
(end-of-line 0)))
|
||||
(end-of-line 0)
|
||||
(if active-mark
|
||||
(progn
|
||||
;; TODO: Do filling when context.el obtains
|
||||
;; `ConTeXt-fill-region' in future.
|
||||
(indent-region content-start (line-beginning-position 2))
|
||||
(set-mark content-start))
|
||||
(indent-according-to-mode))
|
||||
;; Indent \stopfoo.
|
||||
(save-excursion (beginning-of-line 2) (indent-according-to-mode)
|
||||
(when additional-indent
|
||||
;; Indent texts sent after the inserted
|
||||
;; environment.
|
||||
(forward-line 1) (indent-according-to-mode)))
|
||||
(setq env-end (save-excursion
|
||||
(search-forward
|
||||
(concat TeX-esc (ConTeXt-environment-stop-name)
|
||||
environment))
|
||||
(match-beginning 0)))
|
||||
(run-hook-with-args 'ConTeXt-after-insert-env-hook
|
||||
environment env-start env-end)))
|
||||
|
||||
(defun ConTeXt--env-parse-args (args)
|
||||
"Helper function to insert arguments defined by ARGS.
|
||||
This function checks if `TeX-exit-mark' is set, otherwise it's
|
||||
set to the point where this function starts. Point will be at
|
||||
`TeX-exit-mark' when this function exits."
|
||||
(let ((TeX-exit-mark (or TeX-exit-mark
|
||||
(point-marker))))
|
||||
(ConTeXt-find-matching-start)
|
||||
(end-of-line)
|
||||
(TeX-parse-arguments args)
|
||||
(goto-char TeX-exit-mark)
|
||||
(set-marker TeX-exit-mark nil)))
|
||||
|
||||
(defun ConTeXt-env-args (environment &rest args)
|
||||
"Insert ENVIRONMENT and arguments defined by ARGS."
|
||||
(ConTeXt-insert-environment environment)
|
||||
(ConTeXt--env-parse-args args))
|
||||
|
||||
|
||||
;; with the following we can call a function on an environment. Say
|
||||
;; with the following we can call a function on an environment. Say
|
||||
;; you have metapost stuff within your TeX file, go to the environment
|
||||
;; and run ConTeXt-work-on-environment (suggested Key: C-c !). AUCTeX
|
||||
;; and run ConTeXt-work-on-environment (suggested Key: C-c !). AUCTeX
|
||||
;; sees that you are inside e.g. \startMPpage....\stopMPpage and
|
||||
;; looks in ConTeXt-environment-helper for a function to be called.
|
||||
|
||||
|
@ -839,7 +948,7 @@ An entry looks like: (\"environment\" . function)")
|
|||
(context-mode)
|
||||
(widen))
|
||||
|
||||
;; find smarter name. Suggestions welcome
|
||||
;; find smarter name. Suggestions welcome
|
||||
(defun ConTeXt-work-on-environment ()
|
||||
"Takes current environment and does something on it (todo: documentation)."
|
||||
(interactive)
|
||||
|
@ -935,10 +1044,10 @@ If INNER is non-nil, go to the point just past the \\start... macro."
|
|||
(setq level (1- level))))))
|
||||
;; now we have to look if we want to start behind the \start... macro
|
||||
(when inner
|
||||
;; \startfoo can have 0 or more {} and [] pairs. I assume that
|
||||
;; skipping all those parens will be smart enough. It fails when
|
||||
;; \startfoo can have 0 or more {} and [] pairs. I assume that
|
||||
;; skipping all those parens will be smart enough. It fails when
|
||||
;; the first part in the \start-\stop-environment is { or [, like
|
||||
;; in \startquotation {\em important} \stopquotation. There is
|
||||
;; in \startquotation {\em important} \stopquotation. There is
|
||||
;; yet another pitfall: \startsetups SomeSetup foo bar
|
||||
;; \stopsetups will use SomeSetup as the argument and the
|
||||
;; environment
|
||||
|
@ -1057,7 +1166,8 @@ header is at the start of a line."
|
|||
"\\|" (ConTeXt-header-end) "\\b"
|
||||
"\\|" (ConTeXt-trailer-start) "\\b"))
|
||||
|
||||
(defvar ConTeXt-text "Name of ConTeXt macro that begins the text body.")
|
||||
(defvar ConTeXt-text nil
|
||||
"Name of ConTeXt macro that begins the text body.")
|
||||
|
||||
(defun ConTeXt-header-end ()
|
||||
"Default end of header marker for ConTeXt documents."
|
||||
|
@ -1148,7 +1258,7 @@ An optional fourth (or sixth) element means always replace if t."
|
|||
(match-string 1)
|
||||
(buffer-substring-no-properties (point) (line-end-position)))))
|
||||
|
||||
;; This imenu also includes commented out chapters. Perhaps a feature
|
||||
;; This imenu also includes commented out chapters. Perhaps a feature
|
||||
;; for LaTeX, not sure we want or need that for ConTeXt.
|
||||
|
||||
(defun ConTeXt-imenu-create-index-function ()
|
||||
|
@ -1349,20 +1459,20 @@ else. There might be text before point."
|
|||
|
||||
(defun ConTeXt-environment-menu-entry (entry)
|
||||
"Create an ENTRY for the environment menu."
|
||||
(vector (car entry) (list 'ConTeXt-environment-menu (car entry)) t))
|
||||
(vector (car entry) (list #'ConTeXt-environment-menu (car entry)) t))
|
||||
|
||||
(defvar ConTeXt-environment-modify-menu-name "Change Environment (C-u C-c C-e)")
|
||||
|
||||
(defun ConTeXt-environment-modify-menu-entry (entry)
|
||||
"Create an ENTRY for the change environment menu."
|
||||
(vector (car entry) (list 'ConTeXt-modify-environment (car entry)) t))
|
||||
(vector (car entry) (list #'ConTeXt-modify-environment (car entry)) t))
|
||||
|
||||
;; ConTeXt define macros
|
||||
(defvar ConTeXt-define-menu-name "Define")
|
||||
|
||||
(defun ConTeXt-define-menu-entry (entry)
|
||||
"Create an ENTRY for the define menu."
|
||||
(vector entry (list 'ConTeXt-define-menu entry)))
|
||||
(vector entry (list #'ConTeXt-define-menu entry)))
|
||||
|
||||
(defun ConTeXt-define-menu (define)
|
||||
"Insert DEFINE from menu."
|
||||
|
@ -1373,7 +1483,7 @@ else. There might be text before point."
|
|||
|
||||
(defun ConTeXt-setup-menu-entry (entry)
|
||||
"Create an ENTRY for the setup menu."
|
||||
(vector entry (list 'ConTeXt-setup-menu entry)))
|
||||
(vector entry (list #'ConTeXt-setup-menu entry)))
|
||||
|
||||
(defun ConTeXt-setup-menu (setup)
|
||||
"Insert SETUP from menu."
|
||||
|
@ -1384,7 +1494,7 @@ else. There might be text before point."
|
|||
|
||||
(defun ConTeXt-referencing-menu-entry (entry)
|
||||
"Create an ENTRY for the referencing menu."
|
||||
(vector entry (list 'ConTeXt-referencing-menu entry)))
|
||||
(vector entry (list #'ConTeXt-referencing-menu entry)))
|
||||
|
||||
(defun ConTeXt-referencing-menu (referencing)
|
||||
"Insert REFERENCING from menu."
|
||||
|
@ -1395,7 +1505,7 @@ else. There might be text before point."
|
|||
|
||||
(defun ConTeXt-other-macro-menu-entry (entry)
|
||||
"Create an ENTRY for the other macro menu."
|
||||
(vector entry (list 'ConTeXt-other-macro-menu entry)))
|
||||
(vector entry (list #'ConTeXt-other-macro-menu entry)))
|
||||
|
||||
(defun ConTeXt-other-macro-menu (other-macro)
|
||||
"Insert OTHER-MACRO from menu."
|
||||
|
@ -1414,7 +1524,7 @@ else. There might be text before point."
|
|||
|
||||
(defun ConTeXt-project-structure-menu-entry (entry)
|
||||
"Create an ENTRY for the project structure menu."
|
||||
(vector entry (list 'ConTeXt-project-structure-menu entry)))
|
||||
(vector entry (list #'ConTeXt-project-structure-menu entry)))
|
||||
|
||||
|
||||
;; meta-structure section blocks menu entries
|
||||
|
@ -1427,7 +1537,7 @@ else. There might be text before point."
|
|||
|
||||
(defun ConTeXt-section-block-menu-entry (entry)
|
||||
"Create an ENTRY for the section block menu."
|
||||
(vector entry (list 'ConTeXt-section-block-menu entry)))
|
||||
(vector entry (list #'ConTeXt-section-block-menu entry)))
|
||||
|
||||
|
||||
;; section menu entries
|
||||
|
@ -1462,25 +1572,23 @@ else. There might be text before point."
|
|||
(defun ConTeXt-numbered-section-menu-entry (entry)
|
||||
"Create an ENTRY for the numbered section menu."
|
||||
(let ((enable (ConTeXt-section-enable-symbol (nth 1 entry))))
|
||||
(set enable t)
|
||||
(vector (car entry) (list 'ConTeXt-numbered-section-menu (nth 1 entry)) enable)))
|
||||
(vector (car entry) (list #'ConTeXt-numbered-section-menu (nth 1 entry)) enable)))
|
||||
|
||||
(defun ConTeXt-unnumbered-section-menu-entry (entry)
|
||||
"Create an ENTRY for the unnumbered section menu."
|
||||
(let ((enable (ConTeXt-section-enable-symbol (nth 1 entry))))
|
||||
(set enable t)
|
||||
(vector (car entry) (list 'ConTeXt-unnumbered-section-menu (nth 1 entry)) enable)))
|
||||
(vector (car entry) (list #'ConTeXt-unnumbered-section-menu (nth 1 entry)) enable)))
|
||||
|
||||
|
||||
;; etexshow support
|
||||
|
||||
(defun ConTeXt-etexshow ()
|
||||
"Call etexshow, if available, to show the definition of a ConText macro."
|
||||
"Call etexshow, if available, to show the definition of a ConTeXt macro."
|
||||
(interactive)
|
||||
(if (fboundp 'etexshow)
|
||||
(let ()
|
||||
(if (fboundp 'etexshow-cmd)
|
||||
(progn
|
||||
(require 'etexshow)
|
||||
(funcall (symbol-function 'etexshow-cmd)))
|
||||
(etexshow-cmd))
|
||||
(error "etexshow is not installed. Get it from http://levana.de/emacs/")))
|
||||
|
||||
;; menu itself
|
||||
|
@ -1651,7 +1759,7 @@ Use `ConTeXt-Mark-version' to choose the command."
|
|||
(let ((engine (eval (nth 4 (TeX-engine-in-engine-alist TeX-engine)) t)))
|
||||
(when engine
|
||||
(format "--engine=%s " engine)))
|
||||
(unless (eq ConTeXt-current-interface "en")
|
||||
(unless (string= ConTeXt-current-interface "en")
|
||||
(format "--interface=%s " ConTeXt-current-interface))
|
||||
(when TeX-source-correlate-mode
|
||||
(format "--passon=\"%s\" "
|
||||
|
@ -1681,19 +1789,22 @@ Use `ConTeXt-Mark-version' to choose the command."
|
|||
ConTeXt-extra-paragraph-commands
|
||||
ConTeXt-environment-list)
|
||||
"List of variables to be set from languages specific ones.")
|
||||
;; Make language specific variables buffer local
|
||||
(dolist (symbol ConTeXt-language-variable-list)
|
||||
(make-variable-buffer-local symbol))
|
||||
|
||||
(defconst ConTeXt-dialect :context
|
||||
"Default dialect for use with function `TeX-add-style-hook' for
|
||||
argument DIALECT-EXPR when the hook is to be run only on ConTeXt
|
||||
file, or any mode derived thereof. See variable
|
||||
file, or any mode derived thereof. See variable
|
||||
`TeX-style-hook-dialect'." )
|
||||
|
||||
(defcustom ConTeXt-clean-intermediate-suffixes
|
||||
;; See *suffixes in texutil.pl.
|
||||
'("\\.tui" "\\.tup" "\\.ted" "\\.tes" "\\.top" "\\.log" "\\.tmp" "\\.run"
|
||||
"\\.bck" "\\.rlg" "\\.mpt" "\\.mpx" "\\.mpd" "\\.mpo" "\\.tuo" "\\.tub"
|
||||
"\\.top" "-mpgraph\\.mp" "-mpgraph\\.mpd" "-mpgraph\\.mpo" "-mpgraph\\.mpy"
|
||||
"-mprun\\.mp" "-mprun\\.mpd" "-mprun\\.mpo" "-mprun\\.mpy")
|
||||
"\\.top" "\\.tuc" "-mpgraph\\.mp" "-mpgraph\\.mpd" "-mpgraph\\.mpo"
|
||||
"-mpgraph\\.mpy" "-mprun\\.mp" "-mprun\\.mpd" "-mprun\\.mpo" "-mprun\\.mpy")
|
||||
"List of regexps matching suffixes of files to be deleted.
|
||||
The regexps will be anchored at the end of the file name to be matched,
|
||||
that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $."
|
||||
|
@ -1724,10 +1835,6 @@ that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $."
|
|||
(setq local-abbrev-table context-mode-abbrev-table)
|
||||
(set (make-local-variable 'TeX-style-hook-dialect) ConTeXt-dialect)
|
||||
|
||||
;; Make language specific variables buffer local
|
||||
(dolist (symbol ConTeXt-language-variable-list)
|
||||
(make-variable-buffer-local symbol))
|
||||
|
||||
(require (intern (concat "context-" ConTeXt-current-interface)))
|
||||
(dolist (symbol ConTeXt-language-variable-list)
|
||||
(set symbol (symbol-value (intern (concat (symbol-name symbol) "-"
|
||||
|
@ -1737,7 +1844,7 @@ that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $."
|
|||
(setq ConTeXt-indent-item-re (concat "\\\\\\(" (mapconcat #'identity ConTeXt-item-list "\\|") "\\)\\>"))
|
||||
|
||||
;; What's the deepest level at we can collapse a document?
|
||||
;; set only if user has not set it. Need to be set before menu is created.
|
||||
;; set only if user has not set it. Need to be set before menu is created.
|
||||
;; level 2 is "section"
|
||||
(or ConTeXt-largest-level
|
||||
(setq ConTeXt-largest-level 2))
|
|
@ -12,7 +12,7 @@ This manual is for @AUCTeX{}
|
|||
(version @value{VERSION} from @value{UPDATED}),
|
||||
a sophisticated @TeX{} environment for Emacs.
|
||||
|
||||
Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2022
|
||||
Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
|
@ -433,14 +433,14 @@ will blink when @code{blink-matching-paren} is non-nil. If
|
|||
@code{TeX-electric-math} is nil, typing @kbd{$} simply inserts @samp{$}
|
||||
at point, this is the default.
|
||||
|
||||
Besides @code{nil}, possible values for this variable are @code{(cons
|
||||
"$" "$")} for @TeX{} inline equations @samp{$...$}, and @code{(cons
|
||||
"\\(" "\\)")} for @LaTeX{} inline equations @samp{\(...\)}.
|
||||
Besides @code{nil}, possible values for this variable are @code{("$"
|
||||
. "$")} for @TeX{} inline equations @samp{$...$}, and @code{("\(" . "\)")}
|
||||
for @LaTeX{} inline equations @samp{\(...\)}.
|
||||
|
||||
If the variable is non-nil and point is inside math mode right between a
|
||||
couple of single dollars, pressing @kbd{$} will insert another pair of
|
||||
dollar signs and leave the point between them. Thus, if
|
||||
@code{TeX-electric-math} is set to @code{(cons "$" "$")} you can easily
|
||||
@code{TeX-electric-math} is set to @code{("$" . "$")} you can easily
|
||||
obtain a @TeX{} display equation @samp{$$...$$} by pressing @kbd{$}
|
||||
twice in a row. (Note that you should not use double dollar signs in
|
||||
@LaTeX{} because this practice can lead to wrong spacing in typeset
|
||||
|
@ -468,6 +468,20 @@ following to your init file
|
|||
(cons "\\(" "\\)"))))
|
||||
@end lisp
|
||||
|
||||
Math mode which didn't start with dollar(s) shouldn't be closed with dollar.
|
||||
@defopt TeX-refuse-unmatched-dollar
|
||||
This option determines the behavior when the user types @kbd{$} at a
|
||||
position where @AUCTeX{} thinks that it is in math mode which didn't start
|
||||
with dollar(s).
|
||||
|
||||
When this option is @code{nil}, @AUCTeX{} behaves in the same way as
|
||||
non-math mode, assuming that the user knows it isn't in math mode
|
||||
actually. This is the default.
|
||||
|
||||
When this option is non-@code{nil}, @AUCTeX{} refuses to insert @samp{$}
|
||||
to prevent unmatched dollar.
|
||||
@end defopt
|
||||
|
||||
Note that Texinfo mode does nothing special for @kbd{$}. It inserts
|
||||
dollar sign(s) just in the same way as the other normal keys do.
|
||||
|
||||
|
@ -1326,7 +1340,7 @@ define and register custom @code{completion-at-point} functions and when the
|
|||
user invokes @code{completion-at-point} (usually bound to
|
||||
@kbd{M-@key{TAB}}), all such registered functions are consulted for
|
||||
checking for possible completions. Modern completion UIs like
|
||||
@i{company-mode} support this completion-at-point facility.
|
||||
@i{company-mode} or @i{corfu} support this completion-at-point facility.
|
||||
|
||||
@defun TeX--completion-at-point
|
||||
@AUCTeX{}'s completion-at-point function which is automatically added to
|
||||
|
@ -1339,6 +1353,17 @@ It offers the same completion candidates as would
|
|||
like @i{company-mode}.
|
||||
@end defun
|
||||
|
||||
@defun LaTeX--arguments-completion-at-point
|
||||
@AUCTeX{}'s completion-at-point function inside arguments which is
|
||||
automatically added to @code{completion-at-point-functions} in @LaTeX{}
|
||||
buffers.
|
||||
|
||||
It offers the completion candidates stored in the variables
|
||||
@code{TeX-symbol-list} and @code{LaTeX-environment-list} for single
|
||||
candidate, multiple candidates separated by commas, or key-value
|
||||
candidates separated by commas and/or equal signs.
|
||||
@end defun
|
||||
|
||||
A more direct way to insert a macro is with @code{TeX-insert-macro},
|
||||
bound to @kbd{C-c C-m} which is equivalent to @kbd{C-c @key{RET}}. It
|
||||
has the advantage over completion that it knows about the argument of
|
||||
|
@ -1781,6 +1806,40 @@ prepared for similar side effects when you do.
|
|||
Note that commented curly braces @code{@{} and @code{@}} aren't counted
|
||||
when @AUCTeX{} computes indentation.
|
||||
|
||||
In docTeX-mode, @TeX{} code is enclosed in @samp{macrocode} environment
|
||||
like this:
|
||||
@example
|
||||
% \begin@{macrocode@}
|
||||
\def\foo#1@{%
|
||||
$#1$%
|
||||
@}
|
||||
% \end@{macrocode@}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Sometimes, the code is long and one wants to insert comments inside the
|
||||
@TeX{} code like this:
|
||||
@example
|
||||
% \begin@{macrocode@}
|
||||
\def\foo#1@{%
|
||||
% \end@{macrocode@}
|
||||
% Comment the next line of code
|
||||
% \begin@{macrocode@}
|
||||
$#1$%
|
||||
@}
|
||||
% \end@{macrocode@}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Usually, the comment inside the code interrupts the indentation. This
|
||||
behavior can be controlled by setting the variable
|
||||
@code{docTeX-indent-across-comments}.
|
||||
|
||||
@defopt docTeX-indent-across-comments
|
||||
If non-nil, indentation in docTeX is done across comments. This option is
|
||||
disabled by default.
|
||||
@end defopt
|
||||
|
||||
@node Filling
|
||||
@section Filling
|
||||
@cindex Filling
|
||||
|
@ -2258,11 +2317,11 @@ described above. You can disable these defaults per class by
|
|||
customizing the variable @code{font-latex-deactivated-keyword-classes}.
|
||||
This is a list of strings for keyword classes to be deactivated. Valid
|
||||
entries are "warning", "variable", "biblatexnoarg", "biblatex",
|
||||
"reference", "function" , "sectioning-0", "sectioning-1",
|
||||
"reference", "function", "function-noarg", "sectioning-0", "sectioning-1",
|
||||
"sectioning-2", "sectioning-3", "sectioning-4", "sectioning-5",
|
||||
"slide-title", "textual", "bold-command", "italic-command",
|
||||
"underline-command", "math-command", "type-command", "bold-declaration",
|
||||
"italic-declaration", "type-declaration".
|
||||
"italic-declaration" or "type-declaration".
|
||||
|
||||
You can also get rid of certain keywords only. For example if you want
|
||||
to remove highlighting of footnotes as references you can put the
|
||||
|
@ -4135,6 +4194,15 @@ list of manuals of the given package among to choose.
|
|||
|
||||
The command can be invoked by the key binding mentioned above as well as
|
||||
the @samp{Find Documentation...} entry in the mode menu.
|
||||
|
||||
Note that this command assumes @url{https://tug.org/texlive/,
|
||||
@w{@TeX{} Live}}, not @url{https://miktex.org/,MiK@TeX{}}; according to
|
||||
@url{https://tug.org/texdoc/, @samp{Texdoc} site},
|
||||
@quotation
|
||||
A command named @command{texdoc} is also available in MiK@TeX{}, but it is
|
||||
merely a shortcut for an independent program, @command{mthelp}.
|
||||
@end quotation
|
||||
Thus it isn't sure whether this command works for MiK@TeX{} or not.
|
||||
@end deffn
|
||||
|
||||
@node Customization
|
||||
|
@ -5625,6 +5693,19 @@ Following is a list of available hooks for
|
|||
@item LaTeX-env-item
|
||||
Insert the given environment and the first item.
|
||||
|
||||
@item LaTeX-env-item-args
|
||||
Insert the given environment plus further arguments, and the first item.
|
||||
You can use this as a hook in case you want to specify multiple complex
|
||||
arguments just like in elements of @code{TeX-add-symbols}. Here is an
|
||||
example from @file{enumitem.el} in order to prompt for a @samp{key=value}
|
||||
list to be inserted as an optional argument to the @samp{itemize}
|
||||
environment:
|
||||
@lisp
|
||||
(LaTeX-add-environments
|
||||
'("itemize" LaTeX-env-item-args
|
||||
[TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
|
||||
@end lisp
|
||||
|
||||
@item LaTeX-env-figure
|
||||
Insert the given figure-like environment with a caption and a label.
|
||||
|
||||
|
@ -5635,6 +5716,10 @@ specifications.
|
|||
@item LaTeX-env-label
|
||||
Insert the given environment with a label.
|
||||
|
||||
@item LaTeX-env-label-args
|
||||
Insert the given environment with a label and further arguments to the
|
||||
environment.
|
||||
|
||||
@item LaTeX-env-list
|
||||
Insert the given list-like environment, a specifier for the label and
|
||||
the first item.
|
|
@ -11,6 +11,29 @@
|
|||
@heading News since last release
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
@AUCTeX{} now requires GNU Emacs 26.1 or higher.
|
||||
|
||||
@end itemize
|
||||
|
||||
@heading News in 13.2
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
@AUCTeX{} no longer refuses to insert dollar sign when you type @kbd{$} at
|
||||
point where @AUCTeX{} thinks the current math mode didn't start with
|
||||
dollar(s). @AUCTeX{} assumes the user knows that it isn't in math mode
|
||||
actually.
|
||||
|
||||
You can keep the former behavior by enabling the new customize option
|
||||
@code{TeX-refuse-unmatched-dollar}.
|
||||
|
||||
@item
|
||||
@AUCTeX{} supports completion-at-point of macro and environment arguments
|
||||
in @LaTeX{} buffers. The responsible function recognizes the argument
|
||||
position and extracts the corresponding candidates from the variables
|
||||
@code{TeX-symbol-list} and @code{LaTeX-environment-list}.
|
||||
|
||||
@item
|
||||
@AUCTeX{} underlines the argument of macros which produce underlined text
|
||||
in the final product with @code{font-latex-underline-face}. The
|
|
@ -1,5 +1,5 @@
|
|||
@c This is part of the AUCTeX Manual.
|
||||
@c Copyright (C) 2004-2014, 2021, 2022 Free Software Foundation, Inc.
|
||||
@c Copyright (C) 2004-2023 Free Software Foundation, Inc.
|
||||
@c See the file auctex.texi for copying conditions.
|
||||
@ifset rawfile
|
||||
@include macros.texi
|
||||
|
@ -71,7 +71,7 @@ statements related to the problem.
|
|||
@item
|
||||
What versions of Emacs are supported?
|
||||
|
||||
@AUCTeX{} was tested with @w{GNU Emacs 25.1}. Older versions may work but
|
||||
@AUCTeX{} was tested with @w{GNU Emacs 26.1}. Older versions may work but
|
||||
are unsupported.
|
||||
|
||||
@item
|
|
@ -1,6 +1,6 @@
|
|||
@c This is part of the AUCTeX Manual.
|
||||
@c Copyright (C) 1994, 1996, 2003-2007, 2012-2013,
|
||||
@c 2015, 2017, 2018, 2020, 2021 Free Software Foundation, Inc.
|
||||
@c 2015-2023 Free Software Foundation, Inc.
|
||||
@c See the file auctex.texi for copying conditions.
|
||||
@ifset rawfile
|
||||
@include macros.texi
|
||||
|
@ -96,7 +96,7 @@ the file @file{INSTALL.windows}.
|
|||
@end ifclear
|
||||
|
||||
@itemize @bullet
|
||||
@item GNU Emacs 25.1 or higher
|
||||
@item GNU Emacs 26.1 or higher
|
||||
|
||||
Using @previewlatex{} requires a version of Emacs compiled with image
|
||||
support.
|
|
@ -50,30 +50,30 @@ font-latex
|
|||
@end ifset
|
||||
@tex
|
||||
\global\let\savedTeX\TeX
|
||||
\gdef\TeX#1{\savedTeX#1}
|
||||
\gdef\LaTeX{%
|
||||
\gdef\TeX#{\savedTeX}
|
||||
\gdef\LaTeX#{%
|
||||
L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX}
|
||||
\gdef\previewlatex#1{%
|
||||
{\sf preview-latex}#1}
|
||||
\gdef\fontlatex#1{%
|
||||
{\sf font-latex}#1}
|
||||
\gdef\AUCTeX{AUC\TeX}
|
||||
\gdef\ConTeXt#1{%
|
||||
Con\TeX t#1}
|
||||
\gdef\previewlatex#{%
|
||||
{\textsf preview-latex}}
|
||||
\gdef\fontlatex#{%
|
||||
{\textsf font-latex}}
|
||||
\gdef\AUCTeX#{AUC\TeX}
|
||||
\gdef\ConTeXt#{%
|
||||
Con\TeX{}t}
|
||||
\toks0\expandafter{\indexnofonts
|
||||
\def\TeX#1{TeX#1}%
|
||||
\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
|
||||
\def\TeX#{TeX}%
|
||||
\def\LaTeX#{LaTeX}\def\previewlatex#{preview-latex}}
|
||||
\xdef\indexnofonts{\the\toks0}
|
||||
\ifx\commondummies\undefined \else
|
||||
\toks0\expandafter{\commondummies
|
||||
\def\TeX#1{TeX#1}%
|
||||
\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
|
||||
\def\TeX#{TeX}%
|
||||
\def\LaTeX#1{LaTeX}\def\previewlatex#1{preview-latex}}
|
||||
\xdef\commondummies{\the\toks0}
|
||||
\fi
|
||||
\ifx\definedummies\undefined \else
|
||||
\toks0\expandafter{\definedummies
|
||||
\def\TeX#1{TeX#1}%
|
||||
\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
|
||||
\def\TeX#{TeX}%
|
||||
\def\LaTeX#{LaTeX}\def\previewlatex#{preview-latex}}
|
||||
\xdef\definedummies{\the\toks0}
|
||||
\fi
|
||||
\ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi
|
0
code/elpa/auctex-13.1.5/doc/preview-dtxdoc.pl → code/elpa/auctex-13.2.1/doc/preview-dtxdoc.pl
Executable file → Normal file
0
code/elpa/auctex-13.1.5/doc/preview-dtxdoc.pl → code/elpa/auctex-13.2.1/doc/preview-dtxdoc.pl
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
|||
@c This is part of the preview-latex manual.
|
||||
@c Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009
|
||||
@c 2017, 2021 Free Software Foundation, Inc.
|
||||
@c 2017, 2021-2023 Free Software Foundation, Inc.
|
||||
@c See file preview-latex.texi for copying conditions.
|
||||
@ifset rawfile
|
||||
@include macros.texi
|
||||
|
@ -48,7 +48,7 @@ to @email{auctex-devel@@gnu.org}.
|
|||
@subsection Which version of Emacs is needed?
|
||||
|
||||
@previewlatex{} nominally requires @w{GNU Emacs} with a version of at
|
||||
least 25.1.
|
||||
least 26.1.
|
||||
|
||||
@subsection Which versions of Ghostscript and @AUCTeX{} are needed?
|
||||
|
|
@ -42,9 +42,9 @@
|
|||
% Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
|
||||
% for creating the GNU Emacs Reference Card from which this was mutated
|
||||
|
||||
\def\versionnumber{13.1}
|
||||
\def\year{2022}
|
||||
\def\version{February \year\ v\versionnumber}
|
||||
\def\versionnumber{13.2}
|
||||
\def\year{2023}
|
||||
\def\version{April \year\ v\versionnumber}
|
||||
|
||||
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
|
||||
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
|
|
@ -1,6 +1,6 @@
|
|||
;;; font-latex.el --- LaTeX fontification for Font Lock mode. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1996-2022 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1996-2023 Free Software Foundation, Inc.
|
||||
|
||||
;; Authors: Peter S. Galbraith <psg@debian.org>
|
||||
;; Simon Marshall <Simon.Marshall@esrin.esa.it>
|
||||
|
@ -365,21 +365,22 @@ variable `font-latex-fontify-sectioning'." ',num)
|
|||
("labelformat" "{{") ("linespread" "{")
|
||||
("AddToHook" "{[{") ("RemoveFromHook" "{[") ("AddToHookNext" "{{")
|
||||
("ProvidesClass" "{[") ("ProvidesPackage" "{[") ("ProvidesFile" "{[")
|
||||
("NewMarkClass" "{")
|
||||
;; XXX: Should macros without arguments rather be listed in a
|
||||
;; separate category with 'noarg instead of 'command handling?
|
||||
("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "")
|
||||
("bigskip" "") ("medskip" "") ("smallskip" "")
|
||||
("thinspace" "") ("negthinspace" "")
|
||||
("thicklines" "") ("thinlines" "")
|
||||
("noindent" "") ("hline" "") ("ldots" "")
|
||||
("centering" "") ("raggedright" "") ("raggedleft" "")
|
||||
("raggedbottom" "") ("flushbottom" "")
|
||||
("TeX" "") ("LaTeX" "") ("LaTeXe" "")
|
||||
("normalfont" "") ("normalshape" "")
|
||||
("tableofcontents" "") ("listoffigures" "") ("listoftables" "")
|
||||
("maketitle" ""))
|
||||
("NewMarkClass" "{"))
|
||||
font-lock-function-name-face 2 command)
|
||||
("function-noarg"
|
||||
("enspace" "enskip" "quad" "qquad" "nonumber"
|
||||
"bigskip" "medskip" "smallskip"
|
||||
"thinspace" "negthinspace"
|
||||
"thicklines" "thinlines"
|
||||
"noindent" "hline" "ldots"
|
||||
"centering" "raggedright" "raggedleft"
|
||||
"raggedbottom" "flushbottom"
|
||||
"TeX" "LaTeX" "LaTeXe"
|
||||
"normalfont" "normalshape"
|
||||
"tableofcontents" "listoffigures" "listoftables"
|
||||
"maketitle" "makeindex" "makeglossary"
|
||||
"sloppy" "fussy")
|
||||
font-lock-keyword-face 2 noarg)
|
||||
("sectioning-0"
|
||||
(("part" "*[{"))
|
||||
(if (eq font-latex-fontify-sectioning 'color)
|
||||
|
@ -481,12 +482,13 @@ will match macros of the form \"\\foo[bar]{baz}\"."))
|
|||
"List of strings for built-in keyword classes to be deactivated.
|
||||
|
||||
Valid entries are \"warning\", \"variable\", \"biblatexnoarg\",
|
||||
\"biblatex\", \"reference\", \"function\" , \"sectioning-0\",
|
||||
\"sectioning-1\", \"sectioning-2\", \"sectioning-3\",
|
||||
\"sectioning-4\", \"sectioning-5\", \"slide-title\", \"textual\",
|
||||
\"bold-command\", \"italic-command\", \"underline-command\",
|
||||
\"math-command\", \"type-command\", \"bold-declaration\",
|
||||
\"italic-declaration\", \"type-declaration\".
|
||||
\"biblatex\", \"reference\", \"function\", \"function-noarg\",
|
||||
\"sectioning-0\", \"sectioning-1\", \"sectioning-2\",
|
||||
\"sectioning-3\", \"sectioning-4\", \"sectioning-5\",
|
||||
\"slide-title\", \"textual\", \"bold-command\",
|
||||
\"italic-command\", \"underline-command\", \"math-command\",
|
||||
\"type-command\", \"bold-declaration\", \"italic-declaration\" or
|
||||
\"type-declaration\".
|
||||
|
||||
You have to restart Emacs for a change of this variable to take effect."
|
||||
:group 'font-latex-keywords
|
||||
|
@ -631,12 +633,12 @@ use."
|
|||
(if (eq type 'command)
|
||||
"\
|
||||
This must be a list where each element is a list consisting of a
|
||||
keyword string \(not a regular expression\) omitting the leading
|
||||
keyword string (not a regular expression) omitting the leading
|
||||
backslash and a format specifier as described in the doc string of
|
||||
`font-latex-user-keyword-classes'."
|
||||
"\
|
||||
This must be a list where each element is a keyword string \(not a
|
||||
regular expression\) omitting the leading backslash.")
|
||||
This must be a list where each element is a keyword string (not a
|
||||
regular expression) omitting the leading backslash.")
|
||||
|
||||
"\n\n\
|
||||
This is an internal variable which should not be set directly.
|
||||
|
@ -913,7 +915,7 @@ Generated by `font-latex-make-user-keywords'.")))
|
|||
KEYWORDS is a list of keywords or keywords with syntax specs.
|
||||
CLASS corresponds to a keyword class and can be one of the
|
||||
symbols `warning', `variable', `reference', `biblatexnoarg',
|
||||
`biblatex', `function', `sectioning-0', `sectioning-1',
|
||||
`biblatex', `function', `function-noarg', `sectioning-1',
|
||||
`sectioning-2', `sectioning-3', `sectioning-4', `sectioning-5',
|
||||
`slide-title', `textual', `bold-command', `italic-command',
|
||||
`underline-command', `math-command', `type-command',
|
||||
|
@ -1095,8 +1097,16 @@ have changed."
|
|||
;; Some macros take an optional argument. This is
|
||||
;; the same line as above for environments.
|
||||
"\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
|
||||
"\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)")
|
||||
(1 "|") (2 "|")))))
|
||||
;; Within verb macros with braces, only balanced
|
||||
;; pairs of braces are allowed; so we respect this
|
||||
;; and allow one level of balanced braces. Give
|
||||
;; escape char(s) at the end of the verbatim
|
||||
;; construct punctuation syntax.
|
||||
"\\({\\)[^}{]*?"
|
||||
"\\(?:{[^}{]*}[^}{]*?\\)*"
|
||||
"\\(" (regexp-quote TeX-esc) "*\\)"
|
||||
"\\(}\\)")
|
||||
(1 "|") (2 ".") (3 "|")))))
|
||||
(when font-latex-syntactic-keywords-extra
|
||||
(nconc font-latex-syntactic-keywords font-latex-syntactic-keywords-extra))
|
||||
;; ;; Cater for docTeX mode.
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue