Page LayoutChapter in the head of the page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Chapter in the head of the page

Post by gmedina »

Hmmm... that's strange: I just did a test with your code and everything went OK for me. Please add this line:

Code: Select all

\listfiles
to your code, just before the \documentclass{...} line, process the document until the message error appears and then please post here as an attachment the .log file obtained.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

QwareeqMathematics
Posts: 68
Joined: Mon Jul 06, 2009 7:44 pm

Re: Chapter in the head of the page

Post by QwareeqMathematics »

Hi ;

Here is my log file , after I get the error.
Attachments
Thesisi.log
(9.6 KiB) Downloaded 232 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Chapter in the head of the page

Post by gmedina »

Hi,

the .log file that you attached does not corresponds to the code you posted before... I cannot provide effective help if you post some test code and then post the resulting log file corresponding to a different code.

Please, report if with the exact code that you posted before you get error messages; if this is so, please post the log file obtained with that precise file. In other case, please post here the the relevant parts of the exact code that gives you errors as well as its corresponding log file.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
QwareeqMathematics
Posts: 68
Joined: Mon Jul 06, 2009 7:44 pm

Re: Chapter in the head of the page

Post by QwareeqMathematics »

Could u tell me how to save the log file for the error .

Since , I generate the file , and I opened the folder that contains the tex file , and I found this file.

I have Winedt

Thank you for your patient.
QwareeqMathematics
Posts: 68
Joined: Mon Jul 06, 2009 7:44 pm

Re: Chapter in the head of the page

Post by QwareeqMathematics »

I copy the code to another new page and I ran the program for it.
Attachments
12.log
(8.85 KiB) Downloaded 230 times
QwareeqMathematics
Posts: 68
Joined: Mon Jul 06, 2009 7:44 pm

Re: Chapter in the head of the page

Post by QwareeqMathematics »

I put the tex file in new folder and I save the log after generating it.
Attachments
aa.log
(9.35 KiB) Downloaded 236 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Chapter in the head of the page

Post by gmedina »

Hi again,

well, as I said before, your test code compiles with no problems in my system. And looking at the log files that you attached, I see a problem with the ToC, but don't know exactly what's going on...

Try compiling this simple document:

Code: Select all

\documentclass{report}

\begin{document}
\tableofcontents

\chapter*{Test chapter one}
\addcontentsline{toc}{chapter}{Test chapter one}
\addtocontents{toc}{\addvspace{-10pt}}
\chapter*{Test chapter two}
\addcontentsline{toc}{chapter}{Test chapter two}
\addtocontents{toc}{\addvspace{-10pt}}
\chapter*{Test chapter three}
\addcontentsline{toc}{chapter}{Test chapter three}
\addtocontents{toc}{\addvspace{-10pt}}

\end{document}
and please report the outcome (did it compile OK or there were any trouble(s), and if so, which one(s)?)
1,1,2,3,5,8,13,21,34,55,89,144,233,...
QwareeqMathematics
Posts: 68
Joined: Mon Jul 06, 2009 7:44 pm

Chapter in the head of the page

Post by QwareeqMathematics »

It's O.k., and no problem in that .

But, Yesterday I tried to add page by page to a new file and I compiled in each time. The problem came out when I add abstract page .

I tried this also for the simple document u wrote dude, and It gave me the same error.

Here it's the code with Abstract Page :

Code: Select all

\documentclass{report}

\begin{document}
\begin{center}
\Large\textsc{Title of the thesis.....}\\
\normalsize
\vspace{1.4cm}
\textbf{Author \\ \vspace{0.3cm} ********}\\
\vspace{1cm}
\textbf{Supervisor \\ \vspace{0.3cm} Professor *******}\\
\vspace{1.6cm}
\normalsize
\textbf{\large{ABSTRACT}}
\addcontentsline{toc}{chapter}{Abstract}
\addtocontents{toc}{\addvspace{-10pt}}
\end{center}
In this thesis...........etc

\newpage
\pagenumbering{roman}
\setcounter{page}{7}
\tableofcontents

\addcontentsline{toc}{chapter}{Contents}
\addtocontents{toc}{\addvspace{-10pt}}
\newpage

\chapter*{Test chapter one}
\addcontentsline{toc}{chapter}{Test chapter one}
\addtocontents{toc}{\addvspace{-10pt}}
\chapter*{Test chapter two}
\addcontentsline{toc}{chapter}{Test chapter two}
\addtocontents{toc}{\addvspace{-10pt}}
\chapter*{Test chapter three}
\addcontentsline{toc}{chapter}{Test chapter three}
\addtocontents{toc}{\addvspace{-10pt}}

\end{document} 
I hope that could tell u where is the problem ?

Thank you :)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Chapter in the head of the page

Post by gmedina »

Aha!... with that last code you posted, I could effectively spot the problem. The culprits are these two lines

Code: Select all

\addcontentsline{toc}{chapter}{Abstract}
\addtocontents{toc}{\addvspace{10pt}}
inside the center environment. Take those two lines out of the center environment, delete some auxiliary files[1], and there should be no more problems.

[1] If your tex file is called test.tex, then delete the auxiliary files test.aux and test.toc (those files lie in the same directory that contains test.tex).
QwareeqMathematics
Posts: 68
Joined: Mon Jul 06, 2009 7:44 pm

Re: Chapter in the head of the page

Post by QwareeqMathematics »

No problem any more.

But , I wonder why I should take them out of center environment.??

Thank you gentle man . :)
Post Reply