I am using Report class for my thesis and want to remove white space before nomenclature heading. I am successful in generating a PDF preview from LyX but when I import the file as LaTeX plain however the .tex file does not print out the nomenclature section. I do not know why this happens. I use tocloft package to control the spacing for Table of Contents, List of Figures and titles but I am not familiar with the command for the nomenclature section. I have changed the name of the nomenclature to List of Abbreviations. I have attached the output from the LyX file below.
% Preview source code
%% LyX 2.1.4 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,english]{report}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=30mm,bmargin=22mm,lmargin=20mm,rmargin=30mm,headheight=3mm,headsep=12mm,footskip=10mm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{nomencl}
% the following is useful when we have the old nomencl.sty package
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\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}}
\makeatother
\usepackage{babel}
\begin{document}
\tableofcontents{}\settowidth{\nomlabelwidth}{X-Y}
\printnomenclature{}\nomenclature{X-Y}{XY}
\end{document}

.texin a different editor? – Werner Dec 25 '16 at 16:52