% !TeX program = XeLaTeX
% !TeX root = shloka.tex
\usepackage{shloka}
\usepackage{wallpaper}

%%% PAGE SIZE and MARGINS %%%
\setmainfont[Script=Devanagari]{Sanskrit 2003}

%%% HEADERS and FOOTERS %%%
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\setlength{\headheight}{28pt}
\lhead[\fancyplain{}{\pagenumfont\large\thepage}]
   {\fancyplain{}{\leftmark}}
\rhead[\fancyplain{}{\leftmark}]
   {\fancyplain{}{\pagenumfont\large\thepage}}
\cfoot{}

\fancypagestyle{fancyplain}{ %
\fancyhf{} % remove everything
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
\cfoot{\pagenumfont\large\thepage}}

%%% SECTIONS and CHAPTERS %%% HRP commented section on 12 Dec 2014
\makeatletter
%\renewcommand\section{\resetShloka\@startsection {section}{1}{\z@}%
%%{2.3ex \@plus.2ex}%
%%{-3.5ex \@plus -1ex \@minus -.2ex}%
%%{2.3ex \@plus.2ex}%
%{10pt}
%{2pt}
%{\normalfont\LARGE\bfseries}}

%\renewcommand\chapter{\resetShloka\@startsection {chapter}{1}{\z@}%
%{10pt}
%{2pt}
%{\normalfont\LARGE\bfseries}}
\makeatother

\setcounter{secnumdepth}{-1}
%for weird reasons this does not bookmark the section start, but the start of text in the section!!!
%\renewcommand\thesection{}
\renewcommand{\sectionmark}[1]{%
\markboth{\large #1}{}}
\renewcommand{\subsectionmark}[1]{%
\markboth{\large #1}{}}
%\renewcommand{\chaptermark}[1]{%
%\markboth{\large #1}{}}

\addtolength{\parskip}{4pt}
%\addtolength{\headsep}{10pt}
\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{30pt}

%%% HYPERLINKS %%% %http://en.wikibooks.org/wiki/LaTeX/Hyperlinks
\usepackage[a5paper,bookmarks=true,bookmarksopen=true,xetex,colorlinks=true,
linkcolor=black,					% colour of internal links
citecolor=cyan,					% colour of links to bibliography
filecolor=magenta,			% colour of file links
urlcolor=black					% colour of external links
]{hyperref}

%%% MISCELLANEOUS %%%
\hbadness=10000
\vbadness=10000
%\listfiles