Fix tex configurations on Linux platform
This commit is contained in:
parent
4478508e94
commit
9bad010a28
@ -3,38 +3,26 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; cdlatex
|
;; Ensure auctex is installed
|
||||||
(use-package cdlatex
|
(require 'tex)
|
||||||
:after tex)
|
(require 'auctex)
|
||||||
|
|
||||||
;; TeX Core
|
(use-package cdlatex
|
||||||
(use-package tex
|
:ensure t
|
||||||
:ensure auctex
|
|
||||||
:demand t
|
|
||||||
:custom
|
|
||||||
; 自动解析新文件 (usepackage, bibliograph, newtheorem) 等信息
|
|
||||||
(TeX-parse-selt t)
|
|
||||||
(TeX-PDF-mode t)
|
|
||||||
; 正反向搜索
|
|
||||||
(TeX-source-correlate-mode t)
|
|
||||||
(TeX-source-correlate-method 'synctex)
|
|
||||||
; 使用 pdf-tools 预览
|
|
||||||
(TeX-view-program-selection '((output-pdf "PDF Tools")))
|
|
||||||
:config
|
:config
|
||||||
(add-to-list 'auto-mode-alist '("\\.tex$" . LaTeX-mode))
|
(add-hook 'LaTeX-mode-hook 'turn-on-cdlatex))
|
||||||
(setq TeX-auto-save t)
|
|
||||||
(setq TeX-save-query nil)
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||||
(setq TeX-show-compilation t)
|
|
||||||
; 编译时问询主文件名称
|
|
||||||
(setq-default TeX-master nil)
|
(setq-default TeX-master nil)
|
||||||
(add-hook 'LaTeX-mode-hook (lambda ()
|
(setq TeX-global-PDF-mode t TeX-engine 'xetex)
|
||||||
(cdlatex-mode)
|
|
||||||
(reftex-mode)
|
|
||||||
(prettify-symbols-mode t)
|
|
||||||
;; (outline-minor-mode)
|
|
||||||
;; (outline-hide-body)
|
|
||||||
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex --synctex=1%(mode)%' %t" TeX-run-TeX nil t))
|
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex --synctex=1%(mode)%' %t" TeX-run-TeX nil t))
|
||||||
)))
|
(setq TeX-command-default "XeLaTeX")
|
||||||
|
(setq TeX-parse-self t)
|
||||||
|
(setq TeX-PDF-mode t)
|
||||||
|
(setq TeX-source-correlate-mode t)
|
||||||
|
(setq TeX-source-correlate-method 'synctex)
|
||||||
|
(setq TeX-view-program-selection '((output-pdf "PDF Tools")))
|
||||||
|
|
||||||
(provide 'init-tex)
|
(provide 'init-tex)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
Loading…
Reference in New Issue
Block a user