Initial commit.

This commit is contained in:
2016-02-18 14:53:30 +01:00
commit 8e93ca7a95
2215 changed files with 341269 additions and 0 deletions

View File

@@ -0,0 +1 @@
;; AUCTeX style/ and auto/ directories should not appear in load path.

View File

@@ -0,0 +1,98 @@
;;; Alegreya.el --- AUCTeX style for `Alegreya.sty' (v2015/10/22)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-09-12
;; 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 `Alegreya.sty' (v2015/10/22).
;; `Alegreya.sty' is part of TeXLive.
;;; Code:
(TeX-add-style-hook
"Alegreya"
(lambda ()
;; Run style hook for packages loaded by Alegreya
(TeX-run-style-hooks "textcomp")
;; Load `fontaxes' or `fontspec' dep. on `type1' option:
(if (or (LaTeX-provided-package-options-member "Alegreya" "type1")
(LaTeX-provided-package-options-member "Alegreya" "type1=true"))
(TeX-run-style-hooks "fontaxes")
(TeX-run-style-hooks "fontspec"))
(TeX-add-symbols
;; Should be used in preamble only
'("useosf")
;; Text commands
'("Alegreya" -1)
'("AlegreyaBlack" -1)
'("AlegreyaLF" -1)
'("AlegreyaOsF" -1)
'("AlegreyaTLF" -1)
'("AlegreyaTOsF" -1)
'("textsu" t) ; superior figures
'("sufigures" -1) ;
'("textin" t) ; inferior figures
'("infigures" -1))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("textsu" "{")
("textin" "{"))
'type-command)
(font-latex-add-keywords '(("Alegreya" "")
("AlegreyaBlack" "")
("AlegreyaLF" "")
("AlegreyaOsF" "")
("AlegreyaTLF" "")
("AlegreyaTOsF" "")
("sufigures" "")
("infigures" ""))
'type-declaration)))
LaTeX-dialect)
(defvar LaTeX-Alegreya-package-options-list
'(("lining" ("true" "false"))
("lf" ("true" "false"))
("oldstyle" ("true" "false"))
("osf" ("true" "false"))
("tabular" ("true" "false"))
("tf" ("true" "false"))
("proportional" ("true" "false"))
("pf" ("true" "false"))
("black" ("true" "false"))
("type1" ("true" "false"))
("scaled")
("scale"))
"Package options for the Alegreya package.")
(defun LaTeX-Alegreya-package-options ()
"Prompt for package options for the Alegreya package."
(TeX-read-key-val t LaTeX-Alegreya-package-options-list))
;;; Alegreya.el ends here

Binary file not shown.

View File

@@ -0,0 +1,110 @@
;;; AlegreyaSans.el --- AUCTeX style for `AlegreyaSans.sty' (v2015/10/22)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-09-12
;; 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 `AlegreyaSans.sty' (v2015/10/22).
;; `AlegreyaSans.sty' is part of TeXLive.
;;; Code:
(TeX-add-style-hook
"AlegreyaSans"
(lambda ()
;; Run style hook for packages loaded by AlegreyaSans
(TeX-run-style-hooks "textcomp")
;; Load `fontaxes' or `fontspec' dep. on `type1' option:
(if (or (LaTeX-provided-package-options-member "AlegreyaSans" "type1")
(LaTeX-provided-package-options-member "AlegreyaSans" "type1=true"))
(TeX-run-style-hooks "fontaxes")
(TeX-run-style-hooks "fontspec"))
(TeX-add-symbols
;; Should be used in preamble only
'("useosf")
;; Text commands
'("AlegreyaSans" -1)
'("AlegreyaSansLF" -1)
'("AlegreyaSansOsF" -1)
'("AlegreyaSansTLF" -1)
'("AlegreyaSansTOsF" -1)
'("AlegreyaSansThin" -1)
'("AlegreyaSansLight" -1)
'("AlegreyaSansMedium" -1)
'("AlegreyaSansExtraBold" -1)
'("AlegreyaSansBlack" -1)
'("textsu" t) ; superior figures
'("sufigures" -1) ;
'("textin" t) ; inferior figures
'("infigures" -1))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("textsu" "{")
("textin" "{"))
'type-command)
(font-latex-add-keywords '(("AlegreyaSans" "")
("AlegreyaSansLF" "")
("AlegreyaSansOsF" "")
("AlegreyaSansTLF" "")
("AlegreyaSansTOsF" "")
("AlegreyaSansLight" "")
("AlegreyaSansMedium" "")
("AlegreyaSansExtraBold" "")
("AlegreyaSansBlack" "")
("sufigures" "")
("infigures" ""))
'type-declaration)))
LaTeX-dialect)
(defvar LaTeX-AlegreyaSans-package-options-list
'(("lining" ("true" "false"))
("lf" ("true" "false"))
("oldstyle" ("true" "false"))
("osf" ("true" "false"))
("tabular" ("true" "false"))
("tf" ("true" "false"))
("proportional" ("true" "false"))
("pf" ("true" "false"))
("black" ("true" "false"))
("extrabold" ("true" "false"))
("thin" ("true" "false"))
("light" ("true" "false"))
("medium" ("true" "false"))
("type1" ("true" "false"))
("sfdefault" ("true" "false"))
("scaled")
("scale"))
"Package options for the AlegreyaSans package.")
(defun LaTeX-AlegreyaSans-package-options ()
"Prompt for package options for the AlegreyaSans package."
(TeX-read-key-val t LaTeX-AlegreyaSans-package-options-list))
;;; AlegreyaSans.el ends here

Binary file not shown.

View File

@@ -0,0 +1,90 @@
;;; AnonymousPro.el --- AUCTeX style for `AnonymousPro.sty' (v2.1)
;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; 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 `AnonymousPro.sty' (v2.1) from
;; 2014/03/22. `AnonymousPro.sty' is part of TeXLive.
;;; Code:
(TeX-add-style-hook
"AnonymousPro"
(lambda ()
;; Run style hook for textcomp
(TeX-run-style-hooks "textcomp")
;; New symbols
(TeX-add-symbols
"ANPapplelogo"
"ANPappleopen"
"ANPapproxequal"
"ANPback"
"ANPblackdiamond"
"ANPcheckmark"
"ANPcopy"
"ANPellipsis"
"ANPendtab"
"ANPerasetotheright"
"ANPgreaterequal"
"ANPHbar"
"ANPhbar"
"ANPinfinity"
"ANPinsert"
"ANPintegral"
"ANPlessequal"
"ANPlozenge"
"ANPnotequal"
"ANPoptionkey"
"ANPpartialdiff"
"ANPPi"
"ANPpi"
"ANPproduct"
"ANPshift"
"ANPshiftlock"
"ANPSigma"
"ANPsigma"
"ANPsigmaone"
"ANPsummation"
"ANPtab"
"ANPReturnSign"
"ANPShoulderedOpenBox"
"ANPUpArrowHead"
"ANPInsertSign"
"ANPUpArrowHeadBars"
"ANPHelm"
"ANPOpenBox"
"ANPDelta"
"ANPverticaltab"
"ANPNumeroSign"))
LaTeX-dialect)
(defvar LaTeX-AnonymousPro-package-options
'("ttdefault" "scale")
"Package options for the AnonymousPro package.")
;;; AnonymousPro.el ends here

Binary file not shown.

View File

@@ -0,0 +1,94 @@
;;; CJK.el --- AUCTeX style for the CJK package.
;; Copyright (C) 2009, 2014 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2009-01-04
;; 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 CJK package, version 4.8.0
;; (22-May-2008).
;;; Code:
(defvar LaTeX-CJK-package-options
'("lowercase" "global" "local" "active" "encapsulated")
"Package options for the CJK package.")
(defvar LaTeX-CJK-enc-list
'("Bg5" "Bg5+" "HK" "GB" "GBt" "GBK" "JIS" "JIS2" "SJIS" "KS" "UTF8" "CNS1"
"CNS2" "CNS3" "CNS4" "CNS5" "CNS6" "CNS7" "CEFX" "CEFY")
"List of encodings supported by the CJK package.")
(defun LaTeX-env-CJK (env)
"Prompt for the arguments of ENV and insert it.
The function can be used for CJK and CJK* environments."
(LaTeX-insert-environment
env
(concat
(let ((font-enc (TeX-read-string "(Optional) Font encoding: ")))
(unless (zerop (length font-enc)) (format "[%s]" font-enc)))
(format "{%s}" (completing-read "Encoding: "
(mapcar 'list LaTeX-CJK-enc-list)))
(format "{%s}" (TeX-read-string "Font family: ")))))
(TeX-add-style-hook
"CJK"
(lambda ()
;; New symbols
(TeX-add-symbols
'("CJKencfamily" ["Font encoding"] "Encoding" "Font family")
'("CJKchar" ["Encoding"] "First byte" "Second byte")
'("CJKcaption" 1)
'("CJKfamily" 1)
'("CJKfontenc" "Encoding" "Font encoding")
'("CJKenc" 1)
'("Unicode" "First byte" "Second byte")
'("CJKsymbols" 2)
'("CJKsymbol" 1)
"CJKbold"
"CJKnormal"
"CJKboldshift"
"CJKCJKchar"
"CJKhangulchar"
"CJKlatinchar"
"CJKhwkatakana"
"CJKnohwkatakana"
"CJKglue"
"CJKtolerance"
"CJKtilde"
"nbs"
"standardtilde"
"CJKspace"
"CJKnospace"
"CJKindent"
'("CJKaddEncHook" 2)
"CJKkern"
"CJKverbatim")
;; New environments
(LaTeX-add-environments
'("CJK" LaTeX-env-CJK)
'("CJK*" LaTeX-env-CJK)))
LaTeX-dialect)
;;; CJK.el ends here

Binary file not shown.

View File

@@ -0,0 +1,39 @@
;;; CJKutf8.el --- AUCTeX style for the CJKutf8 package.
;; Copyright (C) 2009 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2009-01-04
;; 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 CJKutf8 package.
;;; Code:
(TeX-add-style-hook
"CJKutf8"
(lambda ()
(TeX-run-style-hooks "CJK"))
LaTeX-dialect)
;;; CJKutf8.el ends here

Binary file not shown.

View File

@@ -0,0 +1,69 @@
;;; MinionPro.el -- AUCTeX style for MinionPro.sty
;; Copyright (C) 2005, 2014 Free Software Foundation, Inc.
;; Author: Mark Trettin <Mark.Trettin@gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2005-11-26
;; 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 `MinionPro.sty' (v2.3) from 2012/08/03.
;; The latest version of MinionPro is available as part of FontPro
;; bundle from <https://www.github.com/sebschub>.
;;; Code:
(TeX-add-style-hook
"MinionPro"
(lambda ()
;; New symbols
(TeX-add-symbols
'("smallfrac" "Numerator" "Denominator")
'("slantfrac" "Numerator" "Denominator"))
;; Run style hook for amsmath which is loaded via MnSymbol
(TeX-run-style-hooks "amsmath" "fontaxes" "textcomp")
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("smallfrac" "{{")
("slantfrac" "{{"))
'textual)))
LaTeX-dialect)
(defvar LaTeX-MinionPro-package-options
'("smallfamily" "medfamily" "fullfamily" "noopticals" "opticals"
"slides" "textosf" "mathosf" "osf" "textlf" "mathlf" "lf"
"mathtabular" "mnsy" "cmsy" "swash" "abx" "amsbb" "fourierbb"
"lucidabb" "mixedgreek" "italicgreek" "frenchmath" "minionint"
"footnotefigures"
;; Additional options in v2.1
"onlytext" "onlymath" "loosequotes" "openg" "normalsize" "nonormalsize"
;; Additional option in v2.2
"scale")
"Package options for the MinionPro package.")
;;; MinionPro.el ends here

Binary file not shown.

View File

@@ -0,0 +1,94 @@
;;; MyriadPro.el --- AUCTeX style for `MyriadPro.sty' (v0.5)
;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2014-10-21
;; 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 `MyriadPro.sty' (v0.5) from 2013/04/20.
;; The latest version of MyriadPro is available as part of FontPro
;; bundle from <https://www.github.com/sebschub>. `MyriadPro.sty' is
;; not part of TeXLive.
;;; Code:
(TeX-add-style-hook
"MyriadPro"
(lambda ()
;; Run style hook for various packages loaded by MyriadPro
(TeX-run-style-hooks "textcomp" "amsmath" "fontaxes" "mdsymbol")
;; New symbols
(TeX-add-symbols
'("smallfrac" "Numerator" "Denominator")
'("slantfrac" "Numerator" "Denominator")
'("boldsymbol" "Symbol"))
;; More control over spacing in `\slantfrac':
(LaTeX-add-lengths "MdSlantfracSpacingBeforeSlash"
"MdSlantfracSpacingAfterSlash")
;; `\mathversion' is available with sansmath option
(when (LaTeX-provided-package-options-member "MyriadPro" "sansmath")
(TeX-add-symbols
'("mathversion"
(TeX-arg-eval completing-read "Math version: "
'(("sans") ("sansbold")
("sanstabular") ("sansboldtabular"))))))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("smallfrac" "{{")
("slantfrac" "{{"))
'textual)
(font-latex-add-keywords '(("mathversion" "{"))
'variable)))
LaTeX-dialect)
(defvar LaTeX-MyriadPro-package-options
'(;; Font selection
"smallfamily" "medfamily" "onlytext" "onlymath" "math" "sansmath"
;; Figure selection
"textosf" "mathosf" "osf" "textlf" "mathlf" "lf" "mathtabular"
;; Calligraphic fonts
"cmsy" "swash" "abx"
;; Blackboard bold letters
"amsbb" "fourierbb" "lucidabb"
;; Greek letters
"mixedgreek" "italicgreek" "frenchmath"
;; Miscellaneous options
"scale" "loosequotes" "footnotefigures"
;; Additional mathversions
"sansmath")
"Package options for the MyriadPro package.")
;;; MyriadPro.el ends here

Binary file not shown.

View File

@@ -0,0 +1,76 @@
;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.05)
;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; 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.05) from 2014/07/03.
;; `XCharter.sty' is part of TeXLive.
;;; Code:
(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) ;
'("textlf" t) ; lining figures
'("lfstyle" -1) ;
'("textosf" t) ; oldstyle figures
'("textosfI" t) ; oldstyle figures alternate
'("osfstyle" -1)) ; whatever oldstyle option is in force
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("textsu" "{")
("textlf" "{")
("textosf" "{")
("textosfI" "{"))
'type-command)
(font-latex-add-keywords '(("sustyle" "")
("lfstyle" "")
("osfstyle" ""))
'type-declaration)))
LaTeX-dialect)
(defvar LaTeX-XCharter-package-options
'("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI"
"scaled" "sups")
"Package options for the XCharter package.")
;;; XCharter.el ends here

Binary file not shown.

View File

@@ -0,0 +1,294 @@
;;; acro.el --- AUCTeX style for `acro.sty' version 1.2a.
;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <giordano.mose@libero.it>
;; 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 `acro.sty' version 1.2a.
;;; Code:
(require 'tex) ;Indispensable when compiling the call to `TeX-auto-add-type'.
(defvar LaTeX-acro-package-options-list
'(;; General Options
("version" ("0" "1"))
("single" ("true" "false"))
("hyperref" ("true" "false"))
("record-pages" ("true" "false"))
("only-used" ("true" "false"))
("mark-as-used" ("first" "any"))
("macros" ("true" "false"))
("xspace" ("true" "false"))
("strict" ("true" "false"))
("sort" ("true" "false"))
("cite" ("all" "first" "none"))
("cite-cmd")
("cite-space")
("index-cmd")
("accsupp" ("true" "false"))
("uc-cmd")
;; Options Regarding Acronyms
("short-format")
("long-format")
("first-long-format")
("list-short-format")
("list-long-format")
("extra-format")
("first-style" ("default" "plain" "empty" "square" "short" "reversed"
"plain-reversed" "footnote" "sidenote"))
("extra-style" ("default" "plain" "comma" "paren" "bracket"))
("plural-ending")
;; Options Regarding the List
("page-ref" ("none" "plain" "comma" "paren"))
("page-name")
("pages-name")
("page-ranges" ("true" "false"))
("next-page")
("next-pages")
("list-type" ("table" "itemize" "description"))
("list-style" ("list" "tabular" "longtable" "extra-tabular" "extra-longtable"
"extra-tabular-rev" "extra-longtable-rev"))
("list-header" ("chapter" "chapter*" "section" "section*" "subsection"
"subsection*" "addchap" "addsec"))
("list-name")
("list-table-width")
("list-caps" ("true" "false")))
"Package options for the acro package.")
(TeX-auto-add-type "acro-acronym" "LaTeX")
;; Self Parsing -- see (info "(auctex)Hacking the Parser").
(defvar LaTeX-acro-regexp
(concat "\\\\DeclareAcronym" "{\\([^\n\r%\\{}]+\\)}")
"Matches `acro' acronym definitions.")
(defvar LaTeX-auto-acro-acronym nil
"Temporary for parsing `acro' acronym definitions.")
(defun LaTeX-acro-prepare ()
"Clear `LaTex-auto-acro-acronym' before use."
(setq LaTeX-auto-acro-acronym nil))
(defun LaTeX-acro-cleanup ()
"Move acronyms from `LaTeX-auto-acro-acronym' to
`LaTeX-acro-list' and to `TeX-auto-symbol' if option `macros' is
set to `true'."
(mapc (lambda (acronym)
(add-to-list 'LaTeX-acro-acronym-list (list acronym)))
LaTeX-auto-acro-acronym)
(when (or (LaTeX-provided-package-options-member "acro" "macros")
(LaTeX-provided-package-options-member "acro" "macros=true"))
(add-to-list 'TeX-auto-symbol LaTeX-auto-acro-acronym)))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-acro-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-acro-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(defvar LaTeX-acro-acronym-history nil
"History of acronyms in acro.")
(defun LaTeX-arg-acro-acronym (optional &optional prompt definition)
"Prompt for an acronym completing with known acronyms.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string. If DEFINITION is non-nil, add the chosen acronym to the
list of defined acronyms."
(let ((acronym (completing-read (TeX-argument-prompt optional prompt "Acronym")
(LaTeX-acro-acronym-list) nil nil nil
'LaTeX-acro-acronym-history)))
(if (and definition (not (string-equal "" acronym)))
(LaTeX-add-acro-acronyms acronym))
(TeX-argument-insert acronym optional optional)))
(defun LaTeX-arg-define-acro-acronym (optional &optional prompt)
"Prompt for an acronym completing with known acronyms.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string."
(LaTeX-arg-acro-acronym optional prompt t))
(defvar LaTeX-acro-declareacronym-keys
'(("short") ("long") ("short-plural") ("long-plural") ("long-plural-form")
("short-indefinite") ("long-indefinite") ("long-pre") ("long-post") ("alt")
("alt-indefinite") ("extra") ("sort") ("class") ("cite") ("short-format")
("long-format") ("first-long-format") ("pdfstring") ("accsupp")
("index-sort") ("index") ("index-cmd"))
"List of keys accepted by `\DeclareAcronym' macro of `acro' package
in its second mandatory argument.")
(defvar LaTeX-acro-printacronyms-keys
'(("include-classes") ("exclude-classes") ("name") ("header"))
"List of keys accepted by `\printacronyms' macro of `acro' package
in its optional argument.")
(defun LaTeX-arg-acro-key-val (optional prompt key-val-alist)
"Prompt for keys and values in KEY-VAL-ALIST.
<SPC> key binding in minibuffer is removed temporarily. Insert
the given value as a TeX macro argument. If OPTIONAL is non-nil,
insert it as an optional argument. Use PROMPT as the prompt
string. KEY-VAL-ALIST 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."
;; Remove <SPC> key binding from map used in `multi-prompt-key-value' (called
;; by `TeX-arg-key-val') with `require-match' set to `nil'.
(let ((crm-local-completion-map
(remove (assoc 32 crm-local-completion-map) crm-local-completion-map)))
(TeX-arg-key-val optional key-val-alist prompt)))
(TeX-add-style-hook
"acro"
(lambda ()
(TeX-auto-add-regexp `(,LaTeX-acro-regexp 1 LaTeX-auto-acro-acronym))
(TeX-add-symbols
;; Creating New Acronyms
'("DeclareAcronym" LaTeX-arg-define-acro-acronym
(LaTeX-arg-acro-key-val "Definition of acronym (k=v)"
LaTeX-acro-declareacronym-keys))
;; Using the Acronyms
'("ac" LaTeX-arg-acro-acronym)
'("ac*" LaTeX-arg-acro-acronym)
'("Ac" LaTeX-arg-acro-acronym)
'("Ac*" LaTeX-arg-acro-acronym)
'("acs" LaTeX-arg-acro-acronym)
'("acs*" LaTeX-arg-acro-acronym)
'("acl" LaTeX-arg-acro-acronym)
'("acl*" LaTeX-arg-acro-acronym)
'("Acl" LaTeX-arg-acro-acronym)
'("Acl*" LaTeX-arg-acro-acronym)
'("aca" LaTeX-arg-acro-acronym)
'("aca*" LaTeX-arg-acro-acronym)
'("acf" LaTeX-arg-acro-acronym)
'("acf*" LaTeX-arg-acro-acronym)
'("Acf" LaTeX-arg-acro-acronym)
'("Acf*" LaTeX-arg-acro-acronym)
'("acp" LaTeX-arg-acro-acronym)
'("acp*" LaTeX-arg-acro-acronym)
'("Acp" LaTeX-arg-acro-acronym)
'("Acp*" LaTeX-arg-acro-acronym)
'("acsp" LaTeX-arg-acro-acronym)
'("acsp*" LaTeX-arg-acro-acronym)
'("aclp" LaTeX-arg-acro-acronym)
'("aclp*" LaTeX-arg-acro-acronym)
'("Aclp" LaTeX-arg-acro-acronym)
'("Aclp*" LaTeX-arg-acro-acronym)
'("acap" LaTeX-arg-acro-acronym)
'("acap*" LaTeX-arg-acro-acronym)
'("acfp" LaTeX-arg-acro-acronym)
'("acfp*" LaTeX-arg-acro-acronym)
'("Acfp" LaTeX-arg-acro-acronym)
'("Acfp*" LaTeX-arg-acro-acronym)
;; Indefinite Forms
'("iac" LaTeX-arg-acro-acronym)
'("iac*" LaTeX-arg-acro-acronym)
'("Iac" LaTeX-arg-acro-acronym)
'("Iac*" LaTeX-arg-acro-acronym)
'("iacs" LaTeX-arg-acro-acronym)
'("iacs*" LaTeX-arg-acro-acronym)
'("Iacs" LaTeX-arg-acro-acronym)
'("Iacs*" LaTeX-arg-acro-acronym)
'("iaca" LaTeX-arg-acro-acronym)
'("iaca*" LaTeX-arg-acro-acronym)
'("Iaca" LaTeX-arg-acro-acronym)
'("Iaca*" LaTeX-arg-acro-acronym)
'("iacl" LaTeX-arg-acro-acronym)
'("iacl*" LaTeX-arg-acro-acronym)
'("Iacl" LaTeX-arg-acro-acronym)
'("Iacl*" LaTeX-arg-acro-acronym)
'("iacf" LaTeX-arg-acro-acronym)
'("iacf*" LaTeX-arg-acro-acronym)
'("Iacf" LaTeX-arg-acro-acronym)
'("Iacf*" LaTeX-arg-acro-acronym)
'("iacflike" LaTeX-arg-acro-acronym)
'("iacflike*" LaTeX-arg-acro-acronym)
'("Iacflike" LaTeX-arg-acro-acronym)
'("Iacflike*" LaTeX-arg-acro-acronym)
;; Simulating the First Appearance
'("acflike" LaTeX-arg-acro-acronym)
'("acflike*" LaTeX-arg-acro-acronym)
'("acfplike" LaTeX-arg-acro-acronym)
'("acfplike*" LaTeX-arg-acro-acronym)
;; Reset or Mark as Used
'("acreset" "List of acronyms")
'("acresetall" 0)
'("acuse" "List of acronyms")
'("acuseall" 0)
;; PDF bookmarks
'("acpdfstring" LaTeX-arg-acro-acronym)
'("acpdfstringplural" LaTeX-arg-acro-acronym)
;; Printing the List
'("printacronyms" [LaTeX-arg-acro-key-val nil LaTeX-acro-printacronyms-keys])
;; Customization
'("acsetup" (TeX-arg-key-val LaTeX-acro-package-options-list)))
(TeX-run-style-hooks
"l3sort"
"xspace"
"xtemplate"
"l3keys2e"
"xparse"
"expl3")
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("DeclareAcronym" "{{")
("ac" "*{")
("Ac" "*{")
("acs" "*{")
("acl" "*{")
("Acl" "*{")
("aca" "*{")
("acf" "*{")
("Acf" "*{")
("acp" "*{")
("Acp" "*{")
("acsp" "*{")
("aclp" "*{")
("Aclp" "*{")
("acap" "*{")
("acfp" "*{")
("Acfp" "*{")
("acflike" "*{")
("acfplike" "*{")
("iac" "*{")
("Iac" "*{")
("iacs" "*{")
("Iacs" "*{")
("iaca" "*{")
("Iaca" "*{")
("iacl" "*{")
("Iacl" "*{")
("iacf" "*{")
("Iacf" "*{")
("iacflike" "*{")
("Iacflike" "*{")
("acuse" "{"))
'function)))
LaTeX-dialect)
(defun LaTeX-acro-package-options ()
"Prompt for package options for the acro package."
(TeX-read-key-val t LaTeX-acro-package-options-list))
;;; acro.el ends here

Binary file not shown.

View File

@@ -0,0 +1,179 @@
;;; acronym.el --- AUCTeX style for `acronym.sty' version 1.38.
;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <giordano.mose@libero.it>
;; 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 `acronym.sty' version 1.38.
;;; Code:
(require 'tex) ;Indispensable when compiling the call to `TeX-auto-add-type'.
(TeX-auto-add-type "acronym" "LaTeX")
;; Self Parsing -- see (info "(auctex)Hacking the Parser").
(defvar LaTeX-acronym-regexp
(concat "\\\\\\(?:acro\\|newacro\\|acrodef\\)" "{\\([^\n\r%\\{}]+\\)}")
"Matches acronyms by `acronym' package.")
(defvar LaTeX-auto-acronym nil
"Temporary for parsing acronym by `acronym' package.")
(defun LaTeX-acronym-prepare ()
"Clear `LaTex-auto-acronym' before use."
(setq LaTeX-auto-acronym nil))
(defun LaTeX-acronym-cleanup ()
"Move acronyms from `LaTeX-auto-acronym' to `LaTeX-acronym-list'."
(mapc (lambda (acronym)
(add-to-list 'LaTeX-acronym-list (list acronym)))
LaTeX-auto-acronym))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-acronym-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-acronym-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(defvar LaTeX-acronym-acronym-history nil
"History of acronyms in acronym.")
;; The former `acronym' stands for package name, the latter stands for the
;; argument of the macro calling this function.
(defun LaTeX-arg-acronym-acronym (optional &optional prompt definition)
"Prompt for an acronym completing with known acronyms.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string. If DEFINITION is non-nil, add the chosen acronym to the
list of defined acronyms."
(let ((acronym (completing-read (TeX-argument-prompt optional prompt "Acronym")
(LaTeX-acronym-list) nil nil nil
'LaTeX-acronym-acronym-history)))
(if (and definition (not (string-equal "" acronym)))
(LaTeX-add-acronyms acronym))
(TeX-argument-insert acronym optional optional)))
(defun LaTeX-arg-define-acronym-acronym (optional &optional prompt)
"Prompt for an acronym completing with known acronyms.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string."
(LaTeX-arg-acronym-acronym optional prompt t))
(TeX-add-style-hook
"acronym"
(lambda ()
(TeX-auto-add-regexp `(,LaTeX-acronym-regexp 1 LaTeX-auto-acronym))
(LaTeX-add-environments
'("acronym" LaTeX-env-args
[TeX-arg-string "Longest acronym"]))
(TeX-add-symbols
;; Acronyms in the Text
'("ac" LaTeX-arg-acronym-acronym)
'("acresetall" 0)
'("acf" LaTeX-arg-acronym-acronym)
'("acs" LaTeX-arg-acronym-acronym)
'("acl" LaTeX-arg-acronym-acronym)
'("acp" LaTeX-arg-acronym-acronym)
'("acfp" LaTeX-arg-acronym-acronym)
'("acsp" LaTeX-arg-acronym-acronym)
'("aclp" LaTeX-arg-acronym-acronym)
'("acfi" LaTeX-arg-acronym-acronym)
'("acused" LaTeX-arg-acronym-acronym)
'("acsu" LaTeX-arg-acronym-acronym)
'("aclu" LaTeX-arg-acronym-acronym)
'("iac" LaTeX-arg-acronym-acronym)
'("Iac" LaTeX-arg-acronym-acronym)
'("ac*" LaTeX-arg-acronym-acronym)
'("acf*" LaTeX-arg-acronym-acronym)
'("acs*" LaTeX-arg-acronym-acronym)
'("acl*" LaTeX-arg-acronym-acronym)
'("acp*" LaTeX-arg-acronym-acronym)
'("acfp*" LaTeX-arg-acronym-acronym)
'("acsp*" LaTeX-arg-acronym-acronym)
'("aclp*" LaTeX-arg-acronym-acronym)
'("acfi*" LaTeX-arg-acronym-acronym)
'("acsu*" LaTeX-arg-acronym-acronym)
'("aclu*" LaTeX-arg-acronym-acronym)
'("iac*" LaTeX-arg-acronym-acronym)
'("Iac*" LaTeX-arg-acronym-acronym)
;; Customization
'("acsfont" 1)
'("acffont" 1)
'("acfsfont" 1)
;; Defining Acronyms
'("acro" LaTeX-arg-define-acronym-acronym [ "Short name" ] "Full name")
'("acroextra" "Additional info")
'("newacro" LaTeX-arg-define-acronym-acronym [ "Short name" ] "Full name")
'("acrodef" LaTeX-arg-define-acronym-acronym [ "Short name" ] "Full name")
;; Non standard indefinite articles
'("acroindefinite" LaTeX-arg-acronym-acronym
"Short indefinite article" "Long indefinite article")
'("acrodefindefinite" LaTeX-arg-acronym-acronym
"Short indefinite article" "Long indefinite article")
'("newacroindefinite" LaTeX-arg-acronym-acronym
"Short indefinite article" "Long indefinite article")
;; Non standard and foreign plural forms
'("acroplural" LaTeX-arg-acronym-acronym [ "Short plural" ] "Long plural")
'("acrodefplural" LaTeX-arg-acronym-acronym [ "Short plural" ] "Long plural")
'("newacroplural" LaTeX-arg-acronym-acronym [ "Short plural" ] "Long plural"))
(TeX-run-style-hooks
"relsize"
"xstring"
"suffix")
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("ac" "*{")
("acf" "*{")
("acs" "*{")
("acl" "*{")
("acp" "*{")
("acfp" "*{")
("acsp" "*{")
("aclp" "*{")
("acfi" "*{")
("acused" "{")
("acsu" "*{")
("aclu" "*{")
("iac" "*{")
("Iac" "*{")
("acro" "{[{")
("acroextra" "{")
("newacro" "{[{")
("acrodef" "{[{")
("acroindefinite" "{{{")
("acrodefindefinite" "{{{")
("newacroindefinite" "{{{")
("acroplural" "{[{")
("acrodefplural" "{[{")
("newacroplural" "{[{"))
'function)))
LaTeX-dialect)
(defvar LaTeX-acronym-package-options
'("footnote" "nohyperlinks" "printonlyused" "withpage" "smaller" "dua" "nolist")
"Package options for the acronym package.")
;; acronym.el ends here

Binary file not shown.

View File

@@ -0,0 +1,43 @@
;;; afterpage.el --- AUCTeX style for `afterpage.sty'
;; Copyright (C) 2013 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2013-01-01
;; 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 `afterpage.sty'
;;; Code:
(TeX-add-style-hook
"afterpage"
(lambda ()
(TeX-add-symbols
'("afterpage" t)))
LaTeX-dialect)
(defvar LaTeX-afterpage-package-options nil
"Package options for afterpage.")
;; afterpage.el ends here

Binary file not shown.

View File

@@ -0,0 +1,54 @@
;;; alltt.el --- AUCTeX style for `alltt.sty'
;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2004-04-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 `alltt.sty'.
;;; Code:
(TeX-add-style-hook
"alltt"
(lambda ()
(LaTeX-add-environments "alltt")
(make-local-variable 'LaTeX-indent-environment-list)
(add-to-list 'LaTeX-indent-environment-list
'("alltt" current-indentation))
(add-to-list 'LaTeX-verbatim-environments-local "alltt")
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
;; For syntactic fontification, e.g. verbatim constructs.
(font-latex-set-syntactic-keywords)
;; Tell font-lock about the update.
(setq font-lock-set-defaults nil)
(font-lock-set-defaults)))
LaTeX-dialect)
(defvar LaTeX-alltt-package-options nil
"Package options for the alltt package.")
;;; alltt.el ends here

Binary file not shown.

View File

@@ -0,0 +1,100 @@
;;; alphanum.el --- AUCTeX style for `alphanum.sty'
;; Copyright (C) 2004 Free Software Foundation, Inc.
;; Author: Frank K<>ster <frank@kuesterei.ch>
;; Maintainer: auctex-devel@gnu.org
;; 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 is file alphanum.el, which makes AUCTeX usable with jura.cls
;; and its style file alphanum.sty.
;;
;; Contributed by Frank K<>ster <frank@kuesterei.ch>. The code for
;; reftex has been written by Carsten Dominik, the maintainer of
;; reftex, but all the errors are mine.
;;; Code:
(defun TeX-arg-none (arg)
(insert " "))
(defun reftex-get-section-level-alphanum ()
(save-excursion ; preserve position
(save-match-data ; preserve matching data (important!)
;; Go back to the beginning of the sectioning command
(goto-char (match-beginning 0))
;; Define an initial level number, depending on the current macro.
(let* ((macro (reftex-match-string 3)) ; "toc" or "sub"
(lev (cond ((string= macro "toc") 1) ; min level for "toc"
((string= macro "sub") 2) ; min level for "sub"
(t 0)))
;; Make a regular expression which will match sectioning commands
;; and the levelup macro.
(re (concat "\\(^[^%]*\\\\levelup\\>\\)"
"\\|"
"\\(" reftex-section-regexp "\\)")))
;; Now parse backwards for all sectioning and levelup macros,
;; and keep track of the relative level changes.
(while (re-search-backward re nil t)
(cond
((match-beginning 1)
;; levelup matched, reduce level counter
(setq lev (1- lev)))
((string= (reftex-match-string 4) "toc")
;; a toc entry, nothing changes
)
((string= (reftex-match-string 4) "sub")
;; a sub entry, increase level counter
(setq lev (1+ lev)))))
;; return the level
lev))))
(TeX-add-style-hook
"alphanum"
(lambda ()
(LaTeX-largest-level-set "chapter")
(TeX-add-symbols '("levelup" TeX-arg-none))
(make-local-variable 'LaTeX-section-list)
(LaTeX-section-list-add-locally
'(("part" 0)
;; the levels don't make sense with alphanum, I randomly chose 0...
("toc" 0)
("sub" 0)) t)
(setq LaTeX-section-label
'(("part" . "part:")
("toc" . "sec:")
("sub" . "sec:")))
;;
;; ****************** reftex part ******************
;; this won't work in multifile documents, but at least there is
;; something.
(if (fboundp 'reftex-add-section-levels)
(reftex-add-section-levels
'(("toc" . reftex-get-section-level-alphanum)
("sub" . reftex-get-section-level-alphanum)))))
LaTeX-dialect)
;; Local Variables:
;; coding: iso-8859-1
;; End:

Binary file not shown.

View File

@@ -0,0 +1,12 @@
;;; amsart.el --- Style hook for the AMS-LaTeX article document class.
;;; Code:
(TeX-add-style-hook "amsart"
(function
(lambda ()
(TeX-run-style-hooks "amsmath" "amsthm")
(LaTeX-add-environments "abstract")))
LaTeX-dialect)
;;; amsart.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
;;; amsbook.el --- Style hook for the AMS-LaTeX book document class.
;;; Code:
(TeX-add-style-hook "amsbook"
(function
(lambda ()
(TeX-run-style-hooks "amsmath" "amsthm")
(LaTeX-add-environments "abstract")))
LaTeX-dialect)
;;; amsbook.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,19 @@
;;; amsbsy.el --- Style hook for the AMS-LaTeX amsbsy package.
;;;
;;; AUTHOR: Carsten Dominik <dominik@strw.leidenuniv.nl>
;;; Code:
(TeX-add-style-hook "amsbsy"
(function
(lambda ()
(TeX-add-symbols
'("boldsymbol" "Symbol")
'("pmb" "Symbol")
)))
LaTeX-dialect)
(defvar LaTeX-amsbsy-package-options nil
"Package options for the amsbsy package.")
;;; amsbsy.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,226 @@
;;; amsmath.el --- Style hook for the AMS-LaTeX amsmath package.
;; Copyright (C) 2002, 2005-2007, 2012-2014 Free Software Foundation, Inc.
;; FIXME: What about the copyright for <= 2001?
;; 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:
;; This will also load the amstext, amsbsy and amsopn style files.
;;; Code:
(TeX-add-style-hook "amsmath"
(function
(lambda ()
(LaTeX-add-environments
'("align" LaTeX-env-label)
'("gather" LaTeX-env-label)
'("flalign" LaTeX-env-label)
'("multline" LaTeX-env-label)
'("alignat" LaTeX-amsmath-env-alignat)
'("alignat*" LaTeX-amsmath-env-alignat)
'("xalignat" LaTeX-amsmath-env-alignat)
'("xalignat*" LaTeX-amsmath-env-alignat)
'("xxalignat" LaTeX-amsmath-env-alignat)
'("aligned" ["Vertical position (t or b)"])
'("gathered" ["Vertical position (t or b)"])
'("alignedat" LaTeX-amsmath-env-alignedat)
"align*" "gather*" "flalign*" "multline*" "equation*"
"split"
"cases"
"matrix" "smallmatrix" "pmatrix" "bmatrix" "Bmatrix" "vmatrix" "Vmatrix"
"subequations"
'("subarray" "Alignment"))
(TeX-add-symbols
'("eqref" TeX-arg-ref)
'("numberwithin" TeX-arg-counter "Section level")
'("raisetag" "Dimension")
'("shoveright" t) '("shoveleft" t)
'("intertext" t)
'("hdotsfor" ["Stretch"] "Number of columns to cover")
'("xleftarrow" ["Below"] "Above")
'("xrightarrow" ["Below"] "Above")
'("overset" "Accent symbol" "Symbol")
'("underset" "Accent symbol" "Symbol")
'("dfrac" 2)
'("tfrac" 2)
'("binom" 2)
'("dbinom" 2)
'("tbinom" 2)
'("genfrac" "Left delimiter" "Right delimiter" "Thickness"
"Mathstyle" 2)
'("cfrac" ["position (l or r)"] t)
'("smash" ["where (t or b)"] t)
'("sideset" "Left" "Right")
'("tag" "(Tag)")
'("tag*" "Tag")
'("displaybreak" ["Weight (0..4)"])
'("allowdisplaybreaks" ["Weight (1..4)"])
'("substack" t)
'("leftroot" "Push root index left by")
'("uproot" "Push root index upward by")
'("boxed" t)
'("mspace" t)
'("mod" t)
'("pmod" t)
'("pod" t)
'("overleftrightarrow" t)
'("underleftarrow" t)
'("underrightarrow" t)
'("underleftrightarrow" t)
'("dddot" t)
'("ddddot" t)
"bmod" "notag"
"dots" "dotsb" "dotsc" "dotsi" "dotsm" "dotso" "nobreakdash"
'("lvert" TeX-arg-insert-right-brace-maybe)
'("lVert" TeX-arg-insert-right-brace-maybe)
"rvert" "rVert"
"iint" "iiint" "iiiint" "idotsint"
)
(setq LaTeX-item-list
(append '(("split" . LaTeX-item-equation)
("multline" . LaTeX-item-equation)
("multline*" . LaTeX-item-equation)
("gather" . LaTeX-item-equation)
("gather*" . LaTeX-item-equation)
("gathered" . LaTeX-item-equation)
("align" . LaTeX-item-equation)
("align*" . LaTeX-item-equation)
("aligned" . LaTeX-item-equation)
("alignat" . LaTeX-item-equation-alignat)
("alignat*" . LaTeX-item-equation-alignat)
("xalignat" . LaTeX-item-equation-alignat)
("xalignat*" . LaTeX-item-equation-alignat)
("xxalignat" . LaTeX-item-equation-alignat)
("alignedat" . LaTeX-item-equation-alignat)
("flalign" . LaTeX-item-equation)
("flalign*" . LaTeX-item-equation)
("matrix" . LaTeX-item-equation)
("pmatrix" . LaTeX-item-equation)
("bmatrix" . LaTeX-item-equation)
("Bmatrix" . LaTeX-item-equation)
("vmatrix" . LaTeX-item-equation)
("Vmatrix" . LaTeX-item-equation)
("subarray" . LaTeX-item-equation)
("cases" . LaTeX-item-equation))
LaTeX-item-list))
;; When `LaTeX-amsmath-label' is nil, use value of LaTeX-equation-label:
(unless LaTeX-amsmath-label
(setq LaTeX-amsmath-label LaTeX-equation-label))
(setq LaTeX-label-alist
;; Append amsmath environments to `LaTeX-label-alist', in order not to
;; override possible custome values.
(append LaTeX-label-alist
'(("align" . LaTeX-amsmath-label)
("alignat" . LaTeX-amsmath-label)
("xalignat" . LaTeX-amsmath-label)
("multline" . LaTeX-amsmath-label)
("flalign" . LaTeX-amsmath-label)
("gather" . LaTeX-amsmath-label))))
(set (make-local-variable 'TeX-braces-association)
(append '(("\\lvert" . "\\rvert")
("\\lVert" . "\\rVert"))
TeX-braces-association))
(set (make-local-variable 'TeX-left-right-braces)
(append '(("\\lvert") ("\\rvert") ("\\lVert") ("\\rVert"))
TeX-left-right-braces))
;; amsmath includes amstext, amsbsy, & amsopn.
;; So we run their hooks, too.
(TeX-run-style-hooks "amstext" "amsbsy" "amsopn")
;; If RefTeX is loaded, make it recognize the amsmath environments.
(when (fboundp 'reftex-add-to-label-alist)
(reftex-add-to-label-alist '(AMSTeX)))))
LaTeX-dialect)
(defun LaTeX-amsmath-env-alignat (env)
"Insert ENV with column number specifications.
Insert suitable number of ampersands also if possible."
(let ((ncols (TeX-read-string "Number of columns: ")))
(LaTeX-insert-environment env (concat TeX-grop ncols TeX-grcl))
(LaTeX-item-equation-alignat t)))
(defun LaTeX-amsmath-env-alignedat (env)
"Insert ENV with position and column number specifications.
Insert suitable number of ampersands also if possible."
(let ((where (TeX-read-string "(Optional) Vertical position (t or b): "))
(ncols (TeX-read-string "Number of columns: ")))
(unless (string= where "")
(setq where (concat LaTeX-optop where LaTeX-optcl)))
(LaTeX-insert-environment env (concat where TeX-grop ncols TeX-grcl))
(LaTeX-item-equation-alignat t)))
(defun LaTeX-item-equation (&optional suppress)
"Insert contents to terminate a line in multi-line equations environment.
Put line break macro on the last line. If the current environment
wants \\label, insert it also.
If SUPPRESS is non-nil, do not insert line break macro."
(unless suppress
(end-of-line 0)
(just-one-space)
(TeX-insert-macro "\\")
(forward-line 1)
(indent-according-to-mode))
(let ((env (LaTeX-current-environment)))
(when (and (assoc env LaTeX-label-alist)
(LaTeX-label env 'environment))
(LaTeX-newline)
(indent-according-to-mode))))
(defun LaTeX-item-equation-alignat (&optional suppress)
"Insert contents to terminate a line in multi-line equations environment.
Put line break macro on the last line. Next, if the current
environment wants \\label, insert it also. And insert suitable number
of ampersands if possible.
If SUPPRESS is non-nil, do not insert line break macro."
(LaTeX-item-equation suppress)
(LaTeX-insert-ampersands
(concat "\\(?:"
(regexp-quote LaTeX-optop) "[tb]" (regexp-quote LaTeX-optcl)
"\\)?")
'LaTeX-amsmath-alignat-number-of-ampersands))
(defun LaTeX-amsmath-alignat-number-of-ampersands (start end)
"Return the number of ampersands to insert.
The number is 2N-1 where N is the number taken from the text between
START and END."
(let ((num (string-to-number (buffer-substring-no-properties start end))))
(if (integerp num) (+ num num -1))))
(defvar LaTeX-amsmath-package-options '("intlimits" "nointlimits"
"sumlimits" "nosumlimits"
"namelimits" "nonamelimits"
"leqno" "reqno" "centertags"
"tbtags" "cmex10" "fleqn" "?")
"Package options for the amsmath package.")
;;; amsmath.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,53 @@
;;; amsopn.el --- AUCTeX style for the `amsnopn.sty' AMS-LaTeX package
;; Copyright (C) 1997, 2002, 2005, 2013 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
;; Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
;; 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 `amsnopn.sty'
;;; Code:
(TeX-add-style-hook "amsopn"
(function
(lambda ()
(TeX-add-symbols
'("DeclareMathOperator" (TeX-arg-define-macro "Math Operator: \\")
"Expansion text for the math operator")
'("DeclareMathOperator*" (TeX-arg-define-macro "Math Operator: \\")
"Expansion text for the math operator")
'("operatorname" t)
'("operatorname*" t))
(add-to-list 'LaTeX-auto-regexp-list
'("\\\\DeclareMathOperator\\*?{?\\\\\\([A-Za-z0-9]+\\)}?"
1 TeX-auto-symbol))))
LaTeX-dialect
)
(defvar LaTeX-amsopn-package-options '("namelimits" "nonamelimits")
"Package options for the amsopn package.")
;;; amsopn.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,249 @@
;;; amssymb.el --- AUCTeX style for `amssymb.sty'
;; Copyright (C) 2012 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
;; 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 `amssymb.sty'.
;; The commands were just taken out of the \DeclareMathSymbol from
;; amssymb.sty in the order specified there, i.e., \mathord, \mathbin,
;; \mathrel
;;; Code:
(TeX-add-style-hook
"amssymb"
(lambda ()
(TeX-add-symbols
"boxdot"
"boxplus"
"boxtimes"
"square"
"blacksquare"
"centerdot"
"lozenge"
"blacklozenge"
"circlearrowright"
"circlearrowleft"
"leftrightharpoons"
"boxminus"
"Vdash"
"Vvdash"
"vDash"
"twoheadrightarrow"
"twoheadleftarrow"
"leftleftarrows"
"rightrightarrows"
"upuparrows"
"downdownarrows"
"upharpoonright"
"downharpoonright"
"upharpoonleft"
"downharpoonleft"
"rightarrowtail"
"leftarrowtail"
"leftrightarrows"
"rightleftarrows"
"Lsh"
"Rsh"
"rightsquigarrow"
"leftrightsquigarrow"
"looparrowleft"
"looparrowright"
"circeq"
"succsim"
"gtrsim"
"gtrapprox"
"multimap"
"therefore"
"because"
"doteqdot"
"triangleq"
"precsim"
"lesssim"
"lessapprox"
"eqslantless"
"eqslantgtr"
"curlyeqprec"
"curlyeqsucc"
"preccurlyeq"
"leqq"
"leqslant"
"lessgtr"
"backprime"
"risingdotseq"
"fallingdotseq"
"succcurlyeq"
"geqq"
"geqslant"
"gtrless"
"vartriangleright"
"vartriangleleft"
"trianglerighteq"
"trianglelefteq"
"bigstar"
"between"
"blacktriangledown"
"blacktriangleright"
"blacktriangleleft"
"vartriangle"
"blacktriangle"
"triangledown"
"eqcirc"
"lesseqgtr"
"gtreqless"
"lesseqqgtr"
"gtreqqless"
"Rrightarrow"
"Lleftarrow"
"veebar"
"barwedge"
"doublebarwedge"
"measuredangle"
"sphericalangle"
"varpropto"
"smallsmile"
"smallfrown"
"Subset"
"Supset"
"Cup"
"Cap"
"curlywedge"
"curlyvee"
"leftthreetimes"
"rightthreetimes"
"subseteqq"
"supseteqq"
"bumpeq"
"Bumpeq"
"lll"
"ggg"
"circledS"
"pitchfork"
"dotplus"
"backsim"
"backsimeq"
"complement"
"intercal"
"circledcirc"
"circledast"
"circleddash"
"lvertneqq"
"gvertneqq"
"nleq"
"ngeq"
"nless"
"ngtr"
"nprec"
"nsucc"
"lneqq"
"gneqq"
"nleqslant"
"ngeqslant"
"lneq"
"gneq"
"npreceq"
"nsucceq"
"precnsim"
"succnsim"
"lnsim"
"gnsim"
"nleqq"
"ngeqq"
"precneqq"
"succneqq"
"precnapprox"
"succnapprox"
"lnapprox"
"gnapprox"
"nsim"
"ncong"
"diagup"
"diagdown"
"varsubsetneq"
"varsupsetneq"
"nsubseteqq"
"nsupseteqq"
"subsetneqq"
"supsetneqq"
"varsubsetneqq"
"varsupsetneqq"
"subsetneq"
"supsetneq"
"nsubseteq"
"nsupseteq"
"nparallel"
"nmid"
"nshortmid"
"nshortparallel"
"nvdash"
"nVdash"
"nvDash"
"nVDash"
"ntrianglerighteq"
"ntrianglelefteq"
"ntriangleleft"
"ntriangleright"
"nleftarrow"
"nrightarrow"
"nLeftarrow"
"nRightarrow"
"nLeftrightarrow"
"nleftrightarrow"
"divideontimes"
"varnothing"
"nexists"
"Finv"
"Game"
"eth"
"eqsim"
"beth"
"gimel"
"daleth"
"lessdot"
"gtrdot"
"ltimes"
"rtimes"
"shortmid"
"shortparallel"
"smallsetminus"
"thicksim"
"thickapprox"
"approxeq"
"succapprox"
"precapprox"
"curvearrowleft"
"curvearrowright"
"digamma"
"varkappa"
"Bbbk"
"hslash"
"backepsilon"))
LaTeX-dialect)
(defvar LaTeX-amssymb-package-options '("psamsfonts")
"Package options for the amssymb package.")
;;; amssymb.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,61 @@
;;; amstex.el --- AMS-LaTeX support.
;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; 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 is only needed when using AMS-LaTeX 1.1 and LaTeX 2.09.
;; In later versions of LaTeX and AMS-LaTeX this file is never used,
;; because there is no longer a class or package name amstex.
;;
;; As far as AUCTeX is concerned, the old amstex style is fairly
;; similar to the new amsmath package. So we will just run that hook
;; here.
;;
;; amsmath.el should not be loaded, if an AMS-TeX (in contrast to
;; AMS-LaTeX) file is opened. The commands defined in amsmath.el
;; mostly have no meaning in this case and errors about unknown
;; variables or functions may occur due to latex.el possibly not being
;; loaded.
;;; Code:
(TeX-add-style-hook
"amstex"
(function
(lambda ()
(unless (memq major-mode '(plain-tex-mode ams-tex-mode))
(TeX-run-style-hooks "amsmath"))))
LaTeX-dialect)
(defvar LaTeX-amstex-package-options '("noamsfonts" "psamsfonts"
"intlimits" "nointlimits"
"sumlimits" "nosumlimits"
"namelimits" "nonamelimits"
"leqno" "reqno" "centertags"
"tbtags" "fleqn" "righttag"
"ctagsplt" "intlim" "nosumlim"
"nonamelm")
"Package options for the amstex package.")
;;; amstex.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,17 @@
;;; amstext.el --- Style hook for the AMS-LaTeX amstext package.
;;;
;;; AUTHOR: Carsten Dominik <dominik@strw.leidenuniv.nl>
;;; Code:
(TeX-add-style-hook "amstext"
(function
(lambda ()
(TeX-add-symbols
'("text" t))))
LaTeX-dialect)
(defvar LaTeX-amstext-package-options nil
"Package options for the amstext package.")
;;; amstext.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,200 @@
;;; amsthm.el --- Style hook for the AMS-LaTeX amsthm package.
;; Copyright (C) 1997, 2013--2015 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:
(defvar LaTeX-amsthm-package-options nil
"Package options for the amsthm package.")
(defvar LaTeX-amsthm-theoremstyle-list
'(("plain") ("definition") ("remark"))
"List of theorem styles provided by `amsthm.el' and new ones
defined with \"\\newtheoremstyle\".")
(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."
;; `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-amsthm-fontdecl nil nil TeX-esc)
TeX-esc)))
(TeX-argument-insert fontdecl optional)))
(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', e.g.
(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)))
;; Needed for auto-parsing
(require 'tex)
;; 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. Update
`LaTeX-amsthm-theoremstyle-list' with styles defined with
\"\\newtheoremstyle\"."
(dolist (newthm (mapcar 'car (LaTeX-amsthm-newtheorem-list)))
(LaTeX-add-environments (list newthm 'LaTeX-amsthm-env-label)))
(dolist (newthmstyle (LaTeX-amsthm-newtheoremstyle-list))
(add-to-list (make-local-variable 'LaTeX-amsthm-theoremstyle-list)
newthmstyle)))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-prepare t)
(add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(TeX-add-style-hook
"amsthm"
(lambda ()
(LaTeX-add-environments
'("proof" LaTeX-amsthm-env-label))
(TeX-add-symbols
;; Overrule the defintion in `latex.el':
'("newtheorem"
(TeX-arg-eval
(lambda ()
(let ((nthm (TeX-read-string
(TeX-argument-prompt nil nil "Environment"))))
(LaTeX-add-amsthm-newtheorems nthm)
(LaTeX-add-environments (list nthm 'LaTeX-theorem-env-label))
(format "%s" nthm))))
[ TeX-arg-environment "Numbered like" ]
t [ (TeX-arg-eval progn (if (eq (save-excursion
(backward-char 2)
(preceding-char)) ?\])
()
(TeX-arg-counter t "Within counter"))
"") ])
'("newtheorem*"
(TeX-arg-eval
(lambda ()
(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 "Style: "
LaTeX-amsthm-theoremstyle-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)
(add-to-list (make-local-variable 'LaTeX-amsthm-theoremstyle-list)
(list 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)))
LaTeX-dialect)
;;; amsthm.el ends here

Binary file not shown.

View File

@@ -0,0 +1,105 @@
;;; array.el --- AUCTeX style for `array.sty'
;; Copyright (C) 2013, 2015 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
;; 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 `array.sty'
;;; Code:
(require 'tex)
(TeX-auto-add-type "array-newcolumntype" "LaTeX")
(defvar LaTeX-array-newcolumntype-regexp
'("\\\\newcolumntype{\\([a-zA-Z]+\\)}"
1 LaTeX-auto-array-newcolumntype)
"Matches the argument of `\\newcolumntype' from `array'
package.")
(defun LaTeX-array-auto-prepare ()
"Clear `LaTeX-auto-array-newcolumntype' before parsing."
(setq LaTeX-auto-array-newcolumntype nil))
(defun LaTeX-array-auto-cleanup ()
"Move parsed column specification from
`LaTeX-auto-array-newcolumntype' to `LaTeX-array-column-letters'."
(when (LaTeX-array-newcolumntype-list)
(LaTeX-array-update-column-letters)))
(defun LaTeX-array-update-column-letters ()
"Update and uniquify the value of `LaTeX-array-column-letters'
and make it buffer local. "
(set (make-local-variable 'LaTeX-array-column-letters)
(mapconcat 'identity
(TeX-delete-duplicate-strings
(split-string
(concat LaTeX-array-column-letters
(mapconcat 'car (LaTeX-array-newcolumntype-list) ""))
"" t))
"")))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-array-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-array-auto-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(TeX-add-style-hook
"array"
(lambda ()
(TeX-auto-add-regexp LaTeX-array-newcolumntype-regexp)
(TeX-add-symbols
'("newcolumntype"
(TeX-arg-eval
(lambda ()
(let ((col (TeX-read-string "Column type: ")))
(LaTeX-add-array-newcolumntypes col)
(LaTeX-array-update-column-letters)
(format "%s" col))))
[ "Number of arguments" ] t)
'("showcols" 0)
'("firsthline" 0)
'("lasthline" 0))
;; `array.sty' adds a couple of new lengths. They're added here, rather than
;; in the `TeX-add-symbols' block.
(LaTeX-add-lengths "extratabsurround" "extrarowheight")
;; `array.sty' adds some new column specification letters.
(set (make-local-variable 'LaTeX-array-column-letters)
(concat LaTeX-array-column-letters "m" "b"))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("newcolumntype" "{[{"))
'function)))
LaTeX-dialect)
(defvar LaTeX-array-package-options nil
"Package options for array.")
;; array.el ends here

Binary file not shown.

View File

@@ -0,0 +1,21 @@
;;; article.el - Special code for article style.
;;; Code:
(defvar LaTeX-article-class-options
'("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper"
"landscape" "10pt" "11pt" "12pt" "oneside" "twoside" "draft" "final"
"titlepage" "notitlepage" "onecolumn" "twocolumn" "leqno" "fleqn" "openbib")
"Package options for the article class.")
(TeX-add-style-hook
"article"
(lambda ()
(LaTeX-largest-level-set "section")
(LaTeX-add-counters "part" "section" "subsection" "subsubsection" "paragraph"
"subparagraph" "figure" "table")
(LaTeX-add-pagestyles "headings" "myheadings")
(LaTeX-add-environments "abstract"))
LaTeX-dialect)
;;; article.el ends here

Binary file not shown.

View File

@@ -0,0 +1,119 @@
;;; attachfile.el --- AUCTeX style for `attachfile.sty' (v1.6)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-04-11
;; 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 `attachfile.sty' (v1.6) from 2015/04/04.
;; `attachfile.sty' is part of TeXLive.
;;; Code:
(defvar LaTeX-attachfile-key-val-options
'(("appearance" ("true" "false"))
("author")
("color")
("created")
("date")
("description")
("icon" ("Graph" "Paperclip" "PushPin" "Tag"))
;; This can only be a small excerpt:
("mimetype"
("application/javascript"
"application/pdf"
"application/postscript"
"application/vnd.ms-excel"
"application/vnd.ms-powerpoint"
"application/zip"
"audio/mpeg"
"audio/ogg"
"image/jpeg"
"image/png"
"image/tiff"
"text/csv"
"text/plain"
"video/H264"
"video/mp4"))
("modified")
("print" ("true" "false"))
("size")
("subject")
("timezone")
("zoom" ("true" "false")))
"Key=value options for attachfile macros.")
(TeX-add-style-hook
"attachfile"
(lambda ()
;; Run style hook for packages loaded by attachfile; both packages
;; are required for running LaTeX, but not necessary within AUCTeX
(TeX-run-style-hooks "hyperref" "color")
(TeX-add-symbols
;; \attachfile[<options>]{<filename>}
'("attachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options]
(TeX-arg-eval
(lambda ()
(let ((atfi (file-relative-name
(read-file-name "File to attach: "))))
(format "%s" atfi)))))
;; \noattachfile[<options>]
'("noattachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options] )
;; \textattachfile[<options>]{<filename>}{<text>}
'("textattachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options]
(TeX-arg-eval
(lambda ()
(let ((atfi (file-relative-name
(read-file-name "File to attach: "))))
(format "%s" atfi))))
t)
;; \notextattachfile[<options>]{<text>}
'("notextattachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options] t)
;; \attachfilesetup{<options>}
'("attachfilesetup"
(TeX-arg-key-val LaTeX-attachfile-key-val-options)))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("attachfilesetup" "{")
("attachfile" "[{")
("noattachfile" "[")
("textattachfile" "[{{")
("notextattachfile" "[{"))
'function)))
LaTeX-dialect)
(defvar LaTeX-attachfile-package-options nil
"Prompt for package options for the attachfile package.")
;;; attachfile.el ends here

Binary file not shown.

View File

@@ -0,0 +1,40 @@
;;; austrian.el --- AUCTeX style for the `austrian' babel option.
;; Copyright (C) 2009 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2009-12-28
;; 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:
;; Set up AUCTeX for editing Austrian text in connection with the
;; `austrian' babel option.
;;; Code:
(TeX-add-style-hook
"austrian"
(lambda ()
(TeX-run-style-hooks "german"))
LaTeX-dialect)
;;; austrian.el ends here

Binary file not shown.

View File

@@ -0,0 +1,196 @@
;;; babel.el --- AUCTeX style for `babel.sty' version 3.9h.
;; Copyright (C) 2005, 2007, 2013-2014 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2005-05-29
;; Keywords: tex
;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; AUCTeX is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with AUCTeX; see the file COPYING. If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.
;;; Commentary:
;; This file adds support for `babel.sty' version 3.9h.
;;; Code:
(eval-when-compile (require 'cl))
(defvar LaTeX-babel-language-list
'("afrikaans"
"bahasa" "indonesian" "indon" "bahasai" "bahasam" "malay" "meyalu"
"basque"
"breton"
"bulgarian"
"catalan"
"croatian"
"czech"
"danish"
"dutch"
"english" "USenglish" "american" "UKenglish" "british" "canadian"
"australian" "newzealand"
"esperanto"
"estonian"
"finnish"
"french" "francais" "canadien" "acadian"
"galician"
"austrian" "german" "germanb" "ngerman" "naustrian"
"greek" "polutonikogreek"
"hebrew"
"icelandic"
"interlingua"
"irish"
"italian"
"latin"
"lowersorbian"
"samin"
"norsk" "nynorsk"
"polish"
"portuges" "portuguese" "brazilian" "brazil"
"romanian"
"russian"
"scottish"
"spanish"
"slovak"
"slovene"
"swedish"
"serbian"
"turkish"
"ukrainian"
"uppersorbian"
"welsh"
;; Extra languages mentioned in the `babel' manual.
"albanian" "hindi" "thai" "thaicjk" "latvian" "turkmen" "hungarian" "magyar"
"mongolian" "romansh" "lithuanian" "spanglish" "vietnamese" "japanese"
"pinyin" "arabinc" "farsi" "ibygreek" "bgreek" "serbianic" "frenchle"
"ethiop" "friulan" "frenchb")
"List of languages supported by the babel LaTeX package.")
(defun LaTeX-babel-active-languages ()
"Return a list of languages used in the document."
(let (main-language active-languages)
;; Loop over options provided to class and `babel' package at load time.
(dolist (elt (append
;; In most cases there is only one element in the alist, if
;; there is more than one element, the first one should
;; contain the class options of the current buffer. So we can
;; take the car of `LaTeX-provided-class-options'.
(cdr (car LaTeX-provided-class-options))
(cdr (assoc "babel" LaTeX-provided-package-options))))
(setq elt (TeX-split-string "=" elt))
(if (equal (car elt) "main")
;; Starting from version 3.9 of `babel' package, languages can be set
;; with the following syntax:
;; \usepackage[latin.medieval,main=danish,spanish.notilde]{babel}
;; with `danish' being the default language. When the default
;; language is set with the `main' option, we record it and append to
;; the list at the end.
(setq main-language (car (cdr elt)))
;; Get rid of the modifiers (`medieval' and `notilde' in the above
;; example).
(setq elt (car (TeX-split-string "\\." (car elt))))
(if (member elt LaTeX-babel-language-list)
;; Append element to `active-languages' to respect loading order.
;; `babel' package uses as default language the last loaded one,
;; except if it is set with the `main' option.
(pushnew elt active-languages :test #'equal))))
(if main-language
(pushnew main-language active-languages :test #'equal))
(nreverse active-languages)))
(defun TeX-arg-babel-lang (_optional &optional _prompt)
"Prompt for a language with completion and insert it as an argument."
(TeX-argument-insert
(completing-read "Language: " (LaTeX-babel-active-languages)) nil))
(defun LaTeX-env-babel-lang (env)
"Prompt for a language and insert it as an argument of ENV."
(LaTeX-insert-environment
env (format "{%s}" (completing-read "Language: "
(LaTeX-babel-active-languages)))))
(defun LaTeX-babel-load-languages ()
"Load style files of babel active languages."
;; Run style hooks for every active language in loading order, so
;; `TeX-quote-language' will be correctly set.
(mapc 'TeX-run-style-hooks (LaTeX-babel-active-languages)))
(TeX-add-style-hook
"babel"
(lambda ()
(LaTeX-babel-load-languages)
(add-hook 'LaTeX-after-usepackage-hook 'LaTeX-babel-load-languages nil t)
;; New symbols
(TeX-add-symbols
'("selectlanguage" TeX-arg-babel-lang)
'("foreignlanguage" TeX-arg-babel-lang t)
"languagename"
'("iflanguage" TeX-arg-babel-lang t nil)
'("useshorthands" t)
'("defineshorthand" t nil)
'("aliasshorthand" t nil)
'("languageshorthands" TeX-arg-babel-lang)
'("shorthandon" t)
'("shorthandoff" t)
'("languageattribute" TeX-arg-babel-lang t))
;; New environments
(LaTeX-add-environments
'("otherlanguage" LaTeX-env-babel-lang)
'("otherlanguage*" LaTeX-env-babel-lang)
'("hyphenrules" LaTeX-env-babel-lang))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("selectlanguage" "{")
("foreignlanguage" "{{")
("iflanguage" "{{{")
("languagename" "")
("useshorthands" "{")
("languageshorthands" "{")
("shorthandon" "{")
("shorthandoff" "{"))
'function)
(font-latex-add-keywords '(("defineshorthand" "{{")
("aliasshorthand" "{{")
("languageattribute" "{{"))
'variable)))
LaTeX-dialect)
(defun LaTeX-babel-package-options ()
"Prompt for package options for the babel package."
(TeX-read-key-val
t
(append
'(("KeepShorthandsActive")
("activeacute")
("activegrave")
("shorthands")
("safe" ("none" "ref" "bib"))
("math" ("active" "normal"))
("config")
("main" LaTeX-babel-language-list)
("headfoot" LaTeX-babel-language-list)
("noconfigs")
("showlanguages")
("strings" ("generic" "unicode" "encoded"))
("hyphenmap" ("off" "main" "select" "other" "other*"))
("base"))
(mapcar 'list LaTeX-babel-language-list))))
;;; babel.el ends here

Binary file not shown.

View File

@@ -0,0 +1,84 @@
;;; baskervaldx.el --- AUCTeX style for `baskervaldx.sty' (v1.07)
;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2014-11-18
;; 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 `baskervaldx.sty' (v1.07) from 2015/04/06.
;; `baskervaldx.sty' is part of TeXLive.
;;; Code:
(TeX-add-style-hook
"baskervaldx"
(lambda ()
;; Run style hook for various packages loaded by baskervaldx
(TeX-run-style-hooks "textcomp" "fontaxes")
;; New symbols
(TeX-add-symbols
;; Only preamble commands
'("useosf" 0)
;; Text commands
'("lfstyle" -1) ; lf declaration
'("tlfstyle" -1) ; tlf declaration
'("osfstyle" -1) ; osf declaration
'("tosfstyle" -1) ; tosf declaration
'("sufigures" -1) ; superior figures declaration
'("textlf" t) ; proportional lining figures
'("texttlf" t) ; tabular lining figures
'("textosf" t) ; proportional oldstyle figures
'("texttosf" t) ; tabular oldstyle figures
'("textsu" t) ; superior figures
'("swshape" -1)) ; italic shape with ligatures activated
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("textlf" "{")
("texttlf" "{")
("textosf" "{")
("texttosf" "{")
("textsu" "{"))
'type-command)
(font-latex-add-keywords '(("lfstyle" "")
("tlfstyle" "")
("osfstyle" "")
("tosfstyle" "")
("sufigures" ""))
'type-declaration)
(font-latex-add-keywords '(("swshape" ""))
'bold-declaration)))
LaTeX-dialect)
(defvar LaTeX-baskervaldx-package-options
'("lining" "lf" "oldstyle" "osf" "tabular" "proportional" "p"
"scale" "scaled" "sups" "swash")
"Package options for the baskervaldx package.")
;;; baskervaldx.el ends here

Binary file not shown.

View File

@@ -0,0 +1,368 @@
;;; beamer.el --- AUCTeX style for the latex-beamer class
;; Copyright (C) 2003, 2004, 2005, 2008, 2013, 2014 Free Software Foundation
;; 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:
(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-hooks '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" 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")
'("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)
(insert (format "\\frametitle{%s}" title))
;; This works because \frametitle is a
;; paragraph command.
(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")
(make-local-variable 'LaTeX-indent-environment-list)
(add-to-list 'LaTeX-indent-environment-list
'("semiverbatim" current-indentation))
(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)
;; For syntactic fontification, e.g. verbatim constructs.
(font-latex-set-syntactic-keywords)
;; Tell font-lock about the update.
(setq font-lock-set-defaults nil)
(font-lock-set-defaults)))
LaTeX-dialect)
(defun TeX-arg-beamer-overlay-spec (_optional &optional _prompt)
"Prompt for overlay specification."
(let ((overlay (TeX-read-string "(Optional) Overlay: ")))
(unless (zerop (length overlay))
(insert "<" overlay ">"))
(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-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

Binary file not shown.

View File

@@ -0,0 +1,530 @@
;;; biblatex.el --- AUCTeX style for `biblatex.sty' version 2.8a.
;; Copyright (C) 2012-2014, 2016 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2012-11-14
;; 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 `biblatex.sty' version 2.8a.
;;; Code:
(defvar LaTeX-biblatex-entrytype
'(;; Regular Types
"article" "book" "mvbook" "inbook" "bookinbook" "suppbook" "booklet"
"collection" "mvcollection" "incollection" "suppcollection" "manual" "misc"
"online" "patent" "periodical" "suppperiodical" "proceedings"
"mvproceedings" "inproceedings" "reference" "mvreference" "inreference"
"report" "set" "thesis" "unpublished" "xdata" "customa" "customb" "customc"
"customd" "custome" "customf"
;; Type Aliases
"conference" "electronic" "masterthesis" "phdthesis" "techreport" "www"
;; Unsupported Types
"artwork" "audio" "bibnote" "commentary" "image" "jurisdiction"
"legislation" "legal" "letter" "movie" "music" "performance" "review"
"software" "standard" "video")
"List of biblatex entry types.")
(defvar LaTeX-biblatex-executebibliographyoptions-options
'(;; General
("sorting" ("nty" "nyt" "nyvt" "anyt" "anyvt" "ynt" "ydnt" "none" "debug"))
("sortcase" ("true" "false"))
("sortupper" ("true" "false"))
("sortlocale")
("sortlos" ("bib" "los"))
("related" ("true" "false"))
("sortcites" ("true" "false"))
("maxnames")
("minnames")
("maxbibnames")
("minbibnames")
("maxcitenames")
("mincitenames")
("maxitems")
("minitems")
("autocite" ("plain" "inline" "footnote" "superscript"))
("autopunct" ("true" "false"))
("language" (append LaTeX-biblatex-language-list
'("autobib" "autocite" "auto")))
("clearlang" ("true" "false"))
("autolang" ("none" "hyphen" "other" "other*" "langname"))
("block" ("none" "space" "par" "nbpar" "ragged"))
("notetype" ("foot+end" "footonly" "endonly"))
("hyperref" ("true" "false" "auto"))
("backref" ("true" "false"))
("backrefstyle" ("none" "three" "two" "two+" "three+" "all+"))
("backrefsetstyle" ("setonly" "memonly" "setormem" "setandmem" "memandset"
"setplusmem"))
("indexing" ("true" "false" "cite" "bib"))
("loadfiles" ("true" "false"))
("refsection" ("none" "part" "chapter" "section" "subsection"))
("refsegment" ("none" "part" "chapter" "section" "subsection"))
("citereset" ("none" "part" "chapter" "section" "subsection"))
("abbreviate" ("true" "false"))
("date" ("short" "long" "terse" "comp" "iso8601"))
("datelabel" ("year" "short" "long" "terse" "comp" "iso8601"))
("origdate" ("short" "long" "terse" "comp" "iso8601"))
("eventdate" ("short" "long" "terse" "comp" "iso8601"))
("urldate" ("short" "long" "terse" "comp" "iso8601"))
("alldates" ("short" "long" "terse" "comp" "iso8601"))
("datezeros" ("true" "false"))
("dateabbrev" ("true" "false"))
("defernumbers" ("true" "false"))
("punctfont" ("true" "false"))
("arxiv" ("abs" "ps" "pdf" "format"))
("texencoding" ("auto"))
("bibencoding" ("auto"))
("safeinputenc" ("true" "false"))
("bibwarn" ("true" "false"))
("mincrossrefs")
;; Style-specific
("isbn" ("true" "false"))
("url" ("true" "false"))
("doi" ("true" "false"))
("eprint" ("true" "false"))
;; Internal
("pagetracker" ("true" "false" "page" "spread"))
("citecounter" ("true" "false" "context"))
("citetracker" ("true" "false" "context" "strict" "constrict"))
("ibidtracker" ("true" "false" "context" "strict" "constrict"))
("opcittracker" ("true" "false" "context" "strict" "constrict"))
("loccittracker" ("true" "false" "context" "strict" "constrict"))
("idemtracker" ("true" "false" "context" "strict" "constrict"))
("parentracker" ("true" "false"))
("maxparens")
("firstinits" ("true" "false"))
("sortfirstinits" ("true" "false"))
("terseinits" ("true" "false"))
("labelalpha" ("true" "false"))
("maxalphanames")
("minalphanames")
("labelnumber" ("true" "false"))
("labeltitle" ("true" "false"))
("labeltitleyear" ("true" "false"))
("labeldate" ("true" "false"))
("singletitle" ("true" "false"))
("uniquename" ("true" "false" "init" "full" "allinit" "allfull" "mininit"
"minfull"))
("uniquelist" ("true" "false" "minyear")))
"Key=value options for ExecuteBibliographyOptions macro of the biblatex package.")
;; See table 2 of Biblatex reference manual.
(defvar LaTeX-biblatex-language-list
'("catalan" "croatian" "czech" "danish" "dutch" "american" "british"
"canadian" "australian" "newzealand" "finnish" "french" "german" "austrian"
"ngernam" "naustrian" "greek" "italian" "norwegian" "polish" "brazilian"
"portuguese" "russian" "spanish" "swedish")
"List of languages supported by biblatex packages.")
(defvar LaTeX-biblatex-addbibresource-options
'(("label")
("location" ("local" "remote"))
("type" ("file"))
("datatype" ("bibtex" "ris" "zoterordfxml" "endnotexml")))
"Key=value options for addbibresource macro of the biblatex package.")
(defun LaTeX-arg-addbibresource (optional &optional prompt)
"Prompt for a BibLaTeX database file.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string."
(let (files inputs database)
(if LaTeX-using-Biber
(setq files 'TeX-Biber-global-files
inputs 'biberinputs)
(setq files 'BibTeX-global-files
inputs 'bibinputs))
(setq files 'TeX-Biber-global-files
inputs 'biberinputs)
(message "Searching for BibLaTeX files...")
(or (symbol-value files)
(set files (mapcar 'list (TeX-search-files-by-type
'biberinputs 'global t nil))))
(setq database (completing-read
(TeX-argument-prompt optional prompt "BibLaTeX files")
(append (mapcar 'list (TeX-search-files-by-type
inputs 'local t nil))
(symbol-value files))))
(LaTeX-add-bibliographies database)
;; Run style file associated to the bibliography database file in order to
;; immediately fill `LaTeX-bibitem-list'. We need to strip the extension
;; because AUCTeX style files don't use it.
(TeX-run-style-hooks (file-name-sans-extension database))
(TeX-argument-insert database optional)))
;; Support for multicite commands, see § 3.7.3 of Biblatex reference manual.
(defun LaTeX-arg-biblatex-cites (optional &optional prompt)
"Prompt for citations with completion until input is empty.
Prompt also for optional prenotes and postnotes. If OPTIONAL is
non-nil, insert the citation key as an optional argument,
otherwise as a mandatory one. Use PROMPT as the prompt string
for citation keys."
;; Prompt for global prenote and postnote.
(and TeX-arg-cite-note-p (not current-prefix-arg)
(let ((TeX-arg-opening-brace "(")
(TeX-arg-closing-brace ")")
(prenote (TeX-read-string
(TeX-argument-prompt t nil "Global prenote"))))
(TeX-argument-insert prenote t)
;; If the prenote is empty the postnote is optional, otherwise it's
;; mandatory.
(TeX-argument-insert
(TeX-read-string (TeX-argument-prompt t nil "Global postnote"))
(equal prenote ""))))
(let ((items t) (noinsert nil))
(while items
;; Prompt for prenote and postnote of the current keys.
(and TeX-arg-cite-note-p (not current-prefix-arg)
(let ((TeX-arg-opening-brace "[")
(TeX-arg-closing-brace "]")
(prenote (TeX-read-string
(TeX-argument-prompt t nil "Prenote"))))
(TeX-argument-insert prenote t)
;; If the prenote is empty the postnote is optional, otherwise it's
;; mandatory.
(TeX-argument-insert
(TeX-read-string (TeX-argument-prompt t nil "Postnote"))
(equal prenote ""))))
(setq items (TeX-completing-read-multiple
(TeX-argument-prompt optional prompt "Key")
(LaTeX-bibitem-list)))
(apply 'LaTeX-add-bibitems items)
;; If input is empty, insert an empty group only the first time, when
;; `noinsert' flag is nil.
(unless (and (not items) noinsert)
(TeX-argument-insert (mapconcat 'identity items ",") optional))
(setq noinsert t))))
(TeX-add-style-hook
"biblatex"
(lambda ()
;; Biblatex uses as default backend biber, run it unless biblatex `backend'
;; option value is one of `bibtex', `bibtex8', `bibtexu'. Autodetection of
;; the backend can be overridden by setting `LaTeX-biblatex-use-Biber' as a
;; local variable.
(setq LaTeX-using-Biber
(if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
LaTeX-biblatex-use-Biber
(not (or (LaTeX-provided-package-options-member
"biblatex" "backend=bibtex")
(LaTeX-provided-package-options-member
"biblatex" "backend=bibtex8")
(LaTeX-provided-package-options-member
"biblatex" "backend=bibtexu")))))
(TeX-run-style-hooks
"etoolbox"
"keyval"
"kvoptions"
"logreq"
"ifthen"
"url")
(TeX-add-symbols
;;; Global Customization
;; Setting Package Options
'("ExecuteBibliographyOptions"
[TeX-arg-eval mapconcat 'identity
(TeX-completing-read-multiple
"Entry type: " LaTeX-biblatex-entrytype) ","]
(TeX-arg-key-val LaTeX-biblatex-executebibliographyoptions-options))
;;; Bibliography Commands
;; Resources
'("addbibresource" [TeX-arg-key-val LaTeX-biblatex-addbibresource-options]
LaTeX-arg-addbibresource)
'("addglobalbib" [TeX-arg-key-val LaTeX-biblatex-addbibresource-options]
LaTeX-arg-addbibresource)
'("addsectionbib" [TeX-arg-key-val LaTeX-biblatex-addbibresource-options]
LaTeX-arg-addbibresource)
;; The Bibliography
'("printbibliography"
[TeX-arg-key-val (("env") ("heading") ("title") ("prenote") ("postnote")
("section") ("segment") ("sorting") ("type") ("nottype")
("subtype") ("notsubtype") ("keyword") ("notkeyword")
("categoy") ("notcategory") ("filter") ("check")
("prefixnumbers") ("resetnumbers" ("true" "false"))
("omitnumbers" ("true" "false")))])
'("bibbysection"
[TeX-arg-key-val (("env") ("heading") ("prenote") ("postnote"))])
'("bibbysegment"
[TeX-arg-key-val (("env") ("heading") ("prenote") ("postnote"))])
'("bibbycategory"
[TeX-arg-key-val (("env") ("prenote") ("postnote") ("section"))])
'("printbibheading"
[TeX-arg-key-val (("heading") ("title"))])
;; The List of Shorthands
'("printshorthands"
[TeX-arg-key-val (("env") ("heading") ("title") ("prenote") ("postnote")
("section") ("segment") ("sorting") ("type") ("nottype")
("subtype") ("notsubtype") ("keyword") ("notkeyword")
("categoy") ("notcategory") ("filter") ("check"))])
;; Bibliography Sections
'("newrefsection" ["Resources"])
"endrefsection"
;; Bibliography Segments
"newrefsegment"
"endrefsegment"
;; Bibliography Categories
'("DeclareBibliographyCategory" "Category")
'("addtocategory" "Category" TeX-arg-cite)
;; Bibliography Headings and Environments
'("defbibenvironment" "Name" 3)
'("defbibheading" "Name" ["Title"] t)
;; Bibliography Notes
'("defbibnote" "Name" "Text")
;; Bibliography Filters and Checks
'("defbibfilter" "Name" t)
'("defbibcheck" "Name" t)
;; Dynamic Entry Sets
'("defbibentryset" "Set"
(TeX-arg-eval mapconcat 'identity (TeX-completing-read-multiple
"Keys: " (LaTeX-bibitem-list)) ","))
;;; Citation Commands
'("cite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Cite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("parencite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Parencite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("footcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("footcitetext" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
;; Style-specific Commands
'("textcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Textcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("smartcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Smartcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("cite*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("parencite*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("supercite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
;; Qualified Citation Lists
'("cites" LaTeX-arg-biblatex-cites)
'("Cites" LaTeX-arg-biblatex-cites)
'("parencites" LaTeX-arg-biblatex-cites)
'("Parencites" LaTeX-arg-biblatex-cites)
'("footcites" LaTeX-arg-biblatex-cites)
'("footcitetexts" LaTeX-arg-biblatex-cites)
'("smartcites" LaTeX-arg-biblatex-cites)
'("Smartcites" LaTeX-arg-biblatex-cites)
'("textcites" LaTeX-arg-biblatex-cites)
'("Textcites" LaTeX-arg-biblatex-cites)
'("supercites" LaTeX-arg-biblatex-cites)
;; Style-independent Commands
'("autocite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Autocite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("autocite*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Autocite*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("autocites" LaTeX-arg-biblatex-cites)
'("Autocites" LaTeX-arg-biblatex-cites)
;; Text Commands
'("citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citetitle" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citetitle*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citeyear" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citeyear*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citedate" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citedate*" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("citeurl" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("parentext" "Text")
'("brackettext" "Text")
;; Special Commands
'("fullcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("footfullcite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("volcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("Volcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("Pvolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("Pvolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("fvolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("ftolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("svolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("Svolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("tvolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("Tvolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("avolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("Avolcite"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume"
(TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite)
'("notecite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Notecite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("pnotecite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("Pnotecite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
'("fnotecite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
;; Low-level Commands
'("citename"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ())
TeX-arg-cite (TeX-arg-conditional TeX-arg-cite-note-p (["Format"]) ())
"Name list")
'("citelist"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ())
TeX-arg-cite (TeX-arg-conditional TeX-arg-cite-note-p (["Format"]) ())
"Literal list")
'("citefield"
(TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ())
TeX-arg-cite (TeX-arg-conditional TeX-arg-cite-note-p (["Format"]) ())
"Field")
;; Miscellaneous Commands
"citereset"
"citereset*"
"mancite"
"pno"
"ppno"
"nopp"
"psq"
"psqq"
'("RN" "Integer")
'("Rn" "Integer")
;; Localization Commands
'("DefineBibliographyStrings"
(TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t)
'("DefineBibliographyExtras"
(TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t)
'("UndefineBibliographyExtras"
(TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t)
'("DefineHyphenationExceptions"
(TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t)
"NewBibliographyString")
(LaTeX-add-environments
;;; Bibliography commands
;; Bibliography Sections
'("refsection" ["Resources"])
;; Bibliography Segments
"refsegment")
;; Declaring expert macros and environments. Criterion: all macros and
;; environments to fine tune the bibliography, probably they will be used
;; only by expert users.
(TeX-declare-expert-macros
"biblatex"
"ExecuteBibliographyOptions" "printshorthands" "newrefsection"
"endrefsection" "newrefsegment" "endrefsegment"
"DeclareBibliographyCategory" "addtocategory" "defbibenvironment"
"defbibheading" "defbibnote" "defbibfilter" "defbibcheck" "defbibentryset"
"citereset" "citereset*" "mancite" "pno" "ppno" "nopp" "psq" "psqq" "RN"
"Rn" "DefineBibliographyStrings" "DefineBibliographyExtras"
"UndefineBibliographyExtras" "DefineHyphenationExceptions"
"NewBibliographyString")
(LaTeX-declare-expert-environments
"biblatex"
"refsection" "refsegment"))
LaTeX-dialect)
(defvar LaTeX-biblatex-package-options-list
(append
;;; Preamble Options
LaTeX-biblatex-executebibliographyoptions-options
'(;;; Load-time Options
("backend" ("biber" "bibtex" "bibtexu" "bibtex8"))
("style" BibLaTeX-global-style-files)
("bibstyle" BibLaTeX-global-style-files)
("citestyle" BibLaTeX-global-style-files)
("natbib" ("true" "false"))
("mcite" ("true" "false"))
;;; Entry Options
;; Preamble/Type/Entry Options
("useauthor" ("true" "false"))
("useeditor" ("true" "false"))
("usetranslator" ("true" "false"))
("useprefix" ("true" "false"))
("indexing" ("true" "false" "cite" "bib"))
;; Type/Entry Options are not available globally.
;; Legacy Options (deprecated)
("openbib")))
"Package options for the biblatex package.")
(defun LaTeX-biblatex-package-options nil
"Prompt for package options for the biblatex package."
(unless BibLaTeX-global-style-files
(if (if (eq TeX-arg-input-file-search 'ask)
(not (y-or-n-p "Find BibLaTeX style yourself? "))
TeX-arg-input-file-search)
;; ...then, search for BibLaTeX styles.
(progn
(message "Searching for BibLaTeX styles...")
(setq BibLaTeX-global-style-files
(TeX-search-files-by-type 'bbxinputs 'global t t)))
;; ...else, use for completion only standard BibLaTeX styles (see §3.3 of
;; Biblatex reference manual).
(setq BibLaTeX-global-style-files
'("numeric" "numeric-comp" "numeric-verb" "alphabetic"
"alphabetic-verb" "authoryear" "authoryear-comp" "authoryear-ibid"
"authoryear-icomp" "authortitle" "authortitle-comp"
"authortitle-ibid" "authortitle-icomp" "authortitle-terse"
"authortitle-tcomp" "authortitle-ticomp" "verbose" "verbose-ibid"
"verbose-note" "verbose-inote" "verbose-trad1" "verbose-trad2"
"verbose-trad3" "reading" "draft" "debug"))))
(TeX-read-key-val t LaTeX-biblatex-package-options-list))
;;; biblatex.el ends here

Binary file not shown.

View File

@@ -0,0 +1,40 @@
;;; bidibeamer.el --- AUCTeX style for the bidibeamer class
;; Copyright (C) 2015 Free Software Foundation
;; Author: Tassilo Horn <tsdh@gnu.org>
;; Created: 2015-03-08
;; Keywords: tex
;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; AUCTeX is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with AUCTeX; see the file COPYING. If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.
;;; Commentary:
;; This file adds support for the bidibeamer class which offers the same
;; functionality and interface as latex-beamer, so we simply call the style
;; hook of the latter.
;;; Code:
(TeX-add-style-hook
"bidibeamer"
(lambda ()
(TeX-run-style-hooks "beamer"))
LaTeX-dialect)
;;; bidibeamer.el ends here

Binary file not shown.

View File

@@ -0,0 +1,53 @@
;;; bigdelim.el --- AUCTeX style for `bigdelim.sty'
;; Copyright (C) 2011 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2011-01-24
;; 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 `bigdelim.sty'.
;;; Code:
(TeX-add-style-hook
"bigdelim"
(lambda ()
(TeX-add-symbols
'("ldelim" TeX-arg-bigdelim-brace "Number of rows for multirow"
"Width in multirow" [ "Text in multirow" ])
'("rdelim" TeX-arg-bigdelim-brace "Number of rows for multirow"
"Width in multirow" [ "Text in multirow" ])))
LaTeX-dialect)
(defun TeX-arg-bigdelim-brace (optional &optional prompt)
"Prompt for a single brace, and do not insert the matching
right parentheses."
(let ((brace (read-from-minibuffer
(TeX-argument-prompt optional prompt "Brace") nil)))
(insert (format "%s" brace))))
(defvar LaTeX-bigdelim-package-options nil
"Package options for the bigdelim package.")
;;; bigdelim.el ends here

Binary file not shown.

View File

@@ -0,0 +1,51 @@
;;; bigstrut.el --- AUCTeX style for `bigstrut.sty'
;; Copyright (C) 2012, 2014 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
;; 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 `bigstrut.sty'.
;;; Code:
(TeX-add-style-hook
"bigstrut"
(lambda ()
(TeX-add-symbols
"bigstrutsetup"
'("bigstrut" [ TeX-arg-bigstrut ])))
LaTeX-dialect)
(defun TeX-arg-bigstrut (optional &optional _prompt)
"Prompt for the optional argument in \\bigstrut."
(TeX-argument-insert
(completing-read (TeX-argument-prompt
optional "Strut to top (t) or bottom (b)" nil t)
(mapcar 'list '("t" "b")) nil t)
optional))
(defvar LaTeX-bigstrut-package-options nil
"Package options for the bigstrut package.")
;;; bigstrut.el ends here

Binary file not shown.

View File

@@ -0,0 +1,55 @@
;;; bm.el --- AUCTeX style for `bm.sty'.
;; Copyright (C) 2012 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <giordano.mose@libero.it>
;; 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 `bm.sty'.
;;; Code:
(TeX-add-style-hook "bm"
(lambda ()
(TeX-add-symbols
'("bm" 1)
'("hm" 1)
'("DeclareBoldMathCommand" [ "Math version" ] TeX-arg-define-macro "Math expression")
'("bmdefine" TeX-arg-define-macro "Math expression")
'("hmdefine" TeX-arg-define-macro "Math expression"))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("bm" "{")
("hm" "{"))
'bold-command)
(font-latex-add-keywords '(("DeclareBoldMathCommand" "[|{\\{")
("bmdefine" "|{\\{")
("hmdefine" "|{\\{"))
'function)))
LaTeX-dialect)
(defvar LaTeX-bm-package-options nil
"Package options for the bm package.")
;; bm.el ends here

Binary file not shown.

View File

@@ -0,0 +1,21 @@
;;; book.el - Special code for book style.
;;; Code:
(defvar LaTeX-book-class-options
'("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper"
"landscape" "10pt" "11pt" "12pt" "oneside" "twoside" "draft" "final"
"titlepage" "notitlepage" "openright" "openany" "onecolumn" "twocolumn"
"leqno" "fleqn" "openbib")
"Package options for the book class.")
(TeX-add-style-hook
"book"
(lambda ()
(LaTeX-largest-level-set "part")
(LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection"
"paragraph" "subparagraph" "figure" "table")
(LaTeX-add-pagestyles "headings" "myheadings"))
LaTeX-dialect)
;;; book.el ends here

Binary file not shown.

View File

@@ -0,0 +1,79 @@
;;; booktabs.el -- AUCTeX style for booktabs.sty
;; Copyright (C) 2003, 2004, 2013 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2003-10-21
;; 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 `booktabs.sty'.
;;; Code:
(defun LaTeX-booktabs-arg-paren (optional prompt)
"Prompt for a value and use parentheses when it is inserted.
If OPTIONAL is non-nil the parameter is labeled as optional.
PROMPT is the value of the prompt to be shown."
(let ((TeX-arg-opening-brace "\(")
(TeX-arg-closing-brace "\)"))
(TeX-parse-argument optional prompt)))
(TeX-add-style-hook
"booktabs"
(lambda ()
;; Do not append an empty group to toprule, midrule, and bottomrule macros,
;; otherwise one gets a wrong spacing in the table.
(setq TeX-insert-braces-alist (append TeX-insert-braces-alist
'(("toprule" . nil)
("midrule" . nil)
("bottomrule" . nil))))
;; New symbols
(TeX-add-symbols
'("toprule" [ "Thickness" ])
'("midrule" [ "Thickness" ])
'("bottomrule" [ "Thickness" ])
;; The `ignore' resets `last-optional-rejected' to nil so that the trim
;; argument is prompted also when the thickness is skipped.
'("cmidrule" [ "Thickness" ] (ignore) [ LaTeX-booktabs-arg-paren "Trim" ]
"Column(s)")
'("addlinespace" [ "Height" ])
'("morecmidrules")
'("specialrule" "Thickness" "Space above" "Space below"))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("toprule" "[")
("midrule" "[")
("bottomrule" "[")
("cmidrule" "[({")
("addlinespace" "[")
("morecmidrules" "")
("specialrule" "{{{"))
'function)))
LaTeX-dialect)
(defvar LaTeX-booktabs-package-options nil
"Package options for the booktabs package.")
;;; booktabs.el ends here

Binary file not shown.

View File

@@ -0,0 +1,55 @@
;;; bulgarian.el --- AUCTeX style for the `bulgarian' babel option.
;; Copyright (C) 2008 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2008-06-28
;; 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:
;; Set up AUCTeX for editing Bulgarian text in connection with the
;; `bulgarian' babel option.
;;; Code:
(defvar LaTeX-bulgarian-mode-syntax-table
(copy-syntax-table LaTeX-mode-syntax-table)
"Syntax table used in LaTeX mode when using `bulgarian.sty'.")
(modify-syntax-entry ?\" "w" LaTeX-bulgarian-mode-syntax-table)
(TeX-add-style-hook
"bulgarian"
(lambda ()
(set-syntax-table LaTeX-bulgarian-mode-syntax-table)
(unless (eq (car TeX-quote-language) 'override)
(setq TeX-quote-language
`("bulgarian" "\"`" "\"'" ,TeX-quote-after-quote)))
(setq LaTeX-babel-hyphen-language "bulgarian")
;; Fontification of quotation marks.
(when (fboundp 'font-latex-add-quotes)
(font-latex-add-quotes '("\"`" "\"'"))
(font-latex-add-quotes '("\"<" "\">" french)))
(run-hooks 'TeX-language-bg-hook))
LaTeX-dialect)
;;; bulgarian.el ends here

Binary file not shown.

View File

@@ -0,0 +1,47 @@
;; captcont.el --- AUCTeX style file for captcont.sty
;; Copyright (C) 2003, 2005 Free Software Foundation, Inc.
;; Author: Reiner Steib <Reiner.Steib@gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; 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:
;; AUCTeX style file for captcont.sty
;;; Code:
(TeX-add-style-hook
"captcont"
(lambda ()
(TeX-add-symbols
'("captcont" [ "list entry" ] "Caption")
'("captcont*" [ "list entry" ] "Caption"))
;; Fontification
(when (featurep 'font-latex)
(font-latex-add-keywords '(("captcont" "*[{")) 'textual)))
LaTeX-dialect)
(defvar LaTeX-captcont-package-options '("figbotcap" "figtopcap" "tabbotcap"
"tabtopcap")
"Package options for the captcont package.")
;;; captcont.el ends here

Binary file not shown.

View File

@@ -0,0 +1,378 @@
;;; caption.el --- AUCTeX style for `caption.sty' (v3.3-111)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-02-21
;; 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 `caption.sty' (v3.3-111) from 2015/09/17.
;; `caption.sty' is part of TeXLive.
;; If things do not work or when in doubt, press `C-c C-n'. Comments
;; for improvement are welcome.
;;; Code:
;; Needed for compiling `pushnew':
(eval-when-compile (require 'cl))
;; Needed for auto-parsing.
(require 'tex)
(defvar LaTeX-caption-key-val-options
'(("aboveskip")
("belowskip")
("font" ("scriptsize" "footnotesize" "small" "normalsize" "large"
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
("font+" ("scriptsize" "footnotesize" "small" "normalsize" "large"
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
("format" ("plain" "hang"))
("hangindent")
("hypcap" ("false" "no" "off" "0" "true" "yes" "on" "1"))
("hypcapspace")
("indention")
("justification" ("justified" "centering" "centerlast" "centerfirst"
"raggedright" "RaggedRight" "raggedleft"))
("labelfont" ("scriptsize" "footnotesize" "small" "normalsize" "large"
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
("labelfont+" ("scriptsize" "footnotesize" "small" "normalsize" "large"
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
("labelformat" ("default" "empty" "simple" "brace" "parens"))
("labelsep" ("none" "colon" "period" "space" "quad" "newline" "endash"))
("list" ("false" "no" "off" "0" "true" "yes" "on" "1"))
("listformat" ("empty" "simple" "paren" "subsimple" "subparens"))
("margin")
("margin*")
("maxmargin")
("minmargin")
("name")
("oneside")
("parindent")
("parskip")
("position" ("top" "above" "bottom" "below" "auto"))
("singlelinecheck" ("false" "no" "off" "0" "true" "yes" "on" "1"))
("skip")
("strut" ("false" "no" "off" "0" "true" "yes" "on" "1"))
("style" ("base" "default"))
("textfont" ("scriptsize" "footnotesize" "small" "normalsize" "large"
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
("textfont+" ("scriptsize" "footnotesize" "small" "normalsize" "large"
"Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm"
"sf" "tt" "singlespacing" "onehalfspacing" "doublespacing"
"stretch" "normalcolor" "color" "normal"))
("textformat" ("empty" "simple" "period"))
("twoside")
("type" ("figure" "table" "ContinuedFloat"))
("type*" ("figure" "table" "ContinuedFloat"))
("width"))
"Key=value options for caption macros.")
(defvar LaTeX-caption-key-val-options-local nil
"Buffer-local key=value options for caption macros.")
(make-variable-buffer-local 'LaTeX-caption-key-val-options-local)
(defvar LaTeX-caption-supported-float-types
'("figure" "table" "ContinuedFloat" ; Standard caption.sty
"sub" "subtable" "subfigure" ; subcaption.sty
"ruled" "boxed" ; float.sty
"floatingfigure" "floatingtable" ; floatflt.sty
"lstlisting" ; listings.sty
"longtable" ; longtable.sty
"figwindow" "tabwindow" ; picinpar.sty
"parpic" ; picins.sty
"SCfigure" "SCtable" ; sidecap.sty
"supertabular" "xtabular" ; supertabular.sty & xtab.sty
"threeparttable" "measuredfigure" ; threeparttable.sty
"wrapfigure" "wraptable") ; wrapfigure
"List of float types provided by other LaTeX packages and
supported by `caption.sty'.")
;; Setup for various \DeclareCaption's:
(TeX-auto-add-type "caption-DeclareCaption" "LaTeX")
;; The 2. argument to `DeclareCaption[A-Za-z]' contains (La)TeX code.
;; We deliberately ignore that argument in our regex since it is not
;; needed for this style and would pollute the auto generated
;; `docname.el' file.
(defvar LaTeX-caption-DeclareCaption-regexp
`(,(concat "\\\\DeclareCaption\\(Font\\|Format\\|Justification"
"\\|LabelFormat\\|LabelSeparator\\|ListFormat"
"\\|Option\\|Style\\|TextFormat\\)"
"\\*?"
"[ \t\n\r%]*"
"{\\([^}]+\\)}")
(0 1 2) LaTeX-auto-caption-DeclareCaption)
"Matches the arguments of different `\\DeclareCaption*' from
`caption.sty'.")
(defun LaTeX-caption-auto-prepare ()
"Clear `LaTeX-auto-caption-DeclareCaption' before parsing."
(setq LaTeX-auto-caption-DeclareCaption nil))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-caption-auto-prepare t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(defun LaTeX-caption-update-key-val-options ()
"Update the buffer-local key-val options before offering them
in `caption'-completions."
(dolist (keyvals (LaTeX-caption-DeclareCaption-list))
(let* ((key (cond ((string-equal (nth 1 keyvals) "LabelSeparator")
(downcase (substring (nth 1 keyvals) 0 8)))
(t (downcase (nth 1 keyvals)))))
(val (nth 2 keyvals))
(val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
(temp (copy-alist LaTeX-caption-key-val-options-local))
;; If `subcaption.el' is loaded, delete and update also the
;; entry for `subrefformat' when processing the `labelformat'.
(opts (progn
(when (and (string-equal key "labelformat")
(boundp 'LaTeX-subcaption-key-val-options))
(setq temp
(assq-delete-all
(car (assoc (caar LaTeX-subcaption-key-val-options) temp))
temp)))
(assq-delete-all (car (assoc key temp)) temp))))
;; For `\DeclareCaptionOption', only add the value
;; (remember: key=^^^^^^, val="defined key")
(if (string-equal key "option")
(pushnew (list val) opts :test #'equal)
;; For anything but `\DeclareCaptionOption', do the standard
;; procedure. Again, take care of `subrefformat' for `subcaption.el'.
(if val-match
(progn
(when (and (string-equal key "labelformat")
(boundp 'LaTeX-subcaption-key-val-options))
(pushnew (list "subrefformat"
(delete-dups (apply 'append (list val) val-match)))
opts :test #'equal))
(pushnew (list key (delete-dups (apply 'append (list val) val-match)))
opts :test #'equal))
(pushnew (list key (list val)) opts :test #'equal)))
(setq LaTeX-caption-key-val-options-local (copy-alist opts)))))
(defun LaTeX-arg-caption-command (optional &optional prompt)
"Insert caption-commands from `caption.sty'. If OPTIONAL,
indicate `(Optional)' while reading key=val and insert it in
square brackets. PROMPT replaces the standard one."
(LaTeX-caption-update-key-val-options)
(let ((opts (TeX-read-key-val optional
LaTeX-caption-key-val-options-local
prompt)))
(TeX-argument-insert opts optional)))
;; In `LaTeX-caption-DeclareCaption-regexp', we match (0 1 2). When
;; adding a new `Name', we need something unique for `0'-match until
;; the next `C-c C-n'. We mimic that regex-match bei concat'ing the
;; elements. It will vanish upon next `C-c C-n'.
(defun LaTeX-arg-caption-DeclareCaption (optional format)
"Insert various `\\DeclareCaptionFORMAT' commands. If
OPTIONAL, insert argument in square brackets. FORMAT is the
suffix of the command."
(let ((name (TeX-read-string "Name: ")))
(LaTeX-add-caption-DeclareCaptions
(list (concat "\\DeclareCaption" format "{" name "}")
format name))
(TeX-argument-insert name optional)))
;; Support for an undocumented feature of caption.sty:
;; `\captionbox' sets the width of the caption equal to the width of
;; the contents (a feature provided e.g. by `threeparttable.sty').
;; The starred version typesets the caption without label and without
;; entry to the list of figures or tables.
;; The first mandatory argument {<heading>} contains the caption text
;; and the label. We use `TeX-insert-macro' to do the job. (Thanks to
;; M. Giordano for his valuable comments on this!)
;; Syntax:
;; \captionbox[<list entry>]{<heading>}[<width>][<inner-pos>]{<contents>}
;; \captionbox*{<heading>}[<width>][<inner-pos>]{<contents>}
(defun LaTeX-arg-caption-captionbox (optional &optional star prompt)
"Query for the arguments of `\\captionbox' incl. a label and
insert them. If STAR is non-nil, then do not query for a `\\label' and
insert only a caption."
(let ((caption (TeX-read-string
(TeX-argument-prompt optional prompt "Caption"))))
(LaTeX-indent-line)
(insert TeX-grop caption)
(unless star (TeX-insert-macro "label"))
(insert TeX-grcl))
(let* ((width (completing-read (TeX-argument-prompt t prompt "Width")
(mapcar (lambda(elt) (concat TeX-esc (car elt)))
(LaTeX-length-list))))
(inpos (when (and width (not (string-equal width "")))
(completing-read (TeX-argument-prompt t prompt "Inner position")
'("c" "l" "r" "s")))))
(cond (;; 2 optional args
(and width (not (string-equal width ""))
inpos (not (string-equal inpos "")))
(insert (format "[%s][%s]" width inpos)))
(;; 1st opt. arg, 2nd empty opt. arg
(and width (not (string-equal width ""))
(string-equal inpos ""))
(insert (format "[%s]" width)))
(t ; Do nothing if both empty
(ignore)))))
(TeX-add-style-hook
"caption"
(lambda ()
;; Add caption to the parser.
(TeX-auto-add-regexp LaTeX-caption-DeclareCaption-regexp)
;; Activate the buffer-local version of key-vals.
(setq LaTeX-caption-key-val-options-local
(copy-alist LaTeX-caption-key-val-options))
;; Caption commands:
(TeX-add-symbols
'("caption*" t)
'("captionlistentry"
[TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
LaTeX-caption-supported-float-types]
t)
'("captionof"
(TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
LaTeX-caption-supported-float-types)
["List entry"] t)
'("captionof*"
(TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
LaTeX-caption-supported-float-types)
["List entry"] t)
'("captionsetup"
[TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
LaTeX-caption-supported-float-types]
(LaTeX-arg-caption-command))
'("captionsetup*"
[TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type")
LaTeX-caption-supported-float-types]
(LaTeX-arg-caption-command))
'("clearcaptionsetup"
[LaTeX-arg-caption-command "Single key"]
(TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
LaTeX-caption-supported-float-types))
'("clearcaptionsetup*"
[LaTeX-arg-caption-command "Single key"]
(TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type")
LaTeX-caption-supported-float-types))
'("captionbox" ["List entry"] (LaTeX-arg-caption-captionbox) t)
'("captionbox*" (LaTeX-arg-caption-captionbox t) t)
'("ContinuedFloat" 0)
'("ContinuedFloat*" 0)
'("continuedfloat" 0)
'("continuedfloat*" 0)
'("DeclareCaptionFont"
(LaTeX-arg-caption-DeclareCaption "Font") t)
'("DeclareCaptionFormat"
(LaTeX-arg-caption-DeclareCaption "Format") t)
'("DeclareCaptionFormat*"
(LaTeX-arg-caption-DeclareCaption "Format") t)
'("DeclareCaptionJustification"
(LaTeX-arg-caption-DeclareCaption "Justification") t)
'("DeclareCaptionLabelFormat"
(LaTeX-arg-caption-DeclareCaption "LabelFormat") t)
'("DeclareCaptionLabelSeparator"
(LaTeX-arg-caption-DeclareCaption "LabelSeparator") t)
'("DeclareCaptionLabelSeparator*"
(LaTeX-arg-caption-DeclareCaption "LabelSeparator") t)
'("DeclareCaptionListFormat"
(LaTeX-arg-caption-DeclareCaption "ListFormat") t)
'("DeclareCaptionOption"
(LaTeX-arg-caption-DeclareCaption "Option") t)
'("DeclareCaptionStyle"
(LaTeX-arg-caption-DeclareCaption "Style")
[LaTeX-arg-caption-command "Additional options"]
(LaTeX-arg-caption-command "Options"))
'("DeclareCaptionTextFormat"
(LaTeX-arg-caption-DeclareCaption "TextFormat") t)
'("bothIfFirst" 2)
'("bothIfSecond" 2))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("caption" "*[{")
("captionlistentry" "[{")
("captionof" "*{[{")
("captionbox" "*[{[[{"))
'textual)
(font-latex-add-keywords '(("captionsetup" "*[{")
("clearcaptionsetup" "*[{")
("DeclareCaptionFont" "{{")
("DeclareCaptionFormat" "*{{")
("DeclareCaptionJustification" "{{")
("DeclareCaptionLabelFormat" "{{")
("DeclareCaptionLabelSeparator" "*{{")
("DeclareCaptionListFormat" "{{")
("DeclareCaptionOption" "{{")
("DeclareCaptionStyle" "{[{")
("DeclareCaptionTextFormat" "{{"))
'function)) )
LaTeX-dialect)
(defun LaTeX-caption-package-options ()
"Prompt for package options for the caption package."
(TeX-read-key-val t
(append '(("compatibility" ("true" "false")))
'(("figureposition" ("top" "above" "bottom" "below")))
'(("tableposition" ("top" "above" "bottom" "below")))
LaTeX-caption-key-val-options)))
;;; caption.el ends here

Binary file not shown.

View File

@@ -0,0 +1,108 @@
;;; cleveref.el --- Style hook for the `cleveref.sty' package.
;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
;; Author: Matthew Leach <matthew@mattleach.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 13/10/2014
;; 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.
;;; Code
(defun TeX-arg-cleveref-multiple-labels (optional &optional prompt definition)
"Prompt for a series of labels completing with known labels.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string. If DEFINITION is non-nil, add each chosen label to the
list of defined labels."
(let* ((labels (TeX-completing-read-multiple
(TeX-argument-prompt optional prompt "Keys")
(LaTeX-label-list)))
(labels-string (mapconcat 'identity labels ",")))
(when definition
(apply 'LaTeX-add-labels labels))
(TeX-argument-insert labels-string optional optional)))
(TeX-add-style-hook
"cleveref"
(lambda ()
(TeX-add-symbols
'("cref" TeX-arg-cleveref-multiple-labels)
'("Cref" TeX-arg-cleveref-multiple-labels)
'("crefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
'("Crefrange" (TeX-arg-label "key (first)") (TeX-arg-label "Key (last)"))
'("cpageref" TeX-arg-cleveref-multiple-labels)
'("Cpageref" TeX-arg-cleveref-multiple-labels)
'("cpagerefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
'("Cpagerefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
'("cref*" TeX-arg-cleveref-multiple-labels)
'("Cref*" TeX-arg-cleveref-multiple-labels)
'("crefrange*" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
'("Crefrange*" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
'("namecref" TeX-arg-label)
'("nameCref" TeX-arg-label)
'("lnamecref" TeX-arg-label)
'("namecrefs" TeX-arg-label)
'("nameCrefs" TeX-arg-label)
'("lnamecrefs" TeX-arg-label)
'("labelcref" TeX-arg-cleveref-multiple-labels)
'("labelcpageref" TeX-arg-cleveref-multiple-labels))
;; These macros aren't used particularly often during the course of
;; normal referencing.
(TeX-declare-expert-macros
"cleveref"
"namecref" "nameCref" "lnamecref" "namecrefs" "nameCrefs"
"lnamecrefs" "labelcref" "labelcpageref")
;; Fontification
(when (and (fboundp 'font-latex-add-keywords)
(fboundp 'font-latex-set-syntactic-keywords)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("cref" "*{")
("Cref" "*{")
("crefrange" "*{{")
("Crefrange" "*{{")
("cpageref" "{")
("Cpageref" "{")
("cpagerefrange" "{{")
("Cpagerefrange" "{{")
("namecref" "{")
("nameCref" "{")
("lnamecref" "{")
("namecrefs" "{")
("nameCrefs" "{")
("lnamecrefs" "{")
("labelcref" "{")
("labelcpageref" "{"))
'reference)
;; For syntactic fontification, e.g. verbatim constructs.
(font-latex-set-syntactic-keywords))
;; Activate RefTeX reference style.
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
(reftex-ref-style-activate "Cleveref")))
LaTeX-dialect)
(defvar LaTeX-cleveref-package-options
'("capitalise" "nameinlink" "noabbrev" "poorman")
"Package options for the cleveref package.")
;;; cleveref.el ends here.

Binary file not shown.

View File

@@ -0,0 +1,309 @@
;;; color.el --- AUCTeX style for `color.sty' (v1.1a)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-01-16
;; 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 `color.sty' (v1.1a) from 2014/10/28.
;; `color.sty' is part of TeXLive.
;; Many thanks to Tassilo Horn for his percetive comments on
;; implementation of this style and testing.
;;; Code:
(defvar LaTeX-color-colour-models
'("cmyk" "gray" "named" "rgb")
"List of color models provided by `color.sty'.")
(defvar LaTeX-color-dvipsnames-colors
'("Apricot" "Aquamarine" "Bittersweet" "Black"
"Blue" "BlueGreen" "BlueViolet" "BrickRed"
"Brown" "BurntOrange" "CadetBlue" "CarnationPink"
"Cerulean" "CornflowerBlue" "Cyan" "Dandelion"
"DarkOrchid" "Emerald" "ForestGreen" "Fuchsia"
"Goldenrod" "Gray" "Green" "GreenYellow"
"JungleGreen" "Lavender" "LimeGreen" "Magenta"
"Mahogany" "Maroon" "Melon" "MidnightBlue"
"Mulberry" "NavyBlue" "OliveGreen" "Orange"
"OrangeRed" "Orchid" "Peach" "Periwinkle"
"PineGreen" "Plum" "ProcessBlue" "Purple"
"RawSienna" "Red" "RedOrange" "RedViolet"
"Rhodamine" "RoyalBlue" "RoyalPurple" "RubineRed"
"Salmon" "SeaGreen" "Sepia" "SkyBlue"
"SpringGreen" "Tan" "TealBlue" "Thistle"
"Turquoise" "Violet" "VioletRed" "White"
"WildStrawberry" "Yellow" "YellowGreen" "YellowOrange")
"List of colors defined by package option `dvipsnames' from `color.sty'.")
;; Needed for auto-parsing.
(require 'tex)
;; Plug color into the parser -- after that we have the following:
;; 1. LaTeX-auto-color-definecolor: Name of temporary variable used
;; when parsing.
;; 2. LaTeX-add-color-definecolors: Name of function to add
;; information to add to #3.
;; 3. LaTeX-color-definecolor-list: Name of variable holding buffer
;; local information.
;; 4. LaTeX-color-definecolors-changed: Name of variable indicating
;; that #3 has changed.
(TeX-auto-add-type "color-definecolor" "LaTeX")
(defvar LaTeX-color-definecolor-regexp
'("\\\\definecolor{\\([^}]+\\)}{\\([^}]+\\)}{\\([^}]+\\)}"
1 LaTeX-auto-color-definecolor)
"Matches the arguments of `\\definecolor' from `color'
package.")
(defun LaTeX-color-auto-prepare ()
"Clear `LaTeX-auto-color-definecolor' before parsing."
(setq LaTeX-auto-color-definecolor nil))
(defun LaTeX-color-auto-cleanup ()
"Move parsed colors from `LaTeX-auto-color-definecolor' to
`LaTeX-color-definecolor-list'."
;; \definecolor{<name>}{<model>}{<colour-spec>}
;; color=<name>, ignored=<model>, ignored=<colour-spec>
(dolist (color LaTeX-auto-color-definecolor)
(add-to-list 'LaTeX-color-definecolor-list (list color))))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-color-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-color-auto-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(defun TeX-arg-color-definecolor (optional &optional prompt)
"Insert arguments of `\\definecolor' from `color.sty'."
;; \definecolor{<name>}{<model>}{<color spec>}
;; Ask for <name>, add to our list and insert it
(let ((colorname (TeX-read-string "Color name: ")))
(LaTeX-add-color-definecolors colorname)
(TeX-argument-insert colorname optional))
;; Ask and insert <model>
(let ((model (completing-read
(TeX-argument-prompt optional prompt "Color model")
(if (not (or (LaTeX-provided-package-options-member "color" "dvips")
(LaTeX-provided-package-options-member "color" "dvipsnames")))
(remove "named" LaTeX-color-colour-models)
LaTeX-color-colour-models))))
(TeX-argument-insert model optional)
;; Depending on <model>, ask for <color spec> and insert it
(cond (;; <cmyk> model
(string-equal model "cmyk")
(let ((cyan (TeX-read-string "Value Cyan (between 0,1): "))
(magenta (TeX-read-string "Value Magenta (between 0,1): "))
(yellow (TeX-read-string "Value Yellow (between 0,1): "))
(black (TeX-read-string "Value Black (between 0,1): ")))
(TeX-argument-insert
(concat cyan "," magenta "," yellow "," black) optional)))
;; <rgb> model
((string-equal model "rgb")
(let ((red (TeX-read-string "Value Red (between 0,1): "))
(green (TeX-read-string "Value Green (between 0,1): "))
(blue (TeX-read-string "Value Blue (between 0,1): ")))
(TeX-argument-insert
(concat red "," green "," blue) optional)))
;; <gray> model
((string-equal model "gray")
(let ((grayness (TeX-read-string "Value Gray (between 0,1): ")))
(TeX-argument-insert grayness optional)))
;; <named> model takes the dvipsnames
((string-equal model "named")
(let ((color (completing-read "Named Color: "
LaTeX-color-dvipsnames-colors)))
(TeX-argument-insert color optional))))))
(defun TeX-arg-color (optional &optional prompt)
"Insert arguments of various color commands from `color.sty'."
;; \color{<name>} or \color[<model>]{<color spec>}
;; First, ask for <model>. `named' is removed here from completion
;; if package option is not given
(let ((model (completing-read
(TeX-argument-prompt t prompt "Color model")
(if (not (or (LaTeX-provided-package-options-member "color" "dvips")
(LaTeX-provided-package-options-member "color" "dvipsnames")))
(remove "named" LaTeX-color-colour-models)
LaTeX-color-colour-models))))
(if (string-equal model "")
;; if empty, ask for <name> with completion
(let ((color (completing-read
(TeX-argument-prompt optional prompt "Color name")
(LaTeX-color-definecolor-list))))
(TeX-argument-insert color optional))
;; if not empty, insert [<model>] and proceed
(insert (concat LaTeX-optop model LaTeX-optcl))
(cond (;; <cmyk> model
(string-equal model "cmyk")
(let ((cyan (TeX-read-string "Value Cyan (between 0,1): "))
(magenta (TeX-read-string "Value Magenta (between 0,1): "))
(yellow (TeX-read-string "Value Yellow (between 0,1): "))
(black (TeX-read-string "Value Black (between 0,1): ")))
(TeX-argument-insert
(concat cyan "," magenta "," yellow "," black) optional)))
;; <rgb> model
((string-equal model "rgb")
(let ((red (TeX-read-string "Value Red (between 0,1): "))
(green (TeX-read-string "Value Green (between 0,1): "))
(blue (TeX-read-string "Value Blue (between 0,1): ")))
(TeX-argument-insert
(concat red "," green "," blue) optional)))
;; <gray> model
((string-equal model "gray")
(let ((grayness (TeX-read-string "Value Gray (between 0,1): ")))
(TeX-argument-insert grayness optional)))
;; <named> model; allowed are dvipsnames.
((string-equal model "named")
(let ((color (completing-read "Named Color: "
LaTeX-color-dvipsnames-colors)))
(TeX-argument-insert color optional)))))))
(defun TeX-arg-color-fcolorbox (optional &optional prompt)
"Insert arguments of `\\fcolorbox' from `color.sty'. "
;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or
;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>}
;; First, ask for <model>; remove `named' again
(let ((model (completing-read
(TeX-argument-prompt t prompt "Color model")
(if (not (or (LaTeX-provided-package-options-member "color" "dvips")
(LaTeX-provided-package-options-member "color" "dvipsnames")))
(remove "named" LaTeX-color-colour-models)
LaTeX-color-colour-models))))
(if (string-equal model "")
;; if empty, ask for <frame color spce> with completion
(let ((frame-color (completing-read
(TeX-argument-prompt optional prompt "Frame color name")
(LaTeX-color-definecolor-list)))
(box-color (completing-read
(TeX-argument-prompt optional prompt "Box color name")
(LaTeX-color-definecolor-list))))
(TeX-argument-insert frame-color optional)
(TeX-argument-insert box-color optional))
;; if not empty, insert [<model>] and cater for 2 mandatory args.
(insert (concat LaTeX-optop model LaTeX-optcl))
(cond (;; <cmyk> model
(string-equal model "cmyk")
(let ((cyan (TeX-read-string "Frame value Cyan (between 0,1): "))
(magenta (TeX-read-string "Frame value Magenta (between 0,1): "))
(yellow (TeX-read-string "Frame value Yellow (between 0,1): "))
(black (TeX-read-string "Frame value Black (between 0,1): ")))
(TeX-argument-insert
(concat cyan "," magenta "," yellow "," black) optional))
(let ((cyan (TeX-read-string "Box value Cyan (between 0,1): "))
(magenta (TeX-read-string "Box value Magenta (between 0,1): "))
(yellow (TeX-read-string "Box value Yellow (between 0,1): "))
(black (TeX-read-string "Box value Black (between 0,1): ")))
(TeX-argument-insert
(concat cyan "," magenta "," yellow "," black) optional)))
;; <rgb> model
((string-equal model "rgb")
(let ((red (TeX-read-string "Frame value Red (between 0,1): "))
(green (TeX-read-string "Frame value Green (between 0,1): "))
(blue (TeX-read-string "Frame value Blue (between 0,1): ")))
(TeX-argument-insert
(concat red "," green "," blue) optional))
(let ((red (TeX-read-string "Box value Red (between 0,1): "))
(green (TeX-read-string "Box value Green (between 0,1): "))
(blue (TeX-read-string "box value Blue (between 0,1): ")))
(TeX-argument-insert
(concat red "," green "," blue) optional)))
;; <gray> model
((string-equal model "gray")
(let ((grayness (TeX-read-string "Frame value Gray (between 0,1): ")))
(TeX-argument-insert grayness optional))
(let ((grayness (TeX-read-string "Box value Gray (between 0,1): ")))
(TeX-argument-insert grayness optional)))
;; <named> model; allowed are dvipsnames.
((string-equal model "named")
(let ((color (completing-read "Frame named Color: "
LaTeX-color-dvipsnames-colors)))
(TeX-argument-insert color optional))
(let ((color (completing-read "Box named Color: "
LaTeX-color-dvipsnames-colors)))
(TeX-argument-insert color optional)))))))
(TeX-add-style-hook
"color"
(lambda ()
;; Add color to the parser.
(TeX-auto-add-regexp LaTeX-color-definecolor-regexp)
;; Add list of colors which are always available.
(LaTeX-add-color-definecolors
"black" "blue" "cyan" "green" "magenta" "red" "white" "yellow")
;; Add dvips colors in conjunction with `usenames'.
(when (and (LaTeX-provided-package-options-member "color" "usenames")
(or (LaTeX-provided-package-options-member "color" "dvips")
(LaTeX-provided-package-options-member "color" "dvipsnames")))
(apply #'LaTeX-add-color-definecolors LaTeX-color-dvipsnames-colors))
(TeX-add-symbols
;; \definecolor{<name>}{<model>}{<color spec>}
'("definecolor" TeX-arg-color-definecolor)
;; \color{<name>} or \color[<model>]{<color spec>}
'("color" TeX-arg-color)
;; \textcolor{<name>}{<text>} or
;; \textcolor[<model>]{<color spec>}{<text>}
'("textcolor" TeX-arg-color "Text")
;; \pagecolor{<name>} or
;; \pagecolor[<model>]{<color spec>}
'("pagecolor" TeX-arg-color)
;; \nopagecolor
'("nopagecolor" 0)
;; \colorbox{<name>}{<text>} or
;; \colorbox[<model>]{<color spec>}{<text>}
'("colorbox" TeX-arg-color "Text")
;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or
;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>}
'("fcolorbox" TeX-arg-color-fcolorbox "Text"))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("color" "[{")
("pagecolor" "[{"))
'type-declaration)
(font-latex-add-keywords '(("textcolor" "[{{")
("colorbox" "[{{" )
("fcolorbox" "[{{{"))
'type-command)
(font-latex-add-keywords '(("definecolor" "{{{"))
'function)))
LaTeX-dialect)
(defvar LaTeX-color-package-options
'("debugshow" "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsnames"
"dvipsone" "dviwin" "dviwindo" "emtex" "monochrome" "nodvipsnames"
"oztex" "pctex32" "pctexhp" "pctexps" "pctexwin" "pdftex" "tcidvi"
"textures" "truetex" "usenames" "vtex" "xdvi" "xetex")
"Package options for the color package.")
;;; color.el ends here

Binary file not shown.

View File

@@ -0,0 +1,74 @@
;;; colortbl.el --- AUCTeX style for `colortbl.sty' (v1.0a)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-03-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 `colortbl.sty' (v1.0a) from 2012/02/13.
;; `colortbl.sty' is part of TeXLive.
;;; Code:
(TeX-add-style-hook
"colortbl"
(lambda ()
(TeX-run-style-hooks "color" "array")
(TeX-add-symbols
;; `TeX-arg-color' is provided by `color.el'.
'("columncolor" TeX-arg-color
[ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
'("rowcolor" TeX-arg-color
[ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
'("cellcolor" TeX-arg-color
[ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] )
'("arrayrulecolor" TeX-arg-color)
'("doublerulesepcolor" TeX-arg-color))
(LaTeX-add-lengths "minrowclearance")
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("columncolor" "[{[[")
("rowcolor" "[{[[")
("cellcolor" "[{[[")
("arrayrulecolor" "[{")
("doublerulesepcolor" "[{"))
'function)))
LaTeX-dialect)
;; colortbl.sty has one option `debugshow'. I ignore that since it
;; would only take more time during insertation in a buffer and I
;; presume that not many users use it anyway.
(defvar LaTeX-colortbl-package-options nil
"Package option for the colortbl package.")
;;; colortbl.el ends here

Binary file not shown.

View File

@@ -0,0 +1,70 @@
;;; comment.el --- AUCTeX style for `comment.sty'
;; Copyright (C) 2007 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2007-03-18
;; 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., 59 Temple Place - Suite 330, Boston, MA
;; 02111-1307, USA.
;;; Commentary:
;; This file adds support for `comment.sty'.
;;; Code:
(TeX-add-style-hook
"comment"
(lambda ()
;; New symbols
(TeX-add-symbols
'("includecomment" "Name")
'("excludecomment" "Name")
'("specialcomment" "Name" "Before commands" "After commands")
'("processcomment" "Name" "Each-line commands"
"Before commands" "After commands"))
;; New environments
(mapc 'LaTeX-add-environments LaTeX-comment-env-list)
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
;; For syntactic fontification.
(add-to-list 'font-latex-syntactic-keywords-extra
;; \begin is supposed to start at the beginning of a line.
`(,(format "^\\\\begin *{\\(?:%s\\)}.*\\(\n\\)"
(regexp-opt LaTeX-comment-env-list))
(1 "<" t)))
(add-to-list 'font-latex-syntactic-keywords-extra
;; \end is supposed to start at the beginning of a line.
`(,(format "^\\(\\\\\\)end *{\\(?:%s\\)}"
(regexp-opt LaTeX-comment-env-list))
(1 ">" t)))
(font-latex-set-syntactic-keywords)
(font-latex-add-keywords '(("includecomment" "{")
("excludecomment" "{")
("specialcomment" "{{{")
("processcomment" "{{{{"))
'variable)
;; Tell font-lock about the update.
(setq font-lock-set-defaults nil)
(font-lock-set-defaults)))
LaTeX-dialect)
;;; comment.el ends here

Binary file not shown.

View File

@@ -0,0 +1,246 @@
;;; csquotes.el --- AUCTeX style for `csquotes.sty'
;; Copyright (C) 2004, 2005, 2006, 2014 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2004-11-29
;; Keywords: tex
;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; AUCTeX is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with AUCTeX; see the file COPYING. If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.
;;; Commentary:
;; This file adds support for `csquotes.sty', version 3.7.
;;; Code:
;; FIXME: It would be nice to be able to dump this function in favor
;; of a generalized handling of additional arguments for environments
;; specified via `LaTeX-add-environments'. `TeX-parse-arguments' and
;; friends would be the functions to be used for that, but those
;; functions currently insert text directly into the buffer. There
;; would either have to be a way of preventing this and letting them
;; return a string, or the insertion could happen in a temporary buffer
;; and the buffer content be returned.
(defun LaTeX-csquotes-insert-environment (env &rest args)
"Insert environment ENV considering optional arguments ARGS.
This is basically a variant of `LaTeX-environment-menu'
specialized for csquotes.el. ARGS can be made up of strings and
vectors containing single strings. Plain strings will be used as
prompts for mandatory arguments and strings in vectors as prompts
for optional arguments of the environment to be inserted.
That means, in contrast to `LaTeX-environment-menu' it supports
the insertion of optional arguments."
(let (env-extra prompt optional user-input)
(dolist (elt args)
(if (vectorp elt)
(setq prompt (aref elt 0)
optional t)
(setq prompt elt
optional nil))
(setq user-input (TeX-read-string (TeX-argument-prompt optional prompt nil)))
(unless (and optional (zerop (length user-input)))
(setq env-extra (concat env-extra
(if optional LaTeX-optop TeX-grop)
user-input
(if optional LaTeX-optcl TeX-grcl)))))
(LaTeX-insert-environment env env-extra)))
(TeX-add-style-hook
"csquotes"
(lambda ()
(let ((quote-style-variant-list '(("quotes") ("guillemets") ("american")
("british") ("oldstyle") ("imprimerie")
("swiss")))
(quote-style-name-list '(("danish") ("dutch") ("english") ("finnish")
("french") ("german") ("italian")
("norwegian") ("swedish"))))
;; New symbols
(TeX-add-symbols
'("enquote" 1)
'("enquote*" 1)
'("foreignquote" 2)
'("foreignquote*" 2)
'("hyphenquote" 2)
'("hyphenquote*" 2)
'("textquote" ["Citation"] ["Punctuation"] t)
'("textquote*" ["Citation"] ["Punctuation"] t)
'("foreigntextquote" "Language" ["Citation"] ["Punctuation"] t)
'("foreigntextquote*" "Language" ["Citation"] ["Punctuation"] t)
'("hyphentextquote" "Language" ["Citation"] ["Punctuation"] t)
'("hyphentextquote*" "Language" ["Citation"] ["Punctuation"] t)
'("blockquote" ["Citation"] ["Punctuation"] t)
'("foreignblockquote" "Language" ["Citation"] ["Punctuation"] t)
'("hyphenblockquote" "Language" ["Citation"] ["Punctuation"] t)
`("setquotestyle"
[ (TeX-arg-eval completing-read "Quote style variant: "
',quote-style-variant-list) ]
(TeX-arg-eval completing-read "Quote style name or alias: "
',quote-style-name-list))
"setquotestyle*"
'("MakeInnerQuote" "Character")
'("MakeOuterQuote" "Character")
'("MakeAutoQuote" "Opening quotation mark" "Closing quotation mark")
'("MakeAutoQuote*" "Opening quotation mark" "Closing quotation mark")
'("MakeForeignQuote" "Babel's language name"
"Opening quotation mark" "Closing quotation mark")
'("MakeForeignQuote*" "Babel's language name"
"Opening quotation mark" "Closing quotation mark")
'("MakeHyphenQuote" "Babel's language name"
"Opening quotation mark" "Closing quotation mark")
'("MakeHyphenQuote" "Babel's language name"
"Opening quotation mark" "Closing quotation mark")
'("MakeBlockQuote" "Opening quotation mark" "Delimiter for citation"
"Closing quotation mark")
'("MakeForeignBlockQuote" "Language" "Opening quotation mark"
"Delimiter for citation" "Closing quotation mark")
'("MakeHyphenBlockQuote" "Language" "Opening quotation mark"
"Delimiter for citation" "Closing quotation mark")
"EnableQuotes"
"DisableQuotes"
"VerbatimQuotes"
"DeleteQuotes"
'("textcquote" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
'("textcquote*" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
'("foreigntextcquote" "Language" ["Pre-note"] ["Post-note"] "Key"
["Punctuation"] t)
'("foreigntextcquote*" "Language" ["Pre-note"] ["Post-note"] "Key"
["Punctuation"] t)
'("hyphentextcquote" "Language" ["Pre-note"] ["Post-note"] "Key"
["Punctuation"] t)
'("hyphentextcquote*" "Language" ["Pre-note"] ["Post-note"] "Key"
["Punctuation"] t)
'("blockcquote" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t)
'("foreignblockcquote" "Language" ["Pre-note"] ["Post-note"] "Key"
["Punctuation"] t)
'("hyphenblockcquote" "Language" ["Pre-note"] ["Post-note"] "Key"
["Punctuation"] t)
`("DeclareQuoteStyle"
[ (TeX-arg-eval completing-read "Quote style variant: "
',quote-style-variant-list) ]
(TeX-arg-eval completing-read "Quote style name: "
',quote-style-name-list)
["Outer quote initialization"] ["Inner quote initialization"]
"Opening outer quotation mark" ["Middle outer quotation mark"]
"Closing outer quotation mark" ["Kerning between adjoining marks"]
"Opening inner quotation mark" ["Middle inner quotation mark"]
"Closing inner quotation mark")
`("DeclareQuoteAlias"
[ (TeX-arg-eval completing-read "Quote style variant: "
',quote-style-variant-list) ]
(TeX-arg-eval completing-read "Quote style name: "
',quote-style-name-list)
"Alias name")
'("DeclareQuoteOption" 1)
'("ExecuteQuoteOptions" 1)
'("DeclarePlainStyle" "Opening outer quotation mark"
"Closing outer quotation mark" "Opening inner quotation mark"
"Closing inner quotation mark")
'("SetBlockThreshold" "Number of lines")
'("SetBlockEnvironment" "Environment")
'("SetCiteCommand" "Command")
"mkcitation"
"mkccitation"
"mkpreblockpunct"
"mkmidblockpunct"
"mkfinblockpunct"
"mkpretextpunct"
"mkmidtextpunct"
"mkfintextpunct"
"mkpredisppunct"
"mkmiddisppunct"
"mkfindisppunct"
'("ifblockquote" 2)
'("ifquotepunct" 2)
'("ifquoteterm" 2)
'("ifquoteperiod" 2)
'("ifquotecomma" 2)
'("ifquotesemicolon" 2)
'("ifquotecolon" 2)
'("ifquoteexclam" 2)
'("ifquotequestion" 2)
'("ifstringblank" 2)
'("BlockquoteDisable" 1))
;; New environments
(LaTeX-add-environments
"quoteblock"
"quotetext"
'("displayquote" LaTeX-csquotes-insert-environment ["Citation"]
["Punctuation"])
'("foreigndisplayquote" LaTeX-csquotes-insert-environment "Language"
["Citation"] ["Punctuation"])
'("hyphendisplayquote" LaTeX-csquotes-insert-environment "Language"
["Citation"] ["Punctuation"])
'("displaycquote" LaTeX-csquotes-insert-environment
["Pre-note"] ["Post-note"] "Key" ["Punctuation"])
'("foreigndisplaycquote" LaTeX-csquotes-insert-environment
"Language" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"])
'("hyphendisplaycquote" LaTeX-csquotes-insert-environment
"Language" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"]))
;; Quotation marks
(when (and (> (length LaTeX-csquotes-open-quote) 0)
(> (length LaTeX-csquotes-close-quote) 0))
(setq TeX-quote-language
`(override ,LaTeX-csquotes-open-quote ,LaTeX-csquotes-close-quote
,LaTeX-csquotes-quote-after-quote)))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("DisableQuotes" "")
("RestoreQuotes" ""))
'function)
(font-latex-add-keywords '(("enquote" "*{")
("foreignquote" "*{{")
("hyphenquote" "*{{")
("textcquote" "*[[{[{")
("foreigntextcquote" "*{[[{[{")
("hyphentextcquote" "*{[[{[{")
("textquote" "*[[{")
("foreigntextquote" "*{[[{")
("hyphentextquote" "*{[[{")
("blockquote" "[[{")
("foreignblockquote" "{[[{")
("hyphenblockquote" "{[[{")
("blockcquote" "[[{[{")
("foreignblockcquote" "{[[{[{")
("hyphenblockcquote" "{[[{[{"))
'textual)
(font-latex-add-keywords '(("setquotestyle" "[{")
("MakeOuterQuote" "{")
("MakeInnerQuote" "{")
("MakeAutoQuote" "*{{")
("MakeForeignQuote" "*{{{")
("MakeHyphenQuote" "*{{{")
("MakeBlockQuote" "{{{")
("MakeForeignBlockQuote" "{{{{")
("MakeHyphenBlockQuote" "{{{{")
("DeclareQuoteStyle" "[{[[{[{[{[{")
("DeclareQuoteAlias" "[{{")
("DeclareQuoteOption" "{")
("DeclarePlainStyle" "{{{{")
("SetBlockThreshold" "{")
("SetBlockEnvironment" "{")
("SetCiteCommand" "{"))
'variable))))
LaTeX-dialect)
;;; csquotes.el ends here

Binary file not shown.

View File

@@ -0,0 +1,94 @@
;;; currvita.el --- AUCTeX style for `currvita.sty' (v0.9i)
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Arash Esbati <esbati'at'gmx.de>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2015-01-05
;; Keywords: tex
;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; AUCTeX is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with AUCTeX; see the file COPYING. If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.
;;; Commentary:
;; This file adds support for `currvita.sty' (v0.9i) from 1999/09/13.
;; `currvita.sty' is part of TeXLive.
;;; Code:
;; This is a modified version of `LaTeX-env-item'.
(defun LaTeX-currvita-env-with-label (env)
"Insert ENV, a mandatory label and the first item."
(LaTeX-insert-environment
env
(let ((heading (TeX-read-string "Heading of list: ")))
(format "{%s}" heading)))
(if (TeX-active-mark)
(progn
(LaTeX-find-matching-begin)
(end-of-line 1))
(end-of-line 0))
(delete-char 1)
(when (looking-at (concat "^[ \t]+$\\|"
"^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
(delete-region (point) (line-end-position)))
(delete-horizontal-space)
;; Deactivate the mark here in order to prevent `TeX-parse-macro'
;; from swapping point and mark and the \item ending up right after
;; \begin{...}.
(TeX-deactivate-mark)
(LaTeX-insert-item)
;; The inserted \item may have outdented the first line to the
;; right. Fill it, if appropriate.
(when (and (not (looking-at "$"))
(not (assoc environment LaTeX-indent-environment-list))
(> (- (line-end-position) (line-beginning-position))
(current-fill-column)))
(LaTeX-fill-paragraph nil)))
(TeX-add-style-hook
"currvita"
(lambda ()
;; env's defined by currvita.sty
(LaTeX-add-environments
'("cv" "Heading of CV")
'("cvlist" LaTeX-currvita-env-with-label))
;; Add "cvlist" to the list of environments which have an optional
;; argument for each item
(add-to-list 'LaTeX-item-list '("cvlist" . LaTeX-item-argument))
;; General commands: "\date" is already provided by AUCTeX
(TeX-add-symbols
'("cvplace" t)
'("cvheadingfont" 0)
'("cvlistheadingfont" 0)
'("cvlabelfont" 0)
'("cvbibname" 0))
;; Add new lengths defined by currvita.sty
(LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep"))
LaTeX-dialect)
(defvar LaTeX-currvita-package-options
'("LabelsAligned" "TextAligned" "openbib" "ManyBibs" "NoDate")
"Package options for the currvita package.")
;;; currvita.el ends here

Binary file not shown.

View File

@@ -0,0 +1,9 @@
;;; czech.el --- Setup AUCTeX for editing Czech text.
(TeX-add-style-hook
"czech"
(lambda ()
(unless (eq (car TeX-quote-language) 'override)
(setq TeX-quote-language `("czech" "\\uv{" "}" ,TeX-quote-after-quote)))
(run-hooks 'TeX-language-cz-hook))
LaTeX-dialect)

Binary file not shown.

View File

@@ -0,0 +1,18 @@
;;; danish.el --- Setup AUCTeX for editing Danish text.
;;; Code:
(TeX-add-style-hook
"danish"
(lambda ()
(unless (eq (car TeX-quote-language) 'override)
(setq TeX-quote-language `("danish" "\"`" "\"'" ,TeX-quote-after-quote)))
(setq LaTeX-babel-hyphen-language "danish")
;; Fontification of quotation marks.
(when (fboundp 'font-latex-add-quotes)
(font-latex-add-quotes '("\"`" "\"'"))
(font-latex-add-quotes '("\">" "\"<" german)))
(run-hooks 'TeX-language-dk-hook))
LaTeX-dialect)
;;; danish.el ends here

Binary file not shown.

View File

@@ -0,0 +1,277 @@
;;; dinbrief.el --- Special code for LaTeX-Style dinbrief.
;; Copyright (C) 1994, 2013, 2014 Free Software Foundation, Inc.
;; Author: Werner Fink <werner@suse.de>
;; Maintainer: auctex-devel@gnu.org
;; 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.
;;; dinbrief.el - Special code for LaTeX class dinbrief.
;;; Commentary:
;; LaTeX Class: dinbrief.cls
;;; Code:
(require 'tex)
(TeX-add-style-hook "dinbrief"
(function
(lambda ()
(add-hook 'LaTeX-document-style-hook
'LaTeX-dinbrief-style)
(LaTeX-add-environments
'("letter" LaTeX-dinbrief-env-recipient)
"dinquote")
(TeX-add-symbols
'("address" "Absender: ")
'("postremark" "Postvermerk: ")
'("date" "Datum: ")
'("subject" "Betreff: ")
'("handling" "Behandlungsvermerk: ")
'("cc" "Verteiler: ")
'("place" "Heutiger Ort: ")
"makelabels"
"nowindowrules"
"windowrules"
"nowindowtics"
"windowtics"
"disabledraftstandard"
"enabledraftstandard"
"centeraddress"
"normaladdress"
'("encl" "Anlagen: ")
'("backaddress" "Retouradresse: ")
'("signature" "Unterschrift: ")
'("opening" "Anrede: ")
'("closing" "Schluss: "))))
LaTeX-dialect)
(defmacro LaTeX-dinbrief-insert (&rest args)
"Insert text ignoring active markers."
`(progn (if (TeX-mark-active) (TeX-deactivate-mark))
(insert ,@args)))
(defun LaTeX-dinbrief-style ()
"Insert some useful packages for writing german letters."
(save-excursion
(goto-char (point-min)) ; insert before \begin{document}
(if (re-search-forward ".begin.document." (point-max) t)
(beginning-of-line 1))
(open-line 2)
(indent-relative-maybe)
(LaTeX-dinbrief-insert TeX-esc "usepackage"
LaTeX-optop "latin1,utf8" LaTeX-optcl
TeX-grop "inputenc" TeX-grcl)
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "usepackage"
LaTeX-optop "T1" LaTeX-optcl
TeX-grop "fontenc" TeX-grcl)
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "usepackage"
TeX-grop "ngerman" TeX-grcl)
(TeX-run-style-hooks "inputenc")
(TeX-run-style-hooks "fontenc")
(TeX-run-style-hooks "ngerman")))
(defun LaTeX-dinbrief-env-recipient (environment)
"Insert ENVIRONMENT and prompt for recipient and address."
(let (
(sender (LaTeX-dinbrief-sender))
(recipient (TeX-read-string "Empfänger: "))
(address (LaTeX-dinbrief-recipient))
(date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
(postremark (TeX-read-string "Postvermerk: "))
(fenster (TeX-read-string "Fenster \(ja/nein\): "))
(vermerk (TeX-read-string "Behandlungsvermerk: "))
(verteil (TeX-read-string "Verteiler: "))
(betreff (TeX-read-string "Betreff: "))
(opening (TeX-read-string "Anrede: "))
(closing (TeX-read-string "Schluss: "))
(signature (TeX-read-string "Unterschrift: "))
(anlage (TeX-read-string "Anlagen: ")))
(if (string= fenster "ja")
(progn
(LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "centeraddress")
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "nowindowrules")
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "windowtics")
(newline-and-indent)
(let ((retouradr (TeX-read-string "Retouradresse: " sender)))
(newline-and-indent)
(if (not (zerop (length retouradr)))
(progn
(if (TeX-mark-active) (TeX-deactivate-mark))
(LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop retouradr TeX-grcl)
(newline-and-indent)))))
(LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "centeraddress")
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "nowindowrules")
(newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "windowtics"))
(newline-and-indent)
(if (not (zerop (length signature)))
(progn
(LaTeX-dinbrief-insert TeX-esc "signature" TeX-grop signature TeX-grcl)
(newline-and-indent)))
(if (not (zerop (length date)))
(progn
(LaTeX-dinbrief-insert TeX-esc "date" TeX-grop date TeX-grcl)
(newline-and-indent)))
(newline-and-indent)
(let ((indentation (current-column)))
(LaTeX-insert-environment
environment
(concat TeX-grop recipient
(if (not (zerop (length address)))
(concat
(if (not (zerop (length recipient)))
(concat " " TeX-esc TeX-esc " "))
address))
TeX-grcl))
(save-excursion ; Fix indentation of address
(if (search-backward TeX-grcl nil 'move)
(let ((addr-end (point-marker)))
(if (search-backward TeX-grop nil 'move)
(let ((addr-column (current-column)))
(while (search-forward
(concat TeX-esc TeX-esc)
(marker-position addr-end) 'move)
(progn
(newline)
(indent-to addr-column))))))))
(LaTeX-dinbrief-insert "\n")
(indent-to indentation))
(if (not (zerop (length postremark)))
(progn
(LaTeX-dinbrief-insert TeX-esc "postremark" TeX-grop postremark TeX-grcl)
(newline-and-indent)))
(if (not (zerop (length betreff)))
(progn
(LaTeX-dinbrief-insert TeX-esc "subject" TeX-grop)
(LaTeX-dinbrief-insert betreff TeX-grcl)
(newline-and-indent)))
(if (not (zerop (length vermerk)))
(progn
(LaTeX-dinbrief-insert TeX-esc "handling" TeX-grop vermerk TeX-grcl)
(newline-and-indent)))
(if (not (zerop (length verteil)))
(progn
(LaTeX-dinbrief-insert TeX-esc "cc" TeX-grop verteil TeX-grcl)
(newline-and-indent)))
(if (not (zerop (length anlage)))
(progn
(LaTeX-dinbrief-insert TeX-esc "encl" TeX-grop anlage TeX-grcl)
(newline-and-indent)))
(LaTeX-dinbrief-insert TeX-esc "opening"
TeX-grop
(if (zerop (length opening))
(concat TeX-esc " ")
opening)
TeX-grcl "\n")
(indent-relative-maybe)
(save-excursion
(LaTeX-dinbrief-insert "\n" TeX-esc "closing"
TeX-grop
(if (zerop (length closing))
(concat TeX-esc " ")
closing)
TeX-grcl "\n")
(indent-relative-maybe))))
(defun LaTeX-dinbrief-sender ()
"Read and write the senders address."
(interactive)
(let ((name (TeX-read-string "Absender: " (user-full-name)))
(str (TeX-read-string "Meine Strasse: "))
(ort (TeX-read-string "Mein Wohnort: ")))
(if (not (zerop (length name)))
(progn
(goto-char (point-min)) ; insert before \end{document}
(if (re-search-forward ".end.document." (point-max) t)
(beginning-of-line 1))
(previous-line 1) ;FIXME: Use forward-line!
(LaTeX-dinbrief-insert TeX-esc "address" TeX-grop name)
(if (not (zerop (length str)))
(progn
(LaTeX-dinbrief-insert " " TeX-esc TeX-esc)
(newline-and-indent)
(LaTeX-dinbrief-insert str)))
(if (not (zerop (length ort)))
(progn
(LaTeX-dinbrief-insert " " TeX-esc "par")
(newline-and-indent)
(LaTeX-dinbrief-insert ort)))
(LaTeX-dinbrief-insert TeX-grcl)
(newline-and-indent)
(concat name ", " str ", " ort)))))
(defun LaTeX-dinbrief-recipient ()
"Read and return the recipient address."
(interactive)
(let ((str (TeX-read-string "Wohnhaft in Strasse: "))
(ort (TeX-read-string "Aus der Ortschaft: ")))
(if (not (zerop (length str)))
(if (not (zerop (length ort)))
(concat str " " TeX-esc TeX-esc " " ort)
str)
(if (not (zerop (length ort)))
ort))))
(defun LaTeX-dinbrief-today ()
"Return a string representing todays date according to flavor."
(interactive)
(let ((ctime-string (current-time-string))
(month-alist '(("Jan" . "Januar")
("Feb" . "Februar")
("Mar" . "M\\\"arz")
("Apr" . "April")
("May" . "Mai")
("Jun" . "Juni")
("Jul" . "Juli")
("Aug" . "August")
("Sep" . "September")
("Oct" . "Oktober")
("Nov" . "November")
("Dec" . "Dezember"))))
(string-match
"^\\S-+\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-+\\S-+\\s-+\\(\\S-+\\)"
ctime-string)
(let ((year (substring ctime-string (match-beginning 3) (match-end 3)))
(month (substring ctime-string (match-beginning 1) (match-end 1)))
(day (substring ctime-string (match-beginning 2) (match-end 2)))
(place (TeX-read-string "Heutiger Ort: ")))
(if (assoc month month-alist)
(progn
(setq month (cdr (assoc month month-alist)))
(if (> 2 (length day))
(setq day (concat "0" day)))))
(format "%s, den %s. %s %s" place day month year))))
;;; dinbrief.el ends here

Binary file not shown.

View File

@@ -0,0 +1,62 @@
;;; dk-bib.el --- AUCTeX style for `dk-bib.sty'
;; Copyright (C) 2005, 2014 Free Software Foundation, Inc.
;; Author: Arne J<>rgensen <arne@arnested.dk>
;; 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 Street, Fifth Floor, Boston,
;; MA 02110-1301, USA.
;;; Commentary:
;; Prompt for package option for dk-bib.sty.
;;; Code:
(defun LaTeX-dk-bib-package-options nil
"Prompt for package options for the dk-bib package."
(let ((options
(mapconcat 'identity
(TeX-completing-read-multiple
"Options: "
'(("isbn") ("issn") ("url") ("annote")
("printing") ("apalike") ("fixcitedash=false")
("ordinals2word") ("ordinaldepth=")))
","))
(depth -1))
(when (string-match "\\(ordinaldepth=\\)\\([^0-9]\\|$\\)" options)
(while (or (< depth 0)
(> depth 20))
(setq depth (if (fboundp 'read-number)
(read-number "Ordinal depth: ")
(string-to-number (TeX-read-string "Ordinal depth: "))))
(when (or (< depth 0)
(> depth 20))
(message "Ordinal depth must be between 0 and 20")
(sit-for 1)))
(setq options (concat
(substring options 0 (match-end 1))
(number-to-string depth)
(substring options (match-end 1)))))
options))
;; Local Variables:
;; coding: iso-8859-1
;; End:
;;; dk-bib.el ends here

Binary file not shown.

View File

@@ -0,0 +1,10 @@
;;; dk.el - Setup AUCTeX for editing Danish text.
;;; Code:
(TeX-add-style-hook "dk"
(function (lambda ()
(run-hooks 'TeX-language-dk-hook)))
LaTeX-dialect)
;;; dk.el ends here

Some files were not shown because too many files have changed in this diff Show More