# Nomenclature groups in different pages

I wish I could have the groups inside nomenclature in different pages each and their titles centered. So far I tried the following MWE:

\documentclass[10pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{etoolbox}
\usepackage{nomencl}
\makenomenclature

\renewcommand\nomgroup[1]{%
\item[\centering\normalsize\bfseries
\ifstrequal{#1}{A}{%
\MakeUppercase{List of Abbreviations and Acronyms}%
}{%
\ifstrequal{#1}{S}{\MakeUppercase{List of Symbols}}{}}%
]\thispagestyle{empty}}

\renewcommand{\nomname}{}

\begin{document}
\nomenclature[A]{H2O}{Water}
\nomenclature[A]{CO2}{Chemical 1}
\nomenclature[A]{CO}{Chemical 2}
\nomenclature[A]{HC}{Chemical 3}
\nomenclature[A]{kWp}{kilowatt-peak}
\nomenclature[S]{EPE}{Research Electrical Company}

\printnomenclature[1cm]
\end{document}


I got this:

But I wish I have them in different pages and the titles centered like this:

The solution here seem to solve the different pages problem but it doesn't solve the title centered. Could anyone help me please?

The issue here is that command \nomgroup needs to be an \item to be printed in the nomenclature. Therefore your try with \centering (that is inside \item[] could not work.

A workaround is to use the following code (see both used \hfill outside the label definition of \item; important code marked with <======):

 \item[]% <=============================================================
{\hfil\normalsize\bfseries % <======================================
\ifstrequal{#1}{A}{%
\MakeUppercase{List of Abbreviations and Acronyms}%
}{%
\ifstrequal{#1}{S}{\MakeUppercase{List of Symbols}}{}%
}%
\hfil} % <==========================================================


Please see that this kind of centering is not really perfect because the length of the label is not included ... That is the reason I call it a workaround ...

With the following complete code

\documentclass[10pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{etoolbox}

\usepackage{showframe}% <============ to visualize text area and margins

\usepackage{nomencl}
\makenomenclature

\newif\iffirstglossary\firstglossarytrue
\renewcommand\nomgroup[1]{%
\iffirstglossary
\firstglossaryfalse
\else
\clearpage
\fi
\item[]% <=============================================================
{\hfil\normalsize\bfseries % <======================================
\ifstrequal{#1}{A}{%
\MakeUppercase{List of Abbreviations and Acronyms}%
}{%
\ifstrequal{#1}{S}{\MakeUppercase{List of Symbols}}{}%
}%
\hfil} % <==========================================================
%] % <==================================================================
\thispagestyle{empty}}

\renewcommand{\nomname}{}

\begin{document}

\nomenclature[A]{H2O}{Water}
\nomenclature[A]{CO2}{Chemical 1}
\nomenclature[A]{CO}{Chemical 2}
\nomenclature[A]{HC}{Chemical 3}
\nomenclature[A]{kWp}{kilowatt-peak}
\nomenclature[S]{EPE}{Research Electrical Company}

\printnomenclature[1cm]
\end{document}


you get the following result: