4

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.

  • I didn't find any examples...can you provide me something? – Mazzy Dec 23 '12 at 0:28
7

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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