2020-02-19 23:07:30 +00:00
|
|
|
;;; config.el --- Latex Layer Configuration File for Spacemacs
|
2015-04-09 04:13:15 +00:00
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2015-04-09 04:13:15 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program 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 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2015-04-09 04:13:15 +00:00
|
|
|
|
|
|
|
;; variables
|
|
|
|
|
2020-05-21 23:41:54 +00:00
|
|
|
;; Even though AUCTeX uses TeX-latex-mode rather than latex-mode, major-mode
|
|
|
|
;; will still be bound to 'latex-mode (since AUCTeX uses an advice to override
|
|
|
|
;; latex-mode with TeX-latex-mode), so the keymap's name should use the
|
|
|
|
;; lowercase form, since bind-map uses the value of major-mode...
|
|
|
|
(spacemacs|define-jump-handlers latex-mode dumb-jump-go)
|
|
|
|
;; ...but AUCTeX runs LaTeX-mode-hook rather than latex-mode-hook, so:
|
|
|
|
(add-hook 'LaTeX-mode-hook #'spacemacs//init-jump-handlers-latex-mode)
|
2016-09-05 06:38:13 +00:00
|
|
|
|
2020-12-13 09:33:04 +00:00
|
|
|
(defvar latex-backend nil
|
|
|
|
"The backend to use for IDE features.
|
|
|
|
Possible values are `lsp' and `company-auctex'.
|
|
|
|
If `nil' then 'company-auctex` is the default backend unless `lsp' layer is used")
|
|
|
|
|
2015-08-11 11:46:59 +00:00
|
|
|
(defvar latex-build-command (if (executable-find "latexmk") "LatexMk" "LaTeX")
|
2015-06-06 04:31:07 +00:00
|
|
|
"The default command to use with `SPC m b'")
|
2015-05-04 06:29:34 +00:00
|
|
|
|
2020-12-13 09:33:04 +00:00
|
|
|
(defvar latex-build-engine (if (and (executable-find "xetex")
|
|
|
|
(or (configuration-layer/layer-used-p 'chinese)
|
|
|
|
(configuration-layer/layer-used-p 'japanese)))
|
|
|
|
'xetex
|
|
|
|
'default)
|
|
|
|
"The default TeX engine to use with `SPC m b'. It's set to `xetex' when `xetex' is found on PATH
|
|
|
|
and either `chinese' layer or `japanese' layer is in use.
|
|
|
|
|
|
|
|
Allowed values are defined in `TeX-engine-alist'. The default allowed values are:
|
|
|
|
* `default'
|
|
|
|
* `luatex'
|
|
|
|
* `omega'
|
|
|
|
* `xetex'")
|
|
|
|
|
2015-06-06 04:46:47 +00:00
|
|
|
(defvar latex-enable-auto-fill t
|
2015-05-04 06:29:34 +00:00
|
|
|
"Whether to use auto-fill-mode or not in tex files.")
|
|
|
|
|
2015-12-23 13:46:36 +00:00
|
|
|
(defvar latex-enable-folding nil
|
|
|
|
"Whether to use `TeX-fold-mode' or not in tex/latex buffers.")
|
|
|
|
|
2015-12-11 22:14:56 +00:00
|
|
|
(defvar latex-enable-magic nil
|
|
|
|
"Whether to enable \"magic\" symbols in the buffer.")
|
|
|
|
|
2015-06-06 04:46:47 +00:00
|
|
|
(defvar latex-nofill-env '("equation"
|
|
|
|
"equation*"
|
|
|
|
"align"
|
|
|
|
"align*"
|
|
|
|
"tabular"
|
2020-06-03 15:46:22 +00:00
|
|
|
"tabular*"
|
|
|
|
"tabu"
|
|
|
|
"tabu*"
|
2015-06-06 04:46:47 +00:00
|
|
|
"tikzpicture")
|
2015-06-06 04:31:07 +00:00
|
|
|
"List of environment names in which `auto-fill-mode' will be inhibited.")
|
2020-10-27 21:48:22 +00:00
|
|
|
|
2020-12-13 09:33:04 +00:00
|
|
|
(defvar latex-refresh-preview nil
|
|
|
|
"Whether non-nil, refresh the preview buffer when file changes.")
|