TeX - LaTeX Asked by Somdip Dey on April 14, 2021
I am using the ociamthesis.cls (https://www.maths.ox.ac.uk/system/files/legacy/2894/ociamthesis.cls) to write my thesis. The ociamthesismain.tex code reads something like this:
documentclass[12pt]{ociamthesis}
letolddegreedegree % Store degree in olddegree
letdegreerelax % Remove definition of degree
usepackage{cite}
usepackage{amsmath,amssymb,amsfonts}
usepackage{subfigure}
usepackage{graphicx}
usepackage{textcomp}
usepackage{xcolor}
usepackage{algpseudocode}
usepackage{textcomp}
usepackage{gensymb}
letdegreesymbdegree % Store new degree in degreesymb
letdegreeolddegree % Restore degree to its old definition olddegree
usepackage{caption}
usepackage[ruled,linesnumbered]{algorithm2e}
newenvironment{program}[1][htb]
{renewcommand{algorithmcfname}{Program}% Update algorithm name
begin{algorithm}[#1]%
}{end{algorithm}}
usepackage{commath}
usepackage{fourier}
usepackage{array}
usepackage{makecell}
usepackage{tikz} % this package is for tick marks
defcheckmark{tikzfill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;}
defscalecheck{resizebox{widthof{checkmark}*ratio{widthof{x}}{widthof{normalsize x}}}{!}{checkmark}}% definition for bigger checkmark
usepackage{pifont}% http://ctan.org/pkg/pifont
newcommand{cmark}{ding{51}}% % check
newcommand{xmark}{ding{55}}% % cross
%for fixed width table-->
usepackage{array}
newcolumntype{L}[1]{>{raggedrightletnewlinearraybackslashhspace{0pt}}m{#1}}
newcolumntype{C}[1]{>{centeringletnewlinearraybackslashhspace{0pt}}m{#1}}
newcolumntype{R}[1]{>{raggedleftletnewlinearraybackslashhspace{0pt}}m{#1}}
%<-- for fixed width table array
renewcommandtheadalign{bc}
renewcommandtheadfont{bfseries}
renewcommandtheadgape{Gape[4pt]}
renewcommandcellgape{Gape[4pt]}
hyphenation{op-tical net-works semi-conduc-tor}
usepackage{xr}
usepackage{hyperref}
%externaldocument{chapter1}
title{Thesis title goes here}
author{Somdip Dey} %your name
college{School of Computer Science and Electronic Engineering} %your college
%renewcommand{submittedtext}{change the default text here if needed}
degree{Doctor of Philosophy} %the degree
degreedate{December, 2020} %the degree date
%end the preamble and start the document
begin{document}
%this baselineskip gives sufficient line spacing for an examiner to easily
%markup the thesis with comments
baselineskip=18pt plus1pt
%set the number of sectioning levels that get number and appear in the contents
setcounter{secnumdepth}{3}
setcounter{tocdepth}{3}
maketitle % create a title page from the preamble info
%include{dedication} % include a dedication.tex file % Commented by SOmdip Dey
%include{acknowlegements} % include an acknowledgements.tex file % Commented by SOmdip Dey
include{abstract} % include the abstract
begin{romanpages} % start roman page numbering
tableofcontents % generate and include a table of contents
listoffigures % generate and include a list of figures
end{romanpages} % end roman page numbering
%now include the files of latex for each of the chapters etc
include{intro}
include{background}
include{prologue1}
include{chapter1}
include{prologue2}
include{chapter2}
include{prologue3}
include{chapter3}
include{chapter4}
%include{conclusions}
%now enable appendix numbering format and include any appendices%Commented by SOmdip
%appendix
%include{appendix1}
%include{appendix2}
%next line adds the Bibliography to the contents page
addcontentsline{toc}{chapter}{Bibliography}
%uncomment next line to change bibliography name to references
%renewcommand{bibname}{References}
bibliography{research} %use a bibtex bibliography file refs.bib
bibliographystyle{plain} %use the plain bibliography style
end{document}
When I am trying to build the Latex using TexStudio I am getting the following errors:
File, Type, Line, Error
ociamthesismain.tex, error, line 301, Undefined control sequence.
removelatexerrorociamthesismain.tex, error, line 319, Undefined control sequence.
removelatexerrorociamthesismain.tex, error, line 347, Undefined control sequence.
removelatexerrorociamthesismain.tex, error, line 374, Undefined control sequence.
removelatexerror
In the Log File of TeXstudio the specific error is as follows:
[40] ! Undefined control sequence. l.301 removelatexerror
The control sequence at the end of the top line of your error message was never def’ed. If you have misspelled
it (e.g.,hobx'), type
I’ and the correct spelling (e.g.,
`Ihbox’). Otherwise just continue, and I’ll forget about whatever was
undefined.
Usually when you double click on the error it takes you to the error in the file. Howeverover, for the aforementioned errors when I am clicking on it, it doesn’t direct me to where the exact error is. Moreover, the ociamthesismain.tex file doesn’t have so many lines of code and hence errors happening in lines 301, 319, 347, 374 are not in the actual ociamthesismain.tex file. Additionally, because of these errors (I guess) the bibliography will also not regenerate and in all citations only [?] is showing.
So, my questions are as follows:
Steps I took to debug and resolve the issue:
For me the issue was, one of the chapters (.tex) was majorly copied from one of my published articles, which was using a command, removelatexerror. However, in this thesis tex I didn't need that command to get rid/suppress the errors if there's any. Once I removed removelatexerror from the aforementioned lines and compiled everything was building properly along with the bibliography.
Answered by Somdip Dey on April 14, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP