# omit pages from counting them in TOC

i would like to uncount some pages in my document(not count them in page numbering), like parts pages and List of tables, figures... thanks

    \documentclass[french,12pt,oneside,openright]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[a4paper]{geometry}
\usepackage[french]{babel} %langue francaise
\usepackage{lipsum} %paragraphes prédéfinis
%\usepackage{fancyhdr} %decoration des en tetes
\usepackage[sonny]{fncychap}
\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
\usepackage{multirow,array}

\begin{document}
\tableofcontents*
\part{hello}
\lipsum
\part{Hello}
\part{HellO}
\end{document}


Even if the page number will be omitted from LOC, also i have a problem with the heading, it is mentionned (Table des matières )(LOC in french) i haven't typed anything like chapter or like that.

• We would like to see a MWE to start with... – user31729 Jun 2 '15 at 16:28
• There is always \addtocounter{page}{-1} or \setcounter{page}{1}, for example. – John Kormylo Jun 2 '15 at 18:23
• Do you have any idea why i am having the TOC title in the heading of my first part? – Hamza.w Jun 2 '15 at 19:07

As John Kormylo stated, you can use counters to adjust the page numbers in your document. The TOC title is showing in the heading of the first part because the default headers for the memoir class show the chapter title in the heading. This can be disabled with \pagestyle{plain} and turned back on later in the document if you want with \pagestyle{headings}. The \part{} sections of your document can be re-defined to a \pagestyle{empty} to remove the page numbers from them. You can also redefine part in the TOC to omit the page numbers there using the titletoc package. Here is a MWE:

\documentclass[french,12pt,oneside,openright]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[a4paper]{geometry}
\usepackage[french]{babel} %langue francaise
\usepackage{lipsum} %paragraphes prédéfinis
%\usepackage{fancyhdr} %decoration des en tetes
\usepackage[sonny]{fncychap}
\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
\usepackage{multirow,array}

% Part text styling in TOC example
\titlecontents{part}[0cm]
{}
{}
{}

\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\makeatother

\begin{document}

\tableofcontents*
\pagestyle{plain}

\part{Hello 1}
\chapter{Test Chapter 1}
\lipsum[1]

\part{Hello 2}