2

I have created my thesis using fncychap to customize the chapters. There are also chapters starred created using chapter*{}. I would add an hrule in those chapters. As the user mafp suggested me, it is possible using titlesec package. Unfortunately those two packages enter in conflict. Here it is the previosly topic Add a hrule to only chapter not numbered

Here it is MWE:

\documentclass[12pt,a4paper,oneside]{book}

\usepackage[utf8]{inputenc}


\usepackage{lipsum}

\usepackage[margin=3cm,bindingoffset=0.5cm]{geometry}

\usepackage[Lenny]{fncychap}

\begin{document}

\chapter*{Intro}

\lipsum[1-3]

\chapter{My Chapter}

\lipsum[1-3]

\end{document}

I would add hrule to the starred chapter Intro without affecting My chapter

7
  • If you wanted to use one of the packages for \chapter and the other one for \section, I believe it would be possible. But I doubt you can combine their features in one type of sectioning commands.
    – yo'
    Jan 11, 2013 at 14:16
  • A MWE is very essential in this question. Please give an actual use case.
    – hpesoj626
    Jan 11, 2013 at 14:23
  • I think it doesn't matter a MWE. As you can see in the previosly question, it is not possible using both fncychap and titlesec together
    – Mazzy
    Jan 11, 2013 at 14:25
  • @Mazzy But please provide a MWE with your fncychap setup. This was also missing in your last question.
    – mafp
    Jan 11, 2013 at 15:13
  • 1
    @Mazzy It's only a waste of time asking questions where you don't give enough details of what you want to do. If you specify which of the chapter styles provided by fncychap you're using, it's probably possible to find a way to do what you'd like. But so long as this question is in the present format, it is not a real question.
    – egreg
    Jan 11, 2013 at 15:16

1 Answer 1

4

Just change the definition of \@makeschapterhead:

\documentclass[12pt,a4paper,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage[margin=3cm,bindingoffset=0.5cm]{geometry}

\usepackage[Lenny]{fncychap}
\makeatletter
\def\@makeschapterhead#1{%
  \vspace*{50\p@}%
  {\parindent\z@\raggedright\normalfont\interlinepenalty\@M
   \DOTIS{#1}%
   \vskip-30\p@ 
   \kern-.4\p@
   \hrule
   \vskip70\p@}%
}
\makeatother

\begin{document}

\chapter*{Intro}

\lipsum[1-3]

\chapter{My Chapter}

\lipsum[1-3]

\end{document}

enter image description here

It's a bit difficult to follow what fncychap does with \DOTIS, but you can move the line up and down by modifying -30\p@ (which stands for -30pt) and 70\p@ (the sum should be 40 to maintain the same distances).

Just a personal note: I find the Lenny chapter style preposterously horrible. But it's only an opinion, of course.

2
  • Yeah now it works.. egreg I agree with you about the style but Lenny style is the most nice style I found among styles offered by fncychap package. Do you have another idea of style to use for a thesis?
    – Mazzy
    Jan 11, 2013 at 15:43
  • 2
    @Mazzy Use the plain book style. It's surely many times superior to Lenny (according to my tastes). And no, no other style provided by the package catches me.
    – egreg
    Jan 11, 2013 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .