无法在 Emacs 上使用 AUCTeX 编译 Latex 文件

无法在 Emacs 上使用 AUCTeX 编译 Latex 文件

我正在使用 Emacs 和 AUCTex。Emacs 配置,基于 运行正常,但现在它开始抱怨。

我正在尝试编译包含以下内容的测试文件“test.tex”。如有任何建议,我将不胜感激。

 \documentclass[12pt]{article}
  \begin{document}
     Hellow World!
  \end{document}

我收到以下错误

Running `LaTeX' on `../../../' with ``pdflatex  -file-line-error      -interaction=nonstopmode .tex''
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/Arch  Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
/usr/share/texmf-dist/tex/latex/tools/.tex:0: I can't write on file `.log'.
(Press Enter to retry, or Control-D to exit; default file extension is `.log')

请输入另一个成绩单文件名 /usr/share/texmf-dist/tex/latex/tools/.tex:0: 紧急停止 /usr/share/texmf-dist/tex/latex/tools/.tex:0: ==> 发生致命错误,未生成输出 PDF 文件!

   TeX Output exited abnormally with code 1 at Fri Apr 29 19:25:46}

我的 .emacs 文件包含以下内容

(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(when (file-exists-p custom-file)
(load custom-file))
;;===================== require-package ================================
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")t)
(package-initialize)

;; use-package to simplify the config file
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(require 'use-package)
(require 'package)
;;======================================================================
;; Theme
(use-package gruvbox-theme
  :config (load-theme 'gruvbox t))


(setq use-package-always-ensure 't
      inhibit-startup-message t)

(setq-default fill-column 80)
(setq-default line-spacing 3)

(line-number-mode 1)
(column-number-mode 1)
(global-display-line-numbers-mode t)

(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(blink-cursor-mode -1)


(set-face-attribute 'default nil :height 180)

;;====================== eveil mode vim key bindings ==============
(use-package evil
  :ensure t
  :config
  (evil-set-undo-system 'undo-tree)
  (setq evil-search-module 'evil-search)
  (evil-mode))
;;====================== undo-tress================================
(use-package undo-tree
  :ensure t
  :config
  (global-undo-tree-mode 1))
;;====================== eveil-nerd-commenter =====================
;; the following function has some errors 
(use-package evil-nerd-commenter
  :bind ("M-/" . evilnc-comment-or-uncomment-lines))
;;====================== ivy ======================================
(use-package ivy
  :ensure t
  :config
  (ivy-mode 1))
;;====================== autex ====================================
(use-package auctex
  :ensure t
  :defer t
  :hook (LaTeX-mode . (lambda ()
            (push (list 'output-pdf "Zathura")
                  TeX-view-program-selection))))
;;====================== yas-snippet ==============================
(use-package yasnippet
  :ensure t
  :config
  (yas-global-mode 1))

相关内容