\usepackage{pdfpages}
\usepackage[
  inner=2.4cm,
  outer=2.5cm,
  top=2.5cm,
  bottom=2.5cm,
  paperwidth=15.5cm,
  paperheight=22.5cm,
  headheight=0.70cm]{geometry}
\usepackage{xltxtra}
\usepackage{fontspec}
\usepackage{fancyhdr}
\usepackage[final]{microtype}


% Use Malayalam Hyphenation with Polyglossia
\usepackage{polyglossia}
\setdefaultlanguage{malayalam}
\setotherlanguage{english}
\setmainfont[Script=Malayalam,HyphenChar="200C]{Rachana}
%\setmainfont[Script=Malayalam,HyphenChar="200C,AutoFakeBold=1.5,AutoFakeSlant=0.2]{Rachana}
\newfontfamily\malayalamfonttt{PT Sans Narrow} %Suppress error with \url fixed width fonts
\newfontfamily\englishfont{URW Palladio L}
\newfontfamily\email{PT Sans Narrow}

\usepackage{framed}
%\definecolor{shadecolor}{rgb}{0}
\usepackage[hyphens]{url}
\usepackage{graphicx}

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\linespread{1.1} %line spacing
\widowpenalty=10000
\clubpenalty=10000
\raggedbottom
\sloppy


\newcommand{\secstar}[1]{\thispagestyle{empty}\clearpage\phantomsection\section*{\addcontentsline{toc}{section}{#1}\centering #1}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-1ex \@plus 0.1ex \@minus 0.1ex}%
                                     {0ex \@plus .1ex}%
                                     {\normalfont\large\bfseries}}

%\renewcommand{\chaptermark}[1]{\marknone{#1}{}}
%\newcommand{\newchapter}[1]{\thispagestyle{empty}\chapter*{\addcontentsline{toc}{chapter}{#1} #1}}

\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\bfseries\filright}
{\hspace*{5em}\LARGE\thechapter}
{1ex}
{\titlerule[0pt]
\vspace{0ex}%
\hspace*{4em}\LARGE}
[\vspace{0ex}%
{\titlerule[0pt]}]


%% Define a new 'leo' style for the package that will use a smaller font.
\makeatletter
\def\url@leostyle{%
  \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\makeatother
%% Now actually use the newly defined style.
\urlstyle{leo}

%% Adjust vertical space before a paragraph
%\makeatletter
%\renewcommand{\paragraph}{%
%  \@startsection{paragraph}{4}%
%  {\z@}{5.5ex \@plus 1ex \@minus .2ex}{-1em}%
%  {\normalfont\normalsize\bfseries}%
%}
%\makeatother

%% No page header for ToC
\makeatletter
\renewcommand\tableofcontents{%
  \section*{\contentsname}% or \chapter* but that looks ugly
  \pagestyle{empty}%
  \enlargethispage*{2\baselineskip}
  \@starttoc{toc}}
\makeatother

%% No Appendix number
\makeatletter
\renewcommand\appendix{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{}}
\makeatother

\usepackage{enumitem}	% to adjust item list linespacing
