Text FormattingFirst chapter space has invisible header

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ErgoProxy
Posts: 6
Joined: Mon Oct 19, 2009 9:21 pm

First chapter space has invisible header

Post by ErgoProxy »

Dear Community,

I need help with the following: Top spacing 20mm. My section heading is lower about 30mm to fit in an invisible header. I need to make the first page of the new section without any headings and footnotes - it works but there are additional spacing above the section name.

Code: Select all


\documentclass[12pt, a4paper]{epr890}

\usepackage {fancyhdr, epsfig, amssymb, tabularx, amsmath, float, harvard}
\usepackage [left=30mm, right=25mm, top=20mm, bottom=20mm, includefoot, headheight=13.6pt]{geometry}

                    
\begin{document}

\pagestyle{fancy}

\renewcommand{\headrulewidth}{0.4pt}
\lhead{Chapter \thesection}
\chead{}
\rhead{\SectionTitle}


%-------------------------------------------------
% Start the introduction section
%-------------------------------------------------
\thispagestyle{empty}

\Section{Introduction}
\label{INTRODUCTION}

%-------------------------------------------------
%-------------------------------------------------
% Insert horizontal line
%-------------------------------------------------
\vskip -2em
\rule[0pt]{155mm}{0.4pt}
\vskip 1.0em
%-------------------------------------------------
\pagestyle{fancy}
\newpage
test
\end{document}
The first page - table of contents shows the header location and the second page the section layout.

For the class file to build - add the following to your .cls file

Code: Select all

\newcommand {\SectionTitle}

 \newcommand{\Section}[1]{\clearpage \refstepcounter{section}
  \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
  \renewcommand\SectionTitle{#1}
  \begin{flushright}
    \bfseries
    \@afterindentfalse
    \linespread{1}
    \MakeUppercase {CHAPTER \thesection:  #1}
  \end{flushright}} 



Recommended reading 2024:

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

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

ErgoProxy
Posts: 6
Joined: Mon Oct 19, 2009 9:21 pm

First chapter space has invisible header

Post by ErgoProxy »

Hi,

I added the last line in this section to the above document and now they are only about 5mm out of sync. Header is 5mm to high.

Code: Select all

\usepackage {fancyhdr, epsfig, amssymb, tabularx, amsmath, float, harvard}
\usepackage [left=30mm, right=25mm, top=20mm, bottom=20mm, includefoot]{geometry}
\setlength\headsep{0pt}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

First chapter space has invisible header

Post by localghost »

You are using a non-standard document class that is not available on CTAN. Attach it to your next post by uploading it to the forum server or give a link where to find it.


Best regards and welcome to the board
Thorsten
ErgoProxy
Posts: 6
Joined: Mon Oct 19, 2009 9:21 pm

Re: First chapter space has invisible header

Post by ErgoProxy »

Apologies! And thank you :) I'm eager to join more actively :)
Attachments
epr890.sty
Style file
(3.83 KiB) Downloaded 205 times
epr890.cls
Class file
(42.86 KiB) Downloaded 189 times
ErgoProxy
Posts: 6
Joined: Mon Oct 19, 2009 9:21 pm

First chapter space has invisible header

Post by ErgoProxy »

I think my problem is related to this posting:

How to set the top margin
http://www.latex-community.org/forum/vi ... f=5&t=1533
ErgoProxy
Posts: 6
Joined: Mon Oct 19, 2009 9:21 pm

First chapter space has invisible header

Post by ErgoProxy »

Ok by adding another line my headers are at 20mm spacing from the top. The section heading though are still 5mm off to low.

Code: Select all

\usepackage {fancyhdr, epsfig, amssymb, tabularx, amsmath, float, harvard}
\usepackage [left=30mm, right=25mm, top=20mm, bottom=20mm, includefoot]{geometry}
\setlength\headsep{0pt}
\setlength\topmargin{-0.2126in}
ErgoProxy
Posts: 6
Joined: Mon Oct 19, 2009 9:21 pm

First chapter space has invisible header

Post by ErgoProxy »

Ok I fixed it :)

by adding the following to the prime tex file (where the \begin{document} is and then do the \thispagestyle{plain} to fix all :)

Code: Select all

\fancypagestyle{plain}{%
	\fancyhf{}
	\renewcommand\headrulewidth{0pt}
  \renewcommand\footrulewidth{0pt}

  \renewcommand\headsep{-10pt}
  \renewcommand\topmargin{-0.2126in}
}
Post Reply