Question related to header
up vote
2
down vote
favorite
I'm using the following codes
documentclass[12pt,a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[L,R]{bfseriesthepage}% Left Even, Right Odd
fancyhead[L]{bfseriesrightmark} % Left Odd
fancyhead[R]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
rhead{textbf{thepage}} %{textsl{rightmark}}
lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
After compilation, I get
and
I want to renverse the order between the name of chapter and the number in page 3. like the following
header-footer
add a comment |
up vote
2
down vote
favorite
I'm using the following codes
documentclass[12pt,a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[L,R]{bfseriesthepage}% Left Even, Right Odd
fancyhead[L]{bfseriesrightmark} % Left Odd
fancyhead[R]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
rhead{textbf{thepage}} %{textsl{rightmark}}
lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
After compilation, I get
and
I want to renverse the order between the name of chapter and the number in page 3. like the following
header-footer
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm using the following codes
documentclass[12pt,a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[L,R]{bfseriesthepage}% Left Even, Right Odd
fancyhead[L]{bfseriesrightmark} % Left Odd
fancyhead[R]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
rhead{textbf{thepage}} %{textsl{rightmark}}
lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
After compilation, I get
and
I want to renverse the order between the name of chapter and the number in page 3. like the following
header-footer
I'm using the following codes
documentclass[12pt,a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[L,R]{bfseriesthepage}% Left Even, Right Odd
fancyhead[L]{bfseriesrightmark} % Left Odd
fancyhead[R]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
rhead{textbf{thepage}} %{textsl{rightmark}}
lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
After compilation, I get
and
I want to renverse the order between the name of chapter and the number in page 3. like the following
header-footer
header-footer
edited Dec 3 at 18:50
Kurt
34.6k846157
34.6k846157
asked Dec 3 at 17:18
Student
34419
34419
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You need to change your definitions for fancyhdr
:
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
and comment the wrong commands:
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
and do not forget to add class option twoside
to report
.
With the following MWE
documentclass[%
12pt,a4paper,
twoside
]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
you get page 2
and page 3
Please see that usually the page number is on the outer side, the chapter name at the inner side like:
odd side: chapter name page number
even side: page number chaptername
Thank you very much for your help.
– Student
Dec 3 at 19:01
If I addrenewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I uselhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.
– Student
Dec 4 at 6:36
@Student If I addtableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your usedchapter{INTRODUCTION}
tochapter{Introduction}
I get the wished result ...
– Kurt
Dec 4 at 12:46
Please addbegin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.
– Student
Dec 4 at 20:00
@Student I see. Change the definitions forfancyhdr
tofancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
andfancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...
– Kurt
Dec 5 at 1:42
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You need to change your definitions for fancyhdr
:
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
and comment the wrong commands:
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
and do not forget to add class option twoside
to report
.
With the following MWE
documentclass[%
12pt,a4paper,
twoside
]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
you get page 2
and page 3
Please see that usually the page number is on the outer side, the chapter name at the inner side like:
odd side: chapter name page number
even side: page number chaptername
Thank you very much for your help.
– Student
Dec 3 at 19:01
If I addrenewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I uselhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.
– Student
Dec 4 at 6:36
@Student If I addtableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your usedchapter{INTRODUCTION}
tochapter{Introduction}
I get the wished result ...
– Kurt
Dec 4 at 12:46
Please addbegin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.
– Student
Dec 4 at 20:00
@Student I see. Change the definitions forfancyhdr
tofancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
andfancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...
– Kurt
Dec 5 at 1:42
add a comment |
up vote
2
down vote
accepted
You need to change your definitions for fancyhdr
:
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
and comment the wrong commands:
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
and do not forget to add class option twoside
to report
.
With the following MWE
documentclass[%
12pt,a4paper,
twoside
]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
you get page 2
and page 3
Please see that usually the page number is on the outer side, the chapter name at the inner side like:
odd side: chapter name page number
even side: page number chaptername
Thank you very much for your help.
– Student
Dec 3 at 19:01
If I addrenewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I uselhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.
– Student
Dec 4 at 6:36
@Student If I addtableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your usedchapter{INTRODUCTION}
tochapter{Introduction}
I get the wished result ...
– Kurt
Dec 4 at 12:46
Please addbegin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.
– Student
Dec 4 at 20:00
@Student I see. Change the definitions forfancyhdr
tofancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
andfancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...
– Kurt
Dec 5 at 1:42
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You need to change your definitions for fancyhdr
:
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
and comment the wrong commands:
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
and do not forget to add class option twoside
to report
.
With the following MWE
documentclass[%
12pt,a4paper,
twoside
]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
you get page 2
and page 3
Please see that usually the page number is on the outer side, the chapter name at the inner side like:
odd side: chapter name page number
even side: page number chaptername
You need to change your definitions for fancyhdr
:
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
and comment the wrong commands:
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
and do not forget to add class option twoside
to report
.
With the following MWE
documentclass[%
12pt,a4paper,
twoside
]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------math---------------------------------------
usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
usepackage{mathtools, nccmath} % new extention de amsmath
%---------------------divers---------------------------------------
usepackage{pifont} %ding
usepackage{fancybox} %pour faire l'encadrement
usepackage{graphicx}
usepackage{color}
usepackage[final]{pdfpages}
usepackage{url}
%usepackage[notref,notcite]{showkeys}
usepackage{fancyvrb}
VerbatimFootnotes % allows verbatim text in footnotes
%-------------------------hyperref------------------------------
usepackage{setspace}
%usepackage[colorlinks=true,pagebackref=true]{hyperref}
%usepackage[colorlinks=true]{hyperref}
%hypersetup{urlcolor=blue, citecolor=red , linkcolor= blue}
%------------
%--------------------------accent-------------------------
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
%---------------------------------------------------------
%-------réduire le mot reference----------
usepackage{etoolbox}
patchcmd{thebibliography}{section}{subsection}{}{}
%------
%------minimiser l'espace entre les reference----
makeatletter
g@addto@macro@openbib@code{setlength{itemsep}{0pt}}
makeatother
%-----------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Style des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------------------
usepackage{sectsty}
allsectionsfont{sffamily}
%---- Dimensions des marges --------------------
usepackage{geometry}
geometry{left=3cm,right=2cm,top=2.5cm,bottom=2cm}
usepackage{setspace}
onehalfspacing
%---------------------écriture foncé-----------
%usepackage{mathptmx} % pour avoir une écriture bien foncée
%usepackage{helvet}
%----------------------------------------------
%-----------------------------------------------------------
newtheorem{theorem}{Theorem}[section]
newtheorem{definition}{Definition}[section]
newtheorem{definitions}{Definitions}[section]
newtheorem{notation}{Notation}[section]
newtheorem{corollary}{Corollary}[section]
newtheorem{proposition}{Proposition}[section]
newtheorem{lemma}{Lemma}[section]
newtheorem{remark}{Remark}[section]
newtheorem{example}{Example}[section]
newtheorem{examples}{Examples}[section]
numberwithin{equation}{section}
%-----------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
renewcommand{qedsymbol}{$blacksquare$}
letorigproofnameproofname
renewcommand{proofname}{upshapebfseriesorigproofname}
newenvironment{dem}{{noindent {bf Sketch of Proof.}}}{hfill {rule{2mm}{2mm}}}
newenvironment{pr}{{noindent {bf Second Proof of}}}{hfill {rule{3mm}{3mm}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------head and foot--------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
renewcommand{chaptermark}[1]{markboth{#1}{}}
renewcommand{sectionmark}[1]{markright{thesection #1}}
fancyhf{} % supprime les en-têtes et pieds pr'ed'efinis
fancyhead[EL,OR]{bfseriesthepage}% Left Even, Right Odd
fancyhead[OL]{bfseriesleftmark} % Left Odd rightmark
fancyhead[ER]{bfseriesleftmark} % Right Even
fancyfoot[LE,RO]{textbf{ }} %ici ecrire cooperate
renewcommand{headrulewidth}{1.pt}% filet en haut de page
renewcommand{footrulewidth}{0.pt}% filet en bas de page
newcommand{clearemptydoublepage}{%
newpage{pagestyle{plain}cleardoublepage}}
%rhead{textbf{thepage}} %{textsl{rightmark}}
%lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
%lfoot{footnotesize{textbf{}}} % titre de la these
setlength{headheight}{14.5pt}
%-------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%-------Chapter style-------------------------------------------------
usepackage{titlesec}
usepackage{tabularx}
titleformat{chapter}[display]{filcenterHugescshapebfseries}{begin{tabularx}{textwidth}{@{}XcX@{}}titlerule[5pt]& largemdseriesraisebox{-1.05ex}{chapternameenspacearabic{chapter}} & titlerule[5pt]end{tabularx}}{-1ex}{hrulevspace{1ex} }[vspace{0.75ex}endgrafhrule]
titlespacing*{chapter}{0pt}{-8ex}{20ex}
titleformat{name=chapter, numberless}[display]{filcenterHugebfseries}%
{titlerule[5pt]}{-2.2ex}{hrulevspace{1.5ex}}[vspace{0.75ex}endgrafhrule]
%-----------This chapter contains--------------
usepackage{etoc}
usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------
%pagestyle{plain} % les numérotations en pieds de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
chapter{INTRODUCTION}
newpage
Let us
newpage
Let us
end{document}
you get page 2
and page 3
Please see that usually the page number is on the outer side, the chapter name at the inner side like:
odd side: chapter name page number
even side: page number chaptername
answered Dec 3 at 17:48
Kurt
34.6k846157
34.6k846157
Thank you very much for your help.
– Student
Dec 3 at 19:01
If I addrenewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I uselhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.
– Student
Dec 4 at 6:36
@Student If I addtableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your usedchapter{INTRODUCTION}
tochapter{Introduction}
I get the wished result ...
– Kurt
Dec 4 at 12:46
Please addbegin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.
– Student
Dec 4 at 20:00
@Student I see. Change the definitions forfancyhdr
tofancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
andfancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...
– Kurt
Dec 5 at 1:42
add a comment |
Thank you very much for your help.
– Student
Dec 3 at 19:01
If I addrenewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I uselhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.
– Student
Dec 4 at 6:36
@Student If I addtableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your usedchapter{INTRODUCTION}
tochapter{Introduction}
I get the wished result ...
– Kurt
Dec 4 at 12:46
Please addbegin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.
– Student
Dec 4 at 20:00
@Student I see. Change the definitions forfancyhdr
tofancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
andfancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...
– Kurt
Dec 5 at 1:42
Thank you very much for your help.
– Student
Dec 3 at 19:01
Thank you very much for your help.
– Student
Dec 3 at 19:01
If I add
renewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I use lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.– Student
Dec 4 at 6:36
If I add
renewcommand{contentsname}{Table of Contents} tableofcontents
Afer compilation I get the word ''TABLE OF CONTENTS'' in uppercase letters. However I like to appear with lowercase letters. In my previous codes I use lhead{textsl{nouppercase{leftmark}}}%{textbf{thepage}}
. However you ask me to delete it. How can do? Thanks a lot.– Student
Dec 4 at 6:36
@Student If I add
tableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your used chapter{INTRODUCTION}
to chapter{Introduction}
I get the wished result ...– Kurt
Dec 4 at 12:46
@Student If I add
tableofcontents
to the MWE I get the heading "Contents" in the pdf file. If I change your used chapter{INTRODUCTION}
to chapter{Introduction}
I get the wished result ...– Kurt
Dec 4 at 12:46
Please add
begin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.– Student
Dec 4 at 20:00
Please add
begin{thebibliography}{999} bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} newpage bibitem{axlupol}{O. Axelsson, H. Lu, B. Polman,} end{thebibliography}
And you will see that the word ''BIBLIOGRAPHY'' in the header is in uppercase letters. However I like to appear with lowercase letters.– Student
Dec 4 at 20:00
@Student I see. Change the definitions for
fancyhdr
to fancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
and fancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...– Kurt
Dec 5 at 1:42
@Student I see. Change the definitions for
fancyhdr
to fancyhead[OL]{textbf{nouppercase{leftmark}}} % Left Odd rightmark
and fancyhead[ER]{textbf{nouppercase{leftmark}}} % Right Even
...– Kurt
Dec 5 at 1:42
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463009%2fquestion-related-to-header%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown