1

I am writing my thesis using this template. I have two problems: First: the subsection and subsubsection commands are not working. Second: I need to use the {arabtex} package. however when I load this package things are missed up.

her is my template:

\documentclass[12pt,a4paper,oneside,times]{memoir}
\usepackage[centertags]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{morefloats}
\usepackage[scriptsize]{subfigure}
\usepackage[table,xcdraw]{xcolor}
\usepackage{epsfig}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{setspace}
\usepackage{wrapfig}
\usepackage[square]{natbib}
\usepackage{soul}
\usepackage{afterpage}
\usepackage{mathptmx}
\usepackage{times}
\usepackage{lipsum}
\usepackage[paperheight=297mm, paperwidth=210mm]{geometry}
\usepackage{titlesec}
\usepackage{titletoc}
%\usepackage{arabtex}
%\usepackage{utf8}
\makeatletter
  \newcommand\mySixteen{\@setfontsize\mySixteen{16pt}{16pt}}
  \newcommand\myEighteen{\@setfontsize\myEighteen{18pt}{18pt}}
\makeatother
\renewcommand{\cftdot}{}
% To change the label of references to 1. instead of [1]
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother
\mainmatter
\setlength{\beforechapskip}{12pc}
% to add text to the top of each page of list of figures
\newif\ifendLOF
\newcommand*{\lofheader}{\vspace{0.5cm}%
\ifendLOF\else\hbox to \linewidth%
  {{~\ul{\textbf{Figure}}}~\hfill{\ul{\textbf{Description}}}~\hfill{\ul{\textbf{Page}}}}\par%
  \vspace{12pt}%
  \afterpage{\lofheader}
\fi}%
% to add text to the top of each page of list of tables
\newif\ifendLOT
\newcommand*{\lotheader}{ \vspace{0.5cm}%
\ifendLOT\else\hbox to \linewidth%
  {{~\ul{\textbf{Table}}}~\hfill{\ul{\textbf{Description}}}~\hfill{\ul{\textbf{Page}}}}\par%
  \vspace{12pt}%
  \afterpage{\lotheader}
\fi}%
\renewcommand*{\cftchaptername}{\mySixteen Chapter\space}% p. 151, memmanual
\renewcommand*{\chapternumberline}[1]{%
\cftchaptername\protect\NumToName{#1}\space--\space}% p. 152, memmanual
\renewcommand{\cftchapterpagefont}{\mySixteen\bfseries}
\renewcommand{\cftsectionpagefont}{\large\bfseries}
\renewcommand{\cftsectionfont}{\large\bfseries}
\renewcommand{\cftpartpagefont}{\large\mdseries}
%\setlength{\cftbeforepartskip}{2.25em \@plus\p@}
\setlength{\cftbeforepartskip}{12pt}
\setlength{\cftbeforesectionskip}{1sp}
\newgeometry{top=23mm, bottom=25mm, left=30mm, right=25mm}
\renewcommand{\printtoctitle}{\centering\mySixteen\bfseries}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\printloftitle}{\centering\mySixteen\bfseries}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\printlottitle}{\centering\mySixteen\bfseries}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\abstractname}{\centering\mySixteen\bfseries ABSTRACT}
\newenvironment{acknowledgments}
{\renewcommand{\abstractname}{\centering\mySixteen\bfseries ACKNOWLEDGMENT}\abstract}
{\endabstract}
\newenvironment{dedication}
{\renewcommand{\abstractname}{\centering\mySixteen\bfseries DEDICATION}\abstract}
{\endabstract}
% Abstract: Remove indents around abstract text
\setlength{\absleftindent}{0pt}
\setlength{\absrightindent}{0pt}
% Change font size to conform with the rest of the document text
\renewcommand{\abstracttextfont}{\normalsize}
\makeatletter
  \renewcommand{\fnum@figure}{\textbf
  {\figurename~\thefigure}}
  \renewcommand{\fnum@table}{\textbf
  {\tablename~\thetable}}
 \makeatother
\begin{document}
\setlength{\intextsep}{10pt} % Vertical space above & below [h] floats
\setlength{\textfloatsep}{10pt} % Vertical space below (above) [t] ([b]) floats
\setlength{\abovecaptionskip}{10pt}
\setlength{\belowcaptionskip}{5pt}
\DoubleSpacing
\chapterstyle{brotherton}
\renewcommand*{\chapnamefont}{\mySixteen\bfseries}
\renewcommand*{\chapnumfont}{\mySixteen\bfseries}
\renewcommand*{\chaptitlefont}{\mySixteen\bfseries}
\setsecheadstyle{\large\bfseries}
\renewcommand\afterchapternum{:~}
\setaftersecskip{1sp}
\setbeforesecskip{1sp}
\setlength{\beforechapskip}{27pt}
%\setlength{\midchapskip}{0pt}
\setlength{\midchapskip}{1sp}
%\setlength{\afterchapskip}{-10pt}
\setlength{\afterchapskip}{1sp}
\renewcommand\bibname{\mySixteen\bfseries References}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\arraystretch{1.25}
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\begin{myEighteen}
\textbf{My Title}
\end{myEighteen}
\end{center}
\vspace*{\fill}
\newpage
\DoubleSpacing
\newgeometry{top=48mm, bottom=25mm, left=30mm, right=25mm}
\DoubleSpacing
\thispagestyle{empty}
\begin{center}
\begin{mySixteen}
\textbf{My Title} \vspace{\stretch{1}}
\end{mySixteen}
\begin{large}
By \\
\textbf{Me } \\
Advisor\\
\textbf{My Advisor} \\
Co-Advisor \\
\textbf{my Co-advisor
%\footnote{EECS at Case Western Reserve University, Clevelan, OH, USA}
}
 \vspace{\stretch{1}}
 Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of
M.Sc. in Computer Engineering\\At \\Faculty of Graduate Studies
\\my schol\\
\vspace{\stretch{1}}
\vspace{3cm}
January, 2017
\end{large}
%\vspace{\stretch{0.5}}
\end{center}
\newpage
\thispagestyle{empty}
\pagestyle{plain}
\pagenumbering{Roman}
%\phantomsection \label{dedication}
\SingleSpacing
\addcontentsline{toc}{part}{\large\mdseries DEDICATION}
\DoubleSpacing
\begin{dedication}
\begin{center}
\emph{To My Lovely Father and Mother: Anwar and Manal} \\
\end{center}
\end{dedication} 
\newpage
\SingleSpacing
\addcontentsline{toc}{part}{\large\mdseries ACKNOWLEDGMENT}
\DoubleSpacing
\begin{acknowledgments}
My sensate thanks go to my advisor.
\end{acknowledgments}
\newpage
\SingleSpacing
\newgeometry{top=31mm, bottom=25mm, left=30mm, right=25mm}
\SingleSpacing
\addcontentsline{toc}{part}{\large\mdseries TABLE OF CONTENT}
\tableofcontents*
\newpage
\addcontentsline{toc}{part}{\large\mdseries LIST OF FIGURES}
\listoffigures*
\addtocontents{lof}{\protect\lofheader}
\endLOFtrue
\newpage
\addcontentsline{toc}{part}{\large\mdseries LIST OF TABLES}
\listoftables*
\addtocontents{lot}{\protect\lotheader}
\endLOTtrue
\newpage
\addcontentsline{toc}{part}{\large\mdseries ABSTRACT}
\newgeometry{top=48mm, bottom=25mm, left=30mm, right=25mm}
\begin{abstract}
\begin{center}
\begin{mySixteen}
\textbf{XXXXXXXXXXXXXXXXXX} \\
\vspace{1 cm}
\end{mySixteen}
\begin{large}
By\\
\textbf{TTTTTTTT}\\
\end{large}
\end{center}
\vspace{1 cm}
%{\setlength{\baselineskip}
%{1\baselineskip}
%\emph{
Various techniques....
\end{abstract}
%\doublespacing
\newpage
\pagenumbering{arabic} \setcounter{page}{1}
\newgeometry{top=23mm, bottom=25mm, left=30mm, right=25mm}
\DoubleSpacing
\chapter{Introduction}
\label{Introduction}
\section{Introduction}
The mental disorders such
\chapter{Literature Reviews}
\label{Literature Reviews}
\section{Introduction}
IoT systems are

\subsection{IoT systems for Healthcare}
this is a subsection
%\begin{singlespace}
\SingleSpacing
\setlength{\bibsep}{\baselineskip}
\newpage
\setlength{\afterchapskip}{30pt}
\bibliography{Thesis}
\bibliographystyle{ieeetr}
\newpage
\addcontentsline{toc}{chapter}{\mySixteen\bfseries Abstract in Arabic Language}
\end{document}
Osama
  • 11

1 Answers1

1

I presume what you mean by subsection is not working is that it is not being numbered? This is the default behaviour of the memoir class.

To enable numbering of subsection use

\setsecnumdepth{subsection}

To enable this numbering to appear in the table of contents use

\maxtocdepth{subsection}

As for \usepackage{arabtex}, I am unsure what you mean by 'things are messed up'?

Milo
  • 9,440
  • Many thanks for your help with the subsection. – Osama Apr 19 '18 at 09:31
  • what I meany with "things are missed up" is that when I load the {arabtex} package, I start getting many errors. You can try it in the above example. – Osama Apr 19 '18 at 09:34