0

I am writing a thesis in Overleaf and would like to know my word count. However, I am seeing this error in the image when I try and view it.

enter image description here

The project does not show any errors in logs, so I am confused as to what this means.

This is the directory structure:

enter image description here

enter image description here

And the thesis.tex file seems to be the file that sets everything up. This is what it contains:

 \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}

Thank you very much for anyone that can assist!

9
  • Welcome to MSE. Can't you share more information than that? Oct 20, 2021 at 9:45
  • Thanks for the reply. Sorry, I realise it wasn't very detailed. I have just edited it and added the directory structure and the main thesis.tex file that seems to organise everything. I am using a template so I am not super familiar with how it works. Is that enough information or can I give more?
    – Sam
    Oct 20, 2021 at 9:55
  • It's quite better now. Oct 20, 2021 at 9:58
  • Okay great, thanks for the feedback!
    – Sam
    Oct 20, 2021 at 10:00
  • are you running the word count on the top level, the overleaf page says " Note that your project's main document must be on the project's top level (i.e. not within a folder) for texcount to work on Overleaf. " the highlighted sidebar seems to indicate you are on discussion.tex and thesis.tex is in a thesis2 directory Oct 20, 2021 at 10:01

1 Answer 1

1

I just figured it out myself! I guess asking this question was like me rubber ducking the internet. Anyway, turns out the paths to the individual .tex files in my directory need to be absolute paths. Its strange that this only affected the word count. Maybe someone can shed some light on that. Anyway, here is the code before it was fixed:

\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}

And here is it after the fix (Overleaf offered an autocomplete on the paths and that's how I figured out they were wrong):

\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}

Thanks to anyone that looked at this!

2
  • BTW It won't let me accept my own answer so I don't know how to close this question lol sorry
    – Sam
    Oct 20, 2021 at 10:09
  • you will be able to accept once you get above 1 rep I think but I'm confused if your main thesis.tex is in the thesis 2 folder this will no longer work with tex will it? The issue is that pdflatex is run in a special build folder so it knows where things are but auxiliary programs like texcount do not, which is why overleaf documents that you must not start in a folder Oct 20, 2021 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.