Hi everybody,
I was trying to layout something quite difficult (it seems!) in my headline... I can't find any solution...
Actually, I'm working in the class "article" and I want to have the name of the current part in my headlines like this :
Part 1 : Présentation of the software
----------------------------------------------------------------- (\hline)
PART 1 Presentation of the software
Text ...
How can I do that?
(it seems the LaTeX doesn't know the command \partmark in the documentclass "article", I read it was possible in the documentclass "book" for instance, I tried to do \newcommand, but it didn't work out, so... Last thing : LaTeX can put the number of the current part with the command \thepart, so that I think it should be possible to print the name of the part too...)
Thank you for your help and sorry for my possible language mistakes.
Page Layout ⇒ \partmark in class article?
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: \partmark in class article?
Hi,
how are you currently setting the headers for your document? Which package(s) do you use? A simple minimal and compilable document showing all the settings related to this problem could save valuable time.
how are you currently setting the headers for your document? Which package(s) do you use? A simple minimal and compilable document showing all the settings related to this problem could save valuable time.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
\partmark in class article?
I found something today which seems to be part of the solution...
I put that command :
Then, using the default package to do headlines and footlines, it worked using :
The only thing I want to do now is to draw a line under
\renewcommand{\@oddhead}{\itshape \leftmark \hfil}
like the lines you can draw using the package fancyhdr with the command \renewcommand{\headrulewidth}{0.2pt}.
I could try to use fancyhdr instead of the default package, but it doesn't work... I wrote :
but when there are some sections (if no, it works), it prints the name of the section instead of the part. I don't really understand why.
Actually I don't really understand what leftmark and rightmark do... In the first case, leftmark gives me the right thing I want, in the second one, it gives me something else. That's a little bit strange ^^'
Thank you for you help!
I put that command :
Code: Select all
\newcommand\partmark[1]{\markboth{\MakeUppercase{#1}}{}}
Code: Select all
\makeatletter
\newcommand{\ps@rapport}{
\renewcommand{\@evenhead}{}
\renewcommand{\@oddhead}{\itshape \leftmark \hfil}
\renewcommand{\@evenfoot}{\@oddfoot}
\renewcommand{\@oddfoot}{\hfil - \thepage\ - \hfil}
}
\makeatother
\pagestyle{rapport}
\renewcommand{\@oddhead}{\itshape \leftmark \hfil}
like the lines you can draw using the package fancyhdr with the command \renewcommand{\headrulewidth}{0.2pt}.
I could try to use fancyhdr instead of the default package, but it doesn't work... I wrote :
Code: Select all
\usepackage{fancyhdr}
\fancypagestyle{rapport}{
\renewcommand{\headrulewidth}{0.2pt}
\fancyhead[L]{\itshape \leftmark \hfil}
\fancyhead[R]{}
\fancyfoot[C]{- \thepage\ -}
}
\pagestyle{rapport}
Actually I don't really understand what leftmark and rightmark do... In the first case, leftmark gives me the right thing I want, in the second one, it gives me something else. That's a little bit strange ^^'
Thank you for you help!