1

I want to add the chapter number into the chapter name.

To have something like that

I used these commands to remove the word chapter and the number :

\renewcommand\printchaptername{\chapnamefont} 
\renewcommand\printchapternum{\chapnumfont}

[EDIT] Here is the complete code :

\documentclass[11pt,a4paper,oldfontcommands]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage[dvips]{graphicx}
\usepackage{xcolor}
\usepackage{times}

\usepackage[frenchb]{babel} %français

\usepackage[
breaklinks=true,colorlinks=true,
%linkcolor=blue,urlcolor=blue,citecolor=blue,% PDF VIEW
linkcolor=black,urlcolor=black,citecolor=black,% PRINT
bookmarks=true,bookmarksopenlevel=2]{hyperref}

\usepackage{geometry}
% PDF VIEW
% \geometry{total={210mm,297mm},
% left=25mm,right=25mm,%
% bindingoffset=0mm, top=25mm,bottom=25mm}
% PRINT
\geometry{total={210mm,297mm},
left=20mm,right=20mm,
bindingoffset=10mm, top=25mm,bottom=25mm}

\OnehalfSpacing
%\linespread{1.3}

%%% CHAPTER'S STYLE
\chapterstyle{bianchi}

%%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS


\renewcommand\printchaptername{\chapnamefont}
\renewcommand\printchapternum{\chapnumfont}

%%% STYLE OF PAGES NUMBERING
%\pagestyle{companion}\nouppercaseheads 
%\pagestyle{headings}
%\pagestyle{Ruled}
\pagestyle{plain}
\makepagestyle{plain}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}
% Possibilité de choisir ou se trouve le numéro de page, sur les pages pairs et impairs
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}


\maxsecnumdepth{subsection} % chapters, sections, and subsections are numbered
\maxtocdepth{subsection} % chapters, sections, and subsections are in the Table of Contents


%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\usepackage[nosectionbib]{apacite}
\begin{document}

%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%   TITLEPAGE
%
%   due to variety of titlepage schemes it is probably better to make titlepage manually
%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\thispagestyle{empty}

{%%%
\sffamily
\centering
\large

~\vspace{\fill}

{\huge 
 \textbf{Thesis title: may be long or short}
}

\vspace{2.5cm}

{\Large
Mathieu
}

\vspace{3.5cm}
\textit{
Mémoire présenté pour l'obtention du titre de \\
\emph{blablablabalbalbalab}} \\
~\\
Universitéy liege \\
Faculté des sciences\\
Département


\vspace{3.5cm}

Promoteur: Prof. Joe Doe\\

Lecteurs : ...

\vspace{\fill}

Année académique 20XX - 20XX

%%%
}%%%

\cleardoublepage
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%

\tableofcontents*

\clearpage

%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%

\chapter{Introduction}

\section{First section}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Citation of Einstein paper~\cite{Alshehhi2017}.

\section{Second section}
Lorem ipsum.

Lorem ipsum.

\subsection{First subsection}

Lorem ipsum.

\subsection{Second subsection}

Lorem ipsum.

\chapter{Results}

\section{Third section}
Lorem ipsum.

\section{Fourth section}
Lorem ipsum.

\bibliographystyle{apacite}
\bibliography{sample}

\appendix

\chapter{Annexes}*
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod.


\end{document}

Thanks

1

It would have helped if you had given a complete MWE from \documentclass... to \end{document}. It looks as though you might have used the bianchi chapterstyle provided by memoir for your first example. The memoir class provides the verville chapterstyle which is close to your desired example (but without any colouring); read Chapter 6 Document divisions in the manual (> texdoc memoir). Check the code in memoir.cls (which will be on your computer somewhere --- try > kpsewich memoir.cls to find out where) for the coding for the definition of the verville style. If you don't like it create your own.

| improve this answer | |
0

The following short modifications should suffice:

enter image description here

\documentclass{memoir}

\usepackage{lipsum}

\chapterstyle{bianchi}

\renewcommand{\printchaptername}[3]{\printchapternonum}
\renewcommand*{\printchaptertitle}[1]{%
  \hrule\vskip\onelineskip \centering \chaptitlefont\textbf{\thechapter\quad#1}\par}

\maxsecnumdepth{subsection} % chapters, sections, and subsections are numbered
\maxtocdepth{subsection} % chapters, sections, and subsections are in the Table of Contents

\begin{document}

\tableofcontents*

\chapter{Introduction}

\section{First section}\lipsum[1]
\section{Second section}\lipsum[2]
\subsection{First subsection}\lipsum[3]
\subsection{Second subsection}\lipsum[4]

\chapter{Results}
\section{Third section}\lipsum[5]
\section{Fourth section}\lipsum[6]

\appendix

\chapter*{Annexes}
\lipsum[5-10]

\end{document}

The idea is to make \printchaptername be equivalent to \printchapternonum which is called by \chapter*; the redefinition gobbles 3 arguments that follow \printchaptername in the definition of the bianchi chapter style and just calls \printchapternonum. Additionally, we change \printchaptertitle to include \thechapter\quad before printing the actual title.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.