I'm writting a report so I use the class 'report' and I would like to include several appendix. For this I use '\appendix'.
My problem is in the result that it gives me to the display at the level of the title of the appendix, for example:
A. Questionnaire.
And I will want to get to the display the title as follows:
Appendix A: Questionnaire
How can I do ?
EDIT
\documentclass[a4paper, 12pt]{report}
% \usepackage[utf8]{inputenc}
% \usepackage[T1]{fontenc}
\usepackage{graphicx}
%Pour les algorithmes
% \usepackage{algorithm}
% \usepackage{algorithmic}
\usepackage[inoutnumbered,ruled,french]{algorithm2e}
\usepackage[french]{babel}
\usepackage[table]{xcolor}
% Pour utiliser les accents
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{caption}
\usetikzlibrary{spy,calc}
\usepackage{float}
\usepackage{amsmath}
\newcommand{\R}{\mathbf{R}}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{url}
%pour les informations sur un document compile en pdf et les lien externes/internes
\usepackage{hyperref}
%pour la mise en page des tableaux
\usepackage{array}
\usepackage{tabularx}
%espacement entre les lignes
\usepackage{setspace}
\usepackage{tocloft}
\setlength\cftparskip{-2pt}
\setlength\cftbeforesecskip{-2pt}
\setlength\cftaftertoctitleskip{-2pt}
%police et mise en page du document
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm,]{geometry}
\usepackage{hyperref}
\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}{\normalfont\huge}{\textbf{\thechapter}}{14pt}{\huge\bf}
%\newpagestyle{mystyle}
%{\sethead[\thepage][][\sectiontitle]{}{}{\thepage}}
\usepackage{fancyhdr}
\usepackage{eurosym}
\usepackage{subfig}
% Bibliographie
\usepackage{cite}
\usepackage{multicol}
\usepackage{url}
\newcommand{\Sum}{\ensuremath{\displaystyle\sum}}
\usepackage{amsfonts} % blackboard math symbols
\usepackage{afterpage}
\begin{document}
\chapter{Intoduction}
blabla
\chapter{Experiences}
blabla
\chapter{Results}
blabla
\chapter{conclusion}
blabla
\appendix
\chapter{Questionnaire}
blabla
\chapter{Other Results}
\end{document}
Best Answer
You can obtain this easily with the
apptools
apckage, which defines the\IfAppendix
conditional.Unrelated: as a general rule, load
hyperref
as the last package (very few exceptions – most notablycleveref
) and the file options ofbabel
as options for the document class, so that all packages which depend on language be aware of the main language of the document. I also simplified the options of geometry: when all margins are equal, you amy just writemargin = ...
. Also, needless to loadarray
if you loadtabularx
: it loads it for you.