Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am thinking of adding a hrule to only chapters that are not numbered, in other words the chapters created using chapter*{}. I thought of using the titlesec package- My problem is that I cannot find anything in the documentation about the customizaion of non-numberred (starred) chapters. Any idea?

share|improve this question

2 Answers 2

I guess you have not looked hard enough, it is in the documentation of titlesec, look for numberless. Try

\documentclass{report}

% \usepackage{fncychap}

\usepackage{titlesec}

\titleformat{name=\chapter}[display]%
  {\bfseries\Large}{Chapter \thechapter}{1em}{}

\titleformat{name=\chapter,numberless}[display]%
  {\bfseries\Large}{}{0pt}{}[\titlerule]

\begin{document}

\chapter{First}

\chapter*{Second}

\chapter{Third}

\end{document}

Of course you have to adapt the settings to your likings, and it might happen that titlesec and fncychap interfere (You didn't specify which fncychap settings you use).

Note also that you have to give a definition for the unstarred version, too, as otherwise the setting for the starred version (numberless) don't take effect.

share|improve this answer
    
Unfortunately it goes in coflict with fncychap... –  Mazzy Jan 11 '13 at 13:50
    
Both the package can't exist –  Mazzy Jan 11 '13 at 13:54
    
@Mazzy Bad luck. Maybe that is another question? ;-) –  mafp Jan 11 '13 at 13:55
    
Maybe...I could try to open another question and see what happen –  Mazzy Jan 11 '13 at 13:56

Redefine \@makeschapterhead, for example:

\def\@makeschapterhead#1{%
{\raggedright{\Large\bfseries #1\strut}\par\hrule\nobreak\vskip 10\p@}}
share|improve this answer
    
I forgot to say I'm using fncychap to customize the chapter numbered –  Mazzy Jan 11 '13 at 12:04
    
Oops. Then I can't help you: I've never used this package (I prefer to do such simple things by hands). –  Eddy_Em Jan 11 '13 at 12:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.