.emacs.d/elisp/init-pdf.el

61 lines
1.9 KiB
EmacsLisp

;;; init-pdf.el --- -*- lexical-binding: t -*-
;;
;; Filename: init-pdf.el
;; Description: Initialize pdf-tools
;; Author: Mingde (Matthew) Zeng
;; Copyright (C) 2019 Mingde (Matthew) Zeng
;; Created: Tue Jun 4 00:26:09 2019 (-0400)
;; Version: 1.0.0
;; Last-Updated: Tue Dec 24 12:11:20 2019 (-0500)
;; By: Mingde (Matthew) Zeng
;; URL: https://github.com/MatthewZMD/.emacs.d
;; Keywords: M-EMACS .emacs.d pdf-tools
;; Compatibility: emacs-version >= 26.1
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; This initializes pdf-tools
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; 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 <https://www.gnu.org/licenses/>.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
(eval-when-compile
(require 'init-const))
;; PDFToolsPac
(use-package pdf-tools-install
:ensure pdf-tools
:if (and *sys/gui* (not *sys/win32*))
:mode "\\.pdf\\'"
:commands (pdf-loader-install)
:custom
(TeX-view-program-selection '((output-pdf "pdf-tools")))
(TeX-view-program-list '(("pdf-tools" "TeX-pdf-tools-sync-view")))
:hook
(pdf-view-mode . (lambda () (display-line-numbers-mode -1)))
:config
(pdf-loader-install))
;; -PDFToolsPac
(provide 'init-pdf)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-pdf.el ends here