I am writing my thesis work using Lyx. Could anyone please help me with the code for positioning a ruler below the chapter title? The code I have doesn't display any ruler below the chapter title.
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
\setheight{\headrule}{15pt}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\textit{\nouppercase{\leftmark}}}
\fancyhead[LO]{\textit{\nouppercase{\rightmark}}}
\fancypagestyle{plain}{ %
\fancyhf{} % remove everything
\renewcommand{\headrulewidth}{2.5pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}}
titlesecpackage, which shows several example usages. – guillem Jan 08 '13 at 14:51