0

I am trying to use a PhD thesis template I was given. The code compiles in Overleaf without alterations, but for some reason in TexStudio, the code never compiles. It doesn't produce any error messages, just hangs until I stop it. Does anyone have any idea why?

\documentclass[numbers=noenddot]{icldt}
\usepackage{./ThesisStyle}

\title{~} \author{~} \date{~} \department{Physics}

\begin{document} \maketitle \include{./Introduction/IntroductionMain} \appendix \appendixpage

\bibliography{Bibliography} \bibliographystyle{ieeetr}

\end{document}

The files Bibliography.bib and Introduction.tex are just blank files. icldt.cls is here:

%%
%% This is file `icldt.cls',
%% generated with the docstrip utility.

\NeedsTeXFormat{LaTeX2e} \ProvidesClass{icldt} [2011/01/29 v2.0 Imperial College London Dissertation Template]

\newcommand{@supervisor}{} \newcommand{@university}{} \newcommand{@college}{Imperial College London} \newcommand{@department}{} \newcommand{@field}{} \newcommand{@degree}{} \newcommand{@diploma}{} \newcommand{@declaration}{} \DeclareOption{university}{% \renewcommand{@university}{University of London}} \DeclareOption{imperial}{% \let@university\empty} \DeclareOption{PhD}{% \renewcommand{@degree}{Doctor of Philosophy} \renewcommand{@diploma}{Diploma of Imperial College London}} \DeclareOption{MSc}{% \renewcommand{@degree}{Master of Science}\let@diploma\empty} \DeclareOption{BSc}{% \renewcommand{@degree}{Bachelor of Science}\let@diploma\empty} \DeclareOption{DIC=off}{% \let@diploma\empty} \DeclareOption{DIC=on}{% \renewcommand{@diploma}{Diploma of Imperial College London}} \DeclareOption{declaration=off}{% \let@declaration\empty} \DeclareOption{declaration=on}{% \renewcommand{@declaration}{% I herewith certify that all material in this dissertation which is not my own work has been properly acknowledged.}} \DeclareOption{doublespacing}{\AtBeginDocument{\doublespacing}} \DeclareOption{onehalfspacing}{\AtBeginDocument{\onehalfspacing}} \DeclareOption{titlepagenumber=off}{% \AtEndOfClass{\renewcommand{\titlepagestyle}{empty}}} \DeclareOption{titlepagenumber=on}{% \AtEndOfClass{\renewcommand{\titlepagestyle}{plain}}} \DeclareOption{paper=a4}{\PassOptionsToClass{\CurrentOption}{scrreprt}} \DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{scrreprt}} \DeclareOption{twoside}{\PassOptionsToClass{\CurrentOption}{scrreprt}} \DeclareOption{\PassOptionsToClass{\CurrentOption}{scrreprt}} \ExecuteOptions{onehalfspacing,titlepagenumber=on,imperial,PhD, declaration=off,paper=a4,pagesize=auto,11pt,twoside} \ProcessOptions\relax \LoadClass[pagesize=auto]{scrreprt} \RequirePackage{setspace} \RequirePackage[left=3.2cm,right=3.2cm,top=2.5cm,bottom=3cm]% {geometry} \newcommand{\supervisor}[1]{\gdef@supervisor{#1}} \newcommand{\college}[1]{\gdef@college{#1}} \newcommand{\department}[1]{\gdef@department{#1}} \newcommand{\field}[1]{\gdef@field{#1}} \newcommand{\declaration}[1]{\gdef@declaration{#1}}

\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\secpd}[2]{\frac{\partial^{2} #1}{\partial #2^{2}}} \newcommand{\secpdx}[3]{\frac{\partial^{2} #1}{\partial #2 \partial #3}} \newcommand{\deriv}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}} \newcommand{\secderiv}[2]{\frac{\mathrm{d}^{2} #1}{\mathrm{d} #2^{2}}} \newcommand{\braket}[2]{\left\langle{#1}\middle|{#2}\right\rangle} \newcommand{\bra}[1]{\left\langle{#1}\right|} \newcommand{\ket}[1]{\left|{#1}\right\rangle} \newcommand{\macca}[1]{\color{red}{\bf{#1}}\color{black}} %\DeclareMathOperator{\sgn}{sgn}

\setkomafont{sectioning}{\rmfamily\bfseries} \renewcommand*{\maketitle}{ \begin{titlepage} \par \clearpage \thispagestyle{\titlepagestyle} \null\vfill \begin{center} {\titlefont\huge @title\par} \vskip 3em {\Large \lineskip 0.75em \begin{tabular}[t]{c} @author \end{tabular}\par} \vskip 1.5em

%\begin{figure}[h!] %\begin{center} % \includegraphics[width=0.47\textwidth]{IC_crest.pdf} %\end{center} %\end{figure}

{\Large @date \par} \vskip \z@ @plus3fill \ifx@supervisor@empty \else {\Large Supervised by @supervisor \par} \fi \vskip 2em \end{center}\par \noindent\begin{minipage}[b]{\textwidth} \centering Submitted in partial fulfilment of the requirements for the degree of\ @degree\ of \ifx\empty@university{@college}\else{the @university}\fi \ifx@diploma@empty\fi \end{minipage}

\noindent\begin{minipage}[t]{\textwidth} \centering\large \vskip 0.5em \ifx@department@empty \else \par Department of @department\fi \ \ifx@university@empty \else @university\par\fi @college \ Prince Consort Road \ London SW7 2AZ \

\end{minipage}

\ifx@declaration@empty\else{ \cleardoublepage \chapter{Declaration} \thispagestyle{plain} @declaration \par\vspace{3cm} \hfill@author \cleardoublepage }\fi \end{titlepage} } \newcommand{\makededication}{ \ifx@dedication@empty \else \clearpage \thispagestyle{plain} \null\vfill {\centering \Large @dedication \par} \vskip \z@ @plus3fill \cleardoublepage \fi } \renewenvironment{abstract}{% \chapter{Abstract}\thispagestyle{plain}}{\cleardoublepage} \endinput

%% %% End of file `icldt.cls'.

And the file ThesisStyle.sty is:

\usepackage{graphicx}
    \def\pdfshellescape{1}
 \usepackage{epstopdf}
%

\usepackage[square,numbers,sort&compress% ]{natbib} % \usepackage{hypernat} \usepackage{siunitx} \usepackage{fancyhdr} \usepackage{amsmath, amsthm, amssymb} \usepackage{tabularx} \usepackage{bigints} \usepackage{booktabs} \usepackage{mathtools} \usepackage{pdfpages}

\newcommand{\pvec}[1]{\vec{#1}\mkern2mu\vphantom{#1}} \DeclareUnicodeCharacter{2009}{ } \DeclareUnicodeCharacter{2192}{$\rightarrow$} \DeclareUnicodeCharacter{2032}{'} \DeclareUnicodeCharacter{03B1}{$\alpha$} \DeclareUnicodeCharacter{03B3}{$\gamma$} \DeclareMathOperator\erf{erf} \DeclareMathOperator\var{Var} \DeclareMathOperator\cov{Cov} \newcommand{\etal}{\textit{et al. }}

\bibliographystyle{plainnatnourl}

\newcommand{\degree}{\ensuremath{^\circ}}

\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}

\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{ \markboth{ \chaptername \ \thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

\fancyhf{} % delete current setting for header and footer \fancyhead[LE,RO]{\bfseries\thepage} \fancyhead[LO]{\bfseries\rightmark} \fancyhead[RE]{\bfseries\leftmark} \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0.5pt} \addtolength{\headsep}{1.0ex} % make space for the foot rule \usepackage{caption} \captionsetup{labelsep=colon}

\usepackage{textcomp} \pdfminorversion=5 \usepackage[ pdftex, plainpages = false, pdfpagelabels, pdfpagelayout = SinglePage, bookmarks, bookmarksopen = true,bookmarksnumbered = true,breaklinks = true, linktocpage, pagebackref,colorlinks = true, linkcolor = black,urlcolor = black,citecolor = black,anchorcolor = black, hyperindex = true, pdfproducer=TeXShop,pdfstartview=FitV, %hyperfigures ]{hyperref}

\usepackage{appendix} \usepackage{chngcntr} \usepackage{etoolbox} \usepackage{lipsum} \usepackage[capitalise]{cleveref} \creflabelformat{equation}{#2#1#3}

\AtBeginEnvironment{subappendices}{% \chapter*{Appendix} \addcontentsline{toc}{chapter}{Appendices} \counterwithin{figure}{section} \counterwithin{table}{section} }

\setcounter{secnumdepth}{4}

mgmf46
  • 23
  • Welcome to TeX.SE, I believe that Overleaf updated into latest version, so better you to update the setup and try – MadyYuvi Jan 09 '23 at 14:59
  • 1
    Just a first guess: Since your document class is not included in any standard distribution, the problem is probably that your local engine cannot access the document class nor your self-defined package. In Overleaf it is sufficient to simply copy the corresponding files into the directory. But on a local installation this is not so easy. If you are using MikTeX you could try to install the .cls and .sty file according to these instructions: https://tex.stackexchange.com/a/2066/82926 – Nico Jan 09 '23 at 15:03
  • @Nico thank you! I'm using TexLive 2021, I've tried copying the .cls and .sty files into C:/texlive/texmf-local/tex/latex/local/. Is this what you meant? – mgmf46 Jan 09 '23 at 15:12
  • @mgmf46 Your code works fine for me, better to change the code from \usepackage{./ThesisStyle}, to \usepackage{ThesisStyle} and keep all the files into your working path, also updated TeXLive into latest release – MadyYuvi Jan 09 '23 at 15:27
  • @mgmf46 Partially yes, but after this you have to make TexLive familiar with the added files (update your database). How to do this depends on your operating system. On Linux (Ubuntu) this could be done from the command line with mktexlsr. – Nico Jan 09 '23 at 15:39
  • @Nico if the class or the sty could not be found the compilation wouldn't hang, there would be an clear error. – Ulrike Fischer Jan 09 '23 at 19:06
  • It seems that this might be a fault with an old TexLive distribution. Downloading TexLive 2022 and recompiling seems to fix the problem – mgmf46 Jan 10 '23 at 14:31

0 Answers0