奇怪的 Latex 错误导致我无法查看字数(Overleaf)

奇怪的 Latex 错误导致我无法查看字数(Overleaf)

我正在 Overleaf 上写论文,想知道我的字数。但是,当我尝试查看图片时,我看到了此错误。

在此处输入图片描述

该项目没有在日志中显示任何错误,所以我很困惑这意味着什么。

这是目录结构:

在此处输入图片描述

在此处输入图片描述

thesis.tex 文件似乎是设置所有内容的文件。它包含以下内容:

 \documentclass[a4paper]{usydthesis}

% Configuration

\def\degree{--}
\def\department{--}

\title{{--}}
\author{--}
\def\sid{--}
\def\supervisor{--}
%\def\assocsupervisor{Comment this line to remove assoc supervisor}

%%%%%%%%%%%%
% Packages

\usepackage{alltt}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage[colorlinks=true,citecolor=blue,urlcolor=blue,linkcolor=black,plainpages=false,pdfborder={0 0 0},backref=false]{hyperref}
\usepackage[all]{hypcap}
\usepackage{listings}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{pdflscape}
\usepackage{pgf}
\usepackage{pifont}
\usepackage{qtree}
\usepackage[english,rounding]{rccol}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{style/bib}
\usepackage{subfigure}
\usepackage{tabularx}
\usepackage{tipa}
\usepackage{wrapfig}
\usepackage{xcolor}
\usepackage{xspace}

% mine
\usepackage{booktabs} % for nice looking tables with \toprule etc
\usepackage{csquotes} % for block quotes
\usepackage{longtable} % for table across two pages
% \usepackage{graphicx} % images
% \usepackage{subcaption} % for side by side images
% /mine

\rcDecimalSignOutput{.} % rccol

\newenvironment{sidewaystablepage}{\begin{landscape}\begin{table}}{\end{table}\end{landscape}}

\def\subsectionautorefname{Section}
\def\subtableautorefname{Table}
\def\subfigureautorefname{Figure}
\def\chapterautorefname{Chapter}

\newcommand{\tick}{\ding{51}}
\newcommand{\cross}{\ding{53}}

\newcommand{\todo}[1]{{\color{red} #1}}
\newcommand{\sent}[1]{{\color{blue}\texttt{#1}\xspace}}


%%%%%%%%%%%%
% Maths functions
\def\O{\mbox{O}}

%%%%%%%%%%%%
% Setup

%   Page size:
\oddsidemargin=0cm  % really 1in
\evensidemargin=0cm
\textwidth=6.2677165in

% initial page numbers:  i, ii, iii, ...
\renewcommand{\thepage}{\roman{page}}

\input{morenames.tex}

%%%%%%%%%%%%
% Start

\begin{document}

%%%%%%%%%%%%
% Title page
\maketitle

\setstretch{1.5}

% intro pages
\cleardoublepage
\phantomsection
\input{plagiarism/plagiarism.tex}
\cleardoublepage
\phantomsection
\input{abstract/abstract.tex}
\cleardoublepage
\phantomsection
\input{thanks/thanks.tex}

% tables
\cleardoublepage
\setcounter{tocdepth}{2}
\tableofcontents

{\makeatletter
\renewcommand*\numberline[1]{\hb@xt@\@tempdima{#1 \hfil}\hspace*{1em}}
\makeatother
\listoffigures
\listoftables
\cleardoublepage
}

%%%%%%%%%%%%
% Chapters
\setcounter{page}{1}
\setcounter{chapter}{0}

% main page numbers:  1, 2, 3, ...
\renewcommand{\thepage}{\arabic{page}}  
\setupParagraphs

\input{introduction/introduction.tex}
\input{litreview/litreview.tex}
\input{methodology/methodology.tex}
\input{evaluation/evaluation.tex}
\input{results/results.tex}
\input{discussion/discussion.tex}
\input{conclusion/conclusion.tex}
\input{appendix/appendix.tex}


%%%%%%%%%%%%
% End

% Bibliography
\bibliographystyle{style/mybibstyle}
{
\setstretch{1.25}
\cleardoublepage
\phantomsection
\bibliography{references}
}

%%%% Appendices
%%%\appendix
%%%\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}
%%%\input{wikifeats/wikifeats.tex}
%%%\input{candcner/candcner.tex}
%%%\input{comparedata/comparedata.tex}

\end{document}

非常感谢所有能提供帮助的人!

答案1

我刚刚自己想通了!我想问这个问题就像我在互联网上瞎猜一样。无论如何,事实证明,我目录中各个 .tex 文件的路径必须是绝对路径。奇怪的是,这只影响了字数。也许有人可以解释一下。无论如何,这是修复之前的代码:

\input{introduction/introduction.tex}
\input{litreview/litreview.tex}
\input{methodology/methodology.tex}
\input{evaluation/evaluation.tex}
\input{results/results.tex}
\input{discussion/discussion.tex}
\input{conclusion/conclusion.tex}
\input{appendix/appendix.tex}

修复之后是这样(Overleaf 提供了路径自动完成功能,所以我才知道它们是错的):

\input{thesis 2/introduction/introduction}
\input{thesis 2/litreview/litreview}
\input{thesis 2/methodology/methodology}
\input{thesis 2/evaluation/evaluation}
\input{thesis 2/results/results}
\input{thesis 2/discussion/discussion}
\input{thesis 2/conclusion/conclusion}
\input{thesis 2/appendix/appendix}

感谢所有看过这个的人!

相关内容