;;; init-latex.el --- -*- lexical-binding: t -*- ;; ;; Filename: init-latex.el ;; Description: Initialize AUCTex ;; Author: Mingde (Matthew) Zeng ;; Copyright (C) 2019 Mingde (Matthew) Zeng ;; Created: Wed Sep 4 16:35:00 2019 (-0400) ;; Version: 2.0.0 ;; Last-Updated: Tue Dec 24 12:00:08 2019 (-0500) ;; By: Mingde (Matthew) Zeng ;; URL: https://github.com/MatthewZMD/.emacs.d ;; Keywords: M-EMACS .emacs.d auctex ;; Compatibility: emacs-version >= 26.1 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; This initializes AUCTex ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; 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 GNU Emacs. If not, see . ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: (eval-when-compile (require 'init-const) (require 'init-global-config) (require 'init-func)) ;; AUCTeXPac (use-package tex :ensure auctex :defer t :custom (TeX-auto-save t) (TeX-parse-self t) (TeX-master nil) ;; to use pdfview with auctex (TeX-view-program-selection '((output-pdf "pdf-tools")) TeX-source-correlate-start-server t) (TeX-view-program-list '(("pdf-tools" "TeX-pdf-tools-sync-view"))) (TeX-after-compilation-finished-functions #'TeX-revert-document-buffer) :hook (LaTeX-mode . (lambda () (turn-on-reftex) (setq reftex-plug-into-AUCTeX t) (reftex-isearch-minor-mode) (setq TeX-PDF-mode t) (setq TeX-source-correlate-method 'synctex) (setq TeX-source-correlate-start-server t))) :config (when (version< emacs-version "26") (add-hook LaTeX-mode-hook #'display-line-numbers-mode))) ;; -AUCTeXPac ;; OrgLatexPac (use-package org-edit-latex :defer t :after org) ;; -OrgLatexPac (provide 'init-latex) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; init-latex.el ends here