使用 \include 从 Emacs (AUCTeX) 到 Okular 的正向搜索不起作用

使用 \include 从 Emacs (AUCTeX) 到 Okular 的正向搜索不起作用

从 Emacs (AUCTeX) 到 Okular 的正向搜索\include不起作用。我的操作系统:

OS: Debian bullseye (testing)  
Emacs: 26.3
Okular: 1.11.1
AUCTeX: 12.2.4

.emacs(Emacs 设置):

(custom-set-variables                                                                                                                                   
 '(package-selected-packages (quote (auctex)))                                                                                                                                           
                                                                                                                                                                                         
 '(TeX-source-correlate-method (quote synctex))                                                                                                                                          
 '(TeX-source-correlate-mode t)                                                                                                                                                          
 '(TeX-source-correlate-start-server t)                                                                                                                                                  
 '(TeX-view-program-list (quote (("Okular" "okular --unique %o#src:%n%b"))))                                                                                                             
 '(TeX-view-program-selection (quote ((engine-omega "dvips and gv") (output-dvi "xdvi") (output-pdf "Okular") (output-html "xdg-open"))))                                                
)

./main.tex:

\documentclass{}
\begin{document}
\include{chapters/chap1}
\end{document}

./chapters/chap1.tex:

\chapter{Chapter 1}
\section{Blub 1.1}
\subsection{Blub 1.1.1}

C-c C-v(= 从 Emacs 到 Okular 的正向搜索的快捷方式) 在线\section{Blub 1.1}给了我 (emacs) 错误:

Output file "chap1.pdf" does not exist.

答案1

将以下文本(尤其是%%% TeX-master: "../master.tex")放在章节文件(例如 chap1.tex)末尾解决了我的问题:

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../master.tex"
%%% End:

相关内容