Document Classestitlesec - Removing a section's rule when it starts a page

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
User avatar
FrankZA
Posts: 14
Joined: Wed Oct 17, 2007 1:02 pm

titlesec - Removing a section's rule when it starts a page

Post by FrankZA »

I am currently using the titlesec package in order to personalise my chapter and section headings with these commands:

Code: Select all

\titleformat{\section}
{\titlerule
\vspace{.8ex}%
\normalfont\Large\bfseries} {\thesection}{.5em}{}

\titleformat{\chapter}[display]
{\normalfont\Large\filcenter\sffamily}
{\titlerule[1pt]%
\vspace{1pt}%
\titlerule
\vspace{1pc}%
\LARGE\MakeUppercase{\chaptertitlename} \thechapter} {1pc} {\titlerule
\vspace{1pc}%
\Huge}
However, I would like to prevent the package from drawing a line above a section heading when it appears at the top of a page. I use the fancyhdr package to draw a line under the header of the page and would prefer to not have the duplicate line at the top of a page if that is where a new section begins.

Any ideas?
TeXnicCenter 1RC, LEd 0.53, MikTeX 2.8, Windows XP (SP3)

Recommended reading 2024:

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

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

FrankZA
Posts: 14
Joined: Wed Oct 17, 2007 1:02 pm

Re: titlesec - Removing a section's rule when it starts a page

Post by FrankZA »

I have searched the titlesec documentation but have been unable to find anything. Has anyone been able to bypass this problem?
TeXnicCenter 1RC, LEd 0.53, MikTeX 2.8, Windows XP (SP3)
Post Reply