frontmatter mainmatter and backmatter errors
I have this block of code which is giving me errors when using frontmatter, mainmatter and backmatter. I am getting errors at maketitle - undefined control sequence
, input{chap2/background_and_lit_overview_main}
- runaway argument
and the last line end{document}
documentclass[twoside]{um}
begin{document}
frontmatter
maketitle
input{frontmatter/originality}
input{frontmatter/dedication} % include a dedication.tex file
input{frontmatter/acknowledgements} % include an acknowledgements.tex file
input{frontmatter/abstract}if@openrightcleardoublepageelseclearpagefi
tableofcontents*if@openrightcleardoublepageelseclearpagefi
listoffigures*if@openrightcleardoublepageelseclearpagefi
listoftables*if@openrightcleardoublepageelseclearpagefi
input{frontmatter/abbreviations}if@openrightcleardoublepageelseclearpagefi
%% Note: always use input as you cannot nest includes (amongst other things)
pagestyle{umpage}
mainmatter
input{chap1/introduction_main}
input{chap2/background_and_lit_overview_main}
input{chap3/materials_and_methods_main}
input{chap4/results_and_discussion_main}
input{chap5/evaluation_main}
input{chap6/conclusions_main}
appendix
input{appA/appendix_a_main} % these are just test names as I didn't know what you'd want
input{appB/appendix_b_main}
input{appC/appendix_c_main}
{backmatter
% Bibliography
if@openrightcleardoublepageelseclearpagefi
bibliographystyle{um-plainnat} %% specific plainnat does not show url for articles
{footnotesizebibliography{chap1/introduction_biblio,chap2/background_and_lit_overview_biblio}}}
end{document}
I think this is the preamble and document class. This is a template for a dissertation
NeedsTeXFormat{LaTeX2e}
ProvidesClass{um}[2018/05/01 v1.1 University of Malta, Dissertation/FYP/Thesis Template]
DeclareOption*{PassOptionsToClass{CurrentOption}{memoir}}
ProcessOptionsrelax
LoadClass[12pt,a4paper,final]{memoir}
%% **************** Packages (Start) *********************
RequirePackage[utf8]{inputenc} % Required for inputting international characters
RequirePackage[T1]{fontenc} % Output font encoding for international characters
RequirePackage{mathpazo} % Use the Palatino font by default
RequirePackage[english]{babel} % Load babel if you're unsure about the default language - mostly to be safe
RequirePackage{xcolor} % For named colors
RequirePackage{eso-pic} % required to place huge uni logo at the back - on title page
RequirePackage[pdftex]{graphicx} % For pictures
RequirePackage{amssymb} % at least, for black squares in bullet list
RequirePackage[pdfusetitle]{hyperref} % for hyperreferences
RequirePackage[authoryear,semicolon,square,sort]{natbib} % for [Ebejer, 2012; Alba, 2013] kind of references
usepackage[printonlyused,withpage]{acronym}
%% ****************** Packages (End) *********************
%% ************ Document Options (Start) *****************
OnehalfSpacing % One and a half line spacing
setlength{headsep}{1.5cm} % Add space between the header and text
nouppercaseheads % Don't convert titles to Uppercase
makepagestyle{umpage} % UM pagestyle, put at bottom
makeevenhead{umpage}{sffamilyfootnotesizeleftmark}{}{sffamilyfootnotesizerightmark}
makeoddhead{umpage}{sffamilyfootnotesizerightmark}{}{sffamilyfootnotesizeleftmark}
makeevenfoot{umpage}{}{thepage}{}
makeoddfoot{umpage}{}{thepage}{}
makeheadrule{umpage}{textwidth}{0.2pt}
setlrmarginsandblock{3.7cm}{2.5cm}{*} % Set the page margins (for one and two sided docs)
checkandfixthelayout % Put layout into effect
graphicspath{{./images/}} % Where to look for images (paths) ...
DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg} % Graphics extensions to load
chapterstyle{ell} % how to draw the different chapters
renewcommand*{chapnumfont}{normalfontHUGEbfseries} % Chapter titles should be normal
renewcommand*{chaptitlefont}{normalfontHUGEbfseries}
newsubfloat{figure} % declares a new subfloat element which allows to use subbottom commands
renewcommand{labelitemi}{scriptsize$blacksquare$}
addto{captionsenglish}{renewcommand{bibname}{References}} % because we are using babel we need this
% instead of just redefining bibname
setlength{bibitemsep}{onelineskip}
newcommand{ra}[1]{renewcommand{arraystretch}{#1}} % to set array stretch within tables
hypersetup{%
colorlinks=false,
% linkcolor=UMRed,
% citecolor=UMRed,
% urlcolor=UMRed,
% filecolor=magenta,
pdfborder={0 0 0},
}
feetbelowfloat % we want the footnotes below floats, not wierdly above
setsecnumdepth{subsubsection} % three level depth - chapter, section, subsection, subsubsection
settocdepth{subsection}
renewcommand*{cftappendixname}{Appendixspace}
%% ************* Document Options (End) ******************
%% ************ UM Definitions (Start) *****************
definecolor{OxfordBlue}{rgb}{0,0.106,0.329} % Color
definecolor{UMRed}{rgb}{0.73,0.09,0.19} % UM Logo Color
% Setup choosen University of Malta crest/logo
deflogo{{includegraphics[width=32mm]{images/umlogo_red.png}}}
% The year and term the thesis is submitted
defdegreedate#1{gdef@degreedate{#1}}
% The full (unabbreviated) name of the degree
defdegree#1{gdef@degree{#1}}
% The name of your supervisor
defsupervisor#1{gdef@supervisor{#1}}
% The name of your co-supervisor
defcosupervisor#1{gdef@cosupervisor{#1}}
% The name of your department (e.g. Computer Science, Statistics, Biochemistry, AI)
defdepartment#1{gdef@department{#1}}
% The name of your faculty
deffaculty#1{gdef@faculty{#1}}
% The name of your faculty
defsubjectcode#1{gdef@subjectcode{#1}}
% The tagline
deftagline#1{gdef@tagline{#1}}
% The document type, e.g. a dissertation or a thesis
defdoctype#1{gdef@doctype{#1}}
%% ************* UM Definitions (End) ******************
%% *************** Environments (Start) ******************
%% *** Title Page (Start) ***
% background image
% taken from http://tug.org/pracjourn/2008-1/mori/mori.pdf
newcommandAlCentroPagina[1]{%
AddToShipoutPicture*{AtPageCenter{%
makebox(0,0){includegraphics[width=0.7paperwidth]{#1}}}}}
% The front page
renewcommand{maketitle}
{begingroup
AlCentroPagina{images/umlogo_gray.png}
parbox[b][0.95textheight][t]{0.2textwidth}{raggedleftlogo}
hspace*{2ex}
textcolor{UMRed}{rule{2pt}{0.95textheight}}
hspace*{2ex}
parbox[b][0.95textheight][t]{0.7textwidth}{
setlength{parindent}{0pt}
fontfamily{pag}selectfont
{Hugebfseries{begin{Spacing}{1.1}fontfamily{ppl}selectfonttextcolor{UMRed}{@title}end{Spacing}}
}
vspace*{2ex}
{largetextit{@tagline}}\[1in]
{LARGEbfseries textsc{@author}} \[1cm]
{large Supervised by @supervisor}
@ifundefined{@cosupervisor}{}{\[1ex]large Co-supervised by @cosupervisor}\[1cm]
{large @department} \[1ex]
{large @faculty} \[1ex]
{large University of Malta} \
vfill
{bfseries @degreedate}\[baselineskip]
{small textit{A @doctype submitted in partial fulfilment of the requirements for the degree of @degree}.}
}
thispagestyle{empty}
if@openrightcleardoublepageelseclearpagefi
endgroup}
%% *** Title Page (End) ***
newenvironment{acknowledgements}
{renewcommand{abstractname}{Acknowledgements}abstract}
{endabstractif@openrightcleardoublepageelseclearpagefi}
newenvironment{dedication}
{clearpage % we want a new page
thispagestyle{empty}% no header and footer
vspace*{stretch{1}}% some space at the top
itshape % the text is in italics
raggedleft % flush to the right margin
textcolor{UMRed}
}
{par % end the paragraph
vspace{stretch{3}} % space at bottom is three times that at the top
if@openrightcleardoublepageelseclearpagefi
}
%%renewenvironment{abstract}
%%{begin{alwayssingle} thispagestyle{empty}
%%begin{center}
%%vspace*{0.5cm}
%%{large bfseries textcolor{UMRed}{Abstract}}
%%end{center}
%%singlespacingenlargethispage{baselineskip}}
%%{end{alwayssingle}}
%%{cleardoublepagenewgeometry{right=1.3cm,top=2.4cm,bottom=2cm}pagestyle{empty}begin{center}bfserieslargetextcolor{OxfordBlue}abstractnameend{center}normalsizeonehalfspacingbegin{quotation}}{end{quotation}restoregeometrycleardoublepage}
% STATEMENT OF ORIGINALITY
%
% The originality environment puts a large, bold, centered
% "Statement of originality" label at the top of the page. The statement
% of originality itself appears in a quote environment, i.e. tabbed in at
% both sides, and on its own page.
newenvironment{originality}
{clearpage
begin{center}
vspace*{1.5cm}
{large bfseries textcolor{UMRed}{Statement of Originality} par}
vspace*{1.5cm}
{I, the undersigned, declare that this is my own work unless where otherwise acknowledged and referenced. par}
vspace*{1.5cm}
renewcommandarraystretch{1.5}
begin{tabular}{ll}
{bfseries Candidate} & @author \[15mm]
{bfseries Signed} & makebox[1.5in]{hrulefill} \
{bfseries Date} & today \
end{tabular}
end{center}
if@openrightcleardoublepageelseclearpagefi}
%% **************** Environments (End) *******************
front-matter
add a comment |
I have this block of code which is giving me errors when using frontmatter, mainmatter and backmatter. I am getting errors at maketitle - undefined control sequence
, input{chap2/background_and_lit_overview_main}
- runaway argument
and the last line end{document}
documentclass[twoside]{um}
begin{document}
frontmatter
maketitle
input{frontmatter/originality}
input{frontmatter/dedication} % include a dedication.tex file
input{frontmatter/acknowledgements} % include an acknowledgements.tex file
input{frontmatter/abstract}if@openrightcleardoublepageelseclearpagefi
tableofcontents*if@openrightcleardoublepageelseclearpagefi
listoffigures*if@openrightcleardoublepageelseclearpagefi
listoftables*if@openrightcleardoublepageelseclearpagefi
input{frontmatter/abbreviations}if@openrightcleardoublepageelseclearpagefi
%% Note: always use input as you cannot nest includes (amongst other things)
pagestyle{umpage}
mainmatter
input{chap1/introduction_main}
input{chap2/background_and_lit_overview_main}
input{chap3/materials_and_methods_main}
input{chap4/results_and_discussion_main}
input{chap5/evaluation_main}
input{chap6/conclusions_main}
appendix
input{appA/appendix_a_main} % these are just test names as I didn't know what you'd want
input{appB/appendix_b_main}
input{appC/appendix_c_main}
{backmatter
% Bibliography
if@openrightcleardoublepageelseclearpagefi
bibliographystyle{um-plainnat} %% specific plainnat does not show url for articles
{footnotesizebibliography{chap1/introduction_biblio,chap2/background_and_lit_overview_biblio}}}
end{document}
I think this is the preamble and document class. This is a template for a dissertation
NeedsTeXFormat{LaTeX2e}
ProvidesClass{um}[2018/05/01 v1.1 University of Malta, Dissertation/FYP/Thesis Template]
DeclareOption*{PassOptionsToClass{CurrentOption}{memoir}}
ProcessOptionsrelax
LoadClass[12pt,a4paper,final]{memoir}
%% **************** Packages (Start) *********************
RequirePackage[utf8]{inputenc} % Required for inputting international characters
RequirePackage[T1]{fontenc} % Output font encoding for international characters
RequirePackage{mathpazo} % Use the Palatino font by default
RequirePackage[english]{babel} % Load babel if you're unsure about the default language - mostly to be safe
RequirePackage{xcolor} % For named colors
RequirePackage{eso-pic} % required to place huge uni logo at the back - on title page
RequirePackage[pdftex]{graphicx} % For pictures
RequirePackage{amssymb} % at least, for black squares in bullet list
RequirePackage[pdfusetitle]{hyperref} % for hyperreferences
RequirePackage[authoryear,semicolon,square,sort]{natbib} % for [Ebejer, 2012; Alba, 2013] kind of references
usepackage[printonlyused,withpage]{acronym}
%% ****************** Packages (End) *********************
%% ************ Document Options (Start) *****************
OnehalfSpacing % One and a half line spacing
setlength{headsep}{1.5cm} % Add space between the header and text
nouppercaseheads % Don't convert titles to Uppercase
makepagestyle{umpage} % UM pagestyle, put at bottom
makeevenhead{umpage}{sffamilyfootnotesizeleftmark}{}{sffamilyfootnotesizerightmark}
makeoddhead{umpage}{sffamilyfootnotesizerightmark}{}{sffamilyfootnotesizeleftmark}
makeevenfoot{umpage}{}{thepage}{}
makeoddfoot{umpage}{}{thepage}{}
makeheadrule{umpage}{textwidth}{0.2pt}
setlrmarginsandblock{3.7cm}{2.5cm}{*} % Set the page margins (for one and two sided docs)
checkandfixthelayout % Put layout into effect
graphicspath{{./images/}} % Where to look for images (paths) ...
DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg} % Graphics extensions to load
chapterstyle{ell} % how to draw the different chapters
renewcommand*{chapnumfont}{normalfontHUGEbfseries} % Chapter titles should be normal
renewcommand*{chaptitlefont}{normalfontHUGEbfseries}
newsubfloat{figure} % declares a new subfloat element which allows to use subbottom commands
renewcommand{labelitemi}{scriptsize$blacksquare$}
addto{captionsenglish}{renewcommand{bibname}{References}} % because we are using babel we need this
% instead of just redefining bibname
setlength{bibitemsep}{onelineskip}
newcommand{ra}[1]{renewcommand{arraystretch}{#1}} % to set array stretch within tables
hypersetup{%
colorlinks=false,
% linkcolor=UMRed,
% citecolor=UMRed,
% urlcolor=UMRed,
% filecolor=magenta,
pdfborder={0 0 0},
}
feetbelowfloat % we want the footnotes below floats, not wierdly above
setsecnumdepth{subsubsection} % three level depth - chapter, section, subsection, subsubsection
settocdepth{subsection}
renewcommand*{cftappendixname}{Appendixspace}
%% ************* Document Options (End) ******************
%% ************ UM Definitions (Start) *****************
definecolor{OxfordBlue}{rgb}{0,0.106,0.329} % Color
definecolor{UMRed}{rgb}{0.73,0.09,0.19} % UM Logo Color
% Setup choosen University of Malta crest/logo
deflogo{{includegraphics[width=32mm]{images/umlogo_red.png}}}
% The year and term the thesis is submitted
defdegreedate#1{gdef@degreedate{#1}}
% The full (unabbreviated) name of the degree
defdegree#1{gdef@degree{#1}}
% The name of your supervisor
defsupervisor#1{gdef@supervisor{#1}}
% The name of your co-supervisor
defcosupervisor#1{gdef@cosupervisor{#1}}
% The name of your department (e.g. Computer Science, Statistics, Biochemistry, AI)
defdepartment#1{gdef@department{#1}}
% The name of your faculty
deffaculty#1{gdef@faculty{#1}}
% The name of your faculty
defsubjectcode#1{gdef@subjectcode{#1}}
% The tagline
deftagline#1{gdef@tagline{#1}}
% The document type, e.g. a dissertation or a thesis
defdoctype#1{gdef@doctype{#1}}
%% ************* UM Definitions (End) ******************
%% *************** Environments (Start) ******************
%% *** Title Page (Start) ***
% background image
% taken from http://tug.org/pracjourn/2008-1/mori/mori.pdf
newcommandAlCentroPagina[1]{%
AddToShipoutPicture*{AtPageCenter{%
makebox(0,0){includegraphics[width=0.7paperwidth]{#1}}}}}
% The front page
renewcommand{maketitle}
{begingroup
AlCentroPagina{images/umlogo_gray.png}
parbox[b][0.95textheight][t]{0.2textwidth}{raggedleftlogo}
hspace*{2ex}
textcolor{UMRed}{rule{2pt}{0.95textheight}}
hspace*{2ex}
parbox[b][0.95textheight][t]{0.7textwidth}{
setlength{parindent}{0pt}
fontfamily{pag}selectfont
{Hugebfseries{begin{Spacing}{1.1}fontfamily{ppl}selectfonttextcolor{UMRed}{@title}end{Spacing}}
}
vspace*{2ex}
{largetextit{@tagline}}\[1in]
{LARGEbfseries textsc{@author}} \[1cm]
{large Supervised by @supervisor}
@ifundefined{@cosupervisor}{}{\[1ex]large Co-supervised by @cosupervisor}\[1cm]
{large @department} \[1ex]
{large @faculty} \[1ex]
{large University of Malta} \
vfill
{bfseries @degreedate}\[baselineskip]
{small textit{A @doctype submitted in partial fulfilment of the requirements for the degree of @degree}.}
}
thispagestyle{empty}
if@openrightcleardoublepageelseclearpagefi
endgroup}
%% *** Title Page (End) ***
newenvironment{acknowledgements}
{renewcommand{abstractname}{Acknowledgements}abstract}
{endabstractif@openrightcleardoublepageelseclearpagefi}
newenvironment{dedication}
{clearpage % we want a new page
thispagestyle{empty}% no header and footer
vspace*{stretch{1}}% some space at the top
itshape % the text is in italics
raggedleft % flush to the right margin
textcolor{UMRed}
}
{par % end the paragraph
vspace{stretch{3}} % space at bottom is three times that at the top
if@openrightcleardoublepageelseclearpagefi
}
%%renewenvironment{abstract}
%%{begin{alwayssingle} thispagestyle{empty}
%%begin{center}
%%vspace*{0.5cm}
%%{large bfseries textcolor{UMRed}{Abstract}}
%%end{center}
%%singlespacingenlargethispage{baselineskip}}
%%{end{alwayssingle}}
%%{cleardoublepagenewgeometry{right=1.3cm,top=2.4cm,bottom=2cm}pagestyle{empty}begin{center}bfserieslargetextcolor{OxfordBlue}abstractnameend{center}normalsizeonehalfspacingbegin{quotation}}{end{quotation}restoregeometrycleardoublepage}
% STATEMENT OF ORIGINALITY
%
% The originality environment puts a large, bold, centered
% "Statement of originality" label at the top of the page. The statement
% of originality itself appears in a quote environment, i.e. tabbed in at
% both sides, and on its own page.
newenvironment{originality}
{clearpage
begin{center}
vspace*{1.5cm}
{large bfseries textcolor{UMRed}{Statement of Originality} par}
vspace*{1.5cm}
{I, the undersigned, declare that this is my own work unless where otherwise acknowledged and referenced. par}
vspace*{1.5cm}
renewcommandarraystretch{1.5}
begin{tabular}{ll}
{bfseries Candidate} & @author \[15mm]
{bfseries Signed} & makebox[1.5in]{hrulefill} \
{bfseries Date} & today \
end{tabular}
end{center}
if@openrightcleardoublepageelseclearpagefi}
%% **************** Environments (End) *******************
front-matter
Welcome to TeX.SX. In the world of La/Tex, the@
is very special and you are not just allowed to use it. Where is the code coming from?
– Johannes_B
Jan 8 at 11:00
(1) welcome, (2) please post a full minimal example, here document class and preamble is missing, (3)if@openrightcleardoublepageelseclearpagefi
would produce an error unless you had made @ into a letter, we do not know, since thre is no preamble.
– daleif
Jan 8 at 11:01
add a comment |
I have this block of code which is giving me errors when using frontmatter, mainmatter and backmatter. I am getting errors at maketitle - undefined control sequence
, input{chap2/background_and_lit_overview_main}
- runaway argument
and the last line end{document}
documentclass[twoside]{um}
begin{document}
frontmatter
maketitle
input{frontmatter/originality}
input{frontmatter/dedication} % include a dedication.tex file
input{frontmatter/acknowledgements} % include an acknowledgements.tex file
input{frontmatter/abstract}if@openrightcleardoublepageelseclearpagefi
tableofcontents*if@openrightcleardoublepageelseclearpagefi
listoffigures*if@openrightcleardoublepageelseclearpagefi
listoftables*if@openrightcleardoublepageelseclearpagefi
input{frontmatter/abbreviations}if@openrightcleardoublepageelseclearpagefi
%% Note: always use input as you cannot nest includes (amongst other things)
pagestyle{umpage}
mainmatter
input{chap1/introduction_main}
input{chap2/background_and_lit_overview_main}
input{chap3/materials_and_methods_main}
input{chap4/results_and_discussion_main}
input{chap5/evaluation_main}
input{chap6/conclusions_main}
appendix
input{appA/appendix_a_main} % these are just test names as I didn't know what you'd want
input{appB/appendix_b_main}
input{appC/appendix_c_main}
{backmatter
% Bibliography
if@openrightcleardoublepageelseclearpagefi
bibliographystyle{um-plainnat} %% specific plainnat does not show url for articles
{footnotesizebibliography{chap1/introduction_biblio,chap2/background_and_lit_overview_biblio}}}
end{document}
I think this is the preamble and document class. This is a template for a dissertation
NeedsTeXFormat{LaTeX2e}
ProvidesClass{um}[2018/05/01 v1.1 University of Malta, Dissertation/FYP/Thesis Template]
DeclareOption*{PassOptionsToClass{CurrentOption}{memoir}}
ProcessOptionsrelax
LoadClass[12pt,a4paper,final]{memoir}
%% **************** Packages (Start) *********************
RequirePackage[utf8]{inputenc} % Required for inputting international characters
RequirePackage[T1]{fontenc} % Output font encoding for international characters
RequirePackage{mathpazo} % Use the Palatino font by default
RequirePackage[english]{babel} % Load babel if you're unsure about the default language - mostly to be safe
RequirePackage{xcolor} % For named colors
RequirePackage{eso-pic} % required to place huge uni logo at the back - on title page
RequirePackage[pdftex]{graphicx} % For pictures
RequirePackage{amssymb} % at least, for black squares in bullet list
RequirePackage[pdfusetitle]{hyperref} % for hyperreferences
RequirePackage[authoryear,semicolon,square,sort]{natbib} % for [Ebejer, 2012; Alba, 2013] kind of references
usepackage[printonlyused,withpage]{acronym}
%% ****************** Packages (End) *********************
%% ************ Document Options (Start) *****************
OnehalfSpacing % One and a half line spacing
setlength{headsep}{1.5cm} % Add space between the header and text
nouppercaseheads % Don't convert titles to Uppercase
makepagestyle{umpage} % UM pagestyle, put at bottom
makeevenhead{umpage}{sffamilyfootnotesizeleftmark}{}{sffamilyfootnotesizerightmark}
makeoddhead{umpage}{sffamilyfootnotesizerightmark}{}{sffamilyfootnotesizeleftmark}
makeevenfoot{umpage}{}{thepage}{}
makeoddfoot{umpage}{}{thepage}{}
makeheadrule{umpage}{textwidth}{0.2pt}
setlrmarginsandblock{3.7cm}{2.5cm}{*} % Set the page margins (for one and two sided docs)
checkandfixthelayout % Put layout into effect
graphicspath{{./images/}} % Where to look for images (paths) ...
DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg} % Graphics extensions to load
chapterstyle{ell} % how to draw the different chapters
renewcommand*{chapnumfont}{normalfontHUGEbfseries} % Chapter titles should be normal
renewcommand*{chaptitlefont}{normalfontHUGEbfseries}
newsubfloat{figure} % declares a new subfloat element which allows to use subbottom commands
renewcommand{labelitemi}{scriptsize$blacksquare$}
addto{captionsenglish}{renewcommand{bibname}{References}} % because we are using babel we need this
% instead of just redefining bibname
setlength{bibitemsep}{onelineskip}
newcommand{ra}[1]{renewcommand{arraystretch}{#1}} % to set array stretch within tables
hypersetup{%
colorlinks=false,
% linkcolor=UMRed,
% citecolor=UMRed,
% urlcolor=UMRed,
% filecolor=magenta,
pdfborder={0 0 0},
}
feetbelowfloat % we want the footnotes below floats, not wierdly above
setsecnumdepth{subsubsection} % three level depth - chapter, section, subsection, subsubsection
settocdepth{subsection}
renewcommand*{cftappendixname}{Appendixspace}
%% ************* Document Options (End) ******************
%% ************ UM Definitions (Start) *****************
definecolor{OxfordBlue}{rgb}{0,0.106,0.329} % Color
definecolor{UMRed}{rgb}{0.73,0.09,0.19} % UM Logo Color
% Setup choosen University of Malta crest/logo
deflogo{{includegraphics[width=32mm]{images/umlogo_red.png}}}
% The year and term the thesis is submitted
defdegreedate#1{gdef@degreedate{#1}}
% The full (unabbreviated) name of the degree
defdegree#1{gdef@degree{#1}}
% The name of your supervisor
defsupervisor#1{gdef@supervisor{#1}}
% The name of your co-supervisor
defcosupervisor#1{gdef@cosupervisor{#1}}
% The name of your department (e.g. Computer Science, Statistics, Biochemistry, AI)
defdepartment#1{gdef@department{#1}}
% The name of your faculty
deffaculty#1{gdef@faculty{#1}}
% The name of your faculty
defsubjectcode#1{gdef@subjectcode{#1}}
% The tagline
deftagline#1{gdef@tagline{#1}}
% The document type, e.g. a dissertation or a thesis
defdoctype#1{gdef@doctype{#1}}
%% ************* UM Definitions (End) ******************
%% *************** Environments (Start) ******************
%% *** Title Page (Start) ***
% background image
% taken from http://tug.org/pracjourn/2008-1/mori/mori.pdf
newcommandAlCentroPagina[1]{%
AddToShipoutPicture*{AtPageCenter{%
makebox(0,0){includegraphics[width=0.7paperwidth]{#1}}}}}
% The front page
renewcommand{maketitle}
{begingroup
AlCentroPagina{images/umlogo_gray.png}
parbox[b][0.95textheight][t]{0.2textwidth}{raggedleftlogo}
hspace*{2ex}
textcolor{UMRed}{rule{2pt}{0.95textheight}}
hspace*{2ex}
parbox[b][0.95textheight][t]{0.7textwidth}{
setlength{parindent}{0pt}
fontfamily{pag}selectfont
{Hugebfseries{begin{Spacing}{1.1}fontfamily{ppl}selectfonttextcolor{UMRed}{@title}end{Spacing}}
}
vspace*{2ex}
{largetextit{@tagline}}\[1in]
{LARGEbfseries textsc{@author}} \[1cm]
{large Supervised by @supervisor}
@ifundefined{@cosupervisor}{}{\[1ex]large Co-supervised by @cosupervisor}\[1cm]
{large @department} \[1ex]
{large @faculty} \[1ex]
{large University of Malta} \
vfill
{bfseries @degreedate}\[baselineskip]
{small textit{A @doctype submitted in partial fulfilment of the requirements for the degree of @degree}.}
}
thispagestyle{empty}
if@openrightcleardoublepageelseclearpagefi
endgroup}
%% *** Title Page (End) ***
newenvironment{acknowledgements}
{renewcommand{abstractname}{Acknowledgements}abstract}
{endabstractif@openrightcleardoublepageelseclearpagefi}
newenvironment{dedication}
{clearpage % we want a new page
thispagestyle{empty}% no header and footer
vspace*{stretch{1}}% some space at the top
itshape % the text is in italics
raggedleft % flush to the right margin
textcolor{UMRed}
}
{par % end the paragraph
vspace{stretch{3}} % space at bottom is three times that at the top
if@openrightcleardoublepageelseclearpagefi
}
%%renewenvironment{abstract}
%%{begin{alwayssingle} thispagestyle{empty}
%%begin{center}
%%vspace*{0.5cm}
%%{large bfseries textcolor{UMRed}{Abstract}}
%%end{center}
%%singlespacingenlargethispage{baselineskip}}
%%{end{alwayssingle}}
%%{cleardoublepagenewgeometry{right=1.3cm,top=2.4cm,bottom=2cm}pagestyle{empty}begin{center}bfserieslargetextcolor{OxfordBlue}abstractnameend{center}normalsizeonehalfspacingbegin{quotation}}{end{quotation}restoregeometrycleardoublepage}
% STATEMENT OF ORIGINALITY
%
% The originality environment puts a large, bold, centered
% "Statement of originality" label at the top of the page. The statement
% of originality itself appears in a quote environment, i.e. tabbed in at
% both sides, and on its own page.
newenvironment{originality}
{clearpage
begin{center}
vspace*{1.5cm}
{large bfseries textcolor{UMRed}{Statement of Originality} par}
vspace*{1.5cm}
{I, the undersigned, declare that this is my own work unless where otherwise acknowledged and referenced. par}
vspace*{1.5cm}
renewcommandarraystretch{1.5}
begin{tabular}{ll}
{bfseries Candidate} & @author \[15mm]
{bfseries Signed} & makebox[1.5in]{hrulefill} \
{bfseries Date} & today \
end{tabular}
end{center}
if@openrightcleardoublepageelseclearpagefi}
%% **************** Environments (End) *******************
front-matter
I have this block of code which is giving me errors when using frontmatter, mainmatter and backmatter. I am getting errors at maketitle - undefined control sequence
, input{chap2/background_and_lit_overview_main}
- runaway argument
and the last line end{document}
documentclass[twoside]{um}
begin{document}
frontmatter
maketitle
input{frontmatter/originality}
input{frontmatter/dedication} % include a dedication.tex file
input{frontmatter/acknowledgements} % include an acknowledgements.tex file
input{frontmatter/abstract}if@openrightcleardoublepageelseclearpagefi
tableofcontents*if@openrightcleardoublepageelseclearpagefi
listoffigures*if@openrightcleardoublepageelseclearpagefi
listoftables*if@openrightcleardoublepageelseclearpagefi
input{frontmatter/abbreviations}if@openrightcleardoublepageelseclearpagefi
%% Note: always use input as you cannot nest includes (amongst other things)
pagestyle{umpage}
mainmatter
input{chap1/introduction_main}
input{chap2/background_and_lit_overview_main}
input{chap3/materials_and_methods_main}
input{chap4/results_and_discussion_main}
input{chap5/evaluation_main}
input{chap6/conclusions_main}
appendix
input{appA/appendix_a_main} % these are just test names as I didn't know what you'd want
input{appB/appendix_b_main}
input{appC/appendix_c_main}
{backmatter
% Bibliography
if@openrightcleardoublepageelseclearpagefi
bibliographystyle{um-plainnat} %% specific plainnat does not show url for articles
{footnotesizebibliography{chap1/introduction_biblio,chap2/background_and_lit_overview_biblio}}}
end{document}
I think this is the preamble and document class. This is a template for a dissertation
NeedsTeXFormat{LaTeX2e}
ProvidesClass{um}[2018/05/01 v1.1 University of Malta, Dissertation/FYP/Thesis Template]
DeclareOption*{PassOptionsToClass{CurrentOption}{memoir}}
ProcessOptionsrelax
LoadClass[12pt,a4paper,final]{memoir}
%% **************** Packages (Start) *********************
RequirePackage[utf8]{inputenc} % Required for inputting international characters
RequirePackage[T1]{fontenc} % Output font encoding for international characters
RequirePackage{mathpazo} % Use the Palatino font by default
RequirePackage[english]{babel} % Load babel if you're unsure about the default language - mostly to be safe
RequirePackage{xcolor} % For named colors
RequirePackage{eso-pic} % required to place huge uni logo at the back - on title page
RequirePackage[pdftex]{graphicx} % For pictures
RequirePackage{amssymb} % at least, for black squares in bullet list
RequirePackage[pdfusetitle]{hyperref} % for hyperreferences
RequirePackage[authoryear,semicolon,square,sort]{natbib} % for [Ebejer, 2012; Alba, 2013] kind of references
usepackage[printonlyused,withpage]{acronym}
%% ****************** Packages (End) *********************
%% ************ Document Options (Start) *****************
OnehalfSpacing % One and a half line spacing
setlength{headsep}{1.5cm} % Add space between the header and text
nouppercaseheads % Don't convert titles to Uppercase
makepagestyle{umpage} % UM pagestyle, put at bottom
makeevenhead{umpage}{sffamilyfootnotesizeleftmark}{}{sffamilyfootnotesizerightmark}
makeoddhead{umpage}{sffamilyfootnotesizerightmark}{}{sffamilyfootnotesizeleftmark}
makeevenfoot{umpage}{}{thepage}{}
makeoddfoot{umpage}{}{thepage}{}
makeheadrule{umpage}{textwidth}{0.2pt}
setlrmarginsandblock{3.7cm}{2.5cm}{*} % Set the page margins (for one and two sided docs)
checkandfixthelayout % Put layout into effect
graphicspath{{./images/}} % Where to look for images (paths) ...
DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg} % Graphics extensions to load
chapterstyle{ell} % how to draw the different chapters
renewcommand*{chapnumfont}{normalfontHUGEbfseries} % Chapter titles should be normal
renewcommand*{chaptitlefont}{normalfontHUGEbfseries}
newsubfloat{figure} % declares a new subfloat element which allows to use subbottom commands
renewcommand{labelitemi}{scriptsize$blacksquare$}
addto{captionsenglish}{renewcommand{bibname}{References}} % because we are using babel we need this
% instead of just redefining bibname
setlength{bibitemsep}{onelineskip}
newcommand{ra}[1]{renewcommand{arraystretch}{#1}} % to set array stretch within tables
hypersetup{%
colorlinks=false,
% linkcolor=UMRed,
% citecolor=UMRed,
% urlcolor=UMRed,
% filecolor=magenta,
pdfborder={0 0 0},
}
feetbelowfloat % we want the footnotes below floats, not wierdly above
setsecnumdepth{subsubsection} % three level depth - chapter, section, subsection, subsubsection
settocdepth{subsection}
renewcommand*{cftappendixname}{Appendixspace}
%% ************* Document Options (End) ******************
%% ************ UM Definitions (Start) *****************
definecolor{OxfordBlue}{rgb}{0,0.106,0.329} % Color
definecolor{UMRed}{rgb}{0.73,0.09,0.19} % UM Logo Color
% Setup choosen University of Malta crest/logo
deflogo{{includegraphics[width=32mm]{images/umlogo_red.png}}}
% The year and term the thesis is submitted
defdegreedate#1{gdef@degreedate{#1}}
% The full (unabbreviated) name of the degree
defdegree#1{gdef@degree{#1}}
% The name of your supervisor
defsupervisor#1{gdef@supervisor{#1}}
% The name of your co-supervisor
defcosupervisor#1{gdef@cosupervisor{#1}}
% The name of your department (e.g. Computer Science, Statistics, Biochemistry, AI)
defdepartment#1{gdef@department{#1}}
% The name of your faculty
deffaculty#1{gdef@faculty{#1}}
% The name of your faculty
defsubjectcode#1{gdef@subjectcode{#1}}
% The tagline
deftagline#1{gdef@tagline{#1}}
% The document type, e.g. a dissertation or a thesis
defdoctype#1{gdef@doctype{#1}}
%% ************* UM Definitions (End) ******************
%% *************** Environments (Start) ******************
%% *** Title Page (Start) ***
% background image
% taken from http://tug.org/pracjourn/2008-1/mori/mori.pdf
newcommandAlCentroPagina[1]{%
AddToShipoutPicture*{AtPageCenter{%
makebox(0,0){includegraphics[width=0.7paperwidth]{#1}}}}}
% The front page
renewcommand{maketitle}
{begingroup
AlCentroPagina{images/umlogo_gray.png}
parbox[b][0.95textheight][t]{0.2textwidth}{raggedleftlogo}
hspace*{2ex}
textcolor{UMRed}{rule{2pt}{0.95textheight}}
hspace*{2ex}
parbox[b][0.95textheight][t]{0.7textwidth}{
setlength{parindent}{0pt}
fontfamily{pag}selectfont
{Hugebfseries{begin{Spacing}{1.1}fontfamily{ppl}selectfonttextcolor{UMRed}{@title}end{Spacing}}
}
vspace*{2ex}
{largetextit{@tagline}}\[1in]
{LARGEbfseries textsc{@author}} \[1cm]
{large Supervised by @supervisor}
@ifundefined{@cosupervisor}{}{\[1ex]large Co-supervised by @cosupervisor}\[1cm]
{large @department} \[1ex]
{large @faculty} \[1ex]
{large University of Malta} \
vfill
{bfseries @degreedate}\[baselineskip]
{small textit{A @doctype submitted in partial fulfilment of the requirements for the degree of @degree}.}
}
thispagestyle{empty}
if@openrightcleardoublepageelseclearpagefi
endgroup}
%% *** Title Page (End) ***
newenvironment{acknowledgements}
{renewcommand{abstractname}{Acknowledgements}abstract}
{endabstractif@openrightcleardoublepageelseclearpagefi}
newenvironment{dedication}
{clearpage % we want a new page
thispagestyle{empty}% no header and footer
vspace*{stretch{1}}% some space at the top
itshape % the text is in italics
raggedleft % flush to the right margin
textcolor{UMRed}
}
{par % end the paragraph
vspace{stretch{3}} % space at bottom is three times that at the top
if@openrightcleardoublepageelseclearpagefi
}
%%renewenvironment{abstract}
%%{begin{alwayssingle} thispagestyle{empty}
%%begin{center}
%%vspace*{0.5cm}
%%{large bfseries textcolor{UMRed}{Abstract}}
%%end{center}
%%singlespacingenlargethispage{baselineskip}}
%%{end{alwayssingle}}
%%{cleardoublepagenewgeometry{right=1.3cm,top=2.4cm,bottom=2cm}pagestyle{empty}begin{center}bfserieslargetextcolor{OxfordBlue}abstractnameend{center}normalsizeonehalfspacingbegin{quotation}}{end{quotation}restoregeometrycleardoublepage}
% STATEMENT OF ORIGINALITY
%
% The originality environment puts a large, bold, centered
% "Statement of originality" label at the top of the page. The statement
% of originality itself appears in a quote environment, i.e. tabbed in at
% both sides, and on its own page.
newenvironment{originality}
{clearpage
begin{center}
vspace*{1.5cm}
{large bfseries textcolor{UMRed}{Statement of Originality} par}
vspace*{1.5cm}
{I, the undersigned, declare that this is my own work unless where otherwise acknowledged and referenced. par}
vspace*{1.5cm}
renewcommandarraystretch{1.5}
begin{tabular}{ll}
{bfseries Candidate} & @author \[15mm]
{bfseries Signed} & makebox[1.5in]{hrulefill} \
{bfseries Date} & today \
end{tabular}
end{center}
if@openrightcleardoublepageelseclearpagefi}
%% **************** Environments (End) *******************
front-matter
front-matter
edited Jan 8 at 11:37
moewe
88k9110337
88k9110337
asked Jan 8 at 10:56
CharleneCharlene
1
1
Welcome to TeX.SX. In the world of La/Tex, the@
is very special and you are not just allowed to use it. Where is the code coming from?
– Johannes_B
Jan 8 at 11:00
(1) welcome, (2) please post a full minimal example, here document class and preamble is missing, (3)if@openrightcleardoublepageelseclearpagefi
would produce an error unless you had made @ into a letter, we do not know, since thre is no preamble.
– daleif
Jan 8 at 11:01
add a comment |
Welcome to TeX.SX. In the world of La/Tex, the@
is very special and you are not just allowed to use it. Where is the code coming from?
– Johannes_B
Jan 8 at 11:00
(1) welcome, (2) please post a full minimal example, here document class and preamble is missing, (3)if@openrightcleardoublepageelseclearpagefi
would produce an error unless you had made @ into a letter, we do not know, since thre is no preamble.
– daleif
Jan 8 at 11:01
Welcome to TeX.SX. In the world of La/Tex, the
@
is very special and you are not just allowed to use it. Where is the code coming from?– Johannes_B
Jan 8 at 11:00
Welcome to TeX.SX. In the world of La/Tex, the
@
is very special and you are not just allowed to use it. Where is the code coming from?– Johannes_B
Jan 8 at 11:00
(1) welcome, (2) please post a full minimal example, here document class and preamble is missing, (3)
if@openrightcleardoublepageelseclearpagefi
would produce an error unless you had made @ into a letter, we do not know, since thre is no preamble.– daleif
Jan 8 at 11:01
(1) welcome, (2) please post a full minimal example, here document class and preamble is missing, (3)
if@openrightcleardoublepageelseclearpagefi
would produce an error unless you had made @ into a letter, we do not know, since thre is no preamble.– daleif
Jan 8 at 11:01
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469123%2ffrontmatter-mainmatter-and-backmatter-errors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469123%2ffrontmatter-mainmatter-and-backmatter-errors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to TeX.SX. In the world of La/Tex, the
@
is very special and you are not just allowed to use it. Where is the code coming from?– Johannes_B
Jan 8 at 11:00
(1) welcome, (2) please post a full minimal example, here document class and preamble is missing, (3)
if@openrightcleardoublepageelseclearpagefi
would produce an error unless you had made @ into a letter, we do not know, since thre is no preamble.– daleif
Jan 8 at 11:01