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'm asking if does it exist a package to customize section or subsection as fncychap is used to customize chapter. I would have my section more fancy maybe adding some hrule or some decorations.

share|improve this question
2  
titlesec..... –  Harish Kumar Dec 23 '12 at 0:20
    
I didn't find any examples...can you provide me something? –  Mazzy Dec 23 '12 at 0:28

1 Answer 1

up vote 7 down vote accepted

These are taken from the user manual of titlesec (See Appendix, page 19)

\documentclass{book}
\usepackage{titlesec}
\usepackage{lipsum}
\titleformat{\section}[frame]
{\normalfont}
{\filright
\footnotesize
\enspace SECTION \thesection\enspace}
{8pt}
{\Large\bfseries\filcenter}
%This can be used for chapters also
\titleformat{\chapter}[display]
{\normalfont\Large\filcenter\sffamily}
{\titlerule[1pt]%
\vspace{1pt}%
\titlerule
\vspace{1pc}%
\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule
\vspace{1pc}%
\Huge}
\begin{document}
\chapter{My chapter}
\lipsum[3]
\section{My section}
\lipsum[1-2]
%
\titleformat{\section}
{\titlerule
\vspace{.8ex}%
\normalfont\itshape}
{\thesection.}{.5em}{}
\section{My another section}
\lipsum[2]
\end{document}

enter image description here

share|improve this answer

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.