我一直在断断续续地寻找这个问题的解决方案或提示。这是让我有点恼火的事情之一,但话说回来,我正在努力拖延写论文,所以我一直拖延着寻找解决 synctex 问题的方法,以及它从 pdf 反向搜索源位置的能力。
我无法使用 MWE 重现该问题。我提供了一个 MWE 来描述 synctex 在什么条件下会失败以及源代码树(见下文)。
我的树结构如下所示:
phd_thesis
|-- abstract.tex
|-- thesis.tex % The main file
|-- Appendix
| |-- appendix1.tex
| |__ ...
|-- Chapter1
| |-- chapter1_main.tex
| |-- chapter1_sec1.tex
| |-- chapter1_sec1_table1.tex
| |-- chapter1_sec2.tex
| |-- chapter1_subsec12.tex
| |__ ...
|...
|__ ChapterN
| |__ ...
这并不太复杂。特定章节的所有源文件都包含在相应的目录中,并且不会比这更深入。
我正在使用 LaTeXTools 和 Sublime Text 3,并在 Okular 中可视化 pdf 文档。Synctex 正向和反向搜索适用于所有其他 LaTeX 文档,尤其是单个 .tex 文件。仅适用于某些 .tex 文件。
在第 5 章,一切都崩溃了。使用的 latexmk 命令没有产生(相关)警告,至少 Sublime 控制台在警告后显示一个空列表。所有寻求的解决方案都是为了让 synctex 也能工作,而我的解决方案是在文档中的某个点之后停止工作。
在 synctex 工作和停止工作之间的过渡中,这只是一个常规的部分过渡。这可能是什么?Synctex 溢出?MWE 显示我正在加载的包,但它没有显示我所描述的任何痕迹。我应该在哪里寻找问题的答案?所有花哨的配置都发生在序言中,一些在文档之外,其他的,重新定义等,发生在文档的序言中。然后,我使用图形、表格、列表和算法类型的浮点数。有人遇到过类似的问题吗?
\documentclass{report}
\usepackage[retainorgcmds]{IEEEtrantools}
\def\@IEEEcompsocdiamondline{\vrule depth 0pt height 0.5pt width 4cm\hspace{7.5pt}%
\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}%
\hspace{7.5pt}\vrule depth 0pt height 0.5pt width 4cm\relax}
\usepackage[english]{babel}
\usepackage[noprefix]{nomencl}
\usepackage{filecontents,setspace,latexsym,multirow,colortbl,graphics,graphicx,epsfig,epstopdf,lipsum,mfirstuc,breakcites,pdflscape,amsmath,amssymb,amsfonts,multicol,threeparttable,etoolbox,mathpazo,mathrsfs,psfrag,xargs,textcomp,appendix,url,pdftexcmds,minted,bibentry,mathtools,pdfpages,rotating,longtable,wrapfig,booktabs,algorithmic,algorithm}
\renewcommand{\thealgorithm}{\arabic{chapter}.\arabic{algorithm}}
\usemintedstyle{borland}
\usepackage[all]{nowidow}
\usepackage[T1]{fontenc}
\usepackage[super]{nth}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames,table]{xcolor}
\usepackage[footnotesize,bf]{caption}
\usepackage[super,square,numbers,sort&compress]{natbib}
\usepackage[hang,small,bf]{subfigure}
\usepackage[shortcuts]{extdash}
\RequirePackage{ifthen}
\newtheorem{prop}{Proposition}
\usepackage[shortlabels]{enumitem}
\usepackage{acro}
%%%% This is not for the MWE to work, only for reference of the packages I'm using
% Please create a directory tree where required
% <this_mwe_root_folder>
% |-- mwe_source.tex (this file from TeX stackexchange)
% |-- mwe_chapter1 (mkdir mwe_chapter1)
% | |-- chapter1.tex (mwe writes it)
% | |-- chapter1_sec1.tex (mwe writes it)
% | |-- chapter1_sec1_table.tex (mwe writes it)
% | |-- chapter1_sec2.tex (mwe writes it)
% | |-- chapter1_sec2_table.tex (mwe writes it)
% | |__ ...
% |-- mwe_chapter5 (mkdir mwe_chapter5)
% | |-- chapter5.tex (mwe writes it)
% |__ ...
\begin{filecontents}{mwe_chapter1/chapter1}
%!TEX root = ../mwe_source.tex
\chapter{Introduction}
The Chapter prologue. This is backward search-able. Herein, we input the Sections.
\input{mwe_chapter1/chapter1_sec1}
\input{mwe_chapter1/chapter1_sec2}
\end{filecontents}
\begin{filecontents}{mwe_chapter1/chapter1_sec1}
%!TEX root = ../mwe_source.tex
\section{Section 1: Does backward search work?}
This is Section 1 prologue. This is backward search-able. Herein, we would input the Subsections.
At a certain stage, a complex Table is included from its own source, too reduce unintended verbosity.
\input{mwe_chapter1/chapter1_sec1_table}
\end{filecontents}
\begin{filecontents}{mwe_chapter1/chapter1_sec2}
%!TEX root = ../mwe_source.tex
\section{Section 2: Does backward still search work?}
This is Section 2 prologue. This is backward search-able. Herein, we would input the Subsections.
A complex Table is included from its own source, containing some text as well.
\input{mwe_chapter1/chapter1_sec2_table}
The source of the snippet redirects to the annotations produced by pygmentize, which is expected.
\input{mwe_chapter1/chapter1_sec2_code_listing}
\end{filecontents}
\begin{filecontents}{mwe_chapter1/chapter1_sec2_code_listing}
\begin{listing}[htpb]
\begin{minted}[frame=single,framerule=0.25pt,fontsize=\scriptsize,fontfamily=courier]{c}
while(!0)
a++;
\end{minted}
\caption{Endless loop}
\label{code:snippet}
\end{listing}
\end{filecontents}
\begin{filecontents}{mwe_chapter1/chapter1_sec1_table}
%!TEX root = ../mwe_source.tex
\begin{table}[htpb]
\caption{Backward search redirects to a file designated as \emph{this\_mwe\_root\_folder} in my case.}
\begin{tabular}{ r|c|c| }
\multicolumn{1}{r}{}
& \multicolumn{1}{c}{noninteractive}
& \multicolumn{1}{c}{interactive} \\
\cline{2-3}
massively multiple & Library & University \\
\cline{2-3}
one-to-one & Book & Tutor \\
\cline{2-3}
\end{tabular}
\end{table}
\end{filecontents}
\begin{filecontents}{mwe_chapter1/chapter1_sec2_table}
%!TEX root = ../mwe_source.tex
This text is completely search-able from the pdf (backward search).
\begin{table}[htpb]
\caption{Backward search redirects to a file designated as \emph{this\_mwe\_root\_folder} in my case.}
\begin{tabular}{ r|c|c| }
\multicolumn{1}{r}{}
& \multicolumn{1}{c}{noninteractive}
& \multicolumn{1}{c}{interactive} \\
\cline{2-3}
massively multiple & Library & University \\
\cline{2-3}
one-to-one & Book & Tutor \\
\cline{2-3}
\end{tabular}
\end{table}
As well as this one.
\end{filecontents}
\begin{filecontents}{mwe_chapter5/chapter5}
%!TEX root = ../mwe_source.tex
\chapter{This is getting long}
\section{Section N: Does backward search work?}
Here it stopped, when it should go carry on. Now the redirection opens a file designated as the tree source folder name.
\end{filecontents}
\begin{document}
\title{Synctex Failure Details w/ tree structure}
\author{andradx}
\maketitle
\input{mwe_chapter1/chapter1}
\input{mwe_chapter5/chapter5}
\end{document}
请 mkdir mwe_chapter1 和 mwe_chapter5 作为示例。我看到的警告是:
** WARNING: IEEEtran.bst: No hyphenation pattern has been
** loaded for the language `English'. Using the pattern for
** the default language instead.
** WARNING: IEEEtran.bst: No hyphenation pattern has been
** loaded for the language `English'. Using the pattern for
** the default language instead.
和
pdfTeX warning (ext4): destination with the same identifier name{cite.author-conferenceYear}) has been already used, duplicate ignored
后者涉及我使用 bibentry 包在贡献列表中内联包含的所有参考文献。