I am using report class in Lyx for my thesis. I want centered footer and no header for the pages before Chapter 1 ie. on pages which include abstract, acknowledgements, table of contents, list of tables and list of figures. I currently use fancy header package to write headers/footers but this writes same footer and header starting from the title page. I have the following code in the preamble of my Lyx document.
\AtBeginDocument{\newgeometry{hmargin=4cm}}
\raggedbottom
\pagenumbering{roman}
\geometry{textheight=245mm, textwidth=160mm, footskip=10mm}
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Huge\bfseries}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\Huge\bfseries}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\Huge\bfseries}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\setlength\cftbeforetoctitleskip{-7mm}
\setlength\cftbeforeloftitleskip{-25mm}
\setlength\cftbeforelottitleskip{-4mm}
\setlength\cftaftertoctitleskip{0mm}
\setlength\cftafterloftitleskip{0mm}
\setlength\cftafterlottitleskip{0mm}
\renewcommand\nomname{List of Abbreviations}
\renewcommand{\nomname}{\makebox[\linewidth]{List of Abbreviations}}
\renewcommand\cftchapfont{\fontsize{16}{18}\selectfont}
\setlength{\cftbeforechapskip}{-8pt}
\setlength{\cftbeforesecskip}{-12pt}
\renewcommand\cftsecfont{\fontsize{14}{16}\selectfont}
\setlength{\cftbeforesecskip}{-12pt}
\renewcommand\cftsubsecfont{\fontsize{8}{12}\selectfont}
\setlength{\cftbeforesubsecskip}{-12pt}
\renewcommand\cftsubsubsecfont{\fontsize{8}{12}\selectfont}
\setlength{\cftbeforesubsubsecskip}{-12pt}
\renewcommand{\cftsecfont}{\fontseries{md}\fontsize{14}{16}\selectfont}
\renewcommand{\cftsubsecfont}{\fontseries{md}\fontsize{12}{14}\selectfont}
\renewcommand{\cftsubsubsecfont}{\fontseries{md}\fontsize{10}{12}\selectfont}
\renewcommand{\cftsecpagefont}{\fontseries{md}\fontsize{14}{16}\selectfont}
\renewcommand{\cftsubsecpagefont}{\fontseries{md}\fontsize{12}{14}\selectfont}
\renewcommand{\cftsubsubsecpagefont}{\fontseries{md}\fontsize{10}{12}\selectfont}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\normalfont\LARGE\bfseries}{\chaptertitlename\ \thechapter}{15mm}{\LARGE}
\titlespacing*{\chapter}{0mm}{50mm}{15mm}
\titlespacing*{\section}{0pt}{15mm}{15mm}
\titlespacing*{\subsection}{0pt}{15mm}{15mm}
\titlespacing*{\subsubsection}{0pt}{10mm}{10mm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE]{\thepage}
\fancyhead[RE]{Chapter\space{\thechapter,\space\space}Section\space{\thesection}}
\fancyhead[RO]{\thepage}
\fancyhead[LO]{\nouppercase\rightmark}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}}
Best Answer
I did something similar recently. I didn't define the headers and footers in the preamble, but instead went to Document settings > Modules and enabled "Custom Header/Footerlines". This adds 6 new layouts in the drowdown menu (see picture).
With this and a few TeX boxes, you can achieve what you want. I'm not sure how to best show it here - maybe just copy this code to an editor, save it as a
.lyx
file, and open it in LyX. I tried to explain everything in there:The result looks like this: